From e3315378b6a1bcb5311f561011bb135afdcf7894 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Sun, 2 Feb 2025 14:34:30 +0000 Subject: [PATCH 1/2] throw an error if anyone sets skipBabel --- packages/compat/src/options.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/compat/src/options.ts b/packages/compat/src/options.ts index 498503950..39d608612 100644 --- a/packages/compat/src/options.ts +++ b/packages/compat/src/options.ts @@ -141,6 +141,12 @@ export function optionsWithDefaults(options?: Options): CompatOptionsType { ); } + if ((options as any)?.skipBabel !== undefined) { + throw new Error( + `You have set 'skipBabel' on your Embroider options. This setting has been removed and you can now configure your babel ignores directly in the babel config in your repo https://babeljs.io/docs/options#ignore` + ); + } + return Object.assign({}, defaults, options); } From fc3dcffff6252956291a215e86b2a0bdc7f02985 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Tue, 11 Feb 2025 15:03:34 +0000 Subject: [PATCH 2/2] remove all cases of skipBabel in our tests --- tests/addon-template/ember-cli-build.js | 8 +------- .../blacklisted-addon-build-options/ember-cli-build.js | 9 +-------- tests/fixtures/macro-sample-addon/ember-cli-build.js | 5 ----- tests/scenarios/compat-addon-classic-features-test.ts | 5 ----- tests/scenarios/compat-exclude-dot-files-test.ts | 5 ----- tests/scenarios/router-test.ts | 5 ----- tests/scenarios/stage1-test.ts | 5 ----- tests/scenarios/static-app-test.ts | 1 - tests/ts-app-template-classic/ember-cli-build.js | 8 +------- tests/ts-app-template/ember-cli-build.js | 8 +------- 10 files changed, 4 insertions(+), 55 deletions(-) diff --git a/tests/addon-template/ember-cli-build.js b/tests/addon-template/ember-cli-build.js index e211c6334..a778499b7 100644 --- a/tests/addon-template/ember-cli-build.js +++ b/tests/addon-template/ember-cli-build.js @@ -15,11 +15,5 @@ module.exports = function (defaults) { */ const { maybeEmbroider } = require('@embroider/test-setup'); - return maybeEmbroider(app, { - skipBabel: [ - { - package: 'qunit', - }, - ], - }); + return maybeEmbroider(app); }; diff --git a/tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js b/tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js index bb4421fac..fad75c7a9 100644 --- a/tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js +++ b/tests/fixtures/blacklisted-addon-build-options/ember-cli-build.js @@ -10,12 +10,5 @@ module.exports = function (defaults) { }, }); - return maybeEmbroider(app, { - - skipBabel: [ - { - package: 'qunit', - }, - ], - }); + return maybeEmbroider(app); }; diff --git a/tests/fixtures/macro-sample-addon/ember-cli-build.js b/tests/fixtures/macro-sample-addon/ember-cli-build.js index 2f8066bca..0b4fcb53f 100644 --- a/tests/fixtures/macro-sample-addon/ember-cli-build.js +++ b/tests/fixtures/macro-sample-addon/ember-cli-build.js @@ -18,10 +18,5 @@ module.exports = function(defaults) { return maybeEmbroider(app, { useAddonAppBoot: false, useAddonConfigModule: false, - skipBabel: [ - { - package: 'qunit', - }, - ], }); }; diff --git a/tests/scenarios/compat-addon-classic-features-test.ts b/tests/scenarios/compat-addon-classic-features-test.ts index c22f7b430..381ae02f9 100644 --- a/tests/scenarios/compat-addon-classic-features-test.ts +++ b/tests/scenarios/compat-addon-classic-features-test.ts @@ -52,11 +52,6 @@ appScenarios return maybeEmbroider(app, { availableContentForTypes: ['custom'], - skipBabel: [ - { - package: 'qunit', - }, - ], }); }; `, diff --git a/tests/scenarios/compat-exclude-dot-files-test.ts b/tests/scenarios/compat-exclude-dot-files-test.ts index aabd18c44..2f3f500e6 100644 --- a/tests/scenarios/compat-exclude-dot-files-test.ts +++ b/tests/scenarios/compat-exclude-dot-files-test.ts @@ -23,11 +23,6 @@ appScenarios return maybeEmbroider(app, { staticAddonTrees: false, - skipBabel: [ - { - package: 'qunit', - }, - ], }); }; `, diff --git a/tests/scenarios/router-test.ts b/tests/scenarios/router-test.ts index 3b4085fed..f7540fdb8 100644 --- a/tests/scenarios/router-test.ts +++ b/tests/scenarios/router-test.ts @@ -36,11 +36,6 @@ function setupScenario(project: Project) { staticAddonTrees: true, staticInvokables: true, splitAtRoutes: ['split-me'], - skipBabel: [ - { - package: 'qunit', - }, - ], }); }; `, diff --git a/tests/scenarios/stage1-test.ts b/tests/scenarios/stage1-test.ts index 9e801f479..67c7ad507 100644 --- a/tests/scenarios/stage1-test.ts +++ b/tests/scenarios/stage1-test.ts @@ -30,11 +30,6 @@ appScenarios staticComponents: false, staticHelpers: false, staticModifiers: false, - skipBabel: [ - { - package: 'qunit', - }, - ], }); }; `, diff --git a/tests/scenarios/static-app-test.ts b/tests/scenarios/static-app-test.ts index e098a3743..3a19be95f 100644 --- a/tests/scenarios/static-app-test.ts +++ b/tests/scenarios/static-app-test.ts @@ -390,7 +390,6 @@ wideAppScenarios }, }, ], - skipBabel: [{ package: 'qunit' }, { package: 'macro-decorators' }], }); }; diff --git a/tests/ts-app-template-classic/ember-cli-build.js b/tests/ts-app-template-classic/ember-cli-build.js index 736cf11f1..f46ba13b7 100644 --- a/tests/ts-app-template-classic/ember-cli-build.js +++ b/tests/ts-app-template-classic/ember-cli-build.js @@ -8,11 +8,5 @@ module.exports = function (defaults) { 'ember-cli-babel': { enableTypeScriptTransform: true }, }); - return maybeEmbroider(app, { - skipBabel: [ - { - package: 'qunit', - }, - ], - }); + return maybeEmbroider(app); }; diff --git a/tests/ts-app-template/ember-cli-build.js b/tests/ts-app-template/ember-cli-build.js index 736cf11f1..f46ba13b7 100644 --- a/tests/ts-app-template/ember-cli-build.js +++ b/tests/ts-app-template/ember-cli-build.js @@ -8,11 +8,5 @@ module.exports = function (defaults) { 'ember-cli-babel': { enableTypeScriptTransform: true }, }); - return maybeEmbroider(app, { - skipBabel: [ - { - package: 'qunit', - }, - ], - }); + return maybeEmbroider(app); };