Skip to content

Commit

Permalink
fix(compiler-cli): update @babel/core dependency and lock version (#…
Browse files Browse the repository at this point in the history
…48634)

Similar to how the `@babel/core` dependency is managed for the localize
NPM package, the version should be locked. Also the version should
correspond to the version we install for building & testing.

Currently the Babel version allowed by the compiler-cli may not
work given the ESM -> CJS interop. causing errors like:

```
import { types as t } from "@babel/core";
         ^^^^^
SyntaxError: Named export 'types' not found. The requested module '@babel/core' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@babel/core';
const { types: t } = pkg;
```

We can only be confident about the interop if we know the version
installed- is the one we test.

PR Close #48634
  • Loading branch information
devversion committed Jan 3, 2023
1 parent e38bc6b commit caedef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/compiler-cli/package.json
Expand Up @@ -53,7 +53,7 @@
}
},
"dependencies": {
"@babel/core": "^7.17.2",
"@babel/core": "7.19.3",
"@jridgewell/sourcemap-codec": "^1.4.14",
"reflect-metadata": "^0.1.2",
"chokidar": "^3.0.0",
Expand Down

0 comments on commit caedef0

Please sign in to comment.