Skip to content

Use fixed dependency versions#479

Closed
baldimir wants to merge 13 commits intokiegroup:mainfrom
baldimir:use-fixed-dependency-versions
Closed

Use fixed dependency versions#479
baldimir wants to merge 13 commits intokiegroup:mainfrom
baldimir:use-fixed-dependency-versions

Conversation

@baldimir
Copy link
Copy Markdown
Member

@baldimir baldimir commented Apr 1, 2026

Jira: kiegroup/build-chain-configuration-reader#113

Related PR: kiegroup/build-chain-configuration-reader#113

This PR is built on top of #478

This is a Draft. When there is a new version of build-chain-configuration-reader, I will update the version in this PR and push changes along with the lock file update. Currently, this PR contains the current version of the configuration reader - 3.1.5.

@baldimir baldimir requested a review from mareknovotny April 1, 2026 13:13
Copy link
Copy Markdown
Member

@porcelli porcelli left a comment

Choose a reason for hiding this comment

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

@baldimir unfortunately this won't help. doing my own digging on this problem (and I'm learning as we face those issues), the version pin or even the overrides won't make any difference.

The reason is that this is not consumed as a "library" inside a package.json, this is used as npm install -g in Apache repo. which will workaround all the version pinning and even the override.

The only viable solutions are: add a shrinkwrap or pnpm-lock files.

@mareknovotny
Copy link
Copy Markdown
Member

mareknovotny commented Apr 2, 2026

i think package-lock.json is enough to lock versions if you don't use version ranges, the only problem is if people pulls their own compatible dep versions. So for publishing we can add npm-shrinkwrap.json to enforce that for end users the set of deps we have tested and locked down.

Anyway this is just guarding someone who uses and doesn't know or try to override it on purpose. IMHO no big difference for this as @baldimir removed version minimal declarations.

@baldimir
Copy link
Copy Markdown
Member Author

baldimir commented Apr 2, 2026

Agree with @mareknovotny. Yes, people can override versions when they use build-chain, but for build-chain itself, there is no range defined anymore. Based on e.g. this (1), if that is correct, there is written:

"using a package-lock.json to record exactly which versions of dependencies you installed, but allowing people installing your package to use any version of the dependencies that is compatible with the version ranges dictated by your package.json"

There is no version range anymore. I removed all occurences of "^". @porcelli I guess I may be missing some part of the problem as I am not so experienced with npm. Could you please describe more the problematic use case without shrinkwrap? Or is version defined in npm as only a version still a version range? What is the range then, please? E.g. if I define version as "1.13.5", is that still a range?

(1) https://stackoverflow.com/questions/44258235/what-is-the-difference-between-npm-shrinkwrap-json-and-package-lock-json

@baldimir baldimir marked this pull request as ready for review April 2, 2026 08:43
@baldimir
Copy link
Copy Markdown
Member Author

baldimir commented Apr 2, 2026

Reverted simple-git just to see if it helps with the tests. Will do updates afterwards when I see the results. It is possible that also act-js and some other kiegroup libraries need to be updated too.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 2, 2026

@baldimir
Copy link
Copy Markdown
Member Author

baldimir commented Apr 2, 2026

Doing further testing, starting from clean main, in PR: #482

@baldimir
Copy link
Copy Markdown
Member Author

baldimir commented Apr 2, 2026

Closing this - replaced by #482

@baldimir baldimir closed this Apr 2, 2026
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.

4 participants