Skip to content

Commit 0084260

Browse files
iarnaFishrock123
authored andcommitted
deps: upgrade npm to 4.5.0
PR-URL: #12480 Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 061c5da commit 0084260

File tree

1,198 files changed

+65944
-30130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,198 files changed

+65944
-30130
lines changed

β€Ždeps/npm/.github/issue_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
before submitting your issue.
4141
4242
- Please check if there's a solution in the troubleshooting wiki:
43-
https://github.com/npm/npm/wiki/Troubleshooting
43+
https://github.com/npm/npm/blob/latest/TROUBLESHOOTING.md
4444
4545
- Also ensure that your new issue conforms to npm's contribution guidelines:
46-
https://github.com/npm/npm/wiki/Contributing-Guidelines
46+
https://github.com/npm/npm/blob/latest/CONTRIBUTING.md
4747
4848
- Participation in this open source project is subject to the npm Code of Conduct:
4949
https://www.npmjs.com/policies/conduct

β€Ždeps/npm/.mailmap

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Ryan Emery <[email protected]>
5353
Sam Mikes <[email protected]>
5454
Stephanie Snopek <[email protected]>
5555
Takaya Kobayashi <[email protected]>
56+
5657
Thomas Reggi <[email protected]>
5758
Timo Weiß <[email protected]>
5859

β€Ždeps/npm/.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ notifications:
2828
cache:
2929
directories:
3030
- $HOME/.npm
31+
- html/doc
32+
- man
3133
- node_modules/.bin
3234
- node_modules/.cache
3335
- node_modules/deep-equal

β€Ždeps/npm/AUTHORS

+9
Original file line numberDiff line numberDiff line change
@@ -450,3 +450,12 @@ Daijirō Wachi <[email protected]>
450450
Dmitry Litvinchenko <[email protected]>
451451
chocolateboy <[email protected]>
452452
Henry Zhu <[email protected]>
453+
Nate Goldman <[email protected]>
454+
Ted Yavuzkurt <[email protected]>
455+
Arseniy Maximov <[email protected]>
456+
Joshua Bennett <[email protected]>
457+
Evgeny Kulikov <[email protected]>
458+
Π‘ΠΊΠΎΠ²ΠΎΡ€ΠΎΠ΄Π° Никита АндрССвич <[email protected]>
459+
Carol (Nichols || Goulding) <[email protected]>
460+
Jarid Margolin <[email protected]>
461+
David Cook <[email protected]>

β€Ždeps/npm/CHANGELOG.md

+419
Large diffs are not rendered by default.

β€Ždeps/npm/CONTRIBUTING.md

+82-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,82 @@
1-
## Before you submit a new issue
2-
3-
* Check if there's a simple solution in the
4-
[Troubleshooting](https://github.com/npm/npm/wiki/Troubleshooting)
5-
wiki.
6-
* [Search for similar
7-
issues](https://github.com/npm/npm/search?q=Similar%20issues&type=Issues).
8-
* Ensure your new issue conforms to the [Contributing
9-
Guidelines](https://github.com/npm/npm/wiki/Contributing-Guidelines).
10-
11-
Participation in this open source project is subject to the [npm Code
12-
of Conduct](http://www.npmjs.com/policies/conduct).
1+
# npm CLI Contributor Roles and Responsibilities
2+
3+
## Table of Contents
4+
5+
* [Introduction](#introduction)
6+
* [Roles](#roles)
7+
* [Community Members](#community-members)
8+
* [Collaborators](#collaborators)
9+
* [npm, Inc Employeees](#npm-inc-employees)
10+
11+
12+
## Introduction
13+
14+
Welcome to the npm CLI Contributor Guide! This document outlines the npm CLI repository's process for community interaction and contribution. This includes the issue tracker, pull requests, wiki pages, and, to a certain extent, outside communication in the context of the npm CLI. It defines roles, responsibilities, and procedures, and is an entry point for anyone wishing to contribute their time and effort to making npm a better tool for the JavaScript community!
15+
16+
All interactions in the npm repository are covered by the [npm Code of Conduct](https://www.npmjs.com/policies/conduct)
17+
18+
## Roles
19+
20+
There are three main roles for people participating in the npm issue tracker. Each has a specific set of abilities and responsibilities: [Community members](#community-members), [Collaborators](#collaborators), and [npm, Inc employees](#npm-inc-employees).
21+
22+
Failure to comply with the expected responsibilities of each role, or violating the Code of Conduct will result in punitive action relative to the transgression, ranging from a warning to full removal from the project, at the discretion of npm employees.
23+
24+
### Community Members
25+
26+
This includes anyone who may show up to the npm/npm repo with issues, PRs, comments etc. They may not have any other involvement with npm.
27+
28+
#### Abilities
29+
30+
* Open issues and PRs
31+
* Comment on issues and PRs
32+
33+
#### Responsibilities
34+
35+
* Comment on issues when they have a reference to the answer.
36+
* If community members aren't sure they are correct and don't have a reference to the answer, please leave the issue and try another one.
37+
* Defer to collaborators and npm employees for answers.
38+
* Make sure to search for [the troubleshooting doc](./TROUBLESHOOTING.md) and search on the issue tracker for similar issues before opening a new one.
39+
* Any users with urgent support needs are welcome to email [email protected], and our dedicated support team will be happy to help.
40+
41+
PLEASE don't @ collaborators or npm employees on issues. The CLI team is small, and has many outstanding commitments to fulfill.
42+
43+
### Collaborators
44+
45+
These are folks who have the ability to label and close issues. The role of collaborators may expand over time, but for now it is a limited (& important) role. This is an excellent way to contribute to npm without writing code.
46+
47+
Community members may become collaborators by showing consistent, proven track record of quality contributions to the project, a reasonable level of proficiency with the CLI, and regular participation through the tracker and other related mediums, including regular contact with the CLI team itself. This role entails a higher level of responsibility than community member, so we ask for a higher level of understanding and commitment.
48+
49+
Collaborators who become inactive for 3 months or longer may have their collaborator privileges removed until they are ready to return.
50+
51+
#### Abilities
52+
53+
* Label/triage new issues
54+
* Respond to ongoing issues
55+
* Close resolved issues.
56+
57+
#### Responsibilities
58+
59+
* Only answer questions when they know the answer, and provide a reference to the answer.
60+
* If collaborators aren't totally confident about their answer, please leave the issue and try another one.
61+
* If they've responded to an issue, it becomes their responsibility to see it to resolution.
62+
* Close issues if there's no response within a month.
63+
* Defer to fellow Collaborators & npm employees for answers (Again, please don't @ collaborators or npm employees, thank you!)
64+
* Make sure to search for [the troubleshooting doc](./TROUBLESHOOTING.md) and search on the issue tracker for similar issues before opening a new one.
65+
66+
### npm, Inc Employees
67+
68+
Folks who work at npm, Inc, who have a responsibility to ensure the stability and functionality of the tools npm offers.
69+
70+
#### Abilities
71+
* Label/triage new issues
72+
* Respond to ongoing issues
73+
* Close resolved issues
74+
* Land PRs
75+
76+
Please note that this is a living document, and the CLI team will put up PRs to it as needed.
77+
78+
#### Responsibilities
79+
80+
* Preserve and promote the health of the CLI, the registry, the website, etc.
81+
82+
In special cases, [Collaborators](#collaborators) may request time to speak with an npm employee directly, by contacting them and coordinating a time/place.

β€Ždeps/npm/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
npm(1) -- a JavaScript package manager
22
==============================
3+
34
[![Build Status](https://img.shields.io/travis/npm/npm/latest.svg)](https://travis-ci.org/npm/npm)
5+
46
## SYNOPSIS
57

68
This is just enough info to get you up and running.
@@ -86,7 +88,7 @@ experience if you run a recent version of npm. To upgrade, either use [Microsoft
8688
upgrade tool](https://github.com/felixrieseberg/npm-windows-upgrade),
8789
[download a new version of Node](https://nodejs.org/en/download/),
8890
or follow the Windows upgrade instructions in the
89-
[npm Troubleshooting Guide](https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows).
91+
[npm Troubleshooting Guide](./TROUBLESHOOTING.md).
9092

9193
If that's not fancy enough for you, then you can fetch the code with
9294
git, and mess with it directly.

β€Ždeps/npm/TROUBLESHOOTING.md

+192
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# Troubleshooting Common Issues
2+
3+
## Using this Document
4+
5+
Search for the error message you're getting and see if there's a match, or skim the [table of contents](#table-of-contents) below for topics that seem relevant to the issue you're having. Each issue section has steps to work around or fix the particular issue, and have examples of common error messages.
6+
7+
If you do not find the issue below, try searching the issue tracker itself for potential duplicates before opening a new issue.
8+
9+
If you're reading this document because you noticed an issue with npm's web site, please let the [web team](https://github.com/npm/www/issues) know.
10+
11+
### Updating this Document
12+
13+
If you think something should be added here, make a PR that includes the following:
14+
15+
0. a summary
16+
0. one or more example errors
17+
0. steps to debug and fix
18+
0. links to at least one related issue from the tracker
19+
20+
For more details of the content and formatting of these entries, refer to examples below.
21+
22+
## Table of Contents
23+
24+
* [Upgrading npm](#upgrading-npm)
25+
* [Proxies and Networking](#proxy-and-networking-issues)
26+
* [Cannot find module](#cannot-find-module)
27+
* [Shasum Check Fails](#shasum-check-fails)
28+
* [No Git](#no-git)
29+
30+
## Upgrading npm
31+
32+
Whenever you get npm errors, it's a good idea to first check your npm version and upgrade to latest whenever possible. We still see people running npm@1 (!) and in those cases, installing the latest version of npm usually solves the problem.
33+
34+
You can check your npm version by running `npm -v`.
35+
36+
### Steps to Fix
37+
* Upgrading on \*nix (OSX, Linux, etc.)
38+
39+
(You may need to prefix these commands with sudo, especially on Linux, or OS X if you installed Node using its default installer.)
40+
You can upgrade to the latest version of npm using:
41+
`npm install -g npm@latest`
42+
Or upgrade to the most recent LTS release:
43+
`npm install -g npm@lts`
44+
45+
* Upgrading on Windows
46+
47+
We have a [detailed guide](https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows) for upgrading on windows on our wiki.
48+
49+
## Proxy and Networking Issues
50+
51+
npm might not be able to connect to the registry for various reasons. Perhaps your machine is behind a firewall that needs to be opened, or you require a corporate proxy to access the npm registry. This issue can manifest in a wide number of different ways. Usually, strange network errors are an instance of this specific problem.
52+
53+
Sometimes, users may have install failures due to Git/Github access issues. Git/GitHub access is separate from npm registry access. For users in some locations (India in particular), problems installing packages may be due to connectivity problems reaching GitHub and not the npm registry.
54+
55+
If you believe your network is configured and working correctly, and you're still having problems installing, please let the [registry team](https://github.com/npm/registry/issues) know you're having trouble.
56+
57+
### Steps to Fix
58+
59+
0. Make sure you have a working internet connection. Can you reach https://registry.npmjs.org? Can you reach other sites? If other sites are unreachable, this is not a problem with npm.
60+
61+
0. Check http://status.npmjs.org/ for any potential current service outages.
62+
63+
0. If your company has a process for domain whitelisting for developers, make sure https://registry.npmjs.org is a whitelisted domain.
64+
65+
0. If you're in China, consider using https://npm.taobao.org/ as a registry, which sits behind the Firewall.
66+
67+
0. On Windows, npm does not access proxies configured at the system level, so you need to configure them manually in order for npm to access them. Make sure [you have added the appropriate proxy configuration to `.npmrc`](https://docs.npmjs.com/misc/config#https-proxy).
68+
69+
0. If you already have a proxy configured, it might be configured incorrectly or use the wrong credentials. Verify your credentials, test the specific credentials with a separate application.
70+
71+
0. The proxy itself, on the server, might also have a configuration error. In this case, you'll need to work with your system administrator to verify that the proxy, and HTTPS, are configured correctly. You may test it by running regular HTTPS requests.
72+
73+
### Example Errors
74+
75+
This error can manifest in a wide range of different ways:
76+
77+
```
78+
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
79+
npm ERR! unable to verify the first certificate
80+
```
81+
```
82+
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
83+
npm ERR! unable to get local issuer certificate
84+
```
85+
```
86+
npm ERR! code DEPTH_ZERO_SELF_SIGNED_CERT
87+
npm ERR! self signed certificate
88+
```
89+
```
90+
124 error code ECONNREFUSED
91+
125 error errno ECONNREFUSED
92+
126 error syscall connect
93+
```
94+
```
95+
136 error Unexpected token <
96+
136 error <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
97+
136 error <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
98+
136 error <TITLE>ERROR: Cache Access Denied</TITLE>
99+
```
100+
```
101+
31 verbose stack Error: connect ETIMEDOUT 123.123.123.123:443
102+
```
103+
```
104+
108 error code EAI_AGAIN
105+
109 error errno EAI_AGAIN
106+
110 error syscall getaddrinfo
107+
111 error getaddrinfo EAI_AGAIN proxy.yourcorp.com:811
108+
```
109+
```
110+
npm ERR! Error: getaddrinfo ESRCH
111+
npm ERR! at errnoException (dns.js:37:11)
112+
npm ERR! at Object.onanswer as oncomplete
113+
```
114+
```
115+
35 error Unexpected token u
116+
35 error function FindProxyForURL(url, host) {
117+
```
118+
119+
### Related issues
120+
* [#14318](https://github.com/npm/npm/issues/14318)
121+
* [#15059](https://github.com/npm/npm/issues/15059)
122+
* [#14336](https://github.com/npm/npm/issues/14336)
123+
124+
## Cannot find module
125+
126+
If *when running npm* (not your application), you get an error about a module not being found, this almost certainly means that there's something wrong with your npm installation.
127+
128+
If this happens when trying to start your application, you might not have installed your package's dependencies yet.
129+
130+
### Steps to Fix
131+
132+
0. If this happens when you try to start your application, try running `npm install` to install the app's dependencies. Make sure all its actual dependencies are listed in `package.json`
133+
134+
0. If this happens on any npm command, please reinstall.
135+
136+
### Examples
137+
138+
```
139+
module.js:338
140+
throw err;
141+
^
142+
Error: Cannot find module
143+
```
144+
### Related Issues
145+
146+
* [#14699](https://github.com/npm/npm/issues/14699)
147+
148+
## Shasum Check Fails
149+
150+
This is a common issue which used to be caused by caching issues. Nowadays, the cache has been improved, so it's likely to be an install issue, which can be caused by network problems (sometimes even [proxy issues](#proxy-and-networking-issues)), a node bug, or possibly some sort of npm bug.
151+
152+
### Steps to Fix
153+
154+
0. Try running `npm install` again. It may have been a momentary hiccup or corruption during package download.
155+
156+
0. Check http://status.npmjs.org/ for any potential current service outages.
157+
158+
0. If the shasum error specifically has `Actual: da39a3ee5e6b4b0d3255bfef95601890afd80709`, with this exact shasum, it means the package download was empty, which is certainly a networking issue.
159+
160+
0. Make sure your [network connection and proxy settings](#proxy-and-networking-issues) are ok.
161+
162+
0. Update your node version to the latest stable version.
163+
164+
### Examples
165+
166+
```
167+
npm ERR! shasum check failed for C:\Users\some-user\AppData\Local\Temp\npm-9356-7
168+
d74e411\registry.npmjs.org\some-package\-\some-package-1.0.0.tgz
169+
npm ERR! Expected: 652294c14651db29fa93bd2d5ff2983a4f08c636
170+
npm ERR! Actual: c45474b40e6a7474633ec6f2b0315feaf15c61f2
171+
npm ERR! From: https://registry.npmjs.org/some-package/-/some-package-1.0.0.tgz
172+
```
173+
174+
### Related Issues
175+
* [#14720](https://github.com/npm/npm/issues/14720)
176+
* [#13405](https://github.com/npm/npm/issues/13405)
177+
178+
## No Git
179+
If your install fails and you see a message saying you don't have git installed, it should be resolved by installing git.
180+
181+
### Steps to Fix
182+
183+
0. [Install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) following the instructions for your machine.
184+
185+
### Examples
186+
187+
npm ERR! not found: git
188+
ENOGIT
189+
190+
### Related Issues
191+
192+
* [#11095](https://github.com/npm/npm/issues/11095)

β€Ždeps/npm/bin/npm-cli.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,17 @@
2525

2626
unsupported.checkForUnsupportedNode()
2727

28+
if (!unsupported.checkVersion(process.version).unsupported) {
29+
var updater = require('update-notifier')
30+
var pkg = require('../package.json')
31+
updater({pkg: pkg}).notify({defer: true})
32+
}
33+
2834
var path = require('path')
2935
var npm = require('../lib/npm.js')
3036
var npmconf = require('../lib/config/core.js')
3137
var errorHandler = require('../lib/utils/error-handler.js')
38+
var output = require('../lib/utils/output.js')
3239

3340
var configDefs = npmconf.defs
3441
var shorthands = configDefs.shorthands
@@ -74,6 +81,12 @@
7481
conf._exit = true
7582
npm.load(conf, function (er) {
7683
if (er) return errorHandler(er)
77-
npm.commands[npm.command](npm.argv, errorHandler)
84+
npm.commands[npm.command](npm.argv, function (err) {
85+
// https://www.youtube.com/watch?v=7nfPu8qTiQU
86+
if (!err && npm.config.get('ham-it-up')) {
87+
output('\n 🎡 I Have the Honour to Be Your Obedient Servant,🎡 ~ npm πŸ“œπŸ–‹\n')
88+
}
89+
errorHandler.apply(this, arguments)
90+
})
7891
})
7992
})()

0 commit comments

Comments
Β (0)