Skip to content

Commit 29de619

Browse files
authored
Build for node 14.15.0 (#963)
* build for node 14.15.0 * update babel plugins * polish CI job title * update testcase
1 parent 9a2451f commit 29de619

File tree

5 files changed

+979
-1702
lines changed

5 files changed

+979
-1702
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Lint
1717
run: yarn run lint
1818
test:
19-
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
19+
name: Test - ${{ matrix.os }} - Node ${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
2020
strategy:
2121
matrix:
2222
os: [ubuntu-latest, windows-latest]

babel.config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2+
"targets": {
3+
"node": "14.15.0"
4+
},
25
"presets": [
36
["@babel/preset-env", {
4-
"loose": true,
5-
"targets": {
6-
"node": "6.9"
7-
}
7+
"loose": true
88
}]
99
],
1010
"env": {

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
},
2020
"devDependencies": {
2121
"@ava/babel": "^1.0.1",
22-
"@babel/cli": "^7.12.1",
23-
"@babel/core": "^7.12.3",
24-
"@babel/preset-env": "^7.12.1",
22+
"@babel/cli": "^7.19.3",
23+
"@babel/core": "^7.19.6",
24+
"@babel/preset-env": "^7.19.4",
2525
"ava": "^3.13.0",
26-
"babel-eslint": "^10.0.1",
27-
"babel-plugin-istanbul": "^6.0.0",
28-
"babel-plugin-react-intl": "^8.2.15",
26+
"babel-eslint": "^10.1.0",
27+
"babel-plugin-istanbul": "^6.1.1",
28+
"babel-plugin-react-intl": "^8.2.25",
2929
"cross-env": "^7.0.2",
3030
"eslint": "^7.13.0",
3131
"eslint-config-babel": "^9.0.0",

test/loader.test.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ const globalConfig = {
1717
test: /\.jsx?/,
1818
loader: babelLoader,
1919
options: {
20-
presets: ["@babel/preset-env"],
20+
targets: "chrome 42",
21+
presets: [["@babel/preset-env", { bugfixes: true, loose: true }]],
22+
configFile: false,
23+
babelrc: false,
2124
},
2225
exclude: /node_modules/,
2326
},
@@ -54,10 +57,10 @@ test.cb("should transpile the code snippet", t => {
5457
t.true(files.length === 1);
5558
fs.readFile(path.resolve(t.context.directory, files[0]), (err, data) => {
5659
t.is(err, null);
57-
const test = "var App = function App()";
60+
const test = "var App = function App(arg)";
5861
const subject = data.toString();
5962

60-
t.not(subject.indexOf(test), -1);
63+
t.true(subject.includes(test));
6164

6265
t.end();
6366
});

0 commit comments

Comments
 (0)