Commit graph

7098 commits

Author SHA1 Message Date
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
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
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
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
JJ Kasper
919a71186e
v13.1.3 2023-01-19 19:01:12 -08:00
JJ Kasper
bd23ad3a9b
v13.1.3-canary.6 2023-01-19 15:27:33 -08:00
Jiachi Liu
c648f9d413
Fix next/dynamic non ssr in pages when appDir is enabled (#45066)
When `appDir` is enabled, `next/dynamic` with `ssr: false` didn't get
correctly compiled with swc. The `server_components` condition in
next_dynamic transform should respect to the server components
compilation, but it was accidently turned on when server components is
enabled.

This PR fixes it that only turn on the flag when it's in server
components compilation (when `is_server` option is `true`)

reported by @MaxLeiter 

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

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-20 00:25:46 +01:00
Hannes Bornö
0faedd9e1e
Fix error when CSS @import fails to resolve (#45010) 2023-01-19 14:43:32 -08:00
Selene Blok
0a5097c466
Add shiki and vscode-oniguruma to default server-external packages (#44968)
fixes https://github.com/vercel/next.js/issues/44316
fixes https://github.com/shikijs/shiki/issues/398

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-19 13:50:59 -08:00
RD
72d35d0524
Fix typescript plugin (#44128)
Co-authored-by: Shu Ding <g@shud.in>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-19 13:18:41 -08:00
Hannes Bornö
9b39c79d2c
Display the reason of hydration error in error overlay (#44857) 2023-01-19 13:45:34 +01:00
Hannes Bornö
d363e6f2b3
Don't dispaly "Error: " twice when router isn't mounted (#45038)
Before

![image](https://user-images.githubusercontent.com/25056922/213422675-d2865012-ea23-4ee7-b984-4021e698bce0.png)

After

![image](https://user-images.githubusercontent.com/25056922/213422561-5730efea-82da-4e13-aac6-a1e84b098605.png)

Fixes NEXT-381

## 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-19 13:12:36 +01:00
JJ Kasper
9b97461ba8
v13.1.3-canary.5 2023-01-18 17:03:39 -08:00
JJ Kasper
57fb41b880
Ensure additional windows are not created on Windows OS (#45022) 2023-01-18 16:59:02 -08:00
Hannes Bornö
c50641f709
Remove next-app-loader from import trace (#44996) 2023-01-18 14:52:39 -08:00
tom
27b95ffb1f
chore: open dev overlay error links in new tab (#45018) 2023-01-18 14:45:17 -08:00
JJ Kasper
4dfe831bbb
Add project directory rename/remove handling (#44911) 2023-01-18 14:37:40 -08:00
Jan Kaifer
d7307cffb7
Fix turbo usage in tests (#44715) 2023-01-18 20:35:28 +01:00
JJ Kasper
ad48202432
Ensure force-dynamic is honored during build (#45015) 2023-01-18 11:24:48 -08:00
JJ Kasper
6b7c69fa4d
Add proper error when app path switches static to dynamic (#44989) 2023-01-18 10:24:35 -08:00
JJ Kasper
c72ebf7722
v13.1.3-canary.4 2023-01-17 16:09:26 -08:00
JJ Kasper
8f0acdf781
Gracefully handle telemetry not being available (#44986) 2023-01-17 16:00:22 -08:00
JJ Kasper
6d09f0b80c
Add experimental.allowedRevalidateHeaderKeys config (#44985) 2023-01-17 14:15:53 -08:00
JJ Kasper
f741b888dd
v13.1.3-canary.3 2023-01-17 12:39:36 -08:00
JJ Kasper
2bc8e740c7
Update res.revalidate to pass through headers (#44981) 2023-01-17 12:35:07 -08:00
Jesse Zhu
aeef38e80e
Use withoutEnlargement instead of sharp.metadata() (#44890) 2023-01-17 10:56:53 -08:00
Shu Ding
3a9bfe60d2
Fix CSS imports being tracked multiple times (#44938)
Currently the way our renderer injects CSS is to first track CSS imports on the module level, and then render these links on each layer. However, in a complex application it's possible that one CSS being imported in many modules, and in multiple layouts. This causes an issue of duplication. And if there are many rules the order could be messed up by that. 

This PR deduplicates CSS resources used by one entry (layout, page, error, ...) and all its parent layouts. If an entry is rendered, all its ancestors are rendered too.

See test case for more details. Currently those two tests will all fail.

Fixes #42862.

## Bug

- [ ] 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)

## 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-17 18:36:00 +00:00
Hannes Bornö
5b5cc33991
Fix force-static description in next-typescript (#44951) 2023-01-17 08:52:50 -08:00
Tim Neutkens
4f410e43fb v13.1.3-canary.2 2023-01-17 15:47:33 +01:00