Skip to content

chore: Support for Angular v21#612

Open
aaron-brown wants to merge 5 commits intoui-router:masterfrom
aaron-brown:chore--angular-21--support
Open

chore: Support for Angular v21#612
aaron-brown wants to merge 5 commits intoui-router:masterfrom
aaron-brown:chore--angular-21--support

Conversation

@aaron-brown
Copy link

Fixes #611

@aaron-brown
Copy link
Author

Updates to example app: ui-router/sample-app-angular-hybrid#932

@aaron-brown
Copy link
Author

Hello @wawyed. I've added support for Angular 21 for this dep. I reviewed the activities from previous version support PRs, and I believe I've made the required changes, including updating the sample app.

Please review when you get a chance. Let me know if there is anything I've missed. Thank you!

Copy link
Author

@aaron-brown aaron-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saw I missed the version bump.

Version bump to 21.0.0
@aaron-brown
Copy link
Author

Hello @wawyed, would like to get this on your radar to look at. We'd like to get to Angular 21 and this is the only dep that needs updated. I'll also be interested to work on support for Angular 22 in the future. Thank you!

@wawyed
Copy link
Member

wawyed commented Mar 15, 2026

Can you check why the failures? @aaron-brown

@aaron-brown
Copy link
Author

@wawyed

CI / yarn test appears to be failing because it's trying to pull or install Angular 17. When I ran it locally it appeared to work but I'm not surprised so I'll try to look into it.

CI / Test downstream all projects is failing because if it's inability to resolve the peer deps, which I wasn't getting because Yarn wasn't really preventing the app from failing to resolve dependencies. I updated this project since in past PRs you mentioned updating it, but admittedly I'm uncertain how it's supposed to get this PR version of the library for its testing. I'll try looking through the past PRs to see how that chicken-and-egg scenario is supposed to work. I was not able to get these tests to work locally.

@aaron-brown
Copy link
Author

aaron-brown commented Mar 15, 2026

@wawyed So, I'm attempting to figure out the downstream tests, however I'm not able to get as far as the CI Pipeline because it's attempting to write to /tmp and I don't want to run this as sudo. Is there a configuration in the downstream_projects.json file that I can add to tell it "put the cache here instead of /tmp?"

Still trying to determine the issue running this test locally, looks like it's creating the temp directory, but then it can't move the .downstream_cache into it.

-> yarn test:downstream --group-all

...

           ===> Moving working directory to temp dir /tmp/tmp-19274-QrHyqVsh55aM <===
mv: omitting directory '/home/.../ui-router/angular-hybrid/.downstream_cache'
mv: path is a directory
           ===> Running the following downstream tests <===
           ===> example                                <===
           ===> sample-app-angular-hybrid              <===
Error: ENOENT: no such file or directory, chdir '/home/.../ui-router/angular-hybrid' -> '/tmp/tmp-19274-QrHyqVsh55aM/.downstream_cache'
    at process.wrappedChdir [as chdir] (node:internal/bootstrap/switches/does_own_process_state:130:14)
    at runDownstreamTests (/home/.../ui-router/angular-hybrid/node_modules/@uirouter/publish-scripts/test_downstream_projects.js:250:11)
    at /home/.../ui-router/angular-hybrid/node_modules/@uirouter/publish-scripts/test_downstream_projects.js:339:3
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/home/.../ui-router/angular-hybrid/node_modules/@uirouter/publish-scripts/test_downstream_projects.js:338:28)
    at Module._compile (node:internal/modules/cjs/loader:1521:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1623:10)
    at Module.load (node:internal/modules/cjs/loader:1266:32)
    at Module._load (node:internal/modules/cjs/loader:1091:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:164:12)
mv: no such file or directory: /tmp/tmp-19274-QrHyqVsh55aM/.downstream_cache
           ===> Successfully ran downstream tests for:  <===
           ===> Did not try to run downstream tests for: example, sample-app-angular-hybrid <===
error Command failed with exit code 1.

@aaron-brown
Copy link
Author

aaron-brown commented Mar 15, 2026

@wawyed While I wasn't able to so far get the test working in my local machine (I think there is a bug o rissue preventing that from happening in publishing-scripts) I was able to determine that the downstream tests are failing because the example app embedded in this Repo is using "latest" for @ui-router/angular.

I tried to look at other PRs to see how the test is made to pass, but between #603 and #604 I don't see anything specific, and the test artifacts have since expired so I can't view the test logs. Can you advise on how the future-version dep is supposed to be resolved for this case?

@aaron-brown
Copy link
Author

@wawyed As an aside, I figured out the issue with running the test_downstream_projects script locally, and submitted a PR to fix that as well. ui-router/publish-scripts#169

Copy link
Author

@aaron-brown aaron-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found another incorrect dep

@aaron-brown
Copy link
Author

@wawyed Okay, I was able to get everything working on my local machine. In order to get there, I had to make some updates in some other places in this ecosystem. I think that implies an order-of-operations before this PR can be merged. Note that these changes are not to support Angular 21. They are agnostic of even Angular, and has more to do with the support of the ecosystem of repos. I had to do a lot of finagling of package.json files to verify these changes resolved the downstream tests for this repo. I don't think you'd care to do that, but if you do let me know and I'll add a comment with instructions.

The first step is to address ui-router/publish-scripts#169, which resolves the shelljs.mv error I was having on my local. I'm not sure why it was working in ci and not on my local, but bumping the shelljs dep resolved it locally (and I assume will remain functional in ci). I'm just on Mint so it's not like I'm doing something weird. Please review that and let me know if you have any concerns. I did not bump the version; I can, if you'd like, but just let me know what the version would be. Once this is released, that should resolve people being able to run all the downstream tests locally, as this extends beyond this repo (requiring a version-bump in the repos notwithstanding).

The next step is to address ui-router/cypress-runner#207. The existing version of Cypress in that dep is ancient, and not compatible with the version of Node required by even Angular 17 I think. It was giving me some trouble, and is required by the example sub-project in this repo for its downstream tests. I admittedly did not check if Cypress is used in any of the other repos. It looks like y'all have mostly switched to Playwright, so this might be more vestigial, but example still needs it for now. Once released, that will allow example to run correctly locally. Same with this, if you want me to bump the version just tell me the version.

Once those two things are addressed, then we might need to circle back on the chicken-and-egg problem here.

Hope all of that is sound but if you have any questions lmk.

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.

chore: Support for Angular v21

2 participants