Skip to content
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

update dependencies #1606

Merged
merged 10 commits into from
Nov 21, 2023
Merged

update dependencies #1606

merged 10 commits into from
Nov 21, 2023

Conversation

jaasonw
Copy link
Member

@jaasonw jaasonw commented Oct 25, 2023

This is a really large commit but many of the changes were performed automatically by either npm run lint:fix or the MUI codemod (to update all Material UI imports). I've indicated the notable changes to review below (ie: The files I've manually modified)

  • package.json for dependency updates, notable updates below
    • Updated to Node 18 (LTS/Hydrogen)

    • Updated to React 17 (not 18 due to incompatibilities with Material UI 5 and react-day-picker v7)

      • Material UI incompatibilities can likely be resolved, but this and the react-day-picker changes in v8 means it's a slightly more involved upgrade process that should probably be deferred to another issue/pr
    • Updated Redux to v8

    • Updated React Router to v6

    • redux-devtools-extension was deprecated in favor of @redux-devtools/extension

    • babel-eslint was deprecated in favor of @babel/eslint-parser

    • extract-text-webpack-plugin was deprecated in favor of mini-css-extract-plugin

    • Migration to MUI 5

      • @material-ui/core, @material-ui/icons, @material-ui/lab removed and replaced with @mui/material, @mui/icons-material, @mui/lab
      • Note: @mui/lab is not actually used, but I kept it in in the event we need to use a component from it
    • Various unused dependencies removed (identified with npx depcheck)

      • Depcheck output
        ❯ npx depcheck --detailed
        Unused dependencies
        * @react-pdf/renderer
        * babel-jest
        * bezier-easing
        * chartjs-chart-box-and-violin-plot
        * chartjs-plugin-datalabels
        * dfa
        * focus-visible
        * html2canvas
        * install
        * jest
        * npm
        * react-router
        * react-swipeable
        * react-test-renderer
        * react-vis
        Unused devDependencies
        * are-you-es5
        * babel-loader
        * css-loader
        * enzyme
        * enzyme-adapter-react-16
        * eslint-import-resolver-node
        * eslint-import-resolver-webpack
        * extract-text-webpack-plugin
        * file-loader
        * node-sass
        * react-svg-loader
        * sass-loader
        * style-loader
        * webpack-cli
        * worker-loader
        
      • Note: eslint-import-resolver-node and eslint-import-resolver-node are incorrectly indicated as unused and was not removed

  • README.md: Updated with updated information
  • .eslintrc.js: Some new linting rules were added with updates to eslint and its various plugins. I've converted a few to warnings that would have otherwise been errors with the current codebase
  • .github/workflows/main.yml: Update Github Action to use Node 18
  • .gitignore: I added .DS_Store because I use a mac
  • App.jsx: Routes was renamed to AppRoutes due to react-router using the name Routes, and RouteChange is no longer needed with react-router 6 so they were removed
  • Routes.jsx: ThemeProvider changes for MUI 5, Name changes for react-router 6
  • Header.jsx: NavLink changes with react-router 6, activeStyle was removed in favor of using style with a conditional and getContentAnchorEl was deprecated
  • Blog.jsx: Manually resolved linter error about returning a Fragment with only 1 element
  • index.js (root): MUI 5 migration changes and URL update
  • store.js: Updated function names for @redux-devtools/extension
  • theme.js: MUI 5 migration changes
  • webpack.config.js, webpack.dev.js, webpack.prod.js: Migration to webpack 5 and removal of social-tags-webpack-plugin in favor of social tags functionality already available with html-webpack-plugin and an incompatibility that I don't remember
  • Note: react-day-picker v7 is deprecated, but I did not update it because it ended up being nontrivial and contains breaking style changes

Fixes #1537

- migrate to material ui 5
  - emotion ui was added as per mui recommendations
    (https://mui.com/material-ui/getting-started/installation/)
  - @material-ui/core, @material-ui/icons, @material-ui/lab removed
  - replaced with @mui/material, @mui/icons-material, @mui/lab
- migrate to react router 6
- update and remove unused dev dependencies
  - redux-devtools-extension was deprecated in favor of @redux-devtools/extension
  - babel-eslint was deprecated in favor of @babel/eslint-parser
  - enzyme was removed as it was unused
- fixed linter errors from updating eslint
  - many were fixed with `npm run lint:fixed`
  - manual fixes applied to Blog.jsx
  - `default-param-last`, `no-restricted-exports`, and `react/jsx-no-constructed-context-values` converted to warnings
- react-day-picker was not updated due to breaking style changes
@jaasonw jaasonw added the Dependencies Pull requests that update a dependency file label Oct 25, 2023
@jaasonw jaasonw requested a review from edwinjue October 25, 2023 08:49
Note: `npx depcheck` incorrectly indicates `eslint-import-resolver-node` and `eslint-import-resolver-node` as unused
@ryanfchase ryanfchase self-requested a review October 26, 2023 03:45
Copy link
Member

@edwinjue edwinjue left a comment

Choose a reason for hiding this comment

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

LGTM!

@edwinjue edwinjue merged commit 9056260 into main Nov 21, 2023
@edwinjue edwinjue deleted the 1537-update-dependencies branch November 21, 2023 19:56
Ykaros pushed a commit to Ykaros/311-data that referenced this pull request Nov 21, 2023
* update most dependencies to latest version, added support for node 18

* large migration commit

- migrate to material ui 5
  - emotion ui was added as per mui recommendations
    (https://mui.com/material-ui/getting-started/installation/)
  - @material-ui/core, @material-ui/icons, @material-ui/lab removed
  - replaced with @mui/material, @mui/icons-material, @mui/lab
- migrate to react router 6
- update and remove unused dev dependencies
  - redux-devtools-extension was deprecated in favor of @redux-devtools/extension
  - babel-eslint was deprecated in favor of @babel/eslint-parser
  - enzyme was removed as it was unused
- fixed linter errors from updating eslint
  - many were fixed with `npm run lint:fixed`
  - manual fixes applied to Blog.jsx
  - `default-param-last`, `no-restricted-exports`, and `react/jsx-no-constructed-context-values` converted to warnings
- react-day-picker was not updated due to breaking style changes

* update readme

* remove routechange.jsx

* remove date-fns

* revert date fns changes

* update react-markdown to latest version compatible with react 17

* remove more unused dev dependencies
Note: `npx depcheck` incorrectly indicates `eslint-import-resolver-node` and `eslint-import-resolver-node` as unused

* update to latest react 17

* update workflow to use node 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review and update dependencies in package.json
2 participants