Commit graph

13948 commits

Author SHA1 Message Date
Tim Neutkens
a4a5f84b00
Allow unit tests to be written in packages/next/src (#45222)
Allows `.test.ts` to be colocated next to files so that unit tests can be written in the Next.js core codebase.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-24 14:32:09 +00:00
JJ Kasper
2e251cb85f
Revert "Revert "Revert "Revert "Initial support for metadata (#44729)"" (#45113)"" (#45196)
Hopefully last time

Reverts vercel/next.js#45130
2023-01-24 13:21:59 +00:00
Jan Kaifer
558d61f5fc
Fix turbo cache miss due to depending on gitignored files (#45166)
Workaround for this issue in turbo https://github.com/vercel/turbo/issues/2560

It caused that we always cache-missed.
2023-01-24 11:53:07 +00:00
Hannes Bornö
0d2aeb570d
Reduce component stack spacing for components without metadata (#45218)
Reduces the spacing when the component doesn't have any metadata.

Before
![image](https://user-images.githubusercontent.com/25056922/214269347-a9da3372-b22e-45ef-89a8-f9c794e661f4.png)

After
![image](https://user-images.githubusercontent.com/25056922/214269203-0fd6fb53-1cf8-44a2-94e1-427ab234c1d6.png)

Compared to components with file
![image](https://user-images.githubusercontent.com/25056922/214269573-5e723669-5eb9-446d-bc1a-ca8d9d8fe612.png)


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-24 11:15:05 +00:00
Hannes Bornö
7d00e362d2
Show component stack in error overlay on hydration error (#45089) 2023-01-24 11:12:29 +01:00
Hannes Bornö
6b5f5d2f9f
Add build time error if error.js is missing "use client" (#44961) 2023-01-24 09:57:40 +01:00
Derek Tissaw
05d887dc3b
Fix error overlay links in parenthesis (#45155)
Fixes https://github.com/vercel/next.js/issues/38362

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-23 20:09:11 -08:00
JJ Kasper
c0ad169e17
Ensure ctrl + c handling works with CNA prompts correctly (#45205) 2023-01-23 19:30:38 -08:00
Thomas Ballinger
0670d8b283
Pin library version in Convex example (#45206)
The version spec for [convex](https://www.npmjs.com/package/convex) in the convex example was `latest`, which meant developers who created a project with this example during the period of time between a new convex release with non-back compatible changes and an update to the demo in this repo would have broken projects. For less stress all around, let's pin the version here!

## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-24 03:16:54 +00:00
Julius Marminge
98156d13ce
fix: add src prefix on index page (#45150)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-23 18:57:15 -08:00
ilyasmez
57d0e77f78
chore: fix invalid-new-link error typo (#45157) 2023-01-23 17:06:50 -08:00
JJ Kasper
752136e84b
v13.1.6-canary.0 2023-01-23 15:04:49 -08:00
Jan Kaifer
1c7f66c70b
Update testing.md to reflect that we don't use yarn anymore (#45185) 2023-01-23 14:41:42 -08:00
JJ Kasper
775254af74
Add timeout for actions/cache restoring (#45198) 2023-01-23 14:39:11 -08:00
Jiachi Liu
e6ff749aee
Fix React.lazy preloading during SSR (#45160)
## Bug

Previously the `React.lazy` and Loadable preloading are creating different module loading promises with loader. Now we change to wait the loader in `React.lazy` to make sure for SSR case they're preloaded. The case to trigger this bug is: When adding `Document.getInitialProps` (aka. gIP), rendering goes to process the gIP first which would make the lazy elements executed before gIP, then preloading will happen after lazy which leads to Suspense resolves too fast without content.

Fixes #45151

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
2023-01-23 22:13:37 +00:00
Jiachi Liu
e33e46d950
Fix dynamic no ssr with babel transform (#45091) 2023-01-23 13:39:47 -08:00
asad
095a3c4b27
Update example test file name in cypress example (#45146)
closes https://github.com/vercel/next.js/issues/45145

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-23 13:37:56 -08:00
JJ Kasper
f931a636e1
Add debug info to static bailout message (#45192) 2023-01-23 13:25:00 -08:00
Cachorro Cami
1fa16e6dee
Update README.md for examples/with-mqtt-js (#45162)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-23 12:22:11 -08:00
Max Leiter
a3b89a5230
create-next-app: warn if project dir isn't empty before prompts (#45195) 2023-01-23 12:10:45 -08:00
JJ Kasper
189008c6a9
Re-prompt on invalid import alias (#45194) 2023-01-23 12:00:02 -08:00
JJ Kasper
4e6ea4aaf2
v13.1.5 2023-01-23 11:32:41 -08:00
JJ Kasper
8dac22ad56
v13.1.5-canary.3 2023-01-23 10:40:13 -08:00
Jan Kaifer
d356458202
Switch from yarn pack to pnpm pack in tests (#45167)
We couldn't swithc before because `pnpm` was not bundling files in `native` but that was caused by differences between `yarn` and `pnpm` implementation.
2023-01-23 15:07:35 +00:00
Jimmy Lai
a5bfc5a113
Update CODEOWNERS (#45178)
Just adding myself as a codeowner 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-23 14:28:58 +00:00
Tim Neutkens
9f9c9ea807
Add support for node: prefix when importing Node.js builtin modules (#45149)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-23 14:16:35 +01:00
Hannes Bornö
1dcf981647
Don't log suppressed error during export (#45100)
Checks if we're exporting and skips to log the suppressed errors.

Before

![image](https://user-images.githubusercontent.com/25056922/213746411-c1834b65-ebf5-4db5-91b7-e77c9707d78a.png)

After

![image](https://user-images.githubusercontent.com/25056922/213746255-04322f83-68b6-4271-b4fb-c363bd2a8c9d.png)

Fixes NEXT-399

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-23 08:28:30 +01:00
JJ Kasper
440560fbbb
Ensure config warnings only show once (#45142)
Since we now call `loadConfig()` in various processes our `execOnce`
handling isn't tracking when we have already shown warnings/logs in
another process so this adds a `silent` flag that we can leverage when
calling `loadConfig()`.

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

Fixes: [slack
thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1674351677627259)
2023-01-21 22:47:24 -08:00
JJ Kasper
70282b7269
v13.1.5-canary.2 2023-01-21 21:24:01 -08:00
Tim Neutkens
a8c3b71192
Update reducer comments (#45127)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-21 21:35:08 +01:00
Tim Neutkens
ff50621228 v13.1.5-canary.1 2023-01-21 21:10:33 +01:00
Maia Teegarden
b224c5f3ee
Revert "Revert "Revert "Initial support for metadata (#44729)"" (#45113)" (#45130)
This reverts commit 259cbc1806.

It does not have necessary changes to make Turbopack work.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-21 19:22:56 +00:00
Tim Neutkens
f970827db9 v13.1.5-canary.0 2023-01-21 17:11:49 +01:00
LongYinan
53be72be37
build(cargo): update turbopack (#45126)
### Features
- https://github.com/vercel/turbo/pull/3409

### Bug Fixes
- https://github.com/vercel/turbo/pull/3399
- https://github.com/vercel/turbo/pull/3412

### Chore
- https://github.com/vercel/turbo/pull/3398
- https://github.com/vercel/turbo/pull/3391
- https://github.com/vercel/turbo/pull/3350
2023-01-21 12:11:12 +00:00
JJ Kasper
2293438ee0
Update incremental cache handler for minimal mode (#45123) 2023-01-20 16:38:16 -08:00
Dylan Jhaveri
3659b5e737
update Mux Player to latest, pin to ^1 and pin upchunk to ^3 add Mux … (#45121)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-20 15:56:57 -08:00
JJ Kasper
259cbc1806
Revert "Revert "Initial support for metadata (#44729)"" (#45113) 2023-01-20 15:34:50 -08:00
JJ Kasper
0a5d27287f
v13.1.4 2023-01-20 14:59:00 -08:00
JJ Kasper
3ce4789499
v13.1.4-canary.1 2023-01-20 12:59:33 -08:00
Justin Ridgewell
6294e6aa6b
build(cargo): update turbopack (#45109)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-20 12:24:33 -08:00
JJ Kasper
e0865b10e0
Revert "Initial support for metadata (#44729)" (#45111) 2023-01-20 11:57:18 -08:00
Damien Simonin Feugas
e8ae4e219e
fix(#44077): allow edge runtime for api routes inside src/ folder (#45093)
fixes: https://github.com/vercel/next.js/issues/44382
closes: https://github.com/vercel/next.js/pull/44882
closes: https://github.com/vercel/next.js/pull/44383
2023-01-20 11:04:27 -08:00
JJ Kasper
9db8145858
Update swc_core to v0.56.0 (#44792)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2023-01-20 10:34:09 -08:00
Hannes Bornö
d6b4c5411e
Update @next/font/google data (#45092) 2023-01-20 10:04:08 -08:00
JJ Kasper
dc119e20ba
Fix metadata e2e test on deploy (#45104) 2023-01-20 09:22:07 -08:00
Robin Singh
5023f5ae93
Cannot redeclare block-scoped variable 'cookie'. (#45079)
## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-20 14:46:05 +00:00
Donny/강동윤
c30c14da18
Improve swc transforms (#45083)
x-ref: https://vercel.slack.com/archives/C02HY34AKME/p1674048645326239

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-20 13:22:43 +00:00
Tim Neutkens
c254b74c00 v13.1.4-canary.0 2023-01-20 10:32:03 +01:00
Shu Ding
d1f6a4295b
Initial support for metadata (#44729)
This PR implements page and layout exported `metadata` field support with limited properties.

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [x] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)


Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2023-01-20 08:47:30 +00:00
Guilherme Samuel
55f3a6d8fb
Fix broken argument for rewrites on link reference docs (#45073)
Fixes #45072

Rewrites don't accept relative paths anymore, we have to pass an absolute URL (see https://nextjs.org/docs/messages/middleware-relative-urls)



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-20 03:23:30 +00:00