A utility for programmatically generating .npmrc files for npm registry configuration. Version 0.1.3 is the latest stable release with TypeScript type definitions. It supports formatting with npm9 style, allows configuring scoped registries, authentication tokens, and root registry settings. Key differentiator: generates .npmrc content from a JavaScript/TypeScript object, enabling deterministic configuration in CI/CD pipelines and avoiding manual editing of .npmrc files. The library has a simple API with a single formatNpmrc function.
npm install dotnpmrcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Generates an .npmrc file with scoped registry and authentication token using the formatNpmrc function.
Always include root.registry to avoid an incomplete .npmrc that may fallback to npm's default registry.
Use authToken instead of auth when possible, or ensure the value is correctly base64-encoded with no extra whitespace.
Pin to version 0.1.3 if the exact output format is critical.
Change to import { formatNpmrc } from 'dotnpmrc' and ensure the consuming module is also ES module.Add "type": "module" to package.json or use dynamic import: const { formatNpmrc } = await import('dotnpmrc');No dependency data recorded yet.