Skip to content

#1886 fix npm based commandlet shows wrong tool version#1900

Open
AdemZarrouki wants to merge 4 commits intodevonfw:mainfrom
AdemZarrouki:feature/1886-fix-NpmBasedCommandlet-shows-wrong-tool-version
Open

#1886 fix npm based commandlet shows wrong tool version#1900
AdemZarrouki wants to merge 4 commits intodevonfw:mainfrom
AdemZarrouki:feature/1886-fix-NpmBasedCommandlet-shows-wrong-tool-version

Conversation

@AdemZarrouki
Copy link
Copy Markdown
Contributor

@AdemZarrouki AdemZarrouki commented May 7, 2026

This PR fixes #1886

Implemented changes:

  • Override getInstalledVersion in NpmBasedCommandlet to ignore the toolPath parameter and use npm package manager to detect the actual installed version of the tool.

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

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board May 7, 2026
@AdemZarrouki AdemZarrouki self-assigned this May 7, 2026
@AdemZarrouki AdemZarrouki marked this pull request as ready for review May 7, 2026 10:44
@AdemZarrouki AdemZarrouki moved this from 🆕 New to Team Review in IDEasy board May 7, 2026
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented May 7, 2026

Coverage Report for CI Build 25550067304

Coverage decreased (-0.01%) to 70.688%

Details

  • Coverage decreased (-0.01%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 5 coverage regressions across 3 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

5 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/npm/NpmBasedCommandlet.java 3 84.62%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.33%
com/devonfw/tools/ide/version/VersionSegment.java 1 90.55%

Coverage Stats

Coverage Status
Relevant Lines: 15413
Covered Lines: 11352
Line Coverage: 73.65%
Relevant Branches: 6882
Covered Branches: 4408
Branch Coverage: 64.05%
Branches in Coverage %: Yes
Coverage Strength: 3.11 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Contributor

@areinicke areinicke left a comment

Choose a reason for hiding this comment

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

I have confirmed it works and the few lines of code you added look good. Nice job!

@areinicke areinicke self-assigned this May 7, 2026
@AdemZarrouki AdemZarrouki moved this from Team Review to 👀 In review in IDEasy board May 8, 2026
@AdemZarrouki AdemZarrouki requested a review from hohwille May 8, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

NpmBasedCommandlet shows wrong tool version after install

3 participants