Skip to content

Commit

Permalink
Update Babel (#876)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Nov 8, 2020
1 parent b773c17 commit 989103c
Show file tree
Hide file tree
Showing 4 changed files with 1,913 additions and 1,669 deletions.
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -21,9 +21,9 @@
"webpack": ">=2"
},
"devDependencies": {
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"ava": "^2.4.0",
"babel-eslint": "^10.0.1",
"babel-plugin-istanbul": "^5.1.0",
Expand Down
7 changes: 4 additions & 3 deletions src/index.js
Expand Up @@ -45,9 +45,10 @@ function makeLoader(callback) {
// Make the loader async
const callback = this.async();

loader
.call(this, source, inputSourceMap, overrides)
.then(args => callback(null, ...args), err => callback(err));
loader.call(this, source, inputSourceMap, overrides).then(
args => callback(null, ...args),
err => callback(err),
);
};
}

Expand Down
2 changes: 1 addition & 1 deletion test/loader.test.js
Expand Up @@ -122,7 +122,7 @@ test.cb(
t.is(stats.compilation.warnings.length, 0);
const moduleBuildError = stats.compilation.errors[0];
const babelLoaderError = moduleBuildError.error;
t.regex(babelLoaderError.stack, /Unexpected character/);
t.regex(babelLoaderError.stack, /Unexpected token/);
t.end();
});
},
Expand Down

0 comments on commit 989103c

Please sign in to comment.