From 34bb57bbb8a677b308a61501e7855161e5ab80f6 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 19 May 2020 12:10:12 +0200 Subject: [PATCH] fix(@schematics/angular): add tslib as a direct dependency for new libraries Tslib version is bound to the TypeScript version used to comopile the library. Thus, we shouldn't list`tslib` as a `peerDependencies`. This is because, a user can install libraries which have been compiled with older versions of TypeScript and thus require multiple `tslib` versions to be installed. Reference: TOOL-1374 --- .../schematics/angular/library/files/package.json.template | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/library/files/package.json.template b/packages/schematics/angular/library/files/package.json.template index ad5c43cf5631..dde7d4962122 100644 --- a/packages/schematics/angular/library/files/package.json.template +++ b/packages/schematics/angular/library/files/package.json.template @@ -3,7 +3,9 @@ "version": "0.0.1", "peerDependencies": { "@angular/common": "^<%= angularLatestVersion %>", - "@angular/core": "^<%= angularLatestVersion %>", + "@angular/core": "^<%= angularLatestVersion %>" + }, + "dependencies": { "tslib": "^<%= tsLibLatestVersion %>" } } \ No newline at end of file