Skip to content

Commit

Permalink
feat(package): migrate to ng9 (#161)
Browse files Browse the repository at this point in the history
BREAKING CHANGE
  • Loading branch information
fulls1z3 committed Apr 27, 2020
1 parent 730d1a4 commit 58fdac3
Show file tree
Hide file tree
Showing 7 changed files with 1,645 additions and 2,443 deletions.
55 changes: 27 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,40 @@
"release": "standard-version"
},
"devDependencies": {
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/compiler-cli": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@types/jest": "^23.3.13",
"@types/lodash": "^4.14.149",
"@types/node": "^12.12.14",
"angular-tslint-rules": "^1.20.3",
"codelyzer": "^5.2.0",
"cz-conventional-changelog": "^3.0.2",
"husky": "^3.1.0",
"@angular/common": "^9.1.0",
"@angular/compiler": "^9.1.0",
"@angular/compiler-cli": "^9.1.0",
"@angular/core": "^9.1.0",
"@angular/platform-browser": "^9.1.0",
"@angular/platform-browser-dynamic": "^9.1.0",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@types/jest": "^23.3.14",
"@types/lodash": "^4.14.150",
"@types/node": "^10.0.0",
"angular-tslint-rules": "^1.20.4",
"codelyzer": "^5.2.2",
"cz-conventional-changelog": "^3.1.0",
"husky": "^4.2.0",
"jest": "^23.6.0",
"jest-junit-reporter": "^1.1.0",
"jest-preset-angular": "^8.0.0",
"lerna": "^3.19.0",
"lint-staged": "^9.5.0",
"jest-preset-angular": "8.1.2",
"lerna": "^3.20.2",
"lint-staged": "^10.0.0",
"lodash": "^4.17.15",
"ng-packagr": "^5.7.1",
"prettier": "^1.19.1",
"ng-packagr": "^9.0.0",
"prettier": "1.19.1",
"prettier-tslint": "^0.4.2",
"reflect-metadata": "^0.1.13",
"request": "^2.88.0",
"rimraf": "^3.0.0",
"rxjs": "^6.5.3",
"ts-node": "^8.5.4",
"tsickle": "^0.37.1",
"tslib": "^1.10.0",
"request": "^2.88.2",
"rimraf": "^3.0.2",
"rxjs": "~6.5.4",
"ts-node": "^8.9.0",
"tsickle": "^0.38.0",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"typescript": "~3.5.3",
"zone.js": "~0.9.1"
"typescript": "~3.8.3",
"zone.js": "^0.10.2"
},
"husky": {
"hooks": {
Expand Down
6 changes: 3 additions & 3 deletions packages/@ngx-config/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"tslib": "^1.10.0"
},
"peerDependencies": {
"@angular/common": ">=8.0.0 <9.0.0",
"@angular/core": ">=8.0.0 <9.0.0",
"@angular/platform-browser-dynamic": ">=8.0.0 <9.0.0"
"@angular/common": ">=9.0.0 <10.0.0",
"@angular/core": ">=9.0.0 <10.0.0",
"@angular/platform-browser-dynamic": ">=9.0.0 <10.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
10 changes: 4 additions & 6 deletions packages/@ngx-config/core/src/config.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ export const initializerFactory = (config: ConfigService) => {
export const CONFIG_FORROOT_GUARD = new InjectionToken('CONFIG_FORROOT_GUARD');

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

return 'guarded';
Expand All @@ -30,7 +29,6 @@ export function provideForRootGuard(config: ConfigService): any {
exports: [ConfigPipe]
})
export class ConfigModule {

static forRoot(
configuredProvider: any = {
provide: ConfigLoader,
Expand All @@ -56,13 +54,13 @@ export class ConfigModule {
]
};
}

static forChild(): ModuleWithProviders<ConfigModule> {
return {
ngModule: ConfigModule
};
}

// tslint:disable-next-line:no-empty
constructor(@Optional() @Inject(CONFIG_FORROOT_GUARD) guard: any) {}
}
8 changes: 4 additions & 4 deletions packages/@ngx-config/http-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"tslib": "^1.10.0"
},
"peerDependencies": {
"@angular/common": ">=8.0.0 <9.0.0",
"@angular/core": ">=8.0.0 <9.0.0",
"@angular/platform-browser-dynamic": ">=8.0.0 <9.0.0",
"@ngx-config/core": ">=8.0.0 <9.0.0",
"@angular/common": ">=9.0.0 <10.0.0",
"@angular/core": ">=9.0.0 <10.0.0",
"@angular/platform-browser-dynamic": ">=9.0.0 <10.0.0",
"@ngx-config/core": ">=9.0.0 <10.0.0",
"rxjs": ">=6.0.0"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/@ngx-config/merge-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"tslib": "^1.10.0"
},
"peerDependencies": {
"@angular/core": ">=8.0.0 <9.0.0",
"@angular/platform-browser-dynamic": ">=8.0.0 <9.0.0",
"@ngx-config/core": ">=8.0.0 <9.0.0",
"@angular/core": ">=9.0.0 <10.0.0",
"@angular/platform-browser-dynamic": ">=9.0.0 <10.0.0",
"@ngx-config/core": ">=9.0.0 <10.0.0",
"lodash": ">=4.17.10",
"rxjs": ">=6.0.0"
},
Expand Down
17 changes: 11 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"rootDir": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"importHelpers": true,
"baseUrl": ".",
"target": "es2015",
"module": "commonjs",
"typeRoots": ["node_modules/@types"],
"lib": ["es2017", "dom"],
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {
"@ngx-config/core": ["packages/@ngx-config/core/src/index.ts"],
"@ngx-config/http-loader": ["packages/@ngx-config/http-loader/src/index.ts"],
"@ngx-config/merge-loader": ["packages/@ngx-config/merge-loader/src/index.ts"]
}
},
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
},
"include": ["tools/**/*.ts", "packages/**/*.ts"]
}
Loading

0 comments on commit 58fdac3

Please sign in to comment.