From caedef0f5b37ac6530885223b26879c39c36c1bd Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 3 Jan 2023 16:06:38 +0000 Subject: [PATCH] fix(compiler-cli): update `@babel/core` dependency and lock version (#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 --- packages/compiler-cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/package.json b/packages/compiler-cli/package.json index a411cac47f662..d3355bda2625f 100644 --- a/packages/compiler-cli/package.json +++ b/packages/compiler-cli/package.json @@ -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",