angular icon indicating copy to clipboard operation
angular copied to clipboard

Update Dependencies to Angular v14

Open devlinjunker opened this issue 1 year ago • 2 comments

Steps:

  • updated @angular libs
  • updated ng-packagr and created ng-package.json for packaging
  • updated jest and jest-preset-angular so tests pass

Tests Passing: Screen Shot 2022-07-20 at 2 56 32 PM

Build: Screen Shot 2022-07-20 at 2 57 14 PM

Notes

Should increment version to 10.0.0 after this and create a new release for NPM

devlinjunker avatar Jul 20 '22 21:07 devlinjunker

@christopherthielen @oBusk any qualms with merging this and creating v10.0.0 release?

devlinjunker avatar Jul 20 '22 21:07 devlinjunker

Any ETA on this?

alaahl1 avatar Aug 07 '22 07:08 alaahl1

Got any updates on this? @christopherthielen @oBusk

YanerTavuz avatar Aug 12 '22 11:08 YanerTavuz

What is the reason for the creation of the ng-package.json?

wawyed avatar Aug 12 '22 13:08 wawyed

Also looks like the test are failing. Can you fix the missing dependency?

wawyed avatar Aug 12 '22 14:08 wawyed

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!

devlinjunker avatar Aug 12 '22 15:08 devlinjunker

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)

devlinjunker avatar Aug 12 '22 17:08 devlinjunker

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

Screen Shot 2022-08-13 at 2 24 57 AM

Which does pass. Can you modify the test to include that?

dereekb avatar Aug 13 '22 07:08 dereekb

I updated the check-peer-dependencies command and it looks like it is passing locally now

devlinjunker avatar Aug 18 '22 22:08 devlinjunker

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

devlinjunker avatar Aug 19 '22 17:08 devlinjunker

can we approve the workflow again to see if it is fixed @dereekb @wawyed @christopherthielen ?

devlinjunker avatar Aug 22 '22 22:08 devlinjunker

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.

dereekb avatar Aug 23 '22 00:08 dereekb

@wawyed think you can help out?

devlinjunker avatar Aug 26 '22 16:08 devlinjunker

@wawyed added angular v14 test project, hoping that should solve the ci errors now

devlinjunker avatar Sep 07 '22 20:09 devlinjunker

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

devlinjunker avatar Sep 12 '22 20:09 devlinjunker

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?

wawyed avatar Sep 13 '22 09:09 wawyed

I guess we need to fix the mergify config in this project too

wawyed avatar Sep 14 '22 10:09 wawyed

created https://github.com/ui-router/angular/pull/968 to update mergify config

devlinjunker avatar Sep 14 '22 19:09 devlinjunker

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

devlinjunker avatar Sep 15 '22 18:09 devlinjunker

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 avatar Sep 15 '22 20:09 wawyed

@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

devlinjunker avatar Sep 16 '22 17:09 devlinjunker

@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)

devlinjunker avatar Sep 19 '22 18:09 devlinjunker

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

wawyed avatar Sep 19 '22 18:09 wawyed