Update all dependencies #11

Merged
kjuulh merged 1 commits from renovate/all into main 2022-10-26 20:48:06 +02:00
Owner

This PR contains the following updates:

Package Type Update Change
@testing-library/react devDependencies major 12.1.5 -> 13.4.0
@testing-library/user-event devDependencies major 13.5.0 -> 14.4.3
@types/node (source) devDependencies major 16.11.68 -> 18.11.6
@types/react (source) devDependencies patch 18.0.21 -> 18.0.23
@types/react-dom (source) devDependencies patch 18.0.6 -> 18.0.7
clap dependencies patch 4.0.17 -> 4.0.18
react-redux dependencies major 7.2.9 -> 8.0.4

Release Notes

testing-library/react-testing-library

v13.4.0

Compare Source

Features
  • renderHook: allow passing of all render options to renderHook (#​1118) (27a9584)

v13.3.0

Compare Source

Features

v13.2.0

Compare Source

Features

v13.1.1

Compare Source

Bug Fixes

v13.1.0

Compare Source

Features

v13.0.1

Compare Source

Bug Fixes

v13.0.0

Compare Source

Features
BREAKING CHANGES
testing-library/user-event

v14.4.3

Compare Source

Bug Fixes

v14.4.2

Compare Source

Bug Fixes

v14.4.1

Compare Source

Bug Fixes

v14.4.0

Compare Source

Features
Bug Fixes
  • event: be robust against incomplete event implementations (#​1009) (289828b)
  • upload: be robust against missing FileList implementation (#​1007) (a46b4d7)
  • keyboard: switch modifier state of lock keys on the correct event (#​1003) (2852509)
  • keyboard: remove platform-specific additional key events for Control on AltGraph (#​1003) (2852509)
  • pointer: dispatch contextmenu events with detail: 0 (#​1003) (2852509)
  • pointer: always set PointerEvent.isPrimary (#​1003) (2852509)
  • pointer: set button property on pointer events separately from legacy mouse events (#​1003) (2852509)
  • pointer: click closest common ancestor if mousedown and mouseup happen on different elements (#​1003) (2852509)
  • pointer: omit click event on release if another button is released first (#​1003) (2852509)
  • pointer: dispatch mouseover, mouseenter and mousemove on disabled elements (#​1003) (2852509)
  • pointer: prevent mouse* events per pointerdown event handler (#​1003) (2852509)
  • pointer: dispatch *out and *over events when moving into / out of nested elements (#​1003) (2852509)
  • pointer: dispatch *enter and *leave events on ancestors (#​1003) (2852509)

v14.3.0

Compare Source

Features

v14.2.6

Compare Source

Bug Fixes
  • document: reduce impact of React@17 workaround (#​992) (9816d38)
  • pointer: do not throw for pointer-events: none on previous target (#​991) (6e4058b)

v14.2.5

Compare Source

Bug Fixes
  • document: do not track value on HTMLSelectElement (#​989) (77a7fa8)

v14.2.4

Compare Source

Bug Fixes
  • use window.FileList instead of implicit global (c88865d)

v14.2.3

Compare Source

Bug Fixes
  • document: use setters/methods on element as default (#​987) (c40e614)

v14.2.2

Compare Source

Bug Fixes

v14.2.1

Compare Source

Performance Improvements
  • tab: avert visibility check on irrelevant elements (#​967) (d2d8a39)

v14.2.0

Compare Source

Features
  • report element with declaration in pointerEventsCheck (#​950) (31b7091)
Bug Fixes

v14.1.1

Compare Source

14.1.1 (2022-04-17)
Bug Fixes

v14.1.0

Compare Source

Features
Bug Fixes

v14.0.4

Compare Source

14.0.4 (2022-04-01)
Bug Fixes

v14.0.3

Compare Source

14.0.3 (2022-03-31)
Bug Fixes
  • pointer: change selection before dispatching focus (#​895) (06f12a6)

v14.0.2

Compare Source

14.0.2 (2022-03-31)
Bug Fixes

v14.0.1

Compare Source

14.0.1 (2022-03-31)
Bug Fixes

v14.0.0

Compare Source

⚠ BREAKING CHANGES
  • APIs always return a Promise.
  • pointer: skipPointerEvents has been removed.
    Use pointerEventsCheck: PointerEventsCheckLevel.Never instead.
  • upload: init parameter has been removed from userEvent.upload.
  • upload: applyAccept defaults to true.
  • The userEvent.paste API has new parameters.
  • {ctrl}, {del}, {esc} no longer describe a key. Use {Control}, {Delete}, {Escape} instead.
  • {alt}, {ctrl}, {meta}, {shift} no longer imply not releasing the key. Use {Alt>}, {Control>}, {Meta>}, {Shift>} instead.
  • init parameter has been removed from these APIs:
    • userEvent.click
    • userEvent.dblClick
    • userEvent.tripleClick
    • userEvent.hover
    • userEvent.unhover
    • userEvent.selectOptions
    • userEvent.deselectOptions
  • userEvent.upload no longer supports clickInit
    as part of its init parameter.
  • Behavior for special key descriptor {selectall} has been removed.
  • Support for keyCode property on keyboard events has been removed.
  • An error is thrown when calling userEvent.clear on an element which is not editable.
  • An error is thrown when event handlers prevent userEvent.clear from focussing/selecting content.
  • tab: The focusTrap option has been removed from userEvent.tab().
  • type: userEvent.type does no longer move the cursor
    if used with skipClick=false and without initialSelectionStart.
  • The implementation of pointer related APIs was replaced.
    This might break tests relying on unintended side-effects of the previous implementation.
  • Support for node 10 was removed as it reached its end-of-life.
Features
Bug Fixes
Miscellaneous Chores
clap-rs/clap

v4.0.18

Compare Source

Fixes
  • (derive) Allow #[command(skip)] to also work with enum variants with a value
reduxjs/react-redux

v8.0.4

Compare Source

This patch release fixes some minor TS types issues, and updates the rarely-used areStatesEqual option for connect to now pass through ownProps for additional use in determining which pieces of state to compare if desired.

Note

: 8.0.3 was accidentally published without one of these fixes. Use 8.0.4 instead.

Changelog

TS Fixes

We've fixed an import of React that caused issues with the allowSyntheticDefaultImports TS compiler flag in user projects.

connect already accepted a custom context instance as props.context, and had runtime checks in case users were passing through a real value with app data as props.context instead. However, the TS types did not handle that case, and this would fail to compile. If your own component expects props.context with actual data, connect's types now use that type instead.

The ConnectedProps<T> type had a mismatch with React's built-in React.ComponentProps<Component> type, and that should now work correctly.

Other Changes

The areStatesEqual option to connect now receives ownProps as well, in case you need to make a more specific comparison with certain sections of state.

The new signature is:

{
  areStatesEqual?: (
    nextState: State,
    prevState: State,
    nextOwnProps: TOwnProps,
    prevOwnProps: TOwnProps
  ) => boolean
}

What's Changed

Full Changelog: https://github.com/reduxjs/react-redux/compare/v8.0.2...v8.0.4

v8.0.3

Compare Source

This release was accidentally published without an intended fix - please use v8.0.4 instead

v8.0.2

Compare Source

This patch release tweaks the behavior of connect to print a one-time warning when the obsolete pure option is passed in, rather than throwing an error. This fixes crashes caused by libraries such as react-beautiful-dnd continuing to pass in that option (unnecessarily) to React-Redux v8.

What's Changed

Full Changelog: https://github.com/reduxjs/react-redux/compare/v8.0.1...v8.0.2

v8.0.1

Compare Source

This release fixes an incorrect internal import of our Subscription type, which was causing TS compilation errors in some user projects. We've also listed @types/react-dom as an optional peerDep. There are no runtime changes in this release.

What's Changed

Full Changelog: https://github.com/reduxjs/react-redux/compare/v8.0.0...v8.0.1

v8.0.0

Compare Source

This major version release updates useSelector, connect, and <Provider> for compatibility with React 18, rewrites the React-Redux codebase to TypeScript (obsoleting use of @types/react-redux), modernizes build output, and removes the deprecated connectAdvanced API and the pure option for connect.

npm i react-redux@latest

yarn add react-redux@latest

Overview, Compatibility, and Migration

Our public API is still the same ( <Provider>, connect and useSelector/useDispatch), but we've updated the internals to use the new useSyncExternalStore hook from React. React-Redux v8 is still compatible with all versions of React that have hooks (16.8+, 17.x, and 18.x; React Native 0.59+), and should just work out of the box.

In most cases, it's very likely that the only change you will need to make is bumping the package version to "react-redux": "^8.0".

If you are using the rarely-used connectAdvanced API, you will need to rewrite your code to avoid that, likely by using the hooks API instead. Similarly, the pure option for connect has been removed.

If you are using Typescript, React-Redux is now written in TS and includes its own types. You should remove any dependencies on @types/react-redux.

While not directly tied to React-Redux, note that the recently updated @types/react@18 major version has changed component definitions to remove having children as a prop by default. This causes errors if you have multiple copies of @types/react in your project. To fix this, tell your package manager to resolve @types/react to a single version. Details:

React issue #​24304: React 18 types broken since release

Additionally, please see the React post on How to Ugprade to React 18 for details on how to migrate existing apps to correctly use React 18 and take advantage of its new features.

Changelog

React 18 Compatibility

React-Redux now requires the new useSyncExternalStore API in React 18. By default, it uses the "shim" package which backfills that API in earlier React versions, so React-Redux v8 is compatible with all React versions that have hooks (16.8+, and React Native 0.59+) as its acceptable peer dependencies.

We'd especially like to thank the React team for their extensive support and cooperation during the useSyncExternalStore development effort. They specifically designed useSyncExternalStore to support the needs and use cases of React-Redux, and we used React-Redux v8 as a testbed for how useSyncExternalStore would behave and what it needed to cover. This in turn helped ensure that useSyncExternalStore would be useful and work correctly for other libraries in the ecosystem as well.

Our performance benchmarks show parity with React-Redux v7.2.5 for both connect and useSelector, so we do not anticipate any meaningful performance regressions.

useSyncExternalStore and Bundling

The useSyncExternalStore shim is imported directly in the main entry point, so it's always included in bundles even if you're using React 18. This adds roughly 600 bytes minified to your bundle size.

If you are using React 18 and would like to avoid that extra bundle cost, React-Redux now has a new /next entry point. This exports the exact same APIs, but directly imports useSyncExternalStore from React itself, and thus avoids including the shim. You can alias "react-redux": "react-redux/next" in your bundler to use that instead.

SSR and Hydration

React 18 introduces a new hydrateRoot method for hydrating the UI on the client in Server-Side Rendering usage. As part of that, the useSyncExternalStore API requires that we pass in an alternate state value other than what's in the actual Redux store, and that alternate value will be used for the entire initial hydration render to ensure the initial rehydrated UI is an exact match for what was rendered on the server. After the hydration render is complete, React will then apply any additional changes from the store state in a follow-up render.

React-Redux v8 supports this by adding a new serverState prop for <Provider>. If you're using SSR, you should pass your serialized state to <Provider> to ensure there are no hydration mismatch errors:

import { hydrateRoot } from 'react-dom/client'
import { configureStore } from '@&#8203;reduxjs/toolkit'
import { Provider } from 'react-redux'

const preloadedState = window.__PRELOADED_STATE__

const clientStore = configureStore({
  reducer: rootReducer,
  preloadedState,
})

hydrateRoot(
  document.getElementById('root'),
  <Provider store={clientStore} serverState={preloadedState}>
    <App />
  </Provider>
)
TypeScript Migration and Support

The React-Redux library source has always been written in plain JS, and the community maintained the TS typings separately as @types/react-redux.

We've (finally!) migrated the React-Redux codebase to TypeScript, using the existing typings as a starting point. This means that the @types/react-redux package is no longer needed, and you should remove that as a dependency.

Note

Please ensure that any installed copies of redux and @types/react are de-duped. You are also encouraged to update to the latest versions of Redux Toolkit (1.8.1+) or Redux (4.1.2), to ensure consistency between installed types and avoid problems from types mismatches.

We've tried to maintain the same external type signatures as much as possible. If you do see any compile problems, please file issues with any apparent TS-related problems so we can review them.

The TS migration was a great collaborative effort, with many community members contributing migrated files. Thank you to everyone who helped out!

In addition to the "pre-typed" TypedUseSelectorHook, there's now also a Connect<State = unknown> type that can be used as a "pre-typed" version of connect as well.

As part of the process, we also updated the repo to use Yarn 3, copied the typetests files from DefinitelyTyped and expanded them, and improved our CI setup to test against multiple TS versions.

Removal of the DefaultRootState type

The @types/react-redux package, which has always been maintained by the community, included a DefaultRootState interface that was intended for use with TS's "module augmentation" capability. Both connect and useSelector used this as a fallback if no state generic was provided. When we migrated React-Redux to TS, we copied over all of the types from that package as a starting point.

However, the Redux team specifically considers use of a globally augmented state type to be an anti-pattern. Instead, we direct users to extract the RootState and AppDispatch types from the store setup, and create pre-typed versions of the React-Redux hooks for use in the app.

Now that React-Redux itself is written in TS, we've opted to remove the DefaultRootState type entirely. State generics now default to unknown instead.

Technically the module augmentation approach can still be done in userland, but we discourage this practice.

Modernized Build Output

We've always targeted ES5 syntax in our published build artifacts as the lowest common denominator. Even the "ES module" artifacts with import/export keywords still were compiled to ES5 syntax otherwise.

With IE11 now effectively dead and many sites no longer supporting it, we've updated our build tooling to target a more modern syntax equivalent to ES2017, which shrinks the bundle size slightly.

If you still need to support ES5-only environments, please compile your own dependencies as needed for your target environment.

Removal of Legacy APIs

We announced in 2019 that the legacy connectAdvanced API would be removed in the next major version, as it was rarely used, added internal complexity, and was also basically irrelevant with the introduction of hooks. As promised, we've removed that API.

We've also removed the pure option for connect, which forced components to re-render regardless of whether props/state had actually changed if it was set to false. This option was needed in some cases in the early days of the React ecosystem, when components sometimes relied on external mutable data sources that could change outside of rendering. Today, no one writes components that way, the option was barely used, and React 18's useSyncExternalStore strictly requires immutable updates. So, we've removed the pure flag.

Given that both of these options were almost never used, this shouldn't meaningfully affect anyone.

Changes

Due to the TS migration effort and number of contributors, this list covers just the major changes:


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.

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


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@testing-library/react](https://github.com/testing-library/react-testing-library) | devDependencies | major | [`12.1.5` -> `13.4.0`](https://renovatebot.com/diffs/npm/@testing-library%2freact/12.1.5/13.4.0) | | [@testing-library/user-event](https://github.com/testing-library/user-event) | devDependencies | major | [`13.5.0` -> `14.4.3`](https://renovatebot.com/diffs/npm/@testing-library%2fuser-event/13.5.0/14.4.3) | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | devDependencies | major | [`16.11.68` -> `18.11.6`](https://renovatebot.com/diffs/npm/@types%2fnode/16.11.68/18.11.6) | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | devDependencies | patch | [`18.0.21` -> `18.0.23`](https://renovatebot.com/diffs/npm/@types%2freact/18.0.21/18.0.23) | | [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | devDependencies | patch | [`18.0.6` -> `18.0.7`](https://renovatebot.com/diffs/npm/@types%2freact-dom/18.0.6/18.0.7) | | [clap](https://github.com/clap-rs/clap) | dependencies | patch | `4.0.17` -> `4.0.18` | | [react-redux](https://github.com/reduxjs/react-redux) | dependencies | major | [`7.2.9` -> `8.0.4`](https://renovatebot.com/diffs/npm/react-redux/7.2.9/8.0.4) | --- ### Release Notes <details> <summary>testing-library/react-testing-library</summary> ### [`v13.4.0`](https://github.com/testing-library/react-testing-library/releases/tag/v13.4.0) [Compare Source](https://github.com/testing-library/react-testing-library/compare/v13.3.0...v13.4.0) ##### Features - **renderHook:** allow passing of all render options to renderHook ([#&#8203;1118](https://github.com/testing-library/react-testing-library/issues/1118)) ([27a9584](https://github.com/testing-library/react-testing-library/commit/27a9584629e28339b9961edefbb2134d7c570678)) ### [`v13.3.0`](https://github.com/testing-library/react-testing-library/releases/tag/v13.3.0) [Compare Source](https://github.com/testing-library/react-testing-library/compare/v13.2.0...v13.3.0) ##### Features - Use `globalThis` if available ([#&#8203;1070](https://github.com/testing-library/react-testing-library/issues/1070)) ([c80809a](https://github.com/testing-library/react-testing-library/commit/c80809a956b0b9f3289c4a6fa8b5e8cc72d6ef6d)) ### [`v13.2.0`](https://github.com/testing-library/react-testing-library/releases/tag/v13.2.0) [Compare Source](https://github.com/testing-library/react-testing-library/compare/v13.1.1...v13.2.0) ##### Features - Export RenderHookOptions type ([#&#8203;1062](https://github.com/testing-library/react-testing-library/issues/1062)) ([46b28ad](https://github.com/testing-library/react-testing-library/commit/46b28ade730f97a49a253d630f5b97c17ff24f6e)) ### [`v13.1.1`](https://github.com/testing-library/react-testing-library/releases/tag/v13.1.1) [Compare Source](https://github.com/testing-library/react-testing-library/compare/v13.1.0...v13.1.1) ##### Bug Fixes - **TS:** export interface RenderHookResult ([#&#8203;1049](https://github.com/testing-library/react-testing-library/issues/1049)) ([9171163](https://github.com/testing-library/react-testing-library/commit/9171163fccf0a7ea43763475ca2980898b4079a5)) ### [`v13.1.0`](https://github.com/testing-library/react-testing-library/releases/tag/v13.1.0) [Compare Source](https://github.com/testing-library/react-testing-library/compare/v13.0.1...v13.1.0) ##### Features - Add `renderHook` ([#&#8203;991](https://github.com/testing-library/react-testing-library/issues/991)) ([9535eff](https://github.com/testing-library/react-testing-library/commit/9535eff82ada685c410b3b25ef3e2313ea3a86aa)) ### [`v13.0.1`](https://github.com/testing-library/react-testing-library/releases/tag/v13.0.1) [Compare Source](https://github.com/testing-library/react-testing-library/compare/v13.0.0...v13.0.1) ##### Bug Fixes - Specify a non-\* version for [@&#8203;types/react-dom](https://github.com/types/react-dom) ([#&#8203;1040](https://github.com/testing-library/react-testing-library/issues/1040)) ([2a889e8](https://github.com/testing-library/react-testing-library/commit/2a889e80658ce93882c5ba253ea65f5542ece2d0)) ### [`v13.0.0`](https://github.com/testing-library/react-testing-library/releases/tag/v13.0.0) [Compare Source](https://github.com/testing-library/react-testing-library/compare/v12.1.5...v13.0.0) ##### Features - Add support for React 18 ([#&#8203;1031](https://github.com/testing-library/react-testing-library/issues/1031)) ([ccd8a0d](https://github.com/testing-library/react-testing-library/commit/ccd8a0d97dd9da0a420f2cf012a24d414d1646ed)) ##### BREAKING CHANGES - Drop support for React 17 and earlier. We'll use the new [`createRoot` API](https://github.com/reactwg/react-18/discussions/5) by default which comes with a set of [changes while also enabling support for concurrent features](https://github.com/reactwg/react-18/discussions/4). To opt-out of this change you can use `render(ui, { legacyRoot: true } )`. But be aware that the legacy root API is deprecated in React 18 and its usage will trigger console warnings. </details> <details> <summary>testing-library/user-event</summary> ### [`v14.4.3`](https://github.com/testing-library/user-event/releases/tag/v14.4.3) [Compare Source](https://github.com/testing-library/user-event/compare/v14.4.2...v14.4.3) ##### Bug Fixes - **build:** add `types` field in `exports` ([#&#8203;1029](https://github.com/testing-library/user-event/issues/1029)) ([5bed8c6](https://github.com/testing-library/user-event/commit/5bed8c6a2b645e172973d55d6ac2ceb637972291)) - remove circular dependencies ([#&#8203;1027](https://github.com/testing-library/user-event/issues/1027)) ([1aa2027](https://github.com/testing-library/user-event/commit/1aa2027e5ec445ab413808556efa7763b65053d3)) ### [`v14.4.2`](https://github.com/testing-library/user-event/releases/tag/v14.4.2) [Compare Source](https://github.com/testing-library/user-event/compare/v14.4.1...v14.4.2) ##### Bug Fixes - **build:** add `exports` field ([#&#8203;1022](https://github.com/testing-library/user-event/issues/1022)) ([7839e29](https://github.com/testing-library/user-event/commit/7839e293135e48fd710445c8bb1233bf2e1abb4b)) ### [`v14.4.1`](https://github.com/testing-library/user-event/releases/tag/v14.4.1) [Compare Source](https://github.com/testing-library/user-event/compare/v14.4.0...v14.4.1) ##### Bug Fixes - **build:** transpile to es2019 syntax ([#&#8203;1016](https://github.com/testing-library/user-event/issues/1016)) ([4291cb8](https://github.com/testing-library/user-event/commit/4291cb8cd59afa9f7e2cff46f12dae6e26f7c5bc)) ### [`v14.4.0`](https://github.com/testing-library/user-event/releases/tag/v14.4.0) [Compare Source](https://github.com/testing-library/user-event/compare/v14.3.0...v14.4.0) ##### Features - **pointer**: dispatch `auxclick` events ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) ##### Bug Fixes - **event:** be robust against incomplete event implementations ([#&#8203;1009](https://github.com/testing-library/user-event/issues/1009)) ([289828b](https://github.com/testing-library/user-event/commit/289828b1b90e79d4ad3bfc227a2e68bd88f13344)) - **upload:** be robust against missing FileList implementation ([#&#8203;1007](https://github.com/testing-library/user-event/issues/1007)) ([a46b4d7](https://github.com/testing-library/user-event/commit/a46b4d7157ec0b2cfc450fa852910e332a17080c)) - **keyboard**: switch modifier state of lock keys on the correct event ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **keyboard**: remove platform-specific additional key events for `Control` on `AltGraph` ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: dispatch `contextmenu` events with `detail: 0` ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: always set `PointerEvent.isPrimary` ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: set `button` property on pointer events separately from legacy mouse events ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: click closest common ancestor if `mousedown` and `mouseup` happen on different elements ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: omit click event on release if another button is released first ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: dispatch `mouseover`, `mouseenter` and `mousemove` on disabled elements ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: prevent `mouse*` events per `pointerdown` event handler ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: dispatch `*out` and `*over` events when moving into / out of nested elements ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) - **pointer**: dispatch `*enter` and `*leave` events on ancestors ([#&#8203;1003](https://github.com/testing-library/user-event/issues/1003)) ([2852509](https://github.com/testing-library/user-event/commit/2852509f8e4d5ca28ec494cc85dc4020b0e44b45)) ### [`v14.3.0`](https://github.com/testing-library/user-event/releases/tag/v14.3.0) [Compare Source](https://github.com/testing-library/user-event/compare/v14.2.6...v14.3.0) ##### Features - **keyboard:** change radio group per arrow keys ([#&#8203;995](https://github.com/testing-library/user-event/issues/995)) ([e1c22af](https://github.com/testing-library/user-event/commit/e1c22af5875155306b201d8d7ad6ce8ac05a8d56)) ### [`v14.2.6`](https://github.com/testing-library/user-event/releases/tag/v14.2.6) [Compare Source](https://github.com/testing-library/user-event/compare/v14.2.5...v14.2.6) ##### Bug Fixes - **document:** reduce impact of React@17 workaround ([#&#8203;992](https://github.com/testing-library/user-event/issues/992)) ([9816d38](https://github.com/testing-library/user-event/commit/9816d384c33db30a00e1fa16c3bd616c6c58fd27)) - **pointer:** do not throw for `pointer-events: none` on previous target ([#&#8203;991](https://github.com/testing-library/user-event/issues/991)) ([6e4058b](https://github.com/testing-library/user-event/commit/6e4058becffb261a64968677c161f82daf9b3e25)) ### [`v14.2.5`](https://github.com/testing-library/user-event/releases/tag/v14.2.5) [Compare Source](https://github.com/testing-library/user-event/compare/v14.2.4...v14.2.5) ##### Bug Fixes - **document:** do not track `value` on `HTMLSelectElement` ([#&#8203;989](https://github.com/testing-library/user-event/issues/989)) ([77a7fa8](https://github.com/testing-library/user-event/commit/77a7fa840a162e1361fab88e52cb01b3c805163a)) ### [`v14.2.4`](https://github.com/testing-library/user-event/releases/tag/v14.2.4) [Compare Source](https://github.com/testing-library/user-event/compare/v14.2.3...v14.2.4) ##### Bug Fixes - use `window.FileList` instead of implicit global ([c88865d](https://github.com/testing-library/user-event/commit/c88865d3fcb34c485f7f008a01e8eb7e5bfbfbbe)) ### [`v14.2.3`](https://github.com/testing-library/user-event/releases/tag/v14.2.3) [Compare Source](https://github.com/testing-library/user-event/compare/v14.2.2...v14.2.3) ##### Bug Fixes - **document:** use setters/methods on element as default ([#&#8203;987](https://github.com/testing-library/user-event/issues/987)) ([c40e614](https://github.com/testing-library/user-event/commit/c40e614b9f2af5fd8f917bc0166716e0c701bc88)) ### [`v14.2.2`](https://github.com/testing-library/user-event/releases/tag/v14.2.2) [Compare Source](https://github.com/testing-library/user-event/compare/v14.2.1...v14.2.2) ##### Bug Fixes - **document:** track `HTMLInputElement.setRangeText()` ([#&#8203;984](https://github.com/testing-library/user-event/issues/984)) ([73443ec](https://github.com/testing-library/user-event/commit/73443ecf333752236c938827716e273ca7ae4950)) ### [`v14.2.1`](https://github.com/testing-library/user-event/releases/tag/v14.2.1) [Compare Source](https://github.com/testing-library/user-event/compare/v14.2.0...v14.2.1) ##### Performance Improvements - **tab:** avert visibility check on irrelevant elements ([#&#8203;967](https://github.com/testing-library/user-event/issues/967)) ([d2d8a39](https://github.com/testing-library/user-event/commit/d2d8a3996f3af6318153f765aedd890576ce6da3)) ### [`v14.2.0`](https://github.com/testing-library/user-event/releases/tag/v14.2.0) [Compare Source](https://github.com/testing-library/user-event/compare/v14.1.1...v14.2.0) ##### Features - report element with declaration in `pointerEventsCheck` ([#&#8203;950](https://github.com/testing-library/user-event/issues/950)) ([31b7091](https://github.com/testing-library/user-event/commit/31b709183a8695ff534bf0a5ac8e5e3726fcd3b9)) ##### Bug Fixes - guard against selection without range ([#&#8203;953](https://github.com/testing-library/user-event/issues/953)) ([ab78f3f](https://github.com/testing-library/user-event/commit/ab78f3f50d8ec9a2fa8b3794ceb9a9b1b02fb3a6)) - **selectOptions:** wait after each click ([#&#8203;951](https://github.com/testing-library/user-event/issues/951)) ([7ea7a77](https://github.com/testing-library/user-event/commit/7ea7a77a87ca1e6ce4e461ce87c0a0a1e8dd77a7)) - wait after each method before leaving `asyncWrapper` ([#&#8203;952](https://github.com/testing-library/user-event/issues/952)) ([6f55fee](https://github.com/testing-library/user-event/commit/6f55feebffcb331f627c8467b856723d90e06896)) ### [`v14.1.1`](https://github.com/testing-library/user-event/releases/tag/v14.1.1) [Compare Source](https://github.com/testing-library/user-event/compare/v14.1.0...v14.1.1) ##### [14.1.1](https://github.com/testing-library/user-event/compare/v14.1.0...v14.1.1) (2022-04-17) ##### Bug Fixes - remove implicit global references ([#&#8203;932](https://github.com/testing-library/user-event/issues/932)) ([9913798](https://github.com/testing-library/user-event/commit/9913798d1e60755f1bf2e6f3caecf5600a9a7c69)) - use `globalThis` instead of `global` ([#&#8203;928](https://github.com/testing-library/user-event/issues/928)) ([497c14d](https://github.com/testing-library/user-event/commit/497c14df2c036e4dddd4b18101353531b0238948)) ### [`v14.1.0`](https://github.com/testing-library/user-event/releases/tag/v14.1.0) [Compare Source](https://github.com/testing-library/user-event/compare/v14.0.4...v14.1.0) ##### Features - add `advanceTimers` option ([#&#8203;907](https://github.com/testing-library/user-event/issues/907)) ([627a5cf](https://github.com/testing-library/user-event/commit/627a5cf22e6736eb3e9e6303b21e5940269ba027)) ##### Bug Fixes - delete chars from value at `maxlength` ([#&#8203;909](https://github.com/testing-library/user-event/issues/909)) ([f5049c4](https://github.com/testing-library/user-event/commit/f5049c45c1d0d7917cc85ebd02e9c8e2761549a8)) - reset UI selection after programmatic value change ([#&#8203;915](https://github.com/testing-library/user-event/issues/915)) ([8bc3310](https://github.com/testing-library/user-event/commit/8bc331036cf7a2d3f93fb9e5faca0f8dcfa3c20e)) - set initial value when setting UI value ([#&#8203;918](https://github.com/testing-library/user-event/issues/918)) ([7b0643b](https://github.com/testing-library/user-event/commit/7b0643b52a50b2f7fd93e4401ef643b5fbae6516)) ### [`v14.0.4`](https://github.com/testing-library/user-event/releases/tag/v14.0.4) [Compare Source](https://github.com/testing-library/user-event/compare/v14.0.3...v14.0.4) ##### [14.0.4](https://github.com/testing-library/user-event/compare/v14.0.3...v14.0.4) (2022-04-01) ##### Bug Fixes - track calls to `HTMLInputElement.select()` ([#&#8203;898](https://github.com/testing-library/user-event/issues/898)) ([6d36828](https://github.com/testing-library/user-event/commit/6d36828e22d0ab65d94178daadb131ec92bae676)) ### [`v14.0.3`](https://github.com/testing-library/user-event/releases/tag/v14.0.3) [Compare Source](https://github.com/testing-library/user-event/compare/v14.0.2...v14.0.3) ##### [14.0.3](https://github.com/testing-library/user-event/compare/v14.0.2...v14.0.3) (2022-03-31) ##### Bug Fixes - **pointer:** change selection before dispatching `focus` ([#&#8203;895](https://github.com/testing-library/user-event/issues/895)) ([06f12a6](https://github.com/testing-library/user-event/commit/06f12a6475e6332a048c8c0770a36661af3fea20)) ### [`v14.0.2`](https://github.com/testing-library/user-event/releases/tag/v14.0.2) [Compare Source](https://github.com/testing-library/user-event/compare/v14.0.1...v14.0.2) ##### [14.0.2](https://github.com/testing-library/user-event/compare/v14.0.1...v14.0.2) (2022-03-31) ##### Bug Fixes - work around shadowed globals ([#&#8203;892](https://github.com/testing-library/user-event/issues/892)) ([126d2e7](https://github.com/testing-library/user-event/commit/126d2e7b7853e0cf16640e01316e3c602ef2b640)) ### [`v14.0.1`](https://github.com/testing-library/user-event/releases/tag/v14.0.1) [Compare Source](https://github.com/testing-library/user-event/compare/v14.0.0...v14.0.1) ##### [14.0.1](https://github.com/testing-library/user-event/compare/v14.0.0...v14.0.1) (2022-03-31) ##### Bug Fixes - maintain UI value on controlled number input ([#&#8203;889](https://github.com/testing-library/user-event/issues/889)) ([a7f9906](https://github.com/testing-library/user-event/commit/a7f99066a5623e0bd05ce3092def09907a1d4dc6)) - **pointer:** support nested select ([#&#8203;888](https://github.com/testing-library/user-event/issues/888)) ([e23e559](https://github.com/testing-library/user-event/commit/e23e559297c33d86c96d217c414d4d230e14c7a2)) ### [`v14.0.0`](https://github.com/testing-library/user-event/releases/tag/v14.0.0) [Compare Source](https://github.com/testing-library/user-event/compare/v13.5.0...v14.0.0) ##### ⚠ BREAKING CHANGES - **APIs always return a Promise.** - **pointer:** `skipPointerEvents` has been removed. Use `pointerEventsCheck: PointerEventsCheckLevel.Never` instead. - **upload:** `init` parameter has been removed from `userEvent.upload`. - **upload:** `applyAccept` defaults to `true`. - The `userEvent.paste` API has new parameters. - `{ctrl}`, `{del}`, `{esc}` no longer describe a key. Use `{Control}`, `{Delete}`, `{Escape}` instead. - `{alt}`, `{ctrl}`, `{meta}`, `{shift}` no longer imply not releasing the key. Use `{Alt>}`, `{Control>}`, `{Meta>}`, `{Shift>}` instead. - `init` parameter has been removed from these APIs: - `userEvent.click` - `userEvent.dblClick` - `userEvent.tripleClick` - `userEvent.hover` - `userEvent.unhover` - `userEvent.selectOptions` - `userEvent.deselectOptions` - `userEvent.upload` no longer supports `clickInit` as part of its `init` parameter. - Behavior for special key descriptor `{selectall}` has been removed. - Support for `keyCode` property on keyboard events has been removed. - An error is thrown when calling `userEvent.clear` on an element which is not editable. - An error is thrown when event handlers prevent `userEvent.clear` from focussing/selecting content. - **tab:** The `focusTrap` option has been removed from `userEvent.tab()`. - **type:** `userEvent.type` does no longer move the cursor if used with `skipClick=false` and without `initialSelectionStart`. - The implementation of pointer related APIs was replaced. This might break tests relying on unintended side-effects of the previous implementation. - Support for node 10 was removed as it reached its end-of-life. ##### Features - async APIs ([#&#8203;790](https://github.com/testing-library/user-event/issues/790)) ([86860cc](https://github.com/testing-library/user-event/commit/86860cc5fd1b59a6b34ffd00c96d22520f4aa56e)) - keep track of document state in UI ([#&#8203;747](https://github.com/testing-library/user-event/issues/747)) ([73e62d0](https://github.com/testing-library/user-event/commit/73e62d03877c736e18bc9e394e4ed07333b99933)) - rewrite selection handling ([#&#8203;776](https://github.com/testing-library/user-event/issues/776)) ([968c2c4](https://github.com/testing-library/user-event/commit/968c2c429e8d67974b9a313d1efab7d78c35c207)) - **event:** support `beforeinput` ([#&#8203;851](https://github.com/testing-library/user-event/issues/851)) ([8890bd6](https://github.com/testing-library/user-event/commit/8890bd6d17376205f553620148852d63f84d5565)) - add `pointer` API ([#&#8203;750](https://github.com/testing-library/user-event/issues/750)) ([c12ee44](https://github.com/testing-library/user-event/commit/c12ee44dc2caa19c5df98442759fcc9ae4ba167f)) - add `setup` API ([#&#8203;746](https://github.com/testing-library/user-event/issues/746)) ([719ba03](https://github.com/testing-library/user-event/commit/719ba03af5647e09cd734f419ce5f234af60328a)) - add `userEvent.copy` and `userEvent.cut` ([#&#8203;787](https://github.com/testing-library/user-event/issues/787)) ([8727a2d](https://github.com/testing-library/user-event/commit/8727a2d7b1723287923bf5e6ea1c33844d9cccf5)) - add `userEvent.tripleClick` API ([#&#8203;773](https://github.com/testing-library/user-event/issues/773)) ([0badabd](https://github.com/testing-library/user-event/commit/0badabdd504b0c42ad9adca94edd96ddb53ae303)) - apply modifier keys in pointer events ([#&#8203;751](https://github.com/testing-library/user-event/issues/751)) ([e33eb86](https://github.com/testing-library/user-event/commit/e33eb86194e08a0bc46285ca1acb57d6d533fbb7)) - **keyboard:** add `[Tab]` support ([#&#8203;767](https://github.com/testing-library/user-event/issues/767)) ([87470ff](https://github.com/testing-library/user-event/commit/87470ffe49c93c0b7a858d5c07d660fede90f881)) - **keyboard:** apply modifier state ([#&#8203;815](https://github.com/testing-library/user-event/issues/815)) ([e9635f6](https://github.com/testing-library/user-event/commit/e9635f656298ef1f96bd255b0d89031e04441537)) - **keyboard:** move cursor and delete content in contenteditable ([#&#8203;822](https://github.com/testing-library/user-event/issues/822)) ([b83b259](https://github.com/testing-library/user-event/commit/b83b25927a38de2477099ec2ad2ad074a5296ce6)) - **keyboard:** select all per `{Control}+[KeyA]` ([#&#8203;774](https://github.com/testing-library/user-event/issues/774)) ([ea9b18a](https://github.com/testing-library/user-event/commit/ea9b18a0e96142f7d4cd80009a53be06a1431c07)) - **pointer:** change selection per pointer ([#&#8203;763](https://github.com/testing-library/user-event/issues/763)) ([17fb8b1](https://github.com/testing-library/user-event/commit/17fb8b14056bb68d1c2fd9e8796c09e00aacd844)) - **pointer:** introduce `pointerEventsCheck` option ([#&#8203;823](https://github.com/testing-library/user-event/issues/823)) ([e2a5f43](https://github.com/testing-library/user-event/commit/e2a5f434b6e8b0ec0badddec52b54957b6f3320a)) - remove support for user provided `MouseEventInit` ([#&#8203;784](https://github.com/testing-library/user-event/issues/784)) ([56ebf7d](https://github.com/testing-library/user-event/commit/56ebf7d00620d7696d73e30f7f5d90a7ea02d0f3)) - **paste:** replace `userEvent.paste` ([#&#8203;785](https://github.com/testing-library/user-event/issues/785)) ([f8fe217](https://github.com/testing-library/user-event/commit/f8fe217fd445a27a62705894eb2c9f5a38a91f42)) - **clear:** rewrite `userEvent.clear` API ([#&#8203;779](https://github.com/testing-library/user-event/issues/779)) ([1cda1b1](https://github.com/testing-library/user-event/commit/1cda1b1b9726c2e7db213ec543f96b3fde2d10b8)) - **upload:** replace element properties ([#&#8203;794](https://github.com/testing-library/user-event/issues/794)) ([543eadb](https://github.com/testing-library/user-event/commit/543eadb14d8d0f08d5023edbd3353eb5df591329)) ##### Bug Fixes - check for inherited `:disabled` ([#&#8203;872](https://github.com/testing-library/user-event/issues/872)) ([1a00fdf](https://github.com/testing-library/user-event/commit/1a00fdfc3085addc4792897aecda202e07c3f5d2)) - **clipboard:** prevent default behavior on `copy`/`cut` ([#&#8203;866](https://github.com/testing-library/user-event/issues/866)) ([5423094](https://github.com/testing-library/user-event/commit/5423094180cd0946b7440f699933b6569b8639f5)) - **clipboard:** prevent default behavior on `paste` ([#&#8203;862](https://github.com/testing-library/user-event/issues/862)) ([d3d71ac](https://github.com/testing-library/user-event/commit/d3d71ac65d21f96b36cd1e087b79890bb8e61f03)) - create MouseEvents per `createEvent` ([#&#8203;781](https://github.com/testing-library/user-event/issues/781)) ([da5b5b7](https://github.com/testing-library/user-event/commit/da5b5b721894b39a4ab9bc2f15afa4123bfda88e)) - export bundled ESM ([#&#8203;816](https://github.com/testing-library/user-event/issues/816)) ([1a5e2a7](https://github.com/testing-library/user-event/commit/1a5e2a718b03e8523d7c14ba43020d2d9d653b33)) - export types and commonjs bundle ([#&#8203;821](https://github.com/testing-library/user-event/issues/821)) ([4f56856](https://github.com/testing-library/user-event/commit/4f56856bfc64aa1fcc6ee8ab91050b61ee7c2e7e)) - **keyboard:** parse escaped bracket followed by descriptor ([#&#8203;814](https://github.com/testing-library/user-event/issues/814)) ([684451f](https://github.com/testing-library/user-event/commit/684451f11b946374dca8a9650fce9fa316d0f032)) - **keyboard:** parse keyboard input without nesting ([#&#8203;793](https://github.com/testing-library/user-event/issues/793)) ([fafa677](https://github.com/testing-library/user-event/commit/fafa677a0901cab79174eb387b08d051db7129cc)) - **keyboard:** set `KeyboardEvent.charCode` on `keypress` ([#&#8203;771](https://github.com/testing-library/user-event/issues/771)) ([55e194a](https://github.com/testing-library/user-event/commit/55e194aa96c31844950fa5c74c5ff14a513f0f24)) - **keyboard:** submit form with `<button/>` on `[Enter]` ([#&#8203;808](https://github.com/testing-library/user-event/issues/808)) ([eca157a](https://github.com/testing-library/user-event/commit/eca157ad8efecfdef8bd955a835d7371c9a45908)) - log correct docs link for invalid key descriptors ([#&#8203;881](https://github.com/testing-library/user-event/issues/881)) ([28d6604](https://github.com/testing-library/user-event/commit/28d66044e4bbd25b1422c1107db7a5b9a538a150)) - maintain cursor position on controlled component ([#&#8203;765](https://github.com/testing-library/user-event/issues/765)) ([8f203cc](https://github.com/testing-library/user-event/commit/8f203cc4ad2c3e3bf9de5fcf90925970c7cb8868)) - **pointer:** blur `activeElement` on click outside of focusable ([#&#8203;834](https://github.com/testing-library/user-event/issues/834)) ([d64167c](https://github.com/testing-library/user-event/commit/d64167ca40506e381aff53c985b19e6d2a8a156d)) - **pointer:** consider click context ([#&#8203;850](https://github.com/testing-library/user-event/issues/850)) ([ca4482a](https://github.com/testing-library/user-event/commit/ca4482a16bd0da3f7d7e5684fe6bb4650f26a1ee)) - **pointer:** fire pointer events on disabled elements ([#&#8203;818](https://github.com/testing-library/user-event/issues/818)) ([ef2f4e5](https://github.com/testing-library/user-event/commit/ef2f4e50ee8a53f3cc52deb5982a104be6e9d0ce)) - **pointer:** honor click handler on `<label/>` ([#&#8203;810](https://github.com/testing-library/user-event/issues/810)) ([2c5d9f1](https://github.com/testing-library/user-event/commit/2c5d9f1369301539826879f95c9f6093f676e2bb)) - **pointer:** trigger `contextmenu` on `mousedown` ([#&#8203;811](https://github.com/testing-library/user-event/issues/811)) ([e1c4cad](https://github.com/testing-library/user-event/commit/e1c4caded733c7bd41c2f161e1ce6dc1d392d7e5)) - prepare document in setup ([#&#8203;753](https://github.com/testing-library/user-event/issues/753)) ([65be675](https://github.com/testing-library/user-event/commit/65be6751e3558e85da42f105606b9feb7afc878c)) - remove deprecated keyboard features ([#&#8203;780](https://github.com/testing-library/user-event/issues/780)) ([45dc39a](https://github.com/testing-library/user-event/commit/45dc39a3f9f08522eb289f0e8ced0b9ede9a1535)) - remove legacy modifier implementations ([#&#8203;783](https://github.com/testing-library/user-event/issues/783)) ([caea162](https://github.com/testing-library/user-event/commit/caea16238a2d7041d2f15cd8b850ca396eba0de9)) - replace pointer implementations ([#&#8203;754](https://github.com/testing-library/user-event/issues/754)) ([c04f79b](https://github.com/testing-library/user-event/commit/c04f79b628f123f62fb4a1df5a760be6da6f3582)) - reset UI selection on setter ([#&#8203;770](https://github.com/testing-library/user-event/issues/770)) ([2733d10](https://github.com/testing-library/user-event/commit/2733d107c8d1ecb111e14099f31672a76ba293e2)) - **tab:** order `tabIndex>0` before `tabIndex=0` ([#&#8203;809](https://github.com/testing-library/user-event/issues/809)) ([1bc5945](https://github.com/testing-library/user-event/commit/1bc59459e4c7fc6e3c4de7853234f6720b4129f6)) - **tab:** remove `focusTrap` option ([#&#8203;772](https://github.com/testing-library/user-event/issues/772)) ([a0412c0](https://github.com/testing-library/user-event/commit/a0412c00cdb40ae670e4abbde5c0d30eae68e58b)) - **tab:** skip elements with `visibility:hidden` ([#&#8203;799](https://github.com/testing-library/user-event/issues/799)) ([a747b0a](https://github.com/testing-library/user-event/commit/a747b0ab07681651bf6b6428471de2dd76bc22df)) - **upload:** fix order of events ([#&#8203;847](https://github.com/testing-library/user-event/issues/847)) ([214fd03](https://github.com/testing-library/user-event/commit/214fd03e71b23e0bb1ea90f6299008701600e533)) ##### Miscellaneous Chores - drop support for node 10 ([#&#8203;698](https://github.com/testing-library/user-event/issues/698)) ([ce01cde](https://github.com/testing-library/user-event/commit/ce01cde601e7b7191055d0def319753bbab96493)) </details> <details> <summary>clap-rs/clap</summary> ### [`v4.0.18`](https://github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#&#8203;4018---2022-10-20) [Compare Source](https://github.com/clap-rs/clap/compare/v4.0.17...v4.0.18) ##### Fixes - *(derive)* Allow `#[command(skip)]` to also work with enum variants with a value </details> <details> <summary>reduxjs/react-redux</summary> ### [`v8.0.4`](https://github.com/reduxjs/react-redux/releases/tag/v8.0.4) [Compare Source](https://github.com/reduxjs/react-redux/compare/v8.0.3...v8.0.4) This patch release fixes some minor TS types issues, and updates the rarely-used `areStatesEqual` option for `connect` to now pass through `ownProps` for additional use in determining which pieces of state to compare if desired. > **Note**: 8.0.3 was accidentally published without one of these fixes. Use 8.0.4 instead. #### Changelog ##### TS Fixes We've fixed an import of `React` that caused issues with the `allowSyntheticDefaultImports` TS compiler flag in user projects. `connect` already accepted a custom context instance as `props.context`, and had runtime checks in case users were passing through a real value with app data as `props.context` instead. However, the TS types did not handle that case, and this would fail to compile. If your own component expects `props.context` with actual data, `connect`'s types now use that type instead. The `ConnectedProps<T>` type had a mismatch with React's built-in `React.ComponentProps<Component>` type, and that should now work correctly. ##### Other Changes The `areStatesEqual` option to `connect` now receives `ownProps` as well, in case you need to make a more specific comparison with certain sections of state. The new signature is: ```ts { areStatesEqual?: ( nextState: State, prevState: State, nextOwnProps: TOwnProps, prevOwnProps: TOwnProps ) => boolean } ``` #### What's Changed - Don't require allowSyntheticDefaultImports: true by [@&#8203;apepper](https://github.com/apepper) in https://github.com/reduxjs/react-redux/pull/1924 - Fixed type issue with `ComponentProps` from older `@types/react` by [@&#8203;Andarist](https://github.com/Andarist) in https://github.com/reduxjs/react-redux/pull/1956 - connect: pass ownProps to areStatesEqual by [@&#8203;jspurlin](https://github.com/jspurlin) in https://github.com/reduxjs/react-redux/pull/1951 - Omit built-in context prop if user component props include context by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1958 **Full Changelog**: https://github.com/reduxjs/react-redux/compare/v8.0.2...v8.0.4 ### [`v8.0.3`](https://github.com/reduxjs/react-redux/releases/tag/v8.0.3) [Compare Source](https://github.com/reduxjs/react-redux/compare/v8.0.2...v8.0.3) **This release was accidentally published without an intended fix - please use [v8.0.4](https://github.com/reduxjs/react-redux/releases/tag/v8.0.4) instead** ### [`v8.0.2`](https://github.com/reduxjs/react-redux/releases/tag/v8.0.2) [Compare Source](https://github.com/reduxjs/react-redux/compare/v8.0.1...v8.0.2) This patch release tweaks the behavior of `connect` to print a one-time warning when the obsolete `pure` option is passed in, rather than throwing an error. This fixes crashes caused by libraries such as `react-beautiful-dnd` continuing to pass in that option (unnecessarily) to React-Redux v8. #### What's Changed - Show warning instead of throwing error that pure option has been removed by [@&#8203;ApacheEx](https://github.com/ApacheEx) in https://github.com/reduxjs/react-redux/pull/1922 **Full Changelog**: https://github.com/reduxjs/react-redux/compare/v8.0.1...v8.0.2 ### [`v8.0.1`](https://github.com/reduxjs/react-redux/releases/tag/v8.0.1) [Compare Source](https://github.com/reduxjs/react-redux/compare/v8.0.0...v8.0.1) This release fixes an incorrect internal import of our `Subscription` type, which was causing TS compilation errors in some user projects. We've also listed `@types/react-dom` as an optional peerDep. There are no runtime changes in this release. #### What's Changed - Add optional peer dependency on [@&#8203;types/react-dom](https://github.com/types/react-dom) by [@&#8203;Methuselah96](https://github.com/Methuselah96) in https://github.com/reduxjs/react-redux/pull/1904 - fix(ts): incorrect import of `Subscription` causes `noImplicitAny` error by [@&#8203;vicrep](https://github.com/vicrep) in https://github.com/reduxjs/react-redux/pull/1910 **Full Changelog**: https://github.com/reduxjs/react-redux/compare/v8.0.0...v8.0.1 ### [`v8.0.0`](https://github.com/reduxjs/react-redux/releases/tag/v8.0.0) [Compare Source](https://github.com/reduxjs/react-redux/compare/v7.2.9...v8.0.0) This **major version** release updates `useSelector`, `connect`, and `<Provider>` for compatibility with React 18, rewrites the React-Redux codebase to TypeScript (obsoleting use of `@types/react-redux`), modernizes build output, and removes the deprecated `connectAdvanced` API and the `pure` option for `connect`. npm i react-redux@latest yarn add react-redux@latest #### Overview, Compatibility, and Migration Our public API is still the same ( `<Provider>`, `connect` and `useSelector/useDispatch`), but we've updated the internals to use the new `useSyncExternalStore` hook from React. React-Redux v8 is still compatible with all versions of React that have hooks (16.8+, 17.x, and 18.x; React Native 0.59+), and *should* just work out of the box. In most cases, it's very likely that the only change you will need to make is bumping the package version to `"react-redux": "^8.0"`. *If* you are using the rarely-used `connectAdvanced` API, you will need to rewrite your code to avoid that, likely by using the hooks API instead. Similarly, the `pure` option for `connect` has been removed. If you are using Typescript, React-Redux is now written in TS and includes its own types. You should remove any dependencies on `@types/react-redux`. While not directly tied to React-Redux, note that **the recently updated `@types/react@18` major version has changed component definitions to remove having `children` as a prop by default**. This causes errors if you have multiple copies of `@types/react` in your project. To fix this, tell your package manager to resolve `@types/react` to a single version. Details: [**React issue #&#8203;24304: React 18 types broken since release**](https://github.com/facebook/react/issues/24304#issuecomment-1094565891) Additionally, please see the React post on [**How to Ugprade to React 18**](https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html) for details on how to migrate existing apps to correctly use React 18 and take advantage of its new features. #### Changelog ##### React 18 Compatibility React-Redux now requires the new [`useSyncExternalStore` API in React 18](https://github.com/reactwg/react-18/discussions/86). By default, it uses the "shim" package which backfills that API in earlier React versions, so **React-Redux v8 is compatible with all React versions that have hooks** (16.8+, and React Native 0.59+) as its acceptable peer dependencies. We'd especially like to thank the React team for their extensive support and cooperation during the `useSyncExternalStore` development effort. They specifically designed `useSyncExternalStore` to support the needs and use cases of React-Redux, and we used React-Redux v8 as a testbed for how `useSyncExternalStore` would behave and what it needed to cover. This in turn helped ensure that `useSyncExternalStore` would be useful and work correctly for other libraries in the ecosystem as well. Our performance benchmarks show parity with React-Redux v7.2.5 for both `connect` and `useSelector`, so we do not anticipate any meaningful performance regressions. ##### `useSyncExternalStore` and Bundling The `useSyncExternalStore` shim is imported directly in the main entry point, so it's *always* included in bundles even if you're using React 18. This adds roughly 600 bytes minified to your bundle size. If you are using React 18 and would like to avoid that extra bundle cost, React-Redux now has a new `/next` entry point. This exports the exact same APIs, but directly imports `useSyncExternalStore` from React itself, and thus avoids including the shim. You can alias `"react-redux": "react-redux/next"` in your bundler to use that instead. ##### SSR and Hydration React 18 introduces a new `hydrateRoot` method for hydrating the UI on the client in Server-Side Rendering usage. As part of that, the `useSyncExternalStore` API requires that we pass in an alternate state value other than what's in the actual Redux store, and that alternate value will be used for the entire initial hydration render to ensure the initial rehydrated UI is an exact match for what was rendered on the server. After the hydration render is complete, React will then apply any additional changes from the store state in a follow-up render. React-Redux v8 supports this by adding a new `serverState` prop for `<Provider>`. If you're using SSR, you should pass your serialized state to `<Provider>` to ensure there are no hydration mismatch errors: ```ts import { hydrateRoot } from 'react-dom/client' import { configureStore } from '@&#8203;reduxjs/toolkit' import { Provider } from 'react-redux' const preloadedState = window.__PRELOADED_STATE__ const clientStore = configureStore({ reducer: rootReducer, preloadedState, }) hydrateRoot( document.getElementById('root'), <Provider store={clientStore} serverState={preloadedState}> <App /> </Provider> ) ``` ##### TypeScript Migration and Support The React-Redux library source has always been written in plain JS, and the community maintained the TS typings separately as `@types/react-redux`. We've (finally!) [migrated the React-Redux codebase to TypeScript](https://github.com/reduxjs/react-redux/issues/1737), using the existing typings as a starting point. This means that **the `@types/react-redux` package is no longer needed, and you should remove that as a dependency**. > **Note** Please ensure that any installed copies of `redux` and `@types/react` are de-duped. You are also encouraged to update to the latest versions of Redux Toolkit (1.8.1+) or Redux (4.1.2), to ensure consistency between installed types and avoid problems from types mismatches. We've tried to maintain the same external type signatures as much as possible. If you do see any compile problems, please file issues with any apparent TS-related problems so we can review them. The TS migration was a great collaborative effort, with many community members contributing migrated files. Thank you to everyone who helped out! In addition to the "pre-typed" `TypedUseSelectorHook`, there's now also a `Connect<State = unknown>` type that can be used as a "pre-typed" version of `connect` as well. As part of the process, we also updated the repo to use Yarn 3, copied the typetests files from DefinitelyTyped and expanded them, and improved our CI setup to test against multiple TS versions. ##### Removal of the `DefaultRootState` type The `@types/react-redux` package, which has always been maintained by the community, included a `DefaultRootState` interface that was intended for use with TS's "module augmentation" capability. Both `connect` and `useSelector` used this as a fallback if no state generic was provided. When we migrated React-Redux to TS, we copied over all of the types from that package as a starting point. However, the Redux team [specifically considers use of a globally augmented state type to be an anti-pattern](https://github.com/reduxjs/react-redux/issues/1879). Instead, we direct users to [extract the `RootState` and `AppDispatch` types from the store setup](https://redux.js.org/tutorials/typescript-quick-start#define-root-state-and-dispatch-types), and [create pre-typed versions of the React-Redux hooks](https://redux.js.org/tutorials/typescript-quick-start#define-typed-hooks) for use in the app. Now that React-Redux itself is written in TS, we've opted to remove the `DefaultRootState` type entirely. State generics now default to `unknown` instead. Technically [the module augmentation approach can still be done in userland](https://github.com/reduxjs/react-redux/issues/1879#issuecomment-1073284804), but we discourage this practice. ##### Modernized Build Output We've always targeted ES5 syntax in our published build artifacts as the lowest common denominator. Even the "ES module" artifacts with `import/export` keywords still were compiled to ES5 syntax otherwise. With IE11 now effectively dead and many sites no longer supporting it, we've updated our build tooling to target a more modern syntax equivalent to ES2017, which shrinks the bundle size slightly. If you still need to support ES5-only environments, please compile your own dependencies as needed for your target environment. ##### Removal of Legacy APIs We announced in 2019 that [the legacy `connectAdvanced` API would be removed in the next major version](https://github.com/reduxjs/react-redux/issues/1236), as it was rarely used, added internal complexity, and was also basically irrelevant with the introduction of hooks. As promised, we've removed that API. We've also removed the `pure` option for `connect`, which forced components to re-render regardless of whether props/state had actually changed if it was set to `false`. This option was needed in some cases in the early days of the React ecosystem, when components sometimes relied on external mutable data sources that could change outside of rendering. Today, no one writes components that way, the option was barely used, and React 18's `useSyncExternalStore` strictly requires immutable updates. So, we've removed the `pure` flag. Given that both of these options were almost never used, this shouldn't meaningfully affect anyone. #### Changes Due to the TS migration effort and number of contributors, this list covers just the major changes: - Integrate TypeScript port by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1739 - Initial experimental React 18 compat prototyping by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1808 - Fix compatibility with React 18 strict effects by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1817 - Update to latest React 18 alpha dependencies by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1834 - Port remaining v7 typetests and improve v8 types by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1855 - Add initial SSR support for React 18 and React-Redux v8 by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1835 - test: Adjust type tests to be compatible with React 18 typings by [@&#8203;eps1lon](https://github.com/eps1lon) in https://github.com/reduxjs/react-redux/pull/1868 - Switch back to Subscription in useSelector to fix unsubscribe perf by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1870 - Cleanup more code after `pure` removal by [@&#8203;Andarist](https://github.com/Andarist) in https://github.com/reduxjs/react-redux/pull/1859 - Swap `useSyncExternalStore` shim behavior and update React deps by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1884 - Remove `DefaultRootState` type by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1887 - Add SSR test for `serverState` behavior by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1888 - Cleanup internal types in selectorFactory.ts by [@&#8203;Methuselah96](https://github.com/Methuselah96) in https://github.com/reduxjs/react-redux/pull/1889 - Remove ts-ignore for initMergeProps by [@&#8203;Methuselah96](https://github.com/Methuselah96) in https://github.com/reduxjs/react-redux/pull/1891 - fix(deps): add optional peer deps into `peerDependencies` by [@&#8203;kyletsang](https://github.com/kyletsang) in https://github.com/reduxjs/react-redux/pull/1893 - Update peer deps for v8 by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1895 - Port DT fix for `dispatchProp` arg in `mergeProps` by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1897 - Update docs for v8 final by [@&#8203;markerikson](https://github.com/markerikson) in https://github.com/reduxjs/react-redux/pull/1902 </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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDEuMTEiLCJ1cGRhdGVkSW5WZXIiOiIzMi4yNDEuMTEifQ==-->
kjuulh added 1 commit 2022-10-26 20:26:08 +02:00
Update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
1bb88edb0b
kjuulh merged commit 1bb88edb0b into main 2022-10-26 20:48:06 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kjuulh/vidow#11
No description provided.