Skip to content

#1965: improve dependent installations#2016

Open
AdemZarrouki wants to merge 6 commits into
devonfw:mainfrom
AdemZarrouki:feature/1965-improve-dependent-installations
Open

#1965: improve dependent installations#2016
AdemZarrouki wants to merge 6 commits into
devonfw:mainfrom
AdemZarrouki:feature/1965-improve-dependent-installations

Conversation

@AdemZarrouki

@AdemZarrouki AdemZarrouki commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #1965

Implemented changes:

  • For NpmBasedCommandlet installed-version checks now call runPackageManager(request, true) which prevents npm list -g <package> --depth=0 from recursively triggering npm.install.
  • npm-based tools now skip the package-manager installation step when npm is already available.
  • The same was done for PipBasedCommandlet

Testing instructions

For the test you can use Intellij directly by running com.devonfw.tools.ide.cli.Ideasy with install <Tool> as arguments or using GraalVM and the call the created ideasy.exe with install <Tool>

  1. Run the ideasy cli with install nest: you see
$ ide install nest
No CVEs found for version 11.0.21 of tool nest.
added 210 packages in 23s
39 packages are looking for funding
  run `npm fund` for details
Successfully installed nest in version 11.0.21 at C:\Users\projects\IDEasy\software\node
  1. For tools that has a declared dependency on node like ng we get this:
$ ide install ng
No CVEs found for version 22.0.1 of tool ng.
No CVEs found for version v24.16.0 of tool node.
Version v24.16.0 of tool node is already installed
npm warn using --force Recommended protections disabled.

added 276 packages in 29s

68 packages are looking for funding
  run `npm fund` for details
Successfully installed ng in version 22.0.1 at C:\Users\projects\IDEasy\software\node
  1. No reduandant call of node or npm should be present to the user.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@coveralls

coveralls commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 27401317369

Coverage increased (+0.02%) to 71.072%

Details

  • Coverage increased (+0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 2 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

2 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.33%
com/devonfw/tools/ide/version/VersionSegment.java 1 89.76%

Coverage Stats

Coverage Status
Relevant Lines: 15825
Covered Lines: 11737
Line Coverage: 74.17%
Relevant Branches: 7066
Covered Branches: 4532
Branch Coverage: 64.14%
Branches in Coverage %: Yes
Coverage Strength: 3.14 hits per line

💛 - Coveralls

@AdemZarrouki AdemZarrouki added enhancement New feature or request npm node package manager pip Python package manager (Pip Installs Packages) dependencies dependencies.json (if tool A requires tool B) labels Jun 12, 2026
@AdemZarrouki AdemZarrouki marked this pull request as ready for review June 12, 2026 07:40
@AdemZarrouki AdemZarrouki self-assigned this Jun 12, 2026
@AdemZarrouki AdemZarrouki moved this from 🆕 New to Team Review in IDEasy board Jun 12, 2026
@laert-ll laert-ll self-requested a review June 12, 2026 08:52
@laert-ll laert-ll self-assigned this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies dependencies.json (if tool A requires tool B) enhancement New feature or request npm node package manager pip Python package manager (Pip Installs Packages)

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Improve dependent installations

3 participants