Skip to content

Commit 639bc49

Browse files
committed
fixup! fix(@angular/build): preserve entry-point displayName casing and flatten bundle names
1 parent 526bc0a commit 639bc49

2 files changed

Lines changed: 1 addition & 23 deletions

File tree

‎packages/angular/build/src/builders/library/pipeline/entry-points.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function normalizeEntryPoint(
6565
);
6666
}
6767

68-
if (!/(?<!\.d)\.(?:ts|mts)$/.test(entryFilePath)) {
68+
if (!/(?<!\.d)\.m?ts$/.test(entryFilePath)) {
6969
throw new Error(
7070
`Entry point '${key}' file path must be a TypeScript file ('.ts' or '.mts'): '${entryFilePath}'.`,
7171
);

‎packages/angular/build/src/builders/library/pipeline/entry-points_spec.ts‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ describe('entry-points pipeline', () => {
6060
});
6161

6262
it('should replace nested slashes with dashes in secondary entry point name', () => {
63-
expect(getEntryPointBundleName('my-lib', 'testing/http')).toBe('my-lib-testing-http');
6463
expect(getEntryPointBundleName('@my-scope/my-lib', 'testing/sub/deep')).toBe(
6564
'my-scope-my-lib-testing-sub-deep',
6665
);
@@ -273,27 +272,6 @@ describe('entry-points pipeline', () => {
273272
});
274273
});
275274

276-
it('should flatten nested secondary entry-point bundleName', () => {
277-
const entryPoints = normalizeEntryPoints(
278-
{
279-
'.': './src/public-api.ts',
280-
'./testing/http': './testing/http/src/public-api.ts',
281-
},
282-
projectRoot,
283-
packageJsonPath,
284-
'my-lib',
285-
);
286-
287-
expect(entryPoints.get('testing/http')).toEqual({
288-
subpath: './testing/http',
289-
name: 'testing/http',
290-
displayName: 'my-lib/testing/http',
291-
bundleName: 'my-lib-testing-http',
292-
entryFilePath: join(projectRoot, 'testing/http/src/public-api.ts'),
293-
isPrimary: false,
294-
});
295-
});
296-
297275
it('should ignore non-TypeScript exports and static declaration files for secondary subpaths', () => {
298276
const rawExports = {
299277
'.': './src/public-api.ts',

0 commit comments

Comments
 (0)