Skip to content

Commit

Permalink
remove the babelFilter function and the output of _babel_filter_.js file
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueCutOfficial committed Jun 13, 2024
1 parent 51535bc commit 2ba5f94
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 52 deletions.
11 changes: 0 additions & 11 deletions packages/compat/src/compat-app-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
explicitRelative,
extensionsPattern,
warn,
jsHandlebarsCompile,
templateColocationPluginPath,
cacheBustingPluginVersion,
cacheBustingPluginPath,
Expand Down Expand Up @@ -569,11 +568,6 @@ export class CompatAppBuilder {
`module.exports = ${JSON.stringify(pconfig.config, null, 2)}`,
'utf8'
);
writeFileSync(
join(locateEmbroiderWorkingDir(this.compatApp.root), '_babel_filter_.js'),
babelFilterTemplate({ skipBabel: [], appRoot: this.origAppPackage.root }),
'utf8'
);
}

private addResolverConfig(config: CompatResolverOptions) {
Expand Down Expand Up @@ -615,11 +609,6 @@ function defaultAddonPackageRules(): PackageRules[] {
.reduce((a, b) => a.concat(b), []);
}

const babelFilterTemplate = jsHandlebarsCompile(`
const { babelFilter } = require(${JSON.stringify(require.resolve('@embroider/core'))});
module.exports = babelFilter({{json-stringify skipBabel}}, "{{js-string-escape appRoot}}");
`) as (params: { skipBabel: string[]; appRoot: string }) => string;

function combinePackageJSON(...layers: object[]) {
function custom(objValue: any, srcValue: any, key: string, _object: any, _source: any, stack: { size: number }) {
if (key === 'keywords' && stack.size === 0) {
Expand Down
34 changes: 0 additions & 34 deletions packages/shared-internals/src/babel-filter.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/shared-internals/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export { default as Package, V2AddonPackage as AddonPackage, V2AppPackage as App
export { default as PackageCache } from './package-cache';
export type { RewrittenPackageIndex } from './rewritten-package-cache';
export { RewrittenPackageCache } from './rewritten-package-cache';
export { default as babelFilter } from './babel-filter';
export { default as packageName } from './package-name';
export { default as tmpdir } from './tmpdir';
export * from './ember-cli-models';
Expand Down
3 changes: 0 additions & 3 deletions tests/scenarios/compat-resolver-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ Scenarios.fromProject(() => new Project())
[require.resolve('@embroider/compat/src/babel-plugin-adjust-imports'), { appRoot: app.dir }],
])}
}`,
'node_modules/.embroider/_babel_filter.js': `
module.exports = function(filename) { return true }
`,
'node_modules/.embroider/resolver.json': JSON.stringify(resolverOptions),
});
};
Expand Down
3 changes: 0 additions & 3 deletions tests/scenarios/core-resolver-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ Scenarios.fromProject(() => new Project())
plugins: []
}
`,
'node_modules/.embroider/_babel_filter.js': `
module.exports = function(filename) { return true }
`,
'node_modules/.embroider/resolver.json': JSON.stringify(resolverOptions),
'node_modules/my-addon/package.json': addonPackageJSON('my-addon', opts?.addonMeta),
});
Expand Down

0 comments on commit 2ba5f94

Please sign in to comment.