Skip to content

Commit dea0634

Browse files
committed
npm: Upgrade to v1.2.15
1 parent 4580be0 commit dea0634

18 files changed

Lines changed: 218 additions & 83 deletions

File tree

β€Ždeps/npm/doc/cli/disputes.mdβ€Ž

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ There sometimes arise cases where a user publishes a module, and then
1515
later, some other user wants to use that name. Here are some common
1616
ways that happens (each of these is based on actual events.)
1717

18-
1. Bob writes a JavaScript module `foo`, which is not node-specific.
19-
Bob doesn't use node at all. Joe wants to use `foo` in node, so he
20-
wraps it in an npm module. Some time later, Bob starts using node,
18+
1. Joe writes a JavaScript module `foo`, which is not node-specific.
19+
Joe doesn't use node at all. Bob wants to use `foo` in node, so he
20+
wraps it in an npm module. Some time later, Joe starts using node,
2121
and wants to take over management of his program.
2222
2. Bob writes an npm module `foo`, and publishes it. Perhaps much
2323
later, Joe finds a bug in `foo`, and fixes it. He sends a pull
@@ -49,7 +49,8 @@ Joe's appropriate course of action in each case is the same.
4949
the `foo` package.
5050
3. After a reasonable amount of time, if Bob has not responded, or if
5151
Bob and Joe can't come to any sort of resolution, email isaacs
52-
<i@izs.me> and we'll sort it out.
52+
<i@izs.me> and we'll sort it out. ("Reasonable" is usually about 4
53+
weeks, but extra time is allowed around common holidays.)
5354

5455
## REASONING
5556

@@ -71,17 +72,23 @@ Some things are not allowed, and will be removed without discussion if
7172
they are brought to the attention of the npm registry admins, including
7273
but not limited to:
7374

74-
1. Malware (that is, a module designed to exploit or harm the machine on
75-
which it is installed)
75+
1. Malware (that is, a package designed to exploit or harm the machine on
76+
which it is installed).
7677
2. Violations of copyright or licenses (for example, cloning an
7778
MIT-licensed program, and then removing or changing the copyright and
78-
license statement)
79+
license statement).
7980
3. Illegal content.
8081
4. "Squatting" on a package name that you *plan* to use, but aren't
8182
actually using. Sorry, I don't care how great the name is, or how
8283
perfect a fit it is for the thing that someday might happen. If
8384
someone wants to use it today, and you're just taking up space with
8485
an empty tarball, you're going to be evicted.
86+
5. Putting empty packages in the registry. Packages must have SOME
87+
functionality. It can be silly, but it can't be *nothing*. (See
88+
also: squatting.)
89+
6. Doing weird things with the registry, like using it as your own
90+
personal application database or otherwise putting non-packagey
91+
things into it.
8592

8693
If you see bad behavior like this, please report it right away.
8794

β€Ždeps/npm/html/doc/disputes.htmlβ€Ž

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
2020
later, some other user wants to use that name. Here are some common
2121
ways that happens (each of these is based on actual events.)</p>
2222

23-
<ol><li>Bob writes a JavaScript module <code>foo</code>, which is not node-specific.
24-
Bob doesn&#39;t use node at all. Joe wants to use <code>foo</code> in node, so he
25-
wraps it in an npm module. Some time later, Bob starts using node,
23+
<ol><li>Joe writes a JavaScript module <code>foo</code>, which is not node-specific.
24+
Joe doesn&#39;t use node at all. Bob wants to use <code>foo</code> in node, so he
25+
wraps it in an npm module. Some time later, Joe starts using node,
2626
and wants to take over management of his program.</li><li>Bob writes an npm module <code>foo</code>, and publishes it. Perhaps much
2727
later, Joe finds a bug in <code>foo</code>, and fixes it. He sends a pull
2828
request to Bob, but Bob doesn&#39;t have the time to deal with it,
@@ -49,7 +49,8 @@ <h2 id="DESCRIPTION">DESCRIPTION</h2>
4949
that Bob can run <code>npm owner add joe foo</code> to add Joe as an owner of
5050
the <code>foo</code> package.</li><li>After a reasonable amount of time, if Bob has not responded, or if
5151
Bob and Joe can&#39;t come to any sort of resolution, email isaacs
52-
<a href="mailto:i@izs.me">i@izs.me</a> and we&#39;ll sort it out.</li></ol>
52+
<a href="mailto:i@izs.me">i@izs.me</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is usually about 4
53+
weeks, but extra time is allowed around common holidays.)</li></ol>
5354

5455
<h2 id="REASONING">REASONING</h2>
5556

@@ -71,14 +72,18 @@ <h2 id="EXCEPTIONS">EXCEPTIONS</h2>
7172
they are brought to the attention of the npm registry admins, including
7273
but not limited to:</p>
7374

74-
<ol><li>Malware (that is, a module designed to exploit or harm the machine on
75-
which it is installed)</li><li>Violations of copyright or licenses (for example, cloning an
75+
<ol><li>Malware (that is, a package designed to exploit or harm the machine on
76+
which it is installed).</li><li>Violations of copyright or licenses (for example, cloning an
7677
MIT-licensed program, and then removing or changing the copyright and
77-
license statement)</li><li>Illegal content.</li><li>&quot;Squatting&quot; on a package name that you <em>plan</em> to use, but aren&#39;t
78+
license statement).</li><li>Illegal content.</li><li>&quot;Squatting&quot; on a package name that you <em>plan</em> to use, but aren&#39;t
7879
actually using. Sorry, I don&#39;t care how great the name is, or how
7980
perfect a fit it is for the thing that someday might happen. If
8081
someone wants to use it today, and you&#39;re just taking up space with
81-
an empty tarball, you&#39;re going to be evicted.</li></ol>
82+
an empty tarball, you&#39;re going to be evicted.</li><li>Putting empty packages in the registry. Packages must have SOME
83+
functionality. It can be silly, but it can&#39;t be <em>nothing</em>. (See
84+
also: squatting.)</li><li>Doing weird things with the registry, like using it as your own
85+
personal application database or otherwise putting non-packagey
86+
things into it.</li></ol>
8287

8388
<p>If you see bad behavior like this, please report it right away.</p>
8489

β€Ždeps/npm/lib/cache.jsβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ function read (name, ver, forceBypass, cb) {
140140
}
141141

142142
readJson(jsonFile, function (er, data) {
143+
er = needName(er, data)
143144
er = needVersion(er, data)
144145
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
145146
if (er) return addNamed(name, ver, c)
@@ -722,6 +723,7 @@ function addNameVersion (name, ver, data, cb) {
722723
if (!er) readJson( path.join( npm.cache, name, ver
723724
, "package", "package.json" )
724725
, function (er, data) {
726+
er = needName(er, data)
725727
er = needVersion(er, data)
726728
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
727729
if (er) return fetchit()
@@ -1011,6 +1013,7 @@ function addPlacedTarball_ (p, name, uid, gid, resolvedSum, cb) {
10111013
return cb(er)
10121014
}
10131015
readJson(path.join(folder, "package.json"), function (er, data) {
1016+
er = needName(er, data)
10141017
er = needVersion(er, data)
10151018
if (er) {
10161019
log.error("addPlacedTarball", "Couldn't read json in %j"
@@ -1057,6 +1060,7 @@ function addLocalDirectory (p, name, shasum, cb) {
10571060
if (p.indexOf(npm.cache) === 0) return cb(new Error(
10581061
"Adding a cache directory to the cache will make the world implode."))
10591062
readJson(path.join(p, "package.json"), function (er, data) {
1063+
er = needName(er, data)
10601064
er = needVersion(er, data)
10611065
if (er) return cb(er)
10621066
deprCheck(data)
@@ -1183,6 +1187,12 @@ function unlock (u, cb) {
11831187
lockFile.unlock(lockFileName(u), cb)
11841188
}
11851189

1190+
function needName(er, data) {
1191+
return er ? er
1192+
: (data && !data.name) ? new Error("No name provided")
1193+
: null
1194+
}
1195+
11861196
function needVersion(er, data) {
11871197
return er ? er
11881198
: (data && !data.version) ? new Error("No version provided")

β€Ždeps/npm/man/man1/disputes.1β€Ž

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ later, some other user wants to use that name\. Here are some common
2828
ways that happens (each of these is based on actual events\.)
2929
.
3030
.IP "1" 4
31-
Bob writes a JavaScript module \fBfoo\fR, which is not node\-specific\.
32-
Bob doesn\'t use node at all\. Joe wants to use \fBfoo\fR in node, so he
33-
wraps it in an npm module\. Some time later, Bob starts using node,
31+
Joe writes a JavaScript module \fBfoo\fR, which is not node\-specific\.
32+
Joe doesn\'t use node at all\. Bob wants to use \fBfoo\fR in node, so he
33+
wraps it in an npm module\. Some time later, Joe starts using node,
3434
and wants to take over management of his program\.
3535
.
3636
.IP "2" 4
@@ -75,7 +75,8 @@ the \fBfoo\fR package\.
7575
.
7676
.IP "3" 4
7777
After a reasonable amount of time, if Bob has not responded, or if
78-
Bob and Joe can\'t come to any sort of resolution, email isaacs \fIi@izs\.me\fR and we\'ll sort it out\.
78+
Bob and Joe can\'t come to any sort of resolution, email isaacs \fIi@izs\.me\fR and we\'ll sort it out\. ("Reasonable" is usually about 4
79+
weeks, but extra time is allowed around common holidays\.)
7980
.
8081
.IP "" 0
8182
.
@@ -99,13 +100,13 @@ they are brought to the attention of the npm registry admins, including
99100
but not limited to:
100101
.
101102
.IP "1" 4
102-
Malware (that is, a module designed to exploit or harm the machine on
103-
which it is installed)
103+
Malware (that is, a package designed to exploit or harm the machine on
104+
which it is installed)\.
104105
.
105106
.IP "2" 4
106107
Violations of copyright or licenses (for example, cloning an
107108
MIT\-licensed program, and then removing or changing the copyright and
108-
license statement)
109+
license statement)\.
109110
.
110111
.IP "3" 4
111112
Illegal content\.
@@ -117,6 +118,16 @@ perfect a fit it is for the thing that someday might happen\. If
117118
someone wants to use it today, and you\'re just taking up space with
118119
an empty tarball, you\'re going to be evicted\.
119120
.
121+
.IP "5" 4
122+
Putting empty packages in the registry\. Packages must have SOME
123+
functionality\. It can be silly, but it can\'t be \fInothing\fR\|\. (See
124+
also: squatting\.)
125+
.
126+
.IP "6" 4
127+
Doing weird things with the registry, like using it as your own
128+
personal application database or otherwise putting non\-packagey
129+
things into it\.
130+
.
120131
.IP "" 0
121132
.
122133
.P

β€Ždeps/npm/node_modules/lru-cache/README.mdβ€Ž

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ždeps/npm/node_modules/lru-cache/lib/lru-cache.jsβ€Ž

Lines changed: 36 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ždeps/npm/node_modules/lru-cache/package.jsonβ€Ž

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ždeps/npm/node_modules/lru-cache/s.jsβ€Ž

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)