-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow selective resolution of top-level dependencies #5505
Comments
Resolutions currently only apply to transitive deps, not direct ones (because if you needed to resolve your direct dep, then you would just set it that way instead of use a resolution). I don't see much of a way around the exact version check by electron-forge. You could fork electron-forge and remove the check, but that seems like a lot of effort. Not sure how else to work around that. I'll tag this as a feature request, but it's certainly a bit of an odd case to be forced to use a specific version but not actually want that version. You are welcome to work up a PR if you have the time... of course forking electron-forge to modify their script would probably be easier than adding the feature to yarn 😆 |
Fair enough (and actually I did start an
☝️ does not make it clear that As for my immediate needs, I guess I'm just going to wait for |
@jacobq Which version of |
@MarshallOfSound Any 2.x newer than 2.0.0-beta.1, latest beta prefered.
(See electron-userland/electron-prebuilt-compile#61 and electron-userland/electron-prebuilt-compile#58)
|
Do you want to request a feature or report a bug?
I am actually not sure whether this is a request for a new feature or a bug because the documentation seems ambiguous to me.
What is the current behavior?
If I have a project whose
package.json
specifiesdevDependencies.something = '1.0.0'
andresolutions.something = 'https://github.com/user/repo.git#commit-hash'
and runyarn
then the installednode_modules
will reflect the1.0.0
specification and not honor the resolution.What is the expected behavior?
I would've expected
yarn
to override the specification using the resolution.You may be wondering, "Why not just specify that requirement directly?" Well, the answer is that in this case it breaks code outside of my control:
electron-forge
requires the consumer to specify an "exact version" ofelectron-prebuilt-compile
, but the author of theelectron-prebuilt-compile
package has not yet published an up-to-date release onnpm
, so I would like to use my fork instead.System info:
The text was updated successfully, but these errors were encountered: