Skip to content

Commit

Permalink
Merge pull request #2247 from embroider-build/remove-skip-babel
Browse files Browse the repository at this point in the history
throw an error if anyone sets skipBabel
  • Loading branch information
ef4 authored Feb 11, 2025
2 parents 9410ffb + fc3dcff commit 4ec69ae
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 55 deletions.
6 changes: 6 additions & 0 deletions packages/compat/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,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);
}

Expand Down
8 changes: 1 addition & 7 deletions tests/addon-template/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,5 @@ module.exports = function (defaults) {
*/

const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
return maybeEmbroider(app);
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,5 @@ module.exports = function (defaults) {
},
});

return maybeEmbroider(app, {

skipBabel: [
{
package: 'qunit',
},
],
});
return maybeEmbroider(app);
};
5 changes: 0 additions & 5 deletions tests/fixtures/macro-sample-addon/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,5 @@ module.exports = function(defaults) {
return maybeEmbroider(app, {
useAddonAppBoot: false,
useAddonConfigModule: false,
skipBabel: [
{
package: 'qunit',
},
],
});
};
5 changes: 0 additions & 5 deletions tests/scenarios/compat-addon-classic-features-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ appScenarios
return maybeEmbroider(app, {
availableContentForTypes: ['custom'],
skipBabel: [
{
package: 'qunit',
},
],
});
};
`,
Expand Down
5 changes: 0 additions & 5 deletions tests/scenarios/compat-exclude-dot-files-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ appScenarios
return maybeEmbroider(app, {
staticAddonTrees: false,
skipBabel: [
{
package: 'qunit',
},
],
});
};
`,
Expand Down
5 changes: 0 additions & 5 deletions tests/scenarios/router-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ function setupScenario(project: Project) {
staticAddonTrees: true,
staticInvokables: true,
splitAtRoutes: ['split-me'],
skipBabel: [
{
package: 'qunit',
},
],
});
};
`,
Expand Down
5 changes: 0 additions & 5 deletions tests/scenarios/stage1-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ appScenarios
staticComponents: false,
staticHelpers: false,
staticModifiers: false,
skipBabel: [
{
package: 'qunit',
},
],
});
};
`,
Expand Down
1 change: 0 additions & 1 deletion tests/scenarios/static-app-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ wideAppScenarios
},
},
],
skipBabel: [{ package: 'qunit' }, { package: 'macro-decorators' }],
});
};
Expand Down
8 changes: 1 addition & 7 deletions tests/ts-app-template-classic/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@ module.exports = function (defaults) {
'ember-cli-babel': { enableTypeScriptTransform: true },
});

return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
return maybeEmbroider(app);
};
8 changes: 1 addition & 7 deletions tests/ts-app-template/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@ module.exports = function (defaults) {
'ember-cli-babel': { enableTypeScriptTransform: true },
});

return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
return maybeEmbroider(app);
};

0 comments on commit 4ec69ae

Please sign in to comment.