Skip to content

Commit f8f50e1

Browse files
authored
feat(*): Upgrade to Angular 10 (#202)
- Updgrade to Angular 10 - Update docs Closes #174. BREAKING CHANGE: The upgrade to Angular 10 breaks compatibility with Angular 9.
1 parent b86e95a commit f8f50e1

File tree

9 files changed

+1303
-1869
lines changed

9 files changed

+1303
-1869
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
registry-url: 'https://registry.npmjs.org'
1919
- name: Install dependencies
2020
run: npm ci
21-
- name: Build
21+
- name: Build library
2222
run: npm run build:library
2323
- name: Publish to npm
2424
run: npm publish ./dist/angular-notifier

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The following list describes the compatibility with Angular:
4040
| `5.x` | `7.x` |
4141
| `6.x` | `8.x` |
4242
| `7.x` | `9.x` |
43+
| `8.x` | `10.x` |
4344

4445
<br>
4546

package-lock.json

Lines changed: 1277 additions & 1846 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,25 @@
3434
"test:library": "ng test angular-notifier",
3535
"test:library:upload-coverage": "codecov -f coverage/coverage-final.json"
3636
},
37+
"dependencies": {
38+
"tslib": "2.0.x"
39+
},
3740
"peerDependencies": {
38-
"@angular/common": ">= 9.0.0 < 10.0.0",
39-
"@angular/core": ">= 9.0.0 < 10.0.0",
41+
"@angular/common": ">= 10.0.0 < 11.0.0",
42+
"@angular/core": ">= 10.0.0 < 11.0.0",
4043
"rxjs": ">= 6.0.0 < 7.0.0"
4144
},
4245
"devDependencies": {
43-
"@angular-builders/jest": "9.0.x",
44-
"@angular-devkit/build-angular": "0.901.x",
45-
"@angular-devkit/build-ng-packagr": "0.901.x",
46-
"@angular/cli": "9.1.x",
47-
"@angular/common": "9.1.x",
48-
"@angular/compiler-cli": "9.1.x",
49-
"@angular/compiler": "9.1.x",
50-
"@angular/core": "9.1.x",
51-
"@angular/platform-browser-dynamic": "9.1.x",
52-
"@angular/platform-browser": "9.1.x",
46+
"@angular-builders/jest": "10.0.x",
47+
"@angular-devkit/build-angular": "0.1002.x",
48+
"@angular-devkit/build-ng-packagr": "0.1002.x",
49+
"@angular/cli": "10.2.x",
50+
"@angular/common": "10.2.x",
51+
"@angular/compiler-cli": "10.2.x",
52+
"@angular/compiler": "10.2.x",
53+
"@angular/core": "10.2.x",
54+
"@angular/platform-browser-dynamic": "10.2.x",
55+
"@angular/platform-browser": "10.2.x",
5356
"@typescript-eslint/eslint-plugin": "4.17.x",
5457
"@typescript-eslint/parser": "4.17.x",
5558
"@types/jest": "26.0.x",
@@ -63,15 +66,14 @@
6366
"eslint-plugin-simple-import-sort": "7.0.x",
6467
"eslint": "7.21.x",
6568
"jest": "26.6.x",
66-
"ng-packagr": "9.0.x",
69+
"ng-packagr": "10.1.x",
6770
"node-sass": "4.14.x",
6871
"prettier": "2.2.x",
6972
"rimraf": "3.0.x",
7073
"rxjs": "6.6.x",
7174
"ts-node": "9.1.x",
72-
"tslib": "1.10.x",
73-
"typescript": "3.8.x",
74-
"web-animations-js": "^2.3.2",
75+
"typescript": "4.0.x",
76+
"web-animations-js": "2.3.x",
7577
"zone.js": "0.10.x"
7678
}
7779
}

projects/angular-notifier/src/lib/components/notifier-container.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ describe('Notifier Container Component', () => {
938938
componentFixture = TestBed.createComponent(NotifierContainerComponent);
939939
componentInstance = componentFixture.componentInstance;
940940

941-
queueService = TestBed.get(NotifierQueueService);
941+
queueService = TestBed.inject(NotifierQueueService);
942942
}
943943
});
944944

projects/angular-notifier/src/lib/notifier.module.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('Notifier Module', () => {
1212
TestBed.configureTestingModule({
1313
imports: [NotifierModule],
1414
});
15-
const service: NotifierService = TestBed.get(NotifierService);
15+
const service: NotifierService = TestBed.inject(NotifierService);
1616

1717
expect(service).toBeDefined();
1818
});
@@ -21,7 +21,7 @@ describe('Notifier Module', () => {
2121
TestBed.configureTestingModule({
2222
imports: [NotifierModule],
2323
});
24-
const service: NotifierService = TestBed.get(NotifierService);
24+
const service: NotifierService = TestBed.inject(NotifierService);
2525

2626
expect(service.getConfig()).toEqual(new NotifierConfig());
2727
});
@@ -92,7 +92,7 @@ describe('Notifier Module', () => {
9292
TestBed.configureTestingModule({
9393
imports: [NotifierModule.withConfig(testNotifierOptions)],
9494
});
95-
const service: NotifierService = TestBed.get(NotifierService);
95+
const service: NotifierService = TestBed.inject(NotifierService);
9696

9797
expect(service.getConfig()).toEqual(expectedNotifierConfig);
9898
});

tools/update-package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const rootPackageJson = JSON.parse(fs.readFileSync('./package.json').toString())
77
const distPackageJson = JSON.parse(fs.readFileSync('./dist/angular-notifier/package.json').toString());
88

99
// Update dist package.json file with some info from root package.json file
10-
const keys = ['description', 'version', 'license', 'repository', 'keywords', 'peerDependencies'];
10+
const keys = ['description', 'version', 'license', 'repository', 'keywords', 'peerDependencies', 'dependencies'];
1111
keys.forEach((key) => {
1212
distPackageJson[key] = rootPackageJson[key];
1313
});

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"declaration": false,
88
"downlevelIteration": true,
99
"experimentalDecorators": true,
10-
"module": "esnext",
10+
"module": "es2020",
1111
"moduleResolution": "node",
1212
"importHelpers": true,
1313
"target": "es2015",

0 commit comments

Comments
 (0)