Commit graph

20645 commits

Author SHA1 Message Date
OJ Kwon
e078fd1715
test(fixture): allow turbopack build with longer wait time (#64930)
### What

By testing locally, confirmed turbopack's build output is less optimized
and navigation takes long time so test assertion fails. Extending
timeout for now.
2024-04-24 09:58:24 -07:00
Sami Jaber
32bc806512
NextJS App router: add isolated-vm to server-external-packages.json (#64749)
<!-- 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 #

-->


This is related to the issue I encountered at
https://github.com/vercel/next.js/issues/63492.

The same problem from the issue exists in the App router and requires
this additional configuration (otherwise, users must manually add
`isolated-vm` (https://github.com/laverdet/isolated-vm) to their
`experimental.serverComponentsExternalPackages`).

Given how popular this package is, and based on a suggestion from
@feedthejim that I add this entry, I decided to raise this PR.

### Adding a feature

- Related issues/discussions are linked using `fixes #number`: yes
- Documentation added: yes
2024-04-24 18:29:10 +02:00
C. T. Lin
5caeea398a
feat: support import attributes (#59480)
### What?

Add support to import attributes.

### Why?

The old import assertions syntax is deprecated and the proposal is
updated. See https://github.com/babel/babel/pull/15536

### How?

Add support to import attributes and keep old import assertions working
by using `@babel/plugin-syntax-import-attributes` with the
`deprecatedAssertSyntax` option.

Docs: https://babeljs.io/docs/babel-plugin-syntax-import-attributes

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: Steven <steven@ceriously.com>
2024-04-24 15:55:32 +00:00
Sebastian Silbermann
909789aaf4
Ensure install works in test fixtures when NEXT_TEST_SKIP_CLEANUP=1 is specified (#64829)
Closes NEXT-3180
2024-04-24 13:05:21 +00:00
vercel-release-bot
850f4b9d8e v14.3.0-canary.21 2024-04-24 01:41:33 +00:00
JJ Kasper
7bba4e9e25
Fix windows CI due to node release (#64950)
There was a breaking change made in newer node versions on windows
affecting our usage of spawn for running tests so this ensures the
`shell: true` arg is set to avoid the `EINV` error doesn't occur.

x-ref:
https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
x-ref: [CI
failure](https://dev.azure.com/nextjs/next.js/_build/results?buildId=85755&view=logs&jobId=22321aea-e36d-5ae1-4163-9a2b553ce318&j=8af7cf9c-43a1-584d-6f5c-57bad8880974&t=2b758e06-e4c9-54eb-5d48-87d8a97da130)

Closes NEXT-3214
2024-04-24 01:26:56 +00:00
Zack Tanner
284648ff14
remove special-cased prefetch kind in dev mode (#64941)
### What
The "auto" prefetching behavior differs between dev/prod, resulting in
confusing DX when configuring `experimental.staleTimes = { static: 0,
dynamic: 0 }`.

### Why
Prefetching is intentionally disabled in dev, but we still will create
an "auto" prefetch on navigation. When configuring
`experimental.staleTimes` to have a `0` value in both static/dynamic
cases (a pattern that isn't a good idea, but should still have
consistent DX), it means that any auto prefetching that happens is
effectively discarded immediately, as we also would also not be able to
re-use the loading data.

In prod, we would have created a "temporary" prefetch for this case,
which is effectively not a prefetch at all and gets the full RSC data.
However in dev, we've special-cased these prefetches to be "auto", so
the client won't ever receive fresh data after the first time the cache
is seeded.


### How
This removes the special-handling for dev to instead be similar to other
prefetches that are created ad-hoc, and marks it as a "temporary"
prefetch kind. This has the added benefit of not triggering 2 separate
RSC calls in dev when only one is really needed.

### Test Plan
Client cache tests were previously disabled in dev because caching
behavior does intentionally differ between dev/prod. But we can at the
very least assert that the "auto" prefetching behavior is consistent
between the two environments, so that's what has been added to the tests
here.

This also adds a test for the `experimental.staleTimes = { static: 0,
dynamic: 0 }` case.

x-ref:
https://github.com/vercel/next.js/discussions/54075#discussioncomment-9202650

<!-- 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-3209
2024-04-23 17:12:40 -07:00
vercel-release-bot
7bf425d532 v14.3.0-canary.20 2024-04-23 23:22:16 +00:00
JJ Kasper
c506c0de1d
Ensure edge prerender-manifest is minimal (#64946)
This ensures we don't include the entire prerender-manifest in edge
runtime as it's un-necesary and can be very large. We only need the
preview field in this manifest so this ensures we just include that.

x-ref: [slack
thread](https://vercel.slack.com/archives/C0289CGVAR2/p1713904966662599?thread_ts=1713798297.067699&cid=C0289CGVAR2)

Closes NEXT-3212
2024-04-23 22:19:15 +00:00
Vladimir Kryachko
2d341c7b89
Add --skip-install flag to create-next-app (#64691)
This change allows disabling automatic `npm install`(or other supported
package managers).

Installing NextJS dependencies takes a long time and results in 0.5GB on
disk inside `node_modules`, it's not always what you want as sometimes
it's useful to delay dependency installation to a later time.

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

-->

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-04-23 22:04:54 +00: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
JJ Kasper
faefab0d9d
Fix mock span (#64944)
Seems this was incorrectly referencing the wrong instance. 

x-ref: https://github.com/vercel/next.js/pull/64909
x-ref:
https://github.com/vercel/next.js/actions/runs/8806556249/job/24171671288?pr=64691#step:7:839

Closes NEXT-3210
2024-04-23 13:50:30 -07:00
Mehfooz-ur-Rehman
249184f02a
deps updated for with-mongodb-mongoose example (#64928)
<!-- 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?
dependencies updated for with-mongodb-mongoose example

### Why?
i used this template and everytime its outdated and was not updated for
some time so updated the deps

### How?
installed the latest version of each outdated dependency and ran the
project

Closes NEXT-
Fixes #

-->

Co-authored-by: Sam Ko <sam@vercel.com>
2024-04-23 20:05:21 +00:00
Cody Olsen
1d592a9a08
Update Sanity example deps (#64939)
Bumping `next-sanity` fixes an issue where `@sanity/client` would
swallow the `DynamicServerError` thrown during `next build` in
[v14.2.2](https://github.com/vercel/next.js/pull/64511).
The `sanity` bump adds the new `Scheduled Publishing` feature that's
[now in the
core](https://github.com/sanity-io/sanity/releases/tag/v3.39.0).
2024-04-23 13:02:44 -07:00
Steven Luscher
eb3806e0b1
Allow StackBlitz repro links in bug reports on GitHub (#64935)
### What?

This change will prevent GitHub actions from auto-closing bug reports
that supply a StackBlitz repro link.

### Why?

I was sad that my carefully crafted repro was rejected when GitHub
actions summarily closed https://github.com/vercel/next.js/issues/64933

### How?

Allowlist it.

Fixes #64934
2024-04-23 12:58:44 -07:00
Tim Neutkens
a65bd31820
Speed up createNext test suite isolation (#64909)
## What?

Before: 25.71s

![CleanShot 2024-04-23 at 12 19
42@2x](https://github.com/vercel/next.js/assets/6324199/3a0ebb81-ac55-4b0c-8bfc-9a61ce138e6f)

After: 11.05s (-57%)

![CleanShot 2024-04-23 at 12 16
35@2x](https://github.com/vercel/next.js/assets/6324199/d7b6cd4c-d1e4-4dc2-a423-20b539186d25)

## How?

Currently the system for isolation looks like this:

- Copy `packages` folder to an isolated directory
- Run `pnpm pack` for all folders in `packages`
- Collect the pack files, add them as `dependencies` in package.json of
the isolated application
- Run `pnpm install`

Because the `next-swc` (Turbopack + SWC, yes we still need to rename the
package) binary file is quite large in development (900MB+) it means we
have to copy, then zip (pnpm pack), then unzip (pnpm install) that
binary, which takes about 3+ seconds in each step.

The change in this PR is to skip the copy/zip/unzip completely by
providing the folder path for the binary directly to Next.js, as it's a
binary we don't need the special isolation for this, it's already
standalone so running it directly allows us to skip 14,6 seconds of work
that is required for each isolated test in development.

This will likely have little effect on CI times as we already do some
tricks like only running the packing at the start of the CI process.
Only thing that could be better and is probably worth doing is adopting
this change for the time it saves for unzipping, that's almost 4 seconds
per test still.

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

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-04-23 21:12:59 +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
Donny/강동윤
0cd93b3a19
feat(turbopack): Handle fragments in requests (#64232)
# Turbopack

* https://github.com/vercel/turbo/pull/7935 <!-- Donny/강동윤 -
feat(turbopack): Handle fragment in requests -->

### What?

turbopack counterpart: https://github.com/vercel/turbo/pull/7935

### Why?

We need to fix build

### How?

Closes PACK-1006
2024-04-23 21:10:13 +02:00
Zack Tanner
f50ef62c54
fix dynamic route interception not working when deployed with middleware (#64923)
We currently have logic spread in multiple places that normalize `nxtP`
parameters into their regular names, ie `nxtPfoo` -> `foo`. However we
don't apply this same logic to `nxtI`, which conceptually is another
parameter but for route interception. As a result, the interception
route would 404 when deployed because it'd be missing the interception
parameter.

This moves the normalization check into a util and updates the spots I
could find where we handle `nxtP` to also handle `nxtI`.

### Test Plan
Added a new test, and validated via these deploys:

**Working**:
[Link](https://vtest314-e2e-tests-m889gxi4p-vtest314-ijjk-testing.vercel.app/)
**Non-Working**:
[Link](https://vtest314-e2e-tests-8sa5t9uau-vtest314-ijjk-testing.vercel.app/)

Fixes #62207
Closes NEXT-3204
2024-04-23 12:02:43 -07:00
かがみ
769a19e7b6
docs: update og generation code with local assets (#64888)
### What?
This PR fixes OpenGraph generation code with local assets in Node.js
runtime. Also adds some notes on file location.

The updated code is validated with my project on vercel.

### Why?
I tried loading a file in `public` folder(say `./public/og.png`). The
Node.js local assets example code did work locally with `next start` but
failed with error message `Error: ENOENT: no such file or directory`
when deployed to vercel.

Then I found out the trick here is the relative path. On my local
machine the CWD is the root folder so the relative path works, And it
seems the CWD is somewhat different on vercel runtime. Then I tried
using `process.cwd()` to get the CWD and construct a absolute path, this
has been validated with my project on vercel.

Also it's worthy to note where the local assets should be placed, so
that devs could be less confused.

---------

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-04-23 11:07:16 -07:00
zahra shahrouzi
dd9324f6c6
bug fix on a pull request #64911 (#64925)
### What?

Fixes a bug of removed dependencies by accident, which caused the
example not to install dependencies.

### How to test?

Running this script should initiate a project that works correctly:
```
 pnpm create next-app --example with-storybook with-storybook-app
```


Fixes this pull request https://github.com/vercel/next.js/pull/64911
2024-04-23 11:01:31 -07: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
Delba de Oliveira
13a3e94ca3
Docs: Add section for @next/env package (#64908)
Related to: https://github.com/vercel/front/pull/31685

---------

Co-authored-by: Lee Robinson <me@leerob.io>
2024-04-23 16:31:05 +01:00
zahra shahrouzi
06db6ca62d
Update with-storybook example (#64911)
### What?

Updated the example `with-storybook`, by upgrading storybook to version
8.0.9 (the latest) which required bumping the version of next.js to 14
from 13 in order to make them work together.

### Why?

The motivation for this change is that we now have better the lastest
features of storybook such as chromatic and visual testing. As of
previous updates, it is still treated as its own framework and so users
can specify the `storybook` framework as well as custom build command
`build-storybook` in order to get near zero-config support.

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-04-23 08:13:24 -07:00
vercel-release-bot
d4394f6c25 v14.3.0-canary.19 2024-04-23 14:31:58 +00:00
Jiachi Liu
416cf45f5c
Fix next/image usage in mdx (#64875)
### What

Apply the react aliases for app dir also to the files with
`pagesExtension`

### Why

In the page bundle of mdx page:

In RSC layer react is referencing to the insatlled react 18.2.0 's
`jsx-runtime` to create each JSX element. The react 18.2 JSX runtime
access `propTypes` of the component type and then it crashes 💥
In RSC layer it should use the built-in react canary's `jsx-runtime`.

The reason that it didn't use the built-in one is we're using customized
`pageExtension` `["mdx"]` for mdx, where we didn't apply all these rules
for the files with `pageExtension`, but only the js and ts files by
default.

For mdx specifically, we cannot only applied to
`(page|layout|route).[page extension]` cause every mdx file needs to
have proper resolution. Since this doesn't break transform, it's safe to
apply for all files with page extension.

Fixes #58888 

Closes NEXT-3187
2024-04-23 13:37:49 +02:00
Ryan Nauman
c09ce24a0c
fix: improve tsconfig extends checks (#61413)
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
2024-04-23 12:25:33 +02:00
Jiachi Liu
3fa9cb7bf7
Fix mixed exports in server component with barrel optimization (#64894)
### What

* Remove the change added in #64467, but still kept tests.
* Add more tests for mixed imports (component and function) from shared
component with `optimizePackageImports`

### Why

The fix in #64467 was not correct, as mixing `export *` with `"use
client"` should error if Next.js detect it properly.
When there's mixed exports, that a shared function will become a client
reference if the target file inherits the client boundary.

The original issue #64467 fixed was actually related to tree-shaking,
which is fixed in #64681.

Closes NEXT-3197
2024-04-23 09:57:49 +02:00
OJ Kwon
c251de878f
feat(next-core): support parsing matcher config object (#64678)
### What

- closes #63896

PR implements parsing JSValue for the matcher config if given item is an
object. We had those types already declared in place but somehow parsing
ignores it.
2024-04-23 09:55:24 +02:00
adiguno
6370155240
Update 04-loading-ui-and-streaming.mdx (#64857)
add a missing word in the suspense documentation to improve readability

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

-->

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-04-22 23:47:34 +00:00
JJ Kasper
8373776f5e
Revert turborepo to 1.13.3-canary.2 cont. (#64895)
Continues https://github.com/vercel/next.js/pull/64892 which reverted
original upgrade first before applying the upgrade to version we think
should be clear.

Closes NEXT-3198
2024-04-22 23:40:49 +00:00
vercel-release-bot
2fb781dadd v14.3.0-canary.18 2024-04-22 23:22:37 +00:00
Sam Ko
3d1f3cc1b4
fix(fetch-cache): fix additional typo, add type & data validation (#64799)
## Why?

This PR fixes the fetch cache, which currently is not using the fetch
cache when it exists (the tags were not getting set properly), and tags
have not updated.

(Before)


https://github.com/vercel/next.js/assets/28912696/74d8f592-0698-4ae4-be4b-30cffb1ffe11

(After)


https://github.com/vercel/next.js/assets/28912696/af12b13a-46c6-41c3-9ac3-20e1ec44a865

- https://github.com/vercel/next.js/pull/64786
- https://github.com/vercel/next.js/pull/63547

Closes NEXT-3173
2024-04-22 23:03:10 +00:00
vercel-release-bot
3ea57cd725 v14.3.0-canary.17 2024-04-22 21:59:55 +00:00
Zack Tanner
0a25f6f3a7
skip test_e2e_deploy_related when triggered from a fork (#64893)
The current check will still run on a fork (which isn't supported, due
to requiring access to secrets). This updates the check to be more
reliable.

<!-- 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-3196
2024-04-22 21:55:23 +00:00
OJ Kwon
372f00eb07
fext(next): extend next.config for mdxRs support options (#64801)
### What

Closes PACK-2978, requires https://github.com/vercel/turbo/pull/8005.

PR extends existing mdxRs config from accepting object as well in
addition to current boolean flag, mainly to allow to specify what kind
of markdown types will be used between gfm and commonmark.
2024-04-22 21:51:47 +00:00
JJ Kasper
75c9e2b85e
Revert turborepo to 1.13.3-canary.2 (#64892)
Reverts turborepo bump while investigating some issues

reverts: https://github.com/vercel/next.js/pull/64767
reverts: https://github.com/vercel/next.js/pull/64842 

x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1713816363062429)

Closes NEXT-3195
2024-04-22 21:29:13 +00:00
Paul Asjes
ad6386601d
docs: Add WorkOS to list of auth libraries (#64860) 2024-04-22 16:09:38 -05:00
Nils Jacobsen
ed15893814
docs: added inlang to the list of i18n community libraries (#61323)
Co-authored-by: Lee Robinson <me@leerob.io>
2024-04-22 16:07:16 -05:00
Zack Tanner
27c9fb755a
fix app-dir-edge-runtime-with-wasm test (#64891)
There's no need to specify a React dependency here since it's bundled as
part of App Router. Installing from the `experimental` channel seems to
cause an unhandled rejection in CI
([ref](https://github.com/vercel/next.js/actions/runs/8789517821/job/24119494561?pr=64889#step:27:324))
likely due to a recent experimental publish.

<!-- 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-3193
2024-04-22 19:51:54 +00:00
Mikhail Danshin
b5f241de67
docs: remove types in js example (#64878) 2024-04-22 10:21:21 -05:00
vercel-release-bot
c595cf76a4 v14.3.0-canary.16 2024-04-22 14:40:29 +00:00
Jiachi Liu
7404ea4c93
fix: mixing namespace import and named import client components (#64809)
### What

Reported by @MaxLeiter, when you mixing named import and wildcard import
to a client component, and if you clone the module it will missed others
exports except the named ones. This lead to an issue that rendered React
element type is `undefined`.

### Why

We're using a tree-shaking strategy that collects the imported
identifiers from client components on server components side. But in our
code `connection.dependency.ids` can be undefined when you're using
`import *`. So for that case we include all the exports.

In the flight client entry plugin, if we found there's named imports
that collected later, and the module is already being marked as
namespace import `*`, we merge the ids into "*", so the whole module and
all exports are respected.

Now there're few possible cases for a client component import:

During webpack build, in the outout going connections, there're
connection with empty imported ids (`[]`), cannot unable to detect the
imported ids (`['*']`) and detected named imported ids (`['a', 'b',
..]`). First two represnt to include the whole module and all exports,
but we might collect the named imports could come later than the whole
module. So if we found the existing collection already has `['*']` then
we keep using that regardless the collected named imports. This can
avoid the collected named imports cover "exports all" case, where we
will expose less exports for that collection module lead to the
undefined component error.

Closes NEXT-3177
2024-04-22 15:05:41 +02:00
Hendrik Liebau
f936932758
Enable loading source maps for Next Server and React (#64527) 2024-04-22 12:40:23 +00:00
Donny/강동윤
7552a7a0ef
build: Update swc_core to v0.90.33 (#64553)
# Turbopack

* https://github.com/vercel/turbo/pull/7992 <!-- hrmny -
build(turbo-repository): fix napi build with LLD -->
* https://github.com/vercel/turbo/pull/7765 <!-- Tobias Koppers - Drop
excessive cells after task reexecution -->
* https://github.com/vercel/turbo/pull/7955 <!-- Donny/강동윤 - chore:
Update `styled-jsx` -->
* https://github.com/vercel/turbo/pull/7987 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.90.33` -->

### What?

Update swc crates to
0f07acbc57

### Why?

To keep in sync.

### How?

Closes PACK-2968
2024-04-22 07:04:45 +00: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
jeanmax1me
8898a80bec
Update Nav.tsx (#64818)
removed duplicate of "use client"

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

-->

Co-authored-by: Steven <steven@ceriously.com>
2024-04-21 19:41:07 -07:00
vercel-release-bot
4e1eb08a8f v14.3.0-canary.15 2024-04-21 23:21:40 +00:00
Sebastian Silbermann
512d342f3b
Update @testing-library/react used in tests (#64851)
Closes NEXT-3183
2024-04-21 21:47:39 +00:00
Sebastian Silbermann
aa126abbda
Upgrade Turborepo (#64842)
Closes NEXT-3181
2024-04-21 21:12:03 +00:00