Commit graph

14033 commits

Author SHA1 Message Date
Jan Kaifer
a5e9d032f3
Add @jankaifer as codeowner of docs, .github and examples (#45446) 2023-01-31 15:26:29 +00:00
JJ Kasper
5730dd7a8e
v13.1.7-canary.0 2023-01-30 17:36:24 -08:00
JJ Kasper
b00fd37972
Fix invalid source maps from terser-webpack-plugin (#45423)
This fixes a regression in our source map generating which got lost in
the big diff from the `src` folder restructure in
https://github.com/vercel/next.js/pull/44405

These invalid source maps broken plugins that attempted to leverage them
like `@sentry/nextjs` which only attempts in a production environment
15ec85bead/packages/nextjs/src/config/webpack.ts (L586)

For a regression test in a follow-up we will need to investigate a
production test fixture with `@sentry/nextjs` although this requires a
DSN be configured.

This also ensures we setup `unhandledRejection` and `uncaughtException`
listeners during build so that we have proper stack information when
these occur and the process isn't left hanging.

This also moves the `extensionAlias` config from
https://github.com/vercel/next.js/pull/44177 to an experimental config
as it seems to cause conflicts with ESM packages that define `exports`
in their `package.json` which can be considered a breaking change.

## Bug

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

Fixes: https://github.com/vercel/next.js/issues/45419
x-ref: [slack
thread](https://vercel.slack.com/archives/C03DQ3QFV7C/p1674937545579229)
2023-01-30 17:31:33 -08:00
Hannes Bornö
471e80f27b
Check message type before formatting server error (#45406)
Make sure it's an error with a message before formatting.

## 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-30 21:15:41 +00:00
Jiachi Liu
41e2613aca
Update robots meta and add verification rendering (#45409)
Follow up for: #45237

* Adding more fields for robots meta, most related to googlebot
* Add `me` and `yandex` field and render for verification field
2023-01-30 20:49:30 +00:00
JJ Kasper
d3a9f5a54a
Fix trailing slash redirect applying for data request (#45417)
This ensures we don't apply the trailing slash redirect for `_next/data`
requests as it can cause props to fail to resolve on client transition.
This also fixes `missing` fields not being applied correctly for
`headers` and `redirects` as the field wasn't being passed through.

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

Closes: https://github.com/vercel/next.js/pull/45398
Fixes: https://github.com/vercel/next.js/issues/45393
x-ref: https://github.com/vercel/next.js/issues/45340
2023-01-30 12:10:30 -08:00
Hannes Bornö
9e290f9f15
Enable more hydration error overlay tests (#45404)
## 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-30 18:50:54 +00:00
Hannes Bornö
72baaebb92
Move error recovery test to new file (#45407) 2023-01-30 09:00:08 -08:00
JJ Kasper
c7deecfd29
Fix flakey app metadata test (#45391)
We shouldn't use an arbitrary timeout here.

x-ref:
https://github.com/vercel/next.js/actions/runs/4038320521/jobs/6942258801
2023-01-29 20:57:23 -08:00
JJ Kasper
b0d951bccd
Fix nested example setup with create-next-app (#45390)
Noticed in https://github.com/vercel/next.js/pull/45387 we aren't
properly setting up nested examples due to not stripping to the right
level so this ensures we handle that case properly.
2023-01-29 11:54:28 -08:00
William Mbotta
87e0c3d6ee
Update example path for authsignal/passwordless-login (#45387) 2023-01-29 11:34:18 -08:00
JJ Kasper
13b32ba981
Ensure PATH env matches CI locally (#45376)
Since the tests are run with `pnpm test` locally this adds the repo's
`node_modules/.bin` to the PATH env variable although in CI `node
run-tests.js` is used which doesn't augment PATH like this so this
strips these from the env when running isolated tests to match behavior.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1674913457101449)
2023-01-28 19:47:13 -08:00
Jan Kaifer
1df93002a3
Revert "Fix release stats" (#45164)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-29 00:15:05 +00:00
Shu Ding
b8b13af109
Refactor TS plugin code structure (#45375)
This PR mainly refactors the TS plugin structure and moves things over the typescript/ folder under server/. I created a rules/ folder to separate different kinds of insights, current it covers:
- Intellisense for entries on the server layer:
  - Hide autocompletions for disallowed APIs such as `useState`
  - Show errors if these are used
- Intellisense for all entires:
  - Prop hints such as `params` and `searchParams` for pages, and named slots for layouts
  - Error for invalid props
- Intellisense for exported configs:
  - Autocompletion and docs for configs
  - Hover hints for configs
  - Error for invalid configs and extra exports
- Intellisense for client boundary modules
  - Warn if `"use client"` isn't on the top of other expressions
  - (**new**) Error for unserializable props passed to exported functions

## 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-28 22:44:42 +00:00
Clive Townsend
3421b482c2
Typo (#45380)
## Documentation / Examples

- [ ] 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-28 21:41:06 +00:00
JJ Kasper
b0cf24137e
Remove old CI workflows (#45377)
These workflows are no longer necessary as `react@next` is now included
in Next.js itself for app dir.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1674039337638229)
2023-01-28 12:27:12 -08:00
Tim Neutkens
83d6a437f2
Add shared mutable type in router-reducer (#45369)
<!--
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 that you're making:
-->

Preparation for making the mutable shared across the actions.

## 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-28 20:36:14 +01:00
JJ Kasper
2701792516
Update more flakey API support checks (#45373)
x-ref: https://github.com/vercel/next.js/actions/runs/4033048662/jobs/6933337411
2023-01-28 19:24:06 +00:00
Sean Coker
09f235d9be
Update with-redux example tsconfig to use strict: true (#45325)
I was updating one of my old next.js v3 apps to v13, and decided to play
around with RTK. Using the with-redux example sort of sets users up for
some weird typing issues as mentioned here:
https://github.com/reduxjs/redux-toolkit/issues/2862

I found that github issue _after_ reading through all the official RTK x
TS docs, and it seems it could have all been avoided with stricter
typing. I'm hoping RTK can add this bit to their docs soon.
2023-01-28 10:50:36 -08:00
Tim Neutkens
4972f2308e
Add support for --experimental-app-only (#45352)
<!--
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 that you're making:
-->

Allows you to `next build --experimental-app-only` which excludes
`pages` altogether. Useful for quickly debugging while migrating.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-28 10:48:32 -08:00
Lotte
67468f98c4
Add support for tsconfig 'nodenext' | 'node16' (#44177)
## ESM: support module option for tsconfig.json 

- fixes #37525
- fixes #41961

With [TypeScript 4.7 providing ECMAScript Module Support](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js), we can now set this in our tsconfig.json file for the [module](https://www.typescriptlang.org/tsconfig#module) option.

Webpack added "extensionAlias" to solve importing ts files with .js extension -> https://github.com/webpack/enhanced-resolve/pull/351



Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-01-28 16:17:40 +00:00
Tim Neutkens
b4c80c92cb
Move reducers to separate file per action (#45336)
<!--
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 that you're making:
-->

More cleaning / moving code around.

## 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-28 14:58:44 +01:00
Tim Neutkens
b8a1892e00
Enable file nesting for unit test files in vscode (#45329)
<!--
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 that you're making:
-->

Adds support for this type of nesting of files in the VSCode explorer.

![CleanShot 2023-01-27 at
10.52.05@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/VceFdFT9YKEsQBBXXDFJ/74cd9a65-094a-491e-aadd-d65ba63c5b9d/CleanShot%202023-01-27%20at%2010.52.05@2x.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-28 14:56:56 +01:00
Tim Neutkens
05e51ac14d
Move reducer types into separate file (#45333)
<!--
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 that you're making:
-->

Part of the larger refactor, moving the types around, no functional
changes in this PR.

## 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-28 11:45:12 +01:00
JJ Kasper
be86fcf6d5
v13.1.6 2023-01-27 18:25:45 -08:00
JJ Kasper
bcd63af2c9
Fix fetch stack test on deploy 2023-01-27 18:23:27 -08:00
JJ Kasper
6e73650833
v13.1.6-canary.3 2023-01-27 17:49:58 -08:00
Jan Kaifer
deb3b0237b
Update i18n example to handle public files and /api routes (#45266)
> Update i18n example to handle `public` files and `/api` routes
2023-01-28 01:38:10 +00:00
Shu Ding
6bcb06c19d
Limit the static paths worker number during development (#45344)
As per my testing, this saves about 150~210 MB memory for the dev server
as I have an 8-core CPU.

## 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-27 17:28:41 -08:00
JJ Kasper
23353771d7
Fix next-server trace including dev server dependencies (#45359)
This ensures we aren't including the `dev-server` dependencies in the
`next-server` tracing.

x-ref:
https://dev.azure.com/nextjs/next.js/_build/results?buildId=46884&view=logs&jobId=14d0eb3f-bc66-5450-3353-28256327ad6c
x-ref:
https://dev.azure.com/nextjs/next.js/_build/results?buildId=46889&view=logs&jobId=14d0eb3f-bc66-5450-3353-28256327ad6c
2023-01-27 17:25:44 -08:00
JJ Kasper
1404eedf79
Update flakey app prefetch test (#45361)
x-ref:
https://github.com/vercel/next.js/actions/runs/4028868244/jobs/6926255942
2023-01-27 16:18:27 -08:00
JJ Kasper
ca134f6dce
Update flakey API support tests (#45360)
x-ref:
https://github.com/vercel/next.js/actions/runs/4027758161/jobs/6923946045
2023-01-27 16:06:38 -08:00
Himself65
01cd4ab4cb
fix: next build in typescript 5.0 (#45275)
Related: ff92ab0ac9/src/compiler/types.ts (L6901)

Upstream: https://github.com/microsoft/TypeScript/pull/51901/files#diff-e9fd483341eea176a38fbd370590e1dc65ce2d9bf70bfd317c5407f04dba9560R6890

```shell
> @blocksuite/next-example@ build /Users/himself65/Code/blocksuite/packages/react/examples/next
> next build

info  - Linting and checking validity of types ..We detected TypeScript in your project and reconfigured your tsconfig.json file for you. Strict-mode is set to false by default.

The following mandatory changes were made to your tsconfig.json:

        - moduleResolution was set to node (to match webpack resolution)

warn  - TypeScript project references are not fully supported. Attempting to build in incremental mode.

> Build error occurred
Error: Debug Failure. Unexpected moduleResolution: node
    at resolveModuleName (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:39044:24)
    at Object.resolve (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:114797:47)
    at loadWithModeAwareCache (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:114837:40)
    at actualResolveModuleNamesWorker (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:115072:126)
    at resolveModuleNamesWorker (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:115389:22)
    at resolveModuleNamesReusingOldState (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:115541:77)
    at processImportedModules (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:117013:29)
    at findSourceFileWorker (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:116775:9)
    at findSourceFile (/Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:116640:22)
    at /Users/himself65/Code/blocksuite/node_modules/.pnpm/typescript@5.0.0-dev.20230125/node_modules/typescript/lib/typescript.js:116589:24 {
  type: 'Error'
}
info  - Linting and checking validity of types . ELIFECYCLE  Command failed with exit code 1.

Process finished with exit code 1
```



## 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`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-27 23:06:52 +00:00
JJ Kasper
b90b48e969
Remove invalid assertion/duplicate test suite (#45355)
x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1674855052585189?thread_ts=1674757022.781019&cid=C04DUD7EB1B)
2023-01-27 14:04:46 -08:00
Steven
1b750e18b1
fix: ncc compiled confg/schema-utils2/schema-utils3 (#45351)
This is currently failing on canary


https://github.com/vercel/next.js/actions/runs/4027328455/jobs/6923764729
2023-01-27 13:06:05 -08:00
JJ Kasper
8324b4f030
v13.1.6-canary.2 2023-01-27 10:51:08 -08:00
Leah
e42260c5c0
add turbopackLoaders to config validation (#45337)
unfortunately, we didn't know about this part 🙃
2023-01-27 14:20:30 +00:00
Tim Neutkens
bd50adabee
Clean up resolved todos (#45332)
These tests were added in #43845

## 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-27 13:25:06 +00:00
Tim Neutkens
a1c15d84d9
Add test for createOptimisticTree (#45330)
<!--
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 that you're making:
-->

Additional unit tests for the router reducer.

## 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-27 13:31:42 +01:00
Tim Neutkens
433a580bf8
Remove extra .ts from test file (#45328)
<!--
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 that you're making:
-->

Ensures this file nests correctly in vscode.

## 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-27 13:29:45 +01:00
JJ Kasper
ad12f48796
Add turbopack route resolve handling (#45314)
Relies on: https://github.com/vercel/turbo/pull/3446
2023-01-27 04:29:01 -08:00
Jiachi Liu
9822f78f1f
Resolve metadata fields (#45237)
## Feature

- [x] 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)
2023-01-27 12:57:48 +01:00
Tim Neutkens
f879e093d2
Ensure invalidateCacheBelowFlightSegmentPath file name is in line with the rest (#45299)
<!--
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 that you're making:
-->

Missed that this one was created with the wrong casing.

## 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-27 09:58:28 +01:00
Tim Neutkens
88a3fadef0
Remove unused optimistic tree parameters (#45264)
<!--
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 that you're making:
-->

Noticed that there were some leftover parameters. Removed them as
they're no longer needed.

## 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-27 09:52:57 +01:00
Tim Neutkens
c1737180b3
Add test for isNavigatingToNewRootLayout (#45305)
<!--
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 that you're making:
-->

Adds a test for isNavigatingToNewRootLayout.

## 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-27 09:52:39 +01:00
Tim Neutkens
0d635dffea
Add test for fillCacheWithNewSubTreeData (#45298)
<!--
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 that you're making:
-->

Follow up to moving router-reducer. This adds a unit test for injecting
the subTreeData.

## 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-27 09:33:01 +01:00
Tim Neutkens
a94b9db8ec
Add unit test for redirect.ts (#45223)
Adds a simple unit test for `redirect.ts` to test Graphite stacked
changes.

<!--
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 that you're making:
-->

## 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-27 09:32:40 +01:00
Tim Neutkens
a00daf7120
Add unit test for shouldHardNavigate (#45303)
<!--
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 that you're making:
-->

Similar to the other PRs. This adds a test for shouldHardNavigate. It
also removes the `treePatch` variable from the function as it was only
passed around, not used.

## 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-27 09:31:28 +01:00
JJ Kasper
ad2f145e4a
Ensure we warn for middleware with next export (#45288)
We currently don't make it obvious when next export is being leveraged
and middleware is present which won't work when deployed to a static
host so this ensures we warn the same way we do for API routes.

x-ref: https://github.com/vercel/vercel/pull/9319
2023-01-26 16:18:35 -08:00
Leah
160997bb96
add pageExtensions as a supported turbopack option (#45321)
depends on #45322
2023-01-26 15:16:14 -08:00