- 17 Aug, 2024 2 commits
-
-
vercel-release-bot authored
-
Sam Ko authored
## Why? We need to update the triage guidelines, so random issues are not flagged to the team. ## How? - Moved `triage_guidelines.txt` to an external source, so we don't have to constantly create a PR - Added a `VERCEL_PROTECTION_BYPASS` secret to to Next.js repo - Refactor `generateText()` by moving some logic to `system` - Minor refactors to `main()`
-
- 16 Aug, 2024 20 commits
-
-
Zack Tanner authored
Relands #68764 -- no additional changes were made, the errors were expected due to faulty user code.
-
vercel-release-bot authored
-
JJ Kasper authored
When an application is running in multi-zone API endpoints can have differing draft mode IDs on the same domain so we need to avoid clearing the original when we see a mismatch as that can break the current applications draft mode. This is behind a flag initially to validate but it should be safe to make the default in the future as an invalid draft mode ID just gets ignored. x-ref: [slack thread](https://vercel.slack.com/archives/C052BQ8F9EJ/p1723844164102539)
-
Arinjay Dhar authored
-
vercel-release-bot authored
-
Zack Tanner authored
This appears to be causing unanticipated SSG failures that require investigation. [slack x-ref](https://vercel.slack.com/archives/C07BVA6HM17/p1723817048761079)
-
Vercel Release Bot authored
This auto-generated PR updates font data with latest available
-
Jiachi Liu authored
-
Janka Uryga authored
This is a hack that we need until we refactor everything to use the Node builds of 'react-dom/server' and 'react-server-dom-{webpack,turbopack}' when running in Node. We're currently using the Edge builds of 'react-dom/server' and 'react-server-dom-{webpack,turbopack}' everywhere. But if we're in Node, we'd like it to act more like the Node build, for performance and correctness reasons (e.g. in DynamicIO). In particular, we want to change the implementation of `scheduleWork` from [the Edge one](https://github.com/facebook/react/blob/19bd26beb689e554fceb0b929dc5199be8cba594/packages/react-server/src/ReactServerStreamConfigEdge.js#L31-L33) to [the Node one](https://github.com/facebook/react/blob/19bd26beb689e554fceb0b929dc5199be8cba594/packages/react-server/src/ReactServerStreamConfigNode.js#L25-L27). Since `scheduleWork` is inlined, we have to convert `setTimeout` calls like this ``` setTimeout(() => ..., 0) ``` into this: ``` setImmediate(() => ...) ``` ReactDOM only ever calls `setTimeout` with `0` (and no further arguments), so we can just naively replace `setTimeout` with `setImmediate`. Technically the `0` will then be passed to the callback as an argument, but the callbacks will always ignore it anyway. -
JJ Kasper authored
-
Sebastian Silbermann authored
-
hrmny authored
### What? Improves the performance of loader tree creation. The main change is `directory_tree_to_loader_tree` now being completely synchronous (ignoring the setup). This improves performance a lot (at least for the initial build), as it's a recursive function, which was cached at every level before. It also makes querying the loader tree easier, as not everything needs to be an async turbo tasks function now. #### `get_entrypoints` Performance | | Initial | Update | | --------- | ---------- | ------- | | `canary` | `1300ms` | `20ms` | | PR | `260ms` | `50ms` |
-
Niklas Mischkulnig authored
Including https://github.com/vercel/turbo/pull/8852 Fixes https://github.com/vercel/next.js/issues/63372 Fixes PACK-2801 - [x] Change `RequestKey` handling: https://github.com/vercel/turbo/pull/8852#issuecomment-2258241284 - [x] Fix lookup for alternatives: https://github.com/vercel/turbo/pull/8852#discussion_r1698143881
-
Zack Tanner authored
Azure tests have been failing on CNA examples and I believe it's because the filter function introduced in #68802 wasn't accounting for Windows paths when computing the `rootPath`. This normalizes to a POSIX path to ensure handling is consistent. [Successful run](https://dev.azure.com/nextjs/next.js/_build/results?buildId=94852&view=logs&j=14d0eb3f-bc66-5450-3353-28256327ad6c&t=7e988112-57f9-5e14-1c8c-05f6c2b0ea47)
-
Donny/강동윤 authored
### What? Revert swc_core upgrade, as it has a bug related to `styled_jsx` transform. Wasm plugin version runs after the TypeScript pass so it works, but custom transform (next-swc) runs before the typescript pass so it breaks. ### Why? It broke some apps. ### How?
-
Sebastian Silbermann authored
-
Niklas Mischkulnig authored
For e.g. TS-to-TS Webpack transforms, don't use `as: "*.tsx"` for now. That should ideally also work, but there is still an unrelated bug causing that to fail. This definitely works for now (and just retains the module type detected by Turbopack): ```js module.exports = { experimental: { turbo: { rules: { "*.ts": { loaders: ["./my-loader.js"], } } } } }; ``` This came up in https://x.com/aidenybai/status/1823615893903171645 @aidenybai Closes PACK-3194 -
vercel-release-bot authored
-
Donny/강동윤 authored
### What? Update SWC crates to https://github.com/swc-project/swc/commit/ed635ce91086f2eb00644bbca036ca686f035dbe ### Why? To keep in sync. ### How?
-
Niklas Mischkulnig authored
to include https://github.com/ast-grep/ast-grep/issues/1382 --------- Co-authored-by:
Will Binns-Smith <wbinnssmith@gmail.com>
-
- 15 Aug, 2024 18 commits
-
-
Benjamin Woodruff authored
refactor(turbo-tasks): Use an enum for `strongly_consistent`/`ReadConsistency` instead of a bool (#68913) This should be completely equivalent. Double checked the diff and made sure that the conversions from `true`/`false` to `ReadConsistency::Strong`/`ReadConsistency::Eventual` are correct. ## Why? Without keyword arguments in the language, boolean arguments can be hard to read. Inlay hints and type-signature-on-hover with rust-analyzer help, but it's more obvious what these do if they use a clearly labeled enum. E.g. discussion: https://www.reddit.com/r/rust/comments/bm6s3t/rust_patterns_enums_instead_of_booleans/ Unlike my other change from a bool to an enum in #68866, I don't expect that we'd ever introduce more levels of read consistency than eventual and strong, so this PR is only about readability.
-
vercel-release-bot authored
-
Zack Tanner authored
### What When using middleware + i18n in pages router, and upon navigation to a dynamic route, the wrong locale would be served in `getServerSideProps`. ### Why The route resolver code handles detecting the initial locale by splitting the path and looking at the first non-empty index to determine which locale was set. However, it does this assuming it has a regular path name, and not a `/_next/data` URL. When middleware is present, the route resolver code hits the `middleware_next_data` branch, which doesn't have any logic to properly set the locale. This means that resolveRoutes will return the default locale rather than the locale from the path. In the non-middleware case, this would normally flow through `handleNextDataRequest` in base-server which has handling to infer i18n via `i18nProvider`. This branch is functionally very similar to what we're doing in `resolveRoutes` but it does so in a different way: it reconstructs the URL without the `/_next/data` information and then attaches locale information. However because `middleware_next_data` rewrites the pathname to the actual route (ie `/_next/data/development/foo.json` -> `/foo`), `handleNextDataRequest` won't handle that request since it's no longer a data request. It's strange to me that `handleNextDataRequest` and `middleware_next_data` are doing similar path normalization in completely different ways, but that was a deeper rabbit hole and simply removing the normalization logic in `resolveRoutes` causes other problems. ### How Since data requests that flow through this middleware matcher logic aren't going to be handled by `handleNextDataRequest`, I've updated `middleware_next_data` to perform the logic of attaching the locale information to the query. Initially I was going to do this for anything that calls `normalizeLocalePath` but it seems like other branches of `resolveRoutes` do it in the matcher function directly. Fixes #54217 Closes NDX-116
-
Benjamin Woodruff authored
This avoids re-creating the function for every assertion we make on function return values, potentially slightly speeding up the macro compilation. This shouldn't make much/any difference right now because nothing (outside of a few tests) uses resolved functions yet. ## Testing ``` TRYBUILD=overwrite cargo nextest r -p turbo-tasks-macros-tests ```
-
Tim Neutkens authored
## What? Skips a test that checks webpack specific behavior. <!-- 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 # -->
-
JJ Kasper authored
This didn't end up achieving the normalizing we were hoping for as the react bump after this was landed causes indeterminism even with this fix. This needs to be resolved upstream in react itself so removing our attempted patch and failing assertion in the mean-time.
-
Benjamin Woodruff authored
Builds on top of the `is_transient` boolean arguments from #68436, but uses an enum to provide a third variant of `TaskPersistence::LocalCells`. The branches for this are `todo!()` right now, but the idea is that we'll intercept these in the manager and schedule them inside the manager instead of creating a unique task with its own `TaskId` on the backend. ## Testing Some of the `local_cell` tests are broken with this change, as functions annotated with `#[turbo_tasks::function(local_cells)]` now hit the `todo!()` blocks added in this PR. Those tests are disabled for now, and I'll fix this in a later PR. *(This is okay, nothing is using local cells yet, aside from those tests)*
-
Aral Roca Gomez authored
Co-authored-by:Lee Robinson <me@leerob.io>
-
lijianan authored
Co-authored-by:Lee Robinson <me@leerob.io>
-
JJ Kasper authored
Seems to be failing from new prettier setup since this PR was last updated x-ref: https://github.com/vercel/next.js/actions/runs/10407306592/job/28822464359
-
Mark Knichel authored
This PR fixes two issues with the use of `assetPrefix`: #1: https://github.com/vercel/next.js/issues/64710 `assetPrefix` needs to be handled in `dev`, `deploy`, and `start`. In the current approach, only `dev` and `start` were handled, but a quirk of the implementation caused rewrites for non-asset paths to not be able to be used in `afterFiles` rewrites. #2: When deploying Next.js (such as on Vercel), you need to add your own `beforeFiles` rewrite for `/${assetPrefix}/_next/...` requests or otherwise they would 404. This PR creates an automatically added `rewrite` to `beforeFiles` that handles the case for `dev`, `start`, and `deploy`, removes the existing logic in `filesystem.ts`, and adds more tests to check the behavior.
-
Houssein Djirdeh authored
-
Brian Ewins authored
Co-authored-by:
Arseny <132773930+better-salmon@users.noreply.github.com> Co-authored-by:
Lee Robinson <me@leerob.io>
-
Abdul Haseeb authored
Co-authored-by:
Abdul Haseeb <121640819+abdulhaseeb-codes@users.noreply.github.com> Co-authored-by:
Lee Robinson <me@leerob.io>
-
rubyisrust authored
Signed-off-by:
rubyisrust <rustrover@icloud.com> Co-authored-by:
Lee Robinson <me@leerob.io>
-
Cody Olsen authored
Uses the improved TypeGen just released in `sanity` [v3.53.0](https://github.com/sanity-io/sanity/releases/tag/v3.53.0) 🥳
-
Khawaja Junaid authored
Co-authored-by:Lee Robinson <me@leerob.io>
-
Joel Hooks authored
Co-authored-by:
malewis5 <matthew.a.lewis7@gmail.com> Co-authored-by:
Lee Robinson <me@leerob.io>
-