- 26 Apr, 2022 11 commits
-
-
JJ Kasper authored
-
JJ Kasper authored
* Add note about lockfile causing swc to fail to load * Apply suggestions from code review Co-authored-by:Maia Teegarden <dev@padmaia.rocks>
-
JJ Kasper authored
This updates to ensure we only resolve a manual revalidate request when the cache has been fully set instead of eagerly like we do for generating pages in `fallback` mode. This also ensures the response cache keys manual revalidate requests separate from normal requests to ensure one doesn't block the other. This should resolve the below flakey tests. x-ref: https://github.com/vercel/next.js/runs/6163218261?check_suite_focus=true x-ref: https://github.com/vercel/next.js/runs/6157328196?check_suite_focus=true x-ref: https://github.com/vercel/next.js/runs/6151165153?check_suite_focus=true
-
JJ Kasper authored
This continues off of the change in https://github.com/vercel/next.js/pull/36368 and ensures a fallback rewrite does not influence the `asPath` as these are only matched when a filesystem or dynamic route aren't matched. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` x-ref: https://github.com/vercel/next.js/pull/36368
-
Jiachi Liu authored
* To help determine the current running environment is in server nodejs / edge runtime * Remove usage of `process.browser`
-
Sukka authored
* fix(#36435): apply correct fix * fix: only apply interop default flag for re-exported I really, really love glob. * test: add test cases for next/dynamic and next/amp
-
Baoshuo Ren authored
All links on git.io will stop redirecting after April 29, 2022. - https://github.blog/changelog/2022-04-25-git-io-deprecation/ ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
Tim Neutkens authored
-
Tim Neutkens authored
Add stitches and material-ui tests for new link behavior + fix TypeScript types when imported (#36474) Adds additional tests for material-ui and stitches based on questions in the Twitter thread. Fixes TypeScript types when `LinkProps` is imported and used in combination with `<button>`, added a TODO to change this at a later point when the new behavior is the default instead of opt-in. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
LongYinan authored
fixes https://github.com/vercel/next.js/issues/36183 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
JJ Kasper authored
-
- 25 Apr, 2022 10 commits
-
-
Tim Neutkens authored
Fixes https://github.com/vercel/next.js/discussions/32233
⚠ If you're looking at this PR please read the complete description including the part about incremental adoption. ## TLDR: Official support for `<Link href="/about">About</Link>` / `<Link href="/about"><CustomComponent /></Link>` / `<Link href="/about"><strong>About</strong></Link>` where `<Link>` always renders `<a>` without edge cases where it doesn’t render `<a>`. You'll no longer have to put an empty `<a>` in `<Link>` with this enabled. ## Full context ### Changes to `<Link>` - Added an `legacyBehavior` prop that defaults to `true` to preserve the defaults we have today, this will allow to run a codemod on existing codebases to move them to the version where `legacyBehavior` becomes `false` by default - When using the new behavior `<Link>` always renders an `<a>` instead of having `React.cloneElement` and passing props onto a child element - When using the new behavior props that can be passed to `<a>` can be passed to `<Link>`. Previously you could do something like `<Link href="/somewhere"><a target="_blank">Download</a></Link>` but with `<Link>` rendering `<a>` it now allows these props to be set on link. E.g. `<Link href="/somewhere" target="_blank"></Link>` / `<Link href="/somewhere" className="link"></Link>` ### Incremental Adoption / Codemod The main reason we haven't made these changes before is that it breaks pretty much all Next.js apps, which is why I've been hesitant to make this change in the past. I've spent a bunch of time figuring out what the right approach is to rolling this out and ended up with an approach that requires existing apps to run a codemod that automatically opts their `<Link>` usage into the old behavior in order to keep the app functioning. This codemod will auto-fix the usage where possible. For example: - When you have `<Link href="/about"><a>About</a></Link>` it'll auto-fix to `<Link href="/about">About</Link>` - When you have `<Link href="/about"><a onClick={() => console.log('clicked')}>About</a></Link>` it'll auto-fix to `<Link href="/about" onClick={() => console.log('clicked')}>About</Link>` - For cases where auto-fixing can't be applied the `legacyBehavior` prop is added. When you have `<Link href="/about"><Component /></Link>` it'll transform to `<Link href="/about" legacyBehavior><Component /></Link>` so that your app keeps functioning using the old behavior for that particular link. It's then up to the dev to move that case out of the `legacyBehavior` prop. **This default will be changed in Next.js 13, it does not affect existing apps in Next.js 12 unless opted in via `experimental.newLinkBehavior` and running the codemod.** Some code samples of what changed: ```jsx const CustomComponent = () => <strong>Hello</strong> // Legacy behavior: `<a>` has to be nested otherwise it's excluded // Renders: <a href="/about">About</a>. `<a>` has to be nested. <Link href="/about"> <a>About</a> </Link> // Renders: <strong onClick={nextLinkClickHandler}>Hello</strong>. No `<a>` is included. <Link href="/about"> <strong>Hello</strong> </Link> // Renders: <strong onClick={nextLinkClickHandler}>Hello</strong>. No `<a>` is included. <Link href="/about"> <CustomComponent /> </Link> // -------------------------------------------------- // New behavior: `<Link>` always renders `<a>` // Renders: <a href="/about">About</a>. `<a>` no longer has to be nested. <Link href="/about"> About </Link> // Renders: <a href="/about"><strong>Hello</strong></a>. `<a>` is included. <Link href="/about"> <strong>Hello</strong> </Link> // Renders: <a href="/about"><strong>Hello</strong></a>. `<a>` is included. <Link href="/about"> <CustomComponent /> </Link> ``` --- ## Feature - [x] 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` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Naoyuki Kanezawa authored
Remove the webpack breaking change message per error since it can be contained in all errors and the current implementation causes to truncate other error messages Follow up for https://github.com/vercel/next.js/pull/36190 ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
-
Luis Alvarez D authored
Changing the paragraph to not include `beforeInteractive` as one of the possible use cases of `onLoad`. *Update:* Added docs for `onError` in the API reference of `next/script`. @housseindjirdeh does `onError` also has the same limitation or is this only for `onLoad`? Closes https://github.com/vercel/next.js/issues/33402 ## 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` - [ ] Integration tests added - [x] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint`
-
Alex authored
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` Co-authored-by:JJ Kasper <22380829+ijjk@users.noreply.github.com>
-
Marzouq authored
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
Jordan Baron authored
-
Naoyuki Kanezawa authored
As the title. This is intended to be applied on both middleware and edge functions. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` Co-authored-by:Jiachi Liu <4800338+huozhi@users.noreply.github.com>
-
JJ Kasper authored
This change was un-necessary and `getStaticProps` was correct here so this reverts the change. Reverts vercel/next.js#36403
-
Marzouq authored
## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint`
-
Nico authored
Small copy-paste mistake with the readme of create-next-app on the steps for using PNPM to execute. ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
- 23 Apr, 2022 1 commit
-
-
youngvform authored
## Overview The subject is `When does getStaticPaths run` but this docs denotes about `getStaticProps`. So could you check `getStaticProps` is right? ## Documentation / Examples - [X] Make sure the linting passes by running `yarn lint`
-
- 22 Apr, 2022 7 commits
-
-
Jiachi Liu authored
Make the render procedure of `App` and `Component` more explict and clear
-
shinkj11 authored
## History In PR #35889, `onError` prop was added explicitly on the `Image` component, but it was ommitted from the `ImageElement` component. In result, the callback didn't work at all. ## Now This PR deletes the `onError` prop from explicitly defined props. Explicitly adding `onError` on the `const imgElementArgs` is considered, but deleting the defined prop from `Image` is more reasonable because the prop isn't used in `Image` component. ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` Co-authored-by:Steven <229881+styfle@users.noreply.github.com>
-
Steven authored
-
Maedah Batool authored
* Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by:
Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by:
Steven <steven@ceriously.com> Co-authored-by:
Tim Neutkens <tim@timneutkens.nl>
-
Balázs Orbán authored
Co-authored-by:balazsorban44 <balazsorban44@users.noreply.github.com>
-
JJ Kasper authored
This continues off of https://github.com/vercel/next.js/pull/36285 fixing some of the failing test cases noticed when running the E2E tests against deployments. After these are resolved the tests will be added to our CI flow after each canary release. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` x-ref: https://github.com/vercel/next.js/pull/36285
-
Donny/강동윤 authored
Co-authored-by:kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
- 21 Apr, 2022 11 commits
-
-
Janicklas Ralph authored
Changes to the beforeInteractive strategy to make it work for streaming Splitting `beforeInteractive` into two strategies `beforeInteractive` at the _document level and `beforePageRender` for page level <Scripts>
-
Maia Teegarden authored
* Make setup-wasm script work for local dev * Use copy instead of move
-
Shu Ding authored
Ensure there is only 1 render pass in concurrent rendering with getInitialProps in `_document` (#36352) This PR makes sure `renderPage` calls `renderShell` in concurrent features, and `renderToString` if not. Closes #36268, #36229. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
JJ Kasper authored
-
JJ Kasper authored
This fixes resolving `beforeFiles` rewrites with `next/link` as previously we weren't resolving the destination to a dynamic route since the resolving was being marked as finished when it shouldn't be during `beforeFiles`. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: https://github.com/vercel/next.js/issues/35402
-
await-ovo authored
fix: #36329 ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `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` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
-
Donny/강동윤 authored
This PR updates swc crates to https://github.com/swc-project/swc/commit/33e4661090056185e64490529d354755f3b21d93 I'll undraft this after verifying some more fixes. - Resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2587218 <img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/163984412-cd887458-9507-4f20-9fd9-e0864d3904d7.png"> - Resolves https://github.com/vercel/next.js/discussions/30237#discussioncomment-2585357 <img width="1840" alt="image" src="https://user-images.githubusercontent.com/29931815/163990124-10c7dc62-7613-444b-bffd-69b69c880592.png">
-
Jiachi Liu authored
x-ref: #36190 x-ref: #31506 * Move nodejs ptah module usage to next-server, keep base-server and web-server headless for `'path'` * Use a native module `path` for nodejs runtime and `path` polyfill for edge runtime
-
残月 authored
* feat:Add support for useDefineForClassFields typescript option * test:add test for useDefineForClassFields option * test: fix lint error
-
Najmus Sakib authored
## Update [-] Removed React fragment from index
-
JJ Kasper authored
This adds client HMR event tracing to help debug the client state for reproductions easier
-