npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-vsts-npm-auth-improved

v1.0.7

Published

Configure projects to use vsts-npm-auth-improved

Downloads

2,779

Readme

create-vsts-npm-auth-improved

create-vsts-npm-auth-improved is an interactive setup CLI for vsts-npm-auth-improved.

  • ✅ Configures one or more npm projects in a single interactive setup.
  • ✅ Updates/creates .npmrc files and package scripts to use vsts-npm-auth-improved for automatic npm registry authentication.
  • ✅ Warns when changed .npmrc files may not be shared through source control.
  • ✅ Keeps setup separate from authentication; it does not authenticate with a registry itself.

How to run

The intended way to run the interactive setup is with npm init:

npm init vsts-npm-auth-improved@latest

It can also be executed directly with npx:

npx create-vsts-npm-auth-improved@latest

Use --help or -h for help and --version or -v for the package version:

npx create-vsts-npm-auth-improved@latest --help
npx create-vsts-npm-auth-improved@latest --version

What the setup asks

Follow the prompts to:

  1. Choose the directory containing your npm projects.
  2. Select the projects you want to configure.
  3. Provide an Azure DevOps Artifacts registry URL when a selected project does not already have one.

You can cancel before setup completes without changing any files.

What the setup changes

For each selected project, the setup:

  • creates or updates the project .npmrc with the selected registry, enables lockfiles, and disables automatic audit and funding messages;
  • removes obsolete always-auth settings;
  • adds the dependency and package scripts needed to run vsts-npm-auth-improved before installing packages;
  • preserves unrelated registry settings, dependencies, and package scripts;
  • warns when a changed .npmrc is ignored by Git and may not be shared with other contributors.

The setup does not authenticate with the registry or add credentials to the project .npmrc. Review any .npmrc before changing .gitignore rules or committing it.

You can safely run the setup again when you need to update the configuration.

Install packages after setup

Use the generated installation command:

npm run install-packages

On Windows, authentication runs before npm installs packages from the private registry. On macOS, Linux, and CI, automatic authentication is skipped so your environment must supply the required credentials.

Why package installation uses a custom command

A root preinstall hook cannot reliably authenticate npm before it accesses a private registry:

  1. In npm 7 through npm 11, the root preinstall hook ran after dependencies had already been installed, which was too late to provide registry credentials. npm 12 corrected that lifecycle ordering through npm/cli#2660, but the correction is not available to projects that still use an earlier npm version.
  2. npm 12 runs root preinstall before fetching dependencies, but the active npm process loads .npmrc before invoking the hook. Credentials created or refreshed by preinstall are therefore not used by the dependency requests that follow it. This remaining behavior is tracked by npm/cli#9853.

The custom workflow provides the required process boundary. Running npm run install-packages first invokes its matching preinstall-packages hook to authenticate, then starts npm install as a new process. That new npm process loads the updated credentials before accessing the private registry.

If npm/cli#9853 is resolved and the fix is available, the standard npm install workflow can be enabled in future versions of this package without requiring the custom install-packages command.