-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into huozhi/remove-rsc-client-ref-exports
- Loading branch information
Showing
28 changed files
with
148 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ | |
"registry": "https://registry.npmjs.org/" | ||
} | ||
}, | ||
"version": "14.3.0-canary.51" | ||
"version": "14.3.0-canary.52" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 18 additions & 17 deletions
35
test/e2e/app-dir/dynamic-in-generate-params/index.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
import { type NextInstance, nextTestSetup } from 'e2e-utils' | ||
import type { Response } from 'node-fetch' | ||
|
||
async function getLastModifiedTime(next: NextInstance, pathname: string) { | ||
const content = await (await next.fetch(pathname)).text() | ||
return content.match(/<lastmod>([^<]+)<\/lastmod>/)[1] | ||
} | ||
|
||
function assertSitemapResponse(res: Response) { | ||
expect(res.status).toBe(200) | ||
expect(res.headers.get('content-type')).toContain('application/xml') | ||
} | ||
|
||
describe('app-dir - dynamic in generate params', () => { | ||
const { next, isNextDev } = nextTestSetup({ | ||
const { next } = nextTestSetup({ | ||
files: __dirname, | ||
skipDeployment: true, | ||
}) | ||
|
||
it('should render sitemap with generateSitemaps in force-dynamic config dynamically', async () => { | ||
const firstTime = await getLastModifiedTime( | ||
next, | ||
isNextDev ? 'sitemap.xml/0' : '/sitemap/0.xml' | ||
) | ||
const secondTime = await getLastModifiedTime( | ||
next, | ||
isNextDev ? 'sitemap.xml/0' : '/sitemap/0.xml' | ||
) | ||
const firstTime = await getLastModifiedTime(next, 'sitemap/0') | ||
const secondTime = await getLastModifiedTime(next, 'sitemap/0') | ||
|
||
expect(firstTime).not.toEqual(secondTime) | ||
}) | ||
|
||
it('should be able to call while generating multiple dynamic sitemaps', async () => { | ||
expect( | ||
(await next.fetch(isNextDev ? 'sitemap.xml/0' : '/sitemap/0.xml')).status | ||
).toBe(200) | ||
expect( | ||
(await next.fetch(isNextDev ? 'sitemap.xml/1' : '/sitemap/1.xml')).status | ||
).toBe(200) | ||
const res0 = await next.fetch('sitemap/0') | ||
const res1 = await next.fetch('sitemap/1') | ||
assertSitemapResponse(res0) | ||
assertSitemapResponse(res1) | ||
}) | ||
|
||
it('should be able to call fetch while generating multiple dynamic pages', async () => { | ||
expect((await next.fetch('/dynamic/0')).status).toBe(200) | ||
expect((await next.fetch('/dynamic/1')).status).toBe(200) | ||
const pageRes0 = await next.fetch('dynamic/0') | ||
const pageRes1 = await next.fetch('dynamic/1') | ||
expect(pageRes0.status).toBe(200) | ||
expect(pageRes1.status).toBe(200) | ||
}) | ||
}) |
Oops, something went wrong.