Skip to content

Commit 57b8678

Browse files
authoredNov 16, 2023
fix: fixes a module interop issue (#67)
* fix: fixes a module interop issue * chore: bump version * chore: remove page router support * chore: update lock file * tests: currently skip this test as its disabled
1 parent 85a50d4 commit 57b8678

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed
 

‎package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netlify/next-runtime",
3-
"version": "5.0.0-alpha.5",
3+
"version": "5.0.0-alpha.7",
44
"description": "Run Next.js seamlessly on Netlify",
55
"main": "./dist/index.js",
66
"type": "module",

‎src/run/handlers/next.cts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { patchFs } from 'fs-monkey'
88

99
type FS = typeof import('fs')
1010

11-
export default async (...args: Parameters<typeof getRequestHandlers>) => {
11+
export async function getMockedRequestHandlers(...args: Parameters<typeof getRequestHandlers>) {
1212
const { blobStore } = await import('./cache.cjs')
1313

1414
async function readFileFallbackBlobStore(...args: Parameters<FS['promises']['readFile']>) {

‎src/run/handlers/server.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ export default async (request: Request) => {
1414
nextConfig = await getRunConfig()
1515
setRunConfig(nextConfig)
1616

17-
const { default: getMockedRequestHandlers } = await import('./next.cjs')
17+
const { getRequestHandlers } = await import('next/dist/server/lib/start-server.js')
1818

19-
// @ts-expect-error
20-
;[nextHandler] = await getMockedRequestHandlers({
19+
;[nextHandler] = await getRequestHandlers({
2120
port: 3000,
2221
hostname: 'localhost',
2322
dir: RUN_DIR,

‎tests/integration/static.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ beforeEach<FixtureTestContext>(async (ctx) => {
2424
await startMockBlobStore(ctx)
2525
})
2626

27-
test<FixtureTestContext>('requesting a non existing page route that needs to be fetched from the CDN', async (ctx) => {
27+
test.skip<FixtureTestContext>('requesting a non existing page route that needs to be fetched from the CDN', async (ctx) => {
2828
await createFixture('page-router', ctx)
2929
await runPlugin(ctx)
3030

0 commit comments

Comments
 (0)
Please sign in to comment.