angular
angular copied to clipboard
Update Dependencies to Angular v14
Steps:
- updated
@angular
libs - updated
ng-packagr
and createdng-package.json
for packaging - updated
jest
andjest-preset-angular
so tests pass
Tests Passing:
Build:
Notes
Should increment version to 10.0.0 after this and create a new release for NPM
@christopherthielen @oBusk any qualms with merging this and creating v10.0.0 release?
Any ETA on this?
Got any updates on this? @christopherthielen @oBusk
What is the reason for the creation of the ng-package.json?
Also looks like the test are failing. Can you fix the missing dependency?
What is the reason for the creation of the ng-package.json?
https://github.com/ng-packagr/ng-packagr now requires a separate ng-package.json file rather than including the details in the package.json (you can compare the current README to ng-packagr@v13
Also added dependency for @angular-devkit/build-angular
, let see if it is building now
Thanks for your help @wawyed!
hmm.. not sure what to do with the current error in the CI:
npx check-peer-dependencies
shell: /usr/bin/bash -e {0}
✅ ajv ^8.0.0 is required by [email protected] (8.11.0 is installed)
❌ ajv ^6.9.1 is required by ajv-keywords@[3](https://github.com/ui-router/angular/runs/7809448440?check_suite_focus=true#step:5:3).[5](https://github.com/ui-router/angular/runs/7809448440?check_suite_focus=true#step:5:6).2) (8.11.0 is installed)
✅ ajv ^8.8.2 is required by [email protected] (8.11.0 is installed)
Looks like there are conflicting peer dependencies. Before you made that last change it was ok, but with the addition of dev kit it added some to yarn-lock:
"schema-utils@^2.6.5":
"integrity" "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg=="
"resolved" "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz"
"version" "2.7.1"
dependencies:
"@types/json-schema" "^7.0.5"
"ajv" "^6.12.4"
"ajv-keywords" "^3.5.2"
"schema-utils@^3.1.0":
"integrity" "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw=="
"resolved" "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz"
"version" "3.1.1"
dependencies:
"@types/json-schema" "^7.0.8"
"ajv" "^6.12.5"
"ajv-keywords" "^3.5.2"
"schema-utils@^3.1.1":
"integrity" "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw=="
"resolved" "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz"
"version" "3.1.1"
dependencies:
"@types/json-schema" "^7.0.8"
"ajv" "^6.12.5"
"ajv-keywords" "^3.5.2"
"schema-utils@^4.0.0":
"integrity" "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg=="
"resolved" "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz"
"version" "4.0.0"
dependencies:
"@types/json-schema" "^7.0.9"
"ajv" "^8.8.0"
"ajv-formats" "^2.1.1"
"ajv-keywords" "^5.0.0"
There's nothing wrong with the peer dependencies though. Yarn doesn't report anything either. I'm not so sure that test is set up correctly. Looking at that package, I'd figure it should be set up as:
npx check-peer-dependencies --runOnlyOnRootDependencies
Which does pass. Can you modify the test to include that?
I updated the check-peer-dependencies
command and it looks like it is passing locally now
oh.. I didn't realize the ci.yml file had it's own definition of the npx check-peer-dependencies
, I updated that in my branch to include --runOnlyOnRootDependencies
But I guess I'm not sure if that or the master branch version of the workflow will be used
can we approve the workflow again to see if it is fixed @dereekb @wawyed @christopherthielen ?
I'm not a maintainer, but it looks good to me, fwiw. I have been using your branch on my Angular 14 projects already and haven't run into any issues.
@wawyed think you can help out?
@wawyed added angular v14 test project, hoping that should solve the ci errors now
Found these instructions for updating Angular versions: https://github.com/ui-router/angular/blob/master/add_support_for_new_angular_version.txt
Pushed a commit to this PR after following these steps:
- update tests in test-angular-versions/
- ./scaffold.sh 11
- remove old tests fro test-angular-versions and ../downstream_projects.json
- update tests in test-typescript-versions/
- ./scaffold.sh 4.5
- (maybe) remove old tests fro test-typescript-versions and ../downstream_projects.json
Also created a PR in sample-app-angular as per the following instructions:
- npx ng update @angular/core @angular/cli
- git commit -m "chore: update to Angular 11"
- yarn && yarn test
- gh pr create
https://github.com/ui-router/sample-app-angular/pull/771
After the PR is merged, I think the test:downstream
job should not fail
hmm.. not sure what to do with the current error in the CI:
npx check-peer-dependencies shell: /usr/bin/bash -e {0} ✅ ajv ^8.0.0 is required by [email protected] (8.11.0 is installed) ❌ ajv ^6.9.1 is required by ajv-keywords@[3](https://github.com/ui-router/angular/runs/7809448440?check_suite_focus=true#step:5:3).[5](https://github.com/ui-router/angular/runs/7809448440?check_suite_focus=true#step:5:6).2) (8.11.0 is installed) ✅ ajv ^8.8.2 is required by [email protected] (8.11.0 is installed)
For this issue. I noticed something was done to be fixed here https://github.com/ui-router/sample-app-angular/commit/3aad92bb4eeef00caf22a25bf3f04ab3b0c5bba3 Maybe try this same approach?
I guess we need to fix the mergify config in this project too
created https://github.com/ui-router/angular/pull/968 to update mergify config
Looks like all CI is passing and I have updated to use the check-peer-dependencies.ignore
property in package.json.
After this is merged, we will need to create a new release (v10.0.0 I would think), as per the instructions here:
https://github.com/ui-router/angular/blob/master/add_support_for_new_angular_version.txt#L19
(npm run release
)
not sure if I can do this though... @wawyed
Once the release is made, I will begin to work on these steps to get https://github.com/ui-router/angular-hybrid updated to angular v14
Looks like all CI is passing and I have updated to use the
check-peer-dependencies.ignore
property in package.json.After this is merged, we will need to create a new release (v10.0.0 I would think), as per the instructions here: https://github.com/ui-router/angular/blob/master/add_support_for_new_angular_version.txt#L19 (
npm run release
)not sure if I can do this though... @wawyed
Once the release is made, I will begin to work on these steps to get https://github.com/ui-router/angular-hybrid updated to angular v14
I'll look into it. I just realised I should have squashed the commits...
@wawyed do you think you can force push to revert these changes and then I can create a PR again that we can squash?
Or is it alright that you didn't squash and we can move forward with the release of v10.0.0 now?
I am blocked on updating https://github.com/ui-router/angular-hybrid until the v10.0.0 ui-router/angular release is created
@wawyed can you also create release artifacts for this repo and https://github.com/ui-router/angular-hybrid
and have you run npm publish
in the repo with the newest version? (I think these steps should update the npm registry: https://docs.npmjs.com/updating-your-published-package-version-number)
What do you mean both libraries should be at the latest version?
https://www.npmjs.com/package/@uirouter/angular-hybrid version 14 https://www.npmjs.com/package/@uirouter/angular version 10