Skip to content

Commit ce601d2

Browse files
Merge pull request #525 from emberjs/update-deps
update @babel/plugin-proposal-* packages to transform packages
2 parents f51470d + ad24c31 commit ce601d2

5 files changed

Lines changed: 492 additions & 477 deletions

File tree

lib/babel-options-util.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ function _getHelperVersion(project) {
299299

300300
function _buildClassFeaturePluginConstraints(constraints, config, parent, project) {
301301
// With versions of ember-cli-typescript < 4.0, class feature plugins like
302-
// @babel/plugin-proposal-class-properties were run before the TS transform.
302+
// @babel/plugin-transform-class-properties were run before the TS transform.
303303
if (!_shouldHandleTypeScript(config, parent, project)) {
304304
constraints.before = constraints.before || [];
305305
constraints.before.push("@babel/plugin-transform-typescript");
@@ -348,7 +348,7 @@ function _addDecoratorPlugins(plugins, options, config, parent, project) {
348348
[require.resolve("@babel/plugin-proposal-decorators"), { legacy: true }],
349349
_buildClassFeaturePluginConstraints(
350350
{
351-
before: ["@babel/plugin-proposal-class-properties"],
351+
before: ["@babel/plugin-transform-class-properties"],
352352
},
353353
config,
354354
parent,
@@ -357,7 +357,7 @@ function _addDecoratorPlugins(plugins, options, config, parent, project) {
357357
);
358358
}
359359

360-
if (hasPlugin(plugins, "@babel/plugin-proposal-class-properties")) {
360+
if (hasPlugin(plugins, "@babel/plugin-transform-class-properties")) {
361361
if (parent === project) {
362362
project.ui.writeWarnLine(
363363
`${_parentName(
@@ -393,7 +393,7 @@ function _addClassProperties(addPlugin, plugins, options, config, parent, projec
393393
addPlugin(
394394
plugins,
395395
[
396-
require.resolve("@babel/plugin-proposal-class-properties"),
396+
require.resolve("@babel/plugin-transform-class-properties"),
397397
{ loose: options.loose || false }
398398
],
399399
_buildClassFeaturePluginConstraints(
@@ -408,7 +408,7 @@ function _addClassProperties(addPlugin, plugins, options, config, parent, projec
408408
addPlugin(
409409
plugins,
410410
[
411-
require.resolve("@babel/plugin-proposal-private-methods"),
411+
require.resolve("@babel/plugin-transform-private-methods"),
412412
{ loose: options.loose || false }
413413
],
414414
_buildClassFeaturePluginConstraints(
@@ -423,7 +423,7 @@ function _addClassProperties(addPlugin, plugins, options, config, parent, projec
423423
addPlugin(
424424
plugins,
425425
[
426-
require.resolve("@babel/plugin-proposal-private-property-in-object"),
426+
require.resolve("@babel/plugin-transform-private-property-in-object"),
427427
{ loose: options.loose || false }
428428
],
429429
_buildClassFeaturePluginConstraints(
@@ -457,8 +457,8 @@ function _addTypeScriptPlugin(plugins, parent, project) {
457457
],
458458
{
459459
before: [
460-
"@babel/plugin-proposal-class-properties",
461-
"@babel/plugin-proposal-private-methods",
460+
"@babel/plugin-transform-class-properties",
461+
"@babel/plugin-transform-private-methods",
462462
"@babel/plugin-proposal-decorators",
463463
],
464464
}

lib/ember-plugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function _getProposalDecoratorsAndClassPlugins(config) {
174174
*/
175175
["@babel/plugin-transform-class-static-block"],
176176
["@babel/plugin-proposal-decorators", { legacy: true }],
177-
["@babel/plugin-proposal-class-properties"],
177+
["@babel/plugin-transform-class-properties"],
178178
];
179179
}
180180
}

node-tests/get-babel-options-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe("get-babel-options", function () {
105105

106106
expect(
107107
_addDecoratorPlugins(
108-
[["@babel/plugin-proposal-class-properties"]],
108+
[["@babel/plugin-transform-class-properties"]],
109109
{},
110110
{},
111111
this.addon.parent,

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
},
4545
"dependencies": {
4646
"@babel/helper-compilation-targets": "^7.20.7",
47-
"@babel/plugin-proposal-class-properties": "^7.16.5",
4847
"@babel/plugin-proposal-decorators": "^7.20.13",
49-
"@babel/plugin-proposal-private-methods": "^7.16.5",
50-
"@babel/plugin-proposal-private-property-in-object": "^7.20.5",
48+
"@babel/plugin-transform-class-properties": "^7.16.5",
5149
"@babel/plugin-transform-class-static-block": "^7.22.11",
5250
"@babel/plugin-transform-modules-amd": "^7.20.11",
51+
"@babel/plugin-transform-private-methods": "^7.16.5",
52+
"@babel/plugin-transform-private-property-in-object": "^7.20.5",
5353
"@babel/plugin-transform-runtime": "^7.13.9",
5454
"@babel/plugin-transform-typescript": "^7.20.13",
5555
"@babel/preset-env": "^7.20.2",

0 commit comments

Comments
 (0)