You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/12/02 17:23:20 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new pull request #6391: TPv2 Update Angular and make compilation stricter

ocket8888 opened a new pull request #6391:
URL: https://github.com/apache/trafficcontrol/pull/6391


   This PR updates Angular to version 13 (13.0.3 at the time of this writing) for TPv2, and adds some options to get type-checking in templates, as well as adding some more strict type checking generically. Mostly changes that needed to made to make it compile came from the strict template typing. And the fact that it was using a "user" as the same thing as a "current user", which unfortunately cannot be safely done (see #6299).
   
   This also fixes some broken tests from the module restructure done in #6263, and squashes an error about Chart JS being bulky and causing optimization problems. That's all true, but we know about it, so there's no reason to see a warning on every compilation.
   
   Also, the new version of Angular allows the use of ES2020 in source, and because IE is dead and Edge is now Chromium-based, our output has moved up to ES2017, which is nice.
   
   <hr/>
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Portal (experimental v2)
   
   ## What is the best way to verify this PR?
   Make sure the unit and end-to-end tests pass. Also probably play around with the UI a bit, because our end-to-end tests only cover the login page.
   
   ## If this is a bugfix, which Traffic Control versions contained the bug?
   - master, but who cares, it's experimental
   
   ## PR submission checklist
   - [x] This PR has tests
   - [ ] This PR has documentation
   - [ ] This PR has a CHANGELOG.md entry
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY**


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] shamrickus merged pull request #6391: TPv2 Update Angular and make compilation stricter

Posted by GitBox <gi...@apache.org>.
shamrickus merged pull request #6391:
URL: https://github.com/apache/trafficcontrol/pull/6391


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #6391: TPv2 Update Angular and make compilation stricter

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #6391:
URL: https://github.com/apache/trafficcontrol/pull/6391#discussion_r761463255



##########
File path: experimental/traffic-portal/package.json
##########
@@ -22,60 +22,59 @@
     "e2e": "ng e2e",
     "dev:ssr": "ng run traffic-portal:serve-ssr",
     "serve:ssr": "node dist/traffic-portal/server/main.js",
-    "build:ssr": "ng build --prod && ng run traffic-portal:server:production",
+    "build:ssr": "ng build --configuration production && ng run traffic-portal:server:production",
     "prerender": "ng run traffic-portal:prerender"
   },
   "private": true,
   "dependencies": {
-    "@angular/animations": "~11.2.12",
-    "@angular/cdk": "^11.2.11",
-    "@angular/common": "~11.2.12",
-    "@angular/compiler": "~11.2.12",
-    "@angular/core": "~11.2.12",
-    "@angular/forms": "~11.2.12",
-    "@angular/material": "^11.2.11",
-    "@angular/platform-browser": "~11.2.12",
-    "@angular/platform-browser-dynamic": "~11.2.12",
-    "@angular/platform-server": "~11.2.12",
-    "@angular/router": "~11.2.12",
-    "@fortawesome/angular-fontawesome": "^0.8.2",
+    "@angular/animations": "~13.0.2",
+    "@angular/cdk": "^13.0.2",
+    "@angular/common": "~13.0.2",
+    "@angular/compiler": "~13.0.2",
+    "@angular/core": "~13.0.2",
+    "@angular/forms": "~13.0.2",
+    "@angular/material": "^13.0.2",
+    "@angular/platform-browser": "~13.0.2",
+    "@angular/platform-browser-dynamic": "~13.0.2",
+    "@angular/platform-server": "^13.0.2",
+    "@angular/router": "~13.0.2",
+    "@fortawesome/angular-fontawesome": "^0.10.0",
     "@fortawesome/fontawesome-svg-core": "^1.2.32",
     "@fortawesome/free-regular-svg-icons": "^5.15.2",
     "@fortawesome/free-solid-svg-icons": "^5.15.1",
-    "@nguniversal/express-engine": "^11.2.1",
-    "ag-grid-angular": "^25.2.0",
-    "ag-grid-community": "^25.2.0",
+    "@nguniversal/express-engine": "^13.0.1",
+    "ag-grid-angular": "^26.2.0",
+    "ag-grid-community": "^26.2.0",
     "argparse": "^2.0.1",
     "chart.js": "^2.9.4",
     "express": "^4.15.2",
     "rxjs": "~6.6.0",
     "tslib": "^2.0.0",
-    "zone.js": "~0.10.2"
+    "zone.js": "~0.11.4"
   },
   "devDependencies": {
-    "@angular-devkit/build-angular": "~0.1102.11",
-    "@angular-eslint/builder": "^4.0.0",
-    "@angular-eslint/eslint-plugin": "^4.0.0",
-    "@angular-eslint/eslint-plugin-template": "^4.0.0",
-    "@angular-eslint/schematics": "4.2.0",
-    "@angular-eslint/template-parser": "^4.0.0",
-    "@angular/cli": "~11.2.11",
-    "@angular/compiler-cli": "~11.2.12",
-    "@nguniversal/builders": "^11.2.1",
+    "@angular-devkit/build-angular": "~13.0.3",
+    "@angular-eslint/builder": "13.0.1",
+    "@angular-eslint/eslint-plugin": "13.0.1",
+    "@angular-eslint/eslint-plugin-template": "13.0.1",
+    "@angular-eslint/schematics": "13.0.1",
+    "@angular-eslint/template-parser": "13.0.1",
+    "@angular/cli": "~13.0.3",
+    "@angular/compiler-cli": "~13.0.2",
     "@types/argparse": "^2.0.2",
-    "@types/chart.js": "^2.9.32",
+    "@types/chart.js": "^2.9.34",
     "@types/express": "^4.17.0",
     "@types/jasmine": "~3.6.0",
     "@types/jasminewd2": "~2.0.3",
     "@types/node": "^12.11.1",

Review comment:
       yeah, it seems like it should.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] shamrickus commented on a change in pull request #6391: TPv2 Update Angular and make compilation stricter

Posted by GitBox <gi...@apache.org>.
shamrickus commented on a change in pull request #6391:
URL: https://github.com/apache/trafficcontrol/pull/6391#discussion_r761327416



##########
File path: experimental/traffic-portal/package.json
##########
@@ -22,60 +22,59 @@
     "e2e": "ng e2e",
     "dev:ssr": "ng run traffic-portal:serve-ssr",
     "serve:ssr": "node dist/traffic-portal/server/main.js",
-    "build:ssr": "ng build --prod && ng run traffic-portal:server:production",
+    "build:ssr": "ng build --configuration production && ng run traffic-portal:server:production",
     "prerender": "ng run traffic-portal:prerender"
   },
   "private": true,
   "dependencies": {
-    "@angular/animations": "~11.2.12",
-    "@angular/cdk": "^11.2.11",
-    "@angular/common": "~11.2.12",
-    "@angular/compiler": "~11.2.12",
-    "@angular/core": "~11.2.12",
-    "@angular/forms": "~11.2.12",
-    "@angular/material": "^11.2.11",
-    "@angular/platform-browser": "~11.2.12",
-    "@angular/platform-browser-dynamic": "~11.2.12",
-    "@angular/platform-server": "~11.2.12",
-    "@angular/router": "~11.2.12",
-    "@fortawesome/angular-fontawesome": "^0.8.2",
+    "@angular/animations": "~13.0.2",
+    "@angular/cdk": "^13.0.2",
+    "@angular/common": "~13.0.2",
+    "@angular/compiler": "~13.0.2",
+    "@angular/core": "~13.0.2",
+    "@angular/forms": "~13.0.2",
+    "@angular/material": "^13.0.2",
+    "@angular/platform-browser": "~13.0.2",
+    "@angular/platform-browser-dynamic": "~13.0.2",
+    "@angular/platform-server": "^13.0.2",
+    "@angular/router": "~13.0.2",
+    "@fortawesome/angular-fontawesome": "^0.10.0",
     "@fortawesome/fontawesome-svg-core": "^1.2.32",
     "@fortawesome/free-regular-svg-icons": "^5.15.2",
     "@fortawesome/free-solid-svg-icons": "^5.15.1",
-    "@nguniversal/express-engine": "^11.2.1",
-    "ag-grid-angular": "^25.2.0",
-    "ag-grid-community": "^25.2.0",
+    "@nguniversal/express-engine": "^13.0.1",
+    "ag-grid-angular": "^26.2.0",
+    "ag-grid-community": "^26.2.0",
     "argparse": "^2.0.1",
     "chart.js": "^2.9.4",
     "express": "^4.15.2",
     "rxjs": "~6.6.0",
     "tslib": "^2.0.0",
-    "zone.js": "~0.10.2"
+    "zone.js": "~0.11.4"
   },
   "devDependencies": {
-    "@angular-devkit/build-angular": "~0.1102.11",
-    "@angular-eslint/builder": "^4.0.0",
-    "@angular-eslint/eslint-plugin": "^4.0.0",
-    "@angular-eslint/eslint-plugin-template": "^4.0.0",
-    "@angular-eslint/schematics": "4.2.0",
-    "@angular-eslint/template-parser": "^4.0.0",
-    "@angular/cli": "~11.2.11",
-    "@angular/compiler-cli": "~11.2.12",
-    "@nguniversal/builders": "^11.2.1",
+    "@angular-devkit/build-angular": "~13.0.3",
+    "@angular-eslint/builder": "13.0.1",
+    "@angular-eslint/eslint-plugin": "13.0.1",
+    "@angular-eslint/eslint-plugin-template": "13.0.1",
+    "@angular-eslint/schematics": "13.0.1",
+    "@angular-eslint/template-parser": "13.0.1",
+    "@angular/cli": "~13.0.3",
+    "@angular/compiler-cli": "~13.0.2",
     "@types/argparse": "^2.0.2",
-    "@types/chart.js": "^2.9.32",
+    "@types/chart.js": "^2.9.34",
     "@types/express": "^4.17.0",
     "@types/jasmine": "~3.6.0",
     "@types/jasminewd2": "~2.0.3",
     "@types/node": "^12.11.1",

Review comment:
       Should be upgrade to 14?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on pull request #6391: TPv2 Update Angular and make compilation stricter

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on pull request #6391:
URL: https://github.com/apache/trafficcontrol/pull/6391#issuecomment-984843907


   I know this PR looks big, but 49.k lines of changes are coming from just package-lock.json.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org