- 29 Oct, 2024 19 commits
-
-
vercel-release-bot authored
-
vercel-release-bot authored
-
Jiachi Liu authored
-
Jiachi Liu authored
-
Jude Gao authored
-
Delba de Oliveira authored
Related: https://linear.app/vercel/issue/NDX-402/address-use-cache-feedback Thank you for the review [@timeyoutakeit](https://github.com/timeyoutakeit)
❤ ️ -
Shodipo Ayomide authored
Co-authored-by:Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
-
Wisnu Wicaksono 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: --> ## What? ### Documentation Fix: Correct `cacheTag` Function Usage **Issue**: The [current documentation](https://nextjs.org/docs/canary/app/api-reference/functions/cacheTag#notes) incorrectly states that `cacheTag` accepts an array of tags. However, the [source code](https://github.com/vercel/next.js/blob/ca5f29d81b011c3a01e2372118b29836f1df0fa7/packages/next/src/server/use-cache/cache-tag.ts#L4C1-L4C52) implementation uses rest parameters (`...tags: string[]`), expecting individual string arguments rather than an array. **Changes**: Updated the "Notes" section to reflect the function's correct usage: ## Why? This change: 1. Aligns with the actual implementation in the source code 2. Prevents TypeScript errors when users follow the documentation 3. Provides clearer guidance on using the function with both direct arguments and arrays (using the spread operator) The current documentation might lead developers to encounter the TypeScript error: > "Argument of type 'string[]' is not assignable to parameter of type 'string'" ## Related Fixes #71901 Co-authored-by:
Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
-
マルコメ authored
## Summary Sync [`04-functions`](https://github.com/vercel/next.js/tree/canary/docs/02-app/02-api-reference/04-functions) and [`01-routing`](https://github.com/vercel/next.js/tree/canary/docs/02-app/01-building-your-application/01-routing) file convention. ### Improving Documentation - [x] Run `pnpm prettier-fix` to fix formatting issues before opening the PR. - [x] Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guideCo-authored-by:
Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
-
Bennett Dams 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 # --> This PR adds missing code formatting for `revalidateTag` to the docs of `use cache`. Co-authored-by:
Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
-
Hendrik Liebau authored
-
Delba de Oliveira authored
-
Jiachi Liu authored
-
Jude Gao authored
The initial load, `generateMetadata` needs to block the streaming for 2 reasons: 1. You want the ability to respond the HTML with special status code based on the `notFound` / `redirect` call inside `generateMetadata`. You cannot do that in out-of-order streaming, hence blocking the streaming. 2. SEO
-
Sebastian "Sebbie" Silbermann authored
The terminal now displays the same stack as the default in Chrome DevTools. There's currently no affordance to show ignore-listed stacks. I don't think we commonly need to show ignore-listed frames. If this is required, a Node.js debugger can be attached where ignore-listed frames can be show
-
Jiachi Liu authored
-
Josh Story authored
same as prior update (#71749) but we refactor the non-ppr prerender pathway. goal is to only 2 two renders max and still support cache warming and lazy module init
-
Benjamin Woodruff authored
Generated using a version of https://github.com/vercel/turbopack-resolved-vc-codemod . This uses Anthropic Claude Sonnet 3.5 for more complicated errors we don't have hardcoded logic for. - Part 1: #70927 - Part 2: #71172 - Part 3: #71665 - Part 4: #71804 Closes PACK-3339
-
- 28 Oct, 2024 14 commits
-
-
Sebastian "Sebbie" Silbermann authored
This enables DevTools (e.g. Chrome debugger) to collapse stackframes from 3rd party dependencies. Webpack only. Turbopack added support in https://github.com/vercel/next.js/pull/71770. Replays from RSC will follow. Had to fork `EvalSourceMapDevToolPlugin` (with blessing from @sokra) to be able to inject `ignoreList`. For `source-map`, we can use https://github.com/mondaychen/devtools-ignore-webpack-plugin/ instead since we can operate on the assets on disk. I inlined it to iterate on it faster. Though it'd be faster for bundling to also fork `SourceMapDevToolPlugin` since `DevToolsIgnorePlugin` adds another parse/serialize roundtrip. ## test plan We'll start leveraging `ignoreList` in the terminal as well which will allow us to write automated tests. I haven't found a way to automatically test this ignore-listing in browsers. Note that this is on Chrome Beta. Chrome Stable does not ignore-list logged stacks yet. Only stacks of the actual `console` call or in the debugger. (the frame from our console instrumentation is a bug that may be fixed once we populate our own sourcemaps) `pnpm debug dev test/e2e/app-dir/server-source-maps/fixtures/default/` `/ssr-error-log` shows browser:   Node.js debugger doesn't seem to work. Will look at that in a follow-up
-
Vercel Release Bot authored
-
vercel-release-bot authored
-
Camille Barneaud authored
-
Hendrik Liebau authored
-
Mohd. Nisab authored
-
Hendrik Liebau authored
This adds another entry to the `sourceMapPathOverrides` in our launch configurations, to enable setting breakpoints in `packages/next/src/compiled`, e.g. in `packages/next/src/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js`: <img width="1608" alt="Screenshot 2024-10-28 at 19 59 01" src="https://github.com/user-attachments/assets/b11e7a1b-d291-4f19-a567-aec09936872d">
-
dan authored
Have not tested Co-authored-by:Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
-
Theo Browne authored
### What? Typo fix in use-cache docs ### Why? The world deserves less typos ### How? I removed a number that should not have been there Co-authored-by:Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
-
Jiachi Liu authored
-
Jude Gao authored
-
Sebastian "Sebbie" Silbermann authored
We already create server source maps in dev by default, so we should make use of them. To opt-out, run `next dev --disable-source-maps` instead. Our internal `next-no-sourcemaps` script is now defunct.
-
elitalpa authored
-
Shu Ding authored
With this PR, we're adding one extra leading byte to Server Reference IDs (both Server Actions and `"use cache"` functions), to include some static information about the function itself. The information byte has the following format: ``` 0 000000 0 ^type ^arg mask ^rest args ``` The type bit represents if the action is a cache function or not. For cache functions, the type bit is set to `1`. Otherwise, it's `0`. The arg mask bit is used to determine which arguments are used by the function itself, up to 6 arguments. The bit is set to `1` if the argument is used, or being spread or destructured (so it can be indirectly or partially used). The bit is set to `0` otherwise. The rest args bit is used to determine if there's a `...` rest argument in the function signature. If there is, the bit is set to `1`. For example: ```tsx async function foo(a, foo, b, bar, ...baz) { 'use cache'; return a + b; } ``` will have it encoded as `[1][101011][1]`. The first bit is set to `1` because it's a cache function. The second part has `1010` because the only arguments used are `a` and `b`. The subsequent `11` bits are set to `1` because there's a `...baz` argument starting from the 5th. The last bit is set to `1` as well for the same reason. Note: Currently in this PR we don't track if an argument is actually referenced in the function body or not. That will be implemented as a follow-up optimization. Also, the reference ID is currently hex-encoded so there will be exact 2 characters for easier decoding. This encoding might change though. With this extra byte, the client can do some further optimizations. More details can be found in the code comment.
-
- 27 Oct, 2024 3 commits
-
-
vercel-release-bot authored
-
Benjamin Woodruff authored
Generated using a version of https://github.com/vercel/turbopack-resolved-vc-codemod . This uses Anthropic Claude Sonnet 3.5 for more complicated errors we don't have hardcoded logic for. - Part 1: #70927 - Part 2: #71172 - Part 3: #71665 Closes PACK-3336
-
Jude Gao authored
### What? Add @gaojude to Next.js team user group --------- Co-authored-by:Zack Tanner <1939140+ztanner@users.noreply.github.com>
-
- 26 Oct, 2024 3 commits
-
-
vercel-release-bot authored
-
Sergey Rubanov authored
-
Antonis Angelis authored
-
- 25 Oct, 2024 1 commit
-
-
vercel-release-bot authored
-