Commit Graph
6 Commits
Author SHA1 Message Date
Niklas MischkulnigandGitHub b3f776364d Fix chunk loading when using __turbopack_load_by_url__ with query (#88899)
- if you `await __turbopack_load_by_url__ `, it waits for the exact chunk url you passed in to load
- but when that chunk actually loads, it registers itself with `stripQuery(chunkurl)+CHUNK_SUFFIX`

so there was mismatch if you load a chunk from a different deployment and thus `await __turbopack_load_by_url__` never resolves



----

Very confused about what's going on here:

```
 FAIL   Turbopack  test/e2e/app-dir/segment-cache/deployment-skew/deployment-skew.test.ts (61.629 s)
  segment cache (deployment skew)
    with BUILD_ID
      ✓ does not crash when prefetching a dynamic, non-PPR page on a different deployment (11673 ms)
      ✓ does not crash when prefetching a static page on a different deployment (10744 ms)
    with NEXT_DEPLOYMENT_ID
      ✓ does not crash when prefetching a dynamic, non-PPR page on a different deployment (10924 ms)
      ✕ does not crash when prefetching a static page on a different deployment (15756 ms)

  ● segment cache (deployment skew) › with NEXT_DEPLOYMENT_ID › does not crash when prefetching a static page on a different deployment

    page.waitForSelector: Timeout 5000ms exceeded.
    Call log:
      - waiting for locator('#build-id') to be visible

      519 |
      520 |     return this.startChain(async () => {
    > 521 |       const el = await page.waitForSelector(selector, {
          |                             ^
      522 |         timeout,
      523 |         state,
      524 |       })

      at waitForSelector (lib/browsers/playwright.ts:521:29)
      at Playwright._chain (lib/browsers/playwright.ts:651:23)
      at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
      at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
      at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
      at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
      at Object.elementById (e2e/app-dir/segment-cache/deployment-skew/deployment-skew.test.ts:122:37)

```

In the browser debugger, this line here in `fetchServerResponse` never returns, so there is actually no navigation at all (neither SPA nor MPA) when clicking the link, should be doing an MPA nav

https://github.com/vercel/next.js/blob/d4e64f52bb9aeb5dbcf6bb484f204742b2e3d743/packages/next/src/client/components/router-reducer/fetch-server-response.ts#L242
2026-01-26 15:30:56 +01:00
Sebastian "Sebbie" SilbermannandGitHub 2c56a69371 [test] Move all files to .ts (4/6) (#85639) 2025-11-04 13:37:48 +00:00
Tim NeutkensandGitHub 69f5fb260a Skip test/integration development tests during Turbopack build test run (#63671)
## What?

Follow-up to #63665.

Ensures development tests are skipped during the production build run
for Turbopack (i.e. used to create the turbopack-build-tests-manifest).

Adds `pnpm test-dev-turbo` and `pnpm test-start-turbo` (and their
`testonly` equivalent) for running tests.

<!-- 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 #

-->


Closes NEXT-2915
2024-03-25 18:37:34 +01:00
Tim NeutkensandGitHub 1e710ab73c Rename process.env.TURBOPACK -> process.env.TURBOPACK_DEV in test skips (#63665)
## What?

Follow-up to #63653.

<!-- 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 #

-->


Closes NEXT-2911
2024-03-25 14:17:56 +01:00
Tim NeutkensandGitHub 59bda2d818 More Turbopack fixes (#56299)
Skips additional production-only tests.

Follow-up to #56089.

In this PR I went through all of `test/integration` looking for `nextBuild(` and added the skipping logic.
2023-10-02 13:55:23 +00:00
Tobias KoppersandGitHub fd2a01ac14 Turbopack: add middleware support for next.rs api dev mode (#54555)
### What?

* adds middleware support
* adds a test case
* moves templates since they are used for more then next-route-loader


Closes WEB-1445
2023-08-27 12:10:15 +02:00