commit c0606860b8be792025f9a6d8f2789b9ec229a221 Author: Lu zhiping Date: Sat Jul 16 13:02:45 2022 +0800 Import Upstream version 27.5.1~ds+~cs69.51.22 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..63a501e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org +# +# Some of these options are also respected by Prettier + +root = true + +[*] +indent_style = space +indent_size = 2 + +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{md,snap}] +trim_trailing_whitespace = false diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..48fa766 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,14 @@ +**/coverage/** +**/node_modules/** +bin/ +flow-typed/** +packages/*/build/** +packages/*/dist/** +packages/jest-diff/src/cleanupSemantic.ts +website/.docusaurus +website/blog +website/build +website/node_modules +website/i18n/*.js +website/static +!.eslintrc.js diff --git a/.eslintplugin/index.js b/.eslintplugin/index.js new file mode 100644 index 0000000..1c88251 --- /dev/null +++ b/.eslintplugin/index.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +exports.rules = { + 'ban-types-eventually': require('@typescript-eslint/eslint-plugin').rules[ + 'ban-types' + ], + 'prefer-rest-params-eventually': require('eslint/lib/rules/prefer-rest-params'), + 'prefer-spread-eventually': require('eslint/lib/rules/prefer-spread'), +}; diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..58dacdd --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,511 @@ +/** + * Copyright (c) 2016-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const {getPackages} = require('./scripts/buildUtils'); + +const internalPackages = getPackages() + .map(({pkg}) => pkg.name) + .sort(); + +module.exports = { + env: { + 'jest/globals': true, + node: true, + }, + extends: [ + 'plugin:import/errors', + 'plugin:eslint-comments/recommended', + 'plugin:prettier/recommended', + ], + globals: { + BigInt: 'readonly', + }, + overrides: [ + { + extends: [ + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:import/typescript', + ], + files: ['*.ts', '*.tsx'], + plugins: ['@typescript-eslint/eslint-plugin', 'local'], + rules: { + '@typescript-eslint/array-type': ['error', {default: 'generic'}], + '@typescript-eslint/ban-types': 'error', + '@typescript-eslint/no-implicit-any-catch': [ + 'error', + {allowExplicitAny: true}, + ], + '@typescript-eslint/no-unused-vars': [ + 'error', + {argsIgnorePattern: '^_'}, + ], + '@typescript-eslint/prefer-ts-expect-error': 'error', + // TS verifies this + 'consistent-return': 'off', + // Since we do `export =`. Remove for Jest 27 + 'import/default': 'off', + 'no-dupe-class-members': 'off', + 'no-unused-vars': 'off', + }, + }, + { + files: [ + 'packages/jest-jasmine2/src/jasmine/Env.ts', + 'packages/jest-jasmine2/src/jasmine/ReportDispatcher.ts', + 'packages/jest-jasmine2/src/jasmine/Spec.ts', + 'packages/jest-jasmine2/src/jasmine/SpyStrategy.ts', + 'packages/jest-jasmine2/src/jasmine/Suite.ts', + 'packages/jest-jasmine2/src/jasmine/createSpy.ts', + 'packages/jest-jasmine2/src/jasmine/jasmineLight.ts', + 'packages/jest-mock/src/__tests__/index.test.ts', + 'packages/jest-mock/src/index.ts', + 'packages/pretty-format/src/__tests__/Immutable.test.ts', + 'packages/pretty-format/src/__tests__/prettyFormat.test.ts', + ], + rules: { + 'local/prefer-rest-params-eventually': 'warn', + 'prefer-rest-params': 'off', + }, + }, + { + files: [ + 'packages/expect/src/index.ts', + 'packages/jest-fake-timers/src/legacyFakeTimers.ts', + 'packages/jest-jasmine2/src/jasmine/Env.ts', + 'packages/jest-jasmine2/src/jasmine/ReportDispatcher.ts', + 'packages/jest-jasmine2/src/jasmine/Spec.ts', + 'packages/jest-jasmine2/src/jasmine/Suite.ts', + 'packages/jest-jasmine2/src/jasmine/jasmineLight.ts', + 'packages/jest-jasmine2/src/jestExpect.ts', + 'packages/jest-resolve/src/resolver.ts', + ], + rules: { + 'local/prefer-spread-eventually': 'warn', + 'prefer-spread': 'off', + }, + }, + { + files: [ + 'e2e/babel-plugin-jest-hoist/__tests__/typescript.test.ts', + 'e2e/coverage-remapping/covered.ts', + 'packages/expect/src/matchers.ts', + 'packages/expect/src/print.ts', + 'packages/expect/src/toThrowMatchers.ts', + 'packages/expect/src/utils.ts', + 'packages/jest-core/src/ReporterDispatcher.ts', + 'packages/jest-core/src/TestScheduler.ts', + 'packages/jest-core/src/collectHandles.ts', + 'packages/jest-core/src/plugins/UpdateSnapshotsInteractive.ts', + 'packages/jest-fake-timers/src/legacyFakeTimers.ts', + 'packages/jest-haste-map/src/index.ts', + 'packages/jest-haste-map/src/watchers/FSEventsWatcher.ts', + 'packages/jest-jasmine2/src/jasmine/SpyStrategy.ts', + 'packages/jest-jasmine2/src/jasmine/Suite.ts', + 'packages/jest-leak-detector/src/index.ts', + 'packages/jest-matcher-utils/src/index.ts', + 'packages/jest-mock/src/__tests__/index.test.ts', + 'packages/jest-mock/src/index.ts', + 'packages/jest-snapshot/src/index.ts', + 'packages/jest-snapshot/src/printSnapshot.ts', + 'packages/jest-snapshot/src/types.ts', + 'packages/jest-util/src/convertDescriptorToString.ts', + 'packages/jest-worker/src/Farm.ts', + 'packages/jest-worker/src/index.ts', + 'packages/pretty-format/src/index.ts', + 'packages/pretty-format/src/plugins/DOMCollection.ts', + ], + rules: { + '@typescript-eslint/ban-types': [ + 'error', + // TODO: remove these overrides: https://github.com/facebook/jest/issues/10177 + {types: {Function: false, object: false, '{}': false}}, + ], + 'local/ban-types-eventually': [ + 'warn', + { + types: { + // none of these types are in use, so can be errored on + Boolean: false, + Number: false, + Object: false, + String: false, + Symbol: false, + }, + }, + ], + }, + }, + + // to make it more suitable for running on code examples in docs/ folder + { + files: ['*.md'], + rules: { + 'arrow-body-style': 'off', + 'consistent-return': 'off', + 'import/no-extraneous-dependencies': 'off', + 'import/no-unresolved': 'off', + 'no-console': 'off', + 'no-undef': 'off', + 'no-unused-vars': 'off', + 'prettier/prettier': 'off', + 'sort-keys': 'off', + }, + }, + // snapshots in examples plus inline snapshots need to keep backtick + { + files: ['*.md', 'e2e/custom-inline-snapshot-matchers/__tests__/*'], + rules: { + quotes: [ + 'error', + 'single', + {allowTemplateLiterals: true, avoidEscape: true}, + ], + }, + }, + { + files: ['website/**/*'], + rules: { + 'import/order': 'off', + 'import/sort-keys': 'off', + 'sort-keys': 'off', + }, + }, + { + files: ['examples/**/*'], + rules: { + 'import/no-unresolved': ['error', {ignore: ['^react-native$']}], + 'import/order': 'off', + }, + }, + { + files: 'packages/jest-types/**/*', + rules: { + 'import/no-extraneous-dependencies': 'off', + }, + }, + { + files: 'packages/**/*.ts', + rules: { + '@typescript-eslint/explicit-module-boundary-types': 'error', + 'import/no-anonymous-default-export': [ + 'error', + { + allowAnonymousClass: false, + allowAnonymousFunction: false, + allowArray: false, + allowArrowFunction: false, + allowCallExpression: false, + allowLiteral: false, + allowObject: true, + }, + ], + }, + }, + { + files: [ + '**/__tests__/**', + '**/__mocks__/**', + 'packages/jest-jasmine2/src/jasmine/**/*', + 'packages/expect/src/jasmineUtils.ts', + '**/vendor/**/*', + ], + rules: { + '@typescript-eslint/explicit-module-boundary-types': 'off', + }, + }, + { + files: [ + 'packages/jest-jasmine2/src/jasmine/**/*', + 'packages/expect/src/jasmineUtils.ts', + '**/vendor/**/*', + ], + rules: { + 'eslint-comments/disable-enable-pair': 'off', + 'eslint-comments/no-unlimited-disable': 'off', + }, + }, + { + files: [ + 'e2e/error-on-deprecated/__tests__/*', + 'e2e/jasmine-async/__tests__/*', + ], + globals: { + fail: true, + jasmine: true, + pending: true, + }, + }, + { + files: [ + 'website/**', + '**/__tests__/**', + 'e2e/**', + '**/pretty-format/perf/**', + ], + rules: { + 'import/no-extraneous-dependencies': 'off', + }, + }, + { + files: ['**/__typetests__/**', '*.md'], + rules: { + 'jest/no-focused-tests': 'off', + 'jest/no-identical-title': 'off', + 'jest/valid-expect': 'off', + }, + }, + { + files: [ + 'scripts/*', + 'packages/jest-cli/src/init/index.ts', + 'packages/jest-repl/src/cli/runtime-cli.ts', + ], + rules: { + 'no-console': 'off', + }, + }, + { + files: [ + 'e2e/**', + 'examples/**', + 'scripts/*', + 'website/**', + '**/__mocks__/**', + '**/__tests__/**', + '**/__typetests__/**', + '**/__performance_tests__/**', + 'packages/diff-sequences/perf/index.js', + 'packages/pretty-format/perf/test.js', + ], + rules: { + '@typescript-eslint/no-unused-vars': 'off', + 'import/no-unresolved': 'off', + 'no-console': 'off', + 'no-unused-vars': 'off', + }, + }, + ], + parser: '@typescript-eslint/parser', + parserOptions: { + sourceType: 'module', + }, + plugins: ['markdown', 'import', 'jest'], + rules: { + 'accessor-pairs': ['warn', {setWithoutGet: true}], + 'block-scoped-var': 'off', + 'callback-return': 'off', + camelcase: ['off', {properties: 'always'}], + complexity: 'off', + 'consistent-return': 'warn', + 'consistent-this': ['off', 'self'], + 'constructor-super': 'error', + 'default-case': 'off', + 'dot-notation': 'off', + eqeqeq: ['off', 'allow-null'], + 'eslint-comments/disable-enable-pair': ['error', {allowWholeFile: true}], + 'eslint-comments/no-unused-disable': 'error', + 'func-names': 'off', + 'func-style': ['off', 'declaration'], + 'global-require': 'off', + 'guard-for-in': 'off', + 'handle-callback-err': 'off', + 'id-length': 'off', + 'id-match': 'off', + 'import/no-duplicates': 'error', + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: [ + '**/__mocks__/**', + '**/__tests__/**', + '**/__typetests__/**', + '**/?(*.)(spec|test).js?(x)', + 'scripts/**', + 'babel.config.js', + 'testSetupFile.js', + '.eslintrc.js', + ], + }, + ], + 'import/no-unresolved': ['error', {ignore: ['fsevents']}], + 'import/order': [ + 'error', + { + alphabetize: { + order: 'asc', + }, + // this is the default order except for added `internal` in the middle + groups: [ + 'builtin', + 'external', + 'internal', + 'parent', + 'sibling', + 'index', + ], + 'newlines-between': 'never', + }, + ], + 'init-declarations': 'off', + 'jest/no-focused-tests': 'error', + 'jest/no-identical-title': 'error', + 'jest/valid-expect': 'error', + 'lines-around-comment': 'off', + 'max-depth': 'off', + 'max-nested-callbacks': 'off', + 'max-params': 'off', + 'max-statements': 'off', + 'new-cap': 'off', + 'new-parens': 'error', + 'newline-after-var': 'off', + 'no-alert': 'off', + 'no-array-constructor': 'error', + 'no-bitwise': 'warn', + 'no-caller': 'error', + 'no-case-declarations': 'off', + 'no-catch-shadow': 'error', + 'no-class-assign': 'warn', + 'no-cond-assign': 'off', + 'no-confusing-arrow': 'off', + 'no-console': [ + 'warn', + {allow: ['warn', 'error', 'time', 'timeEnd', 'timeStamp']}, + ], + 'no-const-assign': 'error', + 'no-constant-condition': 'off', + 'no-continue': 'off', + 'no-control-regex': 'off', + 'no-debugger': 'error', + 'no-delete-var': 'error', + 'no-div-regex': 'off', + 'no-dupe-args': 'error', + 'no-dupe-class-members': 'error', + 'no-dupe-keys': 'error', + 'no-duplicate-case': 'warn', + 'no-else-return': 'off', + 'no-empty': 'off', + 'no-empty-character-class': 'warn', + 'no-empty-pattern': 'warn', + 'no-eq-null': 'off', + 'no-eval': 'error', + 'no-ex-assign': 'warn', + 'no-extend-native': 'warn', + 'no-extra-bind': 'warn', + 'no-extra-boolean-cast': 'warn', + 'no-fallthrough': 'warn', + 'no-floating-decimal': 'error', + 'no-func-assign': 'error', + 'no-implicit-coercion': 'off', + 'no-implied-eval': 'error', + 'no-inline-comments': 'off', + 'no-inner-declarations': 'off', + 'no-invalid-regexp': 'warn', + 'no-invalid-this': 'off', + 'no-irregular-whitespace': 'error', + 'no-iterator': 'off', + 'no-label-var': 'warn', + 'no-labels': ['error', {allowLoop: true, allowSwitch: true}], + 'no-lonely-if': 'off', + 'no-loop-func': 'off', + 'no-magic-numbers': 'off', + 'no-mixed-requires': 'off', + 'no-mixed-spaces-and-tabs': 'error', + 'no-multi-str': 'error', + 'no-multiple-empty-lines': 'off', + 'no-native-reassign': ['error', {exceptions: ['Map', 'Set']}], + 'no-negated-condition': 'off', + 'no-negated-in-lhs': 'error', + 'no-nested-ternary': 'off', + 'no-new': 'warn', + 'no-new-func': 'error', + 'no-new-object': 'warn', + 'no-new-require': 'off', + 'no-new-wrappers': 'warn', + 'no-obj-calls': 'error', + 'no-octal': 'warn', + 'no-octal-escape': 'warn', + 'no-param-reassign': 'off', + 'no-path-concat': 'off', + 'no-plusplus': 'off', + 'no-process-env': 'off', + 'no-process-exit': 'off', + 'no-proto': 'error', + 'no-redeclare': 'warn', + 'no-regex-spaces': 'warn', + 'no-restricted-imports': [ + 'error', + {message: 'Please use graceful-fs instead.', name: 'fs'}, + ], + 'no-restricted-modules': 'off', + 'no-restricted-syntax': 'off', + 'no-return-assign': 'off', + 'no-script-url': 'error', + 'no-self-compare': 'warn', + 'no-sequences': 'warn', + 'no-shadow': 'off', + 'no-shadow-restricted-names': 'warn', + 'no-sparse-arrays': 'error', + 'no-sync': 'off', + 'no-ternary': 'off', + 'no-this-before-super': 'error', + 'no-throw-literal': 'error', + 'no-undef': 'error', + 'no-undef-init': 'off', + 'no-undefined': 'off', + 'no-underscore-dangle': 'off', + 'no-unneeded-ternary': 'warn', + 'no-unreachable': 'error', + 'no-unused-expressions': 'off', + 'no-unused-vars': ['error', {argsIgnorePattern: '^_'}], + 'no-use-before-define': 'off', + 'no-useless-call': 'warn', + 'no-useless-computed-key': 'error', + 'no-useless-concat': 'warn', + 'no-var': 'error', + 'no-void': 'off', + 'no-warn-comments': 'off', + 'no-with': 'off', + 'object-shorthand': 'error', + 'one-var': ['warn', {initialized: 'never'}], + 'operator-assignment': ['warn', 'always'], + 'operator-linebreak': 'off', + 'padded-blocks': 'off', + 'prefer-arrow-callback': ['error', {allowNamedFunctions: true}], + 'prefer-const': 'error', + 'prefer-template': 'off', + quotes: [ + 'error', + 'single', + {allowTemplateLiterals: false, avoidEscape: true}, + ], + radix: 'warn', + 'require-jsdoc': 'off', + 'require-yield': 'off', + 'sort-imports': ['error', {ignoreDeclarationSort: true}], + 'sort-keys': 'error', + 'sort-vars': 'off', + 'spaced-comment': ['off', 'always', {exceptions: ['eslint', 'global']}], + strict: 'off', + 'use-isnan': 'error', + 'valid-jsdoc': 'off', + 'valid-typeof': 'error', + 'vars-on-top': 'off', + 'wrap-iife': 'off', + 'wrap-regex': 'off', + yoda: 'off', + }, + settings: { + 'import/ignore': ['react-native'], + // using `new RegExp` makes sure to escape `/` + 'import/internal-regex': new RegExp( + internalPackages.map(pkg => `^${pkg}$`).join('|'), + ).source, + 'import/resolver': { + typescript: {}, + }, + }, +}; diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..00d138b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ + +# Pings orta when PRs are to this module +packages/jest-editor-support/src/* @orta diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..256e8aa --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +open_collective: jest diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..8b0483e --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,5 @@ +## 👉 [Please follow one of these issue templates](https://github.com/facebook/jest/issues/new/choose) 👈 + + + +Note: to keep the backlog clean and actionable, issues may be immediately closed if they do not follow one of the above issue templates. diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..60128a5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,103 @@ +name: Bug Report 🪲 +description: Create a bug report to help us improve +title: '[Bug]: ' +labels: ['Bug Report', 'Needs Triage'] +body: + - type: markdown + attributes: + value: | + # Please follow these steps first: + - type: markdown + attributes: + value: | + ## Troubleshoot + If Jest is not behaving the way you expect, we'd ask you to look at the [documentation](https://jestjs.io/docs/getting-started) and search the issue tracker for evidence supporting your expectation. Please make reasonable efforts to troubleshoot and rule out issues with your code, the configuration, or any 3rd party libraries you might be using. + - type: markdown + attributes: + value: | + ## Ask for help through appropriate channels + If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord channel](https://discord.gg/j6FKKQQrW9) before posting a bug report. The issue tracker is not a help forum. + - type: markdown + attributes: + value: | + ## Verify transformations + It's important to understand that Jest runs the code in your project as JavaScript. If you use syntax not supported by Node.js out of the box - such as React JSX, types from TypeScript, or components from Angular or Vue - that code needs to be [transformed](https://jestjs.io/docs/code-transformation) into plain JavaScript (similar to what you would do when building for browsers). Jest supports this via the [`transform` configuration option](https://jestjs.io/docs/configuration#transform-objectstring-pathtotransformer--pathtotransformer-object). + - type: markdown + attributes: + value: | + ## Make a minimal reproduction + To file the report, you will need a GitHub repository with a minimal (but complete) example and simple/clear steps on how to reproduce the bug. If all your tests fail with a strange error, can you find a way to show us with just one? If you have many configuration options in your `jest.config.js`, can you simplify it? + + The simpler you can make it, the more likely we are to successfully verify and fix the bug. + - type: markdown + attributes: + value: | + :bangbang:   Bug reports without a minimal reproduction will be rejected. :bangbang: + + --- + - type: input + id: version + attributes: + label: Version + description: | + The version of Jest you are using. + Is it the [latest](https://github.com/facebook/jest/releases)? Test and see if the bug has already been fixed. + placeholder: ex. 27.0.6 + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to reproduce + description: Please link to a repository with a minimal reproduction and describe accurately how we can reproduce/verify the bug. + placeholder: | + Example steps (replace with your own): + 1. Clone my repo at https://github.com//example + 2. yarn install + 3. yarn test + 4. You should see the error come up + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + description: A description of what you expect to happen. + placeholder: I expect to see X or Y + validations: + required: true + - type: textarea + id: what-happened + attributes: + label: Actual behavior + description: A clear and concise description of the unexpected behavior. + placeholder: A bug happened! + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional context + description: Anything else that might be relevant + validations: + required: false + - type: textarea + id: envinfo + attributes: + label: Environment + description: | + Please paste the output of running `npx envinfo --preset jest`. + This will be automatically formatted as a code block, so no need for backticks. + placeholder: | + System: + OS: Linux 5.10 Debian GNU/Linux 9 (stretch) + CPU: (8) arm64 + Binaries: + Node: 14.17.0 - /usr/local/bin/node + Yarn: 1.22.5 - /usr/local/bin/yarn + npm: 6.14.13 - /usr/local/bin/npm + npmPackages: + jest: 27.0.6 => 27.0.6 + render: shell + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..fdb8d89 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,46 @@ +name: Feature Proposal 🚀 +description: Submit a proposal for a new feature +title: '[Feature]: ' +labels: [':rocket: Feature Request'] +body: + - type: markdown + attributes: + value: | + ### Thank you for taking the time to suggest a new feature! + - type: textarea + id: description + attributes: + label: '🚀 Feature Proposal' + description: A clear and concise description of what the feature is. + validations: + required: true + - type: textarea + id: solution + attributes: + label: Motivation + description: Outline your motivation for the proposal. How will it make Jest better? + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Example + description: Describe how this feature would be used. + validations: + required: false + - type: textarea + id: extra + attributes: + label: Pitch + description: | + Why does this feature belong in the [Jest core platform](https://www.youtube.com/watch?v=NtjyeojAOBs)? + validations: + required: true + - type: markdown + attributes: + value: | + Common proposals that do not typically make it to core: + + - New matchers (see [jest-extended](https://github.com/jest-community/jest-extended)) + - Changes to the default reporter (use custom reporters instead) + - Changes to node/jsdom test environments (use custom environments instead) diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..3f2fa05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,27 @@ +name: 'Questions / Help 💬' +description: If you have questions, please check Reactiflux or StackOverflow +title: '[Please read the message below]' +labels: [':speech_balloon: Question'] +body: + - type: markdown + attributes: + value: | + ## Questions and Help 💬 + + This issue tracker is reserved for bug reports and feature proposals. + + For anything else, such as questions or getting help, please see: + + - [The Jest help page](https://jestjs.io/help) + - [Our `#testing` channel in Reactiflux](https://discord.gg/j6FKKQQrW9) + - The [jestjs](https://stackoverflow.com/questions/tagged/jestjs) tag on [StackOverflow](https://stackoverflow.com/questions/ask) + - type: checkboxes + id: no-post + attributes: + label: | + Please do not submit this issue. + description: | + :bangbang:   This issue will be closed. :bangbang: + options: + - label: I understand + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..81b97cc --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ + + + + +## Summary + + + +## Test plan + + diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000..df700b8 --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,3 @@ +Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jest) or [Reactiflux](https://discord.gg/j6FKKQQrW9) for questions. + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..253bcb7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml new file mode 100644 index 0000000..5fbd273 --- /dev/null +++ b/.github/workflows/issues.yml @@ -0,0 +1,15 @@ +name: 'Close issues' + +on: + issues: + types: [labeled] + +jobs: + questions: + runs-on: ubuntu-latest + steps: + - name: Close Issue + uses: peter-evans/close-issue@v1 + if: "${{ github.event.label.name == ':speech_balloon: Question' }}" + with: + comment: Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jestjs) or our [discord channel](https://discord.gg/j6FKKQQrW9) for questions. diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 0000000..2c143dc --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,27 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v3 + with: + github-token: ${{ github.token }} + issue-inactive-days: '30' + exclude-any-issue-labels: 'Discussion' + issue-comment: > + This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. + + Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jestjs) or our [discord channel](https://discord.gg/j6FKKQQrW9) for questions. + + + pr-inactive-days: '30' + pr-comment: > + This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. + + Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jestjs) or our [discord channel](https://discord.gg/j6FKKQQrW9) for questions. + diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..631345f --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,130 @@ +name: Node CI + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + +jobs: + cleanup-runs: + runs-on: ubuntu-latest + steps: + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" + + prepare-yarn-cache: + name: Prepare yarn cache + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: lts/* + cache: yarn + + - name: Validate cache + env: + # Use PnP and disable postinstall scripts as this just needs to + # populate the cache for the other jobs + YARN_NODE_LINKER: pnp + YARN_ENABLE_SCRIPTS: false + run: yarn --immutable + + lint-and-typecheck: + name: Running TypeScript compiler & ESLint + runs-on: ubuntu-latest + needs: prepare-yarn-cache + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: lts/* + cache: yarn + - name: install + run: yarn --immutable + - name: build + run: yarn build + - name: test typings + run: yarn test-types + - name: verify TypeScript@3.8 compatibility + run: yarn verify-old-ts + - name: verify Yarn PnP compatibility + run: yarn verify-pnp + - name: run eslint + run: yarn lint + - name: run prettier + run: yarn lint:prettier:ci + - name: check copyright headers + run: yarn check-copyright-headers + test: + name: Node v${{ matrix.node-version }} on ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + node-version: [10.x, 12.x, 14.x, 15.x, 16.x, 17.x] + os: [ubuntu-latest, macOS-latest, windows-latest] + runs-on: ${{ matrix.os }} + needs: prepare-yarn-cache + + steps: + - name: Set git config + shell: bash + run: | + git config --global core.autocrlf false + git config --global core.symlinks true + if: runner.os == 'Windows' + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: yarn + - name: install + run: yarn --immutable + - name: build + run: yarn build:js + - name: Get number of CPU cores + id: cpu-cores + uses: SimenB/github-actions-cpu-cores@v1 + - name: run tests + run: yarn test-ci-partial:parallel --max-workers ${{ steps.cpu-cores.outputs.count }} + + test-jasmine: + name: Node LTS on ${{ matrix.os }} using jest-jasmine2 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + runs-on: ${{ matrix.os }} + needs: prepare-yarn-cache + + steps: + - name: Set git config + shell: bash + run: | + git config --global core.autocrlf false + git config --global core.symlinks true + if: runner.os == 'Windows' + - uses: actions/checkout@v2 + - name: Use Node.js LTS + uses: actions/setup-node@v2 + with: + node-version: lts/* + cache: yarn + - name: install + run: yarn --immutable + - name: build + run: yarn build:js + - name: Get number of CPU cores + id: cpu-cores + uses: SimenB/github-actions-cpu-cores@v1 + - name: run tests using jest-jasmine + run: yarn jest-jasmine-ci --max-workers ${{ steps.cpu-cores.outputs.count }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7dfb510 --- /dev/null +++ b/.gitignore @@ -0,0 +1,55 @@ +.idea +.DS_STORE +.eslintcache +*.swp +*~ +/examples/*/node_modules/ +/examples/mongodb/globalConfig.json + +/e2e/*/node_modules +/e2e/*/.pnp +/e2e/*/.pnp.js +!/e2e/presets/json/node_modules +!/e2e/presets/js/node_modules +/e2e/transform/*/coverage +/e2e/transform/*/node_modules + +/node_modules + +/packages/*/build/ +/packages/*/dist/ +/packages/*/coverage/ +/packages/*/node_modules/ + +/website/.docusaurus +/website/build +/website/backers.json +/website/node_modules +/website/yarn.lock +/website/i18n/* + +/benchmarks/*/node_modules/ + +/reports/* + +coverage +lerna-debug.log +npm-debug.log +npm-debug.log* +yarn-error.log* +junit.xml +package-lock.json + +*.tsbuildinfo +api-extractor.json + +# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored but nested for e2e directories +**/.yarn/* +!**/.yarn/patches +!**/.yarn/releases +!**/.yarn/plugins +!**/.yarn/sdks +!**/.yarn/versions +**/.pnp.* + +crowdin-cli.jar diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..9d00ca7 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +fixtures/failing-jsons/ +packages/jest-diff/src/cleanupSemantic.ts +packages/jest-config/src/__tests__/jest-preset.json +packages/pretty-format/perf/world.geo.json +website/versions.json diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1 @@ +[] diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 0000000..e34637d --- /dev/null +++ b/.yarnrc @@ -0,0 +1,6 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +lastUpdateCheck 1576854265612 +yarn-path ".yarn/releases/yarn-sources.cjs" diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..a5670d1 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1,19 @@ +enableGlobalCache: true + +nodeLinker: node-modules + +packageExtensions: + react-native@*: + peerDependencies: + "@babel/preset-env": "^7.1.6" + react-native-codegen@*: + peerDependencies: + "@babel/preset-env": "^7.1.6" + +plugins: + - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs + spec: "@yarnpkg/plugin-interactive-tools" + - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs + spec: "@yarnpkg/plugin-workspace-tools" + +yarnPath: .yarn/releases/yarn-2.4.3.cjs diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ce76556 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3030 @@ +## main + +### Features + +### Fixes + +### Chore & Maintenance + +### Performance + +## 27.5.1 + +### Features + +- `[jest-config]` Support comments in JSON config file ([#12316](https://github.com/facebook/jest/pull/12316)) +- `[pretty-format]` Expose `ConvertAnsi` plugin ([#12308](https://github.com/facebook/jest/pull/12308)) + +### Fixes + +- `[expect]` Add type definitions for asymmetric `closeTo` matcher ([#12304](https://github.com/facebook/jest/pull/12304)) +- `[jest-cli]` Load binary via exported API ([#12315](https://github.com/facebook/jest/pull/12315)) +- `[jest-config]` Replace `jsonlint` with `parse-json` ([#12316](https://github.com/facebook/jest/pull/12316)) +- `[jest-repl]` Make module importable ([#12311](https://github.com/facebook/jest/pull/12311) & [#12315](https://github.com/facebook/jest/pull/12315)) + +### Chore & Maintenance + +- `[*]` Avoid anonymous default exports ([#12313](https://github.com/facebook/jest/pull/12313)) + +## 27.5.0 + +### Features + +- `[expect]` Add asymmetric matcher `expect.closeTo` ([#12243](https://github.com/facebook/jest/pull/12243)) +- `[jest-mock]` Added `mockFn.mock.lastCall` to retrieve last argument ([#12285](https://github.com/facebook/jest/pull/12285)) + +### Fixes + +- `[expect]` Add a fix for `.toHaveProperty('')` ([#12251](https://github.com/facebook/jest/pull/12251)) +- `[jest-each, @jest/globals]` Allow passing `ReadonlyArray` type of a table to `describe.each` and `test.each` ([#12297](https://github.com/facebook/jest/pull/12297)) +- `[@jest/globals]` Add missing `options` argument to `jest.doMock` typing ([#12292](https://github.com/facebook/jest/pull/12292)) +- `[jest-environment-node]` Add `atob` and `btoa` ([#12269](https://github.com/facebook/jest/pull/12269)) +- `[jest-matcher-utils]` Correct diff for expected asymmetric matchers ([#12264](https://github.com/facebook/jest/pull/12264)) +- `[jest-message-util]` Fix `.getTopFrame()` (and `toMatchInlineSnapshot()`) with `mjs` files ([#12277](https://github.com/facebook/jest/pull/12277)) + +### Chore & Maintenance + +- `[*]` Update `graceful-fs` to `^4.2.9` ([#11749](https://github.com/facebook/jest/pull/11749)) + +### Performance + +- `[jest-resolve]` perf: skip error creation on not found `stat` calls ([#11749](https://github.com/facebook/jest/pull/11749)) + +## 27.4.7 + +### Fixes + +- `jest-config` Add missing `@babel/core` dependency ([#12216](https://github.com/facebook/jest/pull/12216)) + +## 27.4.6 + +### Fixes + +- `[jest-environment-node]` Add `AbortSignal` ([#12157](https://github.com/facebook/jest/pull/12157)) +- `[jest-environment-node]` Add Missing node global `performance` ([#12002](https://github.com/facebook/jest/pull/12002)) +- `[jest-runtime]` Handle missing `mocked` property ([#12213](https://github.com/facebook/jest/pull/12213)) +- `[@jest/transform]` Update dependency package `pirates` to 4.0.4 ([#12002](https://github.com/facebook/jest/pull/12002)) + +### Performance + +- `jest-config` perf: only register ts-node once when loading TS config files ([#12160](https://github.com/facebook/jest/pull/12160)) + +## 27.4.5 + +### Fixes + +- `[jest-worker]` Stop explicitly passing `process.env` ([#12141](https://github.com/facebook/jest/pull/12141)) + +## 27.4.4 + +### Fixes + +- `[babel-jest]` Add `process.version` chunk to the cache key ([#12122](https://github.com/facebook/jest/pull/12122)) +- `[jest-environment]` Add `mocked` to `jest` object ([#12133](https://github.com/facebook/jest/pull/12133)) +- `[jest-worker]` Stop explicitly passing `execArgv` ([#12128](https://github.com/facebook/jest/pull/12128)) + +### Chore & Maintenance + +- `[website]` Fix the card front that looks overlapping part of the card back + +## 27.4.3 + +### Fixes + +- `[jest-environment-jsdom]` Remove `@types/jsdom` dependency (and make its `dom` property `private`) ([#12107](https://github.com/facebook/jest/pull/12107)) + +## 27.4.2 + +### Fixes + +- `[jest-worker]` Add additional `execArgv` to filter ([#12103](https://github.com/facebook/jest/pull/12103)) + +## 27.4.1 + +### Fixes + +- `[jest-worker]` Filter `execArgv` correctly ([#12097](https://github.com/facebook/jest/pull/12097)) + +## 27.4.0 + +### Features + +- `[expect]` Enhancing the `toHaveProperty` matcher to support array selection ([#12092](https://github.com/facebook/jest/pull/12092)) +- `[jest-core]` Add support for `testResultsProcessor` written in ESM ([#12006](https://github.com/facebook/jest/pull/12006)) +- `[jest-diff, pretty-format]` Add `compareKeys` option for custom sorting of object keys ([#11992](https://github.com/facebook/jest/pull/11992)) +- `[jest-mock]` Add `ts-jest` mock util functions ([#12089](https://github.com/facebook/jest/pull/12089)) + +### Fixes + +- `[expect]` Allow again `expect.Matchers` generic with single value ([#11986](https://github.com/facebook/jest/pull/11986)) +- `[jest-circus, jest-jasmine2]` Avoid false concurrent test failures due to unhandled promise rejections ([#11987](https://github.com/facebook/jest/pull/11987)) +- `[jest-config]` Add missing `slash` dependency to `package.json` ([#12080](https://github.com/facebook/jest/pull/12080)) +- `[jest-core]` Incorrect detection of open ZLIB handles ([#12022](https://github.com/facebook/jest/pull/12022)) +- `[jest-diff]` Break dependency cycle ([#10818](https://github.com/facebook/jest/pull/10818)) +- `[jest-environment-jsdom]` Add `@types/jsdom` dependency ([#11999](https://github.com/facebook/jest/pull/11999)) +- `[jest-environment-jsdom]` Do not reset the global.document too early on teardown ([#11871](https://github.com/facebook/jest/pull/11871)) +- `[jest-transform]` Improve error and warning messages ([#11998](https://github.com/facebook/jest/pull/11998)) +- `[jest-worker]` Pass `execArgv` correctly to `worker_threads` worker ([#12069](https://github.com/facebook/jest/pull/12069)) + +### Chore & Maintenance + +- `[docs]` CLI options alphabetized ([#11586](https://github.com/facebook/jest/pull/11586)) +- `[jest-runner]` Add info regarding timers to forcedExit message([#12083](https://github.com/facebook/jest/pull/12083)) +- `[*]` Replaced `substr` method with `substring` ([#12066](https://github.com/facebook/jest/pull/12066)) +- `[*]` Add `types` entry to all export maps ([#12073](https://github.com/facebook/jest/pull/12073)) + +## 27.3.1 + +### Fixes + +- `[expect]` Make `expect` extension properties `configurable` ([#11978](https://github.com/facebook/jest/pull/11978)) +- `[expect]` Fix `.any()` checks on primitive wrapper classes ([#11976](https://github.com/facebook/jest/pull/11976)) + +### Chore & Maintenance + +- `[expect]` `BigInt` global is always defined, don't check for its existence at runtime ([#11979](https://github.com/facebook/jest/pull/11979)) +- `[jest-config, jest-util]` Use `ci-info` instead of `is-ci` to detect CI environment ([#11973](https://github.com/facebook/jest/pull/11973)) + +## 27.3.0 + +### Features + +- `[jest-config]` Add `testEnvironmentOptions.html` to apply to jsdom input ([#11950](https://github.com/facebook/jest/pull/11950)) +- `[jest-resolver]` Support default export (`.`) in `exports` field _if_ `main` is missing ([#11919](https://github.com/facebook/jest/pull/11919)) + +### Fixes + +- `[expect]` Tweak and improve types ([#11949](https://github.com/facebook/jest/pull/11949)) +- `[jest-runtime]` Ensure absolute paths can be resolved within test modules ([#11943](https://github.com/facebook/jest/pull/11943)) +- `[jest-runtime]` Fix `instanceof` for `ModernFakeTimers` and `LegacyFakeTimers` methods ([#11946](https://github.com/facebook/jest/pull/11946)) + +## 27.2.5 + +### Features + +- `[jest-config]` Warn when multiple Jest configs are located ([#11922](https://github.com/facebook/jest/pull/11922)) + +### Fixes + +- `[expect]` Pass matcher context to asymmetric matchers ([#11926](https://github.com/facebook/jest/pull/11926) & [#11930](https://github.com/facebook/jest/pull/11930)) +- `[expect]` Improve TypeScript types ([#11931](https://github.com/facebook/jest/pull/11931)) +- `[expect]` Improve typings of `toThrow()` and `toThrowError()` matchers ([#11929](https://github.com/facebook/jest/pull/11929)) +- `[jest-cli]` Improve `--help` printout by removing defunct `--browser` option ([#11914](https://github.com/facebook/jest/pull/11914)) +- `[jest-haste-map]` Use distinct cache paths for different values of `computeDependencies` ([#11916](https://github.com/facebook/jest/pull/11916)) +- `[@jest/reporters]` Do not buffer `console.log`s when using verbose reporter ([#11054](https://github.com/facebook/jest/pull/11054)) + +### Chore & Maintenance + +- `[expect]` Export default matchers ([#11932](https://github.com/facebook/jest/pull/11932)) +- `[@jest/types]` Mark deprecated configuration options as `@deprecated` ([#11913](https://github.com/facebook/jest/pull/11913)) + +## 27.2.4 + +### Features + +- `[expect]` Add equality checks for Array Buffers in `expect.ToStrictEqual()` ([#11805](https://github.com/facebook/jest/pull/11805)) + +### Fixes + +- `[jest-snapshot]` Correctly indent inline snapshots ([#11560](https://github.com/facebook/jest/pull/11560)) + +## 27.2.3 + +### Features + +- `[@jest/fake-timers]` Update `@sinonjs/fake-timers` to v8 ([#11879](https://github.com/facebook/jest/pull/11879)) + +### Fixes + +- `[jest-config]` Parse `testEnvironmentOptions` if received from CLI ([#11902](https://github.com/facebook/jest/pull/11902)) +- `[jest-reporters]` Call `destroy` on `v8-to-istanbul` converters to free memory ([#11896](https://github.com/facebook/jest/pull/11896)) + +## 27.2.2 + +### Fixes + +- `[jest-runtime]` Correct `wrapperLength` value for ESM modules. ([#11893](https://github.com/facebook/jest/pull/11893)) + +## 27.2.1 + +### Features + +- `[jest-transform]` Improve the unexpected token error message. ([#11807](https://github.com/facebook/jest/pull/11807)) + +### Fixes + +- `[jest-runtime]` Fix regression when using `jest.isolateModules` and mocks ([#11882](https://github.com/facebook/jest/pull/11882)) +- `[jest-runtime]` Include test name when importing modules after test has completed ([#11885](https://github.com/facebook/jest/pull/11885)) +- `[jest-runtime]` Error when ESM import is used after test is torn down ([#11885](https://github.com/facebook/jest/pull/11885)) + +## 27.2.0 + +### Features + +- `[jest-resolver, jest-runtime]` Pass `conditions` to custom resolvers to enable them to implement support for package.json `exports` field ([#11859](https://github.com/facebook/jest/pull/11859)) +- `[jest-runtime]` Allow custom envs to specify `exportConditions` which is passed together with Jest's own conditions to custom resolvers ([#11863](https://github.com/facebook/jest/pull/11863)) + +### Fixes + +- `[@jest/reporters]` Use async transform if available to transform files with no coverage ([#11852](https://github.com/facebook/jest/pull/11852)) +- `[jest-util]` Return correct value from `process.send` stub ([#11799](https://github.com/facebook/jest/pull/11799)) + +## 27.1.1 + +### Features + +- `[jest-runtime]` Add experimental, limited (and undocumented) support for mocking ECMAScript Modules ([#11818](https://github.com/facebook/jest/pull/11818)) + +### Fixes + +- `[jest-resolver]` Support `node:` prefix when importing Node core modules with ESM ([#11817](https://github.com/facebook/jest/pull/11817)) +- `[jest-types]` Export the `PrettyFormatOptions` interface ([#11801](https://github.com/facebook/jest/pull/11801)) + +## 27.1.0 + +### Features + +- `[jest-haste-map]` Use watchman suffix-set option for faster file indexing. ([#11784](https://github.com/facebook/jest/pull/11784)) +- `[jest-cli]` Adds a new config options `snapshotFormat` which offers a way to override any of the formatting settings which come with [pretty-format](https://www.npmjs.com/package/pretty-format#usage-with-options). ([#11654](https://github.com/facebook/jest/pull/11654)) +- `[jest-reporters]` Expose the `getSummary` util ([#11695](https://github.com/facebook/jest/pull/11695)). +- `[jest-resolver]` Support `node:` prefix when importing Node core modules ([#11331](https://github.com/facebook/jest/pull/11331)) + +### Fixes + +- `[jest-each]` Relaxed the validation to allow multibyte characters in headings ([#11575](https://github.com/facebook/jest/pull/11575)) +- `[jest-environment-jsdom]` Add support for `userAgent` option ([#11773](https://github.com/facebook/jest/pull/11773)) +- `[jest-environment-node]` Add `Event` and `EventTarget` to node global environment. ([#11727](https://github.com/facebook/jest/pull/11727)) +- `[jest-mock]` Fix `spyOn` to use `Object.prototype.hasOwnProperty` ([#11721](https://github.com/facebook/jest/pull/11721)) +- `[jest-resolver]` Add dependency on `jest-haste-map` ([#11759](https://github.com/facebook/jest/pull/11759)) +- `[jest-types]` Compat with `@types/node` v16 ([#11645](https://github.com/facebook/jest/pull/11645)) + +### Chore & Maintenance + +- `[docs]` Correct `expects.assertions` documentation by adding async/await for asynchronous function. + +## 27.0.6 + +### Fixes + +- `[*]` Publish all modules to include the build change in ([#11569](https://github.com/facebook/jest/pull/11569)) + +## 27.0.5 + +### Features + +- `[@jest/fake-timers]` Flush callbacks scheduled with `requestAnimationFrame` every 16ms when using legacy timers. ([#11523](https://github.com/facebook/jest/pull/11567)) +- `[pretty-format]` Use `globalThis` (with polyfill if required) to bring support for esbuild's browser bundling mode ([#11569](https://github.com/facebook/jest/pull/11569)) + +### Fixes + +- `[jest-core]` Support special characters like `@`, `+` and `()` on Windows with `--findRelatedTests` ([#11548](https://github.com/facebook/jest/pull/11548)) +- `[@jest/fake-timers]` Do not add `setImmediate` and `clearImmediate` if they do not exist in the global environment ([#11599](https://github.com/facebook/jest/pull/11599)) +- `[@jest/reporters]` Allow `node-notifier@10` as peer dependency ([#11523](https://github.com/facebook/jest/pull/11523)) +- `[@jest/reporters]` Update `v8-to-istanbul` ([#11523](https://github.com/facebook/jest/pull/11523)) + +## 27.0.4 + +### Fixes + +- `[jest-config, jest-resolve]` Pass in `require.resolve` to resolvers to resolve from correct base ([#11493](https://github.com/facebook/jest/pull/11493)) + +## 27.0.3 + +### Fixes + +- `[jest-config]` `require.resolve` on default test sequencer and test environment ([#11482](https://github.com/facebook/jest/pull/11482)) +- `[jest-mock]` Fixed `fn` and `spyOn` exports ([#11480](https://github.com/facebook/jest/pull/11480)) + +## 27.0.2 + +### Features + +- `[jest-circus]` Add some APIs to make it easier to build your own test runner +- `[jest-reporters]` Expose the `getResultHeader` util ([#11460](https://github.com/facebook/jest/pull/11460)) +- `[jest-resolver]` Export `resolve*` utils for different Jest modules ([#11466](https://github.com/facebook/jest/pull/11466)) +- `[@jest/test-result]` Export `Test`, `TestEvents` and `TestFileEvent` ([#11466](https://github.com/facebook/jest/pull/11466)) + +### Fixes + +- `[jest-circus]` Add missing `slash` dependency ([#11465](https://github.com/facebook/jest/pull/11465)) +- `[jest-circus, @jest/test-sequencer]` Remove dependency on `jest-runner` ([#11466](https://github.com/facebook/jest/pull/11466)) +- `[jest-config]` Resolve `config.runner` to absolute path ([#11465](https://github.com/facebook/jest/pull/11465)) +- `[jest-config]` Make sure to support functions as config ([#11475](https://github.com/facebook/jest/pull/11475)) +- `[jest-core]` Do not warn about `DNSCHANNEL` handles when using the `--detectOpenHandles` option ([#11470](https://github.com/facebook/jest/pull/11470)) +- `[jest-runner]` Remove dependency on `jest-config` ([#11466](https://github.com/facebook/jest/pull/11466)) +- `[jest-worker]` Loosen engine requirement to `>= 10.13.0` ([#11451](https://github.com/facebook/jest/pull/11451)) + +## 27.0.1 + +### Fixes + +- `[jest-environment-jsdom]` Bump version of JSDOM to avoid deprecated `request` package ([#11442](https://github.com/facebook/jest/pull/11442)) + +## 27.0.0 + +### Features + +- `[babel-jest]` Add async transformation ([#11192](https://github.com/facebook/jest/pull/11192)) +- `[jest-changed-files]` Use '--' to separate paths from revisions ([#11160](https://github.com/facebook/jest/pull/11160)) +- `[jest-circus]` [**BREAKING**] Fail tests when multiple `done()` calls are made ([#10624](https://github.com/facebook/jest/pull/10624)) +- `[jest-circus, jest-jasmine2]` [**BREAKING**] Fail the test instead of just warning when describe returns a value ([#10947](https://github.com/facebook/jest/pull/10947)) +- `[jest-config]` [**BREAKING**] Default to Node testing environment instead of browser (JSDOM) ([#9874](https://github.com/facebook/jest/pull/9874)) +- `[jest-config]` [**BREAKING**] Use `jest-circus` as default test runner ([#10686](https://github.com/facebook/jest/pull/10686)) +- `[jest-config]` Add support for `preset` written in ESM ([#11200](https://github.com/facebook/jest/pull/11200)) +- `[jest-config, jest-runtime]` Support ESM for files other than `.js` and `.mjs` ([#10823](https://github.com/facebook/jest/pull/10823)) +- `[jest-config, jest-runtime]` [**BREAKING**] Use "modern" implementation as default for fake timers ([#10874](https://github.com/facebook/jest/pull/10874) & [#11197](https://github.com/facebook/jest/pull/11197)) +- `[jest-config` Allow passing `forceNodeFilesystemAPI` through to `jest-haste-map` ([#11264](https://github.com/facebook/jest/pull/11264)) +- `[jest-config, jest-haste-map, jest-resolve, jest-runner, jest-runtime, jest-test-sequencer, jest-transform, jest-types]` [**BREAKING**] Add custom HasteMap class implementation config option ([#11107](https://github.com/facebook/jest/pull/11107)) +- `[jest-core]` make `TestWatcher` extend `emittery` ([#10324](https://github.com/facebook/jest/pull/10324)) +- `[jest-core]` Run failed tests interactively the same way we do with snapshots ([#10858](https://github.com/facebook/jest/pull/10858)) +- `[jest-core]` more `TestSequencer` methods can be async ([#10980](https://github.com/facebook/jest/pull/10980)) +- `[jest-core]` Add support for `testSequencer` written in ESM ([#11207](https://github.com/facebook/jest/pull/11207)) +- `[jest-core]` Add support for `globalSetup` and `globalTeardown` written in ESM ([#11267](https://github.com/facebook/jest/pull/11267)) +- `[jest-core]` Add support for `watchPlugins` written in ESM ([#11315](https://github.com/facebook/jest/pull/11315)) +- `[jest-core]` Add support for `runner` written in ESM ([#11232](https://github.com/facebook/jest/pull/11232)) +- `[jest-core]` Add support for `reporters` written in ESM ([#11427](https://github.com/facebook/jest/pull/11427)) +- `[jest-each]` Add support for interpolation with object properties ([#11388](https://github.com/facebook/jest/pull/11388)) +- `[jest-environment-node]` Add AbortController to globals ([#11182](https://github.com/facebook/jest/pull/11182)) +- `[@jest/fake-timers]` Update to `@sinonjs/fake-timers` to v7 ([#11198](https://github.com/facebook/jest/pull/11198)) +- `[jest-haste-map]` Handle injected scm clocks ([#10966](https://github.com/facebook/jest/pull/10966)) +- `[jest-haste-map]` Add `enableSymlinks` configuration option to follow symlinks for test files ([#9351](https://github.com/facebook/jest/pull/9351)) +- `[jest-repl, jest-runner]` [**BREAKING**] Run transforms over environment ([#8751](https://github.com/facebook/jest/pull/8751)) +- `[jest-repl]` Add support for `testEnvironment` written in ESM ([#11232](https://github.com/facebook/jest/pull/11232)) +- `[jest-reporters]` Add static filepath property to all reporters ([#11015](https://github.com/facebook/jest/pull/11015)) +- `[jest-runner]` [**BREAKING**] set exit code to 1 if test logs after teardown ([#10728](https://github.com/facebook/jest/pull/10728)) +- `[jest-runner]` [**BREAKING**] Run transforms over `runner` ([#8823](https://github.com/facebook/jest/pull/8823)) +- `[jest-runner]` [**BREAKING**] Run transforms over `testRunner` ([#8823](https://github.com/facebook/jest/pull/8823)) +- `[jest-runner]` Possibility to use ESM for test environment ([11033](https://github.com/facebook/jest/pull/11033)) +- `[jest-runner]` Add support for `testRunner` written in ESM ([#11232](https://github.com/facebook/jest/pull/11232)) +- `[jest-runtime]` Detect reexports from CJS as named exports in ESM ([#10988](https://github.com/facebook/jest/pull/10988)) +- `[jest-runtime]` Support for async code transformations ([#11191](https://github.com/facebook/jest/pull/11191) & [#11220](https://github.com/facebook/jest/pull/11220)) +- `[jest-snapshot]` [**BREAKING**] Make prettier optional for inline snapshots - fall back to string replacement ([#7792](https://github.com/facebook/jest/pull/7792) & [#11192](https://github.com/facebook/jest/pull/11192)) +- `[jest-snapshot]` [**BREAKING**] Run transforms over `snapshotResolver` ([#8751](https://github.com/facebook/jest/pull/8829)) +- `[jest-transform]` Pass config options defined in Jest's config to transformer's `process` and `getCacheKey` functions ([#10926](https://github.com/facebook/jest/pull/10926)) +- `[jest-transform]` Add support for transformers written in ESM ([#11163](https://github.com/facebook/jest/pull/11163)) +- `[jest-transform]` [**BREAKING**] Do not export `ScriptTransformer` class, instead export the async function `createScriptTransformer` ([#11163](https://github.com/facebook/jest/pull/11163)) +- `[jest-transform]` Async code transformations ([#9889](https://github.com/facebook/jest/pull/9889)) +- `[jest-transform]` Support transpiled transformers ([#11193](https://github.com/facebook/jest/pull/11193)) +- `[jest-transform]` [**BREAKING**] `requireAndTranspileModule` always return a `Promise`, and the third parameter type is changed to `RequireAndTranspileModuleOptions` which accept `applyInteropRequireDefault` option ([#11232](https://github.com/facebook/jest/pull/11232)) +- `[jest-transform]` [**BREAKING**] `createTranspilingRequire` return function which return a `Promise` now ([#11232](https://github.com/facebook/jest/pull/11232)) +- `[jest-util]` add requireOrImportModule for importing CJS or ESM ([#11199](https://github.com/facebook/jest/pull/11199)) +- `[jest-util]` add `applyInteropRequireDefault` option on `requireOrImportModule` ([#11232](https://github.com/facebook/jest/pull/11232)) +- `[jest-watcher]` Added support for clearing the line when `` is pressed in a watch mode pattern prompt ([#11358](https://github.com/facebook/jest/pull/11358)) +- `[jest-worker]` Add support for custom task queues and adds a `PriorityQueue` implementation. ([#10921](https://github.com/facebook/jest/pull/10921)) +- `[jest-worker]` Add in-order scheduling policy to jest worker ([10902](https://github.com/facebook/jest/pull/10902)) +- `[pretty-format]` Better print for sparse arrays ([11326](https://github.com/facebook/jest/pull/11326)) +- `[pretty-print]` Add option `printBasicPrototype` which determines whether or not the prototype should be printed for raw objects or arrays ([#11441](https://github.com/facebook/jest/pull/11441)) + +### Fixes + +- `[babel-plugin-jest-hoist]` Add `__dirname` and `__filename` to whitelisted globals ([#10903](https://github.com/facebook/jest/pull/10903)) +- `[expect]` [**BREAKING**] Revise `expect.not.objectContaining()` to be the inverse of `expect.objectContaining()`, as documented. ([#10708](https://github.com/facebook/jest/pull/10708)) +- `[expect]` [**BREAKING**] Make `toContain` more strict with the received type ([#10119](https://github.com/facebook/jest/pull/10119) & [#10929](https://github.com/facebook/jest/pull/10929)) +- `[expect]` [**BREAKING**] `matcherResult` on `JestAssertionError` are now strings rather than functions ([#10989](https://github.com/facebook/jest/pull/10989)) +- `[jest-circus]` Fixed the issue of beforeAll & afterAll hooks getting executed even if it is inside a skipped `describe` block ([#10806](https://github.com/facebook/jest/pull/10806)) +- `[jest-circus]` Fix `testLocation` on Windows when using `test.each` ([#10871](https://github.com/facebook/jest/pull/10871)) +- `[jest-cli]` Use testFailureExitCode when bailing from a failed test ([#10958](https://github.com/facebook/jest/pull/10958)) +- `[jest-cli]` Print custom error if error thrown from global hooks is not an error already ([#11003](https://github.com/facebook/jest/pull/11003)) +- `[jest-cli]` Allow running multiple "projects" from programmatic API ([#11307](https://github.com/facebook/jest/pull/11307)) +- `[jest-cli]` Fix missing collectCoverage after init ([#11353](https://github.com/facebook/jest/pull/11353)) +- `[jest-cli, jest-config, jest-types]` Move all default values into `jest-config` ([#9924](https://github.com/facebook/jest/pull/9924)) +- `[jest-config]` [**BREAKING**] Change default file extension order by moving json behind ts and tsx ([10572](https://github.com/facebook/jest/pull/10572)) +- `[jest-console]` `console.dir` now respects the second argument correctly ([#10638](https://github.com/facebook/jest/pull/10638)) +- `[jest-core]` Don't report PerformanceObserver as open handle ([#11123](https://github.com/facebook/jest/pull/11123)) +- `[jest-core]` Use `WeakRef` to hold timers when detecting open handles ([#11277](https://github.com/facebook/jest/pull/11277)) +- `[jest-core]` Correctly detect open handles that were created in test functions using `done` callbacks ([#11382](https://github.com/facebook/jest/pull/11382)) +- `[jest-core]` Do not collect `RANDOMBYTESREQUEST` as open handles ([#11278](https://github.com/facebook/jest/pull/11278)) +- `[jest-core]` Wait briefly for open handles to close before flagging them when using `--detectOpenHandles` ([#11429](https://github.com/facebook/jest/pull/11429)) +- `[jest-diff]` [**BREAKING**] Use only named exports ([#11371](https://github.com/facebook/jest/pull/11371)) +- `[jest-each]` [**BREAKING**] Ignore excess words in headings ([#8766](https://github.com/facebook/jest/pull/8766)) +- `[jest-each]` Support array index with template strings ([#10763](https://github.com/facebook/jest/pull/10763)) +- `[jest-each]` Interpolate `%%` correctly ([#11364](https://github.com/facebook/jest/pull/11364)) +- `[jest-each]` Fix wrong interpolation when the value of array contains multiple `%` ([#11364](https://github.com/facebook/jest/pull/11364)) +- `[jest-environment]` [**BREAKING**] Drop support for `runScript` for test environments ([#11155](https://github.com/facebook/jest/pull/11155)) +- `[jest-environment-jsdom]` Use inner realm’s `ArrayBuffer` constructor ([#10885](https://github.com/facebook/jest/pull/10885)) +- `[jest-environment-jsdom]` [**BREAKING**] Remove Node globals `setImmediate` and `clearImmediate` ([#11222](https://github.com/facebook/jest/pull/11222)) +- `[jest-get-type]` [**BREAKING**] Convert to ES Module ([#11359](https://github.com/facebook/jest/pull/11359)) +- `[jest-globals]` [**BREAKING**] Disallow return values other than a `Promise` from hooks and tests ([#10512](https://github.com/facebook/jest/pull/10512)) +- `[jest-globals]` [**BREAKING**] Disallow mixing a done callback and returning a `Promise` from hooks and tests ([#10512](https://github.com/facebook/jest/pull/10512)) +- `[jest-haste-map]` Vendor `NodeWatcher` from `sane` ([#10919](https://github.com/facebook/jest/pull/10919)) +- `[jest-jasmine2]` Fixed the issue of `beforeAll` & `afterAll` hooks getting executed even if it is inside a skipped `describe` block when it has child `tests` marked as either `only` or `todo` ([#10806](https://github.com/facebook/jest/pull/10806)) +- `[jest-jasmine2]` Fixed the issues of child `tests` marked with `only` or `todo` getting executed even if it is inside a skipped parent `describe` block ([#10806](https://github.com/facebook/jest/pull/10806)) +- `[jest-jasmine2]` Wrap all test functions so they open handles that were created in test functions using `done` callbacks can be detected ([#11382](https://github.com/facebook/jest/pull/11382)) +- `[jest-reporter]` Handle empty files when reporting code coverage with V8 ([#10819](https://github.com/facebook/jest/pull/10819)) +- `[jest-resolve]` Replace read-pkg-up with escalade package ([#10781](https://github.com/facebook/jest/pull/10781)) +- `[jest-resolve]` Disable `jest-pnp-resolver` for Yarn 2 ([#10847](https://github.com/facebook/jest/pull/10847)) +- `[jest-runtime]` [**BREAKING**] Do not inject `global` variable into module wrapper ([#10644](https://github.com/facebook/jest/pull/10644)) +- `[jest-runtime]` [**BREAKING**] remove long-deprecated `jest.addMatchers`, `jest.resetModuleRegistry`, and `jest.runTimersToTime` ([#9853](https://github.com/facebook/jest/pull/9853)) +- `[jest-runtime]` Fix stack overflow and promise deadlock when importing mutual dependant ES module ([#10892](https://github.com/facebook/jest/pull/10892)) +- `[jest-runtime]` Prevent global module registry from leaking into `isolateModules` registry ([#10963](https://github.com/facebook/jest/pull/10963)) +- `[jest-runtime]` Refactor to prevent race condition when linking and evaluating ES Modules ([#11150](https://github.com/facebook/jest/pull/11150)) +- `[jest-runtime]` Throw correct error when attempting to load ESM via `require` ([#11260](https://github.com/facebook/jest/pull/11260)) +- `[jest-runtime]` Do not cache modules that throw during evaluation ([#11263](https://github.com/facebook/jest/pull/11263)) +- `[jest-transform]` Show enhanced `SyntaxError` message for all `SyntaxError`s ([#10749](https://github.com/facebook/jest/pull/10749)) +- `[jest-transform]` [**BREAKING**] Refactor API to pass an options bag around rather than multiple boolean options ([#10753](https://github.com/facebook/jest/pull/10753)) +- `[jest-transform]` [**BREAKING**] Refactor API of transformers to pass an options bag rather than separate `config` and other options ([#10834](https://github.com/facebook/jest/pull/10834)) +- `[jest-types]` Fix `Config.ts` `projects` types ([#11285](https://github.com/facebook/jest/pull/11285)) +- `[jest-util]` Replace micromatch with picomatch to fix issues with negated globs ([#11287](https://github.com/facebook/jest/pull/11287)) +- `[jest-validate]` Use `en-US` locale to avoid case conversion problems while validating CLI options on machines with some certain locales(e.g. Turkish) set as default locale. ([#11412](https://github.com/facebook/jest/pull/11412)) +- `[jest-worker]` [**BREAKING**] Use named exports ([#10623](https://github.com/facebook/jest/pull/10623)) +- `[jest-worker]` Do not swallow errors during serialization ([#10984](https://github.com/facebook/jest/pull/10984)) +- `[jest-worker]` Handle `ERR_IPC_CHANNEL_CLOSED` errors properly ([#11143](https://github.com/facebook/jest/pull/11143)) +- `[pretty-format]` [**BREAKING**] Convert to ES Modules ([#10515](https://github.com/facebook/jest/pull/10515)) +- `[pretty-format]` Only call `hasAttribute` if it's a function ([#11000](https://github.com/facebook/jest/pull/11000)) +- `[pretty-format]` Handle jsdom attributes properly ([#11189](https://github.com/facebook/jest/pull/11189)) +- `[pretty-format]` Import pretty-format using named imports ([#11360](https://github.com/facebook/jest/pull/11360)) + +### Chore & Maintenance + +- `[*]` [**BREAKING**] Only support Node LTS releases and Node 15 ([#10685](https://github.com/facebook/jest/pull/10685)) +- `[*]` [**BREAKING**] Add `exports` field to all `package.json`s ([#9921](https://github.com/facebook/jest/pull/9921)) +- `[*]` Make it easier for Jest's packages to use the VM escape hatch ([#10824](https://github.com/facebook/jest/pull/10824)) +- `[*]` [**BREAKING**] Remove deprecated `mapCoverage` ([#9968](https://github.com/facebook/jest/pull/9968)) +- `[babel-jest]` [**BREAKING**] Migrate to ESM ([#11193](https://github.com/facebook/jest/pull/11193)) +- `[docs]` Correct example using `browser-resolve` ([#11140](https://github.com/facebook/jest/pull/11140)) +- `[docs]` Clarify `timers` configuration property ([#11376](https://github.com/facebook/jest/pull/11376)) +- `[jest, jest-core]` [**BREAKING**] Replace `TestScheduler` export with `createTestScheduler` ([#11427](https://github.com/facebook/jest/pull/11427)) +- `[jest-config]` [**BREAKING**] Remove `enabledTestsMap` config, use `filter` instead ([#10787](https://github.com/facebook/jest/pull/10787)) +- `[jest-console]` [**BREAKING**] Move `root` into `config` and take `GlobalConfig` as mandatory parameter for `getConsoleOutput` ([#10126](https://github.com/facebook/jest/pull/10126)) +- `[jest-console]` Export LogEntry ([#11017](https://github.com/facebook/jest/pull/11017)) +- `[jest-fake-timers]` Clarify global behavior of `jest.useFakeTimers` and `jest.useRealTimers` ([#10867](https://github.com/facebook/jest/pull/10867)) +- `[jest-haste-map]` [**BREAKING**] Migrate to ESM ([#10875](https://github.com/facebook/jest/pull/10875)) +- `[jest-haste-map]` [**BREAKING**] Remove support for deprecated option `ignorePattern` as function ([#10348](https://github.com/facebook/jest/pull/10348)) +- `[jest-jasmine2]` [**BREAKING**] Migrate to ESM ([#10906](https://github.com/facebook/jest/pull/10906)) +- `[jest-jasmine2]` [**BREAKING**] Remove unused options argument from `Env` constructor ([#10240](https://github.com/facebook/jest/pull/10240)) +- `[jest-repl, jest-runtime]` [**BREAKING**] Move the `jest-runtime` CLI into `jest-repl` ([#10016](https://github.com/facebook/jest/pull/10016) & [#10925](https://github.com/facebook/jest/pull/10925)) +- `[jest-resolve]` [**BREAKING**] Migrate to ESM ([#10688](https://github.com/facebook/jest/pull/10688)) +- `[jest-resolve-dependencies]` [**BREAKING**] Migrate to ESM ([#10876](https://github.com/facebook/jest/pull/10876)) +- `[jest-mock]` [**BREAKING**] Migrate to ESM ([#10887](https://github.com/facebook/jest/pull/10887)) +- `[jest-reporters]` [**BREAKING**] Make `node-notifier` a peer dependency ([#10977](https://github.com/facebook/jest/pull/10977)) +- `[jest-resolve, jest-runtime]` [**BREAKING**] Use `Map`s instead of objects for all cached resources ([#10968](https://github.com/facebook/jest/pull/10968)) +- `[jest-runner]` [**BREAKING**] Migrate to ESM ([#10900](https://github.com/facebook/jest/pull/10900)) +- `[jest-runtime]` [**BREAKING**] Remove deprecated and unused `getSourceMapInfo` from Runtime ([#9969](https://github.com/facebook/jest/pull/9969)) +- `[jest-transformer]` [**BREAKING**] Remove unused `isCoreModule` option ([#11166](https://github.com/facebook/jest/pull/11166)) +- `[jest-util]` No longer checking `enumerable` when adding `process.domain` ([#10862](https://github.com/facebook/jest/pull/10862)) +- `[jest-validate]` [**BREAKING**] Remove `recursiveBlacklist` option in favor of previously introduced `recursiveDenylist` ([#10650](https://github.com/facebook/jest/pull/10650)) +- `[website]` Replace 'Github' with 'GitHub' ([#11279](https://github.com/facebook/jest/pull/11279)) +- `[website]` Remove a language code from the link to the Node.js website ([#11282](https://github.com/facebook/jest/pull/11282)) +- `[website]` Remove a duplicated word ([#11281](https://github.com/facebook/jest/pull/11281)) +- `[website]` Add french to website ([#11361](https://github.com/facebook/jest/pull/11361)) + +### Performance + +- `[jest-resolve]` Cache reading and parsing of `package.json`s ([#11076](https://github.com/facebook/jest/pull/11076)) +- `[jest-runtime, jest-transform]` share `cacheFS` between runtime and transformer ([#10901](https://github.com/facebook/jest/pull/10901)) +- `[jest-runtime]` Load `chalk` only once per worker ([#10864](https://github.com/facebook/jest/pull/10864)) +- `[jest-worker]` Fix memory leak of previous task arguments while no new task is scheduled ([#11187](https://github.com/facebook/jest/pull/11187)) + +## 26.6.3 + +### Fixes + +- `[jest-resolve-dependencies]` Continue dependency resolution if mock dependency can't be found ([#10779](https://github.com/facebook/jest/pull/10779)) + +## 26.6.2 + +### Features + +- `[jest-core]` Add `findRelatedTests` and `nonFlagArgs` in allowed config options for `updateConfigAndRun` in watch plugins ([#10659](https://github.com/facebook/jest/pull/10659)) + +### Fixes + +- `[babel-plugin-jest-hoist]` Preserve order of hoisted mock nodes within containing block ([#10536](https://github.com/facebook/jest/pull/10536)) +- `[babel-plugin-jest-hoist]` Hoist pure constants to support experimental JSX transform in hoisted mocks ([#10723](https://github.com/facebook/jest/pull/10723)) +- `[babel-preset-jest]` Update `babel-preset-current-node-syntax` to support top level await ([#10747](https://github.com/facebook/jest/pull/10747)) +- `[expect]` Revert "Fix `objectContaining` to work recursively into sub-objects ([#10508](https://github.com/facebook/jest/pull/10508))" ([#10766](https://github.com/facebook/jest/pull/10766)) +- `[jest-circus, jest-jasmine2]` fix: don't assume `stack` is always a string ([#10697](https://github.com/facebook/jest/pull/10697)) +- `[jest-config]` Fix bug introduced in watch mode by PR [#10678](https://github.com/facebook/jest/pull/10678/files#r511037803) ([#10692](https://github.com/facebook/jest/pull/10692)) +- `[jest-config]` Throw correct error for missing preset modules ([#10737](https://github.com/facebook/jest/pull/10737)) +- `[jest-resolve-dependencies]` Resolve mocks as dependencies ([#10713](https://github.com/facebook/jest/pull/10713)) +- `[jest-runtime]` Handle file URLs in dynamic imports ([#10744](https://github.com/facebook/jest/pull/10744)) +- `[jest-runtime, babel-jest]` Pass more ESM options to `@jest/transform` ([#10752](https://github.com/facebook/jest/pull/10752)) +- `[jest-runtime]` Properly inject `extraGlobals` into the runtime ([#10758](https://github.com/facebook/jest/pull/10758)) +- `[jest-transform]` Link to ESM docs on syntax errors ([#10748](https://github.com/facebook/jest/pull/10748)) + +### Chore & Maintenance + +- `[docs]` Add docs for using mocks in TypeScript ([#10415](https://github.com/facebook/jest/pull/10415)) +- `[eslint-config-fb-strict]` Move package from this repo to `fbjs` repo ([#10739](https://github.com/facebook/jest/pull/10739)) +- `[examples]` Update TypeScript example to show use of newer Jest types ([#10399](https://github.com/facebook/jest/pull/10399)) +- `[jest-cli]` chore: standardize files and folder names ([#10698](https://github.com/facebook/jest/pull/10698)) +- `[jest-config]` Switch ts-node `Register` type to `Service` due to deprecation ([#11210](https://github.com/facebook/jest/pull/11210)) + +## 26.6.1 + +### Features + +- `[jest-runtime]` Support named exports from CommonJS as named ES Module imports ([#10673](https://github.com/facebook/jest/pull/10673)) +- `[jest-validate]` Add support for `recursiveDenylist` option as an alternative to `recursiveBlacklist` ([#10236](https://github.com/facebook/jest/pull/10236)) + +### Fixes + +- `[expect]` Fix `objectContaining` to work recursively into sub-objects ([#10508](https://github.com/facebook/jest/pull/10508)) +- `[jest-cli, jest-core, jest-config, jest-types]` Fix `--onlyFailures` flag to work in non-watch mode ([#10678](https://github.com/facebook/jest/pull/10678/files)) +- `[jest-config]` Fix for the `jest.config.ts` compiler to not interfere with `tsconfig.json` files ([#10675](https://github.com/facebook/jest/pull/10675)) +- `[jest-message-util]` Update to work properly with Node 15 ([#10660](https://github.com/facebook/jest/pull/10660)) +- `[jest-mock]` Allow to mock methods in getters (TypeScript 3.9 export) ([#10156](https://github.com/facebook/jest/pull/10156)) + +## 26.6.0 + +### Features + +- `[jest-cli, jest-config]` Add support for the `jest.config.ts` configuration file ([#10564](https://github.com/facebook/jest/pull/10564)) + +### Fixes + +- `[jest-config]` Simplify transform RegExp ([#10207](https://github.com/facebook/jest/pull/10207)) +- `[jest-fake-timers]` Lazily instantiate mock timers ([#10551](https://github.com/facebook/jest/pull/10551)) +- `[jest-runtime]` `require.main` is no longer `undefined` when using `jest.resetModules` ([#10626](https://github.com/facebook/jest/pull/10626)) +- `[@jest/types]` Add missing values for `timers` ([#10632](https://github.com/facebook/jest/pull/10632)) + +### Chore & Maintenance + +- `[docs]` Add step for fetching `backers.json` file in website setup docs ([#10631](https://github.com/facebook/jest/pull/10631)) +- `[docs]` Add page detailing environment variables set by Jest ([#10630](https://github.com/facebook/jest/pull/10630)) +- `[jest-circus]` Refactor `callAsyncCircusFn` parameters ([#10629](https://github.com/facebook/jest/pull/10629)) + +## 26.5.3 + +### Features + +- `[jest-runtime]` add support for dynamic `import()` from CommonJS ([#10620](https://github.com/facebook/jest/pull/10620)) + +### Fixes + +- `[jest-runner, jest-runtime]` `require.main` should not be `undefined` with `createRequire()` ([#10610](https://github.com/facebook/jest/pull/10610)) +- `[jest-runtime]` add missing `module.path` property ([#10615](https://github.com/facebook/jest/pull/10615)) +- `[jest-runtime]` Add `mainModule` instance variable to runtime ([#10621](https://github.com/facebook/jest/pull/10621)) +- `[jest-runtime]` Evaluate Node core modules on dynamic `import()` ([#10622](https://github.com/facebook/jest/pull/10622)) +- `[jest-validate]` Show suggestion only when unrecognized cli param is longer than 1 character ([#10604](https://github.com/facebook/jest/pull/10604)) +- `[jest-validate]` Validate `testURL` as CLI option ([#10595](https://github.com/facebook/jest/pull/10595)) + +## 26.5.2 + +### Fixes + +- `[*]` Revert usage of Escalade and rollback Yargs to v15 as it breaks Node 13 ([#10599](https://github.com/facebook/jest/pull/10599)) +- `[jest-circus]` Setup globals before emitting `setup`, and include Jest globals in the `setup` payload ([#10598](https://github.com/facebook/jest/pull/10598)) +- `[jest-mock]` Fix typings for `mockResolvedValue`, `mockResolvedValueOnce`, `mockRejectedValue` and `mockRejectedValueOnce` ([#10600](https://github.com/facebook/jest/pull/10600)) + +## 26.5.1 + +### Fixes + +- `[jest-circus]` Handle older `jest-runtime` in `jest-circus` + +## 26.5.0 + +### Features + +- `[jest-circus, jest-config, jest-runtime]` Add new `injectGlobals` config and CLI option to disable injecting global variables into the runtime ([#10484](https://github.com/facebook/jest/pull/10484)) +- `[jest-each]` Fixes `.each` type to always be callable ([#10447](https://github.com/facebook/jest/pull/10447)) +- `[jest-runner]` Add support for `moduleLoader`s with `default` exports ([#10541](https://github.com/facebook/jest/pull/10541)) +- `[@jest/create-cache-key-function]` Added a new package for creating cache keys ([#10587](https://github.com/facebook/jest/pull/10587)) + +### Fixes + +- `[jest-circus, jest-jasmine2]` Find correct location for `test.each` tests ([#10413](https://github.com/facebook/jest/pull/10413)) +- `[jest-console]` Add `Console` constructor to `console` object ([#10502](https://github.com/facebook/jest/pull/10502)) +- `[jest-globals]` Fix lifecycle hook function types ([#10480](https://github.com/facebook/jest/pull/10480)) +- `[jest-runtime]` Remove usage of `vm.compileFunction` due to a performance issue ([#10586](https://github.com/facebook/jest/pull/10586)) + +### Chore & Maintenance + +- `[jest-resolve]` Replace read-pkg-up with escalade package ([10558](https://github.com/facebook/jest/pull/10558)) +- `[jest-environment-jsdom]` Update jsdom to 16.4.0 ([10578](https://github.com/facebook/jest/pull/10578)) + +## 26.4.2 + +### Fixes + +- `[expect]` Fix `toMatchObject` to work with inherited class getters ([#10381](https://github.com/facebook/jest/pull/10381)) +- `[pretty-format]` Lower minimum node version to >= 10 ([#10435](https://github.com/facebook/jest/pull/10435)) + +## 26.4.1 + +### Fixes + +- `[jest-core]` Don't report ELDHistogram as open handle ([#10417](https://github.com/facebook/jest/pull/10417)) +- `[jest-matcher-utils]` Fix diffing object contain readonly symbol key object ([#10414](https://github.com/facebook/jest/pull/10414)) +- `[jest-reporters]` Fixes notify reporter on Linux (using notify-send) ([#10393](https://github.com/facebook/jest/pull/10400)) +- `[jest-snapshot]` Correctly handles arrays and property matchers in snapshots ([#10404](https://github.com/facebook/jest/pull/10404)) + +## 26.4.0 + +### Features + +- `[jest-resolve]` Add support for `packageFilter` on custom resolver ([#10393](https://github.com/facebook/jest/pull/10393)) + +### Fixes + +- `[pretty-format]` Handle `tagName` not being a string ([#10397](https://github.com/facebook/jest/pull/10397)) + +## 26.3.0 + +### Features + +- `[jest-circus, jest-jasmine2]` Include `failureDetails` property in test results ([#9496](https://github.com/facebook/jest/pull/9496)) +- `[jest-each, jest-jasmine, jest-circus]` Add support for `.concurrent.each` ([#9326](https://github.com/facebook/jest/pull/9326)) + +### Fixes + +- `[jest-config]` Add `.pnp.js` to `transformIgnorePatterns` defaults ([#10383](https://github.com/facebook/jest/pull/10383)) +- `[jest-leak-detector]` Wait properly for GC runs due to changes in Node 14.7 ([#10366](https://github.com/facebook/jest/pull/10366)) +- `[jest-worker]` Downgrade minimum node version to 10.13 ([#10352](https://github.com/facebook/jest/pull/10352)) +- `[docs]` Update snapshot testing documentation([#10359](https://github.com/facebook/jest/pull/10359)) + +## 26.2.2 + +### Fixes + +- `[jest-cli]` Use correct file name to override existing jest config on init ([#10337](https://github.com/facebook/jest/pull/10337)) +- `[jest-haste-map]` Properly detect support for native `find` ([#10346](https://github.com/facebook/jest/pull/10346)) + +## 26.2.1 + +### Fixes + +- `[jest-worker]` Make sure to work with Node TS typings v12 ([#10336](https://github.com/facebook/jest/pull/10336)) + +## 26.2.0 + +### Features + +- `[jest-core, jest-circus, jest-reporter, jest-runner]` Added support for reporting individual test cases using jest-circus ([#10227](https://github.com/facebook/jest/pull/10227)) +- `[jest-config, jest-reporter, jest-runner, jest-test-sequencer]` Add `slowTestThreshold` configuration option ([#9366](https://github.com/facebook/jest/pull/9366)) +- `[jest-haste-map]` Watchman crawler now includes dotfiles ([#10075](https://github.com/facebook/jest/pull/10075)) +- `[jest-worker]` Added support for workers to send custom messages to parent in jest-worker ([#10293](https://github.com/facebook/jest/pull/10293)) +- `[jest-worker]` Support passing `resourceLimits` ([#10335](https://github.com/facebook/jest/pull/10335)) +- `[pretty-format]` Added support for serializing custom elements (web components) ([#10217](https://github.com/facebook/jest/pull/10237)) + +### Fixes + +- `[expect]` Match symbols and bigints in `any()` ([#10223](https://github.com/facebook/jest/pull/10223)) +- `[jest-changed-files]` Use `git diff` instead of `git log` for `--changedSince` ([#10155](https://github.com/facebook/jest/pull/10155)) +- `[jest-console]` Add missing `console.timeLog` for compatibility with Node ([#10209](https://github.com/facebook/jest/pull/10209)) +- `[jest-haste-map]` Check `find` binary supports the `-iname` parameter ([#10308](https://github.com/facebook/jest/pull/10308)) +- `[jest-snapshot]` Strip added indentation for inline error snapshots ([#10217](https://github.com/facebook/jest/pull/10217)) + +### Chore & Maintenance + +- `[*]` Add missing dependency on `@types/node` ([#10248](https://github.com/facebook/jest/pull/10248)) +- `[jest-jasmine2]` Convert `PCancelable` to TypeScript ([#10215](https://github.com/facebook/jest/pull/10215)) +- `[jest-jasmine2]` Refine typings of `queueRunner` ([#10215](https://github.com/facebook/jest/pull/10215)) +- `[jest-jasmine2]` Remove usage of `Function` type ([#10216](https://github.com/facebook/jest/pull/10216)) +- `[jest-resolve]` Improve types ([#10239](https://github.com/facebook/jest/pull/10239)) +- `[docs]` Clarify the [`jest.requireActual(moduleName)`](https://jestjs.io/docs/jest-object#jestrequireactualmodulename) example +- `[jest-types]` Refine typings of `coverageReporters` ([#10275](https://github.com/facebook/jest/pull/10275)) + +## 26.1.0 + +### Features + +- `[jest-mock]` Export `Mock`, `MockInstance`, `SpyInstance` types ([#10138](https://github.com/facebook/jest/pull/10138)) +- `[jest-config]` Support config files exporting (`async`) `function`s ([#10001](https://github.com/facebook/jest/pull/10001)) +- `[jest-cli, jest-core]` Add `--selectProjects` CLI argument to filter test suites by project name ([#8612](https://github.com/facebook/jest/pull/8612)) +- `[jest-cli, jest-init]` Add `coverageProvider` to `jest --init` prompts ([#10044](https://github.com/facebook/jest/pull/10044)) + +### Fixes + +- `[jest-console]` `getConsoleOutput` to receive global stack trace config and use it to format stack trace ([#10081](https://github.com/facebook/jest/pull/10081)) +- `[jest-jasmine2]` Stop adding `:` after an error that has no message ([#9990](https://github.com/facebook/jest/pull/9990)) +- `[jest-diff]` Control no diff message color with `commonColor` in diff options ([#9997](https://github.com/facebook/jest/pull/9997)) +- `[jest-snapshot]` Fix TypeScript compilation ([#10008](https://github.com/facebook/jest/pull/10008)) + +### Chore & Maintenance + +- `[docs]` Correct confusing filename in `enableAutomock` example ([#10055](https://github.com/facebook/jest/pull/10055)) +- `[jest-core]` 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 ([#10000](https://github.com/facebook/jest/pull/10000)) +- `[jest-core, jest-reporters, jest-test-result, jest-types]` Cleanup `displayName` type ([#10049](https://github.com/facebook/jest/pull/10049)) +- `[jest-runtime]` Jest-internal sandbox escape hatch ([#9907](https://github.com/facebook/jest/pull/9907)) +- `[jest-fake-timers]` Update `now` param type to support `Date` in addition to `number`. ([#10169](https://github.com/facebook/jest/pull/10169)) +- `[docs]` Add param to `setSystemTime` docs and remove preceding period from it and `getRealSystemTime` ([#10169](https://github.com/facebook/jest/pull/10169)) +- `[jest-snapshot, jest-util]` Replace `make-dir` with `fs.mkdir` ([#10136](https://github.com/facebook/jest/pull/10136)) +- `[docs]` Added parcel-bundler documentation inside readme.md file + +### Performance + +- `[jest-core, jest-transform, jest-haste-map]` Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances ([#10131](https://github.com/facebook/jest/pull/10131)) + +## 26.0.1 + +### Fixes + +- `[jest-circus]` Backward compatibility for deprecated `DescribeBlock.tests` to not break e.g. Detox reporter + +## 26.0.0 + +### Features + +- `[jest-environment-jsdom]` [**BREAKING**] Upgrade `jsdom` to v16 ([#9606](https://github.com/facebook/jest/pull/9606)) +- `[@jest/fake-timers]` Add possibility to use a modern implementation of fake timers, backed by `@sinonjs/fake-timers` ([#7776](https://github.com/facebook/jest/pull/7776)) +- `[jest-runtime]` Add `createMockFromModule` as an alias for `genMockFromModule` ([#9962](https://github.com/facebook/jest/pull/9962)) + +### Fixes + +- `[babel-jest]` Handle `null` being passed to `createTransformer` ([#9955](https://github.com/facebook/jest/pull/9955)) +- `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765)) +- `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129)) +- `[jest-circus]` [**BREAKING**] Throw a proper error if a test / hook is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096)) +- `[jest-circus]` Throw more descriptive error if hook is defined inside test ([#9957](https://github.com/facebook/jest/pull/9957)) +- `[jest-circus]` [**BREAKING**] Align execution order of tests to match `jasmine`'s top to bottom order ([#9965](https://github.com/facebook/jest/pull/9965)) +- `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943)) +- `[jest-haste-map]` Stop reporting files as changed when they are only accessed ([#7347](https://github.com/facebook/jest/pull/7347)) +- `[jest-resolve]` Show relative path from root dir for `module not found` errors ([#9963](https://github.com/facebook/jest/pull/9963)) +- `[jest-runtime]` Fix absolute path moduleNameMapper + jest.mock bug ([#8727](https://github.com/facebook/jest/pull/8727)) + +### Chore & Maintenance + +- `[*]` [**BREAKING**] TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823)) +- `[*]` [**BREAKING**] Drop support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423)) +- `[*]` Upgrade to chalk@4 ([#9752](https://github.com/facebook/jest/pull/9752)) +- `[*]` Remove usage of `realpath-native` ([#9952](https://github.com/facebook/jest/pull/9952)) +- `[docs]` Fix example reference implementation to use Jest with Phabricator ([#8662](https://github.com/facebook/jest/pull/8662)) +- `[docs]` Added default compiler to tranform ([#8583](https://github.com/facebook/jest/pull/8583)) +- `[docs]` Updated Testing Frameworks guide with React; make it generic ([#9106](https://github.com/facebook/jest/pull/9106)) +- `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945)) +- `[@jest/fake-timers, @jest/environment]` [**BREAKING**] Rename `LolexFakeTimers` to `ModernFakeTimers` ([#9960](https://github.com/facebook/jest/pull/9960)) +- `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535)) +- `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854)) + +## 25.5.4 + +### Fixes + +- `[jest-jasmine2]` Don't run `beforeAll` / `afterAll` in skipped describe blocks ([#9931](https://github.com/facebook/jest/pull/9931)) + +### Chore & Maintenance + +- `[jest-runtime]` Do not warn when mutating `require.cache` ([#9946](https://github.com/facebook/jest/pull/9946)) + +## 25.5.3 + +### Chore & Maintenance + +- `[jest-circus]` Fix memory leak when running in band ([#9934](https://github.com/facebook/jest/pull/9934)) + +## 25.5.2 + +### Fixes + +- `[jest-globals]` Export globals as values, not types ([#9925](https://github.com/facebook/jest/pull/9925)) + +## 25.5.1 + +### Fixes + +- `[jest-haste-map]` Add missing `@types/graceful-fs` dependency ([#9913](https://github.com/facebook/jest/pull/9913)) +- `[jest-runner]` Correctly serialize `Set` passed to worker ([#9915](https://github.com/facebook/jest/pull/9915)) +- `[jest-runtime]` Vary ESM cache by query ([#9914](https://github.com/facebook/jest/pull/9914)) + +## 25.5.0 + +### Features + +- `[@jest/globals]` New package so Jest's globals can be explicitly imported ([#9801](https://github.com/facebook/jest/pull/9801)) +- `[jest-core]` Show coverage of sources related to tests in changed files ([#9769](https://github.com/facebook/jest/pull/9769)) +- `[jest-runtime]` Populate `require.cache` ([#9841](https://github.com/facebook/jest/pull/9841)) + +### Fixes + +- `[*]` Use `graceful-fs` directly in every package instead of relying on `fs` being monkey patched ([#9443](https://github.com/facebook/jest/pull/9443)) +- `[expect]` Prints the Symbol name into the error message with a custom asymmetric matcher ([#9888](https://github.com/facebook/jest/pull/9888)) +- `[jest-circus, jest-jasmine2]` Support older version of `jest-runtime` ([#9903](https://github.com/facebook/jest/pull/9903) & [#9842](https://github.com/facebook/jest/pull/9842)) +- `[@jest/environment]` Make sure not to reference Jest types ([#9875](https://github.com/facebook/jest/pull/9875)) +- `[jest-message-util]` Code frame printing should respect `--noStackTrace` flag ([#9866](https://github.com/facebook/jest/pull/9866)) +- `[jest-runtime]` Support importing CJS from ESM using `import` statements ([#9850](https://github.com/facebook/jest/pull/9850)) +- `[jest-runtime]` Support importing parallel dynamic `import`s ([#9858](https://github.com/facebook/jest/pull/9858)) +- `[jest-transform]` Improve source map handling when instrumenting transformed code ([#9811](https://github.com/facebook/jest/pull/9811)) + +### Chore & Maintenance + +- `[docs]` Add an example for mocking non-default export class + +### Performance + +- `[jest-resolve]` Update `resolve` to a version using native `realpath`, which is faster than the default JS implementation ([#9872](https://github.com/facebook/jest/pull/9872)) +- `[jest-resolve]` Pass custom cached `realpath` function to `resolve` ([#9873](https://github.com/facebook/jest/pull/9873)) +- `[jest-runtime]` Add `teardown` method to clear any caches when tests complete ([#9906](https://github.com/facebook/jest/pull/9906)) +- `[jest-runtime]` Do not pass files required internally through transformation when loading them ([#9900](https://github.com/facebook/jest/pull/9900)) +- `[jest-runtime]` Use `Map`s instead of object literals as cache holders ([#9901](https://github.com/facebook/jest/pull/9901)) + +## 25.4.0 + +- `[expect]` Support `async function`s in `toThrow` ([#9817](https://github.com/facebook/jest/pull/9817)) +- `[jest-console]` Add code frame to `console.error` and `console.warn` ([#9741](https://github.com/facebook/jest/pull/9741)) +- `[jest-runtime, jest-jasmine2, jest-circus]` Experimental, limited ECMAScript Modules support ([#9772](https://github.com/facebook/jest/pull/9772) & [#9842](https://github.com/facebook/jest/pull/9842)) + +### Fixes + +- `[expect]` Restore support for passing functions to `toHaveLength` matcher ([#9796](https://github.com/facebook/jest/pull/9796)) +- `[jest-changed-files]` `--only-changed` should include staged files ([#9799](https://github.com/facebook/jest/pull/9799)) +- `[jest-circus]` Throw on nested test definitions ([#9828](https://github.com/facebook/jest/pull/9828)) +- `[jest-each]` `each` will throw an error when called with too many arguments ([#9818](https://github.com/facebook/jest/pull/9818)) +- `[jest-runner]` Don't print warning to stdout when using `--json` ([#9843](https://github.com/facebook/jest/pull/9843)) + +### Chore & Maintenance + +- `[*]` Do not generate TypeScript declaration source maps ([#9822](https://github.com/facebook/jest/pull/9822)) +- `[*]` Transpile code for Node 8.3, not 8.0 ([#9827](https://github.com/facebook/jest/pull/9827)) + +## 25.3.0 + +### Features + +- `[babel-jest]` Support passing `supportsDynamicImport` and `supportsStaticESM` ([#9766](https://github.com/facebook/jest/pull/9766)) +- `[babel-preset-jest]` Enable all syntax plugins not enabled by default that works on current version of Node ([#9774](https://github.com/facebook/jest/pull/9774)) +- `[jest-circus]` Enable writing async test event handlers ([#9397](https://github.com/facebook/jest/pull/9397)) +- `[jest-runtime, @jest/transformer]` Support passing `supportsDynamicImport` and `supportsStaticESM` ([#9597](https://github.com/facebook/jest/pull/9597)) + +### Chore & Maintenance + +- `[*]` Replace `any`s with `unknown`s ([#9626](https://github.com/facebook/jest/pull/9626)) +- `[@jest/transform]` Expose type `CacheKeyOptions` for `getCacheKey` ([#9762](https://github.com/facebook/jest/pull/9762)) +- `[@jest/types]` Correct type `testRegex` for `ProjectConfig` ([#9780](https://github.com/facebook/jest/pull/9780)) + +## 25.2.7 + +### Fixes + +- `[jest-matcher-utils]` Replace accessors with values to avoid calling setters in object descriptors when computing diffs for error reporting ([#9757](https://github.com/facebook/jest/pull/9757)) +- `[@jest/watcher]` Correct return type of `shouldRunTestSuite` for `JestHookEmitter` ([#9753](https://github.com/facebook/jest/pull/9753)) + +## 25.2.6 + +### Chore & Maintenance + +- `[*]` 25.2.5 was published without changes from 25.2.4 - 25.2.6 includes all changes from that version. + +## 25.2.5 + +### Fixes + +- `[@jest/console]` Fix `typescript<@3.8` compatibility in published types + +### Chore & Maintenance + +- `[docs]` Update link to watchman troubleshooting docs ([#9727](https://github.com/facebook/jest/pull/9727)) +- `[@jest/message-util]` Remove dependency on `@jest/test-result`, which lead to a sprawling dependency tree ([#9749](https://github.com/facebook/jest/pull/9749)) +- `[@jest/test-result]` Remove dependency on `@jest/transform`, which lead to a sprawling dependency tree ([#9747](https://github.com/facebook/jest/pull/9747)) +- `[@jest/transform]` Expose type `TransformedSource` ([#9736](https://github.com/facebook/jest/pull/9736)) + +## 25.2.4 + +### Features + +- `[jest-message-util]` Check for common errors when using the wrong test environment ([#8245](https://github.com/facebook/jest/pull/8245)) + +### Fixes + +- `[jest-circus]` Fix type elision of jest-runtime imports ([#9717](https://github.com/facebook/jest/pull/9717)) +- `[@jest/transform]` Fix coverage reporter for uncovered files without transformers, reverting [#9460](https://github.com/facebook/jest/pull/9460) ([#9724](https://github.com/facebook/jest/pull/9724)) + +## 25.2.3 + +### Fixes + +- `[*]` Verify all packages are properly downleveled for older versions of TypeScript ([#9715](https://github.com/facebook/jest/pull/9715)) + +## 25.2.2 + +### Fixes + +- `[jest-environment-node]` Remove `getVmContext` from Node env on older versions of Node ([#9708](https://github.com/facebook/jest/pull/9708)) +- `[jest-runtime]` Return constructable class from `require('module')` ([#9711](https://github.com/facebook/jest/pull/9711)) + +## 25.2.1 + +### Fixes + +- `[*]` Downlevel TypeScript definitions files for compatibility with TS<3.8 ([#9705](https://github.com/facebook/jest/pull/9705)) + +## 25.2.0 + +### Features + +- `[jest-config]` Support ESM config files with `.js` extension ([#9573](https://github.com/facebook/jest/pull/9573)). +- `[jest-runtime]` Override `module.createRequire` to return a Jest-compatible `require` function ([#9469](https://github.com/facebook/jest/pull/9469)) +- `[jest-haste-map]` [**BREAKING**] Remove `mapper` option ([#9581](https://github.com/facebook/jest/pull/9581)) +- `[*]` Support array of paths for `moduleNameMapper` aliases ([#9465](https://github.com/facebook/jest/pull/9465)) +- `[jest-reporters]` Adds ability to pass options to the istanbul-reporter through `coverageReporters` ([#9572](https://github.com/facebook/jest/pull/9572)) +- `[jest-runtime]` Require stack when a module cannot be resolved ([#9681](https://github.com/facebook/jest/pull/9681)) +- `[jest-transform]` `writeCacheFile` no longer calls `fsync` ([#9695](https://github.com/facebook/jest/pull/9695)) + +### Fixes + +- `[expect]` Handle readonly properties correctly ([#9575](https://github.com/facebook/jest/pull/9575)) +- `[jest-cli]` Set `coverageProvider` correctly when provided in config ([#9562](https://github.com/facebook/jest/pull/9562)) +- `[jest-cli]` Allow specifying `.cjs` and `.mjs` config files by `--config` CLI option ([#9578](https://github.com/facebook/jest/pull/9578)) +- `[jest-cli]` Update yargs to fix CLI flag overriding ([#9519](https://github.com/facebook/jest/pull/9519)) +- `[jest-config]` Treat `setupFilesAfterEnv` like `setupFiles` when normalizing configs against presets ([#9495](https://github.com/facebook/jest/pull/9495)) +- `[jest-config]` Support `.mjs` config files on Windows as well ([#9558](https://github.com/facebook/jest/pull/9558)) +- `[jest-config]` Verify `rootDir` and all `roots` are directories ([#9569](https://github.com/facebook/jest/pull/9569)) +- `[jest-config]` Ensure pattern of `replacePosixSep` is a string ([#9546](https://github.com/facebook/jest/pull/9546)) +- `[jest-haste-map]` Fix crash on unix based systems without find ([#9579](https://github.com/facebook/jest/pull/9579)) +- `[jest-jasmine2]` Fix `--testNamePattern` matching with `concurrent` tests ([#9090](https://github.com/facebook/jest/pull/9090)) +- `[jest-matcher-utils]` Fix diff highlight of symbol-keyed object. ([#9499](https://github.com/facebook/jest/pull/9499)) +- `[@jest/reporters]` Notifications should be fire&forget rather than having a timeout ([#9567](https://github.com/facebook/jest/pull/9567)) +- `[jest-resolve]` Fix module identity preservation with symlinks and browser field resolution ([#9511](https://github.com/facebook/jest/pull/9511)) +- `[jest-resolve]` Do not confuse directories with files ([#8912](https://github.com/facebook/jest/pull/8912)) +- `[jest-resolve]` `moduleNameMapper` should take precedence over Node core modules ([#9563](https://github.com/facebook/jest/pull/9563)) +- `[jest-runtime]` Reset `isolateModules` if it fails ([#9541](https://github.com/facebook/jest/pull/9541)) +- `[jest-runtime]` Yarn PnP errors displayed to the user ([#9681](https://github.com/facebook/jest/pull/9681)) +- `[jest-snapshot]` Downgrade semver to v6 to support node 8 ([#9451](https://github.com/facebook/jest/pull/9451)) +- `[jest-snapshot]` Properly indent new snapshots in the presences of existing ones ([#9523](https://github.com/facebook/jest/pull/9523)) +- `[jest-transform]` Correct sourcemap behavior for transformed and instrumented code ([#9460](https://github.com/facebook/jest/pull/9460)) +- `[jest-transform]` Allow instrumentation of transformed files with weird file extensions ([#9589](https://github.com/facebook/jest/pull/9589)) +- `[@jest/types]` Make `ConfigGlobals` an interface to allow for declaration merging. ([#9570](https://github.com/facebook/jest/pull/9570)) +- `[pretty-format]` Export `OldPlugin` type ([#9491](https://github.com/facebook/jest/pull/9491)) + +### Chore & Maintenance + +- `[docs]` Warn about unexpected behavior / bug of node-notifier when using the `notify` options. +- `[docs]` Grammatical corrections to Async docs page. ([#9679](https://github.com/facebook/jest/pull/9679)) +- `[jest-resolver]` Use `resolve` package to implement custom module resolution ([#9520](https://github.com/facebook/jest/pull/9520)) +- `[jest-runtime]` Move execution of `setupFiles` to `jest-runner` ([#9596](https://github.com/facebook/jest/pull/9596)) +- `[jest-runtime]` Update anchor link in `helpers` ([#9616](https://github.com/facebook/jest/pull/9616)) +- `[@jest/reporters]` Remove unused dependencies and type exports ([#9462](https://github.com/facebook/jest/pull/9462)) +- `[website]` Update pictures of reports when matchers fail ([#9214](https://github.com/facebook/jest/pull/9214)) + +### Performance + +- `[jest-haste-map]` Reduce number of `lstat` calls in node crawler ([#9514](https://github.com/facebook/jest/pull/9514)) + +## 25.1.0 + +### Features + +- `[babel-plugin-jest-hoist]` Show codeframe on static hoisting issues ([#8865](https://github.com/facebook/jest/pull/8865)) +- `[babel-plugin-jest-hoist]` Add `BigInt` to `ALLOWED_IDENTIFIERS` ([#8382](https://github.com/facebook/jest/pull/8382)) +- `[babel-preset-jest]` Add `@babel/plugin-syntax-bigint` ([#8382](https://github.com/facebook/jest/pull/8382)) +- `[expect]` Add `BigInt` support to `toBeGreaterThan`, `toBeGreaterThanOrEqual`, `toBeLessThan` and `toBeLessThanOrEqual` ([#8382](https://github.com/facebook/jest/pull/8382)) +- `[expect, jest-matcher-utils]` Display change counts in annotation lines ([#9035](https://github.com/facebook/jest/pull/9035)) +- `[expect, jest-snapshot]` Support custom inline snapshot matchers ([#9278](https://github.com/facebook/jest/pull/9278)) +- `[jest-config]` Throw the full error message and stack when a Jest preset is missing a dependency ([#8924](https://github.com/facebook/jest/pull/8924)) +- `[jest-config]` [**BREAKING**] Set default display name color based on runner ([#8689](https://github.com/facebook/jest/pull/8689)) +- `[jest-config]` Merge preset globals with project globals ([#9027](https://github.com/facebook/jest/pull/9027)) +- `[jest-config]` Support `.cjs` config files ([#9291](https://github.com/facebook/jest/pull/9291)) +- `[jest-config]` [**BREAKING**] Support `.mjs` config files ([#9431](https://github.com/facebook/jest/pull/9431)) +- `[jest-core]` Support reporters as default exports ([#9161](https://github.com/facebook/jest/pull/9161)) +- `[jest-core]` Support `--findRelatedTests` paths case insensitivity on Windows ([#8961](https://github.com/facebook/jest/pull/8961)) +- `[jest-diff]` Add options for colors and symbols ([#8841](https://github.com/facebook/jest/pull/8841)) +- `[jest-diff]` [**BREAKING**] Export as ECMAScript module ([#8873](https://github.com/facebook/jest/pull/8873)) +- `[jest-diff]` Add `includeChangeCounts` and rename `Indicator` options ([#8881](https://github.com/facebook/jest/pull/8881)) +- `[jest-diff]` Add `changeColor` and `patchColor` options ([#8911](https://github.com/facebook/jest/pull/8911)) +- `[jest-diff]` Add `trailingSpaceFormatter` option and replace cyan with `commonColor` ([#8927](https://github.com/facebook/jest/pull/8927)) +- `[jest-diff]` Add `firstOrLastEmptyLineReplacement` option and export 3 `diffLines` functions ([#8955](https://github.com/facebook/jest/pull/8955)) +- `[jest-environment]` Add optional `getVmContext` next to `runScript` ([#9252](https://github.com/facebook/jest/pull/9252) & [#9428](https://github.com/facebook/jest/pull/9428)) +- `[jest-environment-jsdom]` Add `fakeTimersLolex` ([#8925](https://github.com/facebook/jest/pull/8925)) +- `[jest-environment-node]` Add `fakeTimersLolex` ([#8925](https://github.com/facebook/jest/pull/8925)) +- `[jest-environment-node]` Add `queueMicrotask` ([#9140](https://github.com/facebook/jest/pull/9140)) +- `[jest-environment-node]` Implement `getVmContext` ([#9252](https://github.com/facebook/jest/pull/9252) & [#9428](https://github.com/facebook/jest/pull/9428)) +- `[@jest/fake-timers]` Add Lolex as implementation of fake timers ([#8897](https://github.com/facebook/jest/pull/8897)) +- `[jest-get-type]` Add `BigInt` support. ([#8382](https://github.com/facebook/jest/pull/8382)) +- `[jest-matcher-utils]` Add `BigInt` support to `ensureNumbers` `ensureActualIsNumber`, `ensureExpectedIsNumber` ([#8382](https://github.com/facebook/jest/pull/8382)) +- `[jest-matcher-utils]` Ignore highlighting matched asymmetricMatcher in diffs ([#9257](https://github.com/facebook/jest/pull/9257)) +- `[jest-reporters]` Export utils for path formatting ([#9162](https://github.com/facebook/jest/pull/9162)) +- `[jest-reporters]` Provides global coverage thresholds as watermarks for istanbul ([#9416](https://github.com/facebook/jest/pull/9416)) +- `[jest-runner]` Warn if a worker had to be force exited ([#8206](https://github.com/facebook/jest/pull/8206)) +- `[jest-runtime]` [**BREAKING**] Do not export `ScriptTransformer` - it can be imported from `@jest/transform` instead ([#9256](https://github.com/facebook/jest/pull/9256)) +- `[jest-runtime]` Use `JestEnvironment.getVmContext` and `vm.compileFunction` if available to avoid the module wrapper ([#9252](https://github.com/facebook/jest/pull/9252) & [#9428](https://github.com/facebook/jest/pull/9428)) +- `[jest-snapshot]` Display change counts in annotation lines ([#8982](https://github.com/facebook/jest/pull/8982)) +- `[jest-snapshot]` [**BREAKING**] Improve report when the matcher has properties ([#9104](https://github.com/facebook/jest/pull/9104)) +- `[jest-snapshot]` Improve colors when snapshots are updatable ([#9132](https://github.com/facebook/jest/pull/9132)) +- `[jest-snapshot]` Ignore indentation for most serialized objects ([#9203](https://github.com/facebook/jest/pull/9203)) +- `[jest-transform]` Create `createTranspilingRequire` function for easy transpiling modules ([#9194](https://github.com/facebook/jest/pull/9194)) +- `[jest-transform]` [**BREAKING**] Return transformed code as a string, do not wrap in `vm.Script` ([#9253](https://github.com/facebook/jest/pull/9253)) +- `[@jest/test-result]` Create method to create empty `TestResult` ([#8867](https://github.com/facebook/jest/pull/8867)) +- `[jest-worker]` [**BREAKING**] Return a promise from `end()`, resolving with the information whether workers exited gracefully ([#8206](https://github.com/facebook/jest/pull/8206)) +- `[jest-reporters]` Transform file paths into hyperlinks ([#8980](https://github.com/facebook/jest/pull/8980)) + +### Fixes + +- `[expect]` Display `expectedDiff` more carefully in `toBeCloseTo` ([#8389](https://github.com/facebook/jest/pull/8389)) +- `[expect]` Avoid incorrect difference for subset when `toMatchObject` fails ([#9005](https://github.com/facebook/jest/pull/9005)) +- `[expect]` Consider all RegExp flags for equality ([#9167](https://github.com/facebook/jest/pull/9167)) +- `[expect]` [**BREAKING**] Consider primitives different from wrappers instantiated with `new` ([#9167](https://github.com/facebook/jest/pull/9167)) +- `[expect]` Prevent maintaining RegExp state between multiple tests ([#9289](https://github.com/facebook/jest/pull/9289)) +- `[expect]` Fix subsetEquality false circular reference detection ([#9322](https://github.com/facebook/jest/pull/9322)) +- `[jest-config]` Use half of the available cores when `watchAll` mode is enabled ([#9117](https://github.com/facebook/jest/pull/9117)) +- `[jest-config]` Fix Jest multi project runner still cannot handle exactly one project ([#8894](https://github.com/facebook/jest/pull/8894)) +- `[jest-console]` Add missing `console.group` calls to `NullConsole` ([#9024](https://github.com/facebook/jest/pull/9024)) +- `[jest-core]` Don't include unref'd timers in --detectOpenHandles results ([#8941](https://github.com/facebook/jest/pull/8941)) +- `[jest-core]` Limit number of workers when creating haste maps in projects ([#9259](https://github.com/facebook/jest/pull/9259)) +- `[jest-diff]` Do not inverse format if line consists of one change ([#8903](https://github.com/facebook/jest/pull/8903)) +- `[jest-diff]` Rename some new options and change their default values ([#9077](https://github.com/facebook/jest/pull/9077)) +- `[jest-environment-node]` Fix `TextEncoder.encode` not referencing same global `Uint8Array` constructor ([#9261](https://github.com/facebook/jest/pull/9261)) +- `[jest-fake-timers]` `getTimerCount` will not include cancelled immediates ([#8764](https://github.com/facebook/jest/pull/8764)) +- `[jest-fake-timers]` Support `util.promisify` on `setTimeout` ([#9180](https://github.com/facebook/jest/pull/9180)) +- `[jest-jasmine2, jest-circus]` Improve error message format for Node's assert.fail ([#9262](https://github.com/facebook/jest/pull/9262)) +- `[jest-leak-detector]` [**BREAKING**] Use `weak-napi` instead of `weak` package ([#8686](https://github.com/facebook/jest/pull/8686)) +- `[jest-mock]` Fix for mockReturnValue overriding mockImplementationOnce ([#8398](https://github.com/facebook/jest/pull/8398)) +- `[jest-reporters]` Make node-notifier an optional dependency ([#8918](https://github.com/facebook/jest/pull/8918)) +- `[jest-reporters]` Make all arguments to methods on `BaseReporter` optional ([#9159](https://github.com/facebook/jest/pull/9159)) +- `[jest-resolve]`: Set MODULE_NOT_FOUND as error code when module is not resolved from paths ([#8487](https://github.com/facebook/jest/pull/8487)) +- `[jest-resolve-dependencies]` Handle dynamic dependencies correctly even when using module maps ([#9303](https://github.com/facebook/jest/pull/9303)) +- `[jest-snapshot]` Remove only the added newlines in multiline snapshots ([#8859](https://github.com/facebook/jest/pull/8859)) +- `[jest-snapshot]` Distinguish empty string from external snapshot not written ([#8880](https://github.com/facebook/jest/pull/8880)) +- `[jest-snapshot]` [**BREAKING**] Distinguish empty string from internal snapshot not written ([#8898](https://github.com/facebook/jest/pull/8898)) +- `[jest-snapshot]` [**BREAKING**] Remove `report` method and throw matcher errors ([#9049](https://github.com/facebook/jest/pull/9049)) +- `[jest-snapshot]` Omit irrelevant `received` properties when property matchers fail ([#9198](https://github.com/facebook/jest/pull/9198)) +- `[jest-transform]` Properly cache transformed files across tests ([#8890](https://github.com/facebook/jest/pull/8890)) +- `[jest-transform]` Don't fail the test suite when a generated source map is invalid ([#9058](https://github.com/facebook/jest/pull/9058)) +- `[jest-types]` [**BREAKING**] Use less `null | undefined` in config types ([#9200](https://github.com/facebook/jest/pull/9200)) +- `[jest-util]` Allow querying process.domain ([#9136](https://github.com/facebook/jest/pull/9136)) +- `[pretty-format]` Correctly detect memoized elements ([#9196](https://github.com/facebook/jest/pull/9196)) +- `[pretty-format]` Fix pretty-format to respect displayName on forwardRef ([#9422](https://github.com/facebook/jest/pull/9422)) + +### Chore & Maintenance + +- `[*]` [**BREAKING**] Drop support for Node 6 ([#8455](https://github.com/facebook/jest/pull/8455)) +- `[*]` Add Node 12 to CI ([#8411](https://github.com/facebook/jest/pull/8411)) +- `[*]` [**BREAKING**] Upgrade to Micromatch v4 ([#8852](https://github.com/facebook/jest/pull/8852)) +- `[babel-plugin-jest-hoist]` [**BREAKING**] Use ESM exports ([#8874](https://github.com/facebook/jest/pull/8874)) +- `[docs]` Add alias and optional boolean value to `coverage` CLI Reference ([#8996](https://github.com/facebook/jest/pull/8996)) +- `[docs]` Fix broken link pointing to legacy JS file in "Snapshot Testing". +- `[docs]` Add `setupFilesAfterEnv` and `jest.setTimeout` example ([#8971](https://github.com/facebook/jest/pull/8971)) +- `[expect]` Test that `toStrictEqual` is equivalent to Node's `assert.deepStrictEqual` ([#9167](https://github.com/facebook/jest/pull/9167)) +- `[jest]` [**BREAKING**] Use ESM exports ([#8874](https://github.com/facebook/jest/pull/8874)) +- `[jest-cli]` [**BREAKING**] Use ESM exports ([#8874](https://github.com/facebook/jest/pull/8874)) +- `[jest-cli]` [**BREAKING**] Remove re-exports from `@jest/core` ([#8874](https://github.com/facebook/jest/pull/8874)) +- `[jest-diff]` Remove the need to export `splitLines0` function ([#9151](https://github.com/facebook/jest/pull/9151)) +- `[jest-environment-jsdom]` [**BREAKING**] Upgrade JSDOM from v11 to v15 ([#8851](https://github.com/facebook/jest/pull/8851)) +- `[jest-haste-map]` Upgrade to `fsevents@2` ([#9215](https://github.com/facebook/jest/pull/9215)) +- `[jest-reporters]` [**BREAKING**] Upgrade Istanbul dependencies, which are used for code coverage ([#9192](https://github.com/facebook/jest/pull/9192)) +- `[jest-util]` [**BREAKING**] Remove deprecated exports ([#8863](https://github.com/facebook/jest/pull/8863)) +- `[jest-validate]` [**BREAKING**] Use ESM exports ([#8874](https://github.com/facebook/jest/pull/8874)) +- `[jest-types]` Mark `InitialOptions` as `Partial` ([#8848](https://github.com/facebook/jest/pull/8848)) +- `[jest-config]` Refactor `normalize` to be more type safe ([#8848](https://github.com/facebook/jest/pull/8848)) + +## 24.9.0 + +### Features + +- `[expect]` Highlight substring differences when matcher fails, part 1 ([#8448](https://github.com/facebook/jest/pull/8448)) +- `[expect]` Highlight substring differences when matcher fails, part 2 ([#8528](https://github.com/facebook/jest/pull/8528)) +- `[expect]` Improve report when mock-spy matcher fails, part 1 ([#8640](https://github.com/facebook/jest/pull/8640)) +- `[expect]` Improve report when mock-spy matcher fails, part 2 ([#8649](https://github.com/facebook/jest/pull/8649)) +- `[expect]` Improve report when mock-spy matcher fails, part 3 ([#8697](https://github.com/facebook/jest/pull/8697)) +- `[expect]` Improve report when mock-spy matcher fails, part 4 ([#8710](https://github.com/facebook/jest/pull/8710)) +- `[expect]` Throw matcher error when received cannot be jasmine spy ([#8747](https://github.com/facebook/jest/pull/8747)) +- `[expect]` Improve report when negative CalledWith assertion fails ([#8755](https://github.com/facebook/jest/pull/8755)) +- `[expect]` Improve report when positive CalledWith assertion fails ([#8771](https://github.com/facebook/jest/pull/8771)) +- `[expect]` Display equal values for ReturnedWith similar to CalledWith ([#8791](https://github.com/facebook/jest/pull/8791)) +- `[expect, jest-snapshot]` Change color from green for some args in matcher hints ([#8812](https://github.com/facebook/jest/pull/8812)) +- `[jest-snapshot]` Highlight substring differences when matcher fails, part 3 ([#8569](https://github.com/facebook/jest/pull/8569)) +- `[jest-core]` Improve report when snapshots are obsolete ([#8448](https://github.com/facebook/jest/pull/8665)) +- `[jest-cli]` Improve chai support (with detailed output, to match jest exceptions) ([#8454](https://github.com/facebook/jest/pull/8454)) +- `[*]` Manage the global timeout with `--testTimeout` command line argument. ([#8456](https://github.com/facebook/jest/pull/8456)) +- `[pretty-format]` Render custom displayName of memoized components ([#8546](https://github.com/facebook/jest/pull/8546)) +- `[jest-validate]` Allow `maxWorkers` as part of the `jest.config.js` ([#8565](https://github.com/facebook/jest/pull/8565)) +- `[jest-runtime]` Allow passing configuration objects to transformers ([#7288](https://github.com/facebook/jest/pull/7288)) +- `[@jest/core, @jest/test-sequencer]` Support async sort in custom `testSequencer` ([#8642](https://github.com/facebook/jest/pull/8642)) +- `[jest-runtime, @jest/fake-timers]` Add `jest.advanceTimersToNextTimer` ([#8713](https://github.com/facebook/jest/pull/8713)) +- `[@jest-transform]` Extract transforming require logic within `jest-core` into `@jest-transform` ([#8756](https://github.com/facebook/jest/pull/8756)) +- `[jest-matcher-utils]` Add color options to `matcherHint` ([#8795](https://github.com/facebook/jest/pull/8795)) +- `[jest-circus/jest-jasmine2]` Give clearer output for Node assert errors ([#8792](https://github.com/facebook/jest/pull/8792)) +- `[jest-runner]` Export all types in the type signature of `jest-runner` ([#8825](https://github.com/facebook/jest/pull/8825)) + +### Fixes + +- `[jest-cli]` Detect side-effect only imports when running `--onlyChanged` or `--changedSince` ([#8670](https://github.com/facebook/jest/pull/8670)) +- `[jest-cli]` Allow `--maxWorkers` to work with % input again ([#8565](https://github.com/facebook/jest/pull/8565)) +- `[babel-plugin-jest-hoist]` Expand list of whitelisted globals in global mocks ([#8429](https://github.com/facebook/jest/pull/8429)) +- `[jest-core]` Make watch plugin initialization errors look nice ([#8422](https://github.com/facebook/jest/pull/8422)) +- `[jest-snapshot]` Prevent inline snapshots from drifting when inline snapshots are updated ([#8492](https://github.com/facebook/jest/pull/8492)) +- `[jest-haste-map]` Don't throw on missing mapper in Node crawler ([#8558](https://github.com/facebook/jest/pull/8558)) +- `[jest-core]` Fix incorrect `passWithNoTests` warning ([#8595](https://github.com/facebook/jest/pull/8595)) +- `[jest-snapshots]` Fix test retries that contain snapshots ([#8629](https://github.com/facebook/jest/pull/8629)) +- `[jest-mock]` Fix incorrect assignments when restoring mocks in instances where they originally didn't exist ([#8631](https://github.com/facebook/jest/pull/8631)) +- `[expect]` Fix stack overflow when matching objects with circular references ([#8687](https://github.com/facebook/jest/pull/8687)) +- `[jest-haste-map]` Workaround a node >=12.5.0 bug that causes the process not to exit after tests have completed and cancerous memory growth ([#8787](https://github.com/facebook/jest/pull/8787)) + +### Chore & Maintenance + +- `[docs]` Replace FlowType with TypeScript in CONTRIBUTING.MD code conventions +- `[jest-leak-detector]` remove code repeat ([#8438](https://github.com/facebook/jest/pull/8438)) +- `[docs]` Add example to `jest.requireActual` ([#8482](https://github.com/facebook/jest/pull/8482)) +- `[docs]` Add example to `jest.mock` for mocking ES6 modules with the `factory` parameter ([#8550](https://github.com/facebook/jest/pull/8550)) +- `[docs]` Add information about using `jest.doMock` with ES6 imports ([#8573](https://github.com/facebook/jest/pull/8573)) +- `[docs]` Fix variable name in custom-matcher-api code example ([#8582](https://github.com/facebook/jest/pull/8582)) +- `[docs]` Fix example used in custom environment docs ([#8617](https://github.com/facebook/jest/pull/8617)) +- `[docs]` Updated react tutorial to refer to new package of react-testing-library (@testing-library/react) ([#8753](https://github.com/facebook/jest/pull/8753)) +- `[docs]` Updated imports of react-testing-library to @testing-library/react in website ([#8757](https://github.com/facebook/jest/pull/8757)) +- `[jest-core]` Add `getVersion` (moved from `jest-cli`) ([#8706](https://github.com/facebook/jest/pull/8706)) +- `[docs]` Fix MockFunctions example that was using toContain instead of toContainEqual ([#8765](https://github.com/facebook/jest/pull/8765)) +- `[*]` Make sure copyright header comment includes license ([#8783](https://github.com/facebook/jest/pull/8783)) +- `[*]` Check copyright and license as one joined substring ([#8815](https://github.com/facebook/jest/pull/8815)) +- `[docs]` Fix WatchPlugins `jestHooks.shouldRunTestSuite` example that receives an object ([#8784](https://github.com/facebook/jest/pull/8784)) +- `[*]` Enforce LF line endings ([#8809](https://github.com/facebook/jest/pull/8809)) +- `[pretty-format]` Delete obsolete link and simplify structure in README ([#8824](https://github.com/facebook/jest/pull/8824)) +- `[docs]` Fix broken transform link on webpack page ([#9155](https://github.com/facebook/jest/pull/9155)) + +### Performance + +- `[jest-watcher]` Minor optimization for JestHook ([#8746](https://github.com/facebook/jest/pull/8746)) +- `[@jest/reporters]` Prevent runaway CPU usage with `--notify` on macOS ([#8831](https://github.com/facebook/jest/pull/8831)) + +## 24.8.0 + +### Features + +- `[jest-circus]` Bind to Circus events via an optional event handler on any custom env ([#8344](https://github.com/facebook/jest/pull/8344)) +- `[expect]` Improve report when matcher fails, part 15 ([#8281](https://github.com/facebook/jest/pull/8281)) +- `[jest-cli]` Update `--forceExit` and "did not exit for one second" message colors ([#8329](https://github.com/facebook/jest/pull/8329)) +- `[expect]` Improve report when matcher fails, part 16 ([#8306](https://github.com/facebook/jest/pull/8306)) +- `[jest-runner]` Pass docblock pragmas to TestEnvironment constructor ([#8320](https://github.com/facebook/jest/pull/8320)) +- `[docs]` Add DynamoDB guide ([#8319](https://github.com/facebook/jest/pull/8319)) +- `[expect]` Improve report when matcher fails, part 17 ([#8349](https://github.com/facebook/jest/pull/8349)) +- `[expect]` Improve report when matcher fails, part 18 ([#8356](https://github.com/facebook/jest/pull/8356)) +- `[expect]` Improve report when matcher fails, part 19 ([#8367](https://github.com/facebook/jest/pull/8367)) + +### Fixes + +- `[jest-each]` Fix bug with placeholder values ([#8289](https://github.com/facebook/jest/pull/8289)) +- `[jest-snapshot]` Inline snapshots: do not indent empty lines ([#8277](https://github.com/facebook/jest/pull/8277)) +- `[@jest/runtime, @jest/transform]` Allow custom transforms for JSON dependencies ([#8278](https://github.com/facebook/jest/pull/8278)) +- `[jest-core]` Make `detectOpenHandles` imply `runInBand` ([#8283](https://github.com/facebook/jest/pull/8283)) +- `[jest-haste-map]` Fix the `mapper` option which was incorrectly ignored ([#8299](https://github.com/facebook/jest/pull/8299)) +- `[jest-jasmine2]` Fix describe return value warning being shown if the describe function throws ([#8335](https://github.com/facebook/jest/pull/8335)) +- `[jest-environment-jsdom]` Re-declare global prototype of JSDOMEnvironment ([#8352](https://github.com/facebook/jest/pull/8352)) +- `[jest-snapshot]` Handle arrays when merging snapshots ([#7089](https://github.com/facebook/jest/pull/7089)) +- `[expect]` Extract names of async and generator functions ([#8362](https://github.com/facebook/jest/pull/8362)) +- `[jest-runtime]` Fix virtual mocks not being unmockable after previously being mocked ([#8396](https://github.com/facebook/jest/pull/8396)) +- `[jest-transform]` Replace special characters in transform cache filenames to support Windows ([#8353](https://github.com/facebook/jest/pull/8353)) +- `[jest-config]` Allow exactly one project ([#7498](https://github.com/facebook/jest/pull/7498)) + +### Chore & Maintenance + +- `[expect]` Fix label and add opposite assertion for toEqual tests ([#8288](https://github.com/facebook/jest/pull/8288)) +- `[docs]` Mention Jest MongoDB Preset ([#8318](https://github.com/facebook/jest/pull/8318)) +- `[@jest/reporters]` Migrate away from `istanbul-api` ([#8294](https://github.com/facebook/jest/pull/8294)) +- `[*]` Delete obsolete emails tag from header comment in test files ([#8377](https://github.com/facebook/jest/pull/8377)) +- `[expect]` optimize compare nodes ([#8368](https://github.com/facebook/jest/pull/8368)) +- `[docs]` Fix typo in MockFunctionAPI.md ([#8406](https://github.com/facebook/jest/pull/8406)) +- `[LICENSE]` Follow copyright header guidelines and delete For Jest software ([#8428](https://github.com/facebook/jest/pull/8428)) + +### Performance + +- `[jest-runtime]` Fix module registry memory leak ([#8282](https://github.com/facebook/jest/pull/8282)) +- `[jest-resolve]` optimize resolve module path ([#8388](https://github.com/facebook/jest/pull/8388)) +- `[jest-resolve]` cache current directory ([#8412](https://github.com/facebook/jest/pull/8412)) +- `[jest-get-type]` Simplify checking for primitive ([#8416](https://github.com/facebook/jest/pull/8416)) + +## 24.7.1 + +### Fixes + +- `[@jest/config]` Normalize `testSequencer` to its absolute path ([#8267](https://github.com/facebook/jest/pull/8267)) +- `[@jest/console]` Print to stderr when calling `console.error`, `console.warn` or `console.assert` using the `jest-runtime` CLI ([#8261](https://github.com/facebook/jest/pull/8261)) + +## 24.7.0 + +### Features + +- `[@jest/core, @jest/test-sequencer]` Move `testSequencer` to individual package `@jest/test-sequencer` ([#8223](https://github.com/facebook/jest/pull/8223)) +- `[@jest/core, jest-cli, jest-config]` Add option `testSequencer` allow user use custom sequencer. ([#8223](https://github.com/facebook/jest/pull/8223)) + +### Fixes + +- `[expect]` Add negative equality tests for iterables ([#8260](https://github.com/facebook/jest/pull/8260)) +- `[jest-haste-map]` Resolve fs watcher EMFILE error ([#8258](https://github.com/facebook/jest/pull/8258)) + +### Chore & Maintenance + +- `[expect]` Remove repetition of matcherName and options in matchers ([#8224](https://github.com/facebook/jest/pull/8224)) + +### Performance + +## 24.6.0 + +### Features + +- `[expect]`: Improve report when matcher fails, part 13 ([#8077](https://github.com/facebook/jest/pull/8077)) +- `[@jest/core]` Filter API pre-filter setup hook ([#8142](https://github.com/facebook/jest/pull/8142)) +- `[jest-snapshot]` Improve report when matcher fails, part 14 ([#8132](https://github.com/facebook/jest/pull/8132)) +- `[@jest/reporter]` Display todo and skip test descriptions when verbose is true ([#8038](https://github.com/facebook/jest/pull/8038)) +- `[jest-runner]` Support default exports for test environments ([#8163](https://github.com/facebook/jest/pull/8163)) +- `[pretty-format]` Support React.Suspense ([#8180](https://github.com/facebook/jest/pull/8180)) +- `[jest-snapshot]` Indent inline snapshots ([#8198](https://github.com/facebook/jest/pull/8198)) +- `[jest-config]` Support colors in `displayName` configuration ([#8025](https://github.com/facebook/jest/pull/8025)) + +### Fixes + +- `[jest-circus]` Fix test retries with beforeAll/beforeEach failures ([#8227](https://github.com/facebook/jest/pull/8227)) +- `[expect]` Fix circular references in iterable equality ([#8160](https://github.com/facebook/jest/pull/8160)) +- `[jest-changed-files]` Change method of obtaining git root ([#8052](https://github.com/facebook/jest/pull/8052)) +- `[jest-each]` Fix test function type ([#8145](https://github.com/facebook/jest/pull/8145)) +- `[jest-fake-timers]` `getTimerCount` not taking immediates and ticks into account ([#8139](https://github.com/facebook/jest/pull/8139)) +- `[jest-runtime]` Allow json file as manual mock ([#8159](https://github.com/facebook/jest/pull/8159)) +- `[pretty-format]` Print `BigInt` as a readable number instead of `{}` ([#8138](https://github.com/facebook/jest/pull/8138)) +- `[jest-core]` Fix ability to transform dependencies required from globalSetup script ([#8143](https://github.com/facebook/jest/pull/8143)) +- `[@jest/reporters]` Fix Cannot read property converageData of null ([#8168](https://github.com/facebook/jest/pull/8168)) +- `[jest-worker]` `JEST_WORKER_ID` starts at 1 ([#8205](https://github.com/facebook/jest/pull/8205)) +- `[jest-config]` Use default cwd even if config contains a cwd property ([#7923](https://github.com/facebook/jest/pull/7923)) +- `[jest-resolve-dependencies]`: Remove internal peer dependencies ([#8215](https://github.com/facebook/jest/pull/8215)) +- `[jest-resolve]`: Remove internal peer dependencies ([#8215](https://github.com/facebook/jest/pull/8215)) +- `[jest-snapshot]`: Remove internal peer dependencies ([#8215](https://github.com/facebook/jest/pull/8215)) +- `[jest-resolve]` Fix requireActual with moduleNameMapper ([#8210](https://github.com/facebook/jest/pull/8210)) +- `[jest-haste-map]` Fix haste map duplicate detection in watch mode ([#8237](https://github.com/facebook/jest/pull/8237)) + +### Chore & Maintenance + +- `[*]` Remove flow from code base ([#8061](https://github.com/facebook/jest/pull/8061)) +- `[*]` Use property initializer syntax in Jest codebase ([#8117](https://github.com/facebook/jest/pull/8117)) +- `[*]` Move @types/node to the root package.json ([#8129](https://github.com/facebook/jest/pull/8129)) +- `[*]` Add documentation and tests related to auto-mocking ([#8099](https://github.com/facebook/jest/pull/8099)) +- `[*]` Add `jest-watch-typeahead` as a devDependency ([#6449](https://github.com/facebook/jest/pull/6449)) +- `[*]` upgrade TS to 3.4.0-dev\* for incremental builds ([#8149](https://github.com/facebook/jest/pull/8149)) +- `[docs]` Improve description of optional arguments in ExpectAPI.md ([#8126](https://github.com/facebook/jest/pull/8126)) + +### Performance + +- `[jest-haste-map]` Optimize haste map data structure for serialization/deserialization ([#8171](https://github.com/facebook/jest/pull/8171)) +- `[jest-haste-map]` Avoid persisting haste map or processing files when not changed ([#8153](https://github.com/facebook/jest/pull/8153)) +- `[jest-core]` Improve performance of SearchSource.findMatchingTests by 15% ([#8184](https://github.com/facebook/jest/pull/8184)) +- `[jest-resolve]` Optimize internal cache lookup performance ([#8183](https://github.com/facebook/jest/pull/8183)) +- `[jest-core]` Dramatically improve watch mode performance ([#8201](https://github.com/facebook/jest/pull/8201)) +- `[jest-transform]` Cache regular expression instead of creating anew for every file in ScriptTransformer ([#8235](https://github.com/facebook/jest/pull/8235)) +- `[jest-core]` Fix memory leak of source map info and minor performance improvements ([#8234](https://github.com/facebook/jest/pull/8234)) +- `[jest-console]` Fix memory leak by releasing console output reference when printed to stdout ([#8233](https://github.com/facebook/jest/pull/8233)) +- `[jest-runtime]` Use `Map` instead of `Object` for module registry ([#8232](https://github.com/facebook/jest/pull/8232)) + +## 24.5.0 + +### Features + +- `[jest-haste-map]` Expose `throwOnModuleCollision` via `config.haste` ([#8113](https://github.com/facebook/jest/pull/8113)) + +### Chore & Maintenance + +- `[expect]` Export `Matchers` interface from `expect` ([#8093](https://github.com/facebook/jest/pull/8093)) + +## 24.4.0 + +### Features + +- `[jest-resolve]` Now supports PnP environment without plugins ([#8094](https://github.com/facebook/jest/pull/8094)) + +### Fixes + +- `[expect]` Compare DOM nodes even if there are multiple Node classes ([#8064](https://github.com/facebook/jest/pull/8064)) +- `[jest-worker]` `worker.getStdout()` can return `null` ([#8083](https://github.com/facebook/jest/pull/8083)) +- `[jest-worker]` Re-attach stdout and stderr from new processes/threads created after retries ([#8087](https://github.com/facebook/jest/pull/8087)) +- `[jest-reporters/jest-runner]` Serialize `changedFiles` passed to workers ([#8090](https://github.com/facebook/jest/pull/8090)) + +### Chore & Maintenance + +- `[*]` Make sure to include `d.ts` files in the tarball when building ([#8086](https://github.com/facebook/jest/pull/8086)) + +## 24.3.1 + +### Fixes + +- `[jest-cli]` export functions compatible with `import {default}` ([#8080](https://github.com/facebook/jest/pull/8080)) +- `[jest-worker]`: Fix retries and error notification in workers ([#8079](https://github.com/facebook/jest/pull/8079)) + +### Chore & Maintenance + +- `[pretty-format]`: Use `react-is` instead of manual `$$typeof` checks ([#8060](https://github.com/facebook/jest/pull/8060)) + +## 24.3.0 + +We skipped 24.2.0 because a draft was accidentally published. Please use `24.3.0` or a newer version instead. + +### Features + +- `[expect]`: Improve report when matcher fails, part 10 ([#7960](https://github.com/facebook/jest/pull/7960)) +- `[expect]`: Improve report when matcher fails, part 11 ([#8008](https://github.com/facebook/jest/pull/8008)) +- `[expect]`: Improve report when matcher fails, part 12 ([#8033](https://github.com/facebook/jest/pull/8033)) +- `[expect]`: Improve report when matcher fails, part 7 ([#7866](https://github.com/facebook/jest/pull/7866)) +- `[expect]`: Improve report when matcher fails, part 8 ([#7876](https://github.com/facebook/jest/pull/7876)) +- `[expect]`: Improve report when matcher fails, part 9 ([#7940](https://github.com/facebook/jest/pull/7940)) +- `[jest-circus/jest-jasmine2]` Warn if describe returns a value ([#7852](https://github.com/facebook/jest/pull/7852)) +- `[jest-config]` Print error information on preset normalization error ([#7935](https://github.com/facebook/jest/pull/7935)) +- `[jest-get-type]` Add `isPrimitive` function ([#7708](https://github.com/facebook/jest/pull/7708)) +- `[jest-haste-map]` Add `skipPackageJson` option ([#7778](https://github.com/facebook/jest/pull/7778)) +- `[jest-util]` Add `isPromise` ([#7852](https://github.com/facebook/jest/pull/7852)) +- `[pretty-format]` Support `React.memo` ([#7891](https://github.com/facebook/jest/pull/7891)) + +### Fixes + +- `[expect]` Fix `toStrictEqual` not considering arrays with objects having undefined values correctly ([#7938](https://github.com/facebook/jest/pull/7938)) +- `[expect]` Fix custom async matcher stack trace ([#7652](https://github.com/facebook/jest/pull/7652)) +- `[expect]` Fix non-object received value in toHaveProperty ([#7986](https://github.com/facebook/jest/pull/7986), [#8067](https://github.com/facebook/jest/pull/8067)) +- `[expect]` Fix non-symmetric equal for Number ([#7948](https://github.com/facebook/jest/pull/7948)) +- `[expect]` Remove duck typing and obsolete browser support code when comparing DOM nodes and use DOM-Level-3 API instead ([#7995](https://github.com/facebook/jest/pull/7995)) +- `[jest-changed-files]` Fix `getChangedFilesFromRoots` to not return parts of the commit messages as if they were files, when the commit messages contained multiple paragraphs ([#7961](https://github.com/facebook/jest/pull/7961)) +- `[jest-changed-files]` Fix pattern for HG changed files ([#8066](https://github.com/facebook/jest/pull/8066)) +- `[jest-changed-files]` Improve default file selection for Mercurial repos ([#7880](https://github.com/facebook/jest/pull/7880)) +- `[jest-circus]` Fix bug with test.only ([#7888](https://github.com/facebook/jest/pull/7888)) +- `[jest-circus]`: Throw explicit error when errors happen after test is considered complete ([#8005](https://github.com/facebook/jest/pull/8005)) +- `[jest-cli]` Fix prototype pollution vulnerability in dependency ([#7904](https://github.com/facebook/jest/pull/7904)) +- `[jest-cli]` Refactor `-o` and `--coverage` combined ([#7611](https://github.com/facebook/jest/pull/7611)) +- `[jest-environment-node]` Add missing globals: TextEncoder and TextDecoder ([#8022](https://github.com/facebook/jest/pull/8022)) +- `[jest-haste-map]` Enforce uniqueness in names (mocks and haste ids) ([#8002](https://github.com/facebook/jest/pull/8002)) +- `[jest-jasmine2]`: Throw explicit error when errors happen after test is considered complete ([#8005](https://github.com/facebook/jest/pull/8005)) +- `[jest-mock]` Adds a type check to `prototype` to allow mocks of objects with a primitive `prototype` property. ([#8040](https://github.com/facebook/jest/pull/8040)) +- `[jest-transform]` Normalize config and remove unnecessary checks, convert `TestUtils.js` to TypeScript ([#7801](https://github.com/facebook/jest/pull/7801)) +- `[jest-util]`Make sure to not fail if unable to assign `toStringTag` to the `process` object, which is read only in Node 12 ([#8050](https://github.com/facebook/jest/pull/8050)) +- `[jest-validate]` Fix validating async functions ([#7894](https://github.com/facebook/jest/issues/7894)) +- `[jest-worker]` Fix `jest-worker` when using pre-allocated jobs ([#7934](https://github.com/facebook/jest/pull/7934)) +- `[static]` Remove console log '-' on the front page ([#7977](https://github.com/facebook/jest/pull/7977)) + +### Chore & Maintenance + +- `[*]`: Setup building, linting and testing of TypeScript ([#7808](https://github.com/facebook/jest/pull/7808), [#7855](https://github.com/facebook/jest/pull/7855), [#7951](https://github.com/facebook/jest/pull/7951)) +- `[@jest/console]`: Extract custom `console` implementations from `jest-util` into a new separate package ([#8030](https://github.com/facebook/jest/pull/8030)) +- `[@jest/core]` Create new package, which is `jest-cli` minus `yargs` and `prompts` ([#7696](https://github.com/facebook/jest/pull/7696)) +- `[@jest/core]`: Migrate to TypeScript ([#7998](https://github.com/facebook/jest/pull/7998)) +- `[@jest/fake-timers]`: Extract FakeTimers class from `jest-util` into a new separate package ([#7987](https://github.com/facebook/jest/pull/7987)) +- `[@jest/reporter]`: New package extracted from `jest-cli` ([#7902](https://github.com/facebook/jest/pull/7902)) +- `[@jest/reporters]`: Migrate to TypeScript ([#7994](https://github.com/facebook/jest/pull/7994), [#8045](https://github.com/facebook/jest/pull/8045)) +- `[@jest/source-map]`: Extract `getCallsite` function from `jest-util` into a new separate package ([#8029](https://github.com/facebook/jest/pull/8029)) +- `[@jest/test-result]`: Extract TestResult types and helpers into a new separate package ([#8034](https://github.com/facebook/jest/pull/8034)) +- `[@jest/transform]`: Migrate to TypeScript ([#7918](https://github.com/facebook/jest/pull/7918), [#7945](https://github.com/facebook/jest/pull/7945)) +- `[@jest/transform]`: New package extracted from `jest-runtime` ([#7915](https://github.com/facebook/jest/pull/7915)) +- `[@jest/types]`: New package to handle shared types ([#7834](https://github.com/facebook/jest/pull/7834)) +- `[babel-jest]`: Migrate to TypeScript ([#7862](https://github.com/facebook/jest/pull/7862)) +- `[babel-plugin-jest-hoist]`: Migrate to TypeScript ([#7898](https://github.com/facebook/jest/pull/7898)) +- `[diff-sequences]`: Migrate to Typescript ([#7820](https://github.com/facebook/jest/pull/7820)) +- `[docs]` Add missing import to docs ([#7928](https://github.com/facebook/jest/pull/7928)) +- `[docs]` Update automock configuration, add note related to manual mocks ([#8051](https://github.com/facebook/jest/pull/8051)) +- `[docs]` Update/Organize TestSequencer and testSchedulerHelper code comments([#7984](https://github.com/facebook/jest/pull/7984)) +- `[docs]`: Fix image paths in SnapshotTesting.md for current and version 24 ([#7872](https://github.com/facebook/jest/pull/7872)) +- `[docs]`: Improve runAllTimers doc (it exhausts the micro-task queue) ([#8031](https://github.com/facebook/jest/pull/8031)) +- `[docs]`: Update CONTRIBUTING.md to add information about running jest with `jest-circus` locally ([#8013](https://github.com/facebook/jest/pull/8013)). +- `[expect]`: Migrate to TypeScript ([#7919](https://github.com/facebook/jest/pull/7919), [#8028](https://github.com/facebook/jest/pull/8028)) +- `[jest-changed-files]`: Migrate to TypeScript ([#7827](https://github.com/facebook/jest/pull/7827)) +- `[jest-circus]`: Migrate to TypeScript ([#7916](https://github.com/facebook/jest/pull/7916)) +- `[jest-cli]`: Migrate to TypeScript ([#8024](https://github.com/facebook/jest/pull/8024)) +- `[jest-diff]`: Migrate to TypeScript ([#7824](https://github.com/facebook/jest/pull/7824), [#8027](https://github.com/facebook/jest/pull/8027)) +- `[jest-docblock]`: Migrate to TypeScript ([#7836](https://github.com/facebook/jest/pull/7836)) +- `[jest-each]`: Migrate to Typescript ([#8007](https://github.com/facebook/jest/pull/8007)) +- `[jest-each]`: Refactor into multiple files with better types ([#8018](https://github.com/facebook/jest/pull/8018)) +- `[jest-environment-jsdom]`: Migrate to TypeScript ([#7985](https://github.com/facebook/jest/pull/8003)) +- `[jest-environment-node]`: Migrate to TypeScript ([#7985](https://github.com/facebook/jest/pull/7985)) +- `[jest-get-type]`: Migrate to TypeScript ([#7818](https://github.com/facebook/jest/pull/7818)) +- `[jest-haste-map]`: Migrate to TypeScript ([#7854](https://github.com/facebook/jest/pull/7854), [#7951](https://github.com/facebook/jest/pull/7951)) +- `[jest-jasmine2]`: TS migration ([#7970](https://github.com/facebook/jest/pull/7970)) +- `[jest-leak-detector]`: Migrate to TypeScript ([#7825](https://github.com/facebook/jest/pull/7825)) +- `[jest-matcher-utils]`: Migrate to TypeScript ([#7835](https://github.com/facebook/jest/pull/7835)) +- `[jest-message-util]`: Migrate to TypeScript ([#7834](https://github.com/facebook/jest/pull/7834)) +- `[jest-mock]`: Migrate to TypeScript ([#7847](https://github.com/facebook/jest/pull/7847), [#7850](https://github.com/facebook/jest/pull/7850), [#7971](https://github.com/facebook/jest/pull/7971)) +- `[jest-phabricator]`: Migrate to TypeScript ([#7965](https://github.com/facebook/jest/pull/7965)) +- `[jest-regex-util]`: Migrate to TypeScript ([#7822](https://github.com/facebook/jest/pull/7822)) +- `[jest-repl]`: Migrate to TypeScript ([#8000](https://github.com/facebook/jest/pull/8000)) +- `[jest-resolve-dependencies]`: Migrate to TypeScript ([#7922](https://github.com/facebook/jest/pull/7922)) +- `[jest-resolve]`: Migrate to TypeScript ([#7871](https://github.com/facebook/jest/pull/7871)) +- `[jest-runner]`: Migrate to TypeScript ([#7968](https://github.com/facebook/jest/pull/7968)) +- `[jest-runtime]`: Migrate to TypeScript ([#7964](https://github.com/facebook/jest/pull/7964), [#7988](https://github.com/facebook/jest/pull/7988)) +- `[jest-serializer]`: Migrate to TypeScript ([#7841](https://github.com/facebook/jest/pull/7841)) +- `[jest-snapshot]`: Migrate to TypeScript ([#7899](https://github.com/facebook/jest/pull/7899)) +- `[jest-util]`: Migrate to TypeScript ([#7844](https://github.com/facebook/jest/pull/7844), [#8021](https://github.com/facebook/jest/pull/8021)) +- `[jest-validate]`: Migrate to TypeScript ([#7991](https://github.com/facebook/jest/pull/7991)) +- `[jest-watcher]`: Migrate to TypeScript ([#7843](https://github.com/facebook/jest/pull/7843)) +- `[jest-worker]`: Migrate to TypeScript ([#7853](https://github.com/facebook/jest/pull/7853)) +- `[jest]`: Migrate to TypeScript ([#8024](https://github.com/facebook/jest/pull/8024)) +- `[pretty-format]`: Migrate to TypeScript ([#7809](https://github.com/facebook/jest/pull/7809), [#7809](https://github.com/facebook/jest/pull/7972)) + +### Performance + +- `[jest-haste-map]` Optimize haste map tracking of deleted files with Watchman. ([#8056](https://github.com/facebook/jest/pull/8056)) + +## 24.1.0 + +### Features + +- `[jest-resolve]`: Pass default resolver into custom resolvers ([#7714](https://github.com/facebook/jest/pull/7714)) +- `[jest-cli]`: `global{Setup,Teardown}` use default export with es modules ([#7750](https://github.com/facebook/jest/pull/7750)) +- `[jest-runtime]` Better error messages when the jest environment is used after teardown by async code ([#7756](https://github.com/facebook/jest/pull/7756)) +- `[jest-jasmine2]` Will now only execute at most 5 concurrent tests _within the same testsuite_ when using `test.concurrent` ([#7770](https://github.com/facebook/jest/pull/7770)) +- `[jest-circus]` Same as `[jest-jasmine2]`, only 5 tests will run concurrently by default ([#7770](https://github.com/facebook/jest/pull/7770)) +- `[jest-config]` A new `maxConcurrency` option allows to change the number of tests allowed to run concurrently ([#7770](https://github.com/facebook/jest/pull/7770)) + +### Fixes + +- `[jest-runtime]` Fix for mocks not working with module name mapper ([#7787](https://github.com/facebook/jest/pull/7787)) +- `[jest-cli]` Break dependency cycle when using Jest programmatically ([#7707](https://github.com/facebook/jest/pull/7707)) +- `[jest-config]` Extract setupFilesAfterEnv from preset ([#7724](https://github.com/facebook/jest/pull/7724)) +- `[jest-cli]` Do not execute any `globalSetup` or `globalTeardown` if there are no tests to execute ([#7745](https://github.com/facebook/jest/pull/7745)) +- `[jest-runtime]` Lock down version of `write-file-atomic` ([#7725](https://github.com/facebook/jest/pull/7725)) +- `[jest-cli]` Print log entries when logging happens after test environment is torn down ([#7731](https://github.com/facebook/jest/pull/7731)) +- `[jest-config]` Do not use a uuid as `name` since that breaks caching ([#7746](https://github.com/facebook/jest/pull/7746)) +- `[jest-config]` Make sure `normalize` can consume `Defaults` without warnings ([#7742](https://github.com/facebook/jest/pull/7742)) +- `[jest-config]` Allow `moduleFileExtensions` without 'js' for custom runners ([#7751](https://github.com/facebook/jest/pull/7751)) +- `[jest-cli]` Load transformers before installing require hooks ([#7752](https://github.com/facebook/jest/pull/7752)) +- `[jest-cli]` Handle missing `numTodoTests` in test results ([#7779](https://github.com/facebook/jest/pull/7779)) +- `[jest-runtime]` Exclude setup/teardown files from coverage report ([#7790](https://github.com/facebook/jest/pull/7790)) +- `[babel-jest]` Throw an error if `babel-jest` tries to transform a file ignored by Babel ([#7797](https://github.com/facebook/jest/pull/7797)) +- `[babel-plugin-jest-hoist]` Ignore TS type references when looking for out-of-scope references ([#7799](https://github.com/facebook/jest/pull/7799)) +- `[expect]` fixed asymmetrical equality of cyclic objects ([#7730](https://github.com/facebook/jest/pull/7730)) + +### Chore & Maintenance + +- `[jest]` Update jest-junit to ^6.2.1 ([#7739](https://github.com/facebook/jest/pull/7739)) +- `[website]` Fix broken help link on homepage ([#7706](https://github.com/facebook/jest/pull/7706)) +- `[docs]` Changed Babel setup documentation to correctly compile `async/await` ([#7701](https://github.com/facebook/jest/pull/7701)) + +## 24.0.0 + +### Features + +- `[jest-each]` [**BREAKING**] Add primitive pretty printing for interpolated titles ([#7694](https://github.com/facebook/jest/pull/7694)) +- `[jest-runtime]` Add `jest.isolateModules` for scoped module initialization ([#6701](https://github.com/facebook/jest/pull/6701)) +- `[jest-diff]` [**BREAKING**] Support diffing numbers and booleans instead of returning null for different ones ([#7605](https://github.com/facebook/jest/pull/7605)) +- `[jest-diff]` [**BREAKING**] Replace `diff` with `diff-sequences` package ([#6961](https://github.com/facebook/jest/pull/6961)) +- `[jest-cli]` [**BREAKING**] Only set error process error codes when they are non-zero ([#7363](https://github.com/facebook/jest/pull/7363)) +- `[jest-config]` [**BREAKING**] Deprecate `setupTestFrameworkScriptFile` in favor of new `setupFilesAfterEnv` ([#7119](https://github.com/facebook/jest/pull/7119)) +- `[jest-worker]` [**BREAKING**] Add functionality to call a `setup` method in the worker before the first call and a `teardown` method when ending the farm ([#7014](https://github.com/facebook/jest/pull/7014)) +- `[jest-config]` [**BREAKING**] Set default `notifyMode` to `failure-change` ([#7024](https://github.com/facebook/jest/pull/7024)) +- `[jest-haste-map]` [**BREAKING**] Remove support for `@providesModule` ([#6104](https://github.com/facebook/jest/pull/6104)) +- `[jest-haste-map]` [**BREAKING**] Replace internal data structures to improve performance ([#6960](https://github.com/facebook/jest/pull/6960)) +- `[jest-haste-map]` [**BREAKING**] Use relative paths to allow remote caching ([#7020](https://github.com/facebook/jest/pull/7020)) +- `[jest-haste-map]` [**BREAKING**] Remove name from hash in `HasteMap.getCacheFilePath` ([#7218](https://github.com/facebook/jest/pull/7218)) +- `[babel-preset-jest]` [**BREAKING**] Export a function instead of an object for Babel 7 compatibility ([#7203](https://github.com/facebook/jest/pull/7203)) +- `[jest-haste-map]` [**BREAKING**] Expose relative paths when getting the file iterator ([#7321](https://github.com/facebook/jest/pull/7321)) +- `[jest-cli]` [**BREAKING**] Run code transforms over `global{Setup,Teardown}` ([#7562](https://github.com/facebook/jest/pull/7562)) +- `[jest-haste-map]` Add `hasteFS.getSize(path)` ([#7580](https://github.com/facebook/jest/pull/7580)) +- `[jest-cli]` Print version ending in `-dev` when running a local Jest clone ([#7582](https://github.com/facebook/jest/pull/7582)) +- `[jest-cli]` Add Support for `globalSetup` and `globalTeardown` in projects ([#6865](https://github.com/facebook/jest/pull/6865)) +- `[jest-runtime]` Add `extraGlobals` to config to load extra global variables into the execution vm ([#7454](https://github.com/facebook/jest/pull/7454)) +- `[jest-util]` Export `specialChars` containing Unicode characters and ANSI escapes for console output ([#7532](https://github.com/facebook/jest/pull/7532)) +- `[jest-config]` Handle typescript (`ts` and `tsx`) by default ([#7533](https://github.com/facebook/jest/pull/7533)) +- `[jest-validate]` Add support for comments in `package.json` using a `"//"` key ([#7295](https://github.com/facebook/jest/pull/7295)) +- `[jest-config]` Add shorthand for watch plugins and runners ([#7213](https://github.com/facebook/jest/pull/7213)) +- `[jest-jasmine2/jest-circus/jest-cli]` Add test.todo ([#6996](https://github.com/facebook/jest/pull/6996)) +- `[pretty-format]` Option to not escape strings in diff messages ([#5661](https://github.com/facebook/jest/pull/5661)) +- `[jest-haste-map]` Add `getFileIterator` to `HasteFS` for faster file iteration ([#7010](https://github.com/facebook/jest/pull/7010)) +- `[jest-config]` Add `readConfigs` function, previously in `jest-cli` ([#7096](https://github.com/facebook/jest/pull/7096)) +- `[jest-snapshot]` Enable configurable snapshot paths ([#6143](https://github.com/facebook/jest/pull/6143)) +- `[pretty-format]` Support HTMLCollection and NodeList in DOMCollection plugin ([#7125](https://github.com/facebook/jest/pull/7125)) +- `[jest-runtime]` Pass the normalized configuration to script transformers ([#7148](https://github.com/facebook/jest/pull/7148)) +- `[expect]` Improve report when assertion fails, part 3 ([#7152](https://github.com/facebook/jest/pull/7152)) +- `[jest-runtime]` If `require` fails without a file extension, print all files that match with one ([#7160](https://github.com/facebook/jest/pull/7160)) +- `[jest-haste-map]` Make `ignorePattern` optional ([#7166](https://github.com/facebook/jest/pull/7166)) +- `[jest-haste-map]` Add `getCacheFilePath` to get the path to the cache file for a `HasteMap` instance ([#7217](https://github.com/facebook/jest/pull/7217)) +- `[jest-runtime]` Remove `cacheDirectory` from `ignorePattern` for `HasteMap` if not necessary ([#7166](https://github.com/facebook/jest/pull/7166)) +- `[jest-validate]` Add syntax to validate multiple permitted types ([#7207](https://github.com/facebook/jest/pull/7207)) +- `[jest-config]` Accept an array as as well as a string for `testRegex` ([#7209](https://github.com/facebook/jest/pull/7209)) +- `[expect/jest-matcher-utils]` Improve report when assertion fails, part 4 ([#7241](https://github.com/facebook/jest/pull/7241)) +- `[expect/jest-matcher-utils]` Improve report when assertion fails, part 5 ([#7557](https://github.com/facebook/jest/pull/7557)) +- `[expect]` Check constructor equality in .toStrictEqual() ([#7005](https://github.com/facebook/jest/pull/7005)) +- `[jest-util]` Add `jest.getTimerCount()` to get the count of scheduled fake timers ([#7285](https://github.com/facebook/jest/pull/7285)) +- `[jest-config]` Add `dependencyExtractor` option to use a custom module to extract dependencies from files ([#7313](https://github.com/facebook/jest/pull/7313), [#7349](https://github.com/facebook/jest/pull/7349), [#7350](https://github.com/facebook/jest/pull/7350), [#7362](https://github.com/facebook/jest/pull/7362)) +- `[jest-haste-map]` Accept a `getCacheKey` method in `hasteImplModulePath` modules to reset the cache when the logic changes ([#7350](https://github.com/facebook/jest/pull/7350)) +- `[jest-config]` Add `haste.computeSha1` option to compute the sha-1 of the files in the haste map ([#7345](https://github.com/facebook/jest/pull/7345)) +- `[expect]` `expect(Infinity).toBeCloseTo(Infinity)` Treats `Infinity` as equal in toBeCloseTo matcher ([#7405](https://github.com/facebook/jest/pull/7405)) +- `[jest-worker]` Add node worker-thread support to jest-worker ([#7408](https://github.com/facebook/jest/pull/7408)) +- `[jest-config]` Allow `bail` setting to be configured with a number allowing tests to abort after `n` of failures ([#7335](https://github.com/facebook/jest/pull/7335)) +- `[jest-config]` Allow % based configuration of `--max-workers` ([#7494](https://github.com/facebook/jest/pull/7494)) +- `[jest-runner]` Instantiate the test environment class with the current `testPath` ([#7442](https://github.com/facebook/jest/pull/7442)) +- `[jest-config]` Always resolve jest-environment-jsdom from jest-config ([#7476](https://github.com/facebook/jest/pull/7476)) +- `[expect]` Improve report when assertion fails, part 6 ([#7621](https://github.com/facebook/jest/pull/7621)) +- `[jest-worker]` Add `enableWorkerThreads` option to explicitly opt-in to `worker_threads` if available ([#7681](https://github.com/facebook/jest/pull/7681)) + +### Fixes + +- `[expect]` Accept inherited properties in `toHaveProperty` matcher ([#7686](https://github.com/facebook/jest/pull/7686)) +- `[jest-diff]` Do not claim that `-0` and `0` have no visual difference ([#7605](https://github.com/facebook/jest/pull/7605)) +- `[jest-mock]` Fix automock for numeric function names ([#7653](https://github.com/facebook/jest/pull/7653)) +- `[jest-config]` Ensure `existsSync` is only called with a string parameter ([#7607](https://github.com/facebook/jest/pull/7607)) +- `[expect]` `toStrictEqual` considers sparseness of arrays. ([#7591](https://github.com/facebook/jest/pull/7591)) +- `[jest-cli]` Fix empty coverage data for untested files ([#7388](https://github.com/facebook/jest/pull/7388)) +- `[jest-cli]` [**BREAKING**] Do not use `text-summary` coverage reporter by default if other reporters are configured ([#7058](https://github.com/facebook/jest/pull/7058)) +- `[jest-mock]` [**BREAKING**] Fix bugs with mock/spy result tracking of recursive functions ([#6381](https://github.com/facebook/jest/pull/6381)) +- `[jest-haste-map]` [**BREAKING**] Recover files correctly after haste name collisions are fixed ([#7329](https://github.com/facebook/jest/pull/7329)) +- `[pretty-format]` [**BREAKING**] Omit non-enumerable symbol properties ([#7448](https://github.com/facebook/jest/pull/7448)) +- `[*]` [**BREAKING**] Upgrade to Babel 7, dropping support for Babel 6 ([#7016](https://github.com/facebook/jest/pull/7016)) +- `[jest-cli]` Avoid watch mode causing bad terminal behavior in some cases ([#7523](https://github.com/facebook/jest/pull/7523)) +- `[jest-runner/jest-worker]` Fix missing console output in verbose mode ([#6871](https://github.com/facebook/jest/pull/6871)) +- `[expect]` Standardize file naming in `expect` ([#7306](https://github.com/facebook/jest/pull/7306)) +- `[jest-each]` Add empty array validation check ([#7249](https://github.com/facebook/jest/pull/7249)) +- `[jest-cli]` Interrupt tests if interactive watch plugin key is pressed ([#7222](https://github.com/facebook/jest/pull/7222)) +- `[jest-each]` Add each array validation check ([#7033](https://github.com/facebook/jest/pull/7033)) +- `[jest-haste-map]` Do not visit again files with the same sha-1 ([#6990](https://github.com/facebook/jest/pull/6990)) +- `[jest-jasmine2]` Fix memory leak in Error objects hold by the framework ([#6965](https://github.com/facebook/jest/pull/6965)) +- `[jest-haste-map]` Fixed Haste whitelist generation for scoped modules on Windows ([#6980](https://github.com/facebook/jest/pull/6980)) +- `[jest-mock]` Fix inheritance of static properties and methods in mocks ([#7003](https://github.com/facebook/jest/pull/7003)) +- `[jest-mock]` Fix mocking objects without `Object.prototype` in their prototype chain ([#7003](https://github.com/facebook/jest/pull/7003)) +- `[jest-mock]` Check `_isMockFunction` is true rather than truthy on potential mocks ([#7017](https://github.com/facebook/jest/pull/7017)) +- `[jest-cli]` Update jest-cli to show git ref in message when using `changedSince` ([#7028](https://github.com/facebook/jest/pull/7028)) +- `[jest-jasmine2`] Fix crash when test return Promise rejected with null ([#7049](https://github.com/facebook/jest/pull/7049)) +- `[jest-runtime]` Check `_isMockFunction` is true rather than truthy on potential global mocks ([#7017](https://github.com/facebook/jest/pull/7017)) +- `[jest-jasmine]` Show proper error message from async `assert` errors ([#6821](https://github.com/facebook/jest/pull/6821)) +- `[jest-jasmine2]` Better error message when a describe block is empty ([#6372](https://github.com/facebook/jest/pull/6372)) +- `[jest-jasmine2]` Pending calls inside async tests are reported as pending not failed ([#6782](https://github.com/facebook/jest/pull/6782)) +- `[jest-circus]` Better error message when a describe block is empty ([#6372](https://github.com/facebook/jest/pull/6372)) +- `[jest-jasmine2]` Add missing testLocationResults for `xit` and `fit` ([#6482](https://github.com/facebook/jest/pull/6482)) +- `[expect]` Return false from asymmetric matchers if received value isn’t string ([#7107](https://github.com/facebook/jest/pull/7107)) +- `[jest-cli]` Fix unhandled error when a bad revision is provided to `changedSince` ([#7115](https://github.com/facebook/jest/pull/7115)) +- `[jest-config]` Moved dynamically assigned `cwd` from `jest-cli` to default configuration in `jest-config` ([#7146](https://github.com/facebook/jest/pull/7146)) +- `[jest-config]` Fix `getMaxWorkers` on termux ([#7154](https://github.com/facebook/jest/pull/7154)) +- `[jest-runtime]` Throw an explicit error if `js` is missing from `moduleFileExtensions` ([#7160](https://github.com/facebook/jest/pull/7160)) +- `[jest-runtime]` Fix missing coverage when using negative glob pattern in `testMatch` ([#7170](https://github.com/facebook/jest/pull/7170)) +- `[*]` Ensure `maxWorkers` is at least 1 (was 0 in some cases where there was only 1 CPU) ([#7182](https://github.com/facebook/jest/pull/7182)) +- `[jest-runtime]` Fix transform cache invalidation when requiring a test file from multiple projects ([#7186](https://github.com/facebook/jest/pull/7186)) +- `[jest-changed-files]` Return correctly the changed files when using `lastCommit=true` on Mercurial repositories ([#7228](https://github.com/facebook/jest/pull/7228)) +- `[babel-jest]` Cache includes babel environment variables ([#7239](https://github.com/facebook/jest/pull/7239)) +- `[jest-config]` Use strings instead of `RegExp` instances in normalized configuration ([#7251](https://github.com/facebook/jest/pull/7251)) +- `[jest-circus]` Make sure to display real duration even if time is mocked ([#7264](https://github.com/facebook/jest/pull/7264)) +- `[expect]` Improves the failing message for `toStrictEqual` matcher. ([#7224](https://github.com/facebook/jest/pull/7224)) +- `[expect]` Improves the failing message for `toEqual` matcher. ([#7325](https://github.com/facebook/jest/pull/7325)) +- `[jest-resolve]` Fix not being able to resolve path to mapped file with custom platform ([#7312](https://github.com/facebook/jest/pull/7312)) +- `[jest-message-util]` Improve parsing of error messages for unusually formatted stack traces ([#7319](https://github.com/facebook/jest/pull/7319)) +- `[jest-runtime]` Ensure error message text is not lost on errors with code frames ([#7319](https://github.com/facebook/jest/pull/7319)) +- `[jest-haste-map]` Fix to resolve path that is start with words same as rootDir ([#7324](https://github.com/facebook/jest/pull/7324)) +- `[expect]` Fix toMatchObject matcher when used with `Object.create(null)` ([#7334](https://github.com/facebook/jest/pull/7334)) +- `[jest-haste-map]` Remove legacy condition for duplicate module detection ([#7333](https://github.com/facebook/jest/pull/7333)) +- `[jest-haste-map]` Fix `require` detection with trailing commas and ignore `import typeof` modules ([#7385](https://github.com/facebook/jest/pull/7385)) +- `[jest-cli]` Fix to set prettierPath via config file ([#7412](https://github.com/facebook/jest/pull/7412)) +- `[expect]` Test more precisely for class instance getters ([#7477](https://github.com/facebook/jest/pull/7477)) +- `[jest-cli]` Support dashed args ([#7497](https://github.com/facebook/jest/pull/7497)) +- `[jest-cli]` Fix to run in band tests if watch mode enable when runInBand arg used ([#7518](https://github.com/facebook/jest/pull/7518)) +- `[jest-runtime]` Fix mistake as test files when run coverage issue. ([#7506](https://github.com/facebook/jest/pull/7506)) +- `[jest-cli]` print info about passWithNoTests flag ([#7309](https://github.com/facebook/jest/pull/7309)) +- `[pretty-format]` Omit unnecessary symbol filter for object keys ([#7457](https://github.com/facebook/jest/pull/7457)) +- `[jest-runtime]` Fix `requireActual` on node_modules with mock present ([#7404](https://github.com/facebook/jest/pull/7404)) +- `[jest-resolve]` Fix `isBuiltinModule` to support versions of node without `module.builtinModules` ([#7565](https://github.com/facebook/jest/pull/7565)) +- `[babel-jest]` Set `cwd` to be resilient to it changing during the runtime of the tests ([#7574](https://github.com/facebook/jest/pull/7574)) +- `[jest-snapshot]` Write and read snapshots from disk even if `fs` is mocked ([#7080](https://github.com/facebook/jest/pull/7080)) +- `[jest-config]` Normalize `config.cwd` and `config.rootDir` using `realpath ([#7598](https://github.com/facebook/jest/pull/7598)) +- `[jest-environment-node]` Fix buffer property is not ArrayBuffer issue. ([#7626](https://github.com/facebook/jest/pull/7626)) +- `[babel-plugin-jest-hoist]` Ignore TS type annotations when looking for out-of-scope references ([#7641](https://github.com/facebook/jest/pull/7641)) +- `[jest-config]` Add name to project if one does not exist to pick correct resolver ([#5862](https://github.com/facebook/jest/pull/5862)) +- `[jest-runtime]` Pass `watchPathIgnorePatterns` to Haste instance ([#7585](https://github.com/facebook/jest/pull/7585)) +- `[jest-runtime]` Resolve mock files via Haste when using `require.resolve` ([#7687](https://github.com/facebook/jest/pull/7687)) + +### Chore & Maintenance + +- `[*]` [**BREAKING**] Require Node.js 6+ for all packages ([#7258](https://github.com/facebook/jest/pull/7258)) +- `[jest-util]` [**BREAKING**] Remove long-deprecated globals for fake timers ([#7285](https://github.com/facebook/jest/pull/7285)) +- `[*]` [**BREAKING**] Upgrade to Micromatch 3 ([#6650](https://github.com/facebook/jest/pull/6650)) +- `[*]` [**BREAKING**] Remove regenerator-runtime injection ([#7595](https://github.com/facebook/jest/pull/7595)) +- `[jest-worker]` Disable `worker_threads` to avoid issues with libraries to ready for it ([#7681](https://github.com/facebook/jest/pull/7681)) +- `[docs]` Fix message property in custom matcher example to return a function instead of a constant. ([#7426](https://github.com/facebook/jest/pull/7426)) +- `[jest-circus]` Standardize file naming in `jest-circus` ([#7301](https://github.com/facebook/jest/pull/7301)) +- `[docs]` Add synchronous test.each setup ([#7150](https://github.com/facebook/jest/pull/7150)) +- `[docs]` Add `this.extend` to the Custom Matchers API reference ([#7130](https://github.com/facebook/jest/pull/7130)) +- `[docs]` Fix default value for `coverageReporters` value in configuration docs ([#7126](https://github.com/facebook/jest/pull/7126)) +- `[docs]` Add link for jest-extended in expect docs ([#7078](https://github.com/facebook/jest/pull/7078)) +- `[jest-util]` Add ErrorWithStack class ([#7067](https://github.com/facebook/jest/pull/7067)) +- `[docs]` Document `--runTestsByPath` CLI parameter ([#7046](https://github.com/facebook/jest/pull/7046)) +- `[docs]` Fix babel-core installation instructions ([#6745](https://github.com/facebook/jest/pull/6745)) +- `[docs]` Explain how to rewrite assertions to avoid large irrelevant diff ([#6971](https://github.com/facebook/jest/pull/6971)) +- `[examples]` add example using Babel 7 ([#6983](https://github.com/facebook/jest/pull/6983)) +- `[docs]` Replace shallow equality with referential identity in `ExpectAPI.md` ([#6991](https://github.com/facebook/jest/pull/6991)) +- `[jest-changed-files]` Refactor to use `execa` over `child_process` ([#6987](https://github.com/facebook/jest/pull/6987)) +- `[*]` Bump dated dependencies ([#6978](https://github.com/facebook/jest/pull/6978)) +- `[scripts]` Don’t make empty sub-folders for ignored files in build folder ([#7001](https://github.com/facebook/jest/pull/7001)) +- `[docs]` Add missing export statement in `puppeteer_environment.js` under `docs/Puppeteer.md` ([#7127](https://github.com/facebook/jest/pull/7127)) +- `[docs]` Removed useless expect.assertions in `TestingAsyncCode.md` ([#7131](https://github.com/facebook/jest/pull/7131)) +- `[docs]` Remove references to `@providesModule` which isn't supported anymore ([#7147](https://github.com/facebook/jest/pull/7147)) +- `[docs]` Update `setupFiles` documentation for clarity ([#7187](https://github.com/facebook/jest/pull/7187)) +- `[docs]` Change `require.require*` to `jest.require*` ([#7210](https://github.com/facebook/jest/pull/7210)) +- `[jest-circus]` Add readme.md ([#7198](https://github.com/facebook/jest/pull/7198)) +- `[jest-editor-support]` Remove from the repository ([#7232](https://github.com/facebook/jest/pull/7232)) +- `[jest-test-typescript-parser]` Remove from the repository ([#7232](https://github.com/facebook/jest/pull/7232)) +- `[tests]` Free tests from the dependency on value of FORCE_COLOR ([#6585](https://github.com/facebook/jest/pull/6585/files)) +- `[*]` Add babel plugin to make sure Jest is unaffected by fake Promise implementations ([#7225](https://github.com/facebook/jest/pull/7225)) +- `[docs]` Add correct default value for `testUrl` config option ([#7277](https://github.com/facebook/jest/pull/7277)) +- `[docs]` Remove duplicate code in `MockFunctions` ([#7297](https://github.com/facebook/jest/pull/7297)) +- `[*]` Add check for Facebook copyright headers on CI ([#7370](https://github.com/facebook/jest/pull/7370)) +- `[*]` Update Facebook copyright headers ([#7589](https://github.com/facebook/jest/pull/7589)) +- `[jest-haste-map]` Refactor `dependencyExtractor` and tests ([#7385](https://github.com/facebook/jest/pull/7385)) +- `[docs]` Clearify conditional setting of `NODE_ENV` ([#7369](https://github.com/facebook/jest/pull/7369)) +- `[docs]` Clarify conditional setting of `NODE_ENV` ([#7369](https://github.com/facebook/jest/pull/7369)) +- `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314), [#7467](https://github.com/facebook/jest/pull/7467), [#7464](https://github.com/facebook/jest/pull/7464)), [#7471](https://github.com/facebook/jest/pull/7471)) +- `[docs]` Add `testPathIgnorePatterns` in CLI documentation ([#7440](https://github.com/facebook/jest/pull/7440)) +- `[docs]` Removed misleading text about `describe()` grouping together tests into a test suite ([#7434](https://github.com/facebook/jest/pull/7434)) +- `[diff-sequences]` Add performance benchmark to package ([#7603](https://github.com/facebook/jest/pull/7603)) +- `[*]` Replace as many `Object.assign` with object spread as possible ([#7627](https://github.com/facebook/jest/pull/7627)) +- `[ci]` Initial support for Azure Pipelines ([#7556](https://github.com/facebook/jest/pull/7556)) + +### Performance + +- `[jest-mock]` Improve `getType` function performance. ([#7159](https://github.com/facebook/jest/pull/7159)) + +## 23.6.0 + +### Features + +- `[jest-cli]` Add `changedSince` to allowed watch mode configs ([#6955](https://github.com/facebook/jest/pull/6955)) +- `[babel-jest]` Add support for `babel.config.js` added in Babel 7.0.0 ([#6911](https://github.com/facebook/jest/pull/6911)) +- `[jest-resolve]` Add support for an experimental `mapper` option (Watchman crawler only) that adds virtual files to the Haste map ([#6940](https://github.com/facebook/jest/pull/6940)) + +### Fixes + +- `[jest-resolve]` Only resolve realpath once in try-catch ([#6925](https://github.com/facebook/jest/pull/6925)) +- `[expect]` Fix TypeError in `toBeInstanceOf` on `null` or `undefined` ([#6912](https://github.com/facebook/jest/pull/6912)) +- `[jest-jasmine2]` Throw a descriptive error if the first argument supplied to a hook was not a function ([#6917](https://github.com/facebook/jest/pull/6917)) and ([#6931](https://github.com/facebook/jest/pull/6931)) +- `[jest-circus]` Throw a descriptive error if the first argument supplied to a hook was not a function ([#6917](https://github.com/facebook/jest/pull/6917)) and ([#6931](https://github.com/facebook/jest/pull/6931)) +- `[expect]` Fix variadic custom asymmetric matchers ([#6898](https://github.com/facebook/jest/pull/6898)) +- `[jest-cli]` Fix incorrect `testEnvironmentOptions` warning ([#6852](https://github.com/facebook/jest/pull/6852)) +- `[jest-each]` Prevent done callback being supplied to describe ([#6843](https://github.com/facebook/jest/pull/6843)) +- `[jest-config]` Better error message for a case when a preset module was found, but no `jest-preset.js` or `jest-preset.json` at the root ([#6863](https://github.com/facebook/jest/pull/6863)) +- `[jest-haste-map]` Catch crawler error when unsuccessfully reading directories ([#6761](https://github.com/facebook/jest/pull/6761)) + +### Chore & Maintenance + +- `[docs]` Add custom toMatchSnapshot matcher docs ([#6837](https://github.com/facebook/jest/pull/6837)) +- `[docs]` Improve the documentation regarding preset configuration ([#6864](https://github.com/facebook/jest/issues/6864)) +- `[docs]` Clarify usage of `--projects` CLI option ([#6872](https://github.com/facebook/jest/pull/6872)) +- `[docs]` Correct `failure-change` notification mode ([#6878](https://github.com/facebook/jest/pull/6878)) +- `[scripts]` Don’t remove node_modules from subdirectories of presets in e2e tests ([#6948](https://github.com/facebook/jest/pull/6948)) +- `[diff-sequences]` Double-check number of differences in tests ([#6953](https://github.com/facebook/jest/pull/6953)) + +## 23.5.0 + +### Features + +- `[jest-cli]` Add package name to `NotifyReporter` notification ([#5898](https://github.com/facebook/jest/pull/5898)) +- `[jest-runner]` print stack trace when `process.exit` is called from user code ([#6714](https://github.com/facebook/jest/pull/6714)) +- `[jest-each]` introduces `%#` option to add index of the test to its title ([#6414](https://github.com/facebook/jest/pull/6414)) +- `[pretty-format]` Support serializing `DocumentFragment` ([#6705](https://github.com/facebook/jest/pull/6705)) +- `[jest-validate]` Add `recursive` and `recursiveBlacklist` options for deep config checks ([#6802](https://github.com/facebook/jest/pull/6802)) +- `[jest-cli]` Check watch plugins for key conflicts ([#6697](https://github.com/facebook/jest/pull/6697)) + +### Fixes + +- `[jest-snapshot]` Mark snapshots as obsolete when moved to an inline snapshot ([#6773](https://github.com/facebook/jest/pull/6773)) +- `[jest-config]` Fix `--coverage` with `--findRelatedTests` overwriting `collectCoverageFrom` options ([#6736](https://github.com/facebook/jest/pull/6736)) +- `[jest-config]` Update default config for testURL from 'about:blank' to 'http://localhost' to address latest JSDOM security warning. ([#6792](https://github.com/facebook/jest/pull/6792)) +- `[jest-cli]` Fix `testMatch` not working with negations ([#6648](https://github.com/facebook/jest/pull/6648)) +- `[jest-cli]` Don't report promises as open handles ([#6716](https://github.com/facebook/jest/pull/6716)) +- `[jest-each]` Add timeout support to parameterised tests ([#6660](https://github.com/facebook/jest/pull/6660)) +- `[jest-cli]` Improve the message when running coverage while there are no files matching global threshold ([#6334](https://github.com/facebook/jest/pull/6334)) +- `[jest-snapshot]` Correctly merge property matchers with the rest of the snapshot in `toMatchSnapshot`. ([#6528](https://github.com/facebook/jest/pull/6528)) +- `[jest-snapshot]` Add error messages for invalid property matchers. ([#6528](https://github.com/facebook/jest/pull/6528)) +- `[jest-cli]` Show open handles from inside test files as well ([#6263](https://github.com/facebook/jest/pull/6263)) +- `[jest-haste-map]` Fix a problem where creating folders ending with `.js` could cause a crash ([#6818](https://github.com/facebook/jest/pull/6818)) + +### Chore & Maintenance + +- `[docs]` Document another option to avoid warnings with React 16 ([#5258](https://github.com/facebook/jest/issues/5258)) +- `[docs]` Add note explaining when `jest.setTimeout` should be called ([#6817](https://github.com/facebook/jest/pull/6817/files)) +- `[docs]` Fixed bug in example code ([#6828](https://github.com/facebook/jest/pull/6828)) + +## 23.4.2 + +### Performance + +- `[jest-changed-files]` limit git and hg commands to specified roots ([#6732](https://github.com/facebook/jest/pull/6732)) + +### Fixes + +- `[jest-circus]` Fix retryTimes so errors are reset before re-running ([#6762](https://github.com/facebook/jest/pull/6762)) +- `[docs]` Update `expect.objectContaining()` description ([#6754](https://github.com/facebook/jest/pull/6754)) +- `[babel-jest]` Make `getCacheKey()` take into account `createTransformer` options ([#6699](https://github.com/facebook/jest/pull/6699)) +- `[jest-jasmine2]` Use prettier through `require` instead of `localRequire`. Fixes `matchInlineSnapshot` where prettier dependencies like `path` and `fs` are mocked with `jest.mock`. ([#6776](https://github.com/facebook/jest/pull/6776)) +- `[docs]` Fix contributors link ([#6711](https://github.com/facebook/jest/pull/6711)) +- `[website]` Fix website versions page to link to correct language ([#6734](https://github.com/facebook/jest/pull/6734)) +- `[expect]` Update `toContain` suggestion to contain equal message ([#6792](https://github.com/facebook/jest/pull/6810)) + +## 23.4.1 + +### Features + +- `[jest-cli]` Watch plugins now have access to a broader range of global configuration options in their `updateConfigAndRun` callbacks, so they can provide a wider set of extra features ([#6473](https://github.com/facebook/jest/pull/6473)) +- `[jest-snapshot]` `babel-traverse` is now passed to `jest-snapshot` explicitly to avoid unnecessary requires in every test + +### Fixes + +- `[jest-haste-map]` Optimize watchman crawler by using `glob` on initial query ([#6689](https://github.com/facebook/jest/pull/6689)) +- `[pretty-format]` Fix formatting of invalid Date objects ([#6635](https://github.com/facebook/jest/pull/6635)) + +## 23.4.0 + +### Features + +- `[jest-haste-map]` Add `computeDependencies` flag to avoid opening files if not needed ([#6667](https://github.com/facebook/jest/pull/6667)) +- `[jest-runtime]` Support `require.resolve.paths` ([#6471](https://github.com/facebook/jest/pull/6471)) +- `[jest-runtime]` Support `paths` option for `require.resolve` ([#6471](https://github.com/facebook/jest/pull/6471)) + +### Fixes + +- `[jest-runner]` Force parallel runs for watch mode, to avoid TTY freeze ([#6647](https://github.com/facebook/jest/pull/6647)) +- `[jest-cli]` properly reprint resolver errors in watch mode ([#6407](https://github.com/facebook/jest/pull/6407)) +- `[jest-cli]` Write configuration to stdout when the option was explicitly passed to Jest ([#6447](https://github.com/facebook/jest/pull/6447)) +- `[jest-cli]` Fix regression on non-matching suites ([6657](https://github.com/facebook/jest/pull/6657)) +- `[jest-runtime]` Roll back `micromatch` version to prevent regression when matching files ([#6661](https://github.com/facebook/jest/pull/6661)) + +## 23.3.0 + +### Features + +- `[jest-cli]` Allow watch plugin to be configured ([#6603](https://github.com/facebook/jest/pull/6603)) +- `[jest-snapshot]` Introduce `toMatchInlineSnapshot` and `toThrowErrorMatchingInlineSnapshot` matchers ([#6380](https://github.com/facebook/jest/pull/6380)) + +### Fixes + +- `[jest-regex-util]` Improve handling already escaped path separators on Windows ([#6523](https://github.com/facebook/jest/pull/6523)) +- `[jest-cli]` Fix `testNamePattern` value with interactive snapshots ([#6579](https://github.com/facebook/jest/pull/6579)) +- `[jest-cli]` Fix enter to interrupt watch mode ([#6601](https://github.com/facebook/jest/pull/6601)) + +### Chore & Maintenance + +- `[website]` Switch domain to ([#6549](https://github.com/facebook/jest/pull/6549)) +- `[tests]` Improve stability of `yarn test` on Windows ([#6534](https://github.com/facebook/jest/pull/6534)) +- `[*]` Transpile object shorthand into Node 4 compatible syntax ([#6582](https://github.com/facebook/jest/pull/6582)) +- `[*]` Update all legacy links to jestjs.io ([#6622](https://github.com/facebook/jest/pull/6622)) +- `[docs]` Add docs for 23.1, 23.2, and 23.3 ([#6623](https://github.com/facebook/jest/pull/6623)) +- `[website]` Only test/deploy website if relevant files are changed ([#6626](https://github.com/facebook/jest/pull/6626)) +- `[docs]` Describe behavior of `resetModules` option when set to `false` ([#6641](https://github.com/facebook/jest/pull/6641)) + +## 23.2.0 + +### Features + +- `[jest-each]` Add support for keyPaths in test titles ([#6457](https://github.com/facebook/jest/pull/6457)) +- `[jest-cli]` Add `jest --init` option that generates a basic configuration file with a short description for each option ([#6442](https://github.com/facebook/jest/pull/6442)) +- `[jest.retryTimes]` Add `jest.retryTimes()` option that allows failed tests to be retried n-times when using jest-circus. ([#6498](https://github.com/facebook/jest/pull/6498)) + +### Fixes + +- `[docs]` Fixed error in documentation for expect.not.arrayContaining(array). ([#6491](https://github.com/facebook/jest/pull/6491)) +- `[jest-cli]` Add check to make sure one or more tests have run before notifying when using `--notify` ([#6495](https://github.com/facebook/jest/pull/6495)) +- `[jest-cli]` Pass `globalConfig` as a parameter to `globalSetup` and `globalTeardown` functions ([#6486](https://github.com/facebook/jest/pull/6486)) +- `[jest-config]` Add missing options to the `defaults` object ([#6428](https://github.com/facebook/jest/pull/6428)) +- `[expect]` Using symbolic property names in arrays no longer causes the `toEqual` matcher to fail ([#6391](https://github.com/facebook/jest/pull/6391)) +- `[expect]` `toEqual` no longer tries to compare non-enumerable symbolic properties, to be consistent with non-symbolic properties. ([#6398](https://github.com/facebook/jest/pull/6398)) +- `[jest-util]` `console.timeEnd` now properly log elapsed time in milliseconds. ([#6456](https://github.com/facebook/jest/pull/6456)) +- `[jest-mock]` Fix `MockNativeMethods` access in react-native `jest.mock()` ([#6505](https://github.com/facebook/jest/pull/6505)) +- `[jest-cli]` Fix `reporters` for `moduleName` = `'default'` ([#6542](https://github.com/facebook/jest/pull/6542)) + +### Chore & Maintenance + +- `[docs]` Add jest-each docs for 1 dimensional arrays ([#6444](https://github.com/facebook/jest/pull/6444/files)) + +## 23.1.0 + +### Features + +- `[jest-each]` Add pretty-format serialising to each titles ([#6357](https://github.com/facebook/jest/pull/6357)) +- `[jest-cli]` shouldRunTestSuite watch hook now receives an object with `config`, `testPath` and `duration` ([#6350](https://github.com/facebook/jest/pull/6350)) +- `[jest-each]` Support one dimensional array of data ([#6351](https://github.com/facebook/jest/pull/6351)) +- `[jest-watch]` create new package `jest-watch` to ease custom watch plugin development ([#6318](https://github.com/facebook/jest/pull/6318)) +- `[jest-circus]` Make hooks in empty describe blocks error ([#6320](https://github.com/facebook/jest/pull/6320)) +- Add a config/CLI option `errorOnDeprecated` which makes calling deprecated APIs throw hepful error messages ([#6339](https://github.com/facebook/jest/pull/6339)) + +### Fixes + +- `[jest-each]` Fix pluralising missing arguments error ([#6369](https://github.com/facebook/jest/pull/6369)) +- `[jest-each]` Stop test title concatenating extra args ([#6346](https://github.com/facebook/jest/pull/6346)) +- `[expect]` toHaveBeenNthCalledWith/nthCalledWith gives wrong call messages if not matched ([#6340](https://github.com/facebook/jest/pull/6340)) +- `[jest-each]` Make sure invalid arguments to `each` points back to the user's code ([#6347](https://github.com/facebook/jest/pull/6347)) +- `[expect]` toMatchObject throws TypeError when a source property is null ([#6313](https://github.com/facebook/jest/pull/6313)) +- `[jest-cli]` Normalize slashes in paths in CLI output on Windows ([#6310](https://github.com/facebook/jest/pull/6310)) +- `[jest-cli]` Fix run beforeAll in excluded suites tests" mode. ([#6234](https://github.com/facebook/jest/pull/6234)) +- `[jest-haste-map`] Compute SHA-1s for non-tracked files when using Node crawler ([#6264](https://github.com/facebook/jest/pull/6264)) + +### Chore & Maintenance + +- `[docs]` Improve documentation of `mockClear`, `mockReset`, and `mockRestore` ([#6227](https://github.com/facebook/jest/pull/6227/files)) +- `[jest-each]` Refactor each to use shared implementation with core ([#6345](https://github.com/facebook/jest/pull/6345)) +- `[jest-each]` Update jest-each docs for serialising values into titles ([#6337](https://github.com/facebook/jest/pull/6337)) +- `[jest-circus]` Add dependency on jest-each ([#6309](https://github.com/facebook/jest/pull/6309)) +- `[filenames]` Rename "integration-tests" to "e2e" ([#6315](https://github.com/facebook/jest/pull/6315)) +- `[docs]` Mention the use of commit hash with `--changedSince` flag ([#6330](https://github.com/facebook/jest/pull/6330)) + +## 23.0.1 + +### Chore & Maintenance + +- `[jest-jasemine2]` Add dependency on jest-each ([#6308](https://github.com/facebook/jest/pull/6308)) +- `[jest-each]` Move jest-each into core Jest ([#6278](https://github.com/facebook/jest/pull/6278)) +- `[examples]` Update typescript example to using ts-jest ([#6260](https://github.com/facebook/jest/pull/6260)) + +### Fixes + +- `[pretty-format]` Serialize inverse asymmetric matchers correctly ([#6272](https://github.com/facebook/jest/pull/6272)) + +## 23.0.0 + +### Features + +- `[expect]` Expose `getObjectSubset`, `iterableEquality`, and `subsetEquality` ([#6210](https://github.com/facebook/jest/pull/6210)) +- `[jest-snapshot]` Add snapshot property matchers ([#6210](https://github.com/facebook/jest/pull/6210)) +- `[jest-config]` Support jest-preset.js files within Node modules ([#6185](https://github.com/facebook/jest/pull/6185)) +- `[jest-cli]` Add `--detectOpenHandles` flag which enables Jest to potentially track down handles keeping it open after tests are complete. ([#6130](https://github.com/facebook/jest/pull/6130)) +- `[jest-jasmine2]` Add data driven testing based on `jest-each` ([#6102](https://github.com/facebook/jest/pull/6102)) +- `[jest-matcher-utils]` Change "suggest to equal" message to be more advisory ([#6103](https://github.com/facebook/jest/issues/6103)) +- `[jest-message-util]` Don't ignore messages with `vendor` anymore ([#6117](https://github.com/facebook/jest/pull/6117)) +- `[jest-validate]` Get rid of `jest-config` dependency ([#6067](https://github.com/facebook/jest/pull/6067)) +- `[jest-validate]` Adds option to inject `deprecationEntries` ([#6067](https://github.com/facebook/jest/pull/6067)) +- `[jest-snapshot]` [**BREAKING**] Concatenate name of test, optional snapshot name and count ([#6015](https://github.com/facebook/jest/pull/6015)) +- `[jest-runtime]` Allow for transform plugins to skip the definition process method if createTransformer method was defined. ([#5999](https://github.com/facebook/jest/pull/5999)) +- `[expect]` Add stack trace for async errors ([#6008](https://github.com/facebook/jest/pull/6008)) +- `[jest-jasmine2]` Add stack trace for timeouts ([#6008](https://github.com/facebook/jest/pull/6008)) +- `[jest-jasmine2]` Add stack trace for thrown non-`Error`s ([#6008](https://github.com/facebook/jest/pull/6008)) +- `[jest-runtime]` Prevent modules from marking themselves as their own parent ([#5235](https://github.com/facebook/jest/issues/5235)) +- `[jest-mock]` Add support for auto-mocking generator functions ([#5983](https://github.com/facebook/jest/pull/5983)) +- `[expect]` Add support for async matchers ([#5919](https://github.com/facebook/jest/pull/5919)) +- `[expect]` Suggest toContainEqual ([#5948](https://github.com/facebook/jest/pull/5953)) +- `[jest-config]` Export Jest's default options ([#5948](https://github.com/facebook/jest/pull/5948)) +- `[jest-editor-support]` Move `coverage` to `ProjectWorkspace.collectCoverage` ([#5929](https://github.com/facebook/jest/pull/5929)) +- `[jest-editor-support]` Add `coverage` option to runner ([#5836](https://github.com/facebook/jest/pull/5836)) +- `[jest-haste-map]` Support extracting dynamic `import`s ([#5883](https://github.com/facebook/jest/pull/5883)) +- `[expect]` Improve output format for mismatchedArgs in mock/spy calls. ([#5846](https://github.com/facebook/jest/pull/5846)) +- `[jest-cli]` Add support for using `--coverage` in combination with watch mode, `--onlyChanged`, `--findRelatedTests` and more ([#5601](https://github.com/facebook/jest/pull/5601)) +- `[jest-jasmine2]` [**BREAKING**] Adds error throwing and descriptive errors to `it`/ `test` for invalid arguments. `[jest-circus]` Adds error throwing and descriptive errors to `it`/ `test` for invalid arguments ([#5558](https://github.com/facebook/jest/pull/5558)) +- `[jest-matcher-utils]` Add `isNot` option to `matcherHint` function ([#5512](https://github.com/facebook/jest/pull/5512)) +- `[jest-config]` Add `` to runtime files not found error report ([#5693](https://github.com/facebook/jest/pull/5693)) +- `[expect]` Make toThrow matcher pass only if Error object is returned from promises ([#5670](https://github.com/facebook/jest/pull/5670)) +- `[expect]` Add isError to utils ([#5670](https://github.com/facebook/jest/pull/5670)) +- `[expect]` Add inverse matchers (`expect.not.arrayContaining`, etc., [#5517](https://github.com/facebook/jest/pull/5517)) +- `[expect]` `expect.extend` now also extends asymmetric matchers ([#5503](https://github.com/facebook/jest/pull/5503)) +- `[jest-mock]` Update `spyOnProperty` to support spying on the prototype chain ([#5753](https://github.com/facebook/jest/pull/5753)) +- `[jest-mock]` Add tracking of return values in the `mock` property ([#5752](https://github.com/facebook/jest/pull/5752)) +- `[jest-mock]` Add tracking of thrown errors in the `mock` property ([#5764](https://github.com/facebook/jest/pull/5764)) +- `[expect]`Add nthCalledWith spy matcher ([#5605](https://github.com/facebook/jest/pull/5605)) +- `[jest-cli]` Add `isSerial` property that runners can expose to specify that they can not run in parallel ([#5706](https://github.com/facebook/jest/pull/5706)) +- `[expect]` Add `.toBeCalledTimes` and `toHaveBeenNthCalledWith` aliases ([#5826](https://github.com/facebook/jest/pull/5826)) +- `[jest-cli]` Interactive Snapshot Mode improvements ([#5864](https://github.com/facebook/jest/pull/5864)) +- `[jest-editor-support]` Add `no-color` option to runner ([#5909](https://github.com/facebook/jest/pull/5909)) +- `[jest-jasmine2]` Pretty-print non-Error object errors ([#5980](https://github.com/facebook/jest/pull/5980)) +- `[jest-message-util]` Include column in stack frames ([#5889](https://github.com/facebook/jest/pull/5889)) +- `[expect]` Introduce toStrictEqual ([#6032](https://github.com/facebook/jest/pull/6032)) +- `[expect]` Add return matchers ([#5879](https://github.com/facebook/jest/pull/5879)) +- `[jest-cli]` Improve snapshot summaries ([#6181](https://github.com/facebook/jest/pull/6181)) +- `[expect]` Include custom mock names in error messages ([#6199](https://github.com/facebook/jest/pull/6199)) +- `[jest-diff]` Support returning diff from oneline strings ([#6221](https://github.com/facebook/jest/pull/6221)) +- `[expect]` Improve return matchers ([#6172](https://github.com/facebook/jest/pull/6172)) +- `[jest-cli]` Overhaul watch plugin hooks names ([#6249](https://github.com/facebook/jest/pull/6249)) +- `[jest-mock]` [**BREAKING**] Include tracked call results in serialized mock ([#6244](https://github.com/facebook/jest/pull/6244)) + +### Fixes + +- `[jest-cli]` Fix stdin encoding to utf8 for watch plugins. ([#6253](https://github.com/facebook/jest/issues/6253)) +- `[expect]` Better detection of DOM Nodes for equality ([#6246](https://github.com/facebook/jest/pull/6246)) +- `[jest-cli]` Fix misleading action description for F key when in "only failed tests" mode. ([#6167](https://github.com/facebook/jest/issues/6167)) +- `[jest-worker]` Stick calls to workers before processing them ([#6073](https://github.com/facebook/jest/pull/6073)) +- `[babel-plugin-jest-hoist]` Allow using `console` global variable ([#6075](https://github.com/facebook/jest/pull/6075)) +- `[jest-jasmine2]` Always remove node core message from assert stack traces ([#6055](https://github.com/facebook/jest/pull/6055)) +- `[expect]` Add stack trace when `expect.assertions` and `expect.hasAssertions` causes test failures. ([#5997](https://github.com/facebook/jest/pull/5997)) +- `[jest-runtime]` Throw a more useful error when trying to require modules after the test environment is torn down ([#5888](https://github.com/facebook/jest/pull/5888)) +- `[jest-mock]` [**BREAKING**] Replace timestamps with `invocationCallOrder` ([#5867](https://github.com/facebook/jest/pull/5867)) +- `[jest-jasmine2]` Install `sourcemap-support` into normal runtime to catch runtime errors ([#5945](https://github.com/facebook/jest/pull/5945)) +- `[jest-jasmine2]` Added assertion error handling inside `afterAll hook` ([#5884](https://github.com/facebook/jest/pull/5884)) +- `[jest-cli]` Remove the notifier actions in case of failure when not in watch mode. ([#5861](https://github.com/facebook/jest/pull/5861)) +- `[jest-mock]` Extend .toHaveBeenCalled return message with outcome ([#5951](https://github.com/facebook/jest/pull/5951)) +- `[jest-runner]` Assign `process.env.JEST_WORKER_ID="1"` when in runInBand mode ([#5860](https://github.com/facebook/jest/pull/5860)) +- `[jest-cli]` Add descriptive error message when trying to use `globalSetup`/`globalTeardown` file that doesn't export a function. ([#5835](https://github.com/facebook/jest/pull/5835)) +- `[expect]` Do not rely on `instanceof RegExp`, since it will not work for RegExps created inside of a different VM ([#5729](https://github.com/facebook/jest/pull/5729)) +- `[jest-resolve]` Update node module resolution algorithm to correctly handle symlinked paths ([#5085](https://github.com/facebook/jest/pull/5085)) +- `[jest-editor-support]` Update `Settings` to use spawn in shell option ([#5658](https://github.com/facebook/jest/pull/5658)) +- `[jest-cli]` Improve the error message when 2 projects resolve to the same config ([#5674](https://github.com/facebook/jest/pull/5674)) +- `[jest-runtime]` remove retainLines from coverage instrumentation ([#5692](https://github.com/facebook/jest/pull/5692)) +- `[jest-cli]` Fix update snapshot issue when using watchAll ([#5696](https://github.com/facebook/jest/pull/5696)) +- `[expect]` Fix rejects.not matcher ([#5670](https://github.com/facebook/jest/pull/5670)) +- `[jest-runtime]` Prevent Babel warnings on large files ([#5702](https://github.com/facebook/jest/pull/5702)) +- `[jest-mock]` Prevent `mockRejectedValue` from causing unhandled rejection ([#5720](https://github.com/facebook/jest/pull/5720)) +- `[pretty-format]` Handle React fragments better ([#5816](https://github.com/facebook/jest/pull/5816)) +- `[pretty-format]` Handle formatting of `React.forwardRef` and `Context` components ([#6093](https://github.com/facebook/jest/pull/6093)) +- `[jest-cli]` Switch collectCoverageFrom back to a string ([#5914](https://github.com/facebook/jest/pull/5914)) +- `[jest-regex-util]` Fix handling regex symbols in tests path on Windows ([#5941](https://github.com/facebook/jest/pull/5941)) +- `[jest-util]` Fix handling of NaN/Infinity in mock timer delay ([#5966](https://github.com/facebook/jest/pull/5966)) +- `[jest-resolve]` Generalise test for package main entries equivalent to ".". ([#5968](https://github.com/facebook/jest/pull/5968)) +- `[jest-config]` Ensure that custom resolvers are used when resolving the configuration ([#5976](https://github.com/facebook/jest/pull/5976)) +- `[website]` Fix website docs ([#5853](https://github.com/facebook/jest/pull/5853)) +- `[expect]` Fix isEqual Set and Map to compare object values and keys regardless of order ([#6150](https://github.com/facebook/jest/pull/6150)) +- `[pretty-format]` [**BREAKING**] Remove undefined props from React elements ([#6162](https://github.com/facebook/jest/pull/6162)) +- `[jest-haste-map]` Properly resolve mocked node modules without package.json defined ([#6232](https://github.com/facebook/jest/pull/6232)) + +### Chore & Maintenance + +- `[jest-runner]` Move sourcemap installation from `jest-jasmine2` to `jest-runner` ([#6176](https://github.com/facebook/jest/pull/6176)) +- `[jest-cli]` Use yargs's built-in `version` instead of rolling our own ([#6215](https://github.com/facebook/jest/pull/6215)) +- `[docs]` Add explanation on how to mock methods not implemented in JSDOM +- `[jest-jasmine2]` Simplify `Env.execute` and TreeProcessor to setup and clean resources for the top suite the same way as for all of the children suites ([#5885](https://github.com/facebook/jest/pull/5885)) +- `[babel-jest]` [**BREAKING**] Always return object from transformer ([#5991](https://github.com/facebook/jest/pull/5991)) +- `[*]` Run Prettier on compiled output ([#5858](https://github.com/facebook/jest/pull/3497)) +- `[jest-cli]` Add fileChange hook for plugins ([#5708](https://github.com/facebook/jest/pull/5708)) +- `[docs]` Add docs on using `jest.mock(...)` ([#5648](https://github.com/facebook/jest/pull/5648)) +- `[docs]` Mention Jest Puppeteer Preset ([#5722](https://github.com/facebook/jest/pull/5722)) +- `[docs]` Add jest-community section to website ([#5675](https://github.com/facebook/jest/pull/5675)) +- `[docs]` Add versioned docs for v22.4 ([#5733](https://github.com/facebook/jest/pull/5733)) +- `[docs]` Improve Snapshot Testing Guide ([#5812](https://github.com/facebook/jest/issues/5812)) +- `[jest-runtime]` [**BREAKING**] Remove `jest.genMockFn` and `jest.genMockFunction` ([#6173](https://github.com/facebook/jest/pull/6173)) +- `[jest-message-util]` Avoid adding unnecessary indent to blank lines in stack traces ([#6211](https://github.com/facebook/jest/pull/6211)) + +## 22.4.2 + +### Fixes + +- `[jest-haste-map]` Recreate Haste map when deserialization fails ([#5642](https://github.com/facebook/jest/pull/5642)) + +## 22.4.1 + +### Fixes + +- `[jest-haste-map]` Parallelize Watchman calls in crawler ([#5640](https://github.com/facebook/jest/pull/5640)) +- `[jest-editor-support]` Update TypeScript definitions ([#5625](https://github.com/facebook/jest/pull/5625)) +- `[babel-jest]` Remove `retainLines` argument to babel. ([#5594](https://github.com/facebook/jest/pull/5594)) + +### Features + +- `[jest-runtime]` Provide `require.main` property set to module with test suite ([#5618](https://github.com/facebook/jest/pull/5618)) + +### Chore & Maintenance + +- `[docs]` Add note about Node version support ([#5622](https://github.com/facebook/jest/pull/5622)) +- `[docs]` Update to use yarn ([#5624](https://github.com/facebook/jest/pull/5624)) +- `[docs]` Add how to mock scoped modules to Manual Mocks doc ([#5638](https://github.com/facebook/jest/pull/5638)) + +## 22.4.0 + +### Fixes + +- `[jest-haste-map]` Overhauls how Watchman crawler works fixing Windows ([#5615](https://github.com/facebook/jest/pull/5615)) +- `[expect]` Allow matching of Errors against plain objects ([#5611](https://github.com/facebook/jest/pull/5611)) +- `[jest-haste-map]` Do not read binary files in Haste, even when instructed to do so ([#5612](https://github.com/facebook/jest/pull/5612)) +- `[jest-cli]` Don't skip matchers for exact files ([#5582](https://github.com/facebook/jest/pull/5582)) +- `[docs]` Update discord links ([#5586](https://github.com/facebook/jest/pull/5586)) +- `[jest-runtime]` Align handling of testRegex on Windows between searching for tests and instrumentation checks ([#5560](https://github.com/facebook/jest/pull/5560)) +- `[jest-config]` Make it possible to merge `transform` option with preset ([#5505](https://github.com/facebook/jest/pull/5505)) +- `[jest-util]` Fix `console.assert` behavior in custom & buffered consoles ([#5576](https://github.com/facebook/jest/pull/5576)) + +### Features + +- `[docs]` Add MongoDB guide ([#5571](https://github.com/facebook/jest/pull/5571)) +- `[jest-runtime]` Deprecate mapCoverage option. ([#5177](https://github.com/facebook/jest/pull/5177)) +- `[babel-jest]` Add option to return sourcemap from the transformer separately from source. ([#5177](https://github.com/facebook/jest/pull/5177)) +- `[jest-validate]` Add ability to log deprecation warnings for CLI flags. ([#5536](https://github.com/facebook/jest/pull/5536)) +- `[jest-serializer]` Added new module for serializing. Works using V8 or JSON ([#5609](https://github.com/facebook/jest/pull/5609)) +- `[docs]` Add a documentation note for project `displayName` configuration ([#5600](https://github.com/facebook/jest/pull/5600)) + +### Chore & Maintenance + +- `[docs]` Update automatic mocks documentation ([#5630](https://github.com/facebook/jest/pull/5630)) + +## jest 22.3.0 + +### Fixes + +- `[expect]` Add descriptive error message to CalledWith methods when missing optional arguments ([#5547](https://github.com/facebook/jest/pull/5547)) +- `[jest-cli]` Fix inability to quit watch mode while debugger is still attached ([#5029](https://github.com/facebook/jest/pull/5029)) +- `[jest-haste-map]` Properly handle platform-specific file deletions ([#5534](https://github.com/facebook/jest/pull/5534)) + +### Features + +- `[jest-util]` Add the following methods to the "console" implementations: `assert`, `count`, `countReset`, `dir`, `dirxml`, `group`, `groupCollapsed`, `groupEnd`, `time`, `timeEnd` ([#5514](https://github.com/facebook/jest/pull/5514)) +- `[docs]` Add documentation for interactive snapshot mode ([#5291](https://github.com/facebook/jest/pull/5291)) +- `[jest-editor-support]` Add watchAll flag ([#5523](https://github.com/facebook/jest/pull/5523)) +- `[jest-cli]` Support multiple glob patterns for `collectCoverageFrom` ([#5537](https://github.com/facebook/jest/pull/5537)) +- `[docs]` Add versioned documentation to the website ([#5541](https://github.com/facebook/jest/pull/5541)) + +### Chore & Maintenance + +- `[jest-config]` Allow `` to be used with `collectCoverageFrom` ([#5524](https://github.com/facebook/jest/pull/5524)) +- `[filenames]` Standardize files names in "integration-tests" folder ([#5513](https://github.com/facebook/jest/pull/5513)) + +## jest 22.2.2 + +### Fixes + +- `[babel-jest]` Revert "Remove retainLines from babel-jest" ([#5496](https://github.com/facebook/jest/pull/5496)) +- `[jest-docblock]` Support multiple of the same `@pragma`. ([#5154](https://github.com/facebook/jest/pull/5502)) + +### Features + +- `[jest-worker]` Assign a unique id for each worker and pass it to the child process. It will be available via `process.env.JEST_WORKER_ID` ([#5494](https://github.com/facebook/jest/pull/5494)) + +### Chore & Maintenance + +- `[filenames]` Standardize file names in root ([#5500](https://github.com/facebook/jest/pull/5500)) + +## jest 22.2.1 + +### Fixes + +- `[jest-config]` "all" takes precedence over "lastCommit" ([#5486](https://github.com/facebook/jest/pull/5486)) + +## jest 22.2.0 + +### Features + +- `[jest-runner]` Move test summary to after coverage report ([#4512](https://github.com/facebook/jest/pull/4512)) +- `[jest-cli]` Added `--notifyMode` to specify when to be notified. ([#5125](https://github.com/facebook/jest/pull/5125)) +- `[diff-sequences]` New package compares items in two sequences to find a **longest common subsequence**. ([#5407](https://github.com/facebook/jest/pull/5407)) +- `[jest-matcher-utils]` Add `comment` option to `matcherHint` function ([#5437](https://github.com/facebook/jest/pull/5437)) +- `[jest-config]` Allow lastComit and changedFilesWithAncestor via JSON config ([#5476](https://github.com/facebook/jest/pull/5476)) +- `[jest-util]` Add deletion to `process.env` as well ([#5466](https://github.com/facebook/jest/pull/5466)) +- `[jest-util]` Add case-insensitive getters/setters to `process.env` ([#5465](https://github.com/facebook/jest/pull/5465)) +- `[jest-mock]` Add util methods to create async functions. ([#5318](https://github.com/facebook/jest/pull/5318)) + +### Fixes + +- `[jest-cli]` Add trailing slash when checking root folder ([#5464](https://github.com/facebook/jest/pull/5464)) +- `[jest-cli]` Hide interactive mode if there are no failed snapshot tests ([#5450](https://github.com/facebook/jest/pull/5450)) +- `[babel-jest]` Remove retainLines from babel-jest ([#5439](https://github.com/facebook/jest/pull/5439)) +- `[jest-cli]` Glob patterns ignore non-`require`-able files (e.g. `README.md`) ([#5199](https://github.com/facebook/jest/issues/5199)) +- `[jest-mock]` Add backticks support (\`\`) to `mock` a certain package via the `__mocks__` folder. ([#5426](https://github.com/facebook/jest/pull/5426)) +- `[jest-message-util]` Prevent an `ENOENT` crash when the test file contained a malformed source-map. ([#5405](https://github.com/facebook/jest/pull/5405)). +- `[jest]` Add `import-local` to `jest` package. ([#5353](https://github.com/facebook/jest/pull/5353)) +- `[expect]` Support class instances in `.toHaveProperty()` and `.toMatchObject` matcher. ([#5367](https://github.com/facebook/jest/pull/5367)) +- `[jest-cli]` Fix npm update command for snapshot summary. ([#5376](https://github.com/facebook/jest/pull/5376), [5389](https://github.com/facebook/jest/pull/5389/)) +- `[expect]` Make `rejects` and `resolves` synchronously validate its argument. ([#5364](https://github.com/facebook/jest/pull/5364)) +- `[docs]` Add tutorial page for ES6 class mocks. ([#5383](https://github.com/facebook/jest/pull/5383)) +- `[jest-resolve]` Search required modules in node_modules and then in custom paths. ([#5403](https://github.com/facebook/jest/pull/5403)) +- `[jest-resolve]` Get builtin modules from node core. ([#5411](https://github.com/facebook/jest/pull/5411)) +- `[jest-resolve]` Detect and preserve absolute paths in `moduleDirectories`. Do not generate additional (invalid) paths by prepending each ancestor of `cwd` to the absolute path. Additionally, this fixes functionality in Windows OS. ([#5398](https://github.com/facebook/jest/pull/5398)) + +### Chore & Maintenance + +- `[jest-util]` Implement watch plugins ([#5399](https://github.com/facebook/jest/pull/5399)) + +## jest 22.1.4 + +### Fixes + +- `[jest-util]` Add "debug" method to "console" implementations ([#5350](https://github.com/facebook/jest/pull/5350)) +- `[jest-resolve]` Add condition to avoid infinite loop when node module package main is ".". ([#5344)](https://github.com/facebook/jest/pull/5344)) + +### Features + +- `[jest-cli]` `--changedSince`: allow selectively running tests for code changed since arbitrary revisions. ([#5312](https://github.com/facebook/jest/pull/5312)) + +## jest 22.1.3 + +### Fixes + +- `[jest-cli]` Check if the file belongs to the checked project before adding it to the list, also checking that the file name is not explicitly blacklisted ([#5341](https://github.com/facebook/jest/pull/5341)) +- `[jest-editor-support]` Add option to spawn command in shell ([#5340](https://github.com/facebook/jest/pull/5340)) + +## jest 22.1.2 + +### Fixes + +- `[jest-cli]` Check if the file belongs to the checked project before adding it to the list ([#5335](https://github.com/facebook/jest/pull/5335)) +- `[jest-cli]` Fix `EISDIR` when a directory is passed as an argument to `jest`. ([#5317](https://github.com/facebook/jest/pull/5317)) +- `[jest-config]` Added restoreMocks config option. ([#5327](https://github.com/facebook/jest/pull/5327)) + +## jest 22.1.1 + +### Fixes + +- `[*]` Move from "process.exit" to "exit. ([#5313](https://github.com/facebook/jest/pull/5313)) + +## jest 22.1.0 + +### Features + +- `[jest-cli]` Make Jest exit without an error when no tests are found in the case of `--lastCommit`, `--findRelatedTests`, or `--onlyChanged` options having been passed to the CLI +- `[jest-cli]` Add interactive snapshot mode ([#3831](https://github.com/facebook/jest/pull/3831)) + +### Fixes + +- `[jest-cli]` Use `import-local` to support global Jest installations. ([#5304](https://github.com/facebook/jest/pull/5304)) +- `[jest-runner]` Fix memory leak in coverage reporting ([#5289](https://github.com/facebook/jest/pull/5289)) +- `[docs]` Update mention of the minimal version of node supported ([#4947](https://github.com/facebook/jest/issues/4947)) +- `[jest-cli]` Fix missing newline in console message ([#5308](https://github.com/facebook/jest/pull/5308)) +- `[jest-cli]` `--lastCommit` and `--changedFilesWithAncestor` now take effect even when `--onlyChanged` is not specified. ([#5307](https://github.com/facebook/jest/pull/5307)) + +### Chore & Maintenance + +- `[filenames]` Standardize folder names under `integration-tests/` ([#5298](https://github.com/facebook/jest/pull/5298)) + +## jest 22.0.6 + +### Fixes + +- `[jest-jasmine2]` Fix memory leak in snapshot reporting ([#5279](https://github.com/facebook/jest/pull/5279)) +- `[jest-config]` Fix breaking change in `--testPathPattern` ([#5269](https://github.com/facebook/jest/pull/5269)) +- `[docs]` Document caveat with mocks, Enzyme, snapshots and React 16 ([#5258](https://github.com/facebook/jest/issues/5258)) + +## jest 22.0.5 + +### Fixes + +- `[jest-leak-detector]` Removed the reference to `weak`. Now, parent projects must install it by hand for the module to work. +- `[expect]` Fail test when the types of `stringContaining` and `stringMatching` matchers do not match. ([#5069](https://github.com/facebook/jest/pull/5069)) +- `[jest-cli]` Treat dumb terminals as noninteractive ([#5237](https://github.com/facebook/jest/pull/5237)) +- `[jest-cli]` `jest --onlyChanged --changedFilesWithAncestor` now also works with git. ([#5189](https://github.com/facebook/jest/pull/5189)) +- `[jest-config]` fix unexpected condition to avoid infinite recursion in Windows platform. ([#5161](https://github.com/facebook/jest/pull/5161)) +- `[jest-config]` Escape parentheses and other glob characters in `rootDir` before interpolating with `testMatch`. ([#4838](https://github.com/facebook/jest/issues/4838)) +- `[jest-regex-util]` Fix breaking change in `--testPathPattern` ([#5230](https://github.com/facebook/jest/pull/5230)) +- `[expect]` Do not override `Error` stack (with `Error.captureStackTrace`) for custom matchers. ([#5162](https://github.com/facebook/jest/pull/5162)) +- `[pretty-format]` Pretty format for DOMStringMap and NamedNodeMap ([#5233](https://github.com/facebook/jest/pull/5233)) +- `[jest-cli]` Use a better console-clearing string on Windows ([#5251](https://github.com/facebook/jest/pull/5251)) + +### Features + +- `[jest-jasmine]` Allowed classes and functions as `describe` names. ([#5154](https://github.com/facebook/jest/pull/5154)) +- `[jest-jasmine2]` Support generator functions as specs. ([#5166](https://github.com/facebook/jest/pull/5166)) +- `[jest-jasmine2]` Allow `spyOn` with getters and setters. ([#5107](https://github.com/facebook/jest/pull/5107)) +- `[jest-config]` Allow configuration objects inside `projects` array ([#5176](https://github.com/facebook/jest/pull/5176)) +- `[expect]` Add support to `.toHaveProperty` matcher to accept the keyPath argument as an array of properties/indices. ([#5220](https://github.com/facebook/jest/pull/5220)) +- `[docs]` Add documentation for .toHaveProperty matcher to accept the keyPath argument as an array of properties/indices. ([#5220](https://github.com/facebook/jest/pull/5220)) +- `[jest-runner]` test environments are now passed a new `options` parameter. Currently this only has the `console` which is the test console that Jest will expose to tests. ([#5223](https://github.com/facebook/jest/issues/5223)) +- `[jest-environment-jsdom]` pass the `options.console` to a custom instance of `virtualConsole` so jsdom is using the same console as the test. ([#5223](https://github.com/facebook/jest/issues/5223)) + +### Chore & Maintenance + +- `[docs]` Describe the order of execution of describe and test blocks. ([#5217](https://github.com/facebook/jest/pull/5217), [#5238](https://github.com/facebook/jest/pull/5238)) +- `[docs]` Add a note on `moduleNameMapper` ordering. ([#5249](https://github.com/facebook/jest/pull/5249)) + +## jest 22.0.4 + +### Fixes + +- `[jest-cli]` New line before quitting watch mode. ([#5158](https://github.com/facebook/jest/pull/5158)) + +### Features + +- `[babel-jest]` moduleFileExtensions not passed to babel transformer. ([#5110](https://github.com/facebook/jest/pull/5110)) + +### Chore & Maintenance + +- `[*]` Tweaks to better support Node 4 ([#5142](https://github.com/facebook/jest/pull/5142)) + +## jest 22.0.2 && 22.0.3 + +### Chore & Maintenance + +- `[*]` Tweaks to better support Node 4 ([#5134](https://github.com/facebook/jest/pull/5134)) + +## jest 22.0.1 + +### Fixes + +- `[jest-runtime]` fix error for test files providing coverage. ([#5117](https://github.com/facebook/jest/pull/5117)) + +### Features + +- `[jest-config]` Add `forceCoverageMatch` to allow collecting coverage from ignored files. ([#5081](https://github.com/facebook/jest/pull/5081)) + +## jest 22.0.0 + +### Fixes + +- `[jest-resolve]` Use `module.builtinModules` as `BUILTIN_MODULES` when it exists +- `[jest-worker]` Remove `debug` and `inspect` flags from the arguments sent to the child ([#5068](https://github.com/facebook/jest/pull/5068)) +- `[jest-config]` Use all `--testPathPattern` and `` args in `testPathPattern` ([#5066](https://github.com/facebook/jest/pull/5066)) +- `[jest-cli]` Do not support `--watch` inside non-version-controlled environments ([#5060](https://github.com/facebook/jest/pull/5060)) +- `[jest-config]` Escape Windows path separator in testPathPattern CLI arguments ([#5054](https://github.com/facebook/jest/pull/5054)) +- `[jest-jasmine]` Register sourcemaps as node environment to improve performance with jsdom ([#5045](https://github.com/facebook/jest/pull/5045)) +- `[pretty-format]` Do not call toJSON recursively ([#5044](https://github.com/facebook/jest/pull/5044)) +- `[pretty-format]` Fix errors when identity-obj-proxy mocks CSS Modules ([#4935](https://github.com/facebook/jest/pull/4935)) +- `[babel-jest]` Fix support for namespaced babel version 7 ([#4918](https://github.com/facebook/jest/pull/4918)) +- `[expect]` fix .toThrow for promises ([#4884](https://github.com/facebook/jest/pull/4884)) +- `[jest-docblock]` pragmas should preserve urls ([#4837](https://github.com/facebook/jest/pull/4629)) +- `[jest-cli]` Check if `npm_lifecycle_script` calls Jest directly ([#4629](https://github.com/facebook/jest/pull/4629)) +- `[jest-cli]` Fix --showConfig to show all configs ([#4494](https://github.com/facebook/jest/pull/4494)) +- `[jest-cli]` Throw if `maxWorkers` doesn't have a value ([#4591](https://github.com/facebook/jest/pull/4591)) +- `[jest-cli]` Use `fs.realpathSync.native` if available ([#5031](https://github.com/facebook/jest/pull/5031)) +- `[jest-config]` Fix `--passWithNoTests` ([#4639](https://github.com/facebook/jest/pull/4639)) +- `[jest-config]` Support `rootDir` tag in testEnvironment ([#4579](https://github.com/facebook/jest/pull/4579)) +- `[jest-editor-support]` Fix `--showConfig` to support jest 20 and jest 21 ([#4575](https://github.com/facebook/jest/pull/4575)) +- `[jest-editor-support]` Fix editor support test for node 4 ([#4640](https://github.com/facebook/jest/pull/4640)) +- `[jest-mock]` Support mocking constructor in `mockImplementationOnce` ([#4599](https://github.com/facebook/jest/pull/4599)) +- `[jest-runtime]` Fix manual user mocks not working with custom resolver ([#4489](https://github.com/facebook/jest/pull/4489)) +- `[jest-util]` Fix `runOnlyPendingTimers` for `setTimeout` inside `setImmediate` ([#4608](https://github.com/facebook/jest/pull/4608)) +- `[jest-message-util]` Always remove node internals from stacktraces ([#4695](https://github.com/facebook/jest/pull/4695)) +- `[jest-resolve]` changes method of determining builtin modules to include missing builtins ([#4740](https://github.com/facebook/jest/pull/4740)) +- `[pretty-format]` Prevent error in pretty-format for window in jsdom test env ([#4750](https://github.com/facebook/jest/pull/4750)) +- `[jest-resolve]` Preserve module identity for symlinks ([#4761](https://github.com/facebook/jest/pull/4761)) +- `[jest-config]` Include error message for `preset` json ([#4766](https://github.com/facebook/jest/pull/4766)) +- `[pretty-format]` Throw `PrettyFormatPluginError` if a plugin halts with an exception ([#4787](https://github.com/facebook/jest/pull/4787)) +- `[expect]` Keep the stack trace unchanged when `PrettyFormatPluginError` is thrown by pretty-format ([#4787](https://github.com/facebook/jest/pull/4787)) +- `[jest-environment-jsdom]` Fix asynchronous test will fail due to timeout issue. ([#4669](https://github.com/facebook/jest/pull/4669)) +- `[jest-cli]` Fix `--onlyChanged` path case sensitivity on Windows platform ([#4730](https://github.com/facebook/jest/pull/4730)) +- `[jest-runtime]` Use realpath to match transformers ([#5000](https://github.com/facebook/jest/pull/5000)) +- `[expect]` [**BREAKING**] Replace identity equality with Object.is in toBe matcher ([#4917](https://github.com/facebook/jest/pull/4917)) + +### Features + +- `[jest-message-util]` Add codeframe to test assertion failures ([#5087](https://github.com/facebook/jest/pull/5087)) +- `[jest-config]` Add Global Setup/Teardown options ([#4716](https://github.com/facebook/jest/pull/4716)) +- `[jest-config]` Add `testEnvironmentOptions` to apply to jsdom options or node context. ([#5003](https://github.com/facebook/jest/pull/5003)) +- `[jest-jasmine2]` Update Timeout error message to `jest.timeout` and display current timeout value ([#4990](https://github.com/facebook/jest/pull/4990)) +- `[jest-runner]` Enable experimental detection of leaked contexts ([#4895](https://github.com/facebook/jest/pull/4895)) +- `[jest-cli]` Add combined coverage threshold for directories. ([#4885](https://github.com/facebook/jest/pull/4885)) +- `[jest-mock]` Add `timestamps` to mock state. ([#4866](https://github.com/facebook/jest/pull/4866)) +- `[eslint-plugin-jest]` Add `prefer-to-have-length` lint rule. ([#4771](https://github.com/facebook/jest/pull/4771)) +- `[jest-environment-jsdom]` [**BREAKING**] Upgrade to JSDOM@11 ([#4770](https://github.com/facebook/jest/pull/4770)) +- `[jest-environment-*]` [**BREAKING**] Add Async Test Environment APIs, dispose is now teardown ([#4506](https://github.com/facebook/jest/pull/4506)) +- `[jest-cli]` Add an option to clear the cache ([#4430](https://github.com/facebook/jest/pull/4430)) +- `[babel-plugin-jest-hoist]` Improve error message, that the second argument of `jest.mock` must be an inline function ([#4593](https://github.com/facebook/jest/pull/4593)) +- `[jest-snapshot]` [**BREAKING**] Concatenate name of test and snapshot ([#4460](https://github.com/facebook/jest/pull/4460)) +- `[jest-cli]` [**BREAKING**] Fail if no tests are found ([#3672](https://github.com/facebook/jest/pull/3672)) +- `[jest-diff]` Highlight only last of odd length leading spaces ([#4558](https://github.com/facebook/jest/pull/4558)) +- `[jest-docblock]` Add `docblock.print()` ([#4517](https://github.com/facebook/jest/pull/4517)) +- `[jest-docblock]` Add `strip` ([#4571](https://github.com/facebook/jest/pull/4571)) +- `[jest-docblock]` Preserve leading whitespace in docblock comments ([#4576](https://github.com/facebook/jest/pull/4576)) +- `[jest-docblock]` remove leading newlines from `parswWithComments().comments` ([#4610](https://github.com/facebook/jest/pull/4610)) +- `[jest-editor-support]` Add Snapshots metadata ([#4570](https://github.com/facebook/jest/pull/4570)) +- `[jest-editor-support]` Adds an 'any' to the typedef for `updateFileWithJestStatus` ([#4636](https://github.com/facebook/jest/pull/4636)) +- `[jest-editor-support]` Better monorepo support ([#4572](https://github.com/facebook/jest/pull/4572)) +- `[jest-environment-jsdom]` Add simple rAF polyfill in jsdom environment to work with React 16 ([#4568](https://github.com/facebook/jest/pull/4568)) +- `[jest-environment-node]` Implement node Timer api ([#4622](https://github.com/facebook/jest/pull/4622)) +- `[jest-jasmine2]` Add testPath to reporter callbacks ([#4594](https://github.com/facebook/jest/pull/4594)) +- `[jest-mock]` Added support for naming mocked functions with `.mockName(value)` and `.mockGetName()` ([#4586](https://github.com/facebook/jest/pull/4586)) +- `[jest-runtime]` Add `module.loaded`, and make `module.require` not enumerable ([#4623](https://github.com/facebook/jest/pull/4623)) +- `[jest-runtime]` Add `module.parent` ([#4614](https://github.com/facebook/jest/pull/4614)) +- `[jest-runtime]` Support sourcemaps in transformers ([#3458](https://github.com/facebook/jest/pull/3458)) +- `[jest-snapshot]` [**BREAKING**] Add a serializer for `jest.fn` to allow a snapshot of a jest mock ([#4668](https://github.com/facebook/jest/pull/4668)) +- `[jest-worker]` Initial version of parallel worker abstraction, say hello! ([#4497](https://github.com/facebook/jest/pull/4497)) +- `[jest-jasmine2]` Add `testLocationInResults` flag to add location information per spec to test results ([#4782](https://github.com/facebook/jest/pull/4782)) +- `[jest-environment-jsdom]` Update JSOM to 11.4, which includes built-in support for `requestAnimationFrame` ([#4919](https://github.com/facebook/jest/pull/4919)) +- `[jest-cli]` Hide watch usage output when running on non-interactive environments ([#4958](https://github.com/facebook/jest/pull/4958)) +- `[jest-snapshot]` Promises support for `toThrowErrorMatchingSnapshot` ([#4946](https://github.com/facebook/jest/pull/4946)) +- `[jest-cli]` Explain which snapshots are obsolete ([#5005](https://github.com/facebook/jest/pull/5005)) + +### Chore & Maintenance + +- `[docs]` Add guide of using with puppeteer ([#5093](https://github.com/facebook/jest/pull/5093)) +- `[jest-util]` `jest-util` should not depend on `jest-mock` ([#4992](https://github.com/facebook/jest/pull/4992)) +- `[*]` [**BREAKING**] Drop support for Node.js version 4 ([#4769](https://github.com/facebook/jest/pull/4769)) +- `[docs]` Wrap code comments at 80 characters ([#4781](https://github.com/facebook/jest/pull/4781)) +- `[eslint-plugin-jest]` Removed from the Jest core repo, and moved to ([#4867](https://github.com/facebook/jest/pull/4867)) +- `[babel-jest]` Explicitly bump istanbul to newer versions ([#4616](https://github.com/facebook/jest/pull/4616)) +- `[expect]` Upgrade mocha and rollup for browser testing ([#4642](https://github.com/facebook/jest/pull/4642)) +- `[docs]` Add info about `coveragePathIgnorePatterns` ([#4602](https://github.com/facebook/jest/pull/4602)) +- `[docs]` Add Vuejs series of testing with Jest ([#4648](https://github.com/facebook/jest/pull/4648)) +- `[docs]` Mention about optional `done` argument in test function ([#4556](https://github.com/facebook/jest/pull/4556)) +- `[jest-cli]` Bump node-notifier version ([#4609](https://github.com/facebook/jest/pull/4609)) +- `[jest-diff]` Simplify highlight for leading and trailing spaces ([#4553](https://github.com/facebook/jest/pull/4553)) +- `[jest-get-type]` Add support for date ([#4621](https://github.com/facebook/jest/pull/4621)) +- `[jest-matcher-utils]` Call `chalk.inverse` for trailing spaces ([#4578](https://github.com/facebook/jest/pull/4578)) +- `[jest-runtime]` Add `.advanceTimersByTime`; keep `.runTimersToTime()` as an alias. +- `[docs]` Include missing dependency in TestEnvironment sample code +- `[docs]` Add clarification for hook execution order +- `[docs]` Update `expect.anything()` sample code ([#5007](https://github.com/facebook/jest/pull/5007)) + +## jest 21.2.1 + +- Fix watchAll not running tests on save ([#4550](https://github.com/facebook/jest/pull/4550)) +- Add missing escape sequences to ConvertAnsi plugin ([#4544](https://github.com/facebook/jest/pull/4544)) + +## jest 21.2.0 + +- 🃏 Change license from BSD+Patents to MIT. +- Allow eslint-plugin to recognize more disabled tests ([#4533](https://github.com/facebook/jest/pull/4533)) +- Add babel-plugin for object spread syntax to babel-preset-jest ([#4519](https://github.com/facebook/jest/pull/4519)) +- Display outer element and trailing newline consistently in jest-diff ([#4520](https://github.com/facebook/jest/pull/4520)) +- Do not modify stack trace of JestAssertionError ([#4516](https://github.com/facebook/jest/pull/4516)) +- Print errors after test structure in verbose mode ([#4504](https://github.com/facebook/jest/pull/4504)) +- Fix `--silent --verbose` problem ([#4505](https://github.com/facebook/jest/pull/4505)) +- Fix: Reset local state of assertions when using hasAssertions ([#4498](https://github.com/facebook/jest/pull/4498)) +- jest-resolve: Prevent default resolver failure when potential resolution directory does not exist ([#4483](https://github.com/facebook/jest/pull/4483)) + +## jest 21.1.0 + +- (minor) Use ES module exports ([#4454](https://github.com/facebook/jest/pull/4454)) +- Allow chaining mockClear and mockReset ([#4475](https://github.com/facebook/jest/pull/4475)) +- Call jest-diff and pretty-format more precisely in toHaveProperty matcher ([#4445](https://github.com/facebook/jest/pull/4445)) +- Expose restoreAllMocks to object ([#4463](https://github.com/facebook/jest/pull/4463)) +- Fix function name cleaning when making mock fn ([#4464](https://github.com/facebook/jest/pull/4464)) +- Fix Map/Set equality checker ([#4404](https://github.com/facebook/jest/pull/4404)) +- Make FUNCTION_NAME_RESERVED_PATTERN stateless ([#4466](https://github.com/facebook/jest/pull/4466)) + +## jest 21.0.2 + +- Take precedence of NODE_PATH when resolving node_modules directories ([#4453](https://github.com/facebook/jest/pull/4453)) +- Fix race condition with --coverage and babel-jest identical file contents edge case ([#4432](https://github.com/facebook/jest/pull/4432)) +- Add extra parameter `--runTestsByPath`. ([#4411](https://github.com/facebook/jest/pull/4411)) +- Upgrade all outdated deps ([#4425](https://github.com/facebook/jest/pull/4425)) + +## jest 21.0.1 + +- Remove obsolete error ([#4417](https://github.com/facebook/jest/pull/4417)) + +## jest 21.0.0 + +- Add --changedFilesWithAncestor ([#4070](https://github.com/facebook/jest/pull/4070)) +- Add --findRelatedFiles ([#4131](https://github.com/facebook/jest/pull/4131)) +- Add --onlyChanged tests ([#3977](https://github.com/facebook/jest/pull/3977)) +- Add `contextLines` option to jest-diff ([#4152](https://github.com/facebook/jest/pull/4152)) +- Add alternative serialize API for pretty-format plugins ([#4114](https://github.com/facebook/jest/pull/4114)) +- Add displayName to MPR ([#4327](https://github.com/facebook/jest/pull/4327)) +- Add displayName to TestResult ([#4408](https://github.com/facebook/jest/pull/4408)) +- Add es5 build of pretty-format ([#4075](https://github.com/facebook/jest/pull/4075)) +- Add extra info to no tests for changed files message ([#4188](https://github.com/facebook/jest/pull/4188)) +- Add fake chalk in browser builds in order to support IE10 ([#4367](https://github.com/facebook/jest/pull/4367)) +- Add jest.requireActual ([#4260](https://github.com/facebook/jest/pull/4260)) +- Add maxWorkers to globalConfig ([#4005](https://github.com/facebook/jest/pull/4005)) +- Add skipped tests support for jest-editor-support ([#4346](https://github.com/facebook/jest/pull/4346)) +- Add source map support for better debugging experience ([#3738](https://github.com/facebook/jest/pull/3738)) +- Add support for Error objects in toMatchObject ([#4339](https://github.com/facebook/jest/pull/4339)) +- Add support for Immutable.Record in pretty-format ([#3678](https://github.com/facebook/jest/pull/3678)) +- Add tests for extract_requires on export types ([#4080](https://github.com/facebook/jest/pull/4080)) +- Add that toMatchObject can match arrays ([#3994](https://github.com/facebook/jest/pull/3994)) +- Add watchPathIgnorePatterns to exclude paths to trigger test re-run in watch mode ([#4331](https://github.com/facebook/jest/pull/4331)) +- Adding ancestorTitles property to JSON test output ([#4293](https://github.com/facebook/jest/pull/4293)) +- Allow custom resolver to be used with[out] moduleNameMapper ([#4174](https://github.com/facebook/jest/pull/4174)) +- Avoid parsing `.require(…)` method calls ([#3777](https://github.com/facebook/jest/pull/3777)) +- Avoid unnecessary function declarations and call in pretty-format ([#3962](https://github.com/facebook/jest/pull/3962)) +- Avoid writing to stdout in default reporter if --json is enabled. Fixes #3941 ([#3945](https://github.com/facebook/jest/pull/3945)) +- Better error handling for --config ([#4230](https://github.com/facebook/jest/pull/4230)) +- Call consistent pretty-format plugins within Jest ([#3800](https://github.com/facebook/jest/pull/3800)) +- Change babel-core to peerDependency for compatibility with Babel 7 ([#4162](https://github.com/facebook/jest/pull/4162)) +- Change Promise detection code in jest-circus to support non-global Promise implementations ([#4375](https://github.com/facebook/jest/pull/4375)) +- Changed files eager loading ([#3979](https://github.com/facebook/jest/pull/3979)) +- Check whether we should output to stdout or stderr ([#3953](https://github.com/facebook/jest/pull/3953)) +- Clarify what objects toContain and toContainEqual can be used on ([#4307](https://github.com/facebook/jest/pull/4307)) +- Clean up resolve() logic. Provide useful names for variables and functions. Test that a directory exists before attempting to resolve files within it. ([#4325](https://github.com/facebook/jest/pull/4325)) +- cleanupStackTrace ([#3696](https://github.com/facebook/jest/pull/3696)) +- compare objects with Symbol keys ([#3437](https://github.com/facebook/jest/pull/3437)) +- Complain if expect is passed multiple arguments ([#4237](https://github.com/facebook/jest/pull/4237)) +- Completes nodeCrawl with empty roots ([#3776](https://github.com/facebook/jest/pull/3776)) +- Consistent naming of files ([#3798](https://github.com/facebook/jest/pull/3798)) +- Convert code base to ESM import ([#3778](https://github.com/facebook/jest/pull/3778)) +- Correct summary message for flag --findRelatedTests. ([#4309](https://github.com/facebook/jest/pull/4309)) +- Coverage thresholds can be set up for individual files ([#4185](https://github.com/facebook/jest/pull/4185)) +- custom reporter error handling ([#4051](https://github.com/facebook/jest/pull/4051)) +- Define separate type for pretty-format plugin Options ([#3802](https://github.com/facebook/jest/pull/3802)) +- Delete confusing async keyword ([#3679](https://github.com/facebook/jest/pull/3679)) +- Delete redundant branch in ReactElement and HTMLElement plugins ([#3731](https://github.com/facebook/jest/pull/3731)) +- Don't format node assert errors when there's no 'assert' module ([#4376](https://github.com/facebook/jest/pull/4376)) +- Don't print test summary in --silent ([#4106](https://github.com/facebook/jest/pull/4106)) +- Don't try to build ghost packages ([#3934](https://github.com/facebook/jest/pull/3934)) +- Escape double quotes in attribute values in HTMLElement plugin ([#3797](https://github.com/facebook/jest/pull/3797)) +- Explain how to clear the cache ([#4232](https://github.com/facebook/jest/pull/4232)) +- Factor out common code for collections in pretty-format ([#4184](https://github.com/facebook/jest/pull/4184)) +- Factor out common code for markup in React plugins ([#4171](https://github.com/facebook/jest/pull/4171)) +- Feature/internal resolve ([#4315](https://github.com/facebook/jest/pull/4315)) +- Fix --logHeapUsage ([#4176](https://github.com/facebook/jest/pull/4176)) +- Fix --showConfig to show all project configs ([#4078](https://github.com/facebook/jest/pull/4078)) +- Fix --watchAll ([#4254](https://github.com/facebook/jest/pull/4254)) +- Fix bug when setTimeout is mocked ([#3769](https://github.com/facebook/jest/pull/3769)) +- Fix changedFilesWithAncestor ([#4193](https://github.com/facebook/jest/pull/4193)) +- Fix colors for expected/stored snapshot message ([#3702](https://github.com/facebook/jest/pull/3702)) +- Fix concurrent test failure ([#4159](https://github.com/facebook/jest/pull/4159)) +- Fix for 4286: Compare Maps and Sets by value rather than order ([#4303](https://github.com/facebook/jest/pull/4303)) +- fix forceExit ([#4105](https://github.com/facebook/jest/pull/4105)) +- Fix grammar in React Native docs ([#3838](https://github.com/facebook/jest/pull/3838)) +- Fix inconsistent name of complex values in pretty-format ([#4001](https://github.com/facebook/jest/pull/4001)) +- Fix issue mocking bound method ([#3805](https://github.com/facebook/jest/pull/3805)) +- Fix jest-circus ([#4290](https://github.com/facebook/jest/pull/4290)) +- Fix lint warning in main + + ([#4132](https://github.com/facebook/jest/pull/4132)) + +- Fix linting ([#3946](https://github.com/facebook/jest/pull/3946)) +- fix merge conflict ([#4144](https://github.com/facebook/jest/pull/4144)) +- Fix minor typo ([#3729](https://github.com/facebook/jest/pull/3729)) +- fix missing console.log messages ([#3895](https://github.com/facebook/jest/pull/3895)) +- fix mock return value ([#3933](https://github.com/facebook/jest/pull/3933)) +- Fix mocking for modules with folders on windows ([#4238](https://github.com/facebook/jest/pull/4238)) +- Fix NODE_PATH resolving for relative paths ([#3616](https://github.com/facebook/jest/pull/3616)) +- Fix options.moduleNameMapper override order with preset ([#3565](https://github.com/facebook/jest/pull/3565) ([#3689](https://github.com/facebook/jest/pull/3689)) +- Fix React PropTypes warning in tests for Immutable plugin ([#4412](https://github.com/facebook/jest/pull/4412)) +- Fix regression in mockReturnValueOnce ([#3857](https://github.com/facebook/jest/pull/3857)) +- Fix sample code of mock class constructors ([#4115](https://github.com/facebook/jest/pull/4115)) +- Fix setup-test-framework-test ([#3773](https://github.com/facebook/jest/pull/3773)) +- fix typescript jest test crash ([#4363](https://github.com/facebook/jest/pull/4363)) +- Fix watch mode ([#4084](https://github.com/facebook/jest/pull/4084)) +- Fix Watchman on windows ([#4018](https://github.com/facebook/jest/pull/4018)) +- Fix(babel): Handle ignored files in babel v7 ([#4393](https://github.com/facebook/jest/pull/4393)) +- Fix(babel): Support upcoming beta ([#4403](https://github.com/facebook/jest/pull/4403)) +- Fixed object matcher ([#3799](https://github.com/facebook/jest/pull/3799)) +- Fixes #3820 use extractExpectedAssertionsErrors in jasmine setup +- Flow upgrade ([#4355](https://github.com/facebook/jest/pull/4355)) +- Force message in matchers to always be a function ([#3972](https://github.com/facebook/jest/pull/3972)) +- Format `describe` and use `test` instead of `it` alias ([#3792](https://github.com/facebook/jest/pull/3792)) +- global_config.js for multi-project runner ([#4023](https://github.com/facebook/jest/pull/4023)) +- Handle async errors ([#4016](https://github.com/facebook/jest/pull/4016)) +- Hard-fail if hasteImpl is throwing an error during initialization. ([#3812](https://github.com/facebook/jest/pull/3812)) +- Ignore import type for extract_requires ([#4079](https://github.com/facebook/jest/pull/4079)) +- Ignore indentation of data structures in jest-diff ([#3429](https://github.com/facebook/jest/pull/3429)) +- Implement 'jest.requireMock' ([#4292](https://github.com/facebook/jest/pull/4292)) +- Improve Jest phabricator plugin ([#4195](https://github.com/facebook/jest/pull/4195)) +- Improve Seq and remove newline from non-min empty in Immutable plugin ([#4241](https://github.com/facebook/jest/pull/4241)) +- Improved the jest reporter with snapshot info per test. ([#3660](https://github.com/facebook/jest/pull/3660)) +- Include fullName in formattedAssertion ([#4273](https://github.com/facebook/jest/pull/4273)) +- Integrated with Yarn workspaces ([#3906](https://github.com/facebook/jest/pull/3906)) +- jest --all ([#4020](https://github.com/facebook/jest/pull/4020)) +- jest-circus test failures ([#3770](https://github.com/facebook/jest/pull/3770)) +- jest-circus Timeouts ([#3760](https://github.com/facebook/jest/pull/3760)) +- jest-haste-map: add test case for broken handling of ignore pattern ([#4047](https://github.com/facebook/jest/pull/4047)) +- jest-haste-map: add test+fix for broken platform module support ([#3885](https://github.com/facebook/jest/pull/3885)) +- jest-haste-map: deprecate functional ignorePattern and use it in cache key ([#4063](https://github.com/facebook/jest/pull/4063)) +- jest-haste-map: mock 'fs' with more idiomatic jest.mock() ([#4046](https://github.com/facebook/jest/pull/4046)) +- jest-haste-map: only file IO errors should be silently ignored ([#3816](https://github.com/facebook/jest/pull/3816)) +- jest-haste-map: throw when trying to get a duplicated module ([#3976](https://github.com/facebook/jest/pull/3976)) +- jest-haste-map: watchman crawler: normalize paths ([#3887](https://github.com/facebook/jest/pull/3887)) +- jest-runtime: atomic cache write, and check validity of data ([#4088](https://github.com/facebook/jest/pull/4088)) +- Join lines with newline in jest-diff ([#4314](https://github.com/facebook/jest/pull/4314)) +- Keep ARGV only in CLI files ([#4012](https://github.com/facebook/jest/pull/4012)) +- let transformers adjust cache key based on mapCoverage ([#4187](https://github.com/facebook/jest/pull/4187)) +- Lift requires ([#3780](https://github.com/facebook/jest/pull/3780)) +- Log stack when reporting errors in jest-runtime ([#3833](https://github.com/facebook/jest/pull/3833)) +- Make --listTests return a new line separated list when not using --json ([#4229](https://github.com/facebook/jest/pull/4229)) +- Make build script printing small-terminals-friendly ([#3892](https://github.com/facebook/jest/pull/3892)) +- Make error messages more explicit for toBeCalledWith assertions ([#3913](https://github.com/facebook/jest/pull/3913)) +- Make jest-matcher-utils use ESM exports ([#4342](https://github.com/facebook/jest/pull/4342)) +- Make jest-runner a standalone package. ([#4236](https://github.com/facebook/jest/pull/4236)) +- Make Jest’s Test Runner configurable. ([#4240](https://github.com/facebook/jest/pull/4240)) +- Make listTests always print to console.log ([#4391](https://github.com/facebook/jest/pull/4391)) +- Make providesModuleNodeModules ignore nested node_modules directories +- Make sure function mocks match original arity ([#4170](https://github.com/facebook/jest/pull/4170)) +- Make sure runAllTimers also clears all ticks ([#3915](https://github.com/facebook/jest/pull/3915)) +- Make toBe matcher error message more helpful for objects and arrays ([#4277](https://github.com/facebook/jest/pull/4277)) +- Make useRealTimers play well with timers: fake ([#3858](https://github.com/facebook/jest/pull/3858)) +- Move getType from jest-matcher-utils to separate package ([#3559](https://github.com/facebook/jest/pull/3559)) +- Multiroot jest-change-files ([#3969](https://github.com/facebook/jest/pull/3969)) +- Output created snapshot when using --ci option ([#3693](https://github.com/facebook/jest/pull/3693)) +- Point out you can use matchers in .toMatchObject ([#3796](https://github.com/facebook/jest/pull/3796)) +- Prevent babelrc package import failure on relative current path ([#3723](https://github.com/facebook/jest/pull/3723)) +- Print RDP details for windows builds ([#4017](https://github.com/facebook/jest/pull/4017)) +- Provide better error checking for transformed content ([#3807](https://github.com/facebook/jest/pull/3807)) +- Provide printText and printComment in markup.js for HTMLElement plugin ([#4344](https://github.com/facebook/jest/pull/4344)) +- Provide regex visualization for testRegex ([#3758](https://github.com/facebook/jest/pull/3758)) +- Refactor CLI ([#3862](https://github.com/facebook/jest/pull/3862)) +- Refactor names and delimiters of complex values in pretty-format ([#3986](https://github.com/facebook/jest/pull/3986)) +- Replace concat(Immutable) with Immutable as item of plugins array ([#4207](https://github.com/facebook/jest/pull/4207)) +- Replace Jasmine with jest-circus ([#3668](https://github.com/facebook/jest/pull/3668)) +- Replace match with test and omit redundant String conversion ([#4311](https://github.com/facebook/jest/pull/4311)) +- Replace print with serialize in AsymmetricMatcher plugin ([#4173](https://github.com/facebook/jest/pull/4173)) +- Replace print with serialize in ConvertAnsi plugin ([#4225](https://github.com/facebook/jest/pull/4225)) +- Replace print with serialize in HTMLElement plugin ([#4215](https://github.com/facebook/jest/pull/4215)) +- Replace print with serialize in Immutable plugins ([#4189](https://github.com/facebook/jest/pull/4189)) +- Replace unchanging args with one config arg within pretty-format ([#4076](https://github.com/facebook/jest/pull/4076)) +- Return UNDEFINED for undefined type in ReactElement plugin ([#4360](https://github.com/facebook/jest/pull/4360)) +- Rewrite some read bumps in pretty-format ([#4093](https://github.com/facebook/jest/pull/4093)) +- Run update method before installing JRE on Circle ([#4318](https://github.com/facebook/jest/pull/4318)) +- Separated the snapshot summary creation from the printing to improve testability. ([#4373](https://github.com/facebook/jest/pull/4373)) +- Set coverageDirectory during normalize phase ([#3966](https://github.com/facebook/jest/pull/3966)) +- Setup custom reporters after default reporters ([#4053](https://github.com/facebook/jest/pull/4053)) +- Setup for Circle 2 ([#4149](https://github.com/facebook/jest/pull/4149)) +- Simplify readme ([#3790](https://github.com/facebook/jest/pull/3790)) +- Simplify snapshots definition ([#3791](https://github.com/facebook/jest/pull/3791)) +- skipNodeResolution config option ([#3987](https://github.com/facebook/jest/pull/3987)) +- Small fixes to toHaveProperty docs ([#3878](https://github.com/facebook/jest/pull/3878)) +- Sort attributes by name in HTMLElement plugin ([#3783](https://github.com/facebook/jest/pull/3783)) +- Specify watchPathIgnorePatterns will only be available in Jest 21+ ([#4398](https://github.com/facebook/jest/pull/4398)) +- Split TestRunner off of TestScheduler ([#4233](https://github.com/facebook/jest/pull/4233)) +- Strict and explicit config resolution logic ([#4122](https://github.com/facebook/jest/pull/4122)) +- Support maxDepth option in React plugins ([#4208](https://github.com/facebook/jest/pull/4208)) +- Support SVG elements in HTMLElement plugin ([#4335](https://github.com/facebook/jest/pull/4335)) +- Test empty Immutable collections with {min: false} option ([#4121](https://github.com/facebook/jest/pull/4121)) +- test to debug travis failure in main ([#4145](https://github.com/facebook/jest/pull/4145)) +- testPathPattern message test ([#4006](https://github.com/facebook/jest/pull/4006)) +- Throw Error When Using Nested It Specs ([#4039](https://github.com/facebook/jest/pull/4039)) +- Throw when moduleNameMapper points to inexistent module ([#3567](https://github.com/facebook/jest/pull/3567)) +- Unified 'no tests found' message for non-verbose MPR ([#4354](https://github.com/facebook/jest/pull/4354)) +- Update migration guide with jest-codemods transformers ([#4306](https://github.com/facebook/jest/pull/4306)) +- Use "inputSourceMap" for coverage re-mapping. ([#4009](https://github.com/facebook/jest/pull/4009)) +- Use "verbose" no test found message when there is only one project ([#4378](https://github.com/facebook/jest/pull/4378)) +- Use babel transform to inline all requires ([#4340](https://github.com/facebook/jest/pull/4340)) +- Use eslint plugins to run prettier ([#3971](https://github.com/facebook/jest/pull/3971)) +- Use iterableEquality in spy matchers ([#3651](https://github.com/facebook/jest/pull/3651)) +- Use modern HTML5 ([#3937](https://github.com/facebook/jest/pull/3937)) +- Wrap `Error.captureStackTrace` in a try ([#4035](https://github.com/facebook/jest/pull/4035)) + +## jest 20.0.4 + +- Fix jest-haste-map's handling of duplicate module IDs. ([#3647](https://github.com/facebook/jest/pull/3647)) +- Fix behavior of `enableAutomock()` when automock is set to false. ([#3624](https://github.com/facebook/jest/pull/3624)) +- Fix progress bar in windows. ([#3626](https://github.com/facebook/jest/pull/3626)) + +## jest 20.0.3 + +- Fix reporters 'default' setting. ([#3562](https://github.com/facebook/jest/pull/3562)) +- Fix to make Jest fail when the coverage threshold not met. ([#3554](https://github.com/facebook/jest/pull/3554)) + +## jest 20.0.1 + +- Add ansi-regex to pretty-format dependencies ([#3498](https://github.com/facebook/jest/pull/3498)) +- Fix replacement in testMatch and moduleDirectories ([#3538](https://github.com/facebook/jest/pull/3538)) +- Fix expect.hasAssertions() to throw when passed arguments ([#3526](https://github.com/facebook/jest/pull/3526)) +- Fix stack traces without proper error messages ([#3513](https://github.com/facebook/jest/pull/3513)) +- Fix support for custom extensions through haste packages ([#3537](https://github.com/facebook/jest/pull/3537)) +- Fix test contexts between test functions ([#3506](https://github.com/facebook/jest/pull/3506)) + +## jest 20.0.0 + +- New `--projects` option to run one instance of Jest in multiple projects at the same time. ([#3400](https://github.com/facebook/jest/pull/3400)) +- New multi project runner ([#3156](https://github.com/facebook/jest/pull/3156)) +- New --listTests flag. ([#3441](https://github.com/facebook/jest/pull/3441)) +- New --showConfig flag. ([#3296](https://github.com/facebook/jest/pull/3296)) +- New promise support for all `expect` matchers through `.resolves` and `.rejects`. ([#3068](https://github.com/facebook/jest/pull/3068)) +- New `expect.hasAssertions()` function similar to `expect.assertions()`. ([#3379](https://github.com/facebook/jest/pull/3379)) +- New `this.equals` function exposed to custom matchers. ([#3469](https://github.com/facebook/jest/pull/3469)) +- New `valid-expect` lint rule in `eslint-plugin-jest`. ([#3067](https://github.com/facebook/jest/pull/3067)) +- New HtmlElement pretty-format plugin. ([#3230](https://github.com/facebook/jest/pull/3230)) +- New Immutable pretty-format plugins. ([#2899](https://github.com/facebook/jest/pull/2899)) +- New test environment per file setting through `@jest-environment` in the docblock. ([#2859](https://github.com/facebook/jest/pull/2859)) +- New feature that allows every configuration option to be set from the command line. ([#3424](https://github.com/facebook/jest/pull/3424)) +- New feature to add custom reporters to Jest through `reporters` in the configuration. ([#3349](https://github.com/facebook/jest/pull/3349)) +- New feature to add expected and actual values to AssertionError. ([#3217](https://github.com/facebook/jest/pull/3217)) +- New feature to map code coverage from transformers. ([#2290](https://github.com/facebook/jest/pull/2290)) +- New feature to run untested code coverage in parallel. ([#3407](https://github.com/facebook/jest/pull/3407)) +- New option to define a custom resolver. ([#2998](https://github.com/facebook/jest/pull/2998)) +- New printing support for text and comment nodes in html pretty-format. ([#3355](https://github.com/facebook/jest/pull/3355)) +- New snapshot testing FAQ ([#3425](https://github.com/facebook/jest/pull/3425)) +- New support for custom platforms on jest-haste-map. ([#3162](https://github.com/facebook/jest/pull/3162)) +- New support for mocking native async methods. ([#3209](https://github.com/facebook/jest/pull/3209)) +- New guide on how to use Jest with any JavaScript framework. ([#3243](https://github.com/facebook/jest/pull/3243)) +- New translation system for the Jest website. +- New collapsing watch mode usage prompt after first run. ([#3078](https://github.com/facebook/jest/pull/3078)) +- Breaking Change: Forked Jasmine 2.5 into Jest's own test runner and rewrote large parts of Jasmine. ([#3147](https://github.com/facebook/jest/pull/3147)) +- Breaking Change: Jest does not write new snapshots by default on CI. ([#3456](https://github.com/facebook/jest/pull/3456)) +- Breaking Change: Moved the typescript parser from `jest-editor-support` into a separate `jest-test-typescript-parser` package. ([#2973](https://github.com/facebook/jest/pull/2973)) +- Breaking Change: Replaced auto-loading of babel-polyfill with only regenerator-runtime, fixes a major memory leak. ([#2755](https://github.com/facebook/jest/pull/2755)) +- Fixed `babel-jest` to look up the `babel` field in `package.json` as a fallback. +- Fixed `jest-editor-support`'s parser to not crash on incomplete ASTs. ([#3259](https://github.com/facebook/jest/pull/3259)) +- Fixed `jest-resolve` to use `is-builtin-module` instead of `resolve.isCore`. ([#2997](https://github.com/facebook/jest/pull/2997)) +- Fixed `jest-snapshot` to normalize line endings in the `serialize` function. ([#3002](https://github.com/facebook/jest/pull/3002)) +- Fixed behavior of `--silent` flag. ([#3003](https://github.com/facebook/jest/pull/3003)) +- Fixed bug with watchers on macOS causing test to crash. ([#2957](https://github.com/facebook/jest/pull/2957)) +- Fixed CLI `notify` option not taking precedence over config option. ([#3340](https://github.com/facebook/jest/pull/3340)) +- Fixed detection of the npm client in SummaryReporter to support Yarn. ([#3263](https://github.com/facebook/jest/pull/3263)) +- Fixed done.fail not passing arguments ([#3241](https://github.com/facebook/jest/pull/3241)) +- Fixed fake timers to restore after resetting mocks. ([#2467](https://github.com/facebook/jest/pull/2467)) +- Fixed handling of babylon's parser options in `jest-editor-support`. ([#3344](https://github.com/facebook/jest/pull/3344)) +- Fixed Jest to properly cache transform results. ([#3334](https://github.com/facebook/jest/pull/3334)) +- Fixed Jest to use human-readable colors for Jest's own snapshots. ([#3119](https://github.com/facebook/jest/pull/3119)) +- Fixed jest-config to use UID for default cache folder. ([#3380](https://github.com/facebook/jest/pull/3380)), ([#3387](https://github.com/facebook/jest/pull/3387)) +- Fixed jest-runtime to expose inner error when it fails to write to the cache. ([#3373](https://github.com/facebook/jest/pull/3373)) +- Fixed lifecycle hooks to make afterAll hooks operate the same as afterEach. ([#3275](https://github.com/facebook/jest/pull/3275)) +- Fixed pretty-format to run plugins before serializing nested basic values. ([#3017](https://github.com/facebook/jest/pull/3017)) +- Fixed return value of mocks so they can explicitly be set to return `undefined`. ([#3354](https://github.com/facebook/jest/pull/3354)) +- Fixed runner to run tests associated with snapshots when the snapshot changes. ([#3025](https://github.com/facebook/jest/pull/3025)) +- Fixed snapshot serializer require, restructured pretty-format. ([#3399](https://github.com/facebook/jest/pull/3399)) +- Fixed support for Babel 7 in babel-jest. ([#3271](https://github.com/facebook/jest/pull/3271)) +- Fixed testMatch to find tests in .folders. ([#3006](https://github.com/facebook/jest/pull/3006)) +- Fixed testNamePattern and testPathPattern to work better together. ([#3327](https://github.com/facebook/jest/pull/3327)) +- Fixed to show reject reason when expecting resolve. ([#3134](https://github.com/facebook/jest/pull/3134)) +- Fixed toHaveProperty() to use hasOwnProperty from Object ([#3410](https://github.com/facebook/jest/pull/3410)) +- Fixed watch mode's screen clearing. ([#2959](https://github.com/facebook/jest/pull/2959)) ([#3294](https://github.com/facebook/jest/pull/3294)) +- Improved and consolidated Jest's configuration file resolution. ([#3472](https://github.com/facebook/jest/pull/3472)) +- Improved documentation throughout the Jest website. +- Improved documentation to explicitly mention that snapshots must be reviewed. ([#3203](https://github.com/facebook/jest/pull/3203)) +- Improved documentation to make it clear CRA users don't need to add dependencies. ([#3312](https://github.com/facebook/jest/pull/3312)) +- Improved eslint-plugin-jest's handling of `expect`. ([#3306](https://github.com/facebook/jest/pull/3306)) +- Improved flow-coverage, eslint rules and test coverage within the Jest repository. +- Improved printing of `expect.assertions` error. ([#3033](https://github.com/facebook/jest/pull/3033)) +- Improved Windows test coverage of Jest. +- Refactored configs & transform ([#3376](https://github.com/facebook/jest/pull/3376)) +- Refactored reporters to pass individual Tests to reporters. ([#3289](https://github.com/facebook/jest/pull/3289)) +- Refactored TestRunner ([#3166](https://github.com/facebook/jest/pull/3166)) +- Refactored watch mode prompts. ([#3290](https://github.com/facebook/jest/pull/3290)) +- Deleted `jest-file-exists`. ([#3105](https://github.com/facebook/jest/pull/3105)) +- Removed `Config` type. ([#3366](https://github.com/facebook/jest/pull/3366)) +- Removed all usage of `jest-file-exists`. ([#3101](https://github.com/facebook/jest/pull/3101)) +- Adopted prettier on the Jest codebase. + +## jest 19.0.1 + +- Fix infinite loop when using `--watch` with `--coverage`. +- Fixed `watchman` config option. +- Fixed a bug in the jest-editor-support static analysis. +- Fixed eslint plugin warning. +- Fixed missing space in front of "Did you mean …?". +- Fixed path printing in the reporter on Windows. + +## jest 19.0.0 + +- Breaking Change: Added a version for snapshots. +- Breaking Change: Removed the `mocksPattern` configuration option, it never worked correctly. +- Breaking Change: Renamed `testPathDirs` to `roots` to avoid confusion when configuring Jest. +- Breaking Change: Updated printing of React elements to cause fewer changes when props change. +- Breaking Change: Updated snapshot format to properly escape data. +- Fixed --color to be recognized correctly again. +- Fixed `babel-plugin-jest-hoist` to work properly with type annotations in tests. +- Fixed behavior for console.log calls and fixed a memory leak (#2539). +- Fixed cache directory path for Jest to avoid ENAMETOOLONG errors. +- Fixed change events to be emitted in jest-haste-map's watch mode. This fixes issues with Jest's new watch mode and react-native-packager. +- Fixed cli arguments to be used when loading the config from file, they were previously ignored. +- Fixed Jest to load json files that include a BOM. +- Fixed Jest to throw errors instead of ignoring invalid cli options. +- Fixed mocking behavior for virtual modules. +- Fixed mocking behavior with transitive dependencies. +- Fixed support for asymmetric matchers in `toMatchObject`. +- Fixed test interruption and `--bail` behavior. +- Fixed watch mode to clean up worker processes when a test run gets interrupted. +- Fixed whitespace to be highlighted in snapshots and assertion errors. +- Improved `babel-jest` plugin: babel is loaded lazily, istanbul comments are only added when coverage is used. +- Improved error for invalid transform config. +- Improved moduleNameMapper to not overwrite mocks when many patterns map to the same file. +- Improved printing of skipped tests in verbose mode. +- Improved resolution code in jest-resolve. +- Improved to only show patch marks in assertion errors when the comparison results in large objects. +- New `--collectCoverageFrom` cli argument. +- New `--coverageDirectory` cli argument. +- New `expect.addSnapshotSerializer` to add custom snapshot serializers for tests. +- New `jest.spyOn`. +- New `testMatch` configuration option that accepts glob patterns. +- New eslint-plugin-jest with no-disabled-tests, no-focuses-tests and no-identical-title rules and default configuration and globals. +- New expect.stringContaining asymmetric matcher. +- New feature to make manual mocks with nested folders work. For example `__mocks__/react-native/Library/Text.js` will now work as expected. +- New feature to re-run tests through the notification when using `--notify`. +- New jest-phabricator package to integrate Jest code coverage in phabriactor. +- New jest-validate package to improve configuration errors, help with suggestions of correct configuration and to be adopted in other libraries. +- New pretty-printing for asymmetric matchers. +- New RSS feed for Jest's blog. +- New way to provide a reducer to extract haste module ids. +- New website, new documentation, new color scheme and new homepage. +- Rewritten watch mode for instant feedback, better code quality and to build new features on top of it (#2362). + +## jest 18.1.0 + +- Fixed console.log and fake timer behavior in node 7.3. +- Updated istanbul-api. +- Updated jest-diff equality error message. +- Disabled arrow keys when entering a pattern in watch mode to prevent broken behavior. Will be improved in a future release. +- Moved asymmetric matchers and equality functionality from Jasmine into jest-matchers. +- Removed jasmine and jest-snapshot dependency from jest-matchers. +- Removed unused global `context` variable. +- Show a better error message if the config is invalid JSON. +- Highlight trailing whitespace in assertion diffs and snapshots. +- Jest now uses micromatch instead of minimatch. +- Added `-h` as alias for `--help`. + +## jest 18.0.0 + +See + +- The testResultsProcessor function is now required to return the modified results. +- Removed `pit` and `mockImpl`. Use `it` or `mockImplementation` instead. +- Fixed re-running tests when `--bail` is used together with `--watch`. +- `pretty-format` is now merged into Jest. +- `require('v8')` now works properly in a test context. +- Jest now clears the entire scrollback in watch mode. +- Added `expect.any`, `expect.anything`, `expect.objectContaining`, `expect.arrayContaining`, `expect.stringMatching`. +- Properly resolve `snapshotSerializers`, `setupFiles`, `transform`, `testRunner` and `testResultsProcessor` instead of using `path.resolve`. +- `--testResultsProcessor` is now exposed through the cli. +- Renamed `--jsonOutputFile` to `--outputFile`. +- Added `jest-editor-support` for vscode and Nuclide integration. +- Fixed `test.concurrent` unhandled promise rejections. +- The Jest website is now auto-deployed when merging into main. +- Updated `testRegex` to include `test.js` and `spec.js` files. +- Fixes for `babel-plugin-jest-hoist` when using `jest.mock` with three arguments. +- The `JSON` global in `jest-environment-node` now comes from the vm context instead of the parent context. +- Jest does not print stack traces from babel any longer. +- Fake timers are reset when `FakeTimers.useTimers()` is called. +- Usage of Jest in watch mode can be hidden through `JEST_HIDE_USAGE`. +- Added `expect.assertions(number)` which will ensure that a specified amount of assertions is made in one test. +- Added `.toMatchSnapshot(?string)` feature to give snapshots a name. +- Escape regex in snapshots. +- `jest-react-native` was deprecated and now forwards `react-native`. +- Added `.toMatchObject` matcher. +- Further improve printing of large objects. +- Fixed `NaN% Failed` in the OS notification when using `--notify`. +- The first test run without cached timings will now use separate processes instead of running in band. +- Added `.toHaveProperty` matcher. +- Fixed `Map`/`Set` comparisons. +- `test.concurrent` now works with `--testNamePattern`. + +## jest 17.0.3 + +- Improved file-watching feature in jest-haste-map. +- Added `.toHaveLength` matcher. +- Improved `.toContain` matcher. + +## jest 17.0.2 + +- Fixed performance regression in module resolution. + +## jest 17.0.1 + +- Fixed pretty printing of big objects. +- Fixed resolution of `.native.js` files in react-native projects. + +## jest 17.0.0 + +- Added `expect.extend`. +- Properly resolve modules with platform extensions on react-native. +- Added support for custom snapshots serializers. +- Updated to Jasmine 2.5.2. +- Big diffs are now collapsed by default in snapshots and assertions. Added `--expand` (or `-e`) to show the full diff. +- Replaced `scriptPreprocessor` with the new `transform` option. +- Added `jest.resetAllMocks` which replaces `jest.clearAllMocks`. +- Fixes for react-native preset. +- Fixes for global built in objects in `jest-environment-node`. +- Create mock objects in the vm context instead of the parent context. +- `.babelrc` is now part of the transform cache key in `babel-jest`. +- Fixes for docblock parsing with haste modules. +- Exit with the proper code when the coverage threshold is not reached. +- Implemented file watching in `jest-haste-map`. +- `--json` now includes information about individual tests inside a file. + +## jest 16.0.2 + +- Symbols are now properly mocked when using `jest-mock`. +- `toHaveBeenCalledWith()` works without arguments again. +- Newlines in snapshots are now normalized across different operating systems. + +## jest 16.0.1 + +- Fix infinite loop. + +## jest 16.0.0 + +- Previously failed tests are now always run first. +- A new concurrent reporter shows currently running tests, a test summary, a progress bar and estimated remaining time if possible. +- Improved CLI colors. +- `jest ` is now case-insensitive. +- Added `it.only`, `it.skip`, `test.only`, `test.skip` and `xtest`. +- Added `--testNamePattern=pattern` or `-t ` to run individual tests in test files. +- Jest now warns for duplicate mock files. +- Pressing `a`, `o`, `p`, `q` or `enter` while tests are running in the watch mode, the test run will be interrupted. +- `--bail` now works together with `--watch`. +- Added `test.concurrent` for concurrent async tests. +- Jest now automatically considers files and tests with the `.jsx` extension. +- Added `jest.clearAllMocks` to clear all mocks manually. +- Rewrote Jest's snapshot implementation. `jest-snapshot` can now be more easily integrated into other test runners and used in other projects. +- This requires most snapshots to be updated when upgrading Jest. +- Objects and Arrays in snapshots are now printed with a trailing comma. +- Function names are not printed in snapshots any longer to reduce issues with code coverage instrumentation and different Node versions. +- Snapshots are now sorted using natural sort order. +- Snapshots are not marked as obsolete any longer when using `fit` or when an error is thrown in a test. +- Finished migration of Jasmine matchers to the new Jest matchers. +- Pretty print `toHaveBeenLastCalledWith`, `toHaveBeenCalledWith`, `lastCalledWith` and `toBeCalledWith` failure messages. +- Added `toBeInstanceOf` matcher. +- Added `toContainEqual` matcher. +- Added `toThrowErrorMatchingSnapshot` matcher. +- Improved `moduleNameMapper` resolution. +- Module registry fixes. +- Fixed invocation of the `setupTestFrameworkScriptFile` script to make it easier to use chai together with Jest. +- Removed react-native special case in Jest's configuration. +- Added `--findRelatedTests ` cli option to run tests related to the specified files. +- Added `jest.deepUnmock` to `babel-plugin-jest-hoist`. +- Added `jest.runTimersToTime` which is useful together with fake timers. +- Improved automated mocks for ES modules compiled with babel. + +## jest 15.1.1 + +- Fixed issues with test paths that include hyphens on Windows. +- Fixed `testEnvironment` resolution. +- Updated watch file name pattern input. + +## jest 15.1.0 + +- Pretty printer updates for React and global window objects. +- `jest-runtime` overwrites automocking from configuration files. +- Improvements for watch mode on Windows. +- afterAll/afterEach/beforeAll/beforeEach can now return a Promise and be used together with async/await. +- Improved stack trace printing on Node 4. + +## jest 15.0.2 + +- Fixed Jest with npm2 when using coverage. + +## jest 15.0.1 + +- Updated toThrow and toThrowMatchers and aliased them to the same matcher. +- Improvements for watch mode. +- Fixed Symbol reassignment in tests would break Jest's matchers. +- Fixed `--bail` option. + +## jest 15.0.0 + +- See +- Jest by default now also recognizes files ending in `.spec.js` and `.test.js` as test files. +- Completely replaced most Jasmine matchers with new Jest matchers. +- Rewrote Jest's CLI output for test failures and summaries. +- Added `--env` option to override the default test environment. +- Disabled automocking, fake timers and resetting the module registry by default. +- Added `--watchAll`, made `--watch` interactive and added the ability to update snapshots and select test patterns in watch mode. +- Jest uses verbose mode when running a single test file. +- Console messages are now buffered and printed along with the test results. +- Fix `testEnvironment` resolution to prefer `jest-environment-{name}` instead of `{name}` only. This prevents a module colision when using `jsdom` as test environment. +- `moduleNameMapper` now uses a resolution algorithm. +- Improved performance for small test runs. +- Improved API documentation. +- Jest now works properly with directories that have special characters in them. +- Improvements to Jest's own test infra by merging integration and unit tests. Code coverage is now collected for Jest. +- Added `global.global` to the node environment. +- Fixed babel-jest-plugin-hoist issues with functions called `mock`. +- Improved jest-react-native preset with mocks for ListView, TextInput, ActivityIndicator and ScrollView. +- Added `collectCoverageFrom` to collect code coverage from untested files. +- Rewritten code coverage support. + +## jest 14.1.0 + +- Changed Jest's default cache directory. +- Fixed `jest-react-native` for react 15.3.0. +- Updated react and react-native example to use `react-test-renderer`. +- Started to refactor code coverage. + +## jest 14.0.2 + +- `babel-jest` bugfix. + +## jest 14.0.1 + +- `babel-jest` can now be used to compose a transformer. +- Updated snapshot instructions to run `jest -u` or `npm test -- -u`. +- Fixed `config` cli option to enable JSON objects as configuration. +- Updated printing of preset path in the CLI. + +## jest 14.0.0 + +- Official release of snapshot tests. +- Started to replace Jasmine matchers with Jest matchers: `toBe`, `toBeFalsy`, `toBeTruthy`, `toBeNaN`, `toBe{Greater,Less}Than{,OrEqual}`, `toBeNull`, `toBeDefined`, `toBeUndefined`, `toContain`, `toMatch`, `toBeCloseTo` were rewritten. +- Rewrite of Jest's reporters. +- Experimental react-native support. +- Removed Jasmine 1 support from Jest. +- Transform caching improvements. + +## jest 13.2.0 + +- Snapshot bugfixes. +- Timer bugfixes. + +## jest 13.1.0 + +- Added `test` global function as an alias for `it`. +- Added `coveragePathIgnorePatterns` to the config. +- Fixed printing of "JSX objects" in snapshots. +- Fixes for `--verbose` option and top level `it` calls. +- Extended the node environment with more globals. +- testcheck now needs to be required explicitly through `require('jest-check')`. +- Added `jest.deepUnmock`. +- Fail test suite if it does not contain any tests. + +## jest 13.0.0 + +- Added duration of individual tests in verbose mode. +- Added a `browser` config option to properly resolve npm packages with a browser field in `package.json` if you are writing tests for client side apps +- Added `jest-repl`. +- Split up `jest-cli` into `jest-runtime` and `jest-config`. +- Added a notification plugin that shows a test run notification using `--notify`. +- Refactored `TestRunner` into `SearchSource` and improved the "no tests found" message. +- Added `jest.isMockFunction(jest.fn())` to test for mock functions. +- Improved test reporter printing and added a test failure summary when running many tests. + - Add support for property testing via testcheck-js. +- Added a webpack tutorial. +- Added support for virtual mocks through `jest.mock('Module', implementation, {virtual: true})`. +- Added snapshot functionality through `toMatchSnapshot()`. +- Redesigned website. + +## jest-cli 12.1.1 + +- Windows stability fixes. +- Mock module resolution fixes. +- Remove test files from code coverage. + +## jest-cli 12.1.0 + +- Jest is now also published in the `jest` package on npm. +- Added `testRegex` to match for tests outside of specific folders. Deprecated both `testDirectoryName` and `testFileExtensions`. +- `it` can now return a Promise for async testing. `pit` was deprecated. +- Added `jest-resolve` as a standalone package based on the Facebook module resolution algorithm. +- Added `jest-changed-files` as a standalone package to detect changed files in a git or hg repo. +- Added `--setupTestFrameworkFile` to cli. +- Added support for coverage thresholds. See . +- Updated to jsdom 9.0. +- Updated and improved stack trace reporting. +- Added `module.filename` and removed the invalid `module.__filename` field. +- Further improved the `lastCalledWith` and `toBeCalledWith` custom matchers. They now print the most recent calls. +- Fixed jest-haste-map on continuous integration systems. +- Fixes for hg/git integration. +- Added a re-try for the watchman crawler. + +## jest-cli 12.0.2 + +- Bug fixes when running a single test file and for scoped package names. + +## jest-cli 12.0.1 + +- Added custom equality matchers for Map/Set and iterables. +- Bug fixes + +## jest-cli 12.0.0 + +- Reimplemented `node-haste` as `jest-haste-map`: +- Fixes for the upcoming release of nodejs 6. +- Removed global mock caching which caused negative side-effects on test runs. +- Updated Jasmine from 2.3.4 to 2.4.1. +- Fixed our Jasmine fork to work better with `Object.create(null)`. +- Added a `--silent` flag to silence console messages during a test run. +- Run a test file directly if a path is passed as an argument to Jest. +- Added support for the undocumented nodejs feature `module.paths`. + +## jest-cli 11.0.2 + +- Fixed `jest -o` error when Mercurial isn't installed on the system +- Fixed Jasmine failure message when expected values were mutated after tests. + +## jest-cli 11.0.1, babel-jest 11.0.1 + +- Added support for Mercurial repositories when using `jest -o` +- Added `mockImplementationOnce` API to `jest.fn()`. + +## jest-cli 11.0.0, babel-jest 11.0.0 (pre-releases 0.9 to 0.10) + +- New implementation of node-haste and rewrite of internal module loading and resolution. Fixed both startup and runtime performance. [#599](https://github.com/facebook/jest/pull/599) +- Jasmine 2 is now the default test runner. To keep using Jasmine 1, put `testRunner: "jasmine1"` into your configuration. +- Added `jest-util`, `jest-mock`, `jest-jasmine1`, `jest-jasmine2`, `jest-environment-node`, `jest-environment-jsdom` packages. +- Added `babel-jest-preset` and `babel-jest` as packages. `babel-jest` is now being auto-detected. +- Added `babel-plugin-jest-hoist` which hoists `jest.unmock`, `jest.mock` and the new `jest.enableAutomock` and `jest.disableAutomock` API. +- Improved `babel-jest` integration and `react-native` testing. +- Improved code coverage reporting when using `babel-jest`. +- Added the `jest.mock('moduleName', moduleFactory)` feature. `jest.mock` now gets hoisted by default. `jest.doMock` was added to explicitly mock a module without the hoisting feature of `babel-jest`. +- Updated jsdom to 8.3.x. +- Improved responsiveness of the system while using `--watch`. +- Clear the terminal window when using `--watch`. +- By default, `--watch` will now only runs tests related to changed files. `--watch=all` can be used to run all tests on file system changes. +- Debounce `--watch` re-runs to not trigger test runs during a branch switch in version control. +- Added `jest.fn()` and `jest.fn(implementation)` as convenient shorcuts for `jest.genMockFunction()` and `jest.genMockFunction().mockImplementation()`. +- Added an `automock` option to turn off automocking globally. +- Added a "no tests found" message if no tests can be found. +- Jest sets `process.NODE_ENV` to `test` unless otherwise specified. +- Fixed `moduleNameMapper` config option when used with paths. +- Fixed an error with Jasmine 2 and tests that `throw 'string errors'`. +- Fixed issues with unmocking symlinked module names. +- Fixed mocking of boolean values. +- Fixed mocking of fields that start with an underscore ("private fields"). +- Fixed unmocking behavior with npm3. +- Fixed and improved `--onlyChanged` option. +- Fixed support for running Jest as a git submodule. +- Improved verbose logger output +- Fixed test runtime error reporting and stack traces. +- Improved `toBeCalled` Jasmine 2 custom matcher messages. +- Improved error reporting when a syntax error occurs. +- Renamed HasteModuleLoader to Runtime. +- Jest now properly reports pending tests disabled with `xit` and `xdescribe`. +- Removed `preprocessCachingDisabled` config option. +- Added a `testEnvironment` option to customize the sandbox environment. +- Added support for `@scoped/name` npm packages. +- Added an integration test runner for Jest that runs all tests for examples and packages. + +## 0.8.2 + +- Performance improvements. +- jest now uses `chalk` instead of its own colors implementation. + +## 0.8.1 + +- `--bail` now reports with the proper error code. +- Fixed loading of the setup file when using jasmine2. +- Updated jsdom to 7.2.0. + +## 0.8.0 + +- Added optional support for jasmine2 through the `testRunner` config option. +- Fixed mocking support for Map, WeakMap and Set. +- `node` was added to the defaults in `moduleFileExtensions`. +- Updated the list of node core modules that are properly being recognized by the module loader. + +## 0.7.1 + +- Correctly map `process.on` into jsdom environments, fixes a bug introduced in jest 0.7.0. + +## 0.7.0 + +- Fixed a memory leak with test contexts. Jest now properly cleans up test environments after each test. Added `--logHeapUsage` to log memory usage after each test. Note: this is option is meant for debugging memory leaks and might significantly slow down your test run. +- Removed `mock-modules`, `node-haste` and `mocks` virtual modules. This is a breaking change of undocumented public API. Usage of this API can safely be automatically updated through an automated codemod: +- Example: +- Codemod: +- jscodeshift: +- Removed `navigator.onLine` and `mockSetReadOnlyProperty` from the global jsdom environment. Use `window.navigator.onLine = true;` in your test setup and `Object.defineProperty` instead. + +## 0.6.1 + +- Updated jsdom to 7.0.2. +- Use the current working directory as root when passing a jest config from the command line. +- Updated the React examples and getting started guide +- Modules now receive a `module.parent` field so unmocked modules don't assume they are run directly any longer. + +## 0.6.0 + +- jest now reports the number of tests that were run instead of the number of test files. +- Added a `--json` option to print test results as JSON. +- Changed the preprocessor API. A preprocessor now receives the script, file and config. The cache key function receives the script, file and stringified config to be able to create consistent hashes. +- Removed node-worker-pool in favor of node-worker-farm (#540). +- `toEqual` now also checks the internal class name of an object. This fixes invalid tests like `expect([]).toEqual({})` which were previously passing. +- Added the option to provide map modules to stub modules by providing the `moduleNameMapper` config option. +- Allow to specify a custom `testRunner` in the configuration (#531). +- Added a `--no-cache` option to make it easier to debug preprocessor scripts. +- Fix code coverage on windows (#499). + +## 0.5.6 + +- Cache test run performance and run slowest tests first to maximize worker utilization +- Update to jsdom 6.5.0 + +## 0.5.5 + +- Improve failure stack traces. +- Fix syntax error reporting. +- Add `--watch` option (#472). + +## 0.5.2 + +- Fixed a bug with syntax errors in test files (#487). +- Fixed chmod error for preprocess-cache (#491). +- Support for the upcoming node 4.0 release (#490, #489). + +## 0.5.1 + +- Upgraded node-worker-pool to 3.0.0, use the native `Promise` implementation. +- `testURL` can be used to set the location of the jsdom environment. +- Updated all of jest's dependencies, now using jsdom 6.3. +- jest now uses the native `Promise` implementation. +- Fixed a bug when passed an empty `testPathIgnorePatterns`. +- Moved preprocessor cache into the haste cache directory. + +## 0.5.0 + +- Added `--noStackTrace` option to disable stack traces. +- Jest now only works with iojs v2 and up. If you are still using node we recommend upgrading to iojs or keep using jest 0.4.0. +- Upgraded to jsdom 6.1.0 and removed all the custom jsdom overwrites. + +## <=0.4.0 + +- See commit history for changes in previous versions of jest. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f62935b --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,47 @@ +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make 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 within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. 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 . 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][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +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 new file mode 100644 index 0000000..a276b16 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,238 @@ +# How to Contribute + +Jest is one of Facebook's open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have. + +## [Code of Conduct](https://code.facebook.com/codeofconduct) + +Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated. + +## Open Development + +All work on Jest happens directly on [GitHub](/). Both core team members and external contributors send pull requests which go through the same review process. + +### `main` is unsafe + +We will do our best to keep `main` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and always version appropriately so you can lock into a specific version if need be. + +### Workflow and Pull Requests + +The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process. + +_Before_ submitting a pull request, please make sure the following is done… + +1. Fork the repo and create your branch from `main`. A guide on how to fork a repository: https://help.github.com/articles/fork-a-repo/ + + Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type: + + ```sh-session + $ git clone https://github.com//jest + $ cd jest + $ git checkout -b my_branch + ``` + + Note: Replace `` with your GitHub username + +1. Jest uses [Yarn](https://code.facebook.com/posts/1840075619545360) for running development scripts. If you haven't already done so, please [install yarn](https://yarnpkg.com/en/docs/install). + +1. Make sure you have `python` installed. Python is required by [node-gyp](https://github.com/nodejs/node-gyp) that is used when running `yarn install`. + + To check your version of Python and ensure it's installed you can type: + + ```sh + python --version + ``` + +1. Make sure you have a compatible version of `node` installed (As of October 29th 2021, `v16.x` is recommended). + + ```sh + node -v + ``` + +1. 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
+ + ```sh + yarn install + ``` + + To check your version of Yarn and ensure it's installed you can type: + + ```sh + yarn --version + ``` + + On Windows `yarn install` may fail with `gyp ERR! build error`. One of possible solutions: + + ```sh + yarn global add windows-build-tools + ``` + +1. Run `yarn build` to transpile TypeScript to JavaScript and type check the code + + ```sh + yarn build + ``` + +1. If you've added code that should be tested, add tests. You can use watch mode that continuously transforms changed files to make your life easier. + + ```sh + # in the background + yarn watch + ``` + +1. If you've changed APIs, update the documentation. + +1. Ensure the test suite passes via `yarn jest`. To run the test suite you may need to install [Mercurial](https://www.mercurial-scm.org/) (`hg`). On macOS, this can be done using [homebrew](http://brew.sh/): `brew install hg`. + + ```sh-session + $ brew install hg # maybe + $ yarn test + ``` + +1. If you haven't already, complete the [CLA](https://code.facebook.com/cla/). + +#### Changelog entries + +All changes that add a feature to or fix a bug in any of Jest's packages require a changelog entry containing the names of the packages affected, a description of the change, and the number of and link to the pull request. Try to match the structure of the existing entries. + +For significant changes to the documentation or website and things like cleanup, refactoring, and dependency updates, the "Chore & Maintenance" section of the changelog can be used. + +You can add or edit the changelog entry in the GitHub web interface once you have opened the pull request and know the number and link to it. + +Make sure to alphabetically order your entry based on package name. If you have changed multiple packages, separate them with a comma. + +#### Testing + +Code that is written needs to be tested to ensure that it achieves the desired behaviour. Tests either fall into a unit test or an integration test. + +##### Unit tests + +Some of the packages within jest have a `__tests__` directory. This is where unit tests reside in. If the scope of your work only requires a unit test, this is where you will write it in. Tests here usually don't require much if any setup. + +##### Integration tests + +There will be situations however where the work you have done cannot be tested alone using unit tests. In situations like this, you should write an integration test for your code. The integration tests reside within the `e2e` directory. Within this directory, there is a `__tests__` directory. This is where you will write the integration test itself. The tests within this directory execute jest itself using `runJest.js` and assertions are usually made on one if not all the output of the following `status`, `stdout` and `stderr`. The other sub directories within the `e2e` directory are where you will write the files that jest will run for your integration tests. Feel free to take a look at any of the tests in the `__tests__` directory within `e2e` to have a better sense of how it is currently being done. + +It is possible to run the integration test itself manually to inspect that the new behaviour is indeed correct. Here is a small code snippet of how to do just that. This is useful when debugging a failing test. + +```bash +$ cd e2e/clear-cache +$ node ../../packages/jest-cli/bin/jest.js # It is possible to use node --inspect or ndb +PASS __tests__/clear_cache.test.js +✓ stub (3ms) + +Test Suites: 1 passed, 1 total +Tests: 1 passed, 1 total +Snapshots: 0 total +Time: 0.232 s, estimated 1 s +Ran all test suites. +``` + +##### Using jest-circus + +There may be cases where you want to run jest using `jest-circus` instead of `jest-jasmine2` (which is the default runner) for integration testing. In situations like this, set the environment variable `JEST_CIRCUS` to 1. That will configure jest to use `jest-circus`. So something like this. + +```bash +JEST_CIRCUS=1 yarn jest +``` + +#### Additional Workflow for any changes made to website or docs + +If you are making changes to the website or documentation, test the website folder and run the server to check if your changes are being displayed accurately. + +1. Locate to the website directory and install any website specific dependencies by typing in `yarn`. Following steps are to be followed for this purpose from the root directory. + ```sh-session + $ cd website # Only needed if you are not already in the website directory + $ yarn + $ node fetchSupporters.js + $ yarn start + ``` +1. You can run a development server to check if the changes you made are being displayed accurately by running `yarn start` in the website directory. + +The Jest website also offers documentation for older versions of Jest, which you can edit in `website/versioned_docs`. After making changes to the current documentation in `docs`, please check if any older versions of the documentation have a copy of the file where the change is also relevant and apply the changes to the `versioned_docs` as well. + +### Contributor License Agreement (CLA) + +In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username. + +[Complete your CLA here.](https://code.facebook.com/cla) + +## How to try a development build of Jest in another project + +To build Jest: + +```sh-session +$ cd /path/to/your/Jest_clone + +# Do one of the following: + +# Check out a commit from another contributor, and then +$ yarn run build + +# Or, save your changes to Jest, and then +$ yarn test # which also builds Jest +``` + +To run tests in another project with the development build of Jest: + +```sh-session +$ cd /path/to/another/project + +$ node /path/to/your/JestClone/packages/jest/bin/jest [options] # run jest-cli/bin/jest.js in the development build +``` + +- To decide whether to specify any options, see `test` under `scripts` in the `package.json` file of the other project. + +## Bugs + +### Where to Find Known Issues + +We will be using GitHub Issues for our public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new issue, try to make sure your problem doesn't already exist. + +### Reporting New Issues + +The best way to get your bug fixed is to provide a reduced test case. Please provide a public repository with a runnable example. + +### Docs translation + +We get translations from Crowdin, see https://crowdin.com/project/jest-v2. Any and all help is very much appreciated! + +### Security Bugs + +Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page. + +## How to Get in Touch + +[`#testing` on Reactiflux](https://discord.gg/j6FKKQQrW9) + +## Code Conventions + +- 2 spaces for indentation (no tabs). +- 80 character line length strongly preferred. +- Prefer `'` over `"`. +- ES6 syntax when possible. +- Use [TypeScript](https://www.typescriptlang.org/). +- Use semicolons; +- Trailing commas, +- Avd abbr wrds. + +## Credits + +This project exists thanks to all the people who [contribute](CONTRIBUTING.md). + + + +### [Backers](https://opencollective.com/jest#backer) + +Thank you to all our backers! 🙏 + + + +### [Sponsors](https://opencollective.com/jest#sponsor) + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. + + + +## License + +By contributing to Jest, you agree that your contributions will be licensed under its MIT license. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b96dcb0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..03c29c3 --- /dev/null +++ b/README.md @@ -0,0 +1,264 @@ +

+ + npm version + + + Jest is released under the MIT license. + + + Follow on Twitter + +

+ + +

 

+ +

+ +

🃏 Delightful JavaScript Testing

+ +**👩🏻‍💻 Developer Ready**: A comprehensive JavaScript testing solution. Works out of the box for most JavaScript projects. + +**🏃🏽 Instant Feedback**: Fast, interactive watch mode only runs test files related to changed files. + +**📸 Snapshot Testing**: Capture snapshots of large objects to simplify testing and to analyze how they change over time. + +

See more on jestjs.io

+ +## Table of Contents + +- [Getting Started](#getting-started) +- [Running from command line](#running-from-command-line) +- [Additional Configuration](#additional-configuration) + - [Generate a basic configuration file](#generate-a-basic-configuration-file) + - [Using Babel](#using-babel) + - [Using Webpack](#using-webpack) + - [Using Parcel](#using-parcel) + - [Using Typescript](#using-typescript) +- [Documentation](#documentation) +- [Badge](#badge) +- [Contributing](#contributing) + - [Code of Conduct](#code-of-conduct) + - [Contributing Guide](#contributing-guide) + - [Good First Issues](#good-first-issues) +- [Credits](#credits) + - [Backers](#backers) + - [Sponsors](#sponsors) +- [License](#license) + +## Getting Started + + + +Install Jest using [`yarn`](https://yarnpkg.com/en/package/jest): + +```bash +yarn add --dev jest +``` + +Or [`npm`](https://www.npmjs.com/package/jest): + +```bash +npm install --save-dev jest +``` + +Note: Jest documentation uses `yarn` commands, but `npm` will also work. You can compare `yarn` and `npm` commands in the [yarn docs, here](https://yarnpkg.com/en/docs/migrating-from-npm#toc-cli-commands-comparison). + +Let's get started by writing a test for a hypothetical function that adds two numbers. First, create a `sum.js` file: + +```javascript +function sum(a, b) { + return a + b; +} +module.exports = sum; +``` + +Then, create a file named `sum.test.js`. This will contain our actual test: + +```javascript +const sum = require('./sum'); + +test('adds 1 + 2 to equal 3', () => { + expect(sum(1, 2)).toBe(3); +}); +``` + +Add the following section to your `package.json`: + +```json +{ + "scripts": { + "test": "jest" + } +} +``` + +Finally, run `yarn test` or `npm test` and Jest will print this message: + +```bash +PASS ./sum.test.js +✓ adds 1 + 2 to equal 3 (5ms) +``` + +**You just successfully wrote your first test using Jest!** + +This test used `expect` and `toBe` to test that two values were exactly identical. To learn about the other things that Jest can test, see [Using Matchers](https://jestjs.io/docs/using-matchers). + +## Running from command line + +You can run Jest directly from the CLI (if it's globally available in your `PATH`, e.g. by `yarn global add jest` or `npm install jest --global`) with a variety of useful options. + +Here's how to run Jest on files matching `my-test`, using `config.json` as a configuration file and display a native OS notification after the run: + +```bash +jest my-test --notify --config=config.json +``` + +If you'd like to learn more about running `jest` through the command line, take a look at the [Jest CLI Options](https://jestjs.io/docs/cli) page. + +## Additional Configuration + +### Generate a basic configuration file + +Based on your project, Jest will ask you a few questions and will create a basic configuration file with a short description for each option: + +```bash +jest --init +``` + +### Using Babel + +To use [Babel](https://babeljs.io/), install required dependencies via `yarn`: + +```bash +yarn add --dev babel-jest @babel/core @babel/preset-env +``` + +Configure Babel to target your current version of Node by creating a `babel.config.js` file in the root of your project: + +```javascript +// babel.config.js +module.exports = { + presets: [['@babel/preset-env', {targets: {node: 'current'}}]], +}; +``` + +_The ideal configuration for Babel will depend on your project._ See [Babel's docs](https://babeljs.io/docs/en/) for more details. + +
Making your Babel config jest-aware + +Jest will set `process.env.NODE_ENV` to `'test'` if it's not set to something else. You can use that in your configuration to conditionally setup only the compilation needed for Jest, e.g. + +```javascript +// babel.config.js +module.exports = api => { + const isTest = api.env('test'); + // You can use isTest to determine what presets and plugins to use. + + return { + // ... + }; +}; +``` + +> Note: `babel-jest` is automatically installed when installing Jest and will automatically transform files if a babel configuration exists in your project. To avoid this behavior, you can explicitly reset the `transform` configuration option: + +```javascript +// jest.config.js +module.exports = { + transform: {}, +}; +``` + +
+ + + +### Using webpack + +Jest can be used in projects that use [webpack](https://webpack.js.org/) to manage assets, styles, and compilation. webpack does offer some unique challenges over other tools. Refer to the [webpack guide](https://jestjs.io/docs/webpack) to get started. + +### Using parcel + +Jest can be used in projects that use [parcel-bundler](https://parceljs.org/) to manage assets, styles, and compilation similar to webpack. Parcel requires zero configuration. Refer to the official [docs](https://parceljs.org/docs/) to get started. + +### Using TypeScript + +Jest supports TypeScript, via Babel. First, make sure you followed the instructions on [using Babel](#using-babel) above. Next, install the `@babel/preset-typescript` via `yarn`: + +```bash +yarn add --dev @babel/preset-typescript +``` + +Then add `@babel/preset-typescript` to the list of presets in your `babel.config.js`. + +```diff +// babel.config.js +module.exports = { + presets: [ + ['@babel/preset-env', {targets: {node: 'current'}}], ++ '@babel/preset-typescript', + ], +}; +``` + +However, there are some [caveats](https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats) to using TypeScript with Babel. Because TypeScript support in Babel is purely transpilation, Jest will not type-check your tests as they are run. If you want that, you can use [ts-jest](https://github.com/kulshekhar/ts-jest) instead, or just run the TypeScript compiler [tsc](https://www.typescriptlang.org/docs/handbook/compiler-options.html) separately (or as part of your build process). + + + +## Documentation + +Learn more about using [Jest on the official site!](https://jestjs.io) + +- [Getting Started](https://jestjs.io/docs/getting-started) +- [Guides](https://jestjs.io/docs/snapshot-testing) +- [API Reference](https://jestjs.io/docs/api) +- [Configuring Jest](https://jestjs.io/docs/configuration) + +## Badge + +Show the world you're using _Jest_ `→` [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) [![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest) + + +```md +[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) +[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest) +``` + +## Contributing + +Development of Jest happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving Jest. + +### [Code of Conduct](https://code.facebook.com/codeofconduct) + +Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated. + +### [Contributing Guide](CONTRIBUTING.md) + +Read our [contributing guide](CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Jest. + +### [Good First Issues](https://github.com/facebook/jest/labels/good%20first%20issue) + +To help you get your feet wet and get you familiar with our contribution process, we have a list of [good first issues](https://github.com/facebook/jest/labels/good%20first%20issue) that contain bugs which have a relatively limited scope. This is a great place to get started. + +## Credits + +This project exists thanks to all the people who [contribute](CONTRIBUTING.md). + + + +### [Backers](https://opencollective.com/jest#backer) + +Thank you to all our backers! 🙏 + + + +### [Sponsors](https://opencollective.com/jest#sponsor) + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. + + + +## License + +Jest is [MIT licensed](./LICENSE). diff --git a/astral-regex/.editorconfig b/astral-regex/.editorconfig new file mode 100644 index 0000000..1c6314a --- /dev/null +++ b/astral-regex/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/astral-regex/.gitattributes b/astral-regex/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/astral-regex/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/astral-regex/.gitignore b/astral-regex/.gitignore new file mode 100644 index 0000000..239ecff --- /dev/null +++ b/astral-regex/.gitignore @@ -0,0 +1,2 @@ +node_modules +yarn.lock diff --git a/astral-regex/.npmrc b/astral-regex/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/astral-regex/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/astral-regex/.travis.yml b/astral-regex/.travis.yml new file mode 100644 index 0000000..f3fa8cd --- /dev/null +++ b/astral-regex/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - '10' + - '8' diff --git a/astral-regex/index.d.ts b/astral-regex/index.d.ts new file mode 100644 index 0000000..e81ac31 --- /dev/null +++ b/astral-regex/index.d.ts @@ -0,0 +1,28 @@ +declare namespace astralRegex { + interface Options { + /** + Only match an exact string. Useful with `RegExp#test()` to check if a string is a astral symbol. Default: `false` _(Matches any astral symbols in a string)_ + */ + readonly exact?: boolean; + } +} + +/** +Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane). + +@returns A `RegExp` for matching astral symbols. + +@example +``` +import astralRegex = require('astral-regex'); + +astralRegex({exact: true}).test('🦄'); +//=> true + +'foo 🦄 💩 bar'.match(astralRegex()); +//=> ['🦄', '💩'] +``` +*/ +declare function astralRegex(options?: astralRegex.Options): RegExp; + +export = astralRegex; diff --git a/astral-regex/index.js b/astral-regex/index.js new file mode 100644 index 0000000..651177d --- /dev/null +++ b/astral-regex/index.js @@ -0,0 +1,6 @@ +'use strict'; +const regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]'; + +const astralRegex = options => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g'); + +module.exports = astralRegex; diff --git a/astral-regex/index.test-d.ts b/astral-regex/index.test-d.ts new file mode 100644 index 0000000..81d3c4f --- /dev/null +++ b/astral-regex/index.test-d.ts @@ -0,0 +1,5 @@ +import {expectType} from 'tsd'; +import astralRegex = require('.'); + +expectType(astralRegex()); +expectType(astralRegex({exact: true})); diff --git a/astral-regex/license b/astral-regex/license new file mode 100644 index 0000000..db6bc32 --- /dev/null +++ b/astral-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +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. diff --git a/astral-regex/package.json b/astral-regex/package.json new file mode 100644 index 0000000..d1ceea7 --- /dev/null +++ b/astral-regex/package.json @@ -0,0 +1,33 @@ +{ + "name": "astral-regex", + "version": "2.0.0", + "description": "Regular expression for matching astral symbols", + "license": "MIT", + "repository": "kevva/astral-regex", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "astral", + "emoji", + "regex", + "surrogate" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/astral-regex/readme.md b/astral-regex/readme.md new file mode 100644 index 0000000..89d6659 --- /dev/null +++ b/astral-regex/readme.md @@ -0,0 +1,46 @@ +# astral-regex [![Build Status](https://travis-ci.org/kevva/astral-regex.svg?branch=master)](https://travis-ci.org/kevva/astral-regex) + +> Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane) + + +## Install + +``` +$ npm install astral-regex +``` + + +## Usage + +```js +const astralRegex = require('astral-regex'); + +astralRegex({exact: true}).test('🦄'); +//=> true + +'foo 🦄 💩 bar'.match(astralRegex()); +//=> ['🦄', '💩'] +``` + + +## API + +### astralRegex([options]) + +Returns a `RegExp` for matching astral symbols. + +#### options + +Type: `Object` + +##### exact + +Type: `boolean`
+Default: `false` *(Matches any astral symbols in a string)* + +Only match an exact string. Useful with `RegExp#test()` to check if a string is a astral symbol. + + +## License + +MIT © [Kevin Mårtensson](https://github.com/kevva) diff --git a/astral-regex/test.js b/astral-regex/test.js new file mode 100644 index 0000000..1c42176 --- /dev/null +++ b/astral-regex/test.js @@ -0,0 +1,37 @@ +import test from 'ava'; +import astralRegex from '.'; + +const matches = [ + '💩', + '🦄', + '🎠', + '🌈', + '🐴', + '😹' +]; + +const nonMatches = [ + 'a', + '안', + '1', + 'Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞', + '…', + 'π', + '®' +]; + +test('matches', t => { + for (const x of matches) { + t.true(astralRegex({exact: true}).test(x)); + } + + for (const x of matches) { + t.is((astralRegex().exec(`foo ${x} bar`) || [])[0], x); + } +}); + +test('non matches', t => { + for (const x of nonMatches) { + t.false(astralRegex({exact: true}).test(x)); + } +}); diff --git a/babel-preset-moxy/CHANGELOG.md b/babel-preset-moxy/CHANGELOG.md new file mode 100644 index 0000000..894b5c8 --- /dev/null +++ b/babel-preset-moxy/CHANGELOG.md @@ -0,0 +1,227 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [3.2.0](https://github.com/moxystudio/babel-preset-moxy/compare/v3.1.0...v3.2.0) (2019-09-30) + + +### Bug Fixes + +* update vulnerable/outdated dependencies ([9f44a8d](https://github.com/moxystudio/babel-preset-moxy/commit/9f44a8d)) + + +### Features + +* add nullish coalescing and optional chaining operators ([25faa38](https://github.com/moxystudio/babel-preset-moxy/commit/25faa38)) + + + + +# [3.1.0](https://github.com/moxystudio/babel-preset-moxy/compare/v3.0.6...v3.1.0) (2019-05-28) + + +### Features + +* enable loose option ([#44](https://github.com/moxystudio/babel-preset-moxy/issues/44)) ([9b4afe1](https://github.com/moxystudio/babel-preset-moxy/commit/9b4afe1)) + + + + +## [3.0.6](https://github.com/moxystudio/babel-preset-moxy/compare/v3.0.5...v3.0.6) (2019-04-29) + + +### Bug Fixes + +* add sourceType also to lib ([4b1cf95](https://github.com/moxystudio/babel-preset-moxy/commit/4b1cf95)) +* set sourceType to unambiguous to properly compile deps ([b32f8c6](https://github.com/moxystudio/babel-preset-moxy/commit/b32f8c6)) + + + + +## [3.0.5](https://github.com/moxystudio/babel-preset-moxy/compare/v3.0.4...v3.0.5) (2019-04-04) + + +### Bug Fixes + +* add the runtime transform plugin to end project ([#42](https://github.com/moxystudio/babel-preset-moxy/issues/42)) ([8127ae7](https://github.com/moxystudio/babel-preset-moxy/commit/8127ae7)) + + + + +## [3.0.4](https://github.com/moxystudio/babel-preset-moxy/compare/v3.0.3...v3.0.4) (2019-02-14) + + +### Bug Fixes + +* add lib directory and update readme without preset shorthand ([#40](https://github.com/moxystudio/babel-preset-moxy/issues/40)) ([6ee6573](https://github.com/moxystudio/babel-preset-moxy/commit/6ee6573)) + + + + +## [3.0.3](https://github.com/moxystudio/babel-preset-moxy/compare/v3.0.2...v3.0.3) (2019-02-13) + + + + +## [3.0.2](https://github.com/moxystudio/babel-preset-moxy/compare/v3.0.1...v3.0.2) (2019-02-13) + + + + +## [3.0.1](https://github.com/moxystudio/babel-preset-moxy/compare/v3.0.0...v3.0.1) (2019-02-13) + + + + +# [3.0.0](https://github.com/moxystudio/babel-preset-moxy/compare/v2.3.5...v3.0.0) (2019-02-13) + + +### Features + +* upgrade to babel 7 ([#39](https://github.com/moxystudio/babel-preset-moxy/issues/39)) ([5ad75f1](https://github.com/moxystudio/babel-preset-moxy/commit/5ad75f1)), closes [#26](https://github.com/moxystudio/babel-preset-moxy/issues/26) + + +### BREAKING CHANGES + +* the way the preset is configured has changed + + + + +## [2.3.5](https://github.com/moxystudio/babel-preset-moxy/compare/v2.3.4...v2.3.5) (2018-09-11) + + + + +## [2.3.4](https://github.com/moxystudio/babel-preset-moxy/compare/v2.3.3...v2.3.4) (2018-09-10) + + +### Bug Fixes + +* fix dev errors when using transform-react-inline-elements ([722526c](https://github.com/moxystudio/babel-preset-moxy/commit/722526c)), closes [#26](https://github.com/moxystudio/babel-preset-moxy/issues/26) + + + + +## [2.3.3](https://github.com/moxystudio/babel-preset-moxy/compare/v2.3.2...v2.3.3) (2018-03-22) + + +### Bug Fixes + +* remove babel-plugin-transform-react-constant-elements ([#25](https://github.com/moxystudio/babel-preset-moxy/issues/25)) ([4c1ab03](https://github.com/moxystudio/babel-preset-moxy/commit/4c1ab03)) + + + + +## [2.3.2](https://github.com/moxystudio/babel-preset-moxy/compare/v2.3.1...v2.3.2) (2018-03-11) + + + + +## [2.3.1](https://github.com/moxystudio/babel-preset-moxy/compare/v2.3.0...v2.3.1) (2018-03-02) + + + + +# [2.3.0](https://github.com/moxystudio/babel-preset-moxy/compare/v2.2.1...v2.3.0) (2018-02-28) + + +### Features + +* add default support for async/await and generators ([96f8ce9](https://github.com/moxystudio/babel-preset-moxy/commit/96f8ce9)) + + + + +## [2.2.1](https://github.com/moxystudio/babel-preset-moxy/compare/v2.2.0...v2.2.1) (2018-02-23) + + +### Bug Fixes + +* fix lodash plugin being wrongly setup ([678a7c0](https://github.com/moxystudio/babel-preset-moxy/commit/678a7c0)) + + + + +# [2.2.0](https://github.com/moxystudio/babel-preset-moxy/compare/v2.1.0...v2.2.0) (2018-02-20) + + +### Features + +* add lodash/fp as default id on babel-plugin-lodash ([2c30efe](https://github.com/moxystudio/babel-preset-moxy/commit/2c30efe)), closes [#18](https://github.com/moxystudio/babel-preset-moxy/issues/18) + + + + +# [2.1.0](https://github.com/moxystudio/babel-preset-moxy/compare/v2.0.4...v2.1.0) (2018-01-24) + + +### Features + +* add babel-plugin-lodash via options.lodash ([1104f92](https://github.com/moxystudio/babel-preset-moxy/commit/1104f92)), closes [#10](https://github.com/moxystudio/babel-preset-moxy/issues/10) + + + + +## [2.0.4](https://github.com/moxystudio/babel-preset-moxy/compare/v2.0.3...v2.0.4) (2018-01-22) + + + + +## [2.0.3](https://github.com/moxystudio/babel-preset-moxy/compare/v2.0.2...v2.0.3) (2017-12-21) + + + + +## [2.0.2](https://github.com/moxystudio/babel-preset-moxy/compare/v2.0.1...v2.0.2) (2017-11-23) + + +### Bug Fixes + +* remove core-js peer dependency ([d8d3316](https://github.com/moxystudio/babel-preset-moxy/commit/d8d3316)) + + + + +## [2.0.1](https://github.com/moxystudio/babel-preset-moxy/compare/v2.0.0...v2.0.1) (2017-11-23) + + +### Bug Fixes + +* fix add-module-exports plugin not being in deps ([1535d86](https://github.com/moxystudio/babel-preset-moxy/commit/1535d86)) + + + + +# [2.0.0](https://github.com/moxystudio/babel-preset-moxy/compare/v1.1.0...v2.0.0) (2017-11-23) + + +### Features + +* implement namedDefaultExport ([f353508](https://github.com/moxystudio/babel-preset-moxy/commit/f353508)), closes [#5](https://github.com/moxystudio/babel-preset-moxy/issues/5) + + +### BREAKING CHANGES + +* browser target was changed to be browsers for consistency with babel-preset-env + + + + +# [1.1.0](https://github.com/moxystudio/babel-preset-moxy/compare/v1.0.0...v1.1.0) (2017-11-22) + + +### Features + +* improve modules option default value by reading BABEL_ENV ([276845b](https://github.com/moxystudio/babel-preset-moxy/commit/276845b)) + + + + +# 1.0.0 (2017-11-20) + + +### Features + +* initial commit ([79a708d](https://github.com/moxystudio/babel-preset-moxy/commit/79a708d)) diff --git a/babel-preset-moxy/LICENSE b/babel-preset-moxy/LICENSE new file mode 100644 index 0000000..347e735 --- /dev/null +++ b/babel-preset-moxy/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Made With MOXY Lda + +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. diff --git a/babel-preset-moxy/README.md b/babel-preset-moxy/README.md new file mode 100644 index 0000000..c1abb21 --- /dev/null +++ b/babel-preset-moxy/README.md @@ -0,0 +1,272 @@ +# babel-preset-moxy + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] + +[npm-url]:https://npmjs.org/package/babel-preset-moxy +[npm-image]:http://img.shields.io/npm/v/babel-preset-moxy.svg +[downloads-image]:http://img.shields.io/npm/dm/babel-preset-moxy.svg +[travis-url]:https://travis-ci.org/moxystudio/babel-preset-moxy +[travis-image]:http://img.shields.io/travis/moxystudio/babel-preset-moxy/master.svg +[codecov-url]:https://codecov.io/gh/moxystudio/babel-preset-moxy +[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/babel-preset-moxy/master.svg +[david-dm-url]:https://david-dm.org/moxystudio/babel-preset-moxy +[david-dm-image]:https://img.shields.io/david/moxystudio/babel-preset-moxy.svg +[david-dm-dev-url]:https://david-dm.org/moxystudio/babel-preset-moxy?type=dev +[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/babel-preset-moxy.svg + +[Babel](https://babeljs.io/) preset to be used at MOXY. + + +## Installation + +```ssh +$ npm install babel-preset-moxy @babel/core --save-dev +``` + +If you are using Jest for testing, you also need to install [`babel-jest`](https://github.com/facebook/jest/tree/master/packages/babel-jest): + +```ssh +$ npm install babel-jest --save-dev +``` + + +## Motivation + +Projects developed at MOXY often use new JavaScript language features that may not be supported in the targets they will run. This preset provides a shareable Babel config that: + +- Allows you to use the latest JavaScript features and transpile only what is not already supported by your targets, thanks to [`preset-env`](https://www.npmjs.com/package/babel-preset-env) +- Enables [`class-properties`](https://www.npmjs.com/package/@babel/plugin-proposal-class-properties) +- Optionally enables React, transforming JSX to standard JavaScript +- Uses [`add-module-exports`](https://www.npmjs.com/package/babel-plugin-add-module-exports) to get around [babel#2212](https://github.com/babel/babel/issues/2212) +- Enables [`babel-plugin-lodash`](https://www.npmjs.com/package/babel-plugin-lodash) + + +## Do I need to transpile? + +There has been [discussion](https://github.com/parcel-bundler/parcel/pull/559#discussion_r161926651) in the community about libraries not being compiled, leaving all compilation efforts to top-level projects consuming them. This makes sense, since developers know what platforms their top-level project target and are able to compile their dependencies accordingly. Furthermore, library maintainers are constantly having to update their compilation options as new features are accepted into different stages of the specification, which creates significant and unnecessary overhead. + +Problems arise, however, in libraries which target both Node.js and browser, or if non-standard JavaScript is being used, such as [proposals](https://github.com/tc39/proposals) or [JSX](https://reactjs.org/docs/introducing-jsx.html). In those situations, library authors are required to transpile their libraries code to offer `CommonJS` and `ES` module variants or to transform non-standard JavaScript to standard JavaScript. + +**In conclusion**: + +1. For libraries, you need to transpile if you want to publish both in CommonJS and ES or if there are non-standard JavaScript language features being used +2. For top-level projects, you need to transpile both your code and your dependencies if the JavaScript language features being used are not supported by your targets + + +## Usage + +### 1. Choose a preset-type + +There're two preset types available for you to use: + +- For libraries: use the `lib` type in case you are developing a library to be consumed by others +- For end-projects: use the `end-project` type in case you developing a top-level project, such as an Web Application, a Node.js API or CLI + +### 2. Setup babel within your project + +The way Babel is configured depends on the the tooling you are using. Below, there are instructions for common scenarios: + +#### Standard project + +> If you don't use a bundler within your project, this is the setup guide you should follow + +- Create `.babelrc` at the root of your project, replacing `` with the preset type you chose: + + ```json + { + "presets": ["babel-preset-moxy/"] + } + ``` + + ...or with options: + + ```json + { + "presets": [["babel-preset-moxy/", { "react": true }]] + } + ``` + +- Install [`@babel/cli`](https://www.npmjs.com/package/@babel/cli) as a dev dependency because we will need it for the build script: + + ```ssh + $ npm install @babel/cli --save-dev + ``` + +- Set up your `package.json` like this: + + ```json + "main": "lib/index.js", + "module": "es/index.js", + "files": [ + "lib", + "es" + ], + "scripts": { + "build:commonjs": "BABEL_ENV=commonjs babel src -d lib --delete-dir-on-start", + "build:es": "BABEL_ENV=es babel src -d es --delete-dir-on-start", + "build": "npm run build:commonjs && npm run build:es" + } + ``` + + Note that the build process above will produce both CommonJS and ES builds. If you just want to produce a single build, the `package.json` may be simplified. For example, to produce a single CommonJS build: + + ```json + "main": "lib/index.js", + "files": [ + "lib" + ], + "scripts": { + "build": "BABEL_ENV=es babel src -d es" + } + ``` +- Tweak your `.gitignore` file: + + Add `lib/` and/or `es/` folder to the gitignore file so that those output folders are never committed. + +- Create `src/index.js` and happy coding! + +#### Webpack based project + +Tweak your Webpack config JavaScript rule to include [`babel-loader`](https://www.npmjs.com/package/babel-loader) and MOXY's preset. Here's an example for a website project using React: + +```js +{ + test: /\.js$/, + use: [ + { + loader: require.resolve('babel-loader'), + options: { + cacheDirectory: true, // Improve performance + presets: [ + [require.resolve('babel-preset-moxy/end-proect'), { + targets: ['browsers'], + react: true, + modules: false, + }], + ], + }, + }, + ], +} +``` + +It's important that you do not exclude the `node_modules` folder so that everything goes through the `@babel/preset-env`, ensuring that all the produced code was transpiled according to the targets. + +### 3. Tweak the options + +Below, you may find a list containing all options you may tweak: + +| Name | Description | Type | Default | in `lib` | in `end-project` | +| ------ | ------------- | -------- | ------- | ------------ | ------------ | +| react | Adds support for [React](https://reactjs.org/) | boolean | false | ✅ | ✅ | +| lodash | Transform to cherry-pick Lodash modules | boolean/[Object](https://github.com/lodash/babel-plugin-lodash#usage) | true | ✅ | ✅ | +| modules | Transform ES6 module syntax to another module type | [string/boolean](https://www.npmjs.com/package/babel-preset-env#modules) | Based on `process.env.BABEL_ENV`, `commonjs` if unspecified | ✅ | ✅ | +| dynamicImport | Adds support for `import()` statements | boolean | true | ✅ | ✅ | +| loose | Enable "loose" transformations for any plugins that allow them | boolean | true | ❌ | ✅ | +| targets | The output targets, see bellow for a more detailed explanation | Array/[Object](https://babeljs.io/docs/en/next/babel-preset-env.html#targets) | ['browsers', 'node'] | ❌ | ✅ | +| env | The environment (`development`, `production` or `test`) | string | Based on `process.env.NODE_ENV` | ❌ | ✅ | +| namedDefaultExport | Use [add-module-exports](https://github.com/59naga/babel-plugin-add-module-exports) plugin to get around [babel/babel#2212](https://github.com/babel/babel/issues/2212) | boolean | true if modules is `commonjs` | ✅ | ❌ | + +#### `lodash` option + +Specify which modules will have the cherry-pick transformation applied. + +Note that `lodash-es`, `lodash-compat` and `lodash/fp` are always added for you, regardless of having this option defined or not. + +For instance, to have smaller bundles when using [recompose](https://github.com/acdlite/recompose): + +```json +{ + "presets": [ + ["babel-preset-moxy/", { + "lodash": { "id": ["recompose"] } + }], + ], +} +``` + +#### `targets` option + +The targets option has a very important role. By default, its value is `['browsers', 'node']` which means that the compiled code will work in both the Browser and in Node.js. + +When `browsers` is specified, the compiled code will work on browsers that are supported by [Google's browser support policy](https://github.com/awkaiser/browserslist-config-google). When `node` is specified, the compiled code will work on the last LTS or higher (currently `v8.9`). + +If your project has different requirements in terms of browser or node support, you may specify the [targets](https://www.npmjs.com/package/babel-preset-env#targets) yourself as an object. + +#### `dynamicImport` option + +Dynamic imports support are enabled by default but are dependent on the `modules` option. More specifically, the [`syntax-dynamic-import`](https://www.npmjs.com/package/@babel/plugin-syntax-dynamic-import) and [`dynamic-import-node`](https://www.npmjs.com/package/babel-plugin-transform-dynamic-import) when the `modules` option is set to `false` and `commonjs` respectively. + +For other `modules` types, such as `amd`, you must find and include a plugin yourself. Also, you may disable the `dynamicImport` option by setting it to `false` in case you want to disable the feature completely or if you want to choose another plugin. + +#### `env` option + +The `env`'s default value respects `process.env.NODE_ENV` and falls back to `production` if none are set. When env is `production`, some plugins that perform code optimization will be enabled. + +The `modules` default value is `commonjs` unless `process.env.BABEL_ENV` is set to `es`. + + +### 4. Be aware of the caveats + +No, seriously. Read the [Caveats](#caveats) section as it contains crucial information and might require you to do a few more steps. + + +## Caveats + +### Polyfills + +#### In libraries + +Shipping polyfills in libraries is, in general, a bad practice because it increases the overall file size of your top-level project due to duplication. + +The [`transform-runtime`](https://www.npmjs.com/package/babel-plugin-transform-runtime) plugin attempts to solve the polyfills and duplication by transforming `Object.assign`, `Promise` and other features to their [`core-js`](https://github.com/zloirock/core-js) counter-parts. Though, this doesn't play well with [`preset-env`](https://github.com/babel/babel-preset-env/tree/1.x/) because it inlines everything, including features that are already supported by our targets. Additionally, if different versions of the runtime are installed, duplication still happens. + +For this reason, you, as an author, should state in the README of your library that you expect the environment to be polyfilled with [`core-js`](https://github.com/zloirock/core-js), [`babel-polyfill`](https://babeljs.io/docs/usage/polyfill/), [`polyfill.io`](https://polyfill.io/) or similar. + +#### In top-level projects + +Simply include `import 'babel-polyfill';` at the top of your entry file. That statement will be replaced with the necessary polyfills based on the targets you want to support. + +```js +// in: +import 'babel-polyfill'; + +// out: +import 'core-js/modules/es6.object.assign'; +import 'core-js/modules/es6.promise'; +// ... +``` + +### Dynamic imports + +The support for dynamic imports is enabled by default, please read more on the [`dynamicImport` option](#dynamicImport). + +The caveat is that [`preset-env`](https://www.npmjs.com/package/babel-preset-env) is unaware that using `import()` with Webpack relies on Promise internally. Environments which do not have builtin support for Promise, like Internet Explorer, will require both the promise and iterator polyfills be added manually. Having said that, tweak your top-level project's Webpack config like so: + +```js +{ + entry: [ + 'core-js/modules/es6.promise', + 'core-js/modules/es6.array.iterator', + // Path to your entry file + ], +}; +``` + +### Minifying + +You must use a minifier that understands ES6+ syntax because the transpiled code might contain ES6+ code. +As an example, UglifyJS v2 only understands ES5 syntax but [UglifyJS v3](https://www.npmjs.com/package/uglify-es) does support ES6+. + + +## Tests + +```sh +$ npm test +$ npm test -- --watch # during development +``` + + +## License + +[MIT License](http://opensource.org/licenses/MIT) diff --git a/babel-preset-moxy/end-project.js b/babel-preset-moxy/end-project.js new file mode 100644 index 0000000..911ab84 --- /dev/null +++ b/babel-preset-moxy/end-project.js @@ -0,0 +1,86 @@ +'use strict'; + +const path = require('path'); +const addDynamicImportSupport = require('./lib/dynamic-import'); +const addReactSupport = require('./lib/react'); +const addLodashSupport = require('./lib/lodash'); + +module.exports = (context, options) => { + options = Object.assign({ + loose: true, + react: false, + lodash: true, + dynamicImport: true, + modules: process.env.BABEL_ENV === 'es' ? false : 'commonjs', // Usually set to `commonjs` or `false` + targets: ['browsers', 'node'], // Can be an array with `browsers` and/or `node` or an object + env: process.env.NODE_ENV || 'production', + }, options); + + const config = { + sourceType: 'unambiguous', + presets: [], + plugins: [], + }; + + // The `preset-env` will activate the necessary features based on our targets + // It's no longer necessary to add `es2015`, `es2016`, etc manually + config.presets.push([require.resolve('@babel/preset-env'), { + // This is required to suppress a warning in newer versions of @babel/preset-env + corejs: 3, + // Replaces `import 'babel-polyfill';` with only the polyfills that are + // actually required based on the targets + useBuiltIns: 'entry', + // Produce less and more readable code (although not as faithful to the semantics) + loose: options.loose, + // Set modules options + modules: options.modules, + // Set the browser support to be the same used by Google (https://www.npmjs.com/package/browserslist-config-google) + // Set Nodejs target to be the latest LTS + targets: Array.isArray(options.targets) ? Object.assign({}, + options.targets.indexOf('node') !== -1 ? { node: '8.9' } : {}, + options.targets.indexOf('browsers') !== -1 ? { browsers: ['extends browserslist-config-google'] } : {} + ) : options.targets, + // Enables support for builtin/feature proposals that have native support by the defined target environments + shippedProposals: true, + }]); + + // The plugins below activate stage 3 features that babel hasn't added to the stage 3 preset yet + config.plugins.push( + // Allows class { handleClick = () => { } static propTypes = { foo: PropTypes.string } } + [require.resolve('@babel/plugin-proposal-class-properties'), { loose: options.loose }], + // Allows obj?.x?.y?.z + require.resolve('@babel/plugin-proposal-optional-chaining'), + // Allows object.foo ?? 'bar' + require.resolve('@babel/plugin-proposal-nullish-coalescing-operator') + ); + + config.plugins.push(['@babel/plugin-transform-runtime', { + // We already have preset-env injecting the core-js polyfills automatically + corejs: false, + // Do not replace babel helpers with calls to moduleName + helpers: false, + // Add import calls whenever generatorRuntime global is found + regenerator: true, + // Choose whether to use ESModules or commonjs depending of the env + useESModules: options.modules !== 'commonjs', + // Use the @babel/runtime this package depends on + absoluteRuntime: path.dirname(require.resolve('@babel/runtime/package.json')), + }]); + + // Adds dynamic import support + if (options.dynamicImport) { + addDynamicImportSupport(config, options.modules); + } + + // Add react support + if (options.react) { + addReactSupport(config, options.env); + } + + // Cherry-pick lodash modules for smaller bundles + if (options.lodash) { + addLodashSupport(config, options.lodash); + } + + return config; +}; diff --git a/babel-preset-moxy/lib.js b/babel-preset-moxy/lib.js new file mode 100644 index 0000000..7d728aa --- /dev/null +++ b/babel-preset-moxy/lib.js @@ -0,0 +1,68 @@ +'use strict'; + +const moduleTransformations = require('@babel/preset-env/lib/module-transformations').default; +const addDynamicImportSupport = require('./lib/dynamic-import'); +const addReactSupport = require('./lib/react'); +const addLodashSupport = require('./lib/lodash'); + +module.exports = (context, options) => { + options = Object.assign({ + react: false, + lodash: true, + dynamicImport: true, + modules: process.env.BABEL_ENV === 'es' ? false : 'commonjs', // Usually set to `commonjs` or `false` + namedDefaultExport: null, + }, options); + + if (options.modules !== 'commonjs' && options.modules !== 'cjs' && options.namedDefaultExport) { + throw new Error('The `namedDefaultExport` option can only be enabled when `modules` is commonjs'); + } + + // Set `namedDefaultExport` default value based on `modules` + if (options.namedDefaultExport == null) { + options.namedDefaultExport = options.modules === 'commonjs'; + } + + const config = { + sourceType: 'unambiguous', + presets: [], + plugins: [], + }; + + // Activate modules transformation + if (moduleTransformations[options.modules]) { + config.plugins.push(`@babel/plugin-${moduleTransformations[options.modules]}`); + } + + // The plugins below activate stage 3 features that babel hasn't added to the stage 3 preset yet + config.plugins.push( + // Allows class { handleClick = () => { } static propTypes = { foo: PropTypes.string } } + require.resolve('@babel/plugin-proposal-class-properties'), + // Allows obj?.x?.y?.z + require.resolve('@babel/plugin-proposal-optional-chaining'), + // Allows object.foo ?? 'bar' + require.resolve('@babel/plugin-proposal-nullish-coalescing-operator') + ); + + // Adds dynamic import support + if (options.dynamicImport) { + addDynamicImportSupport(config, options.modules); + } + + // Add react support without doing any development or production transformations + if (options.react) { + addReactSupport(config, null); + } + + // Cherry-pick lodash modules for smaller bundles + if (options.lodash) { + addLodashSupport(config, options.lodash); + } + + // Add `module.exports = default;`, see https://github.com/59naga/babel-plugin-add-module-exports + if (options.namedDefaultExport) { + config.plugins.push('babel-plugin-add-module-exports'); + } + + return config; +}; diff --git a/babel-preset-moxy/lib/dynamic-import.js b/babel-preset-moxy/lib/dynamic-import.js new file mode 100644 index 0000000..b933529 --- /dev/null +++ b/babel-preset-moxy/lib/dynamic-import.js @@ -0,0 +1,11 @@ +'use strict'; + +const addDynamicImportSupport = (config, modules) => { + if (modules === false) { + config.plugins.push(require.resolve('@babel/plugin-syntax-dynamic-import')); + } else if (modules === 'cjs' || modules === 'commonjs') { + config.plugins.push(require.resolve('babel-plugin-dynamic-import-node')); + } +}; + +module.exports = addDynamicImportSupport; diff --git a/babel-preset-moxy/lib/lodash.js b/babel-preset-moxy/lib/lodash.js new file mode 100644 index 0000000..fb3b0eb --- /dev/null +++ b/babel-preset-moxy/lib/lodash.js @@ -0,0 +1,22 @@ +'use strict'; + +const addLodashSupport = (config, options) => { + // Re-include default ids plus lodash/fp + const baseLodashOptionsIds = [ + 'lodash', + 'lodash-es', + 'lodash-compat', + 'lodash/fp', + ]; + + config.plugins.push([ + require.resolve('babel-plugin-lodash'), + Object.assign( + {}, + options, + { id: baseLodashOptionsIds.concat(options.id || []) } + ), + ]); +}; + +module.exports = addLodashSupport; diff --git a/babel-preset-moxy/lib/react.js b/babel-preset-moxy/lib/react.js new file mode 100644 index 0000000..71cb93b --- /dev/null +++ b/babel-preset-moxy/lib/react.js @@ -0,0 +1,32 @@ +'use strict'; + +const addReactSupport = (config, env) => { + // Add base support + config.plugins.unshift( + require.resolve('@babel/plugin-syntax-jsx'), + [require.resolve('@babel/plugin-transform-react-jsx'), { useBuiltIns: true }], + require.resolve('@babel/plugin-transform-react-display-name') + ); + + // Enable optimizations on production + if (env === 'production') { + config.plugins.push( + [require.resolve('babel-plugin-transform-react-remove-prop-types'), { removeImport: true }] + ); + // The following two plugins are currently necessary to make React warnings include more valuable information + // They are included here because they are currently not enabled in babel-preset-react + // See the below threads for more info: + // https://github.com/babel/babel/issues/4702 + // https://github.com/babel/babel/pull/3540#issuecomment-228673661 + // https://github.com/facebookincubator/create-react-app/issues/989 + } else if (env === 'development') { + config.plugins.push( + // Adds component stack to warning messages + require.resolve('@babel/plugin-transform-react-jsx-source'), + // Adds __self attribute to JSX which React will use for some warnings + require.resolve('@babel/plugin-transform-react-jsx-self') + ); + } +}; + +module.exports = addReactSupport; diff --git a/babel-preset-moxy/package.json b/babel-preset-moxy/package.json new file mode 100644 index 0000000..f0df0c8 --- /dev/null +++ b/babel-preset-moxy/package.json @@ -0,0 +1,83 @@ +{ + "name": "babel-preset-moxy", + "description": "Babel preset to be used at MOXY", + "version": "3.2.0", + "keywords": [ + "babel", + "preset", + "react", + "moxy", + "transpile" + ], + "author": "André Cruz ", + "homepage": "https://github.com/moxystudio/babel-preset-moxy", + "repository": { + "type": "git", + "url": "git@github.com:moxystudio/babel-preset-moxy.git" + }, + "license": "MIT", + "files": [ + "end-project.js", + "lib.js", + "lib" + ], + "scripts": { + "lint": "eslint .", + "test": "jest --env node --coverage", + "prerelease": "npm t && npm run lint", + "release": "standard-version" + }, + "standard-version": { + "scripts": { + "posttag": "git push --follow-tags origin master" + } + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ] + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "dependencies": { + "@babel/plugin-proposal-class-properties": "^7.3.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4", + "@babel/plugin-proposal-optional-chaining": "^7.6.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@babel/plugin-syntax-jsx": "^7.2.0", + "@babel/plugin-transform-react-display-name": "^7.2.0", + "@babel/plugin-transform-react-jsx": "^7.3.0", + "@babel/plugin-transform-react-jsx-self": "^7.2.0", + "@babel/plugin-transform-react-jsx-source": "^7.2.0", + "@babel/plugin-transform-runtime": "^7.4.3", + "@babel/preset-env": "^7.4.3", + "@babel/runtime": "^7.4.3", + "babel-plugin-add-module-exports": "^1.0.0", + "babel-plugin-dynamic-import-node": "^2.2.0", + "babel-plugin-lodash": "^3.3.4", + "babel-plugin-transform-react-remove-prop-types": "^0.4.24", + "browserslist-config-google": "^1.5.0" + }, + "devDependencies": { + "@babel/core": "^7.2.2", + "@commitlint/cli": "^7.1.2", + "@commitlint/config-conventional": "^7.1.2", + "eslint": "^5.5.0", + "eslint-config-moxy": "^7.1.0", + "husky": "^2.1.0", + "jest": "^24.5.0", + "jest-serializer-path": "^0.1.15", + "lint-staged": "^8.1.3", + "standard-version": "^5.0.0" + } +} diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..b7ee1b4 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,55 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const semver = require('semver'); +const pkg = require('./package.json'); + +const supportedNodeVersion = semver.minVersion(pkg.engines.node).version; + +module.exports = { + babelrcRoots: ['examples/*'], + // we don't wanna run the transforms in this file over react native + exclude: /react-native/, + overrides: [ + { + plugins: [ + 'babel-plugin-replace-ts-export-assignment', + require.resolve( + './scripts/babel-plugin-jest-replace-ts-require-assignment.js', + ), + ], + presets: [ + [ + '@babel/preset-typescript', + { + // will be the default in Babel 8, so let's just turn it on now + allowDeclareFields: true, + // will be default in the future, but we don't want to use it + allowNamespaces: false, + }, + ], + ], + test: /\.tsx?$/, + }, + ], + plugins: [ + ['@babel/plugin-transform-modules-commonjs', {allowTopLevelThis: true}], + require.resolve('./scripts/babel-plugin-jest-require-outside-vm'), + ], + presets: [ + [ + '@babel/preset-env', + { + bugfixes: true, + // we manually include the CJS plugin above, so let's make preset-env do less work + modules: false, + shippedProposals: true, + targets: {node: supportedNodeVersion}, + }, + ], + ], +}; diff --git a/bcoe-v8-coverage/.editorconfig b/bcoe-v8-coverage/.editorconfig new file mode 100644 index 0000000..86a63dc --- /dev/null +++ b/bcoe-v8-coverage/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/bcoe-v8-coverage/.gitattributes b/bcoe-v8-coverage/.gitattributes new file mode 100644 index 0000000..4b2c1a2 --- /dev/null +++ b/bcoe-v8-coverage/.gitattributes @@ -0,0 +1,2 @@ +# Enforce `lf` for text files (even on Windows) +text eol=lf diff --git a/bcoe-v8-coverage/CHANGELOG.md b/bcoe-v8-coverage/CHANGELOG.md new file mode 100644 index 0000000..7300dec --- /dev/null +++ b/bcoe-v8-coverage/CHANGELOG.md @@ -0,0 +1,250 @@ +## Next + +- **[Breaking change]** Replace `OutModules` enum by custom compiler option `mjsModule`. +- **[Breaking change]** Drop support for Pug, Sass, Angular & Webpack. +- **[Feature]** Expose custom registries for each target. +- **[Feature]** Add `dist.tscOptions` for `lib` target to override options for + distribution builds. +- **[Feature]** Native ESM tests with mocha. +- **[Fix]** Disable deprecated TsLint rules from the default config +- **[Fix]** Remove use of experimental `fs/promises` module. +- **[Internal]** Fix continuous deployment script (stop confusing PRs to master + with push to master) +- **[Internal]** Update dependencies +- **[Internal]** Fix deprecated Mocha types. + +## 0.17.1 (2017-05-03) + +- **[Fix]** Update dependencies, remove `std/esm` warning. + +## 0.17.0 (2017-04-22) + +- **[Breaking change]** Update dependencies. Use `esm` instead of `@std/esm`, update Typescript to `2.8.3`. +- **[Fix]** Fix Node processes spawn on Windows (Mocha, Nyc) + +## 0.16.2 (2017-02-07) + +- **[Fix]** Fix Typedoc generation: use `tsconfig.json` generated for the lib. +- **[Fix]** Write source map for `.mjs` files +- **[Fix]** Copy sources to `_src` when publishing a lib (#87). +- **[Internal]** Restore continuous deployment of documentation. + +## 0.16.1 (2017-01-20) + +- **[Feature]** Support `mocha` tests on `.mjs` files (using `@std/esm`). Enabled by default + if `outModules` is configured to emit `.mjs`. **You currently need to add + `"@std/esm": {"esm": "cjs"}` to your `package.json`.** + +## 0.16.0 (2017-01-09) + +- **[Breaking change]** Enable `allowSyntheticDefaultImports` and `esModuleInterop` by default +- **[Fix]** Allow deep module imports in default Tslint rules +- **[Fix]** Drop dependency on deprecated `gulp-util` +- **[Internal]** Replace most custom typings by types from `@types` + +## 0.15.8 (2017-12-05) + +- **[Fix]** Exit with non-zero code if command tested with coverage fails +- **[Fix]** Solve duplicated error message when using the `run` mocha task. +- **[Fix]** Exit with non-zero code when building scripts fails. + +## 0.15.7 (2017-11-29) + +- **[Feature]** Add `coverage` task to `mocha` target, use it for the default task + +## 0.15.6 (2017-11-29) + +- **[Fix]** Fix path to source in source maps. +- **[Fix]** Disable `number-literal-format` in default Tslint rules. It enforced uppercase for hex. +- **[Internal]** Enable integration with Greenkeeper. +- **[Internal]** Enable integration with Codecov +- **[Internal]** Enable code coverage + +## 0.15.5 (2017-11-10) + +- **[Feature]** Enable the following TsLint rules: `no-duplicate-switch-case`, `no-implicit-dependencies`, + `no-return-await` +- **[Internal]** Update self-dependency `0.15.4`, this restores the README on _npm_ +- **[Internal]** Add homepage and author fields to package.json + +## 0.15.4 (2017-11-10) + +- **[Fix]** Add support for custom additional copy for distribution builds. [#49](https://github.com/demurgos/turbo-gulp/issues/49) +- **[Internal]** Update self-dependency to `turbo-gulp` +- **[Internal]** Add link to license in `README.md` + +## 0.15.3 (2017-11-09) + +**Rename to `turbo-gulp`**. This package was previously named `demurgos-web-build-tools`. +This version is fully compatible: you can just change the name of your dependency. + +## 0.15.2 (2017-11-09) + +**The package is prepared to be renamed `turbo-gulp`.** +This is the last version released as `demurgos-web-build-tools`. + +- **[Feature]** Add support for watch mode for library targets. +- **[Fix]** Disable experimental support for `*.mjs` by default. +- **[Fix]** Do not emit duplicate TS errors + +## 0.15.1 (2017-10-19) + +- **[Feature]** Add experimental support for `*.mjs` files +- **[Fix]** Fix support of releases from Continuous Deployment using Travis. + +## 0.15.0 (2017-10-18) + +- **[Fix]** Add error handling for git deployment. +- **[Internal]** Enable continuous deployment of the `master` branch. + +## 0.15.0-beta.11 (2017-08-29) + +- **[Feature]** Add `LibTarget.dist.copySrc` option to disable copy of source files to the dist directory. + This allows to prevent issues with missing custom typings. +- **[Fix]** Mark `deploy` property of `LibTarget.typedoc` as optional. +- **[Internal]** Update self-dependency to `v0.15.0-beta.10`. + +## 0.15.0-beta.10 (2017-08-28) + +- **[Breaking]** Update Tslint rules to use `tslint@5.7.0`. +- **[Fix]** Set `allowJs` to false in default TSC options. +- **[Fix]** Do not pipe output of git commands to stdout. +- **[Internal]** Update self-dependency to `v0.15.0-beta.9`. + +## 0.15.0-beta.9 (2017-08-28) + +- **[Breaking]** Drop old-style `test` target. +- **[Breaking]** Drop old-style `node` target. +- **[Feature]** Add `mocha` target to run tests in `spec.ts` files. +- **[Feature]** Add `node` target to build and run top-level Node applications. +- **[Feature]** Provide `generateNodeTasks`, `generateLibTasks` and `generateMochaTasks` functions. + They create the tasks but do not register them. +- **[Fix]** Run `clean` before `dist`, if defined. +- **[Fix]** Run `dist` before `publish`. + +## 0.15.0-beta.8 (2017-08-26) + +- **[Fix]** Remove auth token and registry options for `:dist:publish`. It is better served + by configuring the environment appropriately. + +## 0.15.0-beta.7 (2017-08-26) + +- **[Feature]** Add `clean` task to `lib` targets. +- **[Fix]** Ensure that `gitHead` is defined when publishing a package to npm. + +## 0.15.0-beta.6 (2017-08-22) + +- **[Feature]** Add support for Typedoc deployment to a remote git branch (such as `gh-pages`) +- **[Feature]** Add support for `copy` tasks in new library target. +- **[Fix]** Resolve absolute paths when compiling scripts with custom typings. + +## 0.15.0-beta.5 (2017-08-14) + +- **[Fix]** Fix package entry for the main module. + +## 0.15.0-beta.4 (2017-08-14) + +- **[Breaking]** Drop ES5 build exposed to browsers with the `browser` field in `package.json`. +- **[Feature]** Introduce first new-style target (`LibTarget`). it supports typedoc generation, dev builds and + simple distribution. + +## 0.15.0-beta.3 (2017-08-11) + +- **[Breaking]** Update default lib target to use target-specific `srcDir`. +- **[Feature]** Allow to complete `srcDir` in target. +- **[Feature]** Add experimental library distribution supporting deep requires. + +## 0.15.0-beta.2 (2017-08-10) + +- **[Fix]** Default to CommonJS for project tsconfig.json +- **[Fix]** Add Typescript configuration for default project. +- **[Internal]** Update self-dependency to `0.15.0-beta.1`. + +## 0.15.0-beta.1 (2017-08-09) + +- **[Feature]** Support typed TSLint rules. +- **[Internal]** Update gulpfile.ts to use build tools `0.15.0-beta.0`. +- **[Fix]** Fix regressions caused by `0.15.0-beta.0` (missing type definition). + +## 0.15.0-beta.0 (2017-08-09) + +- **[Breaking]** Expose option interfaces directly in the main module instead of the `config` namespace. +- **[Breaking]** Rename `DEFAULT_PROJECT_OPTIONS` to `DEFAULT_PROJECT`. +- **[Feature]** Emit project-wide `tsconfig.json`. +- **[Internal]** Convert gulpfile to Typescript, use `ts-node` to run it. +- **[Internal]** Update dependencies + +## 0.14.3 (2017-07-16) + +- **[Feature]** Add `:lint:fix` project task to fix some lint errors. + +## 0.14.2 (2017-07-10) + +- **[Internal]** Update dependencies: add `package-lock.json` and update `tslint`. + +## 0.14.1 (2017-06-17) + +- **[Internal]** Update dependencies. +- **[Internal]** Drop dependency on _Bluebird_. +- **[Internal]** Drop dependency on _typings_. + +## 0.14.0 (2017-05-10) + +- **[Breaking]** Enforce trailing commas by default for multiline objects +- **[Feature]** Allow bump from either `master` or a branch with the same name as the tag (exampel: `v1.2.3`) +- **[Feature]** Support TSLint 8, allow to extend the default rules +- **[Patch]** Allow mergeable namespaces + +# 0.13.1 + +- **[Patch]** Allow namespaces in the default TS-Lint config + +# 0.13.0 + +- **[Breaking]** Major overhaul of the angular target. The server build no longer depends on the client. +- **[Breaking]** Update to `gulp@4` (from `gulp@3`) +- **[Breaking]** Update to `tslint@7` (from `tslint@6`), add stricter default rules +- **[Breaking]** Update signature of targetGenerators and project tasks: it only uses + `ProjectOptions` and `Target` now, the additional options are embedded in those two objects. +- **[Breaking]** Remove `:install`, `:instal:npm` and `:install:typings`. Use the `prepare` script in + your `package.json` file instead. +- Add `:tslint.json` project task to generate configuration for `tslint` +- Add first class support for processing of `pug` and `sass` files, similar to `copy` +- Implement end-to-end tests +- Enable `emitDecoratorMetadata` in default typescript options. +- Allow configuration of `:lint` with the `tslintOptions` property of the project configuration. +- Add `:watch` tasks for incremental builds. + +# 0.12.3 + +- Support `templateUrl` and `styleUrls` in angular modules. + +# 0.12.2 + +- Add `:build:copy` task. It copies user-defined files. + +# 0.12.1 + +- Fix `:watch` task. + +# 0.12.0 + +- **[Breaking]**: Change naming convention for tasks. The names primary part is + the target, then the action (`lib:build` instead of `build:lib`) to group + the tasks per target. +- **[Breaking]**: Use `typeRoots` instead of `definitions` in configuration to + specify Typescript definition files. +- Generate `tsconfig.json` file (mainly for editors) +- Implement the `test` target to run unit-tests with `mocha`. + +# 0.11.2 + +- Target `angular`: Add `build::assets:sass` for `.scss` files (Sassy CSS) + +# 0.11.1 + +- Rename project to `web-build-tools` (`demurgos-web-build-tools` on _npm_) +- Target `angular`: Add `build::assets`, `build::pug` and `build::static`. +- Update `gulp-typescript`: solve error message during compilation +- Targets `node` and `angular`: `build::scripts` now include in-lined source maps +- Target `node`: `watch:` to support incremental builds diff --git a/bcoe-v8-coverage/LICENSE.md b/bcoe-v8-coverage/LICENSE.md new file mode 100644 index 0000000..d588b5c --- /dev/null +++ b/bcoe-v8-coverage/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © 2015-2017 Charles Samborski + +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. diff --git a/bcoe-v8-coverage/LICENSE.txt b/bcoe-v8-coverage/LICENSE.txt new file mode 100644 index 0000000..629264e --- /dev/null +++ b/bcoe-v8-coverage/LICENSE.txt @@ -0,0 +1,14 @@ +Copyright (c) 2017, Contributors + +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. diff --git a/bcoe-v8-coverage/README.md b/bcoe-v8-coverage/README.md new file mode 100644 index 0000000..eea761b --- /dev/null +++ b/bcoe-v8-coverage/README.md @@ -0,0 +1,11 @@ +# V8 Coverage + +[![npm](https://img.shields.io/npm/v/@c88/v8-coverage.svg?maxAge=2592000)](https://www.npmjs.com/package/@c88/v8-coverage) +[![GitHub repository](https://img.shields.io/badge/Github-demurgos%2Fv8--coverage-blue.svg)](https://github.com/demurgos/v8-coverage) +[![Build status (Travis)](https://img.shields.io/travis/demurgos/v8-coverage/master.svg?maxAge=2592000)](https://travis-ci.org/demurgos/v8-coverage) +[![Build status (AppVeyor)](https://ci.appveyor.com/api/projects/status/qgcbdffyb9e09d0e?svg=true)](https://ci.appveyor.com/project/demurgos/v8-coverage) +[![Codecov](https://codecov.io/gh/demurgos/v8-coverage/branch/master/graph/badge.svg)](https://codecov.io/gh/demurgos/v8-coverage) + +## License + +[MIT License](./LICENSE.md) diff --git a/bcoe-v8-coverage/gulpfile.ts b/bcoe-v8-coverage/gulpfile.ts new file mode 100644 index 0000000..cdcfc81 --- /dev/null +++ b/bcoe-v8-coverage/gulpfile.ts @@ -0,0 +1,95 @@ +import * as buildTools from "turbo-gulp"; +import { LibTarget, registerLibTasks } from "turbo-gulp/targets/lib"; +import { MochaTarget, registerMochaTasks } from "turbo-gulp/targets/mocha"; + +import gulp from "gulp"; +import minimist from "minimist"; + +interface Options { + devDist?: string; +} + +const options: Options & minimist.ParsedArgs = minimist(process.argv.slice(2), { + string: ["devDist"], + default: {devDist: undefined}, + alias: {devDist: "dev-dist"}, +}); + +const project: buildTools.Project = { + root: __dirname, + packageJson: "package.json", + buildDir: "build", + distDir: "dist", + srcDir: "src", + typescript: {} +}; + +const lib: LibTarget = { + project, + name: "lib", + srcDir: "src/lib", + scripts: ["**/*.ts"], + mainModule: "index", + dist: { + packageJsonMap: (old: buildTools.PackageJson): buildTools.PackageJson => { + const version: string = options.devDist !== undefined ? `${old.version}-build.${options.devDist}` : old.version; + return {...old, version, scripts: undefined, private: false}; + }, + npmPublish: { + tag: options.devDist !== undefined ? "next" : "latest", + }, + }, + tscOptions: { + declaration: true, + skipLibCheck: true, + }, + typedoc: { + dir: "typedoc", + name: "Helpers for V8 coverage files", + deploy: { + repository: "git@github.com:demurgos/v8-coverage.git", + branch: "gh-pages", + }, + }, + copy: [ + { + files: ["**/*.json"], + }, + ], + clean: { + dirs: ["build/lib", "dist/lib"], + }, +}; + +const test: MochaTarget = { + project, + name: "test", + srcDir: "src", + scripts: ["test/**/*.ts", "lib/**/*.ts", "e2e/*/*.ts"], + customTypingsDir: "src/custom-typings", + tscOptions: { + allowSyntheticDefaultImports: true, + esModuleInterop: true, + skipLibCheck: true, + }, + // generateTestMain: true, + copy: [ + { + src: "e2e", + // /(project|test-resources)/ + files: ["*/project/**/*", "*/test-resources/**/*"], + dest: "e2e", + }, + ], + clean: { + dirs: ["build/test"], + }, +}; + +const libTasks: any = registerLibTasks(gulp, lib); +registerMochaTasks(gulp, test); +buildTools.projectTasks.registerAll(gulp, project); + +gulp.task("all:tsconfig.json", gulp.parallel("lib:tsconfig.json", "test:tsconfig.json")); +gulp.task("dist", libTasks.dist); +gulp.task("default", libTasks.dist); diff --git a/bcoe-v8-coverage/package.json b/bcoe-v8-coverage/package.json new file mode 100644 index 0000000..abc28b7 --- /dev/null +++ b/bcoe-v8-coverage/package.json @@ -0,0 +1,48 @@ +{ + "name": "@bcoe/v8-coverage", + "version": "0.2.3", + "description": "Helper functions for V8 coverage files.", + "author": "Charles Samborski (https://demurgos.net)", + "license": "MIT", + "main": "dist/lib/index", + "types": "dist/lib/index.d.ts", + "repository": { + "type": "git", + "url": "git://github.com/demurgos/v8-coverage.git" + }, + "homepage": "https://demurgos.github.io/v8-coverage", + "scripts": { + "prepare": "gulp all:tsconfig.json && gulp dist", + "pretest": "gulp lib:build", + "test": "gulp test", + "lint": "gulp :lint:fix" + }, + "devDependencies": { + "@types/chai": "^4.1.4", + "@types/gulp": "^4.0.5", + "@types/minimist": "^1.2.0", + "@types/mocha": "^5.2.2", + "@types/node": "^10.5.4", + "chai": "^4.1.2", + "codecov": "^3.0.2", + "gulp": "^4.0.0", + "gulp-cli": "^2.0.1", + "minimist": "^1.2.0", + "pre-commit": "^1.2.2", + "ts-node": "^8.3.0", + "turbo-gulp": "^0.20.1" + }, + "nyc": { + "include": [ + "build/test/lib/**/*.js", + "build/test/lib/**/*.mjs" + ], + "reporter": [ + "text", + "html" + ], + "extension": [ + ".mjs" + ] + } +} diff --git a/bcoe-v8-coverage/src/lib/ascii.ts b/bcoe-v8-coverage/src/lib/ascii.ts new file mode 100644 index 0000000..5a52b91 --- /dev/null +++ b/bcoe-v8-coverage/src/lib/ascii.ts @@ -0,0 +1,146 @@ +import { compareRangeCovs } from "./compare"; +import { RangeCov } from "./types"; + +interface ReadonlyRangeTree { + readonly start: number; + readonly end: number; + readonly count: number; + readonly children: ReadonlyRangeTree[]; +} + +export function emitForest(trees: ReadonlyArray): string { + return emitForestLines(trees).join("\n"); +} + +export function emitForestLines(trees: ReadonlyArray): string[] { + const colMap: Map = getColMap(trees); + const header: string = emitOffsets(colMap); + return [header, ...trees.map(tree => emitTree(tree, colMap).join("\n"))]; +} + +function getColMap(trees: Iterable): Map { + const eventSet: Set = new Set(); + for (const tree of trees) { + const stack: ReadonlyRangeTree[] = [tree]; + while (stack.length > 0) { + const cur: ReadonlyRangeTree = stack.pop()!; + eventSet.add(cur.start); + eventSet.add(cur.end); + for (const child of cur.children) { + stack.push(child); + } + } + } + const events: number[] = [...eventSet]; + events.sort((a, b) => a - b); + let maxDigits: number = 1; + for (const event of events) { + maxDigits = Math.max(maxDigits, event.toString(10).length); + } + const colWidth: number = maxDigits + 3; + const colMap: Map = new Map(); + for (const [i, event] of events.entries()) { + colMap.set(event, i * colWidth); + } + return colMap; +} + +function emitTree(tree: ReadonlyRangeTree, colMap: Map): string[] { + const layers: ReadonlyRangeTree[][] = []; + let nextLayer: ReadonlyRangeTree[] = [tree]; + while (nextLayer.length > 0) { + const layer: ReadonlyRangeTree[] = nextLayer; + layers.push(layer); + nextLayer = []; + for (const node of layer) { + for (const child of node.children) { + nextLayer.push(child); + } + } + } + return layers.map(layer => emitTreeLayer(layer, colMap)); +} + +export function parseFunctionRanges(text: string, offsetMap: Map): RangeCov[] { + const result: RangeCov[] = []; + for (const line of text.split("\n")) { + for (const range of parseTreeLayer(line, offsetMap)) { + result.push(range); + } + } + result.sort(compareRangeCovs); + return result; +} + +/** + * + * @param layer Sorted list of disjoint trees. + * @param colMap + */ +function emitTreeLayer(layer: ReadonlyRangeTree[], colMap: Map): string { + const line: string[] = []; + let curIdx: number = 0; + for (const {start, end, count} of layer) { + const startIdx: number = colMap.get(start)!; + const endIdx: number = colMap.get(end)!; + if (startIdx > curIdx) { + line.push(" ".repeat(startIdx - curIdx)); + } + line.push(emitRange(count, endIdx - startIdx)); + curIdx = endIdx; + } + return line.join(""); +} + +function parseTreeLayer(text: string, offsetMap: Map): RangeCov[] { + const result: RangeCov[] = []; + const regex: RegExp = /\[(\d+)-*\)/gs; + while (true) { + const match: RegExpMatchArray | null = regex.exec(text); + if (match === null) { + break; + } + const startIdx: number = match.index!; + const endIdx: number = startIdx + match[0].length; + const count: number = parseInt(match[1], 10); + const startOffset: number | undefined = offsetMap.get(startIdx); + const endOffset: number | undefined = offsetMap.get(endIdx); + if (startOffset === undefined || endOffset === undefined) { + throw new Error(`Invalid offsets for: ${JSON.stringify(text)}`); + } + result.push({startOffset, endOffset, count}); + } + return result; +} + +function emitRange(count: number, len: number): string { + const rangeStart: string = `[${count.toString(10)}`; + const rangeEnd: string = ")"; + const hyphensLen: number = len - (rangeStart.length + rangeEnd.length); + const hyphens: string = "-".repeat(Math.max(0, hyphensLen)); + return `${rangeStart}${hyphens}${rangeEnd}`; +} + +function emitOffsets(colMap: Map): string { + let line: string = ""; + for (const [event, col] of colMap) { + if (line.length < col) { + line += " ".repeat(col - line.length); + } + line += event.toString(10); + } + return line; +} + +export function parseOffsets(text: string): Map { + const result: Map = new Map(); + const regex: RegExp = /\d+/gs; + while (true) { + const match: RegExpExecArray | null = regex.exec(text); + if (match === null) { + break; + } + result.set(match.index, parseInt(match[0], 10)); + } + return result; +} diff --git a/bcoe-v8-coverage/src/lib/clone.ts b/bcoe-v8-coverage/src/lib/clone.ts new file mode 100644 index 0000000..1a91019 --- /dev/null +++ b/bcoe-v8-coverage/src/lib/clone.ts @@ -0,0 +1,70 @@ +import { FunctionCov, ProcessCov, RangeCov, ScriptCov } from "./types"; + +/** + * Creates a deep copy of a process coverage. + * + * @param processCov Process coverage to clone. + * @return Cloned process coverage. + */ +export function cloneProcessCov(processCov: Readonly): ProcessCov { + const result: ScriptCov[] = []; + for (const scriptCov of processCov.result) { + result.push(cloneScriptCov(scriptCov)); + } + + return { + result, + }; +} + +/** + * Creates a deep copy of a script coverage. + * + * @param scriptCov Script coverage to clone. + * @return Cloned script coverage. + */ +export function cloneScriptCov(scriptCov: Readonly): ScriptCov { + const functions: FunctionCov[] = []; + for (const functionCov of scriptCov.functions) { + functions.push(cloneFunctionCov(functionCov)); + } + + return { + scriptId: scriptCov.scriptId, + url: scriptCov.url, + functions, + }; +} + +/** + * Creates a deep copy of a function coverage. + * + * @param functionCov Function coverage to clone. + * @return Cloned function coverage. + */ +export function cloneFunctionCov(functionCov: Readonly): FunctionCov { + const ranges: RangeCov[] = []; + for (const rangeCov of functionCov.ranges) { + ranges.push(cloneRangeCov(rangeCov)); + } + + return { + functionName: functionCov.functionName, + ranges, + isBlockCoverage: functionCov.isBlockCoverage, + }; +} + +/** + * Creates a deep copy of a function coverage. + * + * @param rangeCov Range coverage to clone. + * @return Cloned range coverage. + */ +export function cloneRangeCov(rangeCov: Readonly): RangeCov { + return { + startOffset: rangeCov.startOffset, + endOffset: rangeCov.endOffset, + count: rangeCov.count, + }; +} diff --git a/bcoe-v8-coverage/src/lib/compare.ts b/bcoe-v8-coverage/src/lib/compare.ts new file mode 100644 index 0000000..8f5614c --- /dev/null +++ b/bcoe-v8-coverage/src/lib/compare.ts @@ -0,0 +1,40 @@ +import { FunctionCov, RangeCov, ScriptCov } from "./types"; + +/** + * Compares two script coverages. + * + * The result corresponds to the comparison of their `url` value (alphabetical sort). + */ +export function compareScriptCovs(a: Readonly, b: Readonly): number { + if (a.url === b.url) { + return 0; + } else if (a.url < b.url) { + return -1; + } else { + return 1; + } +} + +/** + * Compares two function coverages. + * + * The result corresponds to the comparison of the root ranges. + */ +export function compareFunctionCovs(a: Readonly, b: Readonly): number { + return compareRangeCovs(a.ranges[0], b.ranges[0]); +} + +/** + * Compares two range coverages. + * + * The ranges are first ordered by ascending `startOffset` and then by + * descending `endOffset`. + * This corresponds to a pre-order tree traversal. + */ +export function compareRangeCovs(a: Readonly, b: Readonly): number { + if (a.startOffset !== b.startOffset) { + return a.startOffset - b.startOffset; + } else { + return b.endOffset - a.endOffset; + } +} diff --git a/bcoe-v8-coverage/src/lib/index.ts b/bcoe-v8-coverage/src/lib/index.ts new file mode 100644 index 0000000..f92bdf3 --- /dev/null +++ b/bcoe-v8-coverage/src/lib/index.ts @@ -0,0 +1,6 @@ +export { emitForest, emitForestLines, parseFunctionRanges, parseOffsets } from "./ascii"; +export { cloneFunctionCov, cloneProcessCov, cloneScriptCov, cloneRangeCov } from "./clone"; +export { compareScriptCovs, compareFunctionCovs, compareRangeCovs } from "./compare"; +export { mergeFunctionCovs, mergeProcessCovs, mergeScriptCovs } from "./merge"; +export { RangeTree } from "./range-tree"; +export { ProcessCov, ScriptCov, FunctionCov, RangeCov } from "./types"; diff --git a/bcoe-v8-coverage/src/lib/merge.ts b/bcoe-v8-coverage/src/lib/merge.ts new file mode 100644 index 0000000..64d1918 --- /dev/null +++ b/bcoe-v8-coverage/src/lib/merge.ts @@ -0,0 +1,343 @@ +import { + deepNormalizeScriptCov, + normalizeFunctionCov, + normalizeProcessCov, + normalizeRangeTree, + normalizeScriptCov, +} from "./normalize"; +import { RangeTree } from "./range-tree"; +import { FunctionCov, ProcessCov, Range, RangeCov, ScriptCov } from "./types"; + +/** + * Merges a list of process coverages. + * + * The result is normalized. + * The input values may be mutated, it is not safe to use them after passing + * them to this function. + * The computation is synchronous. + * + * @param processCovs Process coverages to merge. + * @return Merged process coverage. + */ +export function mergeProcessCovs(processCovs: ReadonlyArray): ProcessCov { + if (processCovs.length === 0) { + return {result: []}; + } + + const urlToScripts: Map = new Map(); + for (const processCov of processCovs) { + for (const scriptCov of processCov.result) { + let scriptCovs: ScriptCov[] | undefined = urlToScripts.get(scriptCov.url); + if (scriptCovs === undefined) { + scriptCovs = []; + urlToScripts.set(scriptCov.url, scriptCovs); + } + scriptCovs.push(scriptCov); + } + } + + const result: ScriptCov[] = []; + for (const scripts of urlToScripts.values()) { + // assert: `scripts.length > 0` + result.push(mergeScriptCovs(scripts)!); + } + const merged: ProcessCov = {result}; + + normalizeProcessCov(merged); + return merged; +} + +/** + * Merges a list of matching script coverages. + * + * Scripts are matching if they have the same `url`. + * The result is normalized. + * The input values may be mutated, it is not safe to use them after passing + * them to this function. + * The computation is synchronous. + * + * @param scriptCovs Process coverages to merge. + * @return Merged script coverage, or `undefined` if the input list was empty. + */ +export function mergeScriptCovs(scriptCovs: ReadonlyArray): ScriptCov | undefined { + if (scriptCovs.length === 0) { + return undefined; + } else if (scriptCovs.length === 1) { + const merged: ScriptCov = scriptCovs[0]; + deepNormalizeScriptCov(merged); + return merged; + } + + const first: ScriptCov = scriptCovs[0]; + const scriptId: string = first.scriptId; + const url: string = first.url; + + const rangeToFuncs: Map = new Map(); + for (const scriptCov of scriptCovs) { + for (const funcCov of scriptCov.functions) { + const rootRange: string = stringifyFunctionRootRange(funcCov); + let funcCovs: FunctionCov[] | undefined = rangeToFuncs.get(rootRange); + + if (funcCovs === undefined || + // if the entry in rangeToFuncs is function-level granularity and + // the new coverage is block-level, prefer block-level. + (!funcCovs[0].isBlockCoverage && funcCov.isBlockCoverage)) { + funcCovs = []; + rangeToFuncs.set(rootRange, funcCovs); + } else if (funcCovs[0].isBlockCoverage && !funcCov.isBlockCoverage) { + // if the entry in rangeToFuncs is block-level granularity, we should + // not append function level granularity. + continue; + } + funcCovs.push(funcCov); + } + } + + const functions: FunctionCov[] = []; + for (const funcCovs of rangeToFuncs.values()) { + // assert: `funcCovs.length > 0` + functions.push(mergeFunctionCovs(funcCovs)!); + } + + const merged: ScriptCov = {scriptId, url, functions}; + normalizeScriptCov(merged); + return merged; +} + +/** + * Returns a string representation of the root range of the function. + * + * This string can be used to match function with same root range. + * The string is derived from the start and end offsets of the root range of + * the function. + * This assumes that `ranges` is non-empty (true for valid function coverages). + * + * @param funcCov Function coverage with the range to stringify + * @internal + */ +function stringifyFunctionRootRange(funcCov: Readonly): string { + const rootRange: RangeCov = funcCov.ranges[0]; + return `${rootRange.startOffset.toString(10)};${rootRange.endOffset.toString(10)}`; +} + +/** + * Merges a list of matching function coverages. + * + * Functions are matching if their root ranges have the same span. + * The result is normalized. + * The input values may be mutated, it is not safe to use them after passing + * them to this function. + * The computation is synchronous. + * + * @param funcCovs Function coverages to merge. + * @return Merged function coverage, or `undefined` if the input list was empty. + */ +export function mergeFunctionCovs(funcCovs: ReadonlyArray): FunctionCov | undefined { + if (funcCovs.length === 0) { + return undefined; + } else if (funcCovs.length === 1) { + const merged: FunctionCov = funcCovs[0]; + normalizeFunctionCov(merged); + return merged; + } + + const functionName: string = funcCovs[0].functionName; + + const trees: RangeTree[] = []; + for (const funcCov of funcCovs) { + // assert: `fn.ranges.length > 0` + // assert: `fn.ranges` is sorted + trees.push(RangeTree.fromSortedRanges(funcCov.ranges)!); + } + + // assert: `trees.length > 0` + const mergedTree: RangeTree = mergeRangeTrees(trees)!; + normalizeRangeTree(mergedTree); + const ranges: RangeCov[] = mergedTree.toRanges(); + const isBlockCoverage: boolean = !(ranges.length === 1 && ranges[0].count === 0); + + const merged: FunctionCov = {functionName, ranges, isBlockCoverage}; + // assert: `merged` is normalized + return merged; +} + +/** + * @precondition Same `start` and `end` for all the trees + */ +function mergeRangeTrees(trees: ReadonlyArray): RangeTree | undefined { + if (trees.length <= 1) { + return trees[0]; + } + const first: RangeTree = trees[0]; + let delta: number = 0; + for (const tree of trees) { + delta += tree.delta; + } + const children: RangeTree[] = mergeRangeTreeChildren(trees); + return new RangeTree(first.start, first.end, delta, children); +} + +class RangeTreeWithParent { + readonly parentIndex: number; + readonly tree: RangeTree; + + constructor(parentIndex: number, tree: RangeTree) { + this.parentIndex = parentIndex; + this.tree = tree; + } +} + +class StartEvent { + readonly offset: number; + readonly trees: RangeTreeWithParent[]; + + constructor(offset: number, trees: RangeTreeWithParent[]) { + this.offset = offset; + this.trees = trees; + } + + static compare(a: StartEvent, b: StartEvent): number { + return a.offset - b.offset; + } +} + +class StartEventQueue { + private readonly queue: StartEvent[]; + private nextIndex: number; + private pendingOffset: number; + private pendingTrees: RangeTreeWithParent[] | undefined; + + private constructor(queue: StartEvent[]) { + this.queue = queue; + this.nextIndex = 0; + this.pendingOffset = 0; + this.pendingTrees = undefined; + } + + static fromParentTrees(parentTrees: ReadonlyArray): StartEventQueue { + const startToTrees: Map = new Map(); + for (const [parentIndex, parentTree] of parentTrees.entries()) { + for (const child of parentTree.children) { + let trees: RangeTreeWithParent[] | undefined = startToTrees.get(child.start); + if (trees === undefined) { + trees = []; + startToTrees.set(child.start, trees); + } + trees.push(new RangeTreeWithParent(parentIndex, child)); + } + } + const queue: StartEvent[] = []; + for (const [startOffset, trees] of startToTrees) { + queue.push(new StartEvent(startOffset, trees)); + } + queue.sort(StartEvent.compare); + return new StartEventQueue(queue); + } + + setPendingOffset(offset: number): void { + this.pendingOffset = offset; + } + + pushPendingTree(tree: RangeTreeWithParent): void { + if (this.pendingTrees === undefined) { + this.pendingTrees = []; + } + this.pendingTrees.push(tree); + } + + next(): StartEvent | undefined { + const pendingTrees: RangeTreeWithParent[] | undefined = this.pendingTrees; + const nextEvent: StartEvent | undefined = this.queue[this.nextIndex]; + if (pendingTrees === undefined) { + this.nextIndex++; + return nextEvent; + } else if (nextEvent === undefined) { + this.pendingTrees = undefined; + return new StartEvent(this.pendingOffset, pendingTrees); + } else { + if (this.pendingOffset < nextEvent.offset) { + this.pendingTrees = undefined; + return new StartEvent(this.pendingOffset, pendingTrees); + } else { + if (this.pendingOffset === nextEvent.offset) { + this.pendingTrees = undefined; + for (const tree of pendingTrees) { + nextEvent.trees.push(tree); + } + } + this.nextIndex++; + return nextEvent; + } + } + } +} + +function mergeRangeTreeChildren(parentTrees: ReadonlyArray): RangeTree[] { + const result: RangeTree[] = []; + const startEventQueue: StartEventQueue = StartEventQueue.fromParentTrees(parentTrees); + const parentToNested: Map = new Map(); + let openRange: Range | undefined; + + while (true) { + const event: StartEvent | undefined = startEventQueue.next(); + if (event === undefined) { + break; + } + + if (openRange !== undefined && openRange.end <= event.offset) { + result.push(nextChild(openRange, parentToNested)); + openRange = undefined; + } + + if (openRange === undefined) { + let openRangeEnd: number = event.offset + 1; + for (const {parentIndex, tree} of event.trees) { + openRangeEnd = Math.max(openRangeEnd, tree.end); + insertChild(parentToNested, parentIndex, tree); + } + startEventQueue.setPendingOffset(openRangeEnd); + openRange = {start: event.offset, end: openRangeEnd}; + } else { + for (const {parentIndex, tree} of event.trees) { + if (tree.end > openRange.end) { + const right: RangeTree = tree.split(openRange.end); + startEventQueue.pushPendingTree(new RangeTreeWithParent(parentIndex, right)); + } + insertChild(parentToNested, parentIndex, tree); + } + } + } + if (openRange !== undefined) { + result.push(nextChild(openRange, parentToNested)); + } + + return result; +} + +function insertChild(parentToNested: Map, parentIndex: number, tree: RangeTree): void { + let nested: RangeTree[] | undefined = parentToNested.get(parentIndex); + if (nested === undefined) { + nested = []; + parentToNested.set(parentIndex, nested); + } + nested.push(tree); +} + +function nextChild(openRange: Range, parentToNested: Map): RangeTree { + const matchingTrees: RangeTree[] = []; + + for (const nested of parentToNested.values()) { + if (nested.length === 1 && nested[0].start === openRange.start && nested[0].end === openRange.end) { + matchingTrees.push(nested[0]); + } else { + matchingTrees.push(new RangeTree( + openRange.start, + openRange.end, + 0, + nested, + )); + } + } + parentToNested.clear(); + return mergeRangeTrees(matchingTrees)!; +} diff --git a/bcoe-v8-coverage/src/lib/normalize.ts b/bcoe-v8-coverage/src/lib/normalize.ts new file mode 100644 index 0000000..0269116 --- /dev/null +++ b/bcoe-v8-coverage/src/lib/normalize.ts @@ -0,0 +1,84 @@ +import { compareFunctionCovs, compareRangeCovs, compareScriptCovs } from "./compare"; +import { RangeTree } from "./range-tree"; +import { FunctionCov, ProcessCov, ScriptCov } from "./types"; + +/** + * Normalizes a process coverage. + * + * Sorts the scripts alphabetically by `url`. + * Reassigns script ids: the script at index `0` receives `"0"`, the script at + * index `1` receives `"1"` etc. + * This does not normalize the script coverages. + * + * @param processCov Process coverage to normalize. + */ +export function normalizeProcessCov(processCov: ProcessCov): void { + processCov.result.sort(compareScriptCovs); + for (const [scriptId, scriptCov] of processCov.result.entries()) { + scriptCov.scriptId = scriptId.toString(10); + } +} + +/** + * Normalizes a process coverage deeply. + * + * Normalizes the script coverages deeply, then normalizes the process coverage + * itself. + * + * @param processCov Process coverage to normalize. + */ +export function deepNormalizeProcessCov(processCov: ProcessCov): void { + for (const scriptCov of processCov.result) { + deepNormalizeScriptCov(scriptCov); + } + normalizeProcessCov(processCov); +} + +/** + * Normalizes a script coverage. + * + * Sorts the function by root range (pre-order sort). + * This does not normalize the function coverages. + * + * @param scriptCov Script coverage to normalize. + */ +export function normalizeScriptCov(scriptCov: ScriptCov): void { + scriptCov.functions.sort(compareFunctionCovs); +} + +/** + * Normalizes a script coverage deeply. + * + * Normalizes the function coverages deeply, then normalizes the script coverage + * itself. + * + * @param scriptCov Script coverage to normalize. + */ +export function deepNormalizeScriptCov(scriptCov: ScriptCov): void { + for (const funcCov of scriptCov.functions) { + normalizeFunctionCov(funcCov); + } + normalizeScriptCov(scriptCov); +} + +/** + * Normalizes a function coverage. + * + * Sorts the ranges (pre-order sort). + * TODO: Tree-based normalization of the ranges. + * + * @param funcCov Function coverage to normalize. + */ +export function normalizeFunctionCov(funcCov: FunctionCov): void { + funcCov.ranges.sort(compareRangeCovs); + const tree: RangeTree = RangeTree.fromSortedRanges(funcCov.ranges)!; + normalizeRangeTree(tree); + funcCov.ranges = tree.toRanges(); +} + +/** + * @internal + */ +export function normalizeRangeTree(tree: RangeTree): void { + tree.normalize(); +} diff --git a/bcoe-v8-coverage/src/lib/range-tree.ts b/bcoe-v8-coverage/src/lib/range-tree.ts new file mode 100644 index 0000000..941ec82 --- /dev/null +++ b/bcoe-v8-coverage/src/lib/range-tree.ts @@ -0,0 +1,156 @@ +import { RangeCov } from "./types"; + +export class RangeTree { + start: number; + end: number; + delta: number; + children: RangeTree[]; + + constructor( + start: number, + end: number, + delta: number, + children: RangeTree[], + ) { + this.start = start; + this.end = end; + this.delta = delta; + this.children = children; + } + + /** + * @precodition `ranges` are well-formed and pre-order sorted + */ + static fromSortedRanges(ranges: ReadonlyArray): RangeTree | undefined { + let root: RangeTree | undefined; + // Stack of parent trees and parent counts. + const stack: [RangeTree, number][] = []; + for (const range of ranges) { + const node: RangeTree = new RangeTree(range.startOffset, range.endOffset, range.count, []); + if (root === undefined) { + root = node; + stack.push([node, range.count]); + continue; + } + let parent: RangeTree; + let parentCount: number; + while (true) { + [parent, parentCount] = stack[stack.length - 1]; + // assert: `top !== undefined` (the ranges are sorted) + if (range.startOffset < parent.end) { + break; + } else { + stack.pop(); + } + } + node.delta -= parentCount; + parent.children.push(node); + stack.push([node, range.count]); + } + return root; + } + + normalize(): void { + const children: RangeTree[] = []; + let curEnd: number; + let head: RangeTree | undefined; + const tail: RangeTree[] = []; + for (const child of this.children) { + if (head === undefined) { + head = child; + } else if (child.delta === head.delta && child.start === curEnd!) { + tail.push(child); + } else { + endChain(); + head = child; + } + curEnd = child.end; + } + if (head !== undefined) { + endChain(); + } + + if (children.length === 1) { + const child: RangeTree = children[0]; + if (child.start === this.start && child.end === this.end) { + this.delta += child.delta; + this.children = child.children; + // `.lazyCount` is zero for both (both are after normalization) + return; + } + } + + this.children = children; + + function endChain(): void { + if (tail.length !== 0) { + head!.end = tail[tail.length - 1].end; + for (const tailTree of tail) { + for (const subChild of tailTree.children) { + subChild.delta += tailTree.delta - head!.delta; + head!.children.push(subChild); + } + } + tail.length = 0; + } + head!.normalize(); + children.push(head!); + } + } + + /** + * @precondition `tree.start < value && value < tree.end` + * @return RangeTree Right part + */ + split(value: number): RangeTree { + let leftChildLen: number = this.children.length; + let mid: RangeTree | undefined; + + // TODO(perf): Binary search (check overhead) + for (let i: number = 0; i < this.children.length; i++) { + const child: RangeTree = this.children[i]; + if (child.start < value && value < child.end) { + mid = child.split(value); + leftChildLen = i + 1; + break; + } else if (child.start >= value) { + leftChildLen = i; + break; + } + } + + const rightLen: number = this.children.length - leftChildLen; + const rightChildren: RangeTree[] = this.children.splice(leftChildLen, rightLen); + if (mid !== undefined) { + rightChildren.unshift(mid); + } + const result: RangeTree = new RangeTree( + value, + this.end, + this.delta, + rightChildren, + ); + this.end = value; + return result; + } + + /** + * Get the range coverages corresponding to the tree. + * + * The ranges are pre-order sorted. + */ + toRanges(): RangeCov[] { + const ranges: RangeCov[] = []; + // Stack of parent trees and counts. + const stack: [RangeTree, number][] = [[this, 0]]; + while (stack.length > 0) { + const [cur, parentCount]: [RangeTree, number] = stack.pop()!; + const count: number = parentCount + cur.delta; + ranges.push({startOffset: cur.start, endOffset: cur.end, count}); + for (let i: number = cur.children.length - 1; i >= 0; i--) { + stack.push([cur.children[i], count]); + } + } + return ranges; + } +} diff --git a/bcoe-v8-coverage/src/lib/types.ts b/bcoe-v8-coverage/src/lib/types.ts new file mode 100644 index 0000000..cc2cfc5 --- /dev/null +++ b/bcoe-v8-coverage/src/lib/types.ts @@ -0,0 +1,26 @@ +export interface ProcessCov { + result: ScriptCov[]; +} + +export interface ScriptCov { + scriptId: string; + url: string; + functions: FunctionCov[]; +} + +export interface FunctionCov { + functionName: string; + ranges: RangeCov[]; + isBlockCoverage: boolean; +} + +export interface Range { + readonly start: number; + readonly end: number; +} + +export interface RangeCov { + startOffset: number; + endOffset: number; + count: number; +} diff --git a/bcoe-v8-coverage/src/test/merge.spec.ts b/bcoe-v8-coverage/src/test/merge.spec.ts new file mode 100644 index 0000000..9d5522a --- /dev/null +++ b/bcoe-v8-coverage/src/test/merge.spec.ts @@ -0,0 +1,280 @@ +import chai from "chai"; +import fs from "fs"; +import path from "path"; +import { FunctionCov, mergeFunctionCovs, mergeProcessCovs, mergeScriptCovs, ProcessCov, ScriptCov } from "../lib"; + +const REPO_ROOT: string = path.join(__dirname, "..", "..", "..", ".."); +const BENCHES_INPUT_DIR: string = path.join(REPO_ROOT, "benches"); +const BENCHES_DIR: string = path.join(REPO_ROOT, "test-data", "merge", "benches"); +const RANGES_DIR: string = path.join(REPO_ROOT, "test-data", "merge", "ranges"); +const BENCHES_TIMEOUT: number = 20000; // 20sec + +interface MergeRangeItem { + name: string; + status: "run" | "skip" | "only"; + inputs: ProcessCov[]; + expected: ProcessCov; +} + +const FIXTURES_DIR: string = path.join(REPO_ROOT, "test-data", "bugs"); +function loadFixture(name: string) { + const content: string = fs.readFileSync( + path.resolve(FIXTURES_DIR, `${name}.json`), + {encoding: "UTF-8"}, + ); + return JSON.parse(content); +} + +describe("merge", () => { + describe("Various", () => { + it("accepts empty arrays for `mergeProcessCovs`", () => { + const inputs: ProcessCov[] = []; + const expected: ProcessCov = {result: []}; + const actual: ProcessCov = mergeProcessCovs(inputs); + chai.assert.deepEqual(actual, expected); + }); + + it("accepts empty arrays for `mergeScriptCovs`", () => { + const inputs: ScriptCov[] = []; + const expected: ScriptCov | undefined = undefined; + const actual: ScriptCov | undefined = mergeScriptCovs(inputs); + chai.assert.deepEqual(actual, expected); + }); + + it("accepts empty arrays for `mergeFunctionCovs`", () => { + const inputs: FunctionCov[] = []; + const expected: FunctionCov | undefined = undefined; + const actual: FunctionCov | undefined = mergeFunctionCovs(inputs); + chai.assert.deepEqual(actual, expected); + }); + + it("accepts arrays with a single item for `mergeProcessCovs`", () => { + const inputs: ProcessCov[] = [ + { + result: [ + { + scriptId: "123", + url: "/lib.js", + functions: [ + { + functionName: "test", + isBlockCoverage: true, + ranges: [ + {startOffset: 0, endOffset: 4, count: 2}, + {startOffset: 1, endOffset: 2, count: 1}, + {startOffset: 2, endOffset: 3, count: 1}, + ], + }, + ], + }, + ], + }, + ]; + const expected: ProcessCov = { + result: [ + { + scriptId: "0", + url: "/lib.js", + functions: [ + { + functionName: "test", + isBlockCoverage: true, + ranges: [ + {startOffset: 0, endOffset: 4, count: 2}, + {startOffset: 1, endOffset: 3, count: 1}, + ], + }, + ], + }, + ], + }; + const actual: ProcessCov = mergeProcessCovs(inputs); + chai.assert.deepEqual(actual, expected); + }); + + describe("mergeProcessCovs", () => { + // see: https://github.com/demurgos/v8-coverage/issues/2 + it("handles function coverage merged into block coverage", () => { + const blockCoverage: ProcessCov = loadFixture("issue-2-block-coverage"); + const functionCoverage: ProcessCov = loadFixture("issue-2-func-coverage"); + const inputs: ProcessCov[] = [ + functionCoverage, + blockCoverage, + ]; + const expected: ProcessCov = loadFixture("issue-2-expected"); + const actual: ProcessCov = mergeProcessCovs(inputs); + chai.assert.deepEqual(actual, expected); + }); + + // see: https://github.com/demurgos/v8-coverage/issues/2 + it("handles block coverage merged into function coverage", () => { + const blockCoverage: ProcessCov = loadFixture("issue-2-block-coverage"); + const functionCoverage: ProcessCov = loadFixture("issue-2-func-coverage"); + const inputs: ProcessCov[] = [ + blockCoverage, + functionCoverage, + ]; + const expected: ProcessCov = loadFixture("issue-2-expected"); + const actual: ProcessCov = mergeProcessCovs(inputs); + chai.assert.deepEqual(actual, expected); + }); + }); + + it("accepts arrays with a single item for `mergeScriptCovs`", () => { + const inputs: ScriptCov[] = [ + { + scriptId: "123", + url: "/lib.js", + functions: [ + { + functionName: "test", + isBlockCoverage: true, + ranges: [ + {startOffset: 0, endOffset: 4, count: 2}, + {startOffset: 1, endOffset: 2, count: 1}, + {startOffset: 2, endOffset: 3, count: 1}, + ], + }, + ], + }, + ]; + const expected: ScriptCov | undefined = { + scriptId: "123", + url: "/lib.js", + functions: [ + { + functionName: "test", + isBlockCoverage: true, + ranges: [ + {startOffset: 0, endOffset: 4, count: 2}, + {startOffset: 1, endOffset: 3, count: 1}, + ], + }, + ], + }; + const actual: ScriptCov | undefined = mergeScriptCovs(inputs); + chai.assert.deepEqual(actual, expected); + }); + + it("accepts arrays with a single item for `mergeFunctionCovs`", () => { + const inputs: FunctionCov[] = [ + { + functionName: "test", + isBlockCoverage: true, + ranges: [ + {startOffset: 0, endOffset: 4, count: 2}, + {startOffset: 1, endOffset: 2, count: 1}, + {startOffset: 2, endOffset: 3, count: 1}, + ], + }, + ]; + const expected: FunctionCov = { + functionName: "test", + isBlockCoverage: true, + ranges: [ + {startOffset: 0, endOffset: 4, count: 2}, + {startOffset: 1, endOffset: 3, count: 1}, + ], + }; + const actual: FunctionCov | undefined = mergeFunctionCovs(inputs); + chai.assert.deepEqual(actual, expected); + }); + }); + + describe("ranges", () => { + for (const sourceFile of getSourceFiles()) { + const relPath: string = path.relative(RANGES_DIR, sourceFile); + describe(relPath, () => { + const content: string = fs.readFileSync(sourceFile, {encoding: "UTF-8"}); + const items: MergeRangeItem[] = JSON.parse(content); + for (const item of items) { + const test: () => void = () => { + const actual: ProcessCov | undefined = mergeProcessCovs(item.inputs); + chai.assert.deepEqual(actual, item.expected); + }; + switch (item.status) { + case "run": + it(item.name, test); + break; + case "only": + it.only(item.name, test); + break; + case "skip": + it.skip(item.name, test); + break; + default: + throw new Error(`Unexpected status: ${item.status}`); + } + } + }); + } + }); + + describe("benches", () => { + for (const bench of getBenches()) { + const BENCHES_TO_SKIP: Set = new Set(); + if (process.env.CI === "true") { + // Skip very large benchmarks when running continuous integration + BENCHES_TO_SKIP.add("node@10.11.0"); + BENCHES_TO_SKIP.add("npm@6.4.1"); + } + + const name: string = path.basename(bench); + + if (BENCHES_TO_SKIP.has(name)) { + it.skip(`${name} (skipped: too large for CI)`, testBench); + } else { + it(name, testBench); + } + + async function testBench(this: Mocha.Context) { + this.timeout(BENCHES_TIMEOUT); + + const inputFileNames: string[] = await fs.promises.readdir(bench); + const inputPromises: Promise[] = []; + for (const inputFileName of inputFileNames) { + const resolved: string = path.join(bench, inputFileName); + inputPromises.push(fs.promises.readFile(resolved).then(buffer => JSON.parse(buffer.toString("UTF-8")))); + } + const inputs: ProcessCov[] = await Promise.all(inputPromises); + const expectedPath: string = path.join(BENCHES_DIR, `${name}.json`); + const expectedContent: string = await fs.promises.readFile(expectedPath, {encoding: "UTF-8"}) as string; + const expected: ProcessCov = JSON.parse(expectedContent); + const startTime: number = Date.now(); + const actual: ProcessCov | undefined = mergeProcessCovs(inputs); + const endTime: number = Date.now(); + console.error(`Time (${name}): ${(endTime - startTime) / 1000}`); + chai.assert.deepEqual(actual, expected); + console.error(`OK: ${name}`); + } + } + }); +}); + +function getSourceFiles() { + return getSourcesFrom(RANGES_DIR); + + function* getSourcesFrom(dir: string): Iterable { + const names: string[] = fs.readdirSync(dir); + for (const name of names) { + const resolved: string = path.join(dir, name); + const stat: fs.Stats = fs.statSync(resolved); + if (stat.isDirectory()) { + yield* getSourcesFrom(dir); + } else { + yield resolved; + } + } + } +} + +function* getBenches(): Iterable { + const names: string[] = fs.readdirSync(BENCHES_INPUT_DIR); + for (const name of names) { + const resolved: string = path.join(BENCHES_INPUT_DIR, name); + const stat: fs.Stats = fs.statSync(resolved); + if (stat.isDirectory()) { + yield resolved; + } + } +} diff --git a/bcoe-v8-coverage/tsconfig.json b/bcoe-v8-coverage/tsconfig.json new file mode 100644 index 0000000..73db48f --- /dev/null +++ b/bcoe-v8-coverage/tsconfig.json @@ -0,0 +1,59 @@ +{ + "compilerOptions": { + "allowJs": false, + "allowSyntheticDefaultImports": true, + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "alwaysStrict": true, + "charset": "utf8", + "checkJs": false, + "declaration": false, + "disableSizeLimit": false, + "downlevelIteration": false, + "emitBOM": false, + "emitDecoratorMetadata": true, + "esModuleInterop": true, + "experimentalDecorators": true, + "forceConsistentCasingInFileNames": true, + "importHelpers": false, + "inlineSourceMap": false, + "inlineSources": false, + "isolatedModules": false, + "lib": [ + "es2017", + "esnext.asynciterable" + ], + "locale": "en-us", + "module": "commonjs", + "moduleResolution": "node", + "newLine": "lf", + "noEmit": false, + "noEmitHelpers": false, + "noEmitOnError": true, + "noErrorTruncation": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "noStrictGenericChecks": false, + "noUnusedLocals": true, + "noUnusedParameters": false, + "noImplicitUseStrict": false, + "noLib": false, + "noResolve": false, + "preserveConstEnums": false, + "removeComments": false, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "strictNullChecks": true, + "suppressExcessPropertyErrors": false, + "suppressImplicitAnyIndexErrors": false, + "target": "es2017", + "traceResolution": false, + "typeRoots": [ + "src/lib/custom-typings", + "node_modules/@types" + ] + } +} diff --git a/benchmarks/test-file-overhead/.gitignore b/benchmarks/test-file-overhead/.gitignore new file mode 100644 index 0000000..a68ced8 --- /dev/null +++ b/benchmarks/test-file-overhead/.gitignore @@ -0,0 +1 @@ +[1-9]*.test.js diff --git a/benchmarks/test-file-overhead/0.test.js b/benchmarks/test-file-overhead/0.test.js new file mode 100644 index 0000000..bed12c3 --- /dev/null +++ b/benchmarks/test-file-overhead/0.test.js @@ -0,0 +1,8 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +it('is fast', () => {}); diff --git a/benchmarks/test-file-overhead/README.md b/benchmarks/test-file-overhead/README.md new file mode 100644 index 0000000..d60998e --- /dev/null +++ b/benchmarks/test-file-overhead/README.md @@ -0,0 +1,7 @@ +First, run `./prepare.sh` to generate the benchmark files. On Windows, use a Bash (WSL, Git, Cygwin …) to do this, but you can use CMD for the actual benchmark run if the CMD environment is what you want to benchmark for. + +To run the benchmark, use a benchmarking tool such as [hyperfine](https://github.com/sharkdp/hyperfine): + +```sh +hyperfine -w 3 -m 10 ../../jest /tmp/other-jest-clone-to-compare-against/jest +``` diff --git a/benchmarks/test-file-overhead/package.json b/benchmarks/test-file-overhead/package.json new file mode 100644 index 0000000..148788b --- /dev/null +++ b/benchmarks/test-file-overhead/package.json @@ -0,0 +1,5 @@ +{ + "jest": { + "testEnvironment": "node" + } +} diff --git a/benchmarks/test-file-overhead/prepare.sh b/benchmarks/test-file-overhead/prepare.sh new file mode 100755 index 0000000..569a785 --- /dev/null +++ b/benchmarks/test-file-overhead/prepare.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +for i in {1..499}; do + cp 0.test.js $i.test.js +done diff --git a/benchmarks/test-file-overhead/yarn.lock b/benchmarks/test-file-overhead/yarn.lock new file mode 100644 index 0000000..00246b9 --- /dev/null +++ b/benchmarks/test-file-overhead/yarn.lock @@ -0,0 +1,11 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 4 + +"root-workspace-0b6124@workspace:.": + version: 0.0.0-use.local + resolution: "root-workspace-0b6124@workspace:." + languageName: unknown + linkType: soft diff --git a/char-regex/.editorconfig b/char-regex/.editorconfig new file mode 100644 index 0000000..991f40f --- /dev/null +++ b/char-regex/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = tab + +[*.md] +trim_trailing_whitespace = false diff --git a/char-regex/.github/CODE_OF_CONDUCT.md b/char-regex/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e8c372c --- /dev/null +++ b/char-regex/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# 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 richiebendall@gmail.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][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/char-regex/.github/FUNDING.yml b/char-regex/.github/FUNDING.yml new file mode 100644 index 0000000..93c623d --- /dev/null +++ b/char-regex/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: richienb # Replace with a single Patreon username +open_collective: richie-bendall # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: richienb # Replace with a single Liberapay username +issuehunt: richienb # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/char-regex/.github/ISSUE_TEMPLATE/bug_report.md b/char-regex/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..2537f25 --- /dev/null +++ b/char-regex/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,40 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "" +labels: "" +assignees: "" +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] + +**Smartphone (please complete the following information):** + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/char-regex/.github/ISSUE_TEMPLATE/feature_request.md b/char-regex/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..2bc5d5f --- /dev/null +++ b/char-regex/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "" +labels: "" +assignees: "" +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/char-regex/.travis.yml b/char-regex/.travis.yml new file mode 100644 index 0000000..97b9739 --- /dev/null +++ b/char-regex/.travis.yml @@ -0,0 +1,8 @@ +language: node_js + +cache: + - yarn + +node_js: + - "lts/*" + - "node" diff --git a/char-regex/LICENSE b/char-regex/LICENSE new file mode 100644 index 0000000..04c5e76 --- /dev/null +++ b/char-regex/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Richie Bendall + +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. diff --git a/char-regex/README.md b/char-regex/README.md new file mode 100644 index 0000000..835ae8a --- /dev/null +++ b/char-regex/README.md @@ -0,0 +1,27 @@ +# Char Regex [![Travis CI Build Status](https://img.shields.io/travis/com/Richienb/char-regex/master.svg?style=for-the-badge)](https://travis-ci.com/Richienb/char-regex) + +A regex to match any full character, considering weird character ranges. Tested on every single emoji and unicode character. Based on the Lodash implementation. + +[![NPM Badge](https://nodei.co/npm/char-regex.png)](https://npmjs.com/package/char-regex) + +## Install + +```sh +npm install char-regex +``` + +## Usage + +```js +const charRegex = require("char-regex"); + +"❤️👊🏽".match(/./); +//=> ["", "", "", "", "", "", ""] + +"❤️👊🏽".match(charRegex()); +//=> ["❤️", "👊🏽"] +``` + +## API + +### charRegex() diff --git a/char-regex/index.d.ts b/char-regex/index.d.ts new file mode 100644 index 0000000..e074471 --- /dev/null +++ b/char-regex/index.d.ts @@ -0,0 +1,13 @@ +/** + * A regex to match any full character, considering weird character ranges. + * @example + * ``` + * const charRegex = require("char-regex"); + * + * "❤️👊🏽".match(charRegex()); + * //=> ["❤️", "👊🏽"] + * ``` +*/ +declare function charRegex(): RegExp + +export = charRegex diff --git a/char-regex/index.js b/char-regex/index.js new file mode 100644 index 0000000..436cc68 --- /dev/null +++ b/char-regex/index.js @@ -0,0 +1,39 @@ +"use strict" + +// Based on: https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js + +module.exports = () => { + // Used to compose unicode character classes. + const astralRange = "\\ud800-\\udfff" + const comboMarksRange = "\\u0300-\\u036f" + const comboHalfMarksRange = "\\ufe20-\\ufe2f" + const comboSymbolsRange = "\\u20d0-\\u20ff" + const comboMarksExtendedRange = "\\u1ab0-\\u1aff" + const comboMarksSupplementRange = "\\u1dc0-\\u1dff" + const comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange + const varRange = "\\ufe0e\\ufe0f" + const familyRange = "\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93" + + // Used to compose unicode capture groups. + const astral = `[${astralRange}]` + const combo = `[${comboRange}]` + const fitz = "\\ud83c[\\udffb-\\udfff]" + const modifier = `(?:${combo}|${fitz})` + const nonAstral = `[^${astralRange}]` + const regional = "(?:\\uD83C[\\uDDE6-\\uDDFF]){2}" + const surrogatePair = "[\\ud800-\\udbff][\\udc00-\\udfff]" + const zwj = "\\u200d" + const blackFlag = "(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)" + const family = `[${familyRange}]` + + // Used to compose unicode regexes. + const optModifier = `${modifier}?` + const optVar = `[${varRange}]?` + const optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join("|")})${optVar + optModifier})*` + const seq = optVar + optModifier + optJoin + const nonAstralCombo = `${nonAstral}${combo}?` + const symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join("|")})` + + // Used to match [String symbols](https://mathiasbynens.be/notes/javascript-unicode). + return new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, "g") +} diff --git a/char-regex/package.json b/char-regex/package.json new file mode 100644 index 0000000..ac12599 --- /dev/null +++ b/char-regex/package.json @@ -0,0 +1,44 @@ +{ + "name": "char-regex", + "version": "1.0.2", + "description": "A regex to match any full character, considering weird character ranges.", + "repository": "https://github.com/Richienb/char-regex.git", + "author": "Richie Bendall ", + "license": "MIT", + "main": "index.js", + "files": [ + "index.js", + "index.d.ts" + ], + "engines": { + "node": ">=10" + }, + "scripts": { + "lint": "xo", + "test": "yarn lint && ava" + }, + "keywords": [ + "character", + "regex", + "match", + "split", + "length" + ], + "dependencies": {}, + "devDependencies": { + "@babel/core": "^7.8.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "array-uniq": "^2.1.0", + "ava": "^3.0.0", + "emoji.json": "^12.1.1", + "eslint-config-richienb": "^0.3.0", + "unicode-chars": "^1.0.1", + "xo": "^0.25.3" + }, + "resolutions": { + "eslint": "^6.8.0" + }, + "xo": { + "extends": "richienb/node" + } +} diff --git a/char-regex/test.js b/char-regex/test.js new file mode 100644 index 0000000..90e8481 --- /dev/null +++ b/char-regex/test.js @@ -0,0 +1,17 @@ +const test = require("ava") +const arrayUniq = require("array-uniq") +const unicodeChars = arrayUniq([...require("unicode-chars")(), ...require("emoji.json").map(({ char }) => char)]) +const charRegex = require(".")() + +// See: https://mathiasbynens.be/notes/javascript-unicode#poo-test +test("The Pile of Poo Test™", (t) => { + t.deepEqual("Iñtërnâtiônàlizætiøn☃💩".match(charRegex), [ + "I", "ñ", "t", "ë", "r", "n", "â", "t", "i", "ô", "n", "à", "l", "i", "z", "æ", "t", "i", "ø", "n", "☃", "💩", + ]) +}) + +unicodeChars.forEach((character) => { + test(`Test "${character}"`, (t) => { + t.deepEqual(character.match(charRegex), [character]) + }) +}) diff --git a/char-regex/yarn.lock b/char-regex/yarn.lock new file mode 100644 index 0000000..07c3d13 --- /dev/null +++ b/char-regex/yarn.lock @@ -0,0 +1,4590 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/core@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" + integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.4" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.4" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.4" + "@babel/types" "^7.8.3" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" + integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== + dependencies: + "@babel/types" "^7.8.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + +"@babel/helper-create-regexp-features-plugin@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz#c774268c95ec07ee92476a3862b75cc2839beb79" + integrity sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q== + dependencies: + "@babel/helper-regex" "^7.8.3" + regexpu-core "^4.6.0" + +"@babel/helper-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" + integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helper-get-function-arity@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" + integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-plugin-utils@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" + integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== + +"@babel/helper-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.8.3.tgz#139772607d51b93f23effe72105b319d2a4c6965" + integrity sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ== + dependencies: + lodash "^4.17.13" + +"@babel/helper-split-export-declaration@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" + integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helpers@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" + integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== + dependencies: + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.4" + "@babel/types" "^7.8.3" + +"@babel/highlight@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" + integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.8.3", "@babel/parser@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" + integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== + +"@babel/plugin-proposal-unicode-property-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz#b646c3adea5f98800c9ab45105ac34d06cd4a47f" + integrity sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/template@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" + integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/traverse@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" + integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.4" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.4" + "@babel/types" "^7.8.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" + integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@concordance/react@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@concordance/react/-/react-2.0.0.tgz#aef913f27474c53731f4fd79cc2f54897de90fde" + integrity sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA== + dependencies: + arrify "^1.0.1" + +"@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.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" + integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== + dependencies: + "@nodelib/fs.stat" "2.0.3" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" + integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== + +"@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.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" + integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + dependencies: + "@nodelib/fs.scandir" "2.1.3" + fastq "^1.6.0" + +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + +"@types/eslint-visitor-keys@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" + integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== + +"@types/events@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + +"@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/json-schema@^7.0.3": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" + integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== + +"@types/minimatch@*", "@types/minimatch@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node@*": + version "13.1.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.8.tgz#1d590429fe8187a02707720ecf38a6fe46ce294b" + integrity sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A== + +"@types/normalize-package-data@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" + integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== + +"@typescript-eslint/eslint-plugin@^2.6.0": + version "2.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.16.0.tgz#bf339b7db824c7cc3fd1ebedbc88dd17016471af" + integrity sha512-TKWbeFAKRPrvKiR9GNxErQ8sELKqg1ZvXi6uho07mcKShBnCnqNpDQWP01FEvWKf0bxM2g7uQEI5MNjSNqvUpQ== + dependencies: + "@typescript-eslint/experimental-utils" "2.16.0" + eslint-utils "^1.4.3" + functional-red-black-tree "^1.0.1" + regexpp "^3.0.0" + tsutils "^3.17.1" + +"@typescript-eslint/experimental-utils@2.16.0": + version "2.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.16.0.tgz#bba65685728c532e0ddc811a0376e8d38e671f77" + integrity sha512-bXTmAztXpqxliDKZgvWkl+5dHeRN+jqXVZ16peKKFzSXVzT6mz8kgBpHiVzEKO2NZ8OCU7dG61K9sRS/SkUUFQ== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "2.16.0" + eslint-scope "^5.0.0" + +"@typescript-eslint/parser@^2.6.0": + version "2.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.16.0.tgz#d0c0135a8fdb915f670802ddd7c1ba457c1b4f9d" + integrity sha512-+w8dMaYETM9v6il1yYYkApMSiwgnqXWJbXrA94LAWN603vXHACsZTirJduyeBOJjA9wT6xuXe5zZ1iCUzoxCfw== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "2.16.0" + "@typescript-eslint/typescript-estree" "2.16.0" + eslint-visitor-keys "^1.1.0" + +"@typescript-eslint/typescript-estree@2.16.0": + version "2.16.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.16.0.tgz#b444943a76c716ed32abd08cbe96172d2ca0ab75" + integrity sha512-hyrCYjFHISos68Bk5KjUAXw0pP/455qq9nxqB1KkT67Pxjcfw+r6Yhcmqnp8etFL45UexCHUMrADHH7dI/m2WQ== + dependencies: + debug "^4.1.1" + eslint-visitor-keys "^1.1.0" + glob "^7.1.6" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^6.3.0" + tsutils "^3.17.1" + +acorn-jsx@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384" + integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw== + +acorn@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" + integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== + +aggregate-error@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" + integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.0, ajv@^6.10.2: + version "6.11.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9" + integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA== + 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" + +ansi-align@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" + integrity sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw== + dependencies: + string-width "^3.0.0" + +ansi-escapes@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-escapes@^4.2.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d" + integrity sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg== + dependencies: + type-fest "^0.8.1" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^3.2.0, 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, ansi-styles@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + 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" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +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 sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-differ@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" + integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== + +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 sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= + +array-includes@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.1.tgz#cdd67e6852bdf9c1215460786732255ed2459348" + integrity sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0" + is-string "^1.0.5" + +array-union@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + 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 sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-uniq@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-2.1.0.tgz#46603d5e28e79bfd02b046fcc1d77c6820bd8e98" + integrity sha512-bdHxtev7FN6+MXI1YFW0Q8mQ8dTJc2S8AMfju+ZR77pbg2yAdVyDlwkaUI7Har0LyOMRFPHrJ9lYdyjZZswdlQ== + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +array.prototype.flat@^1.2.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" + integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +arrgv@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arrgv/-/arrgv-1.0.2.tgz#025ed55a6a433cad9b604f8112fc4292715a6ec0" + integrity sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw== + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +arrify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +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== + +ava@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ava/-/ava-3.0.0.tgz#1a80da2d8298d26f0f255964c1791b83b6f4979d" + integrity sha512-ev72DZrWJRdZbvDDjbAwrfzJ0KEX5cDM5XNtIrgQjJmMR6yLM/T/WJ2jWF21ylrRdMbdG6E3Wrpa+psvzqC4OA== + dependencies: + "@concordance/react" "^2.0.0" + ansi-styles "^4.2.1" + arrgv "^1.0.2" + arrify "^2.0.1" + chalk "^3.0.0" + chokidar "^3.3.1" + chunkd "^2.0.1" + ci-parallel-vars "^1.0.0" + clean-stack "^2.2.0" + clean-yaml-object "^0.1.0" + cli-cursor "^3.1.0" + cli-truncate "^2.1.0" + code-excerpt "^2.1.1" + common-path-prefix "^3.0.0" + concordance "^4.0.0" + convert-source-map "^1.7.0" + currently-unhandled "^0.4.1" + debug "^4.1.1" + del "^5.1.0" + emittery "^0.5.1" + equal-length "^1.0.0" + figures "^3.1.0" + globby "^11.0.0" + ignore-by-default "^1.0.0" + import-local "^3.0.2" + indent-string "^4.0.0" + is-ci "^2.0.0" + is-error "^2.2.2" + is-plain-object "^3.0.0" + is-promise "^2.1.0" + lodash "^4.17.15" + matcher "^2.1.0" + md5-hex "^3.0.1" + ms "^2.1.2" + ora "^4.0.3" + p-map "^3.0.0" + picomatch "^2.2.1" + pkg-conf "^3.1.0" + plur "^3.1.1" + pretty-ms "^5.1.0" + read-pkg "^5.2.0" + resolve-cwd "^3.0.0" + slash "^3.0.0" + source-map-support "^0.5.16" + stack-utils "^2.0.1" + strip-ansi "^6.0.0" + supertap "^1.0.0" + temp-dir "^2.0.0" + trim-off-newlines "^1.0.1" + update-notifier "^4.0.0" + write-file-atomic "^3.0.1" + yargs "^15.1.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +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" + +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== + +blueimp-md5@^2.10.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.12.0.tgz#be7367938a889dec3ffbb71138617c117e9c130a" + integrity sha512-zo+HIdIhzojv6F1siQPqPFROyVy7C50KzHv/k/Iz+BtvtVzSHXiMXOpq2wCfNkeBqdCv+V8XOV96tsEt2W/3rQ== + +boxen@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-3.2.0.tgz#fbdff0de93636ab4450886b6ff45b92d098f45eb" + integrity sha512-cU4J/+NodM3IHdSL2yN8bqYqnmlBTidDR4RC7nJs61ZmtGz8VZzM3HLQX0zY5mrSmPtR3xWwsq2jOUQqFZN8+A== + dependencies: + ansi-align "^3.0.0" + camelcase "^5.3.1" + chalk "^2.4.2" + cli-boxes "^2.2.0" + string-width "^3.0.0" + term-size "^1.2.0" + type-fest "^0.3.0" + widest-line "^2.0.0" + +boxen@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64" + integrity sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ== + dependencies: + ansi-align "^3.0.0" + camelcase "^5.3.1" + chalk "^3.0.0" + cli-boxes "^2.2.0" + string-width "^4.1.0" + term-size "^2.1.0" + type-fest "^0.8.1" + widest-line "^3.1.0" + +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.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" + +buf-compare@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buf-compare/-/buf-compare-1.0.1.tgz#fef28da8b8113a0a0db4430b0b6467b69730b34a" + integrity sha1-/vKNqLgROgoNtEMLC2Rntpcws0o= + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +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@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^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 sha1-JtII6onje1y95gJQoV8DHBak1ms= + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase-keys@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" + integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= + dependencies: + camelcase "^4.1.0" + map-obj "^2.0.0" + quick-lru "^1.0.0" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +camelcase@^5.0.0, 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== + +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: + 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@^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" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +chokidar@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" + integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.3.0" + optionalDependencies: + fsevents "~2.1.2" + +chunkd@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/chunkd/-/chunkd-2.0.1.tgz#49cd1d7b06992dc4f7fccd962fe2a101ee7da920" + integrity sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ== + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +ci-parallel-vars@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-parallel-vars/-/ci-parallel-vars-1.0.0.tgz#af97729ed1c7381911ca37bcea263d62638701b3" + integrity sha512-u6dx20FBXm+apMi+5x7UVm6EH7BL1gc4XrcnQewjcB7HWRcor/V5qWc3RG2HwpgDJ26gIi2DSEu3B7sXynAw/g== + +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" + +clean-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/clean-regexp/-/clean-regexp-1.0.0.tgz#8df7c7aae51fd36874e8f8d05b9180bc11a3fed7" + integrity sha1-jffHquUf02h06PjQW5GAvBGj/tc= + dependencies: + escape-string-regexp "^1.0.5" + +clean-stack@^2.0.0, clean-stack@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +clean-yaml-object@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68" + integrity sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g= + +cli-boxes@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" + integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77" + integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ== + +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.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 sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +code-excerpt@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/code-excerpt/-/code-excerpt-2.1.1.tgz#5fe3057bfbb71a5f300f659ef2cc0a47651ba77c" + integrity sha512-tJLhH3EpFm/1x7heIW0hemXJTUU5EWl2V0EIX558jp05Mt1U6DVryCgkp3l37cxqs+DNbNgxG43SkwJXpQ14Jw== + dependencies: + convert-to-spaces "^1.0.1" + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +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 sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +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== + +common-path-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" + integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +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 sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concordance@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/concordance/-/concordance-4.0.0.tgz#5932fdee397d129bdbc3a1885fbe69839b1b7e15" + integrity sha512-l0RFuB8RLfCS0Pt2Id39/oCPykE01pyxgAFypWTlaGRgvLkZrtczZ8atEHpTeEIW+zYWXTBuA9cCSeEOScxReQ== + dependencies: + date-time "^2.1.0" + esutils "^2.0.2" + fast-diff "^1.1.2" + js-string-escape "^1.0.1" + lodash.clonedeep "^4.5.0" + lodash.flattendeep "^4.4.0" + lodash.islength "^4.0.1" + lodash.merge "^4.6.1" + md5-hex "^2.0.0" + semver "^5.5.1" + well-known-symbols "^2.0.0" + +configstore@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-4.0.0.tgz#5933311e95d3687efb592c528b922d9262d227e7" + integrity sha512-CmquAXFBocrzaSM8mtGPMM/HiWmyIpr4CcJl/rgY2uCObZ/S7cKU0silxslqJejl+t/T9HS8E0PUNQD81JGUEQ== + dependencies: + dot-prop "^4.1.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + unique-string "^1.0.0" + write-file-atomic "^2.0.0" + xdg-basedir "^3.0.0" + +configstore@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.0.tgz#37de662c7a49b5fe8dbcf8f6f5818d2d81ed852b" + integrity sha512-eE/hvMs7qw7DlcB5JPRnthmrITuHMmACUJAp89v6PT6iOqzoLS7HRWhBtuHMlhNHo2AhUSA/3Dh1bKNJHcublQ== + dependencies: + dot-prop "^5.1.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" + +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + +convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + +convert-to-spaces@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz#7e3e48bbe6d997b1417ddca2868204b4d3d85715" + integrity sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU= + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-assert@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/core-assert/-/core-assert-0.2.1.tgz#f85e2cf9bfed28f773cc8b3fa5c5b69bdc02fe3f" + integrity sha1-+F4s+b/tKPdzzIs/pcW2m9wC/j8= + dependencies: + buf-compare "^1.0.0" + is-error "^2.2.0" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +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" + +crypto-random-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" + integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= + +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== + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= + dependencies: + array-find-index "^1.0.1" + +date-time@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/date-time/-/date-time-2.1.0.tgz#0286d1b4c769633b3ca13e1e62558d2dbdc2eba2" + integrity sha512-/9+C44X7lot0IeiyfgJmETtRMhBidBYM2QFFIkGa0U1k+hSyY87Nw7PY3eDqpvCBm7I3WCSfPeZskW/YYq6m4g== + dependencies: + time-zone "^1.0.0" + +debug@^2.2.0, debug@^2.3.3, 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@^4.0.1, debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize-keys@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= + dependencies: + decamelize "^1.1.0" + map-obj "^1.0.0" + +decamelize@^1.1.0, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +deep-strict-equal@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/deep-strict-equal/-/deep-strict-equal-0.2.0.tgz#4a078147a8ab57f6a0d4f5547243cd22f44eb4e4" + integrity sha1-SgeBR6irV/ag1PVUckPNIvROtOQ= + dependencies: + core-assert "^0.2.0" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +defer-to-connect@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.1.tgz#88ae694b93f67b81815a2c8c769aef6574ac8f2f" + integrity sha512-J7thop4u3mRTkYRQ+Vpfwy2G5Ehoy82I14+14W4YMDLKdWloI9gSzRbV30s/NckQGVJtPkWNcW4oMAUigTdqiQ== + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + 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 sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + 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" + +del@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7" + integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA== + dependencies: + globby "^10.0.1" + graceful-fs "^4.2.2" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.1" + p-map "^3.0.0" + rimraf "^3.0.0" + slash "^3.0.0" + +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= + +dir-glob@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4" + integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw== + dependencies: + 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" + +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +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" + +dot-prop@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== + dependencies: + is-obj "^1.0.0" + +dot-prop@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" + integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== + dependencies: + is-obj "^2.0.0" + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +emittery@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.5.1.tgz#9fbbf57e9aecc258d727d78858a598eb05ea5c96" + integrity sha512-sYZXNHH9PhTfs98ROEFVC3bLiR8KSqXQsEHIwZ9J6H0RaQObC3JYq4G8IvDd0b45/LxfGKYBpmaUN4LiKytaNw== + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +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.json@^12.1.1: + version "12.1.1" + resolved "https://registry.yarnpkg.com/emoji.json/-/emoji.json-12.1.1.tgz#fd0fb150fbafd6a8260ac6b28fce4a777abf75fa" + integrity sha512-oW/iqLXVeJM6aRWVLyz/cJ9BZXYQu2RnKsQOi8S9Vd6BM8pc9Hud42MV36r7f3OQVXf3FbfQZrCUz3mvKAMFIA== + +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" + +enhance-visitors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/enhance-visitors/-/enhance-visitors-1.0.0.tgz#aa945d05da465672a1ebd38fee2ed3da8518e95a" + integrity sha1-qpRdBdpGVnKh69OP7i7T2oUY6Vo= + dependencies: + lodash "^4.13.1" + +env-editor@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/env-editor/-/env-editor-0.4.1.tgz#77011e08ce45f46e404e8d996b465c684ca57502" + integrity sha512-suh+Vm00GnPQgXpmONTkcUT9LgBSL6sJrRnJxbykT0j+ONjzmIS+1U3ne467ArdZN/42/npp+GnhtwkLQ+vUjw== + +equal-length@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/equal-length/-/equal-length-1.0.1.tgz#21ca112d48ab24b4e1e7ffc0e5339d31fdfc274c" + integrity sha1-IcoRLUirJLTh5//A5TOdMf38J0w= + +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" + +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1: + version "1.17.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.3.tgz#d921ff5889a3664921094bb13aaf0dfd11818578" + integrity sha512-AwiVPKf3sKGMoWtFw0J7Y4MTZ4Iek67k4COWOwHqS8B9TOZ71DCfcoBmdamy8Y6mj4MDz0+VNUpC2HKHFHA3pg== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +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" + +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 sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +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== + +eslint-ast-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz#3d58ba557801cfb1c941d68131ee9f8c34bd1586" + integrity sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA== + dependencies: + lodash.get "^4.4.2" + lodash.zip "^4.2.0" + +eslint-config-deprecated@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-deprecated/-/eslint-config-deprecated-1.0.0.tgz#d7ccc2082a2d49c670e2022162ebe8088812af46" + integrity sha512-kDiR3cdZqllgv4Brs7CSempMpWIoO7CPombTcBQVGNszVgoa5YKZhshw0ycxb3JquVYQ3UbBfSe4R34Z50UInQ== + +eslint-config-google@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/eslint-config-google/-/eslint-config-google-0.14.0.tgz#4f5f8759ba6e11b424294a219dbfa18c508bcc1a" + integrity sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw== + +eslint-config-prettier@^6.3.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.9.0.tgz#430d24822e82f7deb1e22a435bfa3999fae4ad64" + integrity sha512-k4E14HBtcLv0uqThaI6I/n1LEqROp8XaPu6SO9Z32u5NlGRC07Enu1Bh2KEFw4FNHbekH8yzbIU9kUGxbiGmCA== + dependencies: + get-stdin "^6.0.0" + +eslint-config-richienb@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-richienb/-/eslint-config-richienb-0.3.0.tgz#4746c00557948524f4947b5202fe37c39b0c7121" + integrity sha512-l/iHOgYmrxVrG6pjRLb97xWDpYx4X4N/KbBCUblUwJb5a+pdvIuX/gXzUDHQnBbqnHDjrBzSpUMKsgSsc5+eZw== + dependencies: + "@typescript-eslint/eslint-plugin" "^2.6.0" + "@typescript-eslint/parser" "^2.6.0" + eslint-config-deprecated "^1.0.0" + eslint-config-google "^0.14.0" + eslint-plugin-import "^2.20.0" + eslint-plugin-node "^11.0.0" + eslint-plugin-promise "^4.2.1" + eslint-plugin-unicorn "^15.0.0" + typescript "^3.6.4" + +eslint-config-xo@^0.27.1: + version "0.27.2" + resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.27.2.tgz#71aff3d5b5554e9e5b5e1853e21da7799bb53f1f" + integrity sha512-qEuZP0zNQkWpOdNZvWnfY2GNp1AZ33uXgeOXl4DN5YVLHFvekHbeSM2FFZ8A489fp1rCCColVRlJsYMf28o4DA== + +eslint-formatter-pretty@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/eslint-formatter-pretty/-/eslint-formatter-pretty-2.1.1.tgz#0794a1009195d14e448053fe99667413b7d02e44" + integrity sha512-gWfagucSWBn82WxzwFloBTLAcwYDgnpAfiV5pQfyAV5YpZikuLflRU8nc3Ts9wnNvLhwk4blzb42/C495Yw7BA== + dependencies: + ansi-escapes "^3.1.0" + chalk "^2.1.0" + eslint-rule-docs "^1.1.5" + log-symbols "^2.0.0" + plur "^3.0.1" + string-width "^2.0.0" + supports-hyperlinks "^1.0.1" + +eslint-import-resolver-node@^0.3.2: + version "0.3.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz#dbaa52b6b2816b50bc6711af75422de808e98404" + integrity sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.4.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz#7878f7504824e1b857dd2505b59a8e5eda26a708" + integrity sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q== + dependencies: + debug "^2.6.9" + pkg-dir "^2.0.0" + +eslint-plugin-ava@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-ava/-/eslint-plugin-ava-9.0.0.tgz#a8d569ae7127aa640e344c46d1f288976543b1bd" + integrity sha512-mJqQ1wQ9pxBi5Pu+grrqjfuSLxiSSgnpa5p5vMdEpBqA9n9cUzSCv0xMZ/NkTMAj5ieOB3TWF8j+7C30Yiv4RA== + dependencies: + deep-strict-equal "^0.2.0" + enhance-visitors "^1.0.0" + espree "^6.0.0" + espurify "^2.0.0" + import-modules "^1.1.0" + pkg-dir "^4.2.0" + resolve-from "^5.0.0" + +eslint-plugin-es@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz#0f5f5da5f18aa21989feebe8a73eadefb3432976" + integrity sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ== + dependencies: + eslint-utils "^1.4.2" + regexpp "^3.0.0" + +eslint-plugin-es@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.0.tgz#98cb1bc8ab0aa807977855e11ad9d1c9422d014b" + integrity sha512-6/Jb/J/ZvSebydwbBJO1R9E5ky7YeElfK56Veh7e4QGFHCXoIXGH9HhVz+ibJLM3XJ1XjP+T7rKBLUa/Y7eIng== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-eslint-comments@^3.0.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.1.2.tgz#4ef6c488dbe06aa1627fea107b3e5d059fc8a395" + integrity sha512-QexaqrNeteFfRTad96W+Vi4Zj1KFbkHHNMMaHZEYcovKav6gdomyGzaxSDSL3GoIyUOo078wRAdYlu1caiauIQ== + dependencies: + escape-string-regexp "^1.0.5" + ignore "^5.0.5" + +eslint-plugin-import@^2.18.2, eslint-plugin-import@^2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.20.0.tgz#d749a7263fb6c29980def8e960d380a6aa6aecaa" + integrity sha512-NK42oA0mUc8Ngn4kONOPsPB1XhbUvNHqF+g307dPV28aknPoiNnKLFd9em4nkswwepdF5ouieqv5Th/63U7YJQ== + dependencies: + array-includes "^3.0.3" + array.prototype.flat "^1.2.1" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.2" + eslint-module-utils "^2.4.1" + has "^1.0.3" + minimatch "^3.0.4" + object.values "^1.1.0" + read-pkg-up "^2.0.0" + resolve "^1.12.0" + +eslint-plugin-no-use-extend-native@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.4.1.tgz#b2a631219b6a2e91b4370ef6559a754356560a40" + integrity sha512-tDkHM0kvxU0M2TpLRKGfFrpWXctFdTDY7VkiDTLYDaX90hMSJKkr/FiWThEXvKV0Dvffut2Z0B9Y7+h/k6suiA== + dependencies: + is-get-set-prop "^1.0.0" + is-js-type "^2.0.0" + is-obj-prop "^1.0.0" + is-proto-prop "^2.0.0" + +eslint-plugin-node@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz#fd1adbc7a300cf7eb6ac55cf4b0b6fc6e577f5a6" + integrity sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ== + dependencies: + eslint-plugin-es "^2.0.0" + eslint-utils "^1.4.2" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-node@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.0.0.tgz#365944bb0804c5d1d501182a9bc41a0ffefed726" + integrity sha512-chUs/NVID+sknFiJzxoN9lM7uKSOEta8GC8365hw1nDfwIPIjjpRSwwPvQanWv8dt/pDe9EV4anmVSwdiSndNg== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-prettier@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" + integrity sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-promise@^4.0.0, eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + +eslint-plugin-unicorn@^12.0.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-12.1.0.tgz#6ebff6c90ecf4df7ce1615e18928d10bb50c2ff5" + integrity sha512-DkPRrjaZaKa8GDjEyWGms/sqp2DcmVCcbwVi9WQXwN6+Sn0/joTC14SfA+BsCuxTaGPRm/7wa8NC8o5mNDyZpQ== + dependencies: + ci-info "^2.0.0" + clean-regexp "^1.0.0" + eslint-ast-utils "^1.1.0" + eslint-template-visitor "^1.0.0" + import-modules "^2.0.0" + lodash.camelcase "^4.3.0" + lodash.defaultsdeep "^4.6.1" + lodash.kebabcase "^4.1.1" + lodash.snakecase "^4.1.1" + lodash.topairs "^4.3.0" + lodash.upperfirst "^4.3.1" + read-pkg-up "^7.0.0" + regexpp "^3.0.0" + reserved-words "^0.1.2" + safe-regex "^2.0.2" + semver "^6.3.0" + +eslint-plugin-unicorn@^15.0.0: + version "15.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-15.0.1.tgz#8379d1d6882f9f8631bec8025ac9e8fe89e43945" + integrity sha512-yahqrPGFUzwH5cnmnj+iPlgPapAiBIZ/ZNSDkhTVPgPCo7/mOEjJ2gDhEclrtQVBE9olmec4N+CKDnJuZ9XpRA== + dependencies: + ci-info "^2.0.0" + clean-regexp "^1.0.0" + eslint-ast-utils "^1.1.0" + eslint-template-visitor "^1.1.0" + import-modules "^2.0.0" + lodash.camelcase "^4.3.0" + lodash.defaultsdeep "^4.6.1" + lodash.kebabcase "^4.1.1" + lodash.snakecase "^4.1.1" + lodash.upperfirst "^4.3.1" + read-pkg-up "^7.0.1" + regexp-tree "^0.1.17" + regexpp "^3.0.0" + reserved-words "^0.1.2" + safe-regex "^2.1.1" + semver "^6.3.0" + +eslint-rule-docs@^1.1.5: + version "1.1.175" + resolved "https://registry.yarnpkg.com/eslint-rule-docs/-/eslint-rule-docs-1.1.175.tgz#6e13b56c0b024797ce27bc069c10a312ddf20168" + integrity sha512-jFBHgUeNAguil2gHyHJTTH8vBJ4W+abJz/Lm9z93Gv5FsZ//r8aGaaGSuFZDzLNB411EGBjwmTdt6rwAi0J7JQ== + +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-template-visitor@^1.0.0, eslint-template-visitor@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-template-visitor/-/eslint-template-visitor-1.1.0.tgz#f090d124d1a52e05552149fc50468ed59608b166" + integrity sha512-Lmy6QVlmFiIGl5fPi+8ACnov3sare+0Ouf7deJAGGhmUfeWJ5fVarELUxZRpsZ9sHejiJUq8626d0dn9uvcZTw== + dependencies: + eslint-visitor-keys "^1.1.0" + espree "^6.1.1" + multimap "^1.0.2" + +eslint-utils@^1.4.2, eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" + integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@^6.4.0, eslint@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.14" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.3" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^6.0.0, espree@^6.1.1, espree@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d" + integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA== + dependencies: + acorn "^7.1.0" + acorn-jsx "^5.1.0" + eslint-visitor-keys "^1.1.0" + +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== + +espurify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/espurify/-/espurify-2.0.1.tgz#c25b3bb613863daa142edcca052370a1a459f41d" + integrity sha512-7w/dUrReI/QbJFHRwfomTlkQOXaB1NuCrBRn5Y26HXn5gvh18/19AgLbayVrNxXQfkckvgrJloWyvZDuJ7dhEA== + +esquery@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.0.0, estraverse@^4.1.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== + +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@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + 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@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" + integrity sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA== + 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" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + 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" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + 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 sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +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" + +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-glob@^2.2.6: + 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.0.3, fast-glob@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82" + integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + +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-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fastq@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.0.tgz#4ec8a38f4ac25f21492673adb7eae9cfef47d1c2" + integrity sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA== + dependencies: + reusify "^1.0.0" + +figures@^3.0.0, figures@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.1.0.tgz#4b198dd07d8d71530642864af2d45dd9e459c4ec" + integrity sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg== + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + 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" + +find-cache-dir@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.2.0.tgz#e7fe44c1abc1299f516146e563108fd1006c1874" + integrity sha512-1JKclkYYsf1q9WIJKLZa9S9muC+08RIjzAlLrK4QcYLJMS6mk9yombQ9qf+zJ7H9LS800k0s44L4sDq9VYzqyg== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.0" + pkg-dir "^4.1.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^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-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" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" + integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg== + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" + integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + +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== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + +get-caller-file@^2.0.1: + 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-set-props@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-set-props/-/get-set-props-0.1.0.tgz#998475c178445686d0b32246da5df8dbcfbe8ea3" + integrity sha1-mYR1wXhEVobQsyJG2l3428++jqM= + +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + +get-stdin@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" + integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ== + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^4.1.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-stream@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" + integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + dependencies: + pump "^3.0.0" + +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 sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" + integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== + 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 sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + +glob@^7.1.3, glob@^7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + 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-dirs@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" + integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU= + dependencies: + ini "^1.3.4" + +global-dirs@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201" + integrity sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A== + dependencies: + ini "^1.3.5" + +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@^12.1.0: + version "12.3.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.3.0.tgz#1e564ee5c4dded2ab098b0f88f24702a3c56be13" + integrity sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw== + dependencies: + type-fest "^0.8.1" + +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + +globby@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.0.tgz#56fd0e9f0d4f8fb0c456f1ab0dee96e1380bc154" + integrity sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg== + 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@^9.0.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" + integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^1.0.2" + dir-glob "^2.2.2" + fast-glob "^2.2.6" + glob "^7.1.3" + ignore "^4.0.3" + pify "^4.0.1" + slash "^2.0.0" + +got@^9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +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-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + 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 sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + 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 sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has-yarn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-1.0.0.tgz#89e25db604b725c8f5976fff0addc921b828a5a7" + integrity sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac= + +has-yarn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" + integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== + +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.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" + integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== + +http-cache-semantics@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5" + integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew== + +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-by-default@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" + integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk= + +ignore@^4.0.3, ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.0.5, ignore@^5.1.1, ignore@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" + integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== + +import-fresh@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-lazy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= + +import-local@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" + integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +import-modules@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/import-modules/-/import-modules-1.1.0.tgz#748db79c5cc42bb9701efab424f894e72600e9dc" + integrity sha1-dI23nFzEK7lwHvq0JPiU5yYA6dw= + +import-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-modules/-/import-modules-2.0.0.tgz#9c1e13b4e7a15682f70a6e3fa29534e4540cfc5d" + integrity sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw== + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +indent-string@^3.0.0, indent-string@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= + +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== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + 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, ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +inquirer@^7.0.0: + version "7.0.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.3.tgz#f9b4cd2dff58b9f73e8d43759436ace15bed4567" + integrity sha512-+OiOVeVydu4hnCGLCSX+wedovR/Yzskv9BFqUNNKq9uU2qg7LCcCo3R86S2E7WLo0y/x2pnEZfZe1CoYnORUAw== + dependencies: + ansi-escapes "^4.2.1" + chalk "^2.4.2" + cli-cursor "^3.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.2.0" + rxjs "^6.5.3" + string-width "^4.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + +irregular-plurals@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-2.0.0.tgz#39d40f05b00f656d0b7fa471230dd3b714af2872" + integrity sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw== + +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 sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + 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 sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.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: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + +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 sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + 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.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +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-error@^2.2.0, is-error@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-error/-/is-error-2.2.2.tgz#c10ade187b3c93510c5470a5567833ee25649843" + integrity sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg== + +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 sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +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 sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +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-get-set-prop@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-get-set-prop/-/is-get-set-prop-1.0.0.tgz#2731877e4d78a6a69edcce6bb9d68b0779e76312" + integrity sha1-JzGHfk14pqae3M5rudaLB3nnYxI= + dependencies: + get-set-props "^0.1.0" + lowercase-keys "^1.0.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 sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-installed-globally@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" + integrity sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA= + dependencies: + global-dirs "^0.1.0" + is-path-inside "^1.0.0" + +is-installed-globally@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.1.tgz#679afef819347a72584617fd19497f010b8ed35f" + integrity sha512-oiEcGoQbGc+3/iijAijrK2qFpkNoNjsHOm/5V5iaeydyrS/hnwaRCEgH5cpW0P3T1lSjV5piB7S5b5lEugNLhg== + dependencies: + global-dirs "^2.0.1" + is-path-inside "^3.0.1" + +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + +is-js-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-js-type/-/is-js-type-2.0.0.tgz#73617006d659b4eb4729bba747d28782df0f7e22" + integrity sha1-c2FwBtZZtOtHKbunR9KHgt8PfiI= + dependencies: + js-types "^1.0.0" + +is-npm@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-3.0.0.tgz#ec9147bfb629c43f494cf67936a961edec7e8053" + integrity sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA== + +is-npm@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d" + integrity sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig== + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +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-prop@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-obj-prop/-/is-obj-prop-1.0.0.tgz#b34de79c450b8d7c73ab2cdf67dc875adb85f80e" + integrity sha1-s03nnEULjXxzqyzfZ9yHWtuF+A4= + dependencies: + lowercase-keys "^1.0.0" + obj-props "^1.0.0" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + +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@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= + dependencies: + path-is-inside "^1.0.1" + +is-path-inside@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" + integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== + +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 sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +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-plain-object@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928" + integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg== + dependencies: + isobject "^4.0.0" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + +is-proto-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-proto-prop/-/is-proto-prop-2.0.0.tgz#99ab2863462e44090fd083efd1929058f9d935e1" + integrity sha512-jl3NbQ/fGLv5Jhan4uX+Ge9ohnemqyblWVVCpAvtTQzNFvV2xhJq+esnkIbYQ9F1nITXoLfDDQLp7LBw/zzncg== + dependencies: + lowercase-keys "^1.0.0" + proto-props "^2.0.0" + +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-string@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" + integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-typedarray@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +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@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +is-yarn-global@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" + integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== + +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 sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + 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 sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isobject@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" + integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== + +js-string-escape@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" + integrity sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8= + +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-types@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/js-types/-/js-types-1.0.0.tgz#d242e6494ed572ad3c92809fc8bed7f7687cbf03" + integrity sha1-0kLmSU7Vcq08koCfyL7X92h8vwM= + +js-yaml@^3.10.0, js-yaml@^3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.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 sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +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-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 sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json5@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" + integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== + dependencies: + minimist "^1.2.0" + +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + 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 sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + 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 sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + 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== + +latest-version@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face" + integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== + dependencies: + package-json "^6.3.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +line-column-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/line-column-path/-/line-column-path-2.0.0.tgz#439aff48ef80d74c475801a25b560d021acf1288" + integrity sha512-nz3A+vi4bElhwd62E9+Qk/f9BDYLSzD/4Hy1rir0I4GnMxSTezSymzANyph5N1PgRZ3sSbA+yR5hOuXxc71a0Q== + dependencies: + type-fest "^0.4.1" + +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +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 sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +load-json-file@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3" + integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== + dependencies: + graceful-fs "^4.1.15" + parse-json "^4.0.0" + pify "^4.0.1" + strip-bom "^3.0.0" + type-fest "^0.3.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +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.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.defaultsdeep@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" + integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA== + +lodash.flattendeep@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= + +lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= + +lodash.islength@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.islength/-/lodash.islength-4.0.1.tgz#4e9868d452575d750affd358c979543dc20ed577" + integrity sha1-Tpho1FJXXXUK/9NYyXlUPcIO1Xc= + +lodash.kebabcase@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY= + +lodash.merge@^4.6.1: + 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.mergewith@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" + integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== + +lodash.snakecase@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40= + +lodash.topairs@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.topairs/-/lodash.topairs-4.3.0.tgz#3b6deaa37d60fb116713c46c5f17ea190ec48d64" + integrity sha1-O23qo31g+xFnE8RsXxfqGQ7EjWQ= + +lodash.upperfirst@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984= + +lodash.zip@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020" + integrity sha1-7GZi5IlkCO1KtsVCo5kLcswIACA= + +lodash@^4.13.1, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +log-symbols@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +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" + +make-dir@^1.0.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@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.0.tgz#1b5f39f6b9270ed33f9f054c5c0f84304989f801" + integrity sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw== + 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 sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" + integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +matcher@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/matcher/-/matcher-2.1.0.tgz#64e1041c15b993e23b786f93320a7474bf833c28" + integrity sha512-o+nZr+vtJtgPNklyeUKkkH42OsK8WAfdgaJE2FNxcjLPg+5QbeEoT6vRj8Xq/iv18JlQ9cmKsEu0b94ixWf1YQ== + dependencies: + escape-string-regexp "^2.0.0" + +md5-hex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-2.0.0.tgz#d0588e9f1c74954492ecd24ac0ac6ce997d92e33" + integrity sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM= + dependencies: + md5-o-matic "^0.1.1" + +md5-hex@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-3.0.1.tgz#be3741b510591434b2784d79e556eefc2c9a8e5c" + integrity sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw== + dependencies: + blueimp-md5 "^2.10.0" + +md5-o-matic@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" + integrity sha1-givM1l4RfFFPqxdrJZRdVBAKA8M= + +meow@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" + integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== + dependencies: + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + yargs-parser "^10.0.0" + +merge2@^1.2.3, merge2@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" + integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== + +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.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +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-response@^1.0.0, mimic-response@^1.0.1: + 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" + +minimist-options@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +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.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@^2.1.1, 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== + +multimap@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/multimap/-/multimap-1.1.0.tgz#5263febc085a1791c33b59bb3afc6a76a2a10ca8" + integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw== + +multimatch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3" + integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== + dependencies: + "@types/minimatch" "^3.0.3" + array-differ "^3.0.0" + array-union "^2.1.0" + arrify "^2.0.1" + minimatch "^3.0.4" + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +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" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +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== + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, 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, 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== + +normalize-url@^4.1.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + +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 sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +obj-props@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/obj-props/-/obj-props-1.3.0.tgz#8884ab21c8d8496c4a7f696c78bf82289c51680b" + integrity sha512-k2Xkjx5wn6eC3537SWAXHzB6lkI81kS+icMKMkh4nG3w7shWG6MaWOBrNvhWVOszrtL5uxdfymQQfPUxwY+2eg== + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-keys@^1.0.11, object-keys@^1.0.12, 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 sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +object.values@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" + +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 sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + +open-editor@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/open-editor/-/open-editor-2.0.1.tgz#d001055770fbf6f6ee73c18f224915f444be863c" + integrity sha512-B3KdD7Pl8jYdpBSBBbdYaqVUI3whQjLl1G1+CvhNc8+d7GzKRUq+VuCIx1thxGiqD2oBGRvsZz7QWrBsFP2yVA== + dependencies: + env-editor "^0.4.0" + line-column-path "^2.0.0" + open "^6.2.0" + +open@^6.2.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" + integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== + dependencies: + is-wsl "^1.1.0" + +optionator@^0.8.3: + 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" + +ora@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.0.3.tgz#752a1b7b4be4825546a7a3d59256fa523b6b6d05" + integrity sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg== + dependencies: + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + mute-stream "0.0.8" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" + integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.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@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +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-json@^6.3.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0" + integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== + dependencies: + got "^9.6.0" + registry-auth-token "^4.0.0" + registry-url "^5.0.0" + semver "^6.2.0" + +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" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + 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 sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse-json@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" + integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + lines-and-columns "^1.1.6" + +parse-ms@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-2.1.0.tgz#348565a753d4391fa524029956b172cb7753097d" + integrity sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +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 sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +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 sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^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== + +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" + integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +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== + +pkg-conf@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-3.1.0.tgz#d9f9c75ea1bae0e77938cde045b276dac7cc69ae" + integrity sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ== + dependencies: + find-up "^3.0.0" + load-json-file "^5.2.0" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.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" + +plur@^3.0.1, plur@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/plur/-/plur-3.1.1.tgz#60267967866a8d811504fe58f2faaba237546a5b" + integrity sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w== + dependencies: + irregular-plurals "^2.0.0" + +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 sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^1.15.2: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + +pretty-ms@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-5.1.0.tgz#b906bdd1ec9e9799995c372e2b1c34f073f95384" + integrity sha512-4gaK1skD2gwscCfkswYQRmddUb2GJZtzDGRjHWadVHtK/DIKFufa12MvES6/xu1tVbUYeia5bmLcwJtZJQUqnw== + dependencies: + parse-ms "^2.1.0" + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +proto-props@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/proto-props/-/proto-props-2.0.0.tgz#8ac6e6dec658545815c623a3bc81580deda9a181" + integrity sha512-2yma2tog9VaRZY2mn3Wq51uiSW4NcPYT1cQdBagwyrznrilKSZwIZ0UG3ZPL/mx+axEns0hE35T5ufOYZXEnBQ== + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +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: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +quick-lru@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" + integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= + +rc@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= + dependencies: + find-up "^2.0.0" + read-pkg "^3.0.0" + +read-pkg-up@^7.0.0, 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@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + 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" + +readdirp@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" + integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== + dependencies: + picomatch "^2.0.7" + +redent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" + integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= + dependencies: + indent-string "^3.0.0" + strip-indent "^2.0.0" + +regenerate-unicode-properties@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" + integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA== + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== + +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-tree@^0.1.17, regexp-tree@~0.1.1: + version "0.1.17" + resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.17.tgz#66d914a6ca21f95dd7660ed70a7dad47aeb2246a" + integrity sha512-UnOJjFS/EPZmfISmYx+0PcDtPzyFKTe+cZTS5sM5hifnRUDRxoB1j4DAmGwqzxjwBGlwOkGfb2cDGHtjuEwqoA== + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +regexpp@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e" + integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g== + +regexpu-core@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" + integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.1.0" + regjsgen "^0.5.0" + regjsparser "^0.6.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.1.0" + +registry-auth-token@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.1.0.tgz#b17f4763c53785b5342fadb0a35d9825be976cfb" + integrity sha512-7uxS951DeOBOwsv8deX+l7HcjY2VZxaOgHtM6RKzg3HhpE+bJ0O7VbuMJLosC1T5WSFpHm0DuFIbqUl43jHpsA== + dependencies: + rc "^1.2.8" + safe-buffer "^5.0.1" + +registry-url@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009" + integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== + dependencies: + rc "^1.2.8" + +regjsgen@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" + integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== + +regjsparser@^0.6.0: + version "0.6.3" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.3.tgz#74192c5805d35e9f5ebe3c1fb5b40d40a8a38460" + integrity sha512-8uZvYbnfAtEm9Ab8NTb3hdLwL4g/LQzEYP7Xs27T96abJCCE2d6r3cPZPQEsLKy0vRSGVNG+/zVGtLr86HQduA== + dependencies: + jsesc "~0.5.0" + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +reserved-words@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1" + integrity sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE= + +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-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1: + version "1.14.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.2.tgz#dbf31d0fa98b1f29aa5169783b9c290cb865fea2" + integrity sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ== + dependencies: + path-parse "^1.0.6" + +resolve@^1.3.2: + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== + dependencies: + path-parse "^1.0.6" + +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +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.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" + integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== + dependencies: + glob "^7.1.3" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + dependencies: + is-promise "^2.1.0" + +run-parallel@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" + integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== + +rxjs@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" + integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== + dependencies: + tslib "^1.9.0" + +safe-buffer@^5.0.1: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +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-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +safe-regex@^2.0.2, 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== + +semver-diff@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" + integrity sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY= + dependencies: + semver "^5.0.3" + +semver-diff@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" + integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== + dependencies: + semver "^6.3.0" + +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.2.0, 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== + +serialize-error@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-2.1.0.tgz#50b679d5635cdf84667bdc8e59af4e5b81d5f60a" + integrity sha1-ULZ51WNc34Rme9yOWa9OW4HV9go= + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +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" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.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 sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +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@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= + 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: + version "0.5.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" + integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + +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 sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +stack-utils@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.1.tgz#3df48345a3b92adc06038f0e95782df61beff742" + integrity sha512-BvBTnHGm8boe+HiJFqP19ywEsGlfQAKqW78pbfvUuzCbUuxPPUyLrH5dYFY+Xn9IpLY3b5ZmMcl8jAqXB4wddg== + dependencies: + escape-string-regexp "^2.0.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +string-width@^2.0.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimleft@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" + integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string.prototype.trimright@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" + integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.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 sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.1.0, 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@^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-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= + +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +supertap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supertap/-/supertap-1.0.0.tgz#bd9751c7fafd68c68cf8222a29892206a119fa9e" + integrity sha512-HZJ3geIMPgVwKk2VsmO5YHqnnJYl6bV5A9JW2uzqV43WmpgliNEYbuvukfor7URpaqpxuw3CfZ3ONdVbZjCgIA== + dependencies: + arrify "^1.0.1" + indent-string "^3.2.0" + js-yaml "^3.10.0" + serialize-error "^2.1.0" + strip-ansi "^4.0.0" + +supports-color@^5.0.0, 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.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + +supports-hyperlinks@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz#71daedf36cc1060ac5100c351bb3da48c29c0ef7" + integrity sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw== + dependencies: + has-flag "^2.0.0" + supports-color "^5.0.0" + +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +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== + +term-size@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" + integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= + dependencies: + execa "^0.7.0" + +term-size@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.1.1.tgz#f81ec25854af91a480d2f9d0c77ffcb26594ed1a" + integrity sha512-UqvQSch04R+69g4RDhrslmGvGL3ucDRX/U+snYW0Mab4uCAyKSndUksaoqlJ81QKSpRnIsuOYQCbC2ZWx2896A== + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +the-argv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/the-argv/-/the-argv-1.0.0.tgz#0084705005730dd84db755253c931ae398db9522" + integrity sha1-AIRwUAVzDdhNt1UlPJMa45jblSI= + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +time-zone@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/time-zone/-/time-zone-1.0.0.tgz#99c5bf55958966af6d06d83bdf3800dc82faec5d" + integrity sha1-mcW/VZWJZq9tBtg73zgA3IL67F0= + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +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 sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +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 sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + +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 sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + 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" + +trim-newlines@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" + integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= + +trim-off-newlines@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= + +tslib@^1.8.1, tslib@^1.9.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" + integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== + +tsutils@^3.17.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" + integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== + dependencies: + tslib "^1.8.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 sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-fest@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.10.0.tgz#7f06b2b9fbfc581068d1341ffabd0349ceafc642" + integrity sha512-EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw== + +type-fest@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" + integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== + +type-fest@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" + integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== + +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== + +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@^3.6.4: + version "3.7.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae" + integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== + +unicode-chars@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unicode-chars/-/unicode-chars-1.0.1.tgz#41ea25874c498687fe1c152d3e0cf136227e9eb3" + integrity sha512-NkxtSL47I7/ofOQZrF2m4R0fjXYNvv/FfGWhArqaWEY/+rXRrVylxSGAenXQ8rG3TSXTlCBLRTsRJvs/rex2zg== + dependencies: + lodash "^4.17.15" + type-fest "^0.10.0" + unicode "^12.1.0" + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" + integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw== + +unicode@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/unicode/-/unicode-12.1.0.tgz#7ee53a7a0ca5539b353419432823d8da58bbbf33" + integrity sha512-Ty6+Ew21DiYTWLYtd05RF/X4c1ekOvOgANyHbBj0h3MaXpfaGr2Rdmc0hMFuGQLyPLb9cU4ArNxl0bTF5HSzXw== + +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" + +unique-string@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" + integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= + dependencies: + crypto-random-string "^1.0.0" + +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" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +update-notifier@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-3.0.1.tgz#78ecb68b915e2fd1be9f767f6e298ce87b736250" + integrity sha512-grrmrB6Zb8DUiyDIaeRTBCkgISYUgETNe7NglEbVsrLWXeESnlCSP50WfRSj/GmzMPl6Uchj24S/p80nP/ZQrQ== + dependencies: + boxen "^3.0.0" + chalk "^2.0.1" + configstore "^4.0.0" + has-yarn "^2.1.0" + import-lazy "^2.1.0" + is-ci "^2.0.0" + is-installed-globally "^0.1.0" + is-npm "^3.0.0" + is-yarn-global "^0.3.0" + latest-version "^5.0.0" + semver-diff "^2.0.0" + xdg-basedir "^3.0.0" + +update-notifier@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-4.0.0.tgz#f344a6f8b03e00e31b323d632a0e632e9f0e0654" + integrity sha512-p9zf71hWt5GVXM4iEBujpUgx8mK9AWiCCapEJm/O1z5ntCim83Z1ATqzZFBHFYqx03laMqv8LiDgs/7ikXjf/g== + dependencies: + boxen "^4.2.0" + chalk "^3.0.0" + configstore "^5.0.0" + has-yarn "^2.1.0" + import-lazy "^2.1.0" + is-ci "^2.0.0" + is-installed-globally "^0.3.1" + is-npm "^4.0.0" + is-yarn-global "^0.3.0" + latest-version "^5.0.0" + semver-diff "^3.1.1" + xdg-basedir "^4.0.0" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + 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 sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +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 sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + +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== + +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + +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" + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +well-known-symbols@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/well-known-symbols/-/well-known-symbols-2.0.0.tgz#e9c7c07dbd132b7b84212c8174391ec1f9871ba5" + integrity sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q== + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +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" + +widest-line@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" + integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== + dependencies: + string-width "^2.1.1" + +widest-line@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" + integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== + dependencies: + string-width "^4.0.0" + +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@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + 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 sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^2.0.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-file-atomic@^3.0.0, write-file-atomic@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.1.tgz#558328352e673b5bb192cf86500d60b230667d4b" + integrity sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + +write-json-file@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" + integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= + dependencies: + detect-indent "^5.0.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + pify "^3.0.0" + sort-keys "^2.0.0" + write-file-atomic "^2.0.0" + +write-pkg@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.2.0.tgz#0e178fe97820d389a8928bc79535dbe68c2cff21" + integrity sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw== + dependencies: + sort-keys "^2.0.0" + write-json-file "^2.2.0" + +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + +xdg-basedir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" + integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= + +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== + +xo-init@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/xo-init/-/xo-init-0.7.0.tgz#634b4789e366b4f87f747ef0cee1a99ce273aa15" + integrity sha512-mrrCKMu52vz0u2tiOl8DoG709pBtnSp58bb4/j58a4jeXjrb1gV7dxfOBjOlXitYtfW2QnlxxxfAojoFcpynDg== + dependencies: + arrify "^1.0.0" + execa "^0.9.0" + has-yarn "^1.0.0" + minimist "^1.1.3" + path-exists "^3.0.0" + read-pkg-up "^3.0.0" + the-argv "^1.0.0" + write-pkg "^3.1.0" + +xo@^0.25.3: + version "0.25.3" + resolved "https://registry.yarnpkg.com/xo/-/xo-0.25.3.tgz#feb624c35943f3575ad4668cd0b7b74a1d4884d2" + integrity sha512-125on+kPp6oi+EfoAajJ58cGLxIurZqWrehhdqoApWXpano9GL5D0ElcSlbG7UeYAfmNSwKJGTxHoLsHLhrZqg== + dependencies: + arrify "^2.0.1" + debug "^4.1.0" + eslint "^6.4.0" + eslint-config-prettier "^6.3.0" + eslint-config-xo "^0.27.1" + eslint-formatter-pretty "^2.0.0" + eslint-plugin-ava "^9.0.0" + eslint-plugin-eslint-comments "^3.0.1" + eslint-plugin-import "^2.18.2" + eslint-plugin-no-use-extend-native "^0.4.0" + eslint-plugin-node "^10.0.0" + eslint-plugin-prettier "^3.1.1" + eslint-plugin-promise "^4.0.0" + eslint-plugin-unicorn "^12.0.0" + find-cache-dir "^3.0.0" + get-stdin "^7.0.0" + globby "^9.0.0" + has-flag "^4.0.0" + lodash.isequal "^4.5.0" + lodash.mergewith "^4.6.2" + meow "^5.0.0" + multimatch "^4.0.0" + open-editor "^2.0.1" + path-exists "^4.0.0" + pkg-conf "^3.1.0" + prettier "^1.15.2" + resolve-cwd "^3.0.0" + resolve-from "^5.0.0" + semver "^6.3.0" + slash "^3.0.0" + update-notifier "^3.0.1" + xo-init "^0.7.0" + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yargs-parser@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== + dependencies: + camelcase "^4.1.0" + +yargs-parser@^16.1.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-16.1.0.tgz#73747d53ae187e7b8dbe333f95714c76ea00ecf1" + integrity sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@^15.1.0: + version "15.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.1.0.tgz#e111381f5830e863a89550bd4b136bb6a5f37219" + integrity sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^16.1.0" diff --git a/cjs-module-lexer/.babelrc b/cjs-module-lexer/.babelrc new file mode 100755 index 0000000..ac89f95 --- /dev/null +++ b/cjs-module-lexer/.babelrc @@ -0,0 +1,10 @@ +{ + "plugins": [ + [ + "@babel/plugin-transform-modules-commonjs", + { + "strict": true + }, + ] + ] +} diff --git a/cjs-module-lexer/.github/workflows/node.js.yml b/cjs-module-lexer/.github/workflows/node.js.yml new file mode 100644 index 0000000..c993415 --- /dev/null +++ b/cjs-module-lexer/.github/workflows/node.js.yml @@ -0,0 +1,30 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/cjs-module-lexer/.gitignore b/cjs-module-lexer/.gitignore new file mode 100755 index 0000000..cf762fe --- /dev/null +++ b/cjs-module-lexer/.gitignore @@ -0,0 +1,3 @@ +node_modules +dist +yarn.lock diff --git a/cjs-module-lexer/.travis.yml b/cjs-module-lexer/.travis.yml new file mode 100644 index 0000000..9f820ac --- /dev/null +++ b/cjs-module-lexer/.travis.yml @@ -0,0 +1,12 @@ +git: + depth: 1 +language: node_js +node_js: + - '13' + +before_install: + - npm install +script: + - npm run build + - npm run test + diff --git a/cjs-module-lexer/CHANGELOG.md b/cjs-module-lexer/CHANGELOG.md new file mode 100644 index 0000000..e7d12a7 --- /dev/null +++ b/cjs-module-lexer/CHANGELOG.md @@ -0,0 +1,40 @@ +1.2.2 +- Fix RollupJS reexports bug (https://github.com/guybedford/cjs-module-lexer/pull/59) + +1.2.1 +- Support Unicode escapes in strings (https://github.com/guybedford/cjs-module-lexer/pull/55) +- Filter export strings to valid surrogate pairs (https://github.com/guybedford/cjs-module-lexer/pull/56) + +1.2.0 +- Support for non-identifier exports (https://github.com/guybedford/cjs-module-lexer/pull/54, @nicolo-ribaudo) + +1.1.1 +- Better support for Babel reexport getter function forms (https://github.com/guybedford/cjs-module-lexer/issues/50) +- Support Babel interopRequireWildcard reexports patterns (https://github.com/guybedford/cjs-module-lexer/issues/52) + +1.1.0 +- Support for Babel reexport conflict filter (https://github.com/guybedford/cjs-module-lexer/issues/36, @nicolo-ribaudo) +- Support trailing commas in getter patterns (https://github.com/guybedford/cjs-module-lexer/issues/31) +- Support for RollupJS reexports property checks (https://github.com/guybedford/cjs-module-lexer/issues/38) + +1.0.0 +- Unsafe getter tracking (https://github.com/guybedford/cjs-module-lexer/pull/29) + +0.6.0 +- API-only breaking change: Unify JS and Wasm interfaces (https://github.com/guybedford/cjs-module-lexer/pull/27) +- Add type definitions (https://github.com/guybedford/cjs-module-lexer/pull/28) + +0.5.2 +- Support named getter functions (https://github.com/guybedford/cjs-module-lexer/pull/26) + +0.5.1: +- Feature: Implement specific reexport getter forms (https://github.com/guybedford/cjs-module-lexer/pull/25) + +0.5.0 +- Breaking Change: No longer emit Object.defineProperty exports (https://github.com/guybedford/cjs-module-lexer/pull/24) +- Doc: Update link to WASI SDK (https://github.com/guybedford/cjs-module-lexer/pull/19) + +0.4.3 +- Support for Babel 7.12 reexports (https://github.com/guybedford/cjs-module-lexer/pull/16) +- Support module.exports = { ...require('x') } reexports (https://github.com/guybedford/cjs-module-lexer/pull/18) +- "if" keyword space parsing in exports matching (https://github.com/guybedford/cjs-module-lexer/pull/17) diff --git a/cjs-module-lexer/LICENSE b/cjs-module-lexer/LICENSE new file mode 100755 index 0000000..935b357 --- /dev/null +++ b/cjs-module-lexer/LICENSE @@ -0,0 +1,10 @@ +MIT License +----------- + +Copyright (C) 2018-2020 Guy Bedford + +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. diff --git a/cjs-module-lexer/Makefile b/cjs-module-lexer/Makefile new file mode 100755 index 0000000..e1b1aca --- /dev/null +++ b/cjs-module-lexer/Makefile @@ -0,0 +1,16 @@ +lslib/lexer.wat: lib/lexer.wasm + ../wabt/bin/wasm2wat lib/lexer.wasm -o lib/lexer.wat + +lib/lexer.wasm: include-wasm/cjs-module-lexer.h src/lexer.c + @mkdir -p lib + ../wasi-sdk-11.0/bin/clang src/lexer.c -I include-wasm --sysroot=../wasi-sdk-11.0/share/wasi-sysroot -o lib/lexer.wasm -nostartfiles \ + -Wl,-z,stack-size=13312,--no-entry,--compress-relocations,--strip-all,--export=__heap_base,\ + --export=parseCJS,--export=sa,--export=e,--export=re,--export=es,--export=ee,--export=rre,--export=ree,--export=res,--export=ru,--export=us,--export=ue \ + -Wno-logical-op-parentheses -Wno-parentheses \ + -Oz + +optimize: lib/lexer.wasm + ../binaryen/bin/wasm-opt -Oz lib/lexer.wasm -o lib/lexer.wasm + +clean: + rm lib/* diff --git a/cjs-module-lexer/README.md b/cjs-module-lexer/README.md new file mode 100755 index 0000000..a761c0c --- /dev/null +++ b/cjs-module-lexer/README.md @@ -0,0 +1,453 @@ +# CJS Module Lexer + +[![Build Status][travis-image]][travis-url] + +A [very fast](#benchmarks) JS CommonJS module syntax lexer used to detect the most likely list of named exports of a CommonJS module. + +Outputs the list of named exports (`exports.name = ...`) and possible module reexports (`module.exports = require('...')`), including the common transpiler variations of these cases. + +Forked from https://github.com/guybedford/es-module-lexer. + +_Comprehensively handles the JS language grammar while remaining small and fast. - ~90ms per MB of JS cold and ~15ms per MB of JS warm, [see benchmarks](#benchmarks) for more info._ + +### Usage + +``` +npm install cjs-module-lexer +``` + +For use in CommonJS: + +```js +const { parse } = require('cjs-module-lexer'); + +// `init` return a promise for parity with the ESM API, but you do not have to call it + +const { exports, reexports } = parse(` + // named exports detection + module.exports.a = 'a'; + (function () { + exports.b = 'b'; + })(); + Object.defineProperty(exports, 'c', { value: 'c' }); + /* exports.d = 'not detected'; */ + + // reexports detection + if (maybe) module.exports = require('./dep1.js'); + if (another) module.exports = require('./dep2.js'); + + // literal exports assignments + module.exports = { a, b: c, d, 'e': f } + + // __esModule detection + Object.defineProperty(module.exports, '__esModule', { value: true }) +`); + +// exports === ['a', 'b', 'c', '__esModule'] +// reexports === ['./dep1.js', './dep2.js'] +``` + +When using the ESM version, Wasm is supported instead: + +```js +import { parse, init } from 'cjs-module-lexer'; +// init needs to be called and waited upon +await init(); +const { exports, reexports } = parse(source); +``` + +The Wasm build is around 1.5x faster and without a cold start. + +### Grammar + +CommonJS exports matches are run against the source token stream. + +The token grammar is: + +``` +IDENTIFIER: As defined by ECMA-262, without support for identifier `\` escapes, filtered to remove strict reserved words: + "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "enum" + +STRING_LITERAL: A `"` or `'` bounded ECMA-262 string literal. + +MODULE_EXPORTS: `module` `.` `exports` + +EXPORTS_IDENTIFIER: MODULE_EXPORTS_IDENTIFIER | `exports` + +EXPORTS_DOT_ASSIGN: EXPORTS_IDENTIFIER `.` IDENTIFIER `=` + +EXPORTS_LITERAL_COMPUTED_ASSIGN: EXPORTS_IDENTIFIER `[` STRING_LITERAL `]` `=` + +EXPORTS_LITERAL_PROP: (IDENTIFIER (`:` IDENTIFIER)?) | (STRING_LITERAL `:` IDENTIFIER) + +EXPORTS_SPREAD: `...` (IDENTIFIER | REQUIRE) + +EXPORTS_MEMBER: EXPORTS_DOT_ASSIGN | EXPORTS_LITERAL_COMPUTED_ASSIGN + +EXPORTS_DEFINE: `Object` `.` `defineProperty `(` EXPORTS_IDENFITIER `,` STRING_LITERAL + +EXPORTS_DEFINE_VALUE: EXPORTS_DEFINE `, {` + (`enumerable: true,`)? + ( + `value:` | + `get` (`: function` IDENTIFIER? )? `() {` return IDENTIFIER (`.` IDENTIFIER | `[` STRING_LITERAL `]`)? `;`? `}` `,`? + ) + `})` + +EXPORTS_LITERAL: MODULE_EXPORTS `=` `{` (EXPORTS_LITERAL_PROP | EXPORTS_SPREAD) `,`)+ `}` + +REQUIRE: `require` `(` STRING_LITERAL `)` + +EXPORTS_ASSIGN: (`var` | `const` | `let`) IDENTIFIER `=` (`_interopRequireWildcard (`)? REQUIRE + +MODULE_EXPORTS_ASSIGN: MODULE_EXPORTS `=` REQUIRE + +EXPORT_STAR: (`__export` | `__exportStar`) `(` REQUIRE + +EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2 `) {` + ( + ( + `if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`? + ( + (`if (Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)) return` `;`?)? + (`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)? + )? + ) | + `if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)` | IDENTIFIER `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)` + ) + ( + EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? | + `Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get` (`: function` IDENTIFIER? )? `() { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? `}` `,`? `})` `;`? + ) + `})` +``` + +Spacing between tokens is taken to be any ECMA-262 whitespace, ECMA-262 block comment or ECMA-262 line comment. + +* The returned export names are taken to be the combination of: + 1. All `IDENTIFIER` and `STRING_LITERAL` slots for `EXPORTS_MEMBER` and `EXPORTS_LITERAL` matches. + 2. The first `STRING_LITERAL` slot for all `EXPORTS_DEFINE_VALUE` matches where that same string is not an `EXPORTS_DEFINE` match that is not also an `EXPORTS_DEFINE_VALUE` match. +* The reexport specifiers are taken to be the combination of: + 1. The `REQUIRE` matches of the last matched of either `MODULE_EXPORTS_ASSIGN` or `EXPORTS_LITERAL`. + 2. All _top-level_ `EXPORT_STAR` `REQUIRE` matches and `EXPORTS_ASSIGN` matches whose `IDENTIFIER` also matches the first `IDENTIFIER` in `EXPORT_STAR_LIB`. + +### Parsing Examples + +#### Named Exports Parsing + +The basic matching rules for named exports are `exports.name`, `exports['name']` or `Object.defineProperty(exports, 'name', ...)`. This matching is done without scope analysis and regardless of the expression position: + +```js +// DETECTS EXPORTS: a, b +(function (exports) { + exports.a = 'a'; + exports['b'] = 'b'; +})(exports); +``` + +Because there is no scope analysis, the above detection may overclassify: + +```js +// DETECTS EXPORTS: a, b, c +(function (exports, Object) { + exports.a = 'a'; + exports['b'] = 'b'; + if (false) + exports.c = 'c'; +})(NOT_EXPORTS, NOT_OBJECT); +``` + +It will in turn underclassify in cases where the identifiers are renamed: + +```js +// DETECTS: NO EXPORTS +(function (e) { + e.a = 'a'; + e['b'] = 'b'; +})(exports); +``` + +#### Getter Exports Parsing + +`Object.defineProperty` is detected for specifically value and getter forms returning an identifier or member expression: + +```js +// DETECTS: a, b, c, d, __esModule +Object.defineProperty(exports, 'a', { + enumerable: true, + get: function () { + return q.p; + } +}); +Object.defineProperty(exports, 'b', { + enumerable: true, + get: function () { + return q['p']; + } +}); +Object.defineProperty(exports, 'c', { + enumerable: true, + get () { + return b; + } +}); +Object.defineProperty(exports, 'd', { value: 'd' }); +Object.defineProperty(exports, '__esModule', { value: true }); +``` + +Value properties are also detected specifically: + +```js +Object.defineProperty(exports, 'a', { + value: 'no problem' +}); +``` + +To avoid matching getters that have side effects, any getter for an export name that does not support the forms above will +opt-out of the getter matching: + +```js +// DETECTS: NO EXPORTS +Object.defineProperty(exports, 'a', { + get () { + return 'nope'; + } +}); + +if (false) { + Object.defineProperty(module.exports, 'a', { + get () { + return dynamic(); + } + }) +} +``` + +Alternative object definition structures or getter function bodies are not detected: + +```js +// DETECTS: NO EXPORTS +Object.defineProperty(exports, 'a', { + enumerable: false, + get () { + return p; + } +}); +Object.defineProperty(exports, 'b', { + configurable: true, + get () { + return p; + } +}); +Object.defineProperty(exports, 'c', { + get: () => p +}); +Object.defineProperty(exports, 'd', { + enumerable: true, + get: function () { + return dynamic(); + } +}); +Object.defineProperty(exports, 'e', { + enumerable: true, + get () { + return 'str'; + } +}); +``` + +`Object.defineProperties` is also not supported. + +#### Exports Object Assignment + +A best-effort is made to detect `module.exports` object assignments, but because this is not a full parser, arbitrary expressions are not handled in the +object parsing process. + +Simple object definitions are supported: + +```js +// DETECTS EXPORTS: a, b, c +module.exports = { + a, + 'b': b, + c: c, + ...d +}; +``` + +Object properties that are not identifiers or string expressions will bail out of the object detection, while spreads are ignored: + +```js +// DETECTS EXPORTS: a, b +module.exports = { + a, + ...d, + b: require('c'), + c: "not detected since require('c') above bails the object detection" +} +``` + +`Object.defineProperties` is not currently supported either. + +#### module.exports reexport assignment + +Any `module.exports = require('mod')` assignment is detected as a reexport, but only the last one is returned: + +```js +// DETECTS REEXPORTS: c +module.exports = require('a'); +(module => module.exports = require('b'))(NOT_MODULE); +if (false) module.exports = require('c'); +``` + +This is to avoid over-classification in Webpack bundles with externals which include `module.exports = require('external')` in their source for every external dependency. + +In exports object assignment, any spread of `require()` are detected as multiple separate reexports: + +```js +// DETECTS REEXPORTS: a, b +module.exports = require('ignored'); +module.exports = { + ...require('a'), + ...require('b') +}; +``` + +#### Transpiler Re-exports + +For named exports, transpiler output works well with the rules described above. + +But for star re-exports, special care is taken to support common patterns of transpiler outputs from Babel and TypeScript as well as bundlers like RollupJS. +These reexport and star reexport patterns are restricted to only be detected at the top-level as provided by the direct output of these tools. + +For example, `export * from 'external'` is output by Babel as: + +```js +"use strict"; + +exports.__esModule = true; + +var _external = require("external"); + +Object.keys(_external).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + exports[key] = _external[key]; +}); +``` + +Where the `var _external = require("external")` is specifically detected as well as the `Object.keys(_external)` statement, down to the exact +for of that entire expression including minor variations of the output. The `_external` and `key` identifiers are carefully matched in this +detection. + +Similarly for TypeScript, `export * from 'external'` is output as: + +```js +"use strict"; +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("external")); +``` + +Where the `__export(require("external"))` statement is explicitly detected as a reexport, including variations `tslib.__export` and `__exportStar`. + +### Environment Support + +Node.js 10+, and [all browsers with Web Assembly support](https://caniuse.com/#feat=wasm). + +### JS Grammar Support + +* Token state parses all line comments, block comments, strings, template strings, blocks, parens and punctuators. +* Division operator / regex token ambiguity is handled via backtracking checks against punctuator prefixes, including closing brace or paren backtracking. +* Always correctly parses valid JS source, but may parse invalid JS source without errors. + +### Benchmarks + +Benchmarks can be run with `npm run bench`. + +Current results: + +JS Build: + +``` +Module load time +> 4ms +Cold Run, All Samples +test/samples/*.js (3635 KiB) +> 299ms + +Warm Runs (average of 25 runs) +test/samples/angular.js (1410 KiB) +> 13.96ms +test/samples/angular.min.js (303 KiB) +> 4.72ms +test/samples/d3.js (553 KiB) +> 6.76ms +test/samples/d3.min.js (250 KiB) +> 4ms +test/samples/magic-string.js (34 KiB) +> 0.64ms +test/samples/magic-string.min.js (20 KiB) +> 0ms +test/samples/rollup.js (698 KiB) +> 8.48ms +test/samples/rollup.min.js (367 KiB) +> 5.36ms + +Warm Runs, All Samples (average of 25 runs) +test/samples/*.js (3635 KiB) +> 40.28ms +``` + +Wasm Build: +``` +Module load time +> 10ms +Cold Run, All Samples +test/samples/*.js (3635 KiB) +> 43ms + +Warm Runs (average of 25 runs) +test/samples/angular.js (1410 KiB) +> 9.32ms +test/samples/angular.min.js (303 KiB) +> 3.16ms +test/samples/d3.js (553 KiB) +> 5ms +test/samples/d3.min.js (250 KiB) +> 2.32ms +test/samples/magic-string.js (34 KiB) +> 0.16ms +test/samples/magic-string.min.js (20 KiB) +> 0ms +test/samples/rollup.js (698 KiB) +> 6.28ms +test/samples/rollup.min.js (367 KiB) +> 3.6ms + +Warm Runs, All Samples (average of 25 runs) +test/samples/*.js (3635 KiB) +> 27.76ms +``` + +### Wasm Build Steps + +To build download the WASI SDK from https://github.com/WebAssembly/wasi-sdk/releases. + +The Makefile assumes the existence of "wasi-sdk-11.0" and "wabt" (optional) as sibling folders to this project. + +The build through the Makefile is then run via `make lib/lexer.wasm`, which can also be triggered via `npm run build-wasm` to create `dist/lexer.js`. + +On Windows it may be preferable to use the Linux subsystem. + +After the Web Assembly build, the CJS build can be triggered via `npm run build`. + +Optimization passes are run with [Binaryen](https://github.com/WebAssembly/binaryen) prior to publish to reduce the Web Assembly footprint. + +### License + +MIT + +[travis-url]: https://travis-ci.org/guybedford/es-module-lexer +[travis-image]: https://travis-ci.org/guybedford/es-module-lexer.svg?branch=master diff --git a/cjs-module-lexer/bench/index.mjs b/cjs-module-lexer/bench/index.mjs new file mode 100755 index 0000000..7ef0660 --- /dev/null +++ b/cjs-module-lexer/bench/index.mjs @@ -0,0 +1,90 @@ +/* + * Shimport benchmarks for comparison + */ + +import fs from 'fs'; +import c from 'kleur'; + +const n = 25; + +const files = fs.readdirSync('test/samples') + .map(f => `test/samples/${f}`) + .filter(x => x.endsWith('.js')) + .map(file => { + const source = fs.readFileSync(file); + return { + file, + code: source.toString(), + size: source.byteLength + }; + }); + +Promise.resolve().then(async () => { + function timeRun (code) { + const start = process.hrtime.bigint(); + const parsed = parse(code); + const end = process.hrtime.bigint(); + return Math.round(Number(end - start) / 1e6); + } + + console.log('--- JS Build ---'); + console.log('Module load time'); + { + const start = process.hrtime.bigint(); + var { parse } = await import('../lexer.js'); + console.log(`> ${c.bold.green(Math.round(Number(process.hrtime.bigint() - start) / 1e6) + 'ms')}`); + } + + doRun(); + + console.log('--- Wasm Build ---'); + console.log('Module load time'); + { + const start = process.hrtime.bigint(); + var { parse, init } = await import('../dist/lexer.mjs'); + await init(); + console.log(`> ${c.bold.green(Math.round(Number(process.hrtime.bigint() - start) / 1e6) + 'ms')}`); + } + + doRun(); + + function doRun () { + console.log('Cold Run, All Samples'); + let totalSize = 0; + { + let total = 0; + files.forEach(({ code, size }) => { + totalSize += size; + total += timeRun(code); + }); + console.log(c.bold.cyan(`test/samples/*.js (${Math.round(totalSize / 1e3)} KiB)`)); + console.log(`> ${c.bold.green(total + 'ms')}`); + gc(); + } + + console.log(`\nWarm Runs (average of ${n} runs)`); + files.forEach(({ file, code, size }) => { + console.log(c.bold.cyan(`${file} (${Math.round(size / 1e3)} KiB)`)); + + let total = 0; + for (let i = 0; i < n; i++) { + total += timeRun(code); + gc(); + } + + console.log(`> ${c.bold.green((total / n) + 'ms')}`); + }); + + console.log(`\nWarm Runs, All Samples (average of ${n} runs)`); + { + let total = 0; + for (let i = 0; i < n; i++) { + files.forEach(({ code }) => { + total += timeRun(code); + }); + } + console.log(c.bold.cyan(`test/samples/*.js (${Math.round(totalSize / 1e3)} KiB)`)); + console.log(`> ${c.bold.green((total / n) + 'ms')}`); + } + } +}); diff --git a/cjs-module-lexer/build.js b/cjs-module-lexer/build.js new file mode 100755 index 0000000..c9fc8be --- /dev/null +++ b/cjs-module-lexer/build.js @@ -0,0 +1,22 @@ +const fs = require('fs'); +const terser = require('terser'); + +const MINIFY = true; + +try { fs.mkdirSync('./dist'); } +catch (e) {} + +const wasmBuffer = fs.readFileSync('./lib/lexer.wasm'); +const jsSource = fs.readFileSync('./src/lexer.js').toString(); +const pjson = JSON.parse(fs.readFileSync('./package.json').toString()); + +const jsSourceProcessed = jsSource.replace('WASM_BINARY', wasmBuffer.toString('base64')); + +const minified = MINIFY && terser.minify(jsSourceProcessed, { + module: true, + output: { + preamble: `/* cjs-module-lexer ${pjson.version} */` + } +}); + +fs.writeFileSync('./dist/lexer.mjs', minified ? minified.code : jsSourceProcessed); diff --git a/cjs-module-lexer/include-wasm/cjs-module-lexer.h b/cjs-module-lexer/include-wasm/cjs-module-lexer.h new file mode 100755 index 0000000..cafb797 --- /dev/null +++ b/cjs-module-lexer/include-wasm/cjs-module-lexer.h @@ -0,0 +1,240 @@ +#include +#include +#include +#include +#include + +extern unsigned char __heap_base; + +const uint16_t* source = (void*)&__heap_base; +uint32_t parse_error; + +struct Slice { + const uint16_t* start; + const uint16_t* end; + struct Slice* next; +}; +typedef struct Slice Slice; + +struct StarExportBinding { + const uint16_t* specifier_start; + const uint16_t* specifier_end; + const uint16_t* id_start; + const uint16_t* id_end; +}; +typedef struct StarExportBinding StarExportBinding; + +Slice* first_export = NULL; +Slice* export_read_head = NULL; +Slice* export_write_head = NULL; +Slice* first_reexport = NULL; +Slice* reexport_read_head = NULL; +Slice* reexport_write_head = NULL; +Slice* first_unsafe_getter = NULL; +Slice* unsafe_getter_read_head = NULL; +Slice* unsafe_getter_write_head = NULL; +void* analysis_base; +void* analysis_head; + +void bail (uint32_t err); + +// allocateSource +const uint16_t* sa (uint32_t utf16Len) { + const uint16_t* sourceEnd = source + utf16Len + 1; + // ensure source is null terminated + *(uint16_t*)(source + utf16Len) = '\0'; + analysis_base = (void*)sourceEnd; + analysis_head = analysis_base; + first_export = NULL; + export_write_head = NULL; + export_read_head = NULL; + first_reexport = NULL; + reexport_write_head = NULL; + reexport_read_head = NULL; + first_unsafe_getter = NULL; + unsafe_getter_write_head = NULL; + unsafe_getter_read_head = NULL; + return source; +} + +// getErr +uint32_t e () { + return parse_error; +} + +// getExportStart +uint32_t es () { + return export_read_head->start - source; +} +// getExportEnd +uint32_t ee () { + return export_read_head->end - source; +} +// getReexportStart +uint32_t res () { + return reexport_read_head->start - source; +} +// getReexportEnd +uint32_t ree () { + return reexport_read_head->end - source; +} +// getUnsafeGetterStart +uint32_t us () { + return unsafe_getter_read_head->start - source; +} +// getUnsafeGetterEnd +uint32_t ue () { + return unsafe_getter_read_head->end - source; +} +// readExport +bool re () { + if (export_read_head == NULL) + export_read_head = first_export; + else + export_read_head = export_read_head->next; + if (export_read_head == NULL) + return false; + return true; +} +// readReexport +bool rre () { + if (reexport_read_head == NULL) + reexport_read_head = first_reexport; + else + reexport_read_head = reexport_read_head->next; + if (reexport_read_head == NULL) + return false; + return true; +} +// readUnsafeGetter +bool ru () { + if (unsafe_getter_read_head == NULL) + unsafe_getter_read_head = first_unsafe_getter; + else + unsafe_getter_read_head = unsafe_getter_read_head->next; + if (unsafe_getter_read_head == NULL) + return false; + return true; +} + +bool parse (uint32_t point); + +void _addExport (const uint16_t* start, const uint16_t* end) { + Slice* export = (Slice*)(analysis_head); + analysis_head = analysis_head + sizeof(Slice); + if (export_write_head == NULL) + first_export = export; + else + export_write_head->next = export; + export_write_head = export; + export->start = start; + export->end = end; + export->next = NULL; +} +void _addReexport (const uint16_t* start, const uint16_t* end) { + Slice* reexport = (Slice*)(analysis_head); + analysis_head = analysis_head + sizeof(Slice); + if (reexport_write_head == NULL) + first_reexport = reexport; + else + reexport_write_head->next = reexport; + reexport_write_head = reexport; + reexport->start = start; + reexport->end = end; + reexport->next = NULL; +} +void _addUnsafeGetter (const uint16_t* start, const uint16_t* end) { + Slice* unsafe_getter = (Slice*)(analysis_head); + analysis_head = analysis_head + sizeof(Slice); + if (unsafe_getter_write_head == NULL) + first_unsafe_getter = unsafe_getter; + else + unsafe_getter_write_head->next = unsafe_getter; + unsafe_getter_write_head = unsafe_getter; + unsafe_getter->start = start; + unsafe_getter->end = end; + unsafe_getter->next = NULL; +} +void _clearReexports () { + reexport_write_head = NULL; + first_reexport = NULL; +} +void (*addExport)(const uint16_t*, const uint16_t*) = &_addExport; +void (*addReexport)(const uint16_t*, const uint16_t*) = &_addReexport; +void (*addUnsafeGetter)(const uint16_t*, const uint16_t*) = &_addUnsafeGetter; +void (*clearReexports)() = &_clearReexports; +bool parseCJS (uint16_t* source, uint32_t sourceLen, void (*addExport)(const uint16_t* start, const uint16_t* end), void (*addReexport)(const uint16_t* start, const uint16_t* end), void (*addUnsafeGetter)(const uint16_t*, const uint16_t*), void (*clearReexports)()); + +enum RequireType { + Import, + ExportAssign, + ExportStar +}; + +void tryBacktrackAddStarExportBinding (uint16_t* pos); +bool tryParseRequire (enum RequireType requireType); +void tryParseLiteralExports (); +bool readExportsOrModuleDotExports (uint16_t ch); +void tryParseModuleExportsDotAssign (); +void tryParseExportsDotAssign (bool assign); +void tryParseObjectDefineOrKeys (bool keys); +bool identifier (uint16_t ch); + +void throwIfImportStatement (); +void throwIfExportStatement (); + +void readImportString (const uint16_t* ss, uint16_t ch); +uint16_t readExportAs (uint16_t* startPos, uint16_t* endPos); + +uint16_t commentWhitespace (); +void stringLiteral (uint16_t quote); +void regularExpression (); +void templateString (); +void blockComment (); +void lineComment (); + +uint16_t readToWsOrPunctuator (uint16_t ch); + +uint32_t fullCharCode (uint16_t ch); +uint32_t fullCharCodeAtLast (uint16_t* pos); +bool isIdentifierStart (uint32_t code); +bool isIdentifierChar (uint32_t code); +int charCodeByteLen (uint32_t ch); + +bool isBr (uint16_t c); +bool isBrOrWs (uint16_t c); +bool isBrOrWsOrPunctuator (uint16_t c); +bool isBrOrWsOrPunctuatorNotDot (uint16_t c); + +bool str_eq2 (uint16_t* pos, uint16_t c1, uint16_t c2); +bool str_eq3 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3); +bool str_eq4 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4); +bool str_eq5 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5); +bool str_eq6 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6); +bool str_eq7 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7); +bool str_eq8 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8); +bool str_eq9 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9); +bool str_eq10 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10); +bool str_eq13 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13); +bool str_eq18 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18); +bool str_eq22 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18, uint16_t c19, uint16_t c20, uint16_t c21, uint16_t c22); + +bool readPrecedingKeyword2(uint16_t* pos, uint16_t c1, uint16_t c2); +bool readPrecedingKeyword3(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3); +bool readPrecedingKeyword4(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4); +bool readPrecedingKeyword5(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5); +bool readPrecedingKeyword6(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6); +bool readPrecedingKeyword7(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7); + +bool keywordStart (uint16_t* pos); +bool isExpressionKeyword (uint16_t* pos); +bool isParenKeyword (uint16_t* pos); +bool isPunctuator (uint16_t charCode); +bool isExpressionPunctuator (uint16_t charCode); +bool isExpressionTerminator (uint16_t* pos); + +void nextChar (uint16_t ch); +void nextCharSurrogate (uint16_t ch); +uint16_t readChar (); + +void syntaxError (); diff --git a/cjs-module-lexer/include/cjs-module-lexer.h b/cjs-module-lexer/include/cjs-module-lexer.h new file mode 100755 index 0000000..d2c3cad --- /dev/null +++ b/cjs-module-lexer/include/cjs-module-lexer.h @@ -0,0 +1,108 @@ +#ifndef __CJS_MODULE_LEXER_H__ +#define __CJS_MODULE_LEXER_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include + +struct Slice { + const uint16_t* start; + const uint16_t* end; +}; +typedef struct Slice Slice; + +struct StarExportBinding { + const uint16_t* specifier_start; + const uint16_t* specifier_end; + const uint16_t* id_start; + const uint16_t* id_end; +}; +typedef struct StarExportBinding StarExportBinding; + +void bail (uint32_t err); + +bool parseCJS (uint16_t* source, uint32_t sourceLen, void (*addExport)(const uint16_t*, const uint16_t*), void (*addReexport)(const uint16_t*, const uint16_t*), void (*addUnsafeGetter)(const uint16_t*, const uint16_t*), void (*clearReexports)()); + +enum RequireType { + Import, + ExportAssign, + ExportStar +}; + +void tryBacktrackAddStarExportBinding (uint16_t* pos); +bool tryParseRequire (enum RequireType requireType); +void tryParseLiteralExports (); +bool readExportsOrModuleDotExports (uint16_t ch); +void tryParseModuleExportsDotAssign (); +void tryParseExportsDotAssign (bool assign); +void tryParseObjectDefineOrKeys (bool keys); +bool identifier (uint16_t ch); + +void throwIfImportStatement (); +void throwIfExportStatement (); + +void readImportString (const uint16_t* ss, uint16_t ch); +uint16_t readExportAs (uint16_t* startPos, uint16_t* endPos); + +uint16_t commentWhitespace (); +void stringLiteral (uint16_t quote); +void regularExpression (); +void templateString (); +void blockComment (); +void lineComment (); + +uint16_t readToWsOrPunctuator (uint16_t ch); + +uint32_t fullCharCodeAtLast (uint16_t* pos); +bool isIdentifierStart (uint32_t code); +bool isIdentifierChar (uint32_t code); +int charCodeByteLen (uint32_t ch); + +bool isBr (uint16_t c); +bool isBrOrWs (uint16_t c); +bool isBrOrWsOrPunctuator (uint16_t c); +bool isBrOrWsOrPunctuatorNotDot (uint16_t c); + +bool str_eq2 (uint16_t* pos, uint16_t c1, uint16_t c2); +bool str_eq3 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3); +bool str_eq4 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4); +bool str_eq5 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5); +bool str_eq6 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6); +bool str_eq7 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7); +bool str_eq9 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9); +bool str_eq10 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10); +bool str_eq13 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13); +bool str_eq18 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18); +bool str_eq22 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18, uint16_t c19, uint16_t c20, uint16_t c21, uint16_t c22); + +bool readPrecedingKeyword2(uint16_t* pos, uint16_t c1, uint16_t c2); +bool readPrecedingKeyword3(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3); +bool readPrecedingKeyword4(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4); +bool readPrecedingKeyword5(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5); +bool readPrecedingKeyword6(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6); +bool readPrecedingKeyword7(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7); + +bool keywordStart (uint16_t* pos); +bool isExpressionKeyword (uint16_t* pos); +bool isParenKeyword (uint16_t* pos); +bool isPunctuator (uint16_t charCode); +bool isExpressionPunctuator (uint16_t charCode); +bool isExpressionTerminator (uint16_t* pos); + +void nextChar (uint16_t ch); +void nextCharSurrogate (uint16_t ch); +uint16_t readChar (); + +void syntaxError (); + +#ifdef __cplusplus +} +#endif + +#endif /* __CJS_MODULE_LEXER_H__ */ \ No newline at end of file diff --git a/cjs-module-lexer/lexer.d.ts b/cjs-module-lexer/lexer.d.ts new file mode 100755 index 0000000..99aa913 --- /dev/null +++ b/cjs-module-lexer/lexer.d.ts @@ -0,0 +1,7 @@ +export interface Exports { + exports: string[]; + reexports: string[]; +} + +export declare function parse(source: string, name?: string): Exports; +export declare function init(): Promise; diff --git a/cjs-module-lexer/lexer.js b/cjs-module-lexer/lexer.js new file mode 100755 index 0000000..1bf3123 --- /dev/null +++ b/cjs-module-lexer/lexer.js @@ -0,0 +1,1438 @@ +let source, pos, end; +let openTokenDepth, + templateDepth, + lastTokenPos, + lastSlashWasDivision, + templateStack, + templateStackDepth, + openTokenPosStack, + openClassPosStack, + nextBraceIsClass, + starExportMap, + lastStarExportSpecifier, + _exports, + unsafeGetters, + reexports; + +function resetState () { + openTokenDepth = 0; + templateDepth = -1; + lastTokenPos = -1; + lastSlashWasDivision = false; + templateStack = new Array(1024); + templateStackDepth = 0; + openTokenPosStack = new Array(1024); + openClassPosStack = new Array(1024); + nextBraceIsClass = false; + starExportMap = Object.create(null); + lastStarExportSpecifier = null; + + _exports = new Set(); + unsafeGetters = new Set(); + reexports = new Set(); +} + +// RequireType +const Import = 0; +const ExportAssign = 1; +const ExportStar = 2; + +function parseCJS (source, name = '@') { + resetState(); + try { + parseSource(source); + } + catch (e) { + e.message += `\n at ${name}:${source.slice(0, pos).split('\n').length}:${pos - source.lastIndexOf('\n', pos - 1)}`; + e.loc = pos; + throw e; + } + const result = { exports: [..._exports].filter(expt => expt !== undefined && !unsafeGetters.has(expt)), reexports: [...reexports].filter(reexpt => reexpt !== undefined) }; + resetState(); + return result; +} + +function decode (str) { + if (str[0] === '"' || str[0] === '\'') { + try { + const decoded = (0, eval)(str); + // Filter to exclude non-matching UTF-16 surrogate strings + for (let i = 0; i < decoded.length; i++) { + const surrogatePrefix = decoded.charCodeAt(i) & 0xFC00; + if (surrogatePrefix < 0xD800) { + // Not a surrogate + continue; + } + else if (surrogatePrefix === 0xD800) { + // Validate surrogate pair + if ((decoded.charCodeAt(++i) & 0xFC00) !== 0xDC00) + return; + } + else { + // Out-of-range surrogate code (above 0xD800) + return; + } + } + return decoded; + } + catch {} + } + else { + return str; + } +} + +function parseSource (cjsSource) { + source = cjsSource; + pos = -1; + end = source.length - 1; + let ch = 0; + + // Handle #! + if (source.charCodeAt(0) === 35/*#*/ && source.charCodeAt(1) === 33/*!*/) { + if (source.length === 2) + return true; + pos += 2; + while (pos++ < end) { + ch = source.charCodeAt(pos); + if (ch === 10/*\n*/ || ch === 13/*\r*/) + break; + } + } + + while (pos++ < end) { + ch = source.charCodeAt(pos); + + if (ch === 32 || ch < 14 && ch > 8) + continue; + + if (openTokenDepth === 0) { + switch (ch) { + case 105/*i*/: + if (source.startsWith('mport', pos + 1) && keywordStart(pos)) + throwIfImportStatement(); + lastTokenPos = pos; + continue; + case 114/*r*/: + const startPos = pos; + if (tryParseRequire(Import) && keywordStart(startPos)) + tryBacktrackAddStarExportBinding(startPos - 1); + lastTokenPos = pos; + continue; + case 95/*_*/: + if (source.startsWith('interopRequireWildcard', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) { + const startPos = pos; + pos += 23; + if (source.charCodeAt(pos) === 40/*(*/) { + pos++; + openTokenPosStack[openTokenDepth++] = lastTokenPos; + if (tryParseRequire(Import) && keywordStart(startPos)) { + tryBacktrackAddStarExportBinding(startPos - 1); + } + } + } + else if (source.startsWith('_export', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) { + pos += 8; + if (source.startsWith('Star', pos)) + pos += 4; + if (source.charCodeAt(pos) === 40/*(*/) { + openTokenPosStack[openTokenDepth++] = lastTokenPos; + if (source.charCodeAt(++pos) === 114/*r*/) + tryParseRequire(ExportStar); + } + } + lastTokenPos = pos; + continue; + } + } + + switch (ch) { + case 101/*e*/: + if (source.startsWith('xport', pos + 1) && keywordStart(pos)) { + if (source.charCodeAt(pos + 6) === 115/*s*/) + tryParseExportsDotAssign(false); + else if (openTokenDepth === 0) + throwIfExportStatement(); + } + break; + case 99/*c*/: + if (keywordStart(pos) && source.startsWith('lass', pos + 1) && isBrOrWs(source.charCodeAt(pos + 5))) + nextBraceIsClass = true; + break; + case 109/*m*/: + if (source.startsWith('odule', pos + 1) && keywordStart(pos)) + tryParseModuleExportsDotAssign(); + break; + case 79/*O*/: + if (source.startsWith('bject', pos + 1) && keywordStart(pos)) + tryParseObjectDefineOrKeys(openTokenDepth === 0); + break; + case 40/*(*/: + openTokenPosStack[openTokenDepth++] = lastTokenPos; + break; + case 41/*)*/: + if (openTokenDepth === 0) + throw new Error('Unexpected closing bracket.'); + openTokenDepth--; + break; + case 123/*{*/: + openClassPosStack[openTokenDepth] = nextBraceIsClass; + nextBraceIsClass = false; + openTokenPosStack[openTokenDepth++] = lastTokenPos; + break; + case 125/*}*/: + if (openTokenDepth === 0) + throw new Error('Unexpected closing brace.'); + if (openTokenDepth-- === templateDepth) { + templateDepth = templateStack[--templateStackDepth]; + templateString(); + } + else { + if (templateDepth !== -1 && openTokenDepth < templateDepth) + throw new Error('Unexpected closing brace.'); + } + break; + case 60/*>*/: + // TODO: + * + * Should not match component / directive because we are in ngNonBindable. + * + * + * + * ``` + * + * @codeGenApi + */ + function ɵɵenableBindings() { + instructionState.bindingsEnabled = true; + } + /** + * Disables directive matching on element. + * + * * Example: + * ``` + * + * Should match component / directive. + * + *
+ * + * + * Should not match component / directive because we are in ngNonBindable. + * + * + *
+ * ``` + * + * @codeGenApi + */ + function ɵɵdisableBindings() { + instructionState.bindingsEnabled = false; + } + /** + * Return the current `LView`. + */ + function getLView() { + return instructionState.lFrame.lView; + } + /** + * Return the current `TView`. + */ + function getTView() { + return instructionState.lFrame.tView; + } + /** + * Restores `contextViewData` to the given OpaqueViewState instance. + * + * Used in conjunction with the getCurrentView() instruction to save a snapshot + * of the current view and restore it when listeners are invoked. This allows + * walking the declaration view tree in listeners to get vars from parent views. + * + * @param viewToRestore The OpaqueViewState instance to restore. + * + * @codeGenApi + */ + function ɵɵrestoreView(viewToRestore) { + instructionState.lFrame.contextLView = viewToRestore; + } + function getPreviousOrParentTNode() { + return instructionState.lFrame.previousOrParentTNode; + } + function setPreviousOrParentTNode(tNode, isParent) { + instructionState.lFrame.previousOrParentTNode = tNode; + instructionState.lFrame.isParent = isParent; + } + function getIsParent() { + return instructionState.lFrame.isParent; + } + function setIsNotParent() { + instructionState.lFrame.isParent = false; + } + function setIsParent() { + instructionState.lFrame.isParent = true; + } + function getContextLView() { + return instructionState.lFrame.contextLView; + } + function getCheckNoChangesMode() { + // TODO(misko): remove this from the LView since it is ngDevMode=true mode only. + return instructionState.checkNoChangesMode; + } + function setCheckNoChangesMode(mode) { + instructionState.checkNoChangesMode = mode; + } + // top level variables should not be exported for performance reasons (PERF_NOTES.md) + function getBindingRoot() { + var lFrame = instructionState.lFrame; + var index = lFrame.bindingRootIndex; + if (index === -1) { + index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex; + } + return index; + } + function getBindingIndex() { + return instructionState.lFrame.bindingIndex; + } + function setBindingIndex(value) { + return instructionState.lFrame.bindingIndex = value; + } + function nextBindingIndex() { + return instructionState.lFrame.bindingIndex++; + } + function incrementBindingIndex(count) { + var lFrame = instructionState.lFrame; + var index = lFrame.bindingIndex; + lFrame.bindingIndex = lFrame.bindingIndex + count; + return index; + } + /** + * Set a new binding root index so that host template functions can execute. + * + * Bindings inside the host template are 0 index. But because we don't know ahead of time + * how many host bindings we have we can't pre-compute them. For this reason they are all + * 0 index and we just shift the root so that they match next available location in the LView. + * + * @param bindingRootIndex Root index for `hostBindings` + * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive + * whose `hostBindings` are being processed. + */ + function setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) { + var lFrame = instructionState.lFrame; + lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex; + setCurrentDirectiveIndex(currentDirectiveIndex); + } + /** + * When host binding is executing this points to the directive index. + * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef` + * `LView[getCurrentDirectiveIndex()]` is directive instance. + */ + function getCurrentDirectiveIndex() { + return instructionState.lFrame.currentDirectiveIndex; + } + /** + * Sets an index of a directive whose `hostBindings` are being processed. + * + * @param currentDirectiveIndex `TData` index where current directive instance can be found. + */ + function setCurrentDirectiveIndex(currentDirectiveIndex) { + instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex; + } + /** + * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being + * executed. + * + * @param tData Current `TData` where the `DirectiveDef` will be looked up at. + */ + function getCurrentDirectiveDef(tData) { + var currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex; + return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex]; + } + function getCurrentQueryIndex() { + return instructionState.lFrame.currentQueryIndex; + } + function setCurrentQueryIndex(value) { + instructionState.lFrame.currentQueryIndex = value; + } + /** + * This is a light weight version of the `enterView` which is needed by the DI system. + * @param newView + * @param tNode + */ + function enterDI(newView, tNode) { + ngDevMode && assertLViewOrUndefined(newView); + var newLFrame = allocLFrame(); + instructionState.lFrame = newLFrame; + newLFrame.previousOrParentTNode = tNode; + newLFrame.lView = newView; + } + /** + * Swap the current lView with a new lView. + * + * For performance reasons we store the lView in the top level of the module. + * This way we minimize the number of properties to read. Whenever a new view + * is entered we have to store the lView for later, and when the view is + * exited the state has to be restored + * + * @param newView New lView to become active + * @param tNode Element to which the View is a child of + * @returns the previously active lView; + */ + function enterView(newView, tNode) { + ngDevMode && assertLViewOrUndefined(newView); + var newLFrame = allocLFrame(); + if (ngDevMode) { + assertEqual(newLFrame.isParent, true, 'Expected clean LFrame'); + assertEqual(newLFrame.lView, null, 'Expected clean LFrame'); + assertEqual(newLFrame.tView, null, 'Expected clean LFrame'); + assertEqual(newLFrame.selectedIndex, 0, 'Expected clean LFrame'); + assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame'); + assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame'); + assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame'); + assertEqual(newLFrame.currentSanitizer, null, 'Expected clean LFrame'); + assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame'); + assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame'); + } + var tView = newView[TVIEW]; + instructionState.lFrame = newLFrame; + newLFrame.previousOrParentTNode = tNode; + newLFrame.lView = newView; + newLFrame.tView = tView; + newLFrame.contextLView = newView; + newLFrame.bindingIndex = tView.bindingStartIndex; + } + /** + * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure. + */ + function allocLFrame() { + var currentLFrame = instructionState.lFrame; + var childLFrame = currentLFrame === null ? null : currentLFrame.child; + var newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame; + return newLFrame; + } + function createLFrame(parent) { + var lFrame = { + previousOrParentTNode: null, + isParent: true, + lView: null, + tView: null, + selectedIndex: 0, + contextLView: null, + elementDepthCount: 0, + currentNamespace: null, + currentSanitizer: null, + currentDirectiveIndex: -1, + bindingRootIndex: -1, + bindingIndex: -1, + currentQueryIndex: 0, + parent: parent, + child: null, + }; + parent !== null && (parent.child = lFrame); // link the new LFrame for reuse. + return lFrame; + } + /** + * A lightweight version of leave which is used with DI. + * + * This function only resets `previousOrParentTNode` and `LView` as those are the only properties + * used with DI (`enterDI()`). + * + * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where + * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`. + */ + function leaveViewLight() { + var oldLFrame = instructionState.lFrame; + instructionState.lFrame = oldLFrame.parent; + oldLFrame.previousOrParentTNode = null; + oldLFrame.lView = null; + return oldLFrame; + } + /** + * This is a lightweight version of the `leaveView` which is needed by the DI system. + * + * NOTE: this function is an alias so that we can change the type of the function to have `void` + * return type. + */ + var leaveDI = leaveViewLight; + /** + * Leave the current `LView` + * + * This pops the `LFrame` with the associated `LView` from the stack. + * + * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is + * because for performance reasons we don't release `LFrame` but rather keep it for next use. + */ + function leaveView() { + var oldLFrame = leaveViewLight(); + oldLFrame.isParent = true; + oldLFrame.tView = null; + oldLFrame.selectedIndex = 0; + oldLFrame.contextLView = null; + oldLFrame.elementDepthCount = 0; + oldLFrame.currentDirectiveIndex = -1; + oldLFrame.currentNamespace = null; + oldLFrame.currentSanitizer = null; + oldLFrame.bindingRootIndex = -1; + oldLFrame.bindingIndex = -1; + oldLFrame.currentQueryIndex = 0; + } + function nextContextImpl(level) { + var contextLView = instructionState.lFrame.contextLView = + walkUpViews(level, instructionState.lFrame.contextLView); + return contextLView[CONTEXT]; + } + function walkUpViews(nestingLevel, currentView) { + while (nestingLevel > 0) { + ngDevMode && + assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.'); + currentView = currentView[DECLARATION_VIEW]; + nestingLevel--; + } + return currentView; + } + /** + * Gets the currently selected element index. + * + * Used with {@link property} instruction (and more in the future) to identify the index in the + * current `LView` to act on. + */ + function getSelectedIndex() { + return instructionState.lFrame.selectedIndex; + } + /** + * Sets the most recent index passed to {@link select} + * + * Used with {@link property} instruction (and more in the future) to identify the index in the + * current `LView` to act on. + * + * (Note that if an "exit function" was set earlier (via `setElementExitFn()`) then that will be + * run if and when the provided `index` value is different from the current selected index value.) + */ + function setSelectedIndex(index) { + instructionState.lFrame.selectedIndex = index; + } + /** + * Gets the `tNode` that represents currently selected element. + */ + function getSelectedTNode() { + var lFrame = instructionState.lFrame; + return getTNode(lFrame.tView, lFrame.selectedIndex); + } + /** + * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state. + * + * @codeGenApi + */ + function ɵɵnamespaceSVG() { + instructionState.lFrame.currentNamespace = SVG_NAMESPACE; + } + /** + * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state. + * + * @codeGenApi + */ + function ɵɵnamespaceMathML() { + instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE; + } + /** + * Sets the namespace used to create elements to `null`, which forces element creation to use + * `createElement` rather than `createElementNS`. + * + * @codeGenApi + */ + function ɵɵnamespaceHTML() { + namespaceHTMLInternal(); + } + /** + * Sets the namespace used to create elements to `null`, which forces element creation to use + * `createElement` rather than `createElementNS`. + */ + function namespaceHTMLInternal() { + instructionState.lFrame.currentNamespace = null; + } + function getNamespace() { + return instructionState.lFrame.currentNamespace; + } + function setCurrentStyleSanitizer(sanitizer) { + instructionState.lFrame.currentSanitizer = sanitizer; + } + function resetCurrentStyleSanitizer() { + setCurrentStyleSanitizer(null); + } + function getCurrentStyleSanitizer() { + // TODO(misko): This should throw when there is no LView, but it turns out we can get here from + // `NodeStyleDebug` hence we return `null`. This should be fixed + var lFrame = instructionState.lFrame; + return lFrame === null ? null : lFrame.currentSanitizer; + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + /** + * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`. + * + * Must be run *only* on the first template pass. + * + * Sets up the pre-order hooks on the provided `tView`, + * see {@link HookData} for details about the data structure. + * + * @param directiveIndex The index of the directive in LView + * @param directiveDef The definition containing the hooks to setup in tView + * @param tView The current TView + */ + function registerPreOrderHooks(directiveIndex, directiveDef, tView) { + ngDevMode && assertFirstCreatePass(tView); + var onChanges = directiveDef.onChanges, onInit = directiveDef.onInit, doCheck = directiveDef.doCheck; + if (onChanges) { + (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, onChanges); + (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, onChanges); + } + if (onInit) { + (tView.preOrderHooks || (tView.preOrderHooks = [])).push(-directiveIndex, onInit); + } + if (doCheck) { + (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, doCheck); + (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, doCheck); + } + } + /** + * + * Loops through the directives on the provided `tNode` and queues hooks to be + * run that are not initialization hooks. + * + * Should be executed during `elementEnd()` and similar to + * preserve hook execution order. Content, view, and destroy hooks for projected + * components and directives must be called *before* their hosts. + * + * Sets up the content, view, and destroy hooks on the provided `tView`, + * see {@link HookData} for details about the data structure. + * + * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up + * separately at `elementStart`. + * + * @param tView The current TView + * @param tNode The TNode whose directives are to be searched for hooks to queue + */ + function registerPostOrderHooks(tView, tNode) { + ngDevMode && assertFirstCreatePass(tView); + // It's necessary to loop through the directives at elementEnd() (rather than processing in + // directiveCreate) so we can preserve the current hook order. Content, view, and destroy + // hooks for projected components and directives must be called *before* their hosts. + for (var i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) { + var directiveDef = tView.data[i]; + if (directiveDef.afterContentInit) { + (tView.contentHooks || (tView.contentHooks = [])).push(-i, directiveDef.afterContentInit); + } + if (directiveDef.afterContentChecked) { + (tView.contentHooks || (tView.contentHooks = [])).push(i, directiveDef.afterContentChecked); + (tView.contentCheckHooks || (tView.contentCheckHooks = [])) + .push(i, directiveDef.afterContentChecked); + } + if (directiveDef.afterViewInit) { + (tView.viewHooks || (tView.viewHooks = [])).push(-i, directiveDef.afterViewInit); + } + if (directiveDef.afterViewChecked) { + (tView.viewHooks || (tView.viewHooks = [])).push(i, directiveDef.afterViewChecked); + (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, directiveDef.afterViewChecked); + } + if (directiveDef.onDestroy != null) { + (tView.destroyHooks || (tView.destroyHooks = [])).push(i, directiveDef.onDestroy); + } + } + } + /** + * Executing hooks requires complex logic as we need to deal with 2 constraints. + * + * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only + * once, across many change detection cycles. This must be true even if some hooks throw, or if + * some recursively trigger a change detection cycle. + * To solve that, it is required to track the state of the execution of these init hooks. + * This is done by storing and maintaining flags in the view: the {@link InitPhaseState}, + * and the index within that phase. They can be seen as a cursor in the following structure: + * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]] + * They are are stored as flags in LView[FLAGS]. + * + * 2. Pre-order hooks can be executed in batches, because of the select instruction. + * To be able to pause and resume their execution, we also need some state about the hook's array + * that is being processed: + * - the index of the next hook to be executed + * - the number of init hooks already found in the processed part of the array + * They are are stored as flags in LView[PREORDER_HOOK_FLAGS]. + */ + /** + * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were + * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read + * / write of the init-hooks related flags. + * @param lView The LView where hooks are defined + * @param hooks Hooks to be run + * @param nodeIndex 3 cases depending on the value: + * - undefined: all hooks from the array should be executed (post-order case) + * - null: execute hooks only from the saved index until the end of the array (pre-order case, when + * flushing the remaining hooks) + * - number: execute hooks only from the saved index until that node index exclusive (pre-order + * case, when executing select(number)) + */ + function executeCheckHooks(lView, hooks, nodeIndex) { + callHooks(lView, hooks, 3 /* InitPhaseCompleted */, nodeIndex); + } + /** + * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked, + * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed. + * @param lView The LView where hooks are defined + * @param hooks Hooks to be run + * @param initPhase A phase for which hooks should be run + * @param nodeIndex 3 cases depending on the value: + * - undefined: all hooks from the array should be executed (post-order case) + * - null: execute hooks only from the saved index until the end of the array (pre-order case, when + * flushing the remaining hooks) + * - number: execute hooks only from the saved index until that node index exclusive (pre-order + * case, when executing select(number)) + */ + function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) { + ngDevMode && + assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once'); + if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) { + callHooks(lView, hooks, initPhase, nodeIndex); + } + } + function incrementInitPhaseFlags(lView, initPhase) { + ngDevMode && + assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.'); + var flags = lView[FLAGS]; + if ((flags & 3 /* InitPhaseStateMask */) === initPhase) { + flags &= 2047 /* IndexWithinInitPhaseReset */; + flags += 1 /* InitPhaseStateIncrementer */; + lView[FLAGS] = flags; + } + } + /** + * Calls lifecycle hooks with their contexts, skipping init hooks if it's not + * the first LView pass + * + * @param currentView The current view + * @param arr The array in which the hooks are found + * @param initPhaseState the current state of the init phase + * @param currentNodeIndex 3 cases depending on the value: + * - undefined: all hooks from the array should be executed (post-order case) + * - null: execute hooks only from the saved index until the end of the array (pre-order case, when + * flushing the remaining hooks) + * - number: execute hooks only from the saved index until that node index exclusive (pre-order + * case, when executing select(number)) + */ + function callHooks(currentView, arr, initPhase, currentNodeIndex) { + ngDevMode && + assertEqual(getCheckNoChangesMode(), false, 'Hooks should never be run in the check no changes mode.'); + var startIndex = currentNodeIndex !== undefined ? + (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) : + 0; + var nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1; + var lastNodeIndexFound = 0; + for (var i = startIndex; i < arr.length; i++) { + var hook = arr[i + 1]; + if (typeof hook === 'number') { + lastNodeIndexFound = arr[i]; + if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) { + break; + } + } + else { + var isInitHook = arr[i] < 0; + if (isInitHook) + currentView[PREORDER_HOOK_FLAGS] += 65536 /* NumberOfInitHooksCalledIncrementer */; + if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) { + callHook(currentView, initPhase, arr, i); + currentView[PREORDER_HOOK_FLAGS] = + (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* NumberOfInitHooksCalledMask */) + i + + 2; + } + i++; + } + } + } + /** + * Execute one hook against the current `LView`. + * + * @param currentView The current view + * @param initPhaseState the current state of the init phase + * @param arr The array in which the hooks are found + * @param i The current index within the hook data array + */ + function callHook(currentView, initPhase, arr, i) { + var isInitHook = arr[i] < 0; + var hook = arr[i + 1]; + var directiveIndex = isInitHook ? -arr[i] : arr[i]; + var directive = currentView[directiveIndex]; + if (isInitHook) { + var indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */; + // The init phase state must be always checked here as it may have been recursively + // updated + if (indexWithintInitPhase < + (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) && + (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) { + currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */; + hook.call(directive); + } + } + else { + hook.call(directive); + } + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + var TNODE = 8; + var PARENT_INJECTOR = 8; + var INJECTOR_BLOOM_PARENT_SIZE = 9; + var NO_PARENT_INJECTOR = -1; + /** + * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in + * `TView.data`. This allows us to store information about the current node's tokens (which + * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be + * shared, so they live in `LView`). + * + * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter + * determines whether a directive is available on the associated node or not. This prevents us + * from searching the directives array at this level unless it's probable the directive is in it. + * + * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters. + * + * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed + * using interfaces as they were previously. The start index of each `LInjector` and `TInjector` + * will differ based on where it is flattened into the main array, so it's not possible to know + * the indices ahead of time and save their types here. The interfaces are still included here + * for documentation purposes. + * + * export interface LInjector extends Array { + * + * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE) + * [0]: number; + * + * // Cumulative bloom for directive IDs 32-63 + * [1]: number; + * + * // Cumulative bloom for directive IDs 64-95 + * [2]: number; + * + * // Cumulative bloom for directive IDs 96-127 + * [3]: number; + * + * // Cumulative bloom for directive IDs 128-159 + * [4]: number; + * + * // Cumulative bloom for directive IDs 160 - 191 + * [5]: number; + * + * // Cumulative bloom for directive IDs 192 - 223 + * [6]: number; + * + * // Cumulative bloom for directive IDs 224 - 255 + * [7]: number; + * + * // We need to store a reference to the injector's parent so DI can keep looking up + * // the injector tree until it finds the dependency it's looking for. + * [PARENT_INJECTOR]: number; + * } + * + * export interface TInjector extends Array { + * + * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE) + * [0]: number; + * + * // Shared node bloom for directive IDs 32-63 + * [1]: number; + * + * // Shared node bloom for directive IDs 64-95 + * [2]: number; + * + * // Shared node bloom for directive IDs 96-127 + * [3]: number; + * + * // Shared node bloom for directive IDs 128-159 + * [4]: number; + * + * // Shared node bloom for directive IDs 160 - 191 + * [5]: number; + * + * // Shared node bloom for directive IDs 192 - 223 + * [6]: number; + * + * // Shared node bloom for directive IDs 224 - 255 + * [7]: number; + * + * // Necessary to find directive indices for a particular node. + * [TNODE]: TElementNode|TElementContainerNode|TContainerNode; + * } + */ + /** + * Factory for creating instances of injectors in the NodeInjector. + * + * This factory is complicated by the fact that it can resolve `multi` factories as well. + * + * NOTE: Some of the fields are optional which means that this class has two hidden classes. + * - One without `multi` support (most common) + * - One with `multi` values, (rare). + * + * Since VMs can cache up to 4 inline hidden classes this is OK. + * + * - Single factory: Only `resolving` and `factory` is defined. + * - `providers` factory: `componentProviders` is a number and `index = -1`. + * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`. + */ + var NodeInjectorFactory = /** @class */ (function () { + function NodeInjectorFactory( + /** + * Factory to invoke in order to create a new instance. + */ + factory, + /** + * Set to `true` if the token is declared in `viewProviders` (or if it is component). + */ + isViewProvider, injectImplementation) { + this.factory = factory; + /** + * Marker set to true during factory invocation to see if we get into recursive loop. + * Recursive loop causes an error to be displayed. + */ + this.resolving = false; + this.canSeeViewProviders = isViewProvider; + this.injectImpl = injectImplementation; + } + return NodeInjectorFactory; + }()); + function isFactory(obj) { + return obj instanceof NodeInjectorFactory; + } + // Note: This hack is necessary so we don't erroneously get a circular dependency + // failure based on types. + var unusedValueExportToPlacateAjd$3 = 1; + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + function assertNodeType(tNode, type) { + assertDefined(tNode, 'should be called with a TNode'); + assertEqual(tNode.type, type, "should be a " + typeName(type)); + } + function assertNodeOfPossibleTypes(tNode) { + var types = []; + for (var _i = 1; _i < arguments.length; _i++) { + types[_i - 1] = arguments[_i]; + } + assertDefined(tNode, 'should be called with a TNode'); + var found = types.some(function (type) { return tNode.type === type; }); + assertEqual(found, true, "Should be one of " + types.map(typeName).join(', ') + " but got " + typeName(tNode.type)); + } + function typeName(type) { + if (type == 1 /* Projection */) + return 'Projection'; + if (type == 0 /* Container */) + return 'Container'; + if (type == 5 /* IcuContainer */) + return 'IcuContainer'; + if (type == 2 /* View */) + return 'View'; + if (type == 3 /* Element */) + return 'Element'; + if (type == 4 /* ElementContainer */) + return 'ElementContainer'; + return ''; + } + + /** + * Assigns all attribute values to the provided element via the inferred renderer. + * + * This function accepts two forms of attribute entries: + * + * default: (key, value): + * attrs = [key1, value1, key2, value2] + * + * namespaced: (NAMESPACE_MARKER, uri, name, value) + * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value] + * + * The `attrs` array can contain a mix of both the default and namespaced entries. + * The "default" values are set without a marker, but if the function comes across + * a marker value then it will attempt to set a namespaced value. If the marker is + * not of a namespaced value then the function will quit and return the index value + * where it stopped during the iteration of the attrs array. + * + * See [AttributeMarker] to understand what the namespace marker value is. + * + * Note that this instruction does not support assigning style and class values to + * an element. See `elementStart` and `elementHostAttrs` to learn how styling values + * are applied to an element. + * @param renderer The renderer to be used + * @param native The element that the attributes will be assigned to + * @param attrs The attribute array of values that will be assigned to the element + * @returns the index value that was last accessed in the attributes array + */ + function setUpAttributes(renderer, native, attrs) { + var isProc = isProceduralRenderer(renderer); + var i = 0; + while (i < attrs.length) { + var value = attrs[i]; + if (typeof value === 'number') { + // only namespaces are supported. Other value types (such as style/class + // entries) are not supported in this function. + if (value !== 0 /* NamespaceURI */) { + break; + } + // we just landed on the marker value ... therefore + // we should skip to the next entry + i++; + var namespaceURI = attrs[i++]; + var attrName = attrs[i++]; + var attrVal = attrs[i++]; + ngDevMode && ngDevMode.rendererSetAttribute++; + isProc ? + renderer.setAttribute(native, attrName, attrVal, namespaceURI) : + native.setAttributeNS(namespaceURI, attrName, attrVal); + } + else { + // attrName is string; + var attrName = value; + var attrVal = attrs[++i]; + // Standard attributes + ngDevMode && ngDevMode.rendererSetAttribute++; + if (isAnimationProp(attrName)) { + if (isProc) { + renderer.setProperty(native, attrName, attrVal); + } + } + else { + isProc ? + renderer.setAttribute(native, attrName, attrVal) : + native.setAttribute(attrName, attrVal); + } + i++; + } + } + // another piece of code may iterate over the same attributes array. Therefore + // it may be helpful to return the exact spot where the attributes array exited + // whether by running into an unsupported marker or if all the static values were + // iterated over. + return i; + } + /** + * Test whether the given value is a marker that indicates that the following + * attribute values in a `TAttributes` array are only the names of attributes, + * and not name-value pairs. + * @param marker The attribute marker to test. + * @returns true if the marker is a "name-only" marker (e.g. `Bindings`, `Template` or `I18n`). + */ + function isNameOnlyAttributeMarker(marker) { + return marker === 3 /* Bindings */ || marker === 4 /* Template */ || + marker === 6 /* I18n */; + } + function isAnimationProp(name) { + // Perf note: accessing charCodeAt to check for the first character of a string is faster as + // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that + // charCodeAt doesn't allocate memory to return a substring. + return name.charCodeAt(0) === 64 /* AT_SIGN */; + } + /** + * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process. + * + * This merge function keeps the order of attrs same. + * + * @param dst Location of where the merged `TAttributes` should end up. + * @param src `TAttributes` which should be appended to `dst` + */ + function mergeHostAttrs(dst, src) { + if (src === null || src.length === 0) { + // do nothing + } + else if (dst === null || dst.length === 0) { + // We have source, but dst is empty, just make a copy. + dst = src.slice(); + } + else { + var srcMarker = -1 /* ImplicitAttributes */; + for (var i = 0; i < src.length; i++) { + var item = src[i]; + if (typeof item === 'number') { + srcMarker = item; + } + else { + if (srcMarker === 0 /* NamespaceURI */) { + // Case where we need to consume `key1`, `key2`, `value` items. + } + else if (srcMarker === -1 /* ImplicitAttributes */ || + srcMarker === 2 /* Styles */) { + // Case where we have to consume `key1` and `value` only. + mergeHostAttribute(dst, srcMarker, item, null, src[++i]); + } + else { + // Case where we have to consume `key1` only. + mergeHostAttribute(dst, srcMarker, item, null, null); + } + } + } + } + return dst; + } + /** + * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account. + * + * @param dst `TAttributes` to append to. + * @param marker Region where the `key`/`value` should be added. + * @param key1 Key to add to `TAttributes` + * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`) + * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class. + */ + function mergeHostAttribute(dst, marker, key1, key2, value) { + var i = 0; + // Assume that new markers will be inserted at the end. + var markerInsertPosition = dst.length; + // scan until correct type. + if (marker === -1 /* ImplicitAttributes */) { + markerInsertPosition = -1; + } + else { + while (i < dst.length) { + var dstValue = dst[i++]; + if (typeof dstValue === 'number') { + if (dstValue === marker) { + markerInsertPosition = -1; + break; + } + else if (dstValue > marker) { + // We need to save this as we want the markers to be inserted in specific order. + markerInsertPosition = i - 1; + break; + } + } + } + } + // search until you find place of insertion + while (i < dst.length) { + var item = dst[i]; + if (typeof item === 'number') { + // since `i` started as the index after the marker, we did not find it if we are at the next + // marker + break; + } + else if (item === key1) { + // We already have same token + if (key2 === null) { + if (value !== null) { + dst[i + 1] = value; + } + return; + } + else if (key2 === dst[i + 1]) { + dst[i + 2] = value; + return; + } + } + // Increment counter. + i++; + if (key2 !== null) + i++; + if (value !== null) + i++; + } + // insert at location. + if (markerInsertPosition !== -1) { + dst.splice(markerInsertPosition, 0, marker); + i = markerInsertPosition + 1; + } + dst.splice(i++, 0, key1); + if (key2 !== null) { + dst.splice(i++, 0, key2); + } + if (value !== null) { + dst.splice(i++, 0, value); + } + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + /// Parent Injector Utils /////////////////////////////////////////////////////////////// + function hasParentInjector(parentLocation) { + return parentLocation !== NO_PARENT_INJECTOR; + } + function getParentInjectorIndex(parentLocation) { + return parentLocation & 32767 /* InjectorIndexMask */; + } + function getParentInjectorViewOffset(parentLocation) { + return parentLocation >> 16 /* ViewOffsetShift */; + } + /** + * Unwraps a parent injector location number to find the view offset from the current injector, + * then walks up the declaration view tree until the view is found that contains the parent + * injector. + * + * @param location The location of the parent injector, which contains the view offset + * @param startView The LView instance from which to start walking up the view tree + * @returns The LView instance that contains the parent injector + */ + function getParentInjectorView(location, startView) { + var viewOffset = getParentInjectorViewOffset(location); + var parentView = startView; + // For most cases, the parent injector can be found on the host node (e.g. for component + // or container), but we must keep the loop here to support the rarer case of deeply nested + // tags or inline views, where the parent injector might live many views + // above the child injector. + while (viewOffset > 0) { + parentView = parentView[DECLARATION_VIEW]; + viewOffset--; + } + return parentView; + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + /** + * Used for stringify render output in Ivy. + * Important! This function is very performance-sensitive and we should + * be extra careful not to introduce megamorphic reads in it. + */ + function renderStringify(value) { + if (typeof value === 'string') + return value; + if (value == null) + return ''; + return '' + value; + } + /** + * Used to stringify a value so that it can be displayed in an error message. + * Important! This function contains a megamorphic read and should only be + * used for error messages. + */ + function stringifyForError(value) { + if (typeof value === 'function') + return value.name || value.toString(); + if (typeof value === 'object' && value != null && typeof value.type === 'function') { + return value.type.name || value.type.toString(); + } + return renderStringify(value); + } + var ɵ0$3 = function () { return (typeof requestAnimationFrame !== 'undefined' && + requestAnimationFrame || // browser only + setTimeout // everything else + ) + .bind(_global); }; + var defaultScheduler = (ɵ0$3)(); + /** + * + * @codeGenApi + */ + function ɵɵresolveWindow(element) { + return { name: 'window', target: element.ownerDocument.defaultView }; + } + /** + * + * @codeGenApi + */ + function ɵɵresolveDocument(element) { + return { name: 'document', target: element.ownerDocument }; + } + /** + * + * @codeGenApi + */ + function ɵɵresolveBody(element) { + return { name: 'body', target: element.ownerDocument.body }; + } + /** + * The special delimiter we use to separate property names, prefixes, and suffixes + * in property binding metadata. See storeBindingMetadata(). + * + * We intentionally use the Unicode "REPLACEMENT CHARACTER" (U+FFFD) as a delimiter + * because it is a very uncommon character that is unlikely to be part of a user's + * property names or interpolation strings. If it is in fact used in a property + * binding, DebugElement.properties will not return the correct value for that + * binding. However, there should be no runtime effect for real applications. + * + * This character is typically rendered as a question mark inside of a diamond. + * See https://en.wikipedia.org/wiki/Specials_(Unicode_block) + * + */ + var INTERPOLATION_DELIMITER = "\uFFFD"; + /** + * Unwrap a value which might be behind a closure (for forward declaration reasons). + */ + function maybeUnwrapFn(value) { + if (value instanceof Function) { + return value(); + } + else { + return value; + } + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + /** + * Defines if the call to `inject` should include `viewProviders` in its resolution. + * + * This is set to true when we try to instantiate a component. This value is reset in + * `getNodeInjectable` to a value which matches the declaration location of the token about to be + * instantiated. This is done so that if we are injecting a token which was declared outside of + * `viewProviders` we don't accidentally pull `viewProviders` in. + * + * Example: + * + * ``` + * @Injectable() + * class MyService { + * constructor(public value: String) {} + * } + * + * @Component({ + * providers: [ + * MyService, + * {provide: String, value: 'providers' } + * ] + * viewProviders: [ + * {provide: String, value: 'viewProviders'} + * ] + * }) + * class MyComponent { + * constructor(myService: MyService, value: String) { + * // We expect that Component can see into `viewProviders`. + * expect(value).toEqual('viewProviders'); + * // `MyService` was not declared in `viewProviders` hence it can't see it. + * expect(myService.value).toEqual('providers'); + * } + * } + * + * ``` + */ + var includeViewProviders = true; + function setIncludeViewProviders(v) { + var oldValue = includeViewProviders; + includeViewProviders = v; + return oldValue; + } + /** + * The number of slots in each bloom filter (used by DI). The larger this number, the fewer + * directives that will share slots, and thus, the fewer false positives when checking for + * the existence of a directive. + */ + var BLOOM_SIZE = 256; + var BLOOM_MASK = BLOOM_SIZE - 1; + /** Counter used to generate unique IDs for directives. */ + var nextNgElementId = 0; + /** + * Registers this directive as present in its node's injector by flipping the directive's + * corresponding bit in the injector's bloom filter. + * + * @param injectorIndex The index of the node injector where this token should be registered + * @param tView The TView for the injector's bloom filters + * @param type The directive token to register + */ + function bloomAdd(injectorIndex, tView, type) { + ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true'); + var id = typeof type !== 'string' ? type[NG_ELEMENT_ID] : type.charCodeAt(0) || 0; + // Set a unique ID on the directive type, so if something tries to inject the directive, + // we can easily retrieve the ID and hash it into the bloom bit that should be checked. + if (id == null) { + id = type[NG_ELEMENT_ID] = nextNgElementId++; + } + // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each), + // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter. + var bloomBit = id & BLOOM_MASK; + // Create a mask that targets the specific bit associated with the directive. + // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding + // to bit positions 0 - 31 in a 32 bit integer. + var mask = 1 << bloomBit; + // Use the raw bloomBit number to determine which bloom filter bucket we should check + // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc + var b7 = bloomBit & 0x80; + var b6 = bloomBit & 0x40; + var b5 = bloomBit & 0x20; + var tData = tView.data; + if (b7) { + b6 ? (b5 ? (tData[injectorIndex + 7] |= mask) : (tData[injectorIndex + 6] |= mask)) : + (b5 ? (tData[injectorIndex + 5] |= mask) : (tData[injectorIndex + 4] |= mask)); + } + else { + b6 ? (b5 ? (tData[injectorIndex + 3] |= mask) : (tData[injectorIndex + 2] |= mask)) : + (b5 ? (tData[injectorIndex + 1] |= mask) : (tData[injectorIndex] |= mask)); + } + } + /** + * Creates (or gets an existing) injector for a given element or container. + * + * @param tNode for which an injector should be retrieved / created. + * @param hostView View where the node is stored + * @returns Node injector + */ + function getOrCreateNodeInjectorForNode(tNode, hostView) { + var existingInjectorIndex = getInjectorIndex(tNode, hostView); + if (existingInjectorIndex !== -1) { + return existingInjectorIndex; + } + var tView = hostView[TVIEW]; + if (tView.firstCreatePass) { + tNode.injectorIndex = hostView.length; + insertBloom(tView.data, tNode); // foundation for node bloom + insertBloom(hostView, null); // foundation for cumulative bloom + insertBloom(tView.blueprint, null); + } + var parentLoc = getParentInjectorLocation(tNode, hostView); + var injectorIndex = tNode.injectorIndex; + // If a parent injector can't be found, its location is set to -1. + // In that case, we don't need to set up a cumulative bloom + if (hasParentInjector(parentLoc)) { + var parentIndex = getParentInjectorIndex(parentLoc); + var parentLView = getParentInjectorView(parentLoc, hostView); + var parentData = parentLView[TVIEW].data; + // Creates a cumulative bloom filter that merges the parent's bloom filter + // and its own cumulative bloom (which contains tokens for all ancestors) + for (var i = 0; i < 8; i++) { + hostView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i]; + } + } + hostView[injectorIndex + PARENT_INJECTOR] = parentLoc; + return injectorIndex; + } + function insertBloom(arr, footer) { + arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer); + } + function getInjectorIndex(tNode, hostView) { + if (tNode.injectorIndex === -1 || + // If the injector index is the same as its parent's injector index, then the index has been + // copied down from the parent node. No injector has been created yet on this node. + (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) || + // After the first template pass, the injector index might exist but the parent values + // might not have been calculated yet for this instance + hostView[tNode.injectorIndex + PARENT_INJECTOR] == null) { + return -1; + } + else { + return tNode.injectorIndex; + } + } + /** + * Finds the index of the parent injector, with a view offset if applicable. Used to set the + * parent injector initially. + * + * Returns a combination of number of `ViewData` we have to go up and index in that `Viewdata` + */ + function getParentInjectorLocation(tNode, view) { + if (tNode.parent && tNode.parent.injectorIndex !== -1) { + return tNode.parent.injectorIndex; // ViewOffset is 0 + } + // For most cases, the parent injector index can be found on the host node (e.g. for component + // or container), so this loop will be skipped, but we must keep the loop here to support + // the rarer case of deeply nested tags or inline views. + var hostTNode = view[T_HOST]; + var viewOffset = 1; + while (hostTNode && hostTNode.injectorIndex === -1) { + view = view[DECLARATION_VIEW]; + hostTNode = view ? view[T_HOST] : null; + viewOffset++; + } + return hostTNode ? + hostTNode.injectorIndex | (viewOffset << 16 /* ViewOffsetShift */) : + -1; + } + /** + * Makes a type or an injection token public to the DI system by adding it to an + * injector's bloom filter. + * + * @param di The node injector in which a directive will be added + * @param token The type or the injection token to be made public + */ + function diPublicInInjector(injectorIndex, tView, token) { + bloomAdd(injectorIndex, tView, token); + } + /** + * Inject static attribute value into directive constructor. + * + * This method is used with `factory` functions which are generated as part of + * `defineDirective` or `defineComponent`. The method retrieves the static value + * of an attribute. (Dynamic attributes are not supported since they are not resolved + * at the time of injection and can change over time.) + * + * # Example + * Given: + * ``` + * @Component(...) + * class MyComponent { + * constructor(@Attribute('title') title: string) { ... } + * } + * ``` + * When instantiated with + * ``` + * + * ``` + * + * Then factory method generated is: + * ``` + * MyComponent.ɵcmp = defineComponent({ + * factory: () => new MyComponent(injectAttribute('title')) + * ... + * }) + * ``` + * + * @publicApi + */ + function injectAttributeImpl(tNode, attrNameToInject) { + ngDevMode && + assertNodeOfPossibleTypes(tNode, 0 /* Container */, 3 /* Element */, 4 /* ElementContainer */); + ngDevMode && assertDefined(tNode, 'expecting tNode'); + if (attrNameToInject === 'class') { + return tNode.classes; + } + if (attrNameToInject === 'style') { + return tNode.styles; + } + var attrs = tNode.attrs; + if (attrs) { + var attrsLength = attrs.length; + var i = 0; + while (i < attrsLength) { + var value = attrs[i]; + // If we hit a `Bindings` or `Template` marker then we are done. + if (isNameOnlyAttributeMarker(value)) + break; + // Skip namespaced attributes + if (value === 0 /* NamespaceURI */) { + // we skip the next two values + // as namespaced attributes looks like + // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist', + // 'existValue', ...] + i = i + 2; + } + else if (typeof value === 'number') { + // Skip to the first value of the marked attribute. + i++; + while (i < attrsLength && typeof attrs[i] === 'string') { + i++; + } + } + else if (value === attrNameToInject) { + return attrs[i + 1]; + } + else { + i = i + 2; + } + } + } + return null; + } + /** + * Returns the value associated to the given token from the NodeInjectors => ModuleInjector. + * + * Look for the injector providing the token by walking up the node injector tree and then + * the module injector tree. + * + * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom + * filter. Negative values are reserved for special objects. + * - `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`) + * + * @param tNode The Node where the search for the injector should start + * @param lView The `LView` that contains the `tNode` + * @param token The token to look for + * @param flags Injection flags + * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional` + * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided + */ + function getOrCreateInjectable(tNode, lView, token, flags, notFoundValue) { + if (flags === void 0) { flags = exports.InjectFlags.Default; } + if (tNode !== null) { + var bloomHash = bloomHashBitOrFactory(token); + // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef + // so just call the factory function to create it. + if (typeof bloomHash === 'function') { + enterDI(lView, tNode); + try { + var value = bloomHash(); + if (value == null && !(flags & exports.InjectFlags.Optional)) { + throw new Error("No provider for " + stringifyForError(token) + "!"); + } + else { + return value; + } + } + finally { + leaveDI(); + } + } + else if (typeof bloomHash == 'number') { + if (bloomHash === -1) { + // `-1` is a special value used to identify `Injector` types. + return new NodeInjector(tNode, lView); + } + // If the token has a bloom hash, then it is a token which could be in NodeInjector. + // A reference to the previous injector TView that was found while climbing the element + // injector tree. This is used to know if viewProviders can be accessed on the current + // injector. + var previousTView = null; + var injectorIndex = getInjectorIndex(tNode, lView); + var parentLocation = NO_PARENT_INJECTOR; + var hostTElementNode = flags & exports.InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null; + // If we should skip this injector, or if there is no injector on this node, start by + // searching + // the parent injector. + if (injectorIndex === -1 || flags & exports.InjectFlags.SkipSelf) { + parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : + lView[injectorIndex + PARENT_INJECTOR]; + if (!shouldSearchParent(flags, false)) { + injectorIndex = -1; + } + else { + previousTView = lView[TVIEW]; + injectorIndex = getParentInjectorIndex(parentLocation); + lView = getParentInjectorView(parentLocation, lView); + } + } + // Traverse up the injector tree until we find a potential match or until we know there + // *isn't* a match. + while (injectorIndex !== -1) { + parentLocation = lView[injectorIndex + PARENT_INJECTOR]; + // Check the current injector. If it matches, see if it contains token. + var tView = lView[TVIEW]; + if (bloomHasToken(bloomHash, injectorIndex, tView.data)) { + // At this point, we have an injector which *may* contain the token, so we step through + // the providers and directives associated with the injector's corresponding node to get + // the instance. + var instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode); + if (instance !== NOT_FOUND) { + return instance; + } + } + if (shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + TNODE] === hostTElementNode) && + bloomHasToken(bloomHash, injectorIndex, lView)) { + // The def wasn't found anywhere on this node, so it was a false positive. + // Traverse up the tree and continue searching. + previousTView = tView; + injectorIndex = getParentInjectorIndex(parentLocation); + lView = getParentInjectorView(parentLocation, lView); + } + else { + // If we should not search parent OR If the ancestor bloom filter value does not have the + // bit corresponding to the directive we can give up on traversing up to find the specific + // injector. + injectorIndex = -1; + } + } + } + } + if (flags & exports.InjectFlags.Optional && notFoundValue === undefined) { + // This must be set or the NullInjector will throw for optional deps + notFoundValue = null; + } + if ((flags & (exports.InjectFlags.Self | exports.InjectFlags.Host)) === 0) { + var moduleInjector = lView[INJECTOR$1]; + // switch to `injectInjectorOnly` implementation for module injector, since module injector + // should not have access to Component/Directive DI scope (that may happen through + // `directiveInject` implementation) + var previousInjectImplementation = setInjectImplementation(undefined); + try { + if (moduleInjector) { + return moduleInjector.get(token, notFoundValue, flags & exports.InjectFlags.Optional); + } + else { + return injectRootLimpMode(token, notFoundValue, flags & exports.InjectFlags.Optional); + } + } + finally { + setInjectImplementation(previousInjectImplementation); + } + } + if (flags & exports.InjectFlags.Optional) { + return notFoundValue; + } + else { + throw new Error("NodeInjector: NOT_FOUND [" + stringifyForError(token) + "]"); + } + } + var NOT_FOUND = {}; + function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) { + var currentTView = lView[TVIEW]; + var tNode = currentTView.data[injectorIndex + TNODE]; + // First, we need to determine if view providers can be accessed by the starting element. + // There are two possibities + var canAccessViewProviders = previousTView == null ? + // 1) This is the first invocation `previousTView == null` which means that we are at the + // `TNode` of where injector is starting to look. In such a case the only time we are allowed + // to look into the ViewProviders is if: + // - we are on a component + // - AND the injector set `includeViewProviders` to true (implying that the token can see + // ViewProviders because it is the Component or a Service which itself was declared in + // ViewProviders) + (isComponentHost(tNode) && includeViewProviders) : + // 2) `previousTView != null` which means that we are now walking across the parent nodes. + // In such a case we are only allowed to look into the ViewProviders if: + // - We just crossed from child View to Parent View `previousTView != currentTView` + // - AND the parent TNode is an Element. + // This means that we just came from the Component's View and therefore are allowed to see + // into the ViewProviders. + (previousTView != currentTView && (tNode.type === 3 /* Element */)); + // This special case happens when there is a @host on the inject and when we are searching + // on the host element node. + var isHostSpecialCase = (flags & exports.InjectFlags.Host) && hostTElementNode === tNode; + var injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase); + if (injectableIdx !== null) { + return getNodeInjectable(lView, currentTView, injectableIdx, tNode); + } + else { + return NOT_FOUND; + } + } + /** + * Searches for the given token among the node's directives and providers. + * + * @param tNode TNode on which directives are present. + * @param tView The tView we are currently processing + * @param token Provider token or type of a directive to look for. + * @param canAccessViewProviders Whether view providers should be considered. + * @param isHostSpecialCase Whether the host special case applies. + * @returns Index of a found directive or provider, or null when none found. + */ + function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) { + var nodeProviderIndexes = tNode.providerIndexes; + var tInjectables = tView.data; + var injectablesStart = nodeProviderIndexes & 65535 /* ProvidersStartIndexMask */; + var directivesStart = tNode.directiveStart; + var directiveEnd = tNode.directiveEnd; + var cptViewProvidersCount = nodeProviderIndexes >> 16 /* CptViewProvidersCountShift */; + var startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; + // When the host special case applies, only the viewProviders and the component are visible + var endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd; + for (var i = startingIndex; i < endIndex; i++) { + var providerTokenOrDef = tInjectables[i]; + if (i < directivesStart && token === providerTokenOrDef || + i >= directivesStart && providerTokenOrDef.type === token) { + return i; + } + } + if (isHostSpecialCase) { + var dirDef = tInjectables[directivesStart]; + if (dirDef && isComponentDef(dirDef) && dirDef.type === token) { + return directivesStart; + } + } + return null; + } + /** + * Retrieve or instantiate the injectable from the `LView` at particular `index`. + * + * This function checks to see if the value has already been instantiated and if so returns the + * cached `injectable`. Otherwise if it detects that the value is still a factory it + * instantiates the `injectable` and caches the value. + */ + function getNodeInjectable(lView, tView, index, tNode) { + var value = lView[index]; + var tData = tView.data; + if (isFactory(value)) { + var factory = value; + if (factory.resolving) { + throw new Error("Circular dep for " + stringifyForError(tData[index])); + } + var previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders); + factory.resolving = true; + var previousInjectImplementation = void 0; + if (factory.injectImpl) { + previousInjectImplementation = setInjectImplementation(factory.injectImpl); + } + enterDI(lView, tNode); + try { + value = lView[index] = factory.factory(undefined, tData, lView, tNode); + // This code path is hit for both directives and providers. + // For perf reasons, we want to avoid searching for hooks on providers. + // It does no harm to try (the hooks just won't exist), but the extra + // checks are unnecessary and this is a hot path. So we check to see + // if the index of the dependency is in the directive range for this + // tNode. If it's not, we know it's a provider and skip hook registration. + if (tView.firstCreatePass && index >= tNode.directiveStart) { + ngDevMode && assertDirectiveDef(tData[index]); + registerPreOrderHooks(index, tData[index], tView); + } + } + finally { + if (factory.injectImpl) + setInjectImplementation(previousInjectImplementation); + setIncludeViewProviders(previousIncludeViewProviders); + factory.resolving = false; + leaveDI(); + } + } + return value; + } + /** + * Returns the bit in an injector's bloom filter that should be used to determine whether or not + * the directive might be provided by the injector. + * + * When a directive is public, it is added to the bloom filter and given a unique ID that can be + * retrieved on the Type. When the directive isn't public or the token is not a directive `null` + * is returned as the node injector can not possibly provide that token. + * + * @param token the injection token + * @returns the matching bit to check in the bloom filter or `null` if the token is not known. + * When the returned value is negative then it represents special values such as `Injector`. + */ + function bloomHashBitOrFactory(token) { + ngDevMode && assertDefined(token, 'token must be defined'); + if (typeof token === 'string') { + return token.charCodeAt(0) || 0; + } + var tokenId = token[NG_ELEMENT_ID]; + // Negative token IDs are used for special objects such as `Injector` + return (typeof tokenId === 'number' && tokenId > 0) ? tokenId & BLOOM_MASK : tokenId; + } + function bloomHasToken(bloomHash, injectorIndex, injectorView) { + // Create a mask that targets the specific bit associated with the directive we're looking for. + // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding + // to bit positions 0 - 31 in a 32 bit integer. + var mask = 1 << bloomHash; + var b7 = bloomHash & 0x80; + var b6 = bloomHash & 0x40; + var b5 = bloomHash & 0x20; + // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets: + // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc. + // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit. + var value; + if (b7) { + value = b6 ? (b5 ? injectorView[injectorIndex + 7] : injectorView[injectorIndex + 6]) : + (b5 ? injectorView[injectorIndex + 5] : injectorView[injectorIndex + 4]); + } + else { + value = b6 ? (b5 ? injectorView[injectorIndex + 3] : injectorView[injectorIndex + 2]) : + (b5 ? injectorView[injectorIndex + 1] : injectorView[injectorIndex]); + } + // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on, + // this injector is a potential match. + return !!(value & mask); + } + /** Returns true if flags prevent parent injector from being searched for tokens */ + function shouldSearchParent(flags, isFirstHostTNode) { + return !(flags & exports.InjectFlags.Self) && !(flags & exports.InjectFlags.Host && isFirstHostTNode); + } + var NodeInjector = /** @class */ (function () { + function NodeInjector(_tNode, _lView) { + this._tNode = _tNode; + this._lView = _lView; + } + NodeInjector.prototype.get = function (token, notFoundValue) { + return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue); + }; + return NodeInjector; + }()); + /** + * @codeGenApi + */ + function ɵɵgetFactoryOf(type) { + var typeAny = type; + if (isForwardRef(type)) { + return (function () { + var factory = ɵɵgetFactoryOf(resolveForwardRef(typeAny)); + return factory ? factory() : null; + }); + } + var factory = getFactoryDef(typeAny); + if (factory === null) { + var injectorDef = getInjectorDef(typeAny); + factory = injectorDef && injectorDef.factory; + } + return factory || null; + } + /** + * @codeGenApi + */ + function ɵɵgetInheritedFactory(type) { + return noSideEffects(function () { + var proto = Object.getPrototypeOf(type.prototype).constructor; + var factory = proto[NG_FACTORY_DEF] || ɵɵgetFactoryOf(proto); + if (factory !== null) { + return factory; + } + else { + // There is no factory defined. Either this was improper usage of inheritance + // (no Angular decorator on the superclass) or there is no constructor at all + // in the inheritance chain. Since the two cases cannot be distinguished, the + // latter has to be assumed. + return function (t) { return new t(); }; + } + }); + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + var ERROR_TYPE = 'ngType'; + var ERROR_DEBUG_CONTEXT = 'ngDebugContext'; + var ERROR_ORIGINAL_ERROR = 'ngOriginalError'; + var ERROR_LOGGER = 'ngErrorLogger'; + function wrappedError(message, originalError) { + var msg = message + " caused by: " + (originalError instanceof Error ? originalError.message : originalError); + var error = Error(msg); + error[ERROR_ORIGINAL_ERROR] = originalError; + return error; + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + function getType(error) { + return error[ERROR_TYPE]; + } + function getDebugContext(error) { + return error[ERROR_DEBUG_CONTEXT]; + } + function getOriginalError(error) { + return error[ERROR_ORIGINAL_ERROR]; + } + function getErrorLogger(error) { + return error[ERROR_LOGGER] || defaultErrorLogger; + } + function defaultErrorLogger(console) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) { + values[_i - 1] = arguments[_i]; + } + console.error.apply(console, __spread(values)); + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + /** + * Provides a hook for centralized exception handling. + * + * The default implementation of `ErrorHandler` prints error messages to the `console`. To + * intercept error handling, write a custom exception handler that replaces this default as + * appropriate for your app. + * + * @usageNotes + * ### Example + * + * ``` + * class MyErrorHandler implements ErrorHandler { + * handleError(error) { + * // do something with the exception + * } + * } + * + * @NgModule({ + * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}] + * }) + * class MyModule {} + * ``` + * + * @publicApi + */ + var ErrorHandler = /** @class */ (function () { + function ErrorHandler() { + /** + * @internal + */ + this._console = console; + } + ErrorHandler.prototype.handleError = function (error) { + var originalError = this._findOriginalError(error); + var context = this._findContext(error); + // Note: Browser consoles show the place from where console.error was called. + // We can use this to give users additional information about the error. + var errorLogger = getErrorLogger(error); + errorLogger(this._console, "ERROR", error); + if (originalError) { + errorLogger(this._console, "ORIGINAL ERROR", originalError); + } + if (context) { + errorLogger(this._console, 'ERROR CONTEXT', context); + } + }; + /** @internal */ + ErrorHandler.prototype._findContext = function (error) { + if (error) { + return getDebugContext(error) ? getDebugContext(error) : + this._findContext(getOriginalError(error)); + } + return null; + }; + /** @internal */ + ErrorHandler.prototype._findOriginalError = function (error) { + var e = getOriginalError(error); + while (e && getOriginalError(e)) { + e = getOriginalError(e); + } + return e; + }; + return ErrorHandler; + }()); + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + /** + * Defines a schema that allows an NgModule to contain the following: + * - Non-Angular elements named with dash case (`-`). + * - Element properties named with dash case (`-`). + * Dash case is the naming convention for custom elements. + * + * @publicApi + */ + var CUSTOM_ELEMENTS_SCHEMA = { + name: 'custom-elements' + }; + /** + * Defines a schema that allows any property on any element. + * + * @publicApi + */ + var NO_ERRORS_SCHEMA = { + name: 'no-errors-schema' + }; + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + var SafeValueImpl = /** @class */ (function () { + function SafeValueImpl(changingThisBreaksApplicationSecurity) { + this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity; + } + SafeValueImpl.prototype.toString = function () { + return "SafeValue must use [property]=binding: " + this.changingThisBreaksApplicationSecurity + + " (see http://g.co/ng/security#xss)"; + }; + return SafeValueImpl; + }()); + var SafeHtmlImpl = /** @class */ (function (_super) { + __extends(SafeHtmlImpl, _super); + function SafeHtmlImpl() { + return _super !== null && _super.apply(this, arguments) || this; + } + SafeHtmlImpl.prototype.getTypeName = function () { + return "HTML" /* Html */; + }; + return SafeHtmlImpl; + }(SafeValueImpl)); + var SafeStyleImpl = /** @class */ (function (_super) { + __extends(SafeStyleImpl, _super); + function SafeStyleImpl() { + return _super !== null && _super.apply(this, arguments) || this; + } + SafeStyleImpl.prototype.getTypeName = function () { + return "Style" /* Style */; + }; + return SafeStyleImpl; + }(SafeValueImpl)); + var SafeScriptImpl = /** @class */ (function (_super) { + __extends(SafeScriptImpl, _super); + function SafeScriptImpl() { + return _super !== null && _super.apply(this, arguments) || this; + } + SafeScriptImpl.prototype.getTypeName = function () { + return "Script" /* Script */; + }; + return SafeScriptImpl; + }(SafeValueImpl)); + var SafeUrlImpl = /** @class */ (function (_super) { + __extends(SafeUrlImpl, _super); + function SafeUrlImpl() { + return _super !== null && _super.apply(this, arguments) || this; + } + SafeUrlImpl.prototype.getTypeName = function () { + return "URL" /* Url */; + }; + return SafeUrlImpl; + }(SafeValueImpl)); + var SafeResourceUrlImpl = /** @class */ (function (_super) { + __extends(SafeResourceUrlImpl, _super); + function SafeResourceUrlImpl() { + return _super !== null && _super.apply(this, arguments) || this; + } + SafeResourceUrlImpl.prototype.getTypeName = function () { + return "ResourceURL" /* ResourceUrl */; + }; + return SafeResourceUrlImpl; + }(SafeValueImpl)); + function unwrapSafeValue(value) { + return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : + value; + } + function allowSanitizationBypassAndThrow(value, type) { + var actualType = getSanitizationBypassType(value); + if (actualType != null && actualType !== type) { + // Allow ResourceURLs in URL contexts, they are strictly more trusted. + if (actualType === "ResourceURL" /* ResourceUrl */ && type === "URL" /* Url */) + return true; + throw new Error("Required a safe " + type + ", got a " + actualType + " (see http://g.co/ng/security#xss)"); + } + return actualType === type; + } + function getSanitizationBypassType(value) { + return value instanceof SafeValueImpl && value.getTypeName() || null; + } + /** + * Mark `html` string as trusted. + * + * This function wraps the trusted string in `String` and brands it in a way which makes it + * recognizable to {@link htmlSanitizer} to be trusted implicitly. + * + * @param trustedHtml `html` string which needs to be implicitly trusted. + * @returns a `html` which has been branded to be implicitly trusted. + */ + function bypassSanitizationTrustHtml(trustedHtml) { + return new SafeHtmlImpl(trustedHtml); + } + /** + * Mark `style` string as trusted. + * + * This function wraps the trusted string in `String` and brands it in a way which makes it + * recognizable to {@link styleSanitizer} to be trusted implicitly. + * + * @param trustedStyle `style` string which needs to be implicitly trusted. + * @returns a `style` hich has been branded to be implicitly trusted. + */ + function bypassSanitizationTrustStyle(trustedStyle) { + return new SafeStyleImpl(trustedStyle); + } + /** + * Mark `script` string as trusted. + * + * This function wraps the trusted string in `String` and brands it in a way which makes it + * recognizable to {@link scriptSanitizer} to be trusted implicitly. + * + * @param trustedScript `script` string which needs to be implicitly trusted. + * @returns a `script` which has been branded to be implicitly trusted. + */ + function bypassSanitizationTrustScript(trustedScript) { + return new SafeScriptImpl(trustedScript); + } + /** + * Mark `url` string as trusted. + * + * This function wraps the trusted string in `String` and brands it in a way which makes it + * recognizable to {@link urlSanitizer} to be trusted implicitly. + * + * @param trustedUrl `url` string which needs to be implicitly trusted. + * @returns a `url` which has been branded to be implicitly trusted. + */ + function bypassSanitizationTrustUrl(trustedUrl) { + return new SafeUrlImpl(trustedUrl); + } + /** + * Mark `url` string as trusted. + * + * This function wraps the trusted string in `String` and brands it in a way which makes it + * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly. + * + * @param trustedResourceUrl `url` string which needs to be implicitly trusted. + * @returns a `url` which has been branded to be implicitly trusted. + */ + function bypassSanitizationTrustResourceUrl(trustedResourceUrl) { + return new SafeResourceUrlImpl(trustedResourceUrl); + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + /** + * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`. + * + * For more information on how to run and debug tests with either Ivy or View Engine (legacy), + * please see [BAZEL.md](./docs/BAZEL.md). + */ + var _devMode = true; + var _runModeLocked = false; + /** + * Returns whether Angular is in development mode. After called once, + * the value is locked and won't change any more. + * + * By default, this is true, unless a user calls `enableProdMode` before calling this. + * + * @publicApi + */ + function isDevMode() { + _runModeLocked = true; + return _devMode; + } + /** + * Disable Angular's development mode, which turns off assertions and other + * checks within the framework. + * + * One important assertion this disables verifies that a change detection pass + * does not result in additional changes to any bindings (also known as + * unidirectional data flow). + * + * @publicApi + */ + function enableProdMode() { + if (_runModeLocked) { + throw new Error('Cannot enable prod mode after platform setup.'); + } + _devMode = false; + } + + /** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + /** + * This helper class is used to get hold of an inert tree of DOM elements containing dirty HTML + * that needs sanitizing. + * Depending upon browser support we must use one of three strategies for doing this. + * Support: Safari 10.x -> XHR strategy + * Support: Firefox -> DomParser strategy + * Default: InertDocument strategy + */ + var InertBodyHelper = /** @class */ (function () { + function InertBodyHelper(defaultDoc) { + this.defaultDoc = defaultDoc; + this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert'); + var inertBodyElement = this.inertDocument.body; + if (inertBodyElement == null) { + // usually there should be only one body element in the document, but IE doesn't have any, so + // we need to create one. + var inertHtml = this.inertDocument.createElement('html'); + this.inertDocument.appendChild(inertHtml); + inertBodyElement = this.inertDocument.createElement('body'); + inertHtml.appendChild(inertBodyElement); + } + inertBodyElement.innerHTML = ''; + if (inertBodyElement.querySelector && !inertBodyElement.querySelector('svg')) { + // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element + // so use the XHR strategy. + this.getInertBodyElement = this.getInertBodyElement_XHR; + return; + } + inertBodyElement.innerHTML = '

'; + if (inertBodyElement.querySelector && inertBodyElement.querySelector('svg img')) { + // We just hit the Firefox bug - which prevents the inner img JS from being sanitized + // so use the DOMParser strategy, if it is available. + // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we + // fall through to the default strategy below. + if (isDOMParserAvailable()) { + this.getInertBodyElement = this.getInertBodyElement_DOMParser; + return; + } + } + // None of the bugs were hit so it is safe for us to use the default InertDocument strategy + this.getInertBodyElement = this.getInertBodyElement_InertDocument; + } + /** + * Use XHR to create and fill an inert body element (on Safari 10.1) + * See + * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449 + */ + InertBodyHelper.prototype.getInertBodyElement_XHR = function (html) { + // We add these extra elements to ensure that the rest of the content is parsed as expected + // e.g. leading whitespace is maintained and tags like `` do not get hoisted to the + // `` tag. + html = '' + html + ''; + try { + html = encodeURI(html); + } + catch (_a) { + return null; + } + var xhr = new XMLHttpRequest(); + xhr.responseType = 'document'; + xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false); + xhr.send(undefined); + var body = xhr.response.body; + body.removeChild(body.firstChild); + return body; + }; + /** + * Use DOMParser to create and fill an inert body element (on Firefox) + * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7 + * + */ + InertBodyHelper.prototype.getInertBodyElement_DOMParser = function (html) { + // We add these extra elements to ensure that the rest of the content is parsed as expected + // e.g. leading whitespace is maintained and tags like `` do not get hoisted to the + // `` tag. + html = '' + html + ''; + try { + var body = new window.DOMParser().parseFromString(html, 'text/html').body; + body.removeChild(body.firstChild); + return body; + } + catch (_a) { + return null; + } + }; + /** + * Use an HTML5 `template` element, if supported, or an inert body element created via + * `createHtmlDocument` to create and fill an inert DOM element. + * This is the default sane strategy to use if the browser does not require one of the specialised + * strategies above. + */ + InertBodyHelper.prototype.getInertBodyElement_InertDocument = function (html) { + // Prefer using