Skip to content

Commit 2b47385

Browse files
committed
feat: enable all babel syntax plugins
1 parent 2edd5c4 commit 2b47385

5 files changed

Lines changed: 25 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### Features
44

5+
- `[babel-preset-jest]` Enable all syntax plugins not enabled by default ([#9774](https://github.com/facebook/jest/pull/9774))
56
- `[babel-jest]` Support passing `supportsDynamicImport` and `supportsStaticESM` ([#9766](https://github.com/facebook/jest/pull/9766))
67
- `[jest-runtime, @jest/transformer]` Support passing `supportsDynamicImport` and `supportsStaticESM` ([#9597](https://github.com/facebook/jest/pull/9597))
78

packages/babel-jest/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"slash": "^3.0.0"
2828
},
2929
"devDependencies": {
30-
"@babel/core": "^7.1.0"
30+
"@babel/core": "^7.8.0"
3131
},
3232
"peerDependencies": {
33-
"@babel/core": "^7.0.0"
33+
"@babel/core": "^7.8.0"
3434
},
3535
"engines": {
3636
"node": ">= 8.3"

packages/babel-preset-jest/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
module.exports = () => ({
99
plugins: [
1010
require.resolve('babel-plugin-jest-hoist'),
11-
require.resolve('@babel/plugin-syntax-object-rest-spread'),
12-
require.resolve('@babel/plugin-syntax-bigint'),
11+
require.resolve('babel-preset-current-node-syntax'),
1312
],
1413
});

packages/babel-preset-jest/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
"license": "MIT",
1010
"main": "index.js",
1111
"dependencies": {
12-
"@babel/plugin-syntax-bigint": "^7.0.0",
13-
"@babel/plugin-syntax-object-rest-spread": "^7.0.0",
14-
"babel-plugin-jest-hoist": "^25.2.6"
12+
"babel-plugin-jest-hoist": "^25.2.6",
13+
"babel-preset-current-node-syntax": "^0.1.0"
1514
},
1615
"peerDependencies": {
17-
"@babel/core": "^7.0.0"
16+
"@babel/core": "^7.8.0"
1817
},
1918
"engines": {
2019
"node": ">= 8.3"

yarn.lock

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
invariant "^2.2.4"
5656
semver "^5.5.0"
5757

58-
"@babel/core@*", "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.3.4", "@babel/core@^7.7.4", "@babel/core@^7.7.5":
58+
"@babel/core@*", "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.3.4", "@babel/core@^7.7.4", "@babel/core@^7.7.5", "@babel/core@^7.8.0":
5959
version "7.9.0"
6060
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e"
6161
integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==
@@ -423,14 +423,7 @@
423423
dependencies:
424424
"@babel/helper-plugin-utils" "^7.8.0"
425425

426-
"@babel/plugin-syntax-bigint@^7.0.0":
427-
version "7.8.3"
428-
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea"
429-
integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==
430-
dependencies:
431-
"@babel/helper-plugin-utils" "^7.8.0"
432-
433-
"@babel/plugin-syntax-class-properties@^7.0.0":
426+
"@babel/plugin-syntax-class-properties@^7.0.0", "@babel/plugin-syntax-class-properties@^7.8.3":
434427
version "7.8.3"
435428
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.8.3.tgz#6cb933a8872c8d359bfde69bbeaae5162fd1e8f7"
436429
integrity sha512-UcAyQWg2bAN647Q+O811tG9MrJ38Z10jjhQdKNAL8fsyPzE3cCN/uT+f55cFVY4aGO4jqJAvmqsuY3GQDwAoXg==
@@ -479,6 +472,13 @@
479472
dependencies:
480473
"@babel/helper-plugin-utils" "^7.8.3"
481474

475+
"@babel/plugin-syntax-logical-assignment-operators@^7.8.3":
476+
version "7.8.3"
477+
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.8.3.tgz#3995d7d7ffff432f6ddc742b47e730c054599897"
478+
integrity sha512-Zpg2Sgc++37kuFl6ppq2Q7Awc6E6AIW671x5PY8E/f7MCIyPPGK/EoeZXvvY3P42exZ3Q4/t3YOzP/HiN79jDg==
479+
dependencies:
480+
"@babel/helper-plugin-utils" "^7.8.3"
481+
482482
"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0":
483483
version "7.8.3"
484484
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9"
@@ -3443,6 +3443,15 @@ babel-polyfill@6.23.0:
34433443
core-js "^2.4.0"
34443444
regenerator-runtime "^0.10.0"
34453445

3446+
babel-preset-current-node-syntax@^0.1.0:
3447+
version "0.1.0"
3448+
resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.0.tgz#744b43eda7a164e5f90ad416dcd9615e8b7842c1"
3449+
integrity sha512-gVdIosHhVr8ZFaMo8FVOihafV0UOj26/v4A1etZAPy/XqrJO5dvTLfxGaIApumZ66n7AEkFy3e+SPGOv46YhKQ==
3450+
dependencies:
3451+
"@babel/plugin-syntax-class-properties" "^7.8.3"
3452+
"@babel/plugin-syntax-logical-assignment-operators" "^7.8.3"
3453+
"@babel/plugin-syntax-numeric-separator" "^7.8.3"
3454+
34463455
babel-preset-fbjs@^3.1.2, babel-preset-fbjs@^3.2.0:
34473456
version "3.3.0"
34483457
resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz#a6024764ea86c8e06a22d794ca8b69534d263541"

0 commit comments

Comments
 (0)