Skip to content

Commit e47c6e7

Browse files
authored
Merge pull request #620 from embroider-build/improved-layering
Improved layering between app and tests bundles
2 parents 89d4923 + aa30bff commit e47c6e7

File tree

4 files changed

+275
-147
lines changed

4 files changed

+275
-147
lines changed

packages/ember-auto-import/ts/bundle-config.ts

+22
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,28 @@ export default class BundleConfig {
6868
}
6969
}
7070

71+
maybeBundleEntrypoint(
72+
bundleName: string,
73+
type: BundleType
74+
): string | undefined {
75+
if (this.isBuiltInBundleName(bundleName)) {
76+
return this.bundleEntrypoint(bundleName, type);
77+
}
78+
return undefined;
79+
}
80+
81+
bundleNameForEntrypoint(
82+
entrypoint: string,
83+
type: BundleType
84+
): BundleName | undefined {
85+
for (let name of this.names) {
86+
if (entrypoint.endsWith(this.bundleEntrypoint(name, type))) {
87+
return name;
88+
}
89+
}
90+
return undefined;
91+
}
92+
7193
bundleForTreeType(treeType: TreeType): BundleName {
7294
switch (treeType) {
7395
case 'app':

0 commit comments

Comments
 (0)