diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d5f8dd3f43d..fede79b11552 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Chore & Maintenance +- `[docs]` Fix babel-core installation instructions ([#6745](https://github.com/facebook/jest/pull/6745)) - `[examples]` add example using Babel 7 ([#6983](https://github.com/facebook/jest/pull/6983)) ## 23.6.0 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 1bd6f8b3f8d2..acec2767b84e 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 > ``` > > You can also see the example in the Jest repository: https://github.com/facebook/jest/tree/master/examples/babel-7 diff --git a/website/versioned_docs/version-22.0/GettingStarted.md b/website/versioned_docs/version-22.0/GettingStarted.md index fd4baa9ae4d2..98a640214aac 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 > ``` > > You can also see the example in the Jest repository: https://github.com/facebook/jest/tree/master/examples/babel-7 diff --git a/website/versioned_docs/version-22.1/GettingStarted.md b/website/versioned_docs/version-22.1/GettingStarted.md index 9d63f5a8af1f..f06f12c0ed0d 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 > ``` > > You can also see the example in the Jest repository: https://github.com/facebook/jest/tree/master/examples/babel-7 diff --git a/website/versioned_docs/version-22.2/GettingStarted.md b/website/versioned_docs/version-22.2/GettingStarted.md index cca2c2afaa97..ec17fbf76485 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 > ``` > > You can also see the example in the Jest repository: https://github.com/facebook/jest/tree/master/examples/babel-7 diff --git a/website/versioned_docs/version-22.3/GettingStarted.md b/website/versioned_docs/version-22.3/GettingStarted.md index 20e52b7431cc..502f5172bee4 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 > ``` > > You can also see the example in the Jest repository: https://github.com/facebook/jest/tree/master/examples/babel-7 diff --git a/website/versioned_docs/version-22.4/GettingStarted.md b/website/versioned_docs/version-22.4/GettingStarted.md index 8b06f5ed82a1..8551b6187b82 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 > ``` > > You can also see the example in the Jest repository: https://github.com/facebook/jest/tree/master/examples/babel-7 diff --git a/website/versioned_docs/version-23.2/GettingStarted.md b/website/versioned_docs/version-23.2/GettingStarted.md index bd93c3403a2f..97424812cecf 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 > ``` > > You can also see the example in the Jest repository: https://github.com/facebook/jest/tree/master/examples/babel-7