
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
npm-profile-manager
Advanced tools
A cross-platform .npmrc profile manager based on Conrad Pankoff's npmrc. npm Profile Manager seeks to improve on npmrc by enabling:
npmrc
CLI.npm i -g npm-profile-manager
npmrc upgrade default # Upgrades your current .npmrc to a profile named "default"
npm Profile Manager uses symbolic links to both identify which profile is currently in use and redirect npm to the correct profile. Sadly, Windows treats symbolic links as a security threat and requires the SeCreateSymbolicLinkPrivilege
privelage that is by default granted to only the Administrators group. You can grant the permission to other individuals or groups (including the Everyone group) by setting up a local policy. However, if you are an administrator and have the UAC enabled, you must elevate in order to create symbolic links, no matter what permissions are set. This means you must either:
npmrc
with elevated privileges (using runas
or elevating the hosting process), orAs one of the key goals of npm Package Manager is to be cross-platform, a future version of this package may use a different strategy to redirect .npmrc.
npmrc --help
npmrc --version
Lists the available profiles and notes the current one (if any).
$ npmrc list
* default
foo
bar
Switches to the specified profile. Use with --force
to overwrite an existing .npmrc file that is not managed by npm Profile Manager.
$ npmrc switch foo
Switched to profile foo
Creates and switches to a profile with the specified name. Use with --force
to overwrite an existing profile with the same name.
$ npmrc mk foo
Created profile foo
Switched to profile foo
Removes the profile with the specified name. Use with --force
to skip the confirmation step.
$ npmrc rm foo
Are you sure you want to delete npmrc profile "foo" and its cache? [yes/no] (no) yes
Removed profile foo
Renames the current profile to the specified name. use with --force
to overwrite an existing profile with the same name.
$ npmrc list
default
* test
$ npmrc rename foo
test is now named foo
Switched to profile foo
Creates a profile using the current, unmanaged npmrc. Use with --force
to overwrite an existing profile with the same name.
The name of the new profile may be provided as an argument:
$ npmrc upgrade foo
Switched to profile foo
or, if it is not specified, it will be prompted:
$ npmrc upgrade
New profile name: foo
Switched to profile foo
FAQs
Profile management for .npmrc files.
We found that npm-profile-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.