Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2021-06-03 22:59:07 +0300
committerGar <gar+gh@danger.computer>2021-06-10 20:10:35 +0300
commita4a0e68a9e34a4c99e10e4fb8c5f89d323a4192f (patch)
treece5c982c758a762b9980fc6a087031bd8953ce75 /node_modules/validate-npm-package-name
parentf130a81d62bf4f540ab252a09ff5a618827f9265 (diff)
chore: check less stuff into node_modules
We bundle our deps, but we don't need to bundle docs, changelogs, editorconfigs, test coverage reports, .github workflow definitions, lint configurations, and all the rest, which we never use. This cuts about 10% off of our publish artifact file size. ``` $ ls -laF npm-7.16.0-*.tgz -rw-r--r-- 1 isaacs staff 7174497 Jun 3 13:01 npm-7.16.0-release-next.tgz -rw-r--r-- 1 isaacs staff 6782377 Jun 3 13:00 npm-7.16.0-trim-node-modules.tgz $ ls -laF npm-7.16.0-*.tar -rw-r--r-- 1 isaacs staff 19020288 Jun 3 13:01 npm-7.16.0-release-next.tar -rw-r--r-- 1 isaacs staff 17474048 Jun 3 13:00 npm-7.16.0-trim-node-modules.tar ``` PR-URL: https://github.com/npm/cli/pull/3362 Credit: @isaacs Close: #3362 Reviewed-by: @nlf
Diffstat (limited to 'node_modules/validate-npm-package-name')
-rw-r--r--node_modules/validate-npm-package-name/.npmignore1
-rw-r--r--node_modules/validate-npm-package-name/.travis.yml6
-rw-r--r--node_modules/validate-npm-package-name/README.md120
3 files changed, 0 insertions, 127 deletions
diff --git a/node_modules/validate-npm-package-name/.npmignore b/node_modules/validate-npm-package-name/.npmignore
deleted file mode 100644
index 3c3629e64..000000000
--- a/node_modules/validate-npm-package-name/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/node_modules/validate-npm-package-name/.travis.yml b/node_modules/validate-npm-package-name/.travis.yml
deleted file mode 100644
index 54de0d2d1..000000000
--- a/node_modules/validate-npm-package-name/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - '0.10'
- - '4'
- - '6'
diff --git a/node_modules/validate-npm-package-name/README.md b/node_modules/validate-npm-package-name/README.md
deleted file mode 100644
index 95d04a4c8..000000000
--- a/node_modules/validate-npm-package-name/README.md
+++ /dev/null
@@ -1,120 +0,0 @@
-# validate-npm-package-name
-
-Give me a string and I'll tell you if it's a valid `npm` package name.
-
-This package exports a single synchronous function that takes a `string` as
-input and returns an object with two properties:
-
-- `validForNewPackages` :: `Boolean`
-- `validForOldPackages` :: `Boolean`
-
-## Contents
-
-- [Naming rules](#naming-rules)
-- [Examples](#examples)
- + [Valid Names](#valid-names)
- + [Invalid Names](#invalid-names)
-- [Legacy Names](#legacy-names)
-- [Tests](#tests)
-- [License](#license)
-
-## 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 leading or trailing 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
-
-
-## Examples
-
-### Valid Names
-
-```js
-var validate = require("validate-npm-package-name")
-
-validate("some-package")
-validate("example.com")
-validate("under_score")
-validate("123numeric")
-validate("excited!")
-validate("@npm/thingy")
-validate("@jane/foo.js")
-```
-
-All of the above names are valid, so you'll get this object back:
-
-```js
-{
- validForNewPackages: true,
- validForOldPackages: true
-}
-```
-
-### Invalid Names
-
-```js
-validate(" leading-space:and:weirdchars")
-```
-
-That was never a valid package name, so you get this:
-
-```js
-{
- validForNewPackages: false,
- validForOldPackages: false,
- errors: [
- 'name cannot contain leading or trailing spaces',
- 'name can only contain URL-friendly characters'
- ]
-}
-```
-
-## Legacy Names
-
-In the old days of npm, package names were wild. They could have capital
-letters in them. They could be really long. They could be the name of an
-existing module in node core.
-
-If you give this function a package name that **used to be valid**, you'll see
-a change in the value of `validForNewPackages` property, and a warnings array
-will be present:
-
-```js
-validate("eLaBorAtE-paCkAgE-with-mixed-case-and-more-than-214-characters-----------------------------------------------------------------------------------------------------------------------------------------------------------")
-```
-
-returns:
-
-```js
-{
- validForNewPackages: false,
- validForOldPackages: true,
- warnings: [
- "name can no longer contain capital letters",
- "name can no longer contain more than 214 characters"
- ]
-}
-```
-
-## Tests
-
-```sh
-npm install
-npm test
-```
-
-## License
-
-ISC