Back to Explore

npm/validate-npm-package-name

GitHub
1 updates · last 90 days1 watchersOpen source

Last release:

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: recent updates landed in 2025 and again in 2026, with the newest update v8.0.0 dated 2026-05-08 and an upstream push on 2026-05-22 (close to today, 2026-06-11).
  • Update cadence appears steady: major engine-alignment updates in late 2025 and mid 2026 (v7.0.x in Oct to Dec 2025, v8.0.0 in May 2026), with smaller validation-focused updates in between (for example v7.0.2 on 2026-01-06).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v8.0.0

    Release 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.

    Breaking
  • v7.0.2

    v7.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

    v7.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

    Release 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.

    Breaking
  • v6.0.2

    v6.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

    v6.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

    v6.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.

    Breaking
  • v5.0.1

    v5.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

    v5.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.

    BreakingFeatures
  • v4.0.0

    v4.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