Skip to content

Commit 58fdac3

Browse files
authored
feat(package): migrate to ng9 (#161)
BREAKING CHANGE
1 parent 730d1a4 commit 58fdac3

File tree

7 files changed

+1645
-2443
lines changed

7 files changed

+1645
-2443
lines changed

package.json

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,41 +32,40 @@
3232
"release": "standard-version"
3333
},
3434
"devDependencies": {
35-
"@angular/common": "^8.0.0",
36-
"@angular/compiler": "^8.0.0",
37-
"@angular/compiler-cli": "^8.0.0",
38-
"@angular/core": "^8.0.0",
39-
"@angular/platform-browser": "^8.0.0",
40-
"@angular/platform-browser-dynamic": "^8.0.0",
41-
"@commitlint/cli": "^8.2.0",
42-
"@commitlint/config-conventional": "^8.2.0",
43-
"@types/jest": "^23.3.13",
44-
"@types/lodash": "^4.14.149",
45-
"@types/node": "^12.12.14",
46-
"angular-tslint-rules": "^1.20.3",
47-
"codelyzer": "^5.2.0",
48-
"cz-conventional-changelog": "^3.0.2",
49-
"husky": "^3.1.0",
35+
"@angular/common": "^9.1.0",
36+
"@angular/compiler": "^9.1.0",
37+
"@angular/compiler-cli": "^9.1.0",
38+
"@angular/core": "^9.1.0",
39+
"@angular/platform-browser": "^9.1.0",
40+
"@angular/platform-browser-dynamic": "^9.1.0",
41+
"@commitlint/cli": "^8.3.5",
42+
"@commitlint/config-conventional": "^8.3.4",
43+
"@types/jest": "^23.3.14",
44+
"@types/lodash": "^4.14.150",
45+
"@types/node": "^10.0.0",
46+
"angular-tslint-rules": "^1.20.4",
47+
"codelyzer": "^5.2.2",
48+
"cz-conventional-changelog": "^3.1.0",
49+
"husky": "^4.2.0",
5050
"jest": "^23.6.0",
5151
"jest-junit-reporter": "^1.1.0",
52-
"jest-preset-angular": "^8.0.0",
53-
"lerna": "^3.19.0",
54-
"lint-staged": "^9.5.0",
52+
"jest-preset-angular": "8.1.2",
53+
"lerna": "^3.20.2",
54+
"lint-staged": "^10.0.0",
5555
"lodash": "^4.17.15",
56-
"ng-packagr": "^5.7.1",
57-
"prettier": "^1.19.1",
56+
"ng-packagr": "^9.0.0",
57+
"prettier": "1.19.1",
5858
"prettier-tslint": "^0.4.2",
5959
"reflect-metadata": "^0.1.13",
60-
"request": "^2.88.0",
61-
"rimraf": "^3.0.0",
62-
"rxjs": "^6.5.3",
63-
"ts-node": "^8.5.4",
64-
"tsickle": "^0.37.1",
65-
"tslib": "^1.10.0",
60+
"request": "^2.88.2",
61+
"rimraf": "^3.0.2",
62+
"rxjs": "~6.5.4",
63+
"ts-node": "^8.9.0",
64+
"tsickle": "^0.38.0",
6665
"tslint": "^5.20.1",
6766
"tslint-config-prettier": "^1.18.0",
68-
"typescript": "~3.5.3",
69-
"zone.js": "~0.9.1"
67+
"typescript": "~3.8.3",
68+
"zone.js": "^0.10.2"
7069
},
7170
"husky": {
7271
"hooks": {

packages/@ngx-config/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
"tslib": "^1.10.0"
3030
},
3131
"peerDependencies": {
32-
"@angular/common": ">=8.0.0 <9.0.0",
33-
"@angular/core": ">=8.0.0 <9.0.0",
34-
"@angular/platform-browser-dynamic": ">=8.0.0 <9.0.0"
32+
"@angular/common": ">=9.0.0 <10.0.0",
33+
"@angular/core": ">=9.0.0 <10.0.0",
34+
"@angular/platform-browser-dynamic": ">=9.0.0 <10.0.0"
3535
},
3636
"publishConfig": {
3737
"access": "public",

packages/@ngx-config/core/src/config.module.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ export const initializerFactory = (config: ConfigService) => {
1616
export const CONFIG_FORROOT_GUARD = new InjectionToken('CONFIG_FORROOT_GUARD');
1717

1818
// tslint:disable-next-line:only-arrow-functions
19-
export function provideForRootGuard(config: ConfigService): any {
19+
export function provideForRootGuard(config?: ConfigService): any {
2020
if (config) {
21-
throw new Error(
22-
`ConfigModule.forRoot() called twice. Lazy loaded modules should use ConfigModule.forChild() instead.`);
21+
throw new Error(`ConfigModule.forRoot() called twice. Lazy loaded modules should use ConfigModule.forChild() instead.`);
2322
}
2423

2524
return 'guarded';
@@ -30,7 +29,6 @@ export function provideForRootGuard(config: ConfigService): any {
3029
exports: [ConfigPipe]
3130
})
3231
export class ConfigModule {
33-
3432
static forRoot(
3533
configuredProvider: any = {
3634
provide: ConfigLoader,
@@ -56,13 +54,13 @@ export class ConfigModule {
5654
]
5755
};
5856
}
59-
57+
6058
static forChild(): ModuleWithProviders<ConfigModule> {
6159
return {
6260
ngModule: ConfigModule
6361
};
6462
}
65-
63+
6664
// tslint:disable-next-line:no-empty
6765
constructor(@Optional() @Inject(CONFIG_FORROOT_GUARD) guard: any) {}
6866
}

packages/@ngx-config/http-loader/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"tslib": "^1.10.0"
2828
},
2929
"peerDependencies": {
30-
"@angular/common": ">=8.0.0 <9.0.0",
31-
"@angular/core": ">=8.0.0 <9.0.0",
32-
"@angular/platform-browser-dynamic": ">=8.0.0 <9.0.0",
33-
"@ngx-config/core": ">=8.0.0 <9.0.0",
30+
"@angular/common": ">=9.0.0 <10.0.0",
31+
"@angular/core": ">=9.0.0 <10.0.0",
32+
"@angular/platform-browser-dynamic": ">=9.0.0 <10.0.0",
33+
"@ngx-config/core": ">=9.0.0 <10.0.0",
3434
"rxjs": ">=6.0.0"
3535
},
3636
"publishConfig": {

packages/@ngx-config/merge-loader/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
"tslib": "^1.10.0"
3030
},
3131
"peerDependencies": {
32-
"@angular/core": ">=8.0.0 <9.0.0",
33-
"@angular/platform-browser-dynamic": ">=8.0.0 <9.0.0",
34-
"@ngx-config/core": ">=8.0.0 <9.0.0",
32+
"@angular/core": ">=9.0.0 <10.0.0",
33+
"@angular/platform-browser-dynamic": ">=9.0.0 <10.0.0",
34+
"@ngx-config/core": ">=9.0.0 <10.0.0",
3535
"lodash": ">=4.17.10",
3636
"rxjs": ">=6.0.0"
3737
},

tsconfig.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
4-
"module": "commonjs",
3+
"rootDir": ".",
4+
"sourceMap": true,
5+
"declaration": false,
56
"moduleResolution": "node",
67
"emitDecoratorMetadata": true,
78
"experimentalDecorators": true,
8-
"noImplicitAny": true,
9-
"suppressImplicitAnyIndexErrors": true,
109
"importHelpers": true,
11-
"baseUrl": ".",
10+
"target": "es2015",
11+
"module": "commonjs",
1212
"typeRoots": ["node_modules/@types"],
1313
"lib": ["es2017", "dom"],
14+
"skipLibCheck": true,
15+
"skipDefaultLibCheck": true,
16+
"baseUrl": ".",
1417
"paths": {
1518
"@ngx-config/core": ["packages/@ngx-config/core/src/index.ts"],
1619
"@ngx-config/http-loader": ["packages/@ngx-config/http-loader/src/index.ts"],
1720
"@ngx-config/merge-loader": ["packages/@ngx-config/merge-loader/src/index.ts"]
18-
}
21+
},
22+
"noImplicitAny": true,
23+
"suppressImplicitAnyIndexErrors": true
1924
},
2025
"include": ["tools/**/*.ts", "packages/**/*.ts"]
2126
}

0 commit comments

Comments
 (0)