Skip to content

Commit

Permalink
Fix support for namespaced babel packages (#4918)
Browse files Browse the repository at this point in the history
  • Loading branch information
danez authored and cpojer committed Nov 20, 2017
1 parent 1b19586 commit 27a4c2a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Fixes

* `[babel-jest]` Fix support for namespaced babel version 7
([#4918](https://github.com/facebook/jest/pull/4918))
* `[expect]` fix .toThrow for promises
([#4884](https://github.com/facebook/jest/pull/4884))
* `[jest-docblock]` pragmas should preserve urls
Expand Down
8 changes: 7 additions & 1 deletion docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,15 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and
`regenerator-runtime` packages:

```
npm install --save-dev babel-jest regenerator-runtime
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:
> ```
> npm install --save-dev babel-jest babel-core@^7.0.0-0 @babel/core regenerator-runtime
> ```
_Note: Explicitly installing `regenerator-runtime` is not needed if you use
`npm` 3 or 4 or Yarn_

Expand Down
7 changes: 6 additions & 1 deletion packages/babel-jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ If you are already using `jest-cli`, just add `babel-jest` and it will
automatically compile JavaScript code using babel.

```
npm install --save-dev babel-jest
npm install --save-dev babel-jest babel-core
```

> Note: If you are using babel version 7 you have to install `babel-jest` with
> ```
> npm install --save-dev babel-jest babel-core@^7.0.0-0 @babel/core
> ```
If you would like to write your own preprocessor, uninstall and delete
babel-jest and set the
[config.transform](http://facebook.github.io/jest/docs/configuration.html#transform-object-string-string)
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"babel-core": "^6.0.0"
},
"peerDependencies": {
"babel-core": "^6.0.0 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0"
"babel-core": "^6.0.0 || ^7.0.0-0"
}
}

0 comments on commit 27a4c2a

Please sign in to comment.