From 05f68c391c67790cbf8c81c4ac295b12c808d310 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 21 Feb 2022 12:50:53 +0000 Subject: [PATCH] Add babel plugin to workaround bug in @babel/preset-env (#45664) --- babel.config.json | 3 +++ package.json | 1 + yarn.lock | 25 +++++++++++++------------ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/babel.config.json b/babel.config.json index 4de74eb504a..49d6564f0ea 100644 --- a/babel.config.json +++ b/babel.config.json @@ -26,6 +26,9 @@ ] ], "plugins": [ + // added to mitigate https://github.com/babel/babel/issues/14289 + // package (and following line) can be removed once the issue is fixed and released + "@babel/plugin-proposal-class-properties", [ "@babel/plugin-transform-typescript", { diff --git a/package.json b/package.json index 3a96b5bac55..769fe762dd7 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ }, "devDependencies": { "@babel/core": "7.17.0", + "@babel/plugin-proposal-class-properties": "7.16.7", "@babel/plugin-proposal-nullish-coalescing-operator": "7.16.7", "@babel/plugin-proposal-object-rest-spread": "7.17.3", "@babel/plugin-proposal-optional-chaining": "7.16.7", diff --git a/yarn.lock b/yarn.lock index c5dae528148..3e43fc1d1b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1111,6 +1111,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-proposal-class-properties@npm:7.16.7, @babel/plugin-proposal-class-properties@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/plugin-proposal-class-properties@npm:7.16.7" + dependencies: + "@babel/helper-create-class-features-plugin": ^7.16.7 + "@babel/helper-plugin-utils": ^7.16.7 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3977e841e17b45b47be749b9a5b67b9e8b25ff0840f9fdad3f00cbcb35db4f5ff15f074939fe19b01207a29688c432cc2c682351959350834d62920b7881f803 + languageName: node + linkType: hard + "@babel/plugin-proposal-class-properties@npm:^7.12.1, @babel/plugin-proposal-class-properties@npm:^7.13.0, @babel/plugin-proposal-class-properties@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-proposal-class-properties@npm:7.14.5" @@ -1123,18 +1135,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-class-properties@npm:^7.16.7": - version: 7.16.7 - resolution: "@babel/plugin-proposal-class-properties@npm:7.16.7" - dependencies: - "@babel/helper-create-class-features-plugin": ^7.16.7 - "@babel/helper-plugin-utils": ^7.16.7 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 3977e841e17b45b47be749b9a5b67b9e8b25ff0840f9fdad3f00cbcb35db4f5ff15f074939fe19b01207a29688c432cc2c682351959350834d62920b7881f803 - languageName: node - linkType: hard - "@babel/plugin-proposal-class-static-block@npm:^7.15.4": version: 7.15.4 resolution: "@babel/plugin-proposal-class-static-block@npm:7.15.4" @@ -20377,6 +20377,7 @@ __metadata: resolution: "grafana@workspace:." dependencies: "@babel/core": 7.17.0 + "@babel/plugin-proposal-class-properties": 7.16.7 "@babel/plugin-proposal-nullish-coalescing-operator": 7.16.7 "@babel/plugin-proposal-object-rest-spread": 7.17.3 "@babel/plugin-proposal-optional-chaining": 7.16.7