-
Notifications
You must be signed in to change notification settings - Fork 941
dev: update dependencies and pipeline node versions #1667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
be9636a to
dd02285
Compare
a2858ab to
8e555ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates project dependencies and CI Node versions, along with a few test adjustments to align with newer React/Jest APIs.
Changes:
- Bump runtime/dev dependencies (React 19, testing libs, build tooling, etc.).
- Update GitHub Actions validation matrix to run on newer Node versions.
- Adjust tests for updated Jest matcher APIs and React 18+/client rendering.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.preact.json |
Adds a Preact-specific TS config with a dedicated outDir. |
.github/workflows/validate.yml |
Expands CI Node matrix and bumps release job Node version. |
package.json |
Updates many dependencies/devDependencies. |
src/__tests__/downshift.misc.js |
Migrates legacy ReactDOM.render usage to react-dom/client and updates a test. |
src/__tests__/downshift.get-menu-props.js |
Updates expectations around ref/refKey error logging behavior. |
src/__tests__/downshift.get-button-props.js |
Adjusts expectation for function component call signature. |
src/hooks/**/__tests__/* |
Replaces deprecated toThrowError usage with toThrow. |
src/__tests__/__snapshots__/downshift.get-menu-props.js.snap |
Removes a snapshot that’s no longer asserted. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| strategy: | ||
| matrix: | ||
| node: [18, 20] | ||
| node: [20, 22, 24] | ||
| runs-on: ubuntu-latest |
Copilot
AI
Jan 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow now runs on Node 24, but it still uses actions/setup-node@v1 (Node12-based, deprecated) which is unlikely to support Node 24 and can cause the job to fail. Update to a supported setup-node major version (and consider updating actions/checkout and codecov-action as well) so the matrix can actually run on 20/22/24 reliably.
| - name: ⎔ Setup node | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: 16 | ||
| node-version: 24 |
Copilot
AI
Jan 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release job pins node-version to 24 but still uses actions/setup-node@v1, which is deprecated and may not install/run Node 24 correctly. Bump setup-node to a supported major version to avoid release pipeline breakage.
| const container = document.createElement('div') | ||
| const root = ReactDOM.createRoot(container) | ||
|
|
||
| const dsRef = React.createRef() | ||
|
|
||
| // eslint-disable-next-line testing-library/no-unnecessary-act | ||
| act(() => { | ||
| root.render(<DownshiftWrapper ref={dsRef} />) | ||
| }) |
Copilot
AI
Jan 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createRoot is created and rendered, but the root is never unmounted. This can leak mounted trees between tests and trigger act/cleanup warnings in newer React/testing-library versions. Add cleanup to unmount the root (and optionally remove the container) at the end of the test.
| const downshiftInstance = dsRef.current | ||
|
|
||
| expect(downshiftInstance.items).toEqual([item]) | ||
| downshiftInstance.clearItems() |
Copilot
AI
Jan 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
downshiftInstance.clearItems() is very likely to trigger a state update; with createRoot/React 18+ this should be wrapped in act (or use testing-library utilities that already wrap updates) to avoid warnings and potential flakiness.
| downshiftInstance.clearItems() | |
| act(() => { | |
| downshiftInstance.clearItems() | |
| }) |
Pull Request
What
Update dependencies, improve infrastructure.
Why
Be up to date.
Close #1505
How
Update packages, run build and fix as needed.
Changes
Dependencies
.cjs/.mjsextensionsConfiguration
env: {"cypress/globals": true}to explicitglobals- eslint-plugin-cypress 5.2.1 requirementcustomExportConditions: ['require', 'node']- handle ESM-only @testing-library/preactmain,module,react-native, andexportsfields to match new file extensions - kcd-scripts 16.0.0 outputs.cjs.cjs,.esm.mjsTests
undefinedas second parametertoThrowErrortotoThrow- Jest best practicesChecklist