Below is a list of rules that valid npm package name should conform to.
package name length should be greater than zero
all the characters in the package name must be lowercase i.e., no uppercase or mixed case names are allowed
package name can consist of hyphens
package name must not contain any non-url-safe characters (since name ends up being part of a URL)
package name should not start with . or _
package name should not contain any spaces
package name should not contain any of the following characters: ~)('!*
package name cannot be the same as a node.js/io.js core module nor a reserved/blacklisted name. For example, the following names are invalid:
http
stream
node_modules
favicon.ico
package name length cannot exceed 214
I couldn't find this in the npm docs to reference.
Simplest change for my particular issue would be allowing the . in the name after the scope so that @scope/com.example.packageid passed the regex
The --name validator regex is too restrictive and will not let valid package names pass validation.
Presume it was a legacy versus current package name issue.
https://github.com/npm/validate-npm-package-name has a list of valid package name defined as:
Naming Rules
Below is a list of rules that valid npm package name should conform to.
package name length should be greater than zero all the characters in the package name must be lowercase i.e., no uppercase or mixed case names are allowed package name can consist of hyphens package name must not contain any non-url-safe characters (since name ends up being part of a URL) package name should not start with . or _ package name should not contain any spaces package name should not contain any of the following characters: ~)('!* package name cannot be the same as a node.js/io.js core module nor a reserved/blacklisted name. For example, the following names are invalid: http stream node_modules favicon.ico package name length cannot exceed 214
I couldn't find this in the npm docs to reference.
Simplest change for my particular issue would be allowing the . in the name after the scope so that @scope/com.example.packageid passed the regex
^(@[a-z0-9-]+\/)?[a-z0-9-.]+$