Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(angular): update angular to version 12 #20042

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions npm/angular/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"plugins": [
"cypress",
"@cypress/dev",
"@angular-eslint/eslint-plugin"
"@cypress/dev"
],
"extends": [
"plugin:@cypress/dev/general",
Expand Down
11 changes: 9 additions & 2 deletions npm/angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
"src/styles.css"
],
"scripts": [],
"preserveSymlinks": true
"preserveSymlinks": true,
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down Expand Up @@ -60,7 +66,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "ngx-build-plus:dev-server",
Expand Down
41 changes: 18 additions & 23 deletions npm/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
"debug": "^4.3.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.1102.12",
"@angular-devkit/build-angular": "12.2.16",
"@angular-eslint/eslint-plugin": "4.2.0",
"@angular/animations": "11.2.13",
"@angular/cdk": "11.2.12",
"@angular/cli": "11.2.12",
"@angular/common": "11.2.13",
"@angular/compiler": "11.2.13",
"@angular/compiler-cli": "11.2.13",
"@angular/core": "11.2.13",
"@angular/forms": "11.2.13",
"@angular/language-service": "11.2.13",
"@angular/localize": "11.2.13",
"@angular/material": "11.2.12",
"@angular/platform-browser": "11.2.13",
"@angular/platform-browser-dynamic": "11.2.13",
"@angular/router": "11.2.13",
"@angular/animations": "12.2.16",
"@angular/cdk": "12.2.13",
"@angular/cli": "12.2.16",
"@angular/common": "12.2.16",
"@angular/compiler": "12.2.16",
"@angular/compiler-cli": "12.2.16",
"@angular/core": "12.2.16",
"@angular/forms": "12.2.16",
"@angular/language-service": "12.2.16",
"@angular/localize": "12.2.16",
"@angular/material": "12.2.13",
"@angular/platform-browser": "12.2.16",
"@angular/platform-browser-dynamic": "12.2.16",
"@angular/router": "12.2.16",
"@cypress/code-coverage": "3.9.5",
"@cypress/webpack-dev-server": "0.0.0-development",
"@cypress/webpack-preprocessor": "5.7.0",
Expand All @@ -61,17 +61,12 @@
"ts-loader": "8.1.0",
"ts-node": "9.1.1",
"tslib": "^2.2.0",
"tslint": "5.20.1",
"tslint": "6.1.3",
"typescript": "4.2.4",
"webpack-dev-server": "4.0.0",
"zone.js": "0.11.4"
"zone.js": "~0.11.4"
},
"peerDependencies": {
"@angular/common": "*",
"@angular/compiler": "*",
"@angular/core": "*",
"@angular/platform-browser": "*",
"@angular/platform-browser-dynamic": "*",
"core-js": "*",
"zone.js": "*"
},
Expand All @@ -93,4 +88,4 @@
"social": "@LeJeanbono"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core'
import '@angular/material/prebuilt-themes/indigo-pink.css'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import does not work this way in Angular. And was throwing a linting error


@Component({
selector: 'app-material-button',
Expand Down
2 changes: 1 addition & 1 deletion npm/angular/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion npm/angular/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone' // Included with Angular CLI.
import 'zone.js' // Included with Angular CLI.

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
2 changes: 1 addition & 1 deletion npm/angular/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone-testing'
import 'zone.js/testing'
import { getTestBed } from '@angular/core/testing'
import {
BrowserDynamicTestingModule,
Expand Down
4 changes: 2 additions & 2 deletions npm/angular/support.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'zone.js/dist/zone'
import 'zone.js'

// @ts-ignore
global.Mocha['__zone_patch__'] = false
import 'zone.js/dist/zone-testing'
import 'zone.js/testing'
import 'zone.js/dist/async-test'
import 'zone.js/dist/fake-async-test'
import 'zone.js/dist/long-stack-trace-zone'
Expand Down
9 changes: 3 additions & 6 deletions npm/angular/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
},
"files": [
"src/main.ts",
"src/polyfills.ts",
"node_modules/cypress/types/cypress-global-vars.d.ts"
],
"include": [
"src/**/*.ts"
"src/polyfills.ts"
],
"exclude": [
"src/test.ts",
"src/**/*.spec.ts"
"src/**/*.spec.ts",
"src/**/*-spec.ts"
]
}