Commit graph

5443 commits

Author SHA1 Message Date
Tim Neutkens
5aa54b3385
Add pagesDir to Jest transformer (#36599)
Fixes #35469

Adds `pagesDir` which is required for the Relay transform.

Added a test case based on https://github.com/hanford/relay-swc-jest.



## 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`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-01 16:39:30 +00:00
JJ Kasper
bd3dfe1f4b
Update status code for normalize error (#36580)
This updates to show a 400 (bad request) when an invalid path is sent to Next.js similar to our decode failure handling. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

Closes: https://github.com/vercel/next.js/issues/36555

Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2022-05-01 09:23:06 +00:00
Jiachi Liu
7a09f88d14
Reexports styled-jsx JSXStyle in nextjs (#36585)
When using pnpm / yarnPnP to install next.js, styled-jsx as dependency is not hoisted in the top level node_modules, it will fail when nodejs is trying to resolve `styled-jsx/style` from project directory. Re-export `styled-jsx/style` in next.js and let swc/babel plugin compile the import path it to `next/dist/shared/lib/styled-jsx`

Resolves #10149
Closes #21320
Closes #9325



Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2022-04-30 20:25:05 +00:00
Javi Velasco
0de109baab
Refactor Page Paths utils and Middleware Plugin (#36576)
This PR brings some significant refactoring in preparation for upcoming middleware changes. Each commit can be reviewed independently, here is a summary of what each one does and the reasoning behind it:
- [Move pagesDir to next-dev-server](f2fe154c00) simply moves the `pagesDir` property to the dev server which is the only place where it is needed. Having it for every server is misleading.
- [Move (de)normalize page path utils to a file page-path-utils.ts](27cedf0871) Moves the functions to normalize and denormalize page paths to a single file that is intended to hold every utility function that transforms page paths. Since those are complementary it makes sense to have them together. I also added explanatory comments on why they are not idempotent and examples for input -> output that I find very useful.
- [Extract removePagePathTail](6b121332aa) This extracts a function to remove the tail on a page path (absolute or relative). I'm sure there will be other contexts where we can use it.
- [Extract getPagePaths and refactor findPageFile](cf2c7b842e) This extracts a function `getPagePaths` that is used to generate an array of paths to inspect when looking for a page file from `findPageFile`. Then it refactors such function to use it parallelizing lookups. This will allow us to print every path we look at when looking for a file which can be useful for debugging. It also adds a `flatten` helper. 
- [Refactor onDemandEntryHandler](4be685c37e) I've found this one quite difficult to understand so it is refactored to use some of the previously mentioned functions and make it easier to read.
- [Extract absolutePagePath util](3bc0783474) Extracts yet another util from the `next-dev-server` that transforms an absolute path into a page name. Of course it adds comments, parameters and examples.
- [Refactor MiddlewarePlugin](c595a2cc62) This is the most significant change. The logic here was very hard to understand so it is totally redistributed with comments. This also removes a global variable `ssrEntries` that was deprecated in favour of module metadata added to Webpack from loaders keeping less dependencies. It also adds types and makes a clear distinction between phases where we statically analyze the code, find metadata and generate the manifest file cc @shuding @huozhi 

EDIT: 
- [Split page path utils](158fb002d0) After seeing one of the utils was being used by the client while it was defined originally in the server, with this PR we are splitting the util into multiple files and moving it to `shared/lib` in order to make explicit that those can be also imported from client.
2022-04-30 11:19:27 +00:00
Steven
7998b63a38
Fix missing Content-Length header from Image Optimization API (#36581)
Fixes #35514
2022-04-30 01:50:42 +00:00
JJ Kasper
c838b5f50d
v12.1.6-canary.15 2022-04-29 11:54:57 -05:00
Houssein Djirdeh
fd2ba11763
Adds inline script functionality to next/script for worker and beforeInteractive strategies (#36364)
Adds inline script functionality to `next/script` for `worker` and `beforeInteractive` strategies. 

- fixes #36318 
- fixes #26343
- fixes #26591
- fixes #26343
- fixes #26240


Co-authored-by: Janicklas Ralph <6142074+janicklas-ralph@users.noreply.github.com>
2022-04-29 15:20:31 +00:00
JJ Kasper
e30d7237ef
Ensure older lockfile/invalid formats are handled (#36577) 2022-04-29 09:42:48 -05:00
Balázs Orbán
486040eff2
chore: clarify CLI network errors (#36567)
Makes it easier to detect why a network error occurred with the CLI or `next info`, based on https://github.com/vercel/next.js/issues/36344

## 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`
2022-04-29 12:39:17 +00:00
Jiachi Liu
ea779c5188
bump styled-jsx to latest (#36554)
x-ref: https://github.com/coryetzkorn/twitter-algorithm/pull/2

* Bump styled-jsx to latest version (5.0.2), so that it could get dedup when user installs the styled-jsx manually
* Remove the legacy `@types/styled-jsx`
2022-04-28 21:12:58 +00:00
Jiachi Liu
cd7419e9c8
Hoist the desired ReactDOM import expression (#36552)
* hoist `react-dom/server` imports to reduce module load time in nodejs
* simplify `reactRoot` detection condition by checking the streaming rendering API we're using. (if it doesn't existed, like react 17, then we won't enable `reactRoot`)
* Merge `__NEXT_CONCURRENT_FEATURES` into `__NEXT_REACT_ROOT` env var since they're identical now
2022-04-28 19:17:23 +00:00
JJ Kasper
244456936b
v12.1.6-canary.14 2022-04-28 13:34:45 -05:00
Balázs Orbán
f000503984
unlock eslint-config-next dependencies (#35781)
Fixes #35753

## 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`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-04-28 17:15:58 +00:00
JJ Kasper
60f74230fe
Tweak lockfile patching to be eager (#36549)
This is a follow-up to https://github.com/vercel/next.js/pull/36527 to make sure we eagerly patch the lockfile as the correct swc dependency will be present if the platform matches so the load failure isn't hit which is where we were previously patching the lockfile. This is done in the background so does not block compilation. This also removes some extra logs that aren't necessary. 

<details>

<summary>before lockfile patch</summary>

![before](https://user-images.githubusercontent.com/22380829/165780507-09e5aee6-3253-483f-9e3f-e24bea6df377.png)

</details>


<details>

<summary>after lockfile patch</summary>

![after](https://user-images.githubusercontent.com/22380829/165780545-829665aa-05ec-431d-aa2f-42c4ce3badd7.png)

</details>

This also fixes a case I noticed where we weren't flushing events before exiting when builds fail
2022-04-28 16:40:37 +00:00
Shu Ding
4392b6a9fa
Refactor base server to get rid of the __server_context hack (#36550)
This PR makes the `Options` type of base server configurable as well as assigning to `this.serverOptions`, so the web server can access it during `constructor()`. This gets rid of the dirty `__server_context` hack.

## 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`
2022-04-28 16:16:51 +00:00
Donny/강동윤
38aa6d7140
Update swc (#36535)
This PR updates swc to a72f436148


This PR applies

 - https://github.com/swc-project/swc/pull/4452
   - Fixes `yield*` of async generators in async generators.
   - Fixes name mangling of injected helpers.
     - Note: This only applies to tiny files which enables lots of helpers.
 - https://github.com/swc-project/swc/pull/4468
   - Fixes newer version of react.
2022-04-28 10:14:48 +00:00
Tim Neutkens
0b0b5ca75c v12.1.6-canary.13 2022-04-28 11:33:17 +02:00
Tim Neutkens
2451f52bc8
Add support for passing ref to next/link with new behavior enabled (#36537) 2022-04-28 11:32:32 +02:00
Donny/강동윤
3aa8aaae58
next-swc/wasm: Make span start at 0 (#36532) 2022-04-28 11:31:43 +02:00
JJ Kasper
917a736a55
Add event for swc load failure and attempt patching lockfile (#36527) 2022-04-28 11:31:15 +02:00
LongYinan
3ee42236d5
Align behavior of SWC transform & transformSync (#36500)
fixes https://github.com/vercel/next.js/issues/35661



## 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.
- [x] 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`
2022-04-28 02:09:49 +00:00
Alex Castle
93d8fac184
Always add height and width prop to image with layout="raw" (#36523)
This PR makes the following changes:
* Always add the `height` and `width` prop to image with `raw` layout (previously only added to images without `sizes`)
* Add a warning if a raw layout image is getting stretched (which can be caused by interaction of height and width prop with styles)
* Remove automatic aspect-ratio style from `raw` images. This is no longer necessary if all `raw` images have height and width props.
* Update tests and docs accordingly
2022-04-27 21:59:05 +00:00
JJ Kasper
af1d7c94f6
v12.1.6-canary.12 2022-04-27 14:23:09 -05:00
JJ Kasper
d66445f800
Ensure optional params are normalized correctly in minimal mode (#36513)
Follow-up for https://github.com/vercel/next.js/pull/36463 this fixes an issue with optional catch-all params not being normalized correctly which was caught by the runtimes tests. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-04-27 18:46:33 +00:00
Jiachi Liu
e9b423b37c
polish isomorphic path module (#36521)
List all exports for internal path module to avoid import destruction is breaking with typescript.

#### Prev
```js
import pathMod from '../isomorphic/path'

const { join, resolve } = pathMod
```

#### Now
```js
import { join, resolve } from '../isomorphic/path'
```
2022-04-27 18:23:26 +00:00
Tim Neutkens
5e3225da0f v12.1.6-canary.11 2022-04-27 18:40:33 +02:00
Tim Neutkens
c232d3856a
Add string children case for newNextLinkBehavior codemod (#36516) 2022-04-27 18:39:56 +02:00
Tim Neutkens
5907e9d394 v12.1.6-canary.10 2022-04-27 17:34:18 +02:00
Tim Neutkens
f550da7031
Remove passhref Eslint rule as it's no longer needed with new link behavior (#36511) 2022-04-27 17:33:13 +02:00
Donny/강동윤
f2c3ef8318
Update swc (#36477)
* Update

* Update swc

* Update again

* Fix

* log

* Fix

* clippy

* Update

* Fix
2022-04-27 14:28:46 +02:00
Javi Velasco
0bf6655f1c
Use edge compiler for middleware (#36486)
* 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>
2022-04-27 11:50:29 +02:00
Jiachi Liu
e7b17133c5
Support swc parse api in WASM (#36482)
* 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
2022-04-27 00:59:02 +00:00
JJ Kasper
743cf68555
Pass nextRuntime in webpack context (#36488)
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
2022-04-26 21:05:40 +00:00
JJ Kasper
90863c70ea
v12.1.6-canary.9 2022-04-26 15:14:22 -05:00
JJ Kasper
e44256978a
Update manual revalidate response cache handling (#36462)
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
2022-04-26 19:32:29 +00:00
JJ Kasper
7e7d7bbca6
Fix incorrect asPath with fallback rewrite in minimal mode (#36463)
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
2022-04-26 19:12:29 +00:00
Jiachi Liu
d5e767b20d
Add process env NEXT_RUNTIME (#36383)
* To help determine the current running environment is in server nodejs / edge runtime
* Remove usage of `process.browser`
2022-04-26 17:54:28 +00:00
Sukka
487f7ababa
fix(#36435): apply correct fix (#36464)
* 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
2022-04-26 11:15:49 -05:00
Baoshuo Ren
e97a648818
chore: remove git.io (#36479)
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`
2022-04-26 13:47:47 +00:00
Tim Neutkens
52816703be v12.1.6-canary.8 2022-04-26 14:15:28 +02:00
Tim Neutkens
7d3bfac39f
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`
2022-04-26 11:46:09 +00:00
LongYinan
26efcc5ded
Fix missing interpolation on next/head exports (#36435)
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`
2022-04-26 04:13:33 +00:00
JJ Kasper
994f1823ba
v12.1.6-canary.7 2022-04-25 19:22:10 -05:00
Tim Neutkens
489e65ed98
Rework <Link> behavior (backwards compatible) (#36436)
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>
2022-04-25 22:01:30 +00:00
Naoyuki Kanezawa
b264064ad5
Fix to remove webpack message per error (#36452)
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`
2022-04-25 18:28:29 +00:00
Naoyuki Kanezawa
a6282566f9
Do not polyfill node built-in modules on edge functions (#36190)
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>
2022-04-25 09:25:27 +00:00
Nico
963549e91a
chore(create-next-app): fix pnpm create step (#36398)
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`
2022-04-25 02:43:13 +00:00
Jiachi Liu
ec4f96c974
Simplify the App and Component handling in render (#36395)
Make the render procedure of `App` and `Component` more explict and clear
2022-04-22 21:03:57 +00:00
shinkj11
42c01ddc8c
Fix next/image usage of onError() (#36305)
## 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>
2022-04-22 16:13:08 +00:00
Steven
94faeec1dd v12.1.6-canary.6 2022-04-22 08:57:41 -04:00