-
Notifications
You must be signed in to change notification settings - Fork 25
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
optionalDependencies should be peerDependencies #341
Comments
Migrating optional dependencies to peer dependencies will require a major update, which is what I want to avoid for a stable package. For example, when the application uses With yarn, you can try:
|
It will indeed be a breaking change. Yarn does not have an While I understand the aversion to breaking changes, unfortunately, the way this package is using
|
I tried using Node.js version 18 and enabled yarn with the command To resolve this issue, you have several options:
As a user, I dislike major updates and breaking changes, and I believe that others share this sentiment. Therefore, it is not feasible to implement a major update that only involves dependency changes. |
I understand your point of view. Perhaps it can hitch along a potential future breaking change. Until that time, feel free to keep this issue open or close it. |
I'm submitting a...
Current behavior
Installing
nest-typed-config
installs the following optional dependencies:While it is documented to use
npm install --no-optional
, this is not supported in other package managers and is not the actual use case foroptionalDependencies
.npm
yarn
Expected behavior
The dependencies should instead be
peerDependencies
withpeerDependenciesMeta
settingoptional
totrue
.What is the motivation / use case for changing the behavior?
Ideally, unused dependencies are not included when installing a package.
Environment
The text was updated successfully, but these errors were encountered: