-
Notifications
You must be signed in to change notification settings - Fork 91
ci: don't install fixture's deps if next version requierment is not satisfied #3103
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
ci: don't install fixture's deps if next version requierment is not satisfied #3103
Conversation
📊 Package size report No changes
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
0ad1257
to
6160b03
Compare
...re-deps-if-next-version-is-not-satisfied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note - previous setup with reusing same transform was resulting in only seeing output from 1 .pipe()
- so instead for each .pipe
we create clone of transform (this was noticed when I used DEBUG condition to print out npm/pnpm list next
that output was silent for that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was useful in debugging, so I think I'd like to leave this here (behind DEBUG
toggle to avoid it being too spammy in regular usage)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note - the similar check is now done inside setNextVersionInFixture
to avoid doing any actual changes for latest
, but still allow to figure out if NEXT_VERSION satisfies potential fixture constraints like those:
opennextjs-netlify/tests/fixtures/ppr/package.json
Lines 15 to 19 in 5e28132
opennextjs-netlify/tests/fixtures/middleware-node-runtime-specific/package.json
Lines 15 to 19 in 5e28132
Note - those are not "dependencies" - those our own definitions that control which next versions are applicable for this fixture (for example for node middleware fixtures, we only allow next versions that actually support that, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not ideal, but as mentioned few lines above (Line 103) - we can't really use semver's satisfies
when a tag (like canary
) is used, so this is alternative solution for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we want a full revert of the last change, but I also updated node-version
in a few other files. We likely don't need the same logic everywhere, but we might want to go back to 18 for some of them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other workflows are (that I didn't touch and were updated in https://github.com/opennextjs/opennextjs-netlify/pull/3101/files to use node 20):
- deno unit tests (I think we use node/npm just to install deps, but otherwise use deno)
- size check
- lint
I don't think it really matter which node version we use there, so might as well keep them on node 20
...-is-not-satisfied
Uh oh!
There was an error while loading. Please reload this page.
Description
We are running tests on node 18 right now. Next@16 will be bumping minimal node version to 20.9 and will be failing builds if it's not met.
We do have some fixtures that require next@canary (which already require node 20.9) and if the next version constraint is not met for the fixture - we do install and build fixture, just with whatever is in package.json instead of version we ask to test.
This skips the installation and build for fixtures that do not meet next version constraints so that we could continue to test with node 18 on next@<16
Documentation
Tests
Not really adding tests, but I did run:
I think they all work as expected now:
There are some failures there, but I think it's normal flakiness, I didn't want to restart them because it's the setup I wanted to assert on, not results on the tests themselves
Relevant links (GitHub issues, etc.) or a picture of cute animal