Skip to content
This repository was archived by the owner on May 26, 2025. It is now read-only.

Conversation

@yoieh
Copy link

@yoieh yoieh commented Apr 10, 2023

Copy link
Owner

@brhx brhx left a comment

Choose a reason for hiding this comment

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

Excellent spot, thank you! Please could you also update the README.md with the tested version?

@yoieh
Copy link
Author

yoieh commented Apr 10, 2023

I have updated the Compatibility section of the readme.
This still doesn't give full support for the new app directory with the new Route Handlers.

@yoieh yoieh requested a review from brhx April 10, 2023 13:17
@brhx
Copy link
Owner

brhx commented Apr 10, 2023

The typescript type check fails because it needs to be aware of both possible versions of NextNodeServer. I'd like to ensure it doesn't

@yoieh
Copy link
Author

yoieh commented Apr 10, 2023

I see,
There are more issues here.

ensurePage only exists on the DevServer in version 13.3.0 and not at all NextNodeServer.
This PR will never work in production.

But looks like ensureEdgeFunction exists in both 13.1.6 and 13.3.0 and works in both dev and prod.

@yoieh
Copy link
Author

yoieh commented Apr 10, 2023

I still kept the ensureApiPage for now..
but it look like you may be able to just use the ensureEdgeFunction from here on.

Not sure when i was added so can not garanti it works with a version lower than 13.1.6.
But this will "make typescript not fail".

Copy link
Owner

@brhx brhx left a comment

Choose a reason for hiding this comment

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

Oooh I like this solution! Please could you change it to just ensureEdgeFunction and I will give it a test and merge?

Changed ensurePage to use ensureEdgeFunction

Change it to just ensureEdgeFunction
@yoieh yoieh requested a review from brhx April 10, 2023 16:13
@brhx brhx changed the title Addes support for NetxtJS > 13.1.6 Add support for Next.js >= 13.2 Apr 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run next dev found some error

2 participants