From 624472354c431c0049591f6751b9786733bb22e1 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Thu, 16 May 2024 10:17:15 +0100 Subject: [PATCH] fix(angular): libraries should not contain tslib by default #21023 --- .../src/generators/library/files/base/package.json__tpl__ | 3 --- packages/angular/src/generators/library/library.spec.ts | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/angular/src/generators/library/files/base/package.json__tpl__ b/packages/angular/src/generators/library/files/base/package.json__tpl__ index 32f4af596119e..90ac605edb8f8 100644 --- a/packages/angular/src/generators/library/files/base/package.json__tpl__ +++ b/packages/angular/src/generators/library/files/base/package.json__tpl__ @@ -5,8 +5,5 @@ "@angular/common": "<%= angularPeerDepVersion %>", "@angular/core": "<%= angularPeerDepVersion %>" }, - "dependencies": { - "tslib": "^2.3.0" - }, "sideEffects": false } diff --git a/packages/angular/src/generators/library/library.spec.ts b/packages/angular/src/generators/library/library.spec.ts index 5dfa64c650a92..34200c6949218 100644 --- a/packages/angular/src/generators/library/library.spec.ts +++ b/packages/angular/src/generators/library/library.spec.ts @@ -178,6 +178,9 @@ describe('lib', () => { expect(packageJson.devDependencies['postcss']).toBeDefined(); expect(packageJson.devDependencies['autoprefixer']).toBeDefined(); expect(packageJson.devDependencies['postcss-url']).toBeDefined(); + + const libPackageJson = readJson(tree, 'my-lib/package.json'); + expect(libPackageJson.dependencies?.['tslib']).toBeFalsy(); }); it('should create project configuration', async () => {