diff --git a/CHANGELOG.md b/CHANGELOG.md index b2cbf673415b..37191ffdcc36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - `[jest-haste-map]` [**BREAKING**] Replaced internal data structures to improve performance ([#6960](https://github.com/facebook/jest/pull/6960)) +### Chore & Maintenance + +- `[docs]` Fix babel-core installation instructions ([#6745](https://github.com/facebook/jest/pull/6745)) + ## 23.6.0 ### Features diff --git a/README.md b/README.md index 0a15324a470d..2c5d74597e93 100644 --- a/README.md +++ b/README.md @@ -101,10 +101,10 @@ If you'd like to learn more about running `jest` through the command line, take [Babel](http://babeljs.io/) is automatically handled by Jest using `babel-jest`. You don't need install anything extra for using Babel. -> Note: If you are using a babel version 7 then you need to install `babel-core@^7.0.0-0` and `@babel/core` with the following command: +> Note: If you are using Babel version 7 then you need to install `babel-jest`, `babel-core@^7.0.0-bridge.0` and `@babel/core` with the following command: > > ```bash -> yarn add --dev 'babel-core@^7.0.0-0' @babel/core +> yarn add --dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime > ``` Don't forget to add a [`.babelrc`](https://babeljs.io/docs/usage/babelrc/) file in your project's root folder. For example, if you are using ES6 and [React.js](https://reactjs.org) with the [`babel-preset-env`](https://babeljs.io/docs/plugins/preset-env/) and [`babel-preset-react`](https://babeljs.io/docs/plugins/preset-react/) presets: diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index fb8d2a6c5092..41892c602384 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -85,10 +85,10 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and `regenerator-ru yarn add --dev babel-jest babel-core regenerator-runtime ``` -> Note: If you are using a babel version 7 then you need to install `babel-jest` with the following command: +> Note: If you are using Babel version 7 then you need to install `babel-jest`, `babel-core@^7.0.0-bridge.0` and `@babel/core` with the following command: > > ```bash -> yarn add --dev babel-jest 'babel-core@^7.0.0-0' @babel/core regenerator-runtime +> yarn add --dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime > ``` _Note: Explicitly installing `regenerator-runtime` is not needed if you use `npm` 3 or 4 or Yarn_ diff --git a/website/versioned_docs/version-22.0/GettingStarted.md b/website/versioned_docs/version-22.0/GettingStarted.md index bd7cce4116d9..8fd6902339ae 100644 --- a/website/versioned_docs/version-22.0/GettingStarted.md +++ b/website/versioned_docs/version-22.0/GettingStarted.md @@ -78,10 +78,10 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and `regenerator-ru npm install --save-dev babel-jest babel-core regenerator-runtime ``` -> Note: If you are using a babel version 7 then you need to install `babel-jest` with the following command: +> Note: If you are using Babel version 7 then you need to install `babel-jest`, `babel-core@^7.0.0-bridge.0` and `@babel/core` with the following command: > -> ``` -> npm install --save-dev babel-jest 'babel-core@^7.0.0-0' @babel/core regenerator-runtime +> ```bash +> npm install --save-dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime > ``` _Note: Explicitly installing `regenerator-runtime` is not needed if you use `npm` 3 or 4 or Yarn_ diff --git a/website/versioned_docs/version-22.1/GettingStarted.md b/website/versioned_docs/version-22.1/GettingStarted.md index bcf86e0c3882..92c0a1c0fbcd 100644 --- a/website/versioned_docs/version-22.1/GettingStarted.md +++ b/website/versioned_docs/version-22.1/GettingStarted.md @@ -78,10 +78,10 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and `regenerator-ru npm install --save-dev babel-jest babel-core regenerator-runtime ``` -> Note: If you are using a babel version 7 then you need to install `babel-jest` with the following command: +> Note: If you are using Babel version 7 then you need to install `babel-jest`, `babel-core@^7.0.0-bridge.0` and `@babel/core` with the following command: > -> ``` -> npm install --save-dev babel-jest 'babel-core@^7.0.0-0' @babel/core regenerator-runtime +> ```bash +> npm install --save-dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime > ``` _Note: Explicitly installing `regenerator-runtime` is not needed if you use `npm` 3 or 4 or Yarn_ diff --git a/website/versioned_docs/version-22.2/GettingStarted.md b/website/versioned_docs/version-22.2/GettingStarted.md index 4c19692d92dd..5901e3c546e9 100644 --- a/website/versioned_docs/version-22.2/GettingStarted.md +++ b/website/versioned_docs/version-22.2/GettingStarted.md @@ -78,10 +78,10 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and `regenerator-ru npm install --save-dev babel-jest babel-core regenerator-runtime ``` -> Note: If you are using a babel version 7 then you need to install `babel-jest` with the following command: +> Note: If you are using Babel version 7 then you need to install `babel-jest`, `babel-core@^7.0.0-bridge.0` and `@babel/core` with the following command: > > ```bash -> npm install --save-dev babel-jest 'babel-core@^7.0.0-0' @babel/core regenerator-runtime +> npm install --save-dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime > ``` _Note: Explicitly installing `regenerator-runtime` is not needed if you use `npm` 3 or 4 or Yarn_ diff --git a/website/versioned_docs/version-22.3/GettingStarted.md b/website/versioned_docs/version-22.3/GettingStarted.md index 430b74a89050..5488b083ff2e 100644 --- a/website/versioned_docs/version-22.3/GettingStarted.md +++ b/website/versioned_docs/version-22.3/GettingStarted.md @@ -78,10 +78,10 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and `regenerator-ru npm install --save-dev babel-jest babel-core regenerator-runtime ``` -> Note: If you are using a babel version 7 then you need to install `babel-jest` with the following command: +> Note: If you are using Babel version 7 then you need to install `babel-jest`, `babel-core@^7.0.0-bridge.0` and `@babel/core` with the following command: > > ```bash -> npm install --save-dev babel-jest 'babel-core@^7.0.0-0' @babel/core regenerator-runtime +> npm install --save-dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime > ``` _Note: Explicitly installing `regenerator-runtime` is not needed if you use `npm` 3 or 4 or Yarn_ diff --git a/website/versioned_docs/version-22.4/GettingStarted.md b/website/versioned_docs/version-22.4/GettingStarted.md index e221f88f07c0..8b559eb1e1e2 100644 --- a/website/versioned_docs/version-22.4/GettingStarted.md +++ b/website/versioned_docs/version-22.4/GettingStarted.md @@ -78,10 +78,10 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and `regenerator-ru yarn add --dev babel-jest babel-core regenerator-runtime ``` -> Note: If you are using a babel version 7 then you need to install `babel-jest` with the following command: +> Note: If you are using Babel version 7 then you need to install `babel-jest`, `babel-core@^7.0.0-bridge.0` and `@babel/core` with the following command: > > ```bash -> yarn add --dev babel-jest 'babel-core@^7.0.0-0' @babel/core regenerator-runtime +> yarn add --dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime > ``` _Note: Explicitly installing `regenerator-runtime` is not needed if you use `npm` 3 or 4 or Yarn_ diff --git a/website/versioned_docs/version-23.2/GettingStarted.md b/website/versioned_docs/version-23.2/GettingStarted.md index 7148f5c6d41c..4526e9ec9803 100644 --- a/website/versioned_docs/version-23.2/GettingStarted.md +++ b/website/versioned_docs/version-23.2/GettingStarted.md @@ -86,10 +86,10 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and `regenerator-ru yarn add --dev babel-jest babel-core regenerator-runtime ``` -> Note: If you are using a babel version 7 then you need to install `babel-jest` with the following command: +> Note: If you are using Babel version 7 then you need to install `babel-jest`, `babel-core@^7.0.0-bridge.0` and `@babel/core` with the following command: > > ```bash -> yarn add --dev babel-jest 'babel-core@^7.0.0-0' @babel/core regenerator-runtime +> yarn add --dev babel-jest babel-core@^7.0.0-bridge.0 @babel/core regenerator-runtime > ``` _Note: Explicitly installing `regenerator-runtime` is not needed if you use `npm` 3 or 4 or Yarn_