Skip to content

Commit 669bd05

Browse files
authored
Turbopack build: Skip experimental.esmExternals tests (#67901)
As of right now we're not planning to implement this experimental feature. So skipping the tests for it for Turbopack build. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
1 parent fefe698 commit 669bd05

File tree

3 files changed

+35
-31
lines changed

3 files changed

+35
-31
lines changed

docs/04-architecture/turbopack.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ These features are currently not supported:
5252
- We are planning to implement this in the future.
5353
- `experimental.sri.algorithm`
5454
- We are planning to implement this in the future.
55+
- `experimental.esmExternals`
56+
- We are currently not planning to support the legacy esmExternals configuration in Next.js with Turbopack.
5557
- [AMP](/docs/pages/building-your-application/configuring/amp).
5658
- We are currently not planning to support AMP in Next.js with Turbopack.
5759
- Yarn PnP

test/integration/externals-esm-loose/test/index.test.js

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,38 @@ import {
1313
const appDir = join(__dirname, '../')
1414
let appPort
1515
let app
16+
;(process.env.TURBOPACK ? describe.skip : describe)(
17+
"Handle ESM externals with esmExternals: 'loose'",
18+
() => {
19+
;(process.env.TURBOPACK_DEV ? describe.skip : describe)(
20+
'production mode',
21+
() => {
22+
beforeAll(async () => {
23+
await fs.remove(join(appDir, '.next'))
24+
await nextBuild(appDir)
25+
appPort = await findPort()
26+
app = await nextStart(appDir, appPort)
27+
})
28+
afterAll(() => killApp(app))
1629

17-
describe("Handle ESM externals with esmExternals: 'loose'", () => {
18-
;(process.env.TURBOPACK_DEV ? describe.skip : describe)(
19-
'production mode',
20-
() => {
21-
beforeAll(async () => {
22-
await fs.remove(join(appDir, '.next'))
23-
await nextBuild(appDir)
24-
appPort = await findPort()
25-
app = await nextStart(appDir, appPort)
26-
})
27-
afterAll(() => killApp(app))
30+
const expected =
31+
/Hello <!-- -->World<!-- -->\+<!-- -->World<!-- -->\+<!-- -->World/
2832

29-
const expected =
30-
/Hello <!-- -->World<!-- -->\+<!-- -->World<!-- -->\+<!-- -->World/
33+
it('should render the static page', async () => {
34+
const html = await renderViaHTTP(appPort, '/static')
35+
expect(html).toMatch(expected)
36+
})
3137

32-
it('should render the static page', async () => {
33-
const html = await renderViaHTTP(appPort, '/static')
34-
expect(html).toMatch(expected)
35-
})
38+
it('should render the ssr page', async () => {
39+
const html = await renderViaHTTP(appPort, '/ssr')
40+
expect(html).toMatch(expected)
41+
})
3642

37-
it('should render the ssr page', async () => {
38-
const html = await renderViaHTTP(appPort, '/ssr')
39-
expect(html).toMatch(expected)
40-
})
41-
42-
it('should render the ssg page', async () => {
43-
const html = await renderViaHTTP(appPort, '/ssg')
44-
expect(html).toMatch(expected)
45-
})
46-
}
47-
)
48-
})
43+
it('should render the ssg page', async () => {
44+
const html = await renderViaHTTP(appPort, '/ssg')
45+
expect(html).toMatch(expected)
46+
})
47+
}
48+
)
49+
}
50+
)

test/turbopack-build-tests-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9260,12 +9260,12 @@
92609260
},
92619261
"test/integration/externals-esm-loose/test/index.test.js": {
92629262
"passed": [],
9263-
"failed": [
9263+
"failed": [],
9264+
"pending": [
92649265
"Handle ESM externals with esmExternals: 'loose' production mode should render the ssg page",
92659266
"Handle ESM externals with esmExternals: 'loose' production mode should render the ssr page",
92669267
"Handle ESM externals with esmExternals: 'loose' production mode should render the static page"
92679268
],
9268-
"pending": [],
92699269
"flakey": [],
92709270
"runtimeError": false
92719271
},

0 commit comments

Comments
 (0)