You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider / discuss the introduction of optionalDependencies at io-package.json.
optionalDependencies should allow an installtion if either NO release of dependent adapter xyz ist installed or the installed release of xyz satosfy the version requirment specified.
Why?
Some adapters may work if another adapter is not installed. But if the related adapter is installed it must have a minimum version to provide the required functionality. If a non matching (too old) version of the related adapter is installed, this might lead to crashes in the worst scenario.
The concrete example is an adapter providing functionality for vis but requires a minimum vis release. The adapter can alos work if no vis is installed. This requirement cannot be specified with current options.
How?
add new property optionalDependencies to io-package.json analog to dependencies and process the specified requirement if the soecified adapter is installed.
The text was updated successfully, but these errors were encountered:
mcm1957
changed the title
[enhancement]: Consider optionalDependencies
[enhancement]: Consider adding optionalDependencies property to io-package.json
Nov 17, 2024
Hm at least this is not how optional dependencies work in npm. I am also not sure, because if optional anyway than it doesn’t matter if not installed or wrong version installed the feature will not work.
Thanks for clarification. I had a wrong knowledge of optionalDependencies.
When comparing with npm das ioBroker dependencies support expressions,i.e. <1.0.0 || >= 2.5.0 ? If it does does semver / ioBroker support null or <0.0.0 or such a condition? Maybe we not need any new property.
In generl: If effort seems to be too big feel free to close. I just want to init a consideration of this situation.
No existing issues.
Description
Please consider / discuss the introduction of optionalDependencies at io-package.json.
optionalDependencies should allow an installtion if either NO release of dependent adapter xyz ist installed or the installed release of xyz satosfy the version requirment specified.
Why?
Some adapters may work if another adapter is not installed. But if the related adapter is installed it must have a minimum version to provide the required functionality. If a non matching (too old) version of the related adapter is installed, this might lead to crashes in the worst scenario.
The concrete example is an adapter providing functionality for vis but requires a minimum vis release. The adapter can alos work if no vis is installed. This requirement cannot be specified with current options.
How?
add new property optionalDependencies to io-package.json analog to dependencies and process the specified requirement if the soecified adapter is installed.
The text was updated successfully, but these errors were encountered: