Skip to content

Commit 185d1dd

Browse files
feat: upgrade angular from 11.2.5 to 12.0.0 (#880) (#884)
BREAKING CHANGE: requires angular >= v12 Co-authored-by: Athur Ming <guobin.ming@pwc.com>
1 parent 6f52fce commit 185d1dd

File tree

18 files changed

+26056
-9642
lines changed

18 files changed

+26056
-9642
lines changed

.browserslistrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
last 1 Chrome version
1212
last 1 Firefox version
1313
last 2 Edge major versions
14-
last 2 Safari major version
14+
last 2 Safari major versions
1515
last 2 iOS major versions
1616
Firefox ESR
17-
not IE 9-11 # For IE 9-11 support, remove 'not'.
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
version: 2.1
2+
orbs:
3+
browser-tools: circleci/browser-tools@1.1.0
24
jobs:
35
test:
46
docker:
5-
- image: circleci/node:14-browsers
7+
- image: cimg/node:current-browsers
68
environment:
79
CHROME_BIN: '/usr/bin/google-chrome'
810
steps:
11+
- browser-tools/install-chrome
912
- checkout
1013
- run:
1114
name: npm-install
@@ -19,12 +22,9 @@ jobs:
1922
- run:
2023
name: codecov
2124
command: bash <(curl -s https://codecov.io/bash)
22-
- run:
23-
name: ghpages
24-
command: npm run ghpages
2525
release:
2626
docker:
27-
- image: circleci/node:14
27+
- image: cimg/node:current
2828
steps:
2929
- checkout
3030
- run: npm ci

.eslintrc.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": [
4+
"projects/**/*"
5+
],
6+
"overrides": [
7+
{
8+
"files": [
9+
"*.ts"
10+
],
11+
"parserOptions": {
12+
"project": [
13+
"tsconfig.json",
14+
"e2e/tsconfig.json"
15+
],
16+
"createDefaultProgram": true
17+
},
18+
"extends": [
19+
"plugin:@angular-eslint/recommended",
20+
"plugin:@angular-eslint/template/process-inline-templates"
21+
],
22+
"rules": {
23+
"@angular-eslint/component-class-suffix": "off"
24+
}
25+
},
26+
{
27+
"files": [
28+
"*.html"
29+
],
30+
"extends": [
31+
"plugin:@angular-eslint/template/recommended"
32+
],
33+
"rules": {}
34+
}
35+
]
36+
}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
16

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ Latest version available for each version of Angular
4040
| 10.1.0 | 8.x 7.x 6.x |
4141
| 11.3.3 | 8.x |
4242
| 12.1.0 | 9.x |
43-
| current | >= 10.x |
43+
| 13.2.1 | 10.x 11.x |
44+
| current | >= 12.x |
4445

4546
## Install
4647

@@ -135,7 +136,7 @@ There are **individual options** and **global options**.
135136
Passed to `ToastrService.success/error/warning/info/show()`
136137

137138
| Option | Type | Default | Description |
138-
| ----------------- | ------------------------------ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
139+
| ----------------- | ------------------------------ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
139140
| toastComponent | Component | Toast | Angular component that will be used |
140141
| closeButton | boolean | false | Show close button |
141142
| timeOut | number | 5000 | Time to live in milliseconds |
@@ -214,7 +215,7 @@ export interface ActiveToast {
214215
/** Your Toast ID. Use this to close it individually */
215216
toastId: number;
216217
/** the title of your toast. Stored to prevent duplicates if includeTitleDuplicates set */
217-
title: string
218+
title: string;
218219
/** the message of your toast. Stored to prevent duplicates */
219220
message: string;
220221
/** a reference to the component see portal.ts */

angular.json

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,20 @@
2525
"main": "src/main.ts",
2626
"polyfills": "src/polyfills.ts",
2727
"tsConfig": "tsconfig.app.json",
28-
"aot": true,
2928
"assets": [
3029
"src/favicon.ico",
3130
"src/assets"
3231
],
3332
"styles": [
3433
"src/styles.scss"
3534
],
36-
"scripts": []
35+
"scripts": [],
36+
"vendorChunk": true,
37+
"extractLicenses": false,
38+
"buildOptimizer": false,
39+
"sourceMap": true,
40+
"optimization": false,
41+
"namedChunks": true
3742
},
3843
"configurations": {
3944
"production": {
@@ -43,7 +48,16 @@
4348
"with": "src/environments/environment.prod.ts"
4449
}
4550
],
46-
"optimization": true,
51+
"optimization": {
52+
"scripts": true,
53+
"fonts": {
54+
"inline": true
55+
},
56+
"styles": {
57+
"minify": true,
58+
"inlineCritical": false
59+
}
60+
},
4761
"outputHashing": "all",
4862
"sourceMap": false,
4963
"namedChunks": false,
@@ -100,19 +114,19 @@
100114
}
101115
},
102116
"lint": {
103-
"builder": "@angular-devkit/build-angular:tslint",
117+
"builder": "@angular-eslint/builder:lint",
104118
"options": {
105-
"tsConfig": [
106-
"tsconfig.app.json",
107-
"tsconfig.spec.json"
108-
],
109-
"exclude": [
110-
"**/node_modules/**"
119+
"lintFilePatterns": [
120+
"src/**/*.ts",
121+
"src/**/*.html"
111122
]
112123
}
113124
}
114125
}
115126
}
116127
},
117-
"defaultProject": "ngx-toastr"
128+
"defaultProject": "ngx-toastr",
129+
"cli": {
130+
"defaultCollection": "@angular-eslint/schematics"
131+
}
118132
}

0 commit comments

Comments
 (0)