<s>
npm	B-Language
is	O
a	O
package	B-Application
manager	I-Application
for	O
the	O
JavaScript	B-Language
programming	I-Language
language	I-Language
maintained	O
by	O
npm	B-Language
,	O
Inc	O
.	O
npm	B-Language
is	O
the	O
default	O
package	B-Application
manager	I-Application
for	O
the	O
JavaScript	B-Language
runtime	O
environment	O
Node.js	B-Language
.	O
</s>
<s>
It	O
consists	O
of	O
a	O
command	B-Application
line	I-Application
client	O
,	O
also	O
called	O
npm	B-Language
,	O
and	O
an	O
online	O
database	O
of	O
public	O
and	O
paid-for	O
private	O
packages	O
,	O
called	O
the	O
npm	B-Language
registry	O
.	O
</s>
<s>
The	O
registry	O
is	O
accessed	O
via	O
the	O
client	O
,	O
and	O
the	O
available	O
packages	O
can	O
be	O
browsed	O
and	O
searched	O
via	O
the	O
npm	B-Language
website	O
.	O
</s>
<s>
The	O
package	B-Application
manager	I-Application
and	O
the	O
registry	O
are	O
managed	O
by	O
npm	B-Language
,	O
Inc	O
.	O
</s>
<s>
npm	B-Language
is	O
officially	O
a	O
"	O
recursive	O
bacronymic	O
abbreviation	O
for	O
'	O
npm	B-Language
is	O
not	O
an	O
acronym	O
.	O
</s>
<s>
However	O
,	O
the	O
initial	O
commit	O
of	O
npm	B-Language
referred	O
to	O
it	O
as	O
the	O
"	O
Node	B-Language
Package	I-Language
Manager	I-Language
"	O
.	O
</s>
<s>
npm	B-Language
is	O
written	O
entirely	O
in	O
JavaScript	B-Language
and	O
was	O
developed	O
by	O
Isaac	O
Z	O
.	O
Schlueter	O
as	O
a	O
result	O
of	O
having	O
"	O
seen	O
module	O
packaging	O
done	O
terribly	O
"	O
and	O
with	O
inspiration	O
from	O
other	O
similar	O
projects	O
such	O
as	O
PEAR	B-Application
(	O
PHP	B-Application
)	O
and	O
CPAN	B-Language
(	O
Perl	B-Language
)	O
.	O
</s>
<s>
In	O
March	O
2016	O
,	O
npm	B-Language
attracted	O
press	O
attention	O
after	O
a	O
package	O
called	O
left-pad	O
,	O
which	O
many	O
popular	O
JavaScript	B-Language
packages	O
depended	O
on	O
,	O
was	O
unpublished	O
as	O
the	O
result	O
of	O
a	O
naming	O
dispute	O
between	O
Azer	O
Koçulu	O
,	O
a	O
self-taught	O
software	O
engineer	O
,	O
and	O
Kik	B-Protocol
.	O
</s>
<s>
Although	O
the	O
package	O
was	O
republished	O
three	O
hours	O
later	O
,	O
it	O
caused	O
widespread	O
disruption	O
,	O
leading	O
npm	B-Language
to	O
change	O
its	O
policies	O
regarding	O
unpublishing	O
to	O
prevent	O
a	O
similar	O
event	O
in	O
the	O
future	O
.	O
</s>
<s>
In	O
February	O
2018	O
,	O
an	O
issue	O
was	O
discovered	O
in	O
version	O
5.7.0	O
in	O
which	O
running	O
sudo	O
npm	B-Language
on	O
Linux	O
systems	O
would	O
change	O
the	O
ownership	O
of	O
system	O
files	O
,	O
permanently	O
breaking	O
the	O
operating	O
system	O
.	O
</s>
<s>
In	O
July	O
2018	O
,	O
the	O
npm	B-Language
credentials	O
of	O
a	O
maintainer	O
of	O
the	O
popular	O
eslint-scope	O
package	O
were	O
compromised	O
resulting	O
in	O
a	O
malicious	O
release	O
of	O
eslint-scope	O
,	O
version	O
3.7.2	O
.	O
</s>
<s>
The	O
malicious	O
code	O
copied	O
the	O
npm	B-Language
credentials	O
of	O
the	O
machine	O
running	O
eslint-scope	O
and	O
uploaded	O
them	O
to	O
the	O
attacker	O
.	O
</s>
<s>
In	O
November	O
2018	O
,	O
it	O
was	O
discovered	O
that	O
a	O
malicious	O
package	O
had	O
been	O
added	O
as	O
a	O
dependency	B-Application
to	O
version	O
3.3.6	O
of	O
the	O
popular	O
package	O
event-stream	O
.	O
</s>
<s>
The	O
malicious	O
package	O
,	O
called	O
flatmap-stream	O
,	O
contained	O
an	O
encrypted	O
payload	O
that	O
stole	O
bitcoins	B-Protocol
from	O
certain	O
applications	O
.	O
</s>
<s>
npm	B-Language
administrators	O
removed	O
the	O
offending	O
package	O
.	O
</s>
<s>
In	O
April	O
2020	O
,	O
a	O
small	O
package	O
called	O
is-promise	O
resulted	O
in	O
outage	O
in	O
serverless	O
applications	O
and	O
deployments	O
worldwide	O
by	O
virtue	O
of	O
being	O
a	O
dependency	B-Application
of	O
many	O
big	O
and	O
important	O
applications	O
.	O
</s>
<s>
The	O
maintainer	O
also	O
cleared	O
the	O
repository	O
of	O
another	O
popular	O
package	O
,	O
faker	O
,	O
and	O
its	O
package	O
on	O
npm	B-Language
,	O
and	O
replaced	O
it	O
with	O
a	O
README	O
that	O
read	O
,	O
"	O
What	O
really	O
happened	O
to	O
Aaron	O
Swartz	O
?	O
"	O
</s>
<s>
Vue.js	B-Language
,	O
which	O
uses	O
node-ipc	O
as	O
a	O
dependency	B-Application
,	O
did	O
not	O
pin	O
its	O
dependencies	B-Application
to	O
a	O
safe	O
version	O
,	O
meaning	O
that	O
some	O
users	O
of	O
Vue.js	B-Language
became	O
affected	O
by	O
the	O
malicious	O
package	O
if	O
the	O
dependency	B-Application
was	O
fetched	O
as	O
the	O
latest	O
package	O
.	O
</s>
<s>
The	O
affected	O
dependency	B-Application
was	O
also	O
briefly	O
present	O
in	O
version	O
3.1	O
of	O
Unity	B-Application
Hub	I-Application
;	O
a	O
hotfix	O
was	O
released	O
the	O
same	O
day	O
to	O
remove	O
the	O
issue	O
,	O
however	O
.	O
</s>
<s>
npm	B-Language
is	O
included	O
as	O
a	O
recommended	O
feature	O
in	O
the	O
Node.js	B-Language
installer	O
.	O
</s>
<s>
npm	B-Language
consists	O
of	O
a	O
command	B-Application
line	I-Application
client	O
that	O
interacts	O
with	O
a	O
remote	O
registry	O
.	O
</s>
<s>
It	O
allows	O
users	O
to	O
consume	O
and	O
distribute	O
JavaScript	B-Language
modules	O
that	O
are	O
available	O
in	O
the	O
registry	O
.	O
</s>
<s>
Packages	O
in	O
the	O
registry	O
are	O
in	O
CommonJS	B-Language
format	O
and	O
include	O
a	O
metadata	O
file	O
in	O
JSON	B-General_Concept
format	O
.	O
</s>
<s>
Over	O
1.3	O
million	O
packages	O
are	O
available	O
in	O
the	O
main	O
npm	B-Language
registry	O
.	O
</s>
<s>
Instead	O
,	O
npm	B-Language
relies	O
on	O
user	O
reports	O
to	O
take	O
down	O
packages	O
if	O
they	O
violate	O
policies	O
by	O
being	O
low	O
quality	O
,	O
insecure	O
,	O
or	O
malicious	O
.	O
</s>
<s>
npm	B-Language
exposes	O
statistics	O
including	O
number	O
of	O
downloads	O
and	O
number	O
of	O
depending	O
packages	O
to	O
assist	O
developers	O
in	O
judging	O
the	O
quality	O
of	O
packages	O
.	O
</s>
<s>
In	O
npm	B-Language
version	O
6	O
,	O
the	O
audit	O
feature	O
was	O
introduced	O
to	O
help	O
developers	O
identify	O
and	O
fix	O
security	O
vulnerabilities	O
in	O
installed	O
packages	O
.	O
</s>
<s>
The	O
source	O
of	O
security	O
vulnerabilities	O
were	O
taken	O
from	O
reports	O
found	O
on	O
the	O
Node	O
Security	O
Platform	O
(	O
NSP	O
)	O
and	O
has	O
been	O
integrated	O
with	O
npm	B-Language
since	O
npm	B-Language
's	O
acquisition	O
of	O
NSP	O
.	O
</s>
<s>
npm	B-Language
can	O
manage	O
packages	O
that	O
are	O
local	O
dependencies	B-Application
of	O
a	O
particular	O
project	O
,	O
as	O
well	O
as	O
globally-installed	O
JavaScript	B-Language
tools	O
.	O
</s>
<s>
When	O
used	O
as	O
a	O
dependency	B-Application
manager	O
for	O
a	O
local	O
project	O
,	O
npm	B-Language
can	O
install	O
,	O
in	O
one	O
command	O
,	O
all	O
the	O
dependencies	B-Application
of	O
a	O
project	O
through	O
the	O
package.json	O
file	O
.	O
</s>
<s>
In	O
the	O
package.json	O
file	O
,	O
each	O
dependency	B-Application
can	O
specify	O
a	O
range	O
of	O
valid	O
versions	O
using	O
the	O
semantic	O
versioning	O
scheme	O
,	O
allowing	O
developers	O
to	O
auto-update	O
their	O
packages	O
while	O
at	O
the	O
same	O
time	O
avoiding	O
unwanted	O
breaking	O
changes	O
.	O
</s>
<s>
npm	B-Language
also	O
provides	O
version-bumping	O
tools	O
for	O
developers	O
to	O
tag	O
their	O
packages	O
with	O
a	O
particular	O
version	O
.	O
</s>
<s>
npm	B-Language
also	O
provides	O
the	O
package-lock.json	O
file	O
which	O
has	O
the	O
entry	O
of	O
the	O
exact	O
version	O
used	O
by	O
the	O
project	O
after	O
evaluating	O
semantic	O
versioning	O
in	O
package.json	O
.	O
</s>
<s>
There	O
are	O
a	O
number	O
of	O
open-source	O
alternatives	O
to	O
npm	B-Language
for	O
installing	O
modular	O
JavaScript	B-Language
,	O
including	O
ied	O
,	O
pnpm	O
,	O
npmd	O
,	O
and	O
Yarn	B-Language
,	O
the	O
last	O
of	O
which	O
was	O
released	O
by	O
Facebook	B-Application
in	O
October	O
2016	O
.	O
</s>
<s>
They	O
are	O
all	O
compatible	O
with	O
the	O
public	O
npm	B-Language
registry	O
and	O
use	O
it	O
by	O
default	O
,	O
but	O
provide	O
different	O
client-side	O
experiences	O
,	O
usually	O
focused	O
on	O
improving	O
performance	O
and	O
determinism	B-General_Concept
compared	O
to	O
the	O
npm	B-Language
client	O
.	O
</s>
<s>
Internally	O
npm	B-Language
relies	O
on	O
the	O
NoSQL	O
Couch	B-Application
DB	I-Application
to	O
manage	O
publicly	O
available	O
data	O
.	O
</s>
