Commit graph

63 commits

Author SHA1 Message Date
Vercel Release Bot
77a6e37441
Update Turbopack development test manifest (#67093)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-06-21 10:27:34 +02:00
Tobias Koppers
5346185d37
improve and skip test case (#66952)
### What?

Source Maps for edge are broken, but the test that verifies it is also
broken. This fixes and skips the test.
2024-06-17 11:26:41 +02:00
hrmny
6c1d700afc
feat(turbopack-ecmascript): cache external modules with wrapper (#63337)
### What?
This is a fix for a bundle potentially referring to two different
external modules (e.g. `react` because it gets invalided from the
require cache)

See https://github.com/vercel/turbo/pull/7988

### Turbopack Updates
* https://github.com/vercel/turbo/pull/8376 <!-- Tim Neutkens - Rename
ChunkLoading::None to ChunkLoading::Edge -->
* https://github.com/vercel/turbo/pull/8371 <!-- Donny/강동윤 - test: Add
an execution test for `paren_remover` -->
* https://github.com/vercel/turbo/pull/8370 <!-- Tobias Koppers - Tree
Shaking shared state and side effects -->
* https://github.com/vercel/turbo/pull/7988 <!-- hrmny -
feat(turbopack-ecmascript): cache external modules with wrapper -->

Closes PACK-2622
2024-06-10 15:39:40 +00:00
Wyatt Johnson
8cb8edb686
refactor: deprecate future directory (#66432)
This removes the previous `server/future` directory and moves everything
into the `server` or `server/lib` directories. This is aimed to start to
flatten the server application structure.
2024-06-04 15:23:23 +00:00
Hendrik Liebau
d6e28bca0e
Unignore test/**/*.test.* for ESLint (#66415) 2024-06-03 18:15:29 +02:00
Tim Neutkens
95d1bb2cac
Split webpack specific test into separate test suite (#66328)
## What?

Ensures `next build` does not fail with Turbopack on
`test/e2e/app-dir/rsc-basic/rsc-basic.test.ts`. Gets 36 extra tests
passing 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 #

-->
2024-05-30 12:29:18 +02:00
Zack Tanner
1f545aff05
[Breaking] disable client router cache for page segments (#66039)
This configures the default client router cache `staleTime.dynamic`
value to be `0`.

This means that:
- Navigating between pages will always fire off a network request to get
RSC data for the page segment, rather than restoring from router cache
- Loading states will remain cached for 5 minutes (or whatever
`config.experimental.staleTimes.static` is set to)
- Shared layout data will continue to remain cached due to [partial
rendering](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#4-partial-rendering)
- Back/forward behavior will still restore from cache to ensure the
browser can restore scroll position.

It's possible to opt-out of this, and into the previous behavior, by
setting the
[`staleTimes`](https://nextjs.org/docs/app/api-reference/next-config-js/staleTimes)
config in `next.config.js`:

```js
/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    staleTimes: {
      dynamic: 30
    },
  },
}

module.exports = nextConfig
```

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

-->
2024-05-21 13:54:23 -07:00
Vercel Release Bot
93303b41b9
Update Turbopack development test manifest (#66044)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-05-21 17:44:30 +00:00
Vercel Release Bot
b6a72f3932
Update Turbopack development test manifest (#66002)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-05-20 17:17:17 -07:00
hrmny
25b767eb84
feat(turbopack-ecmascript): use import attributes for annotations (#59370) 2024-05-16 02:58:43 +00:00
hrmny
f628aa65db
feat: support import attributes (#65749)
Co-authored-by: C. T. Lin <chentsulin@gmail.com>
2024-05-15 17:15:17 +02:00
Jiachi Liu
bebda1138d
Remove @next/font resolving for font loaders (#65601)
Remove font loaders resolving for `@next/font`, users should directly
rely on `next/font`, they're intended to be removed.

Also removed the legacy tests
2024-05-10 20:12:03 +02:00
Jiachi Liu
09baadfd70
Remove auto appending xml extension to dynamic sitemap routes (#65507)
### What

Remove the auto appending `.xml` extension to the sitemap routes when
it's a dynamic route.


### Why

Previously we were adding `.xml` to `/[...paths/]sitemap` routes, but
the bad part is when you use it to generate multiple sitemaps with
`generateSitemaps` in format like `/[...paths/]sitemap.xml/[id]`, which
doesn't look good in url format and it can be inferred as xml with
content-type. Hence we don't need to add `.xml` in the url.

Before this change it could also result into the different url between
dev and prod:
dev: `/sitemap.xml/[id]`
prod: `/sitemap/[id].xml` 

Now it's going to be aligned as `/sitemap/[id]`. Users can add extension
flexiblely.

Closes NEXT-3357
2024-05-09 11:05:24 +02:00
Vercel Release Bot
3d143791c6
Update Turbopack development test manifest (#65497)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-05-08 11:39:19 +02:00
Ethan Arrowood
d0d22ac625
Promote and rename server bundling options serverComponentsExternalPackages and bundlePagesExternals (#65421)
This PR promotes and renames experimental configuration options related
to server bundling:
- `serverComponentsExternalPackages` -> `serverExternalPackages`
- `bundlePagesExternals` -> `bundlePagesRouterDependencies`

Existing docs for `serverComponentsExternalPackages` was changed. 
New docs for `bundlePagesRouterDependencies` were added.

Closes NEXT-3332
2024-05-07 11:19:35 -06:00
Sebastian Silbermann
2c31c79ac8
Support React 19 in App and Pages router (#65058)
Closes NEXT-3218

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2024-05-07 18:18:32 +02:00
Vercel Release Bot
ddc507fe82
Update Turbopack development test manifest (#65404)
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
2024-05-06 10:23:09 -07:00
Vercel Release Bot
287786eb54
Update Turbopack development test manifest (#65312)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-05-03 21:00:30 +00:00
Vercel Release Bot
d62b68fb04
Update Turbopack development test manifest (#65226)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-05-01 12:02:20 +02:00
Vercel Release Bot
eb28969911
Update Turbopack development test manifest (#65054)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-25 13:48:59 -07:00
Steven
a6a6117197
feat(next/image)!: remove squoosh in favor of sharp as optional dependency (#63321)
## History

Previously, we added support for `squoosh` because it was a wasm
implementation that "just worked" on all platforms when running `next
dev` for the first time. However, it was slow so we always recommended
manually installing `sharp` for production use cases running `next
build` and `next start`.

Now that [`sharp` supports
webassembly](https://sharp.pixelplumbing.com/install#webassembly), we no
longer need to maintain `squoosh`, so it can be removed. We also don't
need to make the user install sharp manually because it can be installed
under `optionalDependencies`. I left it optional in case there was some
platform that still needed to manually install the wasm variant with
`npm install --cpu=wasm32 sharp` such as codesandbox/stackblitz (I don't
believe sharp has any fallback built in yet).

Since we can guarantee `sharp`, we can also remove `get-orientation` dep
and upgrade `image-size` dep.

I also moved an [existing `sharp`
test](https://github.com/vercel/next.js/pull/56674) into its own fixture
since it was unrelated to image optimization.

## Related Issues
- Fixes https://github.com/vercel/next.js/issues/41417
- Related https://github.com/vercel/next.js/pull/54670
- Related https://github.com/vercel/next.js/issues/54708
- Related https://github.com/vercel/next.js/issues/44804
- Related https://github.com/vercel/next.js/issues/48820
- Related https://github.com/vercel/next.js/pull/61810
- Related https://github.com/vercel/next.js/pull/61696
- Related https://github.com/vercel/next.js/issues/44685
- Closes https://github.com/vercel/next.js/issues/64362

## Breaking Change

This is a breaking change because newer versions of `sharp` no longer
support `yarn@1`.

- https://github.com/lovell/sharp/issues/3750

The workaround is to install with `yarn --ignore-engines` flag.

Also note that Vercel no longer defaults to yarn when no lockfile is
found

- https://github.com/vercel/vercel/pull/11131
- https://github.com/vercel/vercel/pull/11242

Closes NEXT-2823
2024-04-25 14:01:56 -04:00
Vercel Release Bot
d3cb79c646
Update Turbopack development test manifest (#64996)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-24 13:24:40 -07:00
OJ Kwon
05b5104ab2
fix(rewrites): support external rewrite destination (#64943)
### What

Mimic original manifest generation to support external urls in rewrite
config correctly.
2024-04-23 22:52:33 +02:00
Donny/강동윤
671ac35614
feat(turbopack): Check for duplicate parallel routes (#64181)
### What?

Add a validation for parallel routes with the same path.

This PR enables
`test/e2e/app-dir/conflicting-page-segments/conflicting-page-segments.test.ts`

### Why?

To match the behavior in the default mode.

### How?

Closes PACK-2912
2024-04-23 21:11:41 +02:00
OJ Kwon
04f5f87586
test(manifest): skip font/proxy test for now (#64927)
### What?

We tried to support proxy in next/font with turbopack, but wasn't able
to make upstream `reqwest` to support it with https protocol schemes.
Skipping for now for the RC and will revisit later.
2024-04-23 10:28:52 -07:00
Vercel Release Bot
1e5a21cbdc
Update Turbopack development test manifest (#64838)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-22 08:04:57 +02:00
Vercel Release Bot
e3f74e0454
Update Turbopack development test manifest (#64762)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-19 12:14:14 +00:00
Vercel Release Bot
c14c0bd3c7
Update Turbopack development test manifest (#64709)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-18 10:59:50 +02:00
Shu Ding
754fadacf3
Revert "fix(next): global not-found not working on multi-root layouts" (#64601)
Reverts #63053.

Closes NEXT-3135
2024-04-17 11:19:18 +02:00
Vercel Release Bot
065cefd29d
Update Turbopack development test manifest (#64579)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-16 21:01:48 +02:00
Vercel Release Bot
abf3ca2d7d
Update Turbopack development test manifest (#64546)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-16 10:47:25 +00:00
Tobias Koppers
064788fee3
fix HMR for cases where chunking changes (#64367)
* test case for https://github.com/vercel/turbo/pull/7947
* fix source map retrieval for HMR-updated assets

Closes PACK-2944
2024-04-16 12:36:41 +02:00
Jiwon Choi
81450de6af
hotfix: hardcoded skip turbopack tests to manifest (#64515)
cc @shuding 

CI run failed after #63053 on turbo production, which had not yet been
targeted for turbo.

x-ref: #63103

---------

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
Co-authored-by: Leah <8845940+ForsakenHarmony@users.noreply.github.com>
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2024-04-15 19:46:42 +00:00
Damien Simonin Feugas
e7a8645cb8
BREAKING CHANGE: remove deprecated analyticsId from config, and the corresponding performance-relayer files and tests (#64199)
### 🤔 What's in there?

We've deprecated config's `analyticsId` in 14.1.1 [almost 3 months
ago](https://github.com/vercel/next.js/releases/tag/v14.1.1-canary.2).
Users can opt in fot `@vercel/speed-insights`, or use
`useReportWebVitals` to report to any provider they'd like.

This PR:
- removes `analyticsId` key from configuration
- stops setting `__NEXT_PUBLIC_ANALYTICS_ID` env variable when the key
was present
- stops injecting `performance-relayer` file, when the variable is set
- cleans up related test code.
2024-04-15 15:23:30 +00:00
Vercel Release Bot
6ddf2b75b8
Update Turbopack development test manifest (#64285)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-10 11:06:22 +02:00
Vercel Release Bot
8c6532fa70
Update Turbopack development test manifest (#64190)
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
2024-04-08 09:36:25 +02:00
Donny/강동윤
697ae8af5b
feat(turbopack): Align behavior for link rel="preconnect" with webpack mode (#64011)
### What?

Emit `<link data-next-font="size-adjust" rel="preconnect" href="/"
crossorigin="anonymous"/>` in more cases.

### Why?

To align with the default mode

### How?
2024-04-08 08:24:18 +02:00
Vercel Release Bot
9a6db5704a
Update Turbopack development test manifest (#64160)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-08 09:46:08 +09:00
Vercel Release Bot
763b9a6604
Update Turbopack development test manifest (#64101)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-04-05 10:57:44 +02:00
Donny/강동윤
cfca07996d
test: Use the correct matcher pattern for stack traces (#63927)
### What?

Match on `pages_api_unknown-domain-no-await_.*?\.js/` instead of
`/at.+\/pages\/api\/unknown-domain-no-await.js/`

### Why?

Turbopack generates a different chunk path for js files. This PR fixes
one integration test case.

### How?



Closes PACK-2883
2024-04-04 23:56:21 +09:00
Donny/강동윤
3ae6e1c9fe
feat(turbopack): Print error message for next/font fetching failure (#64008)
### What?

Print an error message to stdout if stylesheet fetching fails.

### Why?

To align behavior with the default mode. This PR fixes one integration
test case.

### How?



Closes PACK-2896
2024-04-04 23:56:10 +09:00
Vercel Release Bot
74943b67c7
Update Turbopack development test manifest (#64055)
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
2024-04-04 16:58:58 +09:00
OJ Kwon
fd73584c7f
fix(turbopack): throws api issues (#64032)
### What

Correctly raises error for the /api, unlike other places we were
suppressing it.

Closes PACK-2900
2024-04-03 13:50:30 -07:00
Vercel Release Bot
944159a6d4
Update Turbopack development test manifest (#63959)
This auto-generated PR updates the development integration test manifest used when testing Turbopack.
2024-04-02 16:29:52 +09:00
Donny/강동윤
4f142dc58b
test: Use the correct chunk path for testing (#63859)
### What?

Match on `/_next/static/chunks/%5Broot%20of%20the%20server%5D__` instead
of `/_next/static/chunks/main` while testing.

### Why?

Turbopack does not use `/_next/static/chunks/main` as the name of the
chunk

### How?



Closes PACK-2874

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2024-04-02 01:51:47 +00:00
OJ Kwon
b90dcdd049
feat(next-core): set nextconfigoutput correctly (#63848)
### What

PR updates route's template injection correctly sets `nextConfigOutput`.
2024-03-28 17:35:35 -07:00
OJ Kwon
7b2563da00
feat(custom-transform): more static info warning (#63837)
### What

Add few more warning assertions for the page static info.

requires https://github.com/vercel/next.js/pull/63780.

Closes PACK-2868
2024-03-28 19:31:13 +00:00
OJ Kwon
493130b789
feat(custom-transforms): partial page-static-info visitors (#63741)
### What

Supports partial `get-page-static-info` in turbopack. Since turbopack
doesn't have equivalent place to webpack's ondemandhandler, it uses
turbopack's build time transform rule instead.

As noted, this is partial implementation to pagestatic info as it does
not have existing js side evaluations. Assertions will be added
gradually to ensure regressions, for now having 1 assertion for
getstaticparams.

Closes PACK-2849
2024-03-28 09:47:33 -07:00
Vercel Release Bot
1f443776fa
Update Turbopack development test manifest (#63776)
This auto-generated PR updates the development integration test manifest
used when testing Turbopack.
2024-03-27 20:43:22 +01:00
OJ Kwon
e820e92dc3
fext(next-core): inherit root layout segment config for the routes (#63683)
### What

Supports root segment config inherit from layout. Currently route
segment config only runs agasint own source, so individual route segment
config works but if the config is set in layout level it is being
ignored. PR introduces root segment and pass into each route if tree
level have a corresponding layout.

Closes PACK-2839
2024-03-27 16:38:23 +00:00