Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 4b20ee3

Browse files
alan-agius4CaerusKaru
authored andcommitted
feat: add tslib as peerDependency (#1278)
nguniversal relied on a hidden dependency of `tslib` due to `importHelpers` https://github.com/angular/universal/blob/5798f198db1fb0bce9dbfb850751429a3724084a/modules/bazel-tsconfig-build.json#L11 which was previously installed by the Angular framework. This, however changed with this PR angular/angular#32167 With this change we now list `tslib` as a required peerDepedency. Users not using the CLI will need to manually install `tslib` via; ``` yarn add tslib ``` or ``` npm install tslib --save ``` Reference: TOOL-836
1 parent 5798f19 commit 4b20ee3

File tree

9 files changed

+28
-6
lines changed

9 files changed

+28
-6
lines changed

modules/aspnetcore-engine/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"peerDependencies": {
2020
"@angular/common": "NG_VERSION",
2121
"@angular/core": "NG_VERSION",
22-
"rxjs": "RXJS_VERSION"
22+
"rxjs": "RXJS_VERSION",
23+
"tslib": "TSLIB_VERSION"
2324
},
2425
"ng-update": {
2526
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"

modules/builders/BUILD.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
load("@npm_bazel_typescript//:defs.bzl", "ts_config")
12
load("//tools:defaults.bzl", "npm_package", "ts_library")
23

4+
ts_config(
5+
name = "bazel-tsconfig-build",
6+
src = "bazel-tsconfig-build.json",
7+
deps = ["//modules:bazel-tsconfig-build.json"],
8+
)
9+
310
filegroup(
411
name = "builders_assets",
512
srcs = glob([
@@ -20,6 +27,7 @@ ts_library(
2027
],
2128
),
2229
module_name = "@nguniversal/builders",
30+
tsconfig = ":bazel-tsconfig-build",
2331
deps = [
2432
"@npm//@angular-devkit/architect",
2533
"@npm//@angular-devkit/core",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../bazel-tsconfig-build.json",
3+
"compilerOptions": {
4+
"importHelpers": false
5+
}
6+
}

modules/common/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
],
1010
"peerDependencies": {
1111
"@angular/common": "NG_VERSION",
12-
"@angular/core": "NG_VERSION"
12+
"@angular/core": "NG_VERSION",
13+
"tslib": "TSLIB_VERSION"
1314
},
1415
"ng-update": {
1516
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"

modules/express-engine/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"@angular/common": "NG_VERSION",
1313
"@angular/core": "NG_VERSION",
1414
"@angular/platform-server": "NG_VERSION",
15-
"express": "EXPRESS_VERSION"
15+
"express": "EXPRESS_VERSION",
16+
"tslib": "TSLIB_VERSION"
1617
},
1718
"dependencies": {
1819
"@nguniversal/common": "0.0.0-PLACEHOLDER"

modules/hapi-engine/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"@angular/common": "NG_VERSION",
1313
"@angular/core": "NG_VERSION",
1414
"@angular/platform-server": "NG_VERSION",
15-
"hapi": "HAPI_VERSION"
15+
"hapi": "HAPI_VERSION",
16+
"tslib": "TSLIB_VERSION"
1617
},
1718
"dependencies": {
1819
"@nguniversal/common": "0.0.0-PLACEHOLDER"

modules/module-map-ngfactory-loader/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"peerDependencies": {
1313
"@angular/common": "NG_VERSION",
1414
"@angular/core": "NG_VERSION",
15-
"@angular/platform-server": "NG_VERSION"
15+
"@angular/platform-server": "NG_VERSION",
16+
"tslib": "TSLIB_VERSION"
1617
},
1718
"ng-update": {
1819
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"

modules/socket-engine/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
],
1111
"peerDependencies": {
1212
"@nguniversal/common": "0.0.0-PLACEHOLDER",
13-
"@angular/core": "NG_VERSION"
13+
"@angular/core": "NG_VERSION",
14+
"tslib": "TSLIB_VERSION"
1415
},
1516
"ng-update": {
1617
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"

tools/defaults.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ EXPRESS_VERSION = "^4.15.2"
3939
EXPRESS_TYPES_VERSION = "^4.17.0"
4040
DEVKIT_CORE_VERSION = "^9.0.0-next.8"
4141
DEVKIT_ARCHITECT_VERSION = "^0.900.0-next.8"
42+
TSLIB_VERSION = "^1.9.0"
4243

4344
NGUNIVERSAL_SCOPED_PACKAGES = ["@nguniversal/%s" % p for p in [
4445
"aspnetcore-engine",
@@ -59,6 +60,7 @@ PKG_GROUP_REPLACEMENTS = {
5960
"RXJS_VERSION": RXJS_VERSION,
6061
"DEVKIT_CORE_VERSION": DEVKIT_CORE_VERSION,
6162
"DEVKIT_ARCHITECT_VERSION": DEVKIT_ARCHITECT_VERSION,
63+
"TSLIB_VERSION": TSLIB_VERSION,
6264
}
6365

6466
GLOBALS = {

0 commit comments

Comments
 (0)