Skip to content

Conversation

@abhayguptas
Copy link
Contributor

@abhayguptas abhayguptas commented May 16, 2025

Chore: Upgrade Root-Level Dev Dependencies #2764

Pre-Selection Work for LFX TERM-2 Project

This PR upgrades several development dependencies in the root package.json to their latest stable versions to ensure improved stability and compatibility with modern tooling.

Updated Packages

Package From To
@babel/eslint-parser ^7.24.6 ^7.27.1
@typescript-eslint/eslint-plugin ^8.32.0 ^8.32.1
@typescript-eslint/parser ^8.32.0 ^8.32.1
eslint ^8.57.0 ^8.57.1
eslint-config-prettier 10.1.1 10.1.5
eslint-plugin-jsx-a11y ^6.8.0 ^6.10.2
eslint-plugin-react 7.37.1 7.37.5
husky 9.1.0 9.1.7
jsdom ^26.0.0 ^26.1.0
prettier 3.5.0 3.5.3
typescript 5.8.2 5.8.3

ESLint Version Note

  • eslint was updated only to ^8.57.1 (not upgraded to v9) due to compatibility issues with eslint-config-airbnb@19.0.4, which requires eslint@^7.32.0 || ^8.2.0.
  • Attempting to install eslint@9.x causes peer dependency resolution errors.
  • We'll revisit ESLint v9 migration once dependent packages are compatible.

Flat Config Migration

ESLint 9 uses the new flat config format via eslint.config.ts, replacing older .eslintrc styles.
Currently, we are still using the legacy format. Migration to flat config will be handled in a separate PR.

Notes

  • Linting, formatting, and pre-commit hooks continue to work as expected.

Follow-up Tasks

  • Migrate to flat ESLint config (eslint.config.ts)
  • Investigate updating or replacing eslint-config-airbnb for ESLint v9 compatibility

Signed-off-by: Abhay <abhayakg123@gmail.com.com>
@abhayguptas abhayguptas requested a review from a team as a code owner May 16, 2025 06:38
@abhayguptas abhayguptas requested review from albertteoh and removed request for a team May 16, 2025 06:38
@anshgoyalevil
Copy link
Member

npm install was tested with --legacy-peer-deps to ensure dependency tree resolution

We should avoid the --legacy-peer-deps flag because of the way it works. Official npm docs discourage the use of this flag as a solution for upgrading the dependencies.

@abhayguptas
Copy link
Contributor Author

Tested again and working fine.

@yurishkuro
Copy link
Member

what was the process for this upgrade?

@abhayguptas
Copy link
Contributor Author

what was the process for this upgrade?

I used npx npm-check-updates -u at the root level to upgrade outdated dependencies listed in the main package.json. This helped clean up deprecated or vulnerable packages, improve compatibility, and align with modern tooling standards. After updating, we removed node_modules and package-lock.json, then ran a fresh npm install to ensure consistency. All builds and dev scripts were tested to confirm nothing broke post-upgrade.

@yurishkuro
Copy link
Member

We don't do upgrades in this manner. It introduces too many changes at once.

@yurishkuro
Copy link
Member

Most of the changes are to a patch number, not very important. We have renovate bit that performs these upgrades individually.

@abhayguptas
Copy link
Contributor Author

We don't do upgrades in this manner. It introduces too many changes at once.

Got it, thanks for the feedback!

Just to clarify, the upgrades here were mostly minor and didn’t require any actual code changes, these were mainly outdated dependencies that had simple version bumps. That said, I understand your point about not introducing too many changes at once.

We can definitely keep this PR open for now and revisit it later if needed. In the meantime, I’d like to shift focus to more structured upgrades starting with React itself. I think upgrading React first will help us uncover any actual compatibility issues, and once that’s in place, we can more confidently address the surrounding packages in smaller batches. Let me know if that sounds like a good approach!

@yurishkuro
Copy link
Member

The upgrade here broke some unit tests. A useful change is to find out why (patch versions are unlikely to break tests).

Signed-off-by: Abhay <abhayakg123@gmail.com.com>
@abhayguptas
Copy link
Contributor Author

The upgrade here broke some unit tests. A useful change is to find out why (patch versions are unlikely to break tests).

image

now, it will work fine!

@codecov
Copy link

codecov bot commented May 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.84%. Comparing base (3a74ad1) to head (ed08803).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2771   +/-   ##
=======================================
  Coverage   96.84%   96.84%           
=======================================
  Files         256      256           
  Lines        7951     7951           
  Branches     2005     2080   +75     
=======================================
  Hits         7700     7700           
+ Misses        251      250    -1     
- Partials        0        1    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yurishkuro
Copy link
Member

We do not chase after patch upgrades of all dependencies, if we did I'd be merging renovatebot PRs every day. If you are trying to upgrade a major or minor version, then limit the PR to just that one dependency.

@abhayguptas
Copy link
Contributor Author

Yeah, that completely makes sense, we can close this PR for now.

Meanwhile, I noticed that ESLint has a major update (v9), and there's already an open issue for upgrading it. I'd be happy to work on that in a new PR. I've looked into it a bit already, and there are a few breaking changes -> for example, eslint-config-airbnb doesn't support v9, and we'd need to find an alternative or adjust the config. Also, v9 uses the new flat config format instead of .eslintrc, so that'll require some migration.

Let me know if you'd like me to take that on!

@yurishkuro
Copy link
Member

Let me know if you'd like me to take that on!

go for it, but aim for small, targeted PRs

@abhayguptas
Copy link
Contributor Author

Let me know if you'd like me to take that on!

go for it, but aim for small, targeted PRs

Sure things, review noted! 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants