From a8d6cc5a6b4c3e5957ebd66aba7020940a2f4dec Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 31 May 2023 06:20:54 +0200 Subject: [PATCH 1/4] bugfix: Reverted the default option for @babel/plugin-proposal-decorators --- files/__addonLocation__/babel.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/__addonLocation__/babel.config.json b/files/__addonLocation__/babel.config.json index 27457be1..2d30497b 100644 --- a/files/__addonLocation__/babel.config.json +++ b/files/__addonLocation__/babel.config.json @@ -3,7 +3,7 @@ <% } %> "plugins": [<% if (typescript) { %> ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],<% } %> "@embroider/addon-dev/template-colocation-plugin", - ["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }], + ["@babel/plugin-proposal-decorators", { "legacy": true }], "@babel/plugin-proposal-class-properties" ] } From de7f1e7a37994735d72c7bd1b6169531f943630c Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 31 May 2023 06:21:19 +0200 Subject: [PATCH 2/4] chore: Reordered the plugins to group Babel plugins together --- files/__addonLocation__/babel.config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/__addonLocation__/babel.config.json b/files/__addonLocation__/babel.config.json index 2d30497b..4d36d077 100644 --- a/files/__addonLocation__/babel.config.json +++ b/files/__addonLocation__/babel.config.json @@ -1,8 +1,8 @@ { <% if (typescript) { %> "presets": [["@babel/preset-typescript"]], -<% } %> "plugins": [<% if (typescript) { %> +<% } %> "plugins": [ + "@embroider/addon-dev/template-colocation-plugin",<% if (typescript) { %> ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],<% } %> - "@embroider/addon-dev/template-colocation-plugin", ["@babel/plugin-proposal-decorators", { "legacy": true }], "@babel/plugin-proposal-class-properties" ] From b9ba7ff6fcded6f122e38c75c55e8f6843eb317f Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 31 May 2023 06:22:36 +0200 Subject: [PATCH 3/4] chore: Removed @babel/plugin-syntax-decorators from addon package.json (unused) --- files/__addonLocation__/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/files/__addonLocation__/package.json b/files/__addonLocation__/package.json index 59147905..0397aba0 100644 --- a/files/__addonLocation__/package.json +++ b/files/__addonLocation__/package.json @@ -33,7 +33,6 @@ <% if (typescript) { %>"@babel/preset-typescript": "^7.18.6"<% } else { %>"@babel/eslint-parser": "^7.19.1"<% } %>, "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-proposal-decorators": "^7.20.13", - "@babel/plugin-syntax-decorators": "^7.17.0", "@babel/runtime": "^7.17.0", "@embroider/addon-dev": "^3.0.0",<% if (typescript) { %> "@glint/core": "^1.0.2", From 3cb4676ee3496fcecc5f007cabd90571aebb181c Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Wed, 31 May 2023 06:45:26 +0200 Subject: [PATCH 4/4] chore: Updated the option syntax to address deprecation --- files/__addonLocation__/babel.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/__addonLocation__/babel.config.json b/files/__addonLocation__/babel.config.json index 4d36d077..ec309535 100644 --- a/files/__addonLocation__/babel.config.json +++ b/files/__addonLocation__/babel.config.json @@ -3,7 +3,7 @@ <% } %> "plugins": [ "@embroider/addon-dev/template-colocation-plugin",<% if (typescript) { %> ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],<% } %> - ["@babel/plugin-proposal-decorators", { "legacy": true }], + ["@babel/plugin-proposal-decorators", { "version": "legacy" }], "@babel/plugin-proposal-class-properties" ] }