- 22 Sep, 2023 13 commits
-
-
vercel-release-bot authored
-
Deepa Subramanian authored
``` Pages and Layouts The Pages Router has a file-system based router built on the [concept of pages](https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts). ``` Change requested: Here `concept of pages` hyperlinks routes to the current page. This bit confusing for someone trying to learn next.js. removing the hyperlink to the text would make clear.
-
Will Binns-Smith authored
This: - Updates to the latest api change for `StdError` in `error_generic_member_access` rust-lang/rust#99301 - Updates `pathfinder_simd` for compatiblity Closes WEB-1636
-
Tim Neutkens authored
Noticed these values are already included in WebpackLayerName so the extra type is not needed.
-
OJ Kwon authored
### What? This PR enables basic support for next.config.js's `distDir` config. PR have two main pieces, one for honoring distDir and construct output path other than `.next`, and secondly assign `process.env.__NEXT_DIST_DIR` to client / edge. The latter increased size of PR bit as had to downstream to the compile_define calls. Corresponding tests are enabled to verify its behavior. Closes WEB-1610
-
Will Binns-Smith authored
This regressed in #55063 Closes WEB-1643
-
Tim Neutkens authored
This package has been legacy for multiple years and has been marked deprecated, this check is no longer useful. <!-- 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 # -->
-
Tim Neutkens authored
These methods have been landed for multiple years now, it's fine to remove the legacy checks for `unstable_`.
-
Tim Neutkens authored
Narrowing down the webpack config a bit. <!-- 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 # -->
-
Leah authored
-
Zack Tanner authored
The IPC request to `imageOptimizer` assumed the server was listening on http, so this updates it to pull the protocol from `getRequestMeta` instead. This also adds the option to pass in a path to the CA Root so that the dev server can add it to `NODE_EXTRA_CA_CERTS` Closes NEXT-1646 Fixes #55706
-
Jiachi Liu authored
`__NEXT_PREBUNDLED_REACT` is replaced by `__NEXT_EXPERIMENTAL_REACT` as we're bundling built-in react for app router
-
- 21 Sep, 2023 23 commits
-
-
vercel-release-bot authored
-
OJ Kwon authored
### What? Minor improvement to test fixture to clean up the instance if explicitly specified to continue test. This is required to run turbopack related tests. Closes WEB-1634
-
Jiachi Liu authored
For progress spinner, only log new line when `process.stdout.isTTY` ## After  ## Before  Adding extra space make sure there's loading bar between prefix text and spinner  Closes NEXT-1647
-
JJ Kasper authored
We can use the cached version if available and only install if it's missing. x-ref: https://github.com/vercel/next.js/actions/runs/6267098663/job/17019478099?pr=55764
-
Justin Ridgewell authored
### What? I'm not sure if this is necessary, but while investigating #55689 I found that the RSC code that we send to the client continues to use the ESM outputs during resolution. The problem is that the RSC server code uses ESM, then tries to send that down to the client. We have a `NextSharedRuntimeResolvePlugin` which handles rewriting _some_ modules (the shared runtimes) to CJS, but that doesn't apply to the main entry points that are RSC rendered, like `app-router`. ### Why? Webpack seems to only resolve to CJS routes. ### How? We manually rewrite "transition" entry points to the CJS output, just like the resolve plugin. Closes WEB-1618
-
Zack Tanner authored
This is a continuation from https://github.com/vercel/next.js/pull/55690 but also properly types these functions so we can catch these easier
-
Zack Tanner authored
This is causing test failures [x-ref](https://github.com/vercel/next.js/actions/runs/6266707570/job/17018892465#step:29:704) [x-ref](https://github.com/vercel/next.js/actions/runs/6266641982/job/17018064501#step:29:670)
-
Joseph authored
-
OJ Kwon authored
### What? In some test failures we've been observing test result is not written at all like ``` Failed to load test output [Error: ENOENT: no such file or directory, open 'test/e2e/app-dir/edge-runtime-node-compatibility/edge-runtime-node-compatibility.test.ts.results.json'] { errno: -2, code: 'ENOENT', syscall: 'open', path: 'test/e2e/app-dir/edge-runtime-node-compatibility/edge-runtime-node-compatibility.test.ts.results.json' } ``` scrolling up, it was due to whole test process was taken down by calling process.exit explicitly. We want to collect test results for the failures still, so the PR amends it for the cases if it's specified to continue on error. Closes WEB-1628 -
OJ Kwon authored
### What? This was a stopgap for the previous turbopack to ignore some config validation, but we shouldn't need it anymore with new turbopack to run test correctly. Closes WEB-1626
-
Vũ Văn Dũng authored
## Why? Although the left padding makes the output looks good in the terminal, it causes this weird alignment in almost all bug reports: ```yaml Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 18.12.0 npm: N/A Yarn: N/A pnpm: N/A Relevant Packages: next: 13.5.2-canary.2 eslint-config-next: 13.5.2 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A ``` If I want it to look nice in the bug report ```yaml Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Thu Aug 17 21:23:02 PDT 2023; root:xnu-10002.1.11~3/RELEASE_ARM64_T8112 Binaries: Node: 20.3.1 npm: 9.6.7 Yarn: 1.22.19 pnpm: 8.6.12 Relevant Packages: next: 13.5.2 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A ``` I have to paste this to a text editor and manually remove the first four spaces on every lines. ### How? This PR removes that four-space padding to make future bug reports look a bit nicer. -
Mayank authored
Co-authored-by:Snyk bot <19733683+snyk-bot@users.noreply.github.com>
-
Jimmy Lai authored
This PR improves the minimal server script by adding a slightly better look require profiler + some misc utility changes. This is eventually gonna be the basis for a `next profile` command. This is what the output look like + its usage. https://app.warp.dev/block/4AtutJ2PpVcM5BFDqlk7zk ``` next-cold-start: 56.024ms next-request: 58.462ms next-wall-time: 128.757ms └─ ../../../packages/next/dist/compiled/next-server/server.runtime.prod.js 39.31ms / 49.27ms ├─ ../../../server/lib/trace/tracer.js 9.92ms / 20.97ms │ ├─ ../constants.js 0.19ms / 0.19ms │ └─ ../../../../../../../node_modules/.pnpm/@opentelemetry+api@1.4.1/node_modules/@opentelemetry/api/build/src/index.js 10.86ms / 18.94ms │ ├─ ../baggage/utils.js 4.35ms / 7.41ms │ │ ├─ ../../api/diag.js 2.98ms / 5.70ms │ │ │ ├─ ../../diag/ComponentLogger.js 2.02ms / 3.66ms │ │ │ │ └─ ../../internal/global-utils.js 1.65ms / 2.71ms │ │ │ │ ├─ ../../platform/index.js 0.90ms / 1.22ms │ │ │ │ │ └─ ../node/index.js 0.32ms / 0.35ms │ │ │ │ │ └─ ../globalThis.js 0.03ms / 0.03ms │ │ │ │ ├─ ../../version.js 0.02ms / 0.02ms │ │ │ │ └─ ../semver.js 0.14ms / 0.14ms │ │ │ └─ ../../diag/internal/logLevelLogger.js 0.70ms / 0.76ms │ │ │ └─ ../../types.js 0.06ms / 0.06ms │ │ ├─ ../internal/baggage-impl.js 0.06ms / 0.06ms │ │ └─ ../internal/symbol.js 0.03ms / 0.03ms │ ├─ ../context/context.js 0.06ms / 0.06ms │ ├─ ../diag/consoleLogger.js 0.04ms / 0.04ms │ ├─ ../metrics/NoopMeter.js 0.12ms / 0.12ms │ ├─ ../metrics/Metric.js 0.03ms / 0.03ms │ ├─ ../propagation/TextMapPropagator.js 0.03ms / 0.03ms │ ├─ ../trace/ProxyTracer.js 1.69ms / 3.11ms │ │ └─ ../NoopTracer.js 1.42ms / 2.82ms │ │ ├─ ../../api/context.js 0.66ms / 0.73ms │ │ │ └─ ../../context/NoopContextManager.js 0.07ms / 0.07ms │ │ ├─ ../context-utils.js 0.70ms / 0.90ms │ │ │ └─ ../NonRecordingSpan.js 0.21ms / 0.55ms │ │ │ └─ ../invalid-span-constants.js 0.34ms / 0.37ms │ │ │ └─ ../trace_flags.js 0.03ms / 0.03ms │ │ └─ ../spancontext-utils.js 0.04ms / 0.04ms │ ├─ ../trace/ProxyTracerProvider.js 0.30ms / 0.33ms │ │ └─ ../NoopTracerProvider.js 0.03ms / 0.03ms │ ├─ ../trace/SamplingResult.js 0.03ms / 0.03ms │ ├─ ../trace/span_kind.js 0.03ms / 0.03ms │ ├─ ../trace/status.js 0.03ms / 0.03ms │ ├─ ../trace/internal/utils.js 0.44ms / 0.64ms │ │ └─ ../tracestate-impl.js 0.20ms / 0.25ms │ │ └─ ../tracestate-validators.js 0.04ms / 0.04ms │ ├─ ../context-api.js 0.06ms / 0.06ms │ ├─ ../diag-api.js 0.04ms / 0.04ms │ ├─ ../metrics-api.js 0.22ms / 0.48ms │ │ └─ ../api/metrics.js 0.26ms / 0.32ms │ │ └─ ../../metrics/NoopMeterProvider.js 0.06ms / 0.06ms │ ├─ ../propagation-api.js 0.30ms / 0.92ms │ │ └─ ../api/propagation.js 0.62ms / 0.74ms │ │ ├─ ../../propagation/NoopTextMapPropagator.js 0.03ms / 0.03ms │ │ └─ ../../baggage/context-helpers.js 0.09ms / 0.09ms │ └─ ../trace-api.js 0.31ms / 0.45ms │ └─ ../api/trace.js 0.15ms / 0.15ms ├─ ../../../shared/lib/runtime-config.external.js 0.05ms / 0.05ms ├─ ../../../../../../bench/basic-app/.next/server/app/page.js 4.07ms / 18.76ms │ ├─ ../../webpack-runtime.js 0.10ms / 0.10ms │ ├─ ../../chunks/388.js 0.06ms / 0.06ms │ ├─ ../../chunks/269.js 1.10ms / 1.10ms │ ├─ ../../../../../../packages/next/dist/compiled/next-server/app-page.runtime.prod.js 13.22ms / 13.63ms │ │ └─ ../../../client/components/request-async-storage.external.js 0.41ms / 0.47ms │ │ └─ ../async-local-storage.js 0.06ms / 0.06ms │ ├─ ../../../../../../packages/next/dist/client/components/static-generation-async-storage.external.js 0.16ms / 0.16ms │ └─ ../../../../../../packages/next/dist/client/components/action-async-storage.external.js 0.05ms / 0.05ms └─ ../../../../../../bench/basic-app/.next/server/app/page_client-reference-manifest.js 0.11ms / 0.11ms ```
-
Zack Tanner authored
This was causing issues due to needing to run the watcher in a detached process to avoid it clobbering the other build tasks. For now this disables the watcher so we still get the initial types which is generally all that's needed
-
S3Prototype authored
- Removes a line from next docs that is no longer accurate: > Currently, if a route uses a Server Action, it is required to render dynamically. According With the release of Next.js 13.5, Server Actions now work with fully static routes (including revalidating data with ISR). <!-- 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>
-
Balázs Orbán authored
### What? As [discussed](https://vercel.slack.com/archives/C04DUD7EB1B/p1692183798097169), we should follow the ecosystem standard separation of dependencies and dev dependencies. ### Why? This is a common issue/misunderstanding that we always have to explain separately, while there is no real benefit. One counter-argument was that install times would be increased when we had to run install for `dependencies` and `devDependencies` separately, but that's easy to work around as explained below. ### How? Instead of passing the `dependencies` array to the package manager in the CLI, we write these to the `package.json` file and then run the package manager's install command without the dependency arguments. This will also reduce the number of writes to the `package.json` file from two to just one. Ref: https://github.com/vercel/next.js/pull/42218, https://github.com/vercel/next.js/pull/48076, https://github.com/vercel/next.js/issues/54105, https://github.com/vercel/next.js/pull/42012, and more [Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1692183798097169) Co-authored-by:
Steven <229881+styfle@users.noreply.github.com>
-
Tobias Koppers authored
### What? * expands the first test failure * uses an
❌ emoji for visibility * adds (killed) to killed processes to not confuse them with errors  Closes WEB-1623 -
Balázs Orbán authored
Fix auto-import of `next/navigation` when a method is referenced in VSCode Closes NEXT-1649 Fixes #55741
-
Naru authored
This fixes memory leaks caused by `prevExports` in react-refresh-utils. It happens in code like the following: ```tsx const DATA = Array.from({ length: 100000 }, (_, i) => Math.random()); export const App = () => { return ( <div> <div>REWRITE_HERE</div> <div>{DATA.length}</div> </div> ); }; ``` After we edit this file to trigger fast refresh, previous `DATA` will be still retained in the memory since it forms `App(new) -> prevExports -> App(old) -> DATA` reference chain (there is some screenshots [here](https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/766)). I believe there is no reason to retain the whole exports as `prevExports`. We can just retain "signature" (`string[]`). By only holding this, we no longer create reference to the old exports, which fixes the memory leak here. Note that I filed a similar PR in https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/766 and also https://github.com/naruaway-sandbox/fast-refresh-hmr-memory-leak-demo is a reproducible example of this issue, which also explains that interestingly this issue is not easily solved for Vite. ## Should we fix it? I think yes, as long as there is no unintended side effect, it's better to fix it since we cannot predict whether users would load large payload AND does Fast Refresh many times without reloading the browser or not. In [this extreme case](https://github.com/naruaway-sandbox/fast-refresh-hmr-memory-leak-demo), it eats several hundred mega bytes of RAM. ## Verification I confirmed that the memory leak is gone with this change by running https://github.com/naruaway-sandbox/fast-refresh-hmr-memory-leak-demo with the change. I am not sure whether new tests are needed but my concern is to accidentally break Fast Refresh behavior somehow. I believe we have enough existing test cases🙏 and I also tested manually. -
Balázs Orbán authored
### What? This introduces a weighting measurement when determining comments as unhelpful. ### Why? Too many "same issue" comments in general, but it's hard to do an exact match with only regex. ### How? Exact code can be found here: https://github.com/balazsorban44/nissuer/blob/b3363e794827624199a889aa7c617c81a1b215dd/index.js#L203-L213 In short, by default if a comment is less than 30% different from unhelpful words, the whole comment will be considered unhelpful. [Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1695287105298299)
-
vercel-release-bot authored
-
Zack Tanner authored
Since these values are inserted into the cache and read with `readRecordValue`, they need to have a `status` property otherwise it'll be re-thrown in `navigate-reducer`. Investigating if this resolves an issue where under certain circumstances navigations get stuck suspending. Closes NEXT-1643
-
OJ Kwon authored
### What? Closes WEB-1615 I thought I couldn't grab the correct count of test suite in the datadog as I was seeing huge count mismatches. Actually, it was because we were not running all of the tests. PR amends - run all the tests under manifests - ensure all the test list in the manifest actually exists lastly and sadly - disable few tests too flaky
-
- 20 Sep, 2023 4 commits
-
-
LongYinan authored
Should also resolve the msvc runtime issue: https://nextjs.org/docs/messages/failed-loading-swc#possible-ways-to-fix-it
-
Ryan Gillie authored
The most recent Next.js update [redesigned the logging output](https://github.com/vercel/next.js/pull/54713) (which looks great btw) but it broke the uri regex for the VSCode debugger. This PR updates it to use the new pattern. Output Pattern Before:  Regex Before: `started server on .+, url: (https?://.+)` Output Pattern After:  Regex After: `- Local:.+(https?:\/\/.+)` Co-authored-by:
JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Yagiz Nizipli authored
Small refactor to use `dns/promises`, `URL`, and `encoding` parameter of `execSync`.
-
Justin Ridgewell authored
### What? This updates `NextSharedRuntimeResolvePlugin` to match on `next/dist/esm` pattern instead of matching on `node_modules/next/dist`. While the old code is more correct, it prevents the plugin from working when we're developing Next.js locally, because the imported path is resolved to `packages/next/dist/esm/`, not `node_modules/next/dist/esm/` ### Why? So that we can develop locally without bugs. ### How? A simple glob change. Closes NEXT- Fixes # --> Closes WEB-1616
-