npm/validate-npm-package-name
Last release: 1 month ago
validate-npm-package-name is an npm CLI-related tool that checks whether a given string is an acceptable npm package name. It exports a synchronous function that returns whether the name is valid for new packages and for old packages, and it provides errors or warnings when the name does not meet the rules.
Project status
- Actively maintained, with multiple recent update tags (v7.0.1 in 2025-12-18, v7.0.2 in 2026-01-06, v8.0.0 in 2026-05-08) and a recent upstream push on 2026-05-22.
- Apparent update cadence is steady but not constant, with changes roughly every 1 to 5 months across late 2025 through mid 2026.
AI summary generated Today
Recent updates
v8.0.0
1 month agoRelease v8.0.0 updates the package to support a newer Node.js engine range and bumps template generation tooling. Most of the diff appears to be CI and template-related changes (workflows, matrix versions, and generated metadata), not runtime library logic.
Breakingv7.0.2
5 months agov7.0.2 focuses on the handling of Node.js built-in module names. The implementation now uses a bundled, generated fixture of builtin modules and adds a test to ensure the fixture stays in sync with Node’s builtin module list.
v7.0.1
5 months agov7.0.1 adds a validation fix so npm package names that start with a hyphen are now rejected. The release also modernizes the test setup to use Node's built-in test runner (node:test) and updates CI to run against newer Node versions.
v7.0.0
7 months agoRelease v7.0.0 updates the package to align with npm 11 by changing the supported Node.js engine range. It also bumps the internal scaffolding dependency @npmcli/template-oss. The code diff shows only build/CI metadata and configuration changes, with no API surface changes.
Breakingv6.0.2
10 months agov6.0.2 is a small bug fix release for npm package name validation, focused on handling reserved or excluded names in the context of scoped packages. The only functional code change in the library diff is around how excluded names are reported, plus new tests that confirm scoped-package behavior. A separate chore bumps @npmcli/template-oss.
v6.0.1
6/5/2025v6.0.1 introduces additional validation for npm package names, specifically rejecting scoped package names whose package segment starts with one or more periods (examples like @npm/., @npm/.., @npm/.package). The release also includes minor repo automation and tooling updates (template-oss bump, workflow permissions, and release-please config adjustments).
v6.0.0
9/25/2024v6.0.0 primarily updates the package's supported Node.js engine range, dropping older Node versions. The release notes also mention a small bug fix aligned to npm 10 and several repository chores including lint/config dependency bumps. The code diff shows no library/runtime logic changes, but there are several tooling and CI changes not called out in the release notes.
Breakingv5.0.1
5/6/2024v5.0.1 primarily updates how the package detects Node.js core module names during validation. The release notes document replacing the runtime `builtins` dependency with Node's `module.builtinModules`, along with several repository automation and dev tooling chores.
v5.0.0
10/14/2022v5.0.0 primarily updates the supported Node.js engine range, requiring Node >= 18 for newer environments and bumping minimums for older major versions. The rest of the changes in this diff appear to be repository tooling updates, including CI/workflow changes generated by template-oss and a devDependency bump.
BreakingFeaturesv4.0.0
3/29/2022v4.0.0 introduces a small documentation update, but the main changes are breaking. It removes the exported scopedPackagePattern API and drops support for Node 10, plus non-LTS Node 12 and Node 14 versions.
Breaking