Skip to content

Upgraded NX from version 16.8.1 to 21.3.11 #1017

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

candidosales
Copy link

@candidosales candidosales commented Jul 25, 2025

  • ✅ NX Version: 21.3.11 (Local)
  • ✅ All existing projects properly recognized: @hyperdx/common-utils, @hyperdx/api, @hyperdx/app
  • ✅ All NX commands are working properly
  • ✅ Edited the .vscode/settings.json adding editor.tabSize, editor.insertSpaces, editor.detectIndentation to keep the format standard for all developers.
  • ✅ Updated the changeset

Why? Benefits

  • Monorepo optimization - Improved incremental builds when only one package changes
  • Enhanced Caching - More granular and intelligent caching mechanisms reduce redundant work
    • 20-40% faster build times in CI/CD due to improved caching
  • Improved Project Graph - Improved support for modern build tools (ESBuild, SWC, etc.)
  • Enhanced visualization and analysis of project dependencies
  • Clearer migration guides for future upgrades
  • More intuitive commands and better error messages

Tested

  • npx nx show projects
  • npx nx graph --dry-run
  • npx nx run @hyperdx/common-utils:dev --help
  • bun run app:dev:local

Evidence

CleanShot 2025-07-24 at 21 15 24@2x

Copy link

changeset-bot bot commented Jul 25, 2025

🦋 Changeset detected

Latest commit: 2edc58e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/api Major
@hyperdx/app Major
@hyperdx/common-utils Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jul 25, 2025

@candidosales is attempting to deploy a commit to the HyperDX Team on Vercel.

A member of the Team first needs to authorize it.

@candidosales candidosales changed the title Upgrade to NX 21 Upgraded NX from version 16.8.1 to 21.0.0 Jul 25, 2025
@candidosales
Copy link
Author

hi @teeohhem , could you review it?

@wrn14897
Copy link
Member

wrn14897 commented Aug 7, 2025

Please also run yarn changeset to add and commit the changeset

@candidosales
Copy link
Author

@wrn14897 I didn't change any package, so which option should I use for this case?

CleanShot 2025-08-07 at 21 40 58@2x

@wrn14897
Copy link
Member

wrn14897 commented Aug 8, 2025

@wrn14897 I didn't change any package, so which option should I use for this case?

CleanShot 2025-08-07 at 21 40 58@2x

You can just select all of them. The versions will be synced, so it doesn't matter.

@wrn14897
Copy link
Member

wrn14897 commented Aug 8, 2025

Any reason we don't want to bump it to v21 latest? (v21.3.11)

@candidosales candidosales changed the title Upgraded NX from version 16.8.1 to 21.0.0 Upgraded NX from version 16.8.1 to 21.3.11 Aug 8, 2025
@candidosales candidosales requested a review from wrn14897 August 8, 2025 14:51
@candidosales
Copy link
Author

@wrn14897 , could you review it again?

@wrn14897
Copy link
Member

wrn14897 commented Aug 8, 2025

@wrn14897 , could you review it again?

Looks good. Can you remove the package-lock.json ? It looks like int and lint tests both fail and I wonder if its related

@candidosales
Copy link
Author

the npx nx run-many -t ci:lint is running correctly, but we are having some lint issues (I'm unsure if it's a known issue). I can tackle them in the following PR

CleanShot 2025-08-08 at 14 33 38@2x

@wrn14897
Copy link
Member

wrn14897 commented Aug 8, 2025

the npx nx run-many -t ci:lint is running correctly, but we are having some lint issues (I'm unsure if it's a known issue). I can tackle them in the following PR

CleanShot 2025-08-08 at 14 33 38@2x

I think we can rebase the main and try to run it again. Also I still see package-lock.json committed

@candidosales
Copy link
Author

@wrn14897, we are updating the package.json, so the package-lock.json should be in the same PR to keep the consistency. I think the issue isn't the package-lock.json. I have merged with the main branch, and we still have lint issues.

@wrn14897
Copy link
Member

wrn14897 commented Aug 8, 2025

@wrn14897, we are updating the package.json, so the package-lock.json should be in the same PR to keep the consistency. I think the issue isn't the package-lock.json. I have merged with the main branch, and we still have lint issues.

We will need to fix the tests issue. theoretically nx shouldn't affect them so I suspect that since you created a new lock file, the dependency tree was rebuilt, and some dependencies may have been upgraded, causing the tests to break. Since the project uses Yarn, we use yarn.lock instead of package-lock.json. Please just remove package-lock.json and run yarn install

@candidosales
Copy link
Author

candidosales commented Aug 8, 2025

I've tested the main branch and npx nx run @hyperdx/api:ci:int (tests) and npx nx run @hyperdx/api:ci:lint (lint) are also failing because it isn't about the package-lock.json - we are using yarn install in the Github Actions; they need to be fixed.

If you run on the main branch (cloning the repository), the same issues are happening.

Could you share your yarn.lock?

What do you think about fixing these issues first, and then merging this PR later?

I removed the package-lock.json in the previous commit.

@wrn14897
Copy link
Member

wrn14897 commented Aug 9, 2025

cc @candidosales

Please take a look at this commit I pushed 9e5f738

The yarn.lock file changes (~= 20k lines) in your PR seems abnormal (that's why I mentioned the deps tree)
We’re using Yarn, and there’s no need to switch to npm.
Also, please revert the changes made to nx.json unless there's a specific compatibility issue that justifies them.
Simply put, to upgrade the package, you can just

  1. Modify the version in package.json
  2. Run yarn install
  3. Commit and push the changes

@wrn14897
Copy link
Member

Any updates? cc @candidosales

@candidosales
Copy link
Author

@wrn14897 , Sorry for the delay. I'm participating in some interviews and have limited time for studying. When I receive a new offer, I'll come back to finish here. Sorry about that.

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.

2 participants