diff --git a/build-scripts/bundle.cjs b/build-scripts/bundle.cjs index 18731af3d5ec..c341909b19b0 100644 --- a/build-scripts/bundle.cjs +++ b/build-scripts/bundle.cjs @@ -1,6 +1,7 @@ const path = require("path"); const env = require("./env.cjs"); const paths = require("./paths.cjs"); +const { dependencies } = require("../package.json"); // GitHub base URL to use for production source maps // Nightly builds use the commit SHA, otherwise assumes there is a tag that matches the version @@ -90,7 +91,7 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({ "@babel/preset-env", { useBuiltIns: latestBuild ? false : "usage", - corejs: latestBuild ? false : "3.33", + corejs: latestBuild ? false : dependencies["core-js"], bugfixes: true, shippedProposals: true, }, @@ -140,7 +141,7 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({ // Import helpers and regenerator from runtime package [ "@babel/plugin-transform-runtime", - { version: require("../package.json").dependencies["@babel/runtime"] }, + { version: dependencies["@babel/runtime"] }, ], // Support some proposals still in TC39 process ["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: true }], diff --git a/package.json b/package.json index 581e6eb9d85a..a59f3a2fc912 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "app-datepicker": "5.1.1", "chart.js": "4.4.1", "comlink": "4.4.1", - "core-js": "3.33.3", + "core-js": "3.34.0", "cropperjs": "1.6.1", "date-fns": "2.30.0", "date-fns-tz": "2.0.0", diff --git a/yarn.lock b/yarn.lock index 57be66b9581e..67a0360b0eb6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7066,10 +7066,10 @@ __metadata: languageName: node linkType: hard -"core-js@npm:3.33.3": - version: 3.33.3 - resolution: "core-js@npm:3.33.3" - checksum: 77b4c9abaf22ae9c60966121b4b2a4a388cebd067d4cf6ae0f22762b2e8060f301eaacebb781e598ba5f43fe2e53fc88489b013faefdfcecadbf12e242263a50 +"core-js@npm:3.34.0": + version: 3.34.0 + resolution: "core-js@npm:3.34.0" + checksum: 054474ab6a0a08a2277ca2c1c953e5789c562bbe144f6a43786b0f4167b4a76c671833bd0a112e275e1d99d84fa157e64814ff23aa01532e08e3b46403d7f7f4 languageName: node linkType: hard @@ -9708,7 +9708,7 @@ __metadata: chai: "npm:4.3.10" chart.js: "npm:4.4.1" comlink: "npm:4.4.1" - core-js: "npm:3.33.3" + core-js: "npm:3.34.0" cropperjs: "npm:1.6.1" date-fns: "npm:2.30.0" date-fns-tz: "npm:2.0.0"