-
Notifications
You must be signed in to change notification settings - Fork 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
Ensure Corepack Usage for npm, pnpm, and yarn Command Execution #10944
Merged
kbukum1
merged 12 commits into
main
from
kamil/fix_installing_problem_for_npm_pnpm_yarn_using_corepack
Nov 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6da1382
fix corepack package manager installation for npm, pnpm and yarn
kbukum1 a566c64
added feature flag control
kbukum1 b0d98c3
update spec
kbukum1 adc4f4e
enable feature flag for specs
kbukum1 7fa48da
fix spec
kbukum1 7c145ec
unnecessary multiline return
kbukum1 e502b93
fix spec
kbukum1 792d47b
Merge branch 'main' into kamil/fix_installing_problem_for_npm_pnpm_ya…
kbukum1 d0ecf1a
fix finding package manager name issue
kbukum1 fd7da7b
revert back the code syntax
kbukum1 ee0faad
add condition for feature flag is on
kbukum1 ca3be71
fix lint issue
kbukum1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add condition for feature flag is on
- Loading branch information
commit ee0faad160bff44bdf63146febae84c5e138ed95
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,19 +252,29 @@ def setup(name) | |
) | ||
end | ||
|
||
version ||= requested_version(name) | ||
|
||
if version | ||
raise_if_unsupported!(name, version) | ||
version = nil | ||
if Dependabot::Experiments.enabled?(:enable_corepack_for_npm_and_yarn) | ||
version ||= requested_version(name) || guessed_version(name) | ||
|
||
install(name, version) | ||
if version | ||
raise_if_unsupported!(name, version.to_s) | ||
install(name, version) | ||
end | ||
else | ||
version = guessed_version(name) | ||
version ||= requested_version(name) | ||
|
||
if version | ||
raise_if_unsupported!(name, version.to_s) | ||
raise_if_unsupported!(name, version) | ||
|
||
install(name, version) | ||
else | ||
version = guessed_version(name) | ||
|
||
if version | ||
raise_if_unsupported!(name, version.to_s) | ||
|
||
install(name, version) if name == PNPMPackageManager::NAME | ||
end | ||
end | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want to install npm, and yarn versions as well. We removed the condition that only install for pnpm when version is guessed. |
||
version | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This else is going to be removed in clean-up process of
enable_corepack_for_npm_and_yarn
feature flag after all checks.