feat(npm): add install_args option#1581
Merged
Merged
Conversation
650e7c3 to
ab4c73a
Compare
ab4c73a to
58ae34d
Compare
Contributor
Author
|
Resolved conflicts |
devlopersabbir
approved these changes
Jan 9, 2024
Contributor
Author
|
@williamboman can you please give this one a review? 🙏🏻 It's a relatively small change |
* main: (101 commits) fix: actually emit the receipt in uninstall event payloads (mason-org#2071) chore(main): release 2.2.1 (mason-org#2055) fix(registry): exclude synthesized registry when updating/installing registries (mason-org#2054) chore(main): release 2.2.0 (mason-org#2032) chore(health): remove sh healthcheck (mason-org#2053) feat: add support for removal of packages from a registry (mason-org#2052) fix(installer): update cwd after uv_fs_rename() was successful (mason-org#2033) fix(installer): attempt to recover from known fs error while finalizing installation on some file systems (mason-org#1933) chore(main): release 2.1.0 (mason-org#1996) fix(spawn): always expand executable path on Windows (mason-org#2021) ci: fix shellharden download url (mason-org#2022) feat(compiler): make `supported_platforms` a universal source field (mason-org#2002) fix(pypi): add support for "compatible release" (~=) PEP440 expressions (mason-org#2000) fix(ui): only set border to none if `'winborder'` doesn't exist (mason-org#1984) fix(process): close check handles (mason-org#1995) chore(main): release 2.0.1 (mason-org#1921) fix(spawn): fix locating exepath on Windows systems using a Unix `'shell'` (mason-org#1991) fix(fetch): add busybox wget support (mason-org#1829) docs: rework Installation & Setup sections, and other minor adjustments (mason-org#1951) fix(pypi): pass --no-user flag (mason-org#1958) ...
williamboman
approved these changes
Apr 21, 2026
Member
williamboman
left a comment
There was a problem hiding this comment.
Hey, terribly sorry for so late review. I saw this when you first created it but I wanted to avoid exposing this as a setting and find a different .npmrc based approach (I never liked the equivalent pip.install_args setting either as it exposes such tight coupling to implementation details). I think in the absence of another solution this makes sense
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(Rework of #1580)
Often, when I'm working, my npm registry is set to the work's registry, which sometimes causes npm installations in Mason to fail.
To overcome this, I added the option to provide
install_argsto npm, the same as available in pip, so I can configure Mason to always use the default npm registry.Note: I wasn't sure if I should also support it in
lua/mason-core/managers/npm/init.lua, because I could not find any references where it is used (except tests). Let me know, and I can add it if needed.