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

[Feature]: @o3r/create should handle dependency harmonization in mono-repos #2629

Open
malek-benazzouz opened this issue Dec 18, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request priority:medium

Comments

@malek-benazzouz
Copy link

Context

When generating a project using @o3r/create, today we do not have a way of automatically synchronize (or "harmonize") our dependencies versions between the different libraries/applications.

Proposal

We could use the eslint @o3r/json-dependency-versions-harmonize rule to handle this harmonization.

Example of usage:

"harmonize": "eslint ./**/*.json  --rule '@o3r/json-dependency-versions-harmonize: ['error']' --fix"

(source: micro frontend poc)

To clarify:

  • When to run this command? In an npm pre-install script?

Notes:

  • If using the eslint rule is not satisfactory, another tool we could explore is syncpack.
@malek-benazzouz malek-benazzouz added enhancement New feature or request triage labels Dec 18, 2024
@kpanot kpanot added this to the On boarding improvement milestone Dec 19, 2024
@kpanot
Copy link
Contributor

kpanot commented Dec 19, 2024

Hi

Thank your for the report.
We can complete a bit your issue with the 2 following items:

  • Reduce to only **/package.json the run of @o3r/json-dependency-versions-harmonize
  • Run @o3r/yarnrc-package-extensions-harmonize yarn based repository

@matthieu-crouzet
Copy link
Contributor

We should install eslint by default on a o3r monorepo (add an option skipLinterInstallation)
add a command in the package.json "harmonize:version": "eslint '**/package.json*' '.yarnrc.yml' --quiet --fix",
This command should be run on postinstall
Maybe we should re-run the install after the harmonization (becareful difference between yarn and npm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:medium
Projects
None yet
Development

No branches or pull requests

4 participants