Skip to content

Commit

Permalink
feat(*): Upgrade to Angular 10 (#202)
Browse files Browse the repository at this point in the history
- Updgrade to Angular 10
- Update docs

Closes #174.

BREAKING CHANGE: The upgrade to Angular 10 breaks compatibility with Angular 9.
  • Loading branch information
dominique-mueller authored Mar 11, 2021
1 parent b86e95a commit f8f50e1
Show file tree
Hide file tree
Showing 9 changed files with 1,303 additions and 1,869 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
- name: Build library
run: npm run build:library
- name: Publish to npm
run: npm publish ./dist/angular-notifier
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The following list describes the compatibility with Angular:
| `5.x` | `7.x` |
| `6.x` | `8.x` |
| `7.x` | `9.x` |
| `8.x` | `10.x` |

<br>

Expand Down
3,123 changes: 1,277 additions & 1,846 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 18 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,25 @@
"test:library": "ng test angular-notifier",
"test:library:upload-coverage": "codecov -f coverage/coverage-final.json"
},
"dependencies": {
"tslib": "2.0.x"
},
"peerDependencies": {
"@angular/common": ">= 9.0.0 < 10.0.0",
"@angular/core": ">= 9.0.0 < 10.0.0",
"@angular/common": ">= 10.0.0 < 11.0.0",
"@angular/core": ">= 10.0.0 < 11.0.0",
"rxjs": ">= 6.0.0 < 7.0.0"
},
"devDependencies": {
"@angular-builders/jest": "9.0.x",
"@angular-devkit/build-angular": "0.901.x",
"@angular-devkit/build-ng-packagr": "0.901.x",
"@angular/cli": "9.1.x",
"@angular/common": "9.1.x",
"@angular/compiler-cli": "9.1.x",
"@angular/compiler": "9.1.x",
"@angular/core": "9.1.x",
"@angular/platform-browser-dynamic": "9.1.x",
"@angular/platform-browser": "9.1.x",
"@angular-builders/jest": "10.0.x",
"@angular-devkit/build-angular": "0.1002.x",
"@angular-devkit/build-ng-packagr": "0.1002.x",
"@angular/cli": "10.2.x",
"@angular/common": "10.2.x",
"@angular/compiler-cli": "10.2.x",
"@angular/compiler": "10.2.x",
"@angular/core": "10.2.x",
"@angular/platform-browser-dynamic": "10.2.x",
"@angular/platform-browser": "10.2.x",
"@typescript-eslint/eslint-plugin": "4.17.x",
"@typescript-eslint/parser": "4.17.x",
"@types/jest": "26.0.x",
Expand All @@ -63,15 +66,14 @@
"eslint-plugin-simple-import-sort": "7.0.x",
"eslint": "7.21.x",
"jest": "26.6.x",
"ng-packagr": "9.0.x",
"ng-packagr": "10.1.x",
"node-sass": "4.14.x",
"prettier": "2.2.x",
"rimraf": "3.0.x",
"rxjs": "6.6.x",
"ts-node": "9.1.x",
"tslib": "1.10.x",
"typescript": "3.8.x",
"web-animations-js": "^2.3.2",
"typescript": "4.0.x",
"web-animations-js": "2.3.x",
"zone.js": "0.10.x"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ describe('Notifier Container Component', () => {
componentFixture = TestBed.createComponent(NotifierContainerComponent);
componentInstance = componentFixture.componentInstance;

queueService = TestBed.get(NotifierQueueService);
queueService = TestBed.inject(NotifierQueueService);
}
});

Expand Down
6 changes: 3 additions & 3 deletions projects/angular-notifier/src/lib/notifier.module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Notifier Module', () => {
TestBed.configureTestingModule({
imports: [NotifierModule],
});
const service: NotifierService = TestBed.get(NotifierService);
const service: NotifierService = TestBed.inject(NotifierService);

expect(service).toBeDefined();
});
Expand All @@ -21,7 +21,7 @@ describe('Notifier Module', () => {
TestBed.configureTestingModule({
imports: [NotifierModule],
});
const service: NotifierService = TestBed.get(NotifierService);
const service: NotifierService = TestBed.inject(NotifierService);

expect(service.getConfig()).toEqual(new NotifierConfig());
});
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('Notifier Module', () => {
TestBed.configureTestingModule({
imports: [NotifierModule.withConfig(testNotifierOptions)],
});
const service: NotifierService = TestBed.get(NotifierService);
const service: NotifierService = TestBed.inject(NotifierService);

expect(service.getConfig()).toEqual(expectedNotifierConfig);
});
Expand Down
2 changes: 1 addition & 1 deletion tools/update-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const rootPackageJson = JSON.parse(fs.readFileSync('./package.json').toString())
const distPackageJson = JSON.parse(fs.readFileSync('./dist/angular-notifier/package.json').toString());

// Update dist package.json file with some info from root package.json file
const keys = ['description', 'version', 'license', 'repository', 'keywords', 'peerDependencies'];
const keys = ['description', 'version', 'license', 'repository', 'keywords', 'peerDependencies', 'dependencies'];
keys.forEach((key) => {
distPackageJson[key] = rootPackageJson[key];
});
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"module": "es2020",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
Expand Down

0 comments on commit f8f50e1

Please sign in to comment.