- 05 Jul, 2023 4 commits
-
-
vercel-release-bot authored
-
Tim Neutkens authored
## What? Uses a pre-created regex instead of having webpack run path-to-regexp on the list of patterns. Saves a few milliseconds. Adds `node_modules` to ignored in order to skip a lot of stat calls at the end of the compilation. This will likely have a big impact on applications using Yarn PnP as each stat call causes a lookup through `.pnp.cjs`.
-
Simon Vrachliotis authored
I read the PR checklist, but this is such a small PR that I feel it's self-explanatory. I believe the wrong function name (`generateMetadata`) is used on this page, and it was meant to be `generateImageMetadata`. If not... apologies
😅 -
Jiachi Liu authored
Remove the unnecessary added require hook
-
- 04 Jul, 2023 18 commits
-
-
Tobias Koppers authored
### What? fixes WEB-1258
-
Shu Ding authored
### Issue When the og module is a shared module being imported in both page and metadata image routes, it will be shared in the module graph. Especially in the edge runtime, since the `default` export is being used in the metadata image routes, then it can't be easily tree-shaked out. ### Solution Separate the image route to a separate layer which won't share modules with the page, so that image route is always bundling separately and the `@vercel/og` module only stays inside in that layer, when import image metadata named exports (size / alt / etc..) it can be still tree shaked. Co-authored-by:Jiachi Liu <4800338+huozhi@users.noreply.github.com>
-
Shu Ding authored
Add the missing `isValid` check. Fix NEXT-1214, fix #49489.
-
Shu Ding authored
By using a larger base we can have a shorter parameter with almost the same result space.
-
Alex Kirszenberg authored
## Turbopack updates * https://github.com/vercel/turbo/pull/5457 * https://github.com/vercel/turbo/pull/5458
-
Shu Ding authored
As discussed in https://vercel.slack.com/archives/C03ENM5HB4K/p1687999628589119 and #51910, it makes sense to have a known list for packages (mostly polyfills) that we know are having dynamic code (`eval`, `new Function`) but are safe to run in the Edge Runtime because that dynamic code will never be executed.
-
Tobias Koppers authored
### What? I forgot to update the `needs` in the workflow
-
Alex Kirszenberg authored
https://github.com/vercel/turbo/pull/5397 ## Turbopack updates * https://github.com/vercel/turbo/pull/5419 * https://github.com/vercel/turbo/pull/5397
-
Tobias Koppers authored
Reverts vercel/next.js#52005
-
Tobias Koppers authored
### What? These test cases are too unreliable --------- Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Zack Tanner authored
### What? When there's a parallel route adjacent to a tree that has no page component, it's treated as an invalid entry in `handleAppPing` during dev HMR, which causes an infinite refresh cycle ### Why? In #51413, an update was made to `next-app-loader` to support layout files in parallel routes. Part of this change updated the parallel segment matching logic to mark the parallel page entry as `[ '@parallel', [ 'page$' ] ]` rather than `[ '@parallel', 'page$' ]`. This resulted in `handleAppPing` looking for the corresponding page entry at `client@app@/@parallel/page$/page` (note the `PAGE_SEGMENT` marker) rather than `client@app@/@parallel/page`, causing the path to be marked invalid on HMR pings, and triggering an endless fastRefresh. ### How? A simple patch to fix this would fix this is to update `getEntryKey` to replace any `PAGE_SEGMENT`'s that leak into the entry which I did in 59a972f53339cf6e444e3bf5be45bf115a24c31a. The other option that's currently implemented here is to only insert PAGE_SEGMENT as an array in the scenario where there isn't a page adjacent to the parallel segment. This is to ensure that the `parallelKey` is `children` rather than the `@parallel` slot when in [`createSubtreePropsFromSegmentPath`](https://github.com/vercel/next.js/blob/59a972f53339cf6e444e3bf5be45bf115a24c31a/packages/next/src/build/webpack/loaders/next-app-loader.ts#L298). This seems to not cause any regressions with the issue being fixed in 51413, and also solves this case, but I'm just not 100% sure if this might break another scenario that I'm not thinking of. Closes NEXT-1337 Fixes #51951
-
Steven authored
This PR updates the vendored react dependencies using `pnpm sync-react` ### React upstream changes - https://github.com/facebook/react/pull/27028 - https://github.com/facebook/react/pull/27027 - https://github.com/facebook/react/pull/27019 - https://github.com/facebook/react/pull/26954 - https://github.com/facebook/react/pull/26987 - https://github.com/facebook/react/pull/26985 - https://github.com/facebook/react/pull/26933 - https://github.com/facebook/react/pull/26625 - https://github.com/facebook/react/pull/27011 - https://github.com/facebook/react/pull/27008 - https://github.com/facebook/react/pull/26997 - https://github.com/facebook/react/pull/26989 - https://github.com/facebook/react/pull/26955 - https://github.com/facebook/react/pull/26963 - https://github.com/facebook/react/pull/26983 - https://github.com/facebook/react/pull/26914 - https://github.com/facebook/react/pull/26951 - https://github.com/facebook/react/pull/26977 - https://github.com/facebook/react/pull/26958 - https://github.com/facebook/react/pull/26940 - https://github.com/facebook/react/pull/26939 - https://github.com/facebook/react/pull/26887 - https://github.com/facebook/react/pull/26947 - https://github.com/facebook/react/pull/26945 - https://github.com/facebook/react/pull/26942 - https://github.com/facebook/react/pull/26938 - https://github.com/facebook/react/pull/26844 - https://github.com/facebook/react/pull/25510 - https://github.com/facebook/react/pull/26932 - https://github.com/facebook/react/pull/26896 - https://github.com/facebook/react/pull/26913 - https://github.com/facebook/react/pull/26888 - https://github.com/facebook/react/pull/26827 - https://github.com/facebook/react/pull/26889 - https://github.com/facebook/react/pull/26877 - https://github.com/facebook/react/pull/26873 - https://github.com/facebook/react/pull/26880 - https://github.com/facebook/react/pull/26842 - https://github.com/facebook/react/pull/26858 - https://github.com/facebook/react/pull/26754 - https://github.com/facebook/react/pull/26753 - https://github.com/facebook/react/pull/26881 ### Related Closes #49409 (by https://github.com/facebook/react/pull/26977) fix NEXT-1189 Co-authored-by:
Shu Ding <g@shud.in>
-
Tim Neutkens authored
## What? Ensures the router instance passed for `next/navigation` in Pages Router is a stable reference. For App Router the router instance is already a stable reference, so making this one stable too would fix #18127. ## How? Added `React.useMemo` around `adaptForAppRouterInstance`, previously it was recreated each render but that's not needed for this particular case. The searchParamsContext and pathnameContext do need a new value each render in order to ensure they get the latest value. Fixes #18127 Fixes NEXT-1375
-
vercel-release-bot authored
-
Tim Neutkens authored
### What Support `scroll={false}` for Link component in app router. This can be used when you don't need to scroll back to top again when route url changes. For instance hash query changes, if you want to keep the scrolling as it is, you can use this option. ### How Handling the `scroll` option in navigation reducer on client side. Fixes #50105 Fixes NEXT-1377 --------- Co-authored-by:Jiachi Liu <inbox@huozhi.im>
-
Tobias Koppers authored
### What? Add all passing tests ### Why? We enforced that they all run turbopack and these are passing. If any of these tests would become red, that indicated a problem.
-
vercel-release-bot authored
-
- 03 Jul, 2023 15 commits
-
-
Steven authored
- Fixes #52116
-
JJ Kasper authored
Ensures when the cancelled status occurs we don't mark it as passed.
-
JJ Kasper authored
Removes usage of custom runner on final step as it's not necessary
-
Shu Ding authored
`antd` should be using `kebabCase`: https://unpkg.com/browse/antd@5.6.4/es/index.js This addresses the problem below as I tested locally: <img width="397" alt="CleanShot 2023-07-03 at 20 45 48@2x" src="https://github.com/vercel/next.js/assets/3676859/73ae99b9-0f3b-49ef-9675-9f45322b708d">
-
Shu Ding authored
Currently we are validating the `experimental.serverActions` flag when creating the actual entries for Server Actions, this causes two problems. One is that syntax errors caught at compilation time are still shown, even if you don't have this flag enabled. Another problem is we still traverse the client graph to collect these action modules even if the flag isn't enabled. This PR moves that check to be happening at compilation time, which addresses the two above but also brings the extra benefit of showing the exact span and module trace that errors: <img width="974" alt="CleanShot 2023-07-03 at 20 26 34@2x" src="https://github.com/vercel/next.js/assets/3676859/1676b1f6-e205-4963-bce4-5b515a698e9c">
-
Jiachi Liu authored
Reverts vercel/next.js#52139
-
vercel-release-bot authored
-
Jiachi Liu authored
Reverts vercel/next.js#52032 Will reland after the release
-
Chris Yang authored
<!-- 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(s) that you're making: ## For Contributors ### Improving Documentation - Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide ### Adding or Updating Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # --> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Alex Kirszenberg authored
See https://github.com/vercel/turbo/pull/5430 ## Turbopack changes * https://github.com/vercel/turbo/pull/5430 <!-- Alex Kirszenberg - ReverseTopological -> AdjacencyMap -->
-
vercel-release-bot authored
-
Jiachi Liu authored
### Issue When you edit .env* files, the pages under app dir that using env vars are not triggering hot reload ### Fix Triggering serverComponentChanges hot reload action when we detect env or tsconfig related change. There's a time period that we need to wait before the compilation is finished. First we save a flag `reloadOnDone` if we need to reload when after compilation is done, by determining if `envChange` is `true` (we already know this in dev server). Then in the compilation hooks, we refresh RSC page once it's finished. ### Extra change since we're checking `event.action` in client hot reloader, and throwing error for unknown action, filter devPagesManifestUpdate out from unexpected action as it sometimes triggered as error in console. Introduced in #51516 Fixes NEXT-1261
-
Jiachi Liu authored
As we moved to new CI runner in `#50436`, try to re-enable few flaky tests we disabled before
-
Alex Kirszenberg authored
See https://github.com/vercel/turbo/pull/5420 # Turbopack changes * https://github.com/vercel/turbo/pull/5420 * https://github.com/vercel/turbo/pull/5387
-
Shu Ding authored
-
- 02 Jul, 2023 3 commits
-
-
Tyler Lutz authored
Fix a broken link in optimizing index.mdx.
-
Tim Neutkens authored
Follow up to #50900. Based on https://github.com/vercel/next.js/issues/48748#issuecomment-1608783867
-
Shu Ding authored
In the dev server, we need to call `getStaticInfoIncludingLayouts` for the middleware file to extract its `matchers` field. However, that's currently executed in both app and pages workers. This method is expensive as it depends on the SWC binary to be loaded. This PR changes it to invoke it as an IPC method, so only the router worker (which runs the compilation) loads SWC, instead of all 3 of them. This also fixes duplicated console messages of: ``` Using locally built binary of @next/swc ``` For our test app, I'm seeing a 150~250ms improvement:  Haven't measured about the memory impact yet, but it should be a lot.
-