ui-router / angular-hybrid

Upgrade an ng1 UI-Router app to a ng1+ng2 hybrid using ng-upgrade
MIT License
167 stars 75 forks source link

Update Dependencies to Angular v14 #571

Closed devlinjunker closed 1 year ago

devlinjunker commented 2 years ago

Steps:

Notes:

devlinjunker commented 2 years ago

@christopherthielen also created this to align with https://github.com/ui-router/angular/pull/967

devlinjunker commented 2 years ago

hmm... idk why the dependency resolution failed here...

devlinjunker commented 2 years ago

should we try to re-run this? it looks like it came from the yarn install command

Run yarn install --pure-lockfile
yarn install v1.22.19
[1/[4](https://github.com/ui-router/angular-hybrid/runs/7807634561?check_suite_focus=true#step:4:5)] Resolving packages...
[2/4] Fetching packages...
error https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz: Integrity check failed for "require-directory" (computed integrity doesn't match our records, got "sha[5](https://github.com/ui-router/angular-hybrid/runs/7807634561?check_suite_focus=true#step:4:6)12-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc[6](https://github.com/ui-router/angular-hybrid/runs/7807634561?check_suite_focus=true#step:4:7)/4RIKrui+Q== sha1-jGStX9MNqxyXbiNE/+f3kqam30I=")
devlinjunker commented 2 years ago

or should I update the yarn.lock file in my branch? I guess I haven't used yarn much

devlinjunker commented 1 year ago

Found these instructions for updating angular dependencies so working on the first steps in the other repos: https://github.com/ui-router/angular/blob/master/add_support_for_new_angular_version.txt

I am noticing that I am seeing the same error on my local machine when trying to run yarn, so I will look into the changes here and/or read up on yarn more maybe....

devlinjunker commented 1 year ago

I am closing this PR and will try to follow the instructions in https://github.com/ui-router/angular/blob/master/add_support_for_new_angular_version.txt to create a new branch and PR with the correct changes for updating angular versions

I think this involves:

  1. waiting for https://github.com/ui-router/angular/pull/967 to be merged
  2. waiting for npm release to be cut in https://github.com/ui-router/angular
  3. Following steps from doc above in https://github.com/ui-router/sample-app-angular-hybrid
    - in sample-app-angular-hybrid
    - npx ng update @angular/core @angular/cli
    - yarn upgrade-interactive --latest (update uirouter libs)
    - push to a branch 'angular-v14'
  4. following steps from doc above to create new branch/PR (in this repo):
    - in uirouter/angular-hybrid
    - target the sample-app branch in downstream_test.json: 
    - "https://github.com/ui-router/sample-app-angular-hybrid.git@update-to-angular-11"
    - update peer deps for angular packages, bumping each range by one
    - update angular packages manually to the lower range supported (for angular 11, set to ^10.0.0)
    - update ng-packagr manually to the lower range supported (for angular 11, set to ^10.0.0)
    - update typescript to the version required by @angular/compiler-cli
    - npx check-peer-dependencies
    - in example
    - npx ng update @angular/core @angular/cli
    - yarn upgrade-interactive --latest (update uirouter libs)
    - gh pr create
    - npm run release
    - revert downstream_projects.json and push
  5. Following steps from above doc to update https://github.com/ui-router/sample-app-angular-hybrid
    - in sample-app-angular-hybrid after merging
    - yarn upgrade-interactive --latest (update uirouter libs)
    - push and merge