Skip to content

Update react dependencies#2168

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/react-dependencies
Open

Update react dependencies#2168
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/react-dependencies

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 15, 2025

This PR contains the following updates:

Package Change Age Confidence
eslint-plugin-react 7.37.47.37.5 age confidence
eslint-plugin-react-refresh 0.4.190.5.2 age confidence
react-router-dom (source) 6.30.06.30.3 age confidence

Release Notes

jsx-eslint/eslint-plugin-react (eslint-plugin-react)

v7.37.5

Compare Source

Fixed
Changed
ArnaudBarre/eslint-plugin-react-refresh (eslint-plugin-react-refresh)

v0.5.2

Compare Source

  • Support nested function calls for extraHOCs (actually fixes #​104)

v0.5.1

Compare Source

  • Mark ESLint v10 as supported
  • Support false positives with TypeScript function overloading (fixes #​105)
  • Support nested function calls for extraHOCs (fixes #​104)

v0.5.0

Compare Source

Breaking changes
  • The package now ships as ESM and requires ESLint 9 + node 20. Because legacy config doesn't support ESM, this requires to use flat config
  • A new reactRefresh export is available and prefered over the default export. It's an object with two properties:
    • plugin: The plugin object with the rules
    • configs: An object containing configuration presets, each exposed as a function. These functions accept your custom options, merge them with sensible defaults for that config, and return the final config object.
  • customHOCs option was renamed to extraHOCs
  • Validation of HOCs calls is now more strict, you may need to add some HOCs to the extraHOCs option

Config example:

import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";

export default defineConfig(
  /* Main config */
  reactRefresh.configs.vite({ extraHOCs: ["someLibHOC"] }),
);

Config example without config:

import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";

export default defineConfig({
  files: ["**/*.ts", "**/*.tsx"],
  plugins: {
    // other plugins
    "react-refresh": reactRefresh.plugin,
  },
  rules: {
    // other rules
    "react-refresh/only-export-components": [
      "warn",
      { extraHOCs: ["someLibHOC"] },
    ],
  },
});
Why

This version follows a revamp of the internal logic to better make the difference between random call expressions like export const Enum = Object.keys(Record) and actual React HOC calls like export const MemoComponent = memo(Component). (fixes #​93)

The rule now handles ternaries and patterns like export default customHOC(props)(Component) which makes it able to correctly support files like this one given this config:

{
  "react-refresh/only-export-components": [
    "warn",
    { "extraHOCs": ["createRootRouteWithContext"] }
  ]
}

[!NOTE]
Actually createRoute functions from TanStack Router are not React HOCs, they return route objects that fake to be a memoized component but are not. When only doing createRootRoute({ component: Foo }), HMR will work fine, but as soon as you add a prop to the options that is not a React component, HMR will not work. I would recommend to avoid adding any TanStack function to extraHOCs it you want to preserve good HMR in the long term. Bluesky thread.

Because I'm not 100% sure this new logic doesn't introduce any false positive, this is done in a major-like version. This also give me the occasion to remove the hardcoded connect from the rule. If you are using connect from react-redux, you should now add it to extraHOCs like this:

{
  "react-refresh/only-export-components": ["warn", { "extraHOCs": ["connect"] }]
}

v0.4.26

Compare Source

v0.4.25

Compare Source

  • Report cases like export const ENUM = Object.keys(TABLE) as EnumType[]; (fixes #​93)
  • Allow _ in component names (#​94)

v0.4.24

Compare Source

  • Add "generateImageMetadata", "generateSitemaps" & "generateStaticParams" to allowExportNames in Next config

v0.4.23

Compare Source

  • Add "metadata", "generateMetadata" & "generateViewport" to allowExportNames in Next config

v0.4.22

Compare Source

  • Add "viewport" to allowExportNames in Next config (#​89)

v0.4.21

Compare Source

  • Add Next config (fixes #​85)

This allows exports like fetchCache and revalidate which are used in Page or Layout components and don't trigger a full page reload.

import reactRefresh from "eslint-plugin-react-refresh";

export default [
  /* Main config */
  reactRefresh.configs.next,
];

v0.4.20

Compare Source

  • Don't warn on nested HOC calls (fixes #​79)
  • Fix false positive with as const (fixes #​80)
remix-run/react-router (react-router-dom)

v6.30.3

Compare Source

v6.30.2

Compare Source

v6.30.1

Compare Source


Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 8938412 to 69a9498 Compare April 15, 2025 15:37
@socket-security
Copy link

socket-security bot commented Apr 15, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedreact-router-dom@​6.30.0 ⏵ 6.30.1981007399100
Updatedreact-router@​6.30.0 ⏵ 6.30.1971007699100
Updatedeslint-plugin-react-refresh@​0.4.19 ⏵ 0.4.20100 +110099 +186100
Updatedeslint-plugin-react@​7.37.4 ⏵ 7.37.598 +110010087100

View full report

@renovate renovate bot force-pushed the renovate/react-dependencies branch from 69a9498 to 78e7763 Compare April 16, 2025 10:09
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 78e7763 to c7636e9 Compare April 16, 2025 10:09
@renovate renovate bot changed the title Update dependency eslint-plugin-react to v7.37.5 Update react dependencies Apr 22, 2025
@renovate renovate bot force-pushed the renovate/react-dependencies branch from c7636e9 to 4104d9a Compare April 22, 2025 02:16
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 4104d9a to 03e7800 Compare April 22, 2025 02:17
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 03e7800 to 365bf9a Compare May 6, 2025 02:17
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 365bf9a to dc4d2ab Compare May 6, 2025 02:17
@renovate renovate bot force-pushed the renovate/react-dependencies branch from dc4d2ab to 3a44b85 Compare May 6, 2025 02:20
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 3a44b85 to 2f53892 Compare May 6, 2025 02:20
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 2f53892 to 2c9b8ed Compare May 6, 2025 02:42
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 2c9b8ed to 3805e1f Compare May 6, 2025 02:42
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 3805e1f to 533dd53 Compare May 19, 2025 18:03
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 533dd53 to c38300b Compare May 19, 2025 18:03
@renovate renovate bot force-pushed the renovate/react-dependencies branch from c38300b to 3f594a7 Compare May 19, 2025 19:03
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 3f594a7 to 6166782 Compare May 19, 2025 19:03
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 6166782 to d5c5beb Compare May 19, 2025 19:47
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from d5c5beb to 98cd161 Compare May 19, 2025 19:47
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 98cd161 to 3a311e5 Compare May 21, 2025 02:15
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 3a311e5 to 3975cb8 Compare May 21, 2025 02:15
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 3975cb8 to 04fb4a8 Compare May 21, 2025 21:50
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 04fb4a8 to b26f404 Compare May 21, 2025 21:50
@renovate renovate bot force-pushed the renovate/react-dependencies branch from b26f404 to 036eeba Compare May 22, 2025 20:52
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 036eeba to 471b923 Compare May 22, 2025 20:52
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 471b923 to 85abb3c Compare May 22, 2025 21:23
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 85abb3c to 2c3179e Compare May 22, 2025 21:23
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 2c3179e to c51540c Compare May 23, 2025 21:36
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from c51540c to 889a5d4 Compare May 23, 2025 21:36
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 889a5d4 to 4cc1925 Compare May 23, 2025 21:39
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 748f0b8 to 11fb291 Compare August 6, 2025 11:40
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 11fb291 to 8668555 Compare August 8, 2025 22:02
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 8668555 to 7c29c47 Compare August 8, 2025 22:02
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 7c29c47 to b761263 Compare August 10, 2025 13:25
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from b761263 to f3a05b2 Compare August 10, 2025 13:26
@renovate renovate bot force-pushed the renovate/react-dependencies branch from f3a05b2 to f18d5ce Compare August 13, 2025 16:34
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from f18d5ce to 98f13b8 Compare August 13, 2025 16:34
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 98f13b8 to 70e13e7 Compare August 19, 2025 19:37
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 70e13e7 to 358d61f Compare August 19, 2025 19:37
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 358d61f to 44a94ba Compare August 25, 2025 10:27
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 44a94ba to 0c59f07 Compare August 25, 2025 10:28
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 0c59f07 to 8d39905 Compare August 25, 2025 10:30
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 8d39905 to 69104ce Compare August 25, 2025 10:30
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 69104ce to a6fa509 Compare August 25, 2025 11:19
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from a6fa509 to b8a1ff8 Compare August 25, 2025 11:20
@renovate renovate bot force-pushed the renovate/react-dependencies branch from b8a1ff8 to 6467068 Compare August 31, 2025 09:59
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 6467068 to 47d787d Compare August 31, 2025 10:00
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 47d787d to 61fd353 Compare September 23, 2025 01:40
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 61fd353 to 6063d99 Compare September 23, 2025 01:40
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 6063d99 to 5378a16 Compare September 25, 2025 21:47
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 5378a16 to 77c35b0 Compare September 25, 2025 21:47
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 77c35b0 to 248f1d8 Compare September 29, 2025 14:07
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 248f1d8 to 34a181a Compare September 29, 2025 14:08
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 34a181a to d3cda3a Compare October 1, 2025 22:00
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from d3cda3a to 0d76cc2 Compare October 1, 2025 22:01
@renovate renovate bot force-pushed the renovate/react-dependencies branch from 0d76cc2 to 852d588 Compare October 3, 2025 09:12
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 852d588 to ec0cc27 Compare October 3, 2025 09:12
@renovate renovate bot force-pushed the renovate/react-dependencies branch from ec0cc27 to 4cff985 Compare October 9, 2025 09:04
@github-actions github-actions bot force-pushed the renovate/react-dependencies branch from 4cff985 to 441d3be Compare October 9, 2025 09:05
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.

0 participants