Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade @vitejs/plugin-react from 4.2.1 to 4.3.0 #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cld-sec
Copy link

@cld-sec cld-sec commented Jun 12, 2024

This PR was automatically created by Snyk using the credentials of a real user.


![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)

Snyk has created this PR to upgrade @vitejs/plugin-react from 4.2.1 to 4.3.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 1 version ahead of your current version.

  • The recommended version was released on 21 days ago.

Release notes
Package name: @vitejs/plugin-react
  • 4.3.0 - 2024-05-22

    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 to work, you should update your config to something like:

    export default defineConfig(({ command }) => {
    const babelPlugins = [['babel-plugin-react-compiler', {}]]
    if (command === 'serve') {
    babelPlugins.push(['@ 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.

  • 4.2.1 - 2023-12-04

    Remove generic parameter on Plugin to avoid type error with Rollup 4/Vite 5 and skipLibCheck: false.

    I expect very few people to currently use this feature, but if you are extending the React plugin via api object, you can get back the typing of the hook by importing ViteReactPluginApi:

    import type { Plugin } from 'vite'
    import type { ViteReactPluginApi } from '@ vitejs/plugin-react'

    export const somePlugin: Plugin = {
    name: 'some-plugin',
    api: {
    reactBabel: (babelConfig) => {
    babelConfig.plugins.push('some-babel-plugin')
    },
    } satisfies ViteReactPluginApi,
    }




from @vitejs/plugin-react GitHub release notes


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade @vitejs/plugin-react from 4.2.1 to 4.3.0.

See this package in npm:
@vitejs/plugin-react

See this project in Snyk:
https://app.snyk.io/org/delivery/project/35cf5801-300d-4854-aec5-8a9ab8d8c9e2?utm_source=github&utm_medium=referral&page=upgrade-pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants