diff --git a/.github/CHANGELOG-v7.15.0-v7.28.5.md b/.github/CHANGELOG-v7.15.0-v7.28.5.md new file mode 100644 index 000000000000..3a058a6fcc3f --- /dev/null +++ b/.github/CHANGELOG-v7.15.0-v7.28.5.md @@ -0,0 +1,2960 @@ +# Changelog + +> **Tags:** +> +> - :boom: [Breaking Change] +> - :eyeglasses: [Spec Compliance] +> - :rocket: [New Feature] +> - :bug: [Bug Fix] +> - :memo: [Documentation] +> - :house: [Internal] +> - :nail_care: [Polish] + +_Note: Gaps between patch versions are faulty, broken or test releases._ + +This file contains the changelog from v7.15.0 to v7.28.5. + +- See [CHANGELOG.md](/CHANGELOG.md) for v7.28.6 to the end of the v7 release line. +- See [CHANGELOG - v7.0.0 to v7.14.9](/.github/CHANGELOG-v7.0.0-v7.14.9.md) for v7.0.0 to v7.14.9 changes. +- See [CHANGELOG - v7 prereleases](/.github/CHANGELOG-v7-prereleases.md) for v7.0.0-alpha.1 to v7.0.0-rc.4 changes. +- See [CHANGELOG - v4](/.github/CHANGELOG-v4.md), [CHANGELOG - v5](/.github/CHANGELOG-v5.md), and [CHANGELOG - v6](/.github/CHANGELOG-v6.md) for v4.x-v6.x changes. +- See [CHANGELOG - 6to5](/.github/CHANGELOG-6to5.md) for the pre-4.0.0 version changelog. +- See [Babylon's CHANGELOG](packages/babel-parser/CHANGELOG.md) for the Babylon pre-7.0.0-beta.29 version changelog. +- See [`babel-eslint`'s releases](https://github.com/babel/babel-eslint/releases) for the changelog before `@babel/eslint-parser` 7.8.0. +- See [`eslint-plugin-babel`'s releases](https://github.com/babel/eslint-plugin-babel/releases) for the changelog before `@babel/eslint-plugin` 7.8.0. + + + +## v7.28.5 (2025-10-23) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#17446](https://github.com/babel/babel/pull/17446) Allow `Runtime Errors for Function Call Assignment Targets` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-validator-identifier` + * [#17501](https://github.com/babel/babel/pull/17501) fix: update identifier to unicode 17 ([@fisker](https://github.com/fisker)) + +#### :bug: Bug Fix +* `babel-plugin-proposal-destructuring-private` + * [#17534](https://github.com/babel/babel/pull/17534) Allow mixing private destructuring and rest ([@CO0Ki3](https://github.com/CO0Ki3)) +* `babel-parser` + * [#17521](https://github.com/babel/babel/pull/17521) Improve `@babel/parser` error typing ([@JLHwung](https://github.com/JLHwung)) + * [#17491](https://github.com/babel/babel/pull/17491) fix: improve ts-only declaration parsing ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-proposal-discard-binding`, `babel-plugin-transform-destructuring` + * [#17519](https://github.com/babel/babel/pull/17519) fix: `rest` correctly returns plain array ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-helper-member-expression-to-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-optional-chaining`, `babel-traverse`, `babel-types` + * [#17503](https://github.com/babel/babel/pull/17503) Fix `JSXIdentifier` handling in `isReferencedIdentifier` ([@JLHwung](https://github.com/JLHwung)) +* `babel-traverse` + * [#17504](https://github.com/babel/babel/pull/17504) fix: ensure scope.push register in anonymous fn ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* `babel-types` + * [#17494](https://github.com/babel/babel/pull/17494) Type checking babel-types scripts ([@JLHwung](https://github.com/JLHwung)) + +#### :running_woman: Performance +* `babel-core` + * [#17490](https://github.com/babel/babel/pull/17490) Faster finding of locations in `buildCodeFrameError` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.28.4 (2025-09-05) + +#### :house: Internal +* `babel-core`, `babel-helper-check-duplicate-nodes`, `babel-traverse`, `babel-types` + * [#17493](https://github.com/babel/babel/pull/17493) Update Jest to v30.1.1 ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-regenerator` + * [#17455](https://github.com/babel/babel/pull/17455) chore: Clean up `transform-regenerator` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core` + * [#17474](https://github.com/babel/babel/pull/17474) Switch to @jridgewell/remapping ([@mrginglymus](https://github.com/mrginglymus)) +## v7.28.3 (2025-08-14) + +#### :eyeglasses: Spec Compliance +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-static-block`, `babel-preset-env` + * [#17443](https://github.com/babel/babel/pull/17443) [static blocks] Do not inject new static fields after static code ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix +* `babel-parser` + * [#17465](https://github.com/babel/babel/pull/17465) fix(parser/typescript): parse `import("./a", {with:{},})` ([@easrng](https://github.com/easrng)) + * [#17478](https://github.com/babel/babel/pull/17478) fix(parser): stop subscript parsing on async arrow ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime` + * [#17363](https://github.com/babel/babel/pull/17363) Do not save last yield in call in temp var ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :memo: Documentation +* [#17448](https://github.com/babel/babel/pull/17448) move eslint-{parser,plugin} docs to the website ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* [#17454](https://github.com/babel/babel/pull/17454) Enable type checking for `scripts` and `babel-worker.cjs` ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions` + * [#17444](https://github.com/babel/babel/pull/17444) Optimize do expression output ([@JLHwung](https://github.com/JLHwung)) +## v7.28.2 (2025-07-24) + +#### :bug: Bug Fix +* `babel-types` + * [#17445](https://github.com/babel/babel/pull/17445) [babel 7] Make `operator` param in `t.tsTypeOperator` optional ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` + * [#17441](https://github.com/babel/babel/pull/17441) fix: `regeneratorDefine` compatibility with es5 strict mode ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.28.1 (2025-07-12) + +#### :bug: Bug Fix +* `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator` + * [#17426](https://github.com/babel/babel/pull/17426) fix: `regenerator` correctly handles `throw` outside of `try` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :memo: Documentation +* `babel-types` + * [#17422](https://github.com/babel/babel/pull/17422) Add missing FunctionParameter docs ([@JLHwung](https://github.com/JLHwung)) + +#### :leftwards_arrow_with_hook: Revert +* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-types` + * [#17432](https://github.com/babel/babel/pull/17432) Do not mark OptionalMemberExpresion as LVal ([@JLHwung](https://github.com/JLHwung)) +## v7.28.0 (2025-07-02) + +#### :rocket: New Feature +* `babel-node` + * [#17147](https://github.com/babel/babel/pull/17147) Support top level await in node repl ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-types` + * [#17258](https://github.com/babel/babel/pull/17258) feat(matchesPattern): support super/private/meta ([@JLHwung](https://github.com/JLHwung)) +* `babel-compat-data`, `babel-preset-env` + * [#17355](https://github.com/babel/babel/pull/17355) Add explicit resource management to preset-env ([@JLHwung](https://github.com/JLHwung)) +* `babel-core`, `babel-parser` + * [#17390](https://github.com/babel/babel/pull/17390) Support `sourceType: "commonjs"` ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-parser` + * [#17346](https://github.com/babel/babel/pull/17346) Materialize `explicitResourceManagement` parser plugin ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-transform-object-rest-spread`, `babel-traverse`, `babel-types` + * [#17391](https://github.com/babel/babel/pull/17391) LVal coverage updates (Part 2) ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser`, `babel-traverse`, `babel-types` + * [#17378](https://github.com/babel/babel/pull/17378) Accept bigints in `t.bigIntLiteral` factory ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-discard-binding`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-explicit-resource-management`, `babel-plugin-transform-react-display-name`, `babel-types` + * [#17277](https://github.com/babel/babel/pull/17277) Transform discard binding ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-parser`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types` + * [#17163](https://github.com/babel/babel/pull/17163) Parse discard binding ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-helper-globals`, `babel-plugin-transform-classes`, `babel-traverse` + * [#17297](https://github.com/babel/babel/pull/17297) Create babel-helper-globals ([@JLHwung](https://github.com/JLHwung)) +* `babel-types` + * [#17009](https://github.com/babel/babel/pull/17009) feature: TSTypeOperator: keyof (#16799) ([@coderaiser](https://github.com/coderaiser)) + +#### :house: Internal +* `babel-compat-data`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-json-modules`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3` + * [#17403](https://github.com/babel/babel/pull/17403) Update `babel-polyfill` packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.27.7 (2025-06-26) + +#### :eyeglasses: Spec Compliance +* `babel-parser`, `babel-plugin-transform-classes` + * [#17203](https://github.com/babel/babel/pull/17203) Interepret parser `allow*` options as top level only ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser` + * [#17371](https://github.com/babel/babel/pull/17371) fix: disable using in ambient context ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-core` + * [#17392](https://github.com/babel/babel/pull/17392) Improve TS babel config loading ([@JLHwung](https://github.com/JLHwung)) +* `babel-types` + * [#17376](https://github.com/babel/babel/pull/17376) fix: support negative bigint in valueToNode ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-parameters` + * [#17352](https://github.com/babel/babel/pull/17352) fix: Params of `async function*` should throw synchronously ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-plugin-transform-destructuring`, `babel-plugin-transform-object-rest-spread` + * [#17389](https://github.com/babel/babel/pull/17389) Use `NodePath#splitExportDeclaration` in destructuring transforms ([@JLHwung](https://github.com/JLHwung)) +## v7.27.6 (2025-06-05) + +#### :bug: Bug Fix +* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` + * [#17366](https://github.com/babel/babel/pull/17366) fix: `finally` causes unexpected return value ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator`, `babel-parser`, `babel-types` + * [#17357](https://github.com/babel/babel/pull/17357) Ensure syntactic ordering when visiting array-type AST nodes ([@JLHwung](https://github.com/JLHwung)) +## v7.27.5 (2025-06-03) + +#### :bug: Bug Fix +* `babel-plugin-transform-regenerator` + * [#17359](https://github.com/babel/babel/pull/17359) fix: Unexpected infinite loop with `regenerator` for `try` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* Other + * [#17349](https://github.com/babel/babel/pull/17349) Map ESLint's `sourceType: commonjs` to script ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-parser` + * [#17333](https://github.com/babel/babel/pull/17333) Improve using declaration errors ([@JLHwung](https://github.com/JLHwung)) +## v7.27.4 (2025-05-30) + +#### :eyeglasses: Spec Compliance +* `babel-parser`, `babel-plugin-proposal-explicit-resource-management` + * [#17323](https://github.com/babel/babel/pull/17323) Disallow using in bare case statement ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-parser` + * [#17311](https://github.com/babel/babel/pull/17311) Improve parseExpression error messages ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#17287](https://github.com/babel/babel/pull/17287) Reduce `regenerator` size more ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3` + * [#17334](https://github.com/babel/babel/pull/17334) Use shorter method names for regenerator context ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#17268](https://github.com/babel/babel/pull/17268) Reduce `regenerator` helper size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core`, `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` + * [#17238](https://github.com/babel/babel/pull/17238) Split `regeneratorRuntime` into multiple helpers ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.27.3 (2025-05-27) + +#### :bug: Bug Fix +* `babel-generator` + * [#17324](https://github.com/babel/babel/pull/17324) Improve multiline comments handling in yield/await expression ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` + * [#17328](https://github.com/babel/babel/pull/17328) Correctly set `.displayName` on `GeneratorFunction` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-explicit-resource-management` + * [#17319](https://github.com/babel/babel/pull/17319) fix: handle shadowed binding in `for using of` body ([@JLHwung](https://github.com/JLHwung)) + * [#17317](https://github.com/babel/babel/pull/17317) fix: support named evaluation for using declaration ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-proposal-decorators`, `babel-types` + * [#17321](https://github.com/babel/babel/pull/17321) fix(converter): Remove `abstract` modifiers in class declaration to expression conversion ([@magic-akari](https://github.com/magic-akari)) +* `babel-helper-module-transforms`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` + * [#17257](https://github.com/babel/babel/pull/17257) Preserve class id when transforming using declarations with exported class ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser` + * [#17312](https://github.com/babel/babel/pull/17312) fix(parser): properly handle optional markers in generator class methods ([@magic-akari](https://github.com/magic-akari)) + * [#17307](https://github.com/babel/babel/pull/17307) fix(parser): Terminate modifier parsing at newline ([@magic-akari](https://github.com/magic-akari)) +* `babel-generator`, `babel-parser` + * [#17308](https://github.com/babel/babel/pull/17308) Improve import phase parsing ([@JLHwung](https://github.com/JLHwung)) +## v7.27.2 (2025-05-06) + +#### :bug: Bug Fix +* `babel-parser` + * [#17289](https://github.com/babel/babel/pull/17289) fix: `@babel/parser/bin/index.js` contains `node:` protocol require ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#17291](https://github.com/babel/babel/pull/17291) fix: Private class method not found when TS and estree ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-object-rest-spread` + * [#17281](https://github.com/babel/babel/pull/17281) Fix: improve object rest handling in array pattern ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-modules-commonjs`, `babel-template` + * [#17284](https://github.com/babel/babel/pull/17284) fix(babel-template): Properly handle empty string replacements ([@magic-akari](https://github.com/magic-akari)) + +#### :running_woman: Performance +* `babel-cli` + * [#17285](https://github.com/babel/babel/pull/17285) Enable Node compile cache for `@babel/cli` ([@JLHwung](https://github.com/JLHwung)) +## v7.27.1 (2025-04-30) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#17254](https://github.com/babel/babel/pull/17254) Allow `using of` as lexical declaration within for ([@JLHwung](https://github.com/JLHwung)) + * [#17230](https://github.com/babel/babel/pull/17230) Disallow get/set in TSPropertySignature ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser`, `babel-types` + * [#17193](https://github.com/babel/babel/pull/17193) Stricter TSImportType options parsing ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-traverse` + * [#17137](https://github.com/babel/babel/pull/17137) fix: do expressions should allow early exit ([@kermanx](https://github.com/kermanx)) +* `babel-helper-wrap-function`, `babel-plugin-transform-async-to-generator` + * [#17251](https://github.com/babel/babel/pull/17251) Fix: propagate argument evaluation errors through async promise chain ([@magic-akari](https://github.com/magic-akari)) +* `babel-helper-remap-async-to-generator`, `babel-plugin-transform-async-to-generator` + * [#17231](https://github.com/babel/babel/pull/17231) fix apply()/call() annotated as pure ([@Lacsw](https://github.com/Lacsw)) +* `babel-helper-fixtures`, `babel-parser` + * [#17233](https://github.com/babel/babel/pull/17233) Create ChainExpression within TSInstantiationExpression ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-parser` + * [#17226](https://github.com/babel/babel/pull/17226) Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser` + * [#17224](https://github.com/babel/babel/pull/17224) Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) ([@JLHwung](https://github.com/JLHwung)) + * [#17080](https://github.com/babel/babel/pull/17080) Fix start of TSParameterProperty ([@JLHwung](https://github.com/JLHwung)) +* `babel-compat-data`, `babel-preset-env` + * [#17228](https://github.com/babel/babel/pull/17228) Update firefox bugfix compat data ([@JLHwung](https://github.com/JLHwung)) +* `babel-traverse` + * [#17156](https://github.com/babel/babel/pull/17156) fix: Objects and arrays with multiple references should not be evaluated ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator` + * [#17216](https://github.com/babel/babel/pull/17216) Fix: support const type parameter in generator ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-traverse` + * [#17221](https://github.com/babel/babel/pull/17221) Reduce generated names size for the 10th-11th ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#17263](https://github.com/babel/babel/pull/17263) Remove unused `regenerator-runtime` dep in `@babel/runtime` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-compat-data`, `babel-preset-env` + * [#17256](https://github.com/babel/babel/pull/17256) Tune plugin compat data ([@JLHwung](https://github.com/JLHwung)) +* `babel-compat-data`, `babel-standalone` + * [#17236](https://github.com/babel/babel/pull/17236) migrate babel-compat-data build script to mjs ([@JLHwung](https://github.com/JLHwung)) +* Other + * [#17232](https://github.com/babel/babel/pull/17232) Bump typescript-eslint to 8.29.1 ([@JLHwung](https://github.com/JLHwung)) + * [#17219](https://github.com/babel/babel/pull/17219) test: add basic typescript-eslint integration tests ([@JLHwung](https://github.com/JLHwung)) + * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-register` + * [#16844](https://github.com/babel/babel/pull/16844) Migrate `@babel/register` to cts ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-cli`, `babel-compat-data`, `babel-core`, `babel-generator`, `babel-helper-compilation-targets`, `babel-helper-fixtures`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-plugin-test-runner`, `babel-helper-transform-fixture-test-runner`, `babel-helpers`, `babel-node`, `babel-parser`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-preset-env`, `babel-register`, `babel-standalone`, `babel-types` + * [#17207](https://github.com/babel/babel/pull/17207) Enforce node protocol import ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-regenerator` + * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` + * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-transform-regenerator` + * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers` + * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :microscope: Output optimization +* `babel-helpers`, `babel-plugin-transform-modules-commonjs`, `babel-runtime-corejs3` + * [#16538](https://github.com/babel/babel/pull/16538) Reduce `interopRequireWildcard` size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` + * [#17213](https://github.com/babel/babel/pull/17213) Reduce `regeneratorRuntime` size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.27.0 (2025-03-24) + +#### :eyeglasses: Spec Compliance +* `babel-generator`, `babel-parser` + * [#16977](https://github.com/babel/babel/pull/16977) Default `importAttributesKeyword` to `with` ([@JLHwung](https://github.com/JLHwung)) + +#### :rocket: New Feature +* `babel-helper-create-class-features-plugin`, `babel-traverse`, `babel-types` + * [#17169](https://github.com/babel/babel/pull/17169) Allow `traverseFast` to exit early ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser`, `babel-types` + * [#17110](https://github.com/babel/babel/pull/17110) Add `ImportAttributes` to `Standardized` and move its parser test fixtures ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator` + * [#17100](https://github.com/babel/babel/pull/17100) fix(babel-generator): add named export of generate function ([@vovkasm](https://github.com/vovkasm)) +* `babel-parser`, `babel-template` + * [#17149](https://github.com/babel/babel/pull/17149) Add `allowYieldOutsideFunction` to parser ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-typescript`, `babel-traverse` + * [#17102](https://github.com/babel/babel/pull/17102) feat: Add `upToScope` parameter to `hasBinding` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#17082](https://github.com/babel/babel/pull/17082) Support ESTree AccessorProperty ([@JLHwung](https://github.com/JLHwung)) +* `babel-types` + * [#17162](https://github.com/babel/babel/pull/17162) feat(babel-types): Add support for BigInt literal conversion in valueToNode ([@ishchhabra](https://github.com/ishchhabra)) + +#### :bug: Bug Fix +* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-class-properties` + * [#16816](https://github.com/babel/babel/pull/16816) fix: Class reference in type throws error ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-traverse` + * [#17170](https://github.com/babel/babel/pull/17170) fix: Reset child scopes when `scope.crawl()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-preset-typescript`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#17118](https://github.com/babel/babel/pull/17118) Fix: align behaviour to tsc `rewriteRelativeImportExtensions` ([@JLHwung](https://github.com/JLHwung)) +* `babel-cli` + * [#17182](https://github.com/babel/babel/pull/17182) fix: `@babel/cli` generates duplicate inline source maps ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-named-capturing-groups-regex`, `babel-types` + * [#17175](https://github.com/babel/babel/pull/17175) Generate computed proto key ([@JLHwung](https://github.com/JLHwung)) + +#### :running_woman: Performance +* `babel-types` + * [#16870](https://github.com/babel/babel/pull/16870) perf: Improve builders of `@babel/types` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-regexp-features-plugin` + * [#17176](https://github.com/babel/babel/pull/17176) fix: improve duplicate named groups check ([@JLHwung](https://github.com/JLHwung)) +## v7.26.10 (2025-03-11) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#17159](https://github.com/babel/babel/pull/17159) Disallow decorator in array pattern ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-parser`, `babel-template` + * [#17164](https://github.com/babel/babel/pull/17164) Fix: always initialize ExportDeclaration attributes ([@JLHwung](https://github.com/JLHwung)) +* `babel-core` + * [#17142](https://github.com/babel/babel/pull/17142) fix: "Map maximum size exceeded" in deepClone ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser`, `babel-plugin-transform-typescript` + * [#17154](https://github.com/babel/babel/pull/17154) Update typescript parser tests ([@JLHwung](https://github.com/JLHwung)) +* `babel-traverse` + * [#17151](https://github.com/babel/babel/pull/17151) fix: Should not evaluate vars in child scope ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator` + * [#17153](https://github.com/babel/babel/pull/17153) fix: Correctly generate `abstract override` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#17107](https://github.com/babel/babel/pull/17107) Fix source type detection when parsing TypeScript ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-runtime`, `babel-runtime-corejs2`, `babel-runtime-corejs3` + * [#17173](https://github.com/babel/babel/pull/17173) Fix processing of replacement pattern with named capture groups ([@mmmsssttt404](https://github.com/[mmmsssttt404](https://github.com/mmmsssttt404))) + +#### :nail_care: Polish +* `babel-standalone` + * [#17158](https://github.com/babel/babel/pull/17158) Avoid warnings when re-bundling @babel/standalone with webpack ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-parser` + * [#17160](https://github.com/babel/babel/pull/17160) Left-value parsing cleanup ([@JLHwung](https://github.com/JLHwung)) +## v7.26.9 (2025-02-14) + +#### :bug: Bug Fix +* `babel-types` + * [#17103](https://github.com/babel/babel/pull/17103) fix: Definition for `TSPropertySignature.kind` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator`, `babel-types` + * [#17062](https://github.com/babel/babel/pull/17062) Print TypeScript optional/definite in ClassPrivateProperty ([@jamiebuilds-signal](https://github.com/jamiebuilds-signal)) + +#### :house: Internal +* `babel-types` + * [#17130](https://github.com/babel/babel/pull/17130) Use `.ts` files with explicit reexports to solve name conflicts ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core` + * [#17127](https://github.com/babel/babel/pull/17127) Do not depend on `@types/gensync` in Babel 7 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.26.7 (2025-01-24) + +#### :bug: Bug Fix +* `babel-helpers`, `babel-preset-env`, `babel-runtime-corejs3` + * [#17086](https://github.com/babel/babel/pull/17086) Make "object without properties" helpers ES6-compatible ([@tquetano-netflix](https://github.com/tquetano-netflix)) +* `babel-plugin-transform-typeof-symbol` + * [#17085](https://github.com/babel/babel/pull/17085) fix: Correctly handle `typeof` in arrow functions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#17079](https://github.com/babel/babel/pull/17079) Respect `ranges` option in estree method value ([@JLHwung](https://github.com/JLHwung)) +* `babel-core` + * [#17052](https://github.com/babel/babel/pull/17052) Do not try to parse .ts configs as JSON if natively supported ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-typescript` + * [#17050](https://github.com/babel/babel/pull/17050) fix: correctly resolve references to non-constant enum members ([@branchseer](https://github.com/branchseer)) +* `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types` + * [#17025](https://github.com/babel/babel/pull/17025) fix: Remove type-only `import x = y.z` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.26.6 (2025-01-13) + +#### :bug: Bug Fix +* `babel-plugin-transform-nullish-coalescing-operator` + * [#17061](https://github.com/babel/babel/pull/17061) fix: Chaining nullish coalescing operators output size regression ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.26.5 (2025-01-10) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#17011](https://github.com/babel/babel/pull/17011) Allow the dynamic `import.defer()` form of `import defer` ([@babel-bot](https://github.com/babel-bot)) + +#### :bug: Bug Fix +* `babel-plugin-transform-block-scoped-functions` + * [#17024](https://github.com/babel/babel/pull/17024) chore: Avoid calling `isInStrictMode` in Babel 7 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-typescript` + * [#17026](https://github.com/babel/babel/pull/17026) fix: Correctly generate exported const enums in namespace ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#17045](https://github.com/babel/babel/pull/17045) [estree] Unify method type parameters handling ([@JLHwung](https://github.com/JLHwung)) + * [#17013](https://github.com/babel/babel/pull/17013) fix: Correctly set position for `@(a.b)()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#16996](https://github.com/babel/babel/pull/16996) [estree] Adjust the start loc of class methods with type params ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-parser`, `babel-plugin-transform-flow-strip-types`, `babel-types` + * [#17028](https://github.com/babel/babel/pull/17028) Support flow jsx opening element type arguments ([@JLHwung](https://github.com/JLHwung)) +* `babel-compat-data`, `babel-preset-env` + * [#17031](https://github.com/babel/babel/pull/17031) fix: More accurate `transform-typeof-symbol` compat data ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator`, `babel-parser`, `babel-types` + * [#17019](https://github.com/babel/babel/pull/17019) Fix incomplete visitor keys ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-plugin-transform-nullish-coalescing-operator` + * [#16612](https://github.com/babel/babel/pull/16612) Improve nullish coalescing operator output ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.26.4 (2024-12-05) + +#### :leftwards_arrow_with_hook: Revert +* `babel-traverse` + * [#17005](https://github.com/babel/babel/pull/17005) Revert "perf: Improve scope information collection performance" ([@JLHwung](https://github.com/JLHwung)) +## v7.26.3 (2024-12-04) + +#### :bug: Bug Fix +* `babel-generator` + * [#16958](https://github.com/babel/babel/pull/16958) [preserveFormat] force semicolons when invalidating ASI ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-helper-builder-binary-assignment-operator-visitor`, `babel-plugin-transform-exponentiation-operator` + * [#16895](https://github.com/babel/babel/pull/16895) Remove helper-builder-binary-assignment-operator-visitor ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :running_woman: Performance +* `babel-generator` + * [#16959](https://github.com/babel/babel/pull/16959) perf: Reduce the use of temporary objects ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-traverse` + * [#16923](https://github.com/babel/babel/pull/16923) perf: Improve scope information collection performance ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#16964](https://github.com/babel/babel/pull/16964) perf: Avoid repeated traversal when creating scope ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-modules-commonjs` + * [#16954](https://github.com/babel/babel/pull/16954) perf: Remove use of `simplifyAccess` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.26.2 (2024-10-30) + +#### :bug: Bug Fix +* `babel-parser` + * [#16903](https://github.com/babel/babel/pull/16903) fix: Parse placeholder for TS namespace ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#16937](https://github.com/babel/babel/pull/16937) fix: Account for offsets when creating new Position instances ([@DylanPiercey](https://github.com/DylanPiercey)) +* `babel-generator` + * [#16948](https://github.com/babel/babel/pull/16948) Fix mapping of tokens with generated nodes in between ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.26.1 (2024-10-25) + +#### :bug: Bug Fix +* `babel-parser` + * [#16936](https://github.com/babel/babel/pull/16936) fix(parser): offset internal index locations by startIndex ([@DylanPiercey](https://github.com/DylanPiercey)) +## v7.26.0 (2024-10-25) + +#### :rocket: New Feature +* `babel-core`, `babel-generator`, `babel-parser`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes`, `babel-preset-env`, `babel-standalone`, `babel-types` + * [#16850](https://github.com/babel/babel/pull/16850) Enable import attributes parsing by default ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core` + * [#16862](https://github.com/babel/babel/pull/16862) feat: support async plugin's pre/post ([@timofei-iatsenko](https://github.com/timofei-iatsenko)) +* `babel-compat-data`, `babel-plugin-proposal-regexp-modifiers`, `babel-plugin-transform-regexp-modifiers`, `babel-preset-env`, `babel-standalone` + * [#16692](https://github.com/babel/babel/pull/16692) Add `transform-regexp-modifiers` to `preset-env` ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser` + * [#16849](https://github.com/babel/babel/pull/16849) feat: add `startIndex` parser option ([@DylanPiercey](https://github.com/DylanPiercey)) +* `babel-generator`, `babel-parser`, `babel-plugin-syntax-flow` + * [#16841](https://github.com/babel/babel/pull/16841) Always enable parsing of Flow enums ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-preset-typescript`, `babel-runtime-corejs3` + * [#16794](https://github.com/babel/babel/pull/16794) Support `import()` in `rewriteImportExtensions` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator`, `babel-parser` + * [#16708](https://github.com/babel/babel/pull/16708) Add experimental format-preserving mode to `@babel/generator` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix +* `babel-core` + * [#16928](https://github.com/babel/babel/pull/16928) Workaround Node.js bug for parallel loading of TLA modules ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16926](https://github.com/babel/babel/pull/16926) Fix loading of modules with TLA in Node.js 23 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-plugin-proposal-json-modules`, `babel-plugin-transform-json-modules`, `babel-standalone` + * [#16924](https://github.com/babel/babel/pull/16924) Rename `proposal-json-modules` to `transform-json-modules` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-code-frame`, `babel-highlight` + * [#16896](https://github.com/babel/babel/pull/16896) Inline `@babel/highlight` in `@babel/code-frame` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-parser`, `babel-types` + * [#16732](https://github.com/babel/babel/pull/16732) Add `kind` to `TSModuleDeclaration` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :running_woman: Performance +* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` + * [#16882](https://github.com/babel/babel/pull/16882) perf: Improve module transforms ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.25.9 (2024-10-22) + +#### :bug: Bug Fix +* `babel-parser`, `babel-template`, `babel-types` + * [#16905](https://github.com/babel/babel/pull/16905) fix: Keep type annotations in `syntacticPlaceholders` mode ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-compilation-targets`, `babel-preset-env` + * [#16907](https://github.com/babel/babel/pull/16907) fix: support BROWSERSLIST{,_CONFIG} env ([@JLHwung](https://github.com/JLHwung)) +* Other + * [#16884](https://github.com/babel/babel/pull/16884) Analyze `ClassAccessorProperty` to prevent the `no-undef` rule ([@victorenator](https://github.com/victorenator)) + +#### :house: Internal +* `babel-helper-transform-fixture-test-runner` + * [#16914](https://github.com/babel/babel/pull/16914) remove test options flaky ([@JLHwung](https://github.com/JLHwung)) + +#### :running_woman: Performance +* `babel-parser`, `babel-types` + * [#16918](https://github.com/babel/babel/pull/16918) perf: Make `VISITOR_KEYS` etc. faster to access ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.25.8 (2024-10-10) + +#### :bug: Bug Fix +* `babel-core` + * [#16888](https://github.com/babel/babel/pull/16888) Restore public API of `resolvePlugin`/`resolvePreset` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-parser`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-import-defer`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-throw-expressions`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-export-namespace-from`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-property-in-object`, `babel-preset-env` + * [#16824](https://github.com/babel/babel/pull/16824) Inline one-line syntax plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.25.7 (2024-10-02) + +#### :bug: Bug Fix +* `babel-helper-validator-identifier` + * [#16825](https://github.com/babel/babel/pull/16825) fix: update identifier to unicode 16 ([@JLHwung](https://github.com/JLHwung)) +* `babel-traverse` + * [#16814](https://github.com/babel/babel/pull/16814) fix: issue with node path keys updated on unrelated paths ([@DylanPiercey](https://github.com/DylanPiercey)) +* `babel-plugin-transform-classes` + * [#16797](https://github.com/babel/babel/pull/16797) Use an inclusion rather than exclusion list for `super()` check ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#16788](https://github.com/babel/babel/pull/16788) Fix printing of TS `infer` in compact mode ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16785](https://github.com/babel/babel/pull/16785) Print TS type annotations for destructuring in assignment pattern ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16778](https://github.com/babel/babel/pull/16778) Respect `[no LineTerminator here]` after nodes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-types` + * [#16852](https://github.com/babel/babel/pull/16852) Add deprecated JSDOC for fields ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-core` + * [#16820](https://github.com/babel/babel/pull/16820) Allow sync loading of ESM when `--experimental-require-module` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-compilation-targets`, `babel-helper-plugin-utils`, `babel-preset-env` + * [#16858](https://github.com/babel/babel/pull/16858) Add browserslist config to external dependency ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-proposal-destructuring-private`, `babel-plugin-syntax-decimal`, `babel-plugin-syntax-import-reflection`, `babel-standalone` + * [#16809](https://github.com/babel/babel/pull/16809) Archive syntax-import-reflection and syntax-decimal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#16779](https://github.com/babel/babel/pull/16779) Simplify logic for `[no LineTerminator here]` before nodes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :running_woman: Performance +* `babel-plugin-transform-typescript` + * [#16875](https://github.com/babel/babel/pull/16875) perf: Avoid extra cloning of namespaces ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-types` + * [#16842](https://github.com/babel/babel/pull/16842) perf: Improve @babel/types builders ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#16828](https://github.com/babel/babel/pull/16828) Only access `BABEL_TYPES_8_BREAKING` at startup ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.25.6 (2024-08-29) + +#### :bug: Bug Fix +* `babel-generator` + * [#16783](https://github.com/babel/babel/pull/16783) Properly print inner comments in TS array types ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16775](https://github.com/babel/babel/pull/16775) fix: jsx whitespace is not properly preserved when retainLines ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-traverse` + * [#16727](https://github.com/babel/babel/pull/16727) fix: `path.getAssignmentIdentifiers` may be `undefined` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#16761](https://github.com/babel/babel/pull/16761) fix: improve static canFollowModifier checks ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-transform-optional-chaining`, `babel-runtime-corejs3` + * [#16769](https://github.com/babel/babel/pull/16769) Only wrap functions in `superPropertyGet` helper ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-generator`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env` + * [#16780](https://github.com/babel/babel/pull/16780) Do not enforce printing space between `(` and comments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes` + * [#16781](https://github.com/babel/babel/pull/16781) Don't throw when enabling both syntax-import-{assertions,attributes} ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#16782](https://github.com/babel/babel/pull/16782) TS union/intersection nested in union does not need parens ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-generator` + * [#16777](https://github.com/babel/babel/pull/16777) Remove unused `parent` params in the generator ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.25.5 (2024-08-23) + +#### :bug: Bug Fix +* `babel-generator`, `babel-traverse` + * [#16764](https://github.com/babel/babel/pull/16764) fix: Generate parentheses correctly ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-generator` + * [#16738](https://github.com/babel/babel/pull/16738) Only force-parenthesize `satisfies`'s LHS if it has newlines ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.25.4 (2024-08-22) + +#### :bug: Bug Fix +* `babel-traverse` + * [#16756](https://github.com/babel/babel/pull/16756) fix: Skip computed key when renaming ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16755](https://github.com/babel/babel/pull/16755) fix: Decorator 2018-09 may throw an exception ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-types` + * [#16710](https://github.com/babel/babel/pull/16710) Visit AST fields nodes according to their syntactical order ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#16709](https://github.com/babel/babel/pull/16709) Print semicolon after TS `export namespace as A` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-generator`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-typescript`, `babel-runtime-corejs2`, `babel-runtime`, `babel-traverse` + * [#16722](https://github.com/babel/babel/pull/16722) Avoid unnecessary parens around sequence expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-plugin-transform-class-properties` + * [#16714](https://github.com/babel/babel/pull/16714) Avoid unnecessary parens around exported arrow functions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-transform-object-rest-spread` + * [#16712](https://github.com/babel/babel/pull/16712) Avoid printing unnecessary parens around object destructuring ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :microscope: Output optimization +* `babel-generator` + * [#16740](https://github.com/babel/babel/pull/16740) Avoid extra spaces between comments/regexps in compact mode ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.25.3 (2024-07-31) + +#### :bug: Bug Fix +* `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-traverse` + * [#16699](https://github.com/babel/babel/pull/16699) Avoid validating visitors produced by `traverse.visitors.merge` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-parser` + * [#16688](https://github.com/babel/babel/pull/16688) Add `@babel/types` as a dependency of `@babel/parser` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.25.2 (2024-07-30) + +#### :bug: Bug Fix +* `babel-core`, `babel-traverse` + * [#16695](https://github.com/babel/babel/pull/16695) Ensure that `requeueComputedKeyAndDecorators` is available ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.25.1 (2024-07-28) + +#### :bug: Bug Fix +* `babel-plugin-transform-function-name` + * [#16683](https://github.com/babel/babel/pull/16683) fix: `ensureFunctionName` may be undefined ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-react-constant-elements` + * [#16582](https://github.com/babel/babel/pull/16582) fix plugin-transform-react-constant-elements transform JSXFrament but not add JSXExpressionContainer ([@keiseiTi](https://github.com/keiseiTi)) +* `babel-traverse` + * [#16587](https://github.com/babel/babel/pull/16587) fix: fixed issue16583 + test ([@nerodesu017](https://github.com/nerodesu017)) + +#### :house: Internal +* [#16663](https://github.com/babel/babel/pull/16663) Test eslint plugin against eslint 9 ([@JLHwung](https://github.com/JLHwung)) +## v7.25.0 (2024-07-26) + +#### :eyeglasses: Spec Compliance +* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs3` + * [#16537](https://github.com/babel/babel/pull/16537) `await using` normative updates ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-typescript` + * [#16602](https://github.com/babel/babel/pull/16602) Ensure enum members syntactically determinable to be strings do not get reverse mappings ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :rocket: New Feature +* `babel-helper-create-class-features-plugin`, `babel-helper-function-name`, `babel-helper-plugin-utils`, `babel-helper-wrap-function`, `babel-plugin-bugfix-safari-class-field-initializer-scope`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-transform-classes`, `babel-plugin-transform-function-name`, `babel-preset-env`, `babel-traverse`, `babel-types` + * [#16658](https://github.com/babel/babel/pull/16658) Move `ensureFunctionName` to `NodePath.prototype` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-hoist-variables`, `babel-helper-plugin-utils`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-transform-modules-systemjs`, `babel-traverse` + * [#16644](https://github.com/babel/babel/pull/16644) Move `hoistVariables` to `Scope.prototype` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-helper-split-export-declaration`, `babel-plugin-transform-classes`, `babel-traverse`, `babel-types` + * [#16645](https://github.com/babel/babel/pull/16645) Move `splitExportDeclaration` to `NodePath.prototype` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-helper-environment-visitor`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-classes`, `babel-traverse` + * [#16649](https://github.com/babel/babel/pull/16649) Move `environment-visitor` helper into `@babel/traverse` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-parser` + * [#16480](https://github.com/babel/babel/pull/16480) Expose wether a module has TLA or not as `.extra.async` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-compat-data`, `babel-plugin-bugfix-safari-class-field-initializer-scope`, `babel-preset-env` + * [#16569](https://github.com/babel/babel/pull/16569) Introduce `bugfix-safari-class-field-initializer-scope` ([@davidtaylorhq](https://github.com/davidtaylorhq)) +* `babel-plugin-transform-block-scoping`, `babel-traverse`, `babel-types` + * [#16551](https://github.com/babel/babel/pull/16551) Add `NodePath#getAssignmentIdentifiers` ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-import-to-platform-api`, `babel-plugin-proposal-json-modules` + * [#16579](https://github.com/babel/babel/pull/16579) Add `uncheckedRequire` option for JSON imports to CJS ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-transform-fixture-test-runner`, `babel-node` + * [#16642](https://github.com/babel/babel/pull/16642) Allow using custom config in `babel-node --eval` ([@slatereax](https://github.com/slatereax)) +* `babel-compat-data`, `babel-helper-create-regexp-features-plugin`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-duplicate-named-capturing-groups-regex`, `babel-preset-env`, `babel-standalone` + * [#16445](https://github.com/babel/babel/pull/16445) Add `duplicate-named-capturing-groups-regex` to `preset-env` ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-generator` + * [#16678](https://github.com/babel/babel/pull/16678) Print parens around as expressions on the LHS ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-template`, `babel-types` + * [#15286](https://github.com/babel/babel/pull/15286) fix: Props are lost when the template replaces the node ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* Other + * [#16674](https://github.com/babel/babel/pull/16674) bump gulp to 5 ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator` + * [#16651](https://github.com/babel/babel/pull/16651) Simplify the printing logic for `(` before ambiguous tokens ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-function-name`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-function-name`, `babel-preset-env`, `babel-traverse` + * [#16652](https://github.com/babel/babel/pull/16652) Simplify `helper-function-name` logic ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :running_woman: Performance +* `babel-parser`, `babel-plugin-proposal-pipeline-operator` + * [#16461](https://github.com/babel/babel/pull/16461) Some minor parser performance improvements for ts ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :microscope: Output optimization +* `babel-plugin-transform-classes` + * [#16670](https://github.com/babel/babel/pull/16670) Reduce redundant `assertThisInitialized` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-helper-replace-supers`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-object-super`, `babel-plugin-transform-private-methods`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16374](https://github.com/babel/babel/pull/16374) Improve `super.x` output ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes` + * [#16656](https://github.com/babel/babel/pull/16656) Simplify output for anonymous classes with no methods ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.24.10 (2024-07-16) + +#### :bug: Bug Fix +* `babel-generator` + * [#16648](https://github.com/babel/babel/pull/16648) Fix parens detection for object&function in `as`/`satisfies` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.24.9 (2024-07-15) + +#### :bug: Bug Fix +* `babel-core`, `babel-standalone` + * [#16639](https://github.com/babel/babel/pull/16639) Avoid `require()` call in `@babel/standalone` bundle ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-types` + * [#16638](https://github.com/babel/babel/pull/16638) fix: provide legacy typings for TS < 4.1 ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-generator`, `babel-plugin-transform-optional-chaining` + * [#16617](https://github.com/babel/babel/pull/16617) Avoid extra parens in TS `as`/`satisfies` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-helper-module-transforms` + * [#16629](https://github.com/babel/babel/pull/16629) Lazy top-level initializations for module transforms ([@guybedford](https://github.com/guybedford)) +## v7.24.8 (2024-07-11) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#16567](https://github.com/babel/babel/pull/16567) Do not use strict mode in TS `declare` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :bug: Bug Fix +* `babel-generator` + * [#16630](https://github.com/babel/babel/pull/16630) Correctly print parens around `in` in `for` heads ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16626](https://github.com/babel/babel/pull/16626) Fix printing of comments in `await using` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16591](https://github.com/babel/babel/pull/16591) fix typescript code generation for yield expression inside type expre… ([@SreeXD](https://github.com/SreeXD)) +* `babel-parser` + * [#16613](https://github.com/babel/babel/pull/16613) Disallow destructuring assignment in `using` declarations ([@H0onnn](https://github.com/H0onnn)) + * [#16490](https://github.com/babel/babel/pull/16490) fix: do not add `.value: undefined` to regexp literals ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-types` + * [#16615](https://github.com/babel/babel/pull/16615) Remove boolean props from `ObjectTypeInternalSlot` visitor keys ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-typescript` + * [#16566](https://github.com/babel/babel/pull/16566) fix: Correctly handle `export import x =` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-generator` + * [#16625](https://github.com/babel/babel/pull/16625) Avoid unnecessary parens around `async` in `for await` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-traverse` + * [#16619](https://github.com/babel/babel/pull/16619) Avoid checking `Scope.globals` multiple times ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.24.7 (2024-06-05) + +#### :bug: Bug Fix +* `babel-node` + * [#16554](https://github.com/babel/babel/pull/16554) Allow extra flags in babel-node ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-traverse` + * [#16522](https://github.com/babel/babel/pull/16522) fix: incorrect `constantViolations` with destructuring ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-transform-fixture-test-runner`, `babel-plugin-proposal-explicit-resource-management` + * [#16524](https://github.com/babel/babel/pull/16524) fix: Transform `using` in `switch` correctly ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-helpers`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16525](https://github.com/babel/babel/pull/16525) Delete unused array helpers ([@blakewilson](https://github.com/blakewilson)) +## v7.24.6 (2024-05-24) + +#### :bug: Bug Fix +* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-class-properties` + * [#16514](https://github.com/babel/babel/pull/16514) Fix source maps for private member expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-generator`, `babel-plugin-transform-modules-commonjs` + * [#16515](https://github.com/babel/babel/pull/16515) Fix source maps for template literals ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16485](https://github.com/babel/babel/pull/16485) Support undecorated static accessor in anonymous classes ([@JLHwung](https://github.com/JLHwung)) + * [#16484](https://github.com/babel/babel/pull/16484) Fix decorator bare yield await ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-runtime-corejs3` + * [#16483](https://github.com/babel/babel/pull/16483) Fix: throw TypeError if addInitializer is called after finished ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser`, `babel-plugin-transform-typescript` + * [#16476](https://github.com/babel/babel/pull/16476) fix: Correctly parse `cls.fn = x` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-core`, `babel-helpers`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16501](https://github.com/babel/babel/pull/16501) Generate helper metadata at build time ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers` + * [#16499](https://github.com/babel/babel/pull/16499) Add `tsconfig.json` for `@babel/helpers/src/helpers` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-cli`, `babel-helpers`, `babel-plugin-external-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16495](https://github.com/babel/babel/pull/16495) Move all runtime helpers to individual files ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser`, `babel-traverse` + * [#16482](https://github.com/babel/babel/pull/16482) Statically generate boilerplate for bitfield accessors ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* Other + * [#16466](https://github.com/babel/babel/pull/16466) Migrate import assertions syntax ([@JLHwung](https://github.com/JLHwung)) +## v7.24.5 (2024-04-29) + +#### :bug: Bug Fix +* `babel-plugin-transform-classes`, `babel-traverse` + * [#16377](https://github.com/babel/babel/pull/16377) fix: TypeScript annotation affects output ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs3` + * [#16440](https://github.com/babel/babel/pull/16440) Fix suppressed error order ([@sossost](https://github.com/sossost)) + * [#16408](https://github.com/babel/babel/pull/16408) Await nullish async disposable ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-parser` + * [#16407](https://github.com/babel/babel/pull/16407) Recover from exported `using` declaration ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* Other + * [#16414](https://github.com/babel/babel/pull/16414) Relax ESLint peerDependency constraint to allow v9 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#16425](https://github.com/babel/babel/pull/16425) Improve `@babel/parser` AST types ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16417](https://github.com/babel/babel/pull/16417) Always pass type argument to `.startNode` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-helper-member-expression-to-functions`, `babel-helper-module-transforms`, `babel-helper-split-export-declaration`, `babel-helper-wrap-function`, `babel-helpers`, `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-traverse` + * [#16439](https://github.com/babel/babel/pull/16439) Make `NodePath` distributive ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-partial-application`, `babel-types` + * [#16421](https://github.com/babel/babel/pull/16421) Remove `JSXNamespacedName` from valid `CallExpression` args ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-class-properties`, `babel-preset-env` + * [#16406](https://github.com/babel/babel/pull/16406) Do not load unnecessary Babel 7 syntax plugins in Babel 8 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :running_woman: Performance +* `babel-helpers`, `babel-preset-env`, `babel-runtime-corejs3` + * [#16357](https://github.com/babel/babel/pull/16357) Performance: improve `objectWithoutPropertiesLoose` on V8 ([@romgrk](https://github.com/romgrk)) +## v7.24.4 (2024-04-03) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#16403](https://github.com/babel/babel/pull/16403) Forbid initializerless using ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-runtime-corejs3` + * [#16388](https://github.com/babel/babel/pull/16388) Ensure decorators are callable ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-generator` + * [#16402](https://github.com/babel/babel/pull/16402) fix: Correctly prints `{ [key in Bar]? }` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#16394](https://github.com/babel/babel/pull/16394) fix: Correctly generate `TSMappedType` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-compat-data`, `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-preset-env` + * [#16390](https://github.com/babel/babel/pull/16390) Create bugfix plugin for classes in computed keys in Firefox ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16387](https://github.com/babel/babel/pull/16387) fix: support mutated outer decorated class binding ([@JLHwung](https://github.com/JLHwung)) + * [#16385](https://github.com/babel/babel/pull/16385) fix: Decorators when `super()` exists and `protoInit` is not needed ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-block-scoping` + * [#16384](https://github.com/babel/babel/pull/16384) fix: Transform scoping for `for X` in loop ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#16368](https://github.com/babel/babel/pull/16368) fix: Capture `let` when the `for` body is not a block ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping` + * [#16363](https://github.com/babel/babel/pull/16363) Fix incorrect function hoisting in some case statements ([@luiscubal](https://github.com/luiscubal)) +## v7.24.3 (2024-03-20) + +#### :bug: Bug Fix +* `babel-helper-module-imports` + * [#16370](https://github.com/babel/babel/pull/16370) fix: do not inject the same imported identifier multiple times ([@ota-meshi](https://github.com/ota-meshi)) +## v7.24.2 (2024-03-19) + +#### :bug: Bug Fix +* `babel-code-frame`, `babel-highlight` + * [#16362](https://github.com/babel/babel/pull/16362) Restore previous `FORCE_COLOR=0` behavior ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.24.1 (2024-03-19) + +#### :bug: Bug Fix +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16350](https://github.com/babel/babel/pull/16350) Fix decorated class computed keys ordering ([@JLHwung](https://github.com/JLHwung)) + * [#16344](https://github.com/babel/babel/pull/16344) Fix decorated class static field private access ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-proposal-decorators`, `babel-plugin-proposal-json-modules`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env` + * [#16329](https://github.com/babel/babel/pull/16329) Respect `moduleName` for `@babel/runtime/regenerator` imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties` + * [#16331](https://github.com/babel/babel/pull/16331) Fix decorator memoiser binding kind ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-class-features-plugin`, `babel-helper-replace-supers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties` + * [#16325](https://github.com/babel/babel/pull/16325) Fix decorator evaluation private environment ([@JLHwung](https://github.com/JLHwung)) + +#### :memo: Documentation +* [#16319](https://github.com/babel/babel/pull/16319) Update SECURITY.md ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-code-frame`, `babel-highlight` + * [#16359](https://github.com/babel/babel/pull/16359) Replace `chalk` with `picocolors` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-fixtures`, `babel-helpers`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-unicode-sets-regex`, `babel-preset-env`, `babel-preset-flow` + * [#16352](https://github.com/babel/babel/pull/16352) Run Babel transform tests on old node if possible ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` + * [#16323](https://github.com/babel/babel/pull/16323) Allow separate helpers to be excluded in Babel 8 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-module-imports`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx` + * [#16349](https://github.com/babel/babel/pull/16349) Support merging imports in import injector ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-import-attributes-to-assertions`, `babel-plugin-proposal-import-defer`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-plugin-proposal-optional-chaining-assign`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-proposal-regexp-modifiers`, `babel-plugin-proposal-throw-expressions`, `babel-plugin-syntax-async-do-expressions`, `babel-plugin-syntax-decimal`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-syntax-do-expressions`, `babel-plugin-syntax-explicit-resource-management`, `babel-plugin-syntax-export-default-from`, `babel-plugin-syntax-flow`, `babel-plugin-syntax-function-bind`, `babel-plugin-syntax-function-sent`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes`, `babel-plugin-syntax-import-defer`, `babel-plugin-syntax-import-reflection`, `babel-plugin-syntax-import-source`, `babel-plugin-syntax-jsx`, `babel-plugin-syntax-module-blocks`, `babel-plugin-syntax-optional-chaining-assign`, `babel-plugin-syntax-partial-application`, `babel-plugin-syntax-pipeline-operator`, `babel-plugin-syntax-record-and-tuple`, `babel-plugin-syntax-throw-expressions`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-dotall-regex`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-export-namespace-from`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-instanceof`, `babel-plugin-transform-jscript`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-literals`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-member-expression-literals`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-new-target`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-assign`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-object-set-prototype-of-to-assign`, `babel-plugin-transform-object-super`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-property-literals`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-compat`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-react-jsx-source`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-reserved-words`, `babel-plugin-transform-runtime`, `babel-plugin-transform-shorthand-properties`, `babel-plugin-transform-spread`, `babel-plugin-transform-sticky-regex`, `babel-plugin-transform-strict-mode`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-plugin-transform-unicode-property-regex`, `babel-plugin-transform-unicode-regex`, `babel-plugin-transform-unicode-sets-regex`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript` + * [#16332](https://github.com/babel/babel/pull/16332) Test Babel 7 plugins compatibility with Babel 8 core ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-compat-data`, `babel-plugin-transform-object-rest-spread`, `babel-preset-env` + * [#16318](https://github.com/babel/babel/pull/16318) [babel 8] Fix `@babel/compat-data` package.json ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :microscope: Output optimization +* `babel-helper-replace-supers`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime` + * [#16345](https://github.com/babel/babel/pull/16345) Optimize the use of `assertThisInitialized` after `super()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes` + * [#16343](https://github.com/babel/babel/pull/16343) Use simpler `assertThisInitialized` more often ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-object-rest-spread`, `babel-traverse` + * [#16342](https://github.com/babel/babel/pull/16342) Consider well-known and registered symbols as literals ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-plugin-external-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-function-bind`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-typescript`, `babel-preset-env` + * [#16326](https://github.com/babel/babel/pull/16326) Reduce the use of class names ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.24.0 (2024-02-28) + +#### :rocket: New Feature +* `babel-standalone` + * [#11696](https://github.com/babel/babel/pull/11696) Export babel tooling packages in `@babel/standalone` ([@ajihyf](https://github.com/ajihyf)) +* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-transform-class-properties` + * [#16267](https://github.com/babel/babel/pull/16267) Implement `noUninitializedPrivateFieldAccess` assumption ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-decorators`, `babel-plugin-transform-class-properties`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16242](https://github.com/babel/babel/pull/16242) Support decorator 2023-11 normative updates ([@JLHwung](https://github.com/JLHwung)) +* `babel-preset-flow` + * [#16309](https://github.com/babel/babel/pull/16309) [babel 7] Allow setting `ignoreExtensions` in Flow preset ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16284](https://github.com/babel/babel/pull/16284) Add `experimental_useHermesParser` option in `preset-flow` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-import-to-platform-api`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-standalone` + * [#16172](https://github.com/babel/babel/pull/16172) Add transform support for JSON modules imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-runtime` + * [#16241](https://github.com/babel/babel/pull/16241) Add back `moduleName` option to `@babel/plugin-transform-runtime` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser`, `babel-types` + * [#16277](https://github.com/babel/babel/pull/16277) Allow import attributes for `TSImportType` ([@sosukesuzuki](https://github.com/sosukesuzuki)) + +#### :bug: Bug Fix +* `babel-plugin-proposal-do-expressions`, `babel-traverse` + * [#16305](https://github.com/babel/babel/pull/16305) fix: avoid `popContext` on unvisited node paths ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object` + * [#16312](https://github.com/babel/babel/pull/16312) Fix class private properties when `privateFieldsAsSymbols` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-private-methods` + * [#16307](https://github.com/babel/babel/pull/16307) Fix the support of `arguments` in private `get/set` method ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators` + * [#16287](https://github.com/babel/babel/pull/16287) Reduce decorator static property size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16281](https://github.com/babel/babel/pull/16281) Fix evaluation order of decorators with cached receiver ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16279](https://github.com/babel/babel/pull/16279) Fix decorator this memoization ([@JLHwung](https://github.com/JLHwung)) + * [#16266](https://github.com/babel/babel/pull/16266) Preserve `static` on decorated private `accessor` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#16258](https://github.com/babel/babel/pull/16258) fix: handle decorated async private method and generator ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-typescript`, `babel-preset-env` + * [#16275](https://github.com/babel/babel/pull/16275) Fix class private properties when `privateFieldsAsProperties` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers` + * [#16268](https://github.com/babel/babel/pull/16268) Do not consider `arguments` in a helper as a global reference ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#16270](https://github.com/babel/babel/pull/16270) Handle symbol key class elements decoration ([@JLHwung](https://github.com/JLHwung)) + * [#16265](https://github.com/babel/babel/pull/16265) Do not define `access.get` for public setter decorators ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-preset-env` + * [#12428](https://github.com/babel/babel/pull/12428) Suggest using `BABEL_SHOW_CONFIG_FOR` for config problems ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-helper-transform-fixture-test-runner` + * [#16278](https://github.com/babel/babel/pull/16278) Continue writing `output.js` when `exec.js` throws ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :microscope: Output optimization +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16306](https://github.com/babel/babel/pull/16306) Avoid intermediate functions for private accessors with decs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties` + * [#16294](https://github.com/babel/babel/pull/16294) More aggressively inline decorators in the static block ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-transform-private-methods` + * [#16283](https://github.com/babel/babel/pull/16283) Do not use `classPrivateMethodGet` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators` + * [#16287](https://github.com/babel/babel/pull/16287) Reduce decorator static property size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties` + * [#16280](https://github.com/babel/babel/pull/16280) Reduce element decorator temp variables ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-class-features-plugin`, `babel-helper-fixtures`, `babel-helpers`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-optional-chaining-assign`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16261](https://github.com/babel/babel/pull/16261) Do not use descriptors for private class elements ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#16263](https://github.com/babel/babel/pull/16263) Reduce helper size for decorator 2023-11 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.23.10 (2024-01-31) + +#### :bug: Bug Fix +* Other + * [#16240](https://github.com/babel/babel/pull/16240) [eslint] Include field decorators in scope analysis ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16235](https://github.com/babel/babel/pull/16235) Fix `protoInit` call injection timing ([@JLHwung](https://github.com/JLHwung)) +## v7.23.9 (2024-01-25) + +#### :bug: Bug Fix +* `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-systemjs`, `babel-preset-env` + * [#16225](https://github.com/babel/babel/pull/16225) fix: `systemjs` re-traverses helpers ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16226](https://github.com/babel/babel/pull/16226) Improve decorated private method check ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-proposal-decorators`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-runtime`, `babel-preset-env` + * [#16224](https://github.com/babel/babel/pull/16224) Properly sort `core-js@3` imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-traverse` + * [#15383](https://github.com/babel/babel/pull/15383) fix: Don't throw in `getTypeAnnotation` when using TS+inference ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* Other + * [#16210](https://github.com/babel/babel/pull/16210) [eslint] Fix `no-use-before-define` for class ref in fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-core`, `babel-parser`, `babel-template` + * [#16222](https://github.com/babel/babel/pull/16222) Migrate `eslint-parser` to cts ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-types` + * [#16213](https://github.com/babel/babel/pull/16213) Remove `@babel/types` props that are not produced by the parser ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :running_woman: Performance +* `babel-parser` + * [#16072](https://github.com/babel/babel/pull/16072) perf: Improve parser performance for typescript ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :microscope: Output optimization +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-new-target`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-methods`, `babel-preset-env` + * [#16218](https://github.com/babel/babel/pull/16218) Improve temporary variables for decorators ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15959](https://github.com/babel/babel/pull/15959) Improve output of `using` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.23.8 (2024-01-08) + +#### :bug: Bug Fix +* `babel-preset-env` + * [#16181](https://github.com/babel/babel/pull/16181) fix: `preset-env` throws exception for `export * as x` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#16201](https://github.com/babel/babel/pull/16201) fix: decorator binds `getter/setter` to `ctx.access` for public fields ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#16199](https://github.com/babel/babel/pull/16199) fix: Class decorator correctly passes return value ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :leftwards_arrow_with_hook: Revert +* [#16202](https://github.com/babel/babel/pull/16202) Revert "chore: Update artifact tools (#16184)" ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-function-name`, `babel-plugin-transform-parameters`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-typescript`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16194](https://github.com/babel/babel/pull/16194) Improve output of `super()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.23.7 (2023-12-29) + +#### :bug: Bug Fix +* `babel-traverse` + * [#16191](https://github.com/babel/babel/pull/16191) fix: Crash when removing without `Program` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#16180](https://github.com/babel/babel/pull/16180) fix: Class decorator `ctx.kind` is wrong ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-proposal-decorators` + * [#16170](https://github.com/babel/babel/pull/16170) Fix decorator initProto usage in derived classes ([@JLHwung](https://github.com/JLHwung)) +* `babel-core` + * [#16167](https://github.com/babel/babel/pull/16167) Avoid unpreventable `unhandledRejection` events ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-helper-create-class-features-plugin` + * [#16186](https://github.com/babel/babel/pull/16186) chore: Update deps ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` + * [#16177](https://github.com/babel/babel/pull/16177) Merge decorators into class features ([@JLHwung](https://github.com/JLHwung)) +## v7.23.6 (2023-12-11) + +#### :eyeglasses: Spec Compliance +* `babel-generator`, `babel-parser`, `babel-types` + * [#16154](https://github.com/babel/babel/pull/16154) Remove `TSPropertySignature.initializer` ([@fisker](https://github.com/fisker)) +* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-types` + * [#16139](https://github.com/babel/babel/pull/16139) Apply `toPropertyKey` on decorator context name ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-generator` + * [#16166](https://github.com/babel/babel/pull/16166) fix: Correctly indenting when `retainLines` is enabled ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management` + * [#16150](https://github.com/babel/babel/pull/16150) `using`: Allow looking up `Symbol.dispose` on a function ([@odinho](https://github.com/odinho)) +* `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties` + * [#16161](https://github.com/babel/babel/pull/16161) Ensure the `[[@@toPrimitive]]` call of a decorated class member key is invoked once ([@JLHwung](https://github.com/JLHwung)) + * [#16148](https://github.com/babel/babel/pull/16148) Support named evaluation for decorated anonymous class exp ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-for-of`, `babel-preset-env` + * [#16011](https://github.com/babel/babel/pull/16011) fix: `for of` with `iterableIsArray` and shadowing variable ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16144](https://github.com/babel/babel/pull/16144) Set function name for decorated private non-field elements ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-typescript` + * [#16137](https://github.com/babel/babel/pull/16137) Fix references to enum values with merging ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :microscope: Output optimization +* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-class-properties` + * [#16159](https://github.com/babel/babel/pull/16159) Reuse computed key memoiser ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#16160](https://github.com/babel/babel/pull/16160) Optimize decorator helper size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.23.5 (2023-11-29) + +#### :eyeglasses: Spec Compliance +* `babel-plugin-proposal-decorators` + * [#16138](https://github.com/babel/babel/pull/16138) Class binding is in TDZ during decorators initialization ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#16132](https://github.com/babel/babel/pull/16132) Allow addInitializer in field decorator context ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-traverse`, `babel-types` + * [#16131](https://github.com/babel/babel/pull/16131) Do not remove bindings when removing assignment expression path ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-classes` + * [#16135](https://github.com/babel/babel/pull/16135) Require class properties transform when compiling class with private fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#16122](https://github.com/babel/babel/pull/16122) fix: Missing parentheses after line break ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers` + * [#16130](https://github.com/babel/babel/pull/16130) Fix helpers internal fns names conflict resolution ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-typescript` + * [#16123](https://github.com/babel/babel/pull/16123) Simplify class fields injetion after `super()` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-parameters`, `babel-plugin-transform-typescript`, `babel-traverse` + * [#16110](https://github.com/babel/babel/pull/16110) fix: Unexpected duplication of comments ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-eslint-plugin` + * [#16023](https://github.com/babel/babel/pull/16023) Add `@babel/eslint-plugin/no-undef` to fix `no-undef` with accessor props ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :microscope: Output optimization +* `babel-helpers` + * [#16129](https://github.com/babel/babel/pull/16129) Optimize `decorator` helper size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.23.4 (2023-11-20) + +#### :bug: Bug Fix +* `babel-generator` + * [#16104](https://github.com/babel/babel/pull/16104) fix: Pure comments missing parentheses ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.23.3 (2023-11-09) + +#### :bug: Bug Fix +* `babel-plugin-transform-typescript` + * [#16071](https://github.com/babel/babel/pull/16071) Strip type-only TS namespaces ([@colinaaa](https://github.com/colinaaa)) +* `babel-generator` + * [#16078](https://github.com/babel/babel/pull/16078) Fix indentation when generating comments with `concise: true` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-compat-data`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-preset-env` + * [#14295](https://github.com/babel/babel/pull/14295) Add a bugfix plugin for https://crbug.com/v8/12421 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-object-super` + * [#15948](https://github.com/babel/babel/pull/15948) fix: `super.x` in a loop ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` + * [#16015](https://github.com/babel/babel/pull/16015) fix: handle `__proto__` exports name in CJS/AMD/UMD ([@magic-akari](https://github.com/magic-akari)) + +#### :memo: Documentation +* [#16044](https://github.com/babel/babel/pull/16044) docs: Update links in @babel/eslint-parser README ([@aryehb](https://github.com/aryehb)) + +#### :house: Internal +* `babel-core`, `babel-preset-env` + * [#15988](https://github.com/babel/babel/pull/15988) Refactor handling of modules plugins in `preset-env` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :running_woman: Performance +* `babel-generator` + * [#16061](https://github.com/babel/babel/pull/16061) perf: Improve `@babel/generator` performance ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-traverse` + * [#16060](https://github.com/babel/babel/pull/16060) Avoid dynamic dispatch when calling wrapCheck ([@yepitschunked](https://github.com/yepitschunked)) + +#### :microscope: Output optimization +* `babel-plugin-transform-computed-properties` + * [#6652](https://github.com/babel/babel/pull/6652) Optimize computed properties output (byte-wise) ([@Andarist](https://github.com/Andarist)) +## v7.23.2 (2023-10-11) + +#### :bug: Bug Fix +* `babel-traverse` + * [#16033](https://github.com/babel/babel/pull/16033) Only evaluate own String/Number/Math methods ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-preset-typescript` + * [#16022](https://github.com/babel/babel/pull/16022) Rewrite `.tsx` extension when using `rewriteImportExtensions` ([@jimmydief](https://github.com/jimmydief)) +* `babel-helpers` + * [#16017](https://github.com/babel/babel/pull/16017) Fix: fallback to typeof when toString is applied to incompatible object ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-transform-modules-commonjs`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#16025](https://github.com/babel/babel/pull/16025) Avoid override mistake in namespace imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.23.0 (2023-09-25) + +#### :rocket: New Feature +* `babel-plugin-proposal-import-wasm-source`, `babel-plugin-syntax-import-source`, `babel-plugin-transform-dynamic-import` + * [#15870](https://github.com/babel/babel/pull/15870) Support transforming `import source` for wasm ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-module-transforms`, `babel-helpers`, `babel-plugin-proposal-import-defer`, `babel-plugin-syntax-import-defer`, `babel-plugin-transform-modules-commonjs`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` + * [#15878](https://github.com/babel/babel/pull/15878) Implement `import defer` proposal transform support ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-parser`, `babel-types` + * [#15845](https://github.com/babel/babel/pull/15845) Implement `import defer` parsing support ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#15829](https://github.com/babel/babel/pull/15829) Add parsing support for the "source phase imports" proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-helper-module-transforms`, `babel-parser`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-traverse`, `babel-types` + * [#15682](https://github.com/babel/babel/pull/15682) Add `createImportExpressions` parser option ([@JLHwung](https://github.com/JLHwung)) +* `babel-standalone` + * [#15671](https://github.com/babel/babel/pull/15671) Pass through nonce to the transformed script element ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-function-name`, `babel-helper-member-expression-to-functions`, `babel-helpers`, `babel-parser`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-optional-chaining-assign`, `babel-plugin-syntax-optional-chaining-assign`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-optional-chaining`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone`, `babel-types` + * [#15751](https://github.com/babel/babel/pull/15751) Add support for optional chain in assignments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#15895](https://github.com/babel/babel/pull/15895) Implement the "decorator metadata" proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-traverse`, `babel-types` + * [#15893](https://github.com/babel/babel/pull/15893) Add `t.buildUndefinedNode` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-preset-typescript` + * [#15913](https://github.com/babel/babel/pull/15913) Add `rewriteImportExtensions` option to TS preset ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#15896](https://github.com/babel/babel/pull/15896) Allow TS tuples to have both labeled and unlabeled elements ([@yukukotani](https://github.com/yukukotani)) + +#### :bug: Bug Fix +* `babel-plugin-transform-block-scoping` + * [#15962](https://github.com/babel/babel/pull/15962) fix: `transform-block-scoping` captures the variables of the method in the loop ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-traverse` + * [#15797](https://github.com/babel/babel/pull/15797) Expand evaluation of global built-ins in `@babel/traverse` ([@lorenzoferre](https://github.com/lorenzoferre)) +* `babel-plugin-proposal-explicit-resource-management` + * [#15985](https://github.com/babel/babel/pull/15985) Improve source maps for blocks with `using` declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :microscope: Output optimization +* `babel-core`, `babel-helper-module-transforms`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-classes`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-parameters`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-runtime`, `babel-plugin-transform-typescript`, `babel-preset-env` + * [#15984](https://github.com/babel/babel/pull/15984) Inline `exports.XXX =` update in simple variable declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.20 (2023-09-16) + +#### :house: Internal +* `babel-helper-validator-identifier` + * [#15973](https://github.com/babel/babel/pull/15973) Remove special-casing of U+200C and U+200D ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-dotall-regex` + * [#15974](https://github.com/babel/babel/pull/15974) Update Unicode test fixtures ([@JLHwung](https://github.com/JLHwung)) + +#### :leftwards_arrow_with_hook: Revert +* `babel-helper-remap-async-to-generator`, `babel-helper-wrap-function`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-function-sent`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime`, `babel-preset-env` + * [#15979](https://github.com/babel/babel/pull/15979) Revert "Improve output when wrapping functions" ([@jjonescz](https://github.com/jjonescz)) + +## v7.22.18 (2023-09-14) + +#### :bug: Bug Fix +* `babel-helper-validator-identifier` + * [#15957](https://github.com/babel/babel/pull/15957) Update identifier name definitions to Unicode 15.1 ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` + * [#15898](https://github.com/babel/babel/pull/15898) Fix transform of named import with shadowed namespace import ([@dhlolo](https://github.com/dhlolo)) + +#### :leftwards_arrow_with_hook: Revert +* [#15965](https://github.com/babel/babel/pull/15965) Revert Node.js 20.6.0 bug workaround ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.22.17 (2023-09-08) + +#### :bug: Bug Fix +* `babel-core` + * [#15947](https://github.com/babel/babel/pull/15947) Fix compatibility with Node.js 20.6 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` + * [#15941](https://github.com/babel/babel/pull/15941) Fix compiling duplicate ns imports to lazy CommonJS ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-types` + * [#15920](https://github.com/babel/babel/pull/15920) Make `ClassDeclaration["id"]` optional in babel-types ([@jordanbtucker](https://github.com/jordanbtucker)) + +#### :microscope: Output optimization +* `babel-helper-remap-async-to-generator`, `babel-helper-wrap-function`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-function-sent`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime`, `babel-preset-env` + * [#15922](https://github.com/babel/babel/pull/15922) Improve output when wrapping functions (e.g. `async` functions) ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.22.16 (2023-09-06) + +#### :bug: Bug Fix +* `babel-parser` + * [#15935](https://github.com/babel/babel/pull/15935) fix: `__esModule` is missing from published `@babel/parser` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-traverse` + * [#15936](https://github.com/babel/babel/pull/15936) Skip deprecation warning tests when in a folder named `@babel` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.15 (2023-09-04) + +#### :bug: Bug Fix +* `babel-core` + * [#15923](https://github.com/babel/babel/pull/15923) Only perform config loading re-entrancy check for cjs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-builder-binary-assignment-operator-visitor`, `babel-helper-compilation-targets`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-member-expression-to-functions`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-transform-fixture-test-runner`, `babel-helper-validator-identifier`, `babel-helper-validator-option`, `babel-helpers`, `babel-node`, `babel-parser`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-for-of`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-typescript`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`, `babel-register`, `babel-standalone`, `babel-template`, `babel-traverse`, `babel-types` + * [#15892](https://github.com/babel/babel/pull/15892) Add explicit `.ts`/`.js` extension to all imports in `src` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.14 (2023-08-30) + +#### :bug: Bug Fix +* `babel-preset-env` + * [#15907](https://github.com/babel/babel/pull/15907) Avoid dynamic require call in preset-env ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-parser` + * [#15884](https://github.com/babel/babel/pull/15884) Simplify parser errors creation ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-helper-compilation-targets`, `babel-helper-simple-access`, `babel-parser`, `babel-plugin-syntax-decorators`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`, `babel-traverse`, `babel-types` + * [#15902](https://github.com/babel/babel/pull/15902) extract more test helpers to repo-utils ([@JLHwung](https://github.com/JLHwung)) +## v7.22.13 (2023-08-28) + +#### :house: Internal +* `babel-helper-fixtures`, `babel-plugin-proposal-function-bind`, `babel-plugin-transform-modules-commonjs`, `babel-preset-env` + * [#15890](https://github.com/babel/babel/pull/15890) Improve helper-fixtures ([@JLHwung](https://github.com/JLHwung)) + +#### :leftwards_arrow_with_hook: Revert +* `babel-parser` + * [#15901](https://github.com/babel/babel/pull/15901) Revert "Do not record trailing comma pos when `maybeAsyncArrow: false`" ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.12 (2023-08-25) + +#### :bug: Bug Fix +* `babel-plugin-transform-optional-chaining` + * [#15888](https://github.com/babel/babel/pull/15888) Fix optional chain optimization in sequence expression ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.11 (2023-08-24) + +#### :bug: Bug Fix +* `babel-plugin-transform-typescript` + * [#15882](https://github.com/babel/babel/pull/15882) Fix: fully remove TS nested type-only exported namespaces ([@yangguansen](https://github.com/yangguansen)) +* `babel-types` + * [#15867](https://github.com/babel/babel/pull/15867) fix: definition of TS function type params ([@danez](https://github.com/danez)) +* `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-export-namespace-from`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-property-in-object` + * [#15858](https://github.com/babel/babel/pull/15858) fix(standalone): strip archived syntax plugins ([@JLHwung](https://github.com/JLHwung)) +* `babel-core` + * [#15850](https://github.com/babel/babel/pull/15850) Support configuring cache in ESM configs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-parser` + * [#10940](https://github.com/babel/babel/pull/10940) Do not record trailing comma pos when `maybeAsyncArrow: false` ([@JLHwung](https://github.com/JLHwung)) +* `babel-core`, `babel-helper-compilation-targets`, `babel-parser`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-syntax-decorators`, `babel-preset-env`, `babel-preset-react`, `babel-register`, `babel-traverse`, `babel-types` + * [#15872](https://github.com/babel/babel/pull/15872) enable jest/no-standalone-expect ([@JLHwung](https://github.com/JLHwung)) +* `babel-core`, `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15833](https://github.com/babel/babel/pull/15833) bump json5, terser and webpack, further minimize babel helpers ([@JLHwung](https://github.com/JLHwung)) +* Other + * [#15846](https://github.com/babel/babel/pull/15846) Use Babel 8.0 alpha to build babel ([@JLHwung](https://github.com/JLHwung)) + * [#15856](https://github.com/babel/babel/pull/15856) Exclude redundant files from publish process ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-optional-chaining`, `babel-preset-env` + * [#15871](https://github.com/babel/babel/pull/15871) Simplify `?.` output when chain result is ignored ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.10 (2023-08-07) + +#### :bug: Bug Fix +* `babel-plugin-transform-typescript` + * [#15799](https://github.com/babel/babel/pull/15799) [ts] Strip type-only namespaces ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#15798](https://github.com/babel/babel/pull/15798) [ts] Fix compiling extended exported nested namespace ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-new-target`, `babel-plugin-transform-private-methods`, `babel-preset-env` + * [#15701](https://github.com/babel/babel/pull/15701) Memoize class binding when compiling private methods and static elements ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-cli` + * [#15824](https://github.com/babel/babel/pull/15824) Add `meta` object to `@babel/eslint-plugin` ([@JLHwung](https://github.com/JLHwung)) +* `babel-traverse`, `babel-types` + * [#15661](https://github.com/babel/babel/pull/15661) Improve the type definition of `path.isX` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator`, `babel-types` + * [#15776](https://github.com/babel/babel/pull/15776) improve SourceLocation typing ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* Other + * [#15818](https://github.com/babel/babel/pull/15818) build: generate flow typings in prepublish job ([@JLHwung](https://github.com/JLHwung)) + * [#15777](https://github.com/babel/babel/pull/15777) chore: bump dev dependencies and remove .eslintignore ([@JLHwung](https://github.com/JLHwung)) +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-builder-react-jsx`, `babel-preset-env`, `babel-standalone` + * [#15794](https://github.com/babel/babel/pull/15794) Enable `@typescript-eslint/no-redundant-type-constituents` rule ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-compilation-targets` + * [#15811](https://github.com/babel/babel/pull/15811) Remove `@babel/core` peerDep from `helper-compilation-targets` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#15793](https://github.com/babel/babel/pull/15793) Use const enum in babel-parser ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-runtime`, `babel-traverse`, `babel-types` + * [#15716](https://github.com/babel/babel/pull/15716) chore: Use `typescript-eslint@v6` with reworked configs ([@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)) + +#### :microscope: Output optimization +* `babel-plugin-transform-block-scoping`, `babel-plugin-transform-parameters`, `babel-plugin-transform-regenerator` + * [#15746](https://github.com/babel/babel/pull/15746) Reduce `transform-block-scoping` loops output size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.22.9 (2023-07-12) + +#### :bug: Bug Fix +* `babel-plugin-transform-typescript` + * [#15774](https://github.com/babel/babel/pull/15774) fix: `Infinity` in enums ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-generator` + * [#15757](https://github.com/babel/babel/pull/15757) `recordAndTupleSyntaxType` defaults to `"hash"` ([@coderaiser](https://github.com/coderaiser)) + +#### :house: Internal +* [#15748](https://github.com/babel/babel/pull/15748) Migrate to `eslint.config.js` ([@JLHwung](https://github.com/JLHwung)) +* [#15758](https://github.com/babel/babel/pull/15758) Use Prettier 3 stable ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.8 (2023-07-06) + +#### :leftwards_arrow_with_hook: Revert +* `babel-core`, `babel-traverse` + * [#15754](https://github.com/babel/babel/pull/15754) Revert "Use `NodePath#hub` as part of the paths cache key" ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.7 (2023-07-06) + +#### :bug: Bug Fix +* `babel-generator` + * [#15719](https://github.com/babel/babel/pull/15719) fix: Avoid internally generating negative source maps columns ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core`, `babel-traverse` + * [#15725](https://github.com/babel/babel/pull/15725) Use `NodePath#hub` as part of the paths cache key ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* Other + * [#15747](https://github.com/babel/babel/pull/15747) fix: export `meta` from `eslint-parser/experimental-worker` ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* `babel-core`, `babel-traverse` + * [#15702](https://github.com/babel/babel/pull/15702) Refactor visitors merging ([@nullableVoidPtr](https://github.com/nullableVoidPtr)) +## v7.22.6 (2023-07-04) + +#### :bug: Bug Fix +* `babel-compat-data`, `babel-helper-compilation-targets`, `babel-preset-env` + * [#15727](https://github.com/babel/babel/pull/15727) Add opera mobile compat data ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-optional-chaining` + * [#15739](https://github.com/babel/babel/pull/15739) Fix transform of `delete a?.b` in function params ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-split-export-declaration`, `babel-plugin-transform-modules-commonjs` + * [#15736](https://github.com/babel/babel/pull/15736) fix: Default export for duplicate names ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-compat-data`, `babel-preset-env` + * [#15726](https://github.com/babel/babel/pull/15726) update compat-data sources ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs3`, `babel-runtime` + * [#15705](https://github.com/babel/babel/pull/15705) Fix handling of sync error in `@@asyncDispose` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-standalone` + * [#15707](https://github.com/babel/babel/pull/15707) fix: Support transforming Explicit Resource Management in `stage-2` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core` + * [#15626](https://github.com/babel/babel/pull/15626) fix: Works correctly with `--frozen-intrinsics` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-classes` + * [#15700](https://github.com/babel/babel/pull/15700) Minor class transform cleanups ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-typescript` + * [#15740](https://github.com/babel/babel/pull/15740) Compress output for optional chain with multiple `?.` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-property-in-object`, `babel-traverse` + * [#15741](https://github.com/babel/babel/pull/15741) Inject tmp vars in the params list of IIFEs when possible ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.5 (2023-06-08) + +#### :bug: Bug Fix +* `babel-preset-env`, `babel-standalone` + * [#15675](https://github.com/babel/babel/pull/15675) Fix using `syntax-unicode-sets-regex` in standalone ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-core` + * [#15683](https://github.com/babel/babel/pull/15683) Suggest `-transform-` when resolving missing plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.4 (2023-05-29) + +#### :bug: Bug Fix +* `babel-traverse` + * [#15649](https://github.com/babel/babel/pull/15649) Set `shorthand: false` when renaming an identifier inside an object property ([@coderaiser](https://github.com/coderaiser)) + +#### :house: Internal +* `babel-types` + * [#15666](https://github.com/babel/babel/pull/15666) Add missing `attributes`/`assertions` to `VISITOR_KEYS` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#15667](https://github.com/babel/babel/pull/15667) Mark `assert` attributes with `extra.deprecatedAssertSyntax` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.22.3 (2023-05-27) + +- Re-publish all the package published in 7.22.0 that hadn't been republished yet. We accidentally published them with a `package.json` file containing `"type": "script"` instead of `"type": "commonjs"` ([#15664](https://github.com/babel/babel/issues/15664)). + +## v7.22.2 (2023-05-26) + +#### :bug: Bug Fix +* `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2` + * [#15660](https://github.com/babel/babel/pull/15660) Fix importing symbol polyfill in `@babel/runtime-corejs2` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.1 (2023-05-26) + +#### :bug: Bug Fix +* `babel-preset-env` + * [#15658](https://github.com/babel/babel/pull/15658) Workaround for broken babel-preset-react-app ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.22.0 (2023-05-26) + +#### :rocket: New Feature +* `babel-parser`, `babel-plugin-transform-typescript` + * [#15497](https://github.com/babel/babel/pull/15497) [ts] Support `import ... =` and `export =` in scripts ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-compat-data`, `babel-core`, `babel-plugin-proposal-unicode-sets-regex`, `babel-plugin-transform-unicode-sets-regex`, `babel-preset-env`, `babel-standalone` + * [#15636](https://github.com/babel/babel/pull/15636) Add `unicode-sets-regex` transform to `preset-env` ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-transform-runtime`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` + * [#15633](https://github.com/babel/babel/pull/15633) Implement transform support for `using` declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-import-attributes-to-assertions` + * [#15620](https://github.com/babel/babel/pull/15620) Create `@babel/plugin-proposal-import-attributes-to-assertions` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-generator`, `babel-parser`, `babel-plugin-syntax-import-attributes`, `babel-preset-env`, `babel-standalone`, `babel-types` + * [#15536](https://github.com/babel/babel/pull/15536) Add support for the updated import attributes proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-parser`, `babel-traverse`, `babel-types` + * [#15520](https://github.com/babel/babel/pull/15520) Parse `await using` declarations ([@JLHwung](https://github.com/JLHwung)) +* `babel-core`, `babel-helper-create-regexp-features-plugin`, `babel-parser` + * [#15638](https://github.com/babel/babel/pull/15638) Enable regexp unicode sets parsing by default ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15570](https://github.com/babel/babel/pull/15570) Add decorators version `2023-05` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-jsx`, `babel-traverse`, `babel-types` + * [#15549](https://github.com/babel/babel/pull/15549) Improve type definitions for validators ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-parser` + * [#15630](https://github.com/babel/babel/pull/15630) Unify parsing of import/export modifiers (type/typeof/module) ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-compat-data`, `babel-helper-transform-fixture-test-runner`, `babel-node`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3` + * [#15531](https://github.com/babel/babel/pull/15531) Allow polyfill providers to specify custom `@babel/runtime` pkg ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-dynamic-import`, `babel-plugin-proposal-export-namespace-from`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-logical-assignment-operators`, `babel-plugin-proposal-nullish-coalescing-operator`, `babel-plugin-proposal-numeric-separator`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-catch-binding`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-unicode-property-regex`, `babel-preset-env`, `babel-standalone` + * [#15614](https://github.com/babel/babel/pull/15614) Rename `-proposal-`s that became standard to `-transform-` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.21.9 (2023-05-22) + +#### :bug: Bug Fix +* `babel-parser` + * [#15631](https://github.com/babel/babel/pull/15631) rescan gt token at the end of type args parsing ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator` + * [#15569](https://github.com/babel/babel/pull/15569) Fix indentation when `retainLines` is `true` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-template` + * [#15534](https://github.com/babel/babel/pull/15534) fix: Template `export { x }` stuck in infinite loop ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-compat-data`, `babel-preset-env` + * [#15606](https://github.com/babel/babel/pull/15606) fix: enable transform-block-scoping with generators feature (#12806) ([@IlyaSemenov](https://github.com/IlyaSemenov)) +## v7.21.8 (2023-05-02) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#15602](https://github.com/babel/babel/pull/15602) Remove `using await` restriction in explicitResourceManagement ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin` + * [#15605](https://github.com/babel/babel/pull/15605) Fix backward compat for semver checks in class®exp feat plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.21.6 (2023-04-29) + +#### :bug: Bug Fix +* `babel-compat-data` + * [#15598](https://github.com/babel/babel/pull/15598) fix: Not found `corejs3-shipped-proposals.json` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.21.5 (2023-04-28) + +#### :eyeglasses: Spec Compliance +* `babel-generator`, `babel-parser`, `babel-types` + * [#15539](https://github.com/babel/babel/pull/15539) fix: Remove `mixins` and `implements` for `DeclareInterface` and `InterfaceDeclaration` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :bug: Bug Fix +* `babel-core`, `babel-generator`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-react-jsx` + * [#15515](https://github.com/babel/babel/pull/15515) fix: `)` position with `createParenthesizedExpressions` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-preset-env` + * [#15580](https://github.com/babel/babel/pull/15580) Add syntax import meta to preset env ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-types` + * [#15546](https://github.com/babel/babel/pull/15546) Improve the layout of generated validators ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core` + * [#15535](https://github.com/babel/babel/pull/15535) Use `lt` instead of `lte` to check TS version for .cts config ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-core` + * [#15575](https://github.com/babel/babel/pull/15575) Use synchronous `import.meta.resolve` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-fixtures`, `babel-preset-typescript` + * [#15568](https://github.com/babel/babel/pull/15568) Handle `.overrides` and `.env` when resolving plugins/presets from fixture options ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin` + * [#15548](https://github.com/babel/babel/pull/15548) Use `semver` package to compare versions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.21.4 (2023-03-31) + +#### :bug: Bug Fix +* `babel-core`, `babel-helper-module-imports`, `babel-preset-typescript` + * [#15478](https://github.com/babel/babel/pull/15478) Fix support for `import/export` in `.cts` files ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator` + * [#15496](https://github.com/babel/babel/pull/15496) Fix compact printing of non-null assertion operators ([@rtsao](https://github.com/rtsao)) + +#### :nail_care: Polish +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-typescript`, `babel-traverse` + * [#15427](https://github.com/babel/babel/pull/15427) Fix moving comments of removed nodes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* Other + * [#15519](https://github.com/babel/babel/pull/15519) Update Prettier integration test ([@fisker](https://github.com/fisker)) +* `babel-parser` + * [#15510](https://github.com/babel/babel/pull/15510) refactor: introduce `lookaheadInLineCharCode` ([@JLHwung](https://github.com/JLHwung)) +* `babel-code-frame`, `babel-highlight` + * [#15499](https://github.com/babel/babel/pull/15499) Polish babel-code-frame highlight test ([@JLHwung](https://github.com/JLHwung)) +## v7.21.3 (2023-03-14) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#15479](https://github.com/babel/babel/pull/15479) disallow mixins/implements in flow interface ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-parser` + * [#15423](https://github.com/babel/babel/pull/15423) [ts] Allow keywords in tuple labels ([@Harpica](https://github.com/Harpica)) +* `babel-plugin-transform-typescript` + * [#15489](https://github.com/babel/babel/pull/15489) Register `var` decls generated by `import ... =` TS transform ([@amoeller](https://github.com/amoeller)) + * [#15494](https://github.com/babel/babel/pull/15494) fix: Consider `export { type foo }` as type-only usage ([@magic-akari](https://github.com/magic-akari)) + +#### :nail_care: Polish +* `babel-traverse`, `babel-types` + * [#15484](https://github.com/babel/babel/pull/15484) Skip node deprecation warnings when used by an old `@babel` package ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#15480](https://github.com/babel/babel/pull/15480) chore: Improve `jsonCompatibleStrings` deprecation ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* [#15465](https://github.com/babel/babel/pull/15465) Add ESLint-readable package name ([@nzakas](https://github.com/nzakas)) + +#### :microscope: Output optimization +* `babel-plugin-transform-typescript`, `babel-preset-typescript` + * [#15467](https://github.com/babel/babel/pull/15467) Optimize TS enums output ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.21.2 (2023-02-23) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#15439](https://github.com/babel/babel/pull/15439) fix: Throws on `new foo?.bar!()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-traverse`, `babel-types` + * [#15448](https://github.com/babel/babel/pull/15448) Reduce warnings for deprecated node aliases ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-types` + * [#15451](https://github.com/babel/babel/pull/15451) Update babel-types docs generator ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` + * [#15449](https://github.com/babel/babel/pull/15449) Avoid unnecessary code for unused lazy imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.21.1 (2023-02-20) + +#### :bug: Bug Fix +* `babel-core`, `babel-parser` + * [#15440](https://github.com/babel/babel/pull/15440) Fix problems found while publishing 7.21.0 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#15445](https://github.com/babel/babel/pull/15445) fix: Handling source maps without `sourcesContent` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* [#15443](https://github.com/babel/babel/pull/15443) Use native GitHub markdown `Note` admonition ([@yardenshoham](https://github.com/yardenshoham)) +## v7.21.0 (2023-02-20) + +#### :rocket: New Feature +* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object` + * [#15435](https://github.com/babel/babel/pull/15435) feat: Implement `privateFieldsAsSymbols` assumption for classes ([@fwienber](https://github.com/fwienber)) +* `babel-helper-create-regexp-features-plugin`, `babel-plugin-proposal-regexp-modifiers`, `babel-standalone` + * [#15226](https://github.com/babel/babel/pull/15226) feat: Support regexp modifiers proposal ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-cli`, `babel-core`, `babel-generator`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-react-jsx`, `babel-traverse` + * [#15022](https://github.com/babel/babel/pull/15022) feat: Generate sourcemaps of friendly call frames ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser`, `babel-types` + * [#15384](https://github.com/babel/babel/pull/15384) [ts] Support `const` modifier in type parameters ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-helpers`, `babel-parser`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15405](https://github.com/babel/babel/pull/15405) Implement decorators as presented at `2023-01` TC39 meeting ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#15114](https://github.com/babel/babel/pull/15114) Parser option to allow `new.target` outside functions ([@overlookmotel](https://github.com/overlookmotel)) + * [#15320](https://github.com/babel/babel/pull/15320) Add `annexb: false` parser option to disable Annex B ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core` + * [#15283](https://github.com/babel/babel/pull/15283) feat: Support `.cts` as configuration file ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript` + * [#15381](https://github.com/babel/babel/pull/15381) [ts] Support `export type * from` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix +* `babel-plugin-transform-typescript` + * [#15379](https://github.com/babel/babel/pull/15379) [ts5.0] Better inlining of constants in enums ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core` + * [#15366](https://github.com/babel/babel/pull/15366) handling circular/shared structures in deep-clone ([@azizghuloum](https://github.com/azizghuloum)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-private-methods`, `babel-plugin-transform-classes`, `babel-plugin-transform-new-target` + * [#15406](https://github.com/babel/babel/pull/15406) Preserve class elements comments in class transform ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-types` + * [#15414](https://github.com/babel/babel/pull/15414) [ts] Fix restrictions for optional parameters ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-parser` + * [#15400](https://github.com/babel/babel/pull/15400) polish: improve "`await` as identifier" error in modules ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* `babel-core` + * [#15137](https://github.com/babel/babel/pull/15137) Improve CJS compat with ESM-based `@babel/core` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :microscope: Output optimization +* `babel-plugin-transform-typescript` + * [#15418](https://github.com/babel/babel/pull/15418) [ts] Handle exponentiation operator in constant folding ([@ehoogeveen-medweb](https://github.com/ehoogeveen-medweb)) + +## v7.20.15 (2023-02-02) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#15391](https://github.com/babel/babel/pull/15391) Disallow await as bound name in using declaration ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-parser`, `babel-plugin-proposal-export-namespace-from` + * [#15385](https://github.com/babel/babel/pull/15385) Disallows specifiers after export * as ns ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-plugin-transform-block-scoping` + * [#15398](https://github.com/babel/babel/pull/15398) fix: Loop was converted wrong ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#15377](https://github.com/babel/babel/pull/15377) fix: `new (foo?.bar)()` incorrectly throws exception `OptionalChainingNoNew` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.20.14 (2023-01-27) + +#### :bug: Bug Fix +* `babel-plugin-transform-block-scoping` + * [#15361](https://github.com/babel/babel/pull/15361) fix: Identifiers in the loop are not renamed ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-react-jsx`, `babel-traverse` + * [#15365](https://github.com/babel/babel/pull/15365) fix: Properly generate source maps for manually added multi-line content ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.20.13 (2023-01-21) + +#### :bug: Bug Fix +* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15332](https://github.com/babel/babel/pull/15332) Ensure class decorators can access decorated non-static members ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-typescript` + * [#15349](https://github.com/babel/babel/pull/15349) fix: Preserve `import {type T} from 'x'` when `onlyRemoveTypeImports:true` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#15344](https://github.com/babel/babel/pull/15344) fix: Properties that are `abstract` should not be initialized. ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#15338](https://github.com/babel/babel/pull/15338) Allow negative number in ambient const initializer ([@JLHwung](https://github.com/JLHwung)) + +#### :leftwards_arrow_with_hook: Revert +* `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx` + * [#15355](https://github.com/babel/babel/pull/15355) Reverts "Re-use common JSX element transform for <>..." ([@JLHwung](https://github.com/JLHwung)) +## v7.20.12 (2023-01-04) + +#### :bug: Bug Fix +* `babel-traverse` + * [#15224](https://github.com/babel/babel/pull/15224) Fix `TaggedTemplateLiteral` evaluation ([@nmn](https://github.com/nmn)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties` + * [#15312](https://github.com/babel/babel/pull/15312) fix: `delete this` in static class properties initialization ([@SuperSodaSea](https://github.com/SuperSodaSea)) + +#### :nail_care: Polish +* `babel-traverse` + * [#15313](https://github.com/babel/babel/pull/15313) Implement support for evaluating computed properties. ([@JBYoshi](https://github.com/JBYoshi)) +## v7.20.11 (2022-12-23) + +#### :eyeglasses: Spec Compliance +* `babel-helper-module-transforms`, `babel-plugin-proposal-dynamic-import`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs` + * [#15290](https://github.com/babel/babel/pull/15290) Return rejected promise when stringify import specifier throws ([@SuperSodaSea](https://github.com/SuperSodaSea)) + +#### :bug: Bug Fix +* `babel-plugin-transform-block-scoping` + * [#15309](https://github.com/babel/babel/pull/15309) Fix for binding shadowing outer var with loop closure ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.20.10 (2022-12-23) + +#### :bug: Bug Fix +* `babel-traverse` + * [#15305](https://github.com/babel/babel/pull/15305) fix: `guessExecutionStatusRelativeTo` exception ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.20.9 (2022-12-23) + +#### :bug: Bug Fix +* `babel-plugin-transform-block-scoping` + * [#15303](https://github.com/babel/babel/pull/15303) fix: Do not throw exceptions when scope information is corrupted ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.20.8 (2022-12-22) + +#### :bug: Bug Fix +* `babel-plugin-transform-block-scoping` + * [#15301](https://github.com/babel/babel/pull/15301) fix: `transform-block-scoping` accesses properties of `null` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-proposal-class-properties`, `babel-traverse` + * [#15294](https://github.com/babel/babel/pull/15294) Properly transpile exported classes that shadowed builtins ([@JLHwung](https://github.com/JLHwung)) +## v7.20.7 (2022-12-22) + +#### :eyeglasses: Spec Compliance +* `babel-helper-member-expression-to-functions`, `babel-helper-replace-supers`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes` + * [#15223](https://github.com/babel/babel/pull/15223) fix: Deleting super property should throw ([@SuperSodaSea](https://github.com/SuperSodaSea)) +* `babel-helpers`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-object-super` + * [#15241](https://github.com/babel/babel/pull/15241) fix: Throw correct error types from sed ant class TDZ helpers ([@SuperSodaSea](https://github.com/SuperSodaSea)) + +#### :bug: Bug Fix +* `babel-parser`, `babel-plugin-transform-typescript` + * [#15209](https://github.com/babel/babel/pull/15209) fix: Support auto accessors with TypeScript annotations ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-traverse` + * [#15287](https://github.com/babel/babel/pull/15287) Fix `.parentPath` after rename in `SwitchCase` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-typescript`, `babel-traverse` + * [#15284](https://github.com/babel/babel/pull/15284) fix: Ts import type and func with duplicate name ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-block-scoping` + * [#15278](https://github.com/babel/babel/pull/15278) Fix tdz analysis for reassigned captured for bindings ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-async-generator-functions`, `babel-preset-env` + * [#15235](https://github.com/babel/babel/pull/15235) fix: Transform `for await` with shadowed variables ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator`, `babel-plugin-proposal-optional-chaining` + * [#15258](https://github.com/babel/babel/pull/15258) fix: Correctly generate `(a ?? b) as T` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-react-jsx`, `babel-types` + * [#15233](https://github.com/babel/babel/pull/15233) fix: Emit correct sourcemap ranges for `JSXText` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core`, `babel-helpers`, `babel-plugin-transform-computed-properties`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15232](https://github.com/babel/babel/pull/15232) fix: Computed properties should keep original definition order ([@SuperSodaSea](https://github.com/SuperSodaSea)) +* `babel-helper-member-expression-to-functions`, `babel-helper-replace-supers`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes` + * [#15223](https://github.com/babel/babel/pull/15223) fix: Deleting super property should throw ([@SuperSodaSea](https://github.com/SuperSodaSea)) +* `babel-generator` + * [#15216](https://github.com/babel/babel/pull/15216) fix: Print newlines for leading Comments of `TSEnumMember` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-plugin-transform-block-scoping`, `babel-traverse` + * [#15275](https://github.com/babel/babel/pull/15275) Improve relative execution tracking in fn exprs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-helper-define-map`, `babel-plugin-transform-property-mutators` + * [#15274](https://github.com/babel/babel/pull/15274) Inline & simplify `@babel/helper-define-map` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-parameters`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-traverse` + * [#15200](https://github.com/babel/babel/pull/15200) Rewrite `transform-block-scoping` plugin ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :running_woman: Performance +* `babel-helper-compilation-targets` + * [#15228](https://github.com/babel/babel/pull/15228) perf: Speed up `getTargets` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.20.6 (2022-11-28) + +#### :bug: Bug Fix +* `babel-helpers` + * [#15231](https://github.com/babel/babel/pull/15231) Update `checkInRHS` helper min version ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.20.5 (2022-11-28) + +#### :eyeglasses: Spec Compliance +* `babel-helpers`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-modules-commonjs`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-traverse` + * [#15183](https://github.com/babel/babel/pull/15183) Improve array destructuring spec compliance ([@SuperSodaSea](https://github.com/SuperSodaSea)) +* `babel-cli`, `babel-helpers`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-transform-classes`, `babel-plugin-transform-runtime`, `babel-preset-env` + * [#15182](https://github.com/babel/babel/pull/15182) fix: apply toPropertyKey when defining class members ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-private-property-in-object`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15133](https://github.com/babel/babel/pull/15133) fix: validate rhs of `in` when transpiling `#p in C` ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-parser` + * [#15225](https://github.com/babel/babel/pull/15225) Parse `using[foo]` as computed member expression ([@JLHwung](https://github.com/JLHwung)) + * [#15207](https://github.com/babel/babel/pull/15207) Export `ParseResult` type ([@davydof](https://github.com/davydof)) + * [#15198](https://github.com/babel/babel/pull/15198) fix: parse `import module, ...` ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-wrap-function`, `babel-preset-env`, `babel-traverse` + * [#15181](https://github.com/babel/babel/pull/15181) fix: Edge cases for async functions and `noNewArrow` assumption ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-parameters`, `babel-traverse` + * [#15163](https://github.com/babel/babel/pull/15163) fix: Throw error when compiling `super()` in arrow functions with default / rest parameters ([@SuperSodaSea](https://github.com/SuperSodaSea)) +* `babel-helpers`, `babel-node`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15194](https://github.com/babel/babel/pull/15194) fix: Bump `regenerator` and add tests ([@SuperSodaSea](https://github.com/SuperSodaSea)) +* `babel-helper-create-regexp-features-plugin` + * [#15192](https://github.com/babel/babel/pull/15192) fix: Update `regjsparser` for `@babel/standalone` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser`, `babel-types` + * [#15109](https://github.com/babel/babel/pull/15109) fix: Babel 8 types ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator` + * [#15143](https://github.com/babel/babel/pull/15143) Don't print inner comments as leading when wrapping in `(``)` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-block-scoping`, `babel-traverse` + * [#15167](https://github.com/babel/babel/pull/15167) Register `switch`'s `discriminant` in the outer scope ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-generator` + * [#15173](https://github.com/babel/babel/pull/15173) Improve generator behavior when `comments:false` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-block-scoping` + * [#15164](https://github.com/babel/babel/pull/15164) Only extract IDs for TDZ checks in assign when necessary ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-core`, `babel-parser` + * [#15202](https://github.com/babel/babel/pull/15202) Bump typescript to 4.9.3 ([@JLHwung](https://github.com/JLHwung)) +## v7.20.4 (2022-11-08) + +#### :bug: Bug Fix +* `babel-generator` + * [#15160](https://github.com/babel/babel/pull/15160) Fix printing of comments before `=>` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-plugin-transform-typescript` + * [#15144](https://github.com/babel/babel/pull/15144) Fallback to printing inner comments as trailing ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.20.3 (2022-11-07) + +#### :bug: Bug Fix +* `babel-generator` + * [#15135](https://github.com/babel/babel/pull/15135) Don't convert line comments containing `*/` to block comments ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-parameters` + * [#15146](https://github.com/babel/babel/pull/15146) Fix compilation of parameters in async generators ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#15134](https://github.com/babel/babel/pull/15134) fix: support await as for-of-lhs ([@JLHwung](https://github.com/JLHwung)) +## v7.20.2 (2022-11-04) + +#### :bug: Bug Fix +* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-helper-simple-access`, `babel-node`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-react-constant-elements`, `babel-preset-env`, `babel-standalone`, `babel-types` + * [#15124](https://github.com/babel/babel/pull/15124) fix: `@babel/node` repl and enable `no-use-before-define` rule ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-typescript` + * [#15121](https://github.com/babel/babel/pull/15121) fix: `tsSatisfiesExpression` check with different duplicated `@babel/types` versions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#15094](https://github.com/babel/babel/pull/15094) fix: `parser` typings for plugins ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator` + * [#15118](https://github.com/babel/babel/pull/15118) Improve printing of [no LineTerminator here] with comments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-decorators`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-transform-jscript` + * [#15113](https://github.com/babel/babel/pull/15113) fix: wrap anonymous class expression within statement ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-destructuring` + * [#15104](https://github.com/babel/babel/pull/15104) fix: Destructuring exceptions `for ( let { } = 0 ; 0 ; ) ` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.20.1 (2022-11-01) + +#### :bug: Bug Fix +* `babel-plugin-proposal-async-generator-functions` + * [#15103](https://github.com/babel/babel/pull/15103) fix: Compile re-declare var in `init` and `body` of `for await` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-proposal-class-properties`, `babel-traverse` + * [#15106](https://github.com/babel/babel/pull/15106) Do not mark `in` and `instanceof` as constant expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-named-capturing-groups-regex` + * [#15092](https://github.com/babel/babel/pull/15092) Support `indices.groups` when compiling named groups in regexps ([@ptomato](https://github.com/ptomato)) +* `babel-parser` + * [#15102](https://github.com/babel/babel/pull/15102) fix: Parse re-declare var in class static body ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#15096](https://github.com/babel/babel/pull/15096) fix: `a satisfies b` as lval ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helpers`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex` + * [#15090](https://github.com/babel/babel/pull/15090) Handle multiple named groups in wrapRegExp replace() ([@ptomato](https://github.com/ptomato)) +* `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-parameters`, `babel-preset-env` + * [#15081](https://github.com/babel/babel/pull/15081) Move the generator body to a gen IIFE when compiling its params ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-generator` + * [#15080](https://github.com/babel/babel/pull/15080) Automatically print inner comments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.20.0 (2022-10-27) + +#### :rocket: New Feature +* `babel-compat-data`, `babel-helper-compilation-targets`, `babel-preset-env` + * [#14944](https://github.com/babel/babel/pull/14944) Add `deno` compilation target ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-syntax-typescript` + * [#14923](https://github.com/babel/babel/pull/14923) Expose `dts` option in `@babel/plugin-syntax-typescript` ([@oceandrama](https://github.com/oceandrama)) +* `babel-generator`, `babel-parser`, `babel-plugin-syntax-explicit-resource-management`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-destructuring`, `babel-standalone`, `babel-traverse`, `babel-types` + * [#14968](https://github.com/babel/babel/pull/14968) Parse `using` declaration (explicit resource management) ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-parser`, `babel-plugin-syntax-import-reflection`, `babel-standalone`, `babel-types` + * [#14926](https://github.com/babel/babel/pull/14926) Parse import reflection ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-helper-skip-transparent-expression-wrappers`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types` + * [#14211](https://github.com/babel/babel/pull/14211) [ts] Add support for `expr satisfies Type` expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix +* `babel-generator`, `babel-parser` + * [#15032](https://github.com/babel/babel/pull/15032) Fix handling of comments with decorators before `export` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#15008](https://github.com/babel/babel/pull/15008) Support more inner comments ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* `babel-helpers`, `babel-node`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#15078](https://github.com/babel/babel/pull/15078) Update `regenerator-runtime` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.19.6 (2022-10-20) + +#### :eyeglasses: Spec Compliance +* `babel-plugin-proposal-decorators` + * [#15059](https://github.com/babel/babel/pull/15059) Ensure non-static decorators are applied when a class is instantiated. ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-parser` + * [#15062](https://github.com/babel/babel/pull/15062) Fix parsing of block comments nested in flow comments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#15052](https://github.com/babel/babel/pull/15052) fix: improve module block program location tracking ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-runtime`, `babel-runtime-corejs2`, `babel-runtime-corejs3` + * [#15060](https://github.com/babel/babel/pull/15060) Ensure `@babel/runtime-corejs3/core-js/*.js` can be imported on Node.js 17+ ([@JLHwung](https://github.com/JLHwung)) +* `babel-preset-env`, `babel-traverse` + * [#15043](https://github.com/babel/babel/pull/15043) fix: preserve this for `super.*` template tags ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-generator`, `babel-plugin-transform-flow-comments` + * [#15037](https://github.com/babel/babel/pull/15037) Improve generation of comments without location ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :memo: Documentation +* `babel-standalone` + * [#15055](https://github.com/babel/babel/pull/15055) Fix missing `transformSync` function name ([@lomirus](https://github.com/lomirus)) + +#### :house: Internal +* `babel-parser` + * [#15056](https://github.com/babel/babel/pull/15056) Use `startLoc.index` instead of carrying around `start` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* Other + * [#15035](https://github.com/babel/babel/pull/15035) chore: Update yarn 3.2.4 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :running_woman: Performance +* `babel-core`, `babel-standalone` + * [#15023](https://github.com/babel/babel/pull/15023) Don't bundle unnecessary plugins in `@babel/standalone` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.19.5 (2022-10-10) + +#### :bug: Bug Fix +* `babel-generator` + * [#15031](https://github.com/babel/babel/pull/15031) Fix "Cannot read properties of undefined" regression ([@farewell-zy](https://github.com/farewell-zy)) +## v7.19.4 (2022-10-10) + +#### :eyeglasses: Spec Compliance +* `babel-plugin-transform-block-scoping` + * [#15019](https://github.com/babel/babel/pull/15019) fix: check constant violation inside loops ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-transform-destructuring` + * [#14985](https://github.com/babel/babel/pull/14985) Disallow rest object destructuring of null/undefined ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix +* `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-typescript`, `babel-types` + * [#14109](https://github.com/babel/babel/pull/14109) Fix: properly scope variables in TSModuleBlock ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-plugin-transform-destructuring`, `babel-plugin-transform-react-constant-elements`, `babel-traverse` + * [#15027](https://github.com/babel/babel/pull/15027) fix: mark `var` declarations in loops as not constant ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-string-parser`, `babel-parser`, `babel-types` + * [#14964](https://github.com/babel/babel/pull/14964) Never throw for invalid escapes in tagged templates ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-parser` + * [#14980](https://github.com/babel/babel/pull/14980) Improve module expression parsing/printing ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-destructuring` + * [#14984](https://github.com/babel/babel/pull/14984) Fix holes handling in optimized array destructuring ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-create-class-features-plugin`, `babel-helper-fixtures`, `babel-helper-simple-access`, `babel-helper-transform-fixture-test-runner`, `babel-helpers`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-proposal-dynamic-import`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-logical-assignment-operators`, `babel-plugin-proposal-nullish-coalescing-operator`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-jscript`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-new-target`, `babel-plugin-transform-object-super`, `babel-plugin-transform-parameters`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-plugin-transform-shorthand-properties`, `babel-plugin-transform-spread`, `babel-plugin-transform-strict-mode`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-preset-env`, `babel-preset-react`, `babel-preset-typescript`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-traverse` + * [#14979](https://github.com/babel/babel/pull/14979) Improve comments generation ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-fixtures`, `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-modules-commonjs`, `babel-traverse` + * [#14967](https://github.com/babel/babel/pull/14967) Improve source map generation ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* Other + * [#15001](https://github.com/babel/babel/pull/15001) Run test262 again ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-compat-data`, `babel-preset-env` + * [#14976](https://github.com/babel/babel/pull/14976) Internally rename `proposal-*` to `transform-*` in preset-env ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.19.3 (2022-09-27) + +#### :bug: Bug Fix +* `babel-plugin-proposal-decorators` + * [#8566](https://github.com/babel/babel/pull/8566) Correctly update bindings of decorated class declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#14974](https://github.com/babel/babel/pull/14974) fix: Normal parsing of `JSXText` following `JSXSpreadChild` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#14941](https://github.com/babel/babel/pull/14941) fix: Support local exports in TS `declare module`s ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#14940](https://github.com/babel/babel/pull/14940) fix: allow ts redeclaration with `import =` and `var` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator` + * [#14962](https://github.com/babel/babel/pull/14962) Fix printing of Flow internal slot functions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-cli` + * [#14950](https://github.com/babel/babel/pull/14950) Emit `@babel/cli` source maps based on configuration files ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-typescript` + * [#14946](https://github.com/babel/babel/pull/14946) fix: ts exported vars are shadowed by `declare` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-core` + * [#14954](https://github.com/babel/babel/pull/14954) Optional filename when preset uses fn test/include/exclude ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-helper-compilation-targets`, `babel-helper-transform-fixture-test-runner`, `babel-parser`, `babel-preset-env`, `babel-traverse` + * [#14961](https://github.com/babel/babel/pull/14961) chore: use `c8` for coverage testing ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :microscope: Output optimization +* `babel-plugin-transform-typescript` + * [#14952](https://github.com/babel/babel/pull/14952) [ts] remove nested `declare namespace` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.19.2 (2022-09-15) + +#### :bug: Bug Fix +* `babel-runtime-corejs2` + * [#14937](https://github.com/babel/babel/pull/14937) fix: runtime-corejs 2 should depend on core-js@2 ([@JLHwung](https://github.com/JLHwung)) +## v7.19.1 (2022-09-14) + +#### :bug: Bug Fix +* `babel-core` + * [#14930](https://github.com/babel/babel/pull/14930) Avoid fancy stack traces size computation ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-traverse` + * [#14932](https://github.com/babel/babel/pull/14932) fix: isForAwaitStatement is broken ([@JLHwung](https://github.com/JLHwung)) +* Other + * [#14872](https://github.com/babel/babel/pull/14872) Use the built-in class fields and private methods rules in ESLint 8 ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser` + * [#14920](https://github.com/babel/babel/pull/14920) [estree] attach comments after directives at the end of file ([@hegemonic](https://github.com/hegemonic)) + * [#14900](https://github.com/babel/babel/pull/14900) [ts] allow redeclaring a var/type with the same name as import ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-typescript` + * [#14913](https://github.com/babel/babel/pull/14913) fix: do not remove type import used in TS import= ([@JLHwung](https://github.com/JLHwung)) +## v7.19.0 (2022-09-05) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#14666](https://github.com/babel/babel/pull/14666) Support private name in decorator member expression ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#14877](https://github.com/babel/babel/pull/14877) Remove one promise tick in yield* (tc39/ecma262#2819) ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :rocket: New Feature +* `babel-generator`, `babel-helpers`, `babel-parser`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#14836](https://github.com/babel/babel/pull/14836) Add 2022-03 decorators version (stage 3) ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#14695](https://github.com/babel/babel/pull/14695) [parser] Make `decoratorsBeforeExport` default to `false` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-parser` + * [#14744](https://github.com/babel/babel/pull/14744) Default to hash syntax for Record&Tuple ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-standalone` + * [#14867](https://github.com/babel/babel/pull/14867) feat: add proposal-record-and-tuple to standalone ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-regexp-features-plugin`, `babel-helpers`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-standalone` + * [#14805](https://github.com/babel/babel/pull/14805) Add support for the duplicate named capturing groups proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix +* `babel-helper-function-name`, `babel-helper-wrap-function`, `babel-plugin-transform-classes` + * [#14897](https://github.com/babel/babel/pull/14897) Fix: class transform should not drop method definition when key contains non-BMP characters ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-typescript` + * [#14890](https://github.com/babel/babel/pull/14890) fix: TS plugin shouldn't remove `#privateField!` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#14819](https://github.com/babel/babel/pull/14819) fix: parse a<b>>>c as a<(b>>>c) ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-builder-react-jsx` + * [#14886](https://github.com/babel/babel/pull/14886) Fix helper-builder-react-jsx compat with Babel 7.9 ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-core` + * [#11612](https://github.com/babel/babel/pull/11612) Make error message prefixes more descriptive ([@eps1lon](https://github.com/eps1lon)) + * [#11554](https://github.com/babel/babel/pull/11554) Hide internal `@babel/core` functions in config errors ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :memo: Documentation +* [#14895](https://github.com/babel/babel/pull/14895) docs: remove david-dm from README ([@SukkaW](https://github.com/SukkaW)) + +#### :house: Internal +* `babel-standalone` + * [#14863](https://github.com/babel/babel/pull/14863) ship @babel/standalone source maps ([@JLHwung](https://github.com/JLHwung)) +* `babel-core`, `babel-parser`, `babel-traverse` + * [#14880](https://github.com/babel/babel/pull/14880) Update typescript to 4.8 ([@JLHwung](https://github.com/JLHwung)) +## v7.18.13 (2022-08-22) + +#### :bug: Bug Fix +* `babel-generator` + * [#14869](https://github.com/babel/babel/pull/14869) fix: jsx with `retainLines` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core` + * [#14843](https://github.com/babel/babel/pull/14843) Fix a race condition in `@babel/core` ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-destructuring` + * [#14841](https://github.com/babel/babel/pull/14841) fix: Destructuring exceptions in nested `for` expressions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-traverse` + * [#14833](https://github.com/babel/babel/pull/14833) Let `path.remove()` remove `IfStatement.alternate` ([@djpohly](https://github.com/djpohly)) + * [#14837](https://github.com/babel/babel/pull/14837) Add support for static evaluation of ?? operator ([@djpohly](https://github.com/djpohly)) + +#### :house: Internal +* [#14846](https://github.com/babel/babel/pull/14846) fix: Print build logs correctly ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.18.12 (2022-08-05) + +#### :bug: Bug Fix +* `babel-plugin-transform-react-constant-elements` + * [#14828](https://github.com/babel/babel/pull/14828) fix: react-cons-elem should not hoist router comp ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator` + * [#14810](https://github.com/babel/babel/pull/14810) fix: Certain comments cause `generator` exceptions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-typescript` + * [#14827](https://github.com/babel/babel/pull/14827) Fix: do not report global variables as injected binding ([@JLHwung](https://github.com/JLHwung)) +## v7.18.11 (2022-08-04) + +#### :bug: Bug Fix +* `babel-helper-wrap-function` + * [#14825](https://github.com/babel/babel/pull/14825) fix: helper-wrap-function compat with old traverse ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* `babel-traverse` + * [#14821](https://github.com/babel/babel/pull/14821) chore(traverse): fix some internal typescript types ([@danez](https://github.com/danez)) +* `babel-parser` + * [#14801](https://github.com/babel/babel/pull/14801) babel parser type improvements ([@zxbodya](https://github.com/zxbodya)) +## v7.18.10 (2022-08-01) + +#### :rocket: New Feature +* `babel-helper-string-parser`, `babel-types` + * [#14757](https://github.com/babel/babel/pull/14757) feat: Automatically generate `cooked` for `templateElement` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :bug: Bug Fix +* `babel-parser` + * [#14817](https://github.com/babel/babel/pull/14817) fix(parser): allow TS declare readonly fields with initializers ([@Josh-Cena](https://github.com/Josh-Cena)) +* `babel-helper-string-parser`, `babel-parser` + * [#14798](https://github.com/babel/babel/pull/14798) Fix position of errors in template literals after newlines ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-typescript` + * [#14774](https://github.com/babel/babel/pull/14774) fix: TS `declare class` in namespace should be removed ([@yimingjfe](https://github.com/yimingjfe)) +* `babel-plugin-transform-react-jsx` + * [#14759](https://github.com/babel/babel/pull/14759) fix: skip flattening spread object with __proto__ ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator` + * [#14762](https://github.com/babel/babel/pull/14762) fix: Types containing comments generate invalid code ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-helper-wrap-function`, `babel-plugin-transform-async-to-generator`, `babel-traverse` + * [#14752](https://github.com/babel/babel/pull/14752) Fix compiling async arrows in uncompiled class fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* Other + * [#14800](https://github.com/babel/babel/pull/14800) chore: Remove `.yarnrc` file ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#14802](https://github.com/babel/babel/pull/14802) chore: Fix coverage test ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#14671](https://github.com/babel/babel/pull/14671) feat: Make most `make` commands cross-platform ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#14790](https://github.com/babel/babel/pull/14790) enable typescript incremental builds ([@zxbodya](https://github.com/zxbodya)) +* `babel-traverse` + * [#14799](https://github.com/babel/babel/pull/14799) Restructure virtual types validator ([@JLHwung](https://github.com/JLHwung)) +* `babel-cli` + * [#14779](https://github.com/babel/babel/pull/14779) chore: expand prettier-e2e test and update typings/deps ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#14796](https://github.com/babel/babel/pull/14796) Make ParseError Much Simpler now that we can use TypeScript ([@tolmasky](https://github.com/tolmasky)) +* `babel-core`, `babel-parser` + * [#14785](https://github.com/babel/babel/pull/14785) chore: remove flow check scripts ([@JLHwung](https://github.com/JLHwung)) +* `babel-cli`, `babel-core`, `babel-parser`, `babel-plugin-transform-unicode-escapes`, `babel-preset-env`, `babel-template`, `babel-traverse` + * [#14783](https://github.com/babel/babel/pull/14783) Convert `@babel/parser` to TypeScript ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-string-parser`, `babel-parser` + * [#14772](https://github.com/babel/babel/pull/14772) Extract string parsing to a separate package ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-cli`, `babel-node` + * [#14765](https://github.com/babel/babel/pull/14765) Enforce type checking on `babel-{cli,node}` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :microscope: Output optimization +* `babel-plugin-proposal-export-default-from` + * [#14768](https://github.com/babel/babel/pull/14768) optimize: Simplify the `export-default-from` transform ([@magic-akari](https://github.com/magic-akari)) +## v7.18.9 (2022-07-18) + +#### :bug: Bug Fix +* `babel-plugin-transform-modules-systemjs`, `babel-types` + * [#14763](https://github.com/babel/babel/pull/14763) fix: allow exporting `TSDeclareFunction` as default ([@zxbodya](https://github.com/zxbodya)) +* `babel-generator` + * [#14758](https://github.com/babel/babel/pull/14758) fix: `returnType` with comments generates incorrect code ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :nail_care: Polish +* `babel-cli` + * [#14748](https://github.com/babel/babel/pull/14748) Print a message when the watcher of `babel-cli` is ready. ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-core`, `babel-helper-remap-async-to-generator`, `babel-helpers`, `babel-parser`, `babel-plugin-transform-block-scoping`, `babel-preset-env` + * [#13414](https://github.com/babel/babel/pull/13414) Prepare for compiling Babel to native ESM ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-helper-member-expression-to-functions`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-helper-wrap-function`, `babel-helpers`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-traverse`, `babel-types` + * [#14739](https://github.com/babel/babel/pull/14739) Provide better parentPath typings ([@JLHwung](https://github.com/JLHwung)) + +#### :running_woman: Performance +* `babel-generator` + * [#14701](https://github.com/babel/babel/pull/14701) perf: Improve generator perf ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.18.8 (2022-07-08) + +#### :eyeglasses: Spec Compliance +* `babel-parser`, `babel-types` + * [#14730](https://github.com/babel/babel/pull/14730) Misc fixes to `@babel/types` AST definitions ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-plugin-transform-parameters` + * [#14736](https://github.com/babel/babel/pull/14736) Inject IIFE when variables shadow binding in rest param ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-classes` + * [#14709](https://github.com/babel/babel/pull/14709) Fix compilation of nested `super(...)` calls ([@dbacarel](https://github.com/dbacarel)) +* `babel-plugin-transform-for-of`, `babel-plugin-transform-spread`, `babel-traverse`, `babel-types` + * [#14393](https://github.com/babel/babel/pull/14393) Support some TSTypes in the inferrer ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` + * [#14708](https://github.com/babel/babel/pull/14708) Unshadow `cjs` exports when transforming mutations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :memo: Documentation +* [#14486](https://github.com/babel/babel/pull/14486) Fix test debugging instructions for contributors ([@conartist6](https://github.com/conartist6)) + +#### :house: Internal +* `babel-types` + * [#14737](https://github.com/babel/babel/pull/14737) fix: deep clone shared AST field definitions ([@JLHwung](https://github.com/JLHwung)) +* Other + * [#14720](https://github.com/babel/babel/pull/14720) fix: support compiling monorepo on single-core CPU machines ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-fixtures`, `babel-parser` + * [#12619](https://github.com/babel/babel/pull/12619) Add json schema of fixture runner options ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-plugin-transform-typescript` + * [#14723](https://github.com/babel/babel/pull/14723) [optimizeConstEnums] Inline const enum if only exported as type ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.18.7 (2022-06-28) + +#### :bug: Bug Fix +* `babel-types` + * [#14706](https://github.com/babel/babel/pull/14706) fix: `@babel/types` exception in typescript project. ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.18.6 (2022-06-27) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#14650](https://github.com/babel/babel/pull/14650) [ts] Disallow property access after instantiation expression ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#14636](https://github.com/babel/babel/pull/14636) [ts] Allow `...<...>` followed by newline or binary operator ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-parser`, `babel-preset-env`, `babel-template` + * [#14668](https://github.com/babel/babel/pull/14668) JSON modules should be imported with default ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-helper-remap-async-to-generator`, `babel-plugin-proposal-async-generator-functions` + * [#14391](https://github.com/babel/babel/pull/14391) Transform `await` in computed class keys ([@Yokubjon-J](https://github.com/Yokubjon-J)) +* `babel-plugin-transform-parameters` + * [#14694](https://github.com/babel/babel/pull/14694) fix: preserve function params type if possible ([@magic-akari](https://github.com/magic-akari)) +* `babel-core` + * [#14583](https://github.com/babel/babel/pull/14583) fix: Memory leak when deep cloning in `babel-core` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-core`, `babel-helper-check-duplicate-nodes`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-transform-runtime` + * [#14663](https://github.com/babel/babel/pull/14663) Fix `import { types } from "@babel/core"` with native ESM ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-standalone` + * [#14697](https://github.com/babel/babel/pull/14697) Add `proposal-unicode-sets-regex` to `@babel/standalone` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* Other + * [#14687](https://github.com/babel/babel/pull/14687) chore: Update bench baselines ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-generator`, `babel-types` + * [#14685](https://github.com/babel/babel/pull/14685) enable TS compiler option: strictBindCallApply ([@JLHwung](https://github.com/JLHwung)) +* `babel-code-frame`, `babel-core`, `babel-generator`, `babel-helper-annotate-as-pure`, `babel-helper-builder-binary-assignment-operator-visitor`, `babel-helper-builder-react-jsx`, `babel-helper-check-duplicate-nodes`, `babel-helper-compilation-targets`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-define-map`, `babel-helper-explode-assignable-expression`, `babel-helper-fixtures`, `babel-helper-function-name`, `babel-helper-hoist-variables`, `babel-helper-member-expression-to-functions`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-optimise-call-expression`, `babel-helper-plugin-test-runner`, `babel-helper-plugin-utils`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-helper-simple-access`, `babel-helper-split-export-declaration`, `babel-helper-transform-fixture-test-runner`, `babel-helper-validator-option`, `babel-helper-wrap-function`, `babel-helpers`, `babel-highlight`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-object-super`, `babel-plugin-transform-parameters`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-compat`, `babel-plugin-transform-react-jsx-source`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-preset-env`, `babel-preset-typescript`, `babel-standalone`, `babel-template`, `babel-traverse`, `babel-types` + * [#14601](https://github.com/babel/babel/pull/14601) enable noImplicitAny ([@JLHwung](https://github.com/JLHwung)) +* `babel-core`, `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-destructuring` + * [#14659](https://github.com/babel/babel/pull/14659) Run Babel asynchronously in fixtures ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.18.5 (2022-06-13) + +#### :bug: Bug Fix +* `babel-plugin-transform-new-target` + * [#14611](https://github.com/babel/babel/pull/14611) fix: `new.target` with shadowed class name ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-modules-systemjs` + * [#14655](https://github.com/babel/babel/pull/14655) Fix named destructuring exports ([@underfin](https://github.com/underfin)) + +#### :memo: Documentation +* [#14332](https://github.com/babel/babel/pull/14332) docs: eslint-parser requireConfigFile behaviour ([@JLHwung](https://github.com/JLHwung)) +* [#14619](https://github.com/babel/babel/pull/14619) Move v7 prereleases changelog to a separate file ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-traverse` + * [#14649](https://github.com/babel/babel/pull/14649) Rely on the call stack to clean up cache in `_guessExecutionStatusRelativeTo` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core` + * [#14641](https://github.com/babel/babel/pull/14641) Change limit of source map 3MB ([@vasicvuk](https://github.com/vasicvuk)) +* Other + * [#14627](https://github.com/babel/babel/pull/14627) Speedup e2e test on github ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + * [#14248](https://github.com/babel/babel/pull/14248) chore: automate compat-data update ([@tony-go](https://github.com/tony-go)) +* `babel-parser` + * [#14592](https://github.com/babel/babel/pull/14592) feat: Automatically generate test results that do not exist ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :running_woman: Performance +* `babel-traverse` + * [#14617](https://github.com/babel/babel/pull/14617) Fix `_guessExecutionStatusRelativeToDifferentFunctions` perf ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.18.4 (2022-05-29) + +#### :eyeglasses: Spec Compliance +* `babel-types` + * [#14591](https://github.com/babel/babel/pull/14591) fix: remove TSDeclareFunction from ExportDefaultDeclaration ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-plugin-transform-typescript` + * [#14610](https://github.com/babel/babel/pull/14610) Fix `@babel/transform-typescript` compatibility with Next.js ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#14604](https://github.com/babel/babel/pull/14604) [ts] FIx parsing of nested `extends` type in arrow type ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-check-duplicate-nodes`, `babel-parser` + * [#14595](https://github.com/babel/babel/pull/14595) fix: `loc.index` of some nodes is wrongly enumerable. ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :house: Internal +* `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-modules-systemjs` + * [#14599](https://github.com/babel/babel/pull/14599) refactor: avoid mutating AST nodes ([@JLHwung](https://github.com/JLHwung)) +## v7.18.3 (2022-05-25) + +#### :bug: Bug Fix +* `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#14588](https://github.com/babel/babel/pull/14588) Restore es5 compatibility in `@babel/runtime/regenerator` ([@jlowcs](https://github.com/jlowcs)) +## v7.18.2 (2022-05-25) + +#### :bug: Bug Fix +* `babel-plugin-transform-template-literals` + * [#14582](https://github.com/babel/babel/pull/14582) fix: skip template literal transform for TSLiteralType ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers` + * [#14537](https://github.com/babel/babel/pull/14537) Support frozen built-ins in `@babel/runtime` ([@Jack-Works](https://github.com/Jack-Works)) +* `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#14581](https://github.com/babel/babel/pull/14581) Define the global `regeneratorRuntime` in `@babel/runtime/regenerator` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-environment-visitor`, `babel-helper-replace-supers`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-decorators`, `babel-traverse`, `babel-types` + * [#14371](https://github.com/babel/babel/pull/14371) environmentVisitor should skip decorator expressions ([@JLHwung](https://github.com/JLHwung)) + +#### :memo: Documentation +* `babel-types` + * [#14571](https://github.com/babel/babel/pull/14571) add Accessor alias description ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* [#14541](https://github.com/babel/babel/pull/14541) Fix synchronization between main thread and worker ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.18.1 (2022-05-19) + +#### :bug: Bug Fix +* `babel-plugin-transform-typescript` + * [#14566](https://github.com/babel/babel/pull/14566) Fix TypeScript plugin compat with `@babel/types` versions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-for-of` + * [#14564](https://github.com/babel/babel/pull/14564) fix: Duplicate declaration in transformed for...of ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.18.0 (2022-05-19) + +#### :rocket: New Feature +* `babel-preset-env` + * [#14556](https://github.com/babel/babel/pull/14556) feat: add import-assertions to shippedProposals ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-class-features-plugin`, `babel-helper-define-map`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-typescript`, `babel-standalone`, `babel-traverse`, `babel-types` + * [#14304](https://github.com/babel/babel/pull/14304) Transform destructuring private ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-parser`, `babel-types` + * [#14359](https://github.com/babel/babel/pull/14359) [ts 4.7] Support optional variance annotations ([@magic-akari](https://github.com/magic-akari)) +* `babel-generator`, `babel-parser` + * [#14476](https://github.com/babel/babel/pull/14476) [ts 4.7] Support `extends` constraints for `infer` ([@sosukesuzuki](https://github.com/sosukesuzuki)) +* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types` + * [#14457](https://github.com/babel/babel/pull/14457) [ts] Add support for instantiation expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` + * [#14456](https://github.com/babel/babel/pull/14456) Pass filename to `importInterop` method ([@NickHeiner](https://github.com/NickHeiner)) + +#### :bug: Bug Fix +* `babel-types` + * [#14551](https://github.com/babel/babel/pull/14551) Do not create multiple copies of comments when cloning nodes ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-parser` + * [#14557](https://github.com/babel/babel/pull/14557) Fix parsing of `<` after object literals with the `jsx` plugin ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-react-pure-annotations` + * [#14528](https://github.com/babel/babel/pull/14528) fix: do not mark computed `React[...]` methods as pure ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish +* `babel-core`, `babel-helper-transform-fixture-test-runner`, `babel-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` + * [#14538](https://github.com/babel/babel/pull/14538) Inline `regeneratorRuntime` as a normal helper ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-modules-systemjs` + * [#14530](https://github.com/babel/babel/pull/14530) improve helper-create-class-features typings ([@JLHwung](https://github.com/JLHwung)) +## v7.17.12 (2022-05-16) + +#### :bug: Bug Fix +* `babel-plugin-transform-react-constant-elements` + * [#14536](https://github.com/babel/babel/pull/14536) Never hoist JSX elts referencing vars from the current scope ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#14524](https://github.com/babel/babel/pull/14524) fix: perserve parentheses of lhs id with rhs unamed fn ([@JLHwung](https://github.com/JLHwung)) + * [#14532](https://github.com/babel/babel/pull/14532) Print necessary parentheses for functions in postfix expressions ([@xiawenqi](https://github.com/xiawenqi)) +* `babel-plugin-transform-destructuring` + * [#14494](https://github.com/babel/babel/pull/14494) Update scope info after destructuring transform ([@peey](https://github.com/peey)) +* `babel-parser` + * [#14522](https://github.com/babel/babel/pull/14522) fix: allow liberal named type-as imports ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser`, `babel-plugin-transform-destructuring`, `babel-types` + * [#14500](https://github.com/babel/babel/pull/14500) Fix parsing ts type casts and nested patterns in destructuring ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-plugin-proposal-decorators`, `babel-types` + * [#14519](https://github.com/babel/babel/pull/14519) @babel/types builder improvements ([@JLHwung](https://github.com/JLHwung)) +* `babel-core` + * [#14490](https://github.com/babel/babel/pull/14490) Update to Jest 28 ([@JLHwung](https://github.com/JLHwung)) +* `babel-core`, `babel-generator`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-parser`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-export-namespace-from`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-logical-assignment-operators`, `babel-plugin-proposal-nullish-coalescing-operator`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-proposal-unicode-property-regex`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-syntax-flow`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-pipeline-operator`, `babel-plugin-syntax-record-and-tuple`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-instanceof`, `babel-plugin-transform-jscript`, `babel-plugin-transform-literals`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-new-target`, `babel-plugin-transform-parameters`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-reserved-words`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`, `babel-traverse`, `babel-types` + * [#14499](https://github.com/babel/babel/pull/14499) Provide plugin/preset typings from plugin-utils ([@JLHwung](https://github.com/JLHwung)) +## v7.17.11 (2022-04-29) + +#### :bug: Bug Fix +* `babel-runtime-corejs2` + * [#14509](https://github.com/babel/babel/pull/14509) fix: `@babel/runtime-corejs2` should depend on core-js 2 ([@JLHwung](https://github.com/JLHwung)) +## v7.17.10 (2022-04-29) + +#### :bug: Bug Fix +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-transform-fixture-test-runner` + * [#14479](https://github.com/babel/babel/pull/14479) [cli] Avoid `SourceMapGenerator` for simple map concatenation ([@jridgewell](https://github.com/jridgewell)) + +#### :nail_care: Polish +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-fixtures`, `babel-helper-transform-fixture-test-runner` + * [#14506](https://github.com/babel/babel/pull/14506) Do not add sourcemap markings for indentation ([@jridgewell](https://github.com/jridgewell)) +* `babel-plugin-proposal-pipeline-operator`, `babel-traverse` + * [#14424](https://github.com/babel/babel/pull/14424) Update detection of pure nodes (`Scope#isPure`) ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* `babel-core` + * [#14493](https://github.com/babel/babel/pull/14493) Remove git.io shortlinks from repo ([@Andoryuuta](https://github.com/Andoryuuta)) +* Other + * [#14462](https://github.com/babel/babel/pull/14462) fix: build standalone on windows ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) + +#### :running_woman: Performance +* `babel-cli`, `babel-core`, `babel-generator` + * [#14497](https://github.com/babel/babel/pull/14497) Switch to `@jridgewell/gen-mapping` for sourcemap generation ([@jridgewell](https://github.com/jridgewell)) +## v7.17.9 (2022-04-06) + +#### :bug: Bug Fix +* `babel-parser`, `babel-standalone` + * [#14427](https://github.com/babel/babel/pull/14427) Restore numeric separators support in `@babel/standalone` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-traverse` + * [#14403](https://github.com/babel/babel/pull/14403) Fix NodePath.referencesImport for JSXMemberExpression ([@swandir](https://github.com/swandir)) +* `babel-plugin-proposal-decorators` + * [#14396](https://github.com/babel/babel/pull/14396) [2021-12] Support class decorators in export declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#14387](https://github.com/babel/babel/pull/14387) fix: forward accessor proxy getter results ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser` + * [#14384](https://github.com/babel/babel/pull/14384) fix: parse type parameters within correct context ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator`, `babel-parser` + * [#14378](https://github.com/babel/babel/pull/14378) Parenthesize non-simple decorator expression ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-classes`, `babel-plugin-transform-modules-commonjs`, `babel-preset-env` + * [#14366](https://github.com/babel/babel/pull/14366) Align named imports behavior in `.mjs` and `.js` files ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties` + * [#14351](https://github.com/babel/babel/pull/14351) [setPublicClassFields] Use define for static `name`/`length` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-plugin-proposal-decorators` + * [#14398](https://github.com/babel/babel/pull/14398) Add missing semicolons in 2021-12 decorators output ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :memo: Documentation +* [#14397](https://github.com/babel/babel/pull/14397) Mention how to report vulns in Babel dependencies ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* Other + * [#14419](https://github.com/babel/babel/pull/14419) Use `jest-light-runner` from npm ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-cli` + * [#14385](https://github.com/babel/babel/pull/14385) Fix flaky @babel/cli test ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-function-name`, `babel-helper-get-function-arity` + * [#14389](https://github.com/babel/babel/pull/14389) Inline `@babel/helper-get-function-arity` package ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers` + * [#14343](https://github.com/babel/babel/pull/14343) Remove unused `@babel/helpers` code ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-highlight`, `babel-parser` + * [#14377](https://github.com/babel/babel/pull/14377) refactor: replace deprecated String.prototype.substr() ([@CommanderRoot](https://github.com/CommanderRoot)) +## v7.17.8 (2022-03-18) + +#### :eyeglasses: Spec Compliance +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#14353](https://github.com/babel/babel/pull/14353) Update decorators to match latest spec ([@pzuraq](https://github.com/pzuraq)) + * [#14339](https://github.com/babel/babel/pull/14339) Decorators misc fixes ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-plugin-transform-modules-systemjs` + * [#14057](https://github.com/babel/babel/pull/14057) [systemjs] Fix nested `let`/`const` shadowing imported bindings ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-parser` + * [#14362](https://github.com/babel/babel/pull/14362) Allow keywords in TS qualified types ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :leftwards_arrow_with_hook: Revert +* `babel-parser` + * [#14367](https://github.com/babel/babel/pull/14367) Defer `() => {}` TSX error to Babel 8 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.17.7 (2022-03-14) + +#### :eyeglasses: Spec Compliance +* `babel-generator`, `babel-parser` + * [#14135](https://github.com/babel/babel/pull/14135) [tsx] raise error on single arrow type argument without comma ([@ozanhonamlioglu](https://github.com/ozanhonamlioglu)) + +#### :bug: Bug Fix +* `babel-helper-compilation-targets` + * [#14294](https://github.com/babel/babel/pull/14294) Avoid `resolveTargets` call if `browsers` is an empty array ([@dev-itsheng](https://github.com/dev-itsheng)) +* `babel-helper-module-transforms`, `babel-helper-simple-access`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` + * [#14341](https://github.com/babel/babel/pull/14341) Fix update expression for exported bigints ([@magic-akari](https://github.com/magic-akari)) +* `babel-parser` + * [#14344](https://github.com/babel/babel/pull/14344) Allow variable and function with the same name in static blocks ([@Yokubjon-J](https://github.com/Yokubjon-J)) + * [#14327](https://github.com/babel/babel/pull/14327) Remove length restriction from JSX entities, and ignore `Object.prototype` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#14293](https://github.com/babel/babel/pull/14293) fix(ts): skip func-type param start on parsing ([@JLHwung](https://github.com/JLHwung)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#14335](https://github.com/babel/babel/pull/14335) Fix static/proto initializers when there aren't class fields ([@JLHwung](https://github.com/JLHwung)) + * [#14334](https://github.com/babel/babel/pull/14334) fix: push `newClass` only when class is decorated ([@JLHwung](https://github.com/JLHwung)) +* `babel-generator` + * [#14309](https://github.com/babel/babel/pull/14309) Fix `import type/typeof` printing with no specifiers ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` + * [#14313](https://github.com/babel/babel/pull/14313) Fix duplicate exports initialization with many exports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-member-expression-to-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-methods`, `babel-plugin-transform-classes`, `babel-plugin-transform-object-super` + * [#14311](https://github.com/babel/babel/pull/14311) fix: support bigints in update expressions for private fields ([@magic-akari](https://github.com/magic-akari)) +* `babel-register` + * [#14303](https://github.com/babel/babel/pull/14303) Fix babel register cache invalidation ([@cha0s](https://github.com/cha0s)) + +#### :nail_care: Polish +* `babel-parser` + * [#14338](https://github.com/babel/babel/pull/14338) Report single error for invalid num seps in unicode escapes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-generator`, `babel-parser` + * [#14320](https://github.com/babel/babel/pull/14320) Type-safe ParseErrors ([@tolmasky](https://github.com/tolmasky)) +* `babel-plugin-transform-destructuring` + * [#14236](https://github.com/babel/babel/pull/14236) Improve `transform-destructuring` typings ([@JLHwung](https://github.com/JLHwung)) +* Other + * [#14180](https://github.com/babel/babel/pull/14180) Convert ESLint plugins to CommonJS ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.17.6 (2022-02-21) + +#### :eyeglasses: Spec Compliance +* `babel-helper-module-transforms` + * [#14287](https://github.com/babel/babel/pull/14287) Make module namespace sort compare function consistent ([@devsnek](https://github.com/devsnek)) + +#### :bug: Bug Fix +* `babel-cli` + * [#14281](https://github.com/babel/babel/pull/14281) cli: handle multiple input sources in watch mode ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-plugin-transform-react-constant-elements` + * [#12975](https://github.com/babel/babel/pull/12975) `allowMutablePropsOnTags`: cache JSX constant elements with function props ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-pipeline-operator`, `babel-standalone` + * [#14278](https://github.com/babel/babel/pull/14278) [hack pipes] Inline topic token when possible ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-preset-env` + * [#14275](https://github.com/babel/babel/pull/14275) Avoid IIFE for single-expression class static blocks ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.17.5 (2022-02-17) + +#### :bug: Bug Fix +* `babel-core` + * [#14283](https://github.com/babel/babel/pull/14283) Make source maps plain objects for use with `t.valueToNode` ([@thebanjomatic](https://github.com/thebanjomatic)) + * [#14282](https://github.com/babel/babel/pull/14282) Fix merging sourcemaps on Windows ([@jridgewell](https://github.com/jridgewell)) +## v7.17.4 (2022-02-15) + +#### :bug: Bug Fix +* `babel-core` + * [#14274](https://github.com/babel/babel/pull/14274) Fix infinite recursion when merge sourcemaps ([@jridgewell](https://github.com/jridgewell)) +## v7.17.3 (2022-02-15) + +#### :bug: Bug Fix +* `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx` + * [#14271](https://github.com/babel/babel/pull/14271) jsx-development: do not emit `this` within ts module block ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-destructuring` + * [#14240](https://github.com/babel/babel/pull/14240) Fix destructuring with holes in assign pattern ([@magic-akari](https://github.com/magic-akari)) + +#### :house: Internal +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-transform-fixture-test-runner` + * [#14253](https://github.com/babel/babel/pull/14253) Convert all SourceMapConsumers to TraceMaps ([@jridgewell](https://github.com/jridgewell)) + +#### :microscope: Output optimization +* `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-transform-new-target`, `babel-plugin-transform-parameters`, `babel-traverse` + * [#14268](https://github.com/babel/babel/pull/14268) Skip unnecessary temp vars in `path.insertAfter` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.17.2 (2022-02-08) + +#### :bug: Bug Fix +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#14244](https://github.com/babel/babel/pull/14244) Fix 2021-12 decorators application order ([@JLHwung](https://github.com/JLHwung)) +* `babel-core` + * [#14241](https://github.com/babel/babel/pull/14241) Fix reinstantiation of inherited plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#14246](https://github.com/babel/babel/pull/14246) Merge multi-source output sourcemaps ([@jridgewell](https://github.com/jridgewell)) +## v7.17.1 (2022-02-03) + +#### :bug: Bug Fix +* `babel-helper-create-class-features-plugin` + * [#14231](https://github.com/babel/babel/pull/14231) Restore class fields transform compat with old `@babel/types` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.17.0 (2022-02-02) + +#### :rocket: New Feature +* `babel-cli`, `babel-core` + * [#14065](https://github.com/babel/babel/pull/14065) Allow plugins/presets to indicate external dependencies ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core`, `babel-parser`, `babel-traverse` + * [#14174](https://github.com/babel/babel/pull/14174) Expose `.index` on Position to internally track nodes location ([@tolmasky](https://github.com/tolmasky)) +* `babel-generator`, `babel-parser`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-pipeline-operator` + * [#13973](https://github.com/babel/babel/pull/13973) proposal-pipe: Add support for `^^` and `@@` topics ([@js-choi](https://github.com/js-choi)) +* `babel-traverse` + * [#13940](https://github.com/babel/babel/pull/13940) Add new method to check if node is null or not ([@danez](https://github.com/danez)) +* `babel-generator`, `babel-parser`, `babel-plugin-syntax-destructuring-private`, `babel-standalone` + * [#13931](https://github.com/babel/babel/pull/13931) Parse destructuring private fields ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone`, `babel-types` + * [#14004](https://github.com/babel/babel/pull/14004) Add new decorators transform ([@pzuraq](https://github.com/pzuraq)) +* `babel-generator`, `babel-parser`, `babel-traverse`, `babel-types` + * [#13681](https://github.com/babel/babel/pull/13681) Add the `decoratorsAutoAccessors` parser plugin ([@pzuraq](https://github.com/pzuraq)) +* `babel-core`, `babel-helper-create-regexp-features-plugin`, `babel-plugin-proposal-unicode-sets-regex`, `babel-plugin-syntax-unicode-sets-regex`, `babel-plugin-transform-dotall-regex` + * [#14125](https://github.com/babel/babel/pull/14125) Add transform support for the "regexp unicode sets" proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#14086](https://github.com/babel/babel/pull/14086) Add parser support for the "regexp unicode sets" proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-register` + * [#14087](https://github.com/babel/babel/pull/14087) Expose `@babel/register/experimental-worker` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix +* `babel-parser` + * [#14145](https://github.com/babel/babel/pull/14145) Reinterpret << when parsing TS type arguments ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-runtime` + * [#14187](https://github.com/babel/babel/pull/14187) Normalize absolute paths on Windows ([@atti187](https://github.com/atti187)) + +#### :memo: Documentation +* [#14223](https://github.com/babel/babel/pull/14223) Remove Babel 6 from SECURITY.md ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-helper-fixtures`, `babel-parser` + * [#14201](https://github.com/babel/babel/pull/14201) Fuzz test location-related parser options ([@tolmasky](https://github.com/tolmasky)) +* `babel-compat-data` + * [#14208](https://github.com/babel/babel/pull/14208) Update compat data (specifically for rhino 1.7.14) ([@phulin](https://github.com/phulin)) +* Other + * [#14190](https://github.com/babel/babel/pull/14190) chore: run tscheck on babel 8 breaking test ([@JLHwung](https://github.com/JLHwung)) + +#### :running_woman: Performance +* `babel-cli`, `babel-core` + * [#14209](https://github.com/babel/babel/pull/14209) Switch to `@ampproject/remapping` to merge source maps ([@jridgewell](https://github.com/jridgewell)) +## v7.16.12 (2022-01-22) + +#### :bug: Bug Fix +* `babel-core` + * [#14192](https://github.com/babel/babel/pull/14192) Avoid dynamic import when it's not needed ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#14194](https://github.com/babel/babel/pull/14194) fix: incorrect `in` parsing in arrow ConciseBody ([@JLHwung](https://github.com/JLHwung)) + +## v7.16.10 (2022-01-19) + +#### :bug: Bug Fix +* `babel-highlight` + * [#14165](https://github.com/babel/babel/pull/14165) Avoid infinite loop when highlighting an empty input ([@blankPen](https://github.com/blankPen)) +* `babel-traverse` + * [#14164](https://github.com/babel/babel/pull/14164) Handle logical assignment in super property transforms ([@magic-akari](https://github.com/magic-akari)) + * [#14162](https://github.com/babel/babel/pull/14162) Fix the transform of `super.foo--`/`super[foo]--` (and prefix) ([@magic-akari](https://github.com/magic-akari)) +* `babel-core` + * [#14110](https://github.com/babel/babel/pull/14110) Respect `package.json#exports` when resolving plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#14153](https://github.com/babel/babel/pull/14153) Disable "Reentrant plugin detected" error in async mode ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-plugin-transform-runtime` + * [#14157](https://github.com/babel/babel/pull/14157) Remove workaround for `_typeof` in runtime build script ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#14130](https://github.com/babel/babel/pull/14130) Improve errors location tracking ([@tolmasky](https://github.com/tolmasky)) + +#### :microscope: Output optimization +* `babel-helper-create-class-features-plugin`, `babel-preset-env` + * [#14169](https://github.com/babel/babel/pull/14169) Skip class fields transform when not necessary for private methods ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.16.9 (2022-01-11) + +#### :bug: Bug Fix +* `babel-register` + * [#14136](https://github.com/babel/babel/pull/14136) Restore `@babel/register` compat with `@babel/core@7.5.x` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.16.8 (2022-01-10) + +#### :bug: Bug Fix +* `babel-generator`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-parameters` + * [#14113](https://github.com/babel/babel/pull/14113) Print trailing comma after a single TS generic in arrow fns ([@ozanhonamlioglu](https://github.com/ozanhonamlioglu)) +* `babel-traverse` + * [#14105](https://github.com/babel/babel/pull/14105) fix: forward stop signal to parent path ([@JLHwung](https://github.com/JLHwung)) +* `babel-register` + * [#14107](https://github.com/babel/babel/pull/14107) Don't mutate `@babel/register` options ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-transform-modules-commonjs` + * [#14097](https://github.com/babel/babel/pull/14097) Register binding for newly created vars for commonjs transforms ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-plugin-transform-typescript` + * [#14093](https://github.com/babel/babel/pull/14093) Fix TypeScript Enum self-references ([@magic-akari](https://github.com/magic-akari)) + +#### :nail_care: Polish +* `babel-generator` + * [#14094](https://github.com/babel/babel/pull/14094) Always print directives with double quotes when minified ([@overlookmotel](https://github.com/overlookmotel)) + +#### :house: Internal +* `babel-helper-fixtures`, `babel-plugin-proposal-record-and-tuple`, `babel-preset-env` + * [#14118](https://github.com/babel/babel/pull/14118) Always use the plugin/preset name in fixtures options ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :microscope: Output optimization +* `babel-helper-remap-async-to-generator`, `babel-helper-wrap-function`, `babel-plugin-transform-async-to-generator` + * [#14122](https://github.com/babel/babel/pull/14122) Optimize `transform-async-to-generator` output ([@magic-akari](https://github.com/magic-akari)) +## v7.16.7 (2021-12-31) + +#### :eyeglasses: Spec Compliance +* `babel-parser` + * [#14049](https://github.com/babel/babel/pull/14049) fix: check preceding line break before exclamation ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-plugin-transform-runtime`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#14081](https://github.com/babel/babel/pull/14081) Import the correct `./typeof.js` helper in `@babel/runtime` ([@exb](https://github.com/exb)) +* `babel-helpers` + * [#14072](https://github.com/babel/babel/pull/14072) Fix derived classes in Chrome <= 36 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helper-function-name`, `babel-plugin-transform-function-name` + * [#14047](https://github.com/babel/babel/pull/14047) Fix unicode handling in generated function names ([@The-x-Theorist](https://github.com/The-x-Theorist)) + +#### :nail_care: Polish +* `babel-core` + * [#14067](https://github.com/babel/babel/pull/14067) Allow `$schema` property in json config files ([@The-x-Theorist](https://github.com/The-x-Theorist)) +## v7.16.6 (2021-12-14) + +#### :bug: Bug Fix +* `babel-parser` + * [#14055](https://github.com/babel/babel/pull/14055) fix: handle tokens for invalid template element ([@JLHwung](https://github.com/JLHwung)) +## v7.16.5 (2021-12-13) + +#### :eyeglasses: Spec Compliance +* `babel-cli`, `babel-core`, `babel-helpers`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-classes`, `babel-plugin-transform-jscript`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-typescript`, `babel-preset-env` + * [#12115](https://github.com/babel/babel/pull/12115) Mark class prototype as read-only ([@wentout](https://github.com/wentout)) + +#### :bug: Bug Fix +* `babel-plugin-transform-parameters` + * [#14032](https://github.com/babel/babel/pull/14032) Fix: default rest argument array elements as undefined ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-plugin-transform-arrow-functions`, `babel-traverse` + * [#14036](https://github.com/babel/babel/pull/14036) Don't resolve shadowed `arguments` variables from functions ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-parser` + * [#14039](https://github.com/babel/babel/pull/14039) maintain estree string literal shape when cloned ([@JLHwung](https://github.com/JLHwung)) +* `babel-traverse` + * [#14016](https://github.com/babel/babel/pull/14016) Fix duplicate declaration error on ambient class declarations ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-generator` + * [#14014](https://github.com/babel/babel/pull/14014) Support flow function type annotation with no parent ([@krosenberg](https://github.com/krosenberg)) +* `babel-plugin-transform-react-jsx` + * [#14012](https://github.com/babel/babel/pull/14012) Fix JSX pragma anywhere in comment ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-helper-create-class-features-plugin`, `babel-helper-environment-visitor`, `babel-helper-member-expression-to-functions`, `babel-helper-module-transforms`, `babel-helper-replace-supers`, `babel-plugin-transform-classes`, `babel-traverse` + * [#14005](https://github.com/babel/babel/pull/14005) Fix handling of `this`&co in computed keys in arrows transform ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-parser` + * [#13968](https://github.com/babel/babel/pull/13968) Recover from shorthand assign exprs ([@JLHwung](https://github.com/JLHwung)) + * [#13975](https://github.com/babel/babel/pull/13975) fix: update UnexpectedPrivateField error message ([@JLHwung](https://github.com/JLHwung)) + +#### :memo: Documentation +* `babel-compat-data`, `babel-helper-annotate-as-pure`, `babel-helper-builder-binary-assignment-operator-visitor`, `babel-helper-builder-react-jsx`, `babel-helper-compilation-targets`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-define-map`, `babel-helper-explode-assignable-expression`, `babel-helper-fixtures`, `babel-helper-function-name`, `babel-helper-get-function-arity`, `babel-helper-hoist-variables`, `babel-helper-member-expression-to-functions`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-optimise-call-expression`, `babel-helper-plugin-test-runner`, `babel-helper-plugin-utils`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-helper-simple-access`, `babel-helper-skip-transparent-expression-wrappers`, `babel-helper-split-export-declaration`, `babel-helper-transform-fixture-test-runner`, `babel-helper-validator-identifier`, `babel-helper-validator-option`, `babel-helper-wrap-function`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-syntax-async-do-expressions`, `babel-plugin-syntax-module-blocks`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-pure-annotations`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + * [#14006](https://github.com/babel/babel/pull/14006) Regenerate monorepo READMEs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-cli`, `babel-code-frame`, `babel-core`, `babel-generator`, `babel-helper-annotate-as-pure`, `babel-helper-compilation-targets`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-fixtures`, `babel-helper-module-imports`, `babel-helper-optimise-call-expression`, `babel-helper-plugin-test-runner`, `babel-helper-transform-fixture-test-runner`, `babel-helper-validator-identifier`, `babel-helper-validator-option`, `babel-helpers`, `babel-highlight`, `babel-node`, `babel-parser`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-dynamic-import`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-export-namespace-from`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-logical-assignment-operators`, `babel-plugin-proposal-nullish-coalescing-operator`, `babel-plugin-proposal-numeric-separator`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-catch-binding`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-proposal-throw-expressions`, `babel-plugin-proposal-unicode-property-regex`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-dotall-regex`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-instanceof`, `babel-plugin-transform-jscript`, `babel-plugin-transform-member-expression-literals`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-new-target`, `babel-plugin-transform-object-super`, `babel-plugin-transform-parameters`, `babel-plugin-transform-property-literals`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-compat`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-react-jsx-source`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-reserved-words`, `babel-plugin-transform-runtime`, `babel-plugin-transform-shorthand-properties`, `babel-plugin-transform-spread`, `babel-plugin-transform-sticky-regex`, `babel-plugin-transform-strict-mode`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-plugin-transform-unicode-regex`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`, `babel-register`, `babel-standalone`, `babel-template`, `babel-traverse`, `babel-types` + * [#13966](https://github.com/babel/babel/pull/13966) Run tests in a native Node.js ESM environment ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#13982](https://github.com/babel/babel/pull/13982) Extend `hasPlugin` to accept plugin-configuration array pairs ([@js-choi](https://github.com/js-choi)) +* `babel-helpers` + * [#13996](https://github.com/babel/babel/pull/13996) Don't use ESM for `require`d files in `@babel/helpers` tests ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-object-rest-spread`, `babel-traverse` + * [#13948](https://github.com/babel/babel/pull/13948) Convert proposal-object-rest-spread to TS ([@JLHwung](https://github.com/JLHwung)) +* `babel-parser`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-optional-chaining`, `babel-preset-react`, `babel-preset-typescript` + * [#13978](https://github.com/babel/babel/pull/13978) Only bundle the release build, and don't import `src` in tests ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* Other + * [#13976](https://github.com/babel/babel/pull/13976) Fail CI when `@babel/runtime` ESM tests fail ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :running_woman: Performance +* `babel-parser` + * [#13919](https://github.com/babel/babel/pull/13919) Improve template tokenizing ([@JLHwung](https://github.com/JLHwung)) + +#### :microscope: Output optimization +* `babel-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime` + * [#13837](https://github.com/babel/babel/pull/13837) minify `helpers-generated.ts` ([@lightmare](https://github.com/lightmare)) +## v7.16.4 (2021-11-16) + +#### :eyeglasses: Spec Compliance +* `babel-helper-remap-async-to-generator`, `babel-plugin-transform-async-to-generator` + * [#13961](https://github.com/babel/babel/pull/13961) Wait the correct number of ticks on nested `await` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#13929](https://github.com/babel/babel/pull/13929) Refactor bindingProperty parsing ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix +* `babel-parser` + * [#13957](https://github.com/babel/babel/pull/13957) Add `assertions` to `ExportNamedDeclaration` without `from` ([@sosukesuzuki](https://github.com/sosukesuzuki)) + * [#13951](https://github.com/babel/babel/pull/13951) Throw on duplicate `__proto__` props followed by assignment ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-runtime`, `babel-preset-env` + * [#12827](https://github.com/babel/babel/pull/12827) Add file extension when using `absoluteRuntime` ([@mbehzad](https://github.com/mbehzad)) + +#### :nail_care: Polish +* `babel-parser` + * [#13960](https://github.com/babel/babel/pull/13960) Always expose `expressionValue` in `DirectiveLiteral` nodes ([@tolmasky](https://github.com/tolmasky)) +## v7.16.3 (2021-11-09) + +#### :bug: Bug Fix +* `babel-helpers` + * [#13862](https://github.com/babel/babel/pull/13862) fix(helpers): match `Reflect.get` behaviour ([@lightmare](https://github.com/lightmare)) +* `babel-plugin-transform-parameters`, `babel-traverse` + * [#13941](https://github.com/babel/babel/pull/13941) Support transforming params of arrow functions in class fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#13928](https://github.com/babel/babel/pull/13928) fix: incorrect await rejection following arrow function in parameters (Closes [#13872](https://github.com/babel/babel/issues/13872)) ([@The-x-Theorist](https://github.com/The-x-Theorist)) +* Other + * [#13918](https://github.com/babel/babel/pull/13918) Fix `parserOverride` support in `@babel/eslint-parser` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-parser` + * [#13891](https://github.com/babel/babel/pull/13891) Simplify tracking of valid JSX positions ([@JLHwung](https://github.com/JLHwung)) + * [#13892](https://github.com/babel/babel/pull/13892) extract tt.lt and tt.gt from tt.relation ([@JLHwung](https://github.com/JLHwung)) +* `babel-helper-compilation-targets`, `babel-preset-env` + * [#13914](https://github.com/babel/babel/pull/13914) Update browserslist ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +## v7.16.2 (2021-11-01) + +#### :bug: Bug Fix +* `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression` + * [#13910](https://github.com/babel/babel/pull/13910) skip id-destructuring bugfix when binding info is not found ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal +* `babel-parser` + * [#13905](https://github.com/babel/babel/pull/13905) babel-parser: add missing assertions type ([@sosukesuzuki](https://github.com/sosukesuzuki)) +## v7.16.1 (2021-10-30) + +#### :bug: Bug Fix +* `babel-plugin-transform-typescript` + * [#13900](https://github.com/babel/babel/pull/13900) Fix binding access for plugin-transform-typescript ([@PeachScript](https://github.com/PeachScript)) + +#### :house: Internal +* [#13898](https://github.com/babel/babel/pull/13898) Skip ESLint 8 tests on publish ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.16.0 (2021-10-30) + +#### :eyeglasses: Spec Compliance + +- `babel-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + - [#13824](https://github.com/babel/babel/pull/13824) Await promises from sync iterators with `for-await` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :rocket: New Feature + +- `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-types` + - [#13802](https://github.com/babel/babel/pull/13802) Support TypeScript 4.5 type-only import/export specifiers ([@sosukesuzuki](https://github.com/sosukesuzuki)) +- `babel-parser` + - [#13887](https://github.com/babel/babel/pull/13887) feat: support `startColumn` option ([@JLHwung](https://github.com/JLHwung)) +- `babel-helper-fixtures`, `babel-helper-transform-fixture-test-runner`, `babel-parser`, `babel-plugin-syntax-typescript`, `babel-preset-typescript` + - [#13838](https://github.com/babel/babel/pull/13838) Handle `.mts` and `.cts` files in `@babel/preset-typescript` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- Other + - [#13782](https://github.com/babel/babel/pull/13782) Add ESLint 8 support to `@babel/eslint-parser` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-generator`, `babel-parser`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-pipeline-operator` + - [#13749](https://github.com/babel/babel/pull/13749) Caret topic (pipe operator) ([@js-choi](https://github.com/js-choi)) +- `babel-compat-data`, `babel-generator`, `babel-parser`, `babel-preset-env`, `babel-types` + - [#13713](https://github.com/babel/babel/pull/13713) Enable class static blocks by default ([@sosukesuzuki](https://github.com/sosukesuzuki)) +- `babel-helper-skip-transparent-expression-wrappers`, `babel-plugin-proposal-optional-chaining` + - [#13687](https://github.com/babel/babel/pull/13687) add `skipTransparentExprWrapperNodes` helper ([@lightmare](https://github.com/lightmare)) +- `babel-traverse`, `babel-types` + - [#13666](https://github.com/babel/babel/pull/13666) Add aliases for Standardized, TypeScript, and Flow ([@jridgewell](https://github.com/jridgewell)) + +#### :bug: Bug Fix + +- `babel-parser`, `babel-plugin-transform-typescript` + - [#13876](https://github.com/babel/babel/pull/13876) [ts] Support private methods overloads ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-plugin-transform-typescript` + - [#13865](https://github.com/babel/babel/pull/13865) fix: allow enum member without initializer after non-literal member ([@lightmare](https://github.com/lightmare)) +- `babel-core`, `babel-helper-create-class-features-plugin`, `babel-plugin-transform-typescript` + - [#13854](https://github.com/babel/babel/pull/13854) Don't transform `declare class` in plugin-proposal-class-properties ([@forivall](https://github.com/forivall)) +- `babel-compat-data`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-transform-react-constant-elements`, `babel-preset-env`, `babel-traverse` + - [#13842](https://github.com/babel/babel/pull/13842) Implement @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression ([@JLHwung](https://github.com/JLHwung)) +- `babel-plugin-proposal-async-generator-functions`, `babel-traverse` + - [#13813](https://github.com/babel/babel/pull/13813) Restore traversal context after enter / traverse ([@JLHwung](https://github.com/JLHwung)) +- `babel-traverse`, `babel-types` + - [#13832](https://github.com/babel/babel/pull/13832) Mark static block as FunctionParent ([@JLHwung](https://github.com/JLHwung)) +- `babel-generator` + - [#13825](https://github.com/babel/babel/pull/13825) Fix missing inner comments in function expressions ([@overlookmotel](https://github.com/overlookmotel)) + +#### :house: Internal + +- _Every package_ + - [#13772](https://github.com/babel/babel/pull/13772) Use `workspace:^` to specify `@babel/` dependencies ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- Other + - [#13856](https://github.com/babel/babel/pull/13856) Update to Yarn 3.1 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + - [#13867](https://github.com/babel/babel/pull/13867) Test on Node.js 17 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-helper-fixtures`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-runtime`, `babel-preset-react` + - [#13858](https://github.com/babel/babel/pull/13858) Force loading plugins/presets from the monorepo in tests ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-types` + - [#13844](https://github.com/babel/babel/pull/13844) [ts] precise return type on `createTypeAnnotationBasedOnTypeof` (babel-types) ([@lightmare](https://github.com/lightmare)) +- `babel-helpers` + - [#13841](https://github.com/babel/babel/pull/13841) minor: remove ineffectual helper names filter ([@lightmare](https://github.com/lightmare)) +- `babel-core`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx`, `babel-types` + - [#13820](https://github.com/babel/babel/pull/13820) Improve transform-react-jsx typings ([@JLHwung](https://github.com/JLHwung)) + +#### :running_woman: Performance + +- `babel-types` + - [#13843](https://github.com/babel/babel/pull/13843) Simplify (transpiled) babel-types builder wrappers ([@lightmare](https://github.com/lightmare)) + +## v7.15.8 (2021-10-06) + +#### :eyeglasses: Spec Compliance + +- `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` + - [#13788](https://github.com/babel/babel/pull/13788) Sort module export names ([@JLHwung](https://github.com/JLHwung)) +- `babel-parser` + - [#13769](https://github.com/babel/babel/pull/13769) Tokenize keywords-like identifier as new tokens ([@JLHwung](https://github.com/JLHwung)) + +#### :bug: Bug Fix + +- `babel-generator` + - [#13821](https://github.com/babel/babel/pull/13821) Fix missing inner comments in class expressions ([@overlookmotel](https://github.com/overlookmotel)) +- `babel-generator`, `babel-parser`, `babel-plugin-proposal-pipeline-operator` + - [#13803](https://github.com/babel/babel/pull/13803) Collect comments around parentheses in expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-plugin-transform-typescript` + - [#13800](https://github.com/babel/babel/pull/13800) fix: remove imported types from export ([@JLHwung](https://github.com/JLHwung)) + +#### :nail_care: Polish + +- `babel-core` + - [#13814](https://github.com/babel/babel/pull/13814) Improve debug logging for IgnoreList ([@paleite](https://github.com/paleite)) +- `babel-node` + - [#13784](https://github.com/babel/babel/pull/13784) [@babel/node] Forward the signal SIGTERM as well ([@julienw](https://github.com/julienw)) + +#### :house: Internal + +- [#13808](https://github.com/babel/babel/pull/13808) Update parser plugins for TypeScript tests ([@sosukesuzuki](https://github.com/sosukesuzuki)) +- [#13795](https://github.com/babel/babel/pull/13795) Fix Gulpfile path separator issue on Windows ([@NotWearingPants](https://github.com/NotWearingPants)) + +#### :running_woman: Performance + +- `babel-code-frame` + - [#13812](https://github.com/babel/babel/pull/13812) Optimization of string splitting ([@shoonia](https://github.com/shoonia)) + +## v7.15.7 (2021-09-17) + +#### :bug: Bug Fix + +- `babel-parser` + - [#13771](https://github.com/babel/babel/pull/13771) fix(babel-parser): Allow line break before `assert` return type ([@JuniorTour](https://github.com/JuniorTour)) + - [#13755](https://github.com/babel/babel/pull/13755) [estree] Fix conversion of `PrivateName` in `MemberExpression` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-standalone` + - [#13754](https://github.com/babel/babel/pull/13754) Move pipeline operator to Stage 2 ([@sdegutis](https://github.com/sdegutis)) +- Other + - [#13767](https://github.com/babel/babel/pull/13767) Fix `regexpu-core` bundling in `@babel/standalone` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + - [#13751](https://github.com/babel/babel/pull/13751) [eslint-parser] Represent `static` using a `Keyword` token ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-helper-validator-identifier` + - [#13759](https://github.com/babel/babel/pull/13759) Update Identifier definitions to Unicode 14 ([@JLHwung](https://github.com/JLHwung)) + +#### :house: Internal + +- `babel-parser` + - [#13768](https://github.com/babel/babel/pull/13768) Store token type as number ([@JLHwung](https://github.com/JLHwung)) +- `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` + - [#13739](https://github.com/babel/babel/pull/13739) Throw a better error when transforming imported bindings in types ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- Other + - [#13140](https://github.com/babel/babel/pull/13140) Update to Yarn 3 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + - [#13744](https://github.com/babel/babel/pull/13744) chore: add constraint for duplicate dependency declarations ([@merceyz](https://github.com/merceyz)) +- `babel-helper-transform-fixture-test-runner` + - [#13741](https://github.com/babel/babel/pull/13741) Replace the deprecated `produceCachedData` option used in `vm` module with `script.createCachedData()` ([@wafuwafu13](https://github.com/wafuwafu13)) + +## v7.15.6 (2021-09-09) + +#### :eyeglasses: Spec Compliance + +- `babel-parser`, `babel-plugin-proposal-pipeline-operator` + - [#13668](https://github.com/babel/babel/pull/13668) Fix right precedence of Hack pipes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix + +- `babel-parser`, `babel-plugin-proposal-pipeline-operator` + - [#13668](https://github.com/babel/babel/pull/13668) Fix right precedence of Hack pipes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-plugin-proposal-object-rest-spread` + - [#13711](https://github.com/babel/babel/pull/13711) fix: Duplicate function call in variable destructuring ([@dan-kez](https://github.com/dan-kez)) +- `babel-types` + - [#13733](https://github.com/babel/babel/pull/13733) id in import attributes should not be referenced ([@JLHwung](https://github.com/JLHwung)) +- `babel-parser` + - [#13731](https://github.com/babel/babel/pull/13731) fix(babel-parser): Fix end of `range` of `SequenceExpression` ([@sosukesuzuki](https://github.com/sosukesuzuki)) + +#### :house: Internal + +- `babel-helper-transform-fixture-test-runner` + - [#13738](https://github.com/babel/babel/pull/13738) Use `@types/node` for `vm` module ([@wafuwafu13](https://github.com/wafuwafu13)) +- `babel-preset-env` + - [#13737](https://github.com/babel/babel/pull/13737) Remove duplicate `dependency` and `devDependency` in preset-env ([@fyzhu](https://github.com/fyzhu)) + +## v7.15.5 (2021-09-04) + +#### :eyeglasses: Spec Compliance + +- `babel-parser` + - [#13727](https://github.com/babel/babel/pull/13727) Disallow `#a in #b in c` and similar expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :leftwards_arrow_with_hook: Revert + +- `babel-core` + - [#13732](https://github.com/babel/babel/pull/13732) Revert "fix: non breaking align options naming" ([@fedeci](https://github.com/fedeci)) + +## v7.15.4 (2021-09-02) + +#### :eyeglasses: Spec Compliance + +- `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` + - [#13601](https://github.com/babel/babel/pull/13601) Disallow reinitializing private elements ([@komyg](https://github.com/komyg)) + +#### :bug: Bug Fix + +- [#13638](https://github.com/babel/babel/pull/13638) [eslint] Allow `"latest"` as `ecmaVersion` ([@fisker](https://github.com/fisker)) +- `babel-traverse`, `babel-types` + - [#13723](https://github.com/babel/babel/pull/13723) `getBindingIdentifiers` should return params for private methods ([@JLHwung](https://github.com/JLHwung)) +- `babel-types` + - [#13715](https://github.com/babel/babel/pull/13715) [babel 8] fix: stricter rest element builder check ([@JLHwung](https://github.com/JLHwung)) +- `babel-helper-compilation-targets` + - [#13697](https://github.com/babel/babel/pull/13697) fix: pass `browserslistEnv` to `resolveTargets` ([@meskill](https://github.com/meskill)) +- `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-property-in-object` + - [#13656](https://github.com/babel/babel/pull/13656) fix: fix static private field shadowed by local variable ([@colinaaa](https://github.com/colinaaa)) +- `babel-plugin-transform-typescript` + - [#13664](https://github.com/babel/babel/pull/13664) [ts] Fix transform for nested namespaces shorthand syntax ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-parser` + - [#13680](https://github.com/babel/babel/pull/13680) fix(babel-parser): delete `static` property from class static block for TS ([@sosukesuzuki](https://github.com/sosukesuzuki)) + - [#13695](https://github.com/babel/babel/pull/13695) fix: assure left bracket is not consumed after dot ([@JLHwung](https://github.com/JLHwung)) +- `babel-core` + - [#13532](https://github.com/babel/babel/pull/13532) fix: non breaking align options naming ([@fedeci](https://github.com/fedeci)) + +#### :memo: Documentation + +- `babel-parser` + - [#13691](https://github.com/babel/babel/pull/13691) add missing ExportNamespaceSpecifier in spec.md ([@flyinox](https://github.com/flyinox)) + +#### :house: Internal + +- `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-syntax-class-static-block`, `babel-plugin-syntax-private-property-in-object`, `babel-plugin-syntax-top-level-await`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-preset-env`, `babel-standalone` + - [#13717](https://github.com/babel/babel/pull/13717) archive stage 4 parser plugins ([@JLHwung](https://github.com/JLHwung)) + +#### :running_woman: Performance + +- `babel-core`, `babel-generator`, `babel-helper-annotate-as-pure`, `babel-helper-builder-binary-assignment-operator-visitor`, `babel-helper-builder-react-jsx`, `babel-helper-define-map`, `babel-helper-explode-assignable-expression`, `babel-helper-function-name`, `babel-helper-get-function-arity`, `babel-helper-hoist-variables`, `babel-helper-member-expression-to-functions`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-optimise-call-expression`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-helper-simple-access`, `babel-helper-skip-transparent-expression-wrappers`, `babel-helper-split-export-declaration`, `babel-helper-wrap-function`, `babel-helpers`, `babel-preset-env`, `babel-template`, `babel-traverse` + - [#13685](https://github.com/babel/babel/pull/13685) Use named imports for babel types ([@JLHwung](https://github.com/JLHwung)) +- `babel-cli`, `babel-helper-define-map`, `babel-helpers`, `babel-node`, `babel-parser`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-classes`, `babel-plugin-transform-for-of`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-parameters`, `babel-traverse`, `babel-types` + - [#13609](https://github.com/babel/babel/pull/13609) perf: partially replace `.concat` with `.push` ([@fedeci](https://github.com/fedeci)) + +## v7.15.3 (2021-08-11) + +#### :eyeglasses: Spec Compliance + +- `babel-helpers`, `babel-plugin-transform-classes` + - [#13571](https://github.com/babel/babel/pull/13571) Derived constructors should not be allowed to return primitives ([@dhrubesh](https://github.com/dhrubesh)) + +#### :bug: Bug Fix + +- `babel-parser` + - [#13659](https://github.com/babel/babel/pull/13659) Fix parse error when using named import "as" with flow parser ([@doing-art](https://github.com/doing-art)) + - [#13655](https://github.com/babel/babel/pull/13655) [flow] Fix parsing of arrows in conditional expressions in parentheses ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + - [#13645](https://github.com/babel/babel/pull/13645) Disallow `(a => b)` when parsing Flow ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + - [#13657](https://github.com/babel/babel/pull/13657) fix(parser): add `attachComment` to `ParserOptions` type ([@sosukesuzuki](https://github.com/sosukesuzuki)) + +#### :house: Internal + +- [#13643](https://github.com/babel/babel/pull/13643) Use `@babel/eslint-parser/experimental-worker` for our own repo ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :running_woman: Performance + +- `babel-parser` + - [#13652](https://github.com/babel/babel/pull/13652) perf: minor tokenizer tweaks ([@lightmare](https://github.com/lightmare)) +- `babel-register` + - [#13654](https://github.com/babel/babel/pull/13654) Reduce stat calls in register ([@overlookmotel](https://github.com/overlookmotel)) + +## v7.15.2 (2021-08-08) + +#### :bug: Bug Fix + +- `babel-parser` + - [#13653](https://github.com/babel/babel/pull/13653) Add `.errors` to the `@babel/parser` return type definitions ([@sosukesuzuki](https://github.com/sosukesuzuki)) + - [#13641](https://github.com/babel/babel/pull/13641) Fix array destructuring elision parsing in TS arrow functions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.15.1 (2021-08-05) + +#### :leftwards_arrow_with_hook: Revert + +- `babel-plugin-transform-react-display-name` + - [#13637](https://github.com/babel/babel/pull/13637) Revert "Add display name after create context (#13501)" ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.15.0 (2021-08-04) + +#### :eyeglasses: Spec Compliance + +- `babel-parser` + - [#13523](https://github.com/babel/babel/pull/13523) feat(ts): raise error for abstract property with initializer ([@fedeci](https://github.com/fedeci)) + +#### :rocket: New Feature + +- `babel-parser` + - [#13229](https://github.com/babel/babel/pull/13229) Add `attachComment` parser option to disable comment attachment ([@JLHwung](https://github.com/JLHwung)) +- `babel-standalone` + - [#13476](https://github.com/babel/babel/pull/13476) standalone: update `preset-stage-*` ([@sosukesuzuki](https://github.com/sosukesuzuki)) + - [#13555](https://github.com/babel/babel/pull/13555) feat: support hack pipeline in `@babel/standalone` ([@JLHwung](https://github.com/JLHwung)) +- `babel-parser`, `babel-preset-env` + - [#13387](https://github.com/babel/babel/pull/13387) Enable top-level `await` parsing by default ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-plugin-transform-typescript`, `babel-preset-typescript` + - [#13324](https://github.com/babel/babel/pull/13324) Support TypeScript const enums ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-plugin-transform-typescript` + - [#13528](https://github.com/babel/babel/pull/13528) feat(typescript): implement namespace alias ([@colinaaa](https://github.com/colinaaa)) +- `babel-core`, `babel-helper-create-class-features-plugin`, `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` + - [#13290](https://github.com/babel/babel/pull/13290) feat: add `noIncompleteNsImportDetection` assumption to `plugin-transform-modules-commonjs` ([@fedeci](https://github.com/fedeci)) +- `babel-plugin-transform-react-display-name` + - [#13501](https://github.com/babel/babel/pull/13501) Add display name after create context ([@JLHwung](https://github.com/JLHwung)) +- `babel-parser`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-pipeline-operator` + - [#13416](https://github.com/babel/babel/pull/13416) Hack-pipe proposal with `%` topic token ([@js-choi](https://github.com/js-choi)) +- `babel-generator`, `babel-parser`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-pipeline-operator`, `babel-traverse`, `babel-types` + - [#13191](https://github.com/babel/babel/pull/13191) Add support for the "Hack" pipeline proposal ([@js-choi](https://github.com/js-choi)) +- `babel-plugin-transform-runtime` + - [#13398](https://github.com/babel/babel/pull/13398) Expose `@babel/eslint-parser/experimental-worker` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +- `babel-compat-data`, `babel-helper-compilation-targets`, `babel-preset-env` + - [#13448](https://github.com/babel/babel/pull/13448) Add support for rhino as a compilation target ([@gausie](https://github.com/gausie)) +- `babel-compat-data`, `babel-parser`, `babel-preset-env` + - [#13554](https://github.com/babel/babel/pull/13554) Enable ergonomic brand checks (`#priv in`) by default ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :bug: Bug Fix + +- `babel-parser`, `babel-plugin-transform-typescript` + - [#13513](https://github.com/babel/babel/pull/13513) [ts] support optional chain call with generic ([@lala7573](https://github.com/lala7573)) +- `babel-plugin-transform-typescript` + - [#13605](https://github.com/babel/babel/pull/13605) Handle typescript function overloading in a default export ([@tony-go](https://github.com/tony-go)) +- `babel-parser` + - [#13536](https://github.com/babel/babel/pull/13536) Fix `%==` parsing in hack pipes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + - [#13426](https://github.com/babel/babel/pull/13426) parser: Fix Hack/smart-pipe error positions ([@js-choi](https://github.com/js-choi)) + - [#13622](https://github.com/babel/babel/pull/13622) fix(ts): raise error for `export default interface {}` ([@a-tarasyuk](https://github.com/a-tarasyuk)) + +#### :memo: Documentation + +- [#13607](https://github.com/babel/babel/pull/13607) chore(doc): add jest specific pckg command ([@tony-go](https://github.com/tony-go)) + +--- + +- See [CHANGELOG - v7.0.0 to v7.14.9](/.github/CHANGELOG-v7.0.0-v7.14.9.md) for v7.0.0 to v7.14.9 changes. +- See [CHANGELOG - v7 prereleases](/.github/CHANGELOG-v7-prereleases.md) for v7.0.0-alpha.1 to v7.0.0-rc.4 changes. + +We have to split the v7 changelog in multiple files otherwise it's too big to render on GitHub. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fb7f4adc6f3..43b611c2bf4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: 'Check or update Yarn cache (fix w/ "yarn install")' @@ -40,7 +40,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: 'Check for unmet constraints (fix w/ "yarn constraints --fix")' @@ -66,7 +66,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [latest, 24, 22] + node-version: ["25.6.1", 24, 22] steps: - name: Checkout code uses: actions/checkout@v4 @@ -99,7 +99,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Build babel artifacts @@ -151,7 +151,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Build babel artifacts @@ -176,7 +176,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Install @@ -200,7 +200,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Install @@ -236,7 +236,7 @@ jobs: - name: Use Node.js latest # Run yarn on latest node uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Install @@ -292,7 +292,7 @@ jobs: if: matrix.node-version == '6' || matrix.node-version == '8' || matrix.node-version == '10' uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" test-windows-mac: name: Test on @@ -308,7 +308,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Install @@ -321,139 +321,6 @@ jobs: env: BABEL_ENV: test - build-babel8: - name: Build Babel 8 Artifacts - needs: prepare-yarn-cache - runs-on: ubuntu-latest - # Yarn PnP does not support native ESM yet (https://github.com/yarnpkg/berry/issues/638) - # env: - # YARN_NODE_LINKER: pnp # use pnp linker for better linking performance and stricter checks - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Use Node.js latest - uses: actions/setup-node@v4 - with: - node-version: latest - check-latest: true - cache: "yarn" - - name: Use ESM - run: node scripts/set-module-type.js module - - name: Build babel artifacts - run: | - make -j build-standalone-ci - env: - BABEL_ENV: test-legacy - BABEL_8_BREAKING: true - STRIP_BABEL_8_FLAG: true - - uses: actions/upload-artifact@v4 - with: - name: babel8-artifact - path: | - codemods/*/lib/**/* - eslint/*/lib/**/* - packages/*/lib/**/* - packages/babel-standalone/*.js - packages/babel-runtime/**/*.js - packages/babel-runtime-corejs2/**/*.js - packages/babel-runtime-corejs3/**/*.js - packages/babel-core/src/vendor/* - !**/node_modules/** - retention-days: 5 - - lint-babel8: - name: Lint (Babel 8) - needs: build-babel8 - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Use Node.js latest - uses: actions/setup-node@v4 - with: - node-version: latest - check-latest: true - cache: "yarn" - - name: Install - run: yarn install - - uses: actions/download-artifact@v4 - with: - name: babel8-artifact - - name: Lint - run: make -j lint-ci check-compat-data - env: - BABEL_ENV: test - BABEL_8_BREAKING: true - - test-babel8-coverage: - name: Test Babel 8 changes (with coverage) - needs: build-babel8 - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Use Node.js latest - uses: actions/setup-node@v4 - with: - node-version: latest - check-latest: true - cache: "yarn" - - name: Install - run: | - yarn install - - uses: actions/download-artifact@v4 - with: - name: babel8-artifact - - name: Use ESM - run: node scripts/set-module-type.js module - - name: Run tests - run: | - yarn c8 jest --ci - yarn test:esm - env: - BABEL_ENV: test - BABEL_COVERAGE: true - BABEL_8_BREAKING: true - - name: Upload coverage report - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: babel-8 - - test-babel8-windows-mac: - name: Test Babel 8 changes - needs: build-babel8 - strategy: - fail-fast: false - matrix: - os: [windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Use Node.js 20.19.0 - uses: actions/setup-node@v4 - with: - node-version: "20.19.0" # Node.js 20.19.0 is the first LTS supported by Babel 8 - cache: "yarn" - - name: Install - run: yarn install - - uses: actions/download-artifact@v4 - with: - name: babel8-artifact - - name: Use ESM - run: node scripts/set-module-type.js module - - name: Test - run: yarn jest --ci - env: - BABEL_ENV: test - BABEL_8_BREAKING: true - - name: Test ESM - run: yarn test:esm - env: - BABEL_ENV: test - BABEL_8_BREAKING: true - external-parser-tests: name: Third-party Parser Tests needs: build @@ -464,7 +331,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Install @@ -491,7 +358,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" # See https://github.com/babel/babel/pull/12906 @@ -558,7 +425,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" # See https://github.com/babel/babel/pull/12906 @@ -605,7 +472,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Install @@ -628,7 +495,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Install @@ -651,7 +518,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true - name: Checkout test runner uses: actions/checkout@v4 @@ -688,7 +555,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true - name: Install run: yarn install @@ -776,86 +643,11 @@ jobs: node lib/download-main-artifact/index.mjs ~/test262-main.tap env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Compare previous main branch & current results + BRANCH: '7.x' + - name: Compare previous 7.x branch & current results run: | cd babel-test262-runner node lib/compare-results ~/test262-main.tap ../test262.tap | tee ~/diff.tap # Specify bash to enable pipefail, so that "| tee" does not suppress the failure exit code. # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell shell: bash - - test262-babel8: - name: test262 - Babel 8 - runs-on: ubuntu-latest - if: github.repository == 'babel/babel' - needs: [build-babel8] - steps: - - name: Checkout Babel - uses: actions/checkout@v4 - - name: Use Node.js latest - uses: actions/setup-node@v4 - with: - node-version: latest - check-latest: true - - name: Install - run: yarn install - - uses: actions/download-artifact@v4 - with: - name: babel8-artifact - - name: Checkout test runner - uses: actions/checkout@v4 - with: - repository: babel/babel-test262-runner - path: babel-test262-runner - ref: main - - name: Install test runner - run: | - cd babel-test262-runner - npm ci - node lib/download-node - - name: Download test262 - run: make bootstrap-test262 - - name: Download test262 results cache - id: results-cache-restore - uses: actions/cache/restore@v4 - with: - key: test262-babel8-${{ hashFiles('Makefile') }} - restore-keys: | - test262-babel8- - path: babel-test262-runner/cache.lmdb - - name: Run test262 - run: | - cd babel-test262-runner - node lib/run-tests I_AM_SURE | tee ~/test262.tap - # Specify bash to enable pipefail, so that "| tee" does not suppress the failure exit code. - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell - shell: bash - env: - BABEL_PATH: ".." - TEST262_PATH: ../build/test262 - THREADS: 4 - - name: Create artifact with report results - uses: actions/upload-artifact@v4 - with: - name: test262-result-babel8 - path: ~/test262.tap - retention-days: 30 - - name: Download previous results - run: | - cd babel-test262-runner - node lib/download-main-artifact/index.mjs ~/test262-main.tap test262-result-babel8 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Compare previous main branch & current results - run: | - cd babel-test262-runner - node lib/compare-results ~/test262-main.tap ~/test262.tap | tee ~/diff.tap - # Specify bash to enable pipefail, so that "| tee" does not suppress the failure exit code. - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell - shell: bash - - name: Upload test262 results cache - if: success() || github.ref == 'refs/heads/main' - uses: actions/cache/save@v4 - with: - key: ${{ steps.results-cache-restore.outputs.cache-primary-key }} - path: babel-test262-runner/cache.lmdb diff --git a/.github/workflows/e2e-tests-breaking-esm.yml b/.github/workflows/e2e-tests-breaking-esm.yml deleted file mode 100644 index 56bc02c2eb47..000000000000 --- a/.github/workflows/e2e-tests-breaking-esm.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: E2E tests (breaking, esm) - -on: - push: - branches: - - main - pull_request: - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - e2e-publish: - name: Publish to local Verdaccio registry - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Use Node.js latest - uses: actions/setup-node@v4 - with: - node-version: "*" - cache: "yarn" - - name: Use ESM - run: make use-esm - - name: Publish - run: ./scripts/integration-tests/publish-local.sh - env: - BABEL_8_BREAKING: true - USE_ESM: true - - name: Pack published packages - working-directory: /tmp - run: tar -cvf verdaccio-workspace.tar verdaccio-workspace - - uses: actions/upload-artifact@v4 - with: - name: verdaccio-workspace - path: /tmp/verdaccio-workspace.tar - retention-days: 1 - - e2e-tests: - name: Test - needs: e2e-publish - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - # todo: verify which of these tests can be re-enabled - project: - - babel - - babel7plugins-babel8core - - create-react-app - # - vue-cli - # - jest - # todo: Enable this test when metro-source-map does not reassign NodePath cache - # https://github.com/facebook/metro/blob/29bb5f2ad3319ba8f4764c3993aa85c15f59af23/packages/metro-source-map/src/generateFunctionMap.js#L182 - # react-native - - prettier - # - angular-cli - steps: - - name: Get yarn1 cache directory path - id: yarn1-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - name: Checkout code - uses: actions/checkout@v4 - # Pin node to 22 for create-react-app project. - # The create-react-app e2e breaking test throws - # http fetch GET https://localhost:4873/zwitch/-/zwitch-1.0.5.tgz attempt 3 failed with ERR_SSL_WRONG_VERSION_NUMBER - # when installing on Node.js 24. It might be an npm issue. - - name: Use Node.js ${{ matrix.project == 'create-react-app' && '22' || 'latest' }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.project == 'create-react-app' && '22' || 'latest' }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - name: Use yarn1 cache - uses: actions/cache@v4 - id: yarn1-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn1-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}- - - name: Use yarn cache - uses: actions/cache@v4 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: ${{ runner.os }}-yarn-e2e-breaking-${{ matrix.project }}- - - name: Clean babel cache - run: | - rm -rf ${{ steps.yarn1-cache-dir-path.outputs.dir }}/*babel* - rm -rf ${{ steps.yarn-cache-dir-path.outputs.dir }}/*babel* - - uses: actions/download-artifact@v4 - with: - name: verdaccio-workspace - path: /tmp - - name: Unpack published packages - run: tar -C /tmp -xf /tmp/verdaccio-workspace.tar - - name: Test - run: ./scripts/integration-tests/e2e-${{ matrix.project }}.sh - env: - USE_ESM: true - BABEL_8_BREAKING: true diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 865c472dbe7e..cd7cc430ea10 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -25,7 +25,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: "*" + node-version: "25.6.1" cache: "yarn" - name: Publish run: ./scripts/integration-tests/publish-local.sh @@ -63,7 +63,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: "*" + node-version: "25.6.1" - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/pkg-pr-new.yml b/.github/workflows/pkg-pr-new.yml index 33843638e5b4..211d28f02d34 100644 --- a/.github/workflows/pkg-pr-new.yml +++ b/.github/workflows/pkg-pr-new.yml @@ -20,10 +20,9 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: "*" + node-version: "25.6.1" cache: "yarn" - name: Build run: make prepublish - name: Publish run: yarn pkg-pr-new publish --only-templates --yarn './codemods/*' './eslint/*' './packages/*' - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f20b6d4d27e9..6cd4921bd56d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,32 +14,14 @@ on: type: choice options: - patch - - breaking-prerelease permissions: contents: read jobs: - check-release-type: - name: Check the release type - runs-on: ubuntu-latest - outputs: - is-babel-8: >- - ${{ - (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v8')) || - (github.event_name == 'workflow_dispatch' && github.event.inputs.version == 'breaking-prerelease') - }} - steps: - - name: Log - run: | - echo "Is Babel 8 push? ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v8') }}" - echo "Is Babel 8 dispatch? ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version == 'breaking-prerelease' }}" - log-updates: name: Log packages to publish runs-on: ubuntu-latest - needs: check-release-type - if: needs.check-release-type.outputs.is-babel-8 == 'false' steps: - name: Checkout the new tag uses: actions/checkout@v4 @@ -58,7 +40,6 @@ jobs: contents: write # for Git to git push name: Create git tag and commit runs-on: ubuntu-latest - needs: check-release-type if: github.event_name == 'workflow_dispatch' outputs: branch: ${{ steps.branch-name.outputs.branch }} @@ -73,16 +54,10 @@ jobs: git config user.email "babel-bot@users.noreply.github.com" - name: Create new version (Babel 7) - if: needs.check-release-type.outputs.is-babel-8 == 'false' run: | make new-version-checklist yarn release-tool version -f @babel/standalone --yes patch - - name: Create new version (Babel 8) - if: needs.check-release-type.outputs.is-babel-8 == 'true' - run: | - make new-babel-8-version - - name: Compute temporary branch name id: branch-name run: | @@ -98,7 +73,6 @@ jobs: name: Build, Test and Publish runs-on: ubuntu-latest needs: - - check-release-type - git-version environment: npm permissions: @@ -106,8 +80,7 @@ jobs: # The default condition is success(), but this is false when one of the previous jobs is skipped if: | always() && - (needs.git-version.result == 'success' || needs.git-version.result == 'skipped') && - needs.check-release-type.result == 'success' + (needs.git-version.result == 'success' || needs.git-version.result == 'skipped') steps: - uses: actions/checkout@v4 with: @@ -115,7 +88,7 @@ jobs: - name: Use Node.js latest uses: actions/setup-node@v4 with: - node-version: latest + node-version: "25.6.1" check-latest: true cache: "yarn" - name: Checkout the temporary branch @@ -127,12 +100,6 @@ jobs: git config user.name "Babel Bot" git config user.email "babel-bot@users.noreply.github.com" - - name: Bump package versions (Babel 8) - if: needs.check-release-type.outputs.is-babel-8 == 'true' - run: | - make new-babel-8-version-create-commit-ci - YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn - - name: Build and Test run: make prepublish env: @@ -141,15 +108,13 @@ jobs: FORCE_COLOR: true # Note: `false` doesn't work here, because env vars are strings and Boolean('false') # is true. Use the empty string instead. - BABEL_8_BREAKING: ${{ needs.check-release-type.outputs.is-babel-8 == 'true' || '' }} + BABEL_8_BREAKING: '' - name: Publish to npm (Babel 7) run: yarn release-tool publish --yes - if: needs.check-release-type.outputs.is-babel-8 == 'false' - name: Generate babel-types docs continue-on-error: true - if: needs.check-release-type.outputs.is-babel-8 == 'false' run: | mkdir build node ./scripts/set-module-type.js commonjs @@ -157,32 +122,21 @@ jobs: - name: Upload babel-types docs continue-on-error: true - if: needs.check-release-type.outputs.is-babel-8 == 'false' uses: actions/upload-artifact@v4 with: name: babel-types-docs path: build/types.md retention-days: 3 - - name: Publish to npm (Babel 8) - # --tag-version-prefix must match the one set in `make new-babel-8-version-create-branch` - run: yarn release-tool publish --yes --tag next --tag-version-prefix tmp.v - if: needs.check-release-type.outputs.is-babel-8 == 'true' - env: - BABEL_8_BREAKING: true - USE_ESM: true - github-release: name: Create GitHub release draft runs-on: ubuntu-latest needs: - - check-release-type - git-version # The default condition is success(), but this is false when one of the previous jobs is skipped if: | always() && - (needs.git-version.result == 'success' || needs.git-version.result == 'skipped') && - needs.check-release-type.result == 'success' + (needs.git-version.result == 'success' || needs.git-version.result == 'skipped') outputs: is-main: ${{ steps.is-main.outputs.result == 1 }} changelog: ${{ steps.changelog.outputs.changelog }} @@ -192,11 +146,11 @@ jobs: with: fetch-depth: 0 - - name: Check if releasing from main + - name: Check if releasing from 7.x branch id: is-main uses: babel/actions/ref-matches-branch@v2 with: - name: main + name: '7.x' - name: Checkout the temporary branch if: needs.git-version.result == 'success' @@ -206,19 +160,7 @@ jobs: id: tags uses: babel/actions/get-release-tags@v2 with: - # GitHub workflow do not support the ternary operator: - # https://github.com/actions/runner/issues/409 - # `a && b || c` is equivalent to `a ? b : c` if `b` is truthy - prefix: ${{ needs.check-release-type.outputs.is-babel-8 == 'true' && 'v8' || 'v7' }} - - - name: Use Babel 8 PR labels - if: needs.check-release-type.outputs.is-babel-8 == 'true' - run: | - node -e " - const pkg = require('./package.json'); - pkg.changelog.labels = pkg.changelog.labels_breaking - fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2)) - " + prefix: v7 - name: Generate the changelog id: changelog @@ -226,7 +168,7 @@ jobs: with: from: ${{ steps.tags.outputs.old }} to: ${{ steps.tags.outputs.new }} - filter: ${{ needs.check-release-type.outputs.is-babel-8 == 'true' && 'v8' || 'v7' }} + filter: v7 env: GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} @@ -240,13 +182,12 @@ jobs: github-push: permissions: contents: write # for Git to git push - name: Push release commit to "main" + name: Push release commit to "7.x" branch runs-on: ubuntu-latest needs: - npm-release - github-release - git-version - - check-release-type # The default condition is success(), but this is false when one of the previous jobs is skipped if: | always() && @@ -257,6 +198,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: '7.x' - name: Checkout the temporary branch if: needs.git-version.result == 'success' run: git checkout ${{ needs.git-version.outputs.branch }} @@ -264,7 +206,7 @@ jobs: - name: Get changelog file name id: filename run: | - echo "filename=${{ needs.check-release-type.outputs.is-babel-8 == 'true' && '.github/CHANGELOG-v8.md' || 'CHANGELOG.md' }}" >> $GITHUB_OUTPUT + echo "filename=CHANGELOG.md" >> $GITHUB_OUTPUT - name: Update CHANGELOG.md uses: babel/actions/update-changelog@v2 @@ -280,7 +222,7 @@ jobs: - name: Push to GitHub run: | - git push "https://babel-bot:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" HEAD:main --follow-tags + git push "https://babel-bot:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" HEAD:7.x --follow-tags - name: Delete temporary branch from GitHub if: needs.git-version.result == 'success' @@ -290,12 +232,10 @@ jobs: name: Update Babel types docs runs-on: ubuntu-latest needs: - - check-release-type - github-release - github-push if: | always() && - needs.check-release-type.outputs.is-babel-8 == 'false' && needs.github-push.result == 'success' && needs.github-release.result == 'success' && needs.github-release.outputs.is-main diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f1c54c4177f..6732ef05a50b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,9 @@ _Note: Gaps between patch versions are faulty, broken or test releases._ -This file contains the changelog starting from v7.15.0. +This file contains the changelog from v7.28.6 onwards. Changes in this file are not included in the v8 release line, unless they also appear in its changelog. +- See [CHANGELOG - v7.15.0 to v7.28.5](/.github/CHANGELOG-v7.15.0-v7.28.5.md) for v7.15.0 to v7.28.5 changes. - See [CHANGELOG - v7.0.0 to v7.14.9](/.github/CHANGELOG-v7.0.0-v7.14.9.md) for v7.0.0 to v7.14.9 changes. - See [CHANGELOG - v7 prereleases](/.github/CHANGELOG-v7-prereleases.md) for v7.0.0-alpha.1 to v7.0.0-rc.4 changes. - See [CHANGELOG - v4](/.github/CHANGELOG-v4.md), [CHANGELOG - v5](/.github/CHANGELOG-v5.md), and [CHANGELOG - v6](/.github/CHANGELOG-v6.md) for v4.x-v6.x changes. @@ -24,2935 +25,59 @@ This file contains the changelog starting from v7.15.0. -## v7.28.5 (2025-10-23) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#17446](https://github.com/babel/babel/pull/17446) Allow `Runtime Errors for Function Call Assignment Targets` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-validator-identifier` - * [#17501](https://github.com/babel/babel/pull/17501) fix: update identifier to unicode 17 ([@fisker](https://github.com/fisker)) - -#### :bug: Bug Fix -* `babel-plugin-proposal-destructuring-private` - * [#17534](https://github.com/babel/babel/pull/17534) Allow mixing private destructuring and rest ([@CO0Ki3](https://github.com/CO0Ki3)) -* `babel-parser` - * [#17521](https://github.com/babel/babel/pull/17521) Improve `@babel/parser` error typing ([@JLHwung](https://github.com/JLHwung)) - * [#17491](https://github.com/babel/babel/pull/17491) fix: improve ts-only declaration parsing ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-proposal-discard-binding`, `babel-plugin-transform-destructuring` - * [#17519](https://github.com/babel/babel/pull/17519) fix: `rest` correctly returns plain array ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-helper-member-expression-to-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-optional-chaining`, `babel-traverse`, `babel-types` - * [#17503](https://github.com/babel/babel/pull/17503) Fix `JSXIdentifier` handling in `isReferencedIdentifier` ([@JLHwung](https://github.com/JLHwung)) -* `babel-traverse` - * [#17504](https://github.com/babel/babel/pull/17504) fix: ensure scope.push register in anonymous fn ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* `babel-types` - * [#17494](https://github.com/babel/babel/pull/17494) Type checking babel-types scripts ([@JLHwung](https://github.com/JLHwung)) - -#### :running_woman: Performance -* `babel-core` - * [#17490](https://github.com/babel/babel/pull/17490) Faster finding of locations in `buildCodeFrameError` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.28.4 (2025-09-05) - -#### :house: Internal -* `babel-core`, `babel-helper-check-duplicate-nodes`, `babel-traverse`, `babel-types` - * [#17493](https://github.com/babel/babel/pull/17493) Update Jest to v30.1.1 ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-regenerator` - * [#17455](https://github.com/babel/babel/pull/17455) chore: Clean up `transform-regenerator` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core` - * [#17474](https://github.com/babel/babel/pull/17474) Switch to @jridgewell/remapping ([@mrginglymus](https://github.com/mrginglymus)) -## v7.28.3 (2025-08-14) - -#### :eyeglasses: Spec Compliance -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-static-block`, `babel-preset-env` - * [#17443](https://github.com/babel/babel/pull/17443) [static blocks] Do not inject new static fields after static code ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix -* `babel-parser` - * [#17465](https://github.com/babel/babel/pull/17465) fix(parser/typescript): parse `import("./a", {with:{},})` ([@easrng](https://github.com/easrng)) - * [#17478](https://github.com/babel/babel/pull/17478) fix(parser): stop subscript parsing on async arrow ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime` - * [#17363](https://github.com/babel/babel/pull/17363) Do not save last yield in call in temp var ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :memo: Documentation -* [#17448](https://github.com/babel/babel/pull/17448) move eslint-{parser,plugin} docs to the website ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* [#17454](https://github.com/babel/babel/pull/17454) Enable type checking for `scripts` and `babel-worker.cjs` ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions` - * [#17444](https://github.com/babel/babel/pull/17444) Optimize do expression output ([@JLHwung](https://github.com/JLHwung)) -## v7.28.2 (2025-07-24) - -#### :bug: Bug Fix -* `babel-types` - * [#17445](https://github.com/babel/babel/pull/17445) [babel 7] Make `operator` param in `t.tsTypeOperator` optional ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` - * [#17441](https://github.com/babel/babel/pull/17441) fix: `regeneratorDefine` compatibility with es5 strict mode ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.28.1 (2025-07-12) - -#### :bug: Bug Fix -* `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator` - * [#17426](https://github.com/babel/babel/pull/17426) fix: `regenerator` correctly handles `throw` outside of `try` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :memo: Documentation -* `babel-types` - * [#17422](https://github.com/babel/babel/pull/17422) Add missing FunctionParameter docs ([@JLHwung](https://github.com/JLHwung)) - -#### :leftwards_arrow_with_hook: Revert -* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-types` - * [#17432](https://github.com/babel/babel/pull/17432) Do not mark OptionalMemberExpresion as LVal ([@JLHwung](https://github.com/JLHwung)) -## v7.28.0 (2025-07-02) - -#### :rocket: New Feature -* `babel-node` - * [#17147](https://github.com/babel/babel/pull/17147) Support top level await in node repl ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-types` - * [#17258](https://github.com/babel/babel/pull/17258) feat(matchesPattern): support super/private/meta ([@JLHwung](https://github.com/JLHwung)) -* `babel-compat-data`, `babel-preset-env` - * [#17355](https://github.com/babel/babel/pull/17355) Add explicit resource management to preset-env ([@JLHwung](https://github.com/JLHwung)) -* `babel-core`, `babel-parser` - * [#17390](https://github.com/babel/babel/pull/17390) Support `sourceType: "commonjs"` ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-parser` - * [#17346](https://github.com/babel/babel/pull/17346) Materialize `explicitResourceManagement` parser plugin ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-transform-object-rest-spread`, `babel-traverse`, `babel-types` - * [#17391](https://github.com/babel/babel/pull/17391) LVal coverage updates (Part 2) ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser`, `babel-traverse`, `babel-types` - * [#17378](https://github.com/babel/babel/pull/17378) Accept bigints in `t.bigIntLiteral` factory ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-discard-binding`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-explicit-resource-management`, `babel-plugin-transform-react-display-name`, `babel-types` - * [#17277](https://github.com/babel/babel/pull/17277) Transform discard binding ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-parser`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types` - * [#17163](https://github.com/babel/babel/pull/17163) Parse discard binding ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-helper-globals`, `babel-plugin-transform-classes`, `babel-traverse` - * [#17297](https://github.com/babel/babel/pull/17297) Create babel-helper-globals ([@JLHwung](https://github.com/JLHwung)) -* `babel-types` - * [#17009](https://github.com/babel/babel/pull/17009) feature: TSTypeOperator: keyof (#16799) ([@coderaiser](https://github.com/coderaiser)) - -#### :house: Internal -* `babel-compat-data`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-json-modules`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3` - * [#17403](https://github.com/babel/babel/pull/17403) Update `babel-polyfill` packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.27.7 (2025-06-26) - -#### :eyeglasses: Spec Compliance -* `babel-parser`, `babel-plugin-transform-classes` - * [#17203](https://github.com/babel/babel/pull/17203) Interepret parser `allow*` options as top level only ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser` - * [#17371](https://github.com/babel/babel/pull/17371) fix: disable using in ambient context ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-core` - * [#17392](https://github.com/babel/babel/pull/17392) Improve TS babel config loading ([@JLHwung](https://github.com/JLHwung)) -* `babel-types` - * [#17376](https://github.com/babel/babel/pull/17376) fix: support negative bigint in valueToNode ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-parameters` - * [#17352](https://github.com/babel/babel/pull/17352) fix: Params of `async function*` should throw synchronously ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-plugin-transform-destructuring`, `babel-plugin-transform-object-rest-spread` - * [#17389](https://github.com/babel/babel/pull/17389) Use `NodePath#splitExportDeclaration` in destructuring transforms ([@JLHwung](https://github.com/JLHwung)) -## v7.27.6 (2025-06-05) - -#### :bug: Bug Fix -* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` - * [#17366](https://github.com/babel/babel/pull/17366) fix: `finally` causes unexpected return value ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator`, `babel-parser`, `babel-types` - * [#17357](https://github.com/babel/babel/pull/17357) Ensure syntactic ordering when visiting array-type AST nodes ([@JLHwung](https://github.com/JLHwung)) -## v7.27.5 (2025-06-03) - -#### :bug: Bug Fix -* `babel-plugin-transform-regenerator` - * [#17359](https://github.com/babel/babel/pull/17359) fix: Unexpected infinite loop with `regenerator` for `try` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* Other - * [#17349](https://github.com/babel/babel/pull/17349) Map ESLint's `sourceType: commonjs` to script ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-parser` - * [#17333](https://github.com/babel/babel/pull/17333) Improve using declaration errors ([@JLHwung](https://github.com/JLHwung)) -## v7.27.4 (2025-05-30) - -#### :eyeglasses: Spec Compliance -* `babel-parser`, `babel-plugin-proposal-explicit-resource-management` - * [#17323](https://github.com/babel/babel/pull/17323) Disallow using in bare case statement ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-parser` - * [#17311](https://github.com/babel/babel/pull/17311) Improve parseExpression error messages ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#17287](https://github.com/babel/babel/pull/17287) Reduce `regenerator` size more ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3` - * [#17334](https://github.com/babel/babel/pull/17334) Use shorter method names for regenerator context ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#17268](https://github.com/babel/babel/pull/17268) Reduce `regenerator` helper size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core`, `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` - * [#17238](https://github.com/babel/babel/pull/17238) Split `regeneratorRuntime` into multiple helpers ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.27.3 (2025-05-27) - -#### :bug: Bug Fix -* `babel-generator` - * [#17324](https://github.com/babel/babel/pull/17324) Improve multiline comments handling in yield/await expression ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` - * [#17328](https://github.com/babel/babel/pull/17328) Correctly set `.displayName` on `GeneratorFunction` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-proposal-explicit-resource-management` - * [#17319](https://github.com/babel/babel/pull/17319) fix: handle shadowed binding in `for using of` body ([@JLHwung](https://github.com/JLHwung)) - * [#17317](https://github.com/babel/babel/pull/17317) fix: support named evaluation for using declaration ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-proposal-decorators`, `babel-types` - * [#17321](https://github.com/babel/babel/pull/17321) fix(converter): Remove `abstract` modifiers in class declaration to expression conversion ([@magic-akari](https://github.com/magic-akari)) -* `babel-helper-module-transforms`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` - * [#17257](https://github.com/babel/babel/pull/17257) Preserve class id when transforming using declarations with exported class ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser` - * [#17312](https://github.com/babel/babel/pull/17312) fix(parser): properly handle optional markers in generator class methods ([@magic-akari](https://github.com/magic-akari)) - * [#17307](https://github.com/babel/babel/pull/17307) fix(parser): Terminate modifier parsing at newline ([@magic-akari](https://github.com/magic-akari)) -* `babel-generator`, `babel-parser` - * [#17308](https://github.com/babel/babel/pull/17308) Improve import phase parsing ([@JLHwung](https://github.com/JLHwung)) -## v7.27.2 (2025-05-06) +## v7.29.1 (2026-02-04) #### :bug: Bug Fix -* `babel-parser` - * [#17289](https://github.com/babel/babel/pull/17289) fix: `@babel/parser/bin/index.js` contains `node:` protocol require ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#17291](https://github.com/babel/babel/pull/17291) fix: Private class method not found when TS and estree ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-object-rest-spread` - * [#17281](https://github.com/babel/babel/pull/17281) Fix: improve object rest handling in array pattern ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-modules-commonjs`, `babel-template` - * [#17284](https://github.com/babel/babel/pull/17284) fix(babel-template): Properly handle empty string replacements ([@magic-akari](https://github.com/magic-akari)) - -#### :running_woman: Performance -* `babel-cli` - * [#17285](https://github.com/babel/babel/pull/17285) Enable Node compile cache for `@babel/cli` ([@JLHwung](https://github.com/JLHwung)) -## v7.27.1 (2025-04-30) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#17254](https://github.com/babel/babel/pull/17254) Allow `using of` as lexical declaration within for ([@JLHwung](https://github.com/JLHwung)) - * [#17230](https://github.com/babel/babel/pull/17230) Disallow get/set in TSPropertySignature ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser`, `babel-types` - * [#17193](https://github.com/babel/babel/pull/17193) Stricter TSImportType options parsing ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-traverse` - * [#17137](https://github.com/babel/babel/pull/17137) fix: do expressions should allow early exit ([@kermanx](https://github.com/kermanx)) -* `babel-helper-wrap-function`, `babel-plugin-transform-async-to-generator` - * [#17251](https://github.com/babel/babel/pull/17251) Fix: propagate argument evaluation errors through async promise chain ([@magic-akari](https://github.com/magic-akari)) -* `babel-helper-remap-async-to-generator`, `babel-plugin-transform-async-to-generator` - * [#17231](https://github.com/babel/babel/pull/17231) fix apply()/call() annotated as pure ([@Lacsw](https://github.com/Lacsw)) -* `babel-helper-fixtures`, `babel-parser` - * [#17233](https://github.com/babel/babel/pull/17233) Create ChainExpression within TSInstantiationExpression ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-parser` - * [#17226](https://github.com/babel/babel/pull/17226) Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 2) ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser` - * [#17224](https://github.com/babel/babel/pull/17224) Fill optional AST properties when both estree and typescript parser plugin are enabled (Part 1) ([@JLHwung](https://github.com/JLHwung)) - * [#17080](https://github.com/babel/babel/pull/17080) Fix start of TSParameterProperty ([@JLHwung](https://github.com/JLHwung)) -* `babel-compat-data`, `babel-preset-env` - * [#17228](https://github.com/babel/babel/pull/17228) Update firefox bugfix compat data ([@JLHwung](https://github.com/JLHwung)) -* `babel-traverse` - * [#17156](https://github.com/babel/babel/pull/17156) fix: Objects and arrays with multiple references should not be evaluated ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-standalone` + * [#17771](https://github.com/babel/babel/pull/17771) [7.x backport] fix: ensure `targets.esmodules` is validated ([@JLHwung](https://github.com/JLHwung)) * `babel-generator` - * [#17216](https://github.com/babel/babel/pull/17216) Fix: support const type parameter in generator ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-traverse` - * [#17221](https://github.com/babel/babel/pull/17221) Reduce generated names size for the 10th-11th ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#17263](https://github.com/babel/babel/pull/17263) Remove unused `regenerator-runtime` dep in `@babel/runtime` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-compat-data`, `babel-preset-env` - * [#17256](https://github.com/babel/babel/pull/17256) Tune plugin compat data ([@JLHwung](https://github.com/JLHwung)) -* `babel-compat-data`, `babel-standalone` - * [#17236](https://github.com/babel/babel/pull/17236) migrate babel-compat-data build script to mjs ([@JLHwung](https://github.com/JLHwung)) -* Other - * [#17232](https://github.com/babel/babel/pull/17232) Bump typescript-eslint to 8.29.1 ([@JLHwung](https://github.com/JLHwung)) - * [#17219](https://github.com/babel/babel/pull/17219) test: add basic typescript-eslint integration tests ([@JLHwung](https://github.com/JLHwung)) - * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-register` - * [#16844](https://github.com/babel/babel/pull/16844) Migrate `@babel/register` to cts ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-cli`, `babel-compat-data`, `babel-core`, `babel-generator`, `babel-helper-compilation-targets`, `babel-helper-fixtures`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-plugin-test-runner`, `babel-helper-transform-fixture-test-runner`, `babel-helpers`, `babel-node`, `babel-parser`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-preset-env`, `babel-register`, `babel-standalone`, `babel-types` - * [#17207](https://github.com/babel/babel/pull/17207) Enforce node protocol import ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-regenerator` - * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` - * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-transform-regenerator` - * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers` - * [#17205](https://github.com/babel/babel/pull/17205) Inline regenerator in the relevant packages ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :microscope: Output optimization -* `babel-helpers`, `babel-plugin-transform-modules-commonjs`, `babel-runtime-corejs3` - * [#16538](https://github.com/babel/babel/pull/16538) Reduce `interopRequireWildcard` size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3` - * [#17213](https://github.com/babel/babel/pull/17213) Reduce `regeneratorRuntime` size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.27.0 (2025-03-24) - -#### :eyeglasses: Spec Compliance -* `babel-generator`, `babel-parser` - * [#16977](https://github.com/babel/babel/pull/16977) Default `importAttributesKeyword` to `with` ([@JLHwung](https://github.com/JLHwung)) + * [#17776](https://github.com/babel/babel/pull/17776) [7.x backport] Fix undefined when 64 indents ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.29.0 (2026-01-31) #### :rocket: New Feature -* `babel-helper-create-class-features-plugin`, `babel-traverse`, `babel-types` - * [#17169](https://github.com/babel/babel/pull/17169) Allow `traverseFast` to exit early ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser`, `babel-types` - * [#17110](https://github.com/babel/babel/pull/17110) Add `ImportAttributes` to `Standardized` and move its parser test fixtures ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator` - * [#17100](https://github.com/babel/babel/pull/17100) fix(babel-generator): add named export of generate function ([@vovkasm](https://github.com/vovkasm)) -* `babel-parser`, `babel-template` - * [#17149](https://github.com/babel/babel/pull/17149) Add `allowYieldOutsideFunction` to parser ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-typescript`, `babel-traverse` - * [#17102](https://github.com/babel/babel/pull/17102) feat: Add `upToScope` parameter to `hasBinding` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#17082](https://github.com/babel/babel/pull/17082) Support ESTree AccessorProperty ([@JLHwung](https://github.com/JLHwung)) -* `babel-types` - * [#17162](https://github.com/babel/babel/pull/17162) feat(babel-types): Add support for BigInt literal conversion in valueToNode ([@ishchhabra](https://github.com/ishchhabra)) - -#### :bug: Bug Fix -* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-class-properties` - * [#16816](https://github.com/babel/babel/pull/16816) fix: Class reference in type throws error ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-traverse` - * [#17170](https://github.com/babel/babel/pull/17170) fix: Reset child scopes when `scope.crawl()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-preset-typescript`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#17118](https://github.com/babel/babel/pull/17118) Fix: align behaviour to tsc `rewriteRelativeImportExtensions` ([@JLHwung](https://github.com/JLHwung)) -* `babel-cli` - * [#17182](https://github.com/babel/babel/pull/17182) fix: `@babel/cli` generates duplicate inline source maps ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-named-capturing-groups-regex`, `babel-types` - * [#17175](https://github.com/babel/babel/pull/17175) Generate computed proto key ([@JLHwung](https://github.com/JLHwung)) - -#### :running_woman: Performance * `babel-types` - * [#16870](https://github.com/babel/babel/pull/16870) perf: Improve builders of `@babel/types` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-regexp-features-plugin` - * [#17176](https://github.com/babel/babel/pull/17176) fix: improve duplicate named groups check ([@JLHwung](https://github.com/JLHwung)) -## v7.26.10 (2025-03-11) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#17159](https://github.com/babel/babel/pull/17159) Disallow decorator in array pattern ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-parser`, `babel-template` - * [#17164](https://github.com/babel/babel/pull/17164) Fix: always initialize ExportDeclaration attributes ([@JLHwung](https://github.com/JLHwung)) -* `babel-core` - * [#17142](https://github.com/babel/babel/pull/17142) fix: "Map maximum size exceeded" in deepClone ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser`, `babel-plugin-transform-typescript` - * [#17154](https://github.com/babel/babel/pull/17154) Update typescript parser tests ([@JLHwung](https://github.com/JLHwung)) -* `babel-traverse` - * [#17151](https://github.com/babel/babel/pull/17151) fix: Should not evaluate vars in child scope ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator` - * [#17153](https://github.com/babel/babel/pull/17153) fix: Correctly generate `abstract override` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#17107](https://github.com/babel/babel/pull/17107) Fix source type detection when parsing TypeScript ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-runtime`, `babel-runtime-corejs2`, `babel-runtime-corejs3` - * [#17173](https://github.com/babel/babel/pull/17173) Fix processing of replacement pattern with named capture groups ([@mmmsssttt404](https://github.com/[mmmsssttt404](https://github.com/mmmsssttt404))) - -#### :nail_care: Polish + * [#17750](https://github.com/babel/babel/pull/17750) [7.x backport] Add attributes import declaration builder ([@JLHwung](https://github.com/JLHwung)) * `babel-standalone` - * [#17158](https://github.com/babel/babel/pull/17158) Avoid warnings when re-bundling @babel/standalone with webpack ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-parser` - * [#17160](https://github.com/babel/babel/pull/17160) Left-value parsing cleanup ([@JLHwung](https://github.com/JLHwung)) -## v7.26.9 (2025-02-14) - -#### :bug: Bug Fix -* `babel-types` - * [#17103](https://github.com/babel/babel/pull/17103) fix: Definition for `TSPropertySignature.kind` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator`, `babel-types` - * [#17062](https://github.com/babel/babel/pull/17062) Print TypeScript optional/definite in ClassPrivateProperty ([@jamiebuilds-signal](https://github.com/jamiebuilds-signal)) - -#### :house: Internal -* `babel-types` - * [#17130](https://github.com/babel/babel/pull/17130) Use `.ts` files with explicit reexports to solve name conflicts ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core` - * [#17127](https://github.com/babel/babel/pull/17127) Do not depend on `@types/gensync` in Babel 7 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.26.7 (2025-01-24) - -#### :bug: Bug Fix -* `babel-helpers`, `babel-preset-env`, `babel-runtime-corejs3` - * [#17086](https://github.com/babel/babel/pull/17086) Make "object without properties" helpers ES6-compatible ([@tquetano-netflix](https://github.com/tquetano-netflix)) -* `babel-plugin-transform-typeof-symbol` - * [#17085](https://github.com/babel/babel/pull/17085) fix: Correctly handle `typeof` in arrow functions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#17079](https://github.com/babel/babel/pull/17079) Respect `ranges` option in estree method value ([@JLHwung](https://github.com/JLHwung)) -* `babel-core` - * [#17052](https://github.com/babel/babel/pull/17052) Do not try to parse .ts configs as JSON if natively supported ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-typescript` - * [#17050](https://github.com/babel/babel/pull/17050) fix: correctly resolve references to non-constant enum members ([@branchseer](https://github.com/branchseer)) -* `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types` - * [#17025](https://github.com/babel/babel/pull/17025) fix: Remove type-only `import x = y.z` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.26.6 (2025-01-13) - -#### :bug: Bug Fix -* `babel-plugin-transform-nullish-coalescing-operator` - * [#17061](https://github.com/babel/babel/pull/17061) fix: Chaining nullish coalescing operators output size regression ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.26.5 (2025-01-10) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#17011](https://github.com/babel/babel/pull/17011) Allow the dynamic `import.defer()` form of `import defer` ([@babel-bot](https://github.com/babel-bot)) - -#### :bug: Bug Fix -* `babel-plugin-transform-block-scoped-functions` - * [#17024](https://github.com/babel/babel/pull/17024) chore: Avoid calling `isInStrictMode` in Babel 7 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-typescript` - * [#17026](https://github.com/babel/babel/pull/17026) fix: Correctly generate exported const enums in namespace ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#17045](https://github.com/babel/babel/pull/17045) [estree] Unify method type parameters handling ([@JLHwung](https://github.com/JLHwung)) - * [#17013](https://github.com/babel/babel/pull/17013) fix: Correctly set position for `@(a.b)()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#16996](https://github.com/babel/babel/pull/16996) [estree] Adjust the start loc of class methods with type params ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-parser`, `babel-plugin-transform-flow-strip-types`, `babel-types` - * [#17028](https://github.com/babel/babel/pull/17028) Support flow jsx opening element type arguments ([@JLHwung](https://github.com/JLHwung)) -* `babel-compat-data`, `babel-preset-env` - * [#17031](https://github.com/babel/babel/pull/17031) fix: More accurate `transform-typeof-symbol` compat data ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator`, `babel-parser`, `babel-types` - * [#17019](https://github.com/babel/babel/pull/17019) Fix incomplete visitor keys ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-plugin-transform-nullish-coalescing-operator` - * [#16612](https://github.com/babel/babel/pull/16612) Improve nullish coalescing operator output ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.26.4 (2024-12-05) - -#### :leftwards_arrow_with_hook: Revert -* `babel-traverse` - * [#17005](https://github.com/babel/babel/pull/17005) Revert "perf: Improve scope information collection performance" ([@JLHwung](https://github.com/JLHwung)) -## v7.26.3 (2024-12-04) - -#### :bug: Bug Fix -* `babel-generator` - * [#16958](https://github.com/babel/babel/pull/16958) [preserveFormat] force semicolons when invalidating ASI ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-helper-builder-binary-assignment-operator-visitor`, `babel-plugin-transform-exponentiation-operator` - * [#16895](https://github.com/babel/babel/pull/16895) Remove helper-builder-binary-assignment-operator-visitor ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :running_woman: Performance -* `babel-generator` - * [#16959](https://github.com/babel/babel/pull/16959) perf: Reduce the use of temporary objects ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-traverse` - * [#16923](https://github.com/babel/babel/pull/16923) perf: Improve scope information collection performance ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#16964](https://github.com/babel/babel/pull/16964) perf: Avoid repeated traversal when creating scope ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-modules-commonjs` - * [#16954](https://github.com/babel/babel/pull/16954) perf: Remove use of `simplifyAccess` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.26.2 (2024-10-30) - -#### :bug: Bug Fix -* `babel-parser` - * [#16903](https://github.com/babel/babel/pull/16903) fix: Parse placeholder for TS namespace ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#16937](https://github.com/babel/babel/pull/16937) fix: Account for offsets when creating new Position instances ([@DylanPiercey](https://github.com/DylanPiercey)) -* `babel-generator` - * [#16948](https://github.com/babel/babel/pull/16948) Fix mapping of tokens with generated nodes in between ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.26.1 (2024-10-25) + * [#17663](https://github.com/babel/babel/pull/17663) [7.x backport] feat(standalone): export async transform ([@JLHwung](https://github.com/JLHwung)) + * [#17725](https://github.com/babel/babel/pull/17725) [7.x backport] feat: read standalone targets from data-targets ([@JLHwung](https://github.com/JLHwung)) #### :bug: Bug Fix * `babel-parser` - * [#16936](https://github.com/babel/babel/pull/16936) fix(parser): offset internal index locations by startIndex ([@DylanPiercey](https://github.com/DylanPiercey)) -## v7.26.0 (2024-10-25) - -#### :rocket: New Feature -* `babel-core`, `babel-generator`, `babel-parser`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes`, `babel-preset-env`, `babel-standalone`, `babel-types` - * [#16850](https://github.com/babel/babel/pull/16850) Enable import attributes parsing by default ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core` - * [#16862](https://github.com/babel/babel/pull/16862) feat: support async plugin's pre/post ([@timofei-iatsenko](https://github.com/timofei-iatsenko)) -* `babel-compat-data`, `babel-plugin-proposal-regexp-modifiers`, `babel-plugin-transform-regexp-modifiers`, `babel-preset-env`, `babel-standalone` - * [#16692](https://github.com/babel/babel/pull/16692) Add `transform-regexp-modifiers` to `preset-env` ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser` - * [#16849](https://github.com/babel/babel/pull/16849) feat: add `startIndex` parser option ([@DylanPiercey](https://github.com/DylanPiercey)) -* `babel-generator`, `babel-parser`, `babel-plugin-syntax-flow` - * [#16841](https://github.com/babel/babel/pull/16841) Always enable parsing of Flow enums ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-preset-typescript`, `babel-runtime-corejs3` - * [#16794](https://github.com/babel/babel/pull/16794) Support `import()` in `rewriteImportExtensions` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator`, `babel-parser` - * [#16708](https://github.com/babel/babel/pull/16708) Add experimental format-preserving mode to `@babel/generator` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix -* `babel-core` - * [#16928](https://github.com/babel/babel/pull/16928) Workaround Node.js bug for parallel loading of TLA modules ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16926](https://github.com/babel/babel/pull/16926) Fix loading of modules with TLA in Node.js 23 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-plugin-proposal-json-modules`, `babel-plugin-transform-json-modules`, `babel-standalone` - * [#16924](https://github.com/babel/babel/pull/16924) Rename `proposal-json-modules` to `transform-json-modules` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-code-frame`, `babel-highlight` - * [#16896](https://github.com/babel/babel/pull/16896) Inline `@babel/highlight` in `@babel/code-frame` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-parser`, `babel-types` - * [#16732](https://github.com/babel/babel/pull/16732) Add `kind` to `TSModuleDeclaration` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :running_woman: Performance -* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` - * [#16882](https://github.com/babel/babel/pull/16882) perf: Improve module transforms ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.25.9 (2024-10-22) - -#### :bug: Bug Fix -* `babel-parser`, `babel-template`, `babel-types` - * [#16905](https://github.com/babel/babel/pull/16905) fix: Keep type annotations in `syntacticPlaceholders` mode ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-compilation-targets`, `babel-preset-env` - * [#16907](https://github.com/babel/babel/pull/16907) fix: support BROWSERSLIST{,_CONFIG} env ([@JLHwung](https://github.com/JLHwung)) -* Other - * [#16884](https://github.com/babel/babel/pull/16884) Analyze `ClassAccessorProperty` to prevent the `no-undef` rule ([@victorenator](https://github.com/victorenator)) - -#### :house: Internal -* `babel-helper-transform-fixture-test-runner` - * [#16914](https://github.com/babel/babel/pull/16914) remove test options flaky ([@JLHwung](https://github.com/JLHwung)) - -#### :running_woman: Performance -* `babel-parser`, `babel-types` - * [#16918](https://github.com/babel/babel/pull/16918) perf: Make `VISITOR_KEYS` etc. faster to access ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.25.8 (2024-10-10) - -#### :bug: Bug Fix -* `babel-core` - * [#16888](https://github.com/babel/babel/pull/16888) Restore public API of `resolvePlugin`/`resolvePreset` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-parser`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-import-defer`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-throw-expressions`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-export-namespace-from`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-property-in-object`, `babel-preset-env` - * [#16824](https://github.com/babel/babel/pull/16824) Inline one-line syntax plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.25.7 (2024-10-02) - -#### :bug: Bug Fix -* `babel-helper-validator-identifier` - * [#16825](https://github.com/babel/babel/pull/16825) fix: update identifier to unicode 16 ([@JLHwung](https://github.com/JLHwung)) + * [#17765](https://github.com/babel/babel/pull/17765) fix(parser): correctly parse type assertions in `extends` clause ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#17723](https://github.com/babel/babel/pull/17723) [7.x backport] fix(parser): improve super type argument parsing ([@JLHwung](https://github.com/JLHwung)) * `babel-traverse` - * [#16814](https://github.com/babel/babel/pull/16814) fix: issue with node path keys updated on unrelated paths ([@DylanPiercey](https://github.com/DylanPiercey)) -* `babel-plugin-transform-classes` - * [#16797](https://github.com/babel/babel/pull/16797) Use an inclusion rather than exclusion list for `super()` check ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#16788](https://github.com/babel/babel/pull/16788) Fix printing of TS `infer` in compact mode ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16785](https://github.com/babel/babel/pull/16785) Print TS type annotations for destructuring in assignment pattern ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16778](https://github.com/babel/babel/pull/16778) Respect `[no LineTerminator here]` after nodes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-types` - * [#16852](https://github.com/babel/babel/pull/16852) Add deprecated JSDOC for fields ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-core` - * [#16820](https://github.com/babel/babel/pull/16820) Allow sync loading of ESM when `--experimental-require-module` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-compilation-targets`, `babel-helper-plugin-utils`, `babel-preset-env` - * [#16858](https://github.com/babel/babel/pull/16858) Add browserslist config to external dependency ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-proposal-destructuring-private`, `babel-plugin-syntax-decimal`, `babel-plugin-syntax-import-reflection`, `babel-standalone` - * [#16809](https://github.com/babel/babel/pull/16809) Archive syntax-import-reflection and syntax-decimal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#16779](https://github.com/babel/babel/pull/16779) Simplify logic for `[no LineTerminator here]` before nodes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#17708](https://github.com/babel/babel/pull/17708) fix(traverse): provide a hub when traversing a File or Program and no parentPath is given ([@simbahax](https://github.com/simbahax)) +* `babel-plugin-transform-block-scoping`, `babel-traverse` + * [#17737](https://github.com/babel/babel/pull/17737) [7.x backport] fix: Rename switch discriminant references when body creates shadowing variable ([@magic-akari](https://github.com/magic-akari)) #### :running_woman: Performance -* `babel-plugin-transform-typescript` - * [#16875](https://github.com/babel/babel/pull/16875) perf: Avoid extra cloning of namespaces ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-types` - * [#16842](https://github.com/babel/babel/pull/16842) perf: Improve @babel/types builders ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#16828](https://github.com/babel/babel/pull/16828) Only access `BABEL_TYPES_8_BREAKING` at startup ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.25.6 (2024-08-29) - -#### :bug: Bug Fix -* `babel-generator` - * [#16783](https://github.com/babel/babel/pull/16783) Properly print inner comments in TS array types ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16775](https://github.com/babel/babel/pull/16775) fix: jsx whitespace is not properly preserved when retainLines ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-traverse` - * [#16727](https://github.com/babel/babel/pull/16727) fix: `path.getAssignmentIdentifiers` may be `undefined` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#16761](https://github.com/babel/babel/pull/16761) fix: improve static canFollowModifier checks ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-transform-optional-chaining`, `babel-runtime-corejs3` - * [#16769](https://github.com/babel/babel/pull/16769) Only wrap functions in `superPropertyGet` helper ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-generator`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env` - * [#16780](https://github.com/babel/babel/pull/16780) Do not enforce printing space between `(` and comments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes` - * [#16781](https://github.com/babel/babel/pull/16781) Don't throw when enabling both syntax-import-{assertions,attributes} ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#16782](https://github.com/babel/babel/pull/16782) TS union/intersection nested in union does not need parens ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-generator` - * [#16777](https://github.com/babel/babel/pull/16777) Remove unused `parent` params in the generator ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.25.5 (2024-08-23) - -#### :bug: Bug Fix -* `babel-generator`, `babel-traverse` - * [#16764](https://github.com/babel/babel/pull/16764) fix: Generate parentheses correctly ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-generator` - * [#16738](https://github.com/babel/babel/pull/16738) Only force-parenthesize `satisfies`'s LHS if it has newlines ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.25.4 (2024-08-22) +* `babel-generator`, `babel-runtime-corejs3` + * [#17642](https://github.com/babel/babel/pull/17642) [Babel 7] Improve generator performance ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +## v7.28.6 (2026-01-12) #### :bug: Bug Fix -* `babel-traverse` - * [#16756](https://github.com/babel/babel/pull/16756) fix: Skip computed key when renaming ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16755](https://github.com/babel/babel/pull/16755) fix: Decorator 2018-09 may throw an exception ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-types` - * [#16710](https://github.com/babel/babel/pull/16710) Visit AST fields nodes according to their syntactical order ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#16709](https://github.com/babel/babel/pull/16709) Print semicolon after TS `export namespace as A` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-cli`, `babel-code-frame`, `babel-core`, `babel-helper-check-duplicate-nodes`, `babel-helper-fixtures`, `babel-helper-plugin-utils`, `babel-node`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-property-mutators`, `babel-preset-env`, `babel-traverse`, `babel-types` + * [#17589](https://github.com/babel/babel/pull/17589) Improve Unicode handling in code-frame tokenizer ([@JLHwung](https://github.com/JLHwung)) +* `babel-plugin-transform-regenerator` + * [#17556](https://github.com/babel/babel/pull/17556) fix: `transform-regenerator` correctly handles scope ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) +* `babel-plugin-transform-react-jsx` + * [#17538](https://github.com/babel/babel/pull/17538) fix: Keep jsx comments ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) #### :nail_care: Polish -* `babel-generator`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-typescript`, `babel-runtime-corejs2`, `babel-runtime`, `babel-traverse` - * [#16722](https://github.com/babel/babel/pull/16722) Avoid unnecessary parens around sequence expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-plugin-transform-class-properties` - * [#16714](https://github.com/babel/babel/pull/16714) Avoid unnecessary parens around exported arrow functions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-transform-object-rest-spread` - * [#16712](https://github.com/babel/babel/pull/16712) Avoid printing unnecessary parens around object destructuring ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :microscope: Output optimization -* `babel-generator` - * [#16740](https://github.com/babel/babel/pull/16740) Avoid extra spaces between comments/regexps in compact mode ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.25.3 (2024-07-31) - -#### :bug: Bug Fix -* `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-traverse` - * [#16699](https://github.com/babel/babel/pull/16699) Avoid validating visitors produced by `traverse.visitors.merge` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-parser` - * [#16688](https://github.com/babel/babel/pull/16688) Add `@babel/types` as a dependency of `@babel/parser` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.25.2 (2024-07-30) - -#### :bug: Bug Fix -* `babel-core`, `babel-traverse` - * [#16695](https://github.com/babel/babel/pull/16695) Ensure that `requeueComputedKeyAndDecorators` is available ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.25.1 (2024-07-28) - -#### :bug: Bug Fix -* `babel-plugin-transform-function-name` - * [#16683](https://github.com/babel/babel/pull/16683) fix: `ensureFunctionName` may be undefined ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-react-constant-elements` - * [#16582](https://github.com/babel/babel/pull/16582) fix plugin-transform-react-constant-elements transform JSXFrament but not add JSXExpressionContainer ([@keiseiTi](https://github.com/keiseiTi)) -* `babel-traverse` - * [#16587](https://github.com/babel/babel/pull/16587) fix: fixed issue16583 + test ([@nerodesu017](https://github.com/nerodesu017)) - -#### :house: Internal -* [#16663](https://github.com/babel/babel/pull/16663) Test eslint plugin against eslint 9 ([@JLHwung](https://github.com/JLHwung)) -## v7.25.0 (2024-07-26) - -#### :eyeglasses: Spec Compliance -* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs3` - * [#16537](https://github.com/babel/babel/pull/16537) `await using` normative updates ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-typescript` - * [#16602](https://github.com/babel/babel/pull/16602) Ensure enum members syntactically determinable to be strings do not get reverse mappings ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :rocket: New Feature -* `babel-helper-create-class-features-plugin`, `babel-helper-function-name`, `babel-helper-plugin-utils`, `babel-helper-wrap-function`, `babel-plugin-bugfix-safari-class-field-initializer-scope`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-transform-classes`, `babel-plugin-transform-function-name`, `babel-preset-env`, `babel-traverse`, `babel-types` - * [#16658](https://github.com/babel/babel/pull/16658) Move `ensureFunctionName` to `NodePath.prototype` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-hoist-variables`, `babel-helper-plugin-utils`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-transform-modules-systemjs`, `babel-traverse` - * [#16644](https://github.com/babel/babel/pull/16644) Move `hoistVariables` to `Scope.prototype` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-helper-split-export-declaration`, `babel-plugin-transform-classes`, `babel-traverse`, `babel-types` - * [#16645](https://github.com/babel/babel/pull/16645) Move `splitExportDeclaration` to `NodePath.prototype` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-helper-environment-visitor`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-classes`, `babel-traverse` - * [#16649](https://github.com/babel/babel/pull/16649) Move `environment-visitor` helper into `@babel/traverse` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-parser` - * [#16480](https://github.com/babel/babel/pull/16480) Expose wether a module has TLA or not as `.extra.async` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-compat-data`, `babel-plugin-bugfix-safari-class-field-initializer-scope`, `babel-preset-env` - * [#16569](https://github.com/babel/babel/pull/16569) Introduce `bugfix-safari-class-field-initializer-scope` ([@davidtaylorhq](https://github.com/davidtaylorhq)) -* `babel-plugin-transform-block-scoping`, `babel-traverse`, `babel-types` - * [#16551](https://github.com/babel/babel/pull/16551) Add `NodePath#getAssignmentIdentifiers` ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-import-to-platform-api`, `babel-plugin-proposal-json-modules` - * [#16579](https://github.com/babel/babel/pull/16579) Add `uncheckedRequire` option for JSON imports to CJS ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-transform-fixture-test-runner`, `babel-node` - * [#16642](https://github.com/babel/babel/pull/16642) Allow using custom config in `babel-node --eval` ([@slatereax](https://github.com/slatereax)) -* `babel-compat-data`, `babel-helper-create-regexp-features-plugin`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-duplicate-named-capturing-groups-regex`, `babel-preset-env`, `babel-standalone` - * [#16445](https://github.com/babel/babel/pull/16445) Add `duplicate-named-capturing-groups-regex` to `preset-env` ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-generator` - * [#16678](https://github.com/babel/babel/pull/16678) Print parens around as expressions on the LHS ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-template`, `babel-types` - * [#15286](https://github.com/babel/babel/pull/15286) fix: Props are lost when the template replaces the node ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* Other - * [#16674](https://github.com/babel/babel/pull/16674) bump gulp to 5 ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator` - * [#16651](https://github.com/babel/babel/pull/16651) Simplify the printing logic for `(` before ambiguous tokens ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-function-name`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-function-name`, `babel-preset-env`, `babel-traverse` - * [#16652](https://github.com/babel/babel/pull/16652) Simplify `helper-function-name` logic ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :running_woman: Performance -* `babel-parser`, `babel-plugin-proposal-pipeline-operator` - * [#16461](https://github.com/babel/babel/pull/16461) Some minor parser performance improvements for ts ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :microscope: Output optimization -* `babel-plugin-transform-classes` - * [#16670](https://github.com/babel/babel/pull/16670) Reduce redundant `assertThisInitialized` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-helper-replace-supers`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-object-super`, `babel-plugin-transform-private-methods`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16374](https://github.com/babel/babel/pull/16374) Improve `super.x` output ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes` - * [#16656](https://github.com/babel/babel/pull/16656) Simplify output for anonymous classes with no methods ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.24.10 (2024-07-16) - -#### :bug: Bug Fix -* `babel-generator` - * [#16648](https://github.com/babel/babel/pull/16648) Fix parens detection for object&function in `as`/`satisfies` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.24.9 (2024-07-15) - -#### :bug: Bug Fix * `babel-core`, `babel-standalone` - * [#16639](https://github.com/babel/babel/pull/16639) Avoid `require()` call in `@babel/standalone` bundle ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-types` - * [#16638](https://github.com/babel/babel/pull/16638) fix: provide legacy typings for TS < 4.1 ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-generator`, `babel-plugin-transform-optional-chaining` - * [#16617](https://github.com/babel/babel/pull/16617) Avoid extra parens in TS `as`/`satisfies` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-helper-module-transforms` - * [#16629](https://github.com/babel/babel/pull/16629) Lazy top-level initializations for module transforms ([@guybedford](https://github.com/guybedford)) -## v7.24.8 (2024-07-11) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#16567](https://github.com/babel/babel/pull/16567) Do not use strict mode in TS `declare` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :bug: Bug Fix -* `babel-generator` - * [#16630](https://github.com/babel/babel/pull/16630) Correctly print parens around `in` in `for` heads ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16626](https://github.com/babel/babel/pull/16626) Fix printing of comments in `await using` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16591](https://github.com/babel/babel/pull/16591) fix typescript code generation for yield expression inside type expre… ([@SreeXD](https://github.com/SreeXD)) -* `babel-parser` - * [#16613](https://github.com/babel/babel/pull/16613) Disallow destructuring assignment in `using` declarations ([@H0onnn](https://github.com/H0onnn)) - * [#16490](https://github.com/babel/babel/pull/16490) fix: do not add `.value: undefined` to regexp literals ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-types` - * [#16615](https://github.com/babel/babel/pull/16615) Remove boolean props from `ObjectTypeInternalSlot` visitor keys ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-typescript` - * [#16566](https://github.com/babel/babel/pull/16566) fix: Correctly handle `export import x =` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-generator` - * [#16625](https://github.com/babel/babel/pull/16625) Avoid unnecessary parens around `async` in `for await` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-traverse` - * [#16619](https://github.com/babel/babel/pull/16619) Avoid checking `Scope.globals` multiple times ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.24.7 (2024-06-05) - -#### :bug: Bug Fix -* `babel-node` - * [#16554](https://github.com/babel/babel/pull/16554) Allow extra flags in babel-node ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-traverse` - * [#16522](https://github.com/babel/babel/pull/16522) fix: incorrect `constantViolations` with destructuring ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-transform-fixture-test-runner`, `babel-plugin-proposal-explicit-resource-management` - * [#16524](https://github.com/babel/babel/pull/16524) fix: Transform `using` in `switch` correctly ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-helpers`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16525](https://github.com/babel/babel/pull/16525) Delete unused array helpers ([@blakewilson](https://github.com/blakewilson)) -## v7.24.6 (2024-05-24) - -#### :bug: Bug Fix -* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-class-properties` - * [#16514](https://github.com/babel/babel/pull/16514) Fix source maps for private member expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-generator`, `babel-plugin-transform-modules-commonjs` - * [#16515](https://github.com/babel/babel/pull/16515) Fix source maps for template literals ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16485](https://github.com/babel/babel/pull/16485) Support undecorated static accessor in anonymous classes ([@JLHwung](https://github.com/JLHwung)) - * [#16484](https://github.com/babel/babel/pull/16484) Fix decorator bare yield await ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-runtime-corejs3` - * [#16483](https://github.com/babel/babel/pull/16483) Fix: throw TypeError if addInitializer is called after finished ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser`, `babel-plugin-transform-typescript` - * [#16476](https://github.com/babel/babel/pull/16476) fix: Correctly parse `cls.fn = x` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-core`, `babel-helpers`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16501](https://github.com/babel/babel/pull/16501) Generate helper metadata at build time ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers` - * [#16499](https://github.com/babel/babel/pull/16499) Add `tsconfig.json` for `@babel/helpers/src/helpers` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-cli`, `babel-helpers`, `babel-plugin-external-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16495](https://github.com/babel/babel/pull/16495) Move all runtime helpers to individual files ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser`, `babel-traverse` - * [#16482](https://github.com/babel/babel/pull/16482) Statically generate boilerplate for bitfield accessors ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* Other - * [#16466](https://github.com/babel/babel/pull/16466) Migrate import assertions syntax ([@JLHwung](https://github.com/JLHwung)) -## v7.24.5 (2024-04-29) - -#### :bug: Bug Fix -* `babel-plugin-transform-classes`, `babel-traverse` - * [#16377](https://github.com/babel/babel/pull/16377) fix: TypeScript annotation affects output ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs3` - * [#16440](https://github.com/babel/babel/pull/16440) Fix suppressed error order ([@sossost](https://github.com/sossost)) - * [#16408](https://github.com/babel/babel/pull/16408) Await nullish async disposable ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-parser` - * [#16407](https://github.com/babel/babel/pull/16407) Recover from exported `using` declaration ([@JLHwung](https://github.com/JLHwung)) + * [#17606](https://github.com/babel/babel/pull/17606) Polish(standalone): improve message on invalid preset/plugin ([@JLHwung](https://github.com/JLHwung)) #### :house: Internal -* Other - * [#16414](https://github.com/babel/babel/pull/16414) Relax ESLint peerDependency constraint to allow v9 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#16425](https://github.com/babel/babel/pull/16425) Improve `@babel/parser` AST types ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16417](https://github.com/babel/babel/pull/16417) Always pass type argument to `.startNode` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-helper-member-expression-to-functions`, `babel-helper-module-transforms`, `babel-helper-split-export-declaration`, `babel-helper-wrap-function`, `babel-helpers`, `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-traverse` - * [#16439](https://github.com/babel/babel/pull/16439) Make `NodePath` distributive ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-proposal-partial-application`, `babel-types` - * [#16421](https://github.com/babel/babel/pull/16421) Remove `JSXNamespacedName` from valid `CallExpression` args ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-class-properties`, `babel-preset-env` - * [#16406](https://github.com/babel/babel/pull/16406) Do not load unnecessary Babel 7 syntax plugins in Babel 8 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-import-attributes-to-assertions`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-syntax-async-do-expressions`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-syntax-do-expressions`, `babel-plugin-syntax-explicit-resource-management`, `babel-plugin-syntax-export-default-from`, `babel-plugin-syntax-flow`, `babel-plugin-syntax-function-bind`, `babel-plugin-syntax-function-sent`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes`, `babel-plugin-syntax-import-defer`, `babel-plugin-syntax-import-source`, `babel-plugin-syntax-jsx`, `babel-plugin-syntax-module-blocks`, `babel-plugin-syntax-optional-chaining-assign`, `babel-plugin-syntax-partial-application`, `babel-plugin-syntax-pipeline-operator`, `babel-plugin-syntax-throw-expressions`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-dotall-regex`, `babel-plugin-transform-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-explicit-resource-management`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-regexp-modifiers`, `babel-plugin-transform-unicode-property-regex`, `babel-plugin-transform-unicode-sets-regex` + * [#17580](https://github.com/babel/babel/pull/17580) Allow Babel 8 in compatible Babel 7 plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) #### :running_woman: Performance -* `babel-helpers`, `babel-preset-env`, `babel-runtime-corejs3` - * [#16357](https://github.com/babel/babel/pull/16357) Performance: improve `objectWithoutPropertiesLoose` on V8 ([@romgrk](https://github.com/romgrk)) -## v7.24.4 (2024-04-03) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#16403](https://github.com/babel/babel/pull/16403) Forbid initializerless using ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-runtime-corejs3` - * [#16388](https://github.com/babel/babel/pull/16388) Ensure decorators are callable ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-generator` - * [#16402](https://github.com/babel/babel/pull/16402) fix: Correctly prints `{ [key in Bar]? }` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#16394](https://github.com/babel/babel/pull/16394) fix: Correctly generate `TSMappedType` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-compat-data`, `babel-plugin-bugfix-firefox-class-in-computed-class-key`, `babel-preset-env` - * [#16390](https://github.com/babel/babel/pull/16390) Create bugfix plugin for classes in computed keys in Firefox ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16387](https://github.com/babel/babel/pull/16387) fix: support mutated outer decorated class binding ([@JLHwung](https://github.com/JLHwung)) - * [#16385](https://github.com/babel/babel/pull/16385) fix: Decorators when `super()` exists and `protoInit` is not needed ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-block-scoping` - * [#16384](https://github.com/babel/babel/pull/16384) fix: Transform scoping for `for X` in loop ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#16368](https://github.com/babel/babel/pull/16368) fix: Capture `let` when the `for` body is not a block ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping` - * [#16363](https://github.com/babel/babel/pull/16363) Fix incorrect function hoisting in some case statements ([@luiscubal](https://github.com/luiscubal)) -## v7.24.3 (2024-03-20) - -#### :bug: Bug Fix -* `babel-helper-module-imports` - * [#16370](https://github.com/babel/babel/pull/16370) fix: do not inject the same imported identifier multiple times ([@ota-meshi](https://github.com/ota-meshi)) -## v7.24.2 (2024-03-19) - -#### :bug: Bug Fix -* `babel-code-frame`, `babel-highlight` - * [#16362](https://github.com/babel/babel/pull/16362) Restore previous `FORCE_COLOR=0` behavior ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.24.1 (2024-03-19) - -#### :bug: Bug Fix -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16350](https://github.com/babel/babel/pull/16350) Fix decorated class computed keys ordering ([@JLHwung](https://github.com/JLHwung)) - * [#16344](https://github.com/babel/babel/pull/16344) Fix decorated class static field private access ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-proposal-decorators`, `babel-plugin-proposal-json-modules`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env` - * [#16329](https://github.com/babel/babel/pull/16329) Respect `moduleName` for `@babel/runtime/regenerator` imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties` - * [#16331](https://github.com/babel/babel/pull/16331) Fix decorator memoiser binding kind ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-class-features-plugin`, `babel-helper-replace-supers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties` - * [#16325](https://github.com/babel/babel/pull/16325) Fix decorator evaluation private environment ([@JLHwung](https://github.com/JLHwung)) - -#### :memo: Documentation -* [#16319](https://github.com/babel/babel/pull/16319) Update SECURITY.md ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-code-frame`, `babel-highlight` - * [#16359](https://github.com/babel/babel/pull/16359) Replace `chalk` with `picocolors` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-fixtures`, `babel-helpers`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-unicode-sets-regex`, `babel-preset-env`, `babel-preset-flow` - * [#16352](https://github.com/babel/babel/pull/16352) Run Babel transform tests on old node if possible ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` - * [#16323](https://github.com/babel/babel/pull/16323) Allow separate helpers to be excluded in Babel 8 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-module-imports`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx` - * [#16349](https://github.com/babel/babel/pull/16349) Support merging imports in import injector ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-import-attributes-to-assertions`, `babel-plugin-proposal-import-defer`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-plugin-proposal-optional-chaining-assign`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-proposal-regexp-modifiers`, `babel-plugin-proposal-throw-expressions`, `babel-plugin-syntax-async-do-expressions`, `babel-plugin-syntax-decimal`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-syntax-do-expressions`, `babel-plugin-syntax-explicit-resource-management`, `babel-plugin-syntax-export-default-from`, `babel-plugin-syntax-flow`, `babel-plugin-syntax-function-bind`, `babel-plugin-syntax-function-sent`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-import-attributes`, `babel-plugin-syntax-import-defer`, `babel-plugin-syntax-import-reflection`, `babel-plugin-syntax-import-source`, `babel-plugin-syntax-jsx`, `babel-plugin-syntax-module-blocks`, `babel-plugin-syntax-optional-chaining-assign`, `babel-plugin-syntax-partial-application`, `babel-plugin-syntax-pipeline-operator`, `babel-plugin-syntax-record-and-tuple`, `babel-plugin-syntax-throw-expressions`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-dotall-regex`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-export-namespace-from`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-instanceof`, `babel-plugin-transform-jscript`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-literals`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-member-expression-literals`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-new-target`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-assign`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-object-set-prototype-of-to-assign`, `babel-plugin-transform-object-super`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-property-literals`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-compat`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-react-jsx-source`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-reserved-words`, `babel-plugin-transform-runtime`, `babel-plugin-transform-shorthand-properties`, `babel-plugin-transform-spread`, `babel-plugin-transform-sticky-regex`, `babel-plugin-transform-strict-mode`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-plugin-transform-unicode-property-regex`, `babel-plugin-transform-unicode-regex`, `babel-plugin-transform-unicode-sets-regex`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript` - * [#16332](https://github.com/babel/babel/pull/16332) Test Babel 7 plugins compatibility with Babel 8 core ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-compat-data`, `babel-plugin-transform-object-rest-spread`, `babel-preset-env` - * [#16318](https://github.com/babel/babel/pull/16318) [babel 8] Fix `@babel/compat-data` package.json ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :microscope: Output optimization -* `babel-helper-replace-supers`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime` - * [#16345](https://github.com/babel/babel/pull/16345) Optimize the use of `assertThisInitialized` after `super()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes` - * [#16343](https://github.com/babel/babel/pull/16343) Use simpler `assertThisInitialized` more often ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-object-rest-spread`, `babel-traverse` - * [#16342](https://github.com/babel/babel/pull/16342) Consider well-known and registered symbols as literals ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-plugin-external-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-function-bind`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-typescript`, `babel-preset-env` - * [#16326](https://github.com/babel/babel/pull/16326) Reduce the use of class names ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.24.0 (2024-02-28) - -#### :rocket: New Feature -* `babel-standalone` - * [#11696](https://github.com/babel/babel/pull/11696) Export babel tooling packages in `@babel/standalone` ([@ajihyf](https://github.com/ajihyf)) -* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-transform-class-properties` - * [#16267](https://github.com/babel/babel/pull/16267) Implement `noUninitializedPrivateFieldAccess` assumption ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-decorators`, `babel-plugin-transform-class-properties`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16242](https://github.com/babel/babel/pull/16242) Support decorator 2023-11 normative updates ([@JLHwung](https://github.com/JLHwung)) -* `babel-preset-flow` - * [#16309](https://github.com/babel/babel/pull/16309) [babel 7] Allow setting `ignoreExtensions` in Flow preset ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16284](https://github.com/babel/babel/pull/16284) Add `experimental_useHermesParser` option in `preset-flow` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-import-to-platform-api`, `babel-plugin-proposal-import-wasm-source`, `babel-plugin-proposal-json-modules`, `babel-standalone` - * [#16172](https://github.com/babel/babel/pull/16172) Add transform support for JSON modules imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-runtime` - * [#16241](https://github.com/babel/babel/pull/16241) Add back `moduleName` option to `@babel/plugin-transform-runtime` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser`, `babel-types` - * [#16277](https://github.com/babel/babel/pull/16277) Allow import attributes for `TSImportType` ([@sosukesuzuki](https://github.com/sosukesuzuki)) - -#### :bug: Bug Fix -* `babel-plugin-proposal-do-expressions`, `babel-traverse` - * [#16305](https://github.com/babel/babel/pull/16305) fix: avoid `popContext` on unvisited node paths ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object` - * [#16312](https://github.com/babel/babel/pull/16312) Fix class private properties when `privateFieldsAsSymbols` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-private-methods` - * [#16307](https://github.com/babel/babel/pull/16307) Fix the support of `arguments` in private `get/set` method ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators` - * [#16287](https://github.com/babel/babel/pull/16287) Reduce decorator static property size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16281](https://github.com/babel/babel/pull/16281) Fix evaluation order of decorators with cached receiver ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16279](https://github.com/babel/babel/pull/16279) Fix decorator this memoization ([@JLHwung](https://github.com/JLHwung)) - * [#16266](https://github.com/babel/babel/pull/16266) Preserve `static` on decorated private `accessor` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#16258](https://github.com/babel/babel/pull/16258) fix: handle decorated async private method and generator ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-plugin-transform-typescript`, `babel-preset-env` - * [#16275](https://github.com/babel/babel/pull/16275) Fix class private properties when `privateFieldsAsProperties` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers` - * [#16268](https://github.com/babel/babel/pull/16268) Do not consider `arguments` in a helper as a global reference ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#16270](https://github.com/babel/babel/pull/16270) Handle symbol key class elements decoration ([@JLHwung](https://github.com/JLHwung)) - * [#16265](https://github.com/babel/babel/pull/16265) Do not define `access.get` for public setter decorators ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-preset-env` - * [#12428](https://github.com/babel/babel/pull/12428) Suggest using `BABEL_SHOW_CONFIG_FOR` for config problems ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-helper-transform-fixture-test-runner` - * [#16278](https://github.com/babel/babel/pull/16278) Continue writing `output.js` when `exec.js` throws ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :microscope: Output optimization -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16306](https://github.com/babel/babel/pull/16306) Avoid intermediate functions for private accessors with decs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties` - * [#16294](https://github.com/babel/babel/pull/16294) More aggressively inline decorators in the static block ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-transform-private-methods` - * [#16283](https://github.com/babel/babel/pull/16283) Do not use `classPrivateMethodGet` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators` - * [#16287](https://github.com/babel/babel/pull/16287) Reduce decorator static property size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties` - * [#16280](https://github.com/babel/babel/pull/16280) Reduce element decorator temp variables ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-class-features-plugin`, `babel-helper-fixtures`, `babel-helpers`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-optional-chaining-assign`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-private-methods`, `babel-plugin-transform-private-property-in-object`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16261](https://github.com/babel/babel/pull/16261) Do not use descriptors for private class elements ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#16263](https://github.com/babel/babel/pull/16263) Reduce helper size for decorator 2023-11 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.23.10 (2024-01-31) - -#### :bug: Bug Fix -* Other - * [#16240](https://github.com/babel/babel/pull/16240) [eslint] Include field decorators in scope analysis ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16235](https://github.com/babel/babel/pull/16235) Fix `protoInit` call injection timing ([@JLHwung](https://github.com/JLHwung)) -## v7.23.9 (2024-01-25) - -#### :bug: Bug Fix -* `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-systemjs`, `babel-preset-env` - * [#16225](https://github.com/babel/babel/pull/16225) fix: `systemjs` re-traverses helpers ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16226](https://github.com/babel/babel/pull/16226) Improve decorated private method check ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-proposal-decorators`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-runtime`, `babel-preset-env` - * [#16224](https://github.com/babel/babel/pull/16224) Properly sort `core-js@3` imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-traverse` - * [#15383](https://github.com/babel/babel/pull/15383) fix: Don't throw in `getTypeAnnotation` when using TS+inference ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* Other - * [#16210](https://github.com/babel/babel/pull/16210) [eslint] Fix `no-use-before-define` for class ref in fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-core`, `babel-parser`, `babel-template` - * [#16222](https://github.com/babel/babel/pull/16222) Migrate `eslint-parser` to cts ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-types` - * [#16213](https://github.com/babel/babel/pull/16213) Remove `@babel/types` props that are not produced by the parser ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :running_woman: Performance -* `babel-parser` - * [#16072](https://github.com/babel/babel/pull/16072) perf: Improve parser performance for typescript ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :microscope: Output optimization -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-new-target`, `babel-plugin-transform-parameters`, `babel-plugin-transform-private-methods`, `babel-preset-env` - * [#16218](https://github.com/babel/babel/pull/16218) Improve temporary variables for decorators ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15959](https://github.com/babel/babel/pull/15959) Improve output of `using` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.23.8 (2024-01-08) - -#### :bug: Bug Fix -* `babel-preset-env` - * [#16181](https://github.com/babel/babel/pull/16181) fix: `preset-env` throws exception for `export * as x` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#16201](https://github.com/babel/babel/pull/16201) fix: decorator binds `getter/setter` to `ctx.access` for public fields ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#16199](https://github.com/babel/babel/pull/16199) fix: Class decorator correctly passes return value ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :leftwards_arrow_with_hook: Revert -* [#16202](https://github.com/babel/babel/pull/16202) Revert "chore: Update artifact tools (#16184)" ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-function-name`, `babel-plugin-transform-parameters`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-typescript`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16194](https://github.com/babel/babel/pull/16194) Improve output of `super()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.23.7 (2023-12-29) - -#### :bug: Bug Fix -* `babel-traverse` - * [#16191](https://github.com/babel/babel/pull/16191) fix: Crash when removing without `Program` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#16180](https://github.com/babel/babel/pull/16180) fix: Class decorator `ctx.kind` is wrong ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-proposal-decorators` - * [#16170](https://github.com/babel/babel/pull/16170) Fix decorator initProto usage in derived classes ([@JLHwung](https://github.com/JLHwung)) -* `babel-core` - * [#16167](https://github.com/babel/babel/pull/16167) Avoid unpreventable `unhandledRejection` events ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-helper-create-class-features-plugin` - * [#16186](https://github.com/babel/babel/pull/16186) chore: Update deps ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators` - * [#16177](https://github.com/babel/babel/pull/16177) Merge decorators into class features ([@JLHwung](https://github.com/JLHwung)) -## v7.23.6 (2023-12-11) - -#### :eyeglasses: Spec Compliance -* `babel-generator`, `babel-parser`, `babel-types` - * [#16154](https://github.com/babel/babel/pull/16154) Remove `TSPropertySignature.initializer` ([@fisker](https://github.com/fisker)) -* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-types` - * [#16139](https://github.com/babel/babel/pull/16139) Apply `toPropertyKey` on decorator context name ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-generator` - * [#16166](https://github.com/babel/babel/pull/16166) fix: Correctly indenting when `retainLines` is enabled ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management` - * [#16150](https://github.com/babel/babel/pull/16150) `using`: Allow looking up `Symbol.dispose` on a function ([@odinho](https://github.com/odinho)) -* `babel-plugin-proposal-decorators`, `babel-plugin-transform-class-properties` - * [#16161](https://github.com/babel/babel/pull/16161) Ensure the `[[@@toPrimitive]]` call of a decorated class member key is invoked once ([@JLHwung](https://github.com/JLHwung)) - * [#16148](https://github.com/babel/babel/pull/16148) Support named evaluation for decorated anonymous class exp ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-for-of`, `babel-preset-env` - * [#16011](https://github.com/babel/babel/pull/16011) fix: `for of` with `iterableIsArray` and shadowing variable ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16144](https://github.com/babel/babel/pull/16144) Set function name for decorated private non-field elements ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-typescript` - * [#16137](https://github.com/babel/babel/pull/16137) Fix references to enum values with merging ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :microscope: Output optimization -* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-class-properties` - * [#16159](https://github.com/babel/babel/pull/16159) Reuse computed key memoiser ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#16160](https://github.com/babel/babel/pull/16160) Optimize decorator helper size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.23.5 (2023-11-29) - -#### :eyeglasses: Spec Compliance -* `babel-plugin-proposal-decorators` - * [#16138](https://github.com/babel/babel/pull/16138) Class binding is in TDZ during decorators initialization ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#16132](https://github.com/babel/babel/pull/16132) Allow addInitializer in field decorator context ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-traverse`, `babel-types` - * [#16131](https://github.com/babel/babel/pull/16131) Do not remove bindings when removing assignment expression path ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-classes` - * [#16135](https://github.com/babel/babel/pull/16135) Require class properties transform when compiling class with private fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#16122](https://github.com/babel/babel/pull/16122) fix: Missing parentheses after line break ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers` - * [#16130](https://github.com/babel/babel/pull/16130) Fix helpers internal fns names conflict resolution ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-typescript` - * [#16123](https://github.com/babel/babel/pull/16123) Simplify class fields injetion after `super()` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-parameters`, `babel-plugin-transform-typescript`, `babel-traverse` - * [#16110](https://github.com/babel/babel/pull/16110) fix: Unexpected duplication of comments ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-eslint-plugin` - * [#16023](https://github.com/babel/babel/pull/16023) Add `@babel/eslint-plugin/no-undef` to fix `no-undef` with accessor props ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :microscope: Output optimization -* `babel-helpers` - * [#16129](https://github.com/babel/babel/pull/16129) Optimize `decorator` helper size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.23.4 (2023-11-20) - -#### :bug: Bug Fix -* `babel-generator` - * [#16104](https://github.com/babel/babel/pull/16104) fix: Pure comments missing parentheses ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.23.3 (2023-11-09) - -#### :bug: Bug Fix -* `babel-plugin-transform-typescript` - * [#16071](https://github.com/babel/babel/pull/16071) Strip type-only TS namespaces ([@colinaaa](https://github.com/colinaaa)) -* `babel-generator` - * [#16078](https://github.com/babel/babel/pull/16078) Fix indentation when generating comments with `concise: true` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-compat-data`, `babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`, `babel-preset-env` - * [#14295](https://github.com/babel/babel/pull/14295) Add a bugfix plugin for https://crbug.com/v8/12421 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-object-super` - * [#15948](https://github.com/babel/babel/pull/15948) fix: `super.x` in a loop ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` - * [#16015](https://github.com/babel/babel/pull/16015) fix: handle `__proto__` exports name in CJS/AMD/UMD ([@magic-akari](https://github.com/magic-akari)) - -#### :memo: Documentation -* [#16044](https://github.com/babel/babel/pull/16044) docs: Update links in @babel/eslint-parser README ([@aryehb](https://github.com/aryehb)) - -#### :house: Internal -* `babel-core`, `babel-preset-env` - * [#15988](https://github.com/babel/babel/pull/15988) Refactor handling of modules plugins in `preset-env` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :running_woman: Performance -* `babel-generator` - * [#16061](https://github.com/babel/babel/pull/16061) perf: Improve `@babel/generator` performance ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-traverse` - * [#16060](https://github.com/babel/babel/pull/16060) Avoid dynamic dispatch when calling wrapCheck ([@yepitschunked](https://github.com/yepitschunked)) - -#### :microscope: Output optimization -* `babel-plugin-transform-computed-properties` - * [#6652](https://github.com/babel/babel/pull/6652) Optimize computed properties output (byte-wise) ([@Andarist](https://github.com/Andarist)) -## v7.23.2 (2023-10-11) - -#### :bug: Bug Fix -* `babel-traverse` - * [#16033](https://github.com/babel/babel/pull/16033) Only evaluate own String/Number/Math methods ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-preset-typescript` - * [#16022](https://github.com/babel/babel/pull/16022) Rewrite `.tsx` extension when using `rewriteImportExtensions` ([@jimmydief](https://github.com/jimmydief)) -* `babel-helpers` - * [#16017](https://github.com/babel/babel/pull/16017) Fix: fallback to typeof when toString is applied to incompatible object ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-transform-modules-commonjs`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#16025](https://github.com/babel/babel/pull/16025) Avoid override mistake in namespace imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.23.0 (2023-09-25) - -#### :rocket: New Feature -* `babel-plugin-proposal-import-wasm-source`, `babel-plugin-syntax-import-source`, `babel-plugin-transform-dynamic-import` - * [#15870](https://github.com/babel/babel/pull/15870) Support transforming `import source` for wasm ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-module-transforms`, `babel-helpers`, `babel-plugin-proposal-import-defer`, `babel-plugin-syntax-import-defer`, `babel-plugin-transform-modules-commonjs`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` - * [#15878](https://github.com/babel/babel/pull/15878) Implement `import defer` proposal transform support ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-parser`, `babel-types` - * [#15845](https://github.com/babel/babel/pull/15845) Implement `import defer` parsing support ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#15829](https://github.com/babel/babel/pull/15829) Add parsing support for the "source phase imports" proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-helper-module-transforms`, `babel-parser`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-traverse`, `babel-types` - * [#15682](https://github.com/babel/babel/pull/15682) Add `createImportExpressions` parser option ([@JLHwung](https://github.com/JLHwung)) -* `babel-standalone` - * [#15671](https://github.com/babel/babel/pull/15671) Pass through nonce to the transformed script element ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-function-name`, `babel-helper-member-expression-to-functions`, `babel-helpers`, `babel-parser`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-optional-chaining-assign`, `babel-plugin-syntax-optional-chaining-assign`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-optional-chaining`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone`, `babel-types` - * [#15751](https://github.com/babel/babel/pull/15751) Add support for optional chain in assignments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#15895](https://github.com/babel/babel/pull/15895) Implement the "decorator metadata" proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-traverse`, `babel-types` - * [#15893](https://github.com/babel/babel/pull/15893) Add `t.buildUndefinedNode` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-preset-typescript` - * [#15913](https://github.com/babel/babel/pull/15913) Add `rewriteImportExtensions` option to TS preset ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#15896](https://github.com/babel/babel/pull/15896) Allow TS tuples to have both labeled and unlabeled elements ([@yukukotani](https://github.com/yukukotani)) - -#### :bug: Bug Fix -* `babel-plugin-transform-block-scoping` - * [#15962](https://github.com/babel/babel/pull/15962) fix: `transform-block-scoping` captures the variables of the method in the loop ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-traverse` - * [#15797](https://github.com/babel/babel/pull/15797) Expand evaluation of global built-ins in `@babel/traverse` ([@lorenzoferre](https://github.com/lorenzoferre)) -* `babel-plugin-proposal-explicit-resource-management` - * [#15985](https://github.com/babel/babel/pull/15985) Improve source maps for blocks with `using` declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :microscope: Output optimization -* `babel-core`, `babel-helper-module-transforms`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-classes`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-parameters`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-runtime`, `babel-plugin-transform-typescript`, `babel-preset-env` - * [#15984](https://github.com/babel/babel/pull/15984) Inline `exports.XXX =` update in simple variable declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.20 (2023-09-16) - -#### :house: Internal -* `babel-helper-validator-identifier` - * [#15973](https://github.com/babel/babel/pull/15973) Remove special-casing of U+200C and U+200D ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-dotall-regex` - * [#15974](https://github.com/babel/babel/pull/15974) Update Unicode test fixtures ([@JLHwung](https://github.com/JLHwung)) - -#### :leftwards_arrow_with_hook: Revert -* `babel-helper-remap-async-to-generator`, `babel-helper-wrap-function`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-function-sent`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime`, `babel-preset-env` - * [#15979](https://github.com/babel/babel/pull/15979) Revert "Improve output when wrapping functions" ([@jjonescz](https://github.com/jjonescz)) - -## v7.22.18 (2023-09-14) - -#### :bug: Bug Fix -* `babel-helper-validator-identifier` - * [#15957](https://github.com/babel/babel/pull/15957) Update identifier name definitions to Unicode 15.1 ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` - * [#15898](https://github.com/babel/babel/pull/15898) Fix transform of named import with shadowed namespace import ([@dhlolo](https://github.com/dhlolo)) - -#### :leftwards_arrow_with_hook: Revert -* [#15965](https://github.com/babel/babel/pull/15965) Revert Node.js 20.6.0 bug workaround ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.22.17 (2023-09-08) - -#### :bug: Bug Fix -* `babel-core` - * [#15947](https://github.com/babel/babel/pull/15947) Fix compatibility with Node.js 20.6 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` - * [#15941](https://github.com/babel/babel/pull/15941) Fix compiling duplicate ns imports to lazy CommonJS ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-types` - * [#15920](https://github.com/babel/babel/pull/15920) Make `ClassDeclaration["id"]` optional in babel-types ([@jordanbtucker](https://github.com/jordanbtucker)) - -#### :microscope: Output optimization -* `babel-helper-remap-async-to-generator`, `babel-helper-wrap-function`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-proposal-function-sent`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime`, `babel-preset-env` - * [#15922](https://github.com/babel/babel/pull/15922) Improve output when wrapping functions (e.g. `async` functions) ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.22.16 (2023-09-06) - -#### :bug: Bug Fix -* `babel-parser` - * [#15935](https://github.com/babel/babel/pull/15935) fix: `__esModule` is missing from published `@babel/parser` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-traverse` - * [#15936](https://github.com/babel/babel/pull/15936) Skip deprecation warning tests when in a folder named `@babel` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.15 (2023-09-04) - -#### :bug: Bug Fix -* `babel-core` - * [#15923](https://github.com/babel/babel/pull/15923) Only perform config loading re-entrancy check for cjs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-builder-binary-assignment-operator-visitor`, `babel-helper-compilation-targets`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-member-expression-to-functions`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-transform-fixture-test-runner`, `babel-helper-validator-identifier`, `babel-helper-validator-option`, `babel-helpers`, `babel-node`, `babel-parser`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-for-of`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-parameters`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-typescript`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`, `babel-register`, `babel-standalone`, `babel-template`, `babel-traverse`, `babel-types` - * [#15892](https://github.com/babel/babel/pull/15892) Add explicit `.ts`/`.js` extension to all imports in `src` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.14 (2023-08-30) - -#### :bug: Bug Fix -* `babel-preset-env` - * [#15907](https://github.com/babel/babel/pull/15907) Avoid dynamic require call in preset-env ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-parser` - * [#15884](https://github.com/babel/babel/pull/15884) Simplify parser errors creation ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-helper-compilation-targets`, `babel-helper-simple-access`, `babel-parser`, `babel-plugin-syntax-decorators`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`, `babel-traverse`, `babel-types` - * [#15902](https://github.com/babel/babel/pull/15902) extract more test helpers to repo-utils ([@JLHwung](https://github.com/JLHwung)) -## v7.22.13 (2023-08-28) - -#### :house: Internal -* `babel-helper-fixtures`, `babel-plugin-proposal-function-bind`, `babel-plugin-transform-modules-commonjs`, `babel-preset-env` - * [#15890](https://github.com/babel/babel/pull/15890) Improve helper-fixtures ([@JLHwung](https://github.com/JLHwung)) - -#### :leftwards_arrow_with_hook: Revert -* `babel-parser` - * [#15901](https://github.com/babel/babel/pull/15901) Revert "Do not record trailing comma pos when `maybeAsyncArrow: false`" ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.12 (2023-08-25) - -#### :bug: Bug Fix -* `babel-plugin-transform-optional-chaining` - * [#15888](https://github.com/babel/babel/pull/15888) Fix optional chain optimization in sequence expression ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.11 (2023-08-24) - -#### :bug: Bug Fix -* `babel-plugin-transform-typescript` - * [#15882](https://github.com/babel/babel/pull/15882) Fix: fully remove TS nested type-only exported namespaces ([@yangguansen](https://github.com/yangguansen)) -* `babel-types` - * [#15867](https://github.com/babel/babel/pull/15867) fix: definition of TS function type params ([@danez](https://github.com/danez)) -* `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-export-namespace-from`, `babel-plugin-transform-json-strings`, `babel-plugin-transform-logical-assignment-operators`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-numeric-separator`, `babel-plugin-transform-object-rest-spread`, `babel-plugin-transform-optional-catch-binding`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-property-in-object` - * [#15858](https://github.com/babel/babel/pull/15858) fix(standalone): strip archived syntax plugins ([@JLHwung](https://github.com/JLHwung)) -* `babel-core` - * [#15850](https://github.com/babel/babel/pull/15850) Support configuring cache in ESM configs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-parser` - * [#10940](https://github.com/babel/babel/pull/10940) Do not record trailing comma pos when `maybeAsyncArrow: false` ([@JLHwung](https://github.com/JLHwung)) -* `babel-core`, `babel-helper-compilation-targets`, `babel-parser`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-syntax-decorators`, `babel-preset-env`, `babel-preset-react`, `babel-register`, `babel-traverse`, `babel-types` - * [#15872](https://github.com/babel/babel/pull/15872) enable jest/no-standalone-expect ([@JLHwung](https://github.com/JLHwung)) -* `babel-core`, `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15833](https://github.com/babel/babel/pull/15833) bump json5, terser and webpack, further minimize babel helpers ([@JLHwung](https://github.com/JLHwung)) -* Other - * [#15846](https://github.com/babel/babel/pull/15846) Use Babel 8.0 alpha to build babel ([@JLHwung](https://github.com/JLHwung)) - * [#15856](https://github.com/babel/babel/pull/15856) Exclude redundant files from publish process ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-optional-chaining`, `babel-preset-env` - * [#15871](https://github.com/babel/babel/pull/15871) Simplify `?.` output when chain result is ignored ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.10 (2023-08-07) - -#### :bug: Bug Fix -* `babel-plugin-transform-typescript` - * [#15799](https://github.com/babel/babel/pull/15799) [ts] Strip type-only namespaces ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#15798](https://github.com/babel/babel/pull/15798) [ts] Fix compiling extended exported nested namespace ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-class-static-block`, `babel-plugin-transform-new-target`, `babel-plugin-transform-private-methods`, `babel-preset-env` - * [#15701](https://github.com/babel/babel/pull/15701) Memoize class binding when compiling private methods and static elements ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-cli` - * [#15824](https://github.com/babel/babel/pull/15824) Add `meta` object to `@babel/eslint-plugin` ([@JLHwung](https://github.com/JLHwung)) -* `babel-traverse`, `babel-types` - * [#15661](https://github.com/babel/babel/pull/15661) Improve the type definition of `path.isX` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator`, `babel-types` - * [#15776](https://github.com/babel/babel/pull/15776) improve SourceLocation typing ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* Other - * [#15818](https://github.com/babel/babel/pull/15818) build: generate flow typings in prepublish job ([@JLHwung](https://github.com/JLHwung)) - * [#15777](https://github.com/babel/babel/pull/15777) chore: bump dev dependencies and remove .eslintignore ([@JLHwung](https://github.com/JLHwung)) -* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-builder-react-jsx`, `babel-preset-env`, `babel-standalone` - * [#15794](https://github.com/babel/babel/pull/15794) Enable `@typescript-eslint/no-redundant-type-constituents` rule ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-compilation-targets` - * [#15811](https://github.com/babel/babel/pull/15811) Remove `@babel/core` peerDep from `helper-compilation-targets` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#15793](https://github.com/babel/babel/pull/15793) Use const enum in babel-parser ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-runtime`, `babel-traverse`, `babel-types` - * [#15716](https://github.com/babel/babel/pull/15716) chore: Use `typescript-eslint@v6` with reworked configs ([@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)) - -#### :microscope: Output optimization -* `babel-plugin-transform-block-scoping`, `babel-plugin-transform-parameters`, `babel-plugin-transform-regenerator` - * [#15746](https://github.com/babel/babel/pull/15746) Reduce `transform-block-scoping` loops output size ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.22.9 (2023-07-12) - -#### :bug: Bug Fix -* `babel-plugin-transform-typescript` - * [#15774](https://github.com/babel/babel/pull/15774) fix: `Infinity` in enums ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-generator` - * [#15757](https://github.com/babel/babel/pull/15757) `recordAndTupleSyntaxType` defaults to `"hash"` ([@coderaiser](https://github.com/coderaiser)) - -#### :house: Internal -* [#15748](https://github.com/babel/babel/pull/15748) Migrate to `eslint.config.js` ([@JLHwung](https://github.com/JLHwung)) -* [#15758](https://github.com/babel/babel/pull/15758) Use Prettier 3 stable ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.8 (2023-07-06) - -#### :leftwards_arrow_with_hook: Revert -* `babel-core`, `babel-traverse` - * [#15754](https://github.com/babel/babel/pull/15754) Revert "Use `NodePath#hub` as part of the paths cache key" ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.7 (2023-07-06) - -#### :bug: Bug Fix -* `babel-generator` - * [#15719](https://github.com/babel/babel/pull/15719) fix: Avoid internally generating negative source maps columns ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core`, `babel-traverse` - * [#15725](https://github.com/babel/babel/pull/15725) Use `NodePath#hub` as part of the paths cache key ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* Other - * [#15747](https://github.com/babel/babel/pull/15747) fix: export `meta` from `eslint-parser/experimental-worker` ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* `babel-core`, `babel-traverse` - * [#15702](https://github.com/babel/babel/pull/15702) Refactor visitors merging ([@nullableVoidPtr](https://github.com/nullableVoidPtr)) -## v7.22.6 (2023-07-04) - -#### :bug: Bug Fix -* `babel-compat-data`, `babel-helper-compilation-targets`, `babel-preset-env` - * [#15727](https://github.com/babel/babel/pull/15727) Add opera mobile compat data ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-optional-chaining` - * [#15739](https://github.com/babel/babel/pull/15739) Fix transform of `delete a?.b` in function params ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-split-export-declaration`, `babel-plugin-transform-modules-commonjs` - * [#15736](https://github.com/babel/babel/pull/15736) fix: Default export for duplicate names ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-compat-data`, `babel-preset-env` - * [#15726](https://github.com/babel/babel/pull/15726) update compat-data sources ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-runtime-corejs3`, `babel-runtime` - * [#15705](https://github.com/babel/babel/pull/15705) Fix handling of sync error in `@@asyncDispose` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-standalone` - * [#15707](https://github.com/babel/babel/pull/15707) fix: Support transforming Explicit Resource Management in `stage-2` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core` - * [#15626](https://github.com/babel/babel/pull/15626) fix: Works correctly with `--frozen-intrinsics` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-helper-create-class-features-plugin`, `babel-plugin-transform-classes` - * [#15700](https://github.com/babel/babel/pull/15700) Minor class transform cleanups ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-typescript` - * [#15740](https://github.com/babel/babel/pull/15740) Compress output for optional chain with multiple `?.` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-transform-class-properties`, `babel-plugin-transform-nullish-coalescing-operator`, `babel-plugin-transform-optional-chaining`, `babel-plugin-transform-private-property-in-object`, `babel-traverse` - * [#15741](https://github.com/babel/babel/pull/15741) Inject tmp vars in the params list of IIFEs when possible ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.5 (2023-06-08) - -#### :bug: Bug Fix -* `babel-preset-env`, `babel-standalone` - * [#15675](https://github.com/babel/babel/pull/15675) Fix using `syntax-unicode-sets-regex` in standalone ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-core` - * [#15683](https://github.com/babel/babel/pull/15683) Suggest `-transform-` when resolving missing plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.4 (2023-05-29) - -#### :bug: Bug Fix -* `babel-traverse` - * [#15649](https://github.com/babel/babel/pull/15649) Set `shorthand: false` when renaming an identifier inside an object property ([@coderaiser](https://github.com/coderaiser)) - -#### :house: Internal -* `babel-types` - * [#15666](https://github.com/babel/babel/pull/15666) Add missing `attributes`/`assertions` to `VISITOR_KEYS` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#15667](https://github.com/babel/babel/pull/15667) Mark `assert` attributes with `extra.deprecatedAssertSyntax` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.22.3 (2023-05-27) - -- Re-publish all the package published in 7.22.0 that hadn't been republished yet. We accidentally published them with a `package.json` file containing `"type": "script"` instead of `"type": "commonjs"` ([#15664](https://github.com/babel/babel/issues/15664)). - -## v7.22.2 (2023-05-26) - -#### :bug: Bug Fix -* `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2` - * [#15660](https://github.com/babel/babel/pull/15660) Fix importing symbol polyfill in `@babel/runtime-corejs2` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.1 (2023-05-26) - -#### :bug: Bug Fix -* `babel-preset-env` - * [#15658](https://github.com/babel/babel/pull/15658) Workaround for broken babel-preset-react-app ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.22.0 (2023-05-26) - -#### :rocket: New Feature -* `babel-parser`, `babel-plugin-transform-typescript` - * [#15497](https://github.com/babel/babel/pull/15497) [ts] Support `import ... =` and `export =` in scripts ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-compat-data`, `babel-core`, `babel-plugin-proposal-unicode-sets-regex`, `babel-plugin-transform-unicode-sets-regex`, `babel-preset-env`, `babel-standalone` - * [#15636](https://github.com/babel/babel/pull/15636) Add `unicode-sets-regex` transform to `preset-env` ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-proposal-explicit-resource-management`, `babel-plugin-transform-runtime`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` - * [#15633](https://github.com/babel/babel/pull/15633) Implement transform support for `using` declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-proposal-import-attributes-to-assertions` - * [#15620](https://github.com/babel/babel/pull/15620) Create `@babel/plugin-proposal-import-attributes-to-assertions` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-generator`, `babel-parser`, `babel-plugin-syntax-import-attributes`, `babel-preset-env`, `babel-standalone`, `babel-types` - * [#15536](https://github.com/babel/babel/pull/15536) Add support for the updated import attributes proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-parser`, `babel-traverse`, `babel-types` - * [#15520](https://github.com/babel/babel/pull/15520) Parse `await using` declarations ([@JLHwung](https://github.com/JLHwung)) -* `babel-core`, `babel-helper-create-regexp-features-plugin`, `babel-parser` - * [#15638](https://github.com/babel/babel/pull/15638) Enable regexp unicode sets parsing by default ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15570](https://github.com/babel/babel/pull/15570) Add decorators version `2023-05` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-jsx`, `babel-traverse`, `babel-types` - * [#15549](https://github.com/babel/babel/pull/15549) Improve type definitions for validators ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-parser` - * [#15630](https://github.com/babel/babel/pull/15630) Unify parsing of import/export modifiers (type/typeof/module) ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-compat-data`, `babel-helper-transform-fixture-test-runner`, `babel-node`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs3` - * [#15531](https://github.com/babel/babel/pull/15531) Allow polyfill providers to specify custom `@babel/runtime` pkg ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-dynamic-import`, `babel-plugin-proposal-export-namespace-from`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-logical-assignment-operators`, `babel-plugin-proposal-nullish-coalescing-operator`, `babel-plugin-proposal-numeric-separator`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-catch-binding`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-unicode-property-regex`, `babel-preset-env`, `babel-standalone` - * [#15614](https://github.com/babel/babel/pull/15614) Rename `-proposal-`s that became standard to `-transform-` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.21.9 (2023-05-22) - -#### :bug: Bug Fix -* `babel-parser` - * [#15631](https://github.com/babel/babel/pull/15631) rescan gt token at the end of type args parsing ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator` - * [#15569](https://github.com/babel/babel/pull/15569) Fix indentation when `retainLines` is `true` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-template` - * [#15534](https://github.com/babel/babel/pull/15534) fix: Template `export { x }` stuck in infinite loop ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-compat-data`, `babel-preset-env` - * [#15606](https://github.com/babel/babel/pull/15606) fix: enable transform-block-scoping with generators feature (#12806) ([@IlyaSemenov](https://github.com/IlyaSemenov)) -## v7.21.8 (2023-05-02) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#15602](https://github.com/babel/babel/pull/15602) Remove `using await` restriction in explicitResourceManagement ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin` - * [#15605](https://github.com/babel/babel/pull/15605) Fix backward compat for semver checks in class®exp feat plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.21.6 (2023-04-29) - -#### :bug: Bug Fix -* `babel-compat-data` - * [#15598](https://github.com/babel/babel/pull/15598) fix: Not found `corejs3-shipped-proposals.json` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.21.5 (2023-04-28) - -#### :eyeglasses: Spec Compliance -* `babel-generator`, `babel-parser`, `babel-types` - * [#15539](https://github.com/babel/babel/pull/15539) fix: Remove `mixins` and `implements` for `DeclareInterface` and `InterfaceDeclaration` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :bug: Bug Fix -* `babel-core`, `babel-generator`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-react-jsx` - * [#15515](https://github.com/babel/babel/pull/15515) fix: `)` position with `createParenthesizedExpressions` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-preset-env` - * [#15580](https://github.com/babel/babel/pull/15580) Add syntax import meta to preset env ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-types` - * [#15546](https://github.com/babel/babel/pull/15546) Improve the layout of generated validators ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core` - * [#15535](https://github.com/babel/babel/pull/15535) Use `lt` instead of `lte` to check TS version for .cts config ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-core` - * [#15575](https://github.com/babel/babel/pull/15575) Use synchronous `import.meta.resolve` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-fixtures`, `babel-preset-typescript` - * [#15568](https://github.com/babel/babel/pull/15568) Handle `.overrides` and `.env` when resolving plugins/presets from fixture options ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin` - * [#15548](https://github.com/babel/babel/pull/15548) Use `semver` package to compare versions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.21.4 (2023-03-31) - -#### :bug: Bug Fix -* `babel-core`, `babel-helper-module-imports`, `babel-preset-typescript` - * [#15478](https://github.com/babel/babel/pull/15478) Fix support for `import/export` in `.cts` files ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator` - * [#15496](https://github.com/babel/babel/pull/15496) Fix compact printing of non-null assertion operators ([@rtsao](https://github.com/rtsao)) - -#### :nail_care: Polish -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-typescript`, `babel-traverse` - * [#15427](https://github.com/babel/babel/pull/15427) Fix moving comments of removed nodes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* Other - * [#15519](https://github.com/babel/babel/pull/15519) Update Prettier integration test ([@fisker](https://github.com/fisker)) -* `babel-parser` - * [#15510](https://github.com/babel/babel/pull/15510) refactor: introduce `lookaheadInLineCharCode` ([@JLHwung](https://github.com/JLHwung)) -* `babel-code-frame`, `babel-highlight` - * [#15499](https://github.com/babel/babel/pull/15499) Polish babel-code-frame highlight test ([@JLHwung](https://github.com/JLHwung)) -## v7.21.3 (2023-03-14) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#15479](https://github.com/babel/babel/pull/15479) disallow mixins/implements in flow interface ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-parser` - * [#15423](https://github.com/babel/babel/pull/15423) [ts] Allow keywords in tuple labels ([@Harpica](https://github.com/Harpica)) -* `babel-plugin-transform-typescript` - * [#15489](https://github.com/babel/babel/pull/15489) Register `var` decls generated by `import ... =` TS transform ([@amoeller](https://github.com/amoeller)) - * [#15494](https://github.com/babel/babel/pull/15494) fix: Consider `export { type foo }` as type-only usage ([@magic-akari](https://github.com/magic-akari)) - -#### :nail_care: Polish -* `babel-traverse`, `babel-types` - * [#15484](https://github.com/babel/babel/pull/15484) Skip node deprecation warnings when used by an old `@babel` package ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#15480](https://github.com/babel/babel/pull/15480) chore: Improve `jsonCompatibleStrings` deprecation ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* [#15465](https://github.com/babel/babel/pull/15465) Add ESLint-readable package name ([@nzakas](https://github.com/nzakas)) - -#### :microscope: Output optimization -* `babel-plugin-transform-typescript`, `babel-preset-typescript` - * [#15467](https://github.com/babel/babel/pull/15467) Optimize TS enums output ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.21.2 (2023-02-23) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#15439](https://github.com/babel/babel/pull/15439) fix: Throws on `new foo?.bar!()` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-traverse`, `babel-types` - * [#15448](https://github.com/babel/babel/pull/15448) Reduce warnings for deprecated node aliases ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-types` - * [#15451](https://github.com/babel/babel/pull/15451) Update babel-types docs generator ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` - * [#15449](https://github.com/babel/babel/pull/15449) Avoid unnecessary code for unused lazy imports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.21.1 (2023-02-20) - -#### :bug: Bug Fix -* `babel-core`, `babel-parser` - * [#15440](https://github.com/babel/babel/pull/15440) Fix problems found while publishing 7.21.0 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#15445](https://github.com/babel/babel/pull/15445) fix: Handling source maps without `sourcesContent` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* [#15443](https://github.com/babel/babel/pull/15443) Use native GitHub markdown `Note` admonition ([@yardenshoham](https://github.com/yardenshoham)) -## v7.21.0 (2023-02-20) - -#### :rocket: New Feature -* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object` - * [#15435](https://github.com/babel/babel/pull/15435) feat: Implement `privateFieldsAsSymbols` assumption for classes ([@fwienber](https://github.com/fwienber)) -* `babel-helper-create-regexp-features-plugin`, `babel-plugin-proposal-regexp-modifiers`, `babel-standalone` - * [#15226](https://github.com/babel/babel/pull/15226) feat: Support regexp modifiers proposal ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-cli`, `babel-core`, `babel-generator`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-react-jsx`, `babel-traverse` - * [#15022](https://github.com/babel/babel/pull/15022) feat: Generate sourcemaps of friendly call frames ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser`, `babel-types` - * [#15384](https://github.com/babel/babel/pull/15384) [ts] Support `const` modifier in type parameters ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-helpers`, `babel-parser`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15405](https://github.com/babel/babel/pull/15405) Implement decorators as presented at `2023-01` TC39 meeting ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#15114](https://github.com/babel/babel/pull/15114) Parser option to allow `new.target` outside functions ([@overlookmotel](https://github.com/overlookmotel)) - * [#15320](https://github.com/babel/babel/pull/15320) Add `annexb: false` parser option to disable Annex B ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core` - * [#15283](https://github.com/babel/babel/pull/15283) feat: Support `.cts` as configuration file ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript` - * [#15381](https://github.com/babel/babel/pull/15381) [ts] Support `export type * from` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix -* `babel-plugin-transform-typescript` - * [#15379](https://github.com/babel/babel/pull/15379) [ts5.0] Better inlining of constants in enums ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core` - * [#15366](https://github.com/babel/babel/pull/15366) handling circular/shared structures in deep-clone ([@azizghuloum](https://github.com/azizghuloum)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-private-methods`, `babel-plugin-transform-classes`, `babel-plugin-transform-new-target` - * [#15406](https://github.com/babel/babel/pull/15406) Preserve class elements comments in class transform ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-types` - * [#15414](https://github.com/babel/babel/pull/15414) [ts] Fix restrictions for optional parameters ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-parser` - * [#15400](https://github.com/babel/babel/pull/15400) polish: improve "`await` as identifier" error in modules ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* `babel-core` - * [#15137](https://github.com/babel/babel/pull/15137) Improve CJS compat with ESM-based `@babel/core` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :microscope: Output optimization -* `babel-plugin-transform-typescript` - * [#15418](https://github.com/babel/babel/pull/15418) [ts] Handle exponentiation operator in constant folding ([@ehoogeveen-medweb](https://github.com/ehoogeveen-medweb)) - -## v7.20.15 (2023-02-02) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#15391](https://github.com/babel/babel/pull/15391) Disallow await as bound name in using declaration ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-parser`, `babel-plugin-proposal-export-namespace-from` - * [#15385](https://github.com/babel/babel/pull/15385) Disallows specifiers after export * as ns ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-plugin-transform-block-scoping` - * [#15398](https://github.com/babel/babel/pull/15398) fix: Loop was converted wrong ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#15377](https://github.com/babel/babel/pull/15377) fix: `new (foo?.bar)()` incorrectly throws exception `OptionalChainingNoNew` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.20.14 (2023-01-27) - -#### :bug: Bug Fix -* `babel-plugin-transform-block-scoping` - * [#15361](https://github.com/babel/babel/pull/15361) fix: Identifiers in the loop are not renamed ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-react-jsx`, `babel-traverse` - * [#15365](https://github.com/babel/babel/pull/15365) fix: Properly generate source maps for manually added multi-line content ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.20.13 (2023-01-21) - -#### :bug: Bug Fix -* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15332](https://github.com/babel/babel/pull/15332) Ensure class decorators can access decorated non-static members ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-typescript` - * [#15349](https://github.com/babel/babel/pull/15349) fix: Preserve `import {type T} from 'x'` when `onlyRemoveTypeImports:true` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#15344](https://github.com/babel/babel/pull/15344) fix: Properties that are `abstract` should not be initialized. ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#15338](https://github.com/babel/babel/pull/15338) Allow negative number in ambient const initializer ([@JLHwung](https://github.com/JLHwung)) - -#### :leftwards_arrow_with_hook: Revert -* `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx` - * [#15355](https://github.com/babel/babel/pull/15355) Reverts "Re-use common JSX element transform for <>..." ([@JLHwung](https://github.com/JLHwung)) -## v7.20.12 (2023-01-04) - -#### :bug: Bug Fix -* `babel-traverse` - * [#15224](https://github.com/babel/babel/pull/15224) Fix `TaggedTemplateLiteral` evaluation ([@nmn](https://github.com/nmn)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties` - * [#15312](https://github.com/babel/babel/pull/15312) fix: `delete this` in static class properties initialization ([@SuperSodaSea](https://github.com/SuperSodaSea)) - -#### :nail_care: Polish -* `babel-traverse` - * [#15313](https://github.com/babel/babel/pull/15313) Implement support for evaluating computed properties. ([@JBYoshi](https://github.com/JBYoshi)) -## v7.20.11 (2022-12-23) - -#### :eyeglasses: Spec Compliance -* `babel-helper-module-transforms`, `babel-plugin-proposal-dynamic-import`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs` - * [#15290](https://github.com/babel/babel/pull/15290) Return rejected promise when stringify import specifier throws ([@SuperSodaSea](https://github.com/SuperSodaSea)) - -#### :bug: Bug Fix -* `babel-plugin-transform-block-scoping` - * [#15309](https://github.com/babel/babel/pull/15309) Fix for binding shadowing outer var with loop closure ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.20.10 (2022-12-23) - -#### :bug: Bug Fix -* `babel-traverse` - * [#15305](https://github.com/babel/babel/pull/15305) fix: `guessExecutionStatusRelativeTo` exception ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.20.9 (2022-12-23) - -#### :bug: Bug Fix -* `babel-plugin-transform-block-scoping` - * [#15303](https://github.com/babel/babel/pull/15303) fix: Do not throw exceptions when scope information is corrupted ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.20.8 (2022-12-22) - -#### :bug: Bug Fix -* `babel-plugin-transform-block-scoping` - * [#15301](https://github.com/babel/babel/pull/15301) fix: `transform-block-scoping` accesses properties of `null` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-proposal-class-properties`, `babel-traverse` - * [#15294](https://github.com/babel/babel/pull/15294) Properly transpile exported classes that shadowed builtins ([@JLHwung](https://github.com/JLHwung)) -## v7.20.7 (2022-12-22) - -#### :eyeglasses: Spec Compliance -* `babel-helper-member-expression-to-functions`, `babel-helper-replace-supers`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes` - * [#15223](https://github.com/babel/babel/pull/15223) fix: Deleting super property should throw ([@SuperSodaSea](https://github.com/SuperSodaSea)) -* `babel-helpers`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes`, `babel-plugin-transform-object-super` - * [#15241](https://github.com/babel/babel/pull/15241) fix: Throw correct error types from sed ant class TDZ helpers ([@SuperSodaSea](https://github.com/SuperSodaSea)) - -#### :bug: Bug Fix -* `babel-parser`, `babel-plugin-transform-typescript` - * [#15209](https://github.com/babel/babel/pull/15209) fix: Support auto accessors with TypeScript annotations ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-traverse` - * [#15287](https://github.com/babel/babel/pull/15287) Fix `.parentPath` after rename in `SwitchCase` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-typescript`, `babel-traverse` - * [#15284](https://github.com/babel/babel/pull/15284) fix: Ts import type and func with duplicate name ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-block-scoping` - * [#15278](https://github.com/babel/babel/pull/15278) Fix tdz analysis for reassigned captured for bindings ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-proposal-async-generator-functions`, `babel-preset-env` - * [#15235](https://github.com/babel/babel/pull/15235) fix: Transform `for await` with shadowed variables ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator`, `babel-plugin-proposal-optional-chaining` - * [#15258](https://github.com/babel/babel/pull/15258) fix: Correctly generate `(a ?? b) as T` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-react-jsx`, `babel-types` - * [#15233](https://github.com/babel/babel/pull/15233) fix: Emit correct sourcemap ranges for `JSXText` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core`, `babel-helpers`, `babel-plugin-transform-computed-properties`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15232](https://github.com/babel/babel/pull/15232) fix: Computed properties should keep original definition order ([@SuperSodaSea](https://github.com/SuperSodaSea)) -* `babel-helper-member-expression-to-functions`, `babel-helper-replace-supers`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-classes` - * [#15223](https://github.com/babel/babel/pull/15223) fix: Deleting super property should throw ([@SuperSodaSea](https://github.com/SuperSodaSea)) -* `babel-generator` - * [#15216](https://github.com/babel/babel/pull/15216) fix: Print newlines for leading Comments of `TSEnumMember` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-plugin-transform-block-scoping`, `babel-traverse` - * [#15275](https://github.com/babel/babel/pull/15275) Improve relative execution tracking in fn exprs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-helper-define-map`, `babel-plugin-transform-property-mutators` - * [#15274](https://github.com/babel/babel/pull/15274) Inline & simplify `@babel/helper-define-map` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-parameters`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-traverse` - * [#15200](https://github.com/babel/babel/pull/15200) Rewrite `transform-block-scoping` plugin ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :running_woman: Performance -* `babel-helper-compilation-targets` - * [#15228](https://github.com/babel/babel/pull/15228) perf: Speed up `getTargets` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.20.6 (2022-11-28) - -#### :bug: Bug Fix -* `babel-helpers` - * [#15231](https://github.com/babel/babel/pull/15231) Update `checkInRHS` helper min version ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.20.5 (2022-11-28) - -#### :eyeglasses: Spec Compliance -* `babel-helpers`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-modules-commonjs`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-traverse` - * [#15183](https://github.com/babel/babel/pull/15183) Improve array destructuring spec compliance ([@SuperSodaSea](https://github.com/SuperSodaSea)) -* `babel-cli`, `babel-helpers`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-transform-classes`, `babel-plugin-transform-runtime`, `babel-preset-env` - * [#15182](https://github.com/babel/babel/pull/15182) fix: apply toPropertyKey when defining class members ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-private-property-in-object`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15133](https://github.com/babel/babel/pull/15133) fix: validate rhs of `in` when transpiling `#p in C` ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-parser` - * [#15225](https://github.com/babel/babel/pull/15225) Parse `using[foo]` as computed member expression ([@JLHwung](https://github.com/JLHwung)) - * [#15207](https://github.com/babel/babel/pull/15207) Export `ParseResult` type ([@davydof](https://github.com/davydof)) - * [#15198](https://github.com/babel/babel/pull/15198) fix: parse `import module, ...` ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-wrap-function`, `babel-preset-env`, `babel-traverse` - * [#15181](https://github.com/babel/babel/pull/15181) fix: Edge cases for async functions and `noNewArrow` assumption ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-parameters`, `babel-traverse` - * [#15163](https://github.com/babel/babel/pull/15163) fix: Throw error when compiling `super()` in arrow functions with default / rest parameters ([@SuperSodaSea](https://github.com/SuperSodaSea)) -* `babel-helpers`, `babel-node`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15194](https://github.com/babel/babel/pull/15194) fix: Bump `regenerator` and add tests ([@SuperSodaSea](https://github.com/SuperSodaSea)) -* `babel-helper-create-regexp-features-plugin` - * [#15192](https://github.com/babel/babel/pull/15192) fix: Update `regjsparser` for `@babel/standalone` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser`, `babel-types` - * [#15109](https://github.com/babel/babel/pull/15109) fix: Babel 8 types ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator` - * [#15143](https://github.com/babel/babel/pull/15143) Don't print inner comments as leading when wrapping in `(``)` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-block-scoping`, `babel-traverse` - * [#15167](https://github.com/babel/babel/pull/15167) Register `switch`'s `discriminant` in the outer scope ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-generator` - * [#15173](https://github.com/babel/babel/pull/15173) Improve generator behavior when `comments:false` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-block-scoping` - * [#15164](https://github.com/babel/babel/pull/15164) Only extract IDs for TDZ checks in assign when necessary ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-core`, `babel-parser` - * [#15202](https://github.com/babel/babel/pull/15202) Bump typescript to 4.9.3 ([@JLHwung](https://github.com/JLHwung)) -## v7.20.4 (2022-11-08) - -#### :bug: Bug Fix -* `babel-generator` - * [#15160](https://github.com/babel/babel/pull/15160) Fix printing of comments before `=>` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-plugin-transform-typescript` - * [#15144](https://github.com/babel/babel/pull/15144) Fallback to printing inner comments as trailing ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.20.3 (2022-11-07) - -#### :bug: Bug Fix -* `babel-generator` - * [#15135](https://github.com/babel/babel/pull/15135) Don't convert line comments containing `*/` to block comments ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-parameters` - * [#15146](https://github.com/babel/babel/pull/15146) Fix compilation of parameters in async generators ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#15134](https://github.com/babel/babel/pull/15134) fix: support await as for-of-lhs ([@JLHwung](https://github.com/JLHwung)) -## v7.20.2 (2022-11-04) - -#### :bug: Bug Fix -* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-helper-simple-access`, `babel-node`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-react-constant-elements`, `babel-preset-env`, `babel-standalone`, `babel-types` - * [#15124](https://github.com/babel/babel/pull/15124) fix: `@babel/node` repl and enable `no-use-before-define` rule ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-typescript` - * [#15121](https://github.com/babel/babel/pull/15121) fix: `tsSatisfiesExpression` check with different duplicated `@babel/types` versions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#15094](https://github.com/babel/babel/pull/15094) fix: `parser` typings for plugins ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator` - * [#15118](https://github.com/babel/babel/pull/15118) Improve printing of [no LineTerminator here] with comments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-proposal-decorators`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-transform-jscript` - * [#15113](https://github.com/babel/babel/pull/15113) fix: wrap anonymous class expression within statement ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-destructuring` - * [#15104](https://github.com/babel/babel/pull/15104) fix: Destructuring exceptions `for ( let { } = 0 ; 0 ; ) ` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.20.1 (2022-11-01) - -#### :bug: Bug Fix -* `babel-plugin-proposal-async-generator-functions` - * [#15103](https://github.com/babel/babel/pull/15103) fix: Compile re-declare var in `init` and `body` of `for await` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-proposal-class-properties`, `babel-traverse` - * [#15106](https://github.com/babel/babel/pull/15106) Do not mark `in` and `instanceof` as constant expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-named-capturing-groups-regex` - * [#15092](https://github.com/babel/babel/pull/15092) Support `indices.groups` when compiling named groups in regexps ([@ptomato](https://github.com/ptomato)) -* `babel-parser` - * [#15102](https://github.com/babel/babel/pull/15102) fix: Parse re-declare var in class static body ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#15096](https://github.com/babel/babel/pull/15096) fix: `a satisfies b` as lval ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helpers`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex` - * [#15090](https://github.com/babel/babel/pull/15090) Handle multiple named groups in wrapRegExp replace() ([@ptomato](https://github.com/ptomato)) -* `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-parameters`, `babel-preset-env` - * [#15081](https://github.com/babel/babel/pull/15081) Move the generator body to a gen IIFE when compiling its params ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-generator` - * [#15080](https://github.com/babel/babel/pull/15080) Automatically print inner comments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.20.0 (2022-10-27) - -#### :rocket: New Feature -* `babel-compat-data`, `babel-helper-compilation-targets`, `babel-preset-env` - * [#14944](https://github.com/babel/babel/pull/14944) Add `deno` compilation target ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-syntax-typescript` - * [#14923](https://github.com/babel/babel/pull/14923) Expose `dts` option in `@babel/plugin-syntax-typescript` ([@oceandrama](https://github.com/oceandrama)) -* `babel-generator`, `babel-parser`, `babel-plugin-syntax-explicit-resource-management`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-destructuring`, `babel-standalone`, `babel-traverse`, `babel-types` - * [#14968](https://github.com/babel/babel/pull/14968) Parse `using` declaration (explicit resource management) ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-parser`, `babel-plugin-syntax-import-reflection`, `babel-standalone`, `babel-types` - * [#14926](https://github.com/babel/babel/pull/14926) Parse import reflection ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-helper-skip-transparent-expression-wrappers`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types` - * [#14211](https://github.com/babel/babel/pull/14211) [ts] Add support for `expr satisfies Type` expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix -* `babel-generator`, `babel-parser` - * [#15032](https://github.com/babel/babel/pull/15032) Fix handling of comments with decorators before `export` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#15008](https://github.com/babel/babel/pull/15008) Support more inner comments ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* `babel-helpers`, `babel-node`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#15078](https://github.com/babel/babel/pull/15078) Update `regenerator-runtime` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.19.6 (2022-10-20) - -#### :eyeglasses: Spec Compliance -* `babel-plugin-proposal-decorators` - * [#15059](https://github.com/babel/babel/pull/15059) Ensure non-static decorators are applied when a class is instantiated. ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-parser` - * [#15062](https://github.com/babel/babel/pull/15062) Fix parsing of block comments nested in flow comments ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#15052](https://github.com/babel/babel/pull/15052) fix: improve module block program location tracking ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-runtime`, `babel-runtime-corejs2`, `babel-runtime-corejs3` - * [#15060](https://github.com/babel/babel/pull/15060) Ensure `@babel/runtime-corejs3/core-js/*.js` can be imported on Node.js 17+ ([@JLHwung](https://github.com/JLHwung)) -* `babel-preset-env`, `babel-traverse` - * [#15043](https://github.com/babel/babel/pull/15043) fix: preserve this for `super.*` template tags ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-generator`, `babel-plugin-transform-flow-comments` - * [#15037](https://github.com/babel/babel/pull/15037) Improve generation of comments without location ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :memo: Documentation -* `babel-standalone` - * [#15055](https://github.com/babel/babel/pull/15055) Fix missing `transformSync` function name ([@lomirus](https://github.com/lomirus)) - -#### :house: Internal -* `babel-parser` - * [#15056](https://github.com/babel/babel/pull/15056) Use `startLoc.index` instead of carrying around `start` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* Other - * [#15035](https://github.com/babel/babel/pull/15035) chore: Update yarn 3.2.4 ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :running_woman: Performance -* `babel-core`, `babel-standalone` - * [#15023](https://github.com/babel/babel/pull/15023) Don't bundle unnecessary plugins in `@babel/standalone` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.19.5 (2022-10-10) - -#### :bug: Bug Fix -* `babel-generator` - * [#15031](https://github.com/babel/babel/pull/15031) Fix "Cannot read properties of undefined" regression ([@farewell-zy](https://github.com/farewell-zy)) -## v7.19.4 (2022-10-10) - -#### :eyeglasses: Spec Compliance -* `babel-plugin-transform-block-scoping` - * [#15019](https://github.com/babel/babel/pull/15019) fix: check constant violation inside loops ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-transform-destructuring` - * [#14985](https://github.com/babel/babel/pull/14985) Disallow rest object destructuring of null/undefined ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix -* `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-typescript`, `babel-types` - * [#14109](https://github.com/babel/babel/pull/14109) Fix: properly scope variables in TSModuleBlock ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-plugin-transform-destructuring`, `babel-plugin-transform-react-constant-elements`, `babel-traverse` - * [#15027](https://github.com/babel/babel/pull/15027) fix: mark `var` declarations in loops as not constant ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-string-parser`, `babel-parser`, `babel-types` - * [#14964](https://github.com/babel/babel/pull/14964) Never throw for invalid escapes in tagged templates ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-parser` - * [#14980](https://github.com/babel/babel/pull/14980) Improve module expression parsing/printing ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-destructuring` - * [#14984](https://github.com/babel/babel/pull/14984) Fix holes handling in optimized array destructuring ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-create-class-features-plugin`, `babel-helper-fixtures`, `babel-helper-simple-access`, `babel-helper-transform-fixture-test-runner`, `babel-helpers`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-proposal-dynamic-import`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-logical-assignment-operators`, `babel-plugin-proposal-nullish-coalescing-operator`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-jscript`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-new-target`, `babel-plugin-transform-object-super`, `babel-plugin-transform-parameters`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-plugin-transform-shorthand-properties`, `babel-plugin-transform-spread`, `babel-plugin-transform-strict-mode`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-preset-env`, `babel-preset-react`, `babel-preset-typescript`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-traverse` - * [#14979](https://github.com/babel/babel/pull/14979) Improve comments generation ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-fixtures`, `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-modules-commonjs`, `babel-traverse` - * [#14967](https://github.com/babel/babel/pull/14967) Improve source map generation ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* Other - * [#15001](https://github.com/babel/babel/pull/15001) Run test262 again ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-compat-data`, `babel-preset-env` - * [#14976](https://github.com/babel/babel/pull/14976) Internally rename `proposal-*` to `transform-*` in preset-env ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.19.3 (2022-09-27) - -#### :bug: Bug Fix -* `babel-plugin-proposal-decorators` - * [#8566](https://github.com/babel/babel/pull/8566) Correctly update bindings of decorated class declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#14974](https://github.com/babel/babel/pull/14974) fix: Normal parsing of `JSXText` following `JSXSpreadChild` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#14941](https://github.com/babel/babel/pull/14941) fix: Support local exports in TS `declare module`s ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#14940](https://github.com/babel/babel/pull/14940) fix: allow ts redeclaration with `import =` and `var` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator` - * [#14962](https://github.com/babel/babel/pull/14962) Fix printing of Flow internal slot functions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-cli` - * [#14950](https://github.com/babel/babel/pull/14950) Emit `@babel/cli` source maps based on configuration files ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-typescript` - * [#14946](https://github.com/babel/babel/pull/14946) fix: ts exported vars are shadowed by `declare` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-core` - * [#14954](https://github.com/babel/babel/pull/14954) Optional filename when preset uses fn test/include/exclude ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-helper-compilation-targets`, `babel-helper-transform-fixture-test-runner`, `babel-parser`, `babel-preset-env`, `babel-traverse` - * [#14961](https://github.com/babel/babel/pull/14961) chore: use `c8` for coverage testing ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :microscope: Output optimization -* `babel-plugin-transform-typescript` - * [#14952](https://github.com/babel/babel/pull/14952) [ts] remove nested `declare namespace` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.19.2 (2022-09-15) - -#### :bug: Bug Fix -* `babel-runtime-corejs2` - * [#14937](https://github.com/babel/babel/pull/14937) fix: runtime-corejs 2 should depend on core-js@2 ([@JLHwung](https://github.com/JLHwung)) -## v7.19.1 (2022-09-14) - -#### :bug: Bug Fix -* `babel-core` - * [#14930](https://github.com/babel/babel/pull/14930) Avoid fancy stack traces size computation ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-traverse` - * [#14932](https://github.com/babel/babel/pull/14932) fix: isForAwaitStatement is broken ([@JLHwung](https://github.com/JLHwung)) -* Other - * [#14872](https://github.com/babel/babel/pull/14872) Use the built-in class fields and private methods rules in ESLint 8 ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser` - * [#14920](https://github.com/babel/babel/pull/14920) [estree] attach comments after directives at the end of file ([@hegemonic](https://github.com/hegemonic)) - * [#14900](https://github.com/babel/babel/pull/14900) [ts] allow redeclaring a var/type with the same name as import ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-typescript` - * [#14913](https://github.com/babel/babel/pull/14913) fix: do not remove type import used in TS import= ([@JLHwung](https://github.com/JLHwung)) -## v7.19.0 (2022-09-05) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#14666](https://github.com/babel/babel/pull/14666) Support private name in decorator member expression ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#14877](https://github.com/babel/babel/pull/14877) Remove one promise tick in yield* (tc39/ecma262#2819) ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :rocket: New Feature -* `babel-generator`, `babel-helpers`, `babel-parser`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#14836](https://github.com/babel/babel/pull/14836) Add 2022-03 decorators version (stage 3) ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#14695](https://github.com/babel/babel/pull/14695) [parser] Make `decoratorsBeforeExport` default to `false` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-parser` - * [#14744](https://github.com/babel/babel/pull/14744) Default to hash syntax for Record&Tuple ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-standalone` - * [#14867](https://github.com/babel/babel/pull/14867) feat: add proposal-record-and-tuple to standalone ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-regexp-features-plugin`, `babel-helpers`, `babel-plugin-proposal-duplicate-named-capturing-groups-regex`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-standalone` - * [#14805](https://github.com/babel/babel/pull/14805) Add support for the duplicate named capturing groups proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix -* `babel-helper-function-name`, `babel-helper-wrap-function`, `babel-plugin-transform-classes` - * [#14897](https://github.com/babel/babel/pull/14897) Fix: class transform should not drop method definition when key contains non-BMP characters ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-typescript` - * [#14890](https://github.com/babel/babel/pull/14890) fix: TS plugin shouldn't remove `#privateField!` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#14819](https://github.com/babel/babel/pull/14819) fix: parse a<b>>>c as a<(b>>>c) ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-builder-react-jsx` - * [#14886](https://github.com/babel/babel/pull/14886) Fix helper-builder-react-jsx compat with Babel 7.9 ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-core` - * [#11612](https://github.com/babel/babel/pull/11612) Make error message prefixes more descriptive ([@eps1lon](https://github.com/eps1lon)) - * [#11554](https://github.com/babel/babel/pull/11554) Hide internal `@babel/core` functions in config errors ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :memo: Documentation -* [#14895](https://github.com/babel/babel/pull/14895) docs: remove david-dm from README ([@SukkaW](https://github.com/SukkaW)) - -#### :house: Internal -* `babel-standalone` - * [#14863](https://github.com/babel/babel/pull/14863) ship @babel/standalone source maps ([@JLHwung](https://github.com/JLHwung)) -* `babel-core`, `babel-parser`, `babel-traverse` - * [#14880](https://github.com/babel/babel/pull/14880) Update typescript to 4.8 ([@JLHwung](https://github.com/JLHwung)) -## v7.18.13 (2022-08-22) - -#### :bug: Bug Fix -* `babel-generator` - * [#14869](https://github.com/babel/babel/pull/14869) fix: jsx with `retainLines` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core` - * [#14843](https://github.com/babel/babel/pull/14843) Fix a race condition in `@babel/core` ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-destructuring` - * [#14841](https://github.com/babel/babel/pull/14841) fix: Destructuring exceptions in nested `for` expressions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-traverse` - * [#14833](https://github.com/babel/babel/pull/14833) Let `path.remove()` remove `IfStatement.alternate` ([@djpohly](https://github.com/djpohly)) - * [#14837](https://github.com/babel/babel/pull/14837) Add support for static evaluation of ?? operator ([@djpohly](https://github.com/djpohly)) - -#### :house: Internal -* [#14846](https://github.com/babel/babel/pull/14846) fix: Print build logs correctly ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.18.12 (2022-08-05) - -#### :bug: Bug Fix -* `babel-plugin-transform-react-constant-elements` - * [#14828](https://github.com/babel/babel/pull/14828) fix: react-cons-elem should not hoist router comp ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator` - * [#14810](https://github.com/babel/babel/pull/14810) fix: Certain comments cause `generator` exceptions ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-typescript` - * [#14827](https://github.com/babel/babel/pull/14827) Fix: do not report global variables as injected binding ([@JLHwung](https://github.com/JLHwung)) -## v7.18.11 (2022-08-04) - -#### :bug: Bug Fix -* `babel-helper-wrap-function` - * [#14825](https://github.com/babel/babel/pull/14825) fix: helper-wrap-function compat with old traverse ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* `babel-traverse` - * [#14821](https://github.com/babel/babel/pull/14821) chore(traverse): fix some internal typescript types ([@danez](https://github.com/danez)) -* `babel-parser` - * [#14801](https://github.com/babel/babel/pull/14801) babel parser type improvements ([@zxbodya](https://github.com/zxbodya)) -## v7.18.10 (2022-08-01) - -#### :rocket: New Feature -* `babel-helper-string-parser`, `babel-types` - * [#14757](https://github.com/babel/babel/pull/14757) feat: Automatically generate `cooked` for `templateElement` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :bug: Bug Fix -* `babel-parser` - * [#14817](https://github.com/babel/babel/pull/14817) fix(parser): allow TS declare readonly fields with initializers ([@Josh-Cena](https://github.com/Josh-Cena)) -* `babel-helper-string-parser`, `babel-parser` - * [#14798](https://github.com/babel/babel/pull/14798) Fix position of errors in template literals after newlines ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-typescript` - * [#14774](https://github.com/babel/babel/pull/14774) fix: TS `declare class` in namespace should be removed ([@yimingjfe](https://github.com/yimingjfe)) -* `babel-plugin-transform-react-jsx` - * [#14759](https://github.com/babel/babel/pull/14759) fix: skip flattening spread object with __proto__ ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator` - * [#14762](https://github.com/babel/babel/pull/14762) fix: Types containing comments generate invalid code ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-helper-wrap-function`, `babel-plugin-transform-async-to-generator`, `babel-traverse` - * [#14752](https://github.com/babel/babel/pull/14752) Fix compiling async arrows in uncompiled class fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* Other - * [#14800](https://github.com/babel/babel/pull/14800) chore: Remove `.yarnrc` file ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#14802](https://github.com/babel/babel/pull/14802) chore: Fix coverage test ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#14671](https://github.com/babel/babel/pull/14671) feat: Make most `make` commands cross-platform ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#14790](https://github.com/babel/babel/pull/14790) enable typescript incremental builds ([@zxbodya](https://github.com/zxbodya)) -* `babel-traverse` - * [#14799](https://github.com/babel/babel/pull/14799) Restructure virtual types validator ([@JLHwung](https://github.com/JLHwung)) -* `babel-cli` - * [#14779](https://github.com/babel/babel/pull/14779) chore: expand prettier-e2e test and update typings/deps ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#14796](https://github.com/babel/babel/pull/14796) Make ParseError Much Simpler now that we can use TypeScript ([@tolmasky](https://github.com/tolmasky)) -* `babel-core`, `babel-parser` - * [#14785](https://github.com/babel/babel/pull/14785) chore: remove flow check scripts ([@JLHwung](https://github.com/JLHwung)) -* `babel-cli`, `babel-core`, `babel-parser`, `babel-plugin-transform-unicode-escapes`, `babel-preset-env`, `babel-template`, `babel-traverse` - * [#14783](https://github.com/babel/babel/pull/14783) Convert `@babel/parser` to TypeScript ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-string-parser`, `babel-parser` - * [#14772](https://github.com/babel/babel/pull/14772) Extract string parsing to a separate package ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-cli`, `babel-node` - * [#14765](https://github.com/babel/babel/pull/14765) Enforce type checking on `babel-{cli,node}` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :microscope: Output optimization -* `babel-plugin-proposal-export-default-from` - * [#14768](https://github.com/babel/babel/pull/14768) optimize: Simplify the `export-default-from` transform ([@magic-akari](https://github.com/magic-akari)) -## v7.18.9 (2022-07-18) - -#### :bug: Bug Fix -* `babel-plugin-transform-modules-systemjs`, `babel-types` - * [#14763](https://github.com/babel/babel/pull/14763) fix: allow exporting `TSDeclareFunction` as default ([@zxbodya](https://github.com/zxbodya)) -* `babel-generator` - * [#14758](https://github.com/babel/babel/pull/14758) fix: `returnType` with comments generates incorrect code ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :nail_care: Polish -* `babel-cli` - * [#14748](https://github.com/babel/babel/pull/14748) Print a message when the watcher of `babel-cli` is ready. ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-core`, `babel-helper-remap-async-to-generator`, `babel-helpers`, `babel-parser`, `babel-plugin-transform-block-scoping`, `babel-preset-env` - * [#13414](https://github.com/babel/babel/pull/13414) Prepare for compiling Babel to native ESM ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-helper-member-expression-to-functions`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-helper-wrap-function`, `babel-helpers`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-traverse`, `babel-types` - * [#14739](https://github.com/babel/babel/pull/14739) Provide better parentPath typings ([@JLHwung](https://github.com/JLHwung)) - -#### :running_woman: Performance -* `babel-generator` - * [#14701](https://github.com/babel/babel/pull/14701) perf: Improve generator perf ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.18.8 (2022-07-08) - -#### :eyeglasses: Spec Compliance -* `babel-parser`, `babel-types` - * [#14730](https://github.com/babel/babel/pull/14730) Misc fixes to `@babel/types` AST definitions ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-plugin-transform-parameters` - * [#14736](https://github.com/babel/babel/pull/14736) Inject IIFE when variables shadow binding in rest param ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-classes` - * [#14709](https://github.com/babel/babel/pull/14709) Fix compilation of nested `super(...)` calls ([@dbacarel](https://github.com/dbacarel)) -* `babel-plugin-transform-for-of`, `babel-plugin-transform-spread`, `babel-traverse`, `babel-types` - * [#14393](https://github.com/babel/babel/pull/14393) Support some TSTypes in the inferrer ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` - * [#14708](https://github.com/babel/babel/pull/14708) Unshadow `cjs` exports when transforming mutations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :memo: Documentation -* [#14486](https://github.com/babel/babel/pull/14486) Fix test debugging instructions for contributors ([@conartist6](https://github.com/conartist6)) - -#### :house: Internal -* `babel-types` - * [#14737](https://github.com/babel/babel/pull/14737) fix: deep clone shared AST field definitions ([@JLHwung](https://github.com/JLHwung)) -* Other - * [#14720](https://github.com/babel/babel/pull/14720) fix: support compiling monorepo on single-core CPU machines ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-fixtures`, `babel-parser` - * [#12619](https://github.com/babel/babel/pull/12619) Add json schema of fixture runner options ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-plugin-transform-typescript` - * [#14723](https://github.com/babel/babel/pull/14723) [optimizeConstEnums] Inline const enum if only exported as type ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.18.7 (2022-06-28) - -#### :bug: Bug Fix -* `babel-types` - * [#14706](https://github.com/babel/babel/pull/14706) fix: `@babel/types` exception in typescript project. ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.18.6 (2022-06-27) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#14650](https://github.com/babel/babel/pull/14650) [ts] Disallow property access after instantiation expression ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#14636](https://github.com/babel/babel/pull/14636) [ts] Allow `...<...>` followed by newline or binary operator ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator`, `babel-parser`, `babel-preset-env`, `babel-template` - * [#14668](https://github.com/babel/babel/pull/14668) JSON modules should be imported with default ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-helper-remap-async-to-generator`, `babel-plugin-proposal-async-generator-functions` - * [#14391](https://github.com/babel/babel/pull/14391) Transform `await` in computed class keys ([@Yokubjon-J](https://github.com/Yokubjon-J)) -* `babel-plugin-transform-parameters` - * [#14694](https://github.com/babel/babel/pull/14694) fix: preserve function params type if possible ([@magic-akari](https://github.com/magic-akari)) -* `babel-core` - * [#14583](https://github.com/babel/babel/pull/14583) fix: Memory leak when deep cloning in `babel-core` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-core`, `babel-helper-check-duplicate-nodes`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-transform-runtime` - * [#14663](https://github.com/babel/babel/pull/14663) Fix `import { types } from "@babel/core"` with native ESM ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-standalone` - * [#14697](https://github.com/babel/babel/pull/14697) Add `proposal-unicode-sets-regex` to `@babel/standalone` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* Other - * [#14687](https://github.com/babel/babel/pull/14687) chore: Update bench baselines ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-generator`, `babel-types` - * [#14685](https://github.com/babel/babel/pull/14685) enable TS compiler option: strictBindCallApply ([@JLHwung](https://github.com/JLHwung)) -* `babel-code-frame`, `babel-core`, `babel-generator`, `babel-helper-annotate-as-pure`, `babel-helper-builder-binary-assignment-operator-visitor`, `babel-helper-builder-react-jsx`, `babel-helper-check-duplicate-nodes`, `babel-helper-compilation-targets`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-define-map`, `babel-helper-explode-assignable-expression`, `babel-helper-fixtures`, `babel-helper-function-name`, `babel-helper-hoist-variables`, `babel-helper-member-expression-to-functions`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-optimise-call-expression`, `babel-helper-plugin-test-runner`, `babel-helper-plugin-utils`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-helper-simple-access`, `babel-helper-split-export-declaration`, `babel-helper-transform-fixture-test-runner`, `babel-helper-validator-option`, `babel-helper-wrap-function`, `babel-helpers`, `babel-highlight`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-object-super`, `babel-plugin-transform-parameters`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-compat`, `babel-plugin-transform-react-jsx-source`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-runtime`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-preset-env`, `babel-preset-typescript`, `babel-standalone`, `babel-template`, `babel-traverse`, `babel-types` - * [#14601](https://github.com/babel/babel/pull/14601) enable noImplicitAny ([@JLHwung](https://github.com/JLHwung)) -* `babel-core`, `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-destructuring` - * [#14659](https://github.com/babel/babel/pull/14659) Run Babel asynchronously in fixtures ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.18.5 (2022-06-13) - -#### :bug: Bug Fix -* `babel-plugin-transform-new-target` - * [#14611](https://github.com/babel/babel/pull/14611) fix: `new.target` with shadowed class name ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-plugin-transform-modules-systemjs` - * [#14655](https://github.com/babel/babel/pull/14655) Fix named destructuring exports ([@underfin](https://github.com/underfin)) - -#### :memo: Documentation -* [#14332](https://github.com/babel/babel/pull/14332) docs: eslint-parser requireConfigFile behaviour ([@JLHwung](https://github.com/JLHwung)) -* [#14619](https://github.com/babel/babel/pull/14619) Move v7 prereleases changelog to a separate file ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-traverse` - * [#14649](https://github.com/babel/babel/pull/14649) Rely on the call stack to clean up cache in `_guessExecutionStatusRelativeTo` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core` - * [#14641](https://github.com/babel/babel/pull/14641) Change limit of source map 3MB ([@vasicvuk](https://github.com/vasicvuk)) -* Other - * [#14627](https://github.com/babel/babel/pull/14627) Speedup e2e test on github ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - * [#14248](https://github.com/babel/babel/pull/14248) chore: automate compat-data update ([@tony-go](https://github.com/tony-go)) -* `babel-parser` - * [#14592](https://github.com/babel/babel/pull/14592) feat: Automatically generate test results that do not exist ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :running_woman: Performance -* `babel-traverse` - * [#14617](https://github.com/babel/babel/pull/14617) Fix `_guessExecutionStatusRelativeToDifferentFunctions` perf ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.18.4 (2022-05-29) - -#### :eyeglasses: Spec Compliance -* `babel-types` - * [#14591](https://github.com/babel/babel/pull/14591) fix: remove TSDeclareFunction from ExportDefaultDeclaration ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-plugin-transform-typescript` - * [#14610](https://github.com/babel/babel/pull/14610) Fix `@babel/transform-typescript` compatibility with Next.js ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#14604](https://github.com/babel/babel/pull/14604) [ts] FIx parsing of nested `extends` type in arrow type ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-check-duplicate-nodes`, `babel-parser` - * [#14595](https://github.com/babel/babel/pull/14595) fix: `loc.index` of some nodes is wrongly enumerable. ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :house: Internal -* `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-modules-systemjs` - * [#14599](https://github.com/babel/babel/pull/14599) refactor: avoid mutating AST nodes ([@JLHwung](https://github.com/JLHwung)) -## v7.18.3 (2022-05-25) - -#### :bug: Bug Fix -* `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#14588](https://github.com/babel/babel/pull/14588) Restore es5 compatibility in `@babel/runtime/regenerator` ([@jlowcs](https://github.com/jlowcs)) -## v7.18.2 (2022-05-25) - -#### :bug: Bug Fix -* `babel-plugin-transform-template-literals` - * [#14582](https://github.com/babel/babel/pull/14582) fix: skip template literal transform for TSLiteralType ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers` - * [#14537](https://github.com/babel/babel/pull/14537) Support frozen built-ins in `@babel/runtime` ([@Jack-Works](https://github.com/Jack-Works)) -* `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#14581](https://github.com/babel/babel/pull/14581) Define the global `regeneratorRuntime` in `@babel/runtime/regenerator` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-environment-visitor`, `babel-helper-replace-supers`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-decorators`, `babel-traverse`, `babel-types` - * [#14371](https://github.com/babel/babel/pull/14371) environmentVisitor should skip decorator expressions ([@JLHwung](https://github.com/JLHwung)) - -#### :memo: Documentation -* `babel-types` - * [#14571](https://github.com/babel/babel/pull/14571) add Accessor alias description ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* [#14541](https://github.com/babel/babel/pull/14541) Fix synchronization between main thread and worker ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.18.1 (2022-05-19) - -#### :bug: Bug Fix -* `babel-plugin-transform-typescript` - * [#14566](https://github.com/babel/babel/pull/14566) Fix TypeScript plugin compat with `@babel/types` versions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-for-of` - * [#14564](https://github.com/babel/babel/pull/14564) fix: Duplicate declaration in transformed for...of ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -## v7.18.0 (2022-05-19) - -#### :rocket: New Feature -* `babel-preset-env` - * [#14556](https://github.com/babel/babel/pull/14556) feat: add import-assertions to shippedProposals ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-class-features-plugin`, `babel-helper-define-map`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-destructuring-private`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-typescript`, `babel-standalone`, `babel-traverse`, `babel-types` - * [#14304](https://github.com/babel/babel/pull/14304) Transform destructuring private ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-parser`, `babel-types` - * [#14359](https://github.com/babel/babel/pull/14359) [ts 4.7] Support optional variance annotations ([@magic-akari](https://github.com/magic-akari)) -* `babel-generator`, `babel-parser` - * [#14476](https://github.com/babel/babel/pull/14476) [ts 4.7] Support `extends` constraints for `infer` ([@sosukesuzuki](https://github.com/sosukesuzuki)) -* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types` - * [#14457](https://github.com/babel/babel/pull/14457) [ts] Add support for instantiation expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` - * [#14456](https://github.com/babel/babel/pull/14456) Pass filename to `importInterop` method ([@NickHeiner](https://github.com/NickHeiner)) - -#### :bug: Bug Fix -* `babel-types` - * [#14551](https://github.com/babel/babel/pull/14551) Do not create multiple copies of comments when cloning nodes ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) -* `babel-parser` - * [#14557](https://github.com/babel/babel/pull/14557) Fix parsing of `<` after object literals with the `jsx` plugin ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-react-pure-annotations` - * [#14528](https://github.com/babel/babel/pull/14528) fix: do not mark computed `React[...]` methods as pure ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish -* `babel-core`, `babel-helper-transform-fixture-test-runner`, `babel-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone` - * [#14538](https://github.com/babel/babel/pull/14538) Inline `regeneratorRuntime` as a normal helper ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-core`, `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-modules-systemjs` - * [#14530](https://github.com/babel/babel/pull/14530) improve helper-create-class-features typings ([@JLHwung](https://github.com/JLHwung)) -## v7.17.12 (2022-05-16) - -#### :bug: Bug Fix -* `babel-plugin-transform-react-constant-elements` - * [#14536](https://github.com/babel/babel/pull/14536) Never hoist JSX elts referencing vars from the current scope ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-generator` - * [#14524](https://github.com/babel/babel/pull/14524) fix: perserve parentheses of lhs id with rhs unamed fn ([@JLHwung](https://github.com/JLHwung)) - * [#14532](https://github.com/babel/babel/pull/14532) Print necessary parentheses for functions in postfix expressions ([@xiawenqi](https://github.com/xiawenqi)) -* `babel-plugin-transform-destructuring` - * [#14494](https://github.com/babel/babel/pull/14494) Update scope info after destructuring transform ([@peey](https://github.com/peey)) -* `babel-parser` - * [#14522](https://github.com/babel/babel/pull/14522) fix: allow liberal named type-as imports ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser`, `babel-plugin-transform-destructuring`, `babel-types` - * [#14500](https://github.com/babel/babel/pull/14500) Fix parsing ts type casts and nested patterns in destructuring ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-plugin-proposal-decorators`, `babel-types` - * [#14519](https://github.com/babel/babel/pull/14519) @babel/types builder improvements ([@JLHwung](https://github.com/JLHwung)) -* `babel-core` - * [#14490](https://github.com/babel/babel/pull/14490) Update to Jest 28 ([@JLHwung](https://github.com/JLHwung)) -* `babel-core`, `babel-generator`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-module-transforms`, `babel-helper-plugin-utils`, `babel-parser`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-export-namespace-from`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-logical-assignment-operators`, `babel-plugin-proposal-nullish-coalescing-operator`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-proposal-unicode-property-regex`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-destructuring-private`, `babel-plugin-syntax-flow`, `babel-plugin-syntax-import-assertions`, `babel-plugin-syntax-pipeline-operator`, `babel-plugin-syntax-record-and-tuple`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-instanceof`, `babel-plugin-transform-jscript`, `babel-plugin-transform-literals`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-new-target`, `babel-plugin-transform-parameters`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-reserved-words`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`, `babel-traverse`, `babel-types` - * [#14499](https://github.com/babel/babel/pull/14499) Provide plugin/preset typings from plugin-utils ([@JLHwung](https://github.com/JLHwung)) -## v7.17.11 (2022-04-29) - -#### :bug: Bug Fix -* `babel-runtime-corejs2` - * [#14509](https://github.com/babel/babel/pull/14509) fix: `@babel/runtime-corejs2` should depend on core-js 2 ([@JLHwung](https://github.com/JLHwung)) -## v7.17.10 (2022-04-29) - -#### :bug: Bug Fix -* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-transform-fixture-test-runner` - * [#14479](https://github.com/babel/babel/pull/14479) [cli] Avoid `SourceMapGenerator` for simple map concatenation ([@jridgewell](https://github.com/jridgewell)) - -#### :nail_care: Polish -* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-fixtures`, `babel-helper-transform-fixture-test-runner` - * [#14506](https://github.com/babel/babel/pull/14506) Do not add sourcemap markings for indentation ([@jridgewell](https://github.com/jridgewell)) -* `babel-plugin-proposal-pipeline-operator`, `babel-traverse` - * [#14424](https://github.com/babel/babel/pull/14424) Update detection of pure nodes (`Scope#isPure`) ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* `babel-core` - * [#14493](https://github.com/babel/babel/pull/14493) Remove git.io shortlinks from repo ([@Andoryuuta](https://github.com/Andoryuuta)) -* Other - * [#14462](https://github.com/babel/babel/pull/14462) fix: build standalone on windows ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) - -#### :running_woman: Performance -* `babel-cli`, `babel-core`, `babel-generator` - * [#14497](https://github.com/babel/babel/pull/14497) Switch to `@jridgewell/gen-mapping` for sourcemap generation ([@jridgewell](https://github.com/jridgewell)) -## v7.17.9 (2022-04-06) - -#### :bug: Bug Fix -* `babel-parser`, `babel-standalone` - * [#14427](https://github.com/babel/babel/pull/14427) Restore numeric separators support in `@babel/standalone` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-traverse` - * [#14403](https://github.com/babel/babel/pull/14403) Fix NodePath.referencesImport for JSXMemberExpression ([@swandir](https://github.com/swandir)) -* `babel-plugin-proposal-decorators` - * [#14396](https://github.com/babel/babel/pull/14396) [2021-12] Support class decorators in export declarations ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#14387](https://github.com/babel/babel/pull/14387) fix: forward accessor proxy getter results ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser` - * [#14384](https://github.com/babel/babel/pull/14384) fix: parse type parameters within correct context ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator`, `babel-parser` - * [#14378](https://github.com/babel/babel/pull/14378) Parenthesize non-simple decorator expression ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-classes`, `babel-plugin-transform-modules-commonjs`, `babel-preset-env` - * [#14366](https://github.com/babel/babel/pull/14366) Align named imports behavior in `.mjs` and `.js` files ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties` - * [#14351](https://github.com/babel/babel/pull/14351) [setPublicClassFields] Use define for static `name`/`length` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-plugin-proposal-decorators` - * [#14398](https://github.com/babel/babel/pull/14398) Add missing semicolons in 2021-12 decorators output ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :memo: Documentation -* [#14397](https://github.com/babel/babel/pull/14397) Mention how to report vulns in Babel dependencies ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* Other - * [#14419](https://github.com/babel/babel/pull/14419) Use `jest-light-runner` from npm ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-cli` - * [#14385](https://github.com/babel/babel/pull/14385) Fix flaky @babel/cli test ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-function-name`, `babel-helper-get-function-arity` - * [#14389](https://github.com/babel/babel/pull/14389) Inline `@babel/helper-get-function-arity` package ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helpers` - * [#14343](https://github.com/babel/babel/pull/14343) Remove unused `@babel/helpers` code ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-highlight`, `babel-parser` - * [#14377](https://github.com/babel/babel/pull/14377) refactor: replace deprecated String.prototype.substr() ([@CommanderRoot](https://github.com/CommanderRoot)) -## v7.17.8 (2022-03-18) - -#### :eyeglasses: Spec Compliance -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#14353](https://github.com/babel/babel/pull/14353) Update decorators to match latest spec ([@pzuraq](https://github.com/pzuraq)) - * [#14339](https://github.com/babel/babel/pull/14339) Decorators misc fixes ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-plugin-transform-modules-systemjs` - * [#14057](https://github.com/babel/babel/pull/14057) [systemjs] Fix nested `let`/`const` shadowing imported bindings ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-parser` - * [#14362](https://github.com/babel/babel/pull/14362) Allow keywords in TS qualified types ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :leftwards_arrow_with_hook: Revert -* `babel-parser` - * [#14367](https://github.com/babel/babel/pull/14367) Defer `() => {}` TSX error to Babel 8 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.17.7 (2022-03-14) - -#### :eyeglasses: Spec Compliance -* `babel-generator`, `babel-parser` - * [#14135](https://github.com/babel/babel/pull/14135) [tsx] raise error on single arrow type argument without comma ([@ozanhonamlioglu](https://github.com/ozanhonamlioglu)) - -#### :bug: Bug Fix -* `babel-helper-compilation-targets` - * [#14294](https://github.com/babel/babel/pull/14294) Avoid `resolveTargets` call if `browsers` is an empty array ([@dev-itsheng](https://github.com/dev-itsheng)) -* `babel-helper-module-transforms`, `babel-helper-simple-access`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` - * [#14341](https://github.com/babel/babel/pull/14341) Fix update expression for exported bigints ([@magic-akari](https://github.com/magic-akari)) -* `babel-parser` - * [#14344](https://github.com/babel/babel/pull/14344) Allow variable and function with the same name in static blocks ([@Yokubjon-J](https://github.com/Yokubjon-J)) - * [#14327](https://github.com/babel/babel/pull/14327) Remove length restriction from JSX entities, and ignore `Object.prototype` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#14293](https://github.com/babel/babel/pull/14293) fix(ts): skip func-type param start on parsing ([@JLHwung](https://github.com/JLHwung)) -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#14335](https://github.com/babel/babel/pull/14335) Fix static/proto initializers when there aren't class fields ([@JLHwung](https://github.com/JLHwung)) - * [#14334](https://github.com/babel/babel/pull/14334) fix: push `newClass` only when class is decorated ([@JLHwung](https://github.com/JLHwung)) -* `babel-generator` - * [#14309](https://github.com/babel/babel/pull/14309) Fix `import type/typeof` printing with no specifiers ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` - * [#14313](https://github.com/babel/babel/pull/14313) Fix duplicate exports initialization with many exports ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-member-expression-to-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-methods`, `babel-plugin-transform-classes`, `babel-plugin-transform-object-super` - * [#14311](https://github.com/babel/babel/pull/14311) fix: support bigints in update expressions for private fields ([@magic-akari](https://github.com/magic-akari)) -* `babel-register` - * [#14303](https://github.com/babel/babel/pull/14303) Fix babel register cache invalidation ([@cha0s](https://github.com/cha0s)) - -#### :nail_care: Polish -* `babel-parser` - * [#14338](https://github.com/babel/babel/pull/14338) Report single error for invalid num seps in unicode escapes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-generator`, `babel-parser` - * [#14320](https://github.com/babel/babel/pull/14320) Type-safe ParseErrors ([@tolmasky](https://github.com/tolmasky)) -* `babel-plugin-transform-destructuring` - * [#14236](https://github.com/babel/babel/pull/14236) Improve `transform-destructuring` typings ([@JLHwung](https://github.com/JLHwung)) -* Other - * [#14180](https://github.com/babel/babel/pull/14180) Convert ESLint plugins to CommonJS ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.17.6 (2022-02-21) - -#### :eyeglasses: Spec Compliance -* `babel-helper-module-transforms` - * [#14287](https://github.com/babel/babel/pull/14287) Make module namespace sort compare function consistent ([@devsnek](https://github.com/devsnek)) - -#### :bug: Bug Fix -* `babel-cli` - * [#14281](https://github.com/babel/babel/pull/14281) cli: handle multiple input sources in watch mode ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-plugin-transform-react-constant-elements` - * [#12975](https://github.com/babel/babel/pull/12975) `allowMutablePropsOnTags`: cache JSX constant elements with function props ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-proposal-pipeline-operator`, `babel-standalone` - * [#14278](https://github.com/babel/babel/pull/14278) [hack pipes] Inline topic token when possible ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-preset-env` - * [#14275](https://github.com/babel/babel/pull/14275) Avoid IIFE for single-expression class static blocks ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.17.5 (2022-02-17) - -#### :bug: Bug Fix -* `babel-core` - * [#14283](https://github.com/babel/babel/pull/14283) Make source maps plain objects for use with `t.valueToNode` ([@thebanjomatic](https://github.com/thebanjomatic)) - * [#14282](https://github.com/babel/babel/pull/14282) Fix merging sourcemaps on Windows ([@jridgewell](https://github.com/jridgewell)) -## v7.17.4 (2022-02-15) - -#### :bug: Bug Fix -* `babel-core` - * [#14274](https://github.com/babel/babel/pull/14274) Fix infinite recursion when merge sourcemaps ([@jridgewell](https://github.com/jridgewell)) -## v7.17.3 (2022-02-15) - -#### :bug: Bug Fix -* `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx` - * [#14271](https://github.com/babel/babel/pull/14271) jsx-development: do not emit `this` within ts module block ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-destructuring` - * [#14240](https://github.com/babel/babel/pull/14240) Fix destructuring with holes in assign pattern ([@magic-akari](https://github.com/magic-akari)) - -#### :house: Internal -* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-transform-fixture-test-runner` - * [#14253](https://github.com/babel/babel/pull/14253) Convert all SourceMapConsumers to TraceMaps ([@jridgewell](https://github.com/jridgewell)) - -#### :microscope: Output optimization -* `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-transform-new-target`, `babel-plugin-transform-parameters`, `babel-traverse` - * [#14268](https://github.com/babel/babel/pull/14268) Skip unnecessary temp vars in `path.insertAfter` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.17.2 (2022-02-08) - -#### :bug: Bug Fix -* `babel-helpers`, `babel-plugin-proposal-decorators` - * [#14244](https://github.com/babel/babel/pull/14244) Fix 2021-12 decorators application order ([@JLHwung](https://github.com/JLHwung)) -* `babel-core` - * [#14241](https://github.com/babel/babel/pull/14241) Fix reinstantiation of inherited plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#14246](https://github.com/babel/babel/pull/14246) Merge multi-source output sourcemaps ([@jridgewell](https://github.com/jridgewell)) -## v7.17.1 (2022-02-03) - -#### :bug: Bug Fix -* `babel-helper-create-class-features-plugin` - * [#14231](https://github.com/babel/babel/pull/14231) Restore class fields transform compat with old `@babel/types` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.17.0 (2022-02-02) - -#### :rocket: New Feature -* `babel-cli`, `babel-core` - * [#14065](https://github.com/babel/babel/pull/14065) Allow plugins/presets to indicate external dependencies ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-core`, `babel-parser`, `babel-traverse` - * [#14174](https://github.com/babel/babel/pull/14174) Expose `.index` on Position to internally track nodes location ([@tolmasky](https://github.com/tolmasky)) -* `babel-generator`, `babel-parser`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-pipeline-operator` - * [#13973](https://github.com/babel/babel/pull/13973) proposal-pipe: Add support for `^^` and `@@` topics ([@js-choi](https://github.com/js-choi)) -* `babel-traverse` - * [#13940](https://github.com/babel/babel/pull/13940) Add new method to check if node is null or not ([@danez](https://github.com/danez)) -* `babel-generator`, `babel-parser`, `babel-plugin-syntax-destructuring-private`, `babel-standalone` - * [#13931](https://github.com/babel/babel/pull/13931) Parse destructuring private fields ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime`, `babel-standalone`, `babel-types` - * [#14004](https://github.com/babel/babel/pull/14004) Add new decorators transform ([@pzuraq](https://github.com/pzuraq)) -* `babel-generator`, `babel-parser`, `babel-traverse`, `babel-types` - * [#13681](https://github.com/babel/babel/pull/13681) Add the `decoratorsAutoAccessors` parser plugin ([@pzuraq](https://github.com/pzuraq)) -* `babel-core`, `babel-helper-create-regexp-features-plugin`, `babel-plugin-proposal-unicode-sets-regex`, `babel-plugin-syntax-unicode-sets-regex`, `babel-plugin-transform-dotall-regex` - * [#14125](https://github.com/babel/babel/pull/14125) Add transform support for the "regexp unicode sets" proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#14086](https://github.com/babel/babel/pull/14086) Add parser support for the "regexp unicode sets" proposal ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-register` - * [#14087](https://github.com/babel/babel/pull/14087) Expose `@babel/register/experimental-worker` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix -* `babel-parser` - * [#14145](https://github.com/babel/babel/pull/14145) Reinterpret << when parsing TS type arguments ([@JLHwung](https://github.com/JLHwung)) -* `babel-plugin-transform-runtime` - * [#14187](https://github.com/babel/babel/pull/14187) Normalize absolute paths on Windows ([@atti187](https://github.com/atti187)) - -#### :memo: Documentation -* [#14223](https://github.com/babel/babel/pull/14223) Remove Babel 6 from SECURITY.md ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-helper-fixtures`, `babel-parser` - * [#14201](https://github.com/babel/babel/pull/14201) Fuzz test location-related parser options ([@tolmasky](https://github.com/tolmasky)) -* `babel-compat-data` - * [#14208](https://github.com/babel/babel/pull/14208) Update compat data (specifically for rhino 1.7.14) ([@phulin](https://github.com/phulin)) -* Other - * [#14190](https://github.com/babel/babel/pull/14190) chore: run tscheck on babel 8 breaking test ([@JLHwung](https://github.com/JLHwung)) - -#### :running_woman: Performance -* `babel-cli`, `babel-core` - * [#14209](https://github.com/babel/babel/pull/14209) Switch to `@ampproject/remapping` to merge source maps ([@jridgewell](https://github.com/jridgewell)) -## v7.16.12 (2022-01-22) - -#### :bug: Bug Fix -* `babel-core` - * [#14192](https://github.com/babel/babel/pull/14192) Avoid dynamic import when it's not needed ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#14194](https://github.com/babel/babel/pull/14194) fix: incorrect `in` parsing in arrow ConciseBody ([@JLHwung](https://github.com/JLHwung)) - -## v7.16.10 (2022-01-19) - -#### :bug: Bug Fix -* `babel-highlight` - * [#14165](https://github.com/babel/babel/pull/14165) Avoid infinite loop when highlighting an empty input ([@blankPen](https://github.com/blankPen)) -* `babel-traverse` - * [#14164](https://github.com/babel/babel/pull/14164) Handle logical assignment in super property transforms ([@magic-akari](https://github.com/magic-akari)) - * [#14162](https://github.com/babel/babel/pull/14162) Fix the transform of `super.foo--`/`super[foo]--` (and prefix) ([@magic-akari](https://github.com/magic-akari)) -* `babel-core` - * [#14110](https://github.com/babel/babel/pull/14110) Respect `package.json#exports` when resolving plugins ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - * [#14153](https://github.com/babel/babel/pull/14153) Disable "Reentrant plugin detected" error in async mode ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-plugin-transform-runtime` - * [#14157](https://github.com/babel/babel/pull/14157) Remove workaround for `_typeof` in runtime build script ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#14130](https://github.com/babel/babel/pull/14130) Improve errors location tracking ([@tolmasky](https://github.com/tolmasky)) - -#### :microscope: Output optimization -* `babel-helper-create-class-features-plugin`, `babel-preset-env` - * [#14169](https://github.com/babel/babel/pull/14169) Skip class fields transform when not necessary for private methods ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.16.9 (2022-01-11) - -#### :bug: Bug Fix -* `babel-register` - * [#14136](https://github.com/babel/babel/pull/14136) Restore `@babel/register` compat with `@babel/core@7.5.x` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.16.8 (2022-01-10) - -#### :bug: Bug Fix -* `babel-generator`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-parameters` - * [#14113](https://github.com/babel/babel/pull/14113) Print trailing comma after a single TS generic in arrow fns ([@ozanhonamlioglu](https://github.com/ozanhonamlioglu)) -* `babel-traverse` - * [#14105](https://github.com/babel/babel/pull/14105) fix: forward stop signal to parent path ([@JLHwung](https://github.com/JLHwung)) -* `babel-register` - * [#14107](https://github.com/babel/babel/pull/14107) Don't mutate `@babel/register` options ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-transform-modules-commonjs` - * [#14097](https://github.com/babel/babel/pull/14097) Register binding for newly created vars for commonjs transforms ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-plugin-transform-typescript` - * [#14093](https://github.com/babel/babel/pull/14093) Fix TypeScript Enum self-references ([@magic-akari](https://github.com/magic-akari)) - -#### :nail_care: Polish -* `babel-generator` - * [#14094](https://github.com/babel/babel/pull/14094) Always print directives with double quotes when minified ([@overlookmotel](https://github.com/overlookmotel)) - -#### :house: Internal -* `babel-helper-fixtures`, `babel-plugin-proposal-record-and-tuple`, `babel-preset-env` - * [#14118](https://github.com/babel/babel/pull/14118) Always use the plugin/preset name in fixtures options ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :microscope: Output optimization -* `babel-helper-remap-async-to-generator`, `babel-helper-wrap-function`, `babel-plugin-transform-async-to-generator` - * [#14122](https://github.com/babel/babel/pull/14122) Optimize `transform-async-to-generator` output ([@magic-akari](https://github.com/magic-akari)) -## v7.16.7 (2021-12-31) - -#### :eyeglasses: Spec Compliance -* `babel-parser` - * [#14049](https://github.com/babel/babel/pull/14049) fix: check preceding line break before exclamation ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-plugin-transform-runtime`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#14081](https://github.com/babel/babel/pull/14081) Import the correct `./typeof.js` helper in `@babel/runtime` ([@exb](https://github.com/exb)) -* `babel-helpers` - * [#14072](https://github.com/babel/babel/pull/14072) Fix derived classes in Chrome <= 36 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-helper-function-name`, `babel-plugin-transform-function-name` - * [#14047](https://github.com/babel/babel/pull/14047) Fix unicode handling in generated function names ([@The-x-Theorist](https://github.com/The-x-Theorist)) - -#### :nail_care: Polish -* `babel-core` - * [#14067](https://github.com/babel/babel/pull/14067) Allow `$schema` property in json config files ([@The-x-Theorist](https://github.com/The-x-Theorist)) -## v7.16.6 (2021-12-14) - -#### :bug: Bug Fix -* `babel-parser` - * [#14055](https://github.com/babel/babel/pull/14055) fix: handle tokens for invalid template element ([@JLHwung](https://github.com/JLHwung)) -## v7.16.5 (2021-12-13) - -#### :eyeglasses: Spec Compliance -* `babel-cli`, `babel-core`, `babel-helpers`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-classes`, `babel-plugin-transform-jscript`, `babel-plugin-transform-parameters`, `babel-plugin-transform-runtime`, `babel-plugin-transform-spread`, `babel-plugin-transform-typescript`, `babel-preset-env` - * [#12115](https://github.com/babel/babel/pull/12115) Mark class prototype as read-only ([@wentout](https://github.com/wentout)) - -#### :bug: Bug Fix -* `babel-plugin-transform-parameters` - * [#14032](https://github.com/babel/babel/pull/14032) Fix: default rest argument array elements as undefined ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-plugin-transform-arrow-functions`, `babel-traverse` - * [#14036](https://github.com/babel/babel/pull/14036) Don't resolve shadowed `arguments` variables from functions ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-parser` - * [#14039](https://github.com/babel/babel/pull/14039) maintain estree string literal shape when cloned ([@JLHwung](https://github.com/JLHwung)) -* `babel-traverse` - * [#14016](https://github.com/babel/babel/pull/14016) Fix duplicate declaration error on ambient class declarations ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-generator` - * [#14014](https://github.com/babel/babel/pull/14014) Support flow function type annotation with no parent ([@krosenberg](https://github.com/krosenberg)) * `babel-plugin-transform-react-jsx` - * [#14012](https://github.com/babel/babel/pull/14012) Fix JSX pragma anywhere in comment ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-helper-create-class-features-plugin`, `babel-helper-environment-visitor`, `babel-helper-member-expression-to-functions`, `babel-helper-module-transforms`, `babel-helper-replace-supers`, `babel-plugin-transform-classes`, `babel-traverse` - * [#14005](https://github.com/babel/babel/pull/14005) Fix handling of `this`&co in computed keys in arrows transform ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :nail_care: Polish -* `babel-parser` - * [#13968](https://github.com/babel/babel/pull/13968) Recover from shorthand assign exprs ([@JLHwung](https://github.com/JLHwung)) - * [#13975](https://github.com/babel/babel/pull/13975) fix: update UnexpectedPrivateField error message ([@JLHwung](https://github.com/JLHwung)) - -#### :memo: Documentation -* `babel-compat-data`, `babel-helper-annotate-as-pure`, `babel-helper-builder-binary-assignment-operator-visitor`, `babel-helper-builder-react-jsx`, `babel-helper-compilation-targets`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-define-map`, `babel-helper-explode-assignable-expression`, `babel-helper-fixtures`, `babel-helper-function-name`, `babel-helper-get-function-arity`, `babel-helper-hoist-variables`, `babel-helper-member-expression-to-functions`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-optimise-call-expression`, `babel-helper-plugin-test-runner`, `babel-helper-plugin-utils`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-helper-simple-access`, `babel-helper-skip-transparent-expression-wrappers`, `babel-helper-split-export-declaration`, `babel-helper-transform-fixture-test-runner`, `babel-helper-validator-identifier`, `babel-helper-validator-option`, `babel-helper-wrap-function`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-syntax-async-do-expressions`, `babel-plugin-syntax-module-blocks`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-pure-annotations`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - * [#14006](https://github.com/babel/babel/pull/14006) Regenerate monorepo READMEs ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-cli`, `babel-code-frame`, `babel-core`, `babel-generator`, `babel-helper-annotate-as-pure`, `babel-helper-compilation-targets`, `babel-helper-create-class-features-plugin`, `babel-helper-create-regexp-features-plugin`, `babel-helper-fixtures`, `babel-helper-module-imports`, `babel-helper-optimise-call-expression`, `babel-helper-plugin-test-runner`, `babel-helper-transform-fixture-test-runner`, `babel-helper-validator-identifier`, `babel-helper-validator-option`, `babel-helpers`, `babel-highlight`, `babel-node`, `babel-parser`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-external-helpers`, `babel-plugin-proposal-async-do-expressions`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-decorators`, `babel-plugin-proposal-do-expressions`, `babel-plugin-proposal-dynamic-import`, `babel-plugin-proposal-export-default-from`, `babel-plugin-proposal-export-namespace-from`, `babel-plugin-proposal-function-bind`, `babel-plugin-proposal-function-sent`, `babel-plugin-proposal-json-strings`, `babel-plugin-proposal-logical-assignment-operators`, `babel-plugin-proposal-nullish-coalescing-operator`, `babel-plugin-proposal-numeric-separator`, `babel-plugin-proposal-object-rest-spread`, `babel-plugin-proposal-optional-catch-binding`, `babel-plugin-proposal-optional-chaining`, `babel-plugin-proposal-partial-application`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-proposal-record-and-tuple`, `babel-plugin-proposal-throw-expressions`, `babel-plugin-proposal-unicode-property-regex`, `babel-plugin-syntax-decorators`, `babel-plugin-syntax-typescript`, `babel-plugin-transform-arrow-functions`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-block-scoped-functions`, `babel-plugin-transform-block-scoping`, `babel-plugin-transform-classes`, `babel-plugin-transform-computed-properties`, `babel-plugin-transform-destructuring`, `babel-plugin-transform-dotall-regex`, `babel-plugin-transform-duplicate-keys`, `babel-plugin-transform-exponentiation-operator`, `babel-plugin-transform-flow-comments`, `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-for-of`, `babel-plugin-transform-function-name`, `babel-plugin-transform-instanceof`, `babel-plugin-transform-jscript`, `babel-plugin-transform-member-expression-literals`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-modules-umd`, `babel-plugin-transform-named-capturing-groups-regex`, `babel-plugin-transform-new-target`, `babel-plugin-transform-object-super`, `babel-plugin-transform-parameters`, `babel-plugin-transform-property-literals`, `babel-plugin-transform-property-mutators`, `babel-plugin-transform-proto-to-assign`, `babel-plugin-transform-react-constant-elements`, `babel-plugin-transform-react-display-name`, `babel-plugin-transform-react-inline-elements`, `babel-plugin-transform-react-jsx-compat`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx-self`, `babel-plugin-transform-react-jsx-source`, `babel-plugin-transform-react-jsx`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-regenerator`, `babel-plugin-transform-reserved-words`, `babel-plugin-transform-runtime`, `babel-plugin-transform-shorthand-properties`, `babel-plugin-transform-spread`, `babel-plugin-transform-sticky-regex`, `babel-plugin-transform-strict-mode`, `babel-plugin-transform-template-literals`, `babel-plugin-transform-typeof-symbol`, `babel-plugin-transform-typescript`, `babel-plugin-transform-unicode-escapes`, `babel-plugin-transform-unicode-regex`, `babel-preset-env`, `babel-preset-flow`, `babel-preset-react`, `babel-preset-typescript`, `babel-register`, `babel-standalone`, `babel-template`, `babel-traverse`, `babel-types` - * [#13966](https://github.com/babel/babel/pull/13966) Run tests in a native Node.js ESM environment ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#13982](https://github.com/babel/babel/pull/13982) Extend `hasPlugin` to accept plugin-configuration array pairs ([@js-choi](https://github.com/js-choi)) -* `babel-helpers` - * [#13996](https://github.com/babel/babel/pull/13996) Don't use ESM for `require`d files in `@babel/helpers` tests ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-plugin-proposal-object-rest-spread`, `babel-traverse` - * [#13948](https://github.com/babel/babel/pull/13948) Convert proposal-object-rest-spread to TS ([@JLHwung](https://github.com/JLHwung)) -* `babel-parser`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-optional-chaining`, `babel-preset-react`, `babel-preset-typescript` - * [#13978](https://github.com/babel/babel/pull/13978) Only bundle the release build, and don't import `src` in tests ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* Other - * [#13976](https://github.com/babel/babel/pull/13976) Fail CI when `@babel/runtime` ESM tests fail ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :running_woman: Performance -* `babel-parser` - * [#13919](https://github.com/babel/babel/pull/13919) Improve template tokenizing ([@JLHwung](https://github.com/JLHwung)) - -#### :microscope: Output optimization -* `babel-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-transform-runtime`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime` - * [#13837](https://github.com/babel/babel/pull/13837) minify `helpers-generated.ts` ([@lightmare](https://github.com/lightmare)) -## v7.16.4 (2021-11-16) - -#### :eyeglasses: Spec Compliance -* `babel-helper-remap-async-to-generator`, `babel-plugin-transform-async-to-generator` - * [#13961](https://github.com/babel/babel/pull/13961) Wait the correct number of ticks on nested `await` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#13929](https://github.com/babel/babel/pull/13929) Refactor bindingProperty parsing ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix -* `babel-parser` - * [#13957](https://github.com/babel/babel/pull/13957) Add `assertions` to `ExportNamedDeclaration` without `from` ([@sosukesuzuki](https://github.com/sosukesuzuki)) - * [#13951](https://github.com/babel/babel/pull/13951) Throw on duplicate `__proto__` props followed by assignment ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-runtime`, `babel-preset-env` - * [#12827](https://github.com/babel/babel/pull/12827) Add file extension when using `absoluteRuntime` ([@mbehzad](https://github.com/mbehzad)) - -#### :nail_care: Polish -* `babel-parser` - * [#13960](https://github.com/babel/babel/pull/13960) Always expose `expressionValue` in `DirectiveLiteral` nodes ([@tolmasky](https://github.com/tolmasky)) -## v7.16.3 (2021-11-09) - -#### :bug: Bug Fix -* `babel-helpers` - * [#13862](https://github.com/babel/babel/pull/13862) fix(helpers): match `Reflect.get` behaviour ([@lightmare](https://github.com/lightmare)) -* `babel-plugin-transform-parameters`, `babel-traverse` - * [#13941](https://github.com/babel/babel/pull/13941) Support transforming params of arrow functions in class fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -* `babel-parser` - * [#13928](https://github.com/babel/babel/pull/13928) fix: incorrect await rejection following arrow function in parameters (Closes [#13872](https://github.com/babel/babel/issues/13872)) ([@The-x-Theorist](https://github.com/The-x-Theorist)) -* Other - * [#13918](https://github.com/babel/babel/pull/13918) Fix `parserOverride` support in `@babel/eslint-parser` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :house: Internal -* `babel-parser` - * [#13891](https://github.com/babel/babel/pull/13891) Simplify tracking of valid JSX positions ([@JLHwung](https://github.com/JLHwung)) - * [#13892](https://github.com/babel/babel/pull/13892) extract tt.lt and tt.gt from tt.relation ([@JLHwung](https://github.com/JLHwung)) -* `babel-helper-compilation-targets`, `babel-preset-env` - * [#13914](https://github.com/babel/babel/pull/13914) Update browserslist ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -## v7.16.2 (2021-11-01) - -#### :bug: Bug Fix -* `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression` - * [#13910](https://github.com/babel/babel/pull/13910) skip id-destructuring bugfix when binding info is not found ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal -* `babel-parser` - * [#13905](https://github.com/babel/babel/pull/13905) babel-parser: add missing assertions type ([@sosukesuzuki](https://github.com/sosukesuzuki)) -## v7.16.1 (2021-10-30) - -#### :bug: Bug Fix -* `babel-plugin-transform-typescript` - * [#13900](https://github.com/babel/babel/pull/13900) Fix binding access for plugin-transform-typescript ([@PeachScript](https://github.com/PeachScript)) - -#### :house: Internal -* [#13898](https://github.com/babel/babel/pull/13898) Skip ESLint 8 tests on publish ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.16.0 (2021-10-30) - -#### :eyeglasses: Spec Compliance - -- `babel-helpers`, `babel-plugin-proposal-async-generator-functions`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - - [#13824](https://github.com/babel/babel/pull/13824) Await promises from sync iterators with `for-await` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :rocket: New Feature - -- `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-types` - - [#13802](https://github.com/babel/babel/pull/13802) Support TypeScript 4.5 type-only import/export specifiers ([@sosukesuzuki](https://github.com/sosukesuzuki)) -- `babel-parser` - - [#13887](https://github.com/babel/babel/pull/13887) feat: support `startColumn` option ([@JLHwung](https://github.com/JLHwung)) -- `babel-helper-fixtures`, `babel-helper-transform-fixture-test-runner`, `babel-parser`, `babel-plugin-syntax-typescript`, `babel-preset-typescript` - - [#13838](https://github.com/babel/babel/pull/13838) Handle `.mts` and `.cts` files in `@babel/preset-typescript` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- Other - - [#13782](https://github.com/babel/babel/pull/13782) Add ESLint 8 support to `@babel/eslint-parser` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-generator`, `babel-parser`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-pipeline-operator` - - [#13749](https://github.com/babel/babel/pull/13749) Caret topic (pipe operator) ([@js-choi](https://github.com/js-choi)) -- `babel-compat-data`, `babel-generator`, `babel-parser`, `babel-preset-env`, `babel-types` - - [#13713](https://github.com/babel/babel/pull/13713) Enable class static blocks by default ([@sosukesuzuki](https://github.com/sosukesuzuki)) -- `babel-helper-skip-transparent-expression-wrappers`, `babel-plugin-proposal-optional-chaining` - - [#13687](https://github.com/babel/babel/pull/13687) add `skipTransparentExprWrapperNodes` helper ([@lightmare](https://github.com/lightmare)) -- `babel-traverse`, `babel-types` - - [#13666](https://github.com/babel/babel/pull/13666) Add aliases for Standardized, TypeScript, and Flow ([@jridgewell](https://github.com/jridgewell)) - -#### :bug: Bug Fix - -- `babel-parser`, `babel-plugin-transform-typescript` - - [#13876](https://github.com/babel/babel/pull/13876) [ts] Support private methods overloads ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-plugin-transform-typescript` - - [#13865](https://github.com/babel/babel/pull/13865) fix: allow enum member without initializer after non-literal member ([@lightmare](https://github.com/lightmare)) -- `babel-core`, `babel-helper-create-class-features-plugin`, `babel-plugin-transform-typescript` - - [#13854](https://github.com/babel/babel/pull/13854) Don't transform `declare class` in plugin-proposal-class-properties ([@forivall](https://github.com/forivall)) -- `babel-compat-data`, `babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-transform-react-constant-elements`, `babel-preset-env`, `babel-traverse` - - [#13842](https://github.com/babel/babel/pull/13842) Implement @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression ([@JLHwung](https://github.com/JLHwung)) -- `babel-plugin-proposal-async-generator-functions`, `babel-traverse` - - [#13813](https://github.com/babel/babel/pull/13813) Restore traversal context after enter / traverse ([@JLHwung](https://github.com/JLHwung)) -- `babel-traverse`, `babel-types` - - [#13832](https://github.com/babel/babel/pull/13832) Mark static block as FunctionParent ([@JLHwung](https://github.com/JLHwung)) -- `babel-generator` - - [#13825](https://github.com/babel/babel/pull/13825) Fix missing inner comments in function expressions ([@overlookmotel](https://github.com/overlookmotel)) - -#### :house: Internal - -- _Every package_ - - [#13772](https://github.com/babel/babel/pull/13772) Use `workspace:^` to specify `@babel/` dependencies ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- Other - - [#13856](https://github.com/babel/babel/pull/13856) Update to Yarn 3.1 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - - [#13867](https://github.com/babel/babel/pull/13867) Test on Node.js 17 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-helper-fixtures`, `babel-plugin-proposal-class-properties`, `babel-plugin-transform-runtime`, `babel-preset-react` - - [#13858](https://github.com/babel/babel/pull/13858) Force loading plugins/presets from the monorepo in tests ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-types` - - [#13844](https://github.com/babel/babel/pull/13844) [ts] precise return type on `createTypeAnnotationBasedOnTypeof` (babel-types) ([@lightmare](https://github.com/lightmare)) -- `babel-helpers` - - [#13841](https://github.com/babel/babel/pull/13841) minor: remove ineffectual helper names filter ([@lightmare](https://github.com/lightmare)) -- `babel-core`, `babel-plugin-transform-react-jsx-development`, `babel-plugin-transform-react-jsx`, `babel-types` - - [#13820](https://github.com/babel/babel/pull/13820) Improve transform-react-jsx typings ([@JLHwung](https://github.com/JLHwung)) - -#### :running_woman: Performance - -- `babel-types` - - [#13843](https://github.com/babel/babel/pull/13843) Simplify (transpiled) babel-types builder wrappers ([@lightmare](https://github.com/lightmare)) - -## v7.15.8 (2021-10-06) - -#### :eyeglasses: Spec Compliance - -- `babel-helper-module-transforms`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd` - - [#13788](https://github.com/babel/babel/pull/13788) Sort module export names ([@JLHwung](https://github.com/JLHwung)) -- `babel-parser` - - [#13769](https://github.com/babel/babel/pull/13769) Tokenize keywords-like identifier as new tokens ([@JLHwung](https://github.com/JLHwung)) - -#### :bug: Bug Fix - -- `babel-generator` - - [#13821](https://github.com/babel/babel/pull/13821) Fix missing inner comments in class expressions ([@overlookmotel](https://github.com/overlookmotel)) -- `babel-generator`, `babel-parser`, `babel-plugin-proposal-pipeline-operator` - - [#13803](https://github.com/babel/babel/pull/13803) Collect comments around parentheses in expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-plugin-transform-typescript` - - [#13800](https://github.com/babel/babel/pull/13800) fix: remove imported types from export ([@JLHwung](https://github.com/JLHwung)) - -#### :nail_care: Polish - -- `babel-core` - - [#13814](https://github.com/babel/babel/pull/13814) Improve debug logging for IgnoreList ([@paleite](https://github.com/paleite)) -- `babel-node` - - [#13784](https://github.com/babel/babel/pull/13784) [@babel/node] Forward the signal SIGTERM as well ([@julienw](https://github.com/julienw)) - -#### :house: Internal - -- [#13808](https://github.com/babel/babel/pull/13808) Update parser plugins for TypeScript tests ([@sosukesuzuki](https://github.com/sosukesuzuki)) -- [#13795](https://github.com/babel/babel/pull/13795) Fix Gulpfile path separator issue on Windows ([@NotWearingPants](https://github.com/NotWearingPants)) - -#### :running_woman: Performance - -- `babel-code-frame` - - [#13812](https://github.com/babel/babel/pull/13812) Optimization of string splitting ([@shoonia](https://github.com/shoonia)) - -## v7.15.7 (2021-09-17) - -#### :bug: Bug Fix - -- `babel-parser` - - [#13771](https://github.com/babel/babel/pull/13771) fix(babel-parser): Allow line break before `assert` return type ([@JuniorTour](https://github.com/JuniorTour)) - - [#13755](https://github.com/babel/babel/pull/13755) [estree] Fix conversion of `PrivateName` in `MemberExpression` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-standalone` - - [#13754](https://github.com/babel/babel/pull/13754) Move pipeline operator to Stage 2 ([@sdegutis](https://github.com/sdegutis)) -- Other - - [#13767](https://github.com/babel/babel/pull/13767) Fix `regexpu-core` bundling in `@babel/standalone` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - - [#13751](https://github.com/babel/babel/pull/13751) [eslint-parser] Represent `static` using a `Keyword` token ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-helper-validator-identifier` - - [#13759](https://github.com/babel/babel/pull/13759) Update Identifier definitions to Unicode 14 ([@JLHwung](https://github.com/JLHwung)) - -#### :house: Internal - -- `babel-parser` - - [#13768](https://github.com/babel/babel/pull/13768) Store token type as number ([@JLHwung](https://github.com/JLHwung)) -- `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` - - [#13739](https://github.com/babel/babel/pull/13739) Throw a better error when transforming imported bindings in types ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- Other - - [#13140](https://github.com/babel/babel/pull/13140) Update to Yarn 3 ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - - [#13744](https://github.com/babel/babel/pull/13744) chore: add constraint for duplicate dependency declarations ([@merceyz](https://github.com/merceyz)) -- `babel-helper-transform-fixture-test-runner` - - [#13741](https://github.com/babel/babel/pull/13741) Replace the deprecated `produceCachedData` option used in `vm` module with `script.createCachedData()` ([@wafuwafu13](https://github.com/wafuwafu13)) - -## v7.15.6 (2021-09-09) - -#### :eyeglasses: Spec Compliance - -- `babel-parser`, `babel-plugin-proposal-pipeline-operator` - - [#13668](https://github.com/babel/babel/pull/13668) Fix right precedence of Hack pipes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix - -- `babel-parser`, `babel-plugin-proposal-pipeline-operator` - - [#13668](https://github.com/babel/babel/pull/13668) Fix right precedence of Hack pipes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-plugin-proposal-object-rest-spread` - - [#13711](https://github.com/babel/babel/pull/13711) fix: Duplicate function call in variable destructuring ([@dan-kez](https://github.com/dan-kez)) -- `babel-types` - - [#13733](https://github.com/babel/babel/pull/13733) id in import attributes should not be referenced ([@JLHwung](https://github.com/JLHwung)) -- `babel-parser` - - [#13731](https://github.com/babel/babel/pull/13731) fix(babel-parser): Fix end of `range` of `SequenceExpression` ([@sosukesuzuki](https://github.com/sosukesuzuki)) - -#### :house: Internal - -- `babel-helper-transform-fixture-test-runner` - - [#13738](https://github.com/babel/babel/pull/13738) Use `@types/node` for `vm` module ([@wafuwafu13](https://github.com/wafuwafu13)) -- `babel-preset-env` - - [#13737](https://github.com/babel/babel/pull/13737) Remove duplicate `dependency` and `devDependency` in preset-env ([@fyzhu](https://github.com/fyzhu)) - -## v7.15.5 (2021-09-04) - -#### :eyeglasses: Spec Compliance - -- `babel-parser` - - [#13727](https://github.com/babel/babel/pull/13727) Disallow `#a in #b in c` and similar expressions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :leftwards_arrow_with_hook: Revert - -- `babel-core` - - [#13732](https://github.com/babel/babel/pull/13732) Revert "fix: non breaking align options naming" ([@fedeci](https://github.com/fedeci)) - -## v7.15.4 (2021-09-02) - -#### :eyeglasses: Spec Compliance - -- `babel-helper-create-class-features-plugin`, `babel-helpers`, `babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-methods`, `babel-plugin-proposal-private-property-in-object`, `babel-preset-env`, `babel-runtime-corejs2`, `babel-runtime-corejs3`, `babel-runtime` - - [#13601](https://github.com/babel/babel/pull/13601) Disallow reinitializing private elements ([@komyg](https://github.com/komyg)) - -#### :bug: Bug Fix - -- [#13638](https://github.com/babel/babel/pull/13638) [eslint] Allow `"latest"` as `ecmaVersion` ([@fisker](https://github.com/fisker)) -- `babel-traverse`, `babel-types` - - [#13723](https://github.com/babel/babel/pull/13723) `getBindingIdentifiers` should return params for private methods ([@JLHwung](https://github.com/JLHwung)) -- `babel-types` - - [#13715](https://github.com/babel/babel/pull/13715) [babel 8] fix: stricter rest element builder check ([@JLHwung](https://github.com/JLHwung)) -- `babel-helper-compilation-targets` - - [#13697](https://github.com/babel/babel/pull/13697) fix: pass `browserslistEnv` to `resolveTargets` ([@meskill](https://github.com/meskill)) -- `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-property-in-object` - - [#13656](https://github.com/babel/babel/pull/13656) fix: fix static private field shadowed by local variable ([@colinaaa](https://github.com/colinaaa)) -- `babel-plugin-transform-typescript` - - [#13664](https://github.com/babel/babel/pull/13664) [ts] Fix transform for nested namespaces shorthand syntax ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-parser` - - [#13680](https://github.com/babel/babel/pull/13680) fix(babel-parser): delete `static` property from class static block for TS ([@sosukesuzuki](https://github.com/sosukesuzuki)) - - [#13695](https://github.com/babel/babel/pull/13695) fix: assure left bracket is not consumed after dot ([@JLHwung](https://github.com/JLHwung)) -- `babel-core` - - [#13532](https://github.com/babel/babel/pull/13532) fix: non breaking align options naming ([@fedeci](https://github.com/fedeci)) - -#### :memo: Documentation - -- `babel-parser` - - [#13691](https://github.com/babel/babel/pull/13691) add missing ExportNamespaceSpecifier in spec.md ([@flyinox](https://github.com/flyinox)) - -#### :house: Internal - -- `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-static-block`, `babel-plugin-proposal-private-property-in-object`, `babel-plugin-syntax-class-static-block`, `babel-plugin-syntax-private-property-in-object`, `babel-plugin-syntax-top-level-await`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-systemjs`, `babel-preset-env`, `babel-standalone` - - [#13717](https://github.com/babel/babel/pull/13717) archive stage 4 parser plugins ([@JLHwung](https://github.com/JLHwung)) - -#### :running_woman: Performance - -- `babel-core`, `babel-generator`, `babel-helper-annotate-as-pure`, `babel-helper-builder-binary-assignment-operator-visitor`, `babel-helper-builder-react-jsx`, `babel-helper-define-map`, `babel-helper-explode-assignable-expression`, `babel-helper-function-name`, `babel-helper-get-function-arity`, `babel-helper-hoist-variables`, `babel-helper-member-expression-to-functions`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-optimise-call-expression`, `babel-helper-remap-async-to-generator`, `babel-helper-replace-supers`, `babel-helper-simple-access`, `babel-helper-skip-transparent-expression-wrappers`, `babel-helper-split-export-declaration`, `babel-helper-wrap-function`, `babel-helpers`, `babel-preset-env`, `babel-template`, `babel-traverse` - - [#13685](https://github.com/babel/babel/pull/13685) Use named imports for babel types ([@JLHwung](https://github.com/JLHwung)) -- `babel-cli`, `babel-helper-define-map`, `babel-helpers`, `babel-node`, `babel-parser`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-classes`, `babel-plugin-transform-for-of`, `babel-plugin-transform-modules-systemjs`, `babel-plugin-transform-parameters`, `babel-traverse`, `babel-types` - - [#13609](https://github.com/babel/babel/pull/13609) perf: partially replace `.concat` with `.push` ([@fedeci](https://github.com/fedeci)) - -## v7.15.3 (2021-08-11) - -#### :eyeglasses: Spec Compliance - -- `babel-helpers`, `babel-plugin-transform-classes` - - [#13571](https://github.com/babel/babel/pull/13571) Derived constructors should not be allowed to return primitives ([@dhrubesh](https://github.com/dhrubesh)) - -#### :bug: Bug Fix - -- `babel-parser` - - [#13659](https://github.com/babel/babel/pull/13659) Fix parse error when using named import "as" with flow parser ([@doing-art](https://github.com/doing-art)) - - [#13655](https://github.com/babel/babel/pull/13655) [flow] Fix parsing of arrows in conditional expressions in parentheses ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - - [#13645](https://github.com/babel/babel/pull/13645) Disallow `(a => b)` when parsing Flow ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - - [#13657](https://github.com/babel/babel/pull/13657) fix(parser): add `attachComment` to `ParserOptions` type ([@sosukesuzuki](https://github.com/sosukesuzuki)) - -#### :house: Internal - -- [#13643](https://github.com/babel/babel/pull/13643) Use `@babel/eslint-parser/experimental-worker` for our own repo ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :running_woman: Performance - -- `babel-parser` - - [#13652](https://github.com/babel/babel/pull/13652) perf: minor tokenizer tweaks ([@lightmare](https://github.com/lightmare)) -- `babel-register` - - [#13654](https://github.com/babel/babel/pull/13654) Reduce stat calls in register ([@overlookmotel](https://github.com/overlookmotel)) - -## v7.15.2 (2021-08-08) - -#### :bug: Bug Fix - -- `babel-parser` - - [#13653](https://github.com/babel/babel/pull/13653) Add `.errors` to the `@babel/parser` return type definitions ([@sosukesuzuki](https://github.com/sosukesuzuki)) - - [#13641](https://github.com/babel/babel/pull/13641) Fix array destructuring elision parsing in TS arrow functions ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.15.1 (2021-08-05) - -#### :leftwards_arrow_with_hook: Revert - -- `babel-plugin-transform-react-display-name` - - [#13637](https://github.com/babel/babel/pull/13637) Revert "Add display name after create context (#13501)" ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -## v7.15.0 (2021-08-04) - -#### :eyeglasses: Spec Compliance - -- `babel-parser` - - [#13523](https://github.com/babel/babel/pull/13523) feat(ts): raise error for abstract property with initializer ([@fedeci](https://github.com/fedeci)) - -#### :rocket: New Feature - -- `babel-parser` - - [#13229](https://github.com/babel/babel/pull/13229) Add `attachComment` parser option to disable comment attachment ([@JLHwung](https://github.com/JLHwung)) -- `babel-standalone` - - [#13476](https://github.com/babel/babel/pull/13476) standalone: update `preset-stage-*` ([@sosukesuzuki](https://github.com/sosukesuzuki)) - - [#13555](https://github.com/babel/babel/pull/13555) feat: support hack pipeline in `@babel/standalone` ([@JLHwung](https://github.com/JLHwung)) -- `babel-parser`, `babel-preset-env` - - [#13387](https://github.com/babel/babel/pull/13387) Enable top-level `await` parsing by default ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-plugin-transform-typescript`, `babel-preset-typescript` - - [#13324](https://github.com/babel/babel/pull/13324) Support TypeScript const enums ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-plugin-transform-typescript` - - [#13528](https://github.com/babel/babel/pull/13528) feat(typescript): implement namespace alias ([@colinaaa](https://github.com/colinaaa)) -- `babel-core`, `babel-helper-create-class-features-plugin`, `babel-helper-module-transforms`, `babel-plugin-transform-modules-commonjs` - - [#13290](https://github.com/babel/babel/pull/13290) feat: add `noIncompleteNsImportDetection` assumption to `plugin-transform-modules-commonjs` ([@fedeci](https://github.com/fedeci)) -- `babel-plugin-transform-react-display-name` - - [#13501](https://github.com/babel/babel/pull/13501) Add display name after create context ([@JLHwung](https://github.com/JLHwung)) -- `babel-parser`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-pipeline-operator` - - [#13416](https://github.com/babel/babel/pull/13416) Hack-pipe proposal with `%` topic token ([@js-choi](https://github.com/js-choi)) -- `babel-generator`, `babel-parser`, `babel-plugin-proposal-pipeline-operator`, `babel-plugin-syntax-pipeline-operator`, `babel-traverse`, `babel-types` - - [#13191](https://github.com/babel/babel/pull/13191) Add support for the "Hack" pipeline proposal ([@js-choi](https://github.com/js-choi)) -- `babel-plugin-transform-runtime` - - [#13398](https://github.com/babel/babel/pull/13398) Expose `@babel/eslint-parser/experimental-worker` ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) -- `babel-compat-data`, `babel-helper-compilation-targets`, `babel-preset-env` - - [#13448](https://github.com/babel/babel/pull/13448) Add support for rhino as a compilation target ([@gausie](https://github.com/gausie)) -- `babel-compat-data`, `babel-parser`, `babel-preset-env` - - [#13554](https://github.com/babel/babel/pull/13554) Enable ergonomic brand checks (`#priv in`) by default ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - -#### :bug: Bug Fix - -- `babel-parser`, `babel-plugin-transform-typescript` - - [#13513](https://github.com/babel/babel/pull/13513) [ts] support optional chain call with generic ([@lala7573](https://github.com/lala7573)) -- `babel-plugin-transform-typescript` - - [#13605](https://github.com/babel/babel/pull/13605) Handle typescript function overloading in a default export ([@tony-go](https://github.com/tony-go)) -- `babel-parser` - - [#13536](https://github.com/babel/babel/pull/13536) Fix `%==` parsing in hack pipes ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) - - [#13426](https://github.com/babel/babel/pull/13426) parser: Fix Hack/smart-pipe error positions ([@js-choi](https://github.com/js-choi)) - - [#13622](https://github.com/babel/babel/pull/13622) fix(ts): raise error for `export default interface {}` ([@a-tarasyuk](https://github.com/a-tarasyuk)) - -#### :memo: Documentation - -- [#13607](https://github.com/babel/babel/pull/13607) chore(doc): add jest specific pckg command ([@tony-go](https://github.com/tony-go)) + * [#17555](https://github.com/babel/babel/pull/17555) perf: Use lighter traversal for jsx `__source,__self` ([@liuxingbaoyu](https://github.com/liuxingbaoyu)) --- +- See [CHANGELOG - v7.15.0 to v7.28.5](/.github/CHANGELOG-v7.15.0-v7.28.5.md) for v7.15.0 to v7.28.5 changes. - See [CHANGELOG - v7.0.0 to v7.14.9](/.github/CHANGELOG-v7.0.0-v7.14.9.md) for v7.0.0 to v7.14.9 changes. - See [CHANGELOG - v7 prereleases](/.github/CHANGELOG-v7-prereleases.md) for v7.0.0-alpha.1 to v7.0.0-rc.4 changes. diff --git a/Gulpfile.mts b/Gulpfile.mts index c2c15e57a6f0..6ce82b083f2e 100644 --- a/Gulpfile.mts +++ b/Gulpfile.mts @@ -499,7 +499,9 @@ function buildRollup(packages: PackageInfo[], buildStandalone?: boolean) { preferBuiltins: !buildStandalone, }), rollupJson(), - src === "packages/babel-parser" && + ["packages/babel-parser", "packages/babel-generator"].includes( + src + ) && getBabelOutputPlugin({ configFile: false, babelrc: false, @@ -542,14 +544,19 @@ function buildRollup(packages: PackageInfo[], buildStandalone?: boolean) { !vals.has(node.property.name) ) { all = false; - return; } - parentPath.replaceWith( - t.numericLiteral(vals.get(node.property.name)) - ); }); - if (all) path.remove(); + if (all) { + binding.referencePaths.forEach(({ parentPath }) => { + const { node } = parentPath; + parentPath.replaceWith( + // @ts-expect-error checked above + t.numericLiteral(vals.get(node.property.name)) + ); + }); + path.remove(); + } }, }, }; diff --git a/Makefile.mjs b/Makefile.mjs index 00f666d2f90d..bcadcce3c7fa 100644 --- a/Makefile.mjs +++ b/Makefile.mjs @@ -1,4 +1,4 @@ // source hash: 445f7c4fafbe33137bf5d99083568e46a1a4db48 /* eslint-disable */ // prettier-ignore -import e from"os";import t from"fs";import r from"path";import n from"events";import o from"assert";import i from"util";import s from"child_process";import a,{resolve as c,basename as l}from"node:path";import u from"node:module";import{writeFileSync as f,statSync as p,readFileSync as d,appendFileSync as h,createReadStream as m,createWriteStream as g,readdirSync as b,existsSync as y,mkdirSync as v}from"node:fs";import{fileURLToPath as w}from"node:url";import{ChildProcess as E,spawnSync as S,spawn as O}from"node:child_process";import{StringDecoder as I}from"node:string_decoder";import{debuglog as T,stripVTControlCharacters as j,inspect as x,promisify as R,callbackify as A,aborted as D}from"node:util";import N,{platform as L,hrtime as k,execPath as C,execArgv as P}from"node:process";import M from"node:tty";import{setTimeout as _,scheduler as $,setImmediate as B}from"node:timers/promises";import{constants as F}from"node:os";import{once as U,addAbortListener as G,EventEmitter as W,on as z,setMaxListeners as V}from"node:events";import{serialize as H}from"node:v8";import{Transform as X,getDefaultHighWaterMark as q,PassThrough as K,Readable as Y,Writable as Q,Duplex as J}from"node:stream";import{Buffer as Z}from"node:buffer";import{finished as ee}from"node:stream/promises";var te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ne=function(e){return e&&e.Math===Math&&e},oe=ne("object"==typeof globalThis&&globalThis)||ne("object"==typeof window&&window)||ne("object"==typeof self&&self)||ne("object"==typeof te&&te)||ne("object"==typeof te&&te)||function(){return this}()||Function("return this")(),ie={},se=function(e){try{return!!e()}catch(e){return!0}},ae=!se(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),ce=!se(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),le=ce,ue=Function.prototype.call,fe=le?ue.bind(ue):function(){return ue.apply(ue,arguments)},pe={},de={}.propertyIsEnumerable,he=Object.getOwnPropertyDescriptor,me=he&&!de.call({1:2},1);pe.f=me?function(e){var t=he(this,e);return!!t&&t.enumerable}:de;var ge,be,ye=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ve=ce,we=Function.prototype,Ee=we.call,Se=ve&&we.bind.bind(Ee,Ee),Oe=ve?Se:function(e){return function(){return Ee.apply(e,arguments)}},Ie=Oe,Te=Ie({}.toString),je=Ie("".slice),xe=function(e){return je(Te(e),8,-1)},Re=se,Ae=xe,De=Object,Ne=Oe("".split),Le=Re(function(){return!De("z").propertyIsEnumerable(0)})?function(e){return"String"===Ae(e)?Ne(e,""):De(e)}:De,ke=function(e){return null==e},Ce=ke,Pe=TypeError,Me=function(e){if(Ce(e))throw new Pe("Can't call method on "+e);return e},_e=Le,$e=Me,Be=function(e){return _e($e(e))},Fe="object"==typeof document&&document.all,Ue=void 0===Fe&&void 0!==Fe?function(e){return"function"==typeof e||e===Fe}:function(e){return"function"==typeof e},Ge=Ue,We=function(e){return"object"==typeof e?null!==e:Ge(e)},ze=oe,Ve=Ue,He=function(e,t){return arguments.length<2?(r=ze[e],Ve(r)?r:void 0):ze[e]&&ze[e][t];var r},Xe=Oe({}.isPrototypeOf),qe=oe,Ke="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ye=qe.process,Qe=qe.Deno,Je=Ye&&Ye.versions||Qe&&Qe.version,Ze=Je&&Je.v8;Ze&&(be=(ge=Ze.split("."))[0]>0&&ge[0]<4?1:+(ge[0]+ge[1])),!be&&Ke&&(!(ge=Ke.match(/Edge\/(\d+)/))||ge[1]>=74)&&(ge=Ke.match(/Chrome\/(\d+)/))&&(be=+ge[1]);var et=be,tt=et,rt=se,nt=oe.String,ot=!!Object.getOwnPropertySymbols&&!rt(function(){var e=Symbol("symbol detection");return!nt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&tt&&tt<41}),it=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,st=He,at=Ue,ct=Xe,lt=Object,ut=it?function(e){return"symbol"==typeof e}:function(e){var t=st("Symbol");return at(t)&&ct(t.prototype,lt(e))},ft=String,pt=function(e){try{return ft(e)}catch(e){return"Object"}},dt=Ue,ht=pt,mt=TypeError,gt=function(e){if(dt(e))return e;throw new mt(ht(e)+" is not a function")},bt=gt,yt=ke,vt=function(e,t){var r=e[t];return yt(r)?void 0:bt(r)},wt=fe,Et=Ue,St=We,Ot=TypeError,It={exports:{}},Tt=oe,jt=Object.defineProperty,xt=function(e,t){try{jt(Tt,e,{value:t,configurable:!0,writable:!0})}catch(r){Tt[e]=t}return t},Rt=oe,At=xt,Dt="__core-js_shared__",Nt=It.exports=Rt[Dt]||At(Dt,{});(Nt.versions||(Nt.versions=[])).push({version:"3.36.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Lt=It.exports,kt=Lt,Ct=function(e,t){return kt[e]||(kt[e]=t||{})},Pt=Me,Mt=Object,_t=function(e){return Mt(Pt(e))},$t=_t,Bt=Oe({}.hasOwnProperty),Ft=Object.hasOwn||function(e,t){return Bt($t(e),t)},Ut=Oe,Gt=0,Wt=Math.random(),zt=Ut(1..toString),Vt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+zt(++Gt+Wt,36)},Ht=Ct,Xt=Ft,qt=Vt,Kt=ot,Yt=it,Qt=oe.Symbol,Jt=Ht("wks"),Zt=Yt?Qt.for||Qt:Qt&&Qt.withoutSetter||qt,er=function(e){return Xt(Jt,e)||(Jt[e]=Kt&&Xt(Qt,e)?Qt[e]:Zt("Symbol."+e)),Jt[e]},tr=fe,rr=We,nr=ut,or=vt,ir=function(e,t){var r,n;if("string"===t&&Et(r=e.toString)&&!St(n=wt(r,e)))return n;if(Et(r=e.valueOf)&&!St(n=wt(r,e)))return n;if("string"!==t&&Et(r=e.toString)&&!St(n=wt(r,e)))return n;throw new Ot("Can't convert object to primitive value")},sr=TypeError,ar=er("toPrimitive"),cr=function(e,t){if(!rr(e)||nr(e))return e;var r,n=or(e,ar);if(n){if(void 0===t&&(t="default"),r=tr(n,e,t),!rr(r)||nr(r))return r;throw new sr("Can't convert object to primitive value")}return void 0===t&&(t="number"),ir(e,t)},lr=ut,ur=function(e){var t=cr(e,"string");return lr(t)?t:t+""},fr=We,pr=oe.document,dr=fr(pr)&&fr(pr.createElement),hr=function(e){return dr?pr.createElement(e):{}},mr=hr,gr=!ae&&!se(function(){return 7!==Object.defineProperty(mr("div"),"a",{get:function(){return 7}}).a}),br=ae,yr=fe,vr=pe,wr=ye,Er=Be,Sr=ur,Or=Ft,Ir=gr,Tr=Object.getOwnPropertyDescriptor;ie.f=br?Tr:function(e,t){if(e=Er(e),t=Sr(t),Ir)try{return Tr(e,t)}catch(e){}if(Or(e,t))return wr(!yr(vr.f,e,t),e[t])};var jr={},xr=ae&&se(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Rr=We,Ar=String,Dr=TypeError,Nr=function(e){if(Rr(e))return e;throw new Dr(Ar(e)+" is not an object")},Lr=ae,kr=gr,Cr=xr,Pr=Nr,Mr=ur,_r=TypeError,$r=Object.defineProperty,Br=Object.getOwnPropertyDescriptor,Fr="enumerable",Ur="configurable",Gr="writable";jr.f=Lr?Cr?function(e,t,r){if(Pr(e),t=Mr(t),Pr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Gr in r&&!r[Gr]){var n=Br(e,t);n&&n[Gr]&&(e[t]=r.value,r={configurable:Ur in r?r[Ur]:n[Ur],enumerable:Fr in r?r[Fr]:n[Fr],writable:!1})}return $r(e,t,r)}:$r:function(e,t,r){if(Pr(e),t=Mr(t),Pr(r),kr)try{return $r(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new _r("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Wr=jr,zr=ye,Vr=ae?function(e,t,r){return Wr.f(e,t,zr(1,r))}:function(e,t,r){return e[t]=r,e},Hr={exports:{}},Xr=ae,qr=Ft,Kr=Function.prototype,Yr=Xr&&Object.getOwnPropertyDescriptor,Qr=qr(Kr,"name"),Jr={EXISTS:Qr,PROPER:Qr&&"something"===function(){}.name,CONFIGURABLE:Qr&&(!Xr||Xr&&Yr(Kr,"name").configurable)},Zr=Ue,en=Lt,tn=Oe(Function.toString);Zr(en.inspectSource)||(en.inspectSource=function(e){return tn(e)});var rn,nn,on,sn=en.inspectSource,an=Ue,cn=oe.WeakMap,ln=an(cn)&&/native code/.test(String(cn)),un=Vt,fn=Ct("keys"),pn=function(e){return fn[e]||(fn[e]=un(e))},dn={},hn=ln,mn=oe,gn=We,bn=Vr,yn=Ft,vn=Lt,wn=pn,En=dn,Sn="Object already initialized",On=mn.TypeError,In=mn.WeakMap;if(hn||vn.state){var Tn=vn.state||(vn.state=new In);Tn.get=Tn.get,Tn.has=Tn.has,Tn.set=Tn.set,rn=function(e,t){if(Tn.has(e))throw new On(Sn);return t.facade=e,Tn.set(e,t),t},nn=function(e){return Tn.get(e)||{}},on=function(e){return Tn.has(e)}}else{var jn=wn("state");En[jn]=!0,rn=function(e,t){if(yn(e,jn))throw new On(Sn);return t.facade=e,bn(e,jn,t),t},nn=function(e){return yn(e,jn)?e[jn]:{}},on=function(e){return yn(e,jn)}}var xn={set:rn,get:nn,has:on,enforce:function(e){return on(e)?nn(e):rn(e,{})},getterFor:function(e){return function(t){var r;if(!gn(t)||(r=nn(t)).type!==e)throw new On("Incompatible receiver, "+e+" required");return r}}},Rn=Oe,An=se,Dn=Ue,Nn=Ft,Ln=ae,kn=Jr.CONFIGURABLE,Cn=sn,Pn=xn.enforce,Mn=xn.get,_n=String,$n=Object.defineProperty,Bn=Rn("".slice),Fn=Rn("".replace),Un=Rn([].join),Gn=Ln&&!An(function(){return 8!==$n(function(){},"length",{value:8}).length}),Wn=String(String).split("String"),zn=Hr.exports=function(e,t,r){"Symbol("===Bn(_n(t),0,7)&&(t="["+Fn(_n(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Nn(e,"name")||kn&&e.name!==t)&&(Ln?$n(e,"name",{value:t,configurable:!0}):e.name=t),Gn&&r&&Nn(r,"arity")&&e.length!==r.arity&&$n(e,"length",{value:r.arity});try{r&&Nn(r,"constructor")&&r.constructor?Ln&&$n(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Pn(e);return Nn(n,"source")||(n.source=Un(Wn,"string"==typeof t?t:"")),e};Function.prototype.toString=zn(function(){return Dn(this)&&Mn(this).source||Cn(this)},"toString");var Vn=Hr.exports,Hn=Ue,Xn=jr,qn=Vn,Kn=xt,Yn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Hn(r)&&qn(r,i,n),n.global)o?e[t]=r:Kn(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Xn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Qn={},Jn=Math.ceil,Zn=Math.floor,eo=Math.trunc||function(e){var t=+e;return(t>0?Zn:Jn)(t)},to=eo,ro=function(e){var t=+e;return t!=t||0===t?0:to(t)},no=ro,oo=Math.max,io=Math.min,so=ro,ao=Math.min,co=function(e){var t=so(e);return t>0?ao(t,9007199254740991):0},lo=co,uo=function(e){return lo(e.length)},fo=Be,po=function(e,t){var r=no(e);return r<0?oo(r+t,0):io(r,t)},ho=uo,mo=function(e){return function(t,r,n){var o=fo(t),i=ho(o);if(0===i)return!e&&-1;var s,a=po(n,i);if(e&&r!=r){for(;i>a;)if((s=o[a++])!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},go={includes:mo(!0),indexOf:mo(!1)},bo=Ft,yo=Be,vo=go.indexOf,wo=dn,Eo=Oe([].push),So=function(e,t){var r,n=yo(e),o=0,i=[];for(r in n)!bo(wo,r)&&bo(n,r)&&Eo(i,r);for(;t.length>o;)bo(n,r=t[o++])&&(~vo(i,r)||Eo(i,r));return i},Oo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Io=So,To=Oo.concat("length","prototype");Qn.f=Object.getOwnPropertyNames||function(e){return Io(e,To)};var jo={};jo.f=Object.getOwnPropertySymbols;var xo=He,Ro=Qn,Ao=jo,Do=Nr,No=Oe([].concat),Lo=xo("Reflect","ownKeys")||function(e){var t=Ro.f(Do(e)),r=Ao.f;return r?No(t,r(e)):t},ko=Ft,Co=Lo,Po=ie,Mo=jr,_o=se,$o=Ue,Bo=/#|\.prototype\./,Fo=function(e,t){var r=Go[Uo(e)];return r===zo||r!==Wo&&($o(t)?_o(t):!!t)},Uo=Fo.normalize=function(e){return String(e).replace(Bo,".").toLowerCase()},Go=Fo.data={},Wo=Fo.NATIVE="N",zo=Fo.POLYFILL="P",Vo=Fo,Ho=oe,Xo=ie.f,qo=Vr,Ko=Yn,Yo=xt,Qo=function(e,t,r){for(var n=Co(t),o=Mo.f,i=Po.f,s=0;s9007199254740991)throw si("Maximum allowed index exceeded");return e};Zo({target:"Array",proto:!0,arity:1,forced:se(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=ai(this),r=ci(t),n=arguments.length;ui(r+n);for(var o=0;os;)Ci.f(e,r=o[s++],n[r]);return e};var $i,Bi=He("document","documentElement"),Fi=Nr,Ui=Ri,Gi=Oo,Wi=dn,zi=Bi,Vi=hr,Hi="prototype",Xi="script",qi=pn("IE_PROTO"),Ki=function(){},Yi=function(e){return"<"+Xi+">"+e+""},Qi=function(e){e.write(Yi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ji=function(){try{$i=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Ji="undefined"!=typeof document?document.domain&&$i?Qi($i):(t=Vi("iframe"),r="java"+Xi+":",t.style.display="none",zi.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Yi("document.F=Object")),e.close(),e.F):Qi($i);for(var n=Gi.length;n--;)delete Ji[Hi][Gi[n]];return Ji()};Wi[qi]=!0;var Zi,es,ts,rs=Object.create||function(e,t){var r;return null!==e?(Ki[Hi]=Fi(e),r=new Ki,Ki[Hi]=null,r[qi]=e):r=Ji(),void 0===t?r:Ui.f(r,t)},ns=se,os=Ue,is=We,ss=Ei,as=Yn,cs=er("iterator"),ls=!1;[].keys&&("next"in(ts=[].keys())?(es=ss(ss(ts)))!==Object.prototype&&(Zi=es):ls=!0);var us=!is(Zi)||ns(function(){var e={};return Zi[cs].call(e)!==e});us&&(Zi={}),os(Zi[cs])||as(Zi,cs,function(){return this});var fs={IteratorPrototype:Zi,BUGGY_SAFARI_ITERATORS:ls},ps=Zo,ds=oe,hs=function(e,t){if(fi(t,e))return e;throw new pi("Incorrect invocation")},ms=Nr,gs=Ue,bs=Ei,ys=Ii,vs=function(e,t,r){Ti?ji.f(e,t,xi(0,r)):e[t]=r},ws=se,Es=Ft,Ss=fs.IteratorPrototype,Os=ae,Is="constructor",Ts="Iterator",js=er("toStringTag"),xs=TypeError,Rs=ds[Ts],As=!gs(Rs)||Rs.prototype!==Ss||!ws(function(){Rs({})}),Ds=function(){if(hs(this,Ss),bs(this)===Ss)throw new xs("Abstract class Iterator not directly constructable")},Ns=function(e,t){Os?ys(Ss,e,{configurable:!0,get:function(){return t},set:function(t){if(ms(this),this===Ss)throw new xs("You can't redefine this property");Es(this,e)?this[e]=t:vs(this,e,t)}}):Ss[e]=t};Es(Ss,js)||Ns(js,Ts),!As&&Es(Ss,Is)&&Ss[Is]!==Object||Ns(Is,Ds),Ds.prototype=Ss,ps({global:!0,constructor:!0,forced:As},{Iterator:Ds});var Ls=function(e){return{iterator:e,next:e.next,done:!1}},ks=Yn,Cs=fe,Ps=Nr,Ms=vt,_s=function(e,t,r){var n,o;Ps(e);try{if(!(n=Ms(e,"return"))){if("throw"===t)throw r;return r}n=Cs(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return Ps(n),r},$s=fe,Bs=rs,Fs=Vr,Us=function(e,t,r){for(var n in t)ks(e,n,t[n],r);return e},Gs=xn,Ws=vt,zs=fs.IteratorPrototype,Vs=function(e,t){return{value:e,done:t}},Hs=_s,Xs=er("toStringTag"),qs="IteratorHelper",Ks="WrapForValidIterator",Ys=Gs.set,Qs=function(e){var t=Gs.getterFor(e?Ks:qs);return Us(Bs(zs),{next:function(){var r=t(this);if(e)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return Vs(n,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),n=r.iterator;if(r.done=!0,e){var o=Ws(n,"return");return o?$s(o,n):Vs(void 0,!0)}if(r.inner)try{Hs(r.inner.iterator,"normal")}catch(e){return Hs(n,"throw",e)}return Hs(n,"normal"),Vs(void 0,!0)}})},Js=Qs(!0),Zs=Qs(!1);Fs(Zs,Xs,"Iterator Helper");var ea=function(e,t){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=t?Ks:qs,n.nextHandler=e,n.counter=0,n.done=!1,Ys(this,n)};return r.prototype=t?Js:Zs,r},ta=Nr,ra=_s,na=function(e,t,r,n){try{return n?t(ta(r)[0],r[1]):t(r)}catch(t){ra(e,"throw",t)}},oa=Zo,ia=fe,sa=gt,aa=Nr,ca=Ls,la=na,ua=ea(function(){for(var e,t,r=this.iterator,n=this.predicate,o=this.next;;){if(e=aa(ia(o,r)),this.done=!!e.done)return;if(t=e.value,la(r,n,[t,this.counter++],!0))return t}});oa({target:"Iterator",proto:!0,real:!0,forced:false},{filter:function(e){return aa(this),sa(e),new ua(ca(this),{predicate:e})}});var fa=xe,pa=Oe,da=function(e){if("Function"===fa(e))return pa(e)},ha=gt,ma=ce,ga=da(da.bind),ba={},ya=ba,va=er("iterator"),wa=Array.prototype,Ea={};Ea[er("toStringTag")]="z";var Sa="[object z]"===String(Ea),Oa=Ue,Ia=xe,Ta=er("toStringTag"),ja=Object,xa="Arguments"===Ia(function(){return arguments}()),Ra=Sa?Ia:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=ja(e),Ta))?r:xa?Ia(t):"Object"===(n=Ia(t))&&Oa(t.callee)?"Arguments":n},Aa=Ra,Da=vt,Na=ke,La=ba,ka=er("iterator"),Ca=function(e){if(!Na(e))return Da(e,ka)||Da(e,"@@iterator")||La[Aa(e)]},Pa=fe,Ma=gt,_a=Nr,$a=pt,Ba=Ca,Fa=TypeError,Ua=function(e,t){return ha(e),void 0===t?e:ma?ga(e,t):function(){return e.apply(t,arguments)}},Ga=fe,Wa=Nr,za=pt,Va=function(e){return void 0!==e&&(ya.Array===e||wa[va]===e)},Ha=uo,Xa=Xe,qa=function(e,t){var r=arguments.length<2?Ba(e):t;if(Ma(r))return _a(Pa(r,e));throw new Fa($a(e)+" is not iterable")},Ka=Ca,Ya=_s,Qa=TypeError,Ja=function(e,t){this.stopped=e,this.result=t},Za=Ja.prototype,ec=function(e,t,r){var n,o,i,s,a,c,l,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),m=Ua(t,u),g=function(e){return n&&Ya(n,"normal",e),new Ja(!0,e)},b=function(e){return f?(Wa(e),h?m(e[0],e[1],g):m(e[0],e[1])):h?m(e,g):m(e)};if(p)n=e.iterator;else if(d)n=e;else{if(!(o=Ka(e)))throw new Qa(za(e)+" is not iterable");if(Va(o)){for(i=0,s=Ha(e);s>i;i++)if((a=b(e[i]))&&Xa(Za,a))return a;return new Ja(!1)}n=qa(e,o)}for(c=p?e.next:n.next;!(l=Ga(c,n)).done;){try{a=b(l.value)}catch(e){Ya(n,"throw",e)}if("object"==typeof a&&a&&Xa(Za,a))return a}return new Ja(!1)},tc=ec,rc=gt,nc=Nr,oc=Ls;Zo({target:"Iterator",proto:!0,real:!0},{forEach:function(e){nc(this),rc(e);var t=oc(this),r=0;tc(t,function(t){e(t,r++)},{IS_RECORD:!0})}});var ic=fe,sc=gt,ac=Nr,cc=Ls,lc=na,uc=ea(function(){var e=this.iterator,t=ac(ic(this.next,e));if(!(this.done=!!t.done))return lc(e,this.mapper,[t.value,this.counter++],!0)});Zo({target:"Iterator",proto:!0,real:!0,forced:false},{map:function(e){return ac(this),sc(e),new uc(cc(this),{mapper:e})}});var fc=ec,pc=gt,dc=Nr,hc=Ls,mc=TypeError;Zo({target:"Iterator",proto:!0,real:!0},{reduce:function(e){dc(this),pc(e);var t=hc(this),r=arguments.length<2,n=r?void 0:arguments[1],o=0;if(fc(t,function(t){r?(r=!1,n=t):n=e(n,t,o),o++},{IS_RECORD:!0}),r)throw new mc("Reduce of empty iterator with no initial value");return n}});var gc,bc,yc,vc={},wc={};function Ec(){if(gc)return wc;gc=1;var e=r,n="win32"===process.platform,o=t,i=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function s(e){return"function"==typeof e?e:function(){var e;if(i){var t=new Error;e=function(e){e&&(t.message=e.message,r(e=t))}}else e=r;return e;function r(e){if(e){if(process.throwDeprecation)throw e;if(!process.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);process.traceDeprecation?console.trace(t):console.error(t)}}}}()}if(e.normalize,n)var a=/(.*?)(?:[\/\\]+|$)/g;else a=/(.*?)(?:[\/]+|$)/g;if(n)var c=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else c=/^[\/]*/;return wc.realpathSync=function(t,r){if(t=e.resolve(t),r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];var i,s,l,u,f=t,p={},d={};function h(){var e=c.exec(t);i=e[0].length,s=e[0],l=e[0],u="",n&&!d[l]&&(o.lstatSync(l),d[l]=!0)}for(h();i=t.length)return r&&(r[d]=t),i(null,t);a.lastIndex=l;var e=a.exec(t);return p=u,u+=e[0],f=p+e[1],l=a.lastIndex,m[f]||r&&r[f]===f?process.nextTick(b):r&&Object.prototype.hasOwnProperty.call(r,f)?w(r[f]):o.lstat(f,y)}function y(e,t){if(e)return i(e);if(!t.isSymbolicLink())return m[f]=!0,r&&(r[f]=f),process.nextTick(b);if(!n){var s=t.dev.toString(32)+":"+t.ino.toString(32);if(h.hasOwnProperty(s))return v(null,h[s],f)}o.stat(f,function(e){if(e)return i(e);o.readlink(f,function(e,t){n||(h[s]=t),v(e,t)})})}function v(t,n,o){if(t)return i(t);var s=e.resolve(p,n);r&&(r[o]=s),w(s)}function w(r){t=e.resolve(r,t.slice(l)),g()}g()},wc}function Sc(){if(yc)return bc;yc=1,bc=c,c.realpath=c,c.sync=l,c.realpathSync=l,c.monkeypatch=function(){e.realpath=c,e.realpathSync=l},c.unmonkeypatch=function(){e.realpath=r,e.realpathSync=n};var e=t,r=e.realpath,n=e.realpathSync,o=process.version,i=/^v[0-5]\./.test(o),s=Ec();function a(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function c(e,t,n){if(i)return r(e,t,n);"function"==typeof t&&(n=t,t=null),r(e,t,function(r,o){a(r)?s.realpath(e,t,n):n(r,o)})}function l(e,t){if(i)return n(e,t);try{return n(e,t)}catch(r){if(a(r))return s.realpathSync(e,t);throw r}}return bc}var Oc,Ic,Tc,jc,xc,Rc,Ac,Dc,Nc=ec,Lc=gt,kc=Nr,Cc=Ls;function Pc(){if(Ic)return Oc;Ic=1,Oc=function(t,r){for(var n=[],o=0;o=0&&l>0){for(n=[],i=r.length;u>=0&&!a;)u==c?(n.push(u),c=r.indexOf(e,u+1)):1==n.length?a=[n.pop(),l]:((o=n.pop())=0?c:l;n.length&&(a=[i,s])}return a}return jc=1,Tc=e,e.range=r,Tc}();xc=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return h(function(e){return e.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(o).split("\\,").join(i).split("\\.").join(s)}(e),!0).map(c)};var r="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",i="\0COMMA"+Math.random()+"\0",s="\0PERIOD"+Math.random()+"\0";function a(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function c(e){return e.split(r).join("\\").split(n).join("{").split(o).join("}").split(i).join(",").split(s).join(".")}function l(e){if(!e)return[""];var r=[],n=t("{","}",e);if(!n)return e.split(",");var o=n.pre,i=n.body,s=n.post,a=o.split(",");a[a.length-1]+="{"+i+"}";var c=l(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),r.push.apply(r,a),r}function u(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function p(e,t){return e<=t}function d(e,t){return e>=t}function h(r,n){var i=[],s=t("{","}",r);if(!s||/\$$/.test(s.pre))return[r];var c,m=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),b=m||g,y=s.body.indexOf(",")>=0;if(!b&&!y)return s.post.match(/,.*\}/)?h(r=s.pre+"{"+s.body+o+s.post):[r];if(b)c=s.body.split(/\.\./);else if(1===(c=l(s.body)).length&&1===(c=h(c[0],!1).map(u)).length)return(E=s.post.length?h(s.post,!1):[""]).map(function(e){return s.pre+c[0]+e});var v,w=s.pre,E=s.post.length?h(s.post,!1):[""];if(b){var S=a(c[0]),O=a(c[1]),I=Math.max(c[0].length,c[1].length),T=3==c.length?Math.abs(a(c[2])):1,j=p;O0){var N=new Array(D+1).join("0");A=R<0?"-"+N+A.slice(1):N+A}}v.push(A)}}else v=e(c,function(e){return h(e,!1)});for(var L=0;L65536)throw new TypeError("pattern is too long")};u.prototype.parse=function(e,r){p(e);var a=this.options;if("**"===e){if(!a.noglobstar)return t;e="*"}if(""===e)return"";var c,l="",u=!!a.nocase,f=!1,h=[],m=[],g=!1,b=-1,y=-1,v="."===e.charAt(0)?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",w=this;function E(){if(c){switch(c){case"*":l+=i,u=!0;break;case"?":l+=o,u=!0;break;default:l+="\\"+c}w.debug("clearStateChar %j %j",c,l),c=!1}}for(var S,O=0,I=e.length;O-1;N--){var L=m[N],k=l.slice(0,L.reStart),C=l.slice(L.reStart,L.reEnd-8),P=l.slice(L.reEnd-8,L.reEnd),M=l.slice(L.reEnd);P+=M;var _=k.split("(").length-1,$=M;for(O=0;O<_;O++)$=$.replace(/\)[+*?]?/,"");var B="";""===(M=$)&&r!==d&&(B="$"),l=k+C+M+B+P}""!==l&&u&&(l="(?=.)"+l);D&&(l=v+l);if(r===d)return[l,u];if(!u)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var F=a.nocase?"i":"";try{var U=new RegExp("^"+l+"$",F)}catch(e){return new RegExp("$.")}return U._glob=e,U._src=l,U};var d={};return l.makeRe=function(e,t){return new u(e,t||{}).makeRe()},u.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var r=this.options,n=r.noglobstar?i:r.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=r.nocase?"i":"",s=e.map(function(e){return e.map(function(e){return e===t?n:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,o)}catch(e){this.regexp=!1}return this.regexp},l.match=function(e,t,r){var n=new u(t,r=r||{});return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},u.prototype.match=function(t,r){if(void 0===r&&(r=this.partial),this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&r)return!0;var n=this.options;"/"!==e.sep&&(t=t.split(e.sep).join("/")),t=t.split(a),this.debug(this.pattern,"split",t);var o,i,s=this.set;for(this.debug(this.pattern,"set",s),i=t.length-1;i>=0&&!(o=t[i]);i--);for(i=0;i>> no match, partial?",e,p,r,d),p!==a))}if("string"==typeof u?(l=f===u,this.debug("string match",u,f,l)):(l=f.match(u),this.debug("pattern match",u,f,l)),!l)return!1}if(i===a&&s===c)return!0;if(i===a)return n;if(s===c)return i===a-1&&""===e[i];throw new Error("wtf?")},Ac}Zo({target:"Iterator",proto:!0,real:!0},{some:function(e){kc(this),Lc(e);var t=Cc(this),r=0;return Nc(t,function(t,n){if(e(t,r++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var $c,Bc,Fc={exports:{}},Uc={exports:{}};function Gc(){if(Bc)return Fc.exports;Bc=1;try{var e=require("util");if("function"!=typeof e.inherits)throw"";Fc.exports=e.inherits}catch(e){Fc.exports=($c||($c=1,"function"==typeof Object.create?Uc.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Uc.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),Uc.exports)}return Fc.exports}var Wc,zc={exports:{}};function Vc(){if(Wc)return zc.exports;function e(e){return"/"===e.charAt(0)}function t(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(t[2]||n)}return Wc=1,zc.exports="win32"===process.platform?t:e,zc.exports.posix=e,zc.exports.win32=t,zc.exports}var Hc,Xc,qc,Kc,Yc,Qc={};function Jc(){if(Hc)return Qc;function e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Hc=1,Qc.setopts=function(t,r,i){i||(i={});if(i.matchBase&&-1===r.indexOf("/")){if(i.noglobstar)throw new Error("base matching requires globstar");r="**/"+r}t.silent=!!i.silent,t.pattern=r,t.strict=!1!==i.strict,t.realpath=!!i.realpath,t.realpathCache=i.realpathCache||Object.create(null),t.follow=!!i.follow,t.dot=!!i.dot,t.mark=!!i.mark,t.nodir=!!i.nodir,t.nodir&&(t.mark=!0);t.sync=!!i.sync,t.nounique=!!i.nounique,t.nonull=!!i.nonull,t.nosort=!!i.nosort,t.nocase=!!i.nocase,t.stat=!!i.stat,t.noprocess=!!i.noprocess,t.absolute=!!i.absolute,t.fs=i.fs||n,t.maxLength=i.maxLength||1/0,t.cache=i.cache||Object.create(null),t.statCache=i.statCache||Object.create(null),t.symlinks=i.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(l))}(t,i),t.changedCwd=!1;var c=process.cwd();e(i,"cwd")?(t.cwd=o.resolve(i.cwd),t.changedCwd=t.cwd!==c):t.cwd=c;t.root=i.root||o.resolve(t.cwd,"/"),t.root=o.resolve(t.root),"win32"===process.platform&&(t.root=t.root.replace(/\\/g,"/"));t.cwdAbs=s(t.cwd)?t.cwd:u(t,t.cwd),"win32"===process.platform&&(t.cwdAbs=t.cwdAbs.replace(/\\/g,"/"));t.nomount=!!i.nomount,i.nonegate=!0,i.nocomment=!0,i.allowWindowsEscape=!1,t.minimatch=new a(r,i),t.options=t.minimatch.options},Qc.ownProp=e,Qc.makeAbs=u,Qc.finish=function(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,o=e.matches.length;no?(n.splice(0,o),process.nextTick(function(){r.apply(null,i)})):delete t[e]}})}(e))}),tl}function bl(){if(ol)return nl;ol=1,nl=y;var e=Sc(),t=_c();t.Minimatch;var i=Gc(),s=n.EventEmitter,a=r,c=o,l=Vc(),u=function(){if(qc)return Xc;qc=1,Xc=p,p.GlobSync=d;var e=Sc(),t=_c();t.Minimatch,bl().Glob;var n=r,i=o,s=Vc(),a=Jc(),c=a.setopts,l=a.ownProp,u=a.childrenIgnored,f=a.isIgnored;function p(e,t){if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new d(e,t).found}function d(e,t){if(!e)throw new Error("must provide pattern");if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof d))return new d(e,t);if(c(this,e,t),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;nthis.maxLength)return!1;if(!this.stat&&l(this.cache,t)){var n=this.cache[t];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var o=this.statCache[t];if(!o){var i;try{i=this.fs.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(i&&i.isSymbolicLink())try{o=this.fs.statSync(t)}catch(e){o=i}else o=i}return this.statCache[t]=o,n=!0,o&&(n=o.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||n,(!r||"FILE"!==n)&&n},d.prototype._mark=function(e){return a.mark(this,e)},d.prototype._makeAbs=function(e){return a.makeAbs(this,e)},Xc}(),f=Jc(),p=f.setopts,d=f.ownProp,h=gl(),m=f.childrenIgnored,g=f.isIgnored,b=ml();function y(e,t,r){if("function"==typeof t&&(r=t,t={}),t||(t={}),t.sync){if(r)throw new TypeError("callback provided to sync glob");return u(e,t)}return new w(e,t,r)}y.sync=u;var v=y.GlobSync=u.GlobSync;function w(e,t,r){if("function"==typeof t&&(r=t,t=null),t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new v(e,t)}if(!(this instanceof w))return new w(e,t,r);p(this,e,t),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=b(r),this.on("error",r),this.on("end",function(e){r(null,e)}));var o=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return a();for(var i=!0,s=0;s1)return!0;for(var o=0;othis.maxLength)return t();if(!this.stat&&d(this.cache,r)){var o=this.cache[r];if(Array.isArray(o)&&(o="DIR"),!n||"DIR"===o)return t(null,o);if(n&&"FILE"===o)return t()}var i=this.statCache[r];if(void 0!==i){if(!1===i)return t(null,i);var s=i.isDirectory()?"DIR":"FILE";return n&&"FILE"===s?t():t(null,s,i)}var a=this,c=h("stat\0"+r,function(n,o){if(o&&o.isSymbolicLink())return a.fs.stat(r,function(n,i){n?a._stat2(e,r,null,o,t):a._stat2(e,r,n,i,t)});a._stat2(e,r,n,o,t)});c&&a.fs.lstat(r,c)},w.prototype._stat2=function(e,t,r,n,o){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[t]=!1,o();var i="/"===e.slice(-1);if(this.statCache[t]=n,"/"===t.slice(-1)&&n&&!n.isDirectory())return o(null,!1,n);var s=!0;return n&&(s=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||s,i&&"FILE"===s?o():o(null,s,n)},nl}function yl(){if(il)return vc;il=1;var r=e,n=t,o=bl(),i=nf(),s=Object.create(i);vc.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset:function(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting:function(){this.reset(),this.silent=!0}};l.reset(),vc.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function f(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function d(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1};"number"==typeof t&&f(r)?r.code=t:f(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=d(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,l.fatal)throw new Error(o);if(e.length>0&&!r.silent&&p(o),!r.continue)throw{msg:"earlyExit",retValue:new m("",u.error,u.errorCode)}}function m(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,E.forEach(function(e){n[e]=s[e].bind(n)}),n}function g(e,t,r){if("string"!=typeof e&&!f(e))throw new Error("options must be strings or key-value pairs");if(!f(t))throw new Error("parseOptions() internal error: map must be an object");if(r&&!f(r))throw new Error("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r||{})})}else Object.keys(e).forEach(function(o){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r||{})});return n}function b(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r;try{r=(r=o.sync(e,l.globOptions)).length>0?r:[e]}catch(t){r=[e]}t=t.concat(r)}}),t}vc.state=u,delete process.env.OLDPWD,vc.isObject=f,vc.log=p,vc.convertErrorOutput=d,vc.error=h,vc.ShellString=m,vc.parseOptions=g,vc.expand=b;var y="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function v(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{f(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return f(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(b(i.slice(n.globStart))));try{f(n.cmdOptions)&&(i[0]=g(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if("earlyExit"!==e.msg)throw e;o=e.retValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new m(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}vc.buffer=y,vc.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},vc.statFollowLinks=function(){return n.statSync.apply(n,arguments)},vc.statNoFollowLinks=function(){return n.lstatSync.apply(n,arguments)},vc.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):n.error("You must specify a file.")),e=n.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=n.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&o.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=i.resolve(r),o.existsSync(r)||n.error("File not found: "+r),!e.recursive||!n.statNoFollowLinks(r).isSymbolicLink()){var a=n.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,f=l;isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var i=/([ugoa]*)([=\+-])([rwxXst]*)/i.exec(t);if(i){var a=i[1],p=i[2],d=i[3],h=-1!==a.indexOf("u")||"a"===a||""===a,m=-1!==a.indexOf("g")||"a"===a||""===a,g=-1!==a.indexOf("o")||"a"===a||""===a,b=-1!==d.indexOf("r"),y=-1!==d.indexOf("w"),v=-1!==d.indexOf("x"),w=-1!==d.indexOf("X"),E=-1!==d.indexOf("t"),S=-1!==d.indexOf("s");w&&c&&(v=!0);var O=0;switch(h&&(O|=(b?s.OWNER_READ:0)+(y?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(S?s.SETUID:0)),m&&(O|=(b?s.GROUP_READ:0)+(y?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(S?s.SETGID:0)),g&&(O|=(b?s.OTHER_READ:0)+(y?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),E&&(O|=s.STICKY),p){case"+":f|=O;break;case"-":f&=~O;break;case"=":f=u+O,n.statFollowLinks(r).isDirectory()&&(f|=s.SETUID+s.SETGID&l);break;default:n.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+f.toString(8)),l!==f&&(!e.verbose&&e.changes&&console.log(r+" -> "+f.toString(8)),o.chmodSync(r,f),l=f)}else n.error("Invalid symbolic mode change: "+t)}):(f=u+parseInt(t,8),n.statFollowLinks(r).isDirectory()&&(f|=s.SETUID+s.SETGID&l),o.chmodSync(r,f))}}),""}return n.register("chmod",a,{}),ul=a}function Sl(){if(dl)return pl;dl=1;var e=t,n=r,o=yl();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime=o.config.maxdepth)){n++;var l="win32"===process.platform;try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var u=e.readdirSync(t),f=0;f and/or "):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var f=o.statFollowLinks(c);if(!t.noFollowsymlink&&f.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,{no_force:t.no_force,followsymlink:t.followsymlink})}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var d=a;l&&l.isDirectory()&&(d=n.normalize(a+"/"+n.basename(c)));var h=e.existsSync(d);if(h&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+d+"' with '"+c+"'",{continue:!0}));if(h&&t.no_force)return;if(""===n.relative(c,d))return void o.error("'"+d+"' and '"+c+"' are the same file",{continue:!0});i(c,d,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink"},wrapOutput:!1}),pl=c}var Ol,Il,Tl,jl,xl,Rl={};function Al(){if(Ol)return Rl;Ol=1;var e=yl(),t=wl(),n=r;e.register("dirs",u,{wrapOutput:!1}),e.register("pushd",c,{wrapOutput:!1}),e.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[\-+]\d+$/.test(e)}function s(t){if(i(t)){if(Math.abs(t)1))return e.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=n.resolve(l.shift()),t("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=e.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return e.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=n.resolve(o.shift());t("",c)}return u(r.quiet?"-q":"")}function u(t,r){if(i(t)&&(r=t,t=""),(t=e.parseOptions(t,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),t.quiet||e.log(n[r]),n[r]):(t.quiet||e.log(n.join(" ")),n)}return Rl.pushd=c,Rl.popd=l,Rl.dirs=u,Rl}function Dl(){if(Tl)return Il;Tl=1;var e=i.format,t=yl();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}return t.register("echo",r,{allowGlobbing:!1}),Il=r}function Nl(){if(xl)return jl;xl=1;var e=yl();return jl=function(){return e.state.error}}var Ll,kl={exports:{}};function Cl(){return Ll||(Ll=1,function(e){if(require.main!==e)throw new Error("This file should not be required");var r=s,n=t,o=process.argv[2],i=n.readFileSync(o,"utf8"),a=JSON.parse(i),c=a.command,l=a.execOptions,u=a.pipe,f=a.stdoutFile,p=a.stderrFile,d=r.exec(c,l,function(e){e?void 0===e.code?process.exitCode=1:process.exitCode=e.code:process.exitCode=0}),h=n.createWriteStream(f),m=n.createWriteStream(p);d.stdout.pipe(h),d.stderr.pipe(m),d.stdout.pipe(process.stdout),d.stderr.pipe(process.stderr),u&&d.stdin.end(u)}(kl)),kl.exports}kl.exports;var Pl,Ml,_l,$l,Bl,Fl,Ul,Gl,Wl,zl,Vl,Hl,Xl,ql,Kl,Yl,Ql,Jl,Zl,eu,tu,ru={};function nu(){if(Pl)return ru;Pl=1;var r,n=yl(),o=e,i=t;function s(e){if(!e||!i.existsSync(e))return!1;if(!n.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+n.randomFileName();try{return i.writeFileSync(t," "),n.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(o.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return n.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),ru.tempDir=a,ru.isCached=function(){return r},ru.clearCache=function(){r=void 0},ru}function ou(){if(_l)return Ml;_l=1;var e=r;function t(){return e.resolve(process.cwd())}return yl().register("pwd",t,{allowGlobbing:!1}),Ml=t}function iu(){if(Bl)return $l;Bl=1;var e=yl(),n=nu().tempDir,o=ou(),i=r,a=t,c=s,l=20971520;function u(t,r,s){r=r||{},t||e.error("must specify command");var u=e.readFromPipe();return"function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),(r=e.extend({silent:e.config.silent,async:!1},r)).async?function(t,r,n,i){r=e.extend({silent:e.config.silent,cwd:o().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r);var s=c.exec(t,r,function(e,t,r){i&&(e?void 0===e.code?i(1,t,r):i(e.code,t,r):i(0,t,r))});return n&&s.stdin.end(n),r.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){e.config.execPath||e.error("Unable to find a path to the node binary. Please manually set config.execPath");var u=n(),f=i.resolve(u+"/"+e.randomFileName()),p=i.resolve(u+"/"+e.randomFileName()),d=i.resolve(u+"/"+e.randomFileName());r=e.extend({silent:e.config.silent,cwd:o().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),a.existsSync(f)&&e.unlinkSync(f),a.existsSync(p)&&e.unlinkSync(p),a.existsSync(d)&&e.unlinkSync(d),r.cwd=i.resolve(r.cwd);var h={command:t,execOptions:r,pipe:s,stdoutFile:d,stderrFile:p};function m(e,t){a.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}m(d,""),m(p,""),m(f,JSON.stringify(h));var g=[i.join(__dirname,"exec-child.js"),f];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var b=0;try{delete r.shell,c.execFileSync(e.config.execPath,g,r)}catch(e){b=e.status||1}var y="",v="";"buffer"===r.encoding?(y=a.readFileSync(d),v=a.readFileSync(p)):(y=a.readFileSync(d,r.encoding),v=a.readFileSync(p,r.encoding));try{e.unlinkSync(f)}catch(e){}try{e.unlinkSync(p)}catch(e){}try{e.unlinkSync(d)}catch(e){}return 0!==b&&e.error(v,b,{continue:!0,silent:!0}),e.ShellString(y,v,b)}(t,r,u)}return e.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1}),$l=u}function su(){if(Ul)return Fl;Ul=1;var e=r,n=t,o=yl(),i=bl(),s=e.sep+"**";function a(t,r){t.all_deprecated&&(o.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var a=[];function c(e,r,n){var i,s;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?o.statFollowLinks(e):o.statNoFollowLinks(e)),a.push((i=r,(s=n).name=i,s.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},s))):a.push(r)}return r.forEach(function(r){var a;try{if((a=t.link?o.statFollowLinks(r):o.statNoFollowLinks(r)).isSymbolicLink())try{var l=o.statFollowLinks(r);l.isDirectory()&&(a=l)}catch(e){}}catch(e){return void o.error("no such file or directory: "+r,2,{continue:!0})}a.isDirectory()&&!t.directory?t.recursive?i.sync(r+s,{dot:t.all,follow:t.link}).forEach(function(t){e.relative(r,t)&&c(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){c(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&c(e.join(r,t),t)}):c(r,r,a)}),a}return o.register("ls",a,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),Fl=a}function au(){if(Wl)return Gl;Wl=1;var e=r,t=yl(),n=su();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(r){var o;try{o=t.statFollowLinks(r)}catch(e){t.error("no such file or directory: "+r)}s(r),o.isDirectory()&&n({recursive:!0,all:!0},r).forEach(function(t){s(e.join(r,t))})}),i}return t.register("find",o,{}),Gl=o}function cu(){if(Vl)return zl;Vl=1;var e=yl(),r=t;function n(t,n,o){var i=e.readFromPipe();o||i||e.error("no paths given",2),o=[].slice.call(arguments,2),i&&o.unshift("-");var s=[];return t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(r.existsSync(o)||"-"===o){var a="-"===o?i:r.readFileSync(o,"utf8");if(t.nameOnly)a.match(n)&&s.push(o);else a.split("\n").forEach(function(e){var r=e.match(n);(t.inverse&&!r||!t.inverse&&r)&&s.push(e)})}else e.error("no such file or directory: "+o,2,{continue:!0})}),s.join("\n")+"\n"}return e.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase"}}),zl=n}function lu(){if(Xl)return Hl;Xl=1;var e=yl(),r=t;function n(t,n){var o=[],i=e.readFromPipe();n||i||e.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!r.existsSync(n))return void e.error("no such file or directory: "+n,{continue:!0});if(e.statFollowLinks(n).isDirectory())return void e.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?r.readFileSync(n,"utf8"):function(t,n){for(var o=e.buffer(),i=o.length,s=i,a=0,c=r.openSync(t,"r"),l=0,u="";s===i&&l and/or "),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}return o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),ql=i}function fu(){if(Ql)return Yl;Ql=1;var e=yl(),n=t,o=r;function i(t){var r=o.dirname(t);r===t&&e.error("dirname() failed: ["+t+"]"),n.existsSync(r)||i(r),n.mkdirSync(t,parseInt("0777",8))}function s(t,r){return r||e.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=e.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&e.error("cannot create directory "+r+": File exists",{continue:!0}):e.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=o.dirname(r);if(n.existsSync(a)||t.fullpath)try{t.fullpath?i(o.resolve(r)):n.mkdirSync(r,parseInt("0777",8))}catch(t){var c;if("EACCES"===t.code)c="Permission denied";else{if("ENOTDIR"!==t.code&&"ENOENT"!==t.code)throw t;c="Not a directory"}e.error("cannot create directory "+r+": "+c,{continue:!0})}else e.error("no such file or directory: "+a,{continue:!0})}),""}return e.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),Yl=s}function pu(){if(Zl)return Jl;Zl=1;var e=yl(),r=t;function n(t,i,s){var a;a=r.readdirSync(t);for(var c=0;c1e3)throw e}}catch(r){e.error("could not remove directory (code "+r.code+"): "+t,{continue:!0})}return u}}function o(e){var t=!0;try{var n=r.openSync(e,"a");r.closeSync(n)}catch(e){t=!1}return t}function i(t,r){return r||e.error("no paths given"),(r=[].slice.call(arguments,1)).forEach(function(r){var i;try{var s="/"===r[r.length-1]?r.slice(0,-1):r;i=e.statNoFollowLinks(s)}catch(n){return void(t.force||e.error("no such file or directory: "+r,{continue:!0}))}i.isFile()?function(t,r){r.force||o(t)?e.unlinkSync(t):e.error("permission denied: "+t,{continue:!0})}(r,t):i.isDirectory()?function(t,r){r.recursive?n(t,r.force):e.error("path is a directory",{continue:!0})}(r,t):i.isSymbolicLink()?function(t,r){var o;try{o=e.statFollowLinks(t)}catch(r){return void e.unlinkSync(t)}o.isFile()?e.unlinkSync(t):o.isDirectory()&&("/"===t[t.length-1]?r.recursive?n(t,r.force,!0):e.error("path is a directory",{continue:!0}):e.unlinkSync(t))}(r,t):i.isFIFO()&&function(t){e.unlinkSync(t)}(r)}),""}return e.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),Jl=i}function du(){if(tu)return eu;tu=1;var e=t,n=r,o=yl(),i=Sl(),s=pu();function a(t,r,a){arguments.length<3?o.error("missing and/or "):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i("-r",c,u),s("-rf",c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),eu=a}var hu,mu={};function gu(){return hu||(hu=1),mu}var bu,yu,vu,wu,Eu,Su,Ou,Iu,Tu,ju,xu,Ru,Au,Du,Nu,Lu,ku,Cu,Pu,Mu,_u,$u,Bu={};function Fu(){return bu||(bu=1),Bu}function Uu(){if(vu)return yu;vu=1;var e=yl(),r=t;function n(t,n,o,i){var s=e.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():e.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||e.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(r.existsSync(i)||"-"===i){var c=("-"===i?s:r.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&r.writeFileSync(i,c,"utf8")}else e.error("no such file or directory: "+i,2,{continue:!0})}),a.join("\n")}return e.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),yu=n}function Gu(){if(Eu)return wu;Eu=1;var e=yl();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}return e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),wu=t}function Wu(){if(Ou)return Su;Ou=1;var e=yl(),r=t;function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=e.readFromPipe();n||s||e.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!r.existsSync(n))return e.error("no such file or directory: "+n,{continue:!0}),t;if(e.statFollowLinks(n).isDirectory())return e.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:r.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}return e.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),Su=s}function zu(){if(Tu)return Iu;Tu=1;var e=yl(),r=t;function n(t,n){var o=[],i=e.readFromPipe();n||i||e.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!r.existsSync(n))return void e.error("no such file or directory: "+n,{continue:!0});if(e.statFollowLinks(n).isDirectory())return void e.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:r.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),a=!0):a=!1,o=o.concat(s.slice(t.numLines))}),a&&o.push(""),o.join("\n")}return e.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Iu=n}function Vu(){if(xu)return ju;xu=1;var e=yl(),r=t;function n(t,n){n||e.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||e.error("could not interpret expression"),t.link)try{return e.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!r.existsSync(n))return!1;if(t.exists)return!0;var i=e.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}return e.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ju=n}function Hu(){if(Au)return Ru;Au=1;var e=yl(),n=t,o=r;function i(t,r){r||e.error("wrong arguments"),n.existsSync(o.dirname(r))||e.error("no such file or directory: "+o.dirname(r));try{return n.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(t){e.error("could not write to file (code "+t.code+"): "+r,{continue:!0})}}return e.register("to",i,{pipeOnly:!0,wrapOutput:!1}),Ru=i}function Xu(){if(Nu)return Du;Nu=1;var e=yl(),n=t,o=r;function i(t,r){r||e.error("wrong arguments"),n.existsSync(o.dirname(r))||e.error("no such file or directory: "+o.dirname(r));try{return n.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(t){e.error("could not append to file (code "+t.code+"): "+r,{continue:!0})}}return e.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),Du=i}function qu(){if(ku)return Lu;ku=1;var e=yl(),r=t;function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):e.error("file arg should be a string file path or an Array of string file paths"):e.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;r.closeSync(r.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||e.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));r.utimesSync(n,c,a)}(t,n)}),""}function o(t){try{return e.statFollowLinks(t)}catch(e){return null}}return e.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),Lu=n}function Ku(){if(Pu)return Cu;Pu=1;var e=yl(),r=t;function n(t,n,o){var i=e.readFromPipe();i||(n||e.error("no input given"),r.existsSync(n)?e.statFollowLinks(n).isDirectory()&&e.error("error reading '"+n+"'"):e.error(n+": No such file or directory")),o&&r.existsSync(o)&&e.statFollowLinks(o).isDirectory()&&e.error(o+": Is a directory");var s=(n?r.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length0)||t.all);p++){var d=o.resolve(s[p],r);n&&(d=d.toUpperCase());var h=d.match(/\.[^<>:"/\|?*.]+$/);if(h&&f.indexOf(h[0])>=0){if(l(d)){u.push(d);break}}else for(var m=0;m0?t.all?u:u[0]:t.all?[]:null}return Mu=u}function Qu(){return $u||($u={"/node_modules/shelljs/src/cat.js":vl,"/node_modules/shelljs/src/cd.js":wl,"/node_modules/shelljs/src/chmod.js":El,"/node_modules/shelljs/src/common.js":yl,"/node_modules/shelljs/src/cp.js":Sl,"/node_modules/shelljs/src/dirs.js":Al,"/node_modules/shelljs/src/echo.js":Dl,"/node_modules/shelljs/src/error.js":Nl,"/node_modules/shelljs/src/exec-child.js":Cl,"/node_modules/shelljs/src/exec.js":iu,"/node_modules/shelljs/src/find.js":au,"/node_modules/shelljs/src/grep.js":cu,"/node_modules/shelljs/src/head.js":lu,"/node_modules/shelljs/src/ln.js":uu,"/node_modules/shelljs/src/ls.js":su,"/node_modules/shelljs/src/mkdir.js":fu,"/node_modules/shelljs/src/mv.js":du,"/node_modules/shelljs/src/popd.js":gu,"/node_modules/shelljs/src/pushd.js":Fu,"/node_modules/shelljs/src/pwd.js":ou,"/node_modules/shelljs/src/rm.js":pu,"/node_modules/shelljs/src/sed.js":Uu,"/node_modules/shelljs/src/set.js":Gu,"/node_modules/shelljs/src/sort.js":Wu,"/node_modules/shelljs/src/tail.js":zu,"/node_modules/shelljs/src/tempdir.js":nu,"/node_modules/shelljs/src/test.js":Vu,"/node_modules/shelljs/src/to.js":Hu,"/node_modules/shelljs/src/toEnd.js":Xu,"/node_modules/shelljs/src/touch.js":qu,"/node_modules/shelljs/src/uniq.js":Ku,"/node_modules/shelljs/src/which.js":Yu})}function Ju(e,t){var r,n=function(e){var t=e[0];if("/"===t||"\\"===t)return!1;var r=e[1],n=e[2];return!(!("."!==t||r&&"/"!==r&&"\\"!==r)||!("."!==t||"."!==r||n&&"/"!==n&&"\\"!==n))&&(":"!==r||"/"!==n&&"\\"!==n)}(e);"/"===(e=Zu(e))[0]&&(t="");for(var o=Qu(),i=["",".js",".json"];!(r=Zu(n?t+"/node_modules/"+e:t+"/"+e)).endsWith("/..");){for(var s=0;s0&&".."!==t[n-1]&&"."!==t[n-1]&&(t.splice(--n,2),n--);return e=t.join("/"),r&&"/"!==e[0]?e="/"+e:0===e.length&&(e="."),e}var ef,tf={},rf=["cat","cd","chmod","cp","dirs","echo","exec","find","grep","head","ln","ls","mkdir","mv","pwd","rm","sed","set","sort","tail","tempdir","test","to","toEnd","touch","uniq","which"];function nf(){if(ef)return tf;ef=1;var e=yl();return rf.forEach(function(e){!function(e){function t(t){var r=Ju(t,e);if(null!==r)return Qu()[r]();throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return t.resolve=function(t){var r=Ju(t,e);return null!==r?r:require.resolve(t)},t}("/node_modules/shelljs")("./src/"+e)}),tf.exit=process.exit,tf.error=Nl(),tf.ShellString=e.ShellString,tf.env=process.env,tf.config=e.config,tf}re(rf);var of=nf(),sf=yl();Object.keys(of).forEach(function(e){te[e]=of[e]});var af=Hu();String.prototype.to=sf.wrap("to",af);var cf=Xu();String.prototype.toEnd=sf.wrap("toEnd",cf),te.config.fatal=!0,te.target={};var lf,uf=process.argv.slice(2),ff=uf.indexOf("--");ff>-1&&(lf=uf.slice(ff+1,uf.length),uf=uf.slice(0,ff)),setTimeout(function(){var e;if(1!==uf.length||"--help"!==uf[0]){for(e in te.target)(function(e,t){te.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(e,te.target[e]);uf.length>0?uf.forEach(function(e){e in te.target?te.target[e](lf):console.log("no such target: "+e)}):"all"in te.target&&te.target.all(lf)}else for(e in console.log("Available targets:"),te.target)console.log(" "+e)},0);var pf=ec,df=gt,hf=Nr,mf=Ls;Zo({target:"Iterator",proto:!0,real:!0},{every:function(e){hf(this),df(e);var t=mf(this),r=0;return!pf(t,function(t,n){if(!e(t,r++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var gf={exports:{}};!function(e,t){var r;t=gf.exports=b,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,i=n-6,s=t.re=[],a=t.safeRe=[],c=t.src=[],l=t.tokens={},u=0;function f(e){l[e]=u++}var p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[p,i]];function h(e){for(var t=0;t)?=?)",f("XRANGEIDENTIFIERLOOSE"),c[l.XRANGEIDENTIFIERLOOSE]=c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",f("XRANGEIDENTIFIER"),c[l.XRANGEIDENTIFIER]=c[l.NUMERICIDENTIFIER]+"|x|X|\\*",f("XRANGEPLAIN"),c[l.XRANGEPLAIN]="[v=\\s]*("+c[l.XRANGEIDENTIFIER]+")(?:\\.("+c[l.XRANGEIDENTIFIER]+")(?:\\.("+c[l.XRANGEIDENTIFIER]+")(?:"+c[l.PRERELEASE]+")?"+c[l.BUILD]+"?)?)?",f("XRANGEPLAINLOOSE"),c[l.XRANGEPLAINLOOSE]="[v=\\s]*("+c[l.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+c[l.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+c[l.XRANGEIDENTIFIERLOOSE]+")(?:"+c[l.PRERELEASELOOSE]+")?"+c[l.BUILD]+"?)?)?",f("XRANGE"),c[l.XRANGE]="^"+c[l.GTLT]+"\\s*"+c[l.XRANGEPLAIN]+"$",f("XRANGELOOSE"),c[l.XRANGELOOSE]="^"+c[l.GTLT]+"\\s*"+c[l.XRANGEPLAINLOOSE]+"$",f("COERCE"),c[l.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",f("COERCERTL"),s[l.COERCERTL]=new RegExp(c[l.COERCE],"g"),a[l.COERCERTL]=new RegExp(h(c[l.COERCE]),"g"),f("LONETILDE"),c[l.LONETILDE]="(?:~>?)",f("TILDETRIM"),c[l.TILDETRIM]="(\\s*)"+c[l.LONETILDE]+"\\s+",s[l.TILDETRIM]=new RegExp(c[l.TILDETRIM],"g"),a[l.TILDETRIM]=new RegExp(h(c[l.TILDETRIM]),"g");f("TILDE"),c[l.TILDE]="^"+c[l.LONETILDE]+c[l.XRANGEPLAIN]+"$",f("TILDELOOSE"),c[l.TILDELOOSE]="^"+c[l.LONETILDE]+c[l.XRANGEPLAINLOOSE]+"$",f("LONECARET"),c[l.LONECARET]="(?:\\^)",f("CARETTRIM"),c[l.CARETTRIM]="(\\s*)"+c[l.LONECARET]+"\\s+",s[l.CARETTRIM]=new RegExp(c[l.CARETTRIM],"g"),a[l.CARETTRIM]=new RegExp(h(c[l.CARETTRIM]),"g");f("CARET"),c[l.CARET]="^"+c[l.LONECARET]+c[l.XRANGEPLAIN]+"$",f("CARETLOOSE"),c[l.CARETLOOSE]="^"+c[l.LONECARET]+c[l.XRANGEPLAINLOOSE]+"$",f("COMPARATORLOOSE"),c[l.COMPARATORLOOSE]="^"+c[l.GTLT]+"\\s*("+c[l.LOOSEPLAIN]+")$|^$",f("COMPARATOR"),c[l.COMPARATOR]="^"+c[l.GTLT]+"\\s*("+c[l.FULLPLAIN]+")$|^$",f("COMPARATORTRIM"),c[l.COMPARATORTRIM]="(\\s*)"+c[l.GTLT]+"\\s*("+c[l.LOOSEPLAIN]+"|"+c[l.XRANGEPLAIN]+")",s[l.COMPARATORTRIM]=new RegExp(c[l.COMPARATORTRIM],"g"),a[l.COMPARATORTRIM]=new RegExp(h(c[l.COMPARATORTRIM]),"g");f("HYPHENRANGE"),c[l.HYPHENRANGE]="^\\s*("+c[l.XRANGEPLAIN]+")\\s+-\\s+("+c[l.XRANGEPLAIN]+")\\s*$",f("HYPHENRANGELOOSE"),c[l.HYPHENRANGELOOSE]="^\\s*("+c[l.XRANGEPLAINLOOSE]+")\\s+-\\s+("+c[l.XRANGEPLAINLOOSE]+")\\s*$",f("STAR"),c[l.STAR]="(<|>)?=?\\s*\\*";for(var m=0;mn)return null;if(!(t.loose?a[l.LOOSE]:a[l.FULL]).test(e))return null;try{return new b(e,t)}catch(e){return null}}function b(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof b){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof b))return new b(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var i=e.trim().match(t.loose?a[l.LOOSE]:a[l.FULL]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new b(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(O(e,t))return null;var r=g(e),n=g(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var i="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return o+s;return i},t.compareIdentifiers=v;var y=/^[0-9]+$/;function v(e,t){var r=y.test(e),n=y.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function S(e,t,r){return w(e,t,r)<0}function O(e,t,r){return 0===w(e,t,r)}function I(e,t,r){return 0!==w(e,t,r)}function T(e,t,r){return w(e,t,r)>=0}function j(e,t,r){return w(e,t,r)<=0}function x(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return O(e,r,n);case"!=":return I(e,r,n);case">":return E(e,r,n);case">=":return T(e,r,n);case"<":return S(e,r,n);case"<=":return j(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function R(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof R){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof R))return new R(e,t);e=e.trim().split(/\s+/).join(" "),r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===A?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return v(t,e)},t.major=function(e,t){return new b(e,t).major},t.minor=function(e,t){return new b(e,t).minor},t.patch=function(e,t){return new b(e,t).patch},t.compare=w,t.compareLoose=function(e,t){return w(e,t,!0)},t.compareBuild=function(e,t,r){var n=new b(e,r),o=new b(t,r);return n.compare(o)||n.compareBuild(o)},t.rcompare=function(e,t,r){return w(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compareBuild(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.compareBuild(n,e,r)})},t.gt=E,t.lt=S,t.eq=O,t.neq=I,t.gte=T,t.lte=j,t.cmp=x,t.Comparator=R;var A={};function D(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof D)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new D(e.raw,t);if(e instanceof R)return new D(e.value,t);if(!(this instanceof D))return new D(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function N(e,t){for(var r=!0,n=e.slice(),o=n.pop();r&&n.length;)r=n.every(function(e){return o.intersects(e,t)}),o=n.pop();return r}function L(e){return!e||"x"===e.toLowerCase()||"*"===e}function k(e,t,r,n,o,i,s,a,c,l,u,f,p){return((t=L(r)?"":L(n)?">="+r+".0.0":L(o)?">="+r+"."+n+".0":">="+t)+" "+(a=L(c)?"":L(l)?"<"+(+c+1)+".0.0":L(u)?"<"+c+"."+(+l+1)+".0":f?"<="+c+"."+l+"."+u+"-"+f:"<="+a)).trim()}function C(e,t,n){for(var o=0;o0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function P(e,t,r){try{t=new D(t,r)}catch(e){return!1}return t.test(e)}function M(e,t,r,n){var o,i,s,a,c;switch(e=new b(e,n),t=new D(t,n),r){case">":o=E,i=j,s=S,a=">",c=">=";break;case"<":o=S,i=T,s=E,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(P(e,t,n))return!1;for(var l=0;l=0.0.0")),f=f||e,p=p||e,o(e.semver,f.semver,n)?f=e:s(e.semver,p.semver,n)&&(p=e)}),f.operator===a||f.operator===c)return!1;if((!p.operator||p.operator===a)&&i(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}R.prototype.parse=function(e){var t=this.options.loose?a[l.COMPARATORLOOSE]:a[l.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new b(r[2],this.options.loose):this.semver=A},R.prototype.toString=function(){return this.value},R.prototype.test=function(e){if(r("Comparator.test",e,this.options.loose),this.semver===A||e===A)return!0;if("string"==typeof e)try{e=new b(e,this.options)}catch(e){return!1}return x(e,this.operator,this.semver,this.options)},R.prototype.intersects=function(e,t){if(!(e instanceof R))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new D(e.value,t),P(this.value,r,t));if(""===e.operator)return""===e.value||(r=new D(this.value,t),P(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=x(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=x(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||o||i&&s||a||c},t.Range=D,D.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},D.prototype.toString=function(){return this.range},D.prototype.parseRange=function(e){var t=this.options.loose,n=t?a[l.HYPHENRANGELOOSE]:a[l.HYPHENRANGE];e=e.replace(n,k),r("hyphen replace",e),e=e.replace(a[l.COMPARATORTRIM],"$1$2$3"),r("comparator trim",e,a[l.COMPARATORTRIM]),e=(e=(e=e.replace(a[l.TILDETRIM],"$1~")).replace(a[l.CARETTRIM],"$1^")).split(/\s+/).join(" ");var o=t?a[l.COMPARATORLOOSE]:a[l.COMPARATOR],i=e.split(" ").map(function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t.loose?a[l.CARETLOOSE]:a[l.CARET];return e.replace(n,function(t,n,o,i,s){var a;return r("caret",e,t,n,o,i,s),L(n)?a="":L(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":L(i)?a="0"===n?">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":">="+n+"."+o+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===o?">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===o?">="+n+"."+o+"."+i+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+" <"+(+n+1)+".0.0"),r("caret return",a),a})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t.loose?a[l.TILDELOOSE]:a[l.TILDE];return e.replace(n,function(t,n,o,i,s){var a;return r("tilde",e,t,n,o,i,s),L(n)?a="":L(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":L(i)?a=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0"):a=">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0",r("tilde return",a),a})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t.loose?a[l.XRANGELOOSE]:a[l.XRANGE];return e.replace(n,function(n,o,i,s,a,c){r("xRange",e,n,o,i,s,a,c);var l=L(i),u=l||L(s),f=u||L(a),p=f;return"="===o&&p&&(o=""),c=t.includePrerelease?"-0":"",l?n=">"===o||"<"===o?"<0.0.0-0":"*":o&&p?(u&&(s=0),a=0,">"===o?(o=">=",u?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):"<="===o&&(o="<",u?i=+i+1:s=+s+1),n=o+i+"."+s+"."+a+c):u?n=">="+i+".0.0"+c+" <"+(+i+1)+".0.0"+c:f&&(n=">="+i+"."+s+".0"+c+" <"+i+"."+(+s+1)+".0"+c),r("xRange return",n),n})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[l.STAR],"")}(e,t),r("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(i=i.filter(function(e){return!!e.match(o)})),i=i.map(function(e){return new R(e,this.options)},this)},D.prototype.intersects=function(e,t){if(!(e instanceof D))throw new TypeError("a Range is required");return this.set.some(function(r){return N(r,t)&&e.set.some(function(e){return N(e,t)&&r.every(function(r){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new D(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},D.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new b(e,this.options)}catch(e){return!1}for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!E(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new D(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return M(e,t,"<",r)},t.gtr=function(e,t,r){return M(e,t,">",r)},t.outside=M,t.prerelease=function(e,t){var r=g(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new D(e,r),t=new D(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof b)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=a[l.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),a[l.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;a[l.COERCERTL].lastIndex=-1}else r=e.match(a[l.COERCE]);if(null===r)return null;return g(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,gf.exports);var bf=re(gf.exports);function yf(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var vf=ec,wf=gt,Ef=Nr,Sf=Ls;Zo({target:"Iterator",proto:!0,real:!0},{find:function(e){Ef(this),wf(e);var t=Sf(this),r=0;return vf(t,function(t,n){if(e(t,r++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}});const Of=(e,t)=>{const r=If(e);if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},If=e=>e instanceof URL?w(e):e,Tf=(e,t=[],r={})=>{const n=Of(e,"First argument"),[o,i]=yf(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!yf(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]};var jf=Oe,xf=Set.prototype,Rf={Set:Set,add:jf(xf.add),has:jf(xf.has),remove:jf(xf.delete),proto:xf},Af=Rf.has,Df=function(e){return Af(e),e},Nf=fe,Lf=function(e,t,r){for(var n,o,i=r?e:e.iterator,s=e.next;!(n=Nf(s,i)).done;)if(void 0!==(o=t(n.value)))return o},kf=Oe,Cf=Lf,Pf=Rf.Set,Mf=Rf.proto,_f=kf(Mf.forEach),$f=kf(Mf.keys),Bf=$f(new Pf).next,Ff=function(e,t,r){return r?Cf({iterator:$f(e),next:Bf},t):_f(e,t)},Uf=Ff,Gf=Rf.Set,Wf=Rf.add,zf=function(e){var t=new Gf;return Uf(e,function(e){Wf(t,e)}),t},Vf=Oe,Hf=gt,Xf=function(e,t,r){try{return Vf(Hf(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},qf=Xf(Rf.proto,"size","get")||function(e){return e.size},Kf=gt,Yf=Nr,Qf=fe,Jf=ro,Zf=Ls,ep="Invalid size",tp=RangeError,rp=TypeError,np=Math.max,op=function(e,t){this.set=e,this.size=np(t,0),this.has=Kf(e.has),this.keys=Kf(e.keys)};op.prototype={getIterator:function(){return Zf(Yf(Qf(this.keys,this.set)))},includes:function(e){return Qf(this.has,this.set,e)}};var ip=function(e){Yf(e);var t=+e.size;if(t!=t)throw new rp(ep);var r=Jf(t);if(r<0)throw new tp(ep);return new op(e,r)},sp=Df,ap=zf,cp=qf,lp=ip,up=Ff,fp=Lf,pp=Rf.has,dp=Rf.remove,hp=He,mp=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},gp=function(e){var t=hp("Set");try{(new t)[e](mp(0));try{return(new t)[e](mp(-1)),!1}catch(e){return!0}}catch(e){return!1}},bp=function(e){var t=sp(this),r=lp(e),n=ap(t);return cp(t)<=r.size?up(t,function(e){r.includes(e)&&dp(n,e)}):fp(r.getIterator(),function(e){pp(t,e)&&dp(n,e)}),n};Zo({target:"Set",proto:!0,real:!0,forced:!gp("difference")},{difference:bp});var yp=Df,vp=qf,wp=ip,Ep=Ff,Sp=Lf,Op=Rf.Set,Ip=Rf.add,Tp=Rf.has,jp=se,xp=function(e){var t=yp(this),r=wp(e),n=new Op;return vp(t)>r.size?Sp(r.getIterator(),function(e){Tp(t,e)&&Ip(n,e)}):Ep(t,function(e){r.includes(e)&&Ip(n,e)}),n};Zo({target:"Set",proto:!0,real:!0,forced:!gp("intersection")||jp(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:xp});var Rp=Df,Ap=Rf.has,Dp=qf,Np=ip,Lp=Ff,kp=Lf,Cp=_s,Pp=function(e){var t=Rp(this),r=Np(e);if(Dp(t)<=r.size)return!1!==Lp(t,function(e){if(r.includes(e))return!1},!0);var n=r.getIterator();return!1!==kp(n,function(e){if(Ap(t,e))return Cp(n,"normal",!1)})};Zo({target:"Set",proto:!0,real:!0,forced:!gp("isDisjointFrom")},{isDisjointFrom:Pp});var Mp=Df,_p=qf,$p=Ff,Bp=ip,Fp=function(e){var t=Mp(this),r=Bp(e);return!(_p(t)>r.size)&&!1!==$p(t,function(e){if(!r.includes(e))return!1},!0)};Zo({target:"Set",proto:!0,real:!0,forced:!gp("isSubsetOf")},{isSubsetOf:Fp});var Up=Df,Gp=Rf.has,Wp=qf,zp=ip,Vp=Lf,Hp=_s,Xp=function(e){var t=Up(this),r=zp(e);if(Wp(t)92||kd&&Dd>94||Nd&&Dd>97)return!1;var e=new ArrayBuffer(8),t=Cd(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength}),Md=oe,_d=function(e){try{if(jd)return Function('return require("'+e+'")')()}catch(e){}},$d=Pd,Bd=Md.structuredClone,Fd=Md.ArrayBuffer,Ud=Md.MessageChannel,Gd=!1;if($d)Gd=function(e){Bd(e,{transfer:[e]})};else if(Fd)try{Ud||(yd=_d("worker_threads"))&&(Ud=yd.MessageChannel),Ud&&(vd=new Ud,wd=new Fd(2),Ed=function(e){vd.port1.postMessage(null,[e])},2===wd.byteLength&&(Ed(wd),0===wd.byteLength&&(Gd=Ed)))}catch(e){}var Wd=oe,zd=Oe,Vd=Xf,Hd=function(e){if(void 0===e)return 0;var t=Sd(e),r=Od(t);if(t!==r)throw new Id("Wrong length or index");return r},Xd=dd,qd=ud,Kd=Gd,Yd=Pd,Qd=Wd.structuredClone,Jd=Wd.ArrayBuffer,Zd=Wd.DataView,eh=Wd.TypeError,th=Math.min,rh=Jd.prototype,nh=Zd.prototype,oh=zd(rh.slice),ih=Vd(rh,"resizable","get"),sh=Vd(rh,"maxByteLength","get"),ah=zd(nh.getInt8),ch=zd(nh.setInt8),lh=(Yd||Kd)&&function(e,t,r){var n,o=qd(e),i=void 0===t?o:Hd(t),s=!ih||!ih(e);if(Xd(e))throw new eh("ArrayBuffer is detached");if(Yd&&(e=Qd(e,{transfer:[e]}),o===i&&(r||s)))return e;if(o>=i&&(!r||s))n=oh(e,0,i);else{var a=r&&!s&&sh?{maxByteLength:sh(e)}:void 0;n=new Jd(i,a);for(var c=new Zd(e),l=new Zd(n),u=th(i,o),f=0;f>6*t&63)};i+2"[object Uint8Array]"===$h.call(e),Fh=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Uh=new TextEncoder,Gh=e=>Uh.encode(e),Wh=new TextDecoder,zh=e=>Wh.decode(e),Vh=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new I(t),n=e.map(e=>"string"==typeof e?Gh(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},Hh=e=>1===e.length&&Bh(e[0])?e[0]:qh(Xh(e)),Xh=e=>e.map(e=>"string"==typeof e?Gh(e):e),qh=e=>{const t=new Uint8Array(Kh(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},Kh=e=>{let t=0;for(const r of e)t+=r.length;return t},Yh=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=Qh(o,e.raw[n]),c=em(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>tm(e)):[tm(l)];return em(c,u,a)},Qh=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=Jh.has(t[0]);for(let o=0,i=0;or||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],tm=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(yf(e)&&("stdout"in e||"isMaxBuffer"in e))return rm(e);if(e instanceof E||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},rm=({stdout:e})=>{if("string"==typeof e)return e;if(Bh(e))return zh(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};function nm(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;nim.includes(e),im=[N.stdin,N.stdout,N.stderr],sm=["stdin","stdout","stderr"],am=e=>sm[e]??`stdio[${e}]`,cm=(e,t)=>{const r=Array.from({length:lm(e)+1}),n=um(e[t],r,t);return bm(n,t)},lm=({stdio:e})=>Array.isArray(e)?Math.max(e.length,sm.length):sm.length,um=(e,t,r)=>yf(e)?fm(e,t,r):t.fill(e),fm=(e,t,r)=>{for(const n of Object.keys(e).sort(pm))for(const o of hm(n,r,t))t[o]=e[n];return t},pm=(e,t)=>dm(e)"stdout"===e||"stderr"===e?0:"all"===e?2:1,hm=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=mm(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},mm=e=>{if("all"===e)return e;if(sm.includes(e))return sm.indexOf(e);const t=gm.exec(e);return null!==t?Number(t[1]):void 0},gm=/^fd(\d+)$/,bm=(e,t)=>e.map(e=>void 0===e?ym[t]:e),ym={lines:!1,buffer:!0,maxBuffer:1e8,verbose:T("execa").enabled?"full":"none",stripFinalNewline:!0},vm=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],wm=(e,t)=>"ipc"===t?e.at(-1):e[t],Em=({verbose:e},t)=>"none"!==Om(e,t),Sm=({verbose:e},t)=>!["none","short"].includes(Om(e,t)),Om=(e,t)=>void 0===t?Im(e):wm(e,t),Im=e=>e.find(e=>Tm(e))??jm.findLast(t=>e.includes(t)),Tm=e=>"function"==typeof e,jm=["none","short","full"],xm=e=>j(e).split("\n").map(e=>Rm(e)).join("\n"),Rm=e=>e.replaceAll(Dm,e=>Am(e)),Am=e=>{const t=Nm[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=Lm?`\\u${n.padStart(4,"0")}`:`\\U${n}`},Dm=/\p{Separator}|\p{Other}/gu,Nm={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Lm=65535,km=e=>Cm.test(e)?e:"win32"===L?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,Cm=/^[\w./-]+$/;const Pm={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},Mm={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},_m=Object.assign(Object.assign({},Pm),Mm),$m=Object.assign(Object.assign({},Pm),{tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"}),Bm=("win32"!==N.platform?"linux"!==N.env.TERM:Boolean(N.env.WT_SESSION)||Boolean(N.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===N.env.ConEmuTask||"Terminus-Sublime"===N.env.TERM_PROGRAM||"vscode"===N.env.TERM_PROGRAM||"xterm-256color"===N.env.TERM||"alacritty"===N.env.TERM||"JetBrains-JediTerm"===N.env.TERMINAL_EMULATOR)?_m:$m;Object.entries(Mm);const Fm=M?.WriteStream?.prototype?.hasColors?.()??!1,Um=(e,t)=>{if(!Fm)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const t=e+"";let o=t.indexOf(n);if(-1===o)return r+t+n;let i=r,s=0;for(;-1!==o;)i+=t.slice(s,o)+r,s=o+n.length,o=t.indexOf(n,s);return i+=t.slice(s)+n,i}},Gm=Um(1,22),Wm=Um(90,39),zm=Um(91,39),Vm=Um(93,39),Hm=e=>`${Xm(e.getHours(),2)}:${Xm(e.getMinutes(),2)}:${Xm(e.getSeconds(),2)}.${Xm(e.getMilliseconds(),3)}`,Xm=(e,t)=>String(e).padStart(t,"0"),qm=({failed:e,reject:t})=>e?t?Bm.cross:Bm.warning:Bm.tick,Km={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:qm,duration:qm},Ym=e=>e,Qm={command:()=>Gm,output:()=>Ym,ipc:()=>Ym,error:({reject:e})=>e?zm:Vm,duration:()=>Wm},Jm=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=Om(e,t);return Tm(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>Zm(e,t,n)).filter(e=>void 0!==e).map(e=>eg(e)).join("")},Zm=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},eg=e=>e.endsWith("\n")?e:`${e}\n`,tg=["piped"],rg=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=ng({type:e,result:o,verboseInfo:n}),s=og(t,i),a=Jm(s,n,r);f(sg,a)},ng=e=>{let{type:t,result:r,verboseInfo:{escapedCommand:n,commandId:o,rawOptions:{piped:i=!1}}}=e,s=nm(e.verboseInfo.rawOptions,tg);return{type:t,escapedCommand:n,commandId:`${o}`,timestamp:new Date,piped:i,result:r,options:s}},og=(e,t)=>e.split("\n").map(e=>ig(Object.assign(Object.assign({},t),{},{message:e}))),ig=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=Hm(r),c=Km[e]({failed:i,reject:s,piped:n}),l=Qm[e]({reject:s});return`${Wm(`[${a}]`)} ${Wm(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),sg=2,ag=e=>{const t="string"==typeof e?e:x(e);return xm(t).replaceAll("\t"," ".repeat(cg))},cg=2,lg=e=>Em({verbose:e})?ug++:void 0;let ug=0n;const fg=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!jm.includes(t)&&!Tm(t)){const e=jm.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},pg=()=>k.bigint(),dg=e=>Number(k.bigint()-e)/1e6,hg=(e,t,r)=>{const n=pg(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>km(Rm(e))).join(" ")}})(e,t),s=((e,t,r)=>(fg(e),{verbose:e,escapedCommand:t,commandId:lg(e),rawOptions:r}))(cm(r,"verbose"),i,Object.assign({},r));return((e,t)=>{Em(t)&&rg({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var mg,gg,bg,yg,vg,wg={exports:{}};vg="win32"===process.platform||te.TESTING_WINDOWS?function(){if(gg)return mg;gg=1,mg=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;nObject.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Rg=(e,t)=>{const r=t.colon||Tg,n=e.match(/\//)||Og&&e.match(/\\/)?[""]:[...Og?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=Og?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=Og?o.split(r):[""];return Og&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},Ag=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=Rg(e,t),s=[],a=r=>new Promise((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(xg(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=Ig.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(c(f,r,0))}),c=(e,r,n)=>new Promise((l,u)=>{if(n===o.length)return l(a(r+1));const f=o[n];jg(e+f,{pathExt:i},(o,i)=>{if(!o&&i){if(!t.all)return l(e+f);s.push(e+f)}return l(c(e,r,n+1))})});return r?a(0).then(e=>r(null,e),r):a(0)};var Dg=Ag;Ag.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=Rg(e,t),i=[];for(let s=0;s{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};Ng.exports=Lg,Ng.exports.default=Lg;var kg=Ng.exports;re(kg);const Cg=r,Pg=Dg,Mg=kg;function _g(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(e){}let s;try{s=Pg.sync(e.command,{path:r[Mg({env:r})],pathExt:t?Cg.delimiter:void 0})}catch(e){}finally{i&&process.chdir(n)}return s&&(s=Cg.resolve(o?e.options.cwd:"",s)),s}var $g=function(e){return _g(e)||_g(e,!0)};re($g);var Bg={};const Fg=/([()\][%!^"`<>&|;, *?])/g;Bg.command=function(e){return e=e.replace(Fg,"^$1")},Bg.argument=function(e,t){return e=(e=`"${e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(Fg,"^$1"),t&&(e=e.replace(Fg,"^$1")),e};var Ug=/^#!(.*)/;re(Ug);const Gg=Ug;var Wg=(e="")=>{const t=e.match(Gg);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o};re(Wg);const zg=t,Vg=Wg;var Hg=function(e){const t=Buffer.alloc(150);let r;try{r=zg.openSync(e,"r"),zg.readSync(r,t,0,150,0),zg.closeSync(r)}catch(e){}return Vg(t.toString())};re(Hg);const Xg=r,qg=$g,Kg=Bg,Yg=Hg,Qg="win32"===process.platform,Jg=/\.(?:com|exe)$/i,Zg=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function eb(e){if(!Qg)return e;const t=function(e){e.file=qg(e);const t=e.file&&Yg(e.file);return t?(e.args.unshift(e.file),e.command=t,qg(e)):e.file}(e),r=!Jg.test(t);if(e.options.forceShell||r){const r=Zg.test(t);e.command=Xg.normalize(e.command),e.command=Kg.command(e.command),e.args=e.args.map(e=>Kg.argument(e,r));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}var tb=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:eb(n)};re(tb);const rb="win32"===process.platform;function nb(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function ob(e,t){return rb&&1===e&&!t.file?nb(t.original,"spawn"):null}var ib={hookChildProcess:function(e,t){if(!rb)return;const r=e.emit;e.emit=function(n,o){if("exit"===n){const n=ob(o,t);if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}},verifyENOENT:ob,verifyENOENTSync:function(e,t){return rb&&1===e&&!t.file?nb(t.original,"spawnSync"):null},notFoundError:nb};re(ib);const sb=s,ab=tb,cb=ib;function lb(e,t,r){const n=ab(e,t,r),o=sb.spawn(n.command,n.args,n.options);return cb.hookChildProcess(o,n),o}wg.exports=lb,wg.exports.spawn=lb,wg.exports.sync=function(e,t,r){const n=ab(e,t,r),o=sb.spawnSync(n.command,n.args,n.options);return o.error=o.error||cb.verifyENOENTSync(o.status,n),o},wg.exports._parse=ab,wg.exports._enoent=cb;var ub=re(wg.exports);function fb(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}const pb=["env"],db=(e,t)=>{let r;for(;r!==t;)e.push(a.join(t,"node_modules/.bin")),r=t,t=a.resolve(t,"..")},hb=(e,t,r)=>{const n=t instanceof URL?w(t):t;e.push(a.resolve(r,n,".."))},mb=(e={})=>{let{env:t=N.env}=e,r=nm(e,pb);t=Object.assign({},t);const n=fb({env:t});return r.path=t[n],t[n]=(({cwd:e=N.cwd(),path:t=N.env[fb()],preferLocal:r=!0,execPath:n=N.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?w(e):e,s=a.resolve(i),c=[];return r&&db(c,s),o&&hb(c,n,s),[...c,t].join(a.delimiter)})(r),t};class gb extends Error{}const bb=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,yb,{value:!0,writable:!1,enumerable:!1,configurable:!1})},yb=Symbol("isExecaError"),vb=e=>"[object Error]"===Object.prototype.toString.call(e);class wb extends Error{}bb(wb,wb.name);class Eb extends Error{}bb(Eb,Eb.name);const Sb=(e,t)=>({name:`SIGRT${t+1}`,number:Ob+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Ob=34,Ib=64,Tb=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],jb=()=>{const e=(()=>{const e=Ib-Ob+1;return Array.from({length:e},Sb)})();return[...Tb,...e].map(xb)},xb=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=F,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Rb=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Ab=(()=>{const e=jb();return Object.fromEntries(e.map(Rb))})(),Db=(e,t)=>{const r=Nb(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},Nb=(e,t)=>{const r=t.find(({name:t})=>F.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=jb(),t=Ib+1,r=Array.from({length:t},(t,r)=>Db(r,e));Object.assign({},...r)})();const Lb=e=>0===e?e:kb(e,"`subprocess.kill()`'s argument"),kb=(e,t)=>{if(Number.isInteger(e))return Cb(e,t);if("string"==typeof e)return Mb(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${_b()}`)},Cb=(e,t)=>{if(Pb.has(e))return Pb.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${_b()}`)},Pb=new Map(Object.entries(F.signals).reverse().map(([e,t])=>[t,e])),Mb=(e,t)=>{if(e in F.signals)return e;if(e.toUpperCase()in F.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${_b()}`)},_b=()=>`Available signal names: ${$b()}.\nAvailable signal numbers: ${Bb()}.`,$b=()=>Object.keys(F.signals).sort().map(e=>`'${e}'`).join(", "),Bb=()=>[...new Set(Object.values(F.signals).sort((e,t)=>e-t))].join(", "),Fb=e=>Ab[e].description,Ub=5e3,Gb=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=Wb(s,a,r);zb(l,n);const u=e(c);return Vb({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},Wb=(e,t,r)=>{const[n=r,o]=vb(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!vb(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:Lb(n),error:o}},zb=(e,t)=>{void 0!==e&&t.reject(e)},Vb=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&Hb({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},Hb=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await _(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},Xb=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},qb=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[Kb(e,t,n,o)],Kb=async(e,t,r,{signal:n})=>{throw await Xb(t,n),r.terminationReason??="cancel",e.kill(),t.reason},Yb=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{Qb(e,t,r),Jb(e,t,n)},Qb=(e,t,r)=>{if(!r)throw new Error(`${ny(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},Jb=(e,t,r)=>{if(!r)throw new Error(`${ny(e,t)} cannot be used: the ${iy(t)} has already exited or disconnected.`)},Zb=(e,t)=>new Error(`${ny("sendMessage",t)} failed when sending an acknowledgment response to the ${iy(t)}.`,{cause:e}),ey=({code:e,message:t})=>ty.has(e)||ry.some(e=>t.includes(e)),ty=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),ry=["could not be cloned","circular structure","call stack size exceeded"],ny=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${oy(t)}${e}(${r})`,oy=e=>e?"":"subprocess.",iy=e=>e?"parent process":"subprocess",sy=e=>{e.connected&&e.disconnect()},ay=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},cy=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=uy.get(e),i=fy(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(hy(i,t,n,r));return s},ly=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=uy.get(e),i=fy(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(hy(i,t,n,r));return s},uy=new WeakMap,fy=(e,t,r)=>{const n=py(t,r);return dy(n,t,r,e),n},py=(e,t)=>{const r=mm(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${by(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},dy=(e,t,r,n)=>{const o=n[gy(e)];if(void 0===o)throw new TypeError(`"${by(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${by(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${by(r)}" must not be ${t}. It must be a writable stream, not readable.`)},hy=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=my(e,r);return`The "${o}: ${yy(i)}" option is incompatible with using "${by(n)}: ${yy(t)}".\nPlease set this option with "pipe" instead.`},my=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=gy(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},gy=e=>"all"===e?1:e,by=e=>e?"to":"from",yy=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",vy=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},wy=(e,t)=>{t&&Ey(e)},Ey=e=>{e.refCounted()},Sy=(e,t)=>{t&&Oy(e)},Oy=e=>{e.unrefCounted()},Iy=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(Cy(o)||Jy(o))return;jy.has(e)||jy.set(e,[]);const i=jy.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await Fy(e,n,o),await $.yield();const s=await ky({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},Ty=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{ev();const i=jy.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(Ey(e),Ey(e))})(t,r),n.connected=!1,n.emit("disconnect")},jy=new WeakMap,xy=(e,t,r)=>{if(Ry.has(e))return Ry.get(e);const n=new W;return n.connected=!0,Ry.set(e,n),Ay({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Ry=new WeakMap,Ay=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=Iy.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",Ty.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(Oy(e),Oy(e))})(r,n)},Dy=e=>{const t=Ry.get(e);return void 0===t?null!==e.channel:t.connected};let Ny=0n;const Ly=(e,t)=>{if(t?.type===$y&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&My[t].resolve({isDeadlock:!0,hasListeners:!1})},ky=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==$y||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:By,message:Gy(t,o)};try{await zy({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},Cy=e=>{if(e?.type!==By)return!1;const{id:t,message:r}=e;return My[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},Py=async(e,t,r)=>{if(e?.type!==$y)return;const n=ay();My[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,_y(t,r,o)]);e&&(e=>{throw new Error(`${ny("sendMessage",e)} failed: the ${iy(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${ny("getOneMessage",e)},\n\t${ny("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${ny("sendMessage",e)} failed: the ${iy(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete My[e.id]}},My={},_y=async(e,t,{signal:r})=>{vy(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${ny("sendMessage",e)} failed: the ${iy(e)} exited without listening to incoming messages.`)})(t)},$y="execa:ipc:request",By="execa:ipc:response",Fy=async(e,t,r)=>{for(;!Gy(e,t)&&Uy.get(e)?.size>0;){const t=[...Uy.get(e)];Ly(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},Uy=new WeakMap,Gy=(e,t)=>t.listenerCount("message")>Wy(e),Wy=e=>uy.has(e)&&!wm(uy.get(e).options.buffer,"ipc")?1:0,zy=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return Yb({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),Vy({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},Vy=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=xy(e,t,r),s=Gy(e,i);return{id:Ny++,type:$y,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{Uy.has(e)||Uy.set(e,new Set);const n=Uy.get(e),o={onMessageSent:ay(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await Hy({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw sy(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},Hy=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=Xy(e);try{await Promise.all([Py(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${ny(t,r)} cannot be used: the ${iy(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(ey(e))throw new Error(`${ny(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},Xy=e=>{if(qy.has(e))return qy.get(e);const t=R(e.send.bind(e));return qy.set(e,t),t},qy=new WeakMap,Ky=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await Yy({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),tv.signal),Yy=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{Qy||(Qy=!0,n?null!==t?(xy(e,t,r),await $.yield()):ev():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let Qy=!1;const Jy=e=>e?.type===Zy&&(tv.abort(e.message),!0),Zy="execa:ipc:cancel",ev=()=>{tv.abort(new Error(`\`cancelSignal\` aborted: the ${iy(!0)} disconnected.`))},tv=new AbortController,rv=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[nv({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],nv=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await Xb(t,o);const i=ov(t);throw await((e,t)=>{const r="cancelSignal";return Jb(r,!1,e.connected),Hy({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:Zy,message:t},message:t})})(e,i),Hb({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},ov=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},iv=(e,t,r,n)=>0===t||void 0===t?[]:[sv(e,t,r,n)],sv=async(e,t,r,{signal:n})=>{throw await _(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new gb},av=["node","nodePath","nodeOptions","cwd","execPath"],cv={advanced:e=>{try{H(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},lv=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},uv=new Set(["utf8","utf16le"]),fv=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),pv=new Set([...uv,...fv]),dv=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in hv?hv[t]:pv.has(t)?t:void 0},hv={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},mv=e=>"string"==typeof e?`"${e}"`:String(e),gv=()=>{try{return N.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},bv=["extendEnv","preferLocal","cwd","localDir","encoding","reject","cleanup","all","windowsHide","killSignal","forceKillAfterDelay","gracefulCancel","ipcInput","ipc","serialization"],yv=(e,t,r)=>{r.cwd=((e=gv())=>{const t=Of(e,'The "cwd" option');return c(t)})(r.cwd);const[n,o,i]=((e,t,r)=>{let{node:n=!1,nodePath:o=C,nodeOptions:i=P.filter(e=>!e.startsWith("--inspect")),cwd:s,execPath:a}=r,u=nm(r,av);if(void 0!==a)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const f=Of(o,'The "nodePath" option'),p=c(s,f),d=Object.assign(Object.assign({},u),{},{nodePath:p,node:n,cwd:s});if(!n)return[e,t,d];if("node"===l(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[p,[...i,e,...t],Object.assign(Object.assign({ipc:!0},d),{},{shell:!1})]})(e,t,r),{command:s,args:a,options:u}=ub._parse(n,o,i),f=(e=>{const t=Object.assign({},e);for(const r of vm)t[r]=cm(e,r);return t})(u),p=vv(f);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(p),(({encoding:e})=>{if(pv.has(e))return;const t=dv(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${mv(e)}\`.\nPlease rename it to ${mv(t)}.`);const r=[...pv].map(e=>mv(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${mv(e)}\`.\nPlease rename it to one of: ${r}.`)})(p),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");cv[r](e)}})(p),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(p),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(p),p.shell=If(p.shell),p.env=wv(p),p.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return kb(e,t)})(p.killSignal),p.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return Ub;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(p.forceKillAfterDelay),p.lines=p.lines.map((e,t)=>e&&!fv.has(p.encoding)&&p.buffer[t]),"win32"===N.platform&&"cmd"===l(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:p}},vv=e=>{let{extendEnv:t=!0,preferLocal:r=!1,cwd:n,localDir:o=n,encoding:i="utf8",reject:s=!0,cleanup:a=!0,all:c=!1,windowsHide:l=!0,killSignal:u="SIGTERM",forceKillAfterDelay:f=!0,gracefulCancel:p=!1,ipcInput:d,ipc:h=void 0!==d||p,serialization:m="advanced"}=e,g=nm(e,bv);return Object.assign(Object.assign({},g),{},{extendEnv:t,preferLocal:r,cwd:n,localDirectory:o,encoding:i,reject:s,cleanup:a,all:c,windowsHide:l,killSignal:u,forceKillAfterDelay:f,gracefulCancel:p,ipcInput:d,ipc:h,serialization:m})},wv=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?Object.assign(Object.assign({},N.env),e):e;return r||n?mb({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s};function Ev(e){if("string"==typeof e)return Sv(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return Ov(e)}const Sv=e=>e.at(-1)===Iv?e.slice(0,e.at(-2)===jv?-2:-1):e,Ov=e=>e.at(-1)===Tv?e.subarray(0,e.at(-2)===xv?-2:-1):e,Iv="\n",Tv=Iv.codePointAt(0),jv="\r",xv=jv.codePointAt(0);function Rv(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function Av(e,{checkOpen:t=!0}={}){return Rv(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Dv(e,{checkOpen:t=!0}={}){return Rv(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function Nv(e,t){return Av(e,t)&&Dv(e,t)}const Lv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class kv{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const Cv=Symbol();function Pv(){return this[Cv].next()}function Mv(e){return this[Cv].return(e)}Object.defineProperty(Pv,"name",{value:"next"}),Object.defineProperty(Mv,"name",{value:"return"});const _v=Object.create(Lv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Pv},return:{enumerable:!0,configurable:!0,writable:!0,value:Mv}});function $v({preventCancel:e=!1}={}){const t=this.getReader(),r=new kv(t,e),n=Object.create(_v);return n[Cv]=r,n}const Bv=e=>{if(Dv(e,{checkOpen:!1})&&void 0!==Wv.on)return Uv(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===Fv.call(e))return $v.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Fv}=Object.prototype,Uv=async function*(e){const t=new AbortController,r={};Gv(e,t,r);try{for await(const[r]of Wv.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},Gv=async(e,t,r)=>{try{await Wv.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},Wv={},zv=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=Bv(e),u=t();u.length=0;try{for await(const e of l){const t=r[qv(e)](e,u);Hv({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return Vv({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},Vv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&Hv({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},Hv=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void Xv(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&Xv(c,t,o,i),new Yv},Xv=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},qv=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=Kv.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===Kv.call(e.buffer)?"typedArray":"others"},{toString:Kv}=Object.prototype;class Yv extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const Qv=e=>e,Jv=()=>{},Zv=({contents:e})=>e,ew=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},tw=e=>e.length;const rw={init:()=>({contents:[]}),convertChunk:{string:Qv,buffer:Qv,arrayBuffer:Qv,dataView:Qv,typedArray:Qv,others:Qv},getSize:()=>1,truncateChunk:Jv,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:Jv,finalize:Zv};const nw=new TextEncoder,ow=e=>new Uint8Array(e),iw=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),sw=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(cw(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},aw=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:cw(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},cw=e=>lw**Math.ceil(Math.log(e)/Math.log(lw)),lw=2,uw=()=>"resize"in ArrayBuffer.prototype,fw={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>nw.encode(e),buffer:ow,arrayBuffer:ow,dataView:iw,typedArray:iw,others:ew},getSize:tw,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=uw()?aw(t,n):sw(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:Jv,finalize:({contents:e,length:t})=>uw()?e:e.slice(0,t)};const pw=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),dw={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:Qv,buffer:pw,arrayBuffer:pw,dataView:pw,typedArray:pw,others:ew},getSize:tw,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:Zv},hw=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",mw=(e,t,r)=>{if(t.length!==r)return;const n=new Yv;throw n.maxBufferInfo={fdNumber:"ipc"},n},gw=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=wm(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:am(r),threshold:o,unit:n}},bw=([,e])=>e,yw=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:f,forceKillAfterDelay:p,killSignal:d})=>{const h=vw(f,p);return t?`Command timed out after ${r} milliseconds${h}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${h}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${h}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=gw(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${h}`:void 0!==i?`Command failed with ${i}${h}`:f?`Command was killed with ${d} (${Fb(d)})${h}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},vw=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",ww=(e,t)=>{if(e instanceof gb)return;const r=vb(n=e)&&yb in n?e.originalMessage:String(e?.message??e);var n;const o=xm(((e,t)=>{if(t===gv())return e;let r;try{r=p(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===o?void 0:o},Ew=e=>"string"==typeof e?e:x(e),Sw=e=>Array.isArray(e)?e.map(e=>Ev(Ow(e))).filter(Boolean).join("\n"):Ow(e),Ow=e=>"string"==typeof e?e:Bh(e)?zh(e):"",Iw=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>Rw({command:e,escapedCommand:t,cwd:i,durationMs:dg(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),Tw=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>jw({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),jw=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:f,all:p,ipcOutput:d,options:{timeoutDuration:h,timeout:m=h,forceKillAfterDelay:g,killSignal:b,cwd:y,maxBuffer:v},isSync:w})=>{const{exitCode:E,signal:S,signalDescription:O}=Aw(l,u),{originalMessage:I,shortMessage:T,message:j}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:f,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:h,maxBuffer:m,timeout:g,cwd:b})=>{const y=n?.code,v=yw({originalError:n,timedOut:c,timeout:g,isMaxBuffer:f,maxBuffer:m,errorCode:y,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:h}),w=ww(n,b),E=`${v}: ${a}${void 0===w?"":`\n${w}`}`,S=[E,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>Ew(e)).join("\n")].map(e=>xm(Ev(Sw(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:E,message:S}})({stdio:f,all:p,ipcOutput:d,originalError:e,signal:S,signalDescription:O,exitCode:E,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:b,maxBuffer:v,timeout:m,cwd:y}),x=((e,t,r)=>new(r?Eb:wb)(t,e instanceof gb?{}:{cause:e}))(e,j,w);return Object.assign(x,xw({error:x,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:E,signal:S,signalDescription:O,stdio:f,all:p,ipcOutput:d,cwd:y,originalMessage:I,shortMessage:T})),x},xw=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:f,stdio:p,all:d,ipcOutput:h,cwd:m,originalMessage:g,shortMessage:b})=>Rw({shortMessage:b,originalMessage:g,command:t,escapedCommand:r,cwd:m,durationMs:dg(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:f,code:e.cause?.code,stdout:p[1],stderr:p[2],all:d,stdio:p,ipcOutput:h,pipedFrom:[]}),Rw=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),Aw=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:Fb(t)}},Dw=e=>Number.isFinite(e)?e:0;function Nw(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(Dw(1e3*e)%1e3),nanoseconds:Math.trunc(Dw(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function Lw(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");(t=Object.assign({},t)).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let n=[];const o=(e,r,o,i)=>{if(0!==n.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===o){if(i=i??String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=n.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):o;n.push(i)}},i=Nw(e),s=BigInt(i.days);if(o(s/365n,"year","y"),o(s%365n,"day","d"),o(Number(i.hours),"hour","h"),o(Number(i.minutes),"minute","m"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const e=Number(i.seconds),r=Number(i.milliseconds),n=Number(i.microseconds),s=Number(i.nanoseconds);if(o(e,"second","s"),t.formatSubMilliseconds)o(r,"millisecond","ms"),o(n,"microsecond","µs"),o(s,"nanosecond","ns");else{const e=r+n/1e3+s/1e6,i="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=i?e.toFixed(i):a;o(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),i=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");o(Number.parseFloat(i),"second","s",i)}if(0===n.length)return"0"+(t.verbose?" milliseconds":"ms");const a=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(n=n.slice(0,Math.max(t.unitCount,1))),n.join(a)}const kw=(e,t)=>{Em(t)&&(((e,t)=>{e.failed&&rg({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),Cw(e,t))},Cw=(e,t)=>{const r=`(done in ${Lw(e.durationMs)})`;rg({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},Pw=(e,t,{reject:r})=>{if(kw(e,t),e.failed&&r)throw e;return e},Mw=(e,t)=>Vw(e)?"asyncGenerator":Hw(e)?"generator":qw(e)?"fileUrl":Kw(e)?"filePath":eE(e)?"webStream":Rv(e,{checkOpen:!1})?"native":Bh(e)?"uint8Array":rE(e)?"asyncIterable":nE(e)?"iterable":tE(e)?Bw({transform:e},t):Xw(e)?_w(e,t):"native",_w=(e,t)=>Nv(e.transform,{checkOpen:!1})?$w(e,t):tE(e.transform)?Bw(e,t):Gw(e,t),$w=(e,t)=>(Fw(e,t,"Duplex stream"),"duplex"),Bw=(e,t)=>(Fw(e,t,"web TransformStream"),"webTransform"),Fw=({final:e,binary:t,objectMode:r},n,o)=>{Uw(e,`${n}.final`,o),Uw(t,`${n}.binary`,o),Ww(r,`${n}.objectMode`)},Uw=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},Gw=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!zw(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(Nv(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(tE(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!zw(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return Ww(r,`${o}.binary`),Ww(n,`${o}.objectMode`),Vw(e)||Vw(t)?"asyncGenerator":"generator"},Ww=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},zw=e=>Vw(e)||Hw(e),Vw=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),Hw=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),Xw=e=>yf(e)&&(void 0!==e.transform||void 0!==e.final),qw=e=>"[object URL]"===Object.prototype.toString.call(e),Kw=e=>yf(e)&&1===Object.keys(e).length&&Yw(e.file),Yw=e=>"string"==typeof e,Qw=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Jw=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),Zw=e=>"[object WritableStream]"===Object.prototype.toString.call(e),eE=e=>Jw(e)||Zw(e),tE=e=>Jw(e?.readable)&&Zw(e?.writable),rE=e=>oE(e)&&"function"==typeof e[Symbol.asyncIterator],nE=e=>oE(e)&&"function"==typeof e[Symbol.iterator],oE=e=>"object"==typeof e&&null!==e,iE=new Set(["generator","asyncGenerator","duplex","webTransform"]),sE=new Set(["fileUrl","filePath","fileNumber"]),aE=new Set(["fileUrl","filePath"]),cE=new Set([...aE,"webStream","nodeStream"]),lE=new Set(["webTransform","duplex"]),uE={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},fE=(e,t,r,n)=>"output"===n?pE(e,t,r):dE(e,t,r),pE=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},dE=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},hE=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>iE.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=mE({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return vE(i,r)},mE=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?gE({stdioItem:e,optionName:o}):"webTransform"===t?bE({stdioItem:e,index:r,newTransforms:n,direction:i}):yE({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),gE=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return Object.assign(Object.assign({},e),{},{value:{transform:t,writableObjectMode:r,readableObjectMode:n}})},bE=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=yf(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=fE(s,r,n,o);return Object.assign(Object.assign({},e),{},{value:{transform:i,writableObjectMode:a,readableObjectMode:c}})},yE=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=yf(t)?t:{transform:t},f=c||fv.has(i),{writableObjectMode:p,readableObjectMode:d}=fE(u,r,n,o);return Object.assign(Object.assign({},e),{},{value:{transform:s,final:a,binary:f,preserveNewlines:l,writableObjectMode:p,readableObjectMode:d}})},vE=(e,t)=>"input"===t?e.reverse():e,wE=({type:e,value:t},r)=>EE[r]??IE[e](t),EE=["input","output","output"],SE=()=>{},OE=()=>"input",IE={generator:SE,asyncGenerator:SE,fileUrl:SE,filePath:SE,iterable:OE,asyncIterable:OE,uint8Array:OE,webStream:e=>Zw(e)?"output":"input",nodeStream:e=>Dv(e,{checkOpen:!1})?Av(e,{checkOpen:!1})?void 0:"input":"output",webTransform:SE,duplex:SE,native(e){const t=TE(e);return void 0!==t?t:Rv(e,{checkOpen:!1})?IE.nodeStream(e):void 0}},TE=e=>[0,N.stdin].includes(e)?"input":[1,2,N.stdout,N.stderr].includes(e)?"output":void 0,jE="output",xE=["stdio","ipc","buffer"],RE=(e,t)=>{if(void 0===e)return sm.map(e=>t[e]);if(AE(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${sm.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,sm.length);return Array.from({length:r},(t,r)=>e[r])},AE=e=>sm.some(t=>void 0!==e[t]),DE=(e,t)=>Array.isArray(e)?e.map(e=>DE(e,t)):null==e?t>=sm.length?"ignore":"pipe":e,NE=(e,t,r)=>e.map((e,n)=>t[n]||0===n||Sm(r,n)||!LE(e)?e:"ignore"),LE=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),kE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=CE({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(Rv(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},CE=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=PE(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if(M.isatty(o))throw new TypeError(`The \`${t}: ${yy(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Fh(d(o)),optionName:t}}},PE=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=im.indexOf(e);return-1!==r?r:void 0},ME=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:_E(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:_E(t,t,r),optionName:r}:Rv(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,_E=(e,t,r)=>{const n=im[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},$E=({input:e,inputFile:t},r)=>0===r?[...BE(e),...UE(t)]:[],BE=e=>void 0===e?[]:[{type:FE(e),value:e,optionName:"input"}],FE=e=>{if(Dv(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(Bh(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},UE=e=>void 0===e?[]:[Object.assign(Object.assign({},GE(e)),{},{optionName:"inputFile"})],GE=e=>{if(qw(e))return{type:"fileUrl",value:e};if(Yw(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var WE=fe,zE=Nr,VE=Ls,HE=Ca,XE=Zo,qE=fe,KE=gt,YE=Nr,QE=Ls,JE=function(e,t){t&&"string"==typeof e||zE(e);var r=HE(e);return VE(zE(void 0!==r?WE(r,e):e))},ZE=_s,eS=ea(function(){for(var e,t,r=this.iterator,n=this.mapper;;){if(t=this.inner)try{if(!(e=YE(qE(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){ZE(r,"throw",e)}if(e=YE(qE(this.next,r)),this.done=!!e.done)return;try{this.inner=JE(n(e.value,this.counter++),!1)}catch(e){ZE(r,"throw",e)}}});XE({target:"Iterator",proto:!0,real:!0,forced:false},{flatMap:function(e){return YE(this),KE(e),new eS(QE(this),{mapper:e,inner:null})}});const tS=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>Object.assign(Object.assign({},t),{},{direction:e}))),rS=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{aE.has(t)&&nS({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},nS=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>oS(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return sS(s,n,t),"output"===o?i[0].stream:void 0},oS=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,iS=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);sS(o,n,t)},sS=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${uE[r]} that is the same.`)},aS=(e,t,r,n)=>{const o=((e,t,r)=>{let{stdio:n,ipc:o,buffer:i}=e,s=nm(e,xE);const a=RE(n,s).map((e,t)=>DE(e,t));return r?NE(a,i,t):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(a,o)})(t,r,n),i=o.map((e,r)=>cS({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=gS({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>wS(e)),s},cS=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=am(t),{stdioItems:i,isStdioArray:s}=lS({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>wE(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??jE})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?kE({stdioItem:e,fdNumber:n,direction:o}):ME({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!iE.has(e)),...hE(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>iE.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return mS(l,u),{direction:a,objectMode:u,stdioItems:l}},lS=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>uS(e,n)),...$E(r,t)]),i=o.length>1;return fS(o,i,n),dS(o),{stdioItems:o,isStdioArray:i}},uS=(e,t)=>({type:Mw(e,t),value:e,optionName:t}),fS=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(pS.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},pS=new Set(["ignore","ipc"]),dS=e=>{for(const t of e)hS(t)},hS=({type:e,value:t,optionName:r})=>{if((e=>qw(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!Qw.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},mS=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>sE.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},gS=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(bS({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw vS(o),e}},bS=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>yS({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},yS=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=tS(o,e);if(0!==s.length){if(!i)return cE.has(e)?nS({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(lE.has(e)&&iS({otherStdioItems:s,type:e,value:t,optionName:r}));rS({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?Object.assign(Object.assign({},e),{},{stream:s}):Object.assign(Object.assign({},e),t[r][e.type](e,n))},vS=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||om(e)||e.destroy()},wS=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},ES=({type:e,optionName:t})=>{SS(t,uE[e])},SS=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},OS={generator(){},asyncGenerator:ES,webStream:ES,nodeStream:ES,webTransform:ES,duplex:ES,asyncIterable:ES,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||SS(e,`"${t}"`),{})},IS={input:Object.assign(Object.assign({},OS),{},{fileUrl:({value:e})=>({contents:[Fh(d(e))]}),filePath:({value:{file:e}})=>({contents:[Fh(d(e))]}),fileNumber:ES,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})}),output:Object.assign(Object.assign({},OS),{},{fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e}})=>({path:e}),fileNumber:({value:e})=>({path:e}),iterable:ES,string:ES,uint8Array:ES})},TS=(e,{stripFinalNewline:t},r)=>jS(t,r)&&void 0!==e&&!Array.isArray(e)?Ev(e):e,jS=(e,t)=>"all"===t?e[1]||e[2]:e[t],xS=(e,t,r,n)=>e||r?void 0:DS(t,n),RS=(e,t,r)=>r?e.flatMap(e=>AS(e,t)):AS(e,t),AS=(e,t)=>{const{transform:r,final:n}=DS(t,{});return[...r(e),...n()]},DS=(e,t)=>(t.previousChunks="",{transform:NS.bind(void 0,t,e),final:kS.bind(void 0,t)}),NS=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i0&&(a=MS(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=MS(n,r.slice(o+1))),e.previousChunks=n},LS=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),kS=function*({previousChunks:e}){e.length>0&&(yield e)},CS=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:PS.bind(void 0,n)},PS=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?_S:$S;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},MS=(e,t)=>`${e}${t}`,_S={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:MS},$S={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},BS=(e,t)=>e?void 0:FS.bind(void 0,t),FS=function*(e,t){if("string"!=typeof t&&!Bh(t)&&!Z.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},US=(e,t)=>e?GS.bind(void 0,t):WS.bind(void 0,t),GS=function*(e,t){zS(e,t),yield t},WS=function*(e,t){if(zS(e,t),"string"!=typeof t&&!Bh(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},zS=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},VS=(e,t,r)=>{if(r)return;if(e)return{transform:HS.bind(void 0,new TextEncoder)};const n=new I(t);return{transform:XS.bind(void 0,n),final:qS.bind(void 0,n)}},HS=function*(e,t){Z.isBuffer(t)?yield Fh(t):"string"==typeof t?yield e.encode(t):yield t},XS=function*(e,t){yield Bh(t)?e.write(t):t},qS=function*(e){const t=e.end();""!==t&&(yield t)},KS=A(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),YS=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=eO}=t[r];for await(const o of n(e))yield*YS(o,t,r+1)},QS=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*JS(r,Number(t),e)},JS=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*YS(n,r,t+1)},ZS=A(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),eO=function*(e){yield e},tO=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},rO=(e,t)=>[...t.flatMap(t=>[...nO(t,e,0)]),...oO(e)],nO=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=sO}=t[r];for(const o of n(e))yield*nO(o,t,r+1)},oO=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*iO(r,Number(t),e)},iO=function*(e,t,r){if(void 0!==e)for(const n of e())yield*nO(n,r,t+1)},sO=function*(e){yield e},aO=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=lO(e,s,i),l=Vw(t),u=Vw(r),f=l?KS.bind(void 0,YS,a):tO.bind(void 0,nO),p=l||u?KS.bind(void 0,QS,a):tO.bind(void 0,oO),d=l||u?ZS.bind(void 0,a):void 0;return{stream:new X({writableObjectMode:n,writableHighWaterMark:q(n),readableObjectMode:o,readableHighWaterMark:q(o),transform(e,t,r){f([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:d})}},cO=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=lO(t,r,n);e=rO(o,e)}return e},lO=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:BS(n,a)},VS(r,s,n),xS(r,i,n,c),{transform:e,final:t},{transform:US(o,a)},CS({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},uO=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),fO=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${uE[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>pO(e,n));r.input=Hh(i)},pO=(e,t)=>{const r=cO(e,t,"utf8",!0);return dO(r),Hh(r)},dO=e=>{const t=e.find(e=>"string"!=typeof e&&!Bh(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},hO=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&Sm(r,n)&&!fv.has(t)&&mO(n)&&(e.some(({type:e,value:t})=>"native"===e&&gO.has(t))||e.every(({type:e})=>iE.has(e))),mO=e=>1===e||2===e,gO=new Set(["pipe","overlapped"]),bO=e=>e._readableState.pipes.length>0,yO=(e,t,r)=>{const n=ag(e);rg({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},vO=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:f})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=bw(r);return e.length>n?e.slice(0,n):e})(e,i,f),d=Fh(p),{stdioItems:h,objectMode:m}=t[r],g=wO([d],h,c,n),{serializedResult:b,finalResult:y=b}=EO({chunks:g,objectMode:m,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});SO({serializedResult:b,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:h,objectMode:m});const v=a[r]?y:void 0;try{return void 0===n.error&&OO(b,h,o),v}catch(e){return n.error=e,v}},wO=(e,t,r,n)=>{try{return cO(e,t,r,!1)}catch(t){return n.error=t,e}},EO=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:Hh(e)};const s=((e,t)=>Vh(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:RS(s,!o[i],t)}:{serializedResult:s}},SO=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!hO({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=RS(e,!1,s);try{((e,t,r)=>{for(const n of e)yO(n,t,r)})(a,t,n)}catch(e){r.error??=e}},OO=(e,t,r)=>{for(const{path:n}of t.filter(({type:e})=>sE.has(e))){const t="string"==typeof n?n:n.toString();r.has(t)?h(n,e):(r.add(t),f(n,e))}},IO=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?TO(e):r.value},TO=async e=>{try{return await U(e,"exit")}catch{return TO(e)}},jO=async e=>{const[t,r]=await e;if(!xO(t,r)&&RO(t,r))throw new gb;return[t,r]},xO=(e,t)=>void 0===e&&void 0===t,RO=(e,t)=>0!==e||null!==t,AO=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=DO(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>bw(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},DO=(e,t,r)=>void 0!==e?e:RO(t,r)?new gb:void 0,NO=["encoding","maxBuffer"],LO=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=hg(e,t,r),a=kO(r),{file:c,commandArguments:l,options:u}=yv(e,t,a);CO(u);const f=((e,t)=>aS(IS,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:f}},kO=e=>e.node&&!e.ipc?Object.assign(Object.assign({},e),{},{ipc:!1}):e,CO=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&PO("ipcInput"),e&&PO("ipc: true"),r&&PO("detached: true"),n&&PO("cancelSignal")},PO=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},MO=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=_O({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:f,timedOut:p,isMaxBuffer:d}=AO(c,r),{output:h,error:m=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]),a=t.map((t,a)=>vO({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r));return Object.assign({output:a},i)})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:d,verboseInfo:i}),g=h.map((e,t)=>TS(e,r,t)),b=TS((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,TS(t,r,"all")]:Array.isArray(t)?[TS(e,r,"all"),...t]:Bh(e)&&Bh(t)?qh([e,t]):`${e}${t}`})(h,r),r,"all");return BO({error:m,exitCode:u,signal:f,timedOut:p,isMaxBuffer:d,stdio:g,all:b,options:r,command:n,escapedCommand:o,startTime:a})},_O=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of uO(e))fO(e,r,t)})(i,r);const n=$O(r);return S(e,t,n)}catch(e){return Tw({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},$O=e=>{let{encoding:t,maxBuffer:r}=e,n=nm(e,NO);return Object.assign(Object.assign({},n),{},{encoding:"buffer",maxBuffer:bw(r)})},BO=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?Iw({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):jw({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),FO=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(Yb({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Dy(e)}),UO({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),UO=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{wy(t,o);const i=xy(e,t,r),s=new AbortController;try{return await Promise.race([GO(i,n,s),WO(i,r,s),zO(i,r,s)])}catch(t){throw sy(e),t}finally{s.abort(),Sy(t,o)}},GO=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of z(e,"message",{signal:r}))if(t(n))return n},WO=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${ny("getOneMessage",e)} could not complete: the ${iy(e)} exited or disconnected.`)})(t)},zO=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw Zb(n,t)},VO=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>HO({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),HO=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{Yb({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Dy(e)}),wy(t,i);const s=xy(e,t,r),a=new AbortController,c={};return XO(e,s,a),qO({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),KO({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},XO=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},qO=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=Zb(o,t),r.abort()}catch{}},KO=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of z(r,"message",{signal:i.signal}))YO(s),yield e}catch{YO(s)}finally{i.abort(),Sy(t,a),n||sy(e),o&&await e}},YO=({error:e})=>{if(e)throw e},QO=(e,t,r)=>({sendMessage:zy.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:FO.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:VO.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),JO=(e,t)=>{const r=ZO(),n=ZO(),o=ZO(),i=Array.from({length:t.length-3},ZO),s=ZO(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},ZO=()=>{const e=new K;return e.end(),e},eI=()=>new Y({read(){}}),tI=()=>new Q({write(){}}),rI=()=>new J({read(){},write(){}}),nI=async(e,t,r)=>Pw(e,t,r),oI=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${uE[e]}.`)},iI={fileNumber:oI,generator:aO,asyncGenerator:aO,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:J.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},sI={input:Object.assign(Object.assign({},iI),{},{fileUrl:({value:e})=>({stream:m(e)}),filePath:({value:{file:e}})=>({stream:m(e)}),webStream:({value:e})=>({stream:Y.fromWeb(e)}),iterable:({value:e})=>({stream:Y.from(e)}),asyncIterable:({value:e})=>({stream:Y.from(e)}),string:({value:e})=>({stream:Y.from(e)}),uint8Array:({value:e})=>({stream:Y.from(Z.from(e))})}),output:Object.assign(Object.assign({},iI),{},{fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:Q.fromWeb(e)}),iterable:oI,asyncIterable:oI,string:oI,uint8Array:oI})};function aI(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)dI(t);const t=e.some(({readableObjectMode:e})=>e),r=cI(e,t),n=new lI({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const cI=(e,t)=>{if(0===e.length)return q(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class lI extends K{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#f=new WeakMap;add(e){if(dI(e),this.#s.has(e))return;this.#s.add(e),this.#l??=uI(this,this.#s,this.#u);const t=hI({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#f.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(dI(e),!this.#s.has(e))return!1;const t=this.#f.get(e);return void 0!==t&&(this.#f.delete(e),e.unpipe(this),await t,!0)}}const uI=async(e,t,r)=>{II(e,TI);const n=new AbortController;try{await Promise.race([fI(e,n),pI(e,t,r,n)])}finally{n.abort(),II(e,-TI)}},fI=async(e,{signal:t})=>{try{await ee(e,{signal:t,cleanup:!0})}catch(t){throw vI(e,t),t}},pI=async(e,t,r,{signal:n})=>{for await(const[o]of z(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},dI=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},hI=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{II(e,jI);const a=new AbortController;try{await Promise.race([mI(i,t,a),gI({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),bI({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),II(e,-jI)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?EI(e):yI(e))},mI=async(e,t,{signal:r})=>{try{await e,r.aborted||EI(t)}catch(e){r.aborted||vI(t,e)}},gI=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await ee(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;wI(n)?o.add(t):SI(e,n)}},bI=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},yI=e=>{e.writable&&e.end()},vI=(e,t)=>{wI(t)?EI(e):SI(e,t)},wI=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,EI=e=>{(e.readable||e.writable)&&e.destroy()},SI=(e,t)=>{e.destroyed||(e.once("error",OI),e.destroy(t))},OI=()=>{},II=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},TI=2,jI=1,xI=(e,t)=>{e.pipe(t),RI(e,t),DI(e,t)},RI=async(e,t)=>{if(!om(e)&&!om(t)){try{await ee(e,{cleanup:!0,readable:!0,writable:!1})}catch{}AI(t)}},AI=e=>{e.writable&&e.end()},DI=async(e,t)=>{if(!om(e)&&!om(t)){try{await ee(t,{cleanup:!0,readable:!1,writable:!0})}catch{}NI(e)}},NI=e=>{e.readable&&e.destroy()},LI=(e,t,r,n)=>{"output"===r?xI(e.stdio[n],t):xI(t,e.stdio[n]);const o=kI[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},kI=["stdin","stdout","stderr"],CI=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;PI(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},PI=(e,{signal:t})=>{om(e)&&vy(e,MI,t)},MI=2,_I=[];_I.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&_I.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&_I.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const $I=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,BI=Symbol.for("signal-exit emitter"),FI=globalThis,UI=Object.defineProperty.bind(Object);class GI{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(FI[BI])return FI[BI];UI(FI,BI,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class WI{}const zI=globalThis.process,{onExit:VI,load:HI,unload:XI}=(qI=$I(zI)?new class extends WI{#p="win32"===zI.platform?"SIGINT":"SIGHUP";#d=new GI;#h;#m;#g;#b={};#y=!1;constructor(e){super(),this.#h=e,this.#b={};for(const t of _I)this.#b[t]=()=>{const r=this.#h.listeners(t);let{count:n}=this.#d;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#d.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#m=e.emit}onExit(e,t){if(!$I(this.#h))return()=>{};!1===this.#y&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#d.on(r,e),()=>{this.#d.removeListener(r,e),0===this.#d.listeners.exit.length&&0===this.#d.listeners.afterExit.length&&this.unload()}}load(){if(!this.#y){this.#y=!0,this.#d.count+=1;for(const e of _I)try{const t=this.#b[e];t&&this.#h.on(e,t)}catch(e){}this.#h.emit=(e,...t)=>this.#v(e,...t),this.#h.reallyExit=e=>this.#w(e)}}unload(){this.#y&&(this.#y=!1,_I.forEach(e=>{const t=this.#b[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#h.removeListener(e,t)}catch(e){}}),this.#h.emit=this.#m,this.#h.reallyExit=this.#g,this.#d.count-=1)}#w(e){return $I(this.#h)?(this.#h.exitCode=e||0,this.#d.emit("exit",this.#h.exitCode,null),this.#g.call(this.#h,this.#h.exitCode)):0}#v(e,...t){const r=this.#m;if("exit"===e&&$I(this.#h)){"number"==typeof t[0]&&(this.#h.exitCode=t[0]);const n=r.call(this.#h,e,...t);return this.#d.emit("exit",this.#h.exitCode,null),n}return r.call(this.#h,e,...t)}}(zI):new class extends WI{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>qI.onExit(e,t),load:()=>qI.load(),unload:()=>qI.unload()});var qI;const KI=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=YI(e,t,...r);return{destination:n,destinationStream:cy(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},YI=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(QI,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=Tf(r,...n);return{destination:t(QI)(o,i,s),pipeOptions:s}}if(uy.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},QI=({options:e})=>({options:Object.assign(Object.assign({},e),{},{stdin:"pipe",piped:!0})}),JI=(e,t)=>{try{return{sourceStream:ly(e,t)}}catch(e){return{sourceError:e}}},ZI=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(NI(e),n):void 0!==t?(AI(r),t):void 0,eT=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>Tw({error:e,command:tT,escapedCommand:tT,fileDescriptors:t,options:r,startTime:n,isSync:!1}),tT="source.pipe(destination)",rT=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},nT=(e,t)=>{const r=aI([e]);return xI(r,t),sT.set(t,r),r},oT=(e,t)=>{const r=sT.get(t);return r.add(e),r},iT=async e=>{try{await ee(e,{cleanup:!0,readable:!1,writable:!0})}catch{}sT.delete(e)},sT=new WeakMap,aT=2,cT=1,lT=(e,t)=>void 0===e?[]:[uT(e,t)],uT=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await D(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw eT({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},fT=["destination"],pT=(e,...t)=>{if(yf(t[0]))return pT.bind(void 0,Object.assign(Object.assign({},e),{},{boundOptions:Object.assign(Object.assign({},e.boundOptions),t[0])}));const r=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=pg(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=KI(r,n,o),{sourceStream:f,sourceError:p}=JI(e,l),{options:d,fileDescriptors:h}=uy.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:d,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:h,startTime:i}})(e,...t),{destination:n}=r,o=nm(r,fT),i=dT(Object.assign(Object.assign({},o),{},{destination:n}));return i.pipe=pT.bind(void 0,Object.assign(Object.assign({},e),{},{source:n,sourcePromise:i,boundOptions:{}})),i},dT=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=hT(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=ZI({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw eT({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const f=new AbortController;try{const e=((e,t,r)=>{const n=sT.has(t)?oT(e,t):nT(e,t);return vy(e,aT,r.signal),vy(t,cT,r.signal),iT(t),n})(t,i,f);return await Promise.race([rT(u),...lT(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{f.abort()}},hT=(e,t)=>Promise.allSettled([e,t]),mT=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return gT(t,s),vT({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},gT=async(e,t)=>{try{await e}catch{}finally{t.abort()}},bT=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;yT(t,s,e);const a=e.readableObjectMode&&!i;return vT({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},yT=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},vT=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=z(e,"data",{signal:t.signal,highWaterMark:ET,highWatermark:ET});return ST({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},wT=q(!0),ET=wT,ST=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=OT({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*nO(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*oO(a)}},OT=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[VS(e,r,!t),xS(e,o,!n,{})].filter(Boolean),IT=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const f=TT({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([jT(e),f]);const p=jS(c,r),d=bT({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[h]=await Promise.all([xT({stream:e,iterable:d,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),f]);return h},TT=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!hO({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=bT({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)bO(t)||yO(o,r,n)})(a,e,r,i)},jT=async e=>{await B(),null===e.readableFlowing&&e.resume()},xT=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return zv(e,rw,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return zv(e,fw,t)}(r,{maxBuffer:i})):await async function(e,t){return zv(e,dw,t)}(r,{maxBuffer:i})}catch(r){return AT((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof Yv))throw e;if("all"===i)return e;const s=hw(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},RT=async e=>{try{return await e}catch(e){return AT(e)}},AT=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===$h.call(t)?new Uint8Array(e):e;var t},DT=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=NT(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],ee(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||CT(e,t,r,n)}finally{s.abort()}},NT=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&<(e,r,n),n},LT=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{kT(t,r),n.call(e,...o)}},kT=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},CT=(e,t,r,n)=>{if(!PT(e,t,r,n))throw e},PT=(e,t,r,n=!0)=>r.propagating?$T(e)||_T(e):(r.propagating=!0,MT(r,t)===n?$T(e):_T(e)),MT=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,_T=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,$T=e=>"EPIPE"===e?.code,BT=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=DT(e,t,l);if(MT(l,t))return void await u;const[f]=await Promise.all([IT({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return f},FT=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},UT=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,GT=(e,t)=>{const r=ag(e);rg({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},WT=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>Sm(e,"ipc"))(i),a=wm(t,"ipc"),c=wm(r,"ipc");for await(const t of HO({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(mw(0,o,c),o.push(t)),s&>(t,i);return o},zT=async(e,t)=>(await Promise.allSettled([e]),t),VT=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:f},context:p,verboseInfo:d,fileDescriptors:h,originalStreams:m,onInternalError:g,controller:b})=>{const y=(async(e,t)=>{const[r,n]=await IO(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:m,fileDescriptors:h,subprocess:e,exitPromise:y,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>BT({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:d,streamInfo:v}),E=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>BT(Object.assign(Object.assign({},FT(e,r)),{},{fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:UT(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:d,streamInfo:v}),S=[],O=WT({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:S,verboseInfo:d}),I=HT(m,e,v),T=XT(h,v);try{return await Promise.race([Promise.all([{},jO(y),Promise.all(w),E,O,lv(e,f),...I,...T]),g,qT(e,b),...iv(e,i,p,b),...qb({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:b}),...rv({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:b})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},y,Promise.all(w.map(e=>RT(e))),RT(E),zT(O,S),Promise.allSettled(I),Promise.allSettled(T)])}},HT=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:DT(e,n,r)),XT=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>Rv(t,{checkOpen:!1})&&!om(t)).map(({type:e,value:n,stream:o=n})=>DT(o,r,t,{isSameDirection:iE.has(e),stopOnExit:"native"===e}))),qT=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},KT=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=ay();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},YT=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},QT=async e=>{if(void 0!==e)try{await JT(e)}catch{}},JT=async e=>{await ee(e,{cleanup:!0,readable:!1,writable:!0})},ZT=async e=>{await ee(e,{cleanup:!0,readable:!0,writable:!1})},ej=async(e,t)=>{if(await e,t)throw t},tj=(e,t,r)=>{r&&!_T(r)?e.destroy(r):t&&e.destroy()},rj=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||fv.has(r),{subprocessStdout:a,waitReadableDestroy:c}=nj(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:f}=oj(a,s),{read:p,onStdoutDataDone:d}=ij({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),h=new Y({read:p,destroy:A(cj.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:u,encoding:l});return aj({subprocessStdout:a,onStdoutDataDone:d,readable:h,subprocess:e}),h},nj=(e,t,r)=>{const n=ly(e,t);return{subprocessStdout:n,waitReadableDestroy:KT(r,n,"readableDestroy")}},oj=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:wT},ij=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=ay(),s=mT({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){sj(this,s,i)},onStdoutDataDone:i}},sj=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},aj=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await ZT(e),await n,await QT(o),await t,r.readable&&r.push(null)}catch(e){await QT(o),lj(r,e)}},cj=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await YT(r,t)&&(lj(e,n),await ej(t,n))},lj=(e,t)=>{tj(e,e.readable,t)},uj=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=fj(e,r,t),s=new Q(Object.assign(Object.assign({},pj(n,e,o)),{},{destroy:A(gj.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode}));return mj(n,s),s},fj=(e,t,r)=>{const n=cy(e,t);return{subprocessStdin:n,waitWritableFinal:KT(r,n,"writableFinal"),waitWritableDestroy:KT(r,n,"writableDestroy")}},pj=(e,t,r)=>({write:dj.bind(void 0,e),final:A(hj.bind(void 0,e,t,r))}),dj=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},hj=async(e,t,r)=>{await YT(r,t)&&(e.writable&&e.end(),await t)},mj=async(e,t,r)=>{try{await JT(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await ZT(e)}catch{}})(r),bj(t,e)}},gj=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await YT(r,t),await YT(n,t)&&(bj(e,o),await ej(t,o))},bj=(e,t)=>{tj(e,e.writable,t)},yj=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||fv.has(r),{subprocessStdout:c,waitReadableDestroy:l}=nj(e,n,t),{subprocessStdin:u,waitWritableFinal:f,waitWritableDestroy:p}=fj(e,o,t),{readableEncoding:d,readableObjectMode:h,readableHighWaterMark:m}=oj(c,a),{read:g,onStdoutDataDone:b}=ij({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),y=new J(Object.assign(Object.assign({read:g},pj(u,e,f)),{},{destroy:A(vj.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:f,waitWritableDestroy:p})),readableHighWaterMark:m,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:h,writableObjectMode:u.writableObjectMode,encoding:d}));return aj({subprocessStdout:c,onStdoutDataDone:b,readable:y,subprocess:e,subprocessStdin:u}),mj(u,y,c),y},vj=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([cj({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),gj({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},wj=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||fv.has(t),s=ly(e,r),a=mT({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return Ej(a,s,e)},Ej=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},Sj=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=rj.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=uj.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=yj.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=wj.bind(void 0,e,t),e[Symbol.asyncIterator]=wj.bind(void 0,e,t,{})},Oj=(async()=>{})().constructor.prototype,Ij=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Oj,e)]),Tj=["timeout","signal"],jj=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:f}=xj(e,t,r),{subprocess:p,promise:d}=Aj({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:f});return p.pipe=pT.bind(void 0,{source:p,sourcePromise:d,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of Ij){const o=n.value.bind(t);Reflect.defineProperty(e,r,Object.assign(Object.assign({},n),{},{value:o}))}})(p,d),uy.set(p,{options:u,fileDescriptors:f}),p},xj=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=hg(e,t,r),{file:a,commandArguments:c,options:l}=yv(e,t,r),u=Rj(l),f=((e,t)=>aS(sI,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:f}},Rj=e=>{let{timeout:t,signal:r}=e,n=nm(e,Tj);if(void 0!==r)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return Object.assign(Object.assign({},n),{},{timeoutDuration:t})},Aj=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=O(e,t,r)}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{vS(n);const a=new E;JO(a,n),Object.assign(a,{readable:eI,writable:tI,duplex:rI});const c=Tw({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:nI(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;V(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>iE.has(e)))LI(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!iE.has(e)))CI({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:aI(t);xI(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=VI(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const f={},p=ay();c.kill=Gb.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:f,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?aI([e,t].filter(Boolean)):void 0)(c,r),Sj(c,r),((e,{ipc:t})=>{Object.assign(e,QO(e,!1,t))})(c,r);return{subprocess:c,promise:Dj({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:f,onInternalError:p,controller:l})}},Dj=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[f,[p,d],h,m,g]=await VT({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const b=h.map((e,r)=>TS(e,t,r)),y=TS(m,t,"all"),v=Nj({errorInfo:f,exitCode:p,signal:d,stdio:b,all:y,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return Pw(v,n,t)},Nj=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?jw({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof Yv,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):Iw({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),Lj=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,kj(t,e[t],r)]));return Object.assign(Object.assign({},e),r)},kj=(e,t,r)=>Cj.has(e)&&yf(t)&&yf(r)?Object.assign(Object.assign({},t),r):r,Cj=new Set(["env",...vm]),Pj=(e,t,r,n)=>{const o=(e,t,n)=>Pj(e,t,r,n),i=(...i)=>Mj({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},Mj=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(yf(i))return o(e,Lj(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=_j({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=LO(e,t,r),f=MO({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return Pw(f,c,l)})(a,c,l):jj(a,c,l,o)},_j=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=Yh({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=Tf(...i),u=Lj(Lj(n,o),l),{file:f=a,commandArguments:p=c,options:d=u,isSync:h=!1}=e({file:a,commandArguments:c,options:u});return{file:f,commandArguments:p,options:d,isSync:h}},$j=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=Bj(e);return{file:r,commandArguments:n}},Bj=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(Fj)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},Fj=/ +/g,Uj=({options:e})=>Object.assign(Object.assign({},Gj(e)),{},{isSync:!0}),Gj=e=>({options:Object.assign(Object.assign({},Wj(e)),e)}),Wj=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};Pj(()=>({}));const zj=Pj(()=>({isSync:!0}));Pj(({file:e,commandArguments:t})=>$j(e,t)),Pj(({file:e,commandArguments:t})=>Object.assign(Object.assign({},$j(e,t)),{},{isSync:!0})),Pj(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:Object.assign(Object.assign({},e),{},{node:!0})}}),Pj(({options:e})=>Gj(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(Uj,r),e.s=e.sync}),(()=>{const e=N,t=!0,r=void 0!==N.channel;Object.assign(Object.assign({},QO(e,t,r)),{},{getCancelSignal:Ky.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})})(),u.enableCompileCache?.();const Vj=global,Hj=new Proxy(global.target,{set:function(e,t,r){return Reflect.set(...arguments)},get:function(e,t,r){return Yj(`make ${t}`),Reflect.get(...arguments)}}),Xj=["packages","codemods","eslint"],qj=Vj.which("yarn").stdout,Kj=process.execPath;function Yj(...e){console.log.apply(console,e)}function Qj(e,t,r,n=!0,o=!1){Yj(`${e.replaceAll(qj,"yarn").replaceAll(Kj,"node")} ${t.join(" ")}`);try{return zj(e,t,{stdio:n?"inherit":void 0,cwd:r&&a.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function Jj(e,t,r,n){return Qj(qj,e,t,r,n)}function Zj(e,t,r){return Qj(Kj,e,t,r)}function ex(e,t){const r=process.env;process.env=Object.assign(Object.assign({},r),t),e(),process.env=r}function tx(...e){const t=["--format","codeframe","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=b("packages").filter(e=>y(`packages/${e}/package.json`)),n=[];for(let e=0,t=40;eJj(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=16384"});else{let e=null;for(const r of n)try{ex(()=>Jj(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function rx(e,t,r){const n="./build/"+e.toLowerCase();Vj.rm("-rf",n),Yj("mkdir -p build"),v("build",{recursive:!0}),Qj("git",["clone","--filter=blob:none","--sparse","--single-branch","--shallow-since='2 years ago'",t,n]),Qj("git",["sparse-checkout","set",...r],n),Qj("git",["checkout","-q",function(e){const t=d("./Makefile","utf8").match(new RegExp(`${e}_COMMIT = (\\w{40})`))[1];if(!t)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return t}(e)],n)}function nx(){const e=JSON.parse(d("./package.json","utf8")).version_babel8;return Xj.forEach(t=>{b(t).forEach(r=>{const n=`${t}/${r}/package.json`;if(y(n)){const t=JSON.parse(d(n,"utf8"));t.peerDependencies?.["@babel/core"]&&(t.peerDependencies["@babel/core"]=`^${e}`);const o=t.conditions?.BABEL_8_BREAKING[0];o?.peerDependencies?.["@babel/core"]&&(o.peerDependencies["@babel/core"]=`^${e}`),"babel-eslint-plugin"===r&&(o.peerDependencies["@babel/eslint-parser"]=`^${e}`),f(n,JSON.stringify(t,null,2)+"\n")}})}),ex(()=>Jj(["install"]),{YARN_ENABLE_IMMUTABLE_INSTALLS:!1}),e}Vj.config.verbose=!0,Hj["clean-all"]=function(){Vj.rm("-rf",["package-lock.json",".changelog"]),Xj.forEach(e=>{Vj.rm("-rf",`${e}/*/test/tmp`),Vj.rm("-rf",`${e}/*/package-lock.json`)}),Hj.clean(),Hj["clean-lib"](),Hj["clean-node-modules"]()},Hj["clean-node-modules"]=function(){Vj.rm("-rf","node_modules"),Xj.forEach(e=>{Vj.rm("-rf",`${e}/*/node_modules`)})},Hj.clean=function(){Hj["test-clean"](),Vj.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},Hj["test-clean"]=function(){Xj.forEach(e=>{Vj.rm("-rf",`${e}/*/test/tmp`),Vj.rm("-rf",`${e}/*/test-fixtures.json`)})},Hj["clean-lib"]=function(){Vj.rm("-rf",Xj.map(e=>`${e}/*/lib`)),Zj(["scripts/set-module-type.js"])},Hj["clean-runtime-helpers"]=function(){Vj.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},Hj["use-cjs"]=function(){Zj(["scripts/set-module-type.js","commonjs"]),Hj.bootstrap()},Hj["use-esm"]=function(){Zj(["scripts/set-module-type.js","module"]),Hj.bootstrap()},Hj["bootstrap-only"]=function(){Hj["clean-all"](),Jj(["install"])},Hj.bootstrap=function(){Hj["bootstrap-only"](),Hj["generate-tsconfig"](),Hj.build()},Hj.build=function(){Hj["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&Hj["build-standalone"]()},Hj["build-standalone"]=function(){Jj(["gulp","build-babel-standalone"])},Hj["build-bundle"]=function(){Hj.clean(),Hj["clean-lib"](),Zj(["scripts/set-module-type.js"]),Jj(["gulp","build"]),Hj["build-dist"]()},Hj["build-no-bundle"]=function(){Hj.clean(),Hj["clean-lib"](),Zj(["scripts/set-module-type.js"]),ex(()=>{Jj(["gulp","build-dev"])},{BABEL_ENV:"development"}),Hj["build-dist"]()},Hj["build-flow-typings"]=function(){f("packages/babel-types/lib/index.js.flow",Zj(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},Hj["build-dist"]=function(){Hj["build-plugin-transform-runtime-dist"]()},Hj["build-plugin-transform-runtime-dist"]=function(){Zj(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},Hj.prepublish=function(){process.env.BABEL_8_BREAKING?Zj(["scripts/set-module-type.js","module"]):Zj(["scripts/set-module-type.js","commonjs"]),Hj["bootstrap-only"](),ex(()=>{Hj["prepublish-build"](),Hj.test()},{IS_PUBLISH:"true"}),Zj(["scripts/set-module-type.js","clean"])},Hj["prepublish-build"]=function(){Hj["clean-lib"](),Hj["clean-runtime-helpers"](),Zj(["scripts/generators/npm-ignore.js"]),ex(()=>{Hj["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_8_FLAG:"true"}),ex(()=>{Hj["prepublish-build-standalone"](),Hj["clone-license"](),Hj["prepublish-prepare-dts"](),Hj["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_8_FLAG:"true"})},Hj["prepublish-build-standalone"]=function(){ex(()=>{Hj["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},Hj["prepublish-prepare-dts"]=function(){Hj["clean-ts"](),Hj.tscheck(),Hj["prepublish-prepare-dts-no-clean"]()},Hj["prepublish-prepare-dts-no-clean"]=function(){Jj(["gulp","bundle-dts"]),Hj["build-typescript-legacy-typings"](),Jj(["tsc","-p","tsconfig.dts-bundles.json"])},Hj.tscheck=function(){Hj["generate-tsconfig"](),Zj(["scripts/parallel-tsc/tsc.js","."]),Hj["tscheck-helpers"]()},Hj["tscheck-helpers"]=function(){Jj(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},Hj["clean-ts"]=function(){Vj.rm("-rf","tsconfig.tsbuildinfo"),Vj.rm("-rf","*/*/tsconfig.tsbuildinfo"),Vj.rm("-rf","dts")},Hj["generate-tsconfig"]=function(){Zj(["scripts/generators/tsconfig.js"]),Zj(["scripts/generators/archived-libs-typings.js"])},Hj["generate-type-helpers"]=function(){Jj(["gulp","generate-type-helpers"])},Hj["build-typescript-legacy-typings"]=function(){f("packages/babel-types/lib/index-legacy.d.ts",Zj(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},Hj["clone-license"]=function(){Zj(["scripts/clone-license.js"])},Hj.lint=function(){ex(()=>Hj.tscheck(),{TSCHECK_SILENT:"true"}),tx(),Jj(["tstyche"]),Hj["lint-prettier"]()},Hj["lint-ci"]=function(){Hj.tscheck(),tx(),Jj(["tstyche"]),Hj["lint-prettier"](),Hj["prepublish-prepare-dts-no-clean"]()},Hj["lint-prettier"]=function(){Jj(["prettier",".","--check"])},Hj.fix=function(){Hj["fix-js"](),Hj["fix-prettier"]()},Hj["fix-js"]=function(){ex(()=>Hj.tscheck(),{TSCHECK_SILENT:"true"}),tx("--fix")},Hj["fix-prettier"]=function(){Jj(["prettier",".","--write"])},Hj.watch=function(){Hj["build-no-bundle"](),ex(()=>{Jj(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},Hj.test=function(){Hj.lint(),Hj["test-only"]()},Hj["test-only"]=function(e=[]){Jj(["jest",...e])},Hj["test-cov"]=function(){Hj.build(),ex(()=>{Jj(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},Hj["bootstrap-test262"]=function(){rx("TEST262","https://github.com/tc39/test262.git",["test","harness"])},Hj["bootstrap-typescript"]=function(){rx("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},Hj["bootstrap-flow"]=function(){rx("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},Hj["new-version-checklist"]=function(){},Hj["new-version"]=function(){Hj["new-version-checklist"](),Qj("git",["pull","--rebase"]),Jj(["release-tool","version","-f","@babel/standalone"])},Hj["new-babel-8-version"]=function(){Qj("git",["pull","--rebase"]);const e=JSON.parse(d("./package.json","utf8")),t=bf.inc(e.version_babel8,"prerelease","beta");return e.version_babel8=t,f("./package.json",JSON.stringify(e,null,2)+"\n"),Qj("git",["add","./package.json"]),Qj("git",["commit","-m","Bump Babel 8 version to "+t]),Qj("git",["tag",`v${t}`,"-m",`v${t}`]),t},Hj["new-babel-8-version-create-commit-ci"]=function(){Jj(["release-tool","version",nx(),"--all","--tag-version-prefix","tmp.v","--yes"])},Hj["new-babel-8-version-create-commit"]=function(){const e=nx();Qj("git",["checkout","-b",`release/temp/v${e}`]),Jj(["release-tool","version",e,"--all","--tag-version-prefix","tmp.v"]),console.log("Run `BABEL_8_BREAKING=true make publish` to finish publishing")}; +import e from"os";import t from"fs";import r from"path";import n from"events";import o from"assert";import i from"util";import s from"child_process";import a,{resolve as c,basename as l}from"node:path";import u from"node:module";import{writeFileSync as f,statSync as p,readFileSync as d,appendFileSync as h,createReadStream as m,createWriteStream as g,readdirSync as y,existsSync as b,mkdirSync as v}from"node:fs";import{fileURLToPath as w}from"node:url";import{ChildProcess as E,spawnSync as S,spawn as O}from"node:child_process";import{StringDecoder as I}from"node:string_decoder";import{debuglog as x,stripVTControlCharacters as T,inspect as j,promisify as R,callbackify as A,aborted as N}from"node:util";import D,{platform as k,hrtime as L,execPath as C,execArgv as M}from"node:process";import P from"node:tty";import{setTimeout as _,scheduler as B,setImmediate as F}from"node:timers/promises";import{constants as $}from"node:os";import{once as U,addAbortListener as G,EventEmitter as W,on as z,setMaxListeners as V}from"node:events";import{serialize as H}from"node:v8";import{Transform as X,getDefaultHighWaterMark as q,PassThrough as K,Readable as Y,Writable as J,Duplex as Q}from"node:stream";import{Buffer as Z}from"node:buffer";import{finished as ee}from"node:stream/promises";var te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function re(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ne=function(e){return e&&e.Math===Math&&e},oe=ne("object"==typeof globalThis&&globalThis)||ne("object"==typeof window&&window)||ne("object"==typeof self&&self)||ne("object"==typeof te&&te)||ne("object"==typeof te&&te)||function(){return this}()||Function("return this")(),ie={},se=function(e){try{return!!e()}catch(e){return!0}},ae=!se(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),ce=!se(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),le=ce,ue=Function.prototype.call,fe=le?ue.bind(ue):function(){return ue.apply(ue,arguments)},pe={},de={}.propertyIsEnumerable,he=Object.getOwnPropertyDescriptor,me=he&&!de.call({1:2},1);pe.f=me?function(e){var t=he(this,e);return!!t&&t.enumerable}:de;var ge,ye,be=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ve=ce,we=Function.prototype,Ee=we.call,Se=ve&&we.bind.bind(Ee,Ee),Oe=ve?Se:function(e){return function(){return Ee.apply(e,arguments)}},Ie=Oe,xe=Ie({}.toString),Te=Ie("".slice),je=function(e){return Te(xe(e),8,-1)},Re=se,Ae=je,Ne=Object,De=Oe("".split),ke=Re(function(){return!Ne("z").propertyIsEnumerable(0)})?function(e){return"String"===Ae(e)?De(e,""):Ne(e)}:Ne,Le=function(e){return null==e},Ce=Le,Me=TypeError,Pe=function(e){if(Ce(e))throw new Me("Can't call method on "+e);return e},_e=ke,Be=Pe,Fe=function(e){return _e(Be(e))},$e="object"==typeof document&&document.all,Ue=void 0===$e&&void 0!==$e?function(e){return"function"==typeof e||e===$e}:function(e){return"function"==typeof e},Ge=Ue,We=function(e){return"object"==typeof e?null!==e:Ge(e)},ze=oe,Ve=Ue,He=function(e,t){return arguments.length<2?(r=ze[e],Ve(r)?r:void 0):ze[e]&&ze[e][t];var r},Xe=Oe({}.isPrototypeOf),qe=oe.navigator,Ke=qe&&qe.userAgent,Ye=Ke?String(Ke):"",Je=oe,Qe=Ye,Ze=Je.process,et=Je.Deno,tt=Ze&&Ze.versions||et&&et.version,rt=tt&&tt.v8;rt&&(ye=(ge=rt.split("."))[0]>0&&ge[0]<4?1:+(ge[0]+ge[1])),!ye&&Qe&&(!(ge=Qe.match(/Edge\/(\d+)/))||ge[1]>=74)&&(ge=Qe.match(/Chrome\/(\d+)/))&&(ye=+ge[1]);var nt=ye,ot=nt,it=se,st=oe.String,at=!!Object.getOwnPropertySymbols&&!it(function(){var e=Symbol("symbol detection");return!st(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ot&&ot<41}),ct=at&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,lt=He,ut=Ue,ft=Xe,pt=Object,dt=ct?function(e){return"symbol"==typeof e}:function(e){var t=lt("Symbol");return ut(t)&&ft(t.prototype,pt(e))},ht=String,mt=function(e){try{return ht(e)}catch(e){return"Object"}},gt=Ue,yt=mt,bt=TypeError,vt=function(e){if(gt(e))return e;throw new bt(yt(e)+" is not a function")},wt=vt,Et=Le,St=function(e,t){var r=e[t];return Et(r)?void 0:wt(r)},Ot=fe,It=Ue,xt=We,Tt=TypeError,jt={exports:{}},Rt=oe,At=Object.defineProperty,Nt=function(e,t){try{At(Rt,e,{value:t,configurable:!0,writable:!0})}catch(r){Rt[e]=t}return t},Dt=oe,kt=Nt,Lt="__core-js_shared__",Ct=jt.exports=Dt[Lt]||kt(Lt,{});(Ct.versions||(Ct.versions=[])).push({version:"3.48.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Mt=jt.exports,Pt=Mt,_t=function(e,t){return Pt[e]||(Pt[e]=t||{})},Bt=Pe,Ft=Object,$t=function(e){return Ft(Bt(e))},Ut=$t,Gt=Oe({}.hasOwnProperty),Wt=Object.hasOwn||function(e,t){return Gt(Ut(e),t)},zt=Oe,Vt=0,Ht=Math.random(),Xt=zt(1.1.toString),qt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Xt(++Vt+Ht,36)},Kt=_t,Yt=Wt,Jt=qt,Qt=at,Zt=ct,er=oe.Symbol,tr=Kt("wks"),rr=Zt?er.for||er:er&&er.withoutSetter||Jt,nr=function(e){return Yt(tr,e)||(tr[e]=Qt&&Yt(er,e)?er[e]:rr("Symbol."+e)),tr[e]},or=fe,ir=We,sr=dt,ar=St,cr=function(e,t){var r,n;if("string"===t&&It(r=e.toString)&&!xt(n=Ot(r,e)))return n;if(It(r=e.valueOf)&&!xt(n=Ot(r,e)))return n;if("string"!==t&&It(r=e.toString)&&!xt(n=Ot(r,e)))return n;throw new Tt("Can't convert object to primitive value")},lr=TypeError,ur=nr("toPrimitive"),fr=function(e,t){if(!ir(e)||sr(e))return e;var r,n=ar(e,ur);if(n){if(void 0===t&&(t="default"),r=or(n,e,t),!ir(r)||sr(r))return r;throw new lr("Can't convert object to primitive value")}return void 0===t&&(t="number"),cr(e,t)},pr=dt,dr=function(e){var t=fr(e,"string");return pr(t)?t:t+""},hr=We,mr=oe.document,gr=hr(mr)&&hr(mr.createElement),yr=function(e){return gr?mr.createElement(e):{}},br=yr,vr=!ae&&!se(function(){return 7!==Object.defineProperty(br("div"),"a",{get:function(){return 7}}).a}),wr=ae,Er=fe,Sr=pe,Or=be,Ir=Fe,xr=dr,Tr=Wt,jr=vr,Rr=Object.getOwnPropertyDescriptor;ie.f=wr?Rr:function(e,t){if(e=Ir(e),t=xr(t),jr)try{return Rr(e,t)}catch(e){}if(Tr(e,t))return Or(!Er(Sr.f,e,t),e[t])};var Ar={},Nr=ae&&se(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Dr=We,kr=String,Lr=TypeError,Cr=function(e){if(Dr(e))return e;throw new Lr(kr(e)+" is not an object")},Mr=ae,Pr=vr,_r=Nr,Br=Cr,Fr=dr,$r=TypeError,Ur=Object.defineProperty,Gr=Object.getOwnPropertyDescriptor,Wr="enumerable",zr="configurable",Vr="writable";Ar.f=Mr?_r?function(e,t,r){if(Br(e),t=Fr(t),Br(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Vr in r&&!r[Vr]){var n=Gr(e,t);n&&n[Vr]&&(e[t]=r.value,r={configurable:zr in r?r[zr]:n[zr],enumerable:Wr in r?r[Wr]:n[Wr],writable:!1})}return Ur(e,t,r)}:Ur:function(e,t,r){if(Br(e),t=Fr(t),Br(r),Pr)try{return Ur(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new $r("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Hr=Ar,Xr=be,qr=ae?function(e,t,r){return Hr.f(e,t,Xr(1,r))}:function(e,t,r){return e[t]=r,e},Kr={exports:{}},Yr=ae,Jr=Wt,Qr=Function.prototype,Zr=Yr&&Object.getOwnPropertyDescriptor,en=Jr(Qr,"name"),tn={EXISTS:en,PROPER:en&&"something"===function(){}.name,CONFIGURABLE:en&&(!Yr||Yr&&Zr(Qr,"name").configurable)},rn=Ue,nn=Mt,on=Oe(Function.toString);rn(nn.inspectSource)||(nn.inspectSource=function(e){return on(e)});var sn,an,cn,ln=nn.inspectSource,un=Ue,fn=oe.WeakMap,pn=un(fn)&&/native code/.test(String(fn)),dn=qt,hn=_t("keys"),mn=function(e){return hn[e]||(hn[e]=dn(e))},gn={},yn=pn,bn=oe,vn=We,wn=qr,En=Wt,Sn=Mt,On=mn,In=gn,xn="Object already initialized",Tn=bn.TypeError,jn=bn.WeakMap;if(yn||Sn.state){var Rn=Sn.state||(Sn.state=new jn);Rn.get=Rn.get,Rn.has=Rn.has,Rn.set=Rn.set,sn=function(e,t){if(Rn.has(e))throw new Tn(xn);return t.facade=e,Rn.set(e,t),t},an=function(e){return Rn.get(e)||{}},cn=function(e){return Rn.has(e)}}else{var An=On("state");In[An]=!0,sn=function(e,t){if(En(e,An))throw new Tn(xn);return t.facade=e,wn(e,An,t),t},an=function(e){return En(e,An)?e[An]:{}},cn=function(e){return En(e,An)}}var Nn={set:sn,get:an,has:cn,enforce:function(e){return cn(e)?an(e):sn(e,{})},getterFor:function(e){return function(t){var r;if(!vn(t)||(r=an(t)).type!==e)throw new Tn("Incompatible receiver, "+e+" required");return r}}},Dn=Oe,kn=se,Ln=Ue,Cn=Wt,Mn=ae,Pn=tn.CONFIGURABLE,_n=ln,Bn=Nn.enforce,Fn=Nn.get,$n=String,Un=Object.defineProperty,Gn=Dn("".slice),Wn=Dn("".replace),zn=Dn([].join),Vn=Mn&&!kn(function(){return 8!==Un(function(){},"length",{value:8}).length}),Hn=String(String).split("String"),Xn=Kr.exports=function(e,t,r){"Symbol("===Gn($n(t),0,7)&&(t="["+Wn($n(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Cn(e,"name")||Pn&&e.name!==t)&&(Mn?Un(e,"name",{value:t,configurable:!0}):e.name=t),Vn&&r&&Cn(r,"arity")&&e.length!==r.arity&&Un(e,"length",{value:r.arity});try{r&&Cn(r,"constructor")&&r.constructor?Mn&&Un(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Bn(e);return Cn(n,"source")||(n.source=zn(Hn,"string"==typeof t?t:"")),e};Function.prototype.toString=Xn(function(){return Ln(this)&&Fn(this).source||_n(this)},"toString");var qn=Kr.exports,Kn=Ue,Yn=Ar,Jn=qn,Qn=Nt,Zn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Kn(r)&&Jn(r,i,n),n.global)o?e[t]=r:Qn(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Yn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},eo={},to=Math.ceil,ro=Math.floor,no=Math.trunc||function(e){var t=+e;return(t>0?ro:to)(t)},oo=no,io=function(e){var t=+e;return t!=t||0===t?0:oo(t)},so=io,ao=Math.max,co=Math.min,lo=io,uo=Math.min,fo=function(e){var t=lo(e);return t>0?uo(t,9007199254740991):0},po=fo,ho=function(e){return po(e.length)},mo=Fe,go=function(e,t){var r=so(e);return r<0?ao(r+t,0):co(r,t)},yo=ho,bo=function(e){return function(t,r,n){var o=mo(t),i=yo(o);if(0===i)return!e&&-1;var s,a=go(n,i);if(e&&r!=r){for(;i>a;)if((s=o[a++])!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},vo={includes:bo(!0),indexOf:bo(!1)},wo=Wt,Eo=Fe,So=vo.indexOf,Oo=gn,Io=Oe([].push),xo=function(e,t){var r,n=Eo(e),o=0,i=[];for(r in n)!wo(Oo,r)&&wo(n,r)&&Io(i,r);for(;t.length>o;)wo(n,r=t[o++])&&(~So(i,r)||Io(i,r));return i},To=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jo=xo,Ro=To.concat("length","prototype");eo.f=Object.getOwnPropertyNames||function(e){return jo(e,Ro)};var Ao={};Ao.f=Object.getOwnPropertySymbols;var No=He,Do=eo,ko=Ao,Lo=Cr,Co=Oe([].concat),Mo=No("Reflect","ownKeys")||function(e){var t=Do.f(Lo(e)),r=ko.f;return r?Co(t,r(e)):t},Po=Wt,_o=Mo,Bo=ie,Fo=Ar,$o=se,Uo=Ue,Go=/#|\.prototype\./,Wo=function(e,t){var r=Vo[zo(e)];return r===Xo||r!==Ho&&(Uo(t)?$o(t):!!t)},zo=Wo.normalize=function(e){return String(e).replace(Go,".").toLowerCase()},Vo=Wo.data={},Ho=Wo.NATIVE="N",Xo=Wo.POLYFILL="P",qo=Wo,Ko=oe,Yo=ie.f,Jo=qr,Qo=Zn,Zo=Nt,ei=function(e,t,r){for(var n=_o(t),o=Fo.f,i=Bo.f,s=0;s9007199254740991)throw ui("Maximum allowed index exceeded");return e};ri({target:"Array",proto:!0,arity:1,forced:se(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=fi(this),r=pi(t),n=arguments.length;hi(r+n);for(var o=0;os;)Fi.f(e,r=o[s++],n[r]);return e};var Wi,zi=He("document","documentElement"),Vi=Cr,Hi=Li,Xi=To,qi=gn,Ki=zi,Yi=yr,Ji="prototype",Qi="script",Zi=mn("IE_PROTO"),es=function(){},ts=function(e){return"<"+Qi+">"+e+""},rs=function(e){e.write(ts("")),e.close();var t=e.parentWindow.Object;return e=null,t},ns=function(){try{Wi=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;ns="undefined"!=typeof document?document.domain&&Wi?rs(Wi):(t=Yi("iframe"),r="java"+Qi+":",t.style.display="none",Ki.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(ts("document.F=Object")),e.close(),e.F):rs(Wi);for(var n=Xi.length;n--;)delete ns[Ji][Xi[n]];return ns()};qi[Zi]=!0;var os,is,ss,as=Object.create||function(e,t){var r;return null!==e?(es[Ji]=Vi(e),r=new es,es[Ji]=null,r[Zi]=e):r=ns(),void 0===t?r:Hi.f(r,t)},cs=se,ls=Ue,us=We,fs=xi,ps=Zn,ds=nr("iterator"),hs=!1;[].keys&&("next"in(ss=[].keys())?(is=fs(fs(ss)))!==Object.prototype&&(os=is):hs=!0);var ms=!us(os)||cs(function(){var e={};return os[ds].call(e)!==e});ms&&(os={}),ls(os[ds])||ps(os,ds,function(){return this});var gs={IteratorPrototype:os,BUGGY_SAFARI_ITERATORS:hs},ys=ri,bs=oe,vs=function(e,t){if(mi(t,e))return e;throw new gi("Incorrect invocation")},ws=Cr,Es=Ue,Ss=xi,Os=Ri,Is=ki,xs=se,Ts=Wt,js=gs.IteratorPrototype,Rs=ae,As="constructor",Ns="Iterator",Ds=nr("toStringTag"),ks=TypeError,Ls=bs[Ns],Cs=!Es(Ls)||Ls.prototype!==js||!xs(function(){Ls({})}),Ms=function(){if(vs(this,js),Ss(this)===js)throw new ks("Abstract class Iterator not directly constructable")},Ps=function(e,t){Rs?Os(js,e,{configurable:!0,get:function(){return t},set:function(t){if(ws(this),this===js)throw new ks("You can't redefine this property");Ts(this,e)?this[e]=t:Is(this,e,t)}}):js[e]=t};Ts(js,Ds)||Ps(Ds,Ns),!Cs&&Ts(js,As)&&js[As]!==Object||Ps(As,Ms),Ms.prototype=js,ys({global:!0,constructor:!0,forced:Cs},{Iterator:Ms});var _s=function(e){return{iterator:e,next:e.next,done:!1}},Bs=Zn,Fs=fe,$s=Cr,Us=St,Gs=function(e,t,r){var n,o;$s(e);try{if(!(n=Us(e,"return"))){if("throw"===t)throw r;return r}n=Fs(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return $s(n),r},Ws=Gs,zs=fe,Vs=as,Hs=qr,Xs=function(e,t,r){for(var n in t)Bs(e,n,t[n],r);return e},qs=Nn,Ks=St,Ys=gs.IteratorPrototype,Js=function(e,t){return{value:e,done:t}},Qs=Gs,Zs=function(e,t,r){for(var n=e.length-1;n>=0;n--)if(void 0!==e[n])try{r=Ws(e[n].iterator,t,r)}catch(e){t="throw",r=e}if("throw"===t)throw r;return r},ea=nr("toStringTag"),ta="IteratorHelper",ra="WrapForValidIterator",na="normal",oa="throw",ia=qs.set,sa=function(e){var t=qs.getterFor(e?ra:ta);return Xs(Vs(Ys),{next:function(){var r=t(this);if(e)return r.nextHandler();if(r.done)return Js(void 0,!0);try{var n=r.nextHandler();return r.returnHandlerResult?n:Js(n,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),n=r.iterator;if(r.done=!0,e){var o=Ks(n,"return");return o?zs(o,n):Js(void 0,!0)}if(r.inner)try{Qs(r.inner.iterator,na)}catch(e){return Qs(n,oa,e)}if(r.openIters)try{Zs(r.openIters,na)}catch(e){return Qs(n,oa,e)}return n&&Qs(n,na),Js(void 0,!0)}})},aa=sa(!0),ca=sa(!1);Hs(ca,ea,"Iterator Helper");var la=function(e,t,r){var n=function(n,o){o?(o.iterator=n.iterator,o.next=n.next):o=n,o.type=t?ra:ta,o.returnHandlerResult=!!r,o.nextHandler=e,o.counter=0,o.done=!1,ia(this,o)};return n.prototype=t?aa:ca,n},ua=Cr,fa=Gs,pa=function(e,t,r,n){try{return n?t(ua(r)[0],r[1]):t(r)}catch(t){fa(e,"throw",t)}},da=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}},ha=oe,ma=function(e,t){var r=ha.Iterator,n=r&&r.prototype,o=n&&n[e],i=!1;if(o)try{o.call({next:function(){return{done:!0}},return:function(){i=!0}},-1)}catch(e){e instanceof t||(i=!1)}if(!i)return o},ga=ri,ya=fe,ba=vt,va=Cr,wa=_s,Ea=la,Sa=pa,Oa=Gs,Ia=ma,xa=!da("filter",function(){}),Ta=!xa&&Ia("filter",TypeError),ja=xa||Ta,Ra=Ea(function(){for(var e,t,r=this.iterator,n=this.predicate,o=this.next;;){if(e=va(ya(o,r)),this.done=!!e.done)return;if(t=e.value,Sa(r,n,[t,this.counter++],!0))return t}});ga({target:"Iterator",proto:!0,real:!0,forced:ja},{filter:function(e){va(this);try{ba(e)}catch(e){Oa(this,"throw",e)}return Ta?ya(Ta,this,e):new Ra(wa(this),{predicate:e})}});var Aa=je,Na=Oe,Da=function(e){if("Function"===Aa(e))return Na(e)},ka=vt,La=ce,Ca=Da(Da.bind),Ma={},Pa=Ma,_a=nr("iterator"),Ba=Array.prototype,Fa={};Fa[nr("toStringTag")]="z";var $a="[object z]"===String(Fa),Ua=Ue,Ga=je,Wa=nr("toStringTag"),za=Object,Va="Arguments"===Ga(function(){return arguments}()),Ha=$a?Ga:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=za(e),Wa))?r:Va?Ga(t):"Object"===(n=Ga(t))&&Ua(t.callee)?"Arguments":n},Xa=Ha,qa=St,Ka=Le,Ya=Ma,Ja=nr("iterator"),Qa=function(e){if(!Ka(e))return qa(e,Ja)||qa(e,"@@iterator")||Ya[Xa(e)]},Za=fe,ec=vt,tc=Cr,rc=mt,nc=Qa,oc=TypeError,ic=function(e,t){return ka(e),void 0===t?e:La?Ca(e,t):function(){return e.apply(t,arguments)}},sc=fe,ac=Cr,cc=mt,lc=function(e){return void 0!==e&&(Pa.Array===e||Ba[_a]===e)},uc=ho,fc=Xe,pc=function(e,t){var r=arguments.length<2?nc(e):t;if(ec(r))return tc(Za(r,e));throw new oc(rc(e)+" is not iterable")},dc=Qa,hc=Gs,mc=TypeError,gc=function(e,t){this.stopped=e,this.result=t},yc=gc.prototype,bc=function(e,t,r){var n,o,i,s,a,c,l,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),m=ic(t,u),g=function(e){return n&&hc(n,"normal"),new gc(!0,e)},y=function(e){return f?(ac(e),h?m(e[0],e[1],g):m(e[0],e[1])):h?m(e,g):m(e)};if(p)n=e.iterator;else if(d)n=e;else{if(!(o=dc(e)))throw new mc(cc(e)+" is not iterable");if(lc(o)){for(i=0,s=uc(e);s>i;i++)if((a=y(e[i]))&&fc(yc,a))return a;return new gc(!1)}n=pc(e,o)}for(c=p?e.next:n.next;!(l=sc(c,n)).done;){try{a=y(l.value)}catch(e){hc(n,"throw",e)}if("object"==typeof a&&a&&fc(yc,a))return a}return new gc(!1)},vc=ri,wc=fe,Ec=bc,Sc=vt,Oc=Cr,Ic=_s,xc=Gs,Tc=ma("forEach",TypeError);vc({target:"Iterator",proto:!0,real:!0,forced:Tc},{forEach:function(e){Oc(this);try{Sc(e)}catch(e){xc(this,"throw",e)}if(Tc)return wc(Tc,this,e);var t=Ic(this),r=0;Ec(t,function(t){e(t,r++)},{IS_RECORD:!0})}});var jc=ce,Rc=Function.prototype,Ac=Rc.apply,Nc=Rc.call,Dc="object"==typeof Reflect&&Reflect.apply||(jc?Nc.bind(Ac):function(){return Nc.apply(Ac,arguments)}),kc=We,Lc=Nn.get,Cc=Ha,Mc=String,Pc=function(e){if("Symbol"===Cc(e))throw new TypeError("Cannot convert a Symbol value to a string");return Mc(e)},_c=Oe([].slice),Bc=Oe,Fc=Wt,$c=SyntaxError,Uc=parseInt,Gc=String.fromCharCode,Wc=Bc("".charAt),zc=Bc("".slice),Vc=Bc(/./.exec),Hc={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},Xc=/^[\da-f]{4}$/i,qc=/^[\u0000-\u001F]$/,Kc=function(e,t){for(var r=!0,n="";t=t.length)return r&&(r[d]=t),i(null,t);a.lastIndex=l;var e=a.exec(t);return p=u,u+=e[0],f=p+e[1],l=a.lastIndex,m[f]||r&&r[f]===f?process.nextTick(y):r&&Object.prototype.hasOwnProperty.call(r,f)?w(r[f]):o.lstat(f,b)}function b(e,t){if(e)return i(e);if(!t.isSymbolicLink())return m[f]=!0,r&&(r[f]=f),process.nextTick(y);if(!n){var s=t.dev.toString(32)+":"+t.ino.toString(32);if(h.hasOwnProperty(s))return v(null,h[s],f)}o.stat(f,function(e){if(e)return i(e);o.readlink(f,function(e,t){n||(h[s]=t),v(e,t)})})}function v(t,n,o){if(t)return i(t);var s=e.resolve(p,n);r&&(r[o]=s),w(s)}function w(r){t=e.resolve(r,t.slice(l)),g()}g()},Wu}function Vu(){if(Uu)return $u;Uu=1,$u=c,c.realpath=c,c.sync=l,c.realpathSync=l,c.monkeypatch=function(){e.realpath=c,e.realpathSync=l},c.unmonkeypatch=function(){e.realpath=r,e.realpathSync=n};var e=t,r=e.realpath,n=e.realpathSync,o=process.version,i=/^v[0-5]\./.test(o),s=zu();function a(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function c(e,t,n){if(i)return r(e,t,n);"function"==typeof t&&(n=t,t=null),r(e,t,function(r,o){a(r)?s.realpath(e,t,n):n(r,o)})}function l(e,t){if(i)return n(e,t);try{return n(e,t)}catch(r){if(a(r))return s.realpathSync(e,t);throw r}}return $u}var Hu,Xu,qu,Ku,Yu,Ju,Qu,Zu,ef=ri,tf=fe,rf=bc,nf=vt,of=Cr,sf=_s,af=Gs,cf=ma("some",TypeError);function lf(){if(Xu)return Hu;Xu=1,Hu=function(t,r){for(var n=[],o=0;o=0&&l>0){for(n=[],i=r.length;u>=0&&!a;)u==c?(n.push(u),c=r.indexOf(e,u+1)):1==n.length?a=[n.pop(),l]:((o=n.pop())=0?c:l;n.length&&(a=[i,s])}return a}return Ku=1,qu=e,e.range=r,qu}();Yu=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return h(function(e){return e.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(o).split("\\,").join(i).split("\\.").join(s)}(e),!0).map(c)};var r="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",i="\0COMMA"+Math.random()+"\0",s="\0PERIOD"+Math.random()+"\0";function a(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function c(e){return e.split(r).join("\\").split(n).join("{").split(o).join("}").split(i).join(",").split(s).join(".")}function l(e){if(!e)return[""];var r=[],n=t("{","}",e);if(!n)return e.split(",");var o=n.pre,i=n.body,s=n.post,a=o.split(",");a[a.length-1]+="{"+i+"}";var c=l(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),r.push.apply(r,a),r}function u(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function p(e,t){return e<=t}function d(e,t){return e>=t}function h(r,n){var i=[],s=t("{","}",r);if(!s||/\$$/.test(s.pre))return[r];var c,m=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),y=m||g,b=s.body.indexOf(",")>=0;if(!y&&!b)return s.post.match(/,.*\}/)?h(r=s.pre+"{"+s.body+o+s.post):[r];if(y)c=s.body.split(/\.\./);else if(1===(c=l(s.body)).length&&1===(c=h(c[0],!1).map(u)).length)return(E=s.post.length?h(s.post,!1):[""]).map(function(e){return s.pre+c[0]+e});var v,w=s.pre,E=s.post.length?h(s.post,!1):[""];if(y){var S=a(c[0]),O=a(c[1]),I=Math.max(c[0].length,c[1].length),x=3==c.length?Math.abs(a(c[2])):1,T=p;O0){var D=new Array(N+1).join("0");A=R<0?"-"+D+A.slice(1):D+A}}v.push(A)}}else v=e(c,function(e){return h(e,!1)});for(var k=0;k65536)throw new TypeError("pattern is too long")};u.prototype.parse=function(e,r){p(e);var a=this.options;if("**"===e){if(!a.noglobstar)return t;e="*"}if(""===e)return"";var c,l="",u=!!a.nocase,f=!1,h=[],m=[],g=!1,y=-1,b=-1,v="."===e.charAt(0)?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",w=this;function E(){if(c){switch(c){case"*":l+=i,u=!0;break;case"?":l+=o,u=!0;break;default:l+="\\"+c}w.debug("clearStateChar %j %j",c,l),c=!1}}for(var S,O=0,I=e.length;O-1;D--){var k=m[D],L=l.slice(0,k.reStart),C=l.slice(k.reStart,k.reEnd-8),M=l.slice(k.reEnd-8,k.reEnd),P=l.slice(k.reEnd);M+=P;var _=L.split("(").length-1,B=P;for(O=0;O<_;O++)B=B.replace(/\)[+*?]?/,"");var F="";""===(P=B)&&r!==d&&(F="$"),l=L+C+P+F+M}""!==l&&u&&(l="(?=.)"+l);N&&(l=v+l);if(r===d)return[l,u];if(!u)return function(e){return e.replace(/\\(.)/g,"$1")}(e);var $=a.nocase?"i":"";try{var U=new RegExp("^"+l+"$",$)}catch(e){return new RegExp("$.")}return U._glob=e,U._src=l,U};var d={};return l.makeRe=function(e,t){return new u(e,t||{}).makeRe()},u.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var r=this.options,n=r.noglobstar?i:r.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",o=r.nocase?"i":"",s=e.map(function(e){return e.map(function(e){return e===t?n:"string"==typeof e?function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,o)}catch(e){this.regexp=!1}return this.regexp},l.match=function(e,t,r){var n=new u(t,r=r||{});return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},u.prototype.match=function(t,r){if(void 0===r&&(r=this.partial),this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&r)return!0;var n=this.options;"/"!==e.sep&&(t=t.split(e.sep).join("/")),t=t.split(a),this.debug(this.pattern,"split",t);var o,i,s=this.set;for(this.debug(this.pattern,"set",s),i=t.length-1;i>=0&&!(o=t[i]);i--);for(i=0;i>> no match, partial?",e,p,r,d),p!==a))}if("string"==typeof u?(l=f===u,this.debug("string match",u,f,l)):(l=f.match(u),this.debug("pattern match",u,f,l)),!l)return!1}if(i===a&&s===c)return!0;if(i===a)return n;if(s===c)return i===a-1&&""===e[i];throw new Error("wtf?")},Qu}ef({target:"Iterator",proto:!0,real:!0,forced:cf},{some:function(e){of(this);try{nf(e)}catch(e){af(this,"throw",e)}if(cf)return tf(cf,this,e);var t=sf(this),r=0;return rf(t,function(t,n){if(e(t,r++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var pf,df,hf={exports:{}},mf={exports:{}};function gf(){if(df)return hf.exports;df=1;try{var e=require("util");if("function"!=typeof e.inherits)throw"";hf.exports=e.inherits}catch(e){hf.exports=(pf||(pf=1,"function"==typeof Object.create?mf.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:mf.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),mf.exports)}return hf.exports}var yf,bf={exports:{}};function vf(){if(yf)return bf.exports;function e(e){return"/"===e.charAt(0)}function t(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(t[2]||n)}return yf=1,bf.exports="win32"===process.platform?t:e,bf.exports.posix=e,bf.exports.win32=t,bf.exports}var wf,Ef,Sf,Of,If,xf={};function Tf(){if(wf)return xf;function e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}wf=1,xf.setopts=function(t,r,i){i||(i={});if(i.matchBase&&-1===r.indexOf("/")){if(i.noglobstar)throw new Error("base matching requires globstar");r="**/"+r}t.silent=!!i.silent,t.pattern=r,t.strict=!1!==i.strict,t.realpath=!!i.realpath,t.realpathCache=i.realpathCache||Object.create(null),t.follow=!!i.follow,t.dot=!!i.dot,t.mark=!!i.mark,t.nodir=!!i.nodir,t.nodir&&(t.mark=!0);t.sync=!!i.sync,t.nounique=!!i.nounique,t.nonull=!!i.nonull,t.nosort=!!i.nosort,t.nocase=!!i.nocase,t.stat=!!i.stat,t.noprocess=!!i.noprocess,t.absolute=!!i.absolute,t.fs=i.fs||n,t.maxLength=i.maxLength||1/0,t.cache=i.cache||Object.create(null),t.statCache=i.statCache||Object.create(null),t.symlinks=i.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(l))}(t,i),t.changedCwd=!1;var c=process.cwd();e(i,"cwd")?(t.cwd=o.resolve(i.cwd),t.changedCwd=t.cwd!==c):t.cwd=c;t.root=i.root||o.resolve(t.cwd,"/"),t.root=o.resolve(t.root),"win32"===process.platform&&(t.root=t.root.replace(/\\/g,"/"));t.cwdAbs=s(t.cwd)?t.cwd:u(t,t.cwd),"win32"===process.platform&&(t.cwdAbs=t.cwdAbs.replace(/\\/g,"/"));t.nomount=!!i.nomount,i.nonegate=!0,i.nocomment=!0,i.allowWindowsEscape=!1,t.minimatch=new a(r,i),t.options=t.minimatch.options},xf.ownProp=e,xf.makeAbs=u,xf.finish=function(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,o=e.matches.length;no?(n.splice(0,o),process.nextTick(function(){r.apply(null,i)})):delete t[e]}})}(e))}),Af}function Vf(){if(kf)return Df;kf=1,Df=b;var e=Vu(),t=ff();t.Minimatch;var i=gf(),s=n.EventEmitter,a=r,c=o,l=vf(),u=function(){if(Sf)return Ef;Sf=1,Ef=p,p.GlobSync=d;var e=Vu(),t=ff();t.Minimatch,Vf().Glob;var n=r,i=o,s=vf(),a=Tf(),c=a.setopts,l=a.ownProp,u=a.childrenIgnored,f=a.isIgnored;function p(e,t){if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new d(e,t).found}function d(e,t){if(!e)throw new Error("must provide pattern");if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof d))return new d(e,t);if(c(this,e,t),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;nthis.maxLength)return!1;if(!this.stat&&l(this.cache,t)){var n=this.cache[t];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var o=this.statCache[t];if(!o){var i;try{i=this.fs.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(i&&i.isSymbolicLink())try{o=this.fs.statSync(t)}catch(e){o=i}else o=i}return this.statCache[t]=o,n=!0,o&&(n=o.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||n,(!r||"FILE"!==n)&&n},d.prototype._mark=function(e){return a.mark(this,e)},d.prototype._makeAbs=function(e){return a.makeAbs(this,e)},Ef}(),f=Tf(),p=f.setopts,d=f.ownProp,h=zf(),m=f.childrenIgnored,g=f.isIgnored,y=Wf();function b(e,t,r){if("function"==typeof t&&(r=t,t={}),t||(t={}),t.sync){if(r)throw new TypeError("callback provided to sync glob");return u(e,t)}return new w(e,t,r)}b.sync=u;var v=b.GlobSync=u.GlobSync;function w(e,t,r){if("function"==typeof t&&(r=t,t=null),t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new v(e,t)}if(!(this instanceof w))return new w(e,t,r);p(this,e,t),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=y(r),this.on("error",r),this.on("end",function(e){r(null,e)}));var o=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return a();for(var i=!0,s=0;s1)return!0;for(var o=0;othis.maxLength)return t();if(!this.stat&&d(this.cache,r)){var o=this.cache[r];if(Array.isArray(o)&&(o="DIR"),!n||"DIR"===o)return t(null,o);if(n&&"FILE"===o)return t()}var i=this.statCache[r];if(void 0!==i){if(!1===i)return t(null,i);var s=i.isDirectory()?"DIR":"FILE";return n&&"FILE"===s?t():t(null,s,i)}var a=this,c=h("stat\0"+r,function(n,o){if(o&&o.isSymbolicLink())return a.fs.stat(r,function(n,i){n?a._stat2(e,r,null,o,t):a._stat2(e,r,n,i,t)});a._stat2(e,r,n,o,t)});c&&a.fs.lstat(r,c)},w.prototype._stat2=function(e,t,r,n,o){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[t]=!1,o();var i="/"===e.slice(-1);if(this.statCache[t]=n,"/"===t.slice(-1)&&n&&!n.isDirectory())return o(null,!1,n);var s=!0;return n&&(s=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||s,i&&"FILE"===s?o():o(null,s,n)},Df}function Hf(){if(Lf)return Gu;Lf=1;var r=e,n=t,o=Vf(),i=Dd(),s=Object.create(i);Gu.extend=Object.assign;var a=Boolean(process.versions.electron),c={fatal:!1,globOptions:{},maxdepth:255,noglob:!1,silent:!1,verbose:!1,execPath:null,bufLength:65536},l={reset:function(){Object.assign(this,c),a||(this.execPath=process.execPath)},resetForTesting:function(){this.reset(),this.silent=!0}};l.reset(),Gu.config=l;var u={error:null,errorCode:0,currentCmd:"shell.js"};function f(e){return"object"==typeof e&&null!==e}function p(){l.silent||console.error.apply(console,arguments)}function d(e){if("string"!=typeof e)throw new TypeError("input must be a string");return e.replace(/\\/g,"/")}function h(e,t,r){if("string"!=typeof e)throw new Error("msg must be a string");var n={continue:!1,code:1,prefix:u.currentCmd+": ",silent:!1};"number"==typeof t&&f(r)?r.code=t:f(t)?r=t:"number"==typeof t?r={code:t}:"number"!=typeof t&&(r={}),r=Object.assign({},n,r),u.errorCode||(u.errorCode=r.code);var o=d(r.prefix+e);if(u.error=u.error?u.error+"\n":"",u.error+=o,l.fatal)throw new Error(o);if(e.length>0&&!r.silent&&p(o),!r.continue)throw{msg:"earlyExit",retValue:new m("",u.error,u.errorCode)}}function m(e,t,r){var n;return e instanceof Array?((n=e).stdout=e.join("\n"),e.length>0&&(n.stdout+="\n")):(n=new String(e)).stdout=e,n.stderr=t,n.code=r,E.forEach(function(e){n[e]=s[e].bind(n)}),n}function g(e,t,r){if("string"!=typeof e&&!f(e))throw new Error("options must be strings or key-value pairs");if(!f(t))throw new Error("parseOptions() internal error: map must be an object");if(r&&!f(r))throw new Error("parseOptions() internal error: errorOptions must be object");if("--"===e)return{};var n={};if(Object.keys(t).forEach(function(e){var r=t[e];"!"!==r[0]&&(n[r]=!1)}),""===e)return n;if("string"==typeof e){if("-"!==e[0])throw new Error("Options string must start with a '-'");e.slice(1).split("").forEach(function(e){if(e in t){var o=t[e];"!"===o[0]?n[o.slice(1)]=!1:n[o]=!0}else h("option not recognized: "+e,r||{})})}else Object.keys(e).forEach(function(o){var i=o[1];if(i in t){var s=t[i];n[s]=e[o]}else h("option not recognized: "+i,r||{})});return n}function y(e){if(!Array.isArray(e))throw new TypeError("must be an array");var t=[];return e.forEach(function(e){if("string"!=typeof e)t.push(e);else{var r;try{r=(r=o.sync(e,l.globOptions)).length>0?r:[e]}catch(t){r=[e]}t=t.concat(r)}}),t}Gu.state=u,delete process.env.OLDPWD,Gu.isObject=f,Gu.log=p,Gu.convertErrorOutput=d,Gu.error=h,Gu.ShellString=m,Gu.parseOptions=g,Gu.expand=y;var b="function"==typeof Buffer.alloc?function(e){return Buffer.alloc(e||l.bufLength)}:function(e){return new Buffer(e||l.bufLength)};function v(e,t,n){return n=n||{},function(){var o=null;u.currentCmd=e,u.error=null,u.errorCode=0;try{var i=[].slice.call(arguments,0);if(l.verbose&&console.error.apply(console,[e].concat(i)),u.pipedValue=this&&"string"==typeof this.stdout?this.stdout:"",!1===n.unix)o=t.apply(this,i);else{f(i[0])&&"Object"===i[0].constructor.name||(0===i.length||"string"!=typeof i[0]||i[0].length<=1||"-"!==i[0][0])&&i.unshift(""),i=(i=i.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[])).map(function(e){return f(e)&&"String"===e.constructor.name?e.toString():e});var s=r.homedir();i=i.map(function(e){return"string"==typeof e&&"~/"===e.slice(0,2)||"~"===e?e.replace(/^~/,s):e}),l.noglob||!0!==n.allowGlobbing||(i=i.slice(0,n.globStart).concat(y(i.slice(n.globStart))));try{f(n.cmdOptions)&&(i[0]=g(i[0],n.cmdOptions)),o=t.apply(this,i)}catch(e){if("earlyExit"!==e.msg)throw e;o=e.retValue}}}catch(e){if(!u.error)throw e.name="ShellJSInternalError",e;if(l.fatal)throw e}return n.wrapOutput&&("string"==typeof o||Array.isArray(o))&&(o=new m(o,u.error,u.errorCode)),u.currentCmd="shell.js",o}}Gu.buffer=b,Gu.unlinkSync=function(e){try{n.unlinkSync(e)}catch(t){if("EPERM"!==t.code)throw t;n.chmodSync(e,"0666"),n.unlinkSync(e)}},Gu.statFollowLinks=function(){return n.statSync.apply(n,arguments)},Gu.statNoFollowLinks=function(){return n.lstatSync.apply(n,arguments)},Gu.randomFileName=function(){return"shelljs_"+function e(t){if(1===t)return parseInt(16*Math.random(),10).toString(16);for(var r="",n=0;n0&&"-"===e.charAt(0)?[].unshift.call(arguments,""):n.error("You must specify a file.")),e=n.parseOptions(e,{R:"recursive",c:"changes",v:"verbose"}),r=[].slice.call(arguments,2),e.recursive?(a=[],r.forEach(function e(t){var r=n.statNoFollowLinks(t);r.isSymbolicLink()||(a.push(t),r.isDirectory()&&o.readdirSync(t).forEach(function(r){e(t+"/"+r)}))})):a=r,a.forEach(function(r){if(r=i.resolve(r),o.existsSync(r)||n.error("File not found: "+r),!e.recursive||!n.statNoFollowLinks(r).isSymbolicLink()){var a=n.statFollowLinks(r),c=a.isDirectory(),l=a.mode,u=l&s.TYPE_MASK,f=l;isNaN(parseInt(t,8))?t.split(",").forEach(function(t){var i=/([ugoa]*)([=\+-])([rwxXst]*)/i.exec(t);if(i){var a=i[1],p=i[2],d=i[3],h=-1!==a.indexOf("u")||"a"===a||""===a,m=-1!==a.indexOf("g")||"a"===a||""===a,g=-1!==a.indexOf("o")||"a"===a||""===a,y=-1!==d.indexOf("r"),b=-1!==d.indexOf("w"),v=-1!==d.indexOf("x"),w=-1!==d.indexOf("X"),E=-1!==d.indexOf("t"),S=-1!==d.indexOf("s");w&&c&&(v=!0);var O=0;switch(h&&(O|=(y?s.OWNER_READ:0)+(b?s.OWNER_WRITE:0)+(v?s.OWNER_EXEC:0)+(S?s.SETUID:0)),m&&(O|=(y?s.GROUP_READ:0)+(b?s.GROUP_WRITE:0)+(v?s.GROUP_EXEC:0)+(S?s.SETGID:0)),g&&(O|=(y?s.OTHER_READ:0)+(b?s.OTHER_WRITE:0)+(v?s.OTHER_EXEC:0)),E&&(O|=s.STICKY),p){case"+":f|=O;break;case"-":f&=~O;break;case"=":f=u+O,n.statFollowLinks(r).isDirectory()&&(f|=s.SETUID+s.SETGID&l);break;default:n.error("Could not recognize operator: `"+p+"`")}e.verbose&&console.log(r+" -> "+f.toString(8)),l!==f&&(!e.verbose&&e.changes&&console.log(r+" -> "+f.toString(8)),o.chmodSync(r,f),l=f)}else n.error("Invalid symbolic mode change: "+t)}):(f=u+parseInt(t,8),n.statFollowLinks(r).isDirectory()&&(f|=s.SETUID+s.SETGID&l),o.chmodSync(r,f))}}),""}return n.register("chmod",a,{}),Bf=a}function Yf(){if(Uf)return $f;Uf=1;var e=t,n=r,o=Hf();function i(t,r,n){e.existsSync(t)||o.error("copyFileSync: no such file or directory: "+t);var i="win32"===process.platform;try{if(n.update&&o.statFollowLinks(t).mtime=o.config.maxdepth)){n++;var l="win32"===process.platform;try{e.mkdirSync(r)}catch(e){if("EEXIST"!==e.code)throw e}for(var u=e.readdirSync(t),f=0;f and/or "):(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]);var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force?new o.ShellString("","",0):(r.forEach(function(c,u){if(!e.existsSync(c))return""===c&&(c="''"),void o.error("no such file or directory: "+c,{continue:!0});var f=o.statFollowLinks(c);if(!t.noFollowsymlink&&f.isDirectory())if(t.recursive){var p=l&&l.isDirectory()?n.join(a,n.basename(c)):a;try{o.statFollowLinks(n.dirname(a)),s(c,p,0,{no_force:t.no_force,followsymlink:t.followsymlink})}catch(e){o.error("cannot create directory '"+a+"': No such file or directory")}}else o.error("omitting directory '"+c+"'",{continue:!0});else{var d=a;l&&l.isDirectory()&&(d=n.normalize(a+"/"+n.basename(c)));var h=e.existsSync(d);if(h&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,u))return void(t.no_force||o.error("will not overwrite just-created '"+d+"' with '"+c+"'",{continue:!0}));if(h&&t.no_force)return;if(""===n.relative(c,d))return void o.error("'"+d+"' and '"+c+"' are the same file",{continue:!0});i(c,d,t)}}),new o.ShellString("",o.state.error,o.state.errorCode))}return o.register("cp",c,{cmdOptions:{f:"!no_force",n:"no_force",u:"update",R:"recursive",r:"recursive",L:"followsymlink",P:"noFollowsymlink"},wrapOutput:!1}),$f=c}var Jf,Qf,Zf,ep,tp,rp={};function np(){if(Jf)return rp;Jf=1;var e=Hf(),t=qf(),n=r;e.register("dirs",u,{wrapOutput:!1}),e.register("pushd",c,{wrapOutput:!1}),e.register("popd",l,{wrapOutput:!1});var o=[];function i(e){return/^[\-+]\d+$/.test(e)}function s(t){if(i(t)){if(Math.abs(t)1))return e.error("no other directory");l=l.splice(1,1).concat(l)}return r["no-cd"]?l=l.slice(1):(c=n.resolve(l.shift()),t("",c)),o=l,u(r.quiet?"-q":"")}function l(r,a){if(i(r)&&(a=r,r=""),r=e.parseOptions(r,{n:"no-cd",q:"quiet"}),!o.length)return e.error("directory stack empty");if(a=s(a||"+0"),r["no-cd"]||a>0||o.length+a===0)a=a>0?a-1:a,o.splice(a,1);else{var c=n.resolve(o.shift());t("",c)}return u(r.quiet?"-q":"")}function u(t,r){if(i(t)&&(r=t,t=""),(t=e.parseOptions(t,{c:"clear",q:"quiet"})).clear)return o=[];var n=a();return r?((r=s(r))<0&&(r=n.length+r),t.quiet||e.log(n[r]),n[r]):(t.quiet||e.log(n.join(" ")),n)}return rp.pushd=c,rp.popd=l,rp.dirs=u,rp}function op(){if(Zf)return Qf;Zf=1;var e=i.format,t=Hf();function r(r){var n=[].slice.call(arguments,r?0:1),o={};try{o=t.parseOptions(n[0],{e:"escapes",n:"no_newline"},{silent:!0}),n[0]&&n.shift()}catch(e){t.state.error=null}var i=e.apply(null,n);return o.no_newline||(i+="\n"),process.stdout.write(i),i}return t.register("echo",r,{allowGlobbing:!1}),Qf=r}function ip(){if(tp)return ep;tp=1;var e=Hf();return ep=function(){return e.state.error}}var sp,ap={exports:{}};function cp(){return sp||(sp=1,function(e){if(require.main!==e)throw new Error("This file should not be required");var r=s,n=t,o=process.argv[2],i=n.readFileSync(o,"utf8"),a=JSON.parse(i),c=a.command,l=a.execOptions,u=a.pipe,f=a.stdoutFile,p=a.stderrFile,d=r.exec(c,l,function(e){e?void 0===e.code?process.exitCode=1:process.exitCode=e.code:process.exitCode=0}),h=n.createWriteStream(f),m=n.createWriteStream(p);d.stdout.pipe(h),d.stderr.pipe(m),d.stdout.pipe(process.stdout),d.stderr.pipe(process.stderr),u&&d.stdin.end(u)}(ap)),ap.exports}ap.exports;var lp,up,fp,pp,dp,hp,mp,gp,yp,bp,vp,wp,Ep,Sp,Op,Ip,xp,Tp,jp,Rp,Ap,Np={};function Dp(){if(lp)return Np;lp=1;var r,n=Hf(),o=e,i=t;function s(e){if(!e||!i.existsSync(e))return!1;if(!n.statFollowLinks(e).isDirectory())return!1;var t=e+"/"+n.randomFileName();try{return i.writeFileSync(t," "),n.unlinkSync(t),e}catch(e){return!1}}function a(){return r||(r=s(o.tmpdir())||s(process.env.TMPDIR)||s(process.env.TEMP)||s(process.env.TMP)||s(process.env.Wimp$ScrapDir)||s("C:\\TEMP")||s("C:\\TMP")||s("\\TEMP")||s("\\TMP")||s("/tmp")||s("/var/tmp")||s("/usr/tmp")||s("."))}return n.register("tempdir",a,{allowGlobbing:!1,wrapOutput:!1}),Np.tempDir=a,Np.isCached=function(){return r},Np.clearCache=function(){r=void 0},Np}function kp(){if(fp)return up;fp=1;var e=r;function t(){return e.resolve(process.cwd())}return Hf().register("pwd",t,{allowGlobbing:!1}),up=t}function Lp(){if(dp)return pp;dp=1;var e=Hf(),n=Dp().tempDir,o=kp(),i=r,a=t,c=s,l=20971520;function u(t,r,s){r=r||{},t||e.error("must specify command");var u=e.readFromPipe();return"function"==typeof r&&(s=r,r={async:!0}),"object"==typeof r&&"function"==typeof s&&(r.async=!0),(r=e.extend({silent:e.config.silent,async:!1},r)).async?function(t,r,n,i){r=e.extend({silent:e.config.silent,cwd:o().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r);var s=c.exec(t,r,function(e,t,r){i&&(e?void 0===e.code?i(1,t,r):i(e.code,t,r):i(0,t,r))});return n&&s.stdin.end(n),r.silent||(s.stdout.pipe(process.stdout),s.stderr.pipe(process.stderr)),s}(t,r,u,s):function(t,r,s){e.config.execPath||e.error("Unable to find a path to the node binary. Please manually set config.execPath");var u=n(),f=i.resolve(u+"/"+e.randomFileName()),p=i.resolve(u+"/"+e.randomFileName()),d=i.resolve(u+"/"+e.randomFileName());r=e.extend({silent:e.config.silent,cwd:o().toString(),env:process.env,maxBuffer:l,encoding:"utf8"},r),a.existsSync(f)&&e.unlinkSync(f),a.existsSync(p)&&e.unlinkSync(p),a.existsSync(d)&&e.unlinkSync(d),r.cwd=i.resolve(r.cwd);var h={command:t,execOptions:r,pipe:s,stdoutFile:d,stderrFile:p};function m(e,t){a.writeFileSync(e,t,{encoding:"utf8",mode:parseInt("600",8)})}m(d,""),m(p,""),m(f,JSON.stringify(h));var g=[i.join(__dirname,"exec-child.js"),f];r.silent?r.stdio="ignore":r.stdio=[0,1,2];var y=0;try{delete r.shell,c.execFileSync(e.config.execPath,g,r)}catch(e){y=e.status||1}var b="",v="";"buffer"===r.encoding?(b=a.readFileSync(d),v=a.readFileSync(p)):(b=a.readFileSync(d,r.encoding),v=a.readFileSync(p,r.encoding));try{e.unlinkSync(f)}catch(e){}try{e.unlinkSync(p)}catch(e){}try{e.unlinkSync(d)}catch(e){}return 0!==y&&e.error(v,y,{continue:!0,silent:!0}),e.ShellString(b,v,y)}(t,r,u)}return e.register("exec",u,{unix:!1,canReceivePipe:!0,wrapOutput:!1}),pp=u}function Cp(){if(mp)return hp;mp=1;var e=r,n=t,o=Hf(),i=Vf(),s=e.sep+"**";function a(t,r){t.all_deprecated&&(o.log("ls: Option -a is deprecated. Use -A instead"),t.all=!0),r=r?[].slice.call(arguments,1):["."];var a=[];function c(e,r,n){var i,s;"win32"===process.platform&&(r=r.replace(/\\/g,"/")),t.long?(n=n||(t.link?o.statFollowLinks(e):o.statNoFollowLinks(e)),a.push((i=r,(s=n).name=i,s.toString=function(){return[this.mode,this.nlink,this.uid,this.gid,this.size,this.mtime,this.name].join(" ")},s))):a.push(r)}return r.forEach(function(r){var a;try{if((a=t.link?o.statFollowLinks(r):o.statNoFollowLinks(r)).isSymbolicLink())try{var l=o.statFollowLinks(r);l.isDirectory()&&(a=l)}catch(e){}}catch(e){return void o.error("no such file or directory: "+r,2,{continue:!0})}a.isDirectory()&&!t.directory?t.recursive?i.sync(r+s,{dot:t.all,follow:t.link}).forEach(function(t){e.relative(r,t)&&c(t,e.relative(r,t))}):t.all?n.readdirSync(r).forEach(function(t){c(e.join(r,t),t)}):n.readdirSync(r).forEach(function(t){"."!==t[0]&&c(e.join(r,t),t)}):c(r,r,a)}),a}return o.register("ls",a,{cmdOptions:{R:"recursive",A:"all",L:"link",a:"all_deprecated",d:"directory",l:"long"}}),hp=a}function Mp(){if(yp)return gp;yp=1;var e=r,t=Hf(),n=Cp();function o(r,o){o?"string"==typeof o&&(o=[].slice.call(arguments,1)):t.error("no path specified");var i=[];function s(e){"win32"===process.platform&&(e=e.replace(/\\/g,"/")),i.push(e)}return o.forEach(function(r){var o;try{o=t.statFollowLinks(r)}catch(e){t.error("no such file or directory: "+r)}s(r),o.isDirectory()&&n({recursive:!0,all:!0},r).forEach(function(t){s(e.join(r,t))})}),i}return t.register("find",o,{}),gp=o}function Pp(){if(vp)return bp;vp=1;var e=Hf(),r=t;function n(t,n,o){var i=e.readFromPipe();o||i||e.error("no paths given",2),o=[].slice.call(arguments,2),i&&o.unshift("-");var s=[];return t.ignoreCase&&(n=new RegExp(n,"i")),o.forEach(function(o){if(r.existsSync(o)||"-"===o){var a="-"===o?i:r.readFileSync(o,"utf8");if(t.nameOnly)a.match(n)&&s.push(o);else a.split("\n").forEach(function(e){var r=e.match(n);(t.inverse&&!r||!t.inverse&&r)&&s.push(e)})}else e.error("no such file or directory: "+o,2,{continue:!0})}),s.join("\n")+"\n"}return e.register("grep",n,{globStart:2,canReceivePipe:!0,cmdOptions:{v:"inverse",l:"nameOnly",i:"ignoreCase"}}),bp=n}function _p(){if(Ep)return wp;Ep=1;var e=Hf(),r=t;function n(t,n){var o=[],i=e.readFromPipe();n||i||e.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!r.existsSync(n))return void e.error("no such file or directory: "+n,{continue:!0});if(e.statFollowLinks(n).isDirectory())return void e.error("error reading '"+n+"': Is a directory",{continue:!0})}var s;s="-"===n?i:t.numLines<0?r.readFileSync(n,"utf8"):function(t,n){for(var o=e.buffer(),i=o.length,s=i,a=0,c=r.openSync(t,"r"),l=0,u="";s===i&&l and/or "),r=String(r);var s=n.normalize(r).replace(RegExp(n.sep+"$"),""),a=n.resolve(r)===s;if(i=n.resolve(process.cwd(),String(i)),e.existsSync(i)&&(t.force||o.error("Destination file exists",{continue:!0}),e.unlinkSync(i)),t.symlink){var c="win32"===process.platform,l=c?"file":null,u=a?s:n.resolve(process.cwd(),n.dirname(i),r);e.existsSync(u)?c&&o.statFollowLinks(u).isDirectory()&&(l="junction"):o.error("Source file does not exist",{continue:!0});try{e.symlinkSync("junction"===l?u:r,i,l)}catch(e){o.error(e.message)}}else{e.existsSync(r)||o.error("Source file does not exist",{continue:!0});try{e.linkSync(r,i)}catch(e){o.error(e.message)}}return""}return o.register("ln",i,{cmdOptions:{s:"symlink",f:"force"}}),Sp=i}function Fp(){if(xp)return Ip;xp=1;var e=Hf(),n=t,o=r;function i(t){var r=o.dirname(t);r===t&&e.error("dirname() failed: ["+t+"]"),n.existsSync(r)||i(r),n.mkdirSync(t,parseInt("0777",8))}function s(t,r){return r||e.error("no paths given"),"string"==typeof r&&(r=[].slice.call(arguments,1)),r.forEach(function(r){try{var s=e.statNoFollowLinks(r);return void(t.fullpath?s.isFile()&&e.error("cannot create directory "+r+": File exists",{continue:!0}):e.error("path already exists: "+r,{continue:!0}))}catch(e){}var a=o.dirname(r);if(n.existsSync(a)||t.fullpath)try{t.fullpath?i(o.resolve(r)):n.mkdirSync(r,parseInt("0777",8))}catch(t){var c;if("EACCES"===t.code)c="Permission denied";else{if("ENOTDIR"!==t.code&&"ENOENT"!==t.code)throw t;c="Not a directory"}e.error("cannot create directory "+r+": "+c,{continue:!0})}else e.error("no such file or directory: "+a,{continue:!0})}),""}return e.register("mkdir",s,{cmdOptions:{p:"fullpath"}}),Ip=s}function $p(){if(jp)return Tp;jp=1;var e=Hf(),r=t;function n(t,i,s){var a;a=r.readdirSync(t);for(var c=0;c1e3)throw e}}catch(r){e.error("could not remove directory (code "+r.code+"): "+t,{continue:!0})}return u}}function o(e){var t=!0;try{var n=r.openSync(e,"a");r.closeSync(n)}catch(e){t=!1}return t}function i(t,r){return r||e.error("no paths given"),(r=[].slice.call(arguments,1)).forEach(function(r){var i;try{var s="/"===r[r.length-1]?r.slice(0,-1):r;i=e.statNoFollowLinks(s)}catch(n){return void(t.force||e.error("no such file or directory: "+r,{continue:!0}))}i.isFile()?function(t,r){r.force||o(t)?e.unlinkSync(t):e.error("permission denied: "+t,{continue:!0})}(r,t):i.isDirectory()?function(t,r){r.recursive?n(t,r.force):e.error("path is a directory",{continue:!0})}(r,t):i.isSymbolicLink()?function(t,r){var o;try{o=e.statFollowLinks(t)}catch(r){return void e.unlinkSync(t)}o.isFile()?e.unlinkSync(t):o.isDirectory()&&("/"===t[t.length-1]?r.recursive?n(t,r.force,!0):e.error("path is a directory",{continue:!0}):e.unlinkSync(t))}(r,t):i.isFIFO()&&function(t){e.unlinkSync(t)}(r)}),""}return e.register("rm",i,{cmdOptions:{f:"force",r:"recursive",R:"recursive"}}),Tp=i}function Up(){if(Ap)return Rp;Ap=1;var e=t,n=r,o=Hf(),i=Yf(),s=$p();function a(t,r,a){arguments.length<3?o.error("missing and/or "):arguments.length>3?(r=[].slice.call(arguments,1,arguments.length-1),a=arguments[arguments.length-1]):"string"==typeof r?r=[r]:o.error("invalid arguments");var c=e.existsSync(a),l=c&&o.statFollowLinks(a);return c&&l.isDirectory()||!(r.length>1)||o.error("dest is not a directory (too many sources)"),c&&l.isFile()&&t.no_force&&o.error("dest file already exists: "+a),r.forEach(function(c,l){if(e.existsSync(c)){var u=a;if(e.existsSync(a)&&o.statFollowLinks(a).isDirectory()&&(u=n.normalize(a+"/"+n.basename(c))),e.existsSync(u)&&function(e,t){var r=e[t];return e.slice(0,t).some(function(e){return n.basename(e)===n.basename(r)})}(r,l))t.no_force||o.error("will not overwrite just-created '"+u+"' with '"+c+"'",{continue:!0});else if(e.existsSync(u)&&t.no_force)o.error("dest file already exists: "+u,{continue:!0});else if(n.resolve(c)!==n.dirname(n.resolve(u)))try{e.renameSync(c,u)}catch(e){"EXDEV"===e.code&&(i("-r",c,u),s("-rf",c))}else o.error("cannot move to self: "+c,{continue:!0})}else o.error("no such file or directory: "+c,{continue:!0})}),""}return o.register("mv",a,{cmdOptions:{f:"!no_force",n:"no_force"}}),Rp=a}var Gp,Wp={};function zp(){return Gp||(Gp=1),Wp}var Vp,Hp,Xp,qp,Kp,Yp,Jp,Qp,Zp,ed,td,rd,nd,od,id,sd,ad,cd,ld,ud,fd,pd,dd={};function hd(){return Vp||(Vp=1),dd}function md(){if(Xp)return Hp;Xp=1;var e=Hf(),r=t;function n(t,n,o,i){var s=e.readFromPipe();"string"!=typeof o&&"function"!=typeof o&&("number"==typeof o?o=o.toString():e.error("invalid replacement string")),"string"==typeof n&&(n=RegExp(n)),i||s||e.error("no files given"),i=[].slice.call(arguments,3),s&&i.unshift("-");var a=[];return i.forEach(function(i){if(r.existsSync(i)||"-"===i){var c=("-"===i?s:r.readFileSync(i,"utf8")).split("\n").map(function(e){return e.replace(n,o)}).join("\n");a.push(c),t.inplace&&r.writeFileSync(i,c,"utf8")}else e.error("no such file or directory: "+i,2,{continue:!0})}),a.join("\n")}return e.register("sed",n,{globStart:3,canReceivePipe:!0,cmdOptions:{i:"inplace"}}),Hp=n}function gd(){if(Kp)return qp;Kp=1;var e=Hf();function t(t){if(!t){var r=[].slice.call(arguments,0);r.length<2&&e.error("must provide an argument"),t=r[1]}var n="+"===t[0];n&&(t="-"+t.slice(1)),t=e.parseOptions(t,{e:"fatal",v:"verbose",f:"noglob"}),n&&Object.keys(t).forEach(function(e){t[e]=!t[e]}),Object.keys(t).forEach(function(r){n!==t[r]&&(e.config[r]=t[r])})}return e.register("set",t,{allowGlobbing:!1,wrapOutput:!1}),qp=t}function yd(){if(Jp)return Yp;Jp=1;var e=Hf(),r=t;function n(e){var t=e.match(/^\s*(\d*)\s*(.*)$/);return{num:Number(t[1]),value:t[2]}}function o(e,t){var r=e.toLowerCase(),n=t.toLowerCase();return r===n?-1*e.localeCompare(t):r.localeCompare(n)}function i(e,t){var r=n(e),i=n(t);return r.hasOwnProperty("num")&&i.hasOwnProperty("num")&&r.num!==i.num?r.num-i.num:o(r.value,i.value)}function s(t,n){var s=e.readFromPipe();n||s||e.error("no files given"),n=[].slice.call(arguments,1),s&&n.unshift("-");var a=n.reduce(function(t,n){if("-"!==n){if(!r.existsSync(n))return e.error("no such file or directory: "+n,{continue:!0}),t;if(e.statFollowLinks(n).isDirectory())return e.error("read failed: "+n+": Is a directory",{continue:!0}),t}var o="-"===n?s:r.readFileSync(n,"utf8");return t.concat(o.trimRight().split("\n"))},[]).sort(t.numerical?i:o);return t.reverse&&(a=a.reverse()),a.join("\n")+"\n"}return e.register("sort",s,{canReceivePipe:!0,cmdOptions:{r:"reverse",n:"numerical"}}),Yp=s}function bd(){if(Zp)return Qp;Zp=1;var e=Hf(),r=t;function n(t,n){var o=[],i=e.readFromPipe();n||i||e.error("no paths given");var s=1;!0===t.numLines?(s=2,t.numLines=Number(arguments[1])):!1===t.numLines&&(t.numLines=10),t.numLines=-1*Math.abs(t.numLines),n=[].slice.call(arguments,s),i&&n.unshift("-");var a=!1;return n.forEach(function(n){if("-"!==n){if(!r.existsSync(n))return void e.error("no such file or directory: "+n,{continue:!0});if(e.statFollowLinks(n).isDirectory())return void e.error("error reading '"+n+"': Is a directory",{continue:!0})}var s=("-"===n?i:r.readFileSync(n,"utf8")).split("\n");""===s[s.length-1]?(s.pop(),a=!0):a=!1,o=o.concat(s.slice(t.numLines))}),a&&o.push(""),o.join("\n")}return e.register("tail",n,{canReceivePipe:!0,cmdOptions:{n:"numLines"}}),Qp=n}function vd(){if(td)return ed;td=1;var e=Hf(),r=t;function n(t,n){n||e.error("no path given");var o=!1;if(Object.keys(t).forEach(function(e){!0===t[e]&&(o=!0)}),o||e.error("could not interpret expression"),t.link)try{return e.statNoFollowLinks(n).isSymbolicLink()}catch(e){return!1}if(!r.existsSync(n))return!1;if(t.exists)return!0;var i=e.statFollowLinks(n);return t.block?i.isBlockDevice():t.character?i.isCharacterDevice():t.directory?i.isDirectory():t.file?i.isFile():t.pipe?i.isFIFO():!!t.socket&&i.isSocket()}return e.register("test",n,{cmdOptions:{b:"block",c:"character",d:"directory",e:"exists",f:"file",L:"link",p:"pipe",S:"socket"},wrapOutput:!1,allowGlobbing:!1}),ed=n}function wd(){if(nd)return rd;nd=1;var e=Hf(),n=t,o=r;function i(t,r){r||e.error("wrong arguments"),n.existsSync(o.dirname(r))||e.error("no such file or directory: "+o.dirname(r));try{return n.writeFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(t){e.error("could not write to file (code "+t.code+"): "+r,{continue:!0})}}return e.register("to",i,{pipeOnly:!0,wrapOutput:!1}),rd=i}function Ed(){if(id)return od;id=1;var e=Hf(),n=t,o=r;function i(t,r){r||e.error("wrong arguments"),n.existsSync(o.dirname(r))||e.error("no such file or directory: "+o.dirname(r));try{return n.appendFileSync(r,this.stdout||this.toString(),"utf8"),this}catch(t){e.error("could not append to file (code "+t.code+"): "+r,{continue:!0})}}return e.register("toEnd",i,{pipeOnly:!0,wrapOutput:!1}),od=i}function Sd(){if(ad)return sd;ad=1;var e=Hf(),r=t;function n(t,n){return n?"string"==typeof n?n=[].slice.call(arguments,1):e.error("file arg should be a string file path or an Array of string file paths"):e.error("no files given"),n.forEach(function(n){!function(t,n){var i=o(n);if(i&&i.isDirectory())return;if(!i&&t.no_create)return;r.closeSync(r.openSync(n,"a"));var s=new Date,a=t.date||s,c=t.date||s;if(t.reference){var l=o(t.reference);l||e.error("failed to get attributess of "+t.reference),a=l.mtime,c=l.atime}else t.date&&(a=t.date,c=t.date);t.atime_only&&t.mtime_only||(t.atime_only?a=i.mtime:t.mtime_only&&(c=i.atime));r.utimesSync(n,c,a)}(t,n)}),""}function o(t){try{return e.statFollowLinks(t)}catch(e){return null}}return e.register("touch",n,{cmdOptions:{a:"atime_only",c:"no_create",d:"date",m:"mtime_only",r:"reference"}}),sd=n}function Od(){if(ld)return cd;ld=1;var e=Hf(),r=t;function n(t,n,o){var i=e.readFromPipe();i||(n||e.error("no input given"),r.existsSync(n)?e.statFollowLinks(n).isDirectory()&&e.error("error reading '"+n+"'"):e.error(n+": No such file or directory")),o&&r.existsSync(o)&&e.statFollowLinks(o).isDirectory()&&e.error(o+": Is a directory");var s=(n?r.readFileSync(n,"utf8"):i).trimRight().split("\n"),a=s.reduceRight(function(e,r){return 0===e.length?[{count:1,ln:r}]:0===function(e,r){return t.ignoreCase?e.toLocaleLowerCase().localeCompare(r.toLocaleLowerCase()):e.localeCompare(r)}(e[0].ln,r)?[{count:e[0].count+1,ln:r}].concat(e.slice(1)):[{count:1,ln:r}].concat(e)},[]).filter(function(e){return!t.duplicates||e.count>1}).map(function(e){return(t.count?function(e,t){var r=""+t;return r.length0)||t.all);p++){var d=o.resolve(s[p],r);n&&(d=d.toUpperCase());var h=d.match(/\.[^<>:"/\|?*.]+$/);if(h&&f.indexOf(h[0])>=0){if(l(d)){u.push(d);break}}else for(var m=0;m0?t.all?u:u[0]:t.all?[]:null}return ud=u}function xd(){return pd||(pd={"/node_modules/shelljs/src/cat.js":Xf,"/node_modules/shelljs/src/cd.js":qf,"/node_modules/shelljs/src/chmod.js":Kf,"/node_modules/shelljs/src/common.js":Hf,"/node_modules/shelljs/src/cp.js":Yf,"/node_modules/shelljs/src/dirs.js":np,"/node_modules/shelljs/src/echo.js":op,"/node_modules/shelljs/src/error.js":ip,"/node_modules/shelljs/src/exec-child.js":cp,"/node_modules/shelljs/src/exec.js":Lp,"/node_modules/shelljs/src/find.js":Mp,"/node_modules/shelljs/src/grep.js":Pp,"/node_modules/shelljs/src/head.js":_p,"/node_modules/shelljs/src/ln.js":Bp,"/node_modules/shelljs/src/ls.js":Cp,"/node_modules/shelljs/src/mkdir.js":Fp,"/node_modules/shelljs/src/mv.js":Up,"/node_modules/shelljs/src/popd.js":zp,"/node_modules/shelljs/src/pushd.js":hd,"/node_modules/shelljs/src/pwd.js":kp,"/node_modules/shelljs/src/rm.js":$p,"/node_modules/shelljs/src/sed.js":md,"/node_modules/shelljs/src/set.js":gd,"/node_modules/shelljs/src/sort.js":yd,"/node_modules/shelljs/src/tail.js":bd,"/node_modules/shelljs/src/tempdir.js":Dp,"/node_modules/shelljs/src/test.js":vd,"/node_modules/shelljs/src/to.js":wd,"/node_modules/shelljs/src/toEnd.js":Ed,"/node_modules/shelljs/src/touch.js":Sd,"/node_modules/shelljs/src/uniq.js":Od,"/node_modules/shelljs/src/which.js":Id})}function Td(e,t){var r,n=function(e){var t=e[0];if("/"===t||"\\"===t)return!1;var r=e[1],n=e[2];return!(!("."!==t||r&&"/"!==r&&"\\"!==r)||!("."!==t||"."!==r||n&&"/"!==n&&"\\"!==n))&&(":"!==r||"/"!==n&&"\\"!==n)}(e);"/"===(e=jd(e))[0]&&(t="");for(var o=xd(),i=["",".js",".json"];!(r=jd(n?t+"/node_modules/"+e:t+"/"+e)).endsWith("/..");){for(var s=0;s0&&".."!==t[n-1]&&"."!==t[n-1]&&(t.splice(--n,2),n--);return e=t.join("/"),r&&"/"!==e[0]?e="/"+e:0===e.length&&(e="."),e}var Rd,Ad={},Nd=["cat","cd","chmod","cp","dirs","echo","exec","find","grep","head","ln","ls","mkdir","mv","pwd","rm","sed","set","sort","tail","tempdir","test","to","toEnd","touch","uniq","which"];function Dd(){if(Rd)return Ad;Rd=1;var e=Hf();return Nd.forEach(function(e){!function(e){function t(t){var r=Td(t,e);if(null!==r)return xd()[r]();throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return t.resolve=function(t){var r=Td(t,e);return null!==r?r:require.resolve(t)},t}("/node_modules/shelljs")("./src/"+e)}),Ad.exit=process.exit,Ad.error=ip(),Ad.ShellString=e.ShellString,Ad.env=process.env,Ad.config=e.config,Ad}re(Nd);var kd=Dd(),Ld=Hf();Object.keys(kd).forEach(function(e){te[e]=kd[e]});var Cd=wd();String.prototype.to=Ld.wrap("to",Cd);var Md=Ed();String.prototype.toEnd=Ld.wrap("toEnd",Md),te.config.fatal=!0,te.target={};var Pd,_d=process.argv.slice(2),Bd=_d.indexOf("--");Bd>-1&&(Pd=_d.slice(Bd+1,_d.length),_d=_d.slice(0,Bd)),setTimeout(function(){var e;if(1!==_d.length||"--help"!==_d[0]){for(e in te.target)(function(e,t){te.target[e]=function(){return t.done||(t.done=!0,t.result=t.apply(t,arguments)),t.result}})(e,te.target[e]);_d.length>0?_d.forEach(function(e){e in te.target?te.target[e](Pd):console.log("no such target: "+e)}):"all"in te.target&&te.target.all(Pd)}else for(e in console.log("Available targets:"),te.target)console.log(" "+e)},0);var Fd=ri,$d=fe,Ud=bc,Gd=vt,Wd=Cr,zd=_s,Vd=Gs,Hd=ma("every",TypeError);Fd({target:"Iterator",proto:!0,real:!0,forced:Hd},{every:function(e){Wd(this);try{Gd(e)}catch(e){Vd(this,"throw",e)}if(Hd)return $d(Hd,this,e);var t=zd(this),r=0;return!Ud(t,function(t,n){if(!e(t,r++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var Xd={exports:{}};!function(e,t){var r;t=Xd.exports=y,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,i=n-6,s=t.re=[],a=t.safeRe=[],c=t.src=[],l=t.tokens={},u=0;function f(e){l[e]=u++}var p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[p,i]];function h(e){for(var t=0;t)?=?)",f("XRANGEIDENTIFIERLOOSE"),c[l.XRANGEIDENTIFIERLOOSE]=c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",f("XRANGEIDENTIFIER"),c[l.XRANGEIDENTIFIER]=c[l.NUMERICIDENTIFIER]+"|x|X|\\*",f("XRANGEPLAIN"),c[l.XRANGEPLAIN]="[v=\\s]*("+c[l.XRANGEIDENTIFIER]+")(?:\\.("+c[l.XRANGEIDENTIFIER]+")(?:\\.("+c[l.XRANGEIDENTIFIER]+")(?:"+c[l.PRERELEASE]+")?"+c[l.BUILD]+"?)?)?",f("XRANGEPLAINLOOSE"),c[l.XRANGEPLAINLOOSE]="[v=\\s]*("+c[l.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+c[l.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+c[l.XRANGEIDENTIFIERLOOSE]+")(?:"+c[l.PRERELEASELOOSE]+")?"+c[l.BUILD]+"?)?)?",f("XRANGE"),c[l.XRANGE]="^"+c[l.GTLT]+"\\s*"+c[l.XRANGEPLAIN]+"$",f("XRANGELOOSE"),c[l.XRANGELOOSE]="^"+c[l.GTLT]+"\\s*"+c[l.XRANGEPLAINLOOSE]+"$",f("COERCE"),c[l.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",f("COERCERTL"),s[l.COERCERTL]=new RegExp(c[l.COERCE],"g"),a[l.COERCERTL]=new RegExp(h(c[l.COERCE]),"g"),f("LONETILDE"),c[l.LONETILDE]="(?:~>?)",f("TILDETRIM"),c[l.TILDETRIM]="(\\s*)"+c[l.LONETILDE]+"\\s+",s[l.TILDETRIM]=new RegExp(c[l.TILDETRIM],"g"),a[l.TILDETRIM]=new RegExp(h(c[l.TILDETRIM]),"g");f("TILDE"),c[l.TILDE]="^"+c[l.LONETILDE]+c[l.XRANGEPLAIN]+"$",f("TILDELOOSE"),c[l.TILDELOOSE]="^"+c[l.LONETILDE]+c[l.XRANGEPLAINLOOSE]+"$",f("LONECARET"),c[l.LONECARET]="(?:\\^)",f("CARETTRIM"),c[l.CARETTRIM]="(\\s*)"+c[l.LONECARET]+"\\s+",s[l.CARETTRIM]=new RegExp(c[l.CARETTRIM],"g"),a[l.CARETTRIM]=new RegExp(h(c[l.CARETTRIM]),"g");f("CARET"),c[l.CARET]="^"+c[l.LONECARET]+c[l.XRANGEPLAIN]+"$",f("CARETLOOSE"),c[l.CARETLOOSE]="^"+c[l.LONECARET]+c[l.XRANGEPLAINLOOSE]+"$",f("COMPARATORLOOSE"),c[l.COMPARATORLOOSE]="^"+c[l.GTLT]+"\\s*("+c[l.LOOSEPLAIN]+")$|^$",f("COMPARATOR"),c[l.COMPARATOR]="^"+c[l.GTLT]+"\\s*("+c[l.FULLPLAIN]+")$|^$",f("COMPARATORTRIM"),c[l.COMPARATORTRIM]="(\\s*)"+c[l.GTLT]+"\\s*("+c[l.LOOSEPLAIN]+"|"+c[l.XRANGEPLAIN]+")",s[l.COMPARATORTRIM]=new RegExp(c[l.COMPARATORTRIM],"g"),a[l.COMPARATORTRIM]=new RegExp(h(c[l.COMPARATORTRIM]),"g");f("HYPHENRANGE"),c[l.HYPHENRANGE]="^\\s*("+c[l.XRANGEPLAIN]+")\\s+-\\s+("+c[l.XRANGEPLAIN]+")\\s*$",f("HYPHENRANGELOOSE"),c[l.HYPHENRANGELOOSE]="^\\s*("+c[l.XRANGEPLAINLOOSE]+")\\s+-\\s+("+c[l.XRANGEPLAINLOOSE]+")\\s*$",f("STAR"),c[l.STAR]="(<|>)?=?\\s*\\*";for(var m=0;mn)return null;if(!(t.loose?a[l.LOOSE]:a[l.FULL]).test(e))return null;try{return new y(e,t)}catch(e){return null}}function y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof y){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof y))return new y(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var i=e.trim().match(t.loose?a[l.LOOSE]:a[l.FULL]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new y(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(O(e,t))return null;var r=g(e),n=g(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var i="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return o+s;return i},t.compareIdentifiers=v;var b=/^[0-9]+$/;function v(e,t){var r=b.test(e),n=b.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function S(e,t,r){return w(e,t,r)<0}function O(e,t,r){return 0===w(e,t,r)}function I(e,t,r){return 0!==w(e,t,r)}function x(e,t,r){return w(e,t,r)>=0}function T(e,t,r){return w(e,t,r)<=0}function j(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return O(e,r,n);case"!=":return I(e,r,n);case">":return E(e,r,n);case">=":return x(e,r,n);case"<":return S(e,r,n);case"<=":return T(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function R(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof R){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof R))return new R(e,t);e=e.trim().split(/\s+/).join(" "),r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===A?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return v(t,e)},t.major=function(e,t){return new y(e,t).major},t.minor=function(e,t){return new y(e,t).minor},t.patch=function(e,t){return new y(e,t).patch},t.compare=w,t.compareLoose=function(e,t){return w(e,t,!0)},t.compareBuild=function(e,t,r){var n=new y(e,r),o=new y(t,r);return n.compare(o)||n.compareBuild(o)},t.rcompare=function(e,t,r){return w(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compareBuild(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.compareBuild(n,e,r)})},t.gt=E,t.lt=S,t.eq=O,t.neq=I,t.gte=x,t.lte=T,t.cmp=j,t.Comparator=R;var A={};function N(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof N)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new N(e.raw,t);if(e instanceof R)return new N(e.value,t);if(!(this instanceof N))return new N(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function D(e,t){for(var r=!0,n=e.slice(),o=n.pop();r&&n.length;)r=n.every(function(e){return o.intersects(e,t)}),o=n.pop();return r}function k(e){return!e||"x"===e.toLowerCase()||"*"===e}function L(e,t,r,n,o,i,s,a,c,l,u,f,p){return((t=k(r)?"":k(n)?">="+r+".0.0":k(o)?">="+r+"."+n+".0":">="+t)+" "+(a=k(c)?"":k(l)?"<"+(+c+1)+".0.0":k(u)?"<"+c+"."+(+l+1)+".0":f?"<="+c+"."+l+"."+u+"-"+f:"<="+a)).trim()}function C(e,t,n){for(var o=0;o0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function M(e,t,r){try{t=new N(t,r)}catch(e){return!1}return t.test(e)}function P(e,t,r,n){var o,i,s,a,c;switch(e=new y(e,n),t=new N(t,n),r){case">":o=E,i=T,s=S,a=">",c=">=";break;case"<":o=S,i=x,s=E,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(M(e,t,n))return!1;for(var l=0;l=0.0.0")),f=f||e,p=p||e,o(e.semver,f.semver,n)?f=e:s(e.semver,p.semver,n)&&(p=e)}),f.operator===a||f.operator===c)return!1;if((!p.operator||p.operator===a)&&i(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}R.prototype.parse=function(e){var t=this.options.loose?a[l.COMPARATORLOOSE]:a[l.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new y(r[2],this.options.loose):this.semver=A},R.prototype.toString=function(){return this.value},R.prototype.test=function(e){if(r("Comparator.test",e,this.options.loose),this.semver===A||e===A)return!0;if("string"==typeof e)try{e=new y(e,this.options)}catch(e){return!1}return j(e,this.operator,this.semver,this.options)},R.prototype.intersects=function(e,t){if(!(e instanceof R))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new N(e.value,t),M(this.value,r,t));if(""===e.operator)return""===e.value||(r=new N(this.value,t),M(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=j(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=j(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||o||i&&s||a||c},t.Range=N,N.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},N.prototype.toString=function(){return this.range},N.prototype.parseRange=function(e){var t=this.options.loose,n=t?a[l.HYPHENRANGELOOSE]:a[l.HYPHENRANGE];e=e.replace(n,L),r("hyphen replace",e),e=e.replace(a[l.COMPARATORTRIM],"$1$2$3"),r("comparator trim",e,a[l.COMPARATORTRIM]),e=(e=(e=e.replace(a[l.TILDETRIM],"$1~")).replace(a[l.CARETTRIM],"$1^")).split(/\s+/).join(" ");var o=t?a[l.COMPARATORLOOSE]:a[l.COMPARATOR],i=e.split(" ").map(function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t.loose?a[l.CARETLOOSE]:a[l.CARET];return e.replace(n,function(t,n,o,i,s){var a;return r("caret",e,t,n,o,i,s),k(n)?a="":k(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":k(i)?a="0"===n?">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":">="+n+"."+o+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===o?">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===o?">="+n+"."+o+"."+i+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+" <"+(+n+1)+".0.0"),r("caret return",a),a})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t.loose?a[l.TILDELOOSE]:a[l.TILDE];return e.replace(n,function(t,n,o,i,s){var a;return r("tilde",e,t,n,o,i,s),k(n)?a="":k(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":k(i)?a=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0"):a=">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0",r("tilde return",a),a})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t.loose?a[l.XRANGELOOSE]:a[l.XRANGE];return e.replace(n,function(n,o,i,s,a,c){r("xRange",e,n,o,i,s,a,c);var l=k(i),u=l||k(s),f=u||k(a),p=f;return"="===o&&p&&(o=""),c=t.includePrerelease?"-0":"",l?n=">"===o||"<"===o?"<0.0.0-0":"*":o&&p?(u&&(s=0),a=0,">"===o?(o=">=",u?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):"<="===o&&(o="<",u?i=+i+1:s=+s+1),n=o+i+"."+s+"."+a+c):u?n=">="+i+".0.0"+c+" <"+(+i+1)+".0.0"+c:f&&(n=">="+i+"."+s+".0"+c+" <"+i+"."+(+s+1)+".0"+c),r("xRange return",n),n})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[l.STAR],"")}(e,t),r("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(i=i.filter(function(e){return!!e.match(o)})),i=i.map(function(e){return new R(e,this.options)},this)},N.prototype.intersects=function(e,t){if(!(e instanceof N))throw new TypeError("a Range is required");return this.set.some(function(r){return D(r,t)&&e.set.some(function(e){return D(e,t)&&r.every(function(r){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new N(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},N.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new y(e,this.options)}catch(e){return!1}for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!E(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new N(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return P(e,t,"<",r)},t.gtr=function(e,t,r){return P(e,t,">",r)},t.outside=P,t.prerelease=function(e,t){var r=g(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new N(e,r),t=new N(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof y)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=a[l.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),a[l.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;a[l.COERCERTL].lastIndex=-1}else r=e.match(a[l.COERCE]);if(null===r)return null;return g(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,Xd.exports);var qd=re(Xd.exports);function Kd(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var Yd=ri,Jd=fe,Qd=bc,Zd=vt,eh=Cr,th=_s,rh=Gs,nh=ma("find",TypeError);Yd({target:"Iterator",proto:!0,real:!0,forced:nh},{find:function(e){eh(this);try{Zd(e)}catch(e){rh(this,"throw",e)}if(nh)return Jd(nh,this,e);var t=th(this),r=0;return Qd(t,function(t,n){if(e(t,r++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}});const oh=(e,t)=>{const r=ih(e);if("string"!=typeof r)throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},ih=e=>e instanceof URL?w(e):e,sh=(e,t=[],r={})=>{const n=oh(e,"First argument"),[o,i]=Kd(t)?[[],t]:[t,r];if(!Array.isArray(o))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${o}`);if(o.some(e=>"object"==typeof e&&null!==e))throw new TypeError(`Second argument must be an array of strings: ${o}`);const s=o.map(String),a=s.find(e=>e.includes("\0"));if(void 0!==a)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${a}`);if(!Kd(i))throw new TypeError(`Last argument must be an options object: ${i}`);return[n,s,i]};var ah=Oe,ch=Set.prototype,lh={Set:Set,add:ah(ch.add),has:ah(ch.has),remove:ah(ch.delete),proto:ch},uh=lh.has,fh=function(e){return uh(e),e},ph=fe,dh=function(e,t,r){for(var n,o,i=r?e:e.iterator,s=e.next;!(n=ph(s,i)).done;)if(void 0!==(o=t(n.value)))return o},hh=Oe,mh=dh,gh=lh.Set,yh=lh.proto,bh=hh(yh.forEach),vh=hh(yh.keys),wh=vh(new gh).next,Eh=function(e,t,r){return r?mh({iterator:vh(e),next:wh},t):bh(e,t)},Sh=Eh,Oh=lh.Set,Ih=lh.add,xh=function(e){var t=new Oh;return Sh(e,function(e){Ih(t,e)}),t},Th=Oe,jh=vt,Rh=function(e,t,r){try{return Th(jh(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},Ah=Rh(lh.proto,"size","get")||function(e){return e.size},Nh=vt,Dh=Cr,kh=fe,Lh=io,Ch=_s,Mh="Invalid size",Ph=RangeError,_h=TypeError,Bh=Math.max,Fh=function(e,t){this.set=e,this.size=Bh(t,0),this.has=Nh(e.has),this.keys=Nh(e.keys)};Fh.prototype={getIterator:function(){return Ch(Dh(kh(this.keys,this.set)))},includes:function(e){return kh(this.has,this.set,e)}};var $h=function(e){Dh(e);var t=+e.size;if(t!=t)throw new _h(Mh);var r=Lh(t);if(r<0)throw new Ph(Mh);return new Fh(e,r)},Uh=fh,Gh=xh,Wh=Ah,zh=$h,Vh=Eh,Hh=dh,Xh=lh.has,qh=lh.remove,Kh=He,Yh=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Jh=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}},Qh=function(e,t){var r=Kh("Set");try{(new r)[e](Yh(0));try{return(new r)[e](Yh(-1)),!1}catch(n){if(!t)return!0;try{return(new r)[e](Jh(-1/0)),!1}catch(n){return t(new r([1,2])[e](Jh(1/0)))}}}catch(e){return!1}},Zh=function(e){var t=Uh(this),r=zh(e),n=Gh(t);return Wh(t)<=r.size?Vh(t,function(e){r.includes(e)&&qh(n,e)}):Hh(r.getIterator(),function(e){Xh(n,e)&&qh(n,e)}),n},em=se;ri({target:"Set",proto:!0,real:!0,forced:!Qh("difference",function(e){return 0===e.size})||em(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var r=e++>1;return t.has(1)&&t.clear(),{done:r,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size})},{difference:Zh});var tm=fh,rm=Ah,nm=$h,om=Eh,im=dh,sm=lh.Set,am=lh.add,cm=lh.has,lm=se,um=function(e){var t=tm(this),r=nm(e),n=new sm;return rm(t)>r.size?im(r.getIterator(),function(e){cm(t,e)&&am(n,e)}):om(t,function(e){r.includes(e)&&am(n,e)}),n};ri({target:"Set",proto:!0,real:!0,forced:!Qh("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||lm(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:um});var fm=fh,pm=lh.has,dm=Ah,hm=$h,mm=Eh,gm=dh,ym=Gs,bm=function(e){var t=fm(this),r=hm(e);if(dm(t)<=r.size)return!1!==mm(t,function(e){if(r.includes(e))return!1},!0);var n=r.getIterator();return!1!==gm(n,function(e){if(pm(t,e))return ym(n,"normal",!1)})};ri({target:"Set",proto:!0,real:!0,forced:!Qh("isDisjointFrom",function(e){return!e})},{isDisjointFrom:bm});var vm=fh,wm=Ah,Em=Eh,Sm=$h,Om=function(e){var t=vm(this),r=Sm(e);return!(wm(t)>r.size)&&!1!==Em(t,function(e){if(!r.includes(e))return!1},!0)};ri({target:"Set",proto:!0,real:!0,forced:!Qh("isSubsetOf",function(e){return e})},{isSubsetOf:Om});var Im=fh,xm=lh.has,Tm=Ah,jm=$h,Rm=dh,Am=Gs,Nm=function(e){var t=Im(this),r=jm(e);if(Tm(t)92||"NODE"===Rg&&jg>94||"BROWSER"===Rg&&jg>97)return!1;var e=new ArrayBuffer(8),t=Ag(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength}),Dg=oe,kg=function(e){if(xg){try{return Ig.process.getBuiltinModule(e)}catch(e){}try{return Function('return require("'+e+'")')()}catch(e){}}},Lg=Ng,Cg=Dg.structuredClone,Mg=Dg.ArrayBuffer,Pg=Dg.MessageChannel,_g=!1;if(Lg)_g=function(e){Cg(e,{transfer:[e]})};else if(Mg)try{Pg||(lg=kg("worker_threads"))&&(Pg=lg.MessageChannel),Pg&&(ug=new Pg,fg=new Mg(2),pg=function(e){ug.port1.postMessage(null,[e])},2===fg.byteLength&&(pg(fg),0===fg.byteLength&&(_g=pg)))}catch(e){}var Bg=oe,Fg=Oe,$g=Rh,Ug=function(e){if(void 0===e)return 0;var t=dg(e),r=hg(t);if(t!==r)throw new mg("Wrong length or index");return r},Gg=bg,Wg=eg,zg=_g,Vg=Ng,Hg=Bg.structuredClone,Xg=Bg.ArrayBuffer,qg=Bg.DataView,Kg=Math.min,Yg=Xg.prototype,Jg=qg.prototype,Qg=Fg(Yg.slice),Zg=$g(Yg,"resizable","get"),ey=$g(Yg,"maxByteLength","get"),ty=Fg(Jg.getInt8),ry=Fg(Jg.setInt8),ny=(Vg||zg)&&function(e,t,r){var n,o=Wg(e),i=void 0===t?o:Ug(t),s=!Zg||!Zg(e);if(Gg(e),Vg&&(e=Hg(e,{transfer:[e]}),o===i&&(r||s)))return e;if(o>=i&&(!r||s))n=Qg(e,0,i);else{var a=r&&!s&&ey?{maxByteLength:ey(e)}:void 0;n=new Xg(i,a);for(var c=new qg(e),l=new qg(n),u=Kg(i,o),f=0;f>16&255,o>>8&255,255&o];if(2===n){if(r&&0!==i[1])throw new Ry("Extra bits");return[i[0]]}if(3===n){if(r&&0!==i[2])throw new Ry("Extra bits");return[i[0],i[1]]}return i},Ly=function(e,t,r){for(var n=t.length,o=0;o0){if("stop-before-partial"===i)break;if("loose"!==i)throw new Ry("Missing padding");if(1===u.length)throw new Ry("Malformed padding: exactly one additional character");c=Ly(a,ky(u,o,!1),c)}l=s;break}var p=Ny(e,f);if(++f,"="===p){if(u.length<2)throw new Ry("Padding is too early");if(f=Dy(e,f),2===u.length){if(f===s){if("stop-before-partial"===i)break;throw new Ry("Malformed padding: only one =")}"="===Ny(e,f)&&(++f,f=Dy(e,f))}if(f1?arguments[1]:void 0,this,this.length);return{read:t.read,written:t.written}}});var Gy=oe,Wy=Oe,zy=Gy.Uint8Array,Vy=Gy.SyntaxError,Hy=Gy.parseInt,Xy=Math.min,qy=/[^\da-f]/i,Ky=Wy(qy.exec),Yy=Wy("".slice),Jy=ri,Qy=fy,Zy=Py,eb=bg,tb=function(e,t){var r=e.length;if(r%2!=0)throw new Vy("String should be an even number of characters");for(var n=t?Xy(t.length,r/2):r/2,o=t||new zy(n),i=0,s=0;s>6*e&63)};s+2"[object Uint8Array]"===wb.call(e),Sb=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Ob=new TextEncoder,Ib=e=>Ob.encode(e),xb=new TextDecoder,Tb=e=>xb.decode(e),jb=(e,t)=>{if("utf8"===t&&e.every(e=>"string"==typeof e))return e;const r=new I(t),n=e.map(e=>"string"==typeof e?Ib(e):e).map(e=>r.write(e)),o=r.end();return""===o?n:[...n,o]},Rb=e=>1===e.length&&Eb(e[0])?e[0]:Nb(Ab(e)),Ab=e=>e.map(e=>"string"==typeof e?Ib(e):e),Nb=e=>{const t=new Uint8Array(Db(e));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},Db=e=>{let t=0;for(const r of e)t+=r.length;return t},kb=({templates:e,expressions:t,tokens:r,index:n,template:o})=>{if(void 0===o)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);const{nextTokens:i,leadingWhitespaces:s,trailingWhitespaces:a}=Lb(o,e.raw[n]),c=Pb(r,i,s);if(n===t.length)return c;const l=t[n],u=Array.isArray(l)?l.map(e=>_b(e)):[_b(l)];return Pb(c,u,a)},Lb=(e,t)=>{if(0===t.length)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};const r=[];let n=0;const o=Cb.has(t[0]);for(let o=0,i=0;or||0===e.length||0===t.length?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],_b=e=>{const t=typeof e;if("string"===t)return e;if("number"===t)return String(e);if(Kd(e)&&("stdout"in e||"isMaxBuffer"in e))return Bb(e);if(e instanceof E||"[object Promise]"===Object.prototype.toString.call(e))throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw new TypeError(`Unexpected "${t}" in template expression`)},Bb=({stdout:e})=>{if("string"==typeof e)return e;if(Eb(e))return Tb(e);if(void 0===e)throw new TypeError('Missing result.stdout in template expression. This is probably due to the previous subprocess\' "stdout" option.');throw new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};function Fb(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;nUb.includes(e),Ub=[D.stdin,D.stdout,D.stderr],Gb=["stdin","stdout","stderr"],Wb=e=>Gb[e]??`stdio[${e}]`,zb=(e,t)=>{const r=Array.from({length:Vb(e)+1}),n=Hb(e[t],r,t);return Zb(n,t)},Vb=({stdio:e})=>Array.isArray(e)?Math.max(e.length,Gb.length):Gb.length,Hb=(e,t,r)=>Kd(e)?Xb(e,t,r):t.fill(e),Xb=(e,t,r)=>{for(const n of Object.keys(e).sort(qb))for(const o of Yb(n,r,t))t[o]=e[n];return t},qb=(e,t)=>Kb(e)"stdout"===e||"stderr"===e?0:"all"===e?2:1,Yb=(e,t,r)=>{if("ipc"===e)return[r.length-1];const n=Jb(e);if(void 0===n||0===n)throw new TypeError(`"${t}.${e}" is invalid.\nIt must be "${t}.stdout", "${t}.stderr", "${t}.all", "${t}.ipc", or "${t}.fd3", "${t}.fd4" (and so on).`);if(n>=r.length)throw new TypeError(`"${t}.${e}" is invalid: that file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);return"all"===n?[1,2]:[n]},Jb=e=>{if("all"===e)return e;if(Gb.includes(e))return Gb.indexOf(e);const t=Qb.exec(e);return null!==t?Number(t[1]):void 0},Qb=/^fd(\d+)$/,Zb=(e,t)=>e.map(e=>void 0===e?ev[t]:e),ev={lines:!1,buffer:!0,maxBuffer:1e8,verbose:x("execa").enabled?"full":"none",stripFinalNewline:!0},tv=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],rv=(e,t)=>"ipc"===t?e.at(-1):e[t],nv=({verbose:e},t)=>"none"!==iv(e,t),ov=({verbose:e},t)=>!["none","short"].includes(iv(e,t)),iv=(e,t)=>void 0===t?sv(e):rv(e,t),sv=e=>e.find(e=>av(e))??cv.findLast(t=>e.includes(t)),av=e=>"function"==typeof e,cv=["none","short","full"],lv=e=>T(e).split("\n").map(e=>uv(e)).join("\n"),uv=e=>e.replaceAll(pv,e=>fv(e)),fv=e=>{const t=dv[e];if(void 0!==t)return t;const r=e.codePointAt(0),n=r.toString(16);return r<=hv?`\\u${n.padStart(4,"0")}`:`\\U${n}`},pv=/\p{Separator}|\p{Other}/gu,dv={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},hv=65535,mv=e=>gv.test(e)?e:"win32"===k?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,gv=/^[\w./-]+$/;const yv={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},bv={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},vv=Object.assign(Object.assign({},yv),bv),wv=Object.assign(Object.assign({},yv),{tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"}),Ev=("win32"!==D.platform?"linux"!==D.env.TERM:Boolean(D.env.WT_SESSION)||Boolean(D.env.TERMINUS_SUBLIME)||"{cmd::Cmder}"===D.env.ConEmuTask||"Terminus-Sublime"===D.env.TERM_PROGRAM||"vscode"===D.env.TERM_PROGRAM||"xterm-256color"===D.env.TERM||"alacritty"===D.env.TERM||"JetBrains-JediTerm"===D.env.TERMINAL_EMULATOR)?vv:wv;Object.entries(bv);const Sv=P?.WriteStream?.prototype?.hasColors?.()??!1,Ov=(e,t)=>{if(!Sv)return e=>e;const r=`[${e}m`,n=`[${t}m`;return e=>{const t=e+"";let o=t.indexOf(n);if(-1===o)return r+t+n;let i=r,s=0;for(;-1!==o;)i+=t.slice(s,o)+r,s=o+n.length,o=t.indexOf(n,s);return i+=t.slice(s)+n,i}},Iv=Ov(1,22),xv=Ov(90,39),Tv=Ov(91,39),jv=Ov(93,39),Rv=e=>`${Av(e.getHours(),2)}:${Av(e.getMinutes(),2)}:${Av(e.getSeconds(),2)}.${Av(e.getMilliseconds(),3)}`,Av=(e,t)=>String(e).padStart(t,"0"),Nv=({failed:e,reject:t})=>e?t?Ev.cross:Ev.warning:Ev.tick,Dv={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Nv,duration:Nv},kv=e=>e,Lv={command:()=>Iv,output:()=>kv,ipc:()=>kv,error:({reject:e})=>e?Tv:jv,duration:()=>xv},Cv=(e,t,r)=>{const n=(({verbose:e},t)=>{const r=iv(e,t);return av(r)?r:void 0})(t,r);return e.map(({verboseLine:e,verboseObject:t})=>Mv(e,t,n)).filter(e=>void 0!==e).map(e=>Pv(e)).join("")},Mv=(e,t,r)=>{if(void 0===r)return e;const n=r(e,t);return"string"==typeof n?n:void 0},Pv=e=>e.endsWith("\n")?e:`${e}\n`,_v=["piped"],Bv=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:o})=>{const i=Fv({type:e,result:o,verboseInfo:n}),s=$v(t,i),a=Cv(s,n,r);f(Gv,a)},Fv=e=>{let{type:t,result:r,verboseInfo:{escapedCommand:n,commandId:o,rawOptions:{piped:i=!1}}}=e,s=Fb(e.verboseInfo.rawOptions,_v);return{type:t,escapedCommand:n,commandId:`${o}`,timestamp:new Date,piped:i,result:r,options:s}},$v=(e,t)=>e.split("\n").map(e=>Uv(Object.assign(Object.assign({},t),{},{message:e}))),Uv=e=>({verboseLine:(({type:e,message:t,timestamp:r,piped:n,commandId:o,result:{failed:i=!1}={},options:{reject:s=!0}})=>{const a=Rv(r),c=Dv[e]({failed:i,reject:s,piped:n}),l=Lv[e]({reject:s});return`${xv(`[${a}]`)} ${xv(`[${o}]`)} ${l(c)} ${l(t)}`})(e),verboseObject:e}),Gv=2,Wv=e=>{const t="string"==typeof e?e:j(e);return lv(t).replaceAll("\t"," ".repeat(zv))},zv=2,Vv=e=>nv({verbose:e})?Hv++:void 0;let Hv=0n;const Xv=e=>{for(const t of e){if(!1===t)throw new TypeError('The "verbose: false" option was renamed to "verbose: \'none\'".');if(!0===t)throw new TypeError('The "verbose: true" option was renamed to "verbose: \'short\'".');if(!cv.includes(t)&&!av(t)){const e=cv.map(e=>`'${e}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${e} or a function.`)}}},qv=()=>L.bigint(),Kv=e=>Number(L.bigint()-e)/1e6,Yv=(e,t,r)=>{const n=qv(),{command:o,escapedCommand:i}=((e,t)=>{const r=[e,...t];return{command:r.join(" "),escapedCommand:r.map(e=>mv(uv(e))).join(" ")}})(e,t),s=((e,t,r)=>(Xv(e),{verbose:e,escapedCommand:t,commandId:Vv(e),rawOptions:r}))(zb(r,"verbose"),i,Object.assign({},r));return((e,t)=>{nv(t)&&Bv({type:"command",verboseMessage:e,verboseInfo:t})})(i,s),{command:o,escapedCommand:i,startTime:n,verboseInfo:s}};var Jv,Qv,Zv,ew,tw,rw={exports:{}};tw="win32"===process.platform||te.TESTING_WINDOWS?function(){if(Qv)return Jv;Qv=1,Jv=n,n.sync=function(t,n){return r(e.statSync(t),t,n)};var e=t;function r(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;nObject.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),uw=(e,t)=>{const r=t.colon||aw,n=e.match(/\//)||iw&&e.match(/\\/)?[""]:[...iw?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=iw?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=iw?o.split(r):[""];return iw&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},fw=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=uw(e,t),s=[],a=r=>new Promise((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(lw(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=sw.join(l,e),f=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(c(f,r,0))}),c=(e,r,n)=>new Promise((l,u)=>{if(n===o.length)return l(a(r+1));const f=o[n];cw(e+f,{pathExt:i},(o,i)=>{if(!o&&i){if(!t.all)return l(e+f);s.push(e+f)}return l(c(e,r,n+1))})});return r?a(0).then(e=>r(null,e),r):a(0)};var pw=fw;fw.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=uw(e,t),i=[];for(let s=0;s{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};dw.exports=hw,dw.exports.default=hw;var mw=dw.exports;re(mw);const gw=r,yw=pw,bw=mw;function vw(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(e){}let s;try{s=yw.sync(e.command,{path:r[bw({env:r})],pathExt:t?gw.delimiter:void 0})}catch(e){}finally{i&&process.chdir(n)}return s&&(s=gw.resolve(o?e.options.cwd:"",s)),s}var ww=function(e){return vw(e)||vw(e,!0)};re(ww);var Ew={};const Sw=/([()\][%!^"`<>&|;, *?])/g;Ew.command=function(e){return e=e.replace(Sw,"^$1")},Ew.argument=function(e,t){return e=(e=`"${e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(Sw,"^$1"),t&&(e=e.replace(Sw,"^$1")),e};var Ow=/^#!(.*)/;re(Ow);const Iw=Ow;var xw=(e="")=>{const t=e.match(Iw);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o};re(xw);const Tw=t,jw=xw;var Rw=function(e){const t=Buffer.alloc(150);let r;try{r=Tw.openSync(e,"r"),Tw.readSync(r,t,0,150,0),Tw.closeSync(r)}catch(e){}return jw(t.toString())};re(Rw);const Aw=r,Nw=ww,Dw=Ew,kw=Rw,Lw="win32"===process.platform,Cw=/\.(?:com|exe)$/i,Mw=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Pw(e){if(!Lw)return e;const t=function(e){e.file=Nw(e);const t=e.file&&kw(e.file);return t?(e.args.unshift(e.file),e.command=t,Nw(e)):e.file}(e),r=!Cw.test(t);if(e.options.forceShell||r){const r=Mw.test(t);e.command=Aw.normalize(e.command),e.command=Dw.command(e.command),e.args=e.args.map(e=>Dw.argument(e,r));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}var _w=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:Pw(n)};re(_w);const Bw="win32"===process.platform;function Fw(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function $w(e,t){return Bw&&1===e&&!t.file?Fw(t.original,"spawn"):null}var Uw={hookChildProcess:function(e,t){if(!Bw)return;const r=e.emit;e.emit=function(n,o){if("exit"===n){const n=$w(o,t);if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}},verifyENOENT:$w,verifyENOENTSync:function(e,t){return Bw&&1===e&&!t.file?Fw(t.original,"spawnSync"):null},notFoundError:Fw};re(Uw);const Gw=s,Ww=_w,zw=Uw;function Vw(e,t,r){const n=Ww(e,t,r),o=Gw.spawn(n.command,n.args,n.options);return zw.hookChildProcess(o,n),o}rw.exports=Vw,rw.exports.spawn=Vw,rw.exports.sync=function(e,t,r){const n=Ww(e,t,r),o=Gw.spawnSync(n.command,n.args,n.options);return o.error=o.error||zw.verifyENOENTSync(o.status,n),o},rw.exports._parse=Ww,rw.exports._enoent=zw;var Hw=re(rw.exports);function Xw(e={}){const{env:t=process.env,platform:r=process.platform}=e;return"win32"!==r?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"}const qw=["env"],Kw=(e,t)=>{let r;for(;r!==t;)e.push(a.join(t,"node_modules/.bin")),r=t,t=a.resolve(t,"..")},Yw=(e,t,r)=>{const n=t instanceof URL?w(t):t;e.push(a.resolve(r,n,".."))},Jw=(e={})=>{let{env:t=D.env}=e,r=Fb(e,qw);t=Object.assign({},t);const n=Xw({env:t});return r.path=t[n],t[n]=(({cwd:e=D.cwd(),path:t=D.env[Xw()],preferLocal:r=!0,execPath:n=D.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?w(e):e,s=a.resolve(i),c=[];return r&&Kw(c,s),o&&Yw(c,n,s),[...c,t].join(a.delimiter)})(r),t};class Qw extends Error{}const Zw=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,eE,{value:!0,writable:!1,enumerable:!1,configurable:!1})},eE=Symbol("isExecaError"),tE=e=>"[object Error]"===Object.prototype.toString.call(e);class rE extends Error{}Zw(rE,rE.name);class nE extends Error{}Zw(nE,nE.name);var oE=Oe,iE=Map.prototype,sE={Map:Map,set:oE(iE.set),get:oE(iE.get),has:oE(iE.has),remove:oE(iE.delete),proto:iE},aE=sE.has,cE=function(e){return aE(e),e},lE=cE,uE=sE.get,fE=sE.has,pE=sE.set;ri({target:"Map",proto:!0,real:!0,forced:false},{getOrInsert:function(e,t){return fE(lE(this),e)?uE(this,e):(pE(this,e,t),t)}});var dE=vt,hE=cE,mE=sE.get,gE=sE.has,yE=sE.set;ri({target:"Map",proto:!0,real:!0,forced:false},{getOrInsertComputed:function(e,t){if(hE(this),dE(t),gE(this,e))return mE(this,e);0===e&&1/e==-1/0&&(e=0);var r=t(e);return yE(this,e,r),r}});const bE=(e,t)=>({name:`SIGRT${t+1}`,number:vE+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),vE=34,wE=64,EE=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],SE=()=>{const e=(()=>{const e=wE-vE+1;return Array.from({length:e},bE)})();return[...EE,...e].map(OE)},OE=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=$,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},IE=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],xE=(()=>{const e=SE();return Object.fromEntries(e.map(IE))})(),TE=(e,t)=>{const r=jE(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}},jE=(e,t)=>{const r=t.find(({name:t})=>$.signals[t]===e);return void 0!==r?r:t.find(t=>t.number===e)};(()=>{const e=SE(),t=wE+1,r=Array.from({length:t},(t,r)=>TE(r,e));Object.assign({},...r)})();const RE=e=>0===e?e:AE(e,"`subprocess.kill()`'s argument"),AE=(e,t)=>{if(Number.isInteger(e))return NE(e,t);if("string"==typeof e)return kE(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.\n${LE()}`)},NE=(e,t)=>{if(DE.has(e))return DE.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.\n${LE()}`)},DE=new Map(Object.entries($.signals).reverse().map(([e,t])=>[t,e])),kE=(e,t)=>{if(e in $.signals)return e;if(e.toUpperCase()in $.signals)throw new TypeError(`Invalid ${t} '${e}': please rename it to '${e.toUpperCase()}'.`);throw new TypeError(`Invalid ${t} '${e}': this signal name does not exist.\n${LE()}`)},LE=()=>`Available signal names: ${CE()}.\nAvailable signal numbers: ${ME()}.`,CE=()=>Object.keys($.signals).sort().map(e=>`'${e}'`).join(", "),ME=()=>[...new Set(Object.values($.signals).sort((e,t)=>e-t))].join(", "),PE=e=>xE[e].description,_E=5e3,BE=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:o,controller:i},s,a)=>{const{signal:c,error:l}=FE(s,a,r);$E(l,n);const u=e(c);return UE({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:u,context:o,controller:i}),u},FE=(e,t,r)=>{const[n=r,o]=tE(e)?[void 0,e]:[e,t];if("string"!=typeof n&&!Number.isInteger(n))throw new TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(n)}`);if(void 0!==o&&!tE(o))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${o}`);return{signal:RE(n),error:o}},$E=(e,t)=>{void 0!==e&&t.reject(e)},UE=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:o,context:i,controller:s})=>{t===n&&o&&GE({kill:e,forceKillAfterDelay:r,context:i,controllerSignal:s.signal})},GE=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(!1!==t)try{await _(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}},WE=async(e,t)=>{e.aborted||await U(e,"abort",{signal:t})},zE=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:o})=>void 0===t||r?[]:[VE(e,t,n,o)],VE=async(e,t,r,{signal:n})=>{throw await WE(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var HE=Oe,XE=WeakMap.prototype,qE={WeakMap:WeakMap,set:HE(XE.set),get:HE(XE.get),has:HE(XE.has),remove:HE(XE.delete)},KE=qE.has,YE=function(e){return KE(e),e},JE=YE,QE=qE.get,ZE=qE.has,eS=qE.set;ri({target:"WeakMap",proto:!0,real:!0,forced:false},{getOrInsert:function(e,t){return ZE(JE(this),e)?QE(this,e):(eS(this,e,t),t)}});var tS=qE,rS=new tS.WeakMap,nS=tS.set,oS=tS.remove,iS=vt,sS=YE,aS=function(e){return nS(rS,e,1),oS(rS,e),e},cS=qE.get,lS=qE.has,uS=qE.set;ri({target:"WeakMap",proto:!0,real:!0,forced:!function(){try{WeakMap.prototype.getOrInsertComputed&&(new WeakMap).getOrInsertComputed(1,function(){throw 1})}catch(e){return e instanceof TypeError}}()},{getOrInsertComputed:function(e,t){if(sS(this),aS(e),iS(t),lS(this,e))return cS(this,e);var r=t(e);return uS(this,e,r),r}});const fS=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{pS(e,t,r),dS(e,t,n)},pS=(e,t,r)=>{if(!r)throw new Error(`${bS(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},dS=(e,t,r)=>{if(!r)throw new Error(`${bS(e,t)} cannot be used: the ${wS(t)} has already exited or disconnected.`)},hS=(e,t)=>new Error(`${bS("sendMessage",t)} failed when sending an acknowledgment response to the ${wS(t)}.`,{cause:e}),mS=({code:e,message:t})=>gS.has(e)||yS.some(e=>t.includes(e)),gS=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),yS=["could not be cloned","circular structure","call stack size exceeded"],bS=(e,t,r="")=>"cancelSignal"===e?"`cancelSignal`'s `controller.abort()`":`${vS(t)}${e}(${r})`,vS=e=>e?"":"subprocess.",wS=e=>e?"parent process":"subprocess",ES=e=>{e.connected&&e.disconnect()},SS=()=>{const e={},t=new Promise((t,r)=>{Object.assign(e,{resolve:t,reject:r})});return Object.assign(t,e)},OS=(e,t="stdin")=>{const r=!0,{options:n,fileDescriptors:o}=xS.get(e),i=TS(o,t,r),s=e.stdio[i];if(null===s)throw new TypeError(AS(i,t,n,r));return s},IS=(e,t="stdout")=>{const r=!1,{options:n,fileDescriptors:o}=xS.get(e),i=TS(o,t,r),s="all"===i?e.all:e.stdio[i];if(null==s)throw new TypeError(AS(i,t,n,r));return s},xS=new WeakMap,TS=(e,t,r)=>{const n=jS(t,r);return RS(n,t,r,e),n},jS=(e,t)=>{const r=Jb(e);if(void 0!==r)return r;const{validOptions:n,defaultValue:o}=t?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw new TypeError(`"${kS(t)}" must not be "${e}".\nIt must be ${n} or "fd3", "fd4" (and so on).\nIt is optional and defaults to "${o}".`)},RS=(e,t,r,n)=>{const o=n[DS(e)];if(void 0===o)throw new TypeError(`"${kS(r)}" must not be ${t}. That file descriptor does not exist.\nPlease set the "stdio" option to ensure that file descriptor exists.`);if("input"===o.direction&&!r)throw new TypeError(`"${kS(r)}" must not be ${t}. It must be a readable stream, not writable.`);if("input"!==o.direction&&r)throw new TypeError(`"${kS(r)}" must not be ${t}. It must be a writable stream, not readable.`)},AS=(e,t,r,n)=>{if("all"===e&&!r.all)return'The "all" option must be true to use "from: \'all\'".';const{optionName:o,optionValue:i}=NS(e,r);return`The "${o}: ${LS(i)}" option is incompatible with using "${kS(n)}: ${LS(t)}".\nPlease set this option with "pipe" instead.`},NS=(e,{stdin:t,stdout:r,stderr:n,stdio:o})=>{const i=DS(e);return 0===i&&void 0!==t?{optionName:"stdin",optionValue:t}:1===i&&void 0!==r?{optionName:"stdout",optionValue:r}:2===i&&void 0!==n?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${i}]`,optionValue:o[i]}},DS=e=>"all"===e?1:e,kS=e=>e?"to":"from",LS=e=>"string"==typeof e?`'${e}'`:"number"==typeof e?`${e}`:"Stream",CS=(e,t,r)=>{const n=e.getMaxListeners();0!==n&&n!==Number.POSITIVE_INFINITY&&(e.setMaxListeners(n+t),G(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))},MS=(e,t)=>{t&&PS(e)},PS=e=>{e.refCounted()},_S=(e,t)=>{t&&BS(e)},BS=e=>{e.unrefCounted()},FS=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},o)=>{if(KS(o)||dO(o))return;US.has(e)||US.set(e,[]);const i=US.get(e);if(i.push(o),!(i.length>1))for(;i.length>0;){await tO(e,n,o),await B.yield();const s=await qS({wrappedMessage:i[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});i.shift(),n.emit("message",s),n.emit("message:done")}},$S=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:o})=>{mO();const i=US.get(e);for(;i?.length>0;)await U(n,"message:done");e.removeListener("message",o),((e,t)=>{t&&(PS(e),PS(e))})(t,r),n.connected=!1,n.emit("disconnect")},US=new WeakMap,GS=(e,t,r)=>{if(WS.has(e))return WS.get(e);const n=new W;return n.connected=!0,WS.set(e,n),zS({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},WS=new WeakMap,zS=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{const o=FS.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",o),t.once("disconnect",$S.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:o})),((e,t)=>{t&&(BS(e),BS(e))})(r,n)},VS=e=>{const t=WS.get(e);return void 0===t?null!==e.channel:t.connected};let HS=0n;const XS=(e,t)=>{if(t?.type===ZS&&!t.hasListeners)for(const{id:t}of e)void 0!==t&&JS[t].resolve({isDeadlock:!0,hasListeners:!1})},qS=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:o})=>{if(e?.type!==ZS||!t.connected)return e;const{id:i,message:s}=e,a={id:i,type:eO,message:nO(t,o)};try{await iO({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(e){o.emit("strict:error",e)}return s},KS=e=>{if(e?.type!==eO)return!1;const{id:t,message:r}=e;return JS[t]?.resolve({isDeadlock:!1,hasListeners:r}),!0},YS=async(e,t,r)=>{if(e?.type!==ZS)return;const n=SS();JS[e.id]=n;const o=new AbortController;try{const{isDeadlock:e,hasListeners:i}=await Promise.race([n,QS(t,r,o)]);e&&(e=>{throw new Error(`${bS("sendMessage",e)} failed: the ${wS(e)} is sending a message too, instead of listening to incoming messages.\nThis can be fixed by both sending a message and listening to incoming messages at the same time:\n\nconst [receivedMessage] = await Promise.all([\n\t${bS("getOneMessage",e)},\n\t${bS("sendMessage",e,"message, {strict: true}")},\n]);`)})(r),i||(e=>{throw new Error(`${bS("sendMessage",e)} failed: the ${wS(e)} is not listening to incoming messages.`)})(r)}finally{o.abort(),delete JS[e.id]}},JS={},QS=async(e,t,{signal:r})=>{CS(e,1,r),await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${bS("sendMessage",e)} failed: the ${wS(e)} exited without listening to incoming messages.`)})(t)},ZS="execa:ipc:request",eO="execa:ipc:response",tO=async(e,t,r)=>{for(;!nO(e,t)&&rO.get(e)?.size>0;){const t=[...rO.get(e)];XS(t,r),await Promise.all(t.map(({onMessageSent:e})=>e))}},rO=new WeakMap,nO=(e,t)=>t.listenerCount("message")>oO(e),oO=e=>xS.has(e)&&!rv(xS.get(e).options.buffer,"ipc")?1:0,iO=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},o,{strict:i=!1}={})=>{const s="sendMessage";return fS({methodName:s,isSubprocess:r,ipc:n,isConnected:e.connected}),sO({anyProcess:e,channel:t,methodName:s,isSubprocess:r,message:o,strict:i})},sO=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:o,strict:i})=>{const s=(({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:o})=>{if(!o)return n;const i=GS(e,t,r),s=nO(e,i);return{id:HS++,type:ZS,message:n,hasListeners:s}})({anyProcess:e,channel:t,isSubprocess:n,message:o,strict:i}),a=((e,t,r)=>{rO.has(e)||rO.set(e,new Set);const n=rO.get(e),o={onMessageSent:SS(),id:r?t.id:void 0};return n.add(o),{outgoingMessages:n,outgoingMessage:o}})(e,s,i);try{await aO({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:s,message:o})}catch(t){throw ES(e),t}finally{(({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()})(a)}},aO=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:o})=>{const i=cO(e);try{await Promise.all([YS(n,e,r),i(n)])}catch(e){throw(({error:e,methodName:t,isSubprocess:r})=>{if("EPIPE"===e.code)throw new Error(`${bS(t,r)} cannot be used: the ${wS(r)} is disconnecting.`,{cause:e})})({error:e,methodName:t,isSubprocess:r}),(({error:e,methodName:t,isSubprocess:r,message:n})=>{if(mS(e))throw new Error(`${bS(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})})({error:e,methodName:t,isSubprocess:r,message:o}),e}},cO=e=>{if(lO.has(e))return lO.get(e);const t=R(e.send.bind(e));return lO.set(e,t),t},lO=new WeakMap,uO=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await fO({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),gO.signal),fO=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{pO||(pO=!0,n?null!==t?(GS(e,t,r),await B.yield()):mO():(()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")})())};let pO=!1;const dO=e=>e?.type===hO&&(gO.abort(e.message),!0),hO="execa:ipc:cancel",mO=()=>{gO.abort(new Error(`\`cancelSignal\` aborted: the ${wS(!0)} disconnected.`))},gO=new AbortController,yO=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:o,controller:i})=>r?[bO({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:o,controller:i})]:[],bO=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:o}})=>{await WE(t,o);const i=vO(t);throw await((e,t)=>{const r="cancelSignal";return dS(r,!1,e.connected),aO({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:hO,message:t},message:t})})(e,i),GE({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:o}),n.terminationReason??="gracefulCancel",t.reason},vO=({reason:e})=>{if(!(e instanceof DOMException))return e;const t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t},wO=(e,t,r,n)=>0===t||void 0===t?[]:[EO(e,t,r,n)],EO=async(e,t,r,{signal:n})=>{throw await _(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Qw},SO=["node","nodePath","nodeOptions","cwd","execPath"],OO={advanced:e=>{try{H(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:e})}},json:e=>{try{JSON.stringify(e)}catch(e){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:e})}}},IO=async(e,t)=>{void 0!==t&&await e.sendMessage(t)},xO=new Set(["utf8","utf16le"]),TO=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),jO=new Set([...xO,...TO]),RO=e=>{if(null===e)return"buffer";if("string"!=typeof e)return;const t=e.toLowerCase();return t in AO?AO[t]:jO.has(t)?t:void 0},AO={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},NO=e=>"string"==typeof e?`"${e}"`:String(e),DO=()=>{try{return D.cwd()}catch(e){throw e.message=`The current directory does not exist.\n${e.message}`,e}},kO=["extendEnv","preferLocal","cwd","localDir","encoding","reject","cleanup","all","windowsHide","killSignal","forceKillAfterDelay","gracefulCancel","ipcInput","ipc","serialization"],LO=(e,t,r)=>{r.cwd=((e=DO())=>{const t=oh(e,'The "cwd" option');return c(t)})(r.cwd);const[n,o,i]=((e,t,r)=>{let{node:n=!1,nodePath:o=C,nodeOptions:i=M.filter(e=>!e.startsWith("--inspect")),cwd:s,execPath:a}=r,u=Fb(r,SO);if(void 0!==a)throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');const f=oh(o,'The "nodePath" option'),p=c(s,f),d=Object.assign(Object.assign({},u),{},{nodePath:p,node:n,cwd:s});if(!n)return[e,t,d];if("node"===l(e,".exe"))throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[p,[...i,e,...t],Object.assign(Object.assign({ipc:!0},d),{},{shell:!1})]})(e,t,r),{command:s,args:a,options:u}=Hw._parse(n,o,i),f=(e=>{const t=Object.assign({},e);for(const r of tv)t[r]=zb(e,r);return t})(u),p=CO(f);return(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(p),(({encoding:e})=>{if(jO.has(e))return;const t=RO(e);if(void 0!==t)throw new TypeError(`Invalid option \`encoding: ${NO(e)}\`.\nPlease rename it to ${NO(t)}.`);const r=[...jO].map(e=>NO(e)).join(", ");throw new TypeError(`Invalid option \`encoding: ${NO(e)}\`.\nPlease rename it to one of: ${r}.`)})(p),(({ipcInput:e,ipc:t,serialization:r})=>{if(void 0!==e){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");OO[r](e)}})(p),(({cancelSignal:e})=>{if(void 0!==e&&"[object AbortSignal]"!==Object.prototype.toString.call(e))throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)})(p),(({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(void 0===t)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if("json"===n)throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}})(p),p.shell=ih(p.shell),p.env=MO(p),p.killSignal=(e=>{const t="option `killSignal`";if(0===e)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return AE(e,t)})(p.killSignal),p.forceKillAfterDelay=(e=>{if(!1===e)return e;if(!0===e)return _E;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e})(p.forceKillAfterDelay),p.lines=p.lines.map((e,t)=>e&&!TO.has(p.encoding)&&p.buffer[t]),"win32"===D.platform&&"cmd"===l(s,".exe")&&a.unshift("/q"),{file:s,commandArguments:a,options:p}},CO=e=>{let{extendEnv:t=!0,preferLocal:r=!1,cwd:n,localDir:o=n,encoding:i="utf8",reject:s=!0,cleanup:a=!0,all:c=!1,windowsHide:l=!0,killSignal:u="SIGTERM",forceKillAfterDelay:f=!0,gracefulCancel:p=!1,ipcInput:d,ipc:h=void 0!==d||p,serialization:m="advanced"}=e,g=Fb(e,kO);return Object.assign(Object.assign({},g),{},{extendEnv:t,preferLocal:r,cwd:n,localDirectory:o,encoding:i,reject:s,cleanup:a,all:c,windowsHide:l,killSignal:u,forceKillAfterDelay:f,gracefulCancel:p,ipcInput:d,ipc:h,serialization:m})},MO=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:o,nodePath:i})=>{const s=t?Object.assign(Object.assign({},D.env),e):e;return r||n?Jw({env:s,cwd:o,execPath:i,preferLocal:r,addExecPath:n}):s};function PO(e){if("string"==typeof e)return _O(e);if(!ArrayBuffer.isView(e)||1!==e.BYTES_PER_ELEMENT)throw new Error("Input must be a string or a Uint8Array");return BO(e)}const _O=e=>e.at(-1)===FO?e.slice(0,e.at(-2)===UO?-2:-1):e,BO=e=>e.at(-1)===$O?e.subarray(0,e.at(-2)===GO?-2:-1):e,FO="\n",$O=FO.codePointAt(0),UO="\r",GO=UO.codePointAt(0);function WO(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}function zO(e,{checkOpen:t=!0}={}){return WO(e,{checkOpen:t})&&(e.writable||!t)&&"function"==typeof e.write&&"function"==typeof e.end&&"boolean"==typeof e.writable&&"boolean"==typeof e.writableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function VO(e,{checkOpen:t=!0}={}){return WO(e,{checkOpen:t})&&(e.readable||!t)&&"function"==typeof e.read&&"boolean"==typeof e.readable&&"boolean"==typeof e.readableObjectMode&&"function"==typeof e.destroy&&"boolean"==typeof e.destroyed}function HO(e,t){return zO(e,t)&&VO(e,t)}const XO=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class qO{#e;#t;#r=!1;#n=void 0;constructor(e,t){this.#e=e,this.#t=t}next(){const e=()=>this.#o();return this.#n=this.#n?this.#n.then(e,e):e(),this.#n}return(e){const t=()=>this.#i(e);return this.#n?this.#n.then(t,t):t()}async#o(){if(this.#r)return{done:!0,value:void 0};let e;try{e=await this.#e.read()}catch(e){throw this.#n=void 0,this.#r=!0,this.#e.releaseLock(),e}return e.done&&(this.#n=void 0,this.#r=!0,this.#e.releaseLock()),e}async#i(e){if(this.#r)return{done:!0,value:e};if(this.#r=!0,!this.#t){const t=this.#e.cancel(e);return this.#e.releaseLock(),await t,{done:!0,value:e}}return this.#e.releaseLock(),{done:!0,value:e}}}const KO=Symbol();function YO(){return this[KO].next()}function JO(e){return this[KO].return(e)}Object.defineProperty(YO,"name",{value:"next"}),Object.defineProperty(JO,"name",{value:"return"});const QO=Object.create(XO,{next:{enumerable:!0,configurable:!0,writable:!0,value:YO},return:{enumerable:!0,configurable:!0,writable:!0,value:JO}});function ZO({preventCancel:e=!1}={}){const t=this.getReader(),r=new qO(t,e),n=Object.create(QO);return n[KO]=r,n}const eI=e=>{if(VO(e,{checkOpen:!1})&&void 0!==oI.on)return rI(e);if("function"==typeof e?.[Symbol.asyncIterator])return e;if("[object ReadableStream]"===tI.call(e))return ZO.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:tI}=Object.prototype,rI=async function*(e){const t=new AbortController,r={};nI(e,t,r);try{for await(const[r]of oI.on(e,"data",{signal:t.signal}))yield r}catch(e){if(void 0!==r.error)throw r.error;if(!t.signal.aborted)throw e}finally{e.destroy()}},nI=async(e,t,r)=>{try{await oI.finished(e,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(e){r.error=e}finally{t.abort()}},oI={},iI=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{const l=eI(e),u=t();u.length=0;try{for await(const e of l){const t=r[lI(e)](e,u);aI({convertedChunk:t,state:u,getSize:n,truncateChunk:o,addChunk:i,maxBuffer:c})}return sI({state:u,convertChunk:r,getSize:n,truncateChunk:o,addChunk:i,getFinalChunk:s,maxBuffer:c}),a(u)}catch(e){const t="object"==typeof e&&null!==e?e:new Error(e);throw t.bufferedData=a(u),t}},sI=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:o,maxBuffer:i})=>{const s=o(e);void 0!==s&&aI({convertedChunk:s,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:i})},aI=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:o,maxBuffer:i})=>{const s=r(e),a=t.length+s;if(a<=i)return void cI(e,t,o,a);const c=n(e,i-t.length);throw void 0!==c&&cI(c,t,o,i),new fI},cI=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},lI=e=>{const t=typeof e;if("string"===t)return"string";if("object"!==t||null===e)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";const r=uI.call(e);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&"[object ArrayBuffer]"===uI.call(e.buffer)?"typedArray":"others"},{toString:uI}=Object.prototype;class fI extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const pI=e=>e,dI=()=>{},hI=({contents:e})=>e,mI=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},gI=e=>e.length;const yI={init:()=>({contents:[]}),convertChunk:{string:pI,buffer:pI,arrayBuffer:pI,dataView:pI,typedArray:pI,others:pI},getSize:()=>1,truncateChunk:dI,addChunk:(e,{contents:t})=>(t.push(e),t),getFinalChunk:dI,finalize:hI};const bI=new TextEncoder,vI=e=>new Uint8Array(e),wI=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),EI=(e,t)=>{if(t<=e.byteLength)return e;const r=new ArrayBuffer(OI(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},SI=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;const r=new ArrayBuffer(t,{maxByteLength:OI(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},OI=e=>II**Math.ceil(Math.log(e)/Math.log(II)),II=2,xI=()=>"resize"in ArrayBuffer.prototype,TI={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:e=>bI.encode(e),buffer:vI,arrayBuffer:vI,dataView:wI,typedArray:wI,others:mI},getSize:gI,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t,length:r},n)=>{const o=xI()?SI(t,n):EI(t,n);return new Uint8Array(o).set(e,r),o},getFinalChunk:dI,finalize:({contents:e,length:t})=>xI()?e:e.slice(0,t)};const jI=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),RI={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:pI,buffer:jI,arrayBuffer:jI,dataView:jI,typedArray:jI,others:mI},getSize:gI,truncateChunk:(e,t)=>e.slice(0,t),addChunk:(e,{contents:t})=>t+e,getFinalChunk:({textDecoder:e})=>{const t=e.decode();return""===t?void 0:t},finalize:hI},AI=(e,t,r)=>e?"objects":t?"lines":"buffer"===r?"bytes":"characters",NI=(e,t,r)=>{if(t.length!==r)return;const n=new fI;throw n.maxBufferInfo={fdNumber:"ipc"},n},DI=(e,t)=>{if(void 0===e?.maxBufferInfo)return{streamName:"output",threshold:t[1],unit:"bytes"};const{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;const o=rv(t,r);return"ipc"===r?{streamName:"IPC output",threshold:o,unit:"messages"}:{streamName:Wb(r),threshold:o,unit:n}},kI=([,e])=>e,LI=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:o,errorCode:i,signal:s,signalDescription:a,exitCode:c,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:f,forceKillAfterDelay:p,killSignal:d})=>{const h=CI(f,p);return t?`Command timed out after ${r} milliseconds${h}`:u?void 0===s?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${h}`:`Command was gracefully canceled with ${s} (${a})`:l?`Command was canceled${h}`:n?`${((e,t)=>{const{streamName:r,threshold:n,unit:o}=DI(e,t);return`Command's ${r} was larger than ${n} ${o}`})(e,o)}${h}`:void 0!==i?`Command failed with ${i}${h}`:f?`Command was killed with ${d} (${PE(d)})${h}`:void 0!==s?`Command was killed with ${s} (${a})`:void 0!==c?`Command failed with exit code ${c}`:"Command failed"},CI=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",MI=(e,t)=>{if(e instanceof Qw)return;const r=tE(n=e)&&eE in n?e.originalMessage:String(e?.message??e);var n;const o=lv(((e,t)=>{if(t===DO())return e;let r;try{r=p(t)}catch(r){return`The "cwd" option is invalid: ${t}.\n${r.message}\n${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.\n${e}`})(r,t));return""===o?void 0:o},PI=e=>"string"==typeof e?e:j(e),_I=e=>Array.isArray(e)?e.map(e=>PO(BI(e))).filter(Boolean).join("\n"):BI(e),BI=e=>"string"==typeof e?e:Eb(e)?Tb(e):"",FI=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:o,options:{cwd:i},startTime:s})=>WI({command:e,escapedCommand:t,cwd:i,durationMs:Kv(s),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:r[1],stderr:r[2],all:n,stdio:r,ipcOutput:o,pipedFrom:[]}),$I=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:s})=>UI({error:e,command:t,escapedCommand:r,startTime:i,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:n.length}),ipcOutput:[],options:o,isSync:s}),UI=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,stdio:f,all:p,ipcOutput:d,options:{timeoutDuration:h,timeout:m=h,forceKillAfterDelay:g,killSignal:y,cwd:b,maxBuffer:v},isSync:w})=>{const{exitCode:E,signal:S,signalDescription:O}=zI(l,u),{originalMessage:I,shortMessage:x,message:T}=(({stdio:e,all:t,ipcOutput:r,originalError:n,signal:o,signalDescription:i,exitCode:s,escapedCommand:a,timedOut:c,isCanceled:l,isGracefullyCanceled:u,isMaxBuffer:f,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:h,maxBuffer:m,timeout:g,cwd:y})=>{const b=n?.code,v=LI({originalError:n,timedOut:c,timeout:g,isMaxBuffer:f,maxBuffer:m,errorCode:b,signal:o,signalDescription:i,exitCode:s,isCanceled:l,isGracefullyCanceled:u,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:h}),w=MI(n,y),E=`${v}: ${a}${void 0===w?"":`\n${w}`}`,S=[E,...void 0===t?[e[2],e[1]]:[t],...e.slice(3),r.map(e=>PI(e)).join("\n")].map(e=>lv(PO(_I(e)))).filter(Boolean).join("\n\n");return{originalMessage:w,shortMessage:E,message:S}})({stdio:f,all:p,ipcOutput:d,originalError:e,signal:S,signalDescription:O,exitCode:E,escapedCommand:r,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:g,killSignal:y,maxBuffer:v,timeout:m,cwd:b}),j=((e,t,r)=>new(r?nE:rE)(t,e instanceof Qw?{}:{cause:e}))(e,T,w);return Object.assign(j,GI({error:j,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:E,signal:S,signalDescription:O,stdio:f,all:p,ipcOutput:d,cwd:b,originalMessage:I,shortMessage:x})),j},GI=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:f,stdio:p,all:d,ipcOutput:h,cwd:m,originalMessage:g,shortMessage:y})=>WI({shortMessage:y,originalMessage:g,command:t,escapedCommand:r,cwd:m,durationMs:Kv(n),failed:!0,timedOut:o,isCanceled:i,isGracefullyCanceled:s,isTerminated:void 0!==u,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:l,signal:u,signalDescription:f,code:e.cause?.code,stdout:p[1],stderr:p[2],all:d,stdio:p,ipcOutput:h,pipedFrom:[]}),WI=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e)),zI=(e,t)=>{const r=null===t?void 0:t;return{exitCode:null===e?void 0:e,signal:r,signalDescription:void 0===r?void 0:PE(t)}},VI=e=>Number.isFinite(e)?e:0;function HI(e){switch(typeof e){case"number":if(Number.isFinite(e))return function(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(VI(1e3*e)%1e3),nanoseconds:Math.trunc(VI(1e6*e)%1e3)}}(e);break;case"bigint":return function(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}(e)}throw new TypeError("Expected a finite number or bigint")}function XI(e,t){const r="bigint"==typeof e;if(!r&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");(t=Object.assign({},t)).colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let n=[];const o=(e,r,o,i)=>{if(0!==n.length&&t.colonNotation||!(e=>0===e||0n===e)(e)||t.colonNotation&&"m"===o){if(i=i??String(e),t.colonNotation){const e=i.includes(".")?i.split(".")[0].length:i.length,t=n.length>0?2:1;i="0".repeat(Math.max(0,t-e))+i}else i+=t.verbose?" "+((e,t)=>1===t||1n===t?e:`${e}s`)(r,e):o;n.push(i)}},i=HI(e),s=BigInt(i.days);if(o(s/365n,"year","y"),o(s%365n,"day","d"),o(Number(i.hours),"hour","h"),o(Number(i.minutes),"minute","m"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const e=Number(i.seconds),r=Number(i.milliseconds),n=Number(i.microseconds),s=Number(i.nanoseconds);if(o(e,"second","s"),t.formatSubMilliseconds)o(r,"millisecond","ms"),o(n,"microsecond","µs"),o(s,"nanosecond","ns");else{const e=r+n/1e3+s/1e6,i="number"==typeof t.millisecondsDecimalDigits?t.millisecondsDecimalDigits:0,a=e>=1?Math.round(e):Math.ceil(e),c=i?e.toFixed(i):a;o(Number.parseFloat(c),"millisecond","ms",c)}}else{const n=((e,t)=>{const r=Math.floor(e*10**t+1e-7);return(Math.round(r)/10**t).toFixed(t)})((r?Number(e%86400000n):e)/1e3%60,"number"==typeof t.secondsDecimalDigits?t.secondsDecimalDigits:1),i=t.keepDecimalsOnWholeSeconds?n:n.replace(/\.0+$/,"");o(Number.parseFloat(i),"second","s",i)}if(0===n.length)return"0"+(t.verbose?" milliseconds":"ms");const a=t.colonNotation?":":" ";return"number"==typeof t.unitCount&&(n=n.slice(0,Math.max(t.unitCount,1))),n.join(a)}const qI=(e,t)=>{nv(t)&&(((e,t)=>{e.failed&&Bv({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})})(e,t),KI(e,t))},KI=(e,t)=>{const r=`(done in ${XI(e.durationMs)})`;Bv({type:"duration",verboseMessage:r,verboseInfo:t,result:e})},YI=(e,t,{reject:r})=>{if(qI(e,t),e.failed&&r)throw e;return e},JI=(e,t)=>sx(e)?"asyncGenerator":ax(e)?"generator":lx(e)?"fileUrl":ux(e)?"filePath":mx(e)?"webStream":WO(e,{checkOpen:!1})?"native":Eb(e)?"uint8Array":yx(e)?"asyncIterable":bx(e)?"iterable":gx(e)?ex({transform:e},t):cx(e)?QI(e,t):"native",QI=(e,t)=>HO(e.transform,{checkOpen:!1})?ZI(e,t):gx(e.transform)?ex(e,t):nx(e,t),ZI=(e,t)=>(tx(e,t,"Duplex stream"),"duplex"),ex=(e,t)=>(tx(e,t,"web TransformStream"),"webTransform"),tx=({final:e,binary:t,objectMode:r},n,o)=>{rx(e,`${n}.final`,o),rx(t,`${n}.binary`,o),ox(r,`${n}.objectMode`)},rx=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},nx=({transform:e,final:t,binary:r,objectMode:n},o)=>{if(void 0!==e&&!ix(e))throw new TypeError(`The \`${o}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(HO(t,{checkOpen:!1}))throw new TypeError(`The \`${o}.final\` option must not be a Duplex stream.`);if(gx(t))throw new TypeError(`The \`${o}.final\` option must not be a web TransformStream.`);if(void 0!==t&&!ix(t))throw new TypeError(`The \`${o}.final\` option must be a generator.`);return ox(r,`${o}.binary`),ox(n,`${o}.objectMode`),sx(e)||sx(t)?"asyncGenerator":"generator"},ox=(e,t)=>{if(void 0!==e&&"boolean"!=typeof e)throw new TypeError(`The \`${t}\` option must use a boolean.`)},ix=e=>sx(e)||ax(e),sx=e=>"[object AsyncGeneratorFunction]"===Object.prototype.toString.call(e),ax=e=>"[object GeneratorFunction]"===Object.prototype.toString.call(e),cx=e=>Kd(e)&&(void 0!==e.transform||void 0!==e.final),lx=e=>"[object URL]"===Object.prototype.toString.call(e),ux=e=>Kd(e)&&1===Object.keys(e).length&&fx(e.file),fx=e=>"string"==typeof e,px=new Set(["ipc","ignore","inherit","overlapped","pipe"]),dx=e=>"[object ReadableStream]"===Object.prototype.toString.call(e),hx=e=>"[object WritableStream]"===Object.prototype.toString.call(e),mx=e=>dx(e)||hx(e),gx=e=>dx(e?.readable)&&hx(e?.writable),yx=e=>vx(e)&&"function"==typeof e[Symbol.asyncIterator],bx=e=>vx(e)&&"function"==typeof e[Symbol.iterator],vx=e=>"object"==typeof e&&null!==e,wx=new Set(["generator","asyncGenerator","duplex","webTransform"]),Ex=new Set(["fileUrl","filePath","fileNumber"]),Sx=new Set(["fileUrl","filePath"]),Ox=new Set([...Sx,"webStream","nodeStream"]),Ix=new Set(["webTransform","duplex"]),xx={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"},Tx=(e,t,r,n)=>"output"===n?jx(e,t,r):Rx(e,t,r),jx=(e,t,r)=>{const n=0!==t&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},Rx=(e,t,r)=>{const n=0===t?!0===e:r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:t!==r.length-1&&(e??n)}},Ax=(e,t,r,{encoding:n})=>{const o=e.filter(({type:e})=>wx.has(e)),i=Array.from({length:o.length});for(const[e,s]of Object.entries(o))i[e]=Nx({stdioItem:s,index:Number(e),newTransforms:i,optionName:t,direction:r,encoding:n});return Cx(i,r)},Nx=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:o,direction:i,encoding:s})=>"duplex"===t?Dx({stdioItem:e,optionName:o}):"webTransform"===t?kx({stdioItem:e,index:r,newTransforms:n,direction:i}):Lx({stdioItem:e,index:r,newTransforms:n,direction:i,encoding:s}),Dx=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:o=n}},optionName:i})=>{if(o&&!n)throw new TypeError(`The \`${i}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!o&&n)throw new TypeError(`The \`${i}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return Object.assign(Object.assign({},e),{},{value:{transform:t,writableObjectMode:r,readableObjectMode:n}})},kx=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o})=>{const{transform:i,objectMode:s}=Kd(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=Tx(s,r,n,o);return Object.assign(Object.assign({},e),{},{value:{transform:i,writableObjectMode:a,readableObjectMode:c}})},Lx=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:o,encoding:i})=>{const{transform:s,final:a,binary:c=!1,preserveNewlines:l=!1,objectMode:u}=Kd(t)?t:{transform:t},f=c||TO.has(i),{writableObjectMode:p,readableObjectMode:d}=Tx(u,r,n,o);return Object.assign(Object.assign({},e),{},{value:{transform:s,final:a,binary:f,preserveNewlines:l,writableObjectMode:p,readableObjectMode:d}})},Cx=(e,t)=>"input"===t?e.reverse():e,Mx=({type:e,value:t},r)=>Px[r]??Fx[e](t),Px=["input","output","output"],_x=()=>{},Bx=()=>"input",Fx={generator:_x,asyncGenerator:_x,fileUrl:_x,filePath:_x,iterable:Bx,asyncIterable:Bx,uint8Array:Bx,webStream:e=>hx(e)?"output":"input",nodeStream:e=>VO(e,{checkOpen:!1})?zO(e,{checkOpen:!1})?void 0:"input":"output",webTransform:_x,duplex:_x,native(e){const t=$x(e);return void 0!==t?t:WO(e,{checkOpen:!1})?Fx.nodeStream(e):void 0}},$x=e=>[0,D.stdin].includes(e)?"input":[1,2,D.stdout,D.stderr].includes(e)?"output":void 0,Ux="output",Gx=["stdio","ipc","buffer"],Wx=(e,t)=>{if(void 0===e)return Gb.map(e=>t[e]);if(zx(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Gb.map(e=>`\`${e}\``).join(", ")}`);if("string"==typeof e)return[e,e,e];if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,Gb.length);return Array.from({length:r},(t,r)=>e[r])},zx=e=>Gb.some(t=>void 0!==e[t]),Vx=(e,t)=>Array.isArray(e)?e.map(e=>Vx(e,t)):null==e?t>=Gb.length?"ignore":"pipe":e,Hx=(e,t,r)=>e.map((e,n)=>t[n]||0===n||ov(r,n)||!Xx(e)?e:"ignore"),Xx=e=>"pipe"===e||Array.isArray(e)&&e.every(e=>"pipe"===e),qx=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:o})=>{const i=Kx({value:t,optionName:r,fdNumber:n,direction:o});if(void 0!==i)return i;if(WO(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},Kx=({value:e,optionName:t,fdNumber:r,direction:n})=>{const o=Yx(e,r);if(void 0!==o){if("output"===n)return{type:"fileNumber",value:o,optionName:t};if(P.isatty(o))throw new TypeError(`The \`${t}: ${LS(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Sb(d(o)),optionName:t}}},Yx=(e,t)=>{if("inherit"===e)return t;if("number"==typeof e)return e;const r=Ub.indexOf(e);return-1!==r?r:void 0},Jx=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>"inherit"===t?{type:"nodeStream",value:Qx(n,t,r),optionName:r}:"number"==typeof t?{type:"nodeStream",value:Qx(t,t,r),optionName:r}:WO(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Qx=(e,t,r)=>{const n=Ub[e];if(void 0===n)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n},Zx=({input:e,inputFile:t},r)=>0===r?[...eT(e),...rT(t)]:[],eT=e=>void 0===e?[]:[{type:tT(e),value:e,optionName:"input"}],tT=e=>{if(VO(e,{checkOpen:!1}))return"nodeStream";if("string"==typeof e)return"string";if(Eb(e))return"uint8Array";throw new Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},rT=e=>void 0===e?[]:[Object.assign(Object.assign({},nT(e)),{},{optionName:"inputFile"})],nT=e=>{if(lx(e))return{type:"fileUrl",value:e};if(fx(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var oT=fe,iT=Cr,sT=_s,aT=Qa,cT=ri,lT=fe,uT=vt,fT=Cr,pT=_s,dT=function(e,t){t&&"string"==typeof e||iT(e);var r=aT(e);return sT(iT(void 0!==r?oT(r,e):e))},hT=la,mT=Gs,gT=ma;var yT=!da("flatMap",function(){}),bT=!yT&&gT("flatMap",TypeError),vT=yT||bT||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e.return()}catch(e){return!0}}(),wT=hT(function(){for(var e,t,r=this.iterator,n=this.mapper;;){if(t=this.inner)try{if(!(e=fT(lT(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){mT(r,"throw",e)}if(e=fT(lT(this.next,r)),this.done=!!e.done)return;try{this.inner=dT(n(e.value,this.counter++),!1)}catch(e){mT(r,"throw",e)}}});cT({target:"Iterator",proto:!0,real:!0,forced:vT},{flatMap:function(e){fT(this);try{uT(e)}catch(e){mT(this,"throw",e)}return bT?lT(bT,this,e):new wT(pT(this),{mapper:e,inner:null})}});const ET=(e,t)=>e.flatMap(({direction:e,stdioItems:r})=>r.filter(e=>e.type===t).map(t=>Object.assign(Object.assign({},t),{},{direction:e}))),ST=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{Sx.has(t)&&OT({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})},OT=({otherStdioItems:e,type:t,value:r,optionName:n,direction:o})=>{const i=e.filter(e=>IT(e,r));if(0===i.length)return;const s=i.find(e=>e.direction!==o);return TT(s,n,t),"output"===o?i[0].stream:void 0},IT=({type:e,value:t},r)=>"filePath"===e?t.file===r.file:"fileUrl"===e?t.href===r.href:t===r,xT=({otherStdioItems:e,type:t,value:r,optionName:n})=>{const o=e.find(({value:{transform:e}})=>e===r.transform);TT(o,n,t)},TT=(e,t,r)=>{if(void 0!==e)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${xx[r]} that is the same.`)},jT=(e,t,r,n)=>{const o=((e,t,r)=>{let{stdio:n,ipc:o,buffer:i}=e,s=Fb(e,Gx);const a=Wx(n,s).map((e,t)=>Vx(e,t));return r?Hx(a,i,t):((e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e)(a,o)})(t,r,n),i=o.map((e,r)=>RT({stdioOption:e,fdNumber:r,options:t,isSync:n})),s=PT({initialFileDescriptors:i,addProperties:e,options:t,isSync:n});return t.stdio=s.map(({stdioItems:e})=>$T(e)),s},RT=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{const o=Wb(t),{stdioItems:i,isStdioArray:s}=AT({stdioOption:e,fdNumber:t,options:r,optionName:o}),a=((e,t,r)=>{const n=e.map(e=>Mx(e,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??Ux})(i,t,o),c=i.map(e=>(({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:o,isSync:i})=>r&&"native"===t?i?qx({stdioItem:e,fdNumber:n,direction:o}):Jx({stdioItem:e,fdNumber:n}):e)({stdioItem:e,isStdioArray:s,fdNumber:t,direction:a,isSync:n})),l=((e,t,r,n)=>[...e.filter(({type:e})=>!wx.has(e)),...Ax(e,t,r,n)])(c,o,a,r),u=((e,t)=>{const r=e.findLast(({type:e})=>wx.has(e));return void 0!==r&&("input"===t?r.value.writableObjectMode:r.value.readableObjectMode)})(l,a);return MT(l,u),{direction:a,objectMode:u,stdioItems:l}},AT=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{const o=(e=>e.filter((t,r)=>e.every((e,n)=>t.value!==e.value||r>=n||"generator"===t.type||"asyncGenerator"===t.type)))([...(Array.isArray(e)?e:[e]).map(e=>NT(e,n)),...Zx(r,t)]),i=o.length>1;return DT(o,i,n),LT(o),{stdioItems:o,isStdioArray:i}},NT=(e,t)=>({type:JI(e,t),value:e,optionName:t}),DT=(e,t,r)=>{if(0===e.length)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t)for(const{value:t,optionName:r}of e)if(kT.has(t))throw new Error(`The \`${r}\` option must not include \`${t}\`.`)},kT=new Set(["ignore","ipc"]),LT=e=>{for(const t of e)CT(t)},CT=({type:e,value:t,optionName:r})=>{if((e=>lx(e)&&"file:"!==e.protocol)(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.\nFor example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(((e,t)=>"native"===e&&"string"==typeof t&&!px.has(t))(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},MT=(e,t)=>{if(!t)return;const r=e.find(({type:e})=>Ex.has(e));if(void 0!==r)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},PT=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{const o=[];try{for(const i of e)o.push(_T({fileDescriptor:i,fileDescriptors:o,addProperties:t,options:r,isSync:n}));return o}catch(e){throw FT(o),e}},_T=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:o,options:i,isSync:s})=>{const a=r.map(t=>BT({stdioItem:t,addProperties:o,direction:e,options:i,fileDescriptors:n,isSync:s}));return{direction:e,objectMode:t,stdioItems:a}},BT=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:o,isSync:i})=>{const s=(({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:o,isSync:i})=>{const s=ET(o,e);if(0!==s.length){if(!i)return Ox.has(e)?OT({otherStdioItems:s,type:e,value:t,optionName:r,direction:n}):void(Ix.has(e)&&xT({otherStdioItems:s,type:e,value:t,optionName:r}));ST({otherStdioItems:s,type:e,value:t,optionName:r,direction:n})}})({stdioItem:e,direction:r,fileDescriptors:o,isSync:i});return void 0!==s?Object.assign(Object.assign({},e),{},{stream:s}):Object.assign(Object.assign({},e),t[r][e.type](e,n))},FT=e=>{for(const{stdioItems:t}of e)for(const{stream:e}of t)void 0===e||$b(e)||e.destroy()},$T=e=>{if(e.length>1)return e.some(({value:e})=>"overlapped"===e)?"overlapped":"pipe";const[{type:t,value:r}]=e;return"native"===t?r:"pipe"},UT=({type:e,optionName:t})=>{GT(t,xx[e])},GT=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},WT={generator(){},asyncGenerator:UT,webStream:UT,nodeStream:UT,webTransform:UT,duplex:UT,asyncIterable:UT,native:({optionName:e,value:t})=>("ipc"!==t&&"overlapped"!==t||GT(e,`"${t}"`),{})},zT={input:Object.assign(Object.assign({},WT),{},{fileUrl:({value:e})=>({contents:[Sb(d(e))]}),filePath:({value:{file:e}})=>({contents:[Sb(d(e))]}),fileNumber:UT,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})}),output:Object.assign(Object.assign({},WT),{},{fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e}})=>({path:e}),fileNumber:({value:e})=>({path:e}),iterable:UT,string:UT,uint8Array:UT})},VT=(e,{stripFinalNewline:t},r)=>HT(t,r)&&void 0!==e&&!Array.isArray(e)?PO(e):e,HT=(e,t)=>"all"===t?e[1]||e[2]:e[t],XT=(e,t,r,n)=>e||r?void 0:YT(t,n),qT=(e,t,r)=>r?e.flatMap(e=>KT(e,t)):KT(e,t),KT=(e,t)=>{const{transform:r,final:n}=YT(t,{});return[...r(e),...n()]},YT=(e,t)=>(t.previousChunks="",{transform:JT.bind(void 0,t,e),final:ZT.bind(void 0,t)}),JT=function*(e,t,r){if("string"!=typeof r)return void(yield r);let{previousChunks:n}=e,o=-1;for(let i=0;i0&&(a=rj(n,a),n=""),yield a,o=i}o!==r.length-1&&(n=rj(n,r.slice(o+1))),e.previousChunks=n},QT=(e,t,r,n)=>r?0:(n.isWindowsNewline=0!==t&&"\r"===e[t-1],n.isWindowsNewline?2:1),ZT=function*({previousChunks:e}){e.length>0&&(yield e)},ej=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:tj.bind(void 0,n)},tj=function*({isWindowsNewline:e=!1},t){const{unixNewline:r,windowsNewline:n,LF:o,concatBytes:i}="string"==typeof t?nj:oj;if(t.at(-1)===o)return void(yield t);const s=e?n:r;yield i(t,s)},rj=(e,t)=>`${e}${t}`,nj={windowsNewline:"\r\n",unixNewline:"\n",LF:"\n",concatBytes:rj},oj={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:(e,t)=>{const r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r}},ij=(e,t)=>e?void 0:sj.bind(void 0,t),sj=function*(e,t){if("string"!=typeof t&&!Eb(t)&&!Z.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},aj=(e,t)=>e?cj.bind(void 0,t):lj.bind(void 0,t),cj=function*(e,t){uj(e,t),yield t},lj=function*(e,t){if(uj(e,t),"string"!=typeof t&&!Eb(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},uj=(e,t)=>{if(null==t)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.\nInstead, \`yield\` should either be called with a value, or not be called at all. For example:\n if (condition) { yield value; }`)},fj=(e,t,r)=>{if(r)return;if(e)return{transform:pj.bind(void 0,new TextEncoder)};const n=new I(t);return{transform:dj.bind(void 0,n),final:hj.bind(void 0,n)}},pj=function*(e,t){Z.isBuffer(t)?yield Sb(t):"string"==typeof t?yield e.encode(t):yield t},dj=function*(e,t){yield Eb(t)?e.write(t):t},hj=function*(e){const t=e.end();""!==t&&(yield t)},mj=A(async(e,t,r,n)=>{t.currentIterable=e(...r);try{for await(const e of t.currentIterable)n.push(e)}finally{delete t.currentIterable}}),gj=async function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=wj}=t[r];for await(const o of n(e))yield*gj(o,t,r+1)},yj=async function*(e){for(const[t,{final:r}]of Object.entries(e))yield*bj(r,Number(t),e)},bj=async function*(e,t,r){if(void 0!==e)for await(const n of e())yield*gj(n,r,t+1)},vj=A(async({currentIterable:e},t)=>{if(void 0===e){if(t)throw t}else await(t?e.throw(t):e.return())}),wj=function*(e){yield e},Ej=(e,t,r,n)=>{try{for(const n of e(...t))r.push(n);n()}catch(e){n(e)}},Sj=(e,t)=>[...t.flatMap(t=>[...Oj(t,e,0)]),...Ij(e)],Oj=function*(e,t,r){if(r===t.length)return void(yield e);const{transform:n=Tj}=t[r];for(const o of n(e))yield*Oj(o,t,r+1)},Ij=function*(e){for(const[t,{final:r}]of Object.entries(e))yield*xj(r,Number(t),e)},xj=function*(e,t,r){if(void 0!==e)for(const n of e())yield*Oj(n,r,t+1)},Tj=function*(e){yield e},jj=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:o},optionName:i},{encoding:s})=>{const a={},c=Aj(e,s,i),l=sx(t),u=sx(r),f=l?mj.bind(void 0,gj,a):Ej.bind(void 0,Oj),p=l||u?mj.bind(void 0,yj,a):Ej.bind(void 0,Ij),d=l||u?vj.bind(void 0,a):void 0;return{stream:new X({writableObjectMode:n,writableHighWaterMark:q(n),readableObjectMode:o,readableHighWaterMark:q(o),transform(e,t,r){f([e,c,0],this,r)},flush(e){p([c],this,e)},destroy:d})}},Rj=(e,t,r,n)=>{const o=t.filter(({type:e})=>"generator"===e),i=n?o.reverse():o;for(const{value:t,optionName:n}of i){const o=Aj(t,r,n);e=Sj(o,e)}return e},Aj=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:o,preserveNewlines:i},s,a)=>{const c={};return[{transform:ij(n,a)},fj(r,s,n),XT(r,i,n,c),{transform:e,final:t},{transform:aj(o,a)},ej({binary:r,preserveNewlines:i,readableObjectMode:o,state:c})].filter(Boolean)},Nj=e=>new Set(Object.entries(e).filter(([,{direction:e}])=>"input"===e).map(([e])=>Number(e))),Dj=(e,t,r)=>{const{stdioItems:n}=e[t],o=n.filter(({contents:e})=>void 0!==e);if(0===o.length)return;if(0!==t){const[{type:e,optionName:t}]=o;throw new TypeError(`Only the \`stdin\` option, not \`${t}\`, can be ${xx[e]} with synchronous methods.`)}const i=o.map(({contents:e})=>e).map(e=>kj(e,n));r.input=Rb(i)},kj=(e,t)=>{const r=Rj(e,t,"utf8",!0);return Lj(r),Rb(r)},Lj=e=>{const t=e.find(e=>"string"!=typeof e&&!Eb(e));if(void 0!==t)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)},Cj=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>"all"!==n&&ov(r,n)&&!TO.has(t)&&Mj(n)&&(e.some(({type:e,value:t})=>"native"===e&&Pj.has(t))||e.every(({type:e})=>wx.has(e))),Mj=e=>1===e||2===e,Pj=new Set(["pipe","overlapped"]),_j=e=>e._readableState.pipes.length>0,Bj=(e,t,r)=>{const n=Wv(e);Bv({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})},Fj=({result:e,fileDescriptors:t,fdNumber:r,state:n,outputFiles:o,isMaxBuffer:i,verboseInfo:s},{buffer:a,encoding:c,lines:l,stripFinalNewline:u,maxBuffer:f})=>{if(null===e)return;const p=((e,t,r)=>{if(!t)return e;const n=kI(r);return e.length>n?e.slice(0,n):e})(e,i,f),d=Sb(p),{stdioItems:h,objectMode:m}=t[r],g=$j([d],h,c,n),{serializedResult:y,finalResult:b=y}=Uj({chunks:g,objectMode:m,encoding:c,lines:l,stripFinalNewline:u,fdNumber:r});Gj({serializedResult:y,fdNumber:r,state:n,verboseInfo:s,encoding:c,stdioItems:h,objectMode:m});const v=a[r]?b:void 0;try{return void 0===n.error&&Wj(y,h,o),v}catch(e){return n.error=e,v}},$j=(e,t,r,n)=>{try{return Rj(e,t,r,!1)}catch(t){return n.error=t,e}},Uj=({chunks:e,objectMode:t,encoding:r,lines:n,stripFinalNewline:o,fdNumber:i})=>{if(t)return{serializedResult:e};if("buffer"===r)return{serializedResult:Rb(e)};const s=((e,t)=>jb(e,t).join(""))(e,r);return n[i]?{serializedResult:s,finalResult:qT(s,!o[i],t)}:{serializedResult:s}},Gj=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:o,stdioItems:i,objectMode:s})=>{if(!Cj({stdioItems:i,encoding:o,verboseInfo:n,fdNumber:t}))return;const a=qT(e,!1,s);try{((e,t,r)=>{for(const n of e)Bj(n,t,r)})(a,t,n)}catch(e){r.error??=e}},Wj=(e,t,r)=>{for(const{path:n}of t.filter(({type:e})=>Ex.has(e))){const t="string"==typeof n?n:n.toString();r.has(t)?h(n,e):(r.add(t),f(n,e))}},zj=async e=>{const[t,r]=await Promise.allSettled([U(e,"spawn"),U(e,"exit")]);return"rejected"===t.status?[]:"rejected"===r.status?Vj(e):r.value},Vj=async e=>{try{return await U(e,"exit")}catch{return Vj(e)}},Hj=async e=>{const[t,r]=await e;if(!Xj(t,r)&&qj(t,r))throw new Qw;return[t,r]},Xj=(e,t)=>void 0===e&&void 0===t,qj=(e,t)=>0!==e||null!==t,Kj=({error:e,status:t,signal:r,output:n},{maxBuffer:o})=>{const i=Yj(e,t,r),s="ETIMEDOUT"===i?.code,a=((e,t,r)=>"ENOBUFS"===e?.code&&null!==t&&t.some(e=>null!==e&&e.length>kI(r)))(i,n,o);return{resultError:i,exitCode:t,signal:r,timedOut:s,isMaxBuffer:a}},Yj=(e,t,r)=>void 0!==e?e:qj(t,r)?new Qw:void 0,Jj=["encoding","maxBuffer"],Qj=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=Yv(e,t,r),a=Zj(r),{file:c,commandArguments:l,options:u}=LO(e,t,a);eR(u);const f=((e,t)=>jT(zT,e,t,!0))(u,s);return{file:c,commandArguments:l,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:f}},Zj=e=>e.node&&!e.ipc?Object.assign(Object.assign({},e),{},{ipc:!1}):e,eR=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&tR("ipcInput"),e&&tR("ipc: true"),r&&tR("detached: true"),n&&tR("cancelSignal")},tR=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},rR=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,verboseInfo:i,fileDescriptors:s,startTime:a})=>{const c=nR({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:s,startTime:a});if(c.failed)return c;const{resultError:l,exitCode:u,signal:f,timedOut:p,isMaxBuffer:d}=Kj(c,r),{output:h,error:m=l}=(({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:o})=>{if(null===t)return{output:Array.from({length:3})};const i={},s=new Set([]),a=t.map((t,a)=>Fj({result:t,fileDescriptors:e,fdNumber:a,state:i,outputFiles:s,isMaxBuffer:n,verboseInfo:o},r));return Object.assign({output:a},i)})({fileDescriptors:s,syncResult:c,options:r,isMaxBuffer:d,verboseInfo:i}),g=h.map((e,t)=>VT(e,r,t)),y=VT((([,e,t],r)=>{if(r.all)return void 0===e?t:void 0===t?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,VT(t,r,"all")]:Array.isArray(t)?[VT(e,r,"all"),...t]:Eb(e)&&Eb(t)?Nb([e,t]):`${e}${t}`})(h,r),r,"all");return iR({error:m,exitCode:u,signal:f,timedOut:p,isMaxBuffer:d,stdio:g,all:y,options:r,command:n,escapedCommand:o,startTime:a})},nR=({file:e,commandArguments:t,options:r,command:n,escapedCommand:o,fileDescriptors:i,startTime:s})=>{try{((e,t)=>{for(const r of Nj(e))Dj(e,r,t)})(i,r);const n=oR(r);return S(e,t,n)}catch(e){return $I({error:e,command:n,escapedCommand:o,fileDescriptors:i,options:r,startTime:s,isSync:!0})}},oR=e=>{let{encoding:t,maxBuffer:r}=e,n=Fb(e,Jj);return Object.assign(Object.assign({},n),{},{encoding:"buffer",maxBuffer:kI(r)})},iR=({error:e,exitCode:t,signal:r,timedOut:n,isMaxBuffer:o,stdio:i,all:s,options:a,command:c,escapedCommand:l,startTime:u})=>void 0===e?FI({command:c,escapedCommand:l,stdio:i,all:s,ipcOutput:[],options:a,startTime:u}):UI({error:e,command:c,escapedCommand:l,timedOut:n,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:o,isForcefullyTerminated:!1,exitCode:t,signal:r,stdio:i,all:s,ipcOutput:[],options:a,startTime:u,isSync:!0}),sR=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0,filter:i}={})=>(fS({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:VS(e)}),aR({anyProcess:e,channel:t,isSubprocess:r,filter:i,reference:o})),aR=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:o})=>{MS(t,o);const i=GS(e,t,r),s=new AbortController;try{return await Promise.race([cR(i,n,s),lR(i,r,s),uR(i,r,s)])}catch(t){throw ES(e),t}finally{s.abort(),_S(t,o)}},cR=async(e,t,{signal:r})=>{if(void 0===t){const[t]=await U(e,"message",{signal:r});return t}for await(const[n]of z(e,"message",{signal:r}))if(t(n))return n},lR=async(e,t,{signal:r})=>{await U(e,"disconnect",{signal:r}),(e=>{throw new Error(`${bS("getOneMessage",e)} could not complete: the ${wS(e)} exited or disconnected.`)})(t)},uR=async(e,t,{signal:r})=>{const[n]=await U(e,"strict:error",{signal:r});throw hS(n,t)},fR=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:o=!0}={})=>pR({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:o}),pR=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:o,reference:i})=>{fS({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:VS(e)}),MS(t,i);const s=GS(e,t,r),a=new AbortController,c={};return dR(e,s,a),hR({ipcEmitter:s,isSubprocess:r,controller:a,state:c}),mR({anyProcess:e,channel:t,ipcEmitter:s,isSubprocess:r,shouldAwait:o,controller:a,state:c,reference:i})},dR=async(e,t,r)=>{try{await U(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},hR=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{const[o]=await U(e,"strict:error",{signal:r.signal});n.error=hS(o,t),r.abort()}catch{}},mR=async function*({anyProcess:e,channel:t,ipcEmitter:r,isSubprocess:n,shouldAwait:o,controller:i,state:s,reference:a}){try{for await(const[e]of z(r,"message",{signal:i.signal}))gR(s),yield e}catch{gR(s)}finally{i.abort(),_S(t,a),n||ES(e),o&&await e}},gR=({error:e})=>{if(e)throw e},yR=(e,t,r)=>({sendMessage:iO.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:sR.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:fR.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}),bR=(e,t)=>{const r=vR(),n=vR(),o=vR(),i=Array.from({length:t.length-3},vR),s=vR(),a=[r,n,o,...i];Object.assign(e,{stdin:r,stdout:n,stderr:o,all:s,stdio:a})},vR=()=>{const e=new K;return e.end(),e},wR=()=>new Y({read(){}}),ER=()=>new J({write(){}}),SR=()=>new Q({read(){},write(){}}),OR=async(e,t,r)=>YI(e,t,r),IR=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${xx[e]}.`)},xR={fileNumber:IR,generator:jj,asyncGenerator:jj,nodeStream:({value:e})=>({stream:e}),webTransform({value:{transform:e,writableObjectMode:t,readableObjectMode:r}}){const n=t||r;return{stream:Q.fromWeb(e,{objectMode:n})}},duplex:({value:{transform:e}})=>({stream:e}),native(){}},TR={input:Object.assign(Object.assign({},xR),{},{fileUrl:({value:e})=>({stream:m(e)}),filePath:({value:{file:e}})=>({stream:m(e)}),webStream:({value:e})=>({stream:Y.fromWeb(e)}),iterable:({value:e})=>({stream:Y.from(e)}),asyncIterable:({value:e})=>({stream:Y.from(e)}),string:({value:e})=>({stream:Y.from(e)}),uint8Array:({value:e})=>({stream:Y.from(Z.from(e))})}),output:Object.assign(Object.assign({},xR),{},{fileUrl:({value:e})=>({stream:g(e)}),filePath:({value:{file:e}})=>({stream:g(e)}),webStream:({value:e})=>({stream:J.fromWeb(e)}),iterable:IR,asyncIterable:IR,string:IR,uint8Array:IR})};function jR(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(const t of e)LR(t);const t=e.some(({readableObjectMode:e})=>e),r=RR(e,t),n=new AR({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(const t of e)n.add(t);return n}const RR=(e,t)=>{if(0===e.length)return q(t);const r=e.filter(({readableObjectMode:e})=>e===t).map(({readableHighWaterMark:e})=>e);return Math.max(...r)};class AR extends K{#s=new Set([]);#a=new Set([]);#c=new Set([]);#l;#u=Symbol("unpipe");#f=new WeakMap;add(e){if(LR(e),this.#s.has(e))return;this.#s.add(e),this.#l??=NR(this,this.#s,this.#u);const t=CR({passThroughStream:this,stream:e,streams:this.#s,ended:this.#a,aborted:this.#c,onFinished:this.#l,unpipeEvent:this.#u});this.#f.set(e,t),e.pipe(this,{end:!1})}async remove(e){if(LR(e),!this.#s.has(e))return!1;const t=this.#f.get(e);return void 0!==t&&(this.#f.delete(e),e.unpipe(this),await t,!0)}}const NR=async(e,t,r)=>{zR(e,VR);const n=new AbortController;try{await Promise.race([DR(e,n),kR(e,t,r,n)])}finally{n.abort(),zR(e,-VR)}},DR=async(e,{signal:t})=>{try{await ee(e,{signal:t,cleanup:!0})}catch(t){throw FR(e,t),t}},kR=async(e,t,r,{signal:n})=>{for await(const[o]of z(e,"unpipe",{signal:n}))t.has(o)&&o.emit(r)},LR=e=>{if("function"!=typeof e?.pipe)throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},CR=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,onFinished:i,unpipeEvent:s})=>{zR(e,HR);const a=new AbortController;try{await Promise.race([MR(i,t,a),PR({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:a}),_R({stream:t,streams:r,ended:n,aborted:o,unpipeEvent:s,controller:a})])}finally{a.abort(),zR(e,-HR)}r.size>0&&r.size===n.size+o.size&&(0===n.size&&o.size>0?UR(e):BR(e))},MR=async(e,t,{signal:r})=>{try{await e,r.aborted||UR(t)}catch(e){r.aborted||FR(t,e)}},PR=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:o,controller:{signal:i}})=>{try{await ee(t,{signal:i,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(n){if(i.aborted||!r.has(t))return;$R(n)?o.add(t):GR(e,n)}},_R=async({stream:e,streams:t,ended:r,aborted:n,unpipeEvent:o,controller:{signal:i}})=>{if(await U(e,o,{signal:i}),!e.readable)return U(i,"abort",{signal:i});t.delete(e),r.delete(e),n.delete(e)},BR=e=>{e.writable&&e.end()},FR=(e,t)=>{$R(t)?UR(e):GR(e,t)},$R=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,UR=e=>{(e.readable||e.writable)&&e.destroy()},GR=(e,t)=>{e.destroyed||(e.once("error",WR),e.destroy(t))},WR=()=>{},zR=(e,t)=>{const r=e.getMaxListeners();0!==r&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},VR=2,HR=1,XR=(e,t)=>{e.pipe(t),qR(e,t),YR(e,t)},qR=async(e,t)=>{if(!$b(e)&&!$b(t)){try{await ee(e,{cleanup:!0,readable:!0,writable:!1})}catch{}KR(t)}},KR=e=>{e.writable&&e.end()},YR=async(e,t)=>{if(!$b(e)&&!$b(t)){try{await ee(t,{cleanup:!0,readable:!1,writable:!0})}catch{}JR(e)}},JR=e=>{e.readable&&e.destroy()},QR=(e,t,r,n)=>{"output"===r?XR(e.stdio[n],t):XR(t,e.stdio[n]);const o=ZR[n];void 0!==o&&(e[o]=t),e.stdio[n]=t},ZR=["stdin","stdout","stderr"],eA=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:o,controller:i})=>{if(void 0===t)return;tA(t,i);const[s,a]="output"===r?[t,e.stdio[n]]:[e.stdio[n],t],c=o.get(s)??[];o.set(s,[...c,a])},tA=(e,{signal:t})=>{$b(e)&&CS(e,rA,t)},rA=2,nA=[];nA.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&nA.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&nA.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const oA=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,iA=Symbol.for("signal-exit emitter"),sA=globalThis,aA=Object.defineProperty.bind(Object);class cA{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(sA[iA])return sA[iA];aA(sA,iA,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const r=this.listeners[e],n=r.indexOf(t);-1!==n&&(0===n&&1===r.length?r.length=0:r.splice(n,1))}emit(e,t,r){if(this.emitted[e])return!1;this.emitted[e]=!0;let n=!1;for(const o of this.listeners[e])n=!0===o(t,r)||n;return"exit"===e&&(n=this.emit("afterExit",t,r)||n),n}}class lA{}const uA=globalThis.process,{onExit:fA,load:pA,unload:dA}=(hA=oA(uA)?new class extends lA{#p="win32"===uA.platform?"SIGINT":"SIGHUP";#d=new cA;#h;#m;#g;#y={};#b=!1;constructor(e){super(),this.#h=e,this.#y={};for(const t of nA)this.#y[t]=()=>{const r=this.#h.listeners(t);let{count:n}=this.#d;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(n+=o.__signal_exit_emitter__.count),r.length===n){this.unload();const r=this.#d.emit("exit",null,t),n="SIGHUP"===t?this.#p:t;r||e.kill(e.pid,n)}};this.#g=e.reallyExit,this.#m=e.emit}onExit(e,t){if(!oA(this.#h))return()=>{};!1===this.#b&&this.load();const r=t?.alwaysLast?"afterExit":"exit";return this.#d.on(r,e),()=>{this.#d.removeListener(r,e),0===this.#d.listeners.exit.length&&0===this.#d.listeners.afterExit.length&&this.unload()}}load(){if(!this.#b){this.#b=!0,this.#d.count+=1;for(const e of nA)try{const t=this.#y[e];t&&this.#h.on(e,t)}catch(e){}this.#h.emit=(e,...t)=>this.#v(e,...t),this.#h.reallyExit=e=>this.#w(e)}}unload(){this.#b&&(this.#b=!1,nA.forEach(e=>{const t=this.#y[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#h.removeListener(e,t)}catch(e){}}),this.#h.emit=this.#m,this.#h.reallyExit=this.#g,this.#d.count-=1)}#w(e){return oA(this.#h)?(this.#h.exitCode=e||0,this.#d.emit("exit",this.#h.exitCode,null),this.#g.call(this.#h,this.#h.exitCode)):0}#v(e,...t){const r=this.#m;if("exit"===e&&oA(this.#h)){"number"==typeof t[0]&&(this.#h.exitCode=t[0]);const n=r.call(this.#h,e,...t);return this.#d.emit("exit",this.#h.exitCode,null),n}return r.call(this.#h,e,...t)}}(uA):new class extends lA{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>hA.onExit(e,t),load:()=>hA.load(),unload:()=>hA.unload()});var hA;const mA=(e,t,r)=>{try{const{destination:n,pipeOptions:{from:o,to:i,unpipeSignal:s}={}}=gA(e,t,...r);return{destination:n,destinationStream:OS(n,i),from:o,unpipeSignal:s}}catch(e){return{destinationError:e}}},gA=(e,t,r,...n)=>{if(Array.isArray(r)){return{destination:t(yA,e)(r,...n),pipeOptions:e}}if("string"==typeof r||r instanceof URL){if(Object.keys(e).length>0)throw new TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');const[o,i,s]=sh(r,...n);return{destination:t(yA)(o,i,s),pipeOptions:s}}if(xS.has(r)){if(Object.keys(e).length>0)throw new TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:r,pipeOptions:n[0]}}throw new TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${r}`)},yA=({options:e})=>({options:Object.assign(Object.assign({},e),{},{stdin:"pipe",piped:!0})}),bA=(e,t)=>{try{return{sourceStream:IS(e,t)}}catch(e){return{sourceError:e}}},vA=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>void 0!==t&&void 0!==n?n:void 0!==n?(JR(e),n):void 0!==t?(KR(r),t):void 0,wA=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>$I({error:e,command:EA,escapedCommand:EA,fileDescriptors:t,options:r,startTime:n,isSync:!1}),EA="source.pipe(destination)",SA=async e=>{const[{status:t,reason:r,value:n=r},{status:o,reason:i,value:s=i}]=await e;if(s.pipedFrom.includes(n)||s.pipedFrom.push(n),"rejected"===o)throw s;if("rejected"===t)throw n;return s},OA=(e,t)=>{const r=jR([e]);return XR(r,t),TA.set(t,r),r},IA=(e,t)=>{const r=TA.get(t);return r.add(e),r},xA=async e=>{try{await ee(e,{cleanup:!0,readable:!1,writable:!0})}catch{}TA.delete(e)},TA=new WeakMap,jA=2,RA=1,AA=(e,t)=>void 0===e?[]:[NA(e,t)],NA=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:o,startTime:i})=>{await N(e,t),await r.remove(t);const s=new Error("Pipe canceled by `unpipeSignal` option.");throw wA({error:s,fileDescriptors:n,sourceOptions:o,startTime:i})},DA=["destination"],kA=(e,...t)=>{if(Kd(t[0]))return kA.bind(void 0,Object.assign(Object.assign({},e),{},{boundOptions:Object.assign(Object.assign({},e.boundOptions),t[0])}));const r=(({source:e,sourcePromise:t,boundOptions:r,createNested:n},...o)=>{const i=qv(),{destination:s,destinationStream:a,destinationError:c,from:l,unpipeSignal:u}=mA(r,n,o),{sourceStream:f,sourceError:p}=bA(e,l),{options:d,fileDescriptors:h}=xS.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:d,sourceError:p,destination:s,destinationStream:a,destinationError:c,unpipeSignal:u,fileDescriptors:h,startTime:i}})(e,...t),{destination:n}=r,o=Fb(r,DA),i=LA(Object.assign(Object.assign({},o),{},{destination:n}));return i.pipe=kA.bind(void 0,Object.assign(Object.assign({},e),{},{source:n,sourcePromise:i,boundOptions:{}})),i},LA=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:o,destinationStream:i,destinationError:s,unpipeSignal:a,fileDescriptors:c,startTime:l})=>{const u=CA(e,o);(({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:o,sourceOptions:i,startTime:s})=>{const a=vA({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(void 0!==a)throw wA({error:a,fileDescriptors:o,sourceOptions:i,startTime:s})})({sourceStream:t,sourceError:n,destinationStream:i,destinationError:s,fileDescriptors:c,sourceOptions:r,startTime:l});const f=new AbortController;try{const e=((e,t,r)=>{const n=TA.has(t)?IA(e,t):OA(e,t);return CS(e,jA,r.signal),CS(t,RA,r.signal),xA(t),n})(t,i,f);return await Promise.race([SA(u),...AA(a,{sourceStream:t,mergedStream:e,sourceOptions:r,fileDescriptors:c,startTime:l})])}finally{f.abort()}},CA=(e,t)=>Promise.allSettled([e,t]),MA=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:o,preserveNewlines:i})=>{const s=new AbortController;return PA(t,s),FA({stream:e,controller:s,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:o,shouldSplit:!e.readableObjectMode,preserveNewlines:i})},PA=async(e,t)=>{try{await e}catch{}finally{t.abort()}},_A=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:o,allMixed:i})=>{const s=new AbortController;BA(t,s,e);const a=e.readableObjectMode&&!i;return FA({stream:e,controller:s,binary:"buffer"===n,shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!o})},BA=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},FA=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})=>{const a=z(e,"data",{signal:t.signal,highWaterMark:UA,highWatermark:UA});return GA({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s})},$A=q(!0),UA=$A,GA=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s}){const a=WA({binary:r,shouldEncode:n,encoding:o,shouldSplit:i,preserveNewlines:s});try{for await(const[t]of e)yield*Oj(t,a,0)}catch(e){if(!t.signal.aborted)throw e}finally{yield*Ij(a)}},WA=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:o})=>[fj(e,r,!t),XT(e,o,!n,{})].filter(Boolean),zA=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:o,maxBuffer:i,lines:s,allMixed:a,stripFinalNewline:c,verboseInfo:l,streamInfo:u})=>{const f=VA({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:l,streamInfo:u});if(!o)return void await Promise.all([HA(e),f]);const p=HT(c,r),d=_A({stream:e,onStreamEnd:t,lines:s,encoding:n,stripFinalNewline:p,allMixed:a}),[h]=await Promise.all([XA({stream:e,iterable:d,fdNumber:r,encoding:n,maxBuffer:i,lines:s}),f]);return h},VA=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:o,verboseInfo:i,streamInfo:{fileDescriptors:s}})=>{if(!Cj({stdioItems:s[r]?.stdioItems,encoding:n,verboseInfo:i,fdNumber:r}))return;const a=_A({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:o});await(async(e,t,r,n)=>{for await(const o of e)_j(t)||Bj(o,r,n)})(a,e,r,i)},HA=async e=>{await F(),null===e.readableFlowing&&e.resume()},XA=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:o,maxBuffer:i,lines:s})=>{try{return t||s?await async function(e,t){return iI(e,yI,t)}(r,{maxBuffer:i}):"buffer"===o?new Uint8Array(await async function(e,t){return iI(e,TI,t)}(r,{maxBuffer:i})):await async function(e,t){return iI(e,RI,t)}(r,{maxBuffer:i})}catch(r){return KA((({error:e,stream:t,readableObjectMode:r,lines:n,encoding:o,fdNumber:i})=>{if(!(e instanceof fI))throw e;if("all"===i)return e;const s=AI(r,n,o);throw e.maxBufferInfo={fdNumber:i,unit:s},t.destroy(),e})({error:r,stream:e,readableObjectMode:t,lines:s,encoding:o,fdNumber:n}))}},qA=async e=>{try{return await e}catch(e){return KA(e)}},KA=({bufferedData:e})=>{return t=e,"[object ArrayBuffer]"===wb.call(t)?new Uint8Array(e):e;var t},YA=async(e,t,r,{isSameDirection:n,stopOnExit:o=!1}={})=>{const i=JA(e,r),s=new AbortController;try{await Promise.race([...o?[r.exitPromise]:[],ee(e,{cleanup:!0,signal:s.signal})])}catch(e){i.stdinCleanedUp||eN(e,t,r,n)}finally{s.abort()}},JA=(e,{originalStreams:[t],subprocess:r})=>{const n={stdinCleanedUp:!1};return e===t&&QA(e,r,n),n},QA=(e,t,r)=>{const{_destroy:n}=e;e._destroy=(...o)=>{ZA(t,r),n.call(e,...o)}},ZA=({exitCode:e,signalCode:t},r)=>{null===e&&null===t||(r.stdinCleanedUp=!0)},eN=(e,t,r,n)=>{if(!tN(e,t,r,n))throw e},tN=(e,t,r,n=!0)=>r.propagating?oN(e)||nN(e):(r.propagating=!0,rN(r,t)===n?oN(e):nN(e)),rN=({fileDescriptors:e},t)=>"all"!==t&&"input"===e[t].direction,nN=e=>"ERR_STREAM_PREMATURE_CLOSE"===e?.code,oN=e=>"EPIPE"===e?.code,iN=async({stream:e,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l})=>{if(!e)return;const u=YA(e,t,l);if(rN(l,t))return void await u;const[f]=await Promise.all([zA({stream:e,onStreamEnd:u,fdNumber:t,encoding:r,buffer:n,maxBuffer:o,lines:i,allMixed:s,stripFinalNewline:a,verboseInfo:c,streamInfo:l}),u]);return f},sN=({stdout:e,stderr:t,all:r},[,n,o])=>{const i=n||o;return i?n?o?{stream:r,buffer:i}:{stream:e,buffer:i}:{stream:t,buffer:i}:{stream:r,buffer:i}},aN=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode,cN=(e,t)=>{const r=Wv(e);Bv({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})},lN=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:o,verboseInfo:i})=>{if(!n)return o;const s=(e=>ov(e,"ipc"))(i),a=rv(t,"ipc"),c=rv(r,"ipc");for await(const t of pR({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(NI(0,o,c),o.push(t)),s&&cN(t,i);return o},uN=async(e,t)=>(await Promise.allSettled([e]),t),fN=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:o,timeoutDuration:i,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:l,ipc:u,ipcInput:f},context:p,verboseInfo:d,fileDescriptors:h,originalStreams:m,onInternalError:g,controller:y})=>{const b=(async(e,t)=>{const[r,n]=await zj(e);return t.isForcefullyTerminated??=!1,[r,n]})(e,p),v={originalStreams:m,fileDescriptors:h,subprocess:e,exitPromise:b,propagating:!1},w=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>e.stdio.map((e,c)=>iN({stream:e,fdNumber:c,encoding:t,buffer:r[c],maxBuffer:n[c],lines:o[c],allMixed:!1,stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:d,streamInfo:v}),E=(({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:i,verboseInfo:s,streamInfo:a})=>iN(Object.assign(Object.assign({},sN(e,r)),{},{fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:o[1]||o[2],allMixed:aN(e),stripFinalNewline:i,verboseInfo:s,streamInfo:a})))({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:o,stripFinalNewline:l,verboseInfo:d,streamInfo:v}),S=[],O=lN({subprocess:e,buffer:r,maxBuffer:n,ipc:u,ipcOutput:S,verboseInfo:d}),I=pN(m,e,v),x=dN(h,v);try{return await Promise.race([Promise.all([{},Hj(b),Promise.all(w),E,O,IO(e,f),...I,...x]),g,hN(e,y),...wO(e,i,p,y),...zE({subprocess:e,cancelSignal:s,gracefulCancel:a,context:p,controller:y}),...yO({subprocess:e,cancelSignal:s,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:y})])}catch(e){return p.terminationReason??="other",Promise.all([{error:e},b,Promise.all(w.map(e=>qA(e))),qA(E),uN(O,S),Promise.allSettled(I),Promise.allSettled(x)])}},pN=(e,t,r)=>e.map((e,n)=>e===t.stdio[n]?void 0:YA(e,n,r)),dN=(e,t)=>e.flatMap(({stdioItems:e},r)=>e.filter(({value:e,stream:t=e})=>WO(t,{checkOpen:!1})&&!$b(t)).map(({type:e,value:n,stream:o=n})=>YA(o,r,t,{isSameDirection:wx.has(e),stopOnExit:"native"===e}))),hN=async(e,{signal:t})=>{const[r]=await U(e,"error",{signal:t});throw r},mN=(e,t,r)=>{const n=e[r];n.has(t)||n.set(t,[]);const o=n.get(t),i=SS();o.push(i);return{resolve:i.resolve.bind(i),promises:o}},gN=async({resolve:e,promises:t},r)=>{e();const[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n},yN=async e=>{if(void 0!==e)try{await bN(e)}catch{}},bN=async e=>{await ee(e,{cleanup:!0,readable:!1,writable:!0})},vN=async e=>{await ee(e,{cleanup:!0,readable:!0,writable:!1})},wN=async(e,t)=>{if(await e,t)throw t},EN=(e,t,r)=>{r&&!nN(r)?e.destroy(r):t&&e.destroy()},SN=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:o=!0,preserveNewlines:i=!0}={})=>{const s=o||TO.has(r),{subprocessStdout:a,waitReadableDestroy:c}=ON(e,n,t),{readableEncoding:l,readableObjectMode:u,readableHighWaterMark:f}=IN(a,s),{read:p,onStdoutDataDone:d}=xN({subprocessStdout:a,subprocess:e,binary:s,encoding:r,preserveNewlines:i}),h=new Y({read:p,destroy:A(RN.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:u,encoding:l});return jN({subprocessStdout:a,onStdoutDataDone:d,readable:h,subprocess:e}),h},ON=(e,t,r)=>{const n=IS(e,t);return{subprocessStdout:n,waitReadableDestroy:mN(r,n,"readableDestroy")}},IN=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:$A},xN=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:o})=>{const i=SS(),s=MA({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:o});return{read(){TN(this,s,i)},onStdoutDataDone:i}},TN=async(e,t,r)=>{try{const{value:n,done:o}=await t.next();o?r.resolve():e.push(n)}catch{}},jN=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:o})=>{try{await vN(e),await n,await yN(o),await t,r.readable&&r.push(null)}catch(e){await yN(o),AN(r,e)}},RN=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await gN(r,t)&&(AN(e,n),await wN(t,n))},AN=(e,t)=>{EN(e,e.readable,t)},NN=({subprocess:e,concurrentStreams:t},{to:r}={})=>{const{subprocessStdin:n,waitWritableFinal:o,waitWritableDestroy:i}=DN(e,r,t),s=new J(Object.assign(Object.assign({},kN(n,e,o)),{},{destroy:A(PN.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:o,waitWritableDestroy:i})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode}));return MN(n,s),s},DN=(e,t,r)=>{const n=OS(e,t);return{subprocessStdin:n,waitWritableFinal:mN(r,n,"writableFinal"),waitWritableDestroy:mN(r,n,"writableDestroy")}},kN=(e,t,r)=>({write:LN.bind(void 0,e),final:A(CN.bind(void 0,e,t,r))}),LN=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},CN=async(e,t,r)=>{await gN(r,t)&&(e.writable&&e.end(),await t)},MN=async(e,t,r)=>{try{await bN(e),t.writable&&t.end()}catch(e){await(async e=>{if(void 0!==e)try{await vN(e)}catch{}})(r),_N(t,e)}},PN=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},o)=>{await gN(r,t),await gN(n,t)&&(_N(e,o),await wN(t,o))},_N=(e,t)=>{EN(e,e.writable,t)},BN=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:o,binary:i=!0,preserveNewlines:s=!0}={})=>{const a=i||TO.has(r),{subprocessStdout:c,waitReadableDestroy:l}=ON(e,n,t),{subprocessStdin:u,waitWritableFinal:f,waitWritableDestroy:p}=DN(e,o,t),{readableEncoding:d,readableObjectMode:h,readableHighWaterMark:m}=IN(c,a),{read:g,onStdoutDataDone:y}=xN({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:s}),b=new Q(Object.assign(Object.assign({read:g},kN(u,e,f)),{},{destroy:A(FN.bind(void 0,{subprocessStdout:c,subprocessStdin:u,subprocess:e,waitReadableDestroy:l,waitWritableFinal:f,waitWritableDestroy:p})),readableHighWaterMark:m,writableHighWaterMark:u.writableHighWaterMark,readableObjectMode:h,writableObjectMode:u.writableObjectMode,encoding:d}));return jN({subprocessStdout:c,onStdoutDataDone:y,readable:b,subprocess:e,subprocessStdin:u}),MN(u,b,c),b},FN=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:o,waitWritableDestroy:i},s)=>{await Promise.all([RN({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},s),PN({subprocessStdin:t,subprocess:r,waitWritableFinal:o,waitWritableDestroy:i},s)])},$N=(e,t,{from:r,binary:n=!1,preserveNewlines:o=!1}={})=>{const i=n||TO.has(t),s=IS(e,r),a=MA({subprocessStdout:s,subprocess:e,binary:i,shouldEncode:!0,encoding:t,preserveNewlines:o});return UN(a,s,e)},UN=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}},GN=(e,{encoding:t})=>{const r={readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap};e.readable=SN.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=NN.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=BN.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=$N.bind(void 0,e,t),e[Symbol.asyncIterator]=$N.bind(void 0,e,t,{})},WN=(async()=>{})().constructor.prototype,zN=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(WN,e)]),VN=["timeout","signal"],HN=(e,t,r,n)=>{const{file:o,commandArguments:i,command:s,escapedCommand:a,startTime:c,verboseInfo:l,options:u,fileDescriptors:f}=XN(e,t,r),{subprocess:p,promise:d}=KN({file:o,commandArguments:i,options:u,startTime:c,verboseInfo:l,command:s,escapedCommand:a,fileDescriptors:f});return p.pipe=kA.bind(void 0,{source:p,sourcePromise:d,boundOptions:{},createNested:n}),((e,t)=>{for(const[r,n]of zN){const o=n.value.bind(t);Reflect.defineProperty(e,r,Object.assign(Object.assign({},n),{},{value:o}))}})(p,d),xS.set(p,{options:u,fileDescriptors:f}),p},XN=(e,t,r)=>{const{command:n,escapedCommand:o,startTime:i,verboseInfo:s}=Yv(e,t,r),{file:a,commandArguments:c,options:l}=LO(e,t,r),u=qN(l),f=((e,t)=>jT(TR,e,t,!1))(u,s);return{file:a,commandArguments:c,command:n,escapedCommand:o,startTime:i,verboseInfo:s,options:u,fileDescriptors:f}},qN=e=>{let{timeout:t,signal:r}=e,n=Fb(e,VN);if(void 0!==r)throw new TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return Object.assign(Object.assign({},n),{},{timeoutDuration:t})},KN=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:o,command:i,escapedCommand:s,fileDescriptors:a})=>{let c;try{c=O(e,t,r)}catch(e){return(({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,verboseInfo:s})=>{FT(n);const a=new E;bR(a,n),Object.assign(a,{readable:wR,writable:ER,duplex:SR});const c=$I({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:o,startTime:i,isSync:!1});return{subprocess:a,promise:OR(c,s,o)}})({error:e,command:i,escapedCommand:s,fileDescriptors:a,options:r,startTime:n,verboseInfo:o})}const l=new AbortController;V(Number.POSITIVE_INFINITY,l.signal);const u=[...c.stdio];((e,t,r)=>{const n=new Map;for(const[o,{stdioItems:i,direction:s}]of Object.entries(t)){for(const{stream:t}of i.filter(({type:e})=>wx.has(e)))QR(e,t,s,o);for(const{stream:t}of i.filter(({type:e})=>!wx.has(e)))eA({subprocess:e,stream:t,direction:s,fdNumber:o,pipeGroups:n,controller:r})}for(const[e,t]of n.entries()){const r=1===t.length?t[0]:jR(t);XR(r,e)}})(c,a,l),((e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;const o=fA(()=>{e.kill()});G(n,()=>{o()})})(c,r,l);const f={},p=SS();c.kill=BE.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:f,controller:l}),c.all=(({stdout:e,stderr:t},{all:r})=>r&&(e||t)?jR([e,t].filter(Boolean)):void 0)(c,r),GN(c,r),((e,{ipc:t})=>{Object.assign(e,yR(e,!1,t))})(c,r);return{subprocess:c,promise:YN({subprocess:c,options:r,startTime:n,verboseInfo:o,fileDescriptors:a,originalStreams:u,command:i,escapedCommand:s,context:f,onInternalError:p,controller:l})}},YN=async({subprocess:e,options:t,startTime:r,verboseInfo:n,fileDescriptors:o,originalStreams:i,command:s,escapedCommand:a,context:c,onInternalError:l,controller:u})=>{const[f,[p,d],h,m,g]=await fN({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:o,originalStreams:i,onInternalError:l,controller:u});u.abort(),l.resolve();const y=h.map((e,r)=>VT(e,t,r)),b=VT(m,t,"all"),v=JN({errorInfo:f,exitCode:p,signal:d,stdio:y,all:b,ipcOutput:g,context:c,options:t,command:s,escapedCommand:a,startTime:r});return YI(v,n,t)},JN=({errorInfo:e,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,context:s,options:a,command:c,escapedCommand:l,startTime:u})=>"error"in e?UI({error:e.error,command:c,escapedCommand:l,timedOut:"timeout"===s.terminationReason,isCanceled:"cancel"===s.terminationReason||"gracefulCancel"===s.terminationReason,isGracefullyCanceled:"gracefulCancel"===s.terminationReason,isMaxBuffer:e.error instanceof fI,isForcefullyTerminated:s.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:o,ipcOutput:i,options:a,startTime:u,isSync:!1}):FI({command:c,escapedCommand:l,stdio:n,all:o,ipcOutput:i,options:a,startTime:u}),QN=(e,t)=>{const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,ZN(t,e[t],r)]));return Object.assign(Object.assign({},e),r)},ZN=(e,t,r)=>eD.has(e)&&Kd(t)&&Kd(r)?Object.assign(Object.assign({},t),r):r,eD=new Set(["env",...tv]),tD=(e,t,r,n)=>{const o=(e,t,n)=>tD(e,t,r,n),i=(...i)=>rD({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:o},...i);return void 0!==n&&n(i,o,t),i},rD=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:o},i,...s)=>{if(Kd(i))return o(e,QN(r,i),n);const{file:a,commandArguments:c,options:l,isSync:u}=nD({mapArguments:e,firstArgument:i,nextArguments:s,deepOptions:t,boundOptions:r});return u?((e,t,r)=>{const{file:n,commandArguments:o,command:i,escapedCommand:s,startTime:a,verboseInfo:c,options:l,fileDescriptors:u}=Qj(e,t,r),f=rR({file:n,commandArguments:o,options:l,command:i,escapedCommand:s,verboseInfo:c,fileDescriptors:u,startTime:a});return YI(f,c,l)})(a,c,l):HN(a,c,l,o)},nD=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:o})=>{const i=(s=t,Array.isArray(s)&&Array.isArray(s.raw)?((e,t)=>{let r=[];for(const[n,o]of e.entries())r=kb({templates:e,expressions:t,tokens:r,index:n,template:o});if(0===r.length)throw new TypeError("Template script must not be empty");const[n,...o]=r;return[n,o,{}]})(t,r):[t,...r]);var s;const[a,c,l]=sh(...i),u=QN(QN(n,o),l),{file:f=a,commandArguments:p=c,options:d=u,isSync:h=!1}=e({file:a,commandArguments:c,options:u});return{file:f,commandArguments:p,options:d,isSync:h}},oD=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);const[r,...n]=iD(e);return{file:r,commandArguments:n}},iD=e=>{if("string"!=typeof e)throw new TypeError(`The command must be a string: ${String(e)}.`);const t=e.trim();if(""===t)return[];const r=[];for(const e of t.split(sD)){const t=r.at(-1);t&&t.endsWith("\\")?r[r.length-1]=`${t.slice(0,-1)} ${e}`:r.push(e)}return r},sD=/ +/g,aD=({options:e})=>Object.assign(Object.assign({},cD(e)),{},{isSync:!0}),cD=e=>({options:Object.assign(Object.assign({},lD(e)),e)}),lD=({input:e,inputFile:t,stdio:r})=>void 0===e&&void 0===t&&void 0===r?{stdin:"inherit"}:{};tD(()=>({}));const uD=tD(()=>({isSync:!0}));tD(({file:e,commandArguments:t})=>oD(e,t)),tD(({file:e,commandArguments:t})=>Object.assign(Object.assign({},oD(e,t)),{},{isSync:!0})),tD(({options:e})=>{if(!1===e.node)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:Object.assign(Object.assign({},e),{},{node:!0})}}),tD(({options:e})=>cD(e),{},{preferLocal:!0},(e,t,r)=>{e.sync=t(aD,r),e.s=e.sync}),(()=>{const e=D,t=!0,r=void 0!==D.channel;Object.assign(Object.assign({},yR(e,t,r)),{},{getCancelSignal:uO.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})})})(),u.enableCompileCache?.();const fD=global,pD=new Proxy(global.target,{set:function(e,t,r){return Reflect.set(...arguments)},get:function(e,t,r){return gD(`make ${t}`),Reflect.get(...arguments)}}),dD=["packages","codemods","eslint"],hD=fD.which("yarn").stdout,mD=process.execPath;function gD(...e){console.log.apply(console,e)}function yD(e,t,r,n=!0,o=!1){gD(`${e.replaceAll(hD,"yarn").replaceAll(mD,"node")} ${t.join(" ")}`);try{return uD(e,t,{stdio:n?"inherit":void 0,cwd:r&&a.resolve(r),env:process.env}).stdout}catch(r){throw n&&0!==r.exitCode&&(console.error(new Error(`\ncommand: ${e} ${t.join(" ")}\ncode: ${r.exitCode}`)),o||process.exit(r.exitCode)),r}}function bD(e,t,r,n){return yD(hD,e,t,r,n)}function vD(e,t,r){return yD(mD,e,t,r)}function wD(e,t){const r=process.env;process.env=Object.assign(Object.assign({},r),t),e(),process.env=r}function ED(...e){const t=["--format","codeframe","--flag","unstable_native_nodejs_ts_config",...e.filter(Boolean)],r=y("packages").filter(e=>b(`packages/${e}/package.json`)),n=[];for(let e=0,t=40;ebD(["eslint","packages",...o,...t]),{BABEL_ENV:"test",NODE_OPTIONS:"--max-old-space-size=16384"});else{let e=null;for(const r of n)try{wD(()=>bD(["eslint",...r,...t],void 0,void 0,!0),{BABEL_ENV:"test"})}catch(t){e=t}e&&process.exit(e.exitCode)}}function SD(e,t,r){const n="./build/"+e.toLowerCase();fD.rm("-rf",n),gD("mkdir -p build"),v("build",{recursive:!0}),yD("git",["clone","--filter=blob:none","--sparse","--single-branch","--shallow-since='2 years ago'",t,n]),yD("git",["sparse-checkout","set",...r],n),yD("git",["checkout","-q",function(e){const t=d("./Makefile","utf8").match(new RegExp(`${e}_COMMIT = (\\w{40})`))[1];if(!t)throw new Error(`Could not find ${e}_COMMIT in Makefile`);return t}(e)],n)}function OD(){const e=JSON.parse(d("./package.json","utf8")).version_babel8;return dD.forEach(t=>{y(t).forEach(r=>{const n=`${t}/${r}/package.json`;if(b(n)){const t=JSON.parse(d(n,"utf8"));t.peerDependencies?.["@babel/core"]&&(t.peerDependencies["@babel/core"]=`^${e}`);const o=t.conditions?.BABEL_8_BREAKING[0];o?.peerDependencies?.["@babel/core"]&&(o.peerDependencies["@babel/core"]=`^${e}`),"babel-eslint-plugin"===r&&(o.peerDependencies["@babel/eslint-parser"]=`^${e}`),f(n,JSON.stringify(t,null,2)+"\n")}})}),wD(()=>bD(["install"]),{YARN_ENABLE_IMMUTABLE_INSTALLS:!1}),e}fD.config.verbose=!0,pD["clean-all"]=function(){fD.rm("-rf",["package-lock.json",".changelog"]),dD.forEach(e=>{fD.rm("-rf",`${e}/*/test/tmp`),fD.rm("-rf",`${e}/*/package-lock.json`)}),pD.clean(),pD["clean-lib"](),pD["clean-node-modules"]()},pD["clean-node-modules"]=function(){fD.rm("-rf","node_modules"),dD.forEach(e=>{fD.rm("-rf",`${e}/*/node_modules`)})},pD.clean=function(){pD["test-clean"](),fD.rm("-rf",[".npmrc","coverage","packages/*/npm-debug*","node_modules/.cache"])},pD["test-clean"]=function(){dD.forEach(e=>{fD.rm("-rf",`${e}/*/test/tmp`),fD.rm("-rf",`${e}/*/test-fixtures.json`)})},pD["clean-lib"]=function(){fD.rm("-rf",dD.map(e=>`${e}/*/lib`)),vD(["scripts/set-module-type.js"])},pD["clean-runtime-helpers"]=function(){fD.rm("-rf",["packages/babel-runtime/helpers/**/*.js","packages/babel-runtime-corejs2/helpers/**/*.js","packages/babel-runtime-corejs3/helpers/**/*.js","packages/babel-runtime/helpers/**/*.mjs","packages/babel-runtime-corejs2/helpers/**/*.mjs","packages/babel-runtime-corejs3/helpers/**/*.mjs","packages/babel-runtime-corejs2/core-js","packages/babel-runtime-corejs3/core-js","packages/babel-runtime-corejs3/core-js-stable"])},pD["use-cjs"]=function(){vD(["scripts/set-module-type.js","commonjs"]),pD.bootstrap()},pD["use-esm"]=function(){vD(["scripts/set-module-type.js","module"]),pD.bootstrap()},pD["bootstrap-only"]=function(){pD["clean-all"](),bD(["install"])},pD.bootstrap=function(){pD["bootstrap-only"](),pD["generate-tsconfig"](),pD.build()},pD.build=function(){pD["build-no-bundle"](),"true"!==process.env.BABEL_COVERAGE&&pD["build-standalone"]()},pD["build-standalone"]=function(){bD(["gulp","build-babel-standalone"])},pD["build-bundle"]=function(){pD.clean(),pD["clean-lib"](),vD(["scripts/set-module-type.js"]),bD(["gulp","build"]),pD["build-dist"]()},pD["build-no-bundle"]=function(){pD.clean(),pD["clean-lib"](),vD(["scripts/set-module-type.js"]),wD(()=>{bD(["gulp","build-dev"])},{BABEL_ENV:"development"}),pD["build-dist"]()},pD["build-flow-typings"]=function(){f("packages/babel-types/lib/index.js.flow",vD(["packages/babel-types/scripts/generators/flow.ts"],void 0,!1))},pD["build-dist"]=function(){pD["build-plugin-transform-runtime-dist"]()},pD["build-plugin-transform-runtime-dist"]=function(){vD(["scripts/build-dist.ts"],"packages/babel-plugin-transform-runtime")},pD.prepublish=function(){process.env.BABEL_8_BREAKING?vD(["scripts/set-module-type.js","module"]):vD(["scripts/set-module-type.js","commonjs"]),pD["bootstrap-only"](),wD(()=>{pD["prepublish-build"](),pD.test()},{IS_PUBLISH:"true"}),vD(["scripts/set-module-type.js","clean"])},pD["prepublish-build"]=function(){pD["clean-lib"](),pD["clean-runtime-helpers"](),vD(["scripts/generators/npm-ignore.js"]),wD(()=>{pD["build-bundle"]()},{NODE_ENV:"production",BABEL_ENV:"production",STRIP_BABEL_8_FLAG:"true"}),wD(()=>{pD["prepublish-build-standalone"](),pD["clone-license"](),pD["prepublish-prepare-dts"](),pD["build-flow-typings"]()},{NODE_ENV:"production",STRIP_BABEL_8_FLAG:"true"})},pD["prepublish-build-standalone"]=function(){wD(()=>{pD["build-standalone"]()},{BABEL_ENV:"production",IS_PUBLISH:"true"})},pD["prepublish-prepare-dts"]=function(){pD["clean-ts"](),pD.tscheck(),pD["prepublish-prepare-dts-no-clean"]()},pD["prepublish-prepare-dts-no-clean"]=function(){bD(["gulp","bundle-dts"]),pD["build-typescript-legacy-typings"](),bD(["tsc","-p","tsconfig.dts-bundles.json"])},pD.tscheck=function(){pD["generate-tsconfig"](),vD(["scripts/parallel-tsc/tsc.js","."]),pD["tscheck-helpers"]()},pD["tscheck-helpers"]=function(){bD(["tsc","-p","./packages/babel-helpers/src/helpers/tsconfig.json"])},pD["clean-ts"]=function(){fD.rm("-rf","tsconfig.tsbuildinfo"),fD.rm("-rf","*/*/tsconfig.tsbuildinfo"),fD.rm("-rf","dts")},pD["generate-tsconfig"]=function(){vD(["scripts/generators/tsconfig.js"]),vD(["scripts/generators/archived-libs-typings.js"])},pD["generate-type-helpers"]=function(){bD(["gulp","generate-type-helpers"])},pD["build-typescript-legacy-typings"]=function(){f("packages/babel-types/lib/index-legacy.d.ts",vD(["packages/babel-types/scripts/generators/typescript-legacy.ts"],void 0,!1))},pD["clone-license"]=function(){vD(["scripts/clone-license.js"])},pD.lint=function(){wD(()=>pD.tscheck(),{TSCHECK_SILENT:"true"}),ED(),bD(["tstyche"]),pD["lint-prettier"]()},pD["lint-ci"]=function(){pD.tscheck(),ED(),bD(["tstyche"]),pD["lint-prettier"](),pD["prepublish-prepare-dts-no-clean"]()},pD["lint-prettier"]=function(){bD(["prettier",".","--check"])},pD.fix=function(){pD["fix-js"](),pD["fix-prettier"]()},pD["fix-js"]=function(){wD(()=>pD.tscheck(),{TSCHECK_SILENT:"true"}),ED("--fix")},pD["fix-prettier"]=function(){bD(["prettier",".","--write"])},pD.watch=function(){pD["build-no-bundle"](),wD(()=>{bD(["gulp","watch"])},{BABEL_ENV:"development",WATCH_SKIP_BUILD:"true"})},pD.test=function(){pD.lint(),pD["test-only"]()},pD["test-only"]=function(e=[]){bD(["jest",...e])},pD["test-cov"]=function(){pD.build(),wD(()=>{bD(["c8","jest"])},{BABEL_ENV:"test",BABEL_COVERAGE:"true"})},pD["bootstrap-test262"]=function(){SD("TEST262","https://github.com/tc39/test262.git",["test","harness"])},pD["bootstrap-typescript"]=function(){SD("TYPESCRIPT","https://github.com/microsoft/TypeScript.git",["tests"])},pD["bootstrap-flow"]=function(){SD("FLOW","https://github.com/facebook/flow.git",["src/parser/test/flow"])},pD["new-version-checklist"]=function(){},pD["new-version"]=function(){pD["new-version-checklist"](),yD("git",["pull","--rebase"]),bD(["release-tool","version","-f","@babel/standalone"])},pD["new-babel-8-version"]=function(){yD("git",["pull","--rebase"]);const e=JSON.parse(d("./package.json","utf8")),t=qd.inc(e.version_babel8,"prerelease","beta");return e.version_babel8=t,f("./package.json",JSON.stringify(e,null,2)+"\n"),yD("git",["add","./package.json"]),yD("git",["commit","-m","Bump Babel 8 version to "+t]),yD("git",["tag",`v${t}`,"-m",`v${t}`]),t},pD["new-babel-8-version-create-commit-ci"]=function(){bD(["release-tool","version",OD(),"--all","--tag-version-prefix","tmp.v","--yes"])},pD["new-babel-8-version-create-commit"]=function(){const e=OD();yD("git",["checkout","-b",`release/temp/v${e}`]),bD(["release-tool","version",e,"--all","--tag-version-prefix","tmp.v"]),console.log("Run `BABEL_8_BREAKING=true make publish` to finish publishing")}; diff --git a/babel.config.js b/babel.config.js index 70b3c1666ec5..2c4745399ac4 100644 --- a/babel.config.js +++ b/babel.config.js @@ -217,7 +217,7 @@ module.exports = function (api) { plugins: ["babel-plugin-transform-charcodes"], }, { - test: ["packages/babel-generator"].map(normalize), + test: ["packages/babel-generator/src"].map(normalize), plugins: [pluginGeneratorOptimization], }, convertESM && { @@ -963,25 +963,60 @@ function pluginInjectNodeReexportsHints({ types: t, template }, { names }) { * @returns {import("@babel/core").PluginObject} */ function pluginGeneratorOptimization({ types: t }) { + const generatorNames = []; + fs.globSync( + pathUtils.join(__dirname, "./packages/babel-generator/src/generators/*.ts") + ).forEach(file => { + if (file.endsWith("deprecated.ts")) return; + const content = fs.readFileSync(file, "utf8"); + const ast = parseSync(content, { + configFile: false, + parserOpts: { plugins: ["typescript"] }, + }); + t.traverseFast(ast, node => { + let name; + if (t.isExportSpecifier(node)) { + name = t.isStringLiteral(node.exported) + ? node.exported.value + : node.exported.name; + } else if ( + t.isExportNamedDeclaration(node) && + t.isFunctionDeclaration(node.declaration) + ) { + name = node.declaration.id.name; + } + if (name && !name.startsWith("_")) generatorNames.push(name); + }); + }); + generatorNames.sort(); return { visitor: { CallExpression: { exit(path) { - const node = path.node; + const { callee, arguments: args } = path.node; + if (t.isIdentifier(callee) && callee.name === "__node") { + t.assertStringLiteral(args[0]); + const type = args[0].value; + const generatorIndex = generatorNames.indexOf(type); + if (generatorIndex === -1) { + throw path.buildCodeFrameError(`Unknown generator type: ${type}`); + } + path.replaceWith(t.numericLiteral(generatorIndex)); + return; + } + if ( - t.isMemberExpression(node.callee) && - t.isThisExpression(node.callee.object) + t.isMemberExpression(callee) && + t.isThisExpression(callee.object) ) { - const args = node.arguments; - if ( - node.callee.property.name === "token" && + callee.property.name === "token" && args.length === 1 && t.isStringLiteral(args[0]) ) { const str = args[0].value; if (str.length === 1) { - node.callee.property.name = "tokenChar"; + callee.property.name = "tokenChar"; args[0] = t.numericLiteral(str.charCodeAt(0)); } } diff --git a/codecov.yml b/codecov.yml index e06ee07e0ad3..6cebf13ccb26 100644 --- a/codecov.yml +++ b/codecov.yml @@ -5,7 +5,7 @@ coverage: status: project: default: - target: "92.5%" + target: "90.0%" patch: enabled: false ignore: diff --git a/eslint/babel-eslint-parser/package.json b/eslint/babel-eslint-parser/package.json index bb1a7bdeaab7..b8e1e9fa2940 100644 --- a/eslint/babel-eslint-parser/package.json +++ b/eslint/babel-eslint-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/eslint-parser", - "version": "7.28.5", + "version": "7.28.6", "description": "ESLint parser that allows for linting of experimental syntax transformed by Babel", "author": "The Babel Team (https://babel.dev/team)", "license": "MIT", diff --git a/eslint/babel-eslint-plugin-development-internal/package.json b/eslint/babel-eslint-plugin-development-internal/package.json index b355ffdb0c35..4476b62c67a1 100644 --- a/eslint/babel-eslint-plugin-development-internal/package.json +++ b/eslint/babel-eslint-plugin-development-internal/package.json @@ -1,6 +1,6 @@ { "name": "@babel/eslint-plugin-development-internal", - "version": "7.26.10", + "version": "7.28.6", "description": "The Babel Team's ESLint custom rules plugin. Since it's internal, it might not respect semver.", "main": "./lib/index.cjs", "keywords": [ @@ -17,7 +17,7 @@ "homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin-development-internal", "peerDependencies": { "@babel/eslint-parser": ">=7.11.0", - "eslint": ">=7.5.0" + "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" }, "devDependencies": { "eslint": "^9.21.0" diff --git a/eslint/babel-eslint-plugin-development/package.json b/eslint/babel-eslint-plugin-development/package.json index 4c0a56ab85d7..11f522415021 100644 --- a/eslint/babel-eslint-plugin-development/package.json +++ b/eslint/babel-eslint-plugin-development/package.json @@ -1,6 +1,6 @@ { "name": "@babel/eslint-plugin-development", - "version": "7.27.1", + "version": "7.28.6", "description": "ESLint rules that enforce best practices in the development of Babel plugins.", "keywords": [ "eslint", diff --git a/jest.config.js b/jest.config.js index 460ed7837e0b..e87a2a8cce37 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,6 +2,9 @@ const semver = require("semver"); +// Disable browserslist old data warning for 7.x branch +process.env.BROWSERSLIST_IGNORE_OLD_DATA = "1"; + const nodeVersion = process.versions.node; const supportsESMAndJestLightRunner = semver.satisfies( nodeVersion, diff --git a/package.json b/package.json index 45a3e73966a4..f5eaf0b76f84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel", - "version": "7.28.5", + "version": "7.29.1", "version_babel8": "8.0.0-beta.3", "private": true, "type": "commonjs", @@ -52,7 +52,7 @@ "babel-plugin-transform-charcodes": "^0.2.1", "c8": "^10.0.0", "charcodes": "^0.2.0", - "core-js": "^3.36.1", + "core-js": "^3.48.0", "eslint": "^9.38.0", "eslint-config-prettier": "^10.1.8", "eslint-formatter-codeframe": "^7.32.1", @@ -101,9 +101,9 @@ ], "resolutions": { "browserslist": "npm:4.25.1", - "caniuse-lite": "npm:1.0.30001731", - "core-js-compat": "npm:3.45.0", - "electron-to-chromium": "npm:1.5.197", + "caniuse-lite": "npm:1.0.30001766", + "core-js-compat": "npm:3.48.0", + "electron-to-chromium": "npm:1.5.278", "@types/babel__core": "link:./nope", "@types/babel__traverse": "link:./nope", "@babel/parser/@babel/types": "workspace:*", diff --git a/packages/babel-cli/package.json b/packages/babel-cli/package.json index 4691cbc3800f..c6474d9732a9 100644 --- a/packages/babel-cli/package.json +++ b/packages/babel-cli/package.json @@ -1,6 +1,6 @@ { "name": "@babel/cli", - "version": "7.28.3", + "version": "7.28.6", "description": "Babel command line.", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-cli", diff --git a/packages/babel-code-frame/package.json b/packages/babel-code-frame/package.json index ffb5bd42611b..7842ba5e8592 100644 --- a/packages/babel-code-frame/package.json +++ b/packages/babel-code-frame/package.json @@ -1,6 +1,6 @@ { "name": "@babel/code-frame", - "version": "7.27.1", + "version": "7.29.0", "description": "Generate errors that contain a code frame that point to source locations.", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-code-frame", diff --git a/packages/babel-code-frame/src/index.ts b/packages/babel-code-frame/src/index.ts index 5ba1be3e5b38..d89ca4be9430 100644 --- a/packages/babel-code-frame/src/index.ts +++ b/packages/babel-code-frame/src/index.ts @@ -22,6 +22,8 @@ export interface Options { linesAbove?: number; /** The number of lines to show below the error. default: 3 */ linesBelow?: number; + /** The line number corresponding to the first line in `rawLines`. default: 1 */ + startLine?: number; /** * Forcibly syntax highlight the code as JavaScript (for non-terminals); * overrides highlightCode. @@ -53,6 +55,7 @@ function getMarkerLines( loc: NodeLocation, source: string[], opts: Options, + startLineBaseZero: number, ): { start: number; end: number; @@ -68,9 +71,9 @@ function getMarkerLines( ...loc.end, }; const { linesAbove = 2, linesBelow = 3 } = opts || {}; - const startLine = startLoc.line; + const startLine = startLoc.line - startLineBaseZero; const startColumn = startLoc.column; - const endLine = endLoc.line; + const endLine = endLoc.line - startLineBaseZero; const endColumn = endLoc.column; let start = Math.max(startLine - (linesAbove + 1), 0); @@ -127,13 +130,19 @@ export function codeFrameColumns( ): string { const shouldHighlight = opts.forceColor || (isColorSupported() && opts.highlightCode); + const startLineBaseZero = (opts.startLine || 1) - 1; const defs = getDefs(shouldHighlight); const lines = rawLines.split(NEWLINE); - const { start, end, markerLines } = getMarkerLines(loc, lines, opts); + const { start, end, markerLines } = getMarkerLines( + loc, + lines, + opts, + startLineBaseZero, + ); const hasColumns = loc.start && typeof loc.start.column === "number"; - const numberMaxWidth = String(end).length; + const numberMaxWidth = String(end + startLineBaseZero).length; const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines; @@ -142,7 +151,9 @@ export function codeFrameColumns( .slice(start, end) .map((line, index) => { const number = start + 1 + index; - const paddedNumber = ` ${number}`.slice(-numberMaxWidth); + const paddedNumber = ` ${number + startLineBaseZero}`.slice( + -numberMaxWidth, + ); const gutter = ` ${paddedNumber} |`; const hasMarker = markerLines[number]; const lastMarkerLine = !markerLines[number + 1]; diff --git a/packages/babel-code-frame/test/index.js b/packages/babel-code-frame/test/index.js index fc01c1dad521..3d3d296d6f4c 100644 --- a/packages/babel-code-frame/test/index.js +++ b/packages/babel-code-frame/test/index.js @@ -420,4 +420,14 @@ describe("@babel/code-frame", function () { expect(stripAnsi(highlighted)).toBe(raw); expect(highlighted.length).toBeGreaterThan(raw.length); }); + + test("opts.startLine", function () { + const rawLines = "const a = 1;\nconst b = 1"; + expect( + codeFrameColumns(rawLines, { start: { line: 102 } }, { startLine: 101 }), + ).toMatchInlineSnapshot(` + " 101 | const a = 1; + > 102 | const b = 1" + `); + }); }); diff --git a/packages/babel-compat-data/package.json b/packages/babel-compat-data/package.json index 911c88bf9405..46e1c1ceb2b6 100644 --- a/packages/babel-compat-data/package.json +++ b/packages/babel-compat-data/package.json @@ -1,6 +1,6 @@ { "name": "@babel/compat-data", - "version": "7.28.5", + "version": "7.29.0", "author": "The Babel Team (https://babel.dev/team)", "license": "MIT", "description": "The compat-data to determine required Babel plugins", @@ -55,8 +55,8 @@ ], "devDependencies": { "@mdn/browser-compat-data": "^6.0.8", - "core-js-compat": "^3.43.0", - "electron-to-chromium": "^1.5.140" + "core-js-compat": "^3.48.0", + "electron-to-chromium": "^1.5.278" }, "engines": { "node": ">=6.9.0" diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index 81cddd6c1a3c..c3e9db364692 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -1,6 +1,6 @@ { "name": "@babel/core", - "version": "7.28.5", + "version": "7.29.0", "description": "Babel compiler core.", "main": "./lib/index.js", "author": "The Babel Team (https://babel.dev/team)", diff --git a/packages/babel-core/src/parser/index.ts b/packages/babel-core/src/parser/index.ts index 615bf1b0234b..ee9879e04f18 100644 --- a/packages/babel-core/src/parser/index.ts +++ b/packages/babel-core/src/parser/index.ts @@ -50,6 +50,13 @@ export default function* parser( // err.code will be changed to BABEL_PARSE_ERROR later. } + const startLine = parserOpts?.startLine; + const startColumn = parserOpts?.startColumn; + + if (startColumn != null) { + code = " ".repeat(startColumn) + code; + } + const { loc, missingPlugin } = err; if (loc) { const codeFrame = codeFrameColumns( @@ -62,6 +69,7 @@ export default function* parser( }, { highlightCode, + startLine, }, ); if (missingPlugin) { diff --git a/packages/babel-core/test/parse.js b/packages/babel-core/test/parse.js index 15693194935d..b6b8dfe3101d 100644 --- a/packages/babel-core/test/parse.js +++ b/packages/babel-core/test/parse.js @@ -39,4 +39,28 @@ describe("parseSync", function () { }); expect(JSON.parse(JSON.stringify(result))).toEqual(output); }); + + it("should show correct codeFrame with startLine and startColumn", function () { + const input = `const* a = 1;`; + let err; + try { + parseSync(input, { + parserOpts: { + startLine: 3, + startColumn: 3, + }, + highlightCode: false, + configFile: false, + babelrc: false, + }); + } catch (e) { + err = e; + } + expect(err.message).toMatchInlineSnapshot(` + "unknown: Unexpected token (3:8) + + > 3 | const* a = 1; + | ^" + `); + }); }); diff --git a/packages/babel-generator/package.json b/packages/babel-generator/package.json index cba5cb969802..2de3dca0a72c 100644 --- a/packages/babel-generator/package.json +++ b/packages/babel-generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/generator", - "version": "7.28.5", + "version": "7.29.1", "description": "Turns an AST into code.", "author": "The Babel Team (https://babel.dev/team)", "license": "MIT", diff --git a/packages/babel-generator/src/buffer.ts b/packages/babel-generator/src/buffer.ts index ae1897de8bca..7ec6b9a05fbf 100644 --- a/packages/babel-generator/src/buffer.ts +++ b/packages/babel-generator/src/buffer.ts @@ -1,47 +1,30 @@ import type SourceMap from "./source-map.ts"; +import type { SourceLocation } from "@babel/types"; // We inline this package // eslint-disable-next-line import/no-extraneous-dependencies import * as charcodes from "charcodes"; -export type Pos = { - line: number; - column: number; - index: number; -}; -export type Loc = { - start?: Pos; - end?: Pos; - filename?: string; -}; -type SourcePos = { +export type Loc = SourceLocation; +export type Pos = SourceLocation["start"]; + +type SourcePosition = { line: number | undefined; column: number | undefined; identifierName: string | undefined; + identifierNamePos: Pos | undefined; filename: string | undefined; }; -type InternalSourcePos = SourcePos & { identifierNamePos: Pos | undefined }; -type QueueItem = { - char: number; - repeat: number; - line: number | undefined; - column: number | undefined; - identifierName: undefined; // Not used, it always undefined. - identifierNamePos: undefined; // Not used, it always undefined. - filename: string | undefined; -}; +const spaceIndents: string[] = []; +for (let i = 0; i < 32; i++) { + spaceIndents.push(" ".repeat(i * 2)); +} export default class Buffer { constructor(map: SourceMap | null, indentChar: string) { this._map = map; this._indentChar = indentChar; - - for (let i = 0; i < 64; i++) { - this._fastIndentations.push(indentChar.repeat(i)); - } - - this._allocQueue(); } _map: SourceMap | null = null; @@ -49,17 +32,15 @@ export default class Buffer { _str = ""; _appendCount = 0; _last = 0; - _queue: QueueItem[] = []; - _queueCursor = 0; _canMarkIdName = true; _indentChar = ""; - _fastIndentations: string[] = []; + _queuedChar: typeof charcodes.space | typeof charcodes.semicolon | 0 = 0; _position = { line: 1, column: 0, }; - _sourcePosition: InternalSourcePos = { + _sourcePosition: SourcePosition = { identifierName: undefined, identifierNamePos: undefined, line: undefined, @@ -67,64 +48,37 @@ export default class Buffer { filename: undefined, }; - _allocQueue() { - const queue = this._queue; - - for (let i = 0; i < 16; i++) { - queue.push({ - char: 0, - repeat: 1, - line: undefined, - column: undefined, - identifierName: undefined, - identifierNamePos: undefined, - filename: "", - }); - } - } - - _pushQueue( - char: number, - repeat: number, - line: number | undefined, - column: number | undefined, - filename: string | undefined, - ) { - const cursor = this._queueCursor; - if (cursor === this._queue.length) { - this._allocQueue(); - } - const item = this._queue[cursor]; - item.char = char; - item.repeat = repeat; - item.line = line; - item.column = column; - item.filename = filename; - - this._queueCursor++; - } - - _popQueue(): QueueItem { - if (this._queueCursor === 0) { - throw new Error("Cannot pop from empty queue"); - } - return this._queue[--this._queueCursor]; - } - /** * Get the final string output from the buffer, along with the sourcemap if one exists. */ get() { - this._flush(); + const { _map, _last } = this; + if (this._queuedChar !== charcodes.space) { + this._flush(); + } + + // Whatever trim is used here should not execute a regex against the + // source string since it may be arbitrarily large after all transformations + const code = + _last === charcodes.lineFeed + ? (this._buf + this._str).trimRight() + : this._buf + this._str; + + // Creating objects with getters is expensive. + if (_map === null) { + return { + code: code, + decodedMap: undefined, + map: null, + rawMappings: undefined, + }; + } - const map = this._map; const result = { - // Whatever trim is used here should not execute a regex against the - // source string since it may be arbitrarily large after all transformations - code: (this._buf + this._str).trimRight(), + code: code, // Decoded sourcemap is free to generate. - decodedMap: map?.getDecoded(), + decodedMap: _map.getDecoded(), // Used as a marker for backwards compatibility. We moved input map merging // into the generator. We cannot merge the input map a second time, so the // presence of this field tells us we've already done the work. @@ -133,7 +87,7 @@ export default class Buffer { }, // Encoding the sourcemap is moderately CPU expensive. get map() { - const resultMap = map ? map.get() : null; + const resultMap = _map.get(); result.map = resultMap; return resultMap; }, @@ -142,7 +96,7 @@ export default class Buffer { }, // Retrieving the raw mappings is very memory intensive. get rawMappings() { - const mappings = map?.getRawMappings(); + const mappings = _map.getRawMappings(); result.rawMappings = mappings; return mappings; }, @@ -160,74 +114,39 @@ export default class Buffer { append(str: string, maybeNewline: boolean): void { this._flush(); - - this._append(str, this._sourcePosition, maybeNewline); + this._append(str, maybeNewline); } appendChar(char: number): void { this._flush(); - this._appendChar(char, 1, this._sourcePosition); + this._appendChar(char, 1, true); } /** * Add a string to the buffer than can be reverted. */ - queue(char: number): void { - // Drop trailing spaces when a newline is inserted. - if (char === charcodes.lineFeed) { - while (this._queueCursor !== 0) { - const char = this._queue[this._queueCursor - 1].char; - if (char !== charcodes.space && char !== charcodes.tab) { - break; - } - - this._queueCursor--; - } - } - - const sourcePosition = this._sourcePosition; - this._pushQueue( - char, - 1, - sourcePosition.line, - sourcePosition.column, - sourcePosition.filename, - ); - } - - /** - * Same as queue, but this indentation will never have a sourcemap marker. - */ - queueIndentation(repeat: number): void { - if (repeat === 0) return; - this._pushQueue(-1, repeat, undefined, undefined, undefined); + queue(char: typeof charcodes.space | typeof charcodes.semicolon): void { + this._flush(); + this._queuedChar = char; } _flush(): void { - const queueCursor = this._queueCursor; - const queue = this._queue; - for (let i = 0; i < queueCursor; i++) { - const item: QueueItem = queue[i]; - this._appendChar(item.char, item.repeat, item); + const queuedChar = this._queuedChar; + if (queuedChar !== 0) { + this._appendChar(queuedChar, 1, true); + this._queuedChar = 0; } - this._queueCursor = 0; } - _appendChar( - char: number, - repeat: number, - sourcePos: InternalSourcePos, - ): void { + _appendChar(char: number, repeat: number, useSourcePos: boolean): void { this._last = char; if (char === -1) { - const fastIndentation = this._fastIndentations[repeat]; - if (fastIndentation !== undefined) { - this._str += fastIndentation; - } else { - this._str += - repeat > 1 ? this._indentChar.repeat(repeat) : this._indentChar; - } + const indent = + repeat >= 64 + ? this._indentChar.repeat(repeat) + : spaceIndents[repeat / 2]; + this._str += indent; } else { this._str += repeat > 1 @@ -235,35 +154,43 @@ export default class Buffer { : String.fromCharCode(char); } + const isSpace = char === charcodes.space; + const position = this._position; if (char !== charcodes.lineFeed) { - this._mark( - sourcePos.line, - sourcePos.column, - sourcePos.identifierName, - sourcePos.identifierNamePos, - sourcePos.filename, - ); - this._position.column += repeat; - } else { - this._position.line++; - this._position.column = 0; - } + if (this._map) { + const sourcePos = this._sourcePosition; + if (useSourcePos && sourcePos) { + this._map.mark( + position, + sourcePos.line, + sourcePos.column, + isSpace ? undefined : sourcePos.identifierName, + isSpace ? undefined : sourcePos.identifierNamePos, + sourcePos.filename, + ); + + if (!isSpace && this._canMarkIdName) { + sourcePos.identifierName = undefined; + sourcePos.identifierNamePos = undefined; + } + } else { + this._map.mark(position); + } + } - if (this._canMarkIdName) { - sourcePos.identifierName = undefined; - sourcePos.identifierNamePos = undefined; + position.column += repeat; + } else { + position.line++; + position.column = 0; } } - _append( - str: string, - sourcePos: InternalSourcePos, - maybeNewline: boolean, - ): void { + _append(str: string, maybeNewline: boolean): void { const len = str.length; const position = this._position; + const sourcePos = this._sourcePosition; - this._last = str.charCodeAt(len - 1); + this._last = -1; /* LAST_CHAR_KINDS.NORMAL */ if (++this._appendCount > 4096) { // eslint-disable-next-line @typescript-eslint/no-unused-expressions @@ -275,7 +202,9 @@ export default class Buffer { this._str += str; } - if (!maybeNewline && !this._map) { + const hasMap = this._map !== null; + + if (!maybeNewline && !hasMap) { position.column += len; return; } @@ -300,8 +229,15 @@ export default class Buffer { // If the string starts with a newline char, then adding a mark is redundant. // This catches both "no newlines" and "newline after several chars". - if (i !== 0) { - this._mark(line, column, identifierName, identifierNamePos, filename); + if (hasMap && i !== 0) { + this._map!.mark( + position, + line, + column, + identifierName, + identifierNamePos, + filename, + ); } // Now, find each remaining newline char in the string. @@ -314,53 +250,28 @@ export default class Buffer { // unless this is the last char. // When manually adding multi-line content (such as a comment), `line` will be `undefined`. if (last < len && line !== undefined) { - this._mark(++line, 0, undefined, undefined, filename); + line++; + if (hasMap) { + this._map!.mark(position, line, 0, undefined, undefined, filename); + } } i = str.indexOf("\n", last); } position.column += len - last; } - _mark( - line: number | undefined, - column: number | undefined, - identifierName: string | undefined, - identifierNamePos: Pos | undefined, - filename: string | undefined, - ): void { - this._map?.mark( - this._position, - line, - column, - identifierName, - identifierNamePos, - filename, - ); - } - - removeTrailingNewline(): void { - const queueCursor = this._queueCursor; - if ( - queueCursor !== 0 && - this._queue[queueCursor - 1].char === charcodes.lineFeed - ) { - this._queueCursor--; - } - } - removeLastSemicolon(): void { - const queueCursor = this._queueCursor; - if ( - queueCursor !== 0 && - this._queue[queueCursor - 1].char === charcodes.semicolon - ) { - this._queueCursor--; + if (this._queuedChar === charcodes.semicolon) { + this._queuedChar = 0; } } - getLastChar(): number { - const queueCursor = this._queueCursor; - return queueCursor !== 0 ? this._queue[queueCursor - 1].char : this._last; + getLastChar(checkQueue?: boolean): number { + if (!checkQueue) { + return this._last; + } + const queuedChar = this._queuedChar; + return queuedChar !== 0 ? queuedChar : this._last; } /** @@ -368,42 +279,11 @@ export default class Buffer { * but this has not been found so far, and an accurate count can be achieved if needed later. */ getNewlineCount(): number { - const queueCursor = this._queueCursor; - let count = 0; - if (queueCursor === 0) return this._last === charcodes.lineFeed ? 1 : 0; - for (let i = queueCursor - 1; i >= 0; i--) { - if (this._queue[i].char !== charcodes.lineFeed) { - break; - } - count++; - } - return count === queueCursor && this._last === charcodes.lineFeed - ? count + 1 - : count; - } - - /** - * check if current _last + queue ends with newline, return the character before newline - */ - endsWithCharAndNewline(): number | undefined { - const queue = this._queue; - const queueCursor = this._queueCursor; - if (queueCursor !== 0) { - // every element in queue is one-length whitespace string - const lastCp = queue[queueCursor - 1].char; - if (lastCp !== charcodes.lineFeed) return; - if (queueCursor > 1) { - return queue[queueCursor - 2].char; - } else { - return this._last; - } - } - // We assume that everything being matched is at most a single token plus some whitespace, - // which everything currently is, but otherwise we'd have to expand _last or check _buf. + return this._queuedChar === 0 && this._last === charcodes.lineFeed ? 1 : 0; } hasContent(): boolean { - return this._queueCursor !== 0 || !!this._last; + return this._last !== 0 /*|| this._queuedChar !== 0*/; } /** @@ -436,16 +316,15 @@ export default class Buffer { } this.source("start", loc); - // @ts-expect-error identifierName is not defined const identifierName = loc.identifierName; const sourcePos = this._sourcePosition; - if (identifierName) { + if (identifierName != null) { this._canMarkIdName = false; sourcePos.identifierName = identifierName; } cb(); - if (identifierName) { + if (identifierName != null) { this._canMarkIdName = true; sourcePos.identifierName = undefined; sourcePos.identifierNamePos = undefined; @@ -477,6 +356,8 @@ export default class Buffer { } _normalizePosition(prop: "start" | "end", loc: Loc, columnOffset: number) { + this._flush(); + const pos = loc[prop]; const target = this._sourcePosition; @@ -489,32 +370,10 @@ export default class Buffer { } getCurrentColumn(): number { - const queue = this._queue; - const queueCursor = this._queueCursor; - - let lastIndex = -1; - let len = 0; - for (let i = 0; i < queueCursor; i++) { - const item = queue[i]; - if (item.char === charcodes.lineFeed) { - lastIndex = len; - } - len += item.repeat; - } - - return lastIndex === -1 ? this._position.column + len : len - 1 - lastIndex; + return this._position.column + (this._queuedChar ? 1 : 0); } getCurrentLine(): number { - let count = 0; - - const queue = this._queue; - for (let i = 0; i < this._queueCursor; i++) { - if (queue[i].char === charcodes.lineFeed) { - count++; - } - } - - return this._position.line + count; + return this._position.line; } } diff --git a/packages/babel-generator/src/generators/base.ts b/packages/babel-generator/src/generators/base.ts index a0e0c5cc6099..90b8ad572b8b 100644 --- a/packages/babel-generator/src/generators/base.ts +++ b/packages/babel-generator/src/generators/base.ts @@ -14,13 +14,12 @@ export function File(this: Printer, node: t.File) { export function Program(this: Printer, node: t.Program) { // An empty Program doesn't have any inner tokens, so // we must explicitly print its inner comments. - this.noIndentInnerCommentsHere(); - this.printInnerComments(); + this.printInnerComments(false); const directivesLen = node.directives?.length; if (directivesLen) { const newline = node.body.length ? 2 : 1; - this.printSequence(node.directives, undefined, newline); + this.printSequence(node.directives, undefined, undefined, newline); if (!node.directives[directivesLen - 1].trailingComments?.length) { this.newline(newline); } @@ -31,20 +30,20 @@ export function Program(this: Printer, node: t.Program) { export function BlockStatement(this: Printer, node: t.BlockStatement) { this.token("{"); - const exit = this.enterDelimited(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); const directivesLen = node.directives?.length; if (directivesLen) { const newline = node.body.length ? 2 : 1; - this.printSequence(node.directives, true, newline); + this.printSequence(node.directives, true, true, newline); if (!node.directives[directivesLen - 1].trailingComments?.length) { this.newline(newline); } } - this.printSequence(node.body, true); + this.printSequence(node.body, true, true); - exit(); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; this.rightBrace(node); } @@ -87,7 +86,7 @@ export function InterpreterDirective( node: t.InterpreterDirective, ) { this.token(`#!${node.value}`); - this.newline(1, true); + this._newline(); } export function Placeholder(this: Printer, node: t.Placeholder) { diff --git a/packages/babel-generator/src/generators/classes.ts b/packages/babel-generator/src/generators/classes.ts index 5a9efeb692e7..ddefa69d1740 100644 --- a/packages/babel-generator/src/generators/classes.ts +++ b/packages/babel-generator/src/generators/classes.ts @@ -8,6 +8,10 @@ import type * as t from "@babel/types"; // We inline this package // eslint-disable-next-line import/no-extraneous-dependencies import * as charCodes from "charcodes"; +import { _shouldPrintDecoratorsBeforeExport } from "./expressions.ts"; +import { _tsPrintClassMemberModifiers } from "./typescript.ts"; +import { _variance } from "./flow.ts"; +import { _methodHead } from "./methods.ts"; export function ClassDeclaration( this: Printer, @@ -19,7 +23,8 @@ export function ClassDeclaration( if ( !inExport || - !this._shouldPrintDecoratorsBeforeExport( + !_shouldPrintDecoratorsBeforeExport.call( + this, parent as t.ExportDeclaration & { declaration: t.ClassDeclaration }, ) ) { @@ -79,14 +84,12 @@ export function ClassBody(this: Printer, node: t.ClassBody) { if (node.body.length === 0) { this.token("}"); } else { - this.newline(); - const separator = classBodyEmptySemicolonsPrinter(this, node); separator?.(-1); // print leading semicolons in preserveFormat mode - const exit = this.enterDelimited(); - this.printJoin(node.body, true, true, separator, true); - exit(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); + this.printJoin(node.body, true, true, separator, true, true); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; if (!this.endsWith(charCodes.lineFeed)) this.newline(); @@ -141,7 +144,7 @@ function classBodyEmptySemicolonsPrinter(printer: Printer, node: t.ClassBody) { ) && tok.start < end! ) { - printer.token(";", undefined, occurrenceCount++); + printer.tokenChar(charCodes.semicolon, occurrenceCount++); k++; } }; @@ -157,14 +160,14 @@ export function ClassProperty(this: Printer, node: t.ClassProperty) { if (endLine) this.catchUp(endLine); } - this.tsPrintClassMemberModifiers(node); + _tsPrintClassMemberModifiers.call(this, node); if (node.computed) { this.token("["); this.print(node.key); this.token("]"); } else { - this._variance(node); + _variance.call(this, node); this.print(node.key); } @@ -198,7 +201,7 @@ export function ClassAccessorProperty( if (endLine) this.catchUp(endLine); // TS does not support class accessor property yet - this.tsPrintClassMemberModifiers(node); + _tsPrintClassMemberModifiers.call(this, node); this.word("accessor", true); this.space(); @@ -209,7 +212,7 @@ export function ClassAccessorProperty( this.token("]"); } else { // Todo: Flow does not support class accessor property yet. - this._variance(node); + _variance.call(this, node); this.print(node.key); } @@ -236,7 +239,7 @@ export function ClassPrivateProperty( node: t.ClassPrivateProperty, ) { this.printJoin(node.decorators); - this.tsPrintClassMemberModifiers(node); + _tsPrintClassMemberModifiers.call(this, node); this.print(node.key); // TS if (node.optional) { @@ -256,13 +259,13 @@ export function ClassPrivateProperty( } export function ClassMethod(this: Printer, node: t.ClassMethod) { - this._classMethodHead(node); + _classMethodHead.call(this, node); this.space(); this.print(node.body); } export function ClassPrivateMethod(this: Printer, node: t.ClassPrivateMethod) { - this._classMethodHead(node); + _classMethodHead.call(this, node); this.space(); this.print(node.body); } @@ -280,8 +283,8 @@ export function _classMethodHead( if (endLine) this.catchUp(endLine); } - this.tsPrintClassMemberModifiers(node); - this._methodHead(node); + _tsPrintClassMemberModifiers.call(this, node); + _methodHead.call(this, node); } export function StaticBlock(this: Printer, node: t.StaticBlock) { diff --git a/packages/babel-generator/src/generators/deprecated.ts b/packages/babel-generator/src/generators/deprecated.ts index 574ec3b7457d..efde0e9c7a50 100644 --- a/packages/babel-generator/src/generators/deprecated.ts +++ b/packages/babel-generator/src/generators/deprecated.ts @@ -8,112 +8,96 @@ export type DeprecatedBabel7ASTTypes = | "RecordExpression" | "TupleExpression"; -export function addDeprecatedGenerators(PrinterClass: typeof Printer) { - // Add Babel 7 generator methods that is removed in Babel 8 - if (!process.env.BABEL_8_BREAKING) { - const deprecatedBabel7Generators = { - Noop(this: Printer) {}, +export function Noop(this: Printer) {} - TSExpressionWithTypeArguments( - this: Printer, - // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST - node: t.TSExpressionWithTypeArguments, - ) { - this.print(node.expression); - this.print(node.typeParameters); - }, - - DecimalLiteral(this: Printer, node: any) { - const raw = this.getPossibleRaw(node); - if (!this.format.minified && raw !== undefined) { - this.word(raw); - return; - } - this.word(node.value + "m"); - }, +export function TSExpressionWithTypeArguments( + this: Printer, + // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST + node: t.TSExpressionWithTypeArguments, +) { + this.print(node.expression); + this.print(node.typeParameters); +} - // @ts-ignore(Babel 7 vs Babel 8) - t.RecordExpression only exists in Babel 7 - RecordExpression(this: Printer, node: t.RecordExpression) { - const props = node.properties; +export function DecimalLiteral(this: Printer, node: any) { + const raw = this.getPossibleRaw(node); + if (!this.format.minified && raw !== undefined) { + this.word(raw); + return; + } + this.word(node.value + "m"); +} - let startToken; - let endToken; +// @ts-ignore(Babel 7 vs Babel 8) - t.RecordExpression only exists in Babel 7 +export function RecordExpression(this: Printer, node: t.RecordExpression) { + const props = node.properties; - if (this.format.recordAndTupleSyntaxType === "bar") { - startToken = "{|"; - endToken = "|}"; - } else if ( - this.format.recordAndTupleSyntaxType !== "hash" && - this.format.recordAndTupleSyntaxType != null - ) { - throw new Error( - `The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify( - this.format.recordAndTupleSyntaxType, - )} received).`, - ); - } else { - startToken = "#{"; - endToken = "}"; - } + let startToken; + let endToken; - this.token(startToken); + if (this.format.recordAndTupleSyntaxType === "bar") { + startToken = "{|"; + endToken = "|}"; + } else if ( + this.format.recordAndTupleSyntaxType !== "hash" && + this.format.recordAndTupleSyntaxType != null + ) { + throw new Error( + `The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify( + this.format.recordAndTupleSyntaxType, + )} received).`, + ); + } else { + startToken = "#{"; + endToken = "}"; + } - if (props.length) { - this.space(); - this.printList( - props, - this.shouldPrintTrailingComma(endToken), - true, - true, - ); - this.space(); - } - this.token(endToken); - }, + this.token(startToken); - // @ts-ignore(Babel 7 vs Babel 8) - t.TupleExpression only exists in Babel 7 - TupleExpression(this: Printer, node: t.TupleExpression) { - const elems = node.elements; - const len = elems.length; + if (props.length) { + this.space(); + this.printList(props, this.shouldPrintTrailingComma(endToken), true, true); + this.space(); + } + this.token(endToken); +} - let startToken; - let endToken; - if (process.env.BABEL_8_BREAKING) { - startToken = "#["; - endToken = "]"; - } else { - if (this.format.recordAndTupleSyntaxType === "bar") { - startToken = "[|"; - endToken = "|]"; - } else if (this.format.recordAndTupleSyntaxType === "hash") { - startToken = "#["; - endToken = "]"; - } else { - throw new Error( - `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`, - ); - } - } +// @ts-ignore(Babel 7 vs Babel 8) - t.TupleExpression only exists in Babel 7 +export function TupleExpression(this: Printer, node: t.TupleExpression) { + const elems = node.elements; + const len = elems.length; - this.token(startToken); + let startToken; + let endToken; + if (process.env.BABEL_8_BREAKING) { + startToken = "#["; + endToken = "]"; + } else { + if (this.format.recordAndTupleSyntaxType === "bar") { + startToken = "[|"; + endToken = "|]"; + } else if (this.format.recordAndTupleSyntaxType === "hash") { + startToken = "#["; + endToken = "]"; + } else { + throw new Error( + `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`, + ); + } + } - for (let i = 0; i < elems.length; i++) { - const elem = elems[i]; - if (elem) { - if (i > 0) this.space(); - this.print(elem); - if (i < len - 1 || this.shouldPrintTrailingComma(endToken)) { - this.token(",", false, i); - } - } - } + this.token(startToken); - this.token(endToken); - }, - } satisfies Record< - DeprecatedBabel7ASTTypes, - (this: Printer, node: any) => void - >; - Object.assign(PrinterClass.prototype, deprecatedBabel7Generators); + for (let i = 0; i < elems.length; i++) { + const elem = elems[i]; + if (elem) { + if (i > 0) this.space(); + this.print(elem); + if (i < len - 1 || this.shouldPrintTrailingComma(endToken)) { + this.token(",", false, i); + } + } } + + this.token(endToken); } diff --git a/packages/babel-generator/src/generators/expressions.ts b/packages/babel-generator/src/generators/expressions.ts index c13339ccd7de..0692f1162106 100644 --- a/packages/babel-generator/src/generators/expressions.ts +++ b/packages/babel-generator/src/generators/expressions.ts @@ -6,22 +6,20 @@ import { isNewExpression, isPattern, } from "@babel/types"; +// We inline this package +// eslint-disable-next-line import/no-extraneous-dependencies +import * as charCodes from "charcodes"; import type * as t from "@babel/types"; import { TokenContext } from "../node/index.ts"; export function UnaryExpression(this: Printer, node: t.UnaryExpression) { const { operator } = node; - if ( - operator === "void" || - operator === "delete" || - operator === "typeof" || - // throwExpressions - operator === "throw" - ) { + const firstChar = operator.charCodeAt(0); + if (firstChar >= charCodes.lowercaseA && firstChar <= charCodes.lowercaseZ) { this.word(operator); this.space(); } else { - this.token(operator); + this.tokenChar(firstChar); } this.print(node.argument); @@ -42,19 +40,19 @@ export function ParenthesizedExpression( node: t.ParenthesizedExpression, ) { this.token("("); - const exit = this.enterDelimited(); - this.print(node.expression); - exit(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); + this.print(node.expression, undefined, true); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; this.rightParens(node); } export function UpdateExpression(this: Printer, node: t.UpdateExpression) { if (node.prefix) { - this.token(node.operator); + this.token(node.operator, false, 0, true); this.print(node.argument); } else { this.print(node.argument, true); - this.token(node.operator); + this.token(node.operator, false, 0, true); } } @@ -112,9 +110,16 @@ export function NewExpression( } this.token("("); - const exit = this.enterDelimited(); - this.printList(node.arguments, this.shouldPrintTrailingComma(")")); - exit(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); + this.printList( + node.arguments, + this.shouldPrintTrailingComma(")"), + undefined, + undefined, + undefined, + true, + ); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; this.rightParens(node); } @@ -144,7 +149,8 @@ export function _shouldPrintDecoratorsBeforeExport( export function Decorator(this: Printer, node: t.Decorator) { this.token("@"); - this.print(node.expression); + const { expression } = node; + this.print(expression); this.newline(); } @@ -199,9 +205,16 @@ export function OptionalCallExpression( this.print(node.typeArguments); this.token("("); - const exit = this.enterDelimited(); - this.printList(node.arguments); - exit(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); + this.printList( + node.arguments, + undefined, + undefined, + undefined, + undefined, + true, + ); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; this.rightParens(node); } @@ -214,9 +227,16 @@ export function CallExpression(this: Printer, node: t.CallExpression) { this.print(node.typeParameters); // legacy TS AST } this.token("("); - const exit = this.enterDelimited(); - this.printList(node.arguments, this.shouldPrintTrailingComma(")")); - exit(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); + this.printList( + node.arguments, + this.shouldPrintTrailingComma(")"), + undefined, + undefined, + undefined, + true, + ); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; this.rightParens(node); } @@ -275,16 +295,29 @@ export function AssignmentPattern(this: Printer, node: t.AssignmentPattern) { export function AssignmentExpression( this: Printer, - node: t.AssignmentExpression | t.BinaryExpression | t.LogicalExpression, + node: t.AssignmentExpression | t.LogicalExpression, ) { this.print(node.left); this.space(); - if (node.operator === "in" || node.operator === "instanceof") { - this.word(node.operator); + this.token(node.operator, false, 0, true); + this.space(); + + this.print(node.right); +} + +export { AssignmentExpression as LogicalExpression }; + +export function BinaryExpression(this: Printer, node: t.BinaryExpression) { + this.print(node.left); + + this.space(); + const { operator } = node; + if (operator.charCodeAt(0) === charCodes.lowercaseI) { + this.word(operator); } else { - this.token(node.operator); - this._endsWithDiv = node.operator === "/"; + this.token(operator, false, 0, true); + this.setLastChar(operator.charCodeAt(operator.length - 1)); } this.space(); @@ -297,11 +330,6 @@ export function BindExpression(this: Printer, node: t.BindExpression) { this.print(node.callee); } -export { - AssignmentExpression as BinaryExpression, - AssignmentExpression as LogicalExpression, -}; - export function MemberExpression(this: Printer, node: t.MemberExpression) { this.print(node.object); @@ -316,11 +344,11 @@ export function MemberExpression(this: Printer, node: t.MemberExpression) { } if (computed) { - const exit = this.enterDelimited(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); this.token("["); - this.print(node.property); + this.print(node.property, undefined, true); this.token("]"); - exit(); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; } else { this.token("."); this.print(node.property); diff --git a/packages/babel-generator/src/generators/flow.ts b/packages/babel-generator/src/generators/flow.ts index 20e69c15d035..15d11626e231 100644 --- a/packages/babel-generator/src/generators/flow.ts +++ b/packages/babel-generator/src/generators/flow.ts @@ -43,7 +43,7 @@ export function DeclareClass( } this.word("class"); this.space(); - this._interfaceish(node); + _interfaceish.call(this, node); } export function DeclareFunction( @@ -85,7 +85,7 @@ export function DeclaredPredicate(this: Printer, node: t.DeclaredPredicate) { export function DeclareInterface(this: Printer, node: t.DeclareInterface) { this.word("declare"); this.space(); - this.InterfaceDeclaration(node); + InterfaceDeclaration.call(this, node); } export function DeclareModule(this: Printer, node: t.DeclareModule) { @@ -113,7 +113,7 @@ export function DeclareModuleExports( export function DeclareTypeAlias(this: Printer, node: t.DeclareTypeAlias) { this.word("declare"); this.space(); - this.TypeAlias(node); + TypeAlias.call(this, node); } export function DeclareOpaqueType( @@ -125,7 +125,7 @@ export function DeclareOpaqueType( this.word("declare"); this.space(); } - this.OpaqueType(node); + OpaqueType.call(this, node); } export function DeclareVariable( @@ -424,7 +424,7 @@ export function InterfaceDeclaration( ) { this.word("interface"); this.space(); - this._interfaceish(node); + _interfaceish.call(this, node); } function andSeparator(this: Printer, occurrenceCount: number) { @@ -551,7 +551,7 @@ export function TypeParameterInstantiation( export { TypeParameterInstantiation as TypeParameterDeclaration }; export function TypeParameter(this: Printer, node: t.TypeParameter) { - this._variance(node); + _variance.call(this, node); this.word(node.name); @@ -615,12 +615,18 @@ export function ObjectTypeAnnotation( this.space(); - this.printJoin(props, true, true, undefined, undefined, () => { - if (props.length !== 1 || node.inexact) { - this.token(","); - this.space(); - } - }); + this.printJoin( + props, + true, + true, + () => { + if (props.length !== 1 || node.inexact) { + this.token(","); + this.space(); + } + }, + true, + ); this.space(); } @@ -678,7 +684,7 @@ export function ObjectTypeIndexer(this: Printer, node: t.ObjectTypeIndexer) { this.word("static"); this.space(); } - this._variance(node); + _variance.call(this, node); this.token("["); if (node.id) { this.print(node.id); @@ -705,7 +711,7 @@ export function ObjectTypeProperty(this: Printer, node: t.ObjectTypeProperty) { this.word(node.kind); this.space(); } - this._variance(node); + _variance.call(this, node); this.print(node.key); if (node.optional) this.token("?"); if (!node.method) { diff --git a/packages/babel-generator/src/generators/methods.ts b/packages/babel-generator/src/generators/methods.ts index 3cdb22fa5af4..ec805bf95b6c 100644 --- a/packages/babel-generator/src/generators/methods.ts +++ b/packages/babel-generator/src/generators/methods.ts @@ -1,6 +1,8 @@ import type Printer from "../printer.ts"; import type * as t from "@babel/types"; import { isIdentifier, type ParentMaps } from "@babel/types"; +// eslint-disable-next-line import/no-extraneous-dependencies +import * as charCodes from "charcodes"; import { TokenContext } from "../node/index.ts"; type ParentsOf = ParentMaps[T["type"]]; @@ -8,20 +10,22 @@ type ParentsOf = ParentMaps[T["type"]]; export function _params( this: Printer, node: t.Function | t.TSDeclareMethod | t.TSDeclareFunction, - idNode: t.Expression | t.PrivateName | null | undefined, + noLineTerminator: boolean, + idNode?: t.Expression | t.PrivateName | null, parentNode?: ParentsOf, ) { this.print(node.typeParameters); - const nameInfo = _getFuncIdName.call(this, idNode, parentNode); - if (nameInfo) { - this.sourceIdentifierName(nameInfo.name, nameInfo.pos); + if (idNode !== undefined || parentNode !== undefined) { + const nameInfo = _getFuncIdName.call(this, idNode, parentNode); + if (nameInfo) { + this.sourceIdentifierName(nameInfo.name, nameInfo.pos); + } } this.token("("); - this._parameters(node.params, ")"); + _parameters.call(this, node.params, charCodes.rightParenthesis); - const noLineTerminator = node.type === "ArrowFunctionExpression"; this.print(node.returnType, noLineTerminator); this._noLineTerminator = noLineTerminator; @@ -30,33 +34,40 @@ export function _params( export function _parameters( this: Printer, parameters: t.Function["params"], - endToken: string, + endToken: number, ) { - const exit = this.enterDelimited(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); const trailingComma = this.shouldPrintTrailingComma(endToken); const paramLength = parameters.length; for (let i = 0; i < paramLength; i++) { - this._param(parameters[i]); + _param.call(this, parameters[i]); if (trailingComma || i < paramLength - 1) { - this.token(",", undefined, i); + this.tokenChar(charCodes.comma, i); this.space(); } } - this.token(endToken); - exit(); + this.tokenChar(endToken); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; } export function _param( this: Printer, parameter: t.Identifier | t.RestElement | t.Pattern | t.TSParameterProperty, ) { - // @ts-expect-error decorators is not in VoidPattern - this.printJoin(parameter.decorators); - this.print(parameter); + this.printJoin( + // @ts-expect-error decorators is not in VoidPattern + parameter.decorators, + undefined, + undefined, + undefined, + undefined, + true, + ); + this.print(parameter, undefined, true); if ( // @ts-expect-error optional is not in TSParameterProperty parameter.optional @@ -67,6 +78,8 @@ export function _param( this.print( // @ts-expect-error typeAnnotation is not in TSParameterProperty parameter.typeAnnotation, + undefined, + true, ); // TS / flow } @@ -110,10 +123,16 @@ export function _methodHead(this: Printer, node: t.Method | t.TSDeclareMethod) { this.token("?"); } - this._params( - node, - node.computed && node.key.type !== "StringLiteral" ? undefined : node.key, - ); + if (this._buf._map) { + _params.call( + this, + node, + false, + node.computed && node.key.type !== "StringLiteral" ? undefined : node.key, + ); + } else { + _params.call(this, node, false); + } } export function _predicate( @@ -137,6 +156,7 @@ export function _functionHead( this: Printer, node: t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction, parent: ParentsOf, + hasPredicate: boolean, ) { if (node.async) { this.word("async"); @@ -144,7 +164,7 @@ export function _functionHead( // We prevent inner comments from being printed here, // so that they are always consistently printed in the // same place regardless of the function type. - this._endsWithInnerRaw = false; + this._innerCommentsState = 0 /* INNER_COMMENT_STATE.DISALLOWED */; } this.space(); } @@ -154,7 +174,7 @@ export function _functionHead( // We prevent inner comments from being printed here, // so that they are always consistently printed in the // same place regardless of the function type. - this._endsWithInnerRaw = false; + this._innerCommentsState = 0 /* INNER_COMMENT_STATE.DISALLOWED */; } this.token("*"); } @@ -164,9 +184,13 @@ export function _functionHead( this.print(node.id); } - this._params(node, node.id, parent); - if (node.type !== "TSDeclareFunction") { - this._predicate(node); + if (this._buf._map) { + _params.call(this, node, false, node.id, parent); + } else { + _params.call(this, node, false); + } + if (hasPredicate) { + _predicate.call(this, node as t.FunctionDeclaration | t.FunctionExpression); } } @@ -175,7 +199,7 @@ export function FunctionExpression( node: t.FunctionExpression, parent: ParentsOf, ) { - this._functionHead(node, parent); + _functionHead.call(this, node, parent, true); this.space(); this.print(node.body); } @@ -192,13 +216,19 @@ export function ArrowFunctionExpression( this.space(); } - if (this._shouldPrintArrowParamsParens(node)) { - this._params(node, undefined, parent); + if (_shouldPrintArrowParamsParens.call(this, node)) { + _params.call( + this, + node, + true, + undefined, + this._buf._map ? parent : undefined, + ); } else { this.print(node.params[0], true); } - this._predicate(node, true); + _predicate.call(this, node, true); this.space(); // When printing (x)/*1*/=>{}, we remove the parentheses // and thus there aren't two contiguous inner tokens. diff --git a/packages/babel-generator/src/generators/modules.ts b/packages/babel-generator/src/generators/modules.ts index 899c5dae31b8..7cfe462c52c7 100644 --- a/packages/babel-generator/src/generators/modules.ts +++ b/packages/babel-generator/src/generators/modules.ts @@ -9,6 +9,7 @@ import { } from "@babel/types"; import type * as t from "@babel/types"; import { TokenContext } from "../node/index.ts"; +import { _shouldPrintDecoratorsBeforeExport } from "./expressions.ts"; export function ImportSpecifier(this: Printer, node: t.ImportSpecifier) { if (node.importKind === "type" || node.importKind === "typeof") { @@ -156,7 +157,7 @@ export function ExportAllDeclaration( ) { this.print(node.source, true); this.space(); - this._printAttributes(node, false); + _printAttributes.call(this, node, false); } else { this.print(node.source); } @@ -170,7 +171,8 @@ function maybePrintDecoratorsBeforeExport( ) { if ( isClassDeclaration(node.declaration) && - printer._shouldPrintDecoratorsBeforeExport( + _shouldPrintDecoratorsBeforeExport.call( + printer, node as t.ExportNamedDeclaration & { declaration: t.ClassDeclaration }, ) ) { @@ -240,7 +242,7 @@ export function ExportNamedDeclaration( ) { this.print(node.source, true); this.space(); - this._printAttributes(node, hasBrace); + _printAttributes.call(this, node, hasBrace); } else { this.print(node.source); } @@ -330,7 +332,7 @@ export function ImportDeclaration(this: Printer, node: t.ImportDeclaration) { ) { this.print(node.source, true); this.space(); - this._printAttributes(node, hasBrace); + _printAttributes.call(this, node, hasBrace); } else { this.print(node.source); } diff --git a/packages/babel-generator/src/generators/statements.ts b/packages/babel-generator/src/generators/statements.ts index b2e8d116c38c..3694a6422962 100644 --- a/packages/babel-generator/src/generators/statements.ts +++ b/packages/babel-generator/src/generators/statements.ts @@ -1,15 +1,11 @@ import type Printer from "../printer.ts"; -import { - isFor, - isForStatement, - isIfStatement, - isStatement, -} from "@babel/types"; +import { isFor, isIfStatement, isStatement } from "@babel/types"; import type * as t from "@babel/types"; // We inline this package // eslint-disable-next-line import/no-extraneous-dependencies import * as charCodes from "charcodes"; +import { TokenContext } from "../node/index.ts"; export function WithStatement(this: Printer, node: t.WithStatement) { this.word("with"); @@ -17,7 +13,7 @@ export function WithStatement(this: Printer, node: t.WithStatement) { this.token("("); this.print(node.object); this.token(")"); - this.printBlock(node); + this.printBlock(node.body); } export function IfStatement(this: Printer, node: t.IfStatement) { @@ -68,11 +64,10 @@ export function ForStatement(this: Printer, node: t.ForStatement) { this.space(); this.token("("); - { - const exit = this.enterForStatementInit(); - this.print(node.init); - exit(); - } + this.tokenContext |= + TokenContext.forInitHead | TokenContext.forInOrInitHeadAccumulate; + this.print(node.init); + this.tokenContext = TokenContext.normal; this.token(";"); @@ -80,7 +75,7 @@ export function ForStatement(this: Printer, node: t.ForStatement) { this.space(); this.print(node.test); } - this.token(";", false, 1); + this.tokenChar(charCodes.semicolon, 1); if (node.update) { this.space(); @@ -88,7 +83,7 @@ export function ForStatement(this: Printer, node: t.ForStatement) { } this.token(")"); - this.printBlock(node); + this.printBlock(node.body); } export function WhileStatement(this: Printer, node: t.WhileStatement) { @@ -97,35 +92,45 @@ export function WhileStatement(this: Printer, node: t.WhileStatement) { this.token("("); this.print(node.test); this.token(")"); - this.printBlock(node); + this.printBlock(node.body); +} + +export function ForInStatement(this: Printer, node: t.ForInStatement) { + this.word("for"); + this.space(); + this.noIndentInnerCommentsHere(); + this.token("("); + this.tokenContext |= + TokenContext.forInHead | TokenContext.forInOrInitHeadAccumulate; + this.print(node.left); + this.tokenContext = TokenContext.normal; + this.space(); + this.word("in"); + this.space(); + this.print(node.right); + this.token(")"); + this.printBlock(node.body); } -function ForXStatement(this: Printer, node: t.ForXStatement) { +export function ForOfStatement(this: Printer, node: t.ForOfStatement) { this.word("for"); this.space(); - const isForOf = node.type === "ForOfStatement"; - if (isForOf && node.await) { + if (node.await) { this.word("await"); this.space(); } this.noIndentInnerCommentsHere(); this.token("("); - { - const exit = this.enterForXStatementInit(isForOf); - this.print(node.left); - exit?.(); - } + this.tokenContext |= TokenContext.forOfHead; + this.print(node.left); this.space(); - this.word(isForOf ? "of" : "in"); + this.word("of"); this.space(); this.print(node.right); this.token(")"); - this.printBlock(node); + this.printBlock(node.body); } -export const ForInStatement = ForXStatement; -export const ForOfStatement = ForXStatement; - export function DoWhileStatement(this: Printer, node: t.DoWhileStatement) { this.word("do"); this.space(); @@ -252,6 +257,11 @@ export function DebuggerStatement(this: Printer) { this.semicolon(); } +function commaSeparatorWithNewline(this: Printer, occurrenceCount: number) { + this.tokenChar(charCodes.comma, occurrenceCount); + this.newline(); +} + export function VariableDeclaration( this: Printer, node: t.VariableDeclaration, @@ -264,12 +274,16 @@ export function VariableDeclaration( } const { kind } = node; - if (kind === "await using") { - this.word("await"); - this.space(); - this.word("using", true); - } else { - this.word(kind, kind === "using"); + switch (kind) { + case "await using": + this.word("await"); + this.space(); + // fallthrough + case "using": + this.word("using", true); + break; + default: + this.word(kind); } this.space(); @@ -280,6 +294,7 @@ export function VariableDeclaration( if (declar.init) { // has an init so let's split it up over multiple lines hasInits = true; + break; } } } @@ -301,20 +316,21 @@ export function VariableDeclaration( undefined, undefined, node.declarations.length > 1, - hasInits - ? function (this: Printer, occurrenceCount: number) { - this.token(",", false, occurrenceCount); - this.newline(); - } - : undefined, + hasInits ? commaSeparatorWithNewline : undefined, ); - if (isFor(parent)) { - // don't give semicolons to these nodes since they'll be inserted in the parent generator - if (isForStatement(parent)) { - if (parent.init === node) return; - } else { - if (parent.left === node) return; + if (parent != null) { + switch (parent.type) { + case "ForStatement": + if (parent.init === node) { + return; + } + break; + case "ForInStatement": + case "ForOfStatement": + if (parent.left === node) { + return; + } } } diff --git a/packages/babel-generator/src/generators/template-literals.ts b/packages/babel-generator/src/generators/template-literals.ts index 5a7c73eee09d..08961645b4da 100644 --- a/packages/babel-generator/src/generators/template-literals.ts +++ b/packages/babel-generator/src/generators/template-literals.ts @@ -49,5 +49,5 @@ export function _printTemplate( } export function TemplateLiteral(this: Printer, node: t.TemplateLiteral) { - this._printTemplate(node, node.expressions); + _printTemplate.call(this, node, node.expressions); } diff --git a/packages/babel-generator/src/generators/types.ts b/packages/babel-generator/src/generators/types.ts index bba14416959a..e04fd8781b47 100644 --- a/packages/babel-generator/src/generators/types.ts +++ b/packages/babel-generator/src/generators/types.ts @@ -2,13 +2,13 @@ import type Printer from "../printer.ts"; import { isAssignmentPattern, isIdentifier } from "@babel/types"; import type * as t from "@babel/types"; import jsesc from "jsesc"; +// We inline this package +// eslint-disable-next-line import/no-extraneous-dependencies +import * as charCodes from "charcodes"; +import { _methodHead } from "./methods.ts"; -let lastRawIdentNode: t.Identifier | null = null; let lastRawIdentResult: string = ""; export function _getRawIdentifier(this: Printer, node: t.Identifier) { - if (node === lastRawIdentNode) return lastRawIdentResult; - lastRawIdentNode = node; - const { name } = node; const token = this.tokenMap!.find(node, tok => tok.value === name); if (token) { @@ -19,9 +19,11 @@ export function _getRawIdentifier(this: Printer, node: t.Identifier) { } export function Identifier(this: Printer, node: t.Identifier) { - this.sourceIdentifierName(node.loc?.identifierName || node.name); + if (this._buf._map) { + this.sourceIdentifierName(node.loc?.identifierName || node.name); + } - this.word(this.tokenMap ? this._getRawIdentifier(node) : node.name); + this.word(this.tokenMap ? lastRawIdentResult : node.name); } export function ArgumentPlaceholder(this: Printer) { @@ -41,23 +43,28 @@ export function ObjectExpression(this: Printer, node: t.ObjectExpression) { this.token("{"); if (props.length) { - const exit = this.enterDelimited(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); this.space(); - this.printList(props, this.shouldPrintTrailingComma("}"), true, true); + this.printList( + props, + this.shouldPrintTrailingComma("}"), + true, + true, + undefined, + true, + ); this.space(); - exit(); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; } - this.sourceWithOffset("end", node.loc, -1); - - this.token("}"); + this.rightBrace(node); } export { ObjectExpression as ObjectPattern }; export function ObjectMethod(this: Printer, node: t.ObjectMethod) { this.printJoin(node.decorators); - this._methodHead(node); + _methodHead.call(this, node); this.space(); this.print(node.body); } @@ -105,15 +112,15 @@ export function ArrayExpression(this: Printer, node: t.ArrayExpression) { this.token("["); - const exit = this.enterDelimited(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); for (let i = 0; i < elems.length; i++) { const elem = elems[i]; if (elem) { if (i > 0) this.space(); - this.print(elem); + this.print(elem, undefined, true); if (i < len - 1 || this.shouldPrintTrailingComma("]")) { - this.token(",", false, i); + this.tokenChar(charCodes.comma, i); } } else { // If the array expression ends with a hole, that hole @@ -121,11 +128,11 @@ export function ArrayExpression(this: Printer, node: t.ArrayExpression) { // two (or more) holes, we need to write out two (or more) // commas so that the resulting code is interpreted with // both (all) of the holes. - this.token(",", false, i); + this.tokenChar(charCodes.comma, i); } } - exit(); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; this.token("]"); } @@ -133,7 +140,7 @@ export function ArrayExpression(this: Printer, node: t.ArrayExpression) { export { ArrayExpression as ArrayPattern }; export function RegExpLiteral(this: Printer, node: t.RegExpLiteral) { - this.word(`/${node.pattern}/${node.flags}`); + this.word(`/${node.pattern}/${node.flags}`, false); } export function BooleanLiteral(this: Printer, node: t.BooleanLiteral) { diff --git a/packages/babel-generator/src/generators/typescript.ts b/packages/babel-generator/src/generators/typescript.ts index 9eca8527527d..a06b2e20ba0f 100644 --- a/packages/babel-generator/src/generators/typescript.ts +++ b/packages/babel-generator/src/generators/typescript.ts @@ -1,5 +1,10 @@ import type Printer from "../printer.ts"; import type * as t from "@babel/types"; +// eslint-disable-next-line import/no-extraneous-dependencies +import * as charCodes from "charcodes"; +import { _functionHead, _param, _parameters } from "./methods.ts"; +import { _classMethodHead } from "./classes.ts"; +import { _printTemplate } from "./template-literals.ts"; export function TSTypeAnnotation( this: Printer, @@ -101,7 +106,7 @@ export function TSParameterProperty( this.space(); } - this._param(node.parameter); + _param.call(this, node.parameter); } export function TSDeclareFunction( @@ -113,12 +118,12 @@ export function TSDeclareFunction( this.word("declare"); this.space(); } - this._functionHead(node, parent); + _functionHead.call(this, node, parent, false); this.semicolon(); } export function TSDeclareMethod(this: Printer, node: t.TSDeclareMethod) { - this._classMethodHead(node); + _classMethodHead.call(this, node); this.semicolon(); } @@ -132,7 +137,7 @@ export function TSCallSignatureDeclaration( this: Printer, node: t.TSCallSignatureDeclaration, ) { - this.tsPrintSignatureDeclarationBase(node); + tsPrintSignatureDeclarationBase.call(this, node); maybePrintTrailingCommaOrSemicolon(this, node); } @@ -155,7 +160,7 @@ export function TSConstructSignatureDeclaration( ) { this.word("new"); this.space(); - this.tsPrintSignatureDeclarationBase(node); + tsPrintSignatureDeclarationBase.call(this, node); maybePrintTrailingCommaOrSemicolon(this, node); } @@ -168,12 +173,12 @@ export function TSPropertySignature( this.word("readonly"); this.space(); } - this.tsPrintPropertyOrMethodName(node); + tsPrintPropertyOrMethodName.call(this, node); this.print(node.typeAnnotation); maybePrintTrailingCommaOrSemicolon(this, node); } -export function tsPrintPropertyOrMethodName( +function tsPrintPropertyOrMethodName( this: Printer, node: t.TSPropertySignature | t.TSMethodSignature, ) { @@ -195,8 +200,8 @@ export function TSMethodSignature(this: Printer, node: t.TSMethodSignature) { this.word(kind); this.space(); } - this.tsPrintPropertyOrMethodName(node); - this.tsPrintSignatureDeclarationBase(node); + tsPrintPropertyOrMethodName.call(this, node); + tsPrintSignatureDeclarationBase.call(this, node); maybePrintTrailingCommaOrSemicolon(this, node); } @@ -211,7 +216,7 @@ export function TSIndexSignature(this: Printer, node: t.TSIndexSignature) { this.space(); } this.token("["); - this._parameters(node.parameters, "]"); + _parameters.call(this, node.parameters, charCodes.rightSquareBracket); this.print(node.typeAnnotation); maybePrintTrailingCommaOrSemicolon(this, node); } @@ -261,7 +266,7 @@ export function TSThisType(this: Printer) { } export function TSFunctionType(this: Printer, node: t.TSFunctionType) { - this.tsPrintFunctionOrConstructorType(node); + tsPrintFunctionOrConstructorType.call(this, node); } export function TSConstructorType(this: Printer, node: t.TSConstructorType) { @@ -271,10 +276,10 @@ export function TSConstructorType(this: Printer, node: t.TSConstructorType) { } this.word("new"); this.space(); - this.tsPrintFunctionOrConstructorType(node); + tsPrintFunctionOrConstructorType.call(this, node); } -export function tsPrintFunctionOrConstructorType( +function tsPrintFunctionOrConstructorType( this: Printer, node: t.TSFunctionType | t.TSConstructorType, ) { @@ -286,7 +291,7 @@ export function tsPrintFunctionOrConstructorType( node.parameters; this.print(typeParameters); this.token("("); - this._parameters(parameters, ")"); + _parameters.call(this, parameters, charCodes.rightParenthesis); this.space(); const returnType = process.env.BABEL_8_BREAKING ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape @@ -336,7 +341,9 @@ export function TSTypeQuery(this: Printer, node: t.TSTypeQuery) { } export function TSTypeLiteral(this: Printer, node: t.TSTypeLiteral) { - printBraced(this, node, () => this.printJoin(node.members, true, true)); + printBraced(this, node, () => + this.printJoin(node.members, true, true, undefined, undefined, true), + ); } export function TSArrayType(this: Printer, node: t.TSArrayType) { @@ -445,7 +452,7 @@ export function TSIndexedAccessType( export function TSMappedType(this: Printer, node: t.TSMappedType) { const { nameType, optional, readonly, typeAnnotation } = node; this.token("{"); - const exit = this.enterDelimited(); + const oldNoLineTerminatorAfterNode = this.enterDelimited(); this.space(); if (readonly) { tokenIfPlusMinus(this, readonly); @@ -467,17 +474,17 @@ export function TSMappedType(this: Printer, node: t.TSMappedType) { this.space(); if (process.env.BABEL_8_BREAKING) { // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape - this.print(node.constraint); + this.print(node.constraint, undefined, true); } else { // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape - this.print(node.typeParameter.constraint); + this.print(node.typeParameter.constraint, undefined, true); } if (nameType) { this.space(); this.word("as"); this.space(); - this.print(nameType); + this.print(nameType, undefined, true); } this.token("]"); @@ -490,10 +497,10 @@ export function TSMappedType(this: Printer, node: t.TSMappedType) { if (typeAnnotation) { this.token(":"); this.space(); - this.print(typeAnnotation); + this.print(typeAnnotation, undefined, true); } this.space(); - exit(); + this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; this.token("}"); } @@ -507,7 +514,7 @@ export function TSTemplateLiteralType( this: Printer, node: t.TSTemplateLiteralType, ) { - this._printTemplate(node, node.types); + _printTemplate.call(this, node, node.types); } export function TSLiteralType(this: Printer, node: t.TSLiteralType) { @@ -552,7 +559,9 @@ export function TSInterfaceDeclaration( } export function TSInterfaceBody(this: Printer, node: t.TSInterfaceBody) { - printBraced(this, node, () => this.printJoin(node.body, true, true)); + printBraced(this, node, () => + this.printJoin(node.body, true, true, undefined, undefined, true), + ); } export function TSTypeAliasDeclaration( @@ -575,23 +584,27 @@ export function TSTypeAliasDeclaration( this.semicolon(); } -function TSTypeExpression( +export function TSAsExpression(this: Printer, node: t.TSAsExpression) { + const { expression, typeAnnotation } = node; + this.print(expression, true); + this.space(); + this.word("as"); + this.space(); + this.print(typeAnnotation); +} + +export function TSSatisfiesExpression( this: Printer, - node: t.TSAsExpression | t.TSSatisfiesExpression, + node: t.TSSatisfiesExpression, ) { - const { type, expression, typeAnnotation } = node; + const { expression, typeAnnotation } = node; this.print(expression, true); this.space(); - this.word(type === "TSAsExpression" ? "as" : "satisfies"); + this.word("satisfies"); this.space(); this.print(typeAnnotation); } -export { - TSTypeExpression as TSAsExpression, - TSTypeExpression as TSSatisfiesExpression, -}; - export function TSTypeAssertion(this: Printer, node: t.TSTypeAssertion) { const { typeAnnotation, expression } = node; this.token("<"); @@ -647,6 +660,8 @@ export function TSEnumBody(this: Printer, node: t.TSEnumBody) { (process.env.BABEL_8_BREAKING ? false : true), true, true, + undefined, + true, ), ); } @@ -716,7 +731,7 @@ export function TSModuleDeclaration( } export function TSModuleBlock(this: Printer, node: t.TSModuleBlock) { - printBraced(this, node, () => this.printSequence(node.body, true)); + printBraced(this, node, () => this.printSequence(node.body, true, true)); } export function TSImportType(this: Printer, node: t.TSImportType) { @@ -784,6 +799,7 @@ export function TSNonNullExpression( ) { this.print(node.expression); this.token("!"); + this.setLastChar(charCodes.exclamationMark); } export function TSExportAssignment(this: Printer, node: t.TSExportAssignment) { @@ -809,21 +825,21 @@ export function TSNamespaceExportDeclaration( this.semicolon(); } -export function tsPrintSignatureDeclarationBase(this: Printer, node: any) { +function tsPrintSignatureDeclarationBase(this: Printer, node: any) { const { typeParameters } = node; const parameters = process.env.BABEL_8_BREAKING ? node.params : node.parameters; this.print(typeParameters); this.token("("); - this._parameters(parameters, ")"); + _parameters.call(this, parameters, charCodes.rightParenthesis); const returnType = process.env.BABEL_8_BREAKING ? node.returnType : node.typeAnnotation; this.print(returnType); } -export function tsPrintClassMemberModifiers( +export function _tsPrintClassMemberModifiers( this: Printer, node: | t.ClassProperty @@ -853,9 +869,9 @@ export function tsPrintClassMemberModifiers( function printBraced(printer: Printer, node: t.Node, cb: () => void) { printer.token("{"); - const exit = printer.enterDelimited(); + const oldNoLineTerminatorAfterNode = printer.enterDelimited(); cb(); - exit(); + printer._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; printer.rightBrace(node); } diff --git a/packages/babel-generator/src/node/index.ts b/packages/babel-generator/src/node/index.ts index c0e336977766..18abb1833552 100644 --- a/packages/babel-generator/src/node/index.ts +++ b/packages/babel-generator/src/node/index.ts @@ -1,18 +1,8 @@ -import * as whitespace from "./whitespace.ts"; import * as parens from "./parentheses.ts"; -import { - FLIPPED_ALIAS_KEYS, - VISITOR_KEYS, - isCallExpression, - isDecorator, - isExpressionStatement, - isMemberExpression, - isNewExpression, - isParenthesizedExpression, -} from "@babel/types"; +import { VISITOR_KEYS } from "@babel/types"; import type * as t from "@babel/types"; -import type { WhitespaceFlag } from "./whitespace.ts"; +import { generatorInfosMap } from "../nodes.ts"; export const enum TokenContext { normal = 0, @@ -26,123 +16,60 @@ export const enum TokenContext { // This flag lives across the token boundary, and will // be reset after forIn or forInit head is printed forInOrInitHeadAccumulate = 1 << 7, - forInOrInitHeadAccumulatePassThroughMask = 0x80, + forInOrInitHeadAccumulatePassThroughMask = 0b10000000, } -type NodeHandler = ( +export type NodeHandler = ( node: t.Node, // todo: // node: K extends keyof typeof t // ? Extract // : t.Node, parent: t.Node, + parentId: number, tokenContext?: number, getRawIdentifier?: (node: t.Identifier) => string, ) => R | undefined; -export type NodeHandlers = Partial>>; - -function expandAliases(obj: NodeHandlers) { - const map = new Map>(); - - function add(type: string, func: NodeHandler) { - const fn = map.get(type); - map.set( - type, - fn - ? function (node, parent, stack, getRawIdentifier) { - return ( - fn(node, parent, stack, getRawIdentifier) ?? - func(node, parent, stack, getRawIdentifier) - ); - } - : func, - ); - } - - for (const type of Object.keys(obj)) { - const aliases = FLIPPED_ALIAS_KEYS[type]; - if (aliases) { - for (const alias of aliases) { - add(alias, obj[type]!); - } - } else { - add(type, obj[type]!); - } +for (const type of Object.keys(parens) as (keyof typeof parens)[]) { + const func = parens[type]; + if (generatorInfosMap.has(type)) { + generatorInfosMap.get(type)![2] = func; } - - return map; } -// Rather than using `t.is` on each object property, we pre-expand any type aliases -// into concrete types so that the 'find' call below can be as fast as possible. -const expandedParens = expandAliases(parens); -const expandedWhitespaceNodes = expandAliases(whitespace.nodes); - function isOrHasCallExpression(node: t.Node): boolean { - if (isCallExpression(node)) { - return true; - } - - return isMemberExpression(node) && isOrHasCallExpression(node.object); -} - -export function needsWhitespace( - node: t.Node, - parent: t.Node, - type: WhitespaceFlag, -): boolean { - if (!node) return false; - - if (isExpressionStatement(node)) { - node = node.expression; - } - - const flag = expandedWhitespaceNodes.get(node.type)?.(node, parent); - - if (typeof flag === "number") { - return (flag & type) !== 0; + switch (node.type) { + case "CallExpression": + return true; + case "MemberExpression": + return isOrHasCallExpression(node.object); } - return false; } -export function needsWhitespaceBefore(node: t.Node, parent: t.Node) { - return needsWhitespace(node, parent, 1); -} - -export function needsWhitespaceAfter(node: t.Node, parent: t.Node) { - return needsWhitespace(node, parent, 2); -} - -export function needsParens( +export function parentNeedsParens( node: t.Node, - parent: t.Node | null, - tokenContext?: number, - getRawIdentifier?: (node: t.Identifier) => string, + parent: any, + parentId: number, ): boolean { - if (!parent) return false; - - if (isNewExpression(parent) && parent.callee === node) { - if (isOrHasCallExpression(node)) return true; - } - - if (isDecorator(parent)) { - return ( - !isDecoratorMemberExpression(node) && - !(isCallExpression(node) && isDecoratorMemberExpression(node.callee)) && - !isParenthesizedExpression(node) - ); + switch (parentId) { + case __node("NewExpression"): + if (parent.callee === node) { + if (isOrHasCallExpression(node)) return true; + } + break; + case __node("Decorator"): + return ( + !isDecoratorMemberExpression(node) && + !( + node.type === "CallExpression" && + isDecoratorMemberExpression(node.callee) + ) && + node.type !== "ParenthesizedExpression" + ); } - - return ( - expandedParens.get(node.type)?.( - node, - parent, - tokenContext, - getRawIdentifier, - ) || false - ); + return false; } function isDecoratorMemberExpression(node: t.Node): boolean { diff --git a/packages/babel-generator/src/node/parentheses.ts b/packages/babel-generator/src/node/parentheses.ts index 7873ac7a9aa3..9c1bdeb4a118 100644 --- a/packages/babel-generator/src/node/parentheses.ts +++ b/packages/babel-generator/src/node/parentheses.ts @@ -1,11 +1,5 @@ import { - isArrayTypeAnnotation, - isBinaryExpression, - isCallExpression, - isForOfStatement, - isIndexedAccessType, isMemberExpression, - isObjectPattern, isOptionalMemberExpression, isYieldExpression, isStatement, @@ -16,124 +10,118 @@ import { TokenContext } from "./index.ts"; const PRECEDENCE = new Map([ ["||", 0], - ["??", 0], - ["|>", 0], - ["&&", 1], - ["|", 2], - ["^", 3], - ["&", 4], - ["==", 5], - ["===", 5], - ["!=", 5], - ["!==", 5], - ["<", 6], - [">", 6], - ["<=", 6], - [">=", 6], - ["in", 6], - ["instanceof", 6], - [">>", 7], - ["<<", 7], - [">>>", 7], - ["+", 8], - ["-", 8], - ["*", 9], - ["/", 9], - ["%", 9], - ["**", 10], + ["??", 1], + ["&&", 2], + ["|", 3], + ["^", 4], + ["&", 5], + ["==", 6], + ["===", 6], + ["!=", 6], + ["!==", 6], + ["<", 7], + [">", 7], + ["<=", 7], + [">=", 7], + ["in", 7], + ["instanceof", 7], + [">>", 8], + ["<<", 8], + [">>>", 8], + ["+", 9], + ["-", 9], + ["*", 10], + ["/", 10], + ["%", 10], + ["**", 11], ]); -function getBinaryPrecedence( - node: t.Binary | t.TSAsExpression | t.TSSatisfiesExpression, - nodeType: string, -): number; -function getBinaryPrecedence( - node: t.Node, - nodeType: string, -): number | undefined; -function getBinaryPrecedence(node: t.Node, nodeType: string) { - if (nodeType === "BinaryExpression" || nodeType === "LogicalExpression") { - return PRECEDENCE.get((node as t.Binary).operator); - } - if (nodeType === "TSAsExpression" || nodeType === "TSSatisfiesExpression") { - return PRECEDENCE.get("in"); - } -} - -function isTSTypeExpression(nodeType: string) { +function isTSTypeExpression(nodeId: number) { return ( - nodeType === "TSAsExpression" || - nodeType === "TSSatisfiesExpression" || - nodeType === "TSTypeAssertion" + nodeId === __node("TSAsExpression") || + nodeId === __node("TSSatisfiesExpression") || + nodeId === __node("TSTypeAssertion") ); } const isClassExtendsClause = ( node: t.Node, - parent: t.Node, + parent: any, + parentId: number, ): parent is t.Class => { - const parentType = parent.type; return ( - (parentType === "ClassDeclaration" || parentType === "ClassExpression") && + (parentId === __node("ClassDeclaration") || + parentId === __node("ClassExpression")) && parent.superClass === node ); }; -const hasPostfixPart = (node: t.Node, parent: t.Node) => { - const parentType = parent.type; - return ( - ((parentType === "MemberExpression" || - parentType === "OptionalMemberExpression") && - parent.object === node) || - ((parentType === "CallExpression" || - parentType === "OptionalCallExpression" || - parentType === "NewExpression") && - parent.callee === node) || - (parentType === "TaggedTemplateExpression" && parent.tag === node) || - parentType === "TSNonNullExpression" - ); +const hasPostfixPart = (node: t.Node, parent: any, parentId: number) => { + switch (parentId) { + case __node("MemberExpression"): + case __node("OptionalMemberExpression"): + return parent.object === node; + case __node("CallExpression"): + case __node("OptionalCallExpression"): + case __node("NewExpression"): + return parent.callee === node; + case __node("TaggedTemplateExpression"): + return parent.tag === node; + case __node("TSNonNullExpression"): + return true; + } + + return false; }; export function NullableTypeAnnotation( node: t.NullableTypeAnnotation, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - return isArrayTypeAnnotation(parent); + return parentId === __node("ArrayTypeAnnotation"); } export function FunctionTypeAnnotation( node: t.FunctionTypeAnnotation, - parent: t.Node, + parent: any, + parentId: number, tokenContext: number, ): boolean { - const parentType = parent.type; return ( // (() => A) | (() => B) - parentType === "UnionTypeAnnotation" || + parentId === __node("UnionTypeAnnotation") || // (() => A) & (() => B) - parentType === "IntersectionTypeAnnotation" || + parentId === __node("IntersectionTypeAnnotation") || // (() => A)[] - parentType === "ArrayTypeAnnotation" || - Boolean(tokenContext & TokenContext.arrowFlowReturnType) + parentId === __node("ArrayTypeAnnotation") || + (tokenContext & TokenContext.arrowFlowReturnType) > 0 ); } export function UpdateExpression( node: t.UpdateExpression, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent); + return ( + hasPostfixPart(node, parent, parentId) || + isClassExtendsClause(node, parent, parentId) + ); } function needsParenBeforeExpressionBrace(tokenContext: number) { - return Boolean( - tokenContext & (TokenContext.expressionStatement | TokenContext.arrowBody), + return ( + (tokenContext & + (TokenContext.expressionStatement | TokenContext.arrowBody)) > + 0 ); } export function ObjectExpression( node: t.ObjectExpression, - parent: t.Node, + parent: any, + parentId: number, tokenContext: number, ): boolean { return needsParenBeforeExpressionBrace(tokenContext); @@ -141,98 +129,118 @@ export function ObjectExpression( export function DoExpression( node: t.DoExpression, - parent: t.Node, + parent: any, + parentId: number, tokenContext: number, ): boolean { // `async do` can start an expression statement - return ( - !node.async && Boolean(tokenContext & TokenContext.expressionStatement) - ); + return (tokenContext & TokenContext.expressionStatement) > 0 && !node.async; } -export function Binary( - node: t.Binary | t.TSAsExpression | t.TSSatisfiesExpression, - parent: t.Node, -): boolean | undefined { - const parentType = parent.type; - if ( - node.type === "BinaryExpression" && - node.operator === "**" && - parentType === "BinaryExpression" && - parent.operator === "**" - ) { - return parent.left === node; - } +const enum BinaryLikeType { + Binary = 0, + Logical = 1, + TypeScript = 2, +} - if (isClassExtendsClause(node, parent)) { +function BinaryLike( + node: t.Binary | t.TSAsExpression | t.TSSatisfiesExpression, + parent: any, + parentId: number, + nodeType: BinaryLikeType, +): boolean { + if (isClassExtendsClause(node, parent, parentId)) { return true; } if ( - hasPostfixPart(node, parent) || - parentType === "UnaryExpression" || - parentType === "SpreadElement" || - parentType === "AwaitExpression" + hasPostfixPart(node, parent, parentId) || + parentId === __node("UnaryExpression") || + parentId === __node("SpreadElement") || + parentId === __node("AwaitExpression") ) { return true; } - - const parentPos = getBinaryPrecedence(parent, parentType); - if (parentPos != null) { - const nodePos = getBinaryPrecedence(node, node.type); + let parentPos: number | undefined; + switch (parentId) { + case __node("BinaryExpression"): + case __node("LogicalExpression"): + parentPos = PRECEDENCE.get(parent.operator); + break; + case __node("TSAsExpression"): + case __node("TSSatisfiesExpression"): + parentPos = 7; /* in */ + } + if (parentPos !== undefined) { + const nodePos = + nodeType === BinaryLikeType.TypeScript + ? 7 /* in */ + : PRECEDENCE.get((node as t.Binary).operator)!; + if (parentPos > nodePos) return true; if ( - // Logical expressions with the same precedence don't need parens. - (parentPos === nodePos && - parentType === "BinaryExpression" && - parent.right === node) || - parentPos > nodePos + parentPos === nodePos && + parentId === __node("BinaryExpression") && + (nodePos === 11 /* ** */ ? parent.left === node : parent.right === node) + ) { + return true; + } + if ( + nodeType === BinaryLikeType.Logical && + parentId === __node("LogicalExpression") && + // 1: ?? + ((nodePos === 1 && parentPos !== 1) || (parentPos === 1 && nodePos !== 1)) ) { return true; } } + return false; } export function UnionTypeAnnotation( - node: t.UnionTypeAnnotation, - parent: t.Node, + node: t.UnionTypeAnnotation | t.IntersectionTypeAnnotation, + parent: any, + parentId: number, ): boolean { - const parentType = parent.type; - return ( - parentType === "ArrayTypeAnnotation" || - parentType === "NullableTypeAnnotation" || - parentType === "IntersectionTypeAnnotation" || - parentType === "UnionTypeAnnotation" - ); + switch (parentId) { + case __node("ArrayTypeAnnotation"): + case __node("NullableTypeAnnotation"): + case __node("IntersectionTypeAnnotation"): + case __node("UnionTypeAnnotation"): + return true; + } + return false; } export { UnionTypeAnnotation as IntersectionTypeAnnotation }; export function OptionalIndexedAccessType( node: t.OptionalIndexedAccessType, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - return isIndexedAccessType(parent) && parent.objectType === node; + return parentId === __node("IndexedAccessType") && parent.objectType === node; } export function TSAsExpression( node: t.TSAsExpression | t.TSSatisfiesExpression, - parent: t.Node, -): boolean | undefined { + parent: any, + parentId: number, +): boolean { if ( - (parent.type === "AssignmentExpression" || - parent.type === "AssignmentPattern") && + (parentId === __node("AssignmentExpression") || + parentId === __node("AssignmentPattern")) && parent.left === node ) { return true; } if ( - parent.type === "BinaryExpression" && + parentId === __node("BinaryExpression") && (parent.operator === "|" || parent.operator === "&") && node === parent.left ) { return true; } - return Binary(node, parent); + return BinaryLike(node, parent, parentId, BinaryLikeType.TypeScript); } export { TSAsExpression as TSSatisfiesExpression }; @@ -241,121 +249,124 @@ export { UnaryLike as TSTypeAssertion }; export function TSConditionalType( node: t.TSConditionalType, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - const parentType = parent.type; - if ( - parentType === "TSArrayType" || - (parentType === "TSIndexedAccessType" && parent.objectType === node) || - parentType === "TSOptionalType" || - parentType === "TSTypeOperator" || + switch (parentId) { + case __node("TSArrayType"): + case __node("TSOptionalType"): + case __node("TSTypeOperator"): // for `infer K extends (L extends M ? M : ...)` - parentType === "TSTypeParameter" - ) { - return true; - } - if ( - (parentType === "TSIntersectionType" || parentType === "TSUnionType") && - parent.types[0] === node - ) { - return true; - } - if ( - parentType === "TSConditionalType" && - (parent.checkType === node || parent.extendsType === node) - ) { - return true; + // fallthrough + case __node("TSTypeParameter"): + return true; + case __node("TSIndexedAccessType"): + return parent.objectType === node; + case __node("TSIntersectionType"): + case __node("TSUnionType"): + return parent.types[0] === node; + case __node("TSConditionalType"): + return parent.checkType === node || parent.extendsType === node; } return false; } -export function TSUnionType(node: t.TSUnionType, parent: t.Node): boolean { - const parentType = parent.type; - return ( - parentType === "TSIntersectionType" || - parentType === "TSTypeOperator" || - parentType === "TSArrayType" || - (parentType === "TSIndexedAccessType" && parent.objectType === node) || - parentType === "TSOptionalType" - ); +export function TSUnionType( + node: t.TSUnionType | t.TSFunctionType, + parent: any, + parentId: number, +): boolean { + switch (parentId) { + case __node("TSIntersectionType"): + case __node("TSTypeOperator"): + case __node("TSArrayType"): + case __node("TSOptionalType"): + return true; + case __node("TSIndexedAccessType"): + return parent.objectType === node; + } + return false; } export function TSIntersectionType( node: t.TSUnionType, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - const parentType = parent.type; return ( - parentType === "TSTypeOperator" || - parentType === "TSArrayType" || - (parentType === "TSIndexedAccessType" && parent.objectType === node) || - parentType === "TSOptionalType" + parentId === __node("TSTypeOperator") || + TSTypeOperator(node, parent, parentId) ); } -export function TSInferType(node: t.TSInferType, parent: t.Node): boolean { - const parentType = parent.type; +export function TSInferType( + node: t.TSInferType, + parent: any, + parentId: number, +): boolean { + if (TSTypeOperator(node, parent, parentId)) { + return true; + } if ( - parentType === "TSArrayType" || - (parentType === "TSIndexedAccessType" && parent.objectType === node) || - parentType === "TSOptionalType" + (parentId === __node("TSIntersectionType") || + parentId === __node("TSUnionType")) && + node.typeParameter.constraint && + parent.types[0] === node ) { return true; } - if (node.typeParameter.constraint) { - if ( - (parentType === "TSIntersectionType" || parentType === "TSUnionType") && - parent.types[0] === node - ) { - return true; - } - } return false; } export function TSTypeOperator( - node: t.TSTypeOperator, - parent: t.Node, + node: t.TSTypeOperator | t.TSUnionType | t.TSInferType, + parent: any, + parentId: number, ): boolean { - const parentType = parent.type; - return ( - parentType === "TSArrayType" || - (parentType === "TSIndexedAccessType" && parent.objectType === node) || - parentType === "TSOptionalType" - ); + switch (parentId) { + case __node("TSArrayType"): + case __node("TSOptionalType"): + return true; + case __node("TSIndexedAccessType"): + if (parent.objectType === node) { + return true; + } + } + return false; } export function TSInstantiationExpression( node: t.TSInstantiationExpression, - parent: t.Node, + parent: any, + parentId: number, ) { - const parentType = parent.type; - return ( - (parentType === "CallExpression" || - parentType === "OptionalCallExpression" || - parentType === "NewExpression" || - parentType === "TSInstantiationExpression") && - !!(process.env.BABEL_8_BREAKING - ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST - parent.typeArguments - : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST - parent.typeParameters) - ); + switch (parentId) { + case __node("CallExpression"): + case __node("OptionalCallExpression"): + case __node("NewExpression"): + case __node("TSInstantiationExpression"): + return ( + (process.env.BABEL_8_BREAKING + ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST + parent.typeArguments + : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST + parent.typeParameters) != null + ); + } + + return false; } export function TSFunctionType( node: t.TSFunctionType, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - const parentType = parent.type; + if (TSUnionType(node, parent, parentId)) return true; + return ( - parentType === "TSIntersectionType" || - parentType === "TSUnionType" || - parentType === "TSTypeOperator" || - parentType === "TSOptionalType" || - parentType === "TSArrayType" || - (parentType === "TSIndexedAccessType" && parent.objectType === node) || - (parentType === "TSConditionalType" && + parentId === __node("TSUnionType") || + (parentId === __node("TSConditionalType") && (parent.checkType === node || parent.extendsType === node)) ); } @@ -364,38 +375,50 @@ export { TSFunctionType as TSConstructorType }; export function BinaryExpression( node: t.BinaryExpression, - parent: t.Node, + parent: any, + parentId: number, tokenContext: number, ): boolean { + if (BinaryLike(node, parent, parentId, BinaryLikeType.Binary)) return true; + // for ((1 in []);;); // for (var x = (1 in []) in 2); return ( - node.operator === "in" && - Boolean(tokenContext & TokenContext.forInOrInitHeadAccumulate) + (tokenContext & TokenContext.forInOrInitHeadAccumulate) > 0 && + node.operator === "in" ); } +export function LogicalExpression( + node: t.LogicalExpression, + parent: any, + parentId: number, +): boolean { + return BinaryLike(node, parent, parentId, BinaryLikeType.Logical); +} + export function SequenceExpression( node: t.SequenceExpression, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - const parentType = parent.type; if ( - parentType === "SequenceExpression" || - parentType === "ParenthesizedExpression" || - (parentType === "MemberExpression" && parent.property === node) || - (parentType === "OptionalMemberExpression" && parent.property === node) || - parentType === "TemplateLiteral" + parentId === __node("SequenceExpression") || + parentId === __node("ParenthesizedExpression") || + (parentId === __node("MemberExpression") && parent.property === node) || + (parentId === __node("OptionalMemberExpression") && + parent.property === node) || + parentId === __node("TemplateLiteral") ) { return false; } - if (parentType === "ClassDeclaration") { + if (parentId === __node("ClassDeclaration")) { return true; } - if (parentType === "ForOfStatement") { + if (parentId === __node("ForOfStatement")) { return parent.right === node; } - if (parentType === "ExportDefaultDeclaration") { + if (parentId === __node("ExportDefaultDeclaration")) { return true; } @@ -404,19 +427,19 @@ export function SequenceExpression( export function YieldExpression( node: t.YieldExpression, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - const parentType = parent.type; return ( - parentType === "BinaryExpression" || - parentType === "LogicalExpression" || - parentType === "UnaryExpression" || - parentType === "SpreadElement" || - hasPostfixPart(node, parent) || - (parentType === "AwaitExpression" && isYieldExpression(node)) || - (parentType === "ConditionalExpression" && node === parent.test) || - isClassExtendsClause(node, parent) || - isTSTypeExpression(parentType) + parentId === __node("BinaryExpression") || + parentId === __node("LogicalExpression") || + parentId === __node("UnaryExpression") || + parentId === __node("SpreadElement") || + hasPostfixPart(node, parent, parentId) || + (parentId === __node("AwaitExpression") && isYieldExpression(node)) || + (parentId === __node("ConditionalExpression") && node === parent.test) || + isClassExtendsClause(node, parent, parentId) || + isTSTypeExpression(parentId) ); } @@ -424,41 +447,48 @@ export { YieldExpression as AwaitExpression }; export function ClassExpression( node: t.ClassExpression, - parent: t.Node, + parent: any, + parentId: number, tokenContext: number, ): boolean { - return Boolean( - tokenContext & - (TokenContext.expressionStatement | TokenContext.exportDefault), + return ( + (tokenContext & + (TokenContext.expressionStatement | TokenContext.exportDefault)) > + 0 ); } -export function UnaryLike( +function UnaryLike( node: | t.UnaryLike | t.TSTypeAssertion | t.ArrowFunctionExpression | t.ConditionalExpression | t.AssignmentExpression, - parent: t.Node, + parent: any, + parentId: number, ): boolean { return ( - hasPostfixPart(node, parent) || - (isBinaryExpression(parent) && + hasPostfixPart(node, parent, parentId) || + (parentId === __node("BinaryExpression") && parent.operator === "**" && parent.left === node) || - isClassExtendsClause(node, parent) + isClassExtendsClause(node, parent, parentId) ); } +export { UnaryLike as UnaryExpression, UnaryLike as SpreadElement }; + export function FunctionExpression( node: t.FunctionExpression, - parent: t.Node, + parent: any, + parentId: number, tokenContext: number, ): boolean { - return Boolean( - tokenContext & - (TokenContext.expressionStatement | TokenContext.exportDefault), + return ( + (tokenContext & + (TokenContext.expressionStatement | TokenContext.exportDefault)) > + 0 ); } @@ -467,82 +497,78 @@ export function ConditionalExpression( | t.ConditionalExpression | t.ArrowFunctionExpression | t.AssignmentExpression, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - const parentType = parent.type; - if ( - parentType === "UnaryExpression" || - parentType === "SpreadElement" || - parentType === "BinaryExpression" || - parentType === "LogicalExpression" || - (parentType === "ConditionalExpression" && parent.test === node) || - parentType === "AwaitExpression" || - isTSTypeExpression(parentType) - ) { + switch (parentId) { + case __node("UnaryExpression"): + case __node("SpreadElement"): + case __node("BinaryExpression"): + case __node("LogicalExpression"): + case __node("AwaitExpression"): + return true; + case __node("ConditionalExpression"): + if (parent.test === node) { + return true; + } + } + + if (isTSTypeExpression(parentId)) { return true; } - return UnaryLike(node, parent); + return UnaryLike(node, parent, parentId); } export { ConditionalExpression as ArrowFunctionExpression }; export function OptionalMemberExpression( node: t.OptionalMemberExpression, - parent: t.Node, + parent: any, + parentId: number, ): boolean { - return ( - (isCallExpression(parent) && parent.callee === node) || - (isMemberExpression(parent) && parent.object === node) - ); + switch (parentId) { + case __node("CallExpression"): + return parent.callee === node; + case __node("MemberExpression"): + return parent.object === node; + } + return false; } export { OptionalMemberExpression as OptionalCallExpression }; export function AssignmentExpression( node: t.AssignmentExpression, - parent: t.Node, + parent: any, + parentId: number, tokenContext: number, ): boolean { if ( needsParenBeforeExpressionBrace(tokenContext) && - isObjectPattern(node.left) + node.left.type === "ObjectPattern" ) { return true; - } else { - return ConditionalExpression(node, parent); - } -} - -export function LogicalExpression( - node: t.LogicalExpression, - parent: t.Node, -): boolean { - const parentType = parent.type; - if (isTSTypeExpression(parentType)) return true; - if (parentType !== "LogicalExpression") return false; - switch (node.operator) { - case "||": - return parent.operator === "??" || parent.operator === "&&"; - case "&&": - return parent.operator === "??"; - case "??": - return parent.operator !== "??"; } + return ConditionalExpression(node, parent, parentId); } export function Identifier( node: t.Identifier, - parent: t.Node, + parent: any, + parentId: number, tokenContext: number, getRawIdentifier: (node: t.Identifier) => string, ): boolean { - const parentType = parent.type; + if (getRawIdentifier && getRawIdentifier(node) !== node.name) { + return false; + } + // 13.15.2 AssignmentExpression RS: Evaluation // (fn) = function () {}; if ( + parentId === __node("AssignmentExpression") && node.extra?.parenthesized && - parentType === "AssignmentExpression" && parent.left === node ) { const rightType = parent.right.type; @@ -554,42 +580,51 @@ export function Identifier( } } - if (getRawIdentifier && getRawIdentifier(node) !== node.name) { - return false; - } - - // Non-strict code allows the identifier `let`, but it cannot occur as-is in - // certain contexts to avoid ambiguity with contextual keyword `let`. - if (node.name === "let") { - // Some contexts only forbid `let [`, so check if the next token would - // be the left bracket of a computed member expression. - const isFollowedByBracket = - isMemberExpression(parent, { - object: node, - computed: true, - }) || - isOptionalMemberExpression(parent, { - object: node, - computed: true, - optional: false, - }); - if ( - isFollowedByBracket && + // fast path + if ( + tokenContext & TokenContext.forOfHead || + ((parentId === __node("MemberExpression") || + parentId === __node("OptionalMemberExpression")) && tokenContext & (TokenContext.expressionStatement | TokenContext.forInitHead | - TokenContext.forInHead) - ) { - return true; + TokenContext.forInHead)) + ) { + // Non-strict code allows the identifier `let`, but it cannot occur as-is in + // certain contexts to avoid ambiguity with contextual keyword `let`. + if (node.name === "let") { + // Some contexts only forbid `let [`, so check if the next token would + // be the left bracket of a computed member expression. + const isFollowedByBracket = + isMemberExpression(parent, { + object: node, + computed: true, + }) || + isOptionalMemberExpression(parent, { + object: node, + computed: true, + optional: false, + }); + if ( + isFollowedByBracket && + tokenContext & + (TokenContext.expressionStatement | + TokenContext.forInitHead | + TokenContext.forInHead) + ) { + return true; + } + return (tokenContext & TokenContext.forOfHead) > 0; } - return Boolean(tokenContext & TokenContext.forOfHead); } // ECMAScript specifically forbids a for-of loop from starting with the // token sequence `for (async of`, because it would be ambiguous with // `for (async of => {};;)`, so we need to add extra parentheses. return ( + parentId === __node("ForOfStatement") && + parent.left === node && node.name === "async" && - isForOfStatement(parent, { left: node, await: false }) + !parent.await ); } diff --git a/packages/babel-generator/src/node/whitespace.ts b/packages/babel-generator/src/node/whitespace.ts deleted file mode 100644 index 6801ed65de8d..000000000000 --- a/packages/babel-generator/src/node/whitespace.ts +++ /dev/null @@ -1,297 +0,0 @@ -import { - FLIPPED_ALIAS_KEYS, - isArrayExpression, - isAssignmentExpression, - isBinary, - isBlockStatement, - isCallExpression, - isFunction, - isIdentifier, - isLiteral, - isMemberExpression, - isObjectExpression, - isOptionalCallExpression, - isOptionalMemberExpression, - isStringLiteral, -} from "@babel/types"; - -// We inline this package -// eslint-disable-next-line import/no-extraneous-dependencies -import * as charCodes from "charcodes"; - -import type { NodeHandlers } from "./index.ts"; - -import type * as t from "@babel/types"; - -const enum WhitespaceFlag { - none = 0, - before = 1 << 0, - after = 1 << 1, -} - -export type { WhitespaceFlag }; - -function crawlInternal( - node: t.Node, - state: { hasCall: boolean; hasFunction: boolean; hasHelper: boolean }, -) { - if (!node) return state; - - if (isMemberExpression(node) || isOptionalMemberExpression(node)) { - crawlInternal(node.object, state); - if (node.computed) crawlInternal(node.property, state); - } else if (isBinary(node) || isAssignmentExpression(node)) { - crawlInternal(node.left, state); - crawlInternal(node.right, state); - } else if (isCallExpression(node) || isOptionalCallExpression(node)) { - state.hasCall = true; - crawlInternal(node.callee, state); - } else if (isFunction(node)) { - state.hasFunction = true; - } else if (isIdentifier(node)) { - state.hasHelper = - // @ts-expect-error todo(flow->ts): node.callee is not really expected here… - state.hasHelper || (node.callee && isHelper(node.callee)); - } - - return state; -} - -/** - * Crawl a node to test if it contains a CallExpression, a Function, or a Helper. - * - * @example - * crawl(node) - * // { hasCall: false, hasFunction: true, hasHelper: false } - */ - -function crawl(node: t.Node) { - return crawlInternal(node, { - hasCall: false, - hasFunction: false, - hasHelper: false, - }); -} - -/** - * Test if a node is or has a helper. - */ - -function isHelper(node: t.Node): boolean { - if (!node) return false; - - if (isMemberExpression(node)) { - return isHelper(node.object) || isHelper(node.property); - } else if (isIdentifier(node)) { - return ( - node.name === "require" || - node.name.charCodeAt(0) === charCodes.underscore - ); - } else if (isCallExpression(node)) { - return isHelper(node.callee); - } else if (isBinary(node) || isAssignmentExpression(node)) { - return ( - (isIdentifier(node.left) && isHelper(node.left)) || isHelper(node.right) - ); - } else { - return false; - } -} - -function isType(node: t.Node | null | undefined) { - return ( - isLiteral(node) || - isObjectExpression(node) || - isArrayExpression(node) || - isIdentifier(node) || - isMemberExpression(node) - ); -} - -/** - * Tests for node types that need whitespace. - */ - -export const nodes: NodeHandlers = { - /** - * Test if AssignmentExpression needs whitespace. - */ - - AssignmentExpression(node: t.AssignmentExpression): WhitespaceFlag { - const state = crawl(node.right); - if ((state.hasCall && state.hasHelper) || state.hasFunction) { - return state.hasFunction - ? WhitespaceFlag.before | WhitespaceFlag.after - : WhitespaceFlag.after; - } - return WhitespaceFlag.none; - }, - - /** - * Test if SwitchCase needs whitespace. - */ - - SwitchCase(node: t.SwitchCase, parent: t.SwitchStatement): WhitespaceFlag { - return ( - (!!node.consequent.length || parent.cases[0] === node - ? WhitespaceFlag.before - : WhitespaceFlag.none) | - (!node.consequent.length && parent.cases[parent.cases.length - 1] === node - ? WhitespaceFlag.after - : WhitespaceFlag.none) - ); - }, - - /** - * Test if LogicalExpression needs whitespace. - */ - - LogicalExpression(node: t.LogicalExpression): WhitespaceFlag { - if (isFunction(node.left) || isFunction(node.right)) { - return WhitespaceFlag.after; - } - return WhitespaceFlag.none; - }, - - /** - * Test if Literal needs whitespace. - */ - - Literal(node: t.Literal): WhitespaceFlag { - if (isStringLiteral(node) && node.value === "use strict") { - return WhitespaceFlag.after; - } - return WhitespaceFlag.none; - }, - - /** - * Test if CallExpressionish needs whitespace. - */ - - CallExpression(node: t.CallExpression): WhitespaceFlag { - if (isFunction(node.callee) || isHelper(node)) { - return WhitespaceFlag.before | WhitespaceFlag.after; - } - return WhitespaceFlag.none; - }, - - OptionalCallExpression(node: t.OptionalCallExpression): WhitespaceFlag { - if (isFunction(node.callee)) { - return WhitespaceFlag.before | WhitespaceFlag.after; - } - return WhitespaceFlag.none; - }, - - /** - * Test if VariableDeclaration needs whitespace. - */ - - VariableDeclaration(node: t.VariableDeclaration): WhitespaceFlag { - for (let i = 0; i < node.declarations.length; i++) { - const declar = node.declarations[i]; - - let enabled = isHelper(declar.id) && !isType(declar.init); - if (!enabled && declar.init) { - const state = crawl(declar.init); - enabled = (isHelper(declar.init) && state.hasCall) || state.hasFunction; - } - - if (enabled) { - return WhitespaceFlag.before | WhitespaceFlag.after; - } - } - return WhitespaceFlag.none; - }, - - /** - * Test if IfStatement needs whitespace. - */ - - IfStatement(node: t.IfStatement): WhitespaceFlag { - if (isBlockStatement(node.consequent)) { - return WhitespaceFlag.before | WhitespaceFlag.after; - } - return WhitespaceFlag.none; - }, -}; - -/** - * Test if Property needs whitespace. - */ - -nodes.ObjectProperty = - nodes.ObjectTypeProperty = - nodes.ObjectMethod = - function ( - node: t.ObjectProperty | t.ObjectTypeProperty | t.ObjectMethod, - parent: t.ObjectExpression, - ): WhitespaceFlag { - if (parent.properties[0] === node) { - return WhitespaceFlag.before; - } - return WhitespaceFlag.none; - }; - -nodes.ObjectTypeCallProperty = function ( - node: t.ObjectTypeCallProperty, - parent: t.ObjectTypeAnnotation, -): WhitespaceFlag { - // @ts-ignore(Babel 7 vs Babel 8) Difference parent.indexers - if (parent.callProperties[0] === node && !parent.properties?.length) { - return WhitespaceFlag.before; - } - return WhitespaceFlag.none; -}; - -nodes.ObjectTypeIndexer = function ( - node: t.ObjectTypeIndexer, - parent: t.ObjectTypeAnnotation, -): WhitespaceFlag { - if ( - // @ts-ignore(Babel 7 vs Babel 8) Difference parent.indexers - parent.indexers[0] === node && - !parent.properties?.length && - !parent.callProperties?.length - ) { - return WhitespaceFlag.before; - } - return WhitespaceFlag.none; -}; - -nodes.ObjectTypeInternalSlot = function ( - node: t.ObjectTypeInternalSlot, - parent: t.ObjectTypeAnnotation, -): WhitespaceFlag { - if ( - // @ts-ignore(Babel 7 vs Babel 8) Difference parent.indexers - parent.internalSlots[0] === node && - !parent.properties?.length && - !parent.callProperties?.length && - !parent.indexers?.length - ) { - return WhitespaceFlag.before; - } - return WhitespaceFlag.none; -}; - -/** - * Add whitespace tests for nodes and their aliases. - */ - -( - [ - ["Function", true], - ["Class", true], - ["Loop", true], - ["LabeledStatement", true], - ["SwitchStatement", true], - ["TryStatement", true], - ] as const -).forEach(function ([type, amounts]) { - [type as string] - .concat(FLIPPED_ALIAS_KEYS[type] || []) - .forEach(function (type) { - const ret = amounts ? WhitespaceFlag.before | WhitespaceFlag.after : 0; - nodes[type] = () => ret; - }); -}); diff --git a/packages/babel-generator/src/nodes.ts b/packages/babel-generator/src/nodes.ts new file mode 100644 index 000000000000..be31022bba89 --- /dev/null +++ b/packages/babel-generator/src/nodes.ts @@ -0,0 +1,41 @@ +import type * as t from "@babel/types"; + +import * as generatorFunctions from "./generators/index.ts"; +import * as deprecatedGeneratorFunctions from "./generators/deprecated.ts"; +import type { NodeHandler } from "./node/index.ts"; +import type Printer from "./printer.ts"; + +declare global { + function __node(type: t.Node["type"]): number; +} + +const generatorInfosMap = new Map< + string, + [ + (this: Printer, node: t.Node, parent?: t.Node | null) => void, + number, + NodeHandler | undefined, + ] +>(); +let index = 0; + +for (const key of Object.keys(generatorFunctions).sort() as Exclude< + keyof typeof generatorFunctions, + `_${string}` +>[]) { + if (key.startsWith("_")) continue; + generatorInfosMap.set(key, [generatorFunctions[key], index++, undefined]); +} +if (!process.env.BABEL_8_BREAKING) { + for (const key of Object.keys( + deprecatedGeneratorFunctions, + ) as (keyof typeof deprecatedGeneratorFunctions)[]) { + generatorInfosMap.set(key, [ + deprecatedGeneratorFunctions[key], + index++, + undefined, + ]); + } +} + +export { generatorInfosMap }; diff --git a/packages/babel-generator/src/printer.ts b/packages/babel-generator/src/printer.ts index ba01cf14e64e..9c4e0f55159f 100644 --- a/packages/babel-generator/src/printer.ts +++ b/packages/babel-generator/src/printer.ts @@ -1,6 +1,9 @@ -import Buffer, { type Pos } from "./buffer.ts"; -import type { Loc } from "./buffer.ts"; -import * as n from "./node/index.ts"; +/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */ + +import Buffer from "./buffer.ts"; +import type { Loc, Pos } from "./buffer.ts"; +import { isLastChild, parentNeedsParens } from "./node/index.ts"; +import { generatorInfosMap } from "./nodes.ts"; import type * as t from "@babel/types"; import { isExpression, @@ -13,12 +16,8 @@ import { import type { Opts as jsescOptions } from "jsesc"; import { TokenMap } from "./token-map.ts"; + import type { GeneratorOptions } from "./index.ts"; -import * as generatorFunctions from "./generators/index.ts"; -import { - addDeprecatedGenerators, - type DeprecatedBabel7ASTTypes, -} from "./generators/deprecated.ts"; import type SourceMap from "./source-map.ts"; import type { TraceMap } from "@jridgewell/trace-mapping"; import type { Token } from "@babel/parser"; @@ -36,9 +35,8 @@ function commentIsNewline(c: t.Comment) { return c.type === "CommentLine" || HAS_NEWLINE.test(c.value); } -const { needsParens } = n; - import { TokenContext } from "./node/index.ts"; +import { _getRawIdentifier } from "./generators/types.ts"; const enum COMMENT_TYPE { LEADING, @@ -59,6 +57,38 @@ const enum PRINT_COMMENT_HINT { DEFER, } +const enum PRINTER_FLAGS { + EMPTY = 0, + PRESERVE_FORMAT = 1 << 0, + COMPACT = 1 << 1, + CONCISE = 1 << 2, + RETAIN_LINES = 1 << 3, + RETAIN_FUNCTION_PARENS = 1 << 4, + AUX_COMMENTS = 1 << 5, +} + +const enum LAST_CHAR_KINDS { + EMPTY = 0, + NORMAL = -1, + INTEGER = -2, + WORD = -3, +} + +const enum INNER_COMMENTS_STATE { + DISALLOWED = 0, + ALLOWED = 1, + PRINTED = 2, + + WITH_INDENT = 4, + MASK = 3, +} + +const enum PRINT_COMMENTS_RESULT { + PRINTED_NONE = 0, + PRINTED_SOME = 1, + PRINTED_ALL = 2, +} + export type Format = { shouldPrintComment: (comment: string) => boolean; preserveFormat: boolean | undefined; @@ -102,11 +132,7 @@ export type Format = { importAttributesKeyword?: "with" | "assert" | "with-legacy"; }; -interface AddNewlinesOptions { - nextNodeStartLine: number; -} - -interface PrintSequenceOptions extends Partial { +interface PrintSequenceOptions { statement?: boolean; indent?: boolean; trailingCommentsLineOffset?: number; @@ -114,14 +140,12 @@ interface PrintSequenceOptions extends Partial { interface PrintListOptions { separator?: (this: Printer, occurrenceCount: number, last: boolean) => void; - iterator?: (node: t.Node, index: number) => void; statement?: boolean; indent?: boolean; printTrailingSeparator?: boolean; } export type PrintJoinOptions = PrintListOptions & PrintSequenceOptions; -// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging class Printer { constructor( format: Format, @@ -139,43 +163,43 @@ class Printer { this._inputMap = map?._inputMap || null; this._buf = new Buffer(map, format.indent.style[0]); + + const { + preserveFormat, + compact, + concise, + retainLines, + retainFunctionParens, + } = format; + if (preserveFormat) { + this._flags |= PRINTER_FLAGS.PRESERVE_FORMAT; + } + if (compact) { + this._flags |= PRINTER_FLAGS.COMPACT; + } + if (concise) { + this._flags |= PRINTER_FLAGS.CONCISE; + } + if (retainLines) { + this._flags |= PRINTER_FLAGS.RETAIN_LINES; + } + if (retainFunctionParens) { + this._flags |= PRINTER_FLAGS.RETAIN_FUNCTION_PARENS; + } + if (format.auxiliaryCommentBefore || format.auxiliaryCommentAfter) { + this._flags |= PRINTER_FLAGS.AUX_COMMENTS; + } } declare _inputMap: TraceMap | null; declare format: Format; - enterForStatementInit() { - this.tokenContext |= - TokenContext.forInitHead | TokenContext.forInOrInitHeadAccumulate; - return () => (this.tokenContext = TokenContext.normal); - } - - enterForXStatementInit(isForOf: boolean) { - if (isForOf) { - this.tokenContext |= TokenContext.forOfHead; - return null; - } else { - this.tokenContext |= - TokenContext.forInHead | TokenContext.forInOrInitHeadAccumulate; - return () => (this.tokenContext = TokenContext.normal); - } - } - enterDelimited() { - const oldTokenContext = this.tokenContext; const oldNoLineTerminatorAfterNode = this._noLineTerminatorAfterNode; - if ( - !(oldTokenContext & TokenContext.forInOrInitHeadAccumulate) && - oldNoLineTerminatorAfterNode === null - ) { - return () => {}; + if (oldNoLineTerminatorAfterNode !== null) { + this._noLineTerminatorAfterNode = null; } - this._noLineTerminatorAfterNode = null; - this.tokenContext = TokenContext.normal; - return () => { - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - this.tokenContext = oldTokenContext; - }; + return oldNoLineTerminatorAfterNode; } tokenContext: number = TokenContext.normal; @@ -185,6 +209,7 @@ class Printer { declare _buf: Buffer; _currentNode: t.Node | null = null; + _currentTypeId: number | null = null; _indent: number = 0; _indentRepeat: number = 0; _insideAux: boolean = false; @@ -192,19 +217,18 @@ class Printer { _noLineTerminatorAfterNode: t.Node | null = null; _printAuxAfterOnNextUserNode: boolean = false; _printedComments = new Set(); - _endsWithInteger = false; - _endsWithWord = false; - _endsWithDiv = false; _lastCommentLine = 0; - _endsWithInnerRaw: boolean = false; - _indentInnerComments: boolean = true; + _innerCommentsState = INNER_COMMENTS_STATE.DISALLOWED; + _flags = PRINTER_FLAGS.EMPTY; + tokenMap: TokenMap | null = null; - _boundGetRawIdentifier = this._getRawIdentifier.bind(this); + _boundGetRawIdentifier: ((node: t.Identifier) => string) | null = null; generate(ast: t.Node) { if (this.format.preserveFormat) { this.tokenMap = new TokenMap(ast, this._tokens!, this._originalCode!); + this._boundGetRawIdentifier = _getRawIdentifier.bind(this); } this.print(ast); this._maybeAddAuxComment(); @@ -216,26 +240,34 @@ class Printer { * Increment indent size. */ - indent(): void { - const { format } = this; - if (format.preserveFormat || format.compact || format.concise) { + indent(flags = this._flags): void { + if ( + flags & + (PRINTER_FLAGS.PRESERVE_FORMAT | + PRINTER_FLAGS.COMPACT | + PRINTER_FLAGS.CONCISE) + ) { return; } - this._indent++; + this._indent += this._indentRepeat; } /** * Decrement indent size. */ - dedent(): void { - const { format } = this; - if (format.preserveFormat || format.compact || format.concise) { + dedent(flags = this._flags): void { + if ( + flags & + (PRINTER_FLAGS.PRESERVE_FORMAT | + PRINTER_FLAGS.COMPACT | + PRINTER_FLAGS.CONCISE) + ) { return; } - this._indent--; + this._indent -= this._indentRepeat; } /** @@ -256,25 +288,27 @@ class Printer { * Add a semicolon to the buffer. */ semicolon(force: boolean = false): void { - this._maybeAddAuxComment(); - if (force) { - this._appendChar(charCodes.semicolon); - this._noLineTerminator = false; - return; + const flags = this._flags; + if (flags & PRINTER_FLAGS.AUX_COMMENTS) { + this._maybeAddAuxComment(); } - if (this.tokenMap) { + if (flags & PRINTER_FLAGS.PRESERVE_FORMAT) { const node = this._currentNode!; if (node.start != null && node.end != null) { - if (!this.tokenMap.endMatches(node, ";")) { + if (!this.tokenMap!.endMatches(node, ";")) { // no semicolon this._printSemicolonBeforeNextNode = this._buf.getCurrentLine(); return; } - const indexes = this.tokenMap.getIndexes(this._currentNode!)!; + const indexes = this.tokenMap!.getIndexes(this._currentNode!)!; this._catchUpTo(this._tokens![indexes[indexes.length - 1]].loc.start); } } - this._queue(charCodes.semicolon); + if (force) { + this._appendChar(charCodes.semicolon); + } else { + this._queue(charCodes.semicolon); + } this._noLineTerminator = false; } @@ -300,14 +334,19 @@ class Printer { */ space(force: boolean = false): void { - const { format } = this; - if (format.compact || format.preserveFormat) return; + if (this._flags & (PRINTER_FLAGS.PRESERVE_FORMAT | PRINTER_FLAGS.COMPACT)) { + return; + } if (force) { this._space(); - } else if (this._buf.hasContent()) { - const lastCp = this.getLastChar(); - if (lastCp !== charCodes.space && lastCp !== charCodes.lineFeed) { + } else { + const lastCp = this.getLastChar(true); + if ( + lastCp !== 0 && + lastCp !== charCodes.space && + lastCp !== charCodes.lineFeed + ) { this._space(); } } @@ -322,20 +361,26 @@ class Printer { this._maybePrintInnerComments(str); - this._maybeAddAuxComment(); + const flags = this._flags; + if (flags & PRINTER_FLAGS.AUX_COMMENTS) { + this._maybeAddAuxComment(); + } + + if (flags & PRINTER_FLAGS.PRESERVE_FORMAT) this._catchUpToCurrentToken(str); - if (this.tokenMap) this._catchUpToCurrentToken(str); + const lastChar = this.getLastChar(); - // prevent concatenating words and creating // comment out of division and regex if ( - this._endsWithWord || - (this._endsWithDiv && str.charCodeAt(0) === charCodes.slash) + lastChar === LAST_CHAR_KINDS.INTEGER || + lastChar === LAST_CHAR_KINDS.WORD || + // prevent concatenating words and creating // comment out of division and regex + (lastChar === charCodes.slash && str.charCodeAt(0) === charCodes.slash) ) { this._space(); } this._append(str, false); - this._endsWithWord = true; + this.setLastChar(-3); this._noLineTerminator = noLineTerminatorAfter; } @@ -358,14 +403,16 @@ class Printer { } this.word(str); - // Integer tokens need special handling because they cannot have '.'s inserted - // immediately after them. - this._endsWithInteger = + // Integer tokens need special handling because they cannot have '.'s inserted immediately after them. + if ( Number.isInteger(number) && !isNonDecimalLiteral(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && - str.charCodeAt(str.length - 1) !== charCodes.dot; + str.charCodeAt(str.length - 1) !== charCodes.dot + ) { + this.setLastChar(LAST_CHAR_KINDS.INTEGER); + } } /** @@ -379,53 +426,73 @@ class Printer { * to know which token we should map to (for example, to disambiguate the * commas in an array literal). */ - token(str: string, maybeNewline = false, occurrenceCount = 0): void { + token( + str: string, + maybeNewline = false, + occurrenceCount = 0, + mayNeedSpace: boolean = false, + ): void { this.tokenContext &= TokenContext.forInOrInitHeadAccumulatePassThroughMask; this._maybePrintInnerComments(str, occurrenceCount); - this._maybeAddAuxComment(); + const flags = this._flags; - if (this.tokenMap) this._catchUpToCurrentToken(str, occurrenceCount); + if (flags & PRINTER_FLAGS.AUX_COMMENTS) { + this._maybeAddAuxComment(); + } - const lastChar = this.getLastChar(); - const strFirst = str.charCodeAt(0); - if ( - (lastChar === charCodes.exclamationMark && + if (flags & PRINTER_FLAGS.PRESERVE_FORMAT) { + this._catchUpToCurrentToken(str, occurrenceCount); + } + + if (mayNeedSpace) { + const strFirst = str.charCodeAt(0); + if ( // space is mandatory to avoid outputting