You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Republish through CI to attach provenance attestations. The previous versions of these packages were published manually outside of CI and therefore shipped without provenance; this patch re-releases the same code through the CI pipeline so every package includes an attestation.
Improved tree-shaking so bundlers can drop unused components. Component parts are now marked /* @__PURE__ */ and use named render functions instead of Component.displayName = ... assignments, which previously prevented dead-code elimination with some bundlers.
Republish through CI to attach provenance attestations. The previous versions of these packages were published manually outside of CI and therefore shipped without provenance; this patch re-releases the same code through the CI pipeline so every package includes an attestation.
Fixed an issue with how slot components interact with lazy React components. In the case of a lazy component instance, the resulting promise must be consumed to render the desired component.
The return type has changed from react(): PluginOption[] to more specialized type react(): Plugin[]. This allows for type-safe manipulation of plugins, for example:
// previously this causes type errorsreact({babel: {plugins: ['babel-plugin-react-compiler']}}).map(p=>({ ...p,applyToEnvironment: e=>e.name==='client'}))
This plugin only worked with Vite. But now it can also be used with raw Rolldown. The main purpose for using this plugin with Rolldown is to use react compiler.
Suggest @vitejs/plugin-react-oxc if rolldown-vite is detected #491
Emit a log which recommends @vitejs/plugin-react-oxc when rolldown-vite is detected to improve performance and use Oxc under the hood. The warning can be disabled by setting disableOxcRecommendation: true in the plugin options.
Use optimizeDeps.rollupOptions instead of optimizeDeps.esbuildOptions for rolldown-vite #489
This suppresses the warning about optimizeDeps.esbuildOptions being deprecated in rolldown-vite.
This plugin is now compatible with rolldown-powered version of Vite.
Note that currently the __source property value position might be incorrect. This will be fixed in the near future.
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";exportdefaultdefineConfig(/* Main config */reactRefresh.configs.vite({extraHOCs: ["someLibHOC"]}),);
Config example without config:
import{defineConfig}from"eslint/config";import{reactRefresh}from"eslint-plugin-react-refresh";exportdefaultdefineConfig({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:
[!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:
By default, the rule only knows that memo & forwardRef function calls with return a React component. With this option, you can also allow extra function names like Mobx observer to make this code valid:
You can now add the recommended config to your ESLint config like this:
importreactRefreshfrom"eslint-plugin-react-refresh";exportdefault[/* Main config */reactRefresh.configs.recommended,// Or reactRefresh.configs.vite for Vite users];
To follow ESLint recommandations, the rule is added with the error severity.
Some simple types ensure that people typecheking their config won't need @ts-expect-error anymore.
Bump ESLint peer dependency to 8.40
This was actually done by mistake in the previous release when moving from a deprecated API to a new one.
Given that ESLint 8 is officialy end-of-life and the only report (#56) didn't get likes, I'm going forward and documenting the expected minimum version from ESLin in the package JSON so that people can get warning from their package manager.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.6.0→4.7.02.1.2→2.1.241.1.0→1.3.315.3.0→15.3.118.3.12→18.3.3118.3.1→18.3.74.3.3→4.7.010.4.20→10.5.40.7.0→0.7.113.16.0→13.17.05.0.0→5.2.0^0.4.7→^0.5.0^0.460.0→^0.577.0^0.52.0→^0.56.08.4.49→8.5.262.1.7→2.1.92.0.8→2.1.52.2.5→2.5.12.5.4→2.6.13.4.15→3.4.19Release Notes
suren-atoyan/monaco-react (@monaco-editor/react)
v4.7.0Compare Source
radix-ui/primitives (@radix-ui/react-dropdown-menu)
v2.1.24@radix-ui/react-compose-refs@1.1.5,@radix-ui/react-context@1.2.2,@radix-ui/react-id@1.1.4,@radix-ui/react-menu@2.1.24,@radix-ui/react-primitive@2.1.10,@radix-ui/react-use-controllable-state@1.2.6v2.1.23@radix-ui/react-menu@2.1.23,@radix-ui/react-primitive@2.1.9v2.1.22@radix-ui/primitive@1.1.7,@radix-ui/react-compose-refs@1.1.4,@radix-ui/react-context@1.2.1,@radix-ui/react-id@1.1.3,@radix-ui/react-menu@2.1.22,@radix-ui/react-primitive@2.1.8,@radix-ui/react-use-controllable-state@1.2.5v2.1.21/* @__PURE__ */and use named render functions instead ofComponent.displayName = ...assignments, which previously prevented dead-code elimination with some bundlers.@radix-ui/react-menu@2.1.21,@radix-ui/react-use-controllable-state@1.2.4,@radix-ui/primitive@1.1.6,@radix-ui/react-compose-refs@1.1.3,@radix-ui/react-context@1.2.0,@radix-ui/react-id@1.1.2,@radix-ui/react-primitive@2.1.7v2.1.20Space/Enterkeys that originate from focusable descendants.@radix-ui/primitive@1.1.5,@radix-ui/react-context@1.2.0,@radix-ui/react-menu@2.1.20v2.1.19Other updates
@radix-ui/react-primitive@2.1.7,@radix-ui/react-menu@2.1.19v2.1.18@radix-ui/react-menu@2.1.18,@radix-ui/react-primitive@2.1.6v2.1.17@radix-ui/react-menu@2.1.17,@radix-ui/primitive@1.1.4,@radix-ui/react-compose-refs@1.1.3,@radix-ui/react-context@1.1.4,@radix-ui/react-id@1.1.2,@radix-ui/react-primitive@2.1.5,@radix-ui/react-use-controllable-state@1.2.3v2.1.16@radix-ui/primitive@1.1.3,@radix-ui/react-context@1.1.3,@radix-ui/react-menu@2.1.16,@radix-ui/react-primitive@2.1.4v2.1.15@radix-ui/react-menu@2.1.15,@radix-ui/react-primitive@2.1.3v2.1.14@radix-ui/react-menu@2.1.14,@radix-ui/react-primitive@2.1.2v2.1.13@radix-ui/react-menu@2.1.13,@radix-ui/react-primitive@2.1.1v2.1.12@radix-ui/react-menu@2.1.12v2.1.11@radix-ui/react-menu@2.1.11v2.1.10@radix-ui/react-use-controllable-state@1.2.2,@radix-ui/react-menu@2.1.10v2.1.9@radix-ui/react-use-controllable-state@1.2.1,@radix-ui/react-menu@2.1.9v2.1.8useControllableStateto enhance performance, reduce surface area for bugs, and log warnings when misused (#3455)@radix-ui/react-use-controllable-state@1.2.0,@radix-ui/react-primitive@2.1.0,@radix-ui/react-menu@2.1.8v2.1.7Compare Source
v2.1.6Compare Source
v2.1.5Compare Source
v2.1.4Compare Source
v2.1.3Compare Source
radix-ui/primitives (@radix-ui/react-slot)
v1.3.3v1.3.2v1.3.1@radix-ui/primitive@1.1.7,@radix-ui/react-compose-refs@1.1.4v1.3.0Added generic type arguments for
SlotPropsandcreateSlotSlotPropsandcreateSlotnow accept generic type arguments to specify the type of element a slot should render, as well as its props.v1.2.5Slotcreating a new ref callback on every renderSlottablevia a render prop, so a slotted element can be wrapped while still merging Slot props and refs onto it@radix-ui/react-compose-refs@1.1.3v1.2.4v1.2.3v1.2.2use clientto slot entry to prevent RSC errorsv1.2.1v1.2.0Compare Source
v1.1.2Compare Source
v1.1.1Compare Source
rollup/plugins (@rollup/plugin-node-resolve)
v15.3.12024-12-15
Updates
testwithincludes(#1787)vitejs/vite-plugin-react (@vitejs/plugin-react)
v4.7.0Compare Source
Add HMR support for compound components (#518)
HMR now works for compound components like this:
Return
Plugin[]instead ofPluginOption[](#537)The return type has changed from
react(): PluginOption[]to more specialized typereact(): Plugin[]. This allows for type-safe manipulation of plugins, for example:v4.6.0Compare Source
Add raw Rolldown support
This plugin only worked with Vite. But now it can also be used with raw Rolldown. The main purpose for using this plugin with Rolldown is to use react compiler.
v4.5.2Compare Source
Suggest
@vitejs/plugin-react-oxcif rolldown-vite is detected #491Emit a log which recommends
@vitejs/plugin-react-oxcwhenrolldown-viteis detected to improve performance and use Oxc under the hood. The warning can be disabled by settingdisableOxcRecommendation: truein the plugin options.Use
optimizeDeps.rollupOptionsinstead ofoptimizeDeps.esbuildOptionsfor rolldown-vite #489This suppresses the warning about
optimizeDeps.esbuildOptionsbeing deprecated in rolldown-vite.Add Vite 7-beta to peerDependencies range #497
React plugins are compatible with Vite 7, this removes the warning when testing the beta.
v4.5.1Compare Source
Add explicit semicolon in preambleCode #485
This fixes an edge case when using HTML minifiers that strips line breaks aggressively.
v4.5.0Compare Source
Add
filterfor rolldown-vite #470Added
filterso that it is more performant when running this plugin with rolldown-powered version of Vite.Skip HMR for JSX files with hooks #480
This removes the HMR warning for hooks with JSX.
v4.4.1Compare Source
Fix type issue when using
moduleResolution: "node"in tsconfig #462v4.4.0Compare Source
Make compatible with rolldown-vite
This plugin is now compatible with rolldown-powered version of Vite.
Note that currently the
__sourceproperty value position might be incorrect. This will be fixed in the near future.v4.3.4Compare Source
Add Vite 6 to peerDependencies range
Vite 6 is highly backward compatible, not much to add!
Force Babel to output spec compliant import attributes #386
The default was an old spec (
with type: "json"). We now enforce spec compliant (with { type: "json" })postcss/autoprefixer (autoprefixer)
v10.5.4Compare Source
v10.5.3Compare Source
v10.5.2Compare Source
-webkit-fill-availablebefore-moz-available, so Firefoxwill use
-webkit-version which is closer tostretch.v10.5.1Compare Source
grid-areaspan reset for overriding areas (by @puneetdixit200).v10.5.0Compare Source
mask-position-xandmask-position-ysupport (by @toporek).v10.4.27Compare Source
package.json.v10.4.26Compare Source
v10.4.25Compare Source
v10.4.24Compare Source
v10.4.23Compare Source
v10.4.22Compare Source
stretchprefixes on new Can I Use database.fraction.js.v10.4.21Compare Source
-moz-prefix for:placeholder-shown(by @Marukome0743).joe-bell/cva (class-variance-authority)
v0.7.1Compare Source
What's Changed
New Contributors
Full Changelog: joe-bell/cva@v0.7.0...v0.7.1
cypress-io/cypress (cypress)
v13.17.0Compare Source
Changelog: https://docs.cypress.io/app/references/changelog#13-17-0
v13.16.1Compare Source
Changelog: https://docs.cypress.io/app/references/changelog#13-16-1
facebook/react (eslint-plugin-react-hooks)
v5.2.0Compare Source
do/whileloops (@tyxla in #31720)v5.1.0Compare Source
do/whileloops (@tyxla in #28714)asexpression (@mskelton in #31119)ArnaudBarre/eslint-plugin-react-refresh (eslint-plugin-react-refresh)
v0.5.4Compare Source
instanttoallowExportNamesin Next config #112v0.5.3Compare Source
export { }#110 (fixes #109)v0.5.2Compare Source
v0.5.1Compare Source
v0.5.0Compare Source
Breaking changes
reactRefreshexport is available and prefered over the default export. It's an object with two properties:plugin: The plugin object with the rulesconfigs: 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.customHOCsoption was renamed toextraHOCsextraHOCsoptionConfig example:
Config example without config:
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 likeexport 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"] } ] }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
connectfrom the rule. If you are usingconnectfromreact-redux, you should now add it toextraHOCslike this:{ "react-refresh/only-export-components": ["warn", { "extraHOCs": ["connect"] }] }v0.4.26Compare Source
v0.4.25Compare Source
export const ENUM = Object.keys(TABLE) as EnumType[];(fixes #93) (reverted in 0.4.26)_in component names (#94)v0.4.24Compare Source
"generateImageMetadata","generateSitemaps"&"generateStaticParams"toallowExportNamesin Next configv0.4.23Compare Source
"metadata","generateMetadata"&"generateViewport"toallowExportNamesin Next configv0.4.22Compare Source
"viewport"toallowExportNamesin Next config (#89)v0.4.21Compare Source
This allows exports like
fetchCacheandrevalidatewhich are used in Page or Layout components and don't trigger a full page reload.v0.4.20Compare Source
as const(fixes #80)v0.4.19Compare Source
Add name to configs for ESLint Config Inspector
v0.4.18Compare Source
ESM/CJS interop is the worse that happened to this ecosystem, this is all I have to say.
v0.4.17Compare Source
.defaultproperty access under TS node16 module resolution (fixes #70)v0.4.16Compare Source
Fix CJS/ESM interop issue. Sorry everyone for the trouble.
v0.4.15Compare Source
Add support for custom HOCs (#60)
By default, the rule only knows that
memo&forwardReffunction calls with return a React component. With this option, you can also allow extra function names like Mobx observer to make this code valid:{ "react-refresh/only-export-components": [ "error", { "extraHOCs": ["observer"] } ] }Thanks @HorusGoul!
Add recommended config and simple types (#67)
You can now add the recommended config to your ESLint config like this:
To follow ESLint recommandations, the rule is added with the
errorseverity.Some simple types ensure that people typecheking their config won't need
@ts-expect-erroranymore.Bump ESLint peer dependency to 8.40
This was actually done by mistake in the previous release when moving from a deprecated API to a new one.
Given that ESLint 8 is officialy end-of-life and the only report (#56) didn't get likes, I'm going forward and documenting the expected minimum version from ESLin in the package JSON so that people can get warning from their package manager.
lucide-icons/lucide (lucide-react)
v0.577.0: Version 0.577.0Compare Source
What's Changed
ellipseicon by @KISHORE-KUMAR-S in #3749New Contributors
Full Changelog: lucide-icons/lucide@0.576.0...0.577.0
v0.576.0: Version 0.576.0Compare Source
What's Changed
package-*icons. by @karsa-mistmere in #4074receipticon by @karsa-mistmere in #4075cuboidicon tags and categories by @karsa-mistmere in #4095cuboidicon by @jamiemlaw in #4098fishing-rodicon by @7ender in #3839Full Changelog: lucide-icons/lucide@0.575.0...0.576.0
v0.575.0: Version 0.575.0Compare Source
What's Changed
message-square-checkicon by @karsa-mistmere in #4076metronomeicon by @edwloef in #4063file-pen-lineicon by @jguddas in #3970square-arrow-right-exitandsquare-arrow-right-entericons by @EthanHazel in #3958flip-*tosquare-centerline-dashed-*by @jguddas in #3945New Contributors
Full Changelog: lucide-icons/lucide@0.573.0...0.575.0
v0.574.0: Version 0.574.0Compare Source
What's Changed
rocking-chairicon by @jamiemlaw in #3445coinsicon by @jguddas in #3158x-line-topicon by @jguddas in #2838mouse-lefticon by @marvfash in #2788mouse-righticon by @marvfash in #2787New Contributors
Full Changelog: lucide-icons/lucide@0.572.0...0.574.0
v0.573.0: Version 0.573.0Compare Source
What's Changed
rocking-chairicon by @jamiemlaw in #3445coinsicon by @jguddas in #3158x-line-topicon by @jguddas in #2838mouse-lefticon by @marvfash in #2788mouse-righticon by @marvfash in #2787New Contributors
Full Changelog: lucide-icons/lucide@0.572.0...0.573.0
v0.572.0: Version 0.572.0Compare Source
What's Changed
message-circle-checkicon by @Shrinks99 in #3770New Contributors
Full Changelog: lucide-icons/lucide@0.571.0...0.572.0
v0.571.0: Version 0.571.0Compare Source
What's Changed
circle-icons path and circle order by @adamlindqvist in #3746shelving-uniticon by @karsa-mistmere in #3041New Contributors
Full Changelog: lucide-icons/lucide@0.570.0...0.571.0
v0.570.0: Version 0.570.0Compare Source
What's Changed
towel-rackicon by @jguddas in #3350Full Changelog: lucide-icons/lucide@0.569.0...0.570.0
v0.569.0: Version 0.569.0Compare Source
What's Changed
clipboard-penicon by @Spleefies in #4006mirror-roundandmirror-rectangularby @Muhammad-Aqib-Bashir in #3832Full Changelog: lucide-icons/lucide@0.568.0...0.569.0
v0.568.0: Version 0.568.0Compare Source
What's Changed
clapperboardso slash is no longer protruding by @torfmuer in #3764git-merge-conflicticon by @timmy471 in #3008New Contributors
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.