Repository navigation
docs(cli): point Babel 8 users to @babel/build-external-helpers - #3264
Conversation
@babel/cli no longer ships bin/babel-external-helpers.js in Babel 8; the helper generator lives in @babel/build-external-helpers. Replace the outdated statement and update the example package.json versions to ^8.0.0. Fixes babel#3261
@babel/cli no longer ships bin/babel-external-helpers.js in Babel 8; the helper generator lives in @babel/build-external-helpers. Replace the outdated statement and update the example package.json versions to ^8.0.0. Fixes babel#3261
👷 Deploy request for babel-v9 pending review.Visit the deploys page to approve it
|
✅ Deploy Preview for babel-v8 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
JLHwung
left a comment
There was a problem hiding this comment.
Other changes look good to me, thank you.
| The main Babel CLI script, `babel.js`, lives in the top-level package at `@babel/cli/bin`. | ||
|
|
||
| :::note | ||
| In Babel 7, `@babel/cli/bin` also included a `babel-external-helpers.js` utility script. Starting from Babel 8, it has moved to a separate package: see [`@babel/build-external-helpers`](./build-external-helpers.md). |
There was a problem hiding this comment.
The current website is for Babel 8 only, could you move this note to the migration docs? At the moment when we introduced this change we don't expect users are still depending on this script so we didn't add it to the migration docs.
There was a problem hiding this comment.
Done, the note is gone from cli.md and the script move is now under a new @babel/cli section in the v8 migration guide.
| - The `babel-external-helpers.js` script in `@babel/cli/bin` has been moved to a separate package, [`@babel/build-external-helpers`](./build-external-helpers.md). | ||
| **Migration**: If you are running `@babel/cli/bin/babel-external-helpers.js`, install `@babel/build-external-helpers` and use it instead. |
There was a problem hiding this comment.
| - The `babel-external-helpers.js` script in `@babel/cli/bin` has been moved to a separate package, [`@babel/build-external-helpers`](./build-external-helpers.md). | |
| **Migration**: If you are running `@babel/cli/bin/babel-external-helpers.js`, install `@babel/build-external-helpers` and use it instead. | |
| - `babel-external-helpers` has been moved from `@babel/cli` to a new package, [`@babel/build-external-helpers`](./build-external-helpers.md) ([#17746](https://github.com/babel/babel/pull/17746)). The `--whitelist` option has been removed in favor of `-l`/`--allowlist`. | |
| **Migration**: Install `@babel/build-external-helpers` and replace `babel-external-helpers` with `build-external-helpers` (or `npx @babel/build-external-helpers`): | |
| ```diff | |
| - babel-external-helpers --whitelist createClass -t umd > helpers.js | |
| + build-external-helpers --allowlist createClass -t umd > helpers.js |
In general we will include the PR link in each breaking changes.
There was a problem hiding this comment.
Applied your suggestion as is: officialasishkumar@e6c5e1c
In Babel 8,
@babel/cli/binno longer containsbabel-external-helpers.js; that utility is shipped by@babel/build-external-helpers.@babel/cliguide and add a note linking to the@babel/build-external-helperspage.package.jsonsnippet from^7.0.0to^8.0.0, matching what an unversioned install resolves to.Fixes #3261