Skip to content

Conversation

@Jakub007d
Copy link

@Jakub007d Jakub007d commented Oct 29, 2025

Fixes #(issue) (if applicable)

Description
As a part of the RHCLOUD-42870 task i have added the nx tool to help with running tests/linters/builds/type-checks/releases/publish in CI. Release and publish would be ran after the PR gets merged (For proper release/publish we need to add 2 secrets to the repository (NOT TESTED only the dry run was ran so far)).

Please include a summary of the change.

  1. Updated Gitignore files
  2. Added nx.json file which configure the nx tool
  3. Added project.json to packages which defines which jobs are run on which packages

Schema (if applicable)

Checklist: (please see documentation page for more information)

  • Yarn build passes
  • Yarn lint passes
  • Yarn test passes
  • Test coverage for new code (if applicable)
  • Documentation update (if applicable)
  • Correct commit message
    • format fix|feat({scope}): {description}
    • i.e. fix(pf3): wizard correctly handles next button
    • fix will release a new _._.X version
    • feat will release a new _.X._ version (use when you introduce new features)
      • we want to avoid any breaking changes, please contact us, if there is no way how to avoid them
    • scope: package
    • if you update the documentation or tests, do not use this format
      • i.e. Fix button on documenation example page

@vercel
Copy link

vercel bot commented Oct 29, 2025

@Jakub007d is attempting to deploy a commit to the data-driven-forms Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.27%. Comparing base (15bd0b2) to head (3cfa84f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1518   +/-   ##
=======================================
  Coverage   94.27%   94.27%           
=======================================
  Files         185      185           
  Lines        3389     3389           
  Branches     1462     1462           
=======================================
  Hits         3195     3195           
  Misses        194      194           

☔ 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.

@Jakub007d Jakub007d force-pushed the nx-tool-migration branch 2 times, most recently from de61b39 to a484371 Compare October 29, 2025 16:23
package.json Outdated
"@khala/npm-release-monorepo": "^2.5.2",
"@khala/wildcard-release-notes": "^2.5.2",
"@nx/js": "22.0.1",
"@semantic-release/exec": "^6.0.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

@Jakub007d since we are switching to NX's release process, I think we can remove the legacy semantic-release packages right?

Copy link
Author

Choose a reason for hiding this comment

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

You are right removed

run: npx nx release --first-release --dry-run --verbose

# Job that runs after merge (on push to master)
post-merge:
Copy link
Contributor

Choose a reason for hiding this comment

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

@Jakub007d I'm wondering if we want the PR checks to also run for merge jobs, and just exclude the release for PRs. Something like we do here: https://github.com/RedHatInsights/javascript-clients/blob/main/.github/workflows/ci.yml

Copy link
Author

Choose a reason for hiding this comment

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

Changed

package.json Outdated
"lerna": "^4.0.0",
"ncp": "^2.0.0",
"sass": "^1.77.8",
"nx": "^22.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT - looks like in the past 2 days NX released 22.0.2 😂

Copy link
Author

Choose a reason for hiding this comment

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

Oh :D updated

@florkbr
Copy link
Contributor

florkbr commented Oct 31, 2025

@Jakub007d since we are moving to NX, should we remove Lerna as well and replace with NX? https://github.com/data-driven-forms/react-forms/blob/master/lerna.json

"fallbackCurrentVersionResolver": "disk"
}
},
"namedInputs": {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Jakub007d quick AI review comment:

Your nx.json sets namedInputs.default to only sharedGlobals. For run-commands with cache=true this can cause stale cache. Suggest:
In nx.json:
Set namedInputs.default to include project sources, e.g. ["sharedGlobals", "{projectRoot}/**/*", "!{projectRoot}/dist/**", "!{projectRoot}/.next/**"].
Optionally add a production namedInput variant if needed.
Or, per target in project.json, define inputs: ["default", "^default"].

Copy link
Author

Choose a reason for hiding this comment

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

fixed

@Jakub007d
Copy link
Author

Hmm the tests for the react-form-renderer started failing im looking into it

@Jakub007d
Copy link
Author

Fixed the failing test

@Jakub007d Jakub007d requested a review from florkbr October 31, 2025 14:27
Copy link

@JetyAdam JetyAdam left a comment

Choose a reason for hiding this comment

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

Running npx nx graph fails with a MultipleProjectsWithSameNameError. This is because many sub-projects (e.g., .../ant-component-mapper/checkbox and .../mui-component-mapper/checkbox) are being detected with the same name ("checkbox").

This error breaks the Nx dependency graph, which means core features like nx affected will not work.

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