- 27 Apr, 2023 3 commits
-
-
vercel-release-bot authored
-
JJ Kasper authored
This ensures we set the pre-bundled react env variable early enough when in a deploy environment as otherwise incorrect react versions could be initialized with app directory. Test deployment with fix can be seen here https://metadata-dynamic-lsbqdamud-vtest314-ijjk-testing.vercel.app/dynamic/test This re-adds the patch we were doing before https://github.com/vercel/next.js/commit/b5f7f8448560d4ec6bc875cbffe3aa18da8971cf#diff-90d1d5f446bdf243be25cc4ea2295a9c91508859d655e51d5ec4a3562d3a24d9 No additional tests were added here as existing e2e deploy tests were failing without this. Fixes: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1682546721052149) Fixes: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1682539142269669) Fixes: https://github.com/vercel/next.js/issues/48872
-
Sebastian Markbåge authored
The prefetch method is currently an async method but there's nothing to await. It's updated out-of-band. It shouldn't return a Promise. I also found a console.log that looked out of place.
-
- 26 Apr, 2023 16 commits
-
-
Jiachi Liu authored
### Why Default font file of `@vercel/og` is not loaded, because the og package is bundled by webpack and we should external it so that `fs.readFileSync` is bundled and manged that can't be traced by nft. ### How This PR externals `@vercel/og` so that they don't need to be bundled and files can be properly traced Closes NEXT-1047 Fixes #48704
-
Tobias Koppers authored
### What? * https://github.com/vercel/turbo/pull/4700 <!-- Tobias Koppers - update deps --> * https://github.com/vercel/turbo/pull/4706 <!-- Tobias Koppers - make library code less verbose in stack traces --> * https://github.com/vercel/turbo/pull/4705 <!-- Tobias Koppers - improve error handling in update stream --> * https://github.com/vercel/turbo/pull/4667 <!-- Caleb Webber - remove box_syntax --> * https://github.com/vercel/turbo/pull/4714 <!-- Tobias Koppers - chunk hash need to include availability root --> * https://github.com/vercel/turbo/pull/4709 <!-- Alex Kirszenberg - Allow the dev server socket to be reused immediately --> * https://github.com/vercel/turbo/pull/4716 <!-- Tobias Koppers - errors lead to consistent exit code in issue detail -->
-
OJ Kwon authored
### What? WEB-953. This PR moves, bubbles up unsupported package warning from turbopack to next-core using resolve plugin. Featurewise it behaves same, however removes turbopack aware specific next.js package (`@vercel/og`) internally.
-
Jiachi Liu authored
### What For dynamic routes you might have different sitemap for different params * Unloack using `sitemap.[ext]` in your app everywhere * Support `generateSitemaps()` to create multiple sitemaps at the same time ### How * Change the metadata regex to allow use sitemap in every routes * Similar approach to `generateImageMetadata`, we make `sitemap.js` under dynamic routes to a catch all routes, and it can have multiple routes Closes NEXT-1054
-
Shu Ding authored
This PR changes `mutableCookies` from `RequestCookies` to a `ResponseCookies` instance, and it now accepts extra options for each cookie. Take a look at the tests for more details. cc @styfle --------- Co-authored-by:Steven <steven@ceriously.com>
-
JTaylor0196 authored
### What? Updates Deploy button URLs for all listed examples here: https://github.com/vercel/next.js/tree/canary/examples ### Why? The Deploy URLs are currently broken and result in a failed clone attempt on Vercel. ### How? The URLs have been changed from https://vercel.com/new/git/external?… to -> https://vercel.com/new/clone?… (Last updated [here](https://github.com/vercel/next.js/commit/8eaabe2fb0fb3a1d9f4931a332e608395813a3b9) in 2021)
-
Tobias Koppers authored
### What? missing aliases for app dir functionality ### Why? ### How?
-
Kiko Beats authored
This PR make possible to use WebSocket in an Edge Function
🙂 -
Martin Wahlberg authored
### What? Added missing `that` to documentation for getStaticProps ### Why? This change fixes grammar. ### How? Updated the text.
-
OJ Kwon 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 or adding/fixing 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 ### Why? ### How? Closes NEXT- Fixes # --> ### What? This PR is necessary changes to apply https://github.com/vercel/turbo/pull/4662. Need turbopack bump to make CI pass. --------- Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Shu Ding authored
Similar to #47922 but based off the latest server implementation and #48626: > This PR implements the MutableRequestCookies instance for cookies() based on the current async context, so we can allow setting cookies in certain places such as Server Functions and Route handlers. Note that to support Route Handlers, we need to also implement the logic of merging Response's Set-Cookie header and the cookies() mutations, hence it's not included in this PR. > > fix [NEXT-942](https://linear.app/vercel/issue/NEXT-942) This PR also adds the same support for Custom Routes. cc @styfle. fix NEXT-942, fix NEXT-941.
-
Tim Neutkens authored
## What? When investigating #48852 I found that when there's a `segmentPath` set in the `focusAndScrollRef` it would compare that entire path with the `segmentPath` of the layout-router. This logic works in cases where the entire page is rendered but doesn't take into account cases where for example a suspense boundary is triggered below the common layout. Because of the order `useEffect` is run in we can already assume that if a more specific match existed it would have scrolled there. As that is not the case in e.g. #48852 it ended up opting out of scrolling entirely. In order to fix that the logic needs to be different, it needs to check if the layout-router's `segmentPath` matches, if it matches every level then we can apply scrolling in that layout-router. ## How? Implemented the opposite of the current logic, running `.every` on the layout-router segmentPath instead of on the router provided segmentPath. Fixes #48852 Fixes NEXT-1053 Related PR #48862 <!-- 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 or adding/fixing 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 # -->
-
Jan Kaifer authored
Fix issues where saving next.config.js too quickly could result in multiple dev servers running at once (#48857) We were adding filling in our cleanup function after we started our server. So If we restarted while the server was starting, we would fire an empty cleanup function which would lead to the server not being cleaned up (once it starts). The only slight issue is that it won't watch for changes while cleaning up the previous run (waiting for the server from the last run to start and finish). fix NEXT-1052
-
vercel-release-bot authored
-
- 25 Apr, 2023 12 commits
-
-
Shu Ding authored
Fixes the ``` TypeError: Cannot read properties of undefined (reading 'strict') at writeConfigurationDefaults ``` error. Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Shu Ding authored
This PR adds an `AsyncLocalStorage` wrapper to the action handler, so underlying function calls can tell if it's running in that.
-
Shu Ding authored
It makes more sense to use the `FormData` from `@edge-runtime/primitives` to ensure the version and implementation are aligned, and avoid importing extra modules (as we always import the Edge Runtime).
-
Tobias Koppers authored
### What? Fix the query for app dir ### Why? it's not correct in app dir
-
Shu Ding authored
Part of #47759 (which had been reverted twice so here we only land a part of the change), relates to NEXT-926. Thanks to #48506 we can soon switch between these two channels during runtime. Also fixes a problem of `renderKind` (only revealed after upgrading React), it should be also based on the `match` kind.
-
Shu Ding authored
This is currently an overhead, that we check a module's layer (`mod.buildInfo.rsc?.type === RSC_MODULE_TYPES.client`) and put all client modules in the client reference manifest, but the manifest is only used for accessing these entry modules. So here we change the util to check if it's an client entry instead. With this change the client manifest of a test app decreased from 177 KB to 70 KB. Ref: https://github.com/vercel/next.js/blob/5b609e264f56e6e7c6e230d88ad444650b5b6ba9/packages/next/src/build/analysis/get-page-static-info.ts#L50-L64
-
Jiachi Liu authored
Improve array resolving in metadata, remove ts comments for errors
-
vercel-release-bot authored
-
Tim Neutkens authored
### What? Mux reported that their website does not scroll to hash when clicking a search result. Found it's related to `server-patch` triggering and overriding the hashFragment. That should be preserved similarly to `apply`. ### How? handleMutable had a default of `null` instead of using the existing value. It should use the existing value.
-
Donny/강동윤 authored
### What? Update `@swc/helpers` to `v0.5.1`. ### Why? Webpack merges `@swc/helpers@v0.4.x` and `@swc/helpers@v0.5.x`, due to `resolve.alias` config in https://github.com/vercel/next.js/blob/2f6ff0dab330b854c43a1773be2fe739c3582419/packages/next/src/build/webpack-config.ts#L1070-L1072 To workaround it, `@swc/helpers@v0.5.1` reexports from entries just like `v0.4`. ### How? Closes WEB-948 Fixes #48593
-
vercel-release-bot authored
-
- 24 Apr, 2023 9 commits
-
-
vercel-release-bot authored
-
Steven authored
This should fix the following error: ``` npm ERR! 422 Unprocessable Entity - PUT https://registry.npmjs.org/@next%2fswc-darwin-x64 - Failed to validate repository information: package.json: "repository.url" is "undefined", expected to match "git+https://github.com/vercel/next.js" from provenance ``` https://github.com/vercel/next.js/actions/runs/4787411938/jobs/8512829488#step:10:74 - Related to https://github.com/vercel/next.js/pull/48757
-
Philip Nguyen authored
-
Preston Landers authored
A change here: (#48202) 958150d1 Caused a URL to be joined with `path.join`, which on Windows inserts a backslash character. Changing to `path.posix.join` fixes this. Breaks next build on Windows when paths like `favicon.ico` are in the source dir. Fixes #48603
-
Jiachi Liu authored
When you're using `config` object with `runtime` we'll show a warning and recomment you to move to `export const runtime = ...` for runtime property as it's documented as recommended. This PR adds a error for `next build` to avoid logs are truncated during multi-workers build and you're aware of the config which doesn't take effect with seeing the error Follow up for #48630 link [NEXT-426](https://linear.app/vercel/issue/NEXT-426)
-
Shu Ding authored
We currently use `URLSearchParams` to represent `FormData` but it's not really the same thing. And in Node.js 16 there's no `FormData` available so we can polyfill it via Undici.
-
vercel-release-bot authored
-
Steven authored
Co-authored-by:
Jiachi Liu <inbox@huozhi.im> Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Jan Kaifer authored
-