Skip to content

Commit 8266d7a

Browse files
committed
feat!(dependencies): Upgrade to Angular 17
Merge pull request #539 from webcat12345/509-angular-17
2 parents 01f4f76 + b0589ee commit 8266d7a

File tree

5 files changed

+2703
-3109
lines changed

5 files changed

+2703
-3109
lines changed

angular.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@
5454
"serve": {
5555
"builder": "@angular-devkit/build-angular:dev-server",
5656
"options": {
57-
"browserTarget": "ngx-ui-switch:build"
57+
"buildTarget": "ngx-ui-switch:build"
5858
},
5959
"configurations": {
6060
"production": {
61-
"browserTarget": "ngx-ui-switch:build:production"
61+
"buildTarget": "ngx-ui-switch:build:production"
6262
}
6363
}
6464
},
6565
"extract-i18n": {
6666
"builder": "@angular-devkit/build-angular:extract-i18n",
6767
"options": {
68-
"browserTarget": "ngx-ui-switch:build"
68+
"buildTarget": "ngx-ui-switch:build"
6969
}
7070
},
7171
"test": {

package.json

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@
88
"license": "MIT",
99
"author": "webcat12345",
1010
"private": true,
11-
"keywords": [
12-
"angular 2",
13-
"angular 4",
14-
"angular 5",
15-
"angular 6",
16-
"angular 7",
17-
"ngx",
18-
"ng2",
19-
"uiswitch",
20-
"switch",
21-
"ui"
22-
],
2311
"scripts": {
2412
"ng": "ng",
2513
"start": "ng serve",
@@ -40,30 +28,30 @@
4028
"validate:renovate": "npx --yes --package renovate -- renovate-config-validator --strict"
4129
},
4230
"dependencies": {
43-
"@angular/animations": "^16.0.0",
44-
"@angular/common": "^16.0.0",
45-
"@angular/compiler": "^16.0.0",
46-
"@angular/core": "^16.0.0",
47-
"@angular/forms": "^16.0.0",
48-
"@angular/platform-browser": "^16.0.0",
49-
"@angular/platform-browser-dynamic": "^16.0.0",
50-
"@angular/router": "^16.0.0",
31+
"@angular/animations": "^17.0.0",
32+
"@angular/common": "^17.0.0",
33+
"@angular/compiler": "^17.0.0",
34+
"@angular/core": "^17.0.0",
35+
"@angular/forms": "^17.0.0",
36+
"@angular/platform-browser": "^17.0.0",
37+
"@angular/platform-browser-dynamic": "^17.0.0",
38+
"@angular/router": "^17.0.0",
5139
"bootstrap": "^4.3.1",
5240
"font-awesome": "^4.7.0",
5341
"rxjs": "^7.5.5",
5442
"tslib": "^2.3.0",
55-
"zone.js": "~0.13.1"
43+
"zone.js": "~0.14.3"
5644
},
5745
"devDependencies": {
58-
"@angular-devkit/build-angular": "^16.0.0",
59-
"@angular-eslint/builder": "^16.0.0",
60-
"@angular-eslint/eslint-plugin": "^16.0.0",
61-
"@angular-eslint/eslint-plugin-template": "^16.0.0",
62-
"@angular-eslint/schematics": "^16.0.0",
63-
"@angular-eslint/template-parser": "^16.0.0",
64-
"@angular/cli": "^16.0.0",
65-
"@angular/compiler-cli": "^16.0.0",
66-
"@angular/language-service": "^16.0.0",
46+
"@angular-devkit/build-angular": "^17.0.0",
47+
"@angular-eslint/builder": "^17.0.0",
48+
"@angular-eslint/eslint-plugin": "^17.0.0",
49+
"@angular-eslint/eslint-plugin-template": "^17.0.0",
50+
"@angular-eslint/schematics": "^17.0.0",
51+
"@angular-eslint/template-parser": "^17.0.0",
52+
"@angular/cli": "^17.0.0",
53+
"@angular/compiler-cli": "^17.0.0",
54+
"@angular/language-service": "^17.0.0",
6755
"@cypress/schematic": "2.5.2",
6856
"@types/jasmine": "^4.3.0",
6957
"@types/jasminewd2": "^2.0.10",
@@ -81,11 +69,11 @@
8169
"karma-coverage-istanbul-reporter": "~3.0.2",
8270
"karma-jasmine": "~4.0.0",
8371
"karma-jasmine-html-reporter": "^1.5.0",
84-
"ng-packagr": "^16.1.0",
72+
"ng-packagr": "^17.0.0",
8573
"sass": "^1.35.1",
8674
"ts-node": "^10.9.1",
8775
"tsickle": "^0.46.3",
8876
"typedoc": "^0.14.2",
89-
"typescript": "^4.9.5"
77+
"typescript": "~5.2.0"
9078
}
9179
}

src/polyfills.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* file.
99
*
1010
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11-
* automatically update themselves. This includes recent versions of Safari, Chrome (including
12-
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
11+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
1313
*
1414
* Learn more in https://angular.io/guide/browser-support
1515
*/
@@ -18,14 +18,24 @@
1818
* BROWSER POLYFILLS
1919
*/
2020

21+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
22+
// import 'classlist.js'; // Run `npm install --save classlist.js`.
23+
24+
/**
25+
* Web Animations `@angular/platform-browser/animations`
26+
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
27+
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
28+
*/
29+
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
30+
2131
/**
2232
* By default, zone.js will patch all possible macroTask and DomEvents
2333
* user can disable parts of macroTask/DomEvents patch by setting following flags
2434
* because those flags need to be set before `zone.js` being loaded, and webpack
2535
* will put import in the top of bundle, so user need to create a separate file
2636
* in this directory (for example: zone-flags.ts), and put the following flags
2737
* into that file, and then add the following code before importing zone.js.
28-
* import './zone-flags';
38+
* import './zone-flags.ts';
2939
*
3040
* The flags allowed in zone-flags.ts are listed here.
3141
*
@@ -45,8 +55,7 @@
4555
/***************************************************************************************************
4656
* Zone JS is required by default for Angular itself.
4757
*/
48-
import 'zone.js'; // Included with Angular CLI.
49-
58+
import 'zone.js'; // Included with Angular CLI.
5059

5160
/***************************************************************************************************
5261
* APPLICATION IMPORTS

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
"experimentalDecorators": true,
1212
"noUnusedLocals": true,
1313
"target": "ES2022",
14+
"module": "ES2022",
1415
"skipLibCheck": true,
1516
"strictNullChecks": true,
1617
"typeRoots": [
1718
"node_modules/@types"
1819
],
1920
"lib": [
20-
"es2016",
21+
"ES2022",
2122
"dom"
2223
],
2324
"useDefineForClassFields": false

0 commit comments

Comments
 (0)