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

Update Dependencies to Angular v14 #967

Merged
merged 10 commits into from Sep 15, 2022
Merged

Conversation

devlinjunker
Copy link

@devlinjunker devlinjunker commented Jul 20, 2022

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

- updated @angular libs
- updated ng-packagr and created ng-package.json for packaging
- updated jest and jest-preset-angular so tests pass
@devlinjunker
Copy link
Author

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

@alaahl1
Copy link

alaahl1 commented Aug 7, 2022

Any ETA on this?

@YanerTavuz
Copy link

Got any updates on this? @christopherthielen @oBusk

@wawyed
Copy link
Member

wawyed commented Aug 12, 2022

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

@wawyed
Copy link
Member

wawyed commented Aug 12, 2022

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

@devlinjunker
Copy link
Author

devlinjunker commented Aug 12, 2022

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
Copy link
Author

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 ajv-formats@2.1.1 (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 ajv-keywords@5.1.0 (8.11.0 is installed)

@dereekb
Copy link

dereekb commented Aug 13, 2022

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?

package.json Outdated Show resolved Hide resolved
@devlinjunker
Copy link
Author

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

@devlinjunker
Copy link
Author

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
Copy link
Author

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

@dereekb
Copy link

dereekb commented Aug 23, 2022

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.

@devlinjunker
Copy link
Author

@wawyed think you can help out?

@devlinjunker
Copy link
Author

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

@devlinjunker
Copy link
Author

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

ui-router/sample-app-angular#771

After the PR is merged, I think the test:downstream job should not fail

@wawyed
Copy link
Member

wawyed commented Sep 13, 2022

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 ajv-formats@2.1.1 (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 ajv-keywords@5.1.0 (8.11.0 is installed)

For this issue. I noticed something was done to be fixed here ui-router/sample-app-angular@3aad92b Maybe try this same approach?

@wawyed
Copy link
Member

wawyed commented Sep 14, 2022

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

@devlinjunker
Copy link
Author

created #968 to update mergify config

package.json Outdated Show resolved Hide resolved
@devlinjunker
Copy link
Author

devlinjunker commented Sep 15, 2022

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

@wawyed wawyed merged commit b6c3428 into ui-router:master Sep 15, 2022
@wawyed
Copy link
Member

wawyed commented Sep 15, 2022

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...

@devlinjunker
Copy link
Author

devlinjunker commented Sep 16, 2022

@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
Copy link
Author

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

@wawyed
Copy link
Member

wawyed commented Sep 19, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants