- 27 Apr, 2022 12 commits
-
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Tim Neutkens authored
-
Tim Neutkens authored
-
JJ Kasper authored
-
Rafo authored
This PR is looking forward to improve documentation exemples about usage of Next.js with Typescript and Styled-components. I added Typescript types to the original exemple [Example app with styled-components using babel ](https://github.com/vercel/next.js/tree/canary/examples/with-styled-components-babel) ## Feature - [x] Related issues linked using - [x] Documentation added ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` fixes #36008
-
Mohamed Achaq 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`
-
Donny/강동윤 authored
* Update * Update swc * Update again * Fix * log * Fix * clippy * Update * Fix
-
Balázs Orbán authored
-
Javi Velasco authored
* Refactor `path-match` * Simplify `createPagesMapping` * Rename `getRawPageExtensions` -> `withoutRSCExtensions` * Remove unused `functions-manifest-plugin.ts` * Enable `eval-source-map` for the edge server compiler * Use Edge Compiler for Middleware & Refactor * Update some comments Co-authored-by:
JJ Kasper <jj@jjsweb.site> Update packages/next/shared/lib/router/utils/path-match.ts Co-authored-by:
JJ Kasper <jj@jjsweb.site> Update packages/next/shared/lib/router/utils/path-match.ts Co-authored-by:
JJ Kasper <jj@jjsweb.site> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Jiachi Liu authored
* Add `parseSync` in swc WASM binding * Support no native binding mode for react 18 next apps which are using `NODE_OPTIONS='--no-addons'` flag * Workaround: adding minus begining position back for wasm loader since the span isn't starting from zero
-
JJ Kasper authored
Fixes failing test case due to upstream font CSS change. x-ref: https://github.com/vercel/next.js/pull/36482#issuecomment-1110313267
-
- 26 Apr, 2022 12 commits
-
-
JJ Kasper authored
Follow-up to https://github.com/vercel/next.js/pull/36383 this also exposes the `nextRuntime` for the custom webpack function in `next.config.js` to allow differentiating between the environments. x-ref: https://vercel.slack.com/archives/CGU8HUTUH/p1647866770704939
-
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 5 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>
-