-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(core): add install modes #2913
Conversation
If true, Yarn will only fetch packages of which checksum doesn't exist and skip the link step during the install.
54cf21b
to
46abc4e
Compare
Thanks for the PR @ylemkimon ! @arcanis any chance you could please help us push this one forward?... |
I didn't forget this PR! Sorry for the delay, I'll look into it this week. |
I reworked the configuration option to rather be a CLI option - this prevents issues when using env definitions and cloning git repositories (since their installs would then inherit the mode, which isn't intended). It also plays a little better with |
@arcanis Thank you for the review! The reasoning behind a configuration was that it could applied to commands other than |
No, our only global option is |
I've added |
4ee8c4d
to
24a8e04
Compare
**What's the problem this PR addresses?** <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> While reviewing #5509, I noticed that the `--mode` flag wasn't passed to `yarn up --recursive`. The issue started in #2913, when the flag was originally introduced. **How did you fix it?** <!-- A detailed description of your implementation. --> Made it pass `--mode` to `yarn up --recursive` and added tests. **Checklist** <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [X] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [X] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [X] I will check that all automated PR checks pass before the PR gets reviewed. --------- Co-authored-by: Maël Nison <nison.mael@gmail.com>
What's the problem this PR addresses?
From and fixes #2908.
How did you fix it?
Added a CLI flag
--mode
that, when set toupdate-lockfile
, changes the install to only fetch packages without a checksum (newly added entries) and skip thelink
step.This can be used in dependency management tools such as Renovate (#2908) and Dependabot (dependabot/dependabot-core#1297).
I've tested this PR with Renovate in https://github.com/ylemkimon/KaTeX/pulls and it successfully updates the checksum.
Checklist