Commit graph

11803 commits

Author SHA1 Message Date
JJ Kasper
3ae15e16ee
Fix e2e rsc test for deploy mode (#38538) 2022-07-12 09:40:53 -05:00
Tim Neutkens
114e151c23 v12.2.3-canary.2 2022-07-12 14:46:07 +02:00
Tim Neutkens
cd5709825c
Handle development error when Server Component throws (#38550)
Handles the case where an error is introduced which causes a Fast Refresh and then it's fixed.


## 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-07-12 12:44:53 +00:00
Shu Ding
c2b40d0773
CSS modules support improvements for Server Components (#38536)
Improve CSS modules support in server components.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] 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: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2022-07-12 09:42:46 +00:00
Donny/강동윤
9342a6ccc7
feat(next-swc/auto-cjs): Detect __esModule (#38181)
## 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)

---

 - Closes #38117
2022-07-12 03:17:09 +00:00
JJ Kasper
883a52ede9
v12.2.3-canary.1 2022-07-11 18:12:44 -05:00
Balázs Orbán
08e69cfdbb
chore: extend example contribution guidelines (#38511)
Trying to create more consistency in our examples.

## 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-07-11 23:05:09 +00:00
Balázs Orbán
e7b6b1939d
fix: don't use optional chaining in ESLint rule (#38534)
Fixes #38530

Should we consider adding a build-step to lint rules to be able to use TS/modern JS?

## 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-07-11 22:59:33 +00:00
Daniel Cavanagh
3075c3ff71
Note about manually passing props from custom app (#37329)
I've wasted a couple of hours trying to work out why my static build wasn't passing through the props automatically as the docs say it should

Turns out it's the default app doing that and a custom app has to manually passed the props through

It wasn't obvious to me to look in the custom app doc where it's mentioned, so I've added a small note to the `getStaticProps` doc about this that points to the custom app doc

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-07-11 22:26:12 +00:00
JJ Kasper
1c1fbeb4de
Add note about standalone + runtimeConfig caveat (#38532)
## 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.md#adding-examples)

x-ref: https://github.com/vercel/next.js/issues/38119
2022-07-11 21:51:26 +00:00
OJ Kwon
68047112d6
refactor(next/swc): disable default features for crash report (#38531)
As we have disabled crash reporter for now, this PR removes feature from `default` to not to include it in `next-swc` as well. Feature itself remains so we can adjust it later by enabling it depends on the progress.

## 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-07-11 21:29:50 +00:00
Sanjaiyan Parthipan
8ee05b749b
Update some dependencies' versions :) (#38427)
Hi,

I have updated some version of packages. 

- @swc/helper
- json5
- terser
- postcss
- nanoid
- use-sync-external-store (ReactJs pollyfill)
- microbundle

Updated version of #38328 

_Extremely sorry if I made any mistakes :(_

Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2022-07-11 20:32:49 +00:00
JJ Kasper
9222ca9f3f
Add dev/start timing to PR stats (#38525)
* Add dev/start timing to PR stats

* get port for dev

* add dep

* update field names
2022-07-11 14:54:57 -05:00
OJ Kwon
0036a3d136
fix(next/build): correct payload for plugin telemetry (#38468) 2022-07-11 12:39:02 -05:00
Jiachi Liu
0797b1a6c8
skip rsc tests for react 17 e2e (#38524)
Fix flaky rsc test in react 17 e2e tests

x-ref: https://github.com/vercel/next.js/runs/7285946966?check_suite_focus=true
2022-07-11 17:32:34 +00:00
Thiago Morales
645f70128f
Pass missing incrementalCacheHandlerPath to IncrementalCache instance (#38433)
# Description
Hi guys! First all, thanks for provide a way to use some custom external cache resource for ISR feature. _(done here: https://github.com/vercel/next.js/pull/37258 and https://github.com/vercel/next.js/pull/37326)_

I managed to get it working by creating my custom external cache resource _(using redis)_ that implements the new `CacheHandler`. _(overriding my own `get` and `set` methods and using the FileSystemCache as fallback as well)_  

I'm planning to release some kind of plugin to encapsulate and parse the client's `next.config.js` and bring an initial support for redis using this new Next.js feature.

So, I really don't know if this was intentional, but I noticed that the new `incrementalCacheHandlerPath` prop wasn't passed to the `IncrementalCache` instance in `base-server`.

This PR just connects the wires for this feature, and also provide the default value (`undefined`) to the relative experimental prop config. _(to avoid the warnings as shown below)_

<img width="858" alt="Screen Shot 2022-07-07 at 19 37 46" src="https://user-images.githubusercontent.com/4661217/177882897-831ade73-26ba-493a-b0cf-3de62cfd708f.png">
2022-07-11 16:53:17 +00:00
JJ Kasper
a622c26d23
Add docs condition for all azure steps (#38519) 2022-07-11 11:15:25 -05:00
Jiachi Liu
409d37615b
Enable css import in rsc server side (#38418)
* Enable css in server components

* inject server css into flight

* refactor and fix test

* fix lint

* resolve css from module deps

* fix dev & prod inconsistentce, collect client css

* simplify

* dedupe duplicated css chunks

* remove ssr link injection and css flight

Co-authored-by: Shu Ding <g@shud.in>
2022-07-11 17:23:21 +02:00
Donny/강동윤
f694e6c42f
chore(deps): Update swc (#38347)
This PR updates swc to fa66ee86e5
2022-07-11 15:10:57 +00:00
JJ Kasper
9036924c71
Fix rsc test during deploy testing (#38517) 2022-07-11 09:50:25 -05:00
JJ Kasper
fc91757299
Update CI job skipping based on related changes (#38479)
* Update CI job skipping based on related changes

* add for azure too

* update value

* simplify docs change value

* update value for swc as well
2022-07-11 09:42:51 -05:00
Tim Neutkens
0887d283e1 v12.2.3-canary.0 2022-07-11 14:35:12 +02:00
Tim Neutkens
b014343259
Handle dynamic routes / catchall routes in on-demand-entries (#38512)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-07-11 14:34:10 +02:00
Alex Johansson
d2eb7861c3
Fix url of tRPC's next-minimal-starter (#38452)
Fix url of tRPC's `next-minimal-starter`

## 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)
2022-07-11 12:30:16 +00:00
Tim Neutkens
419765affe
Add refreshing of Server Components (#38508)
* Add todo

* Reload page when server component changes

* Implement router.reload() that refreshes full tree
2022-07-11 14:02:46 +02:00
Cupid Valentine
7e47b861d5
Update api-middlewares.md (#38499)
## 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)
2022-07-11 11:18:56 +00:00
Max Proske
1d8df75bfd
chore(examples): Convert api-routes example to TypeScript (#38083)
Converted API Routes example over to TypeScript to match the Contribution guidelines.

## 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)
2022-07-11 10:40:52 +00:00
stefanprobst
dc3bd761b4
fix: fix bundle-analyzer plugin types (#38255)
* chore: fix bundle-analyzer types

* Add test for bundle analyzer type

* fix lint

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-10 14:13:24 -05:00
Tim Neutkens
2d9875983c
Handle on-demand-entries and error overlay for server components (#38480) 2022-07-10 19:18:48 +02:00
OJ Kwon
d920a17162
build(ci): enable rustls as default (#38471)
* build(ci): enable rustls as default

* test build
2022-07-09 16:24:38 -05:00
JJ Kasper
06d2380937
Update flakey unoptimized image test (#38478) 2022-07-09 11:10:11 -05:00
Mihai C
d7568d8058
chore: update file references in Auth0 example README (#38476)
chore: update file references from README
2022-07-09 10:06:54 -05:00
Jiachi Liu
1cd37793a4
Fix app dir page detection (#38475)
## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-07-09 14:58:16 +00:00
Tim Neutkens
8282c819fd
Remove dynamic params from query in new router (#38466)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-07-09 14:33:51 +02:00
Jiachi Liu
f7de771beb
Migrate rsc integration tests to e2e tests (#38460)
* Migrate rsc integration tests to e2e tests

* skip image test

* remove image page

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-07-09 14:02:30 +02:00
Tim Neutkens
689626c6a4 v12.2.2 2022-07-09 13:18:55 +02:00
Tim Neutkens
4e21a240a5 v12.2.2-canary.0 2022-07-09 11:44:49 +02:00
OJ Kwon
05759e09bf
fix(next/build): disable next-swc crash reporting temporarily (#38472)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2022-07-09 10:32:10 +02:00
Houssein Djirdeh
5155a88ab0
[Docs] Adds mention of INP to "Measuring Performance" page (#38464)
* adds mention of inp to measuring performance docs

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-08 15:00:01 -05:00
Steven
2fa96822e7
Fix warning next/future/image semicolon (#38454)
## Bug

- [x] Fixes #38404
- [x] Fixes #38431 
- [x] Integration tests updated
2022-07-08 16:24:03 +00:00
Tim Neutkens
050d13e0c8
Make catchall parameters consistent with existing router (#38456)
Ensures catchall parameters are passed as an array to `params` instead of as a string.


## 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-07-08 14:47:21 +00:00
Tim Neutkens
a4668f29b6
Add handling for back/forward (popstate) between old and new router (#38453)
Handles the case where you navigate between routes in `pages` and `app`.



## 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-07-08 13:54:52 +00:00
Max Proske
bb0013f5fa
chore(examples): Convert api-routes-graphql example to TypeScript (#38357)
Convert `api-routes-graphql` example to TypeScript to match Contribution docs.

## 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)
2022-07-08 11:44:39 +00:00
Max Proske
b8efd80c16
Convert api-routes-rest example to TypeScript (#38394)
Converted `api-routes-rest` example to TypeScript to match Contribution docs.

## 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-07-08 11:06:40 +00:00
JulioCabanillas
65ea43f6d5
docs: add trpc to examples (#38272)
## 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)

Nice to have nextjs up to date always!

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-07-08 11:00:01 +00:00
Marcos Bérgamo
34e296be2d
fix(examples/with-playwritght): use PORT env variable and fall back to 3000 (#38107)
## Documentation / Examples

- [x] Related issues linked using `fixes #37952`
- [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)
2022-07-08 10:53:59 +00:00
Mathis Møller
4f09f95d6c
examples(with-jotai): Update example (#38398)
Updates `jotai` example.

## 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)
2022-07-08 10:47:58 +00:00
Tim Neutkens
b421fa27fb
Add support for optional catchall with new router (#38444)
Follow-up of #38439.

Found a small issue with booting `next start` that is now resolved.
Also added optional catchall routes support.



## 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-07-08 10:29:41 +00:00
Jiachi Liu
3da3df2359
Fix client entry point prefix (#38445)
client prefix should depend on the pages type
2022-07-08 10:08:37 +00:00
Lee Robinson
979da91369
Update i18n routing example with Middleware. (#38419)
https://github.com/vercel/next.js/discussions/18419#discussioncomment-3092971

Co-authored-by: Balázs Orbán <18369201+balazsorban44@users.noreply.github.com>
2022-07-08 09:39:44 +00:00