Skip to content

Commit

Permalink
feat(package): migrate to ng9 (#133)
Browse files Browse the repository at this point in the history
BREAKING CHANGE
  • Loading branch information
fulls1z3 authored Apr 27, 2020
1 parent b5538f7 commit 4736da0
Show file tree
Hide file tree
Showing 11 changed files with 1,637 additions and 2,431 deletions.
51 changes: 25 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,38 +33,37 @@
"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",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@types/jest": "^23.3.13",
"@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",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@types/jest": "^23.3.14",
"@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",
"ng-packagr": "^5.7.1",
"prettier": "^1.19.1",
"jest-preset-angular": "8.1.2",
"lerna": "^3.20.2",
"lint-staged": "^10.1.7",
"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
2 changes: 1 addition & 1 deletion packages/@ngx-cache/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"tslib": "^1.10.0"
},
"peerDependencies": {
"@angular/core": ">=8.0.0 <9.0.0",
"@angular/core": ">=9.0.0 <10.0.0",
"rxjs": ">=6.0.0"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@ngx-cache/core/src/cache.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class CacheModule {
provide: CacheLoader,
useFactory: cacheFactory
}
): ModuleWithProviders {
): ModuleWithProviders<CacheModule> {
return {
ngModule: CacheModule,
providers: [
Expand Down
8 changes: 4 additions & 4 deletions packages/@ngx-cache/core/src/cache.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export class CacheService {
if (Object.entries(cached).length !== 0 && cached.constructor === Object) {
if (CacheService.validateValue(cached)) {
return cached.data;
} else {
this.remove(normalized);
}

this.remove(normalized);
}

return undefined;
Expand All @@ -84,9 +84,9 @@ export class CacheService {
if (Object.entries(cached).length !== 0 && cached.constructor === Object) {
if (CacheService.validateValue(cached)) {
return cached;
} else {
this.remove(key);
}

this.remove(key);
}

return undefined;
Expand Down
4 changes: 2 additions & 2 deletions packages/@ngx-cache/fs-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"tslib": "^1.10.0"
},
"peerDependencies": {
"@angular/core": ">=8.0.0 <9.0.0",
"@ngx-cache/core": ">=8.0.0 <9.0.0"
"@angular/core": ">=9.0.0 <10.0.0",
"@ngx-cache/core": ">=9.0.0 <10.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
8 changes: 4 additions & 4 deletions packages/@ngx-cache/platform-browser/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": ">=8.0.0 <9.0.0",
"@ngx-cache/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": ">=9.0.0 <10.0.0",
"@ngx-cache/core": ">=9.0.0 <10.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CacheService } from '@ngx-cache/core';

@NgModule()
export class BrowserCacheModule {
static forRoot(configuredProviders?: Array<any>): ModuleWithProviders {
static forRoot(configuredProviders?: Array<any>): ModuleWithProviders<BrowserCacheModule> {
return {
ngModule: BrowserCacheModule,
providers: configuredProviders
Expand Down
6 changes: 3 additions & 3 deletions packages/@ngx-cache/platform-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"tslib": "^1.10.0"
},
"peerDependencies": {
"@angular/common": ">=8.0.0 <9.0.0",
"@angular/core": ">=8.0.0 <9.0.0",
"@ngx-cache/core": ">=8.0.0 <9.0.0"
"@angular/common": ">=9.0.0 <10.0.0",
"@angular/core": ">=9.0.0 <10.0.0",
"@ngx-cache/core": ">=9.0.0 <10.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core

@NgModule()
export class ServerCacheModule {
static forRoot(configuredProviders?: Array<any>): ModuleWithProviders {
static forRoot(configuredProviders?: Array<any>): ModuleWithProviders<ServerCacheModule> {
return {
ngModule: ServerCacheModule,
providers: configuredProviders
Expand Down
17 changes: 11 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
{
"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-cache/core": ["packages/@ngx-cache/core/src/index.ts"],
"@ngx-cache/platform-browser": ["packages/@ngx-cache/platform-browser/src/index.ts"],
"@ngx-cache/platform-server": ["packages/@ngx-cache/platform-server/src/index.ts"],
"@ngx-cache/fs-storage": ["packages/@ngx-cache/fs-storage/src/index.ts"]
}
},
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
},
"include": ["tools/**/*.ts", "packages/**/*.ts"]
}
Loading

0 comments on commit 4736da0

Please sign in to comment.