- 08 Mar, 2023 9 commits
-
-
JJ Kasper authored
-
Justin Ridgewell authored
# Bug Fixes - https://github.com/vercel/turbo/pull/4121 - https://github.com/vercel/turbo/pull/4111
-
Hannes Bornö authored
`test/development/acceptance-app/hydration-error.test.ts` has a lot of tests because I ported all the tests in https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js. Running all those tests takes a lot of time, and to include all the different cases is overkill. This PR removes most tests but keeps one test case per type of hydration error, and also one using suspense. This makes more sense, it should only test that all the different hydration error messages are picked up.
-
Shu Ding authored
Similar to #46888, this PR adds support for the case: ```js async function foo () {} export default foo ``` ...where you export an ident as a default export expression. Closes NEXT-770 ~Should be landed after #46881.~ -
Donny/강동윤 authored
## Bugfixes - https://github.com/vercel/turbo/pull/3526 - https://github.com/vercel/turbo/pull/4084 - https://github.com/vercel/turbo/pull/4083 - https://github.com/vercel/turbo/pull/4067 - https://github.com/vercel/turbo/pull/3959 - https://github.com/vercel/turbo/pull/4060 - https://github.com/vercel/turbo/pull/4081 - https://github.com/vercel/turbo/pull/4103 - https://github.com/vercel/turbo/pull/4100 - https://github.com/vercel/turbo/pull/4108 - https://github.com/vercel/turbo/pull/4101 - https://github.com/vercel/turbo/pull/4112 - https://github.com/vercel/turbo/pull/3956 - https://github.com/vercel/turbo/pull/4118 - https://github.com/vercel/turbo/pull/4117 ## Feature - https://github.com/vercel/turbo/pull/4058 - https://github.com/vercel/turbo/pull/4013 - https://github.com/vercel/turbo/pull/4005 - https://github.com/vercel/turbo/pull/4001 - https://github.com/vercel/turbo/pull/3839 - https://github.com/vercel/turbo/pull/4017 - https://github.com/vercel/turbo/pull/4086 - https://github.com/vercel/turbo/pull/4067 ## Performance - https://github.com/vercel/turbo/pull/4040 - https://github.com/vercel/turbo/pull/4110 ## Refactor - https://github.com/vercel/turbo/pull/4098
-
Jiachi Liu authored
### Bug Fix Update vendor react to fix the unexpected hoist tags issue x-ref: https://github.com/facebook/react/pull/26256 * Fixes #42648 * Closes NEXT-655 * tests added
-
Jan Kaifer authored
fixes https://github.com/vercel/next.js/issues/46549 The docs are wrong for now, this limitation is just in `pages/`, you can use it anywhere in `app/`. Since `app/` is still not stable we will emit that warning in all files outside of `app/`.
-
JJ Kasper authored
This ensures we leverage the fetch cache when calling `generateStaticParams` and also ensures paths with `generateStaticParams` without `dynamicParams = false` don't error when only partial params are provided. x-ref: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1678149362238089)
-
Ray Wong authored
fixes #46838 This PR fixes the snapshot test failure of examples `with-jest` and `with-jest-babel`. I have tested by running tests in the files generated by these 2 commands: ``` $ npx create-next-app@latest --example https://github.com/rayrw/next.js/tree/fix-with-jest-example-test-failure/examples/with-jest fix-snapshots-failure $ npx create-next-app@latest --example https://github.com/rayrw/next.js/tree/fix-with-jest-example-test-failure/examples/with-jest-babel fix-snapshots-failure ```
-
- 07 Mar, 2023 23 commits
-
-
Shu Ding authored
This one seems to be flaky ([example](https://github.com/vercel/next.js/actions/runs/4357945817/jobs/7618498044)) as the default `page.goto` timeout is set to 30s, while it already takes 15~20s to load locally on my laptop. So let's add some retries here.
-
JJ Kasper authored
-
Shu Ding authored
Reverts vercel/next.js#46861. This requires https://github.com/vercel/turbo/pull/4102 to be released and bindings to be updated first. ~Also depends on #46896 to be merged first, and conflicts to be resolved.~
-
JJ Kasper authored
This ensures we properly check for the none cached content correctly x-ref: https://github.com/vercel/next.js/actions/runs/4351711739/jobs/7603961011
-
Jiachi Liu authored
Add unique identifier `@app@` / `@pages@` / `@root@` for entry key of on demand entries, so that they'll be unique for each path when the page key is similar bewteen app and pages like (`"app/page"` and `"pages/page"` will both end up with `/page`) ## Bug Follow up for #46736 Closes NEXT-472 - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ---------
-
Shu Ding authored
This should be a special case of having a function as the client boundary's prop. Fixes NEXT-732, fixes #46573.
-
Shu Ding authored
Fixes NEXT-540.
-
Hannes Bornö authored
Currently the codemod always runs `root.toSource()`, recreating the source from the AST. But this can sometimes add unexpected semicolons to files that actually didn't get updated by the codemod. This PR adds a check to see if the AST has been updated before running `root.toSource()`, otherwise it just returns the original source.
-
Shu Ding authored
This PR adds the support for unnamed default export expression support `export default async function () {}` in a "use server" entry, with corresponding test. Also fixed an existing bug that the default exported action's name should be aligned with the export name, which is `"default"`. Closes NEXT-769. -
Hannes Bornö authored
Add a timeout to the Google Fonts fetch calls in dev. In case they aren't fetched in time, the fallback font is used instead. Currently if font fetching fails due to network errors in dev, the loader is not cached. Every change on a page that uses a font makes it retry to refetch the font. But, if the network is slow enough to cause timeouts, that means that every change would force the user to wait for the timeout before the page being updated. Because of this, the PR also enables the loader to be cached on error. The drawback is that you would have to delete the `.next` folder to retry to get the actual font in case it got cached after failing. Closes NEXT-726 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-
Balázs Orbán authored
### What? Link to https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir from our bug report template. ### Why? To lower the barrier to adding a reproduction even when reporting an App Router-related issue, which is currently behind a flag. (Pointed out in #46852) ### How? Added a link in the issue template. The remaining question is, should we add anything else to https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-app-dir to make creating a reproduction easier? Closes NEXT-789 Related #46852
-
Balázs Orbán authored
## What? This PR has its main goal to improve the experience of opening/reviewing a PR. It improves the PR template, as well as extends PR auto-labeling. ## Why? There are 2 parts to the PR template: - Individual contributors: The current template accommodates for the most common cases individual contributors use to contribute. (I.e. fixing bugs, updating/adding examples, addressing documentation issues). The new template keeps this at the top. - Next.js team: As maintainers, we should try to explain PRs as if someone with less context would review them. This should also help with backreferencing PRs in issues and follow-up PRs and make it easier to follow changes, understand trade-offs better at the time, and help new team members catch up over time, etc. ## How? The template is written in a comment instead of Markdown, so when the PR is opened, most of the template is hidden to make it less verbose. The checkboxes we've had before are not shown, but we already auto-label PRs based on the path of the files that have been touched, so the checkboxes showed redundant information. [Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1677677802109289), Closes NEXT-741
-
JJ Kasper authored
-
JJ Kasper authored
Follow-up to https://github.com/vercel/next.js/pull/45772 this ensures the rewrite header can be correctly set when a chained middleware rewrite is occurring. x-ref: [slack thread](https://vercel.slack.com/archives/C01RGMANU9Y/p1678074803731489) ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
-
Sukka authored
Continues from #46380. The PR migrates the unit test cases from the original repo into the Next.js repo.
-
JJ Kasper authored
These utilities aren't needed so can be removed
-
JJ Kasper authored
This updates to no longer skip caching POST or authed requests with the fetch cache and instead we bail when `cookies()` or `headers()` is used prior which is a better heuristic to signal user specific data would be related to the fetch request. x-ref: [slack thread](https://vercel.slack.com/archives/C042LHPJ1NX/p1678130069138849) ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
-
JJ Kasper authored
Reverting temporarily as this breaks turbopack support for app dir x-ref: https://github.com/vercel/next.js/actions/runs/4349458918/jobs/7600147372 x-ref: https://github.com/vercel/next.js/actions/runs/4349607013/jobs/7600148420 Reverts vercel/next.js#46826
-
Hannes Bornö authored
Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Jan Kaifer authored
Co-authored-by:JJ Kasper <jj@jjsweb.site>
-
Hannes Bornö authored
Currently all helper functions are exported from huge utils files. This moves the helper functions to their own files, this approach aligns better with the rest of the codebase. The unit tests are split up and colocated with the function it tests. Also added some missing tests. Plus some overall cleanup, added comments and fixed types. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-
Shu Ding authored
This PR updates vendored React to the latest `@next` version, as well as corresponding changes to the manifest and module reference generation code. The new React version includes the following upstream changes: - 49f741046 Fix: Infinite act loop caused by wrong shouldYield (#26317) (Andrew Clark) - 106ea1c58 Support Iterables in Flight (#26313) (Sebastian Markbåge) - f905da227 [Flight] Send server reference error chunks to the client (#26293) (Hendrik Liebau) - e0241b660 Simplify Webpack References by encoding file path + export name as single id (#26300) (Sebastian Markbåge) - 25685d8a9 Codemod tests to waitFor pattern (9/?) (#26309) (Andrew Clark) - 64dde7082 Codemod tests to waitFor pattern (8/?) (#26308) (Andrew Clark) - 3cb5afb82 Codemod tests to waitFor pattern (7/?) (#26307) (Andrew Clark) - e98695db9 Codemod tests to waitFor pattern (6/?) (#26305) (Andrew Clark) - 9a52cc8bc Convert ReactLazy-test to waitFor pattern (#26304) (Andrew Clark) - 03462cfc7 [Fizz] External runtime: fix bug in processing existing elements (#26303) (mofeiZ) - faacefb4d Codemod tests to waitFor pattern (4/?) (#26302) (Andrew Clark) - 06460b6fb Remove unnecessary (and incorrect) code for compatibility with Paper in the Fabric version of GlobalResponderHandler (#26290) (Rubén Norte) - e64a8f403 Codemod tests to waitFor pattern (3/?) (#26299) (Andrew Clark) - ce8a72fd4 Codemod tests to waitFor pattern (2/?) (#26296) (Andrew Clark) - 1f1f8eb55 [Float][Fizz][Fiber]: Refactor <style> Resource implementation to group on flush (#26280) (Josh Story) - 5c633a48f Add back accidentally deleted test comments (#26294) (Andrew Clark) - b073104c2 [DevTools] improve troubleshooting in README (#26235) (Mengdi Chen) - fcf218791 [DevTools] Remove renderer.js from extension build (#26234) (Mengdi Chen) - b72ed698f Fixed incorrect value returned as public instance from reconciler (#26283) (Rubén Norte) - 25a8b9735 Codemod tests to waitFor pattern (1/?) (#26288) (Andrew Clark) - e52446733 New internal testing helpers: waitFor, waitForAll, waitForPaint (#26285) (Andrew Clark) - d49e0e0be Removed unused imperative events implementation from React Native renderer (#26282) (Rubén Norte) ---------
-
Ngô Đức Anh authored
This PR makes `typedRoutes` stricter by constraining generics in `Route` to type string. I've also made generating types for routes a bit more efficient by moving `redirects` and `rewrites`'s processing to the plugin's constructor since `rewrites` and `redirects` don't change in both dev and prod. I've also been trying to fix a bug where route types doesn't generate all the routes (some appear, some don't), but I've got no clues since that doesn't seem easy to reproduce (perhaps it only happens in my case?) ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-
- 06 Mar, 2023 5 commits
-
-
Jan Kaifer authored
We recommend that users just opt into `edge` per page. This global default was an unfortunate pattern.
-
Hannes Bornö authored
Migrate examples using `@next/font` to `next/font`. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-
Irek Róg authored
Because there is a TS error when is set just a string: `TS2322: Type '() => string' is not assignable to type '(loadingProps: DynamicOptionsLoadingProps) => Element | null'. Type 'string' is not assignable to type 'Element'.`
-
Will Binns-Smith authored
Turbopack uses a different format for its css module classnames [0]. This adds and uses a helper function to the next-font tests to assert against these classnames when testing with Turbopack. Ideally these tests could be more behavioral (e.g. asserting on rendered dimensions), but these can't capture things like fallback fonts. [0] https://github.com/vercel/turbo/pull/3437
-
Shu Ding authored
Since the default export syntax is not `fnDecl` but `fnExpr` I added two new methods to abstract out all the transform logic and made both `visit_mut_fn_decl` and `visit_mut_fn_expr` use that. Next step is to support default exports without an ident (`export default async function () {}`). Fixes NEXT-768. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-
- 05 Mar, 2023 3 commits
-
-
Steven authored
- Follow up to #46744
-
JJ Kasper authored
-
Federico Minaya authored
this fixes the same as #46493 but for [argon2](https://www.npmjs.com/package/argon2) <!-- 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: --> ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [x] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
-