- 01 May, 2023 2 commits
-
-
vercel-release-bot authored
-
vercel-release-bot authored
-
- 30 Apr, 2023 6 commits
-
-
Shu Ding authored
Closes #48807. The issue seems to be introduced with recent React Float change, which isn't a real problem but a behavior change. Resources are layered by the `precedence` key and the style insertion logic can be simplified as "insert the new stylesheet right after the existing stylesheet in the same layer". When multiple stylesheets are inserted in the same render pass, their new order will be flipped. This is a nice feature so we can always maintain the order of resources that might conflict.
-
vercel-release-bot authored
-
Shu Ding authored
Related change: #49003. This PR makes sure that these related IntelliSense features are updated: ### Invalid <img width="842" alt="CleanShot 2023-04-30 at 19 33 06@2x" src="https://user-images.githubusercontent.com/3676859/235367543-3c64ebb9-47fd-48d9-a846-60ec39bf0d3b.png"> ### Region (`string`) <img width="822" alt="CleanShot 2023-04-30 at 19 33 29@2x" src="https://user-images.githubusercontent.com/3676859/235367567-249041cb-9f2b-4693-815d-347ff200244f.png"> ### Regions (`string[]`) <img width="487" alt="CleanShot 2023-04-30 at 19 34 20@2x" src="https://user-images.githubusercontent.com/3676859/235367609-503294d1-ec9b-4d04-9aa7-4e76636eca60.png"> ### Docs <img width="679" alt="CleanShot 2023-04-30 at 19 34 41@2x" src="https://user-images.githubusercontent.com/3676859/235367630-74be18ed-ffc7-4b2d-ae3f-0ad6a187b166.png">
-
Tim Neutkens authored
These were added early on based on some assumptions around how the params would be passed. In the actual implementation it works differently so these are just dead code. <!-- 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 # -->
-
vercel-release-bot authored
-
Tim Neutkens authored
Follow-up to #48959, adds the right types after the renames of properties. <!-- 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 # -->
-
- 29 Apr, 2023 10 commits
-
-
Shu Ding authored
When we enable `webpackBuildWorker` this module level `const apiRouteWarnings = new LRUCache({ max: 250 })` will be created in 3 workers, so users will see 4 outputs (last one is static optimization): <img width="740" alt="CleanShot 2023-04-29 at 20 20 38@2x" src="https://user-images.githubusercontent.com/3676859/235318861-2ec12e30-70b2-4b56-8a2e-df08d130c349.png"> This PR fixes that and now there's only 1. -
vercel-release-bot authored
-
vercel-release-bot authored
-
Tim Neutkens authored
### What? Whenever you navigated and a page suspended through `loading` or an error happened caught by `error` in the first level of segments (e.g. `/dashboard` but not `/dashboard/settings`) scroll would not be applied. This happened because the focus and scroll handling component is rendered as part of `InnerLayoutRouter` and the Suspense / Error boundary was rendered **around** `InnerLayoutRouter`. This behavior is incorrect as we still want to immediately scroll to the place where the loading is rendered. This PR fixes the behavior by allowing the scroll to apply to loading / error too. ### How? Moved the scrolling component around the loading/error/innerlayout boundary and added tests.
-
Jiachi Liu authored
### What? * Update google fonts for `next/font` with `scripts/update-google-fonts.js.` * Add npm script `pnpm update-google-fonts` ### How? Run `pnpm update-google-fonts`
-
Donny/강동윤 authored
### What? Update resolve rule for `@swc/helpers` => `node_modules/@swc/helpers` to `@swc/helpers/_` => `node_modules/@swc/helpers/_` to select only `@swc/helpers@v0.5.0`. ### Why? Previous rule make webpack merge `@swc/helpers@v0.4.x` and `@swc/helpers@v0.5.x` ### How? Closes WEB-948 Fixes #48593
-
Tobias Koppers authored
### What? add a test case ### Why? Some packages expect the default export of a commonjs module to be the whole exports object when importing from ESM. turbo PR: https://github.com/vercel/turbo/pull/4738
-
lijianan authored
This handles the case when `Infinity` is passed to the Image `width` prop
-
Tobias Koppers authored
### What? add .svg to the list of images that that return metadata ### Why? .svg files should also return width and height ### How? see https://github.com/vercel/turbo/pull/4741
-
Justin Ridgewell authored
We bind to an IPv6 unspecified address (`::`), which makes the old message say "started server on :::3000", and that's kinda ugly. The new message will say "[::]:3000".
-
- 28 Apr, 2023 17 commits
-
-
vercel-release-bot authored
-
Josh Story authored
This PR updates the way we preload fonts. Previously we tracked which fonts we needed to preload for each layer and rendered a `<link rel="preload" href="..." as="font" />` tag for each preloadable font. This unfortunately gets blocked by data fetching and we want to be able to hint these preloads as soon as possible. Now that React support Float methods in RSC we can use `ReactDOM.preload(..., { as: "font" })` to implement this functionality This PR makes the following changes 1. expose a `preloadFont` method through the RSC graph 2. expose a `preconnect` metho through the RSC graph 3. refactor the preloads generation to use `preloadFont` instead of rendering a preload link 4. If there are no fonts to preload but fonts are being used in CSS then a `preconnect` asset origin is called instead of rendering a preconnect link 5. instead of emitting a data attribute per font preload indicating whether the project is using size-adjust we now emit a single global meta tag. In the future we may get more granular about which fonts are being size adjusted. In the meantime the current hueristic is to add `-s` to the filename so it can still be inferred. In the process of completing this work I discovered there were some bugs in how the preconnect logic was originally implemented. Previously it was possible to get multiple preconnects per render. Additionally the preconnect href was always `"/"` which is not correct if you are hosting your fonts at a CDN. The refactor fixed both of these issues I want to do a larger refactor of the asset loading logic in App-Render but I'll save that for a couple weeks from now Additionally, the serialized output of preloads now omits the word anonymous when using crossorigin so tests were updated to reflect `crossorigin=""` Additionally, tests were updated to no longer look for the size-adjust data attribute on preloads Additionally, There is a note about leaving a `{null}` render in place to avoid a conflict with how the router models lazy trees. I'll follow up with a PR addressing this Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Tim Neutkens authored
### What? Implements resolving of `runtime` and `preferredRegion` in layouts. It will resolve from the root layout down, each layout can override `runtime` or `preferredRegion`. ``` app ├── layout.js -> export const runtime = 'edge' ├── page.js -> Edge runtime └── dashboard ├── page.js -> Edge runtime └── settings ├── layout.js -> export const runtime = 'nodejs' └── page.js -> Node.js runtime ``` Adds support for `preferredRegion`. This is similar to `export const config = { region: ['sfo1'] }` in `pages`. However, there is a difference. It supports `export const preferredRegion = 'home'` and `export const preferredRegion = 'edge'`. `home` refers to the configured default region on your deployment platform and `edge` refers to "all regions". ### How? I've implemented a temporary resolving in `entries.ts`. `preferredRegion` is tracked through the entry module in webpack which is why it's added to all the loaders that create an entry module, this prevents having to resolve/parse again later on. Fixes NEXT-880 Fixes NEXT-1064 Fixes #48905 Closes #48933 -
JJ Kasper authored
Follow-up to https://github.com/vercel/next.js/pull/48870 this exposes WebSocket for the Next.js runtime so we don't have divergence in APIs as discussed with @cramforce
-
JJ Kasper authored
These warnings aren't actionable by users so this removes them from our compiled undici version. x-ref: [slack thread](https://vercel.slack.com/archives/C04R82GSDBN/p1682704853867449?thread_ts=1682624317.557059&cid=C04R82GSDBN)
-
Alex Kirszenberg authored
See https://github.com/vercel/turbo/pull/4740 This enables RSC CSS HMR. The `css_chunk_root_path` way somehow broke the propagation of invalidation for CSS chunks. This also updates Turbopack with the following changes: * https://github.com/vercel/turbo/pull/4738 <!-- Tobias Koppers - improve commonjs esm interop and node ESM --> * https://github.com/vercel/turbo/pull/4740 <!-- Alex Kirszenberg - Replace css_chunk_root_path with ProxiedAsset --> * https://github.com/vercel/turbo/pull/4741 <!-- Tobias Koppers - add svg size extraction --> --------- Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com>
-
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 changes turbopack's appDir source lookup to honor existing behavior to ignore `_` started path. With this changes, turbopack able to pass test `test/e2e/app-dir/underscore-ignore-app-paths/underscore-ignore-app-paths.test.ts`, fixes WEB-844. Internally it simply amends two parts, first if given path starts with _, do not add those into entrypoints to it will not be served. If path starts with `%5F` instead, replacing path to _ so it can be served. --------- Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com>
-
Leah authored
### What? We previously ran all route handlers with the edge runtime, which means you can't use built in node.js modules With this PR, the runtime can be selected as documented in the next.js docs Fixes WEB-873
-
Steven authored
We bumped `undici` fetch which has a minimum version of 16.8.0 so we need to make sure `next` and `create-next-app` also have the same minimum version. Since 14.x reaches End-of-Life on [2023-04-30](https://github.com/nodejs/Release), we can drop support for 14 in the next release. See also: - Related to #48870 - Related #48941
-
Jiachi Liu authored
### What? In #48928 we decided to error for the missing `id` from `generateImageMetadata` and `generateSitemaps` for better dev DX. This PR also refactors the metadata image urls generation that assumbling the utils together
-
Jan Kaifer authored
-
Connor Prussin authored
# What? This PR just refines some of the typescript types around `nextJest`, specifically refining the argument `customJestConfig` and the return value. ### Why? Before this PR, the return type of `nextJest` was inferred by typescript as `any` which is inaccurate and would require type casting for typescript to enable it to be used in a jest configuration written in typescript. I didn't add an issue for this since it was so trivial, but I can do so if it would be helpful.
-
Jiachi Liu authored
* Fix the `generateImageMetadata` for non dynamic routes and related `param` matching (Found during development) * Fix dynamic routes with number suffix `(\d)` (Fixes #48689)
-
vercel-release-bot authored
-
Balázs Orbán authored
### What? Exposing `globalThis.crypto`, based on [Node.js' WebCrypto API](https://nodejs.org/api/globals.html#crypto_1) ### Why? Similar to `fetch`, `crypto` is a popular API that is currently not available on `globalThis` in all active Node.js versions yet. This can help library authors to create runtime-agnostic packages. ### How? Node.js already has the WebCrypto API that can be imported, we just expose it on `globalThis` in Node.js versions where this is not available. Closes NEXT-1063 [Slack thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1681821510191059)
-
sagarpreet-xflowpay authored
fixes #48794 <!-- 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 # --> --------- Co-authored-by:
Jimmy Lai <laijimmy0@gmail.com> Co-authored-by:
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
Justin Ridgewell authored
Depends on https://github.com/vercel/turbo/pull/4491 This adds support for the new `output: 'export'` configuration, and propagates the value through to our Node.js rendering code to render. Unfortunately, we don't support page-level configs at the moment, so we can't set a `export const config = { dynamic: 'force-dynamic' }` and test that the export value is being received (I've manually verified it, though). Fixes WEB-842
-
- 27 Apr, 2023 5 commits
-
-
Donny/강동윤 authored
### What? Enable import/export annotations for next.js files. ### Why? It's required to allow importing next.js modules from node. `cjs-module-lexer` needs these annotations to import CJS modules. ### How? Closes WEB-949 Fixes #48801
-
Kiko Beats authored
The current implementation is throwing wrongly if you set a falsy JS value (like `0` or `null`) So right now this is fail even it's a legit implementation: `process.counter = 0`
-
Kiko Beats authored
Hello, This Edge Runtime update fix some small bugs, and also it allows using `TextDecoderStream` and `TextEncoderStream` for development (aka `next dev`) Related: https://github.com/vercel/edge-runtime/releases/tag/edge-runtime%402.1.0 Fixes #47189 fix NEXT-833 ([link](https://linear.app/vercel/issue/NEXT-833))
-
vercel-release-bot authored
-
Shu Ding authored
Mostly mirrors the changed made in https://github.com/facebook/react/pull/26632 to our SWC transform. The implementation difference is that the AST transformer only adds a general purpose wrapper call `createServerReference(id)` from an aliased import, so we can easily change the underlying function in the bundler. This change only affects the client layer (when `self.config.is_server === false`). Needs to be landed after another React upgrade: https://github.com/vercel/next.js/pull/48697. cc @sebmarkbage.
-