Skip to content

Commit

Permalink
Build for node 14.15.0 (#963)
Browse files Browse the repository at this point in the history
* build for node 14.15.0

* update babel plugins

* polish CI job title

* update testcase
  • Loading branch information
JLHwung committed Oct 26, 2022
1 parent 9a2451f commit 29de619
Show file tree
Hide file tree
Showing 5 changed files with 979 additions and 1,702 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Lint
run: yarn run lint
test:
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
name: Test - ${{ matrix.os }} - Node ${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
Expand Down
8 changes: 4 additions & 4 deletions babel.config.json
@@ -1,10 +1,10 @@
{
"targets": {
"node": "14.15.0"
},
"presets": [
["@babel/preset-env", {
"loose": true,
"targets": {
"node": "6.9"
}
"loose": true
}]
],
"env": {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -19,13 +19,13 @@
},
"devDependencies": {
"@ava/babel": "^1.0.1",
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"ava": "^3.13.0",
"babel-eslint": "^10.0.1",
"babel-plugin-istanbul": "^6.0.0",
"babel-plugin-react-intl": "^8.2.15",
"babel-eslint": "^10.1.0",
"babel-plugin-istanbul": "^6.1.1",
"babel-plugin-react-intl": "^8.2.25",
"cross-env": "^7.0.2",
"eslint": "^7.13.0",
"eslint-config-babel": "^9.0.0",
Expand Down
9 changes: 6 additions & 3 deletions test/loader.test.js
Expand Up @@ -17,7 +17,10 @@ const globalConfig = {
test: /\.jsx?/,
loader: babelLoader,
options: {
presets: ["@babel/preset-env"],
targets: "chrome 42",
presets: [["@babel/preset-env", { bugfixes: true, loose: true }]],
configFile: false,
babelrc: false,
},
exclude: /node_modules/,
},
Expand Down Expand Up @@ -54,10 +57,10 @@ test.cb("should transpile the code snippet", t => {
t.true(files.length === 1);
fs.readFile(path.resolve(t.context.directory, files[0]), (err, data) => {
t.is(err, null);
const test = "var App = function App()";
const test = "var App = function App(arg)";
const subject = data.toString();

t.not(subject.indexOf(test), -1);
t.true(subject.includes(test));

t.end();
});
Expand Down

0 comments on commit 29de619

Please sign in to comment.