From d4b320d30ac7cbaeb36658efdf79a14c1037daf5 Mon Sep 17 00:00:00 2001 From: Lars Willighagen Date: Thu, 3 Jan 2019 23:48:41 +0100 Subject: [PATCH 1/2] docs: scoped names can begin with '.' & '_' See https://npm.community/t/4417 --- doc/files/package.json.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/files/package.json.md b/doc/files/package.json.md index dd6492af08430..3e2b4af2c6fad 100644 --- a/doc/files/package.json.md +++ b/doc/files/package.json.md @@ -23,7 +23,8 @@ Some rules: * The name must be less than or equal to 214 characters. This includes the scope for scoped packages. -* The name can't start with a dot or an underscore. +* The name can't start with a dot or an underscore. This doesn't include scoped + packages, since the scope is considered part of the name in this case. * New packages must not have uppercase letters in the name. * The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters. From a57c321f02014c0de51d36700bfb296cec3ab647 Mon Sep 17 00:00:00 2001 From: Lars Willighagen Date: Thu, 3 Jan 2019 23:53:06 +0100 Subject: [PATCH 2/2] docs: simplify previous addition --- doc/files/package.json.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/files/package.json.md b/doc/files/package.json.md index 3e2b4af2c6fad..730a33eb9bcd8 100644 --- a/doc/files/package.json.md +++ b/doc/files/package.json.md @@ -23,8 +23,8 @@ Some rules: * The name must be less than or equal to 214 characters. This includes the scope for scoped packages. -* The name can't start with a dot or an underscore. This doesn't include scoped - packages, since the scope is considered part of the name in this case. +* The name can't start with a dot or an underscore if the package name does not + include a scope. * New packages must not have uppercase letters in the name. * The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters.