Skip to content

Commit a186b8b

Browse files
authored
Remove caller option check (#1007)
* Remove caller option check Babel 7.12+ supports .caller options * update deps * add Node 20 to CI matrix * Update yarn to 3.6.4
1 parent c9d65eb commit a186b8b

File tree

6 files changed

+903
-926
lines changed

6 files changed

+903
-926
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest, windows-latest]
14-
node-version: [14, 16, 18]
14+
node-version: [14, 16, 18, 20]
1515
webpack-version: ['5']
1616
include:
1717
- node-version: "14.15.0" # The minimum supported node version
Lines changed: 213 additions & 213 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
yarnPath: .yarn/releases/yarn-3.6.1.cjs
1+
yarnPath: .yarn/releases/yarn-3.6.4.cjs

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
},
2020
"devDependencies": {
2121
"@ava/babel": "^1.0.1",
22-
"@babel/cli": "^7.22.9",
23-
"@babel/core": "^7.22.9",
24-
"@babel/eslint-parser": "^7.22.9",
25-
"@babel/preset-env": "^7.22.9",
22+
"@babel/cli": "^7.23.0",
23+
"@babel/core": "^7.23.3",
24+
"@babel/eslint-parser": "^7.23.3",
25+
"@babel/preset-env": "^7.23.3",
2626
"ava": "^3.13.0",
2727
"babel-plugin-react-intl": "^8.2.25",
2828
"c8": "^8.0.0",
@@ -38,7 +38,7 @@
3838
"react-intl-webpack-plugin": "^0.3.0",
3939
"rimraf": "^5.0.1",
4040
"semver": "7.5.2",
41-
"webpack": "^5.74.0"
41+
"webpack": "^5.89.0"
4242
},
4343
"scripts": {
4444
"clean": "rimraf lib/",
@@ -118,5 +118,5 @@
118118
"git add yarn.lock"
119119
]
120120
},
121-
"packageManager": "[email protected].1"
121+
"packageManager": "[email protected].4"
122122
}

src/injectCaller.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
const babel = require("@babel/core");
2-
31
module.exports = function injectCaller(opts, target) {
4-
if (!supportsCallerOption()) return opts;
5-
62
return Object.assign({}, opts, {
73
caller: Object.assign(
84
{
@@ -25,26 +21,3 @@ module.exports = function injectCaller(opts, target) {
2521
),
2622
});
2723
};
28-
29-
// TODO: We can remove this eventually, I'm just adding it so that people have
30-
// a little time to migrate to the newer RCs of @babel/core without getting
31-
// hard-to-diagnose errors about unknown 'caller' options.
32-
let supportsCallerOptionFlag = undefined;
33-
function supportsCallerOption() {
34-
if (supportsCallerOptionFlag === undefined) {
35-
try {
36-
// Rather than try to match the Babel version, we just see if it throws
37-
// when passed a 'caller' flag, and use that to decide if it is supported.
38-
babel.loadPartialConfig({
39-
caller: undefined,
40-
babelrc: false,
41-
configFile: false,
42-
});
43-
supportsCallerOptionFlag = true;
44-
} catch (err) {
45-
supportsCallerOptionFlag = false;
46-
}
47-
}
48-
49-
return supportsCallerOptionFlag;
50-
}

0 commit comments

Comments
 (0)