Skip to content

Commit

Permalink
fix(deps): update dependency @vitejs/plugin-react to v4.3.1 (#11013)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@vitejs/plugin-react](https://togithub.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme)
([source](https://togithub.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react))
| [`4.2.1` ->
`4.3.1`](https://renovatebot.com/diffs/npm/@vitejs%2fplugin-react/4.2.1/4.3.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@vitejs%2fplugin-react/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@vitejs%2fplugin-react/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@vitejs%2fplugin-react/4.2.1/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@vitejs%2fplugin-react/4.2.1/4.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitejs/vite-plugin-react
(@&#8203;vitejs/plugin-react)</summary>

###
[`v4.3.1`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#431-2024-06-10)

[Compare
Source](https://togithub.com/vitejs/vite-plugin-react/compare/v4.3.0...v4.3.1)

##### Fix support for React Compiler with React 18

The previous version made this assumption that the compiler was only
usable with React 19, but it's possible to use it with React 18 and a
custom `runtimeModule`:
https://gist.github.com/poteto/37c076bf112a07ba39d0e5f0645fec43

When using a custom `runtimeModule`, the plugin will not try to
pre-optimize `react/compiler-runtime` dependency.

Reminder: Vite expect code outside of `node_modules` to be ESM, so you
will need to update the gist with `import React from 'react'`.

###
[`v4.3.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#430-2024-05-22)

[Compare
Source](https://togithub.com/vitejs/vite-plugin-react/compare/v4.2.1...v4.3.0)

##### Fix support for React compiler

Don't set `retainLines: true` when the React compiler is used. This
creates whitespace issues and the compiler is modifying the JSX too much
to get correct line numbers after that. If you want to use the React
compiler and get back correct line numbers for tools like
[vite-plugin-react-click-to-component](https://togithub.com/ArnaudBarre/vite-plugin-react-click-to-component)
to work, you should update your config to something like:

```ts
export default defineConfig(({ command }) => {
  const babelPlugins = [['babel-plugin-react-compiler', {}]]
  if (command === 'serve') {
    babelPlugins.push(['@&#8203;babel/plugin-transform-react-jsx-development', {}])
  }

  return {
    plugins: [react({ babel: { plugins: babelPlugins } })],
  }
})
```

##### Support HMR for class components

This is a long overdue and should fix some issues people had with HMR
when migrating from CRA.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/redwoodjs/redwood).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] authored Jul 20, 2024
1 parent 36e8346 commit 30832ee
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@redwoodjs/server-store": "workspace:*",
"@redwoodjs/web": "workspace:*",
"@swc/core": "1.5.27",
"@vitejs/plugin-react": "4.2.1",
"@vitejs/plugin-react": "4.3.1",
"@whatwg-node/fetch": "0.9.17",
"@whatwg-node/server": "0.9.36",
"acorn-loose": "8.4.0",
Expand Down
49 changes: 28 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.14.0, @babel/core@npm:^7.18.9, @babel/core@npm:^7.21.3, @babel/core@npm:^7.22.20, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.5":
"@babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.14.0, @babel/core@npm:^7.18.9, @babel/core@npm:^7.21.3, @babel/core@npm:^7.22.20, @babel/core@npm:^7.23.0, @babel/core@npm:^7.23.2, @babel/core@npm:^7.24.5":
version: 7.24.9
resolution: "@babel/core@npm:7.24.9"
dependencies:
Expand Down Expand Up @@ -1656,25 +1656,25 @@ __metadata:
languageName: node
linkType: hard

"@babel/plugin-transform-react-jsx-self@npm:^7.23.3":
version: 7.23.3
resolution: "@babel/plugin-transform-react-jsx-self@npm:7.23.3"
"@babel/plugin-transform-react-jsx-self@npm:^7.24.5":
version: 7.24.7
resolution: "@babel/plugin-transform-react-jsx-self@npm:7.24.7"
dependencies:
"@babel/helper-plugin-utils": "npm:^7.22.5"
"@babel/helper-plugin-utils": "npm:^7.24.7"
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: 10c0/6b586508fc58998483d4ee93a7e784c4f4d2350e2633739cf1990b7ad172e13906f72382fdaf7f07b4e3c7e7555342634d392bdeb1a079bb64762c6368ca9a32
checksum: 10c0/dcf3b732401f47f06bb29d6016e48066f66de00029a0ded98ddd9983c770a00a109d91cd04d2700d15ee0bcec3ae3027a5f12d69e15ec56efc0bcbfac65e92cb
languageName: node
linkType: hard

"@babel/plugin-transform-react-jsx-source@npm:^7.23.3":
version: 7.23.3
resolution: "@babel/plugin-transform-react-jsx-source@npm:7.23.3"
"@babel/plugin-transform-react-jsx-source@npm:^7.24.1":
version: 7.24.7
resolution: "@babel/plugin-transform-react-jsx-source@npm:7.24.7"
dependencies:
"@babel/helper-plugin-utils": "npm:^7.22.5"
"@babel/helper-plugin-utils": "npm:^7.24.7"
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: 10c0/a3aad7cf738e9bfaddc26cdbb83bb9684c2e689d26fb0793d772af0c8da0cd25bb02523d192fbc6946c32143e56b472c1d33fa82466b3f2d3346e1ce8fe83cf6
checksum: 10c0/970ef1264c7c6c416ab11610665d5309aec2bd2b9086ae394e1132e65138d97b060a7dc9d31054e050d6dc475b5a213938c9707c0202a5022d55dcb4c5abe28f
languageName: node
linkType: hard

Expand Down Expand Up @@ -8673,7 +8673,7 @@ __metadata:
"@types/fs-extra": "npm:11.0.4"
"@types/react": "npm:^18.2.55"
"@types/yargs-parser": "npm:21.0.3"
"@vitejs/plugin-react": "npm:4.2.1"
"@vitejs/plugin-react": "npm:4.3.1"
"@whatwg-node/fetch": "npm:0.9.17"
"@whatwg-node/server": "npm:0.9.36"
acorn-loose: "npm:8.4.0"
Expand Down Expand Up @@ -11448,18 +11448,18 @@ __metadata:
languageName: node
linkType: hard

"@vitejs/plugin-react@npm:4.2.1":
version: 4.2.1
resolution: "@vitejs/plugin-react@npm:4.2.1"
"@vitejs/plugin-react@npm:4.3.1":
version: 4.3.1
resolution: "@vitejs/plugin-react@npm:4.3.1"
dependencies:
"@babel/core": "npm:^7.23.5"
"@babel/plugin-transform-react-jsx-self": "npm:^7.23.3"
"@babel/plugin-transform-react-jsx-source": "npm:^7.23.3"
"@babel/core": "npm:^7.24.5"
"@babel/plugin-transform-react-jsx-self": "npm:^7.24.5"
"@babel/plugin-transform-react-jsx-source": "npm:^7.24.1"
"@types/babel__core": "npm:^7.20.5"
react-refresh: "npm:^0.14.0"
react-refresh: "npm:^0.14.2"
peerDependencies:
vite: ^4.2.0 || ^5.0.0
checksum: 10c0/de1eec44d703f32e5b58e776328ca20793657fe991835d15b290230b19a2a08be5d31501d424279ae13ecfed28044c117b69d746891c8d9b92c69e8a8907e989
checksum: 10c0/39a027feddfd6b3e307121d79631462ef1aae05714ba7a2f9a73d240d0f89c2bf281132568eb27b55d6ddaf08d86ad1bd8b0066090240e570de8c6320eb9a903
languageName: node
linkType: hard

Expand Down Expand Up @@ -25779,13 +25779,20 @@ __metadata:
languageName: node
linkType: hard

"react-refresh@npm:0.14.0, react-refresh@npm:^0.14.0":
"react-refresh@npm:0.14.0":
version: 0.14.0
resolution: "react-refresh@npm:0.14.0"
checksum: 10c0/b8ae07ad153357d77830928a7f1fc2df837aabefee907fa273ba04c7643f3b860e986f1d4b7ada9b721c8d79b8c24b5b911a314a1a2398b105f1b13d19ea2b8d
languageName: node
linkType: hard

"react-refresh@npm:^0.14.2":
version: 0.14.2
resolution: "react-refresh@npm:0.14.2"
checksum: 10c0/875b72ef56b147a131e33f2abd6ec059d1989854b3ff438898e4f9310bfcc73acff709445b7ba843318a953cb9424bcc2c05af2b3d80011cee28f25aef3e2ebb
languageName: node
linkType: hard

"react-remove-scroll-bar@npm:^2.3.3":
version: 2.3.4
resolution: "react-remove-scroll-bar@npm:2.3.4"
Expand Down

0 comments on commit 30832ee

Please sign in to comment.