-
Notifications
You must be signed in to change notification settings - Fork 178
Fix and enhancement for Next 16 #1029
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 3982bb5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Do we have to handle the |
Nope it doesn't change the name of the compiled file, but we have to update to Node 20 for e2e it seems.... |
packages/open-next/src/adapters/plugins/image-optimization/image-optimization.replacement.ts
Outdated
Show resolved
Hide resolved
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.
Very good job Nico! It seems to pass the E2E locally for me on Next 16.
Just a few comments and also could you rename the middleware files to proxy in all the examples app. (npx @next/codemod@canary middleware-to-proxy .)
To make the E2E work both locally and deployed we need to change this to 20:
| default: 18.x |
And all the Runtime.NODEJS_18_X into Runtime.NODEJS_20_X in OpenNextReferenceImplementation.ts.
Also update package.json here:
Line 28 in 9b7f726
| "node": ">=18", |
Perhaps remove these lines as we already setup node and pnpm cache in the setup/action.yml :
opennextjs-aws/.github/workflows/e2e.yml
Lines 95 to 99 in 9b7f726
| - name: Set up NodeJS v18 | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: pnpm # cache pnpm store | |
| node-version: 18.18.2 |
However, we might do this in a seperate PR. Up to you.
| cacheFileMeta && | ||
| Array.isArray(cacheFileMeta.segmentPaths) && |
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.
| cacheFileMeta && | |
| Array.isArray(cacheFileMeta.segmentPaths) && | |
| Array.isArray(cacheFileMeta?.segmentPaths) && |
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.
cacheFileMeta.segmentPaths.length > 0 could also be skipped maybe
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.
Maybe something like:
const segments: Record<string, string> = Array.isArray(cacheFileMeta?.segmentPaths) ?
Object.fromEntries(cacheFileMeta.segmentPaths.map(...)) :
{};|
Do we have any tests for Could be some weird delimiter character in the user agent that's causing the break, eg |
Is this related to this PR or should it be a different question/issue? |
|
It's unrelated, we can continue the discussion when the person opens a ticket. |
packages/open-next/src/adapters/plugins/image-optimization/image-optimization.replacement.ts
Show resolved
Hide resolved
| expect(response.headers()["cache-control"]).toBe( | ||
| "public, immutable, no-transform, max-age=31536000", | ||
| ); | ||
| // expect(response.headers()["cache-control"]).toBe( |
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.
what do we want to do with those expectations?
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.
If next doesn't do it anymore by default, we should remove it (just checked, that's the case in next start).
But I think it's still a good idea to test to add them manually. I keep it in one and not in the other
pnpm-workspace.yaml
Outdated
|
|
||
| catalog: | ||
| next: 15.4.2 | ||
| next: 16.0.0 |
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.
Update to 16.0.1
|
Changes LGTM |
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.
LGTM, let's get this merged?
@sommeeeer I can't retrieve what your requested change was?
It was just this: #1029 (review) |
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.
LGTM, gj on this one!
Should fix most build failures in Next 16.
Support for incremental prefetching (Fix #1022)
Support for incremental prefetching in the cache interceptor
Fix #1026