Commit graph

12580 commits

Author SHA1 Message Date
Tim Neutkens
a78ce92ede Revert "chore: make sure polyfills are built for pnpm dev (#40335)"
This reverts commit 24f573f8be.
2022-09-30 15:16:17 +02:00
Sukka
2c672c1d81
refactor: migrate eslint-plugin-next to typescript (#41046)
In #38647, @balazsorban44 has migrated the rule `no-img-element` to
typescript. The PR follows #38647 by migrating the entire
`eslint-plugin-next` to use typescript. Note it is still possible to
write new rules in javascript.

The PR does the following things:

- Migrates all `utils` to typescript
  - All previous JSDoc are also converted to the type definitions
- Creates a utility method `defineRule`
  - This is a stub function to provide the type check ability.
- With the `defineRule` we don't have to tediously import type
definition `Rule.RuleMetaData` and `Rule.RuleModule['create']` from
`eslint` anymore, `defineRule` will provide auto-complete and
typechecking for `meta` and `create`.
- Migrates all rules to typescript
  - Extra type guards are also added to make typescript happy.

All existing `eslint-config-next` unit test cases passed after the
migration.
2022-09-30 13:29:35 +02:00
Avi Avinav
cd04606d11
Add windicss example (#35256)
Adding windicss example.

This is my first pull request to next.js, so I am very sorry if I did something wrong.

## Documentation / Examples

- [X] Make sure the linting passes by running `yarn lint`


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-30 11:26:26 +00:00
Balázs Orbán
24f573f8be
chore: make sure polyfills are built for pnpm dev (#40335)
Utilize `turbo` for `dev`, and make sure polyfills are built. Fixes #40334

Another option would be to document that an initial `pnpm build` is necessary in  [`CONTRIBUTING.md`](https://github.com/vercel/next.js/blob/canary/contributing.md#developing).

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `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`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-30 02:03:47 +00:00
Balázs Orbán
73b473991c
chore: add build step to eslint-plugin-next (#38647)
Follow-up on https://github.com/vercel/next.js/pull/38534#pullrequestreview-1035020450

This lets us use modern JS/TS syntax in ESLint rules and avoid issues like #38530 and #36693

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `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`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

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


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-09-30 01:37:59 +00:00
Loren ☺️
05c2fe0b0f
Update examples/with-temporal (#33674)
Update `with-temporal` example to latest version of Temporal TS SDK API.

AFAICT, next.js doesn't yet support `type: "module"` in root `package.json`, so I added a nested `package.json` for Temporal.

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-30 00:53:32 +00:00
Jess Telford
1545af5803
Add Embedded KeystoneJS example (#25351)
## Documentation / Examples

- [x] Make sure the linting passes

See [the `README.md`](https://github.com/jesstelford/next.js/blob/cms-keystonejs-embedded/examples/cms-keystonejs-embedded/README.md)

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-30 00:45:36 +00:00
Diogo Cardoso
12f7e0d399
chore(examples): update with-mantine (#34591)
[Mantine ](https://mantine.dev/) is a fully featured React components
library.
This PR adds an example of Mantine + Next.js

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-09-30 02:38:56 +02:00
Janicklas Ralph
e0b7167075
Adding experimental size adjust based option (#41009)
Adding experimental `adjustFontFallbacksWithSizeAdjust` option
2022-09-30 00:35:50 +00:00
Henrique Holtz
eed539a0bb
[Examples] -> Add external official example with-react-query (#38101)
Add external and official example with
[react-query](https://react-query.tanstack.com/).

Note: [into the
contributing.md#adding-examples](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
don't have any specification to external examples. For example, to new
external examples, I need add some `.gitignore`? I really think that no,
maybe this information can be on the document above....

Another external example:
[with-material-ui](https://github.com/vercel/next.js/tree/canary/examples/with-material-ui)

Thanks,

Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-09-29 17:03:51 -07:00
Cupid Valentine
8422f233ef
Add NextUI example (#38209)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `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`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

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


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-29 23:59:15 +00:00
Kasper Andreassen
88ac118d1c
Add Enterspeed blog example (#35897)
# Demo: https://next-blog-demo.enterspeed.com/

Added `with-enterspeed` to examples.

Linked to `with-enterspeed` in related documentation:
- docs/advanced-features/preview-mode.md
- docs/basic-features/data-fetching/overview.md
- docs/basic-features/pages.md

Linked to `with-enterspeed` in related examples:
- examples/blog-starter/README.md
- examples/cms-agilitycms/README.md
- examples/cms-builder-io/README.md
- examples/cms-buttercms/README.md
- examples/cms-contentful/README.md
- examples/cms-cosmic/README.md
- examples/cms-datocms/README.md
- examples/cms-drupal/README.md
- examples/cms-ghost/README.md
- examples/cms-graphcms/README.md
- examples/cms-kontent/README.md
- examples/cms-prepr/README.md
- examples/cms-prismic/README.md
- examples/cms-sanity/README.md
- examples/cms-storyblok/README.md
- examples/cms-strapi/README.md
- examples/cms-takeshape/README.md
- examples/cms-tina/README.md
- examples/cms-umbraco-heartcore/README.md
2022-09-30 01:48:00 +02:00
Tim Neutkens
c5d2c2d926
Move handling of navigation to pages from new router (#41001)
Ensures the static generation case is covered. Checks
application/octet-stream client-side, if it's not does a full page
navigation.

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

## 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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-29 16:47:10 -07:00
Balázs Orbán
335e91800b
chore(examples): remove next-env.d.ts files (#41041)
They are added to `.gitignore` already. Follow-up on #39051


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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: JJ Kasper <jj@jjsweb.site>
2022-09-29 16:39:47 -07:00
Shu Ding
b18489461b
Make sure polyfills are added for browsers without module support (#41029)
This PR makes sure that the same polyfills are added in app dir for
browsers that match `nomodule`. Main difference from the polyfills in
pages is that the script tags here cannot have `defer` as all other
scripts will be async by default, and polyfills must be executed before
all of them.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [x] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-29 16:22:21 -07:00
Nicholas Ramkissoon
2af441cfb7
chore(examples): Convert with-react-hook-form example to TypeScript (#38796)
Converted `with-react-hook-form` example to TypeScript as it is pointed out in the contributing docs that examples
should be converted to TS.

- updated dependencies
- fixed/added types where necessary

## Documentation / Examples

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


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-29 23:09:57 +00:00
Balázs Orbán
4cb96fb047
chore(contributing): remove note about eslint-config-next
Since we don't prefer having ESLint as part of the examples anyway.
2022-09-30 00:59:13 +02:00
Atila Fassina
2fa33b351b
Add with-xata example (#39864)
This Pull Request adds a `with-xata` example to use [Xata](https://xata.io) as the data layer of a Next.js app.

## Documentation / Examples

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


Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-09-29 22:37:28 +00:00
Jaril
06607e3dd1
Add Replay integration for dev e2e tests (#40955)
<!--
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`

## 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`
- [ ] Integration 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`

## Documentation / Examples

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

@ijjk moving this here.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-29 14:45:10 -07:00
Jiachi Liu
79a85b73ad
Alias all client, shared, pages dist assets for esm (#41034)
Alias all existing imports from `next/dist/..` to `next/dist/esm` for edge compiler. So that we don't need checking for `process.env.NEXT_RUNTIME === 'edge'` or passing down `nextRuntime` to decide wether the esm or cjs asset to require

This will also fix the issue that some layouts hook are been included twice into the bundle with cjs and esm bundle in edge runtime, now only esm chunk will be bundled in server.
2022-09-29 21:24:04 +00:00
Trystan Rivers
26a23e98b0
chore/fix typo on contributing documentation (#41037)
Fixes #41038
2022-09-29 19:55:10 +00:00
Tim Neutkens
b4e53b796b v12.3.2-canary.15 2022-09-29 20:14:29 +02:00
Donny/강동윤
3f2fef19bc
chore: Update swc_core to v0.28.10 (#41016)
This PR updates swc crates to 447e2449d9
2022-09-29 14:09:20 +00:00
Tim Neutkens
6fa78a136a
Add test for rewrite from pages to app with existing pages path (#41023)
Rather specific test for when you incrementally migrate using middleware and only route to the `app` route based on some condition.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-29 12:29:10 +00:00
Balázs Orbán
596148c580
chore(examples): upgrade with-react-native-web dependencies (#41024)
Closes #41010

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-29 14:01:08 +02:00
Tim Neutkens
c889b31222 v12.3.2-canary.14 2022-09-29 13:26:46 +02:00
Tim Neutkens
6fefa98b36
Remove reload on serverComponentChanges in pages (#41020)
This caused unexpected full page reloads when viewing pages in `pages`. E.g. when navigating to `app`. Since `app` is the only place you can have server components now this is no longer needed.


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-29 10:49:52 +00:00
Jimmy Lai
42713fbf5f
misc: make useReducerWithDevtools noop on server (#41019)
Making this function a noop on server for bundle size gains with DCE since most of the code is in an useEffect and is not gonna run

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-29 10:08:44 +00:00
Shu Ding
e550222db7
Drop legacy React DOM Server in Edge runtime (#40018)
When possible (`ReactRoot` enabled), we always use
`renderToReadableStream` to render the element to string and drop all
`renderToString` and `renderToStaticMarkup` usages. Since this is always
true for the Edge Runtime (which requires React 18+), so we can safely
eliminate the `./cjs/react-dom-server-legacy.browser.production.min.js`
module there
([ref](https://unpkg.com/browse/react-dom@18.2.0/server.browser.js)).

This reduces the gzipped bundle by 11kb (~9%). Let me know if there's
any concern or it's too hacky.

<img width="904" alt="image"
src="https://user-images.githubusercontent.com/11064311/192544933-298e3638-13ba-436d-9bcb-42dfb1224025.png">


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `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`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

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

Co-authored-by: Jimmy Lai <laijimmy0@gmail.com>
2022-09-29 10:56:28 +02:00
JJ Kasper
c1c95bfd31
v12.3.2-canary.13 2022-09-28 23:18:47 -07:00
Janicklas Ralph
2df817ceb9
Docs for experimental font optimization adjustFontFallbacks (#40771)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-09-29 05:58:21 +00:00
JJ Kasper
8659d6f87a
Revert "chore: Update swc" (#41015)
It seems we may have regressed on perf in the WASM build as we are
seeing build timeouts in our tests

x-ref:
https://github.com/vercel/next.js/actions/runs/3148769274/jobs/5119807405
x-ref:
https://github.com/vercel/next.js/actions/runs/3148820726/jobs/5119928862

Reverts vercel/next.js#40983
2022-09-28 22:49:10 -07:00
Donny/강동윤
3d4dde8f69
chore: Update swc (#40983)
This PR updates SWC to
189f9b482f

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-28 22:03:50 -07:00
Lee Robinson
7424c4b6cd
Fix broken link in migration docs. (#41013)
https://vercel.com/templates/next.js/monorepo-turborepo
2022-09-29 02:35:09 +00:00
Tim Neutkens
be38f61c11
Use throw to trigger Suspense to avoid use() in reducer warning (#40950)
This is a temporarily fix as discussed with @sebmarkbage. It will be superseded by async reducer functions once that's added.




## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-29 00:21:41 +00:00
JJ Kasper
7e8eb2880f
Update flakey middleware rewrite test (#41007)
x-ref:
https://github.com/vercel/next.js/actions/runs/3145746703/jobs/5113484712
x-ref:
https://github.com/vercel/next.js/actions/runs/3142515940/jobs/5106284793
2022-09-28 14:48:25 -07:00
Hannes Bornö
299f392d7b
Add support for fallback font and css variable for font/local (#40990)
Adds support for generating a fallback font by providing font override
metrics for the given local font. Also adds support for providing a CSS
variable name that then can be accessed through the `.variable` export,
it contains the hashed font family name.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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: JJ Kasper <jj@jjsweb.site>
2022-09-28 12:19:52 -07:00
Miguel Oller
a89d760d60
Update cms-makeswift example (#41005)
Makeswift now uses Next.js' Preview Mode so there's no need for a
preview route. It also supports automatic on-demand revalidation with
the introduction of the Makeswift API handler.

## Documentation / Examples

- [x] Make sure the linting passes by running `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-09-28 11:33:08 -07:00
JJ Kasper
3fa19f4fed
Skip experimental undici test for deploy mode (#41006)
Skipping for now as the test doesn't work correctly in deploy mode. 

x-ref:
https://github.com/vercel/next.js/actions/runs/3145043013/jobs/5112533360
2022-09-28 11:28:06 -07:00
zoomdong
78cb07a4ca
chore: remove unsless @ts-ignore (#40992)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [x] Make sure the linting passes by running `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-09-28 17:53:08 +00:00
Jiachi Liu
fa19f172bc
Skip creating virtual app client entry for pages (#41000)
When there're only one edge route in `pages/` and one in `app/`, the virtual client entry is split into pages chunks which is not expected.
We should only create client virtual entries for `app/`, not `pages/`, now we skip the `pages/` entries for client entry now

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`
2022-09-28 17:03:21 +00:00
Tim Neutkens
ebf2b298cb v12.3.2-canary.12 2022-09-28 17:56:44 +02:00
Shu Ding
f0079a9caa
Add test case for react-server import condition (#40997)
The `react-server` condition for `exports` is already covered. This PR adds a new test case to cover the `imports` condition for internal dependencies.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [x] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-28 15:40:13 +00:00
Shu Ding
f7069c0279
Fix unused CSS module imports are tracked on the server (#40996)
Reported by @hanneslund, when a CSS modules file gets imported in server
components, during `collectClientComponentsAndCSSForDependency` in our
client entry plugin it will always be collected no matter it is used or
not. Due to the restriction that we have to collect these imports to
create the client entry, it has to run in the `finishMake` compiler
phase and at that time, module optimization hasn't started yet.

To fix that issue, we run another pass in `afterOptimizeModules` just to
collect CSS imports for the server style manifest and we can filter out
unused modules there.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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>
2022-09-28 17:06:10 +02:00
Tim Neutkens
5831097c25
Move pagesDir handling out of wrappedRender (#40995)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-28 16:30:49 +02:00
Shu Ding
daad117127
Fix wrong code condition used when bundling the server (#40987)
We observed this bug when using `.tsx` as the extension (currently the
condition only matches `.m?js`). Besides that, `react/jsx-runtime`
shouldn't be external too because it has React imported.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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>
2022-09-28 16:19:40 +02:00
Jimmy Lai
e8f85e3d9a
misc: add MANGLING_DEBUG option (#40958)
Context:

I am doing some work re: bundle size so I'm spending a lot of time looking at the bundles we generate. This debug options basically deactives mangling and beautifies the output whilst keeping the dead code elimination from Terser which is helpful for me to check what I'm removing.

this is what the output is like with it.

<img width="566" alt="image" src="https://user-images.githubusercontent.com/11064311/192574974-4ff50fb8-43b2-44fe-9df3-c9e3a1b593f8.png">


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-28 13:10:59 +00:00
Tim Neutkens
43dfc50179
Remove outdated warning (#40988)
Cleans up a leftover warning as it's no longer relevant to be shown at this particular spot.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `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`
- [ ] Integration 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`

## Documentation / Examples

- [ ] Make sure the linting passes by running `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-09-28 12:26:52 +00:00
Tim Neutkens
b79d72d4b3
Rename flight parameters to rsc/next (#40979)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-28 13:18:37 +02:00
Tim Neutkens
58d4736116 Revert "Fix"
This reverts commit 112589e2d9.
2022-09-28 13:14:22 +02:00