Skip to content

Commit

Permalink
feat: upgrade angular from 11.2.5 to 12.0.0 (#880) (#884)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: requires angular >= v12
Co-authored-by: Athur Ming <[email protected]>
  • Loading branch information
scttcper authored May 18, 2021
1 parent 6f52fce commit 185d1dd
Show file tree
Hide file tree
Showing 18 changed files with 26,056 additions and 9,642 deletions.
4 changes: 2 additions & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 9-11 # For IE 9-11 support, remove 'not'.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
version: 2.1
orbs:
browser-tools: circleci/[email protected]
jobs:
test:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:current-browsers
environment:
CHROME_BIN: '/usr/bin/google-chrome'
steps:
- browser-tools/install-chrome
- checkout
- run:
name: npm-install
Expand All @@ -19,12 +22,9 @@ jobs:
- run:
name: codecov
command: bash <(curl -s https://codecov.io/bash)
- run:
name: ghpages
command: npm run ghpages
release:
docker:
- image: circleci/node:14
- image: cimg/node:current
steps:
- checkout
- run: npm ci
Expand Down
36 changes: 36 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-class-suffix": "off"
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Latest version available for each version of Angular
| 10.1.0 | 8.x 7.x 6.x |
| 11.3.3 | 8.x |
| 12.1.0 | 9.x |
| current | >= 10.x |
| 13.2.1 | 10.x 11.x |
| current | >= 12.x |

## Install

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

| Option | Type | Default | Description |
| ----------------- | ------------------------------ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| ----------------- | ------------------------------ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| toastComponent | Component | Toast | Angular component that will be used |
| closeButton | boolean | false | Show close button |
| timeOut | number | 5000 | Time to live in milliseconds |
Expand Down Expand Up @@ -214,7 +215,7 @@ export interface ActiveToast {
/** Your Toast ID. Use this to close it individually */
toastId: number;
/** the title of your toast. Stored to prevent duplicates if includeTitleDuplicates set */
title: string
title: string;
/** the message of your toast. Stored to prevent duplicates */
message: string;
/** a reference to the component see portal.ts */
Expand Down
36 changes: 25 additions & 11 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -43,7 +48,16 @@
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"optimization": {
"scripts": true,
"fonts": {
"inline": true
},
"styles": {
"minify": true,
"inlineCritical": false
}
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
Expand Down Expand Up @@ -100,19 +114,19 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
},
"defaultProject": "ngx-toastr"
"defaultProject": "ngx-toastr",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
}
}
Loading

0 comments on commit 185d1dd

Please sign in to comment.