Skip to content

chore/upgrade packages#39

Merged
hortison merged 2 commits intomasterfrom
chore/upgrade-packages
Mar 24, 2026
Merged

chore/upgrade packages#39
hortison merged 2 commits intomasterfrom
chore/upgrade-packages

Conversation

@hortison
Copy link
Copy Markdown
Contributor

  • Fix: downgrade chai to v5 and react-to-print to v2 for compatibility
  • drop node 18 support

- chai@6 breaks on Node.js 22 due to EventTarget.dispatchEvent incompatibility
  (PluginEvent is not an instance of the built-in Event class)
- react-to-print@3 removed the ReactToPrint component and PrintContextConsumer
  in favor of the useReactToPrint hook; downgrade to v2 keeps existing usage intact

All 233 tests pass.

Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
Copilot AI review requested due to automatic review settings March 24, 2026 05:15
@hortison hortison merged commit f9f68ee into master Mar 24, 2026
4 checks passed
@hortison hortison deleted the chore/upgrade-packages branch March 24, 2026 05:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s tooling and dependency stack (Babel/ESLint/Prettier/Webpack, plus select package version adjustments) and applies the resulting formatting changes across components/tests.

Changes:

  • Replaces eslint-loader with eslint-webpack-plugin and updates Babel plugins from proposal-* to transform-*.
  • Updates Prettier config (jsxBracketSameLinebracketSameLine) and applies corresponding JSX formatting changes.
  • Adjusts package versions (including downgrading chai and react-to-print), sets Node engine to >=20, and refreshes the lockfile.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
webpack.config.js Switches from eslint-loader to eslint-webpack-plugin; updates Babel plugin names.
test/MUIDataTableHeadCell.test.js JSX formatting updates from Prettier changes.
src/components/TableToolbar.js JSX formatting updates from Prettier changes.
src/components/TableResize.js JSX formatting updates from Prettier changes.
src/components/TableHeadRow.js JSX formatting updates from Prettier changes.
src/components/TableHeadCell.js JSX formatting updates from Prettier changes.
src/components/TableHead.js JSX formatting updates from Prettier changes.
src/components/TableFilter.js JSX formatting updates from Prettier changes.
src/components/TableBodyRow.js JSX formatting updates from Prettier changes.
src/components/TableBodyCell.js JSX formatting updates from Prettier changes.
src/components/TableBody.js JSX formatting updates from Prettier changes.
src/components/Popover.js JSX formatting updates from Prettier changes.
src/components/JumpToPage.js JSX formatting updates from Prettier changes.
src/components/ExpandButton.js JSX formatting updates from Prettier changes.
src/MUIDataTable.js JSX formatting updates from Prettier changes.
prettier.config.js Updates Prettier option name for v3 (bracketSameLine).
package.json Dependency adjustments (incl. react-to-print, chai), Node engines >=20, coverage script change, overrides.
package-lock.json Lockfile refresh reflecting dependency changes and overrides.
docs/utils/layout.js JSX formatting updates from Prettier changes.
docs/utils/Menu.js JSX formatting updates from Prettier changes.
.github/workflows/publish-package.yml Uses git pull --rebase --autostash in the publish workflow.
.eslintrc Switches parser to @babel/eslint-parser and sets requireConfigFile: false.
.babelrc Updates Babel plugin names from proposal-* to transform-*.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment on lines 121 to 126
"prop-types": "^15.8.1",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-to-print": "^3.3.0",
"react-to-print": "^2.15.1",
"tss-react": "^4.9.20"
},
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

react-to-print@^2.15.1 declares peerDependencies only up to React/ReactDOM 18, but this package’s peerDependencies allow React/ReactDOM 19. This creates an install-time peer mismatch for React 19 consumers. Consider either keeping react-to-print on a React 19-compatible major, or tightening this package’s React peer range (or moving react-to-print to a peer/optionalPeer with a compatible range).

Copilot uses AI. Check for mistakes.
Comment thread package.json
"docs:deploy": "npm run docs:build && npm run docs:export && firebase deploy",
"docs:start": "next start docs",
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha --require ./test/babel-register.js --extensions js,jsx test/*.js && nyc report --reporter=html | cat coverage/lcov.info | coveralls",
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha --require ./test/babel-register.js --extensions js,jsx test/*.js && nyc report --reporter=html",
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage script no longer uploads lcov output to Coveralls, but the repo still contains Coveralls configuration (e.g., .coveralls.yml) and a Coveralls badge in the README. If Coveralls reporting is still intended, the upload step should remain; otherwise, please also remove/update the leftover Coveralls config/docs to avoid a broken badge and confusing tooling.

Suggested change
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha --require ./test/babel-register.js --extensions js,jsx test/*.js && nyc report --reporter=html",
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha --require ./test/babel-register.js --extensions js,jsx test/*.js && nyc report --reporter=html && cat ./coverage/lcov.info | coveralls",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants