No description
Find a file
Wyatt Johnson 4ee00d4f88
[PPR] Dynamic API Debugging (#61798)
<!-- 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 #

-->

### What?

This adds dynamic usage logging when the `__nextppronly` query parameter
is set and partial prerendering has been enabled. This will print the
stack trace for the accesses for all Dynamic API's that were called.
This includes those API's that were called during the flight render if
they were called before the static shell was ready.

### Why?

To take the most advantage of partial prerendering, it's important to
track where Dynamic API's are called so developers can determine what
has caused part of the component tree not to be included in the static
shell. This also helps debug situations where the error thrown by
Dynamic API's (used internally for tracking and interruption) are caught
but not re-thrown, but due to the implementation of the flight renderer
provided by React, we are unable to distinguish between errors that are
swallowed by user code or by the flight renderer.

### How?

Instead of using a boolean to track **if** a dynamic API was used, this
actually captures the stack at the callsite, allowing developers to find
the location in the codebase that invoked it.

Closes NEXT-2399
2024-03-26 18:19:07 +00:00
.cargo Increase Rust stack size (#61809) 2024-02-08 10:59:50 +01:00
.config Update teamname in codeowners (#57775) 2023-10-31 12:33:13 +00:00
.devcontainer re-enable next-dev-tests (#47087) 2023-03-14 16:05:19 +01:00
.github Fix name of production tests for collection (#63714) 2024-03-26 13:45:24 +01:00
.husky Replace pre-commit with husky (#38350) 2022-07-06 11:14:16 -05:00
.vscode misc: build output rework (#57440) 2023-10-25 13:19:42 -07:00
bench Fix basic-app benchmark application (#60842) 2024-01-20 20:35:20 -06:00
contributing docs: remove reference to createNextDescribe in favor of nextTestSetup (#62245) 2024-02-20 11:57:48 +01:00
docs Update middleware docs to include common use cases (#63534) 2024-03-25 14:56:48 -05:00
errors Update react-hydration-error.mdx (#63455) 2024-03-19 21:41:28 +00:00
examples Revert "chore(examples): migrate mdx from pages router (JS) to app router (TS)" (#63704) 2024-03-26 10:18:42 +01:00
packages [PPR] Dynamic API Debugging (#61798) 2024-03-26 18:19:07 +00:00
scripts Add tarball deployments for each build (#62969) 2024-03-13 11:39:44 -07:00
test feat(log): improve dev/build logs (#62946) 2024-03-26 15:33:09 +01:00
turbo/generators fix(generators): update errors gen (#60233) 2024-01-04 20:22:21 +01:00
.alexignore Integrate next-* crates from Turbopack (#47019) 2023-03-13 14:33:17 +01:00
.alexrc docs: Add "special" to the Alex allowlist (#48021) 2023-04-06 16:32:06 +02:00
.eslintignore docs(turbopack): conslidate existing links (#62034) 2024-02-14 09:12:33 -08:00
.eslintrc.json Use new JSX transform (#56294) 2023-12-09 00:17:50 +01:00
.git-blame-ignore-revs chore(git): add .git-blame-ignore-revs (#60582) 2024-01-12 16:09:58 -05:00
.gitattributes chore: update gitattributes with linguist-vendored (#54683) 2023-08-28 21:50:19 +00:00
.gitignore ci: report daily turbo integration test results from this repo (#58965) 2023-12-04 16:18:42 +01:00
.node-version Update .node-version (#56460) 2023-10-05 07:40:12 +00:00
.npmrc fix: npm publish provenance permissions (#48757) 2023-04-24 14:08:55 +00:00
.prettierignore docs(turbopack): conslidate existing links (#62034) 2024-02-14 09:12:33 -08:00
.prettierignore_staged chore: replace issue triaing actions with nissuer (#55525) 2023-09-19 11:11:00 +00:00
.prettierrc.json chore(examples): use default prettier for examples/templates (#60530) 2024-01-11 16:01:44 -07:00
.rustfmt.toml build(cargo): move workspaces manifest to top level (#48198) 2023-04-19 18:38:36 +02:00
azure-pipelines.yml chore: lower Node.js version requirement (#56943) 2023-10-17 23:15:31 +02:00
Cargo.lock Update turbopack (#63541) 2024-03-25 03:15:02 +00:00
Cargo.toml Update turbopack (#63541) 2024-03-25 03:15:02 +00:00
CODE_OF_CONDUCT.md updated code of conduct to v2.1 (#34208) 2022-02-10 18:11:42 -06:00
contributing.md chore: improve repo templates (#46629) 2023-03-01 09:25:51 -08:00
jest.config.js test: use replay jest runner to add current test name to recording (#60438) 2024-01-10 10:31:32 +01:00
jest.replay.config.js Add Replay integration for dev e2e tests (#40955) 2022-09-29 14:45:10 -07:00
lerna.json v14.2.0-canary.43 2024-03-25 23:22:56 +00:00
license.md chore: update Copyright time from 2023 to 2024 (#60071) 2024-01-02 11:06:02 -08:00
lint-staged.config.js add cargo fmt to lint staged (#56430) 2023-10-04 17:46:44 +00:00
package.json Skip test/integration development tests during Turbopack build test run (#63671) 2024-03-25 18:37:34 +01:00
pnpm-lock.yaml v14.2.0-canary.43 2024-03-25 23:22:56 +00:00
pnpm-workspace.yaml Remove next-dev and its test suite and benchmarks (#55983) 2023-09-26 05:22:39 +02:00
readme.md
release.js Fix labels for release sections 2021-11-21 13:11:54 +01:00
run-tests.js Rename turbopack-tests-manifest to turbopack-dev-tests-manifest (#63409) 2024-03-19 10:26:14 +01:00
rust-toolchain Update rust-toolchain to 2023-11-16 (#58558) 2023-11-18 00:29:50 +00:00
socket.yaml chore(ci): add socket.yaml (#54446) 2023-08-23 18:12:51 +00:00
test-file.txt
tsconfig-tsec.json Integrate tsec into the linting process (#33746) 2022-02-24 16:59:18 -08:00
tsconfig.base.json [PPR Nav] Fix flash of loading state during back/forward (#60578) 2024-01-12 14:18:54 -05:00
tsconfig.json chore: extends from shared base tsconfig (#59776) 2023-12-19 18:52:22 +01:00
tsec-exemptions.json Move core files to src folder and move JS files to TypeScript (#44405) 2023-01-03 10:05:50 +01:00
turbo.json feat(next-swc): support wasm32-* build target (#61586) 2024-02-06 10:15:13 -08:00
UPGRADING.md docs: update broken link in UPGRADING.md (#60342) 2024-01-06 14:46:07 -08:00
vercel.json Silence GH Comments for Preview URLs (#18766) 2020-11-03 21:59:47 +00:00

Next.js

Getting Started

Used by some of the world's largest companies, Next.js enables you to create full-stack web applications by extending the latest React features, and integrating powerful Rust-based JavaScript tooling for the fastest builds.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Community

The Next.js community can be found on GitHub Discussions where you can ask questions, voice ideas, and share your projects with other people.

To chat with other community members you can join the Next.js Discord server.

Do note that our Code of Conduct applies to all Next.js community channels. Users are highly encouraged to read and adhere to them to avoid repercussions.

Contributing

Contributions to Next.js are welcome and highly appreciated. However, before you jump right into it, we would like you to review our Contribution Guidelines to make sure you have a smooth experience contributing to Next.js.

Good First Issues:

We have a list of good first issues that contain bugs that have a relatively limited scope. This is a great place for newcomers and beginners alike to get started, gain experience, and get familiar with our contribution process.

Authors

A list of the original co-authors of Next.js that helped bring this amazing framework to life!


Security

If you believe you have found a security vulnerability in Next.js, we encourage you to responsibly disclose this and NOT open a public issue. We will investigate all legitimate reports. Email security@vercel.com to disclose any security vulnerabilities. Alternatively, you can visit this link to know more about Vercel's security and report any security vulnerabilities.