Commit graph

13582 commits

Author SHA1 Message Date
Yixuan Xu
599ca813ae
types: remove config.experimental.profiling (#44507)
This option was initialial added in #8378.

This pr removes `config.experimental.profiling` since this option is no
longer used.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-01-03 12:50:11 -08:00
Sukka
c728575599
refactor: add warning helper for removed experimental option (#44213)
Continues #44202, implements
https://github.com/vercel/next.js/pull/44202#discussion_r1053678383.

cc @styfle 

## 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-03 12:17:00 -08:00
Abir Taheer
0549a46632
Update TypeScript API Route example (#44517)
The existing example causes issues with eslint's `eslintimport/no-anonymous-default-export` rule that come pre-enabled with `create-next-app`.

Added a name to the api handler function before setting it as the default export.



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


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-01-03 20:03:44 +00:00
Tim Neutkens
08fb7b5bd8 Fix taskr watching core files 2023-01-03 15:52:18 +01:00
Hannes Bornö
4a9dc11235
Test server component error recovery in dev (#44155)
Test that server components can recover from syntax and component error.

## 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-03 12:45:50 +01:00
Jan Kaifer
a7b046d92e
Cache package lock when running tests to speed up installation (#44520) 2023-01-03 11:55:28 +01:00
Shu Uesugi
b6530bb35c
Add module transpilation docs (#44518)
Module transpilation docs were missing from the [compilers documentation](https://nextjs.org/docs/advanced-features/compiler). The text was mostly copied from the [Beta docs](https://beta.nextjs.org/docs/api-reference/next.config.js#transpilepackages).
2023-01-03 09:29:24 +00:00
Tim Neutkens
efcec4c1e3
Move core files to src folder and move JS files to TypeScript (#44405) 2023-01-03 10:05:50 +01:00
Arda TANRIKULU
00d7a35ed7
Use the stable GraphQL Yoga v3 in the GraphQL example (#44488)
Use the stable GraphQL Yoga v3 in the GraphQL example, and also disable body parser for fully functionality as in GraphQL Yoga's recipe for Next.js;
https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-nextjs#example


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-01-03 00:53:12 +00:00
김형록
3dfb85d082
Update .gitignore in pwa example (#44391)
The files created when running the app using next-pwa should not be added to git, so I added them to `.gitignore`.

Updated by referring to https://github.com/shadowwalker/next-pwa/blob/master/.gitignore.
2023-01-03 00:39:44 +00:00
BrandNewLifeJackie26
b0560399b0
docs: Update GitHub CLI clone command in developing.md (#44509)
Closes #44469



## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
2023-01-03 00:07:59 +00:00
Tim Neutkens
b2e9431bb4
Update license year (#44403) 2023-01-01 11:12:49 +01:00
Bradley Dirheimer
f7b654e875
Update get-api-cookie.ts (#44466)
Added the types for req and res.



## 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`
- [x] The "examples guidelines" are followed from [our contributing doc]

Here is the documentation followed [Nextjs Link](https://nextjs.org/docs/basic-features/typescript)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-01-01 00:58:38 +00:00
IDrumsey
fd018fd6cb
Fix link to next-image-to-legacy-image codemod (#44471)
For the upgrade guide for 12 to 13, there's a link pointing to the next-image-to-legacy-image, but the fragment link isn't correct. See [this](https://nextjs.org/docs/upgrading#image-component:~:text=next%2Dimage%2Dto%2Dlegacy%2Dimage%3A) which links to `#rename-instances-of-nextimage` which doesn't look like it goes anywhere.



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


**Do I need to run the `pnpm build && pnpm lint` for this?**
2022-12-31 21:15:43 +00:00
Lee Robinson
f8647a30e3
Update Turbopack docs. (#44468) 2022-12-31 19:14:02 +00:00
JJ Kasper
50857dad46
Fix isolated tests on windows and update azure config (#44457)
Fixes handling in isolated tests for windows and adds initial setup to run the main `app-dir` test suite. Also adds retrying when fetching test timings fails due to rate limiting. 

Closes: https://github.com/vercel/next.js/pull/44331
2022-12-31 08:12:42 +00:00
Nora Söderlund
448c9c82ed
Added actual error message to log output (#44453)
Fixes #44452
2022-12-31 00:02:11 +00:00
Junya Kono
554d061326
docs: add pnpm to template readme (#44427)
Add pnpm command to execute npm script



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


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-12-30 22:14:25 +00:00
france1 [ARCH]
3e1a5bd69a
uses spelling (#44399)
use => uses
2022-12-30 21:26:25 +00:00
Lee Robinson
bd60e31ac0
Update next/head docs. (#44454)
`<meta name="viewport" content="initial-scale=1.0, width=device-width" />` is added by default in `pages`.
2022-12-30 20:18:06 +00:00
Dmitry
87a419f821
fix link to index page in Image Component Example (#44388)
## Documentation / Examples
On [Image Component Example README](https://github.com/vercel/next.js/tree/canary/examples/image-component) was a old link to index.js file, instead of index.tsx, changed old link to a new, now page exist, insteadof 404.

- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc]
2022-12-28 15:35:23 +00:00
Steven Eubank
d3c292dd4a
Update with-sentry README.md Next.js version (#44374)
Clarify requirement and move down, since Next.js versions <10 are already quite dated
2022-12-27 14:40:43 +00:00
조계진
1addb78a49
Update custom-app.md (#44351)
According to [Upgrade Guide](https://nextjs.org/docs/upgrading#remove-supercomponentdidcatch-from-pages_appjs), `componentDidCatch` has been deprecated and is no longer needed. So I propose that this line get deleted in [Custom App](https://nextjs.org/docs/advanced-features/custom-app) of docs.



## 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)
2022-12-27 00:45:10 +00:00
Shu Ding
84531c5301
Add special error message for class component in server component (#44265)
This PR adjusts the error message so it's more accurate and makes more sense. Current error:

> You're importing a component that needs Component.

New:

> You’re importing a class component.

NEXT-317

## 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)
2022-12-24 14:18:34 +00:00
Tim Neutkens
4ac737ee6b v13.1.1 2022-12-24 10:30:43 +01:00
Tim Neutkens
f0a8b7ec6e v13.1.1-canary.1 2022-12-24 10:28:44 +01:00
Steven
b0a1e99606
Fix next/image 404 when basePath and trailingSlash defined (#44312)
- Fixes #36681
2022-12-23 23:04:26 +00:00
Shu Uesugi
f0aa10b216
Remove experimental for modularizeImports from docs and example (#44311)
When `modularizeImports` was moved out of experiimental [on this PR](https://github.com/vercel/next.js/pull/44240), `docs` and `examples` were not updated.

- Update `modularize-imports` example by removing `experimental` from `next.config.js`, as it's currently failing when deployed
- For docs: https://nextjs.org/docs/advanced-features/compiler#modularize-imports
  - Move `Modularize Imports` section outside of `Experimental Features` section 
  - Remove `experimental` from code snippets
  - Added to version history, just like when SWC Minifier became stable.

## 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)
2022-12-23 20:46:18 +00:00
Shu Ding
44548dda36
v13.1.1-canary.0 2022-12-23 21:04:56 +01:00
Shu Ding
00b2113841
Fix CSS resource path not matched in __entry_css_files__ (#44310)
Currently we use `this.appDir + entryName` as the key of app entries. The `appDir` part is an absolute path which contains `\` in Windows, but `entryName` is a general entry name for Webpack, like `app/page`. A quick fix is to replace all `/` in the entry name with the current system separator.

Confirmed that it fixed the problem in Windows.

## 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)
2022-12-23 19:55:59 +00:00
Steven
fd0d0f5a87
Exclude srcset from svg image (#44308)
The default behavior for svg is `dangerouslyAllowSVG: false` which means we won't try to optimize the image because its vector (see #34431 for more).

However, svg was incorrectly getting the `srcset` attribute assigned which would contain duplicate information like:

```
/test.svg 1x, /test.svg 2x
```

So this PR makes sure we treat svg the same as `unoptimized: true`, meaning there is no `srcset` generated. Note that this PR won't change the behavior if `loader` is defined or if `dangerouslyAllowSVG: true`.
2022-12-23 16:57:16 +00:00
Hassan El Mghari
8a9133ddb3
Updated dependencies for with-tailwindcss example (#44289)
Updated dependencies for tailwindcss and typescript.
2022-12-23 02:08:26 +00:00
Jan Kaifer
fd9ec646ac
Use turbo for packing files in test setup (#44074) 2022-12-22 16:36:24 +01:00
Tim Neutkens
02489c2f4a v13.1.0 2022-12-22 15:57:47 +01:00
Tim Neutkens
87ca16ff8d v13.0.8-canary.5 2022-12-22 15:36:13 +01:00
Tobias Koppers
3020c44df1
update with-turbopack example for postcss/tailwind support (#44261) 2022-12-22 13:20:15 +01:00
Tim Neutkens
0572e218af v13.0.8-canary.4 2022-12-22 08:35:43 +01:00
Tobias Koppers
6349db80d6
update turbopack for bugfixes (#44251) 2022-12-22 05:08:48 +00:00
JJ Kasper
13a3a9c97a
v13.0.8-canary.3 2022-12-21 16:55:10 -06:00
OJ Kwon
152411ca6c
build(cargo): update turbopack (#44241)
This PR bumps up turbopack to latest release candidate. Requires https://github.com/vercel/next.js/pull/44223.

## 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)
2022-12-21 21:26:49 +00:00
Tobias Koppers
e8b2387611
Update config validation for latest turbopack changes (#44223)
* remove postcss and tailwind warnings
* update list of supported config options
2022-12-21 14:46:18 -06:00
Shu Ding
7c8d0062cf
Move modularizeImports out of experimental (#44240) 2022-12-21 21:44:35 +01:00
Tim Neutkens
9ee4c0cdf1
Enable allowMiddlewareResponseBody by default (#44224)
Follow-up to #44195


## 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)
2022-12-21 18:40:58 +00:00
JJ Kasper
52fb820b41
Add docs for middleware flags (#44235)
x-ref: https://github.com/vercel/next.js/pull/44195

## 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)
2022-12-21 17:54:15 +00:00
Jan Kaifer
8049ad3048
Update labeler.json with current next.js team members (#44231)
I added everyone from
https://github.com/orgs/vercel/teams/next-js-engineering/members

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-12-21 18:12:20 +01:00
Jiachi Liu
c24643ecff
Only once for the next/head usage in app dir (#44233)
Follow up for #43885

* only warn once for `next/head` usage in the loader
* add `Warning:` prefix
2022-12-21 17:23:28 +01:00
Shu Ding
e27c7fa61b
Honour distDir in type generation (#44207) 2022-12-21 16:01:59 +01:00
Jan Kaifer
2c70bc784c
Write tests for navigation between app-dir and pages (#43881)
- Add test for navigating app -> pages
- Add test for navigation pages -> app
- Remove unneeded React imports
- Document back and forward on the BrowserInterface
- Add test for navigating back and forth between pages and app pages using `back` and `forward`
2022-12-21 14:10:25 +00:00
Jan Kaifer
f07f69dd0f
Add test checking that repeated edits won't cause hydration issues (#44189) 2022-12-21 14:17:50 +01:00
Jan Kaifer
6713ce4cab
Move tests into their test folder (#44183) 2022-12-21 14:16:52 +01:00