Format all mdx content with prettier
Luke Karrys committed
Oct 22, 2023 at 20:42 UTC
c62df531ef34f168585672948b3e48f3e76bcfc3
169 files changed
+1400
-2836
.eslintrc.js
+1
-1
@@ -37,7 +37,7 @@ module.exports = {
37
parserOptions: {
38
sourceType: 'module',
39
},
40
- globals: getGlobals(['Index', 'Note', 'Prompt', 'PromptReply', 'Screenshot', 'Link', 'YouTube']),
40
+ globals: getGlobals(['Index', 'Note', 'Prompt', 'Screenshot', 'Link', 'YouTube']),
41
settings: {
42
'import/resolver': 'webpack',
43
},
.github/workflows/ci-cli.yml
+2
@@ -90,6 +90,8 @@ jobs:
90
run: npm run lint --ignore-scripts -w cli
91
- name: Post Lint
92
run: npm run postlint --ignore-scripts -w cli
93
+ - name: Check Format
94
+ run: npm run format:check --ignore-scripts --if-present -w cli
95
96
test:
97
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
.github/workflows/ci.yml
+2
@@ -90,6 +90,8 @@ jobs:
90
run: npm run lint --ignore-scripts
91
- name: Post Lint
92
run: npm run postlint --ignore-scripts
93
+ - name: Check Format
94
+ run: npm run format:check --ignore-scripts --if-present
95
96
test:
97
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
.prettierignore
-1
@@ -1,6 +1,5 @@
1
**/template-oss/*.json
2
**/template-oss/*.yml
3
-/content/
3
/.github/
4
/package-lock.json
5
/SECURITY.md
.prettierrc.js
+7
@@ -3,4 +3,11 @@ const config = require('@github/prettier-config')
3
module.exports = {
4
...config,
5
proseWrap: 'never',
6
+ embeddedLanguageFormatting: 'off',
7
+ overrides: [
8
+ {
9
+ files: ['content/**/*.mdx'],
10
+ printWidth: 99999,
11
+ },
12
+ ],
13
}
cli/lib/transform.js
+11
-1
@@ -7,6 +7,12 @@ const gh = require('./gh')
7
const prettier = require('@prettier/sync')
8
const rawRedirects = require('./redirects')
9
10
+const prettierFormat = str =>
11
+ prettier.format(str, {
12
+ parser: 'markdown',
13
+ proseWrap: 'never',
14
+ })
15
+
16
const getPathParts = path => {
17
const abs = isAbsolute(path)
18
const paths = path.replace(/\.mdx?$/, '').split(sep)
@@ -101,7 +107,8 @@ const transform = (data, {release, path, frontmatter, format = s => s}) => {
107
108
// first format with prettier, this helps so other replacements don't have to
109
// worry about newlines vs spaces
104
- body = prettier.format(body, {parser: 'markdown', proseWrap: 'never'})
110
+ body = prettierFormat(body)
111
+
112
// then do replacements for all cli makdown files
113
body = body
114
// some legacy versions of the docs did not get this replaced
@@ -121,6 +128,9 @@ const transform = (data, {release, path, frontmatter, format = s => s}) => {
128
// then do any transformer specific replacements
129
body = format(body)
130
131
+ // prettier again now that we've altered the contents
132
+ body = prettierFormat(body)
133
+
134
return `---\n${yaml.stringify(attributes).trim()}\n---\n\n${body}`
135
}
136
content/about-npm/index.mdx
+19
-21
@@ -8,30 +8,29 @@ npm is the world's largest software registry. Open source developers from every
8
9
npm consists of three distinct components:
10
11
-* the website
12
-* the Command Line Interface (CLI)
13
-* the registry
11
+- the website
12
+- the Command Line Interface (CLI)
13
+- the registry
14
15
-Use the [*website*](https://npmjs.com) to discover packages, set up profiles, and manage other aspects of your npm experience. For example, you can set up [organizations](https://www.npmjs.com/features) to manage access to public or private packages.
15
+Use the [_website_](https://npmjs.com) to discover packages, set up profiles, and manage other aspects of your npm experience. For example, you can set up [organizations](https://www.npmjs.com/features) to manage access to public or private packages.
16
17
-The [*CLI*](https://docs.npmjs.com/cli/npm) runs from a terminal, and is how most developers interact with npm.
18
-
19
-The [*registry*](https://docs.npmjs.com/misc/registry) is a large public database of JavaScript software and the meta-information surrounding it.
17
+The [_CLI_](https://docs.npmjs.com/cli/npm) runs from a terminal, and is how most developers interact with npm.
18
19
+The [_registry_](https://docs.npmjs.com/misc/registry) is a large public database of JavaScript software and the meta-information surrounding it.
20
21
## Use npm to . . .
22
24
-* Adapt packages of code for your apps, or incorporate packages as they are.
25
-* Download standalone tools you can use right away.
26
-* Run packages without downloading using [npx](https://docs.npmjs.com/cli/commands/npx).
27
-* Share code with any npm user, anywhere.
28
-* Restrict code to specific developers.
29
-* Create organizations to coordinate package maintenance, coding, and developers.
30
-* Form virtual teams by using organizations.
31
-* Manage multiple versions of code and code dependencies.
32
-* Update applications easily when underlying code is updated.
33
-* Discover multiple ways to solve the same puzzle.
34
-* Find other developers who are working on similar problems and projects.
23
+- Adapt packages of code for your apps, or incorporate packages as they are.
24
+- Download standalone tools you can use right away.
25
+- Run packages without downloading using [npx](https://docs.npmjs.com/cli/commands/npx).
26
+- Share code with any npm user, anywhere.
27
+- Restrict code to specific developers.
28
+- Create organizations to coordinate package maintenance, coding, and developers.
29
+- Form virtual teams by using organizations.
30
+- Manage multiple versions of code and code dependencies.
31
+- Update applications easily when underlying code is updated.
32
+- Discover multiple ways to solve the same puzzle.
33
+- Find other developers who are working on similar problems and projects.
34
35
## Getting started
36
@@ -41,9 +40,9 @@ After you set up an npm account, the next step is to use the command line interf
40
41
## Sharing packages and collaborating with others
42
44
-If you choose to share your packages publicly, there is no cost. To use and share private packages, you need to upgrade your account. To share with others, create organizations, called **[npm organizations][orgs-docs]**, and invite others to work with you, privately (for a fee) or publicly (for free).
43
+If you choose to share your packages publicly, there is no cost. To use and share private packages, you need to upgrade your account. To share with others, create organizations, called **[npm organizations][orgs-docs]**, and invite others to work with you, privately (for a fee) or publicly (for free).
44
46
-You can also use a private npm package registry like [GitHub Packages](https://github.com/features/packages) or the open source [Verdaccio](https://verdaccio.org) project. This lets you develop packages internally that are not shared publicly.
45
+You can also use a private npm package registry like [GitHub Packages](https://github.com/features/packages) or the open source [Verdaccio](https://verdaccio.org) project. This lets you develop packages internally that are not shared publicly.
46
47
## Learn more
48
@@ -55,7 +54,6 @@ For mentoring, tutorials, and learning, visit [node school](https://nodeschool.i
54
55
While relevant CLI commands are covered throughout this user documentation, the CLI includes command line help, its own [documentation section, and instant help (man pages)][cli-docs].
56
58
-
57
[orgs-docs]: /organizations
58
[install-npm]: /downloading-and-installing-node-js-and-npm
59
[cli-docs]: /cli-documentation
content/cli/v7/commands/npm-access.mdx
-4
@@ -76,7 +76,6 @@ Management of teams and team memberships is done with the `npm team` command.
76
77
### Configuration
78
79
-
79
#### `registry`
80
81
- Default: "https://registry.npmjs.org/"
@@ -84,7 +83,6 @@ Management of teams and team memberships is done with the `npm team` command.
83
84
The base URL of the npm registry.
85
87
-
86
#### `otp`
87
88
- Default: null
@@ -94,8 +92,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
92
93
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
94
97
-
98
-
95
### See Also
96
97
- [`libnpmaccess`](https://npm.im/libnpmaccess)
content/cli/v7/commands/npm-adduser.mdx
-4
@@ -45,7 +45,6 @@ You may use this command multiple times with the same user account to authorize
45
46
### Configuration
47
48
-
48
#### `registry`
49
50
- Default: "https://registry.npmjs.org/"
@@ -53,7 +52,6 @@ You may use this command multiple times with the same user account to authorize
52
53
The base URL of the npm registry.
54
56
-
55
#### `scope`
56
57
- Default: the scope of the current project, if any, or ""
@@ -81,8 +79,6 @@ This will also cause `npm init` to create a scoped package.
79
npm init --scope=@foo --yes
80
```
81
84
-
85
-
82
### See Also
83
84
- [npm registry](/cli/v7/using-npm/registry)
content/cli/v7/commands/npm-audit.mdx
-10
@@ -146,7 +146,6 @@ $ npm audit --audit-level=moderate
146
147
### Configuration
148
149
-
149
#### `audit-level`
150
151
- Default: null
@@ -154,7 +153,6 @@ $ npm audit --audit-level=moderate
153
154
The minimum level of vulnerability for `npm audit` to exit with a non-zero exit code.
155
157
-
156
#### `dry-run`
157
158
- Default: false
@@ -164,7 +162,6 @@ Indicates that you don't want npm to make any changes and that it should only re
162
163
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
164
167
-
165
#### `force`
166
167
- Default: false
@@ -185,7 +182,6 @@ Removes various protections against unfortunate side effects, common mistakes, u
182
183
If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!
184
188
-
185
#### `json`
186
187
- Default: false
@@ -197,7 +193,6 @@ Whether or not to output JSON data, rather than the normal output.
193
194
Not supported by all npm commands.
195
200
-
196
#### `package-lock-only`
197
198
- Default: false
@@ -209,7 +204,6 @@ For `update` this means only the `package-lock.json` will be updated, instead of
204
205
For `list` this means the output will be based on the tree described by the `package-lock.json`, rather than the contents of `node_modules`.
206
212
-
207
#### `omit`
208
209
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -223,7 +217,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
217
218
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
219
226
-
220
#### `workspace`
221
222
- Default:
@@ -241,7 +234,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
234
235
This value is not exported to the environment for child processes.
236
244
-
237
#### `workspaces`
238
239
- Default: false
@@ -251,8 +243,6 @@ Enable running a command in the context of **all** the configured workspaces.
243
244
This value is not exported to the environment for child processes.
245
254
-
255
-
246
### See Also
247
248
- [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-bin.mdx
-3
@@ -33,7 +33,6 @@ Print the folder where npm will install executables.
33
34
### Configuration
35
36
-
36
#### `global`
37
38
- Default: false
@@ -45,8 +44,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
44
- bin files are linked to `{prefix}/bin`
45
- man pages are linked to `{prefix}/share/man`
46
48
-
49
-
47
### See Also
48
49
- [npm prefix](/cli/v7/commands/npm-prefix)
content/cli/v7/commands/npm-bugs.mdx
-4
@@ -33,7 +33,6 @@ This command tries to guess at the likely location of a package's bug tracker UR
33
34
### Configuration
35
36
-
36
#### `browser`
37
38
- Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
@@ -45,7 +44,6 @@ Set to `false` to suppress browser behavior and instead print urls to terminal.
44
45
Set to `true` to use default system URL opener.
46
48
-
47
#### `registry`
48
49
- Default: "https://registry.npmjs.org/"
@@ -53,8 +51,6 @@ Set to `true` to use default system URL opener.
51
52
The base URL of the npm registry.
53
56
-
57
-
54
### See Also
55
56
- [npm docs](/cli/v7/commands/npm-docs)
content/cli/v7/commands/npm-cache.mdx
-3
@@ -63,7 +63,6 @@ To run an offline verification of existing cache contents, use `npm cache verify
63
64
### Configuration
65
66
-
66
#### `cache`
67
68
- Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm`
@@ -71,8 +70,6 @@ To run an offline verification of existing cache contents, use `npm cache verify
70
71
The location of npm's cache directory. See [`npm cache`](/cli/v7/commands/npm-cache)
72
74
-
75
-
73
### See Also
74
75
- [npm folders](/cli/v7/configuring-npm/folders)
content/cli/v7/commands/npm-ci.mdx
-5
@@ -74,7 +74,6 @@ cache:
74
75
### Configuration
76
77
-
77
#### `audit`
78
79
- Default: true
@@ -82,7 +81,6 @@ cache:
81
82
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
83
85
-
84
#### `ignore-scripts`
85
86
- Default: false
@@ -92,7 +90,6 @@ If true, npm does not run scripts specified in package.json files.
90
91
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
92
95
-
93
#### `script-shell`
94
95
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -100,8 +97,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
97
98
The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
99
103
-
104
-
100
### See Also
101
102
- [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-config.mdx
-7
@@ -101,7 +101,6 @@ Opens the config file in an editor. Use the `--global` flag to edit the global c
101
102
### Configuration
103
104
-
104
#### `json`
105
106
- Default: false
@@ -113,7 +112,6 @@ Whether or not to output JSON data, rather than the normal output.
112
113
Not supported by all npm commands.
114
116
-
115
#### `global`
116
117
- Default: false
@@ -125,7 +123,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
123
- bin files are linked to `{prefix}/bin`
124
- man pages are linked to `{prefix}/share/man`
125
128
-
126
#### `editor`
127
128
- Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on Windows, or 'vim' on Unix systems
@@ -133,7 +130,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
130
131
The command to run for `npm edit` and `npm config edit`.
132
136
-
133
#### `location`
134
135
- Default: "user" unless `--global` is passed, which will also set this value to "global"
@@ -141,7 +137,6 @@ The command to run for `npm edit` and `npm config edit`.
137
138
When passed to `npm config` this refers to which config file to use.
139
144
-
140
#### `long`
141
142
- Default: false
@@ -149,8 +144,6 @@ When passed to `npm config` this refers to which config file to use.
144
145
Show extended information in `ls`, `search`, and `help-search`.
146
152
-
153
-
147
### See Also
148
149
- [npm folders](/cli/v7/configuring-npm/folders)
content/cli/v7/commands/npm-dedupe.mdx
-14
@@ -77,7 +77,6 @@ Using `npm find-dupes` will run the command in `--dry-run` mode.
77
78
### Configuration
79
80
-
80
#### `global-style`
81
82
- Default: false
@@ -85,7 +84,6 @@ Using `npm find-dupes` will run the command in `--dry-run` mode.
84
85
Causes npm to install the package into your local `node_modules` folder with the same layout it uses with the global `node_modules` folder. Only your direct dependencies will show in `node_modules` and everything they depend on will be flattened in their `node_modules` folders. This obviously will eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be preferred.
86
88
-
87
#### `legacy-bundling`
88
89
- Default: false
@@ -93,7 +91,6 @@ Causes npm to install the package into your local `node_modules` folder with the
91
92
Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping. If used with `global-style` this option will be preferred.
93
96
-
94
#### `strict-peer-deps`
95
96
- Default: false
@@ -105,7 +102,6 @@ By default, conflicting `peerDependencies` deep in the dependency graph will be
102
103
When such and override is performed, a warning is printed, explaining the conflict and the packages involved. If `--strict-peer-deps` is set, then this warning is treated as a failure.
104
108
-
105
#### `package-lock`
106
107
- Default: true
@@ -115,7 +111,6 @@ If set to false, then ignore `package-lock.json` files when installing. This wil
111
112
When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use `npm prune`.
113
118
-
114
#### `omit`
115
116
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -129,7 +124,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
124
125
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
126
132
-
127
#### `ignore-scripts`
128
129
- Default: false
@@ -139,7 +133,6 @@ If true, npm does not run scripts specified in package.json files.
133
134
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
135
142
-
136
#### `audit`
137
138
- Default: true
@@ -147,7 +140,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
140
141
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
142
150
-
143
#### `bin-links`
144
145
- Default: true
@@ -157,7 +149,6 @@ Tells npm to create symlinks (or `.cmd` shims on Windows) for package executable
149
150
Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
151
160
-
152
#### `fund`
153
154
- Default: true
@@ -165,7 +156,6 @@ Set to false to have it not do this. This can be used to work around the fact th
156
157
When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details.
158
168
-
159
#### `dry-run`
160
161
- Default: false
@@ -175,7 +165,6 @@ Indicates that you don't want npm to make any changes and that it should only re
165
166
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
167
178
-
168
#### `workspace`
169
170
- Default:
@@ -193,7 +182,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
182
183
This value is not exported to the environment for child processes.
184
196
-
185
#### `workspaces`
186
187
- Default: false
@@ -203,8 +191,6 @@ Enable running a command in the context of **all** the configured workspaces.
191
192
This value is not exported to the environment for child processes.
193
206
-
207
-
194
### See Also
195
196
- [npm find-dupes](/cli/v7/commands/npm-find-dupes)
content/cli/v7/commands/npm-deprecate.mdx
-4
@@ -51,7 +51,6 @@ To un-deprecate a package, specify an empty string (`""`) for the `message` argu
51
52
### Configuration
53
54
-
54
#### `registry`
55
56
- Default: "https://registry.npmjs.org/"
@@ -59,7 +58,6 @@ To un-deprecate a package, specify an empty string (`""`) for the `message` argu
58
59
The base URL of the npm registry.
60
62
-
61
#### `otp`
62
63
- Default: null
@@ -69,8 +67,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
67
68
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
69
72
-
73
-
70
### See Also
71
72
- [npm publish](/cli/v7/commands/npm-publish)
content/cli/v7/commands/npm-diff.mdx
-14
@@ -128,7 +128,6 @@ In the example above the diff output is only going to print contents of files lo
128
129
### Configuration
130
131
-
131
#### `diff`
132
133
- Default:
@@ -136,7 +135,6 @@ In the example above the diff output is only going to print contents of files lo
135
136
Define arguments to compare in `npm diff`.
137
139
-
138
#### `diff-name-only`
139
140
- Default: false
@@ -144,7 +142,6 @@ Define arguments to compare in `npm diff`.
142
143
Prints only filenames when using `npm diff`.
144
147
-
145
#### `diff-unified`
146
147
- Default: 3
@@ -152,7 +149,6 @@ Prints only filenames when using `npm diff`.
149
150
The number of lines of context to print in `npm diff`.
151
155
-
152
#### `diff-ignore-all-space`
153
154
- Default: false
@@ -160,7 +156,6 @@ The number of lines of context to print in `npm diff`.
156
157
Ignore whitespace when comparing lines in `npm diff`.
158
163
-
159
#### `diff-no-prefix`
160
161
- Default: false
@@ -170,7 +165,6 @@ Do not show any source or destination prefix in `npm diff` output.
165
166
Note: this causes `npm diff` to ignore the `--diff-src-prefix` and `--diff-dst-prefix` configs.
167
173
-
168
#### `diff-src-prefix`
169
170
- Default: "a/"
@@ -178,7 +172,6 @@ Note: this causes `npm diff` to ignore the `--diff-src-prefix` and `--diff-dst-p
172
173
Source prefix to be used in `npm diff` output.
174
181
-
175
#### `diff-dst-prefix`
176
177
- Default: "b/"
@@ -186,7 +179,6 @@ Source prefix to be used in `npm diff` output.
179
180
Destination prefix to be used in `npm diff` output.
181
189
-
182
#### `diff-text`
183
184
- Default: false
@@ -194,7 +186,6 @@ Destination prefix to be used in `npm diff` output.
186
187
Treat all files as text in `npm diff`.
188
197
-
189
#### `global`
190
191
- Default: false
@@ -206,7 +197,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
197
- bin files are linked to `{prefix}/bin`
198
- man pages are linked to `{prefix}/share/man`
199
209
-
200
#### `tag`
201
202
- Default: "latest"
@@ -218,7 +208,6 @@ Also the tag that is added to the package@version specified by the `npm tag` com
208
209
When used by the `npm diff` command, this is the tag used to fetch the tarball that will be compared with the local files by default.
210
221
-
211
#### `workspace`
212
213
- Default:
@@ -236,7 +225,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
225
226
This value is not exported to the environment for child processes.
227
239
-
228
#### `workspaces`
229
230
- Default: false
@@ -246,8 +234,6 @@ Enable running a command in the context of **all** the configured workspaces.
234
235
This value is not exported to the environment for child processes.
236
249
-
250
-
237
## See Also
238
239
- [npm outdated](/cli/v7/commands/npm-outdated)
content/cli/v7/commands/npm-dist-tag.mdx
-4
@@ -81,7 +81,6 @@ The simplest way to avoid semver problems with tags is to use tags that do not b
81
82
### Configuration
83
84
-
84
#### `workspace`
85
86
- Default:
@@ -99,7 +98,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
98
99
This value is not exported to the environment for child processes.
100
102
-
101
#### `workspaces`
102
103
- Default: false
@@ -109,8 +107,6 @@ Enable running a command in the context of **all** the configured workspaces.
107
108
This value is not exported to the environment for child processes.
109
112
-
113
-
110
### See Also
111
112
- [npm publish](/cli/v7/commands/npm-publish)
content/cli/v7/commands/npm-docs.mdx
-6
@@ -33,7 +33,6 @@ This command tries to guess at the likely location of a package's documentation
33
34
### Configuration
35
36
-
36
#### `browser`
37
38
- Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
@@ -45,7 +44,6 @@ Set to `false` to suppress browser behavior and instead print urls to terminal.
44
45
Set to `true` to use default system URL opener.
46
48
-
47
#### `registry`
48
49
- Default: "https://registry.npmjs.org/"
@@ -53,7 +51,6 @@ Set to `true` to use default system URL opener.
51
52
The base URL of the npm registry.
53
56
-
54
#### `workspace`
55
56
- Default:
@@ -71,7 +68,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
68
69
This value is not exported to the environment for child processes.
70
74
-
71
#### `workspaces`
72
73
- Default: false
@@ -81,8 +77,6 @@ Enable running a command in the context of **all** the configured workspaces.
77
78
This value is not exported to the environment for child processes.
79
84
-
85
-
80
### See Also
81
82
- [npm view](/cli/v7/commands/npm-view)
content/cli/v7/commands/npm-doctor.mdx
-3
@@ -76,7 +76,6 @@ When an npm package is published, the publishing process generates a checksum th
76
77
### Configuration
78
79
-
79
#### `registry`
80
81
- Default: "https://registry.npmjs.org/"
@@ -84,8 +83,6 @@ When an npm package is published, the publishing process generates a checksum th
83
84
The base URL of the npm registry.
85
87
-
88
-
86
### See Also
87
88
- [npm bugs](/cli/v7/commands/npm-bugs)
content/cli/v7/commands/npm-edit.mdx
-3
@@ -37,7 +37,6 @@ For instance, you can do `npm install connect` to install connect into your pack
37
38
### Configuration
39
40
-
40
#### `editor`
41
42
- Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on Windows, or 'vim' on Unix systems
@@ -45,8 +44,6 @@ For instance, you can do `npm install connect` to install connect into your pack
44
45
The command to run for `npm edit` and `npm config edit`.
46
48
-
49
-
47
### See Also
48
49
- [npm folders](/cli/v7/configuring-npm/folders)
content/cli/v7/commands/npm-exec.mdx
-6
@@ -100,7 +100,6 @@ $ npm exec -- foo@latest bar --package=@npmcli/foo
100
101
### Configuration
102
103
-
103
#### `package`
104
105
- Default:
@@ -108,7 +107,6 @@ $ npm exec -- foo@latest bar --package=@npmcli/foo
107
108
The package to install for [`npm exec`](/cli/v7/commands/npm-exec)
109
111
-
110
#### `call`
111
112
- Default: ""
@@ -120,7 +118,6 @@ Optional companion option for `npm exec`, `npx` that allows for specifying a cus
118
npm exec --package yo --package generator-node --call "yo node"
119
```
120
123
-
121
#### `workspace`
122
123
- Default:
@@ -138,7 +135,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
135
136
This value is not exported to the environment for child processes.
137
141
-
138
#### `workspaces`
139
140
- Default: false
@@ -148,8 +144,6 @@ Enable running a command in the context of **all** the configured workspaces.
144
145
This value is not exported to the environment for child processes.
146
151
-
152
-
147
### Examples
148
149
Run the version of `tap` in the local dependencies, with the provided arguments:
content/cli/v7/commands/npm-explain.mdx
-4
@@ -64,7 +64,6 @@ node_modules/nyc/node_modules/find-up
64
65
### Configuration
66
67
-
67
#### `json`
68
69
- Default: false
@@ -76,7 +75,6 @@ Whether or not to output JSON data, rather than the normal output.
75
76
Not supported by all npm commands.
77
79
-
78
#### `workspace`
79
80
- Default:
@@ -94,8 +92,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
92
93
This value is not exported to the environment for child processes.
94
97
-
98
-
95
### See Also
96
97
- [npm config](/cli/v7/commands/npm-config)
content/cli/v7/commands/npm-explore.mdx
-3
@@ -43,7 +43,6 @@ Note that the package is _not_ automatically rebuilt afterwards, so be sure to u
43
44
### Configuration
45
46
-
46
#### `shell`
47
48
- Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows
@@ -51,8 +50,6 @@ Note that the package is _not_ automatically rebuilt afterwards, so be sure to u
50
51
The shell to run for the `npm explore` command.
52
54
-
55
-
53
### See Also
54
55
- [npm folders](/cli/v7/configuring-npm/folders)
content/cli/v7/commands/npm-find-dupes.mdx
-13
@@ -31,7 +31,6 @@ Runs `npm dedupe` in `--dry-run` mode, making npm only output the duplications,
31
32
### Configuration
33
34
-
34
#### `global-style`
35
36
- Default: false
@@ -39,7 +38,6 @@ Runs `npm dedupe` in `--dry-run` mode, making npm only output the duplications,
38
39
Causes npm to install the package into your local `node_modules` folder with the same layout it uses with the global `node_modules` folder. Only your direct dependencies will show in `node_modules` and everything they depend on will be flattened in their `node_modules` folders. This obviously will eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be preferred.
40
42
-
41
#### `legacy-bundling`
42
43
- Default: false
@@ -47,7 +45,6 @@ Causes npm to install the package into your local `node_modules` folder with the
45
46
Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping. If used with `global-style` this option will be preferred.
47
50
-
48
#### `strict-peer-deps`
49
50
- Default: false
@@ -59,7 +56,6 @@ By default, conflicting `peerDependencies` deep in the dependency graph will be
56
57
When such and override is performed, a warning is printed, explaining the conflict and the packages involved. If `--strict-peer-deps` is set, then this warning is treated as a failure.
58
62
-
59
#### `package-lock`
60
61
- Default: true
@@ -69,7 +65,6 @@ If set to false, then ignore `package-lock.json` files when installing. This wil
65
66
When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use `npm prune`.
67
72
-
68
#### `omit`
69
70
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -83,7 +78,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
78
79
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
80
86
-
81
#### `ignore-scripts`
82
83
- Default: false
@@ -93,7 +87,6 @@ If true, npm does not run scripts specified in package.json files.
87
88
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
89
96
-
90
#### `audit`
91
92
- Default: true
@@ -101,7 +94,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
94
95
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
96
104
-
97
#### `bin-links`
98
99
- Default: true
@@ -111,7 +103,6 @@ Tells npm to create symlinks (or `.cmd` shims on Windows) for package executable
103
104
Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
105
114
-
106
#### `fund`
107
108
- Default: true
@@ -119,7 +110,6 @@ Set to false to have it not do this. This can be used to work around the fact th
110
111
When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details.
112
122
-
113
#### `workspace`
114
115
- Default:
@@ -137,7 +127,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
127
128
This value is not exported to the environment for child processes.
129
140
-
130
#### `workspaces`
131
132
- Default: false
@@ -147,8 +136,6 @@ Enable running a command in the context of **all** the configured workspaces.
136
137
This value is not exported to the environment for child processes.
138
150
-
151
-
139
### See Also
140
141
- [npm dedupe](/cli/v7/commands/npm-dedupe)
content/cli/v7/commands/npm-fund.mdx
-7
@@ -68,7 +68,6 @@ test-workspaces-fund@1.0.0
68
69
### Configuration
70
71
-
71
#### `json`
72
73
- Default: false
@@ -80,7 +79,6 @@ Whether or not to output JSON data, rather than the normal output.
79
80
Not supported by all npm commands.
81
83
-
82
#### `browser`
83
84
- Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
@@ -92,7 +90,6 @@ Set to `false` to suppress browser behavior and instead print urls to terminal.
90
91
Set to `true` to use default system URL opener.
92
95
-
93
#### `unicode`
94
95
- Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
@@ -100,7 +97,6 @@ Set to `true` to use default system URL opener.
97
98
When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs.
99
103
-
100
#### `workspace`
101
102
- Default:
@@ -118,7 +114,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
114
115
This value is not exported to the environment for child processes.
116
121
-
117
#### `which`
118
119
- Default: null
@@ -126,8 +121,6 @@ This value is not exported to the environment for child processes.
121
122
If there are multiple funding sources, which 1-indexed source URL to open.
123
129
-
130
-
124
## See Also
125
126
- [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-help-search.mdx
-3
@@ -37,7 +37,6 @@ If the argument to `npm help` is not a known help topic, then it will call `help
37
38
### Configuration
39
40
-
40
#### `long`
41
42
- Default: false
@@ -45,8 +44,6 @@ If the argument to `npm help` is not a known help topic, then it will call `help
44
45
Show extended information in `ls`, `search`, and `help-search`.
46
48
-
49
-
47
### See Also
48
49
- [npm](/cli/v7/commands/npm)
content/cli/v7/commands/npm-help.mdx
-3
@@ -35,7 +35,6 @@ If the topic does not exist, or if multiple terms are provided, then npm will ru
35
36
### Configuration
37
38
-
38
#### `viewer`
39
40
- Default: "man" on Posix, "browser" on Windows
@@ -45,8 +44,6 @@ The program to use to view help content.
44
45
Set to `"browser"` to view html help content in the default web browser.
46
48
-
49
-
47
### See Also
48
49
- [npm](/cli/v7/commands/npm)
content/cli/v7/commands/npm-hook.mdx
-4
@@ -92,7 +92,6 @@ $ npm hook rm id-deadbeef
92
93
### Configuration
94
95
-
95
#### `registry`
96
97
- Default: "https://registry.npmjs.org/"
@@ -100,7 +99,6 @@ $ npm hook rm id-deadbeef
99
100
The base URL of the npm registry.
101
103
-
102
#### `otp`
103
104
- Default: null
@@ -110,8 +108,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
108
109
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
110
113
-
114
-
111
### See Also
112
113
- ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)
content/cli/v7/commands/npm-init.mdx
-6
@@ -129,7 +129,6 @@ This will make sure to generate your react app as expected, one important consid
129
130
### Configuration
131
132
-
132
#### `yes`
133
134
- Default: null
@@ -137,7 +136,6 @@ This will make sure to generate your react app as expected, one important consid
136
137
Automatically answer "yes" to any prompts that npm might print on the command line.
138
140
-
139
#### `force`
140
141
- Default: false
@@ -158,7 +156,6 @@ Removes various protections against unfortunate side effects, common mistakes, u
156
157
If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!
158
161
-
159
#### `workspace`
160
161
- Default:
@@ -176,7 +173,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
173
174
This value is not exported to the environment for child processes.
175
179
-
176
#### `workspaces`
177
178
- Default: false
@@ -186,8 +182,6 @@ Enable running a command in the context of **all** the configured workspaces.
182
183
This value is not exported to the environment for child processes.
184
189
-
190
-
185
### See Also
186
187
- [init-package-json module](http://npm.im/init-package-json)
content/cli/v7/commands/npm-install-ci-test.mdx
-5
@@ -33,7 +33,6 @@ This command runs `npm ci` followed immediately by `npm test`.
33
34
### Configuration
35
36
-
36
#### `audit`
37
38
- Default: true
@@ -41,7 +40,6 @@ This command runs `npm ci` followed immediately by `npm test`.
40
41
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
42
44
-
43
#### `ignore-scripts`
44
45
- Default: false
@@ -51,7 +49,6 @@ If true, npm does not run scripts specified in package.json files.
49
50
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
51
54
-
52
#### `script-shell`
53
54
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -59,8 +56,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
56
57
The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
58
62
-
63
-
59
### See Also
60
61
- [npm install-test](/cli/v7/commands/npm-install-test)
content/cli/v7/commands/npm-install-test.mdx
-17
@@ -41,7 +41,6 @@ This command runs an `npm install` followed immediately by an `npm test`. It tak
41
42
### Configuration
43
44
-
44
#### `save`
45
46
- Default: true
@@ -51,7 +50,6 @@ Save installed packages to a package.json file as dependencies.
50
51
When used with the `npm rm` command, removes the dependency from package.json.
52
54
-
53
#### `save-exact`
54
55
- Default: false
@@ -59,7 +57,6 @@ When used with the `npm rm` command, removes the dependency from package.json.
57
58
Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator.
59
62
-
60
#### `global`
61
62
- Default: false
@@ -71,7 +68,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
68
- bin files are linked to `{prefix}/bin`
69
- man pages are linked to `{prefix}/share/man`
70
74
-
71
#### `global-style`
72
73
- Default: false
@@ -79,7 +75,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
75
76
Causes npm to install the package into your local `node_modules` folder with the same layout it uses with the global `node_modules` folder. Only your direct dependencies will show in `node_modules` and everything they depend on will be flattened in their `node_modules` folders. This obviously will eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be preferred.
77
82
-
78
#### `legacy-bundling`
79
80
- Default: false
@@ -87,7 +82,6 @@ Causes npm to install the package into your local `node_modules` folder with the
82
83
Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping. If used with `global-style` this option will be preferred.
84
90
-
85
#### `strict-peer-deps`
86
87
- Default: false
@@ -99,7 +93,6 @@ By default, conflicting `peerDependencies` deep in the dependency graph will be
93
94
When such and override is performed, a warning is printed, explaining the conflict and the packages involved. If `--strict-peer-deps` is set, then this warning is treated as a failure.
95
102
-
96
#### `package-lock`
97
98
- Default: true
@@ -109,7 +102,6 @@ If set to false, then ignore `package-lock.json` files when installing. This wil
102
103
When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use `npm prune`.
104
112
-
105
#### `omit`
106
107
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -123,7 +115,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
115
116
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
117
126
-
118
#### `ignore-scripts`
119
120
- Default: false
@@ -133,7 +124,6 @@ If true, npm does not run scripts specified in package.json files.
124
125
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
126
136
-
127
#### `audit`
128
129
- Default: true
@@ -141,7 +131,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
131
132
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
133
144
-
134
#### `bin-links`
135
136
- Default: true
@@ -151,7 +140,6 @@ Tells npm to create symlinks (or `.cmd` shims on Windows) for package executable
140
141
Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
142
154
-
143
#### `fund`
144
145
- Default: true
@@ -159,7 +147,6 @@ Set to false to have it not do this. This can be used to work around the fact th
147
148
When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details.
149
162
-
150
#### `dry-run`
151
152
- Default: false
@@ -169,7 +156,6 @@ Indicates that you don't want npm to make any changes and that it should only re
156
157
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
158
172
-
159
#### `workspace`
160
161
- Default:
@@ -187,7 +173,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
173
174
This value is not exported to the environment for child processes.
175
190
-
176
#### `workspaces`
177
178
- Default: false
@@ -197,8 +182,6 @@ Enable running a command in the context of **all** the configured workspaces.
182
183
This value is not exported to the environment for child processes.
184
200
-
201
-
185
### See Also
186
187
- [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-install.mdx
-17
@@ -318,7 +318,6 @@ See the [`config`](/cli/v7/using-npm/config) help doc. Many of the configuration
318
319
These are some of the most common options related to installation.
320
321
-
321
#### `save`
322
323
- Default: true
@@ -328,7 +327,6 @@ Save installed packages to a package.json file as dependencies.
327
328
When used with the `npm rm` command, removes the dependency from package.json.
329
331
-
330
#### `save-exact`
331
332
- Default: false
@@ -336,7 +334,6 @@ When used with the `npm rm` command, removes the dependency from package.json.
334
335
Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator.
336
339
-
337
#### `global`
338
339
- Default: false
@@ -348,7 +345,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
345
- bin files are linked to `{prefix}/bin`
346
- man pages are linked to `{prefix}/share/man`
347
351
-
348
#### `global-style`
349
350
- Default: false
@@ -356,7 +352,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
352
353
Causes npm to install the package into your local `node_modules` folder with the same layout it uses with the global `node_modules` folder. Only your direct dependencies will show in `node_modules` and everything they depend on will be flattened in their `node_modules` folders. This obviously will eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be preferred.
354
359
-
355
#### `legacy-bundling`
356
357
- Default: false
@@ -364,7 +359,6 @@ Causes npm to install the package into your local `node_modules` folder with the
359
360
Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping. If used with `global-style` this option will be preferred.
361
367
-
362
#### `strict-peer-deps`
363
364
- Default: false
@@ -376,7 +370,6 @@ By default, conflicting `peerDependencies` deep in the dependency graph will be
370
371
When such and override is performed, a warning is printed, explaining the conflict and the packages involved. If `--strict-peer-deps` is set, then this warning is treated as a failure.
372
379
-
373
#### `package-lock`
374
375
- Default: true
@@ -386,7 +379,6 @@ If set to false, then ignore `package-lock.json` files when installing. This wil
379
380
When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use `npm prune`.
381
389
-
382
#### `omit`
383
384
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -400,7 +392,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
392
393
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
394
403
-
395
#### `ignore-scripts`
396
397
- Default: false
@@ -410,7 +401,6 @@ If true, npm does not run scripts specified in package.json files.
401
402
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
403
413
-
404
#### `audit`
405
406
- Default: true
@@ -418,7 +408,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
408
409
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
410
421
-
411
#### `bin-links`
412
413
- Default: true
@@ -428,7 +417,6 @@ Tells npm to create symlinks (or `.cmd` shims on Windows) for package executable
417
418
Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
419
431
-
420
#### `fund`
421
422
- Default: true
@@ -436,7 +424,6 @@ Set to false to have it not do this. This can be used to work around the fact th
424
425
When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details.
426
439
-
427
#### `dry-run`
428
429
- Default: false
@@ -446,7 +433,6 @@ Indicates that you don't want npm to make any changes and that it should only re
433
434
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
435
449
-
436
#### `workspace`
437
438
- Default:
@@ -464,7 +450,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
450
451
This value is not exported to the environment for child processes.
452
467
-
453
#### `workspaces`
454
455
- Default: false
@@ -474,8 +459,6 @@ Enable running a command in the context of **all** the configured workspaces.
459
460
This value is not exported to the environment for child processes.
461
477
-
478
-
462
### Algorithm
463
464
Given a `package{dep}` structure: `A{B,C}, B{C}, C{D}`, the npm install algorithm produces:
content/cli/v7/commands/npm-link.mdx
-17
@@ -95,7 +95,6 @@ If you _want_ to save the `file:` reference in your `package.json` and `package-
95
96
### Configuration
97
98
-
98
#### `save`
99
100
- Default: true
@@ -105,7 +104,6 @@ Save installed packages to a package.json file as dependencies.
104
105
When used with the `npm rm` command, removes the dependency from package.json.
106
108
-
107
#### `save-exact`
108
109
- Default: false
@@ -113,7 +111,6 @@ When used with the `npm rm` command, removes the dependency from package.json.
111
112
Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator.
113
116
-
114
#### `global`
115
116
- Default: false
@@ -125,7 +122,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
122
- bin files are linked to `{prefix}/bin`
123
- man pages are linked to `{prefix}/share/man`
124
128
-
125
#### `global-style`
126
127
- Default: false
@@ -133,7 +129,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
129
130
Causes npm to install the package into your local `node_modules` folder with the same layout it uses with the global `node_modules` folder. Only your direct dependencies will show in `node_modules` and everything they depend on will be flattened in their `node_modules` folders. This obviously will eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be preferred.
131
136
-
132
#### `legacy-bundling`
133
134
- Default: false
@@ -141,7 +136,6 @@ Causes npm to install the package into your local `node_modules` folder with the
136
137
Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping. If used with `global-style` this option will be preferred.
138
144
-
139
#### `strict-peer-deps`
140
141
- Default: false
@@ -153,7 +147,6 @@ By default, conflicting `peerDependencies` deep in the dependency graph will be
147
148
When such and override is performed, a warning is printed, explaining the conflict and the packages involved. If `--strict-peer-deps` is set, then this warning is treated as a failure.
149
156
-
150
#### `package-lock`
151
152
- Default: true
@@ -163,7 +156,6 @@ If set to false, then ignore `package-lock.json` files when installing. This wil
156
157
When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use `npm prune`.
158
166
-
159
#### `omit`
160
161
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -177,7 +169,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
169
170
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
171
180
-
172
#### `ignore-scripts`
173
174
- Default: false
@@ -187,7 +178,6 @@ If true, npm does not run scripts specified in package.json files.
178
179
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
180
190
-
181
#### `audit`
182
183
- Default: true
@@ -195,7 +185,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
185
186
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
187
198
-
188
#### `bin-links`
189
190
- Default: true
@@ -205,7 +194,6 @@ Tells npm to create symlinks (or `.cmd` shims on Windows) for package executable
194
195
Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
196
208
-
197
#### `fund`
198
199
- Default: true
@@ -213,7 +201,6 @@ Set to false to have it not do this. This can be used to work around the fact th
201
202
When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details.
203
216
-
204
#### `dry-run`
205
206
- Default: false
@@ -223,7 +210,6 @@ Indicates that you don't want npm to make any changes and that it should only re
210
211
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
212
226
-
213
#### `workspace`
214
215
- Default:
@@ -241,7 +227,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
227
228
This value is not exported to the environment for child processes.
229
244
-
230
#### `workspaces`
231
232
- Default: false
@@ -251,8 +236,6 @@ Enable running a command in the context of **all** the configured workspaces.
236
237
This value is not exported to the environment for child processes.
238
254
-
255
-
239
### See Also
240
241
- [npm developers](/cli/v7/using-npm/developers)
content/cli/v7/commands/npm-logout.mdx
-4
@@ -37,7 +37,6 @@ If `--scope` is provided, this will find the credentials for the registry connec
37
38
### Configuration
39
40
-
40
#### `registry`
41
42
- Default: "https://registry.npmjs.org/"
@@ -45,7 +44,6 @@ If `--scope` is provided, this will find the credentials for the registry connec
44
45
The base URL of the npm registry.
46
48
-
47
#### `scope`
48
49
- Default: the scope of the current project, if any, or ""
@@ -73,8 +71,6 @@ This will also cause `npm init` to create a scoped package.
71
npm init --scope=@foo --yes
72
```
73
76
-
77
-
74
### See Also
75
76
- [npm adduser](/cli/v7/commands/npm-adduser)
content/cli/v7/commands/npm-ls.mdx
-14
@@ -63,7 +63,6 @@ A thorough re-examination of the use cases, intention, behavior, and output of t
63
64
### Configuration
65
66
-
66
#### `all`
67
68
- Default: false
@@ -71,7 +70,6 @@ A thorough re-examination of the use cases, intention, behavior, and output of t
70
71
When running `npm outdated` and `npm ls`, setting `--all` will show all outdated or installed packages, rather than only those directly depended upon by the current project.
72
74
-
73
#### `json`
74
75
- Default: false
@@ -83,7 +81,6 @@ Whether or not to output JSON data, rather than the normal output.
81
82
Not supported by all npm commands.
83
86
-
84
#### `long`
85
86
- Default: false
@@ -91,7 +88,6 @@ Not supported by all npm commands.
88
89
Show extended information in `ls`, `search`, and `help-search`.
90
94
-
91
#### `parseable`
92
93
- Default: false
@@ -99,7 +95,6 @@ Show extended information in `ls`, `search`, and `help-search`.
95
96
Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
97
102
-
98
#### `global`
99
100
- Default: false
@@ -111,7 +106,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
106
- bin files are linked to `{prefix}/bin`
107
- man pages are linked to `{prefix}/share/man`
108
114
-
109
#### `depth`
110
111
- Default: `Infinity` if `--all` is set, otherwise `1`
@@ -121,7 +115,6 @@ The depth to go when recursing packages for `npm ls`.
115
116
If not set, `npm ls` will show only the immediate dependencies of the root project. If `--all` is set, then npm will show all dependencies by default.
117
124
-
118
#### `omit`
119
120
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -135,7 +128,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
128
129
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
130
138
-
131
#### `link`
132
133
- Default: false
@@ -143,7 +135,6 @@ If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment var
135
136
Used with `npm ls`, limiting output to only those packages that are linked.
137
146
-
138
#### `package-lock-only`
139
140
- Default: false
@@ -155,7 +146,6 @@ For `update` this means only the `package-lock.json` will be updated, instead of
146
147
For `list` this means the output will be based on the tree described by the `package-lock.json`, rather than the contents of `node_modules`.
148
158
-
149
#### `unicode`
150
151
- Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
@@ -163,7 +153,6 @@ For `list` this means the output will be based on the tree described by the `pac
153
154
When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs.
155
166
-
156
#### `workspace`
157
158
- Default:
@@ -181,7 +170,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
170
171
This value is not exported to the environment for child processes.
172
184
-
173
#### `workspaces`
174
175
- Default: false
@@ -191,8 +179,6 @@ Enable running a command in the context of **all** the configured workspaces.
179
180
This value is not exported to the environment for child processes.
181
194
-
195
-
182
### See Also
183
184
- [npm explain](/cli/v7/commands/npm-explain)
content/cli/v7/commands/npm-org.mdx
-6
@@ -73,7 +73,6 @@ You can use the `npm org` commands to manage and view users of an organization.
73
74
### Configuration
75
76
-
76
#### `registry`
77
78
- Default: "https://registry.npmjs.org/"
@@ -81,7 +80,6 @@ You can use the `npm org` commands to manage and view users of an organization.
80
81
The base URL of the npm registry.
82
84
-
83
#### `otp`
84
85
- Default: null
@@ -91,7 +89,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
89
90
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
91
94
-
92
#### `json`
93
94
- Default: false
@@ -103,7 +100,6 @@ Whether or not to output JSON data, rather than the normal output.
100
101
Not supported by all npm commands.
102
106
-
103
#### `parseable`
104
105
- Default: false
@@ -111,8 +107,6 @@ Not supported by all npm commands.
107
108
Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
109
114
-
115
-
110
### See Also
111
112
- [using orgs](/cli/v7/using-npm/orgs)
content/cli/v7/commands/npm-outdated.mdx
-8
@@ -74,7 +74,6 @@ A few things to note:
74
75
### Configuration
76
77
-
77
#### `all`
78
79
- Default: false
@@ -82,7 +81,6 @@ A few things to note:
81
82
When running `npm outdated` and `npm ls`, setting `--all` will show all outdated or installed packages, rather than only those directly depended upon by the current project.
83
85
-
84
#### `json`
85
86
- Default: false
@@ -94,7 +92,6 @@ Whether or not to output JSON data, rather than the normal output.
92
93
Not supported by all npm commands.
94
97
-
95
#### `long`
96
97
- Default: false
@@ -102,7 +99,6 @@ Not supported by all npm commands.
99
100
Show extended information in `ls`, `search`, and `help-search`.
101
105
-
102
#### `parseable`
103
104
- Default: false
@@ -110,7 +106,6 @@ Show extended information in `ls`, `search`, and `help-search`.
106
107
Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
108
113
-
109
#### `global`
110
111
- Default: false
@@ -122,7 +117,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
117
- bin files are linked to `{prefix}/bin`
118
- man pages are linked to `{prefix}/share/man`
119
125
-
120
#### `workspace`
121
122
- Default:
@@ -140,8 +134,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
134
135
This value is not exported to the environment for child processes.
136
143
-
144
-
137
### See Also
138
139
- [npm update](/cli/v7/commands/npm-update)
content/cli/v7/commands/npm-owner.mdx
-4
@@ -45,7 +45,6 @@ If you have two-factor authentication enabled with `auth-and-writes` (see [`npm-
45
46
### Configuration
47
48
-
48
#### `registry`
49
50
- Default: "https://registry.npmjs.org/"
@@ -53,7 +52,6 @@ If you have two-factor authentication enabled with `auth-and-writes` (see [`npm-
52
53
The base URL of the npm registry.
54
56
-
55
#### `otp`
56
57
- Default: null
@@ -63,8 +61,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
61
62
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
63
66
-
67
-
64
### See Also
65
66
- [npm profile](/cli/v7/commands/npm-profile)
content/cli/v7/commands/npm-pack.mdx
-7
@@ -27,7 +27,6 @@ npm pack [[<@scope>/]<pkg>...] [--dry-run] [--json]
27
28
### Configuration
29
30
-
30
#### `dry-run`
31
32
- Default: false
@@ -37,7 +36,6 @@ Indicates that you don't want npm to make any changes and that it should only re
36
37
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
38
40
-
39
#### `json`
40
41
- Default: false
@@ -49,7 +47,6 @@ Whether or not to output JSON data, rather than the normal output.
47
48
Not supported by all npm commands.
49
52
-
50
#### `pack-destination`
51
52
- Default: "."
@@ -57,7 +54,6 @@ Not supported by all npm commands.
54
55
Directory in which `npm pack` will save tarballs.
56
60
-
57
#### `workspace`
58
59
- Default:
@@ -75,7 +71,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
71
72
This value is not exported to the environment for child processes.
73
78
-
74
#### `workspaces`
75
76
- Default: false
@@ -85,8 +80,6 @@ Enable running a command in the context of **all** the configured workspaces.
80
81
This value is not exported to the environment for child processes.
82
88
-
89
-
83
### Description
84
85
For anything that's installable (that is, a package folder, tarball, tarball url, git url, name@tag, name@version, name, or scoped name), this command will fetch it to the cache, copy the tarball to the current working directory as `<name>-<version>.tgz`, and then write the filenames out to stdout.
content/cli/v7/commands/npm-ping.mdx
-3
@@ -43,7 +43,6 @@ Ping error: {*Detail about error}
43
44
### Configuration
45
46
-
46
#### `registry`
47
48
- Default: "https://registry.npmjs.org/"
@@ -51,8 +50,6 @@ Ping error: {*Detail about error}
50
51
The base URL of the npm registry.
52
54
-
55
-
53
### See Also
54
55
- [npm doctor](/cli/v7/commands/npm-doctor)
content/cli/v7/commands/npm-pkg.mdx
-6
@@ -149,7 +149,6 @@ npm pkg get name version --ws
149
150
### Configuration
151
152
-
152
#### `force`
153
154
- Default: false
@@ -170,7 +169,6 @@ Removes various protections against unfortunate side effects, common mistakes, u
169
170
If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!
171
173
-
172
#### `json`
173
174
- Default: false
@@ -182,7 +180,6 @@ Whether or not to output JSON data, rather than the normal output.
180
181
Not supported by all npm commands.
182
185
-
183
#### `workspace`
184
185
- Default:
@@ -200,7 +197,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
197
198
This value is not exported to the environment for child processes.
199
203
-
200
#### `workspaces`
201
202
- Default: false
@@ -210,8 +206,6 @@ Enable running a command in the context of **all** the configured workspaces.
206
207
This value is not exported to the environment for child processes.
208
213
-
214
-
209
## See Also
210
211
- [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-prefix.mdx
-3
@@ -47,7 +47,6 @@ npm prefix -g
47
48
### Configuration
49
50
-
50
#### `global`
51
52
- Default: false
@@ -59,8 +58,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
58
- bin files are linked to `{prefix}/bin`
59
- man pages are linked to `{prefix}/share/man`
60
62
-
63
-
61
### See Also
62
63
- [npm root](/cli/v7/commands/npm-root)
content/cli/v7/commands/npm-profile.mdx
-6
@@ -78,7 +78,6 @@ Some of these commands may not be available on non npmjs.com registries.
78
79
### Configuration
80
81
-
81
#### `registry`
82
83
- Default: "https://registry.npmjs.org/"
@@ -86,7 +85,6 @@ Some of these commands may not be available on non npmjs.com registries.
85
86
The base URL of the npm registry.
87
89
-
88
#### `json`
89
90
- Default: false
@@ -98,7 +96,6 @@ Whether or not to output JSON data, rather than the normal output.
96
97
Not supported by all npm commands.
98
101
-
99
#### `parseable`
100
101
- Default: false
@@ -106,7 +103,6 @@ Not supported by all npm commands.
103
104
Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
105
109
-
106
#### `otp`
107
108
- Default: null
@@ -116,8 +112,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
112
113
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
114
119
-
120
-
115
### See Also
116
117
- [npm adduser](/cli/v7/commands/npm-adduser)
content/cli/v7/commands/npm-prune.mdx
-7
@@ -41,7 +41,6 @@ In normal operation, extraneous modules are pruned automatically, so you'll only
41
42
### Configuration
43
44
-
44
#### `omit`
45
46
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -55,7 +54,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
54
55
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
56
58
-
57
#### `dry-run`
58
59
- Default: false
@@ -65,7 +63,6 @@ Indicates that you don't want npm to make any changes and that it should only re
63
64
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
65
68
-
66
#### `json`
67
68
- Default: false
@@ -77,7 +74,6 @@ Whether or not to output JSON data, rather than the normal output.
74
75
Not supported by all npm commands.
76
80
-
77
#### `workspace`
78
79
- Default:
@@ -95,7 +91,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
91
92
This value is not exported to the environment for child processes.
93
98
-
94
#### `workspaces`
95
96
- Default: false
@@ -105,8 +100,6 @@ Enable running a command in the context of **all** the configured workspaces.
100
101
This value is not exported to the environment for child processes.
102
108
-
109
-
103
### See Also
104
105
- [npm uninstall](/cli/v7/commands/npm-uninstall)
content/cli/v7/commands/npm-publish.mdx
-8
@@ -78,7 +78,6 @@ See [`developers`](/cli/v7/using-npm/developers) for full details on what's incl
78
79
### Configuration
80
81
-
81
#### `tag`
82
83
- Default: "latest"
@@ -90,7 +89,6 @@ Also the tag that is added to the package@version specified by the `npm tag` com
89
90
When used by the `npm diff` command, this is the tag used to fetch the tarball that will be compared with the local files by default.
91
93
-
92
#### `access`
93
94
- Default: 'restricted' for scoped packages, 'public' for unscoped packages
@@ -100,7 +98,6 @@ When publishing scoped packages, the access level defaults to `restricted`. If y
98
99
Note: Using the `--access` flag on the `npm publish` command will only set the package access level on the initial publish of the package. Any subsequent `npm publish` commands using the `--access` flag will not have an effect to the access level. To make changes to the access level after the initial publish use `npm access`.
100
103
-
101
#### `dry-run`
102
103
- Default: false
@@ -110,7 +107,6 @@ Indicates that you don't want npm to make any changes and that it should only re
107
108
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
109
113
-
110
#### `otp`
111
112
- Default: null
@@ -120,7 +116,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
116
117
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
118
123
-
119
#### `workspace`
120
121
- Default:
@@ -138,7 +133,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
133
134
This value is not exported to the environment for child processes.
135
141
-
136
#### `workspaces`
137
138
- Default: false
@@ -148,8 +142,6 @@ Enable running a command in the context of **all** the configured workspaces.
142
143
This value is not exported to the environment for child processes.
144
151
-
152
-
145
### See Also
146
147
- [npm-packlist package](http://npm.im/npm-packlist)
content/cli/v7/commands/npm-rebuild.mdx
-7
@@ -35,7 +35,6 @@ If one or more package names (and optionally version ranges) are provided, then
35
36
### Configuration
37
38
-
38
#### `global`
39
40
- Default: false
@@ -47,7 +46,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
46
- bin files are linked to `{prefix}/bin`
47
- man pages are linked to `{prefix}/share/man`
48
50
-
49
#### `bin-links`
50
51
- Default: true
@@ -57,7 +55,6 @@ Tells npm to create symlinks (or `.cmd` shims on Windows) for package executable
55
56
Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
57
60
-
58
#### `ignore-scripts`
59
60
- Default: false
@@ -67,7 +64,6 @@ If true, npm does not run scripts specified in package.json files.
64
65
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
66
70
-
67
#### `workspace`
68
69
- Default:
@@ -85,7 +81,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
81
82
This value is not exported to the environment for child processes.
83
88
-
84
#### `workspaces`
85
86
- Default: false
@@ -95,8 +90,6 @@ Enable running a command in the context of **all** the configured workspaces.
90
91
This value is not exported to the environment for child processes.
92
98
-
99
-
93
### See Also
94
95
- [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-repo.mdx
-5
@@ -31,7 +31,6 @@ This command tries to guess at the likely location of a package's repository URL
31
32
### Configuration
33
34
-
34
#### `browser`
35
36
- Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
@@ -43,7 +42,6 @@ Set to `false` to suppress browser behavior and instead print urls to terminal.
42
43
Set to `true` to use default system URL opener.
44
46
-
45
#### `workspace`
46
47
- Default:
@@ -61,7 +59,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
59
60
This value is not exported to the environment for child processes.
61
64
-
62
#### `workspaces`
63
64
- Default: false
@@ -71,8 +68,6 @@ Enable running a command in the context of **all** the configured workspaces.
68
69
This value is not exported to the environment for child processes.
70
74
-
75
-
71
### See Also
72
73
- [npm docs](/cli/v7/commands/npm-docs)
content/cli/v7/commands/npm-restart.mdx
-4
@@ -48,7 +48,6 @@ If it does _not_ have a `"restart"` script specified, but it does have `stop` an
48
49
### Configuration
50
51
-
51
#### `ignore-scripts`
52
53
- Default: false
@@ -58,7 +57,6 @@ If true, npm does not run scripts specified in package.json files.
57
58
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
59
61
-
60
#### `script-shell`
61
62
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -66,8 +64,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
64
65
The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
66
69
-
70
-
67
### See Also
68
69
- [npm run-script](/cli/v7/commands/npm-run-script)
content/cli/v7/commands/npm-root.mdx
-3
@@ -39,7 +39,6 @@ echo "Global packages installed in: ${global_node_modules}"
39
40
### Configuration
41
42
-
42
#### `global`
43
44
- Default: false
@@ -51,8 +50,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
50
- bin files are linked to `{prefix}/bin`
51
- man pages are linked to `{prefix}/share/man`
52
54
-
55
-
53
### See Also
54
55
- [npm prefix](/cli/v7/commands/npm-prefix)
content/cli/v7/commands/npm-run-script.mdx
-7
@@ -117,7 +117,6 @@ This last command will run `test` in both `./packages/a` and `./packages/b` pack
117
118
### Configuration
119
120
-
120
#### `workspace`
121
122
- Default:
@@ -135,7 +134,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
134
135
This value is not exported to the environment for child processes.
136
138
-
137
#### `workspaces`
138
139
- Default: false
@@ -145,7 +143,6 @@ Enable running a command in the context of **all** the configured workspaces.
143
144
This value is not exported to the environment for child processes.
145
148
-
146
#### `if-present`
147
148
- Default: false
@@ -153,7 +150,6 @@ This value is not exported to the environment for child processes.
150
151
If true, npm will not exit with an error code when `run-script` is invoked for a script that isn't defined in the `scripts` section of `package.json`. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup.
152
156
-
153
#### `ignore-scripts`
154
155
- Default: false
@@ -163,7 +159,6 @@ If true, npm does not run scripts specified in package.json files.
159
160
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
161
166
-
162
#### `script-shell`
163
164
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -171,8 +166,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
166
167
The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
168
174
-
175
-
169
### See Also
170
171
- [npm scripts](/cli/v7/using-npm/scripts)
content/cli/v7/commands/npm-search.mdx
-13
@@ -41,7 +41,6 @@ If a term starts with `/`, then it's interpreted as a regular expression and sup
41
42
### Configuration
43
44
-
44
#### `long`
45
46
- Default: false
@@ -49,7 +48,6 @@ If a term starts with `/`, then it's interpreted as a regular expression and sup
48
49
Show extended information in `ls`, `search`, and `help-search`.
50
52
-
51
#### `json`
52
53
- Default: false
@@ -61,7 +59,6 @@ Whether or not to output JSON data, rather than the normal output.
59
60
Not supported by all npm commands.
61
64
-
62
#### `color`
63
64
- Default: true unless the NO_COLOR environ is set to something other than '0'
@@ -69,7 +66,6 @@ Not supported by all npm commands.
66
67
If false, never shows colors. If `"always"` then always shows colors. If true, then only prints color codes for tty file descriptors.
68
72
-
69
#### `parseable`
70
71
- Default: false
@@ -77,7 +73,6 @@ If false, never shows colors. If `"always"` then always shows colors. If true, t
73
74
Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
75
80
-
76
#### `description`
77
78
- Default: true
@@ -85,7 +80,6 @@ Output parseable results from commands that write to standard output. For `npm s
80
81
Show the description in `npm search`
82
88
-
83
#### `searchopts`
84
85
- Default: ""
@@ -93,7 +87,6 @@ Show the description in `npm search`
87
88
Space-separated options that are always passed to search.
89
96
-
90
#### `searchexclude`
91
92
- Default: ""
@@ -101,7 +94,6 @@ Space-separated options that are always passed to search.
94
95
Space-separated options that limit the results from search.
96
104
-
97
#### `registry`
98
99
- Default: "https://registry.npmjs.org/"
@@ -109,7 +101,6 @@ Space-separated options that limit the results from search.
101
102
The base URL of the npm registry.
103
112
-
104
#### `prefer-online`
105
106
- Default: false
@@ -117,7 +108,6 @@ The base URL of the npm registry.
108
109
If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data.
110
120
-
111
#### `prefer-offline`
112
113
- Default: false
@@ -125,7 +115,6 @@ If true, staleness checks for cached data will be forced, making the CLI look fo
115
116
If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server. To force full offline mode, use `--offline`.
117
128
-
118
#### `offline`
119
120
- Default: false
@@ -133,8 +122,6 @@ If true, staleness checks for cached data will be bypassed, but missing data wil
122
123
Force offline mode: no network requests will be done during install. To allow the CLI to fill in missing cache data, see `--prefer-offline`.
124
136
-
137
-
125
### See Also
126
127
- [npm registry](/cli/v7/using-npm/registry)
content/cli/v7/commands/npm-set-script.mdx
-4
@@ -43,7 +43,6 @@ npm set-script [<script>] [<command>]
43
44
### Configuration
45
46
-
46
#### `workspace`
47
48
- Default:
@@ -61,7 +60,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
60
61
This value is not exported to the environment for child processes.
62
64
-
63
#### `workspaces`
64
65
- Default: false
@@ -71,8 +69,6 @@ Enable running a command in the context of **all** the configured workspaces.
69
70
This value is not exported to the environment for child processes.
71
74
-
75
-
72
### See Also
73
74
- [npm run-script](/cli/v7/commands/npm-run-script)
content/cli/v7/commands/npm-star.mdx
-4
@@ -49,7 +49,6 @@ You can see all your starred packages using [`npm stars`](/cli/v7/commands/npm-s
49
50
### Configuration
51
52
-
52
#### `registry`
53
54
- Default: "https://registry.npmjs.org/"
@@ -57,7 +56,6 @@ You can see all your starred packages using [`npm stars`](/cli/v7/commands/npm-s
56
57
The base URL of the npm registry.
58
60
-
59
#### `unicode`
60
61
- Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
@@ -65,8 +63,6 @@ The base URL of the npm registry.
63
64
When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs.
65
68
-
69
-
66
### See Also
67
68
- [npm unstar](/cli/v7/commands/npm-unstar)
content/cli/v7/commands/npm-stars.mdx
-3
@@ -35,7 +35,6 @@ You may also want to see your friend's favorite packages, in this case you will
35
36
### Configuration
37
38
-
38
#### `registry`
39
40
- Default: "https://registry.npmjs.org/"
@@ -43,8 +42,6 @@ You may also want to see your friend's favorite packages, in this case you will
42
43
The base URL of the npm registry.
44
46
-
47
-
45
### See Also
46
47
- [npm star](/cli/v7/commands/npm-star)
content/cli/v7/commands/npm-start.mdx
-4
@@ -57,7 +57,6 @@ npm start
57
58
### Configuration
59
60
-
60
#### `ignore-scripts`
61
62
- Default: false
@@ -67,7 +66,6 @@ If true, npm does not run scripts specified in package.json files.
66
67
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
68
70
-
69
#### `script-shell`
70
71
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -75,8 +73,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
73
74
The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
75
78
-
79
-
76
### See Also
77
78
- [npm run-script](/cli/v7/commands/npm-run-script)
content/cli/v7/commands/npm-stop.mdx
-4
@@ -53,7 +53,6 @@ npm stop
53
54
### Configuration
55
56
-
56
#### `ignore-scripts`
57
58
- Default: false
@@ -63,7 +62,6 @@ If true, npm does not run scripts specified in package.json files.
62
63
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
64
66
-
65
#### `script-shell`
66
67
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -71,8 +69,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
69
70
The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
71
74
-
75
-
72
### See Also
73
74
- [npm run-script](/cli/v7/commands/npm-run-script)
content/cli/v7/commands/npm-team.mdx
-6
@@ -97,7 +97,6 @@ To use teams to manage permissions on packages belonging to your organization, u
97
98
### Configuration
99
100
-
100
#### `registry`
101
102
- Default: "https://registry.npmjs.org/"
@@ -105,7 +104,6 @@ To use teams to manage permissions on packages belonging to your organization, u
104
105
The base URL of the npm registry.
106
108
-
107
#### `otp`
108
109
- Default: null
@@ -115,7 +113,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
113
114
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
115
118
-
116
#### `parseable`
117
118
- Default: false
@@ -123,7 +120,6 @@ If not set, and a registry response fails with a challenge for a one-time passwo
120
121
Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
122
126
-
123
#### `json`
124
125
- Default: false
@@ -135,8 +131,6 @@ Whether or not to output JSON data, rather than the normal output.
131
132
Not supported by all npm commands.
133
138
-
139
-
134
### See Also
135
136
- [npm access](/cli/v7/commands/npm-access)
content/cli/v7/commands/npm-test.mdx
-4
@@ -51,7 +51,6 @@ npm test
51
52
### Configuration
53
54
-
54
#### `ignore-scripts`
55
56
- Default: false
@@ -61,7 +60,6 @@ If true, npm does not run scripts specified in package.json files.
60
61
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
62
64
-
63
#### `script-shell`
64
65
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -69,8 +67,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
67
68
The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
69
72
-
73
-
70
### See Also
71
72
- [npm run-script](/cli/v7/commands/npm-run-script)
content/cli/v7/commands/npm-token.mdx
-6
@@ -75,7 +75,6 @@ This lets you list, create and revoke authentication tokens.
75
76
### Configuration
77
78
-
78
#### `read-only`
79
80
- Default: false
@@ -83,7 +82,6 @@ This lets you list, create and revoke authentication tokens.
82
83
This is used to mark a token as unable to publish when configuring limited access tokens with the `npm token create` command.
84
86
-
85
#### `cidr`
86
87
- Default: null
@@ -91,7 +89,6 @@ This is used to mark a token as unable to publish when configuring limited acces
89
90
This is a list of CIDR address to be used when configuring limited access tokens with the `npm token create` command.
91
94
-
92
#### `registry`
93
94
- Default: "https://registry.npmjs.org/"
@@ -99,7 +96,6 @@ This is a list of CIDR address to be used when configuring limited access tokens
96
97
The base URL of the npm registry.
98
102
-
99
#### `otp`
100
101
- Default: null
@@ -109,8 +105,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
105
106
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
107
112
-
113
-
108
### See Also
109
110
- [npm adduser](/cli/v7/commands/npm-adduser)
content/cli/v7/commands/npm-uninstall.mdx
-5
@@ -59,7 +59,6 @@ npm uninstall lodash --no-save
59
60
### Configuration
61
62
-
62
#### `save`
63
64
- Default: true
@@ -69,7 +68,6 @@ Save installed packages to a package.json file as dependencies.
68
69
When used with the `npm rm` command, removes the dependency from package.json.
70
72
-
71
#### `workspace`
72
73
- Default:
@@ -87,7 +85,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
85
86
This value is not exported to the environment for child processes.
87
90
-
88
#### `workspaces`
89
90
- Default: false
@@ -97,8 +94,6 @@ Enable running a command in the context of **all** the configured workspaces.
94
95
This value is not exported to the environment for child processes.
96
100
-
101
-
97
### See Also
98
99
- [npm prune](/cli/v7/commands/npm-prune)
content/cli/v7/commands/npm-unpublish.mdx
-6
@@ -53,7 +53,6 @@ Even if you unpublish a package version, that specific name and version combinat
53
54
### Configuration
55
56
-
56
#### `dry-run`
57
58
- Default: false
@@ -63,7 +62,6 @@ Indicates that you don't want npm to make any changes and that it should only re
62
63
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
64
66
-
65
#### `force`
66
67
- Default: false
@@ -84,7 +82,6 @@ Removes various protections against unfortunate side effects, common mistakes, u
82
83
If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!
84
87
-
85
#### `workspace`
86
87
- Default:
@@ -102,7 +99,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
99
100
This value is not exported to the environment for child processes.
101
105
-
102
#### `workspaces`
103
104
- Default: false
@@ -112,8 +108,6 @@ Enable running a command in the context of **all** the configured workspaces.
108
109
This value is not exported to the environment for child processes.
110
115
-
116
-
111
### See Also
112
113
- [npm deprecate](/cli/v7/commands/npm-deprecate)
content/cli/v7/commands/npm-unstar.mdx
-5
@@ -45,7 +45,6 @@ You can see all your starred packages using [`npm stars`](/cli/v7/commands/npm-s
45
46
### Configuration
47
48
-
48
#### `registry`
49
50
- Default: "https://registry.npmjs.org/"
@@ -53,7 +52,6 @@ You can see all your starred packages using [`npm stars`](/cli/v7/commands/npm-s
52
53
The base URL of the npm registry.
54
56
-
55
#### `unicode`
56
57
- Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
@@ -61,7 +59,6 @@ The base URL of the npm registry.
59
60
When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs.
61
64
-
62
#### `otp`
63
64
- Default: null
@@ -71,8 +68,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
68
69
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
70
74
-
75
-
71
### See Also
72
73
- [npm star](/cli/v7/commands/npm-star)
content/cli/v7/commands/npm-update.mdx
-15
@@ -141,7 +141,6 @@ NOTE: If a package has been upgraded to a version newer than `latest`, it will b
141
142
### Configuration
143
144
-
144
#### `global`
145
146
- Default: false
@@ -153,7 +152,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
152
- bin files are linked to `{prefix}/bin`
153
- man pages are linked to `{prefix}/share/man`
154
156
-
155
#### `global-style`
156
157
- Default: false
@@ -161,7 +159,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
159
160
Causes npm to install the package into your local `node_modules` folder with the same layout it uses with the global `node_modules` folder. Only your direct dependencies will show in `node_modules` and everything they depend on will be flattened in their `node_modules` folders. This obviously will eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be preferred.
161
164
-
162
#### `legacy-bundling`
163
164
- Default: false
@@ -169,7 +166,6 @@ Causes npm to install the package into your local `node_modules` folder with the
166
167
Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping. If used with `global-style` this option will be preferred.
168
172
-
169
#### `strict-peer-deps`
170
171
- Default: false
@@ -181,7 +177,6 @@ By default, conflicting `peerDependencies` deep in the dependency graph will be
177
178
When such and override is performed, a warning is printed, explaining the conflict and the packages involved. If `--strict-peer-deps` is set, then this warning is treated as a failure.
179
184
-
180
#### `package-lock`
181
182
- Default: true
@@ -191,7 +186,6 @@ If set to false, then ignore `package-lock.json` files when installing. This wil
186
187
When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use `npm prune`.
188
194
-
189
#### `omit`
190
191
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -205,7 +199,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
199
200
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
201
208
-
202
#### `ignore-scripts`
203
204
- Default: false
@@ -215,7 +208,6 @@ If true, npm does not run scripts specified in package.json files.
208
209
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
210
218
-
211
#### `audit`
212
213
- Default: true
@@ -223,7 +215,6 @@ Note that commands explicitly intended to run a particular script, such as `npm
215
216
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
217
226
-
218
#### `bin-links`
219
220
- Default: true
@@ -233,7 +224,6 @@ Tells npm to create symlinks (or `.cmd` shims on Windows) for package executable
224
225
Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
226
236
-
227
#### `fund`
228
229
- Default: true
@@ -241,7 +231,6 @@ Set to false to have it not do this. This can be used to work around the fact th
231
232
When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details.
233
244
-
234
#### `dry-run`
235
236
- Default: false
@@ -251,7 +240,6 @@ Indicates that you don't want npm to make any changes and that it should only re
240
241
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
242
254
-
243
#### `workspace`
244
245
- Default:
@@ -269,7 +257,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
257
258
This value is not exported to the environment for child processes.
259
272
-
260
#### `workspaces`
261
262
- Default: false
@@ -279,8 +266,6 @@ Enable running a command in the context of **all** the configured workspaces.
266
267
This value is not exported to the environment for child processes.
268
282
-
283
-
269
### See Also
270
271
- [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-version.mdx
-10
@@ -31,7 +31,6 @@ npm version [<newversion> | major | minor | patch | premajor | preminor | prepat
31
32
### Configuration
33
34
-
34
#### `allow-same-version`
35
36
- Default: false
@@ -39,7 +38,6 @@ npm version [<newversion> | major | minor | patch | premajor | preminor | prepat
38
39
Prevents throwing an error when `npm version` is used to set the new version to the same value as the current version.
40
42
-
41
#### `commit-hooks`
42
43
- Default: true
@@ -47,7 +45,6 @@ Prevents throwing an error when `npm version` is used to set the new version to
45
46
Run git commit hooks when using the `npm version` command.
47
50
-
48
#### `git-tag-version`
49
50
- Default: true
@@ -55,7 +52,6 @@ Run git commit hooks when using the `npm version` command.
52
53
Tag the commit when using the `npm version` command.
54
58
-
55
#### `json`
56
57
- Default: false
@@ -67,7 +63,6 @@ Whether or not to output JSON data, rather than the normal output.
63
64
Not supported by all npm commands.
65
70
-
66
#### `preid`
67
68
- Default: ""
@@ -75,7 +70,6 @@ Not supported by all npm commands.
70
71
The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the `rc` in `1.2.0-rc.8`.
72
78
-
73
#### `sign-git-tag`
74
75
- Default: false
@@ -85,7 +79,6 @@ If set to true, then the `npm version` command will tag the version using `-s` t
79
80
Note that git requires you to have set up GPG keys in your git configs for this to work properly.
81
88
-
82
#### `workspace`
83
84
- Default:
@@ -103,7 +96,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
96
97
This value is not exported to the environment for child processes.
98
106
-
99
#### `workspaces`
100
101
- Default: false
@@ -113,8 +105,6 @@ Enable running a command in the context of **all** the configured workspaces.
105
106
This value is not exported to the environment for child processes.
107
116
-
117
-
108
### Description
109
110
Run this in a package directory to bump the version and write the new data back to `package.json`, `package-lock.json`, and, if present, `npm-shrinkwrap.json`.
content/cli/v7/commands/npm-view.mdx
-5
@@ -95,7 +95,6 @@ npm view connect versions
95
96
### Configuration
97
98
-
98
#### `json`
99
100
- Default: false
@@ -107,7 +106,6 @@ Whether or not to output JSON data, rather than the normal output.
106
107
Not supported by all npm commands.
108
110
-
109
#### `workspace`
110
111
- Default:
@@ -125,7 +123,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
123
124
This value is not exported to the environment for child processes.
125
128
-
126
#### `workspaces`
127
128
- Default: false
@@ -135,8 +132,6 @@ Enable running a command in the context of **all** the configured workspaces.
132
133
This value is not exported to the environment for child processes.
134
138
-
139
-
135
### Output
136
137
If only a single string field for a single version is output, then it will not be colorized or quoted, to enable piping the output to another command. If the field is an object, it will be output as a JavaScript object literal.
content/cli/v7/commands/npm-whoami.mdx
-3
@@ -37,7 +37,6 @@ If logged into a registry that uses Basic Auth, then simply print the `username`
37
38
### Configuration
39
40
-
40
#### `registry`
41
42
- Default: "https://registry.npmjs.org/"
@@ -45,8 +44,6 @@ If logged into a registry that uses Basic Auth, then simply print the `username`
44
45
The base URL of the npm registry.
46
48
-
49
-
47
### See Also
48
49
- [npm config](/cli/v7/commands/npm-config)
content/cli/v7/using-npm/config.mdx
-146
@@ -46,7 +46,6 @@ Run `npm config ls -l` to see a set of configuration parameters that are interna
46
47
The following shorthands are parsed on the command-line:
48
49
-
49
- `-a`: `--all`
50
- `--enjoy-by`: `--before`
51
- `-c`: `--call`
@@ -87,7 +86,6 @@ The following shorthands are parsed on the command-line:
86
- `--ws`: `--workspaces`
87
- `-y`: `--yes`
88
90
-
89
If the specified configuration param resolves unambiguously to a known configuration parameter, then it is expanded to that configuration parameter. For example:
90
91
```bash
@@ -106,7 +104,6 @@ npm ls --global --parseable --long --loglevel info
104
105
### Config Settings
106
109
-
107
#### `_auth`
108
109
- Default: null
@@ -116,7 +113,6 @@ A basic-auth string to use when authenticating against the npm registry.
113
114
Warning: This should generally not be set via a command-line option. It is safer to use a registry-provided authentication bearer token stored in the ~/.npmrc file by running `npm login`.
115
119
-
116
#### `access`
117
118
- Default: 'restricted' for scoped packages, 'public' for unscoped packages
@@ -126,7 +122,6 @@ When publishing scoped packages, the access level defaults to `restricted`. If y
122
123
Note: Using the `--access` flag on the `npm publish` command will only set the package access level on the initial publish of the package. Any subsequent `npm publish` commands using the `--access` flag will not have an effect to the access level. To make changes to the access level after the initial publish use `npm access`.
124
129
-
125
#### `all`
126
127
- Default: false
@@ -134,7 +129,6 @@ Note: Using the `--access` flag on the `npm publish` command will only set the p
129
130
When running `npm outdated` and `npm ls`, setting `--all` will show all outdated or installed packages, rather than only those directly depended upon by the current project.
131
137
-
132
#### `allow-same-version`
133
134
- Default: false
@@ -142,7 +136,6 @@ When running `npm outdated` and `npm ls`, setting `--all` will show all outdated
136
137
Prevents throwing an error when `npm version` is used to set the new version to the same value as the current version.
138
145
-
139
#### `audit`
140
141
- Default: true
@@ -150,7 +143,6 @@ Prevents throwing an error when `npm version` is used to set the new version to
143
144
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
145
153
-
146
#### `audit-level`
147
148
- Default: null
@@ -158,7 +150,6 @@ When "true" submit audit reports alongside the current npm command to the defaul
150
151
The minimum level of vulnerability for `npm audit` to exit with a non-zero exit code.
152
161
-
153
#### `before`
154
155
- Default: null
@@ -168,7 +159,6 @@ If passed to `npm install`, will rebuild the npm tree such that only versions th
159
160
If the requested version is a `dist-tag` and the given tag does not pass the `--before` filter, the most recent version less than or equal to that tag will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`.
161
171
-
162
#### `bin-links`
163
164
- Default: true
@@ -178,7 +168,6 @@ Tells npm to create symlinks (or `.cmd` shims on Windows) for package executable
168
169
Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
170
181
-
171
#### `browser`
172
173
- Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
@@ -190,7 +179,6 @@ Set to `false` to suppress browser behavior and instead print urls to terminal.
179
180
Set to `true` to use default system URL opener.
181
193
-
182
#### `ca`
183
184
- Default: null
@@ -213,7 +201,6 @@ ca[]="..."
201
202
See also the `strict-ssl` config.
203
216
-
204
#### `cache`
205
206
- Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm`
@@ -221,7 +208,6 @@ See also the `strict-ssl` config.
208
209
The location of npm's cache directory. See [`npm cache`](/cli/v7/commands/npm-cache)
210
224
-
211
#### `cafile`
212
213
- Default: null
@@ -229,7 +215,6 @@ The location of npm's cache directory. See [`npm cache`](/cli/v7/commands/npm-ca
215
216
A path to a file containing one or multiple Certificate Authority signing certificates. Similar to the `ca` setting, but allows for multiple CA's, as well as for the CA information to be stored in a file on disk.
217
232
-
218
#### `call`
219
220
- Default: ""
@@ -241,7 +226,6 @@ Optional companion option for `npm exec`, `npx` that allows for specifying a cus
226
npm exec --package yo --package generator-node --call "yo node"
227
```
228
244
-
229
#### `cert`
230
231
- Default: null
@@ -255,7 +239,6 @@ cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
239
240
It is _not_ the path to a certificate file (and there is no "certfile" option).
241
258
-
242
#### `ci-name`
243
244
- Default: The name of the current CI system, or `null` when not on a known CI platform.
@@ -263,7 +246,6 @@ It is _not_ the path to a certificate file (and there is no "certfile" option).
246
247
The name of a continuous integration system. If not set explicitly, npm will detect the current CI environment using the [`@npmcli/ci-detect`](http://npm.im/@npmcli/ci-detect) module.
248
266
-
249
#### `cidr`
250
251
- Default: null
@@ -271,7 +253,6 @@ The name of a continuous integration system. If not set explicitly, npm will det
253
254
This is a list of CIDR address to be used when configuring limited access tokens with the `npm token create` command.
255
274
-
256
#### `color`
257
258
- Default: true unless the NO_COLOR environ is set to something other than '0'
@@ -279,7 +260,6 @@ This is a list of CIDR address to be used when configuring limited access tokens
260
261
If false, never shows colors. If `"always"` then always shows colors. If true, then only prints color codes for tty file descriptors.
262
282
-
263
#### `commit-hooks`
264
265
- Default: true
@@ -287,7 +267,6 @@ If false, never shows colors. If `"always"` then always shows colors. If true, t
267
268
Run git commit hooks when using the `npm version` command.
269
290
-
270
#### `depth`
271
272
- Default: `Infinity` if `--all` is set, otherwise `1`
@@ -297,7 +276,6 @@ The depth to go when recursing packages for `npm ls`.
276
277
If not set, `npm ls` will show only the immediate dependencies of the root project. If `--all` is set, then npm will show all dependencies by default.
278
300
-
279
#### `description`
280
281
- Default: true
@@ -305,7 +283,6 @@ If not set, `npm ls` will show only the immediate dependencies of the root proje
283
284
Show the description in `npm search`
285
308
-
286
#### `diff`
287
288
- Default:
@@ -313,7 +290,6 @@ Show the description in `npm search`
290
291
Define arguments to compare in `npm diff`.
292
316
-
293
#### `diff-dst-prefix`
294
295
- Default: "b/"
@@ -321,7 +297,6 @@ Define arguments to compare in `npm diff`.
297
298
Destination prefix to be used in `npm diff` output.
299
324
-
300
#### `diff-ignore-all-space`
301
302
- Default: false
@@ -329,7 +304,6 @@ Destination prefix to be used in `npm diff` output.
304
305
Ignore whitespace when comparing lines in `npm diff`.
306
332
-
307
#### `diff-name-only`
308
309
- Default: false
@@ -337,7 +311,6 @@ Ignore whitespace when comparing lines in `npm diff`.
311
312
Prints only filenames when using `npm diff`.
313
340
-
314
#### `diff-no-prefix`
315
316
- Default: false
@@ -347,7 +320,6 @@ Do not show any source or destination prefix in `npm diff` output.
320
321
Note: this causes `npm diff` to ignore the `--diff-src-prefix` and `--diff-dst-prefix` configs.
322
350
-
323
#### `diff-src-prefix`
324
325
- Default: "a/"
@@ -355,7 +327,6 @@ Note: this causes `npm diff` to ignore the `--diff-src-prefix` and `--diff-dst-p
327
328
Source prefix to be used in `npm diff` output.
329
358
-
330
#### `diff-text`
331
332
- Default: false
@@ -363,7 +334,6 @@ Source prefix to be used in `npm diff` output.
334
335
Treat all files as text in `npm diff`.
336
366
-
337
#### `diff-unified`
338
339
- Default: 3
@@ -371,7 +341,6 @@ Treat all files as text in `npm diff`.
341
342
The number of lines of context to print in `npm diff`.
343
374
-
344
#### `dry-run`
345
346
- Default: false
@@ -381,7 +350,6 @@ Indicates that you don't want npm to make any changes and that it should only re
350
351
Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
352
384
-
353
#### `editor`
354
355
- Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on Windows, or 'vim' on Unix systems
@@ -389,7 +357,6 @@ Note: This is NOT honored by other network related commands, eg `dist-tags`, `ow
357
358
The command to run for `npm edit` and `npm config edit`.
359
392
-
360
#### `engine-strict`
361
362
- Default: false
@@ -399,7 +366,6 @@ If set to true, then npm will stubbornly refuse to install (or even consider ins
366
367
This can be overridden by setting the `--force` flag.
368
402
-
369
#### `fetch-retries`
370
371
- Default: 2
@@ -409,7 +375,6 @@ The "retries" config for the `retry` module to use when fetching packages from t
375
376
npm will retry idempotent read requests to the registry in the case of network failures or 5xx HTTP errors.
377
412
-
378
#### `fetch-retry-factor`
379
380
- Default: 10
@@ -417,7 +382,6 @@ npm will retry idempotent read requests to the registry in the case of network f
382
383
The "factor" config for the `retry` module to use when fetching packages.
384
420
-
385
#### `fetch-retry-maxtimeout`
386
387
- Default: 60000 (1 minute)
@@ -425,7 +389,6 @@ The "factor" config for the `retry` module to use when fetching packages.
389
390
The "maxTimeout" config for the `retry` module to use when fetching packages.
391
428
-
392
#### `fetch-retry-mintimeout`
393
394
- Default: 10000 (10 seconds)
@@ -433,7 +396,6 @@ The "maxTimeout" config for the `retry` module to use when fetching packages.
396
397
The "minTimeout" config for the `retry` module to use when fetching packages.
398
436
-
399
#### `fetch-timeout`
400
401
- Default: 300000 (5 minutes)
@@ -441,7 +403,6 @@ The "minTimeout" config for the `retry` module to use when fetching packages.
403
404
The maximum amount of time to wait for HTTP requests to complete.
405
444
-
406
#### `force`
407
408
- Default: false
@@ -462,7 +423,6 @@ Removes various protections against unfortunate side effects, common mistakes, u
423
424
If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!
425
465
-
426
#### `foreground-scripts`
427
428
- Default: false
@@ -472,7 +432,6 @@ Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) scripts f
432
433
Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging.
434
475
-
435
#### `format-package-lock`
436
437
- Default: true
@@ -480,7 +439,6 @@ Note that this will generally make installs run slower, and be much noisier, but
439
440
Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable file.
441
483
-
442
#### `fund`
443
444
- Default: true
@@ -488,7 +446,6 @@ Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable file.
446
447
When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details.
448
491
-
449
#### `git`
450
451
- Default: "git"
@@ -496,7 +453,6 @@ When "true" displays the message at the end of each `npm install` acknowledging
453
454
The command to use for git commands. If git is installed on the computer, but is not in the `PATH`, then set this to the full path to the git binary.
455
499
-
456
#### `git-tag-version`
457
458
- Default: true
@@ -504,7 +460,6 @@ The command to use for git commands. If git is installed on the computer, but is
460
461
Tag the commit when using the `npm version` command.
462
507
-
463
#### `global`
464
465
- Default: false
@@ -516,7 +471,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
471
- bin files are linked to `{prefix}/bin`
472
- man pages are linked to `{prefix}/share/man`
473
519
-
474
#### `global-style`
475
476
- Default: false
@@ -524,7 +478,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
478
479
Causes npm to install the package into your local `node_modules` folder with the same layout it uses with the global `node_modules` folder. Only your direct dependencies will show in `node_modules` and everything they depend on will be flattened in their `node_modules` folders. This obviously will eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be preferred.
480
527
-
481
#### `globalconfig`
482
483
- Default: The global --prefix setting plus 'etc/npmrc'. For example, '/usr/local/etc/npmrc'
@@ -532,7 +485,6 @@ Causes npm to install the package into your local `node_modules` folder with the
485
486
The config file to read for global config options.
487
535
-
488
#### `heading`
489
490
- Default: "npm"
@@ -540,7 +492,6 @@ The config file to read for global config options.
492
493
The string that starts all the debugging log output.
494
543
-
495
#### `https-proxy`
496
497
- Default: null
@@ -548,7 +499,6 @@ The string that starts all the debugging log output.
499
500
A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or `https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set, proxy settings will be honored by the underlying `make-fetch-happen` library.
501
551
-
502
#### `if-present`
503
504
- Default: false
@@ -556,7 +506,6 @@ A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or `https_proxy
506
507
If true, npm will not exit with an error code when `run-script` is invoked for a script that isn't defined in the `scripts` section of `package.json`. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup.
508
559
-
509
#### `ignore-scripts`
510
511
- Default: false
@@ -566,7 +515,6 @@ If true, npm does not run scripts specified in package.json files.
515
516
Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
517
569
-
518
#### `include`
519
520
- Default:
@@ -578,7 +526,6 @@ This is the inverse of `--omit=<type>`.
526
527
Dependency types specified in `--include` will not be omitted, regardless of the order in which omit/include are specified on the command-line.
528
581
-
529
#### `include-staged`
530
531
- Default: false
@@ -588,7 +535,6 @@ Allow installing "staged" published packages, as defined by [npm RFC PR #92](htt
535
536
This is experimental, and not implemented by the npm public registry.
537
591
-
538
#### `init-author-email`
539
540
- Default: ""
@@ -596,7 +542,6 @@ This is experimental, and not implemented by the npm public registry.
542
543
The value `npm init` should use by default for the package author's email.
544
599
-
545
#### `init-author-name`
546
547
- Default: ""
@@ -604,7 +549,6 @@ The value `npm init` should use by default for the package author's email.
549
550
The value `npm init` should use by default for the package author's name.
551
607
-
552
#### `init-author-url`
553
554
- Default: ""
@@ -612,7 +556,6 @@ The value `npm init` should use by default for the package author's name.
556
557
The value `npm init` should use by default for the package author's homepage.
558
615
-
559
#### `init-license`
560
561
- Default: "ISC"
@@ -620,7 +563,6 @@ The value `npm init` should use by default for the package author's homepage.
563
564
The value `npm init` should use by default for the package license.
565
623
-
566
#### `init-module`
567
568
- Default: "~/.npm-init.js"
@@ -628,7 +570,6 @@ The value `npm init` should use by default for the package license.
570
571
A module that will be loaded by the `npm init` command. See the documentation for the [init-package-json](https://github.com/npm/init-package-json) module for more information, or [npm init](/cli/v7/commands/npm-init).
572
631
-
573
#### `init-version`
574
575
- Default: "1.0.0"
@@ -636,7 +577,6 @@ A module that will be loaded by the `npm init` command. See the documentation fo
577
578
The value that `npm init` should use by default for the package version number, if not already set in package.json.
579
639
-
580
#### `json`
581
582
- Default: false
@@ -648,7 +588,6 @@ Whether or not to output JSON data, rather than the normal output.
588
589
Not supported by all npm commands.
590
651
-
591
#### `key`
592
593
- Default: null
@@ -662,7 +601,6 @@ key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
601
602
It is _not_ the path to a key file (and there is no "keyfile" option).
603
665
-
604
#### `legacy-bundling`
605
606
- Default: false
@@ -670,7 +608,6 @@ It is _not_ the path to a key file (and there is no "keyfile" option).
608
609
Causes npm to install the package such that versions of npm prior to 1.4, such as the one included with node 0.8, can install the package. This eliminates all automatic deduping. If used with `global-style` this option will be preferred.
610
673
-
611
#### `legacy-peer-deps`
612
613
- Default: false
@@ -684,7 +621,6 @@ This differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking `pee
621
622
Use of `legacy-peer-deps` is not recommended, as it will not enforce the `peerDependencies` contract that meta-dependencies may rely on.
623
687
-
624
#### `link`
625
626
- Default: false
@@ -692,7 +628,6 @@ Use of `legacy-peer-deps` is not recommended, as it will not enforce the `peerDe
628
629
Used with `npm ls`, limiting output to only those packages that are linked.
630
695
-
631
#### `local-address`
632
633
- Default: null
@@ -700,7 +635,6 @@ Used with `npm ls`, limiting output to only those packages that are linked.
635
636
The IP address of the local interface to use when making connections to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
637
703
-
638
#### `location`
639
640
- Default: "user" unless `--global` is passed, which will also set this value to "global"
@@ -708,7 +642,6 @@ The IP address of the local interface to use when making connections to the npm
642
643
When passed to `npm config` this refers to which config file to use.
644
711
-
645
#### `loglevel`
646
647
- Default: "notice"
@@ -720,7 +653,6 @@ Any logs of a higher level than the setting are shown. The default is "notice".
653
654
See also the `foreground-scripts` config.
655
723
-
656
#### `logs-max`
657
658
- Default: 10
@@ -728,7 +660,6 @@ See also the `foreground-scripts` config.
660
661
The maximum number of log files to store.
662
731
-
663
#### `long`
664
665
- Default: false
@@ -736,7 +667,6 @@ The maximum number of log files to store.
667
668
Show extended information in `ls`, `search`, and `help-search`.
669
739
-
670
#### `maxsockets`
671
672
- Default: 15
@@ -744,7 +674,6 @@ Show extended information in `ls`, `search`, and `help-search`.
674
675
The maximum number of connections to use per origin (protocol/host/port combination).
676
747
-
677
#### `message`
678
679
- Default: "%s"
@@ -754,7 +683,6 @@ Commit message which is used by `npm version` when creating version commit.
683
684
Any "%s" in the message will be replaced with the version number.
685
757
-
686
#### `node-options`
687
688
- Default: null
@@ -762,7 +690,6 @@ Any "%s" in the message will be replaced with the version number.
690
691
Options to pass through to Node.js via the `NODE_OPTIONS` environment variable. This does not impact how npm itself is executed but it does impact how lifecycle scripts are called.
692
765
-
693
#### `node-version`
694
695
- Default: Node.js `process.version` value
@@ -770,7 +697,6 @@ Options to pass through to Node.js via the `NODE_OPTIONS` environment variable.
697
698
The node version to use when checking a package's `engines` setting.
699
773
-
700
#### `noproxy`
701
702
- Default: The value of the NO_PROXY environment variable
@@ -780,7 +706,6 @@ Domain extensions that should bypass any proxies.
706
707
Also accepts a comma-delimited string.
708
783
-
709
#### `npm-version`
710
711
- Default: Output of `npm --version`
@@ -788,7 +713,6 @@ Also accepts a comma-delimited string.
713
714
The npm version to use when checking a package's `engines` setting.
715
791
-
716
#### `offline`
717
718
- Default: false
@@ -796,7 +720,6 @@ The npm version to use when checking a package's `engines` setting.
720
721
Force offline mode: no network requests will be done during install. To allow the CLI to fill in missing cache data, see `--prefer-offline`.
722
799
-
723
#### `omit`
724
725
- Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -810,7 +733,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
733
734
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
735
813
-
736
#### `otp`
737
738
- Default: null
@@ -820,7 +742,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
742
743
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
744
823
-
745
#### `pack-destination`
746
747
- Default: "."
@@ -828,7 +749,6 @@ If not set, and a registry response fails with a challenge for a one-time passwo
749
750
Directory in which `npm pack` will save tarballs.
751
831
-
752
#### `package`
753
754
- Default:
@@ -836,7 +756,6 @@ Directory in which `npm pack` will save tarballs.
756
757
The package to install for [`npm exec`](/cli/v7/commands/npm-exec)
758
839
-
759
#### `package-lock`
760
761
- Default: true
@@ -846,7 +765,6 @@ If set to false, then ignore `package-lock.json` files when installing. This wil
765
766
When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use `npm prune`.
767
849
-
768
#### `package-lock-only`
769
770
- Default: false
@@ -858,7 +776,6 @@ For `update` this means only the `package-lock.json` will be updated, instead of
776
777
For `list` this means the output will be based on the tree described by the `package-lock.json`, rather than the contents of `node_modules`.
778
861
-
779
#### `parseable`
780
781
- Default: false
@@ -866,7 +783,6 @@ For `list` this means the output will be based on the tree described by the `pac
783
784
Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
785
869
-
786
#### `prefer-offline`
787
788
- Default: false
@@ -874,7 +790,6 @@ Output parseable results from commands that write to standard output. For `npm s
790
791
If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server. To force full offline mode, use `--offline`.
792
877
-
793
#### `prefer-online`
794
795
- Default: false
@@ -882,7 +797,6 @@ If true, staleness checks for cached data will be bypassed, but missing data wil
797
798
If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data.
799
885
-
800
#### `prefix`
801
802
- Default: In global mode, the folder where the node executable is installed. In local mode, the nearest parent folder containing either a package.json file or a node_modules folder.
@@ -890,7 +804,6 @@ If true, staleness checks for cached data will be forced, making the CLI look fo
804
805
The location to install global items. If set on the command line, then it forces non-global commands to run in the specified folder.
806
893
-
807
#### `preid`
808
809
- Default: ""
@@ -898,7 +811,6 @@ The location to install global items. If set on the command line, then it forces
811
812
The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the `rc` in `1.2.0-rc.8`.
813
901
-
814
#### `progress`
815
816
- Default: `true` unless running in a known CI system
@@ -908,7 +820,6 @@ When set to `true`, npm will display a progress bar during time intensive operat
820
821
Set to `false` to suppress the progress bar.
822
911
-
823
#### `proxy`
824
825
- Default: null
@@ -916,7 +827,6 @@ Set to `false` to suppress the progress bar.
827
828
A proxy to use for outgoing http requests. If the `HTTP_PROXY` or `http_proxy` environment variables are set, proxy settings will be honored by the underlying `request` library.
829
919
-
830
#### `read-only`
831
832
- Default: false
@@ -924,7 +834,6 @@ A proxy to use for outgoing http requests. If the `HTTP_PROXY` or `http_proxy` e
834
835
This is used to mark a token as unable to publish when configuring limited access tokens with the `npm token create` command.
836
927
-
837
#### `rebuild-bundle`
838
839
- Default: true
@@ -932,7 +841,6 @@ This is used to mark a token as unable to publish when configuring limited acces
841
842
Rebuild bundled dependencies after installation.
843
935
-
844
#### `registry`
845
846
- Default: "https://registry.npmjs.org/"
@@ -940,7 +848,6 @@ Rebuild bundled dependencies after installation.
848
849
The base URL of the npm registry.
850
943
-
851
#### `save`
852
853
- Default: true
@@ -950,7 +857,6 @@ Save installed packages to a package.json file as dependencies.
857
858
When used with the `npm rm` command, removes the dependency from package.json.
859
953
-
860
#### `save-bundle`
861
862
- Default: false
@@ -960,7 +866,6 @@ If a package would be saved at install time by the use of `--save`, `--save-dev`
866
867
Ignore if `--save-peer` is set, since peerDependencies cannot be bundled.
868
963
-
869
#### `save-dev`
870
871
- Default: false
@@ -968,7 +873,6 @@ Ignore if `--save-peer` is set, since peerDependencies cannot be bundled.
873
874
Save installed packages to a package.json file as `devDependencies`.
875
971
-
876
#### `save-exact`
877
878
- Default: false
@@ -976,7 +880,6 @@ Save installed packages to a package.json file as `devDependencies`.
880
881
Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator.
882
979
-
883
#### `save-optional`
884
885
- Default: false
@@ -984,7 +887,6 @@ Dependencies saved to package.json will be configured with an exact version rath
887
888
Save installed packages to a package.json file as `optionalDependencies`.
889
987
-
890
#### `save-peer`
891
892
- Default: false
@@ -992,7 +894,6 @@ Save installed packages to a package.json file as `optionalDependencies`.
894
895
Save installed packages. to a package.json file as `peerDependencies`
896
995
-
897
#### `save-prefix`
898
899
- Default: "^"
@@ -1002,7 +903,6 @@ Configure how versions of packages installed to a package.json file via `--save`
903
904
For example if a package has version `1.2.3`, by default its version is set to `^1.2.3` which allows minor upgrades for that package, but after `npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows patch upgrades.
905
1005
-
906
#### `save-prod`
907
908
- Default: false
@@ -1012,7 +912,6 @@ Save installed packages into `dependencies` specifically. This is useful if a pa
912
913
This is the default behavior if `--save` is true, and neither `--save-dev` or `--save-optional` are true.
914
1015
-
915
#### `scope`
916
917
- Default: the scope of the current project, if any, or ""
@@ -1040,7 +939,6 @@ This will also cause `npm init` to create a scoped package.
939
npm init --scope=@foo --yes
940
```
941
1043
-
942
#### `script-shell`
943
944
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
@@ -1048,7 +946,6 @@ npm init --scope=@foo --yes
946
947
The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <pkg>` commands.
948
1051
-
949
#### `searchexclude`
950
951
- Default: ""
@@ -1056,7 +953,6 @@ The shell to use for scripts run with the `npm exec`, `npm run` and `npm init <p
953
954
Space-separated options that limit the results from search.
955
1059
-
956
#### `searchlimit`
957
958
- Default: 20
@@ -1064,7 +960,6 @@ Space-separated options that limit the results from search.
960
961
Number of items to limit search results to. Will not apply at all to legacy searches.
962
1067
-
963
#### `searchopts`
964
965
- Default: ""
@@ -1072,7 +967,6 @@ Number of items to limit search results to. Will not apply at all to legacy sear
967
968
Space-separated options that are always passed to search.
969
1075
-
970
#### `searchstaleness`
971
972
- Default: 900
@@ -1080,7 +974,6 @@ Space-separated options that are always passed to search.
974
975
The age of the cache, in seconds, before another registry request is made if using legacy search endpoint.
976
1083
-
977
#### `shell`
978
979
- Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows
@@ -1088,7 +981,6 @@ The age of the cache, in seconds, before another registry request is made if usi
981
982
The shell to run for the `npm explore` command.
983
1091
-
984
#### `sign-git-commit`
985
986
- Default: false
@@ -1098,7 +990,6 @@ If set to true, then the `npm version` command will commit the new package versi
990
991
Note that git requires you to have set up GPG keys in your git configs for this to work properly.
992
1101
-
993
#### `sign-git-tag`
994
995
- Default: false
@@ -1108,7 +999,6 @@ If set to true, then the `npm version` command will tag the version using `-s` t
999
1000
Note that git requires you to have set up GPG keys in your git configs for this to work properly.
1001
1111
-
1002
#### `strict-peer-deps`
1003
1004
- Default: false
@@ -1120,7 +1010,6 @@ By default, conflicting `peerDependencies` deep in the dependency graph will be
1010
1011
When such and override is performed, a warning is printed, explaining the conflict and the packages involved. If `--strict-peer-deps` is set, then this warning is treated as a failure.
1012
1123
-
1013
#### `strict-ssl`
1014
1015
- Default: true
@@ -1130,7 +1019,6 @@ Whether or not to do SSL key validation when making requests to the registry via
1019
1020
See also the `ca` config.
1021
1133
-
1022
#### `tag`
1023
1024
- Default: "latest"
@@ -1142,7 +1030,6 @@ Also the tag that is added to the package@version specified by the `npm tag` com
1030
1031
When used by the `npm diff` command, this is the tag used to fetch the tarball that will be compared with the local files by default.
1032
1145
-
1033
#### `tag-version-prefix`
1034
1035
- Default: "v"
@@ -1152,7 +1039,6 @@ If set, alters the prefix used when tagging a new version when performing a vers
1039
1040
Because other tools may rely on the convention that npm version tags look like `v1.0.0`, _only use this property if it is absolutely necessary_. In particular, use care when overriding this setting for public packages.
1041
1155
-
1042
#### `timing`
1043
1044
- Default: false
@@ -1162,7 +1048,6 @@ If true, writes an `npm-debug` log to `_logs` and timing information to `_timing
1048
1049
You can quickly view it with this [json](https://npm.im/json) command line: `npm exec -- json -g < ~/.npm/_timing.json`.
1050
1165
-
1051
#### `umask`
1052
1053
- Default: 0
@@ -1176,7 +1061,6 @@ Note that the underlying system will _also_ apply its own umask value to files a
1061
1062
Thus, the effective default umask value on most POSIX systems is 0o22, meaning that folders and executables are created with a mode of 0o755 and other files are created with a mode of 0o644.
1063
1179
-
1064
#### `unicode`
1065
1066
- Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
@@ -1184,7 +1068,6 @@ Thus, the effective default umask value on most POSIX systems is 0o22, meaning t
1068
1069
When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs.
1070
1187
-
1071
#### `update-notifier`
1072
1073
- Default: true
@@ -1192,7 +1075,6 @@ When set to true, npm uses unicode characters in the tree output. When false, it
1075
1076
Set to false to suppress the update notification when using an older version of npm than the latest.
1077
1195
-
1078
#### `usage`
1079
1080
- Default: false
@@ -1200,7 +1082,6 @@ Set to false to suppress the update notification when using an older version of
1082
1083
Show short usage output about the command specified.
1084
1203
-
1085
#### `user-agent`
1086
1087
- Default: "npm/\{npm-version\} node/\{node-version\} \{platform\} \{arch\} workspaces/\{workspaces\} \{ci\}"
@@ -1215,7 +1096,6 @@ Sets the User-Agent request header. The following fields are replaced with their
1096
- `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options are set.
1097
- `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or an empty string if `ci-name` is empty.
1098
1218
-
1099
#### `userconfig`
1100
1101
- Default: "~/.npmrc"
@@ -1225,7 +1105,6 @@ The location of user-level configuration settings.
1105
1106
This may be overridden by the `npm_config_userconfig` environment variable or the `--userconfig` command line option, but may _not_ be overridden by settings in the `globalconfig` file.
1107
1228
-
1108
#### `version`
1109
1110
- Default: false
@@ -1235,7 +1114,6 @@ If true, output the npm version and exit successfully.
1114
1115
Only relevant when specified explicitly on the command line.
1116
1238
-
1117
#### `versions`
1118
1119
- Default: false
@@ -1245,7 +1123,6 @@ If true, output the npm version as well as node's `process.versions` map and the
1123
1124
Only relevant when specified explicitly on the command line.
1125
1248
-
1126
#### `viewer`
1127
1128
- Default: "man" on Posix, "browser" on Windows
@@ -1255,7 +1132,6 @@ The program to use to view help content.
1132
1133
Set to `"browser"` to view html help content in the default web browser.
1134
1258
-
1135
#### `which`
1136
1137
- Default: null
@@ -1263,7 +1139,6 @@ Set to `"browser"` to view html help content in the default web browser.
1139
1140
If there are multiple funding sources, which 1-indexed source URL to open.
1141
1266
-
1142
#### `workspace`
1143
1144
- Default:
@@ -1281,7 +1156,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
1156
1157
This value is not exported to the environment for child processes.
1158
1284
-
1159
#### `workspaces`
1160
1161
- Default: false
@@ -1291,7 +1165,6 @@ Enable running a command in the context of **all** the configured workspaces.
1165
1166
This value is not exported to the environment for child processes.
1167
1294
-
1168
#### `yes`
1169
1170
- Default: null
@@ -1299,7 +1172,6 @@ This value is not exported to the environment for child processes.
1172
1173
Automatically answer "yes" to any prompts that npm might print on the command line.
1174
1302
-
1175
#### `also`
1176
1177
- Default: null
@@ -1308,7 +1180,6 @@ Automatically answer "yes" to any prompts that npm might print on the command li
1180
1181
When set to `dev` or `development`, this is an alias for `--include=dev`.
1182
1311
-
1183
#### `auth-type`
1184
1185
- Default: "legacy"
@@ -1317,7 +1188,6 @@ When set to `dev` or `development`, this is an alias for `--include=dev`.
1188
1189
What authentication strategy to use with `adduser`/`login`.
1190
1320
-
1191
#### `cache-max`
1192
1193
- Default: Infinity
@@ -1326,7 +1196,6 @@ What authentication strategy to use with `adduser`/`login`.
1196
1197
`--cache-max=0` is an alias for `--prefer-online`
1198
1329
-
1199
#### `cache-min`
1200
1201
- Default: 0
@@ -1335,7 +1204,6 @@ What authentication strategy to use with `adduser`/`login`.
1204
1205
`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.
1206
1338
-
1207
#### `dev`
1208
1209
- Default: false
@@ -1344,7 +1212,6 @@ What authentication strategy to use with `adduser`/`login`.
1212
1213
Alias for `--include=dev`.
1214
1347
-
1215
#### `init.author.email`
1216
1217
- Default: ""
@@ -1353,7 +1220,6 @@ Alias for `--include=dev`.
1220
1221
Alias for `--init-author-email`
1222
1356
-
1223
#### `init.author.name`
1224
1225
- Default: ""
@@ -1362,7 +1228,6 @@ Alias for `--init-author-email`
1228
1229
Alias for `--init-author-name`
1230
1365
-
1231
#### `init.author.url`
1232
1233
- Default: ""
@@ -1371,7 +1236,6 @@ Alias for `--init-author-name`
1236
1237
Alias for `--init-author-url`
1238
1374
-
1239
#### `init.license`
1240
1241
- Default: "ISC"
@@ -1380,7 +1244,6 @@ Alias for `--init-author-url`
1244
1245
Alias for `--init-license`
1246
1383
-
1247
#### `init.module`
1248
1249
- Default: "~/.npm-init.js"
@@ -1389,7 +1252,6 @@ Alias for `--init-license`
1252
1253
Alias for `--init-module`
1254
1392
-
1255
#### `init.version`
1256
1257
- Default: "1.0.0"
@@ -1398,7 +1260,6 @@ Alias for `--init-module`
1260
1261
Alias for `--init-version`
1262
1401
-
1263
#### `only`
1264
1265
- Default: null
@@ -1407,7 +1268,6 @@ Alias for `--init-version`
1268
1269
When set to `prod` or `production`, this is an alias for `--omit=dev`.
1270
1410
-
1271
#### `optional`
1272
1273
- Default: null
@@ -1418,7 +1278,6 @@ Default value does install optional deps unless otherwise omitted.
1278
1279
Alias for --include=optional or --omit=optional
1280
1421
-
1281
#### `production`
1282
1283
- Default: null
@@ -1427,7 +1286,6 @@ Alias for --include=optional or --omit=optional
1286
1287
Alias for `--omit=dev`
1288
1430
-
1289
#### `shrinkwrap`
1290
1291
- Default: true
@@ -1436,7 +1294,6 @@ Alias for `--omit=dev`
1294
1295
Alias for --package-lock
1296
1439
-
1297
#### `sso-poll-frequency`
1298
1299
- Default: 500
@@ -1445,7 +1302,6 @@ Alias for --package-lock
1302
1303
When used with SSO-enabled `auth-type`s, configures how regularly the registry should be polled while the user is completing authentication.
1304
1448
-
1305
#### `sso-type`
1306
1307
- Default: "oauth"
@@ -1454,7 +1310,6 @@ When used with SSO-enabled `auth-type`s, configures how regularly the registry s
1310
1311
If `--auth-type=sso`, the type of SSO type to use.
1312
1457
-
1313
#### `tmp`
1314
1315
- Default: The value returned by the Node.js `os.tmpdir()` method [https://nodejs.org/api/os.html#os_os_tmpdir](https://nodejs.org/api/os.html#os_os_tmpdir)
@@ -1463,7 +1318,6 @@ If `--auth-type=sso`, the type of SSO type to use.
1318
1319
Historically, the location where temporary files were stored. No longer relevant.
1320
1466
-
1321
### See also
1322
1323
- [npm config](/cli/v7/commands/npm-config)
content/enterprise/index.mdx
-1
@@ -30,4 +30,3 @@ redirect_from:
30
In March 2020, npm was acquired by GitHub. On June 30, 2020, we notified npm Enterprise (npmE) customers of our intent to sunset npm Enterprise. **npm Enterprise will be supported until June 30, 2021**, and we will renew contracts for npmE until that date. We encourage all npmE customers to evaluate and migrate to GitHub Packages.
31
32
Customers who already have one of GitHub’s Free, Teams, or Enterprise Cloud plans already receive monthly storage and bandwidth resources for GitHub Packages as part of their plan. To begin evaluating GitHub Packages, visit our documentation on [publishing with GitHub Packages](https://help.github.com/en/packages/publishing-and-managing-packages/publishing-a-package) directly from your repository.
33
-
content/getting-started/configuring-your-local-environment/downloading-and-installing-node-js-and-npm.mdx
+6
-8
@@ -37,20 +37,20 @@ Node version managers allow you to install and switch between multiple versions
37
38
### OSX or Linux Node version managers
39
40
-* [nvm](https://github.com/creationix/nvm)
41
-* [n](https://github.com/tj/n)
40
+- [nvm](https://github.com/creationix/nvm)
41
+- [n](https://github.com/tj/n)
42
43
### Windows Node version managers
44
45
-* [nodist](https://github.com/marcelklehr/nodist)
46
-* [nvm-windows](https://github.com/coreybutler/nvm-windows)
45
+- [nodist](https://github.com/marcelklehr/nodist)
46
+- [nvm-windows](https://github.com/coreybutler/nvm-windows)
47
48
## Using a Node installer to install Node.js and npm
49
50
If you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system.
51
52
-* [Node.js installer](https://nodejs.org/en/download/)
53
-* [NodeSource installer](https://github.com/nodesource/distributions)
52
+- [Node.js installer](https://nodejs.org/en/download/)
53
+- [NodeSource installer](https://github.com/nodesource/distributions)
54
55
If you use Linux, we recommend that you use a NodeSource installer.
56
@@ -67,10 +67,8 @@ If you're using Linux or another operating system, use one of the following inst
67
68
Or see [this page](https://nodejs.org/en/download/package-manager/) to install npm for Linux in the way many Linux developers prefer.
69
70
-
70
### Less-common operating systems
71
72
For more information on installing Node.js on a variety of operating systems, see [this page][pkg-mgr].
73
75
-
74
[pkg-mgr]: https://nodejs.org/en/download/package-manager/
content/getting-started/managing-your-npm-user-account/changing-your-npm-username.mdx
+2
-4
@@ -2,11 +2,9 @@
2
title: Changing your npm username
3
---
4
5
-It is not currently possible to change your npm username. You'll need to
6
-create a new account and migrate the data to the new account manually.
5
+It is not currently possible to change your npm username. You'll need to create a new account and migrate the data to the new account manually.
6
7
1. Create a [new user account](/creating-a-new-npm-user-account) with your desired username
8
2. [Transfer your packages](/transferring-a-package-from-a-user-account-to-another-user-account) to your new account.
9
3. If you are a member of any [organizations](/organizations), ask the organization administrator to [invite your new account to the organization](/adding-members-to-your-organization).
11
-4. Delete your [original account](/deleting-your-npm-user-account). Note that this is permanent, and after 30 days, this account name is available for other people to claim.
12
-
10
+4. Delete your [original account](/deleting-your-npm-user-account). Note that this is permanent, and after 30 days, this account name is available for other people to claim.
content/getting-started/managing-your-npm-user-account/deleting-your-npm-user-account.mdx
+3
-2
@@ -1,6 +1,7 @@
1
---
2
title: Deleting your npm user account
3
---
4
+
5
import shared from '~/shared.js'
6
7
From the web, you can delete your npm user account.
@@ -15,11 +16,11 @@ From the web, you can delete your npm user account.
16
17
3. On this page, you will find a button to delete your account. Click that.
18
18
- <Screenshot src="/getting-started/managing-your-npm-user-account/delete-your-account.png" alt="Screenshot of button to press to delete your account" />
19
+ <Screenshot src="/getting-started/managing-your-npm-user-account/delete-your-account.png" alt="Screenshot of button to press to delete your account" />
20
21
4. You will now be presented with an overview of how many npm packages will be deleted and deprecated as part of your account deletion. If you agree with this, then enter your username and click "Delete this account".
22
22
- <Screenshot src="/getting-started/managing-your-npm-user-account/account-deletion-confirmation.png" alt="Screenshot of the confirmation screen to delete an account." />
23
+ <Screenshot src="/getting-started/managing-your-npm-user-account/account-deletion-confirmation.png" alt="Screenshot of the confirmation screen to delete an account." />
24
25
5. You will be immediately logged out, and will not be able to log back in.
26
content/getting-started/managing-your-npm-user-account/managing-your-profile-settings.mdx
+20
-19
@@ -3,6 +3,7 @@ title: Managing your profile settings
3
redirect_from:
4
- /getting-started/modifying_your_profile_from_command_line
5
---
6
+
7
import shared from '~/shared.js'
8
9
You can manage settings for your user account profile from the web or command line.
@@ -11,13 +12,13 @@ You can manage settings for your user account profile from the web or command li
12
13
From the web, you can change the following user profile settings:
14
14
-* Avatar
15
-* Password
16
-* Full name
17
-* Link GitHub Account
18
-* Link Twitter Account
19
-* Email address added to package metadata
20
-* Two-factor authentication status
15
+- Avatar
16
+- Password
17
+- Full name
18
+- Link GitHub Account
19
+- Link Twitter Account
20
+- Email address added to package metadata
21
+- Two-factor authentication status
22
23
1. <>{shared['user-login'].text}</>
24
@@ -101,12 +102,12 @@ npm profile get
102
103
From the CLI, you can change the following properties for your user account:
104
104
-* `email`
105
-* `two-factor auth`
106
-* `fullname`
107
-* `homepage`
108
-* `freenode`
109
-* `password`
105
+- `email`
106
+- `two-factor auth`
107
+- `fullname`
108
+- `homepage`
109
+- `freenode`
110
+- `password`
111
112
1. On the command line, type the following command, replacing `property` with the name of the property, and `value` with the new value:
113
@@ -124,9 +125,9 @@ For more details, see the `profile` [command line documentation](https://docs.np
125
126
1. On the command line, type the following command:
127
127
- ```
128
- npm profile set password
129
- ```
128
+```
129
+npm profile set password
130
+```
131
132
2. When prompted, provide your current password.
133
@@ -136,9 +137,9 @@ For more details, see the `profile` [command line documentation](https://docs.np
137
138
To protect your account, when you reset your password from the command line, it must:
139
139
-* be longer than 10 characters
140
-* not contain part of your username
141
-* not be in the "[Have I Been Pwned](https://haveibeenpwned.com/)" breach database
140
+- be longer than 10 characters
141
+- not contain part of your username
142
+- not be in the "[Have I Been Pwned](https://haveibeenpwned.com/)" breach database
143
144
</Note>
145
content/getting-started/managing-your-npm-user-account/requesting-your-data.mdx
+1
@@ -20,6 +20,7 @@ You can export and review the metadata that npm stores about your personal accou
20
4. Fill in the details and submit the form
21
22
## Retrieving the exported data
23
+
24
After a request is placed our support team will review it and initiate an export on your behalf. Once the export process is complete you will receive an email with a link to an archive of your personal data. You must be authenticated to npmjs.com to download this archive.
25
26
The download link will be available for 7 days, after which the exported data and the link is purged.
content/getting-started/paying-for-your-npm-user-account/downgrading-to-a-free-user-account-plan.mdx
+1
@@ -1,6 +1,7 @@
1
---
2
title: Downgrading to a free user account plan
3
---
4
+
5
import shared from '~/shared.js'
6
7
<Note>
content/getting-started/paying-for-your-npm-user-account/updating-user-account-billing-settings.mdx
+1
-1
@@ -1,6 +1,7 @@
1
---
2
title: Updating user account billing settings
3
---
4
+
5
import shared from '~/shared.js'
6
7
<Note>
@@ -84,4 +85,3 @@ You can update the email address used for receipts, and add extra information to
85
7. <>{shared['billing-extra-save'].text}</>
86
87
<>{shared['billing-extra-save'].image}</>
87
-
content/getting-started/paying-for-your-npm-user-account/upgrading-to-a-paid-user-account-plan.mdx
+2
-2
@@ -1,6 +1,7 @@
1
---
2
title: Upgrading to a paid user account plan
3
---
4
+
5
import shared from '~/shared.js'
6
7
<Note>
@@ -47,5 +48,4 @@ Your paid plan and billing cycle will start when you submit your credit card inf
48
49
9. Click **Pay $7.00**.
50
50
- <Screenshot src="/getting-started/paying-for-your-npm-user-account/billing-upgrade-button.png" alt="Screenshot of the payment confirmation button" />
51
-
51
+ <Screenshot src="/getting-started/paying-for-your-npm-user-account/billing-upgrade-button.png" alt="Screenshot of the payment confirmation button" />
content/getting-started/paying-for-your-npm-user-account/viewing-downloading-and-emailing-receipts-for-your-user-account.mdx
+1
@@ -1,6 +1,7 @@
1
---
2
title: Viewing, downloading, and emailing receipts for your npm user account
3
---
4
+
5
import shared from '~/shared.js'
6
7
<Note>
content/getting-started/setting-up-your-npm-user-account/about-two-factor-authentication.mdx
+14
-15
@@ -6,15 +6,14 @@ redirect_from:
6
7
[Two-factor authentication (2FA)][2fa] protects against unauthorized access to your account by confirming your identity using:
8
9
-* Something you know (e.g., a password).
10
-* Something you have (e.g., an ID badge or a cryptographic key).
11
-* Something you are (e.g., a fingerprint or other biometric data).
9
+- Something you know (e.g., a password).
10
+- Something you have (e.g., an ID badge or a cryptographic key).
11
+- Something you are (e.g., a fingerprint or other biometric data).
12
13
-When you enable 2FA, you will be prompted for a second form of authentication before performing certain actions on your account or packages to which you have write access. Depending on your 2FA configuration you will be either prompted to authenticate with a [security-key][webauthn] or a [time-based one-time password (TOTP)][totp].
14
-
15
-* The security-key flow allows you to use biometric devices such as Apple [Touch ID][touch-id], [Face ID][face-id] or [Windows Hello][windows-hello] as well as physical keys such as [Yubikey][yubikey], [Thetis][thetis] or [Feitian][feitian] as your 2FA.
16
-* To configure TOTP you will need to install an authenticator application that can generate OTPs such as [Authy][authy], [Google Authenticator][google-authenticator], or [Microsoft Authenticator][microsoft-authenticator] on your mobile device.
13
+When you enable 2FA, you will be prompted for a second form of authentication before performing certain actions on your account or packages to which you have write access. Depending on your 2FA configuration you will be either prompted to authenticate with a [security-key][webauthn] or a [time-based one-time password (TOTP)][totp].
14
15
+- The security-key flow allows you to use biometric devices such as Apple [Touch ID][touch-id], [Face ID][face-id] or [Windows Hello][windows-hello] as well as physical keys such as [Yubikey][yubikey], [Thetis][thetis] or [Feitian][feitian] as your 2FA.
16
+- To configure TOTP you will need to install an authenticator application that can generate OTPs such as [Authy][authy], [Google Authenticator][google-authenticator], or [Microsoft Authenticator][microsoft-authenticator] on your mobile device.
17
18
<Note>
19
@@ -49,14 +48,14 @@ By default, 2FA is enabled for authorization and writes. We will request a secon
48
49
If you enable 2FA for authorization only. We will request a second form of authentication only for certain authorized actions.
50
52
-| Action | CLI command |
53
-| :------------------------------------------------ | :------------------------------------------------ |
54
-| Log in to npm | [`npm login`][login] |
55
-| Change profile settings (including your password) | [`npm profile set`][profile-set] |
56
-| Change 2FA modes for your user account | [`npm profile enable-2fa auth-only`][2fa-enable] |
57
-| Disable 2FA for your user account | [`npm profile disable-2fa`][2fa-disable] |
58
-| Create tokens | [`npm token create`][token-create] |
59
-| Revoke tokens | [`npm token revoke`][token-revoke] |
51
+| Action | CLI command |
52
+| :------------------------------------------------ | :----------------------------------------------- |
53
+| Log in to npm | [`npm login`][login] |
54
+| Change profile settings (including your password) | [`npm profile set`][profile-set] |
55
+| Change 2FA modes for your user account | [`npm profile enable-2fa auth-only`][2fa-enable] |
56
+| Disable 2FA for your user account | [`npm profile disable-2fa`][2fa-disable] |
57
+| Create tokens | [`npm token create`][token-create] |
58
+| Revoke tokens | [`npm token revoke`][token-revoke] |
59
60
[login]: https://docs.npmjs.com/cli/adduser
61
[profile-set]: https://docs.npmjs.com/cli/profile
content/getting-started/setting-up-your-npm-user-account/accessing-npm-using-2fa.mdx
+19
-18
@@ -3,6 +3,7 @@ title: Accessing npm using two-factor authentication
3
redirect_from:
4
- /getting-started/using-two-factor-authentication
5
---
6
+
7
import shared from '~/shared.js'
8
9
## Sign in from the command line using security-key flow
@@ -22,7 +23,7 @@ import shared from '~/shared.js'
23
24
3. If you have configured a security-key, open the provided URL shown in the command line. Alternatively, if you have configured a mobile authenticator skip to step 6.
25
25
-4. Click on *Use security key* and follow the browser specific steps to authenticate.
26
+4. Click on _Use security key_ and follow the browser specific steps to authenticate.
27
28
<Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-use-security-key.png" alt="Screenshot showing security key prompt" />
29
@@ -44,15 +45,15 @@ npm 8.14.0 and higher support login flow through the browsers. This will become
45
46
2. When prompted hit "ENTER" to open your browser to start the login flow or click the provided URL show in the command line.
47
47
- ```
48
- user@host:~$ npm login
49
- npm notice Log in on https://registry.npmjs.org/
50
- Authenticate your account at:
51
- https://www.npmjs.com/login?next=/login/cli/b1a2f96a-ce09-4463-954c-c99f6773b922
52
- Press ENTER to open in the browser...
53
- ```
48
+ ```
49
+ user@host:~$ npm login
50
+ npm notice Log in on https://registry.npmjs.org/
51
+ Authenticate your account at:
52
+ https://www.npmjs.com/login?next=/login/cli/b1a2f96a-ce09-4463-954c-c99f6773b922
53
+ Press ENTER to open in the browser...
54
+ ```
55
55
-3. Click on *Use security key* and follow the browser specific steps to authenticate.
56
+3. Click on _Use security key_ and follow the browser specific steps to authenticate.
57
58
<Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-use-security-key.png" alt="Screenshot showing security key prompt" />
59
@@ -64,22 +65,22 @@ npm 8.14.0 and higher support login flow through the browsers. This will become
65
66
2. When prompted hit "ENTER" to open your browser to start the login flow or click the provided URL show in the command line.
67
67
- ```
68
- user@host:~$ npm login
69
- npm notice Log in on https://registry.npmjs.org/
70
- Authenticate your account at:
71
- https://www.npmjs.com/login?next=/login/cli/b1a2f96a-ce09-4463-954c-c99f6773b922
72
- Press ENTER to open in the browser...
73
- ```
68
+ ```
69
+ user@host:~$ npm login
70
+ npm notice Log in on https://registry.npmjs.org/
71
+ Authenticate your account at:
72
+ https://www.npmjs.com/login?next=/login/cli/b1a2f96a-ce09-4463-954c-c99f6773b922
73
+ Press ENTER to open in the browser...
74
+ ```
75
76
3. <>{shared['user-login'].text}</>
77
78
<>{shared['user-login'].image}</>
79
79
-4. Click on *Use security key* and follow the browser specific steps to authenticate.
80
+4. Click on _Use security key_ and follow the browser specific steps to authenticate.
81
82
<Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-use-security-key.png" alt="Screenshot showing security key prompt" />
83
84
_Note: If you have configured to use TOTP, you will see an TOTP prompt instead_
85
85
-[login]: https://docs.npmjs.com/cli/adduser
\ No newline at end of file
86
+[login]: https://docs.npmjs.com/cli/adduser
content/getting-started/setting-up-your-npm-user-account/configuring-two-factor-authentication.mdx
+32
-29
@@ -1,6 +1,7 @@
1
---
2
title: Configuring two-factor authentication
3
---
4
+
5
import shared from '~/shared.js'
6
7
You can enable two-factor authentication (2FA) on your npm user account to protect against unauthorized access to your account and packages, either by using a [security-key][webauthn] or [time-based one-time password (TOTP)][totp] from a mobile app.
@@ -9,13 +10,12 @@ You can enable two-factor authentication (2FA) on your npm user account to prote
10
11
Before you enable 2FA on your npm user account, you must:
12
12
-* Update your npm client to version 5.5.1 or higher.
13
-* To configure a security-key requires a modern browser that support [WebAuthn][can-i-use]. This will allow you to configure a biometric devices such as Apple [Touch ID][touch-id], [Face ID][face-id], or [Windows Hello][windows-hello] as well as physical keys such as [Yubikey][yubikey], [Thetis][thetis], or [Feitian][feitian].
14
-* To configure TOTP you will need to install an authenticator application that can generate OTPs such as [Authy][authy], [Google Authenticator][google-authenticator], or [Microsoft Authenticator][microsoft-authenticator] on your mobile device.
13
+- Update your npm client to version 5.5.1 or higher.
14
+- To configure a security-key requires a modern browser that support [WebAuthn][can-i-use]. This will allow you to configure a biometric devices such as Apple [Touch ID][touch-id], [Face ID][face-id], or [Windows Hello][windows-hello] as well as physical keys such as [Yubikey][yubikey], [Thetis][thetis], or [Feitian][feitian].
15
+- To configure TOTP you will need to install an authenticator application that can generate OTPs such as [Authy][authy], [Google Authenticator][google-authenticator], or [Microsoft Authenticator][microsoft-authenticator] on your mobile device.
16
17
For more information on supported 2FA methods, see "[About two-factor authentication][about-two-factor-authentication]".
18
18
-
19
<Note>
20
21
**Note:** npm does not accept SMS (text-to-phone) as a 2FA method.
@@ -42,19 +42,19 @@ For more information on supported 2FA methods, see "[About two-factor authentica
42
43
5. On the 2FA method page, select the method you would like to enable and click **Continue**. For more information on supported 2FA methods, see "[About two-factor authentication][about-two-factor-authentication]".
44
45
- <Screenshot src="/getting-started/setting-up-your-npm-user-account/device-selection.png" alt="Screenshot showing 2FA types" />
45
+ <Screenshot src="/getting-started/setting-up-your-npm-user-account/device-selection.png" alt="Screenshot showing 2FA types" />
46
47
6. Configure the 2FA method of your choice:
48
49
- * When using a **security-key**, provide a name for it and click **Add security key**. Follow the browser specific steps to add your security-key.
49
+ - When using a **security-key**, provide a name for it and click **Add security key**. Follow the browser specific steps to add your security-key.
50
51
<Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-add-security-key.png" alt="Screenshot showing security key setup" />
52
53
- Below is an example of configuration from Microsoft Edge running on a MacOS
54
-
53
+ - Below is an example of configuration from Microsoft Edge running on a MacOS
54
+
55
<Screenshot src="/getting-started/setting-up-your-npm-user-account/touch-id-mac-edge.png" alt="Screenshot showing 2FA device selection" />
56
57
- * When using an **authenticator application** on your phone, open it and scan the QR code on the two-step verification page. Enter the code generated by the app, then click **Verify**.
57
+ - When using an **authenticator application** on your phone, open it and scan the QR code on the two-step verification page. Enter the code generated by the app, then click **Verify**.
58
59
<Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-verify.png" alt="Screenshot showing 2FA device selection" />
60
@@ -62,18 +62,17 @@ For more information on supported 2FA methods, see "[About two-factor authentica
62
63
<Screenshot src="/getting-started/setting-up-your-npm-user-account/recovery-code.png" alt="Screenshot showing the Recovery Code page" />
64
65
-
65
_Recovery codes are the only way to ensure you can recover your account if you lose access to your second factor device. Each code can be used only once. You can [view and regenerate your recovery code][viewing-and-regenerating-recovery-code] from your 2FA settings page. For secondary account recovery options, see "[Configuring account recovery options][configuring-account-recovery-options]."_
66
67
8. Click **Go back to settings** after confirming that you have saved your codes.
68
70
-### Disabling 2FA for writes
69
+### Disabling 2FA for writes
70
71
Check the [Authorization and writes][authorization-and-writes] section for more information on different operations that requires 2FA when this mode is enabled.
72
73
<Note>
74
76
-**Note**: As a recommended setting, 2FA for write operations are _automatically enabled_ when setting up 2FA. The following steps explain how to disable it.
75
+**Note**: As a recommended setting, 2FA for write operations are _automatically enabled_ when setting up 2FA. The following steps explain how to disable it.
76
77
</Note>
78
@@ -90,6 +89,7 @@ Check the [Authorization and writes][authorization-and-writes] section for more
89
<Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-modify.png" alt="Screenshot showing Modify 2FA button" />
90
91
4. From the "Manage Two-Factor Authentication" navigate to "Additional Options" section
92
+
93
5. Clear the checkbox for "Require two-factor authentication for write actions" and click "Update Preferences"
94
95
<Screenshot src="/getting-started/setting-up-your-npm-user-account/disable-2fa-button.png" alt="Screenshot showing a cleared check box to disable 2fa under Addition options" />
@@ -137,26 +137,30 @@ Although security-key with WebAuthn can be used for authentication from both the
137
1. If you are logged out on the command line, log in using `npm login` command.
138
139
2. On the command line, type the [`npm profile`](/cli/profile) command along with the option for the 2FA mode you want to enable:
140
- * To enable 2FA for authorization and writes, type:<br/>
141
- ```
142
- npm profile enable-2fa auth-and-writes
143
-
144
- ```
145
- * To enable 2FA for authorization only, type:<br/>
146
-
147
- ```
148
- npm profile enable-2fa auth-only
149
- ```
140
+
141
+ - To enable 2FA for authorization and writes, type:<br/>
142
+
143
+ ```
144
+ npm profile enable-2fa auth-and-writes
145
+
146
+ ```
147
+
148
+ - To enable 2FA for authorization only, type:<br/>
149
+
150
+ ```
151
+ npm profile enable-2fa auth-only
152
+ ```
153
154
3. To add npm to your authenticator application, using the device with the app, you can either:
152
- * Scan the QR code displayed on the command line.
153
- * Type the number displayed below the QR code.
155
+
156
+ - Scan the QR code displayed on the command line.
157
+ - Type the number displayed below the QR code.
158
159
4. When prompted to add an OTP code from your authenticator, on the command line, enter a one-time password generated by your authenticator app.
160
161
### Sending a one-time password from the command line
162
159
-If you have enabled 2FA auth-and-writes, you will need to send the TOTP from the command line for certain commands to work. To do this, append `--otp=123456` (where *123456* is the code generated by your authenticator) at the end of the command. Here are a few examples:
163
+If you have enabled 2FA auth-and-writes, you will need to send the TOTP from the command line for certain commands to work. To do this, append `--otp=123456` (where _123456_ is the code generated by your authenticator) at the end of the command. Here are a few examples:
164
165
```
166
npm publish [<tarball>|<folder>][--tag <tag>] --otp=123456
@@ -183,7 +187,7 @@ npm unpublish [<@scope>/]<pkg>[@<version>] --otp=123456
187
188
4. When prompted for a one-time password, enter a password from your authenticator app:
189
186
- <Prompt>Enter one-time password from your authenticator: <PromptReply>123456</PromptReply></Prompt>
190
+ <Prompt>Enter one-time password from your authenticator: <strong>123456</strong></Prompt>
191
192
## Configuring account recovery options
193
@@ -200,9 +204,8 @@ When you enable 2FA on your npm user account, we strongly recommend you link you
204
3. To [link your GitHub][advanced-github-setup] account, on the account settings page, under "Linked Accounts & Recovery Option", click **Link with GitHub**.
205
206
<Screenshot src="/getting-started/setting-up-your-npm-user-account/link-github-account.png" alt="Screenshot showing Link GitHub account button" />
203
-
207
+
208
4. On the authorization page, verify all information looks correct. Then click **Authorize npm account link**.
205
-
209
5. To [link your Twitter][advanced-twitter-setup] account, on the account settings page, under "Linked Accounts & Recovery Option", click **Link with Twitter**.
210
211
<Screenshot src="/getting-started/setting-up-your-npm-user-account/link-twitter-account.png" alt="Screenshot showing Link Twitter account button" />
@@ -236,5 +239,5 @@ Also, when you reset two-factor authentication after it has been disabled, the a
239
[thetis]: https://thetis.io/
240
[feitian]: https://www.ftsafe.com/
241
[configuring-account-recovery-options]: /configuring-two-factor-authentication#configuring-account-recovery-options
239
-[advanced-github-setup]:managing-your-profile-settings#linking-your-npm-and-github-accounts
242
+[advanced-github-setup]: managing-your-profile-settings#linking-your-npm-and-github-accounts
243
[advanced-twitter-setup]: /managing-your-profile-settings#linking-your-npm-and-twitter-accounts
content/getting-started/setting-up-your-npm-user-account/creating-a-new-npm-user-account.mdx
+10
-8
@@ -9,6 +9,7 @@ If you do not already have an npm user account, you can create an account in ord
9
1. Go to the [npm signup page](https://www.npmjs.com/signup)
10
11
2. In the user signup form, type in the fields:
12
+
13
- **Username:** The username that will be displayed when you publish packages or interact with other npm users on npmjs.com. Your username must be lower case, and can contain hyphens and numerals.
14
- **Email address:** Your public email address will be added to the metadata of your packages and will be visible to anyone who downloads your packages. We will also send email to this account when you update packages, as well as occasional product updates and information.
15
- **Password**: Your password must meet [our password guidelines](creating-a-strong-password).
@@ -16,9 +17,11 @@ If you do not already have an npm user account, you can create an account in ord
17
<Screenshot src="/getting-started/setting-up-your-npm-user-account/signup-form.png" alt="Screenshot of the signup form" />
18
19
3. Read the [End User License Agreement](https://www.npmjs.com/policies/terms) and [Privacy Policy](https://www.npmjs.com/policies/privacy), and indicate that you agree to them.
20
+
21
<Screenshot src="/getting-started/setting-up-your-npm-user-account/privacy-policy.png" alt="Screenshot of the privacy policy" />
22
23
4. Click **Create An Account**.
24
+
25
<Screenshot src="/getting-started/setting-up-your-npm-user-account/create-account-button.png" alt="Screenshot of the create account button" />
26
27
<Note>
@@ -39,17 +42,16 @@ Use the <a href="https://docs.npmjs.com/cli/adduser">`npm login`</a> command to
42
43
1. On the command line, type the following command:
44
42
- ```
43
- npm login
44
- ```
45
+ ```
46
+ npm login
47
+ ```
48
49
2. When prompted, enter your username, password, and email address.
50
3. If you have [two-factor authentication](about-two-factor-authentication) enabled, when prompted, enter a one-time password.
51
4. To test that you have successfully logged in, type:
52
50
- ```
51
- npm whoami
52
- ```
53
-
54
- Your npm username should be displayed.
53
+ ```
54
+ npm whoami
55
+ ```
56
57
+ Your npm username should be displayed.
content/getting-started/setting-up-your-npm-user-account/creating-a-strong-password.mdx
+7
-7
@@ -6,16 +6,16 @@ Secure your npm account with a strong and unique password using a password manag
6
7
You must choose or generate a password for your npm account that:
8
9
-* is longer than 10 characters
10
-* does not match or significantly contain your username, e.g. do not use 'username123'
11
-* has not been compromised and known to the [Have I Been Pwned](https://haveibeenpwned.com/) breach database
9
+- is longer than 10 characters
10
+- does not match or significantly contain your username, e.g. do not use 'username123'
11
+- has not been compromised and known to the [Have I Been Pwned](https://haveibeenpwned.com/) breach database
12
13
To keep your account secure, we recommend you follow these best practices:
14
15
-* Use a password manager, such as [1Password](https://1password.com/), to generate a password more than 16 characters.
16
-* Generate a unique password for npm. If you use your npm password elsewhere and that service is compromised, then attackers or other malicious actors could use that information to access your npm account.
17
-* Configure two-factor authentication for your account. For more information, see "About two-factor authentication."
18
-* Never share your password, even with a potential collaborator. Each person should use their own personal account on npm. For more information on ways to collaborate, see: "[npm organizations](/organizations)".
15
+- Use a password manager, such as [1Password](https://1password.com/), to generate a password more than 16 characters.
16
+- Generate a unique password for npm. If you use your npm password elsewhere and that service is compromised, then attackers or other malicious actors could use that information to access your npm account.
17
+- Configure two-factor authentication for your account. For more information, see "About two-factor authentication."
18
+- Never share your password, even with a potential collaborator. Each person should use their own personal account on npm. For more information on ways to collaborate, see: "[npm organizations](/organizations)".
19
20
When you type a password to sign in, create an account, or change your password, npm will check if the password you entered is considered weak according to datasets like HaveIBeenPwned. The password may be identified as weak even if you have never used that password before.
21
content/getting-started/setting-up-your-npm-user-account/receiving-a-one-time-password-over-email.mdx
+7
-7
@@ -1,9 +1,10 @@
1
---
2
title: Receiving a one-time password over email
3
---
4
+
5
import shared from '~/shared.js'
6
6
-For your security, npm may require additional verification to allow you to log in to your account. If you do not have [two-factor authentication](configuring-two-factor-authentication) enabled, you may be asked to verify yourself with a one-time password sent to the email address configured for your account.
7
+For your security, npm may require additional verification to allow you to log in to your account. If you do not have [two-factor authentication](configuring-two-factor-authentication) enabled, you may be asked to verify yourself with a one-time password sent to the email address configured for your account.
8
9
## Logging in with a one-time password
10
@@ -36,14 +37,13 @@ If you are unable to access the email linked to your npm account, you can submit
37
2. Under the "Login Verification" form, click **Try recovering your account**.
38
39
3. <>{shared['start-account-recovery'].text}</>
39
-
40
+
41
<>{shared['start-account-recovery'].image}</>
42
43
4. <>{shared['support-ticket-form'].text}</>
44
44
- * <>{shared['enter-email-address'].text}</>
45
- * In the **How can we help?** section, select **Reset my email**.
46
- * <>{shared['support-ticket-other'].text}</>
47
- <>{shared['connect-to-accounts'].text}</>
45
+ - <>{shared['enter-email-address'].text}</>
46
+ - In the **How can we help?** section, select **Reset my email**.
47
+ - <>{shared['support-ticket-other'].text}</><>{shared['connect-to-accounts'].text}</>
48
49
-5. <>{shared['submit-support-ticket'].text}</>
\ No newline at end of file
49
+5. <>{shared['submit-support-ticket'].text}</>
content/getting-started/setting-up-your-npm-user-account/recovering-your-2fa-enabled-account.mdx
+13
-12
@@ -1,14 +1,17 @@
1
---
2
title: Recovering your 2FA-enabled account
3
---
4
+
5
import shared from '~/shared.js'
6
7
When you have two-factor access enabled on your account, and you lose access to your 2FA device, you may be able to recover your account using the following methods.
8
9
## Misplaced second factor device
10
+
11
If you have misplaced the device that provided second-factor authentication, you can use the recovery codes generated when you [enabled 2FA][setup-recovery-codes] to access your account.
12
13
### Using recovery code on the web
14
+
15
1. Locate the recovery codes generated that you have saved.
16
17
2. <>{shared['user-login'].text}</>
@@ -23,11 +26,11 @@ If you have misplaced the device that provided second-factor authentication, you
26
27
4. Enter an unused recovery code in the "Use a Recovery Code" prompt.
28
26
- <Screenshot src="/getting-started/setting-up-your-npm-user-account/user-a-recovery-code.png" alt="Screenshot showing use a recovery code prompt with an input box to enter the recovery code" />
29
+ <Screenshot src="/getting-started/setting-up-your-npm-user-account/user-a-recovery-code.png" alt="Screenshot showing use a recovery code prompt with an input box to enter the recovery code" />
30
31
5. You are now logged into npm.
32
30
-6. (Optional) To disable 2FA, see "[Disabling 2FA][removing-2fa-on-the-web]".
33
+6. (Optional) To disable 2FA, see "[Disabling 2FA][removing-2fa-on-the-web]".
34
35
### Using recovery code from the command line
36
@@ -39,7 +42,7 @@ If you have misplaced the device that provided second-factor authentication, you
42
43
<Prompt>Enter one-time password:</Prompt>
44
42
-4. Once you are logged in, use the below and enter your npm password if prompted.
45
+4. Once you are logged in, use the below and enter your npm password if prompted.
46
47
```
48
npm profile disable-2fa
@@ -65,7 +68,7 @@ If you are using a [time-based one-time password (TOTP)][totp] mobile app and wa
68
69
<Note>
70
68
-**Note:** Once you regenerate a set of code, all previous recovery codes become invalid. Each code can be used only once.
71
+**Note:** Once you regenerate a set of code, all previous recovery codes become invalid. Each code can be used only once.
72
73
</Note>
74
@@ -102,19 +105,17 @@ If you have misplaced both your 2FA device and your recovery codes, you can cont
105
3. Under the "Use a Recovery Code" form, click **Try recovering your account**.
106
107
4. <>{shared['start-account-recovery'].text}</>
105
-
108
+
109
<>{shared['start-account-recovery'].image}</>
110
108
-5. If you have access to your registered email, enter the one-time password sent to your email in the **One-Time Password** field, then click **Verify Email Address**.
109
-_If you do not have access to your registered email, select **Skip email verification** at the bottom of the form._
111
+5. If you have access to your registered email, enter the one-time password sent to your email in the **One-Time Password** field, then click **Verify Email Address**. _If you do not have access to your registered email, select **Skip email verification** at the bottom of the form._
112
113
6. <>{shared['support-ticket-form'].text}</>
114
113
- * <>{shared['enter-email-address'].text}</>
114
- * In the **How can we help?** section, select **Reset my two-factor authentication (2FA)**.
115
- * <>{shared['support-ticket-other'].text}</>
116
- <>{shared['connect-to-accounts'].text}</>
117
-
115
+ - <>{shared['enter-email-address'].text}</>
116
+ - In the **How can we help?** section, select **Reset my two-factor authentication (2FA)**.
117
+ - <>{shared['support-ticket-other'].text}</><>{shared['connect-to-accounts'].text}</>
118
+
119
<Screenshot src="/getting-started/setting-up-your-npm-user-account/recover-account.png" alt="Screenshot showing existing recovery codes and a button to generate set of recovery codes" />
120
121
7. <>{shared['submit-support-ticket'].text}</>
content/getting-started/troubleshooting/common-errors.mdx
+16
-21
@@ -36,8 +36,8 @@ If your npm is broken:
36
37
## Random errors
38
39
-* Some strange issues can be resolved by simply running `npm cache clean` and trying again.
40
-* If you are having trouble with `npm install`, use the `-verbose` option to see more details.
39
+- Some strange issues can be resolved by simply running `npm cache clean` and trying again.
40
+- If you are having trouble with `npm install`, use the `-verbose` option to see more details.
41
42
## No compatible version found
43
@@ -59,9 +59,9 @@ npm ERR! Error: ENOSPC, write
59
60
You are trying to install on a drive that either has no space, or has no permission to write.
61
62
-* Free some disk space or
63
-* Set the tmp folder somewhere with more space: `npm config set tmp /path/to/big/drive/tmp` or
64
-* Build Node yourself and install it somewhere writable with lots of space.
62
+- Free some disk space or
63
+- Set the tmp folder somewhere with more space: `npm config set tmp /path/to/big/drive/tmp` or
64
+- Build Node yourself and install it somewhere writable with lots of space.
65
66
## No git
67
@@ -87,7 +87,7 @@ You need to [install git](http://git-scm.com/book/en/Getting-Started-Installing-
87
> config.vm.provision :shell, inline: "mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` > www /home/vagrant/www", run: "always"
88
> ```
89
>
90
-> In the code above, I am appending ```\\?\``` to the current directory absolute path. This will actually force the Windows API to allow an increase in the MAX_PATH variable (normally capped at 260). Read more about [max path](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath). This is happening during the sharedfolder creation which is intentionally handled by VBoxManage and not Vagrant's "synced_folder" method. The last bit is pretty self-explanatory; we create the new shared folder and then make sure it's mounted each time the machine is accessed or touched since Vagrant likes to reload its mounts/shared folders on each load.
90
+> In the code above, I am appending `\\?\` to the current directory absolute path. This will actually force the Windows API to allow an increase in the MAX_PATH variable (normally capped at 260). Read more about [max path](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath). This is happening during the sharedfolder creation which is intentionally handled by VBoxManage and not Vagrant's "synced_folder" method. The last bit is pretty self-explanatory; we create the new shared folder and then make sure it's mounted each time the machine is accessed or touched since Vagrant likes to reload its mounts/shared folders on each load.
91
92
## npm only uses `git:` and `ssh+git:` URLs for GitHub repos, breaking proxies
93
@@ -130,11 +130,10 @@ npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
130
131
Either:
132
133
-* upgrade your version of npm `npm install npm -g --ca=""`
134
-* tell your current version of npm to use known registrars `npm config set ca=""`
133
+- upgrade your version of npm `npm install npm -g --ca=""`
134
+- tell your current version of npm to use known registrars `npm config set ca=""`
135
136
-If this does not fix the problem, then you may have an SSL-intercepting proxy.
137
-(For example, https://github.com/npm/npm/issues/7439#issuecomment-76024878)
136
+If this does not fix the problem, then you may have an SSL-intercepting proxy. (For example, https://github.com/npm/npm/issues/7439#issuecomment-76024878)
137
138
## SSL-intercepting proxy
139
@@ -152,8 +151,8 @@ npm ERR! Error: 404 Not Found
151
npm http 500 https://registry.npmjs.org/phonegap
152
```
153
155
-* It's most likely a temporary npm registry glitch. Check [npm server status](http://status.npmjs.org/) and try again later.
156
-* If the error persists, perhaps the published package is corrupt. Contact the package owner and have them publish a new version of the package.
154
+- It's most likely a temporary npm registry glitch. Check [npm server status](http://status.npmjs.org/) and try again later.
155
+- If the error persists, perhaps the published package is corrupt. Contact the package owner and have them publish a new version of the package.
156
157
## Invalid JSON
158
@@ -169,12 +168,9 @@ npm ERR! SyntaxError: Unexpected token <
168
npm ERR! registry error parsing json
169
```
170
172
-* Possible temporary npm registry glitch, or corrupted local server cache.
173
-Run `npm cache clean` and/or try again later.
174
-* This can be caused by corporate proxies that give HTML
175
-responses to `package.json` requests. Check npm's proxy [configuration](/misc/config).
176
-* Check that it's not a problem with a package you're trying to install
177
-(e.g. invalid `package.json`).
171
+- Possible temporary npm registry glitch, or corrupted local server cache. Run `npm cache clean` and/or try again later.
172
+- This can be caused by corporate proxies that give HTML responses to `package.json` requests. Check npm's proxy [configuration](/misc/config).
173
+- Check that it's not a problem with a package you're trying to install (e.g. invalid `package.json`).
174
175
## Many `ENOENT` / `ENOTEMPTY` errors in output
176
@@ -186,8 +182,7 @@ Take a look at [issue #5920](https://github.com/npm/npm/issues/5920). ~~We're wo
182
183
## `npm login` errors
184
189
-Sometimes `npm login` fails for no obvious reason. The first thing to do is to log in at [https://www.npmjs.com/login](https://www.npmjs.com/login) and check that your e-mail address on `npmjs.com` matches the
190
-email address you are giving to `npm login`.
185
+Sometimes `npm login` fails for no obvious reason. The first thing to do is to log in at [https://www.npmjs.com/login](https://www.npmjs.com/login) and check that your e-mail address on `npmjs.com` matches the email address you are giving to `npm login`.
186
187
If that's not the problem, or if you are seeing the message `"may not mix password_sha and pbkdf2"`, then
188
@@ -208,7 +203,7 @@ Check if you have two temp directories set in your `.npmrc`:
203
> npm config ls -l
204
```
205
211
-Look for lines defining the `tmp` config variable. If you find more than one, remove all but one of them.
206
+Look for lines defining the `tmp` config variable. If you find more than one, remove all but one of them.
207
208
See [https://github.com/npm/npm/issues/7590](https://github.com/npm/npm/issues/7590) for more about this unusual problem.
209
content/getting-started/troubleshooting/try-the-latest-stable-version-of-node.mdx
+6
-6
@@ -14,7 +14,7 @@ node -v
14
15
### Updating node on Linux
16
17
-For some Linux distributions (Debian/Ubuntu and RedHat/CentOS), the latest node version provided by the distribution may lag behind the stable version. Here are [instructions from NodeSource](https://github.com/nodesource/distributions) on getting the latest node.
17
+For some Linux distributions (Debian/Ubuntu and RedHat/CentOS), the latest node version provided by the distribution may lag behind the stable version. Here are [instructions from NodeSource](https://github.com/nodesource/distributions) on getting the latest node.
18
19
### Updating node on Windows
20
@@ -34,8 +34,8 @@ brew install node
34
35
Node.js has lots of versions, and its development is very active. As a good practice to manage the various versions, we recommend that you use a version manager for your Node.js installation. There are many great options, here are a few:
36
37
-+ [NVM](https://github.com/creationix/nvm)
38
-+ [nodist](https://github.com/marcelklehr/nodist)
39
-+ [n](https://github.com/tj/n)
40
-+ [nave](https://github.com/isaacs/nave)
41
-+ [nodebrew](https://github.com/hokaccha/nodebrew)
37
+- [NVM](https://github.com/creationix/nvm)
38
+- [nodist](https://github.com/marcelklehr/nodist)
39
+- [n](https://github.com/tj/n)
40
+- [nave](https://github.com/isaacs/nave)
41
+- [nodebrew](https://github.com/hokaccha/nodebrew)
content/getting-started/troubleshooting/try-the-latest-stable-version-of-npm.mdx
+21
-20
@@ -28,29 +28,29 @@ By default, npm is installed alongside node in
28
29
npm's globally installed packages (including, potentially, npm itself) are stored separately in a user-specific directory (which is currently
30
31
- `C:\Users\<username>\AppData\Roaming\npm`).
31
+`C:\Users\<username>\AppData\Roaming\npm`).
32
33
- Because the installer puts
33
+Because the installer puts
34
35
- `C:\Program Files (x86)\nodejs`
35
+`C:\Program Files (x86)\nodejs`
36
+
37
+before
38
37
- before
39
+`C:\Users\<username>\AppData\Roaming\npm`
40
39
- `C:\Users\<username>\AppData\Roaming\npm`
41
+on your `PATH`, it will always use the version of npm installed with node instead of the version of npm you installed using `npm -g install npm@<version>`.
42
41
- on your `PATH`, it will always use the version of npm installed with node instead of the version of npm you installed using `npm -g install npm@<version>`.
43
+To get around this, you can do **one** of the following:
44
43
- To get around this, you can do **one** of the following:
45
+- Option 1: [edit your Windows installation's `PATH`](http://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them) to put `%appdata%\npm` before `%ProgramFiles%\nodejs`. Remember that you'll need to restart `cmd.exe` (and potentially restart Windows) when you make changes to `PATH` or how npm is installed.
46
45
-* Option 1: [edit your Windows installation's `PATH`](http://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them) to put `%appdata%\npm` before `%ProgramFiles%\nodejs`.
46
-Remember that you'll need to restart `cmd.exe` (and potentially restart Windows) when you make changes to `PATH` or how npm is installed.
47
+- Option 2: remove both of
48
48
-* Option 2: remove both of
49
- * `%ProgramFiles%\nodejs\npm`
50
- * `%ProgramFiles%\nodejs\npm.cmd`
49
+ - `%ProgramFiles%\nodejs\npm`
50
+ - `%ProgramFiles%\nodejs\npm.cmd`
51
+
52
+- Option 3: Navigate to `%ProgramFiles%\nodejs\node_modules\npm` and copy the `npmrc`file to another folder or the desktop. Then open `cmd.exe` as an administrator and run the following commands:
53
52
-* Option 3: Navigate to `%ProgramFiles%\nodejs\node_modules\npm` and copy the `npmrc`file to another folder or the desktop.
53
-Then open `cmd.exe` as an administrator and run the following commands:
54
```bash
55
cd %ProgramFiles%\nodejs
56
npm install npm@latest
@@ -58,17 +58,18 @@ npm install npm@latest
58
59
If you installed npm with the node.js installer, after doing one of the previous steps, do the following.
60
61
-* Option 1 or 2
62
- * Go into `%ProgramFiles%\nodejs\node_modules\npm` and copy the file named `npmrc` in the new npm folder, which should be `%appdata%\npm\node_modules\npm`. This will tell the new npm where the global installed packages are.
61
+- Option 1 or 2
62
+
63
+ - Go into `%ProgramFiles%\nodejs\node_modules\npm` and copy the file named `npmrc` in the new npm folder, which should be `%appdata%\npm\node_modules\npm`. This will tell the new npm where the global installed packages are.
64
64
-* Option 3
65
- * Copy the npmrc file back into `%ProgramFiles%\nodejs\node_modules\npm`
65
+- Option 3
66
+ - Copy the npmrc file back into `%ProgramFiles%\nodejs\node_modules\npm`
67
67
-*(See also the [point below](https://docs.npmjs.com/common-errors#error-enoent-stat-cusersuserappdataroamingnpm-on-windows-7) if you're running Windows 7 and don't have the directory `%appdata%\npm`.)*
68
+_(See also the [point below](https://docs.npmjs.com/common-errors#error-enoent-stat-cusersuserappdataroamingnpm-on-windows-7) if you're running Windows 7 and don't have the directory `%appdata%\npm`.)_
69
70
### A brief note on the built-in Windows configuration
71
71
-The Node installer installs, directly into the npm folder, a special piece of Windows-specific configuration that tells npm where to install global packages. When npm is used to install itself, it is supposed to copy this special `builtin` configuration into the new install. There was a bug in some versions of npm that kept this from working, so you may need to go in and fix that up by hand. Run the following command to see where npm will install global packages to verify it is correct.
72
+The Node installer installs, directly into the npm folder, a special piece of Windows-specific configuration that tells npm where to install global packages. When npm is used to install itself, it is supposed to copy this special `builtin` configuration into the new install. There was a bug in some versions of npm that kept this from working, so you may need to go in and fix that up by hand. Run the following command to see where npm will install global packages to verify it is correct.
73
74
```
75
npm config get prefix -g
content/integrations/integrating-npm-with-external-services/about-access-tokens.mdx
+16
-17
@@ -11,23 +11,23 @@ redirect_from:
11
12
</Note>
13
14
-An access token is an alternative to using your username and password for authenticating to npm when using the API or the npm command-line interface (CLI). An access token is a hexadecimal string that you can use to authenticate, and which gives you the right to install and/or publish your modules.
14
+An access token is an alternative to using your username and password for authenticating to npm when using the API or the npm command-line interface (CLI). An access token is a hexadecimal string that you can use to authenticate, and which gives you the right to install and/or publish your modules.
15
16
There are two types of access tokens available:
17
18
-* [Legacy tokens](#about-legacy-tokens)
19
-* [Granular access tokens](#about-granular-access-tokens)
18
+- [Legacy tokens](#about-legacy-tokens)
19
+- [Granular access tokens](#about-granular-access-tokens)
20
21
-You can create access tokens to give other tools (such as continuous integration testing environments) access to your npm packages. For example, GitHub Actions provides the ability to store [secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets), such as access tokens, that you can then use to authenticate. When your workflow runs, it will be able to complete npm tasks as you, including installing private packages you can access.
21
+You can create access tokens to give other tools (such as continuous integration testing environments) access to your npm packages. For example, GitHub Actions provides the ability to store [secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets), such as access tokens, that you can then use to authenticate. When your workflow runs, it will be able to complete npm tasks as you, including installing private packages you can access.
22
23
You can work with tokens from the web or the CLI, whichever is easiest. What you do in each environment will be reflected in the other environment.
24
25
npm token commands let you:
26
27
-* View tokens for easier tracking and management
28
-* Create new legacy tokens
29
-* Limit access according to IP address ranges (CIDR)
30
-* Delete/revoke tokens
27
+- View tokens for easier tracking and management
28
+- Create new legacy tokens
29
+- Limit access according to IP address ranges (CIDR)
30
+- Delete/revoke tokens
31
32
For more information on creating and viewing access tokens on the web and CLI, see "[Creating and viewing access tokens][create-token]".
33
@@ -37,10 +37,9 @@ Legacy tokens are created with the same permissions as the user who created them
37
38
There are three different types of legacy tokens:
39
40
-
41
-* **Read-only**: You can use these tokens to download packages from the registry. These tokens are best for automation and workflows where you are installing packages. For greater security, we recommend using [granular access tokens](#about-granular-access-tokens) instead.
42
-* **Automation**: You can use these tokens to download packages and install new ones. These tokens are best for automation workflows where you are publishing new packages. Automation tokens do not 2FA for executing operations on npm and are suitable for CI/CD workflows. For greater security, we recommend using [granular access tokens](#about-granular-access-tokens) instead.
43
-* **Publish**: You can use these tokens to download packages, install packages, and update user and package settings. We recommend using them for interactive workflows such as a CLI. If 2FA is enabled on your account, publish tokens will require 2FA to execute sensitive operations on npm.
40
+- **Read-only**: You can use these tokens to download packages from the registry. These tokens are best for automation and workflows where you are installing packages. For greater security, we recommend using [granular access tokens](#about-granular-access-tokens) instead.
41
+- **Automation**: You can use these tokens to download packages and install new ones. These tokens are best for automation workflows where you are publishing new packages. Automation tokens do not 2FA for executing operations on npm and are suitable for CI/CD workflows. For greater security, we recommend using [granular access tokens](#about-granular-access-tokens) instead.
42
+- **Publish**: You can use these tokens to download packages, install packages, and update user and package settings. We recommend using them for interactive workflows such as a CLI. If 2FA is enabled on your account, publish tokens will require 2FA to execute sensitive operations on npm.
43
44
Legacy tokens do not have an expiration date. It is important to be aware of your tokens and keep them protected for account security. For more information, see "[Securing your token][secure-token]."
45
@@ -48,11 +47,11 @@ Legacy tokens do not have an expiration date. It is important to be aware of you
47
48
Granular access tokens allow you to restrict access provided to the token based on what you want to use the token for. With granular access tokens, you can:
49
51
-* Restrict which packages and scopes a token has access to
52
-* Grant tokens access to specific organizations
53
-* Set a token expiration date
54
-* Limit token access based on IP address ranges
55
-* Select between **read-only** or **read and write** access
50
+- Restrict which packages and scopes a token has access to
51
+- Grant tokens access to specific organizations
52
+- Set a token expiration date
53
+- Limit token access based on IP address ranges
54
+- Select between **read-only** or **read and write** access
55
56
You can create up to 1000 granular access tokens on your npm account. You can set how long your token is valid for, at least one day in the future. Each token can access up to 50 organizations, and up to either 50 packages, 50 scopes, or a combination of 50 packages and scopes. Access tokens are tied to users’ permission; hence it cannot have more permission than the user at any point in time. If a user has their access revoked from a package or an org., their granular access token also will have its access revoked from those packages or org.
57
content/integrations/integrating-npm-with-external-services/creating-and-viewing-access-tokens.mdx
+14
-15
@@ -16,7 +16,6 @@ You can [create](#creating-access-tokens) and [view](#viewing-access-tokens) acc
16
17
</Note>
18
19
-
19
1. In the upper right corner of the page, click your profile picture, then click **Access Tokens**.
20
21
<Screenshot src="/integrations/integrating-npm-with-external-services/tokens-profile.png" alt="Screenshot of the account menu with the tokens link selected" />
@@ -29,11 +28,11 @@ You can [create](#creating-access-tokens) and [view](#viewing-access-tokens) acc
28
29
4. Select the type of access token:
30
32
- - **Read-only**: A read-only token can only be used to download packages from the registry. It will have permission to read any private package that you have access to. This is recommended for automation and workflows where you are installing packages, but not publishing new ones.
31
+ - **Read-only**: A read-only token can only be used to download packages from the registry. It will have permission to read any private package that you have access to. This is recommended for automation and workflows where you are installing packages, but not publishing new ones.
32
34
- - **Automation**: An automation token can download packages and publish new ones, but if you have two-factor authentication (2FA) configured on your account, it will **not** be enforced. You can use an automation token in continuous integration workflows and other automation systems to publish a package even when you cannot enter a one-time passcode.
33
+ - **Automation**: An automation token can download packages and publish new ones, but if you have two-factor authentication (2FA) configured on your account, it will **not** be enforced. You can use an automation token in continuous integration workflows and other automation systems to publish a package even when you cannot enter a one-time passcode.
34
36
- - **Publish**: A publish token can perform any action on your behalf, including downloading packages, publishing packages, and changing user settings or package settings. If you have two-factor authentication configured on your account, you will be required to enter a one-time passcode when using a publish token. This is recommended for interactive workflows such as a CLI.
35
+ - **Publish**: A publish token can perform any action on your behalf, including downloading packages, publishing packages, and changing user settings or package settings. If you have two-factor authentication configured on your account, you will be required to enter a one-time passcode when using a publish token. This is recommended for interactive workflows such as a CLI.
36
37
<Screenshot src="/integrations/integrating-npm-with-external-services/token-level-select.png" alt="Screenshot of the access level selection" />
38
@@ -65,12 +64,13 @@ You can [create](#creating-access-tokens) and [view](#viewing-access-tokens) acc
64
65
- In the **Permissions** dropdown menu, select **No access**, **Read-only**, or **Read and write**.
66
- Under **Select Packages**, select either:
68
- - **All Packages** to grant the token access to all packages the user account has access to.
69
- - **Only select packages and scopes** to choose up to 50 specific packages or scopes to give the token access to. Then select specific packages or scopes from the dropdown menu.
67
+ - **All Packages** to grant the token access to all packages the user account has access to.
68
+ - **Only select packages and scopes** to choose up to 50 specific packages or scopes to give the token access to. Then select specific packages or scopes from the dropdown menu.
69
70
<Screenshot src="/integrations/integrating-npm-with-external-services/granular-access-token-packages-scopes.png" alt="Screenshot of the packages and scopes section" />
71
72
8. (Optional) In the **Organizations** section, configure your token's access to organizations.
73
+
74
- In the **Permissions** dropdown menu, select **No access**, **Read-only**, or **Read and write**.
75
- Under **Select organizations**, select the organizations you want to grant your token access to.
76
@@ -78,11 +78,11 @@ You can [create](#creating-access-tokens) and [view](#viewing-access-tokens) acc
78
79
_**Note**: When you give a token access to an organization, the token can only be used for managing organization settings and teams or users associated with the organization. It does not give the token the right to publish packages managed by the organization._
80
81
-9. Review the token summary, then click **Generate Token**.
81
+9. Review the token summary, then click **Generate Token**.
82
83
- <Screenshot src="/integrations/integrating-npm-with-external-services/granular-access-token-summary.png" alt="Screenshot of the granular access token summary and the generate token button" />
83
+ <Screenshot src="/integrations/integrating-npm-with-external-services/granular-access-token-summary.png" alt="Screenshot of the granular access token summary and the generate token button" />
84
85
-10. Copy the token from the top of page.
85
+10. Copy the token from the top of page.
86
87
### Creating tokens with the CLI
88
@@ -97,13 +97,13 @@ You can create tokens with **read-only** permissions or **read and publish** per
97
- **Read-only:** Tokens that allow installation and distribution only, but no publishing or other rights associated with your account.
98
- **Publish:** The default setting for new tokens, and most permissive token type. Publish tokens allow installation, distribution, modification, publishing, and all rights that you have on your account.
99
100
-In addition, you can specify that the token is only valid for a specific IPv4 address range, using [CIDR][cidr-wiki] notation. The token will only be valid when used from the specified IP addresses.
100
+In addition, you can specify that the token is only valid for a specific IPv4 address range, using [CIDR][cidr-wiki] notation. The token will only be valid when used from the specified IP addresses.
101
102
1. To create a new token, on the command line, run:
103
- * `npm token create` for a read and publish token
104
- * `npm token create --read-only` for a read-only token
105
- * `npm token create --cidr=[list]` for a CIDR-restricted read and publish token. For example, `npm token create --cidr=192.0.2.0/24`
106
- * `npm token create --read-only --cidr=[list]` for a CIDR-restricted read-only token
103
+ - `npm token create` for a read and publish token
104
+ - `npm token create --read-only` for a read-only token
105
+ - `npm token create --cidr=[list]` for a CIDR-restricted read and publish token. For example, `npm token create --cidr=192.0.2.0/24`
106
+ - `npm token create --read-only --cidr=[list]` for a CIDR-restricted read-only token
107
2. When prompted, enter your password.
108
3. If you have enabled [two-factor authentication][tfa], when prompted, enter a one-time password.
109
4. Copy the token from the **token** field in the command output.
@@ -148,6 +148,5 @@ npm token list
148
- **readonly:** If yes, indicates a read-only token. If no, indicates a token with both read and publish permissions.
149
- **CIDR whitelist:** Restricts token use by IP address.
150
151
-
151
[tfa]: about-two-factor-authentication
152
[cidr-wiki]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
content/organizations/creating-and-managing-organizations/converting-your-user-account-to-an-organization.mdx
+1
-1
@@ -3,6 +3,7 @@ title: Converting your user account to an organization
3
redirect_from:
4
- /converting-your-user-account-to-an-org
5
---
6
+
7
import shared from '~/shared.js'
8
9
If you have an npm user account, you can convert your user account to an organization. When you convert your user account to an organization, we will:
@@ -41,4 +42,3 @@ If you have an npm user account, you can convert your user account to an organiz
42
<>{shared['billing-organization-plans'].image}</>
43
44
7. If you selected to use the unlimited private packages plan, in the payment dialog, provide the email, name, address, and credit card information for the card that will be used to pay for the organization.
44
-
content/organizations/creating-and-managing-organizations/creating-an-organization.mdx
+5
-4
@@ -4,6 +4,7 @@ redirect_from:
4
- /orgs/creating-an-org
5
- /creating-an-org
6
---
7
+
8
import shared from '~/shared.js'
9
10
Any npm user can create an organization to manage contributor access to packages governed by the organization.
@@ -22,19 +23,19 @@ Any npm user can create an organization to manage contributor access to packages
23
24
<>{shared['organization-create'].image}</>
25
25
-3. On the organization creation page, in the **Name** field, type a name for your organization. Your organization name will also be your organization scope.
26
+1. On the organization creation page, in the **Name** field, type a name for your organization. Your organization name will also be your organization scope.
27
28
<Screenshot src="/organizations/creating-and-managing-organizations/create-name.png" alt="Screenshot showing the new organization name field" />
29
29
-4. Under the **Name** field, choose either the "Unlimited private packages" paid plan or the "Unlimited public packages" free plan and click **Buy** or **Create**.
30
+1. Under the **Name** field, choose either the "Unlimited private packages" paid plan or the "Unlimited public packages" free plan and click **Buy** or **Create**.
31
32
<>{shared['billing-organization-plans'].image}</>
33
33
-5. (Optional) On the organization invitation page, type the npm username or email address of a person you would like to add to your organization as a member and select a team to invite them to, then click **Invite**.
34
+1. (Optional) On the organization invitation page, type the npm username or email address of a person you would like to add to your organization as a member and select a team to invite them to, then click **Invite**.
35
36
<Screenshot src="/organizations/creating-and-managing-organizations/create-invite.png" alt="Screenshot showing the invitation options for a new organization" />
37
37
-6. Click **Continue**.
38
+1. Click **Continue**.
39
40
<Screenshot src="/organizations/creating-and-managing-organizations/create-confirm.png" alt="Screenshot showing the new organization confirmation" />
41
content/organizations/creating-and-managing-organizations/deleting-an-organization.mdx
+8
-11
@@ -3,14 +3,10 @@ title: Deleting an organization
3
redirect_from:
4
- /deleting-an-org
5
---
6
+
7
import shared from '~/shared.js'
8
8
-An organization administrator can delete the organization; packages in
9
-the organization will also [be deleted](/unpublishing-packages-from-the-registry) if they fulfill the
10
-[requirements to unpublish packages](/policies/unpublish). Packages that
11
-cannot be deleted can be
12
-[deprecated](/deprecating-and-undeprecating-packages-or-package-versions)
13
-instead.
9
+An organization administrator can delete the organization; packages in the organization will also [be deleted](/unpublishing-packages-from-the-registry) if they fulfill the [requirements to unpublish packages](/policies/unpublish). Packages that cannot be deleted can be [deprecated](/deprecating-and-undeprecating-packages-or-package-versions) instead.
10
11
1. <>{shared['user-login'].text}</>
12
@@ -21,18 +17,19 @@ instead.
17
<>{shared['account-settings'].image}</>
18
19
3. In the left sidebar, click the name of the organization that you want to delete.
24
- <Screenshot src="/organizations/creating-and-managing-organizations/left-sidebar.png" alt="Screenshot of left sidebar" />
20
+
21
+ <Screenshot src="/organizations/creating-and-managing-organizations/left-sidebar.png" alt="Screenshot of left sidebar" />
22
23
4. <>{shared['organization-billing-tab'].text}</>
24
25
<>{shared['organization-billing-tab'].image}</>
26
27
5. Under "delete organization", click <strong>Delete</strong>.
31
- <Screenshot src="/organizations/creating-and-managing-organizations/org-delete-button.png" alt="Screenshot of org delete button" />
28
33
-6. You will be given an overview of the packages in your organization and what will happen to them when your organization is deleted. Packages that [can be unpublished](/unpublishing-packages-from-the-registry) will be deleted.
29
+ <Screenshot src="/organizations/creating-and-managing-organizations/org-delete-button.png" alt="Screenshot of org delete button" />
30
35
- If you are sure that you want to continue, enter your organization name and click <strong>Delete this organization</strong>.
31
+6. You will be given an overview of the packages in your organization and what will happen to them when your organization is deleted. Packages that [can be unpublished](/unpublishing-packages-from-the-registry) will be deleted.
32
37
- <Screenshot src="/organizations/creating-and-managing-organizations/org-delete-plan.png" alt="Screenshot of org delete plan" />
33
+ If you are sure that you want to continue, enter your organization name and click <strong>Delete this organization</strong>.
34
35
+ <Screenshot src="/organizations/creating-and-managing-organizations/org-delete-plan.png" alt="Screenshot of org delete plan" />
content/organizations/creating-and-managing-organizations/renaming-an-organization.mdx
-1
@@ -15,7 +15,6 @@ To rename an organization, as an organization owner, you must manually migrate y
15
5. In the new organization teams, [configure package access][pkg-access] to match team package access in your old organization.
16
6. [Contact npm Support][contact-support] to have the outdated packages unpublished and the previous organization deleted.
17
18
-
18
[contact-support]: https://www.npmjs.com/support
19
[org-create]: creating-an-organization
20
[add-org-members]: adding-members-to-your-organization
content/organizations/creating-and-managing-organizations/requiring-two-factor-authentication-in-your-organization.mdx
+5
-4
@@ -1,6 +1,7 @@
1
---
2
title: Requiring two-factor authentication in your organization
3
---
4
+
5
import shared from '~/shared.js'
6
7
Organization owners can require organization members to enable two-factor authentication for their personal accounts, making it harder for malicious actors to access an organization's packages and settings
@@ -12,9 +13,10 @@ Two-factor authentication (2FA) is an extra layer of security used when logging
13
<Note>
14
15
**Note:**
15
- * When you require use of two-factor authentication for your organization, members who do not use 2FA will be removed from the organization and lose access to its packages. You can add them back to the organization if they enable two-factor authentication.
16
- * An organization owner cannot opt-in to requiring 2FA for an organization if they do not have 2FA enabled on their account.
17
- * If you are the member of an organization that requires 2FA you will not be able to disable 2FA until you leave that organization.
16
+
17
+- When you require use of two-factor authentication for your organization, members who do not use 2FA will be removed from the organization and lose access to its packages. You can add them back to the organization if they enable two-factor authentication.
18
+- An organization owner cannot opt-in to requiring 2FA for an organization if they do not have 2FA enabled on their account.
19
+- If you are the member of an organization that requires 2FA you will not be able to disable 2FA until you leave that organization.
20
21
</Note>
22
@@ -26,7 +28,6 @@ Before you require use of two-factor authentication, we recommend notifying orga
28
29
## Requiring two-factor authentication in your organization
30
29
-
31
1. <>{shared['user-login'].text}</>
32
33
<>{shared['user-login'].image}</>
content/organizations/managing-organization-members/adding-members-to-your-organization.mdx
+1
@@ -3,6 +3,7 @@ title: Adding members to your organization
3
redirect_from:
4
- /adding-members-to-your-org
5
---
6
+
7
import shared from '~/shared.js'
8
9
As an organization owner, you can add other npm users to your organization to give them read or read and write access to public and private packages within your organization's scope, as well as public unscoped packages governed by your organization.
content/organizations/managing-organization-members/managing-organization-permissions.mdx
+1
-1
@@ -3,6 +3,7 @@ title: Managing organization permissions
3
redirect_from:
4
- /managing-org-permissions
5
---
6
+
7
import shared from '~/shared.js'
8
9
As an organization owner, you can change the role of any member of your organization to add or remove permissions on the organization for that member.
@@ -28,4 +29,3 @@ As an organization owner, you can change the role of any member of your organiza
29
6. In the member row, to select the new role of the organization member, click **member**, **admin**, or **owner**.
30
31
<Screenshot src="/organizations/managing-organization-members/change-member-role.png" alt="Screenshot showing the change member role option" />
31
-
content/organizations/managing-organization-members/organization-roles-and-permissions.mdx
+15
-14
@@ -3,6 +3,7 @@ title: Organization roles and permissions
3
redirect_from:
4
- /org-roles-and-permissions
5
---
6
+
7
import shared from '~/shared.js'
8
9
There are three roles in an organization:
@@ -14,17 +15,17 @@ There are three roles in an organization:
15
<><strong>On the public registry, you cannot remove the last owner from an organization.</strong> To delete an organization, {shared['contact-support'].text}.</>
16
17
| Action | **Owner** | **Admin** | **Member** |
17
-|:------------------------------------------------------|:---------:|:---------:|:----------:|
18
-| Manage organization billing | X | | |
19
-| Add members to the organization | X | | |
20
-| Remove members from the organization | X | | |
21
-| Rename an organization | X | | |
22
-| Delete an organization | X | | |
23
-| Change any organization member's role | X | | |
24
-| Add org owned packages to other orgs | X | | |
25
-| Create teams | X | X | |
26
-| Delete teams | X | X | |
27
-| Add any member to any team | X | X | |
28
-| Remove any member from any team | X | X | |
29
-| Manage team package access | X | X | |
30
-| Create and publish packages in the organization scope | X | X | X |
18
+| :---------------------------------------------------- | :-------: | :-------: | :--------: |
19
+| Manage organization billing | X | | |
20
+| Add members to the organization | X | | |
21
+| Remove members from the organization | X | | |
22
+| Rename an organization | X | | |
23
+| Delete an organization | X | | |
24
+| Change any organization member's role | X | | |
25
+| Add org owned packages to other orgs | X | | |
26
+| Create teams | X | X | |
27
+| Delete teams | X | X | |
28
+| Add any member to any team | X | X | |
29
+| Remove any member from any team | X | X | |
30
+| Manage team package access | X | X | |
31
+| Create and publish packages in the organization scope | X | X | X |
content/organizations/managing-organization-members/removing-members-from-your-organization.mdx
+1
@@ -3,6 +3,7 @@ title: Removing members from your organization
3
redirect_from:
4
- /removing-members-from-your-org
5
---
6
+
7
import shared from '~/shared.js'
8
9
As an organization owner, you can remove members from your organization if they are no longer collaborating on packages owned or governed by your organization.
content/organizations/managing-organization-packages/about-organization-scopes-and-packages.mdx
-1
@@ -18,5 +18,4 @@ Packages in a scope must follow the same [naming guidelines][name-guidelines] as
18
19
While you are granted a scope by default when you create an organization, you can also use organizations to manage unscoped packages, or packages under a different scope (such as a user scope).
20
21
-
21
[name-guidelines]: /files/package.json#name
content/organizations/managing-organization-packages/configuring-your-npm-client-with-your-organization-settings.mdx
+8
-6
@@ -41,9 +41,9 @@ For packages you do not want to publish with your organization's scope, you must
41
42
2. Run the following command, replacing <org-name> with the name of your organization:
43
44
- ```
45
- npm config set scope <org-name>
46
- ```
44
+ ```
45
+ npm config set scope <org-name>
46
+ ```
47
48
## Changing default package visibility to public
49
@@ -62,11 +62,13 @@ You can set a single package to pass `--access public ` to every `npm publish` c
62
```
63
cd /path/to/package
64
65
+ ```
66
+
67
2. Run the following command:
68
67
- ```
68
- npm config set access public
69
- ```
69
+ ```
70
+ npm config set access public
71
+ ```
72
73
### Setting package visibility to public for all packages
74
content/organizations/managing-organization-packages/creating-and-publishing-an-organization-scoped-package.mdx
+1
@@ -3,6 +3,7 @@ title: Creating and publishing an organization scoped package
3
redirect_from:
4
- /creating-and-publishing-an-org-scoped-package
5
---
6
+
7
import shared from '~/shared.js'
8
9
As an organization member, you can create and publish public and private packages within the organization's scope.
content/organizations/managing-teams/about-developers-team.mdx
+5
-10
@@ -5,23 +5,18 @@ title: About the developers team
5
The "**developers**" team is automatically created when you create an organization. By default, the developers team has read/write access to all new packages created under the organization's scope.
6
7
- Members added to the organization, including the organization owner, are automatically added to the **developers** team
8
-- The [`maintainers` field] in the [`package.json`] of any newly created packages under the organization scope
9
-is automatically populated with the members of the current **developers** team
8
+- The [`maintainers` field] in the [`package.json`] of any newly created packages under the organization scope is automatically populated with the members of the current **developers** team
9
11
-If you create a new package under your organization's scope and you do not
12
-want members of the **developers** team to have read/write access to that
13
-package, an owner or admin can remove the **developers** team's access to that
14
-package. For more information, see "[Managing team access to organization packages][pkg-access]".
10
+If you create a new package under your organization's scope and you do not want members of the **developers** team to have read/write access to that package, an owner or admin can remove the **developers** team's access to that package. For more information, see "[Managing team access to organization packages][pkg-access]".
11
16
-If an owner adds a new member to an organization and **does not** want
17
-that member to be on the **developers** team, an owner can remove them.
12
+If an owner adds a new member to an organization and **does not** want that member to be on the **developers** team, an owner can remove them.
13
14
<Note>
15
16
**Note:** The **developers** team can no longer be removed from an organization for the following reasons:
17
23
-* It is the source of truth for all users, packages, and default permissions in an organization.
24
-* When you want to restrict write access, it is almost always better to set the default permissions to read-only and create separate teams for managing write permissions.
18
+- It is the source of truth for all users, packages, and default permissions in an organization.
19
+- When you want to restrict write access, it is almost always better to set the default permissions to read-only and create separate teams for managing write permissions.
20
21
</Note>
22
content/organizations/managing-teams/adding-organization-members-to-teams.mdx
+2
-3
@@ -3,6 +3,7 @@ title: Adding organization members to teams
3
redirect_from:
4
- /adding-org-members-to-teams
5
---
6
+
7
import shared from '~/shared.js'
8
9
As an organization owner or team admin, you can add organization members to teams to give them access to a specific set of packages governed by the organization.
@@ -49,8 +50,7 @@ As an organization owner or team admin, you can add organization members to team
50
51
## Managing teams from the CLI
52
52
-If you would like to manage the membership of your team from
53
-the command line interface (CLI), you can use:
53
+If you would like to manage the membership of your team from the command line interface (CLI), you can use:
54
55
```
56
npm team
@@ -58,6 +58,5 @@ npm team
58
59
For more information, see the [CLI documentation on teams][team-cli].
60
61
-
61
[add-organization-members]: adding-members-to-your-organization
62
[team-cli]: /cli/team
content/organizations/managing-teams/creating-teams.mdx
+1
@@ -1,6 +1,7 @@
1
---
2
title: Creating teams
3
---
4
+
5
import shared from '~/shared.js'
6
7
As an organization owner or team admin, you can create teams to manage access to sets of packages governed by your organization.
content/organizations/managing-teams/managing-team-access-to-organization-packages.mdx
+5
-5
@@ -4,6 +4,7 @@ redirect_from:
4
- /managing-team-access-to-org-packages
5
- /managing-team-access-to-packages
6
---
7
+
8
import shared from '~/shared.js'
9
10
As an organization owner or team admin, you can add or remove package access to or from teams in your organization.
@@ -46,8 +47,7 @@ As an organization owner or team admin, you can add or remove package access to
47
48
### Adding package access to a team using the CLI
49
49
-As an organization owner or team admin, you can use the CLI `access` command to add package access to a team on
50
-the command line:
50
+As an organization owner or team admin, you can use the CLI `access` command to add package access to a team on the command line:
51
52
```
53
npm access grant <read-only|read-write> <org:team> [<package>]
@@ -85,12 +85,12 @@ For more information, see "[npm-access][access-cli]".
85
86
### Removing package access from a team using the CLI
87
88
-As an organization owner or team admin, you can also use the CLI `access` command to revoke package access from a team on
89
-the command line:
88
+As an organization owner or team admin, you can also use the CLI `access` command to revoke package access from a team on the command line:
89
90
```
91
npm access revoke <org:team> [<package>]
92
```
93
+
94
For more information, see "[npm-access][access-cli]".
95
96
## Changing package access for a team
@@ -128,7 +128,7 @@ As an organization owner or team admin, you can change package access for a team
128
```
129
npm access
130
```
131
-For more information, see the [`npm-access` CLI documentation][access-cli].
131
132
+For more information, see the [`npm-access` CLI documentation][access-cli].
133
134
[access-cli]: /cli/access
content/organizations/managing-teams/removing-organization-members-from-teams.mdx
+1
@@ -3,6 +3,7 @@ title: Removing organization members from teams
3
redirect_from:
4
- /removing-org-members-from-teams
5
---
6
+
7
import shared from '~/shared.js'
8
9
As an organization owner or team admin, you can remove organization members from teams if they no longer need access to packages accessible to the team.
content/organizations/managing-teams/removing-teams.mdx
+1
@@ -1,6 +1,7 @@
1
---
2
title: Removing teams
3
---
4
+
5
import shared from '~/shared.js'
6
7
As an organization owner or team admin, you can remove teams that no longer need access to a set of packages governed by your organization. Removing the team will not remove the team members or packages from your organization.
content/organizations/paying-for-your-organization/downgrading-to-a-free-organization-plan.mdx
+2
-2
@@ -3,6 +3,7 @@ title: Downgrading to a free organization plan
3
redirect_from:
4
- /downgrading-to-a-free-org-plan
5
---
6
+
7
import shared from '~/shared.js'
8
9
<Note>
@@ -11,7 +12,7 @@ import shared from '~/shared.js'
12
13
</Note>
14
14
-If you are a subscriber to the npm Teams product (you have a paid organization) and you are an owner of the organization, then you can downgrade from npm Teams to a free organization. When you downgrade from a paid to a free organization, you and your organization members will lose the ability to install and publish private packages at the end of your last paid billing cycle. Your private packages will _not_ be made publicly visible when you downgrade to a free plan.
15
+If you are a subscriber to the npm Teams product (you have a paid organization) and you are an owner of the organization, then you can downgrade from npm Teams to a free organization. When you downgrade from a paid to a free organization, you and your organization members will lose the ability to install and publish private packages at the end of your last paid billing cycle. Your private packages will _not_ be made publicly visible when you downgrade to a free plan.
16
17
**Note:** If you would like to pay for fewer seats, you can remove members from your organization by following the steps in "[Removing members from your organization][remove-members]".
18
@@ -39,5 +40,4 @@ If you are a subscriber to the npm Teams product (you have a paid organization)
40
41
<>{shared['billing-downgrade-confirm'].image}</>
42
42
-
43
[remove-members]: removing-members-from-your-org
content/organizations/paying-for-your-organization/updating-organization-billing-settings.mdx
+1
@@ -3,6 +3,7 @@ title: Updating organization billing settings
3
redirect_from:
4
- /updating-org-billing-settings
5
---
6
+
7
import shared from '~/shared.js'
8
9
<Note>
content/organizations/paying-for-your-organization/upgrading-to-a-paid-organization-plan.mdx
+3
-3
@@ -3,6 +3,7 @@ title: Upgrading to a paid organization plan
3
redirect_from:
4
- /upgrading-to-a-paid-org-plan
5
---
6
+
7
import shared from '~/shared.js'
8
9
<Note>
@@ -11,7 +12,7 @@ import shared from '~/shared.js'
12
13
</Note>
14
14
-As an organization owner, you can upgrade your free organization plan to the npm Teams product. npm Teams is a paid plan to give organization members the ability to install and publish private packages. For more information about npm Teams and our organization pricing plans, see the "npm Teams" section of [our pricing page][org-plans-link].
15
+As an organization owner, you can upgrade your free organization plan to the npm Teams product. npm Teams is a paid plan to give organization members the ability to install and publish private packages. For more information about npm Teams and our organization pricing plans, see the "npm Teams" section of [our pricing page][org-plans-link].
16
17
If you have an organization with a private packages plan, your organization will cost you seven (7) dollars a month per user. **The $7 charge is a flat fee for any member of the organization even if the teams the member belongs do not have access to private packages**
18
@@ -55,8 +56,7 @@ Newly added members to an organization are always billed during the next billing
56
57
<>{shared['payment-remember-me'].image}</>
58
58
-10. Click **Pay** for the monthly amount. The monthly amount will be the number of members in your organization multiplied by $7.
59
-
59
+11. Click **Pay** for the monthly amount. The monthly amount will be the number of members in your organization multiplied by $7.
60
61
[org-plans-link]: https://www.npmjs.com/pricing
62
[add-members]: adding-members-to-your-org
content/organizations/paying-for-your-organization/viewing-downloading-and-emailing-receipts-for-your-organization.mdx
+2
-1
@@ -3,6 +3,7 @@ title: Viewing, downloading, and emailing receipts for your organization
3
redirect_from:
4
- /viewing-downloading-and-emailing-receipts-for-your-org
5
---
6
+
7
import shared from '~/shared.js'
8
9
<Note>
@@ -37,7 +38,7 @@ As an organization owner, you can view, download, and email receipts for the com
38
39
6. To view a single receipt, find the row of the receipt you want to view, then, on the right side of the row, click the view icon.
40
40
-6. <>{shared['billing-view'].text}</>
41
+7. <>{shared['billing-view'].text}</>
42
43
<>{shared['billing-view'].image}</>
44
content/packages-and-modules/contributing-packages-to-the-registry/about-package-readme-files.mdx
-1
@@ -33,5 +33,4 @@ The README file will only be updated on the package page when you publish a new
33
npm publish
34
```
35
36
-
36
[markdown-link]: https://guides.github.com/features/mastering-markdown/#what
content/packages-and-modules/contributing-packages-to-the-registry/about-semantic-versioning.mdx
+4
-5
@@ -17,7 +17,7 @@ To keep the JavaScript ecosystem healthy, reliable, and secure, every time you m
17
To help developers who rely on your code, we recommend starting your package version at `1.0.0` and incrementing as follows:
18
19
| Code status | Stage | Rule | Example version |
20
-|-------------|-------|------|----------------|
20
+| --- | --- | --- | --- |
21
| First release | New product | Start with 1.0.0 | 1.0.0 |
22
| Backward compatible bug fixes | Patch release | Increment the third digit | 1.0.1 |
23
| Backward compatible new features | Minor release | Increment the middle digit and reset last digit to zero | 1.1.0 |
@@ -29,9 +29,9 @@ You can specify which update types your package can accept from dependencies in
29
30
For example, to specify acceptable version ranges up to 1.0.4, use the following syntax:
31
32
-* Patch releases: `1.0` or `1.0.x` or `~1.0.4`
33
-* Minor releases: `1` or `1.x` or `^1.0.4`
34
-* Major releases: `*` or `x`
32
+- Patch releases: `1.0` or `1.0.x` or `~1.0.4`
33
+- Minor releases: `1` or `1.x` or `^1.0.4`
34
+- Major releases: `*` or `x`
35
36
For more information on semantic versioning syntax, see the [npm semver calculator][semver-calc].
37
@@ -49,7 +49,6 @@ For more information on semantic versioning syntax, see the [npm semver calculat
49
50
<YouTube id="kK4Meix58R4" />
51
52
-
52
[semver-calc]: https://semver.npmjs.com/
53
[pkg-json]: creating-a-package-json-file
54
[semver-org]: http://semver.org/
content/packages-and-modules/contributing-packages-to-the-registry/adding-dist-tags-to-packages.mdx
-1
@@ -60,6 +60,5 @@ To add the "stable" tag to the 1.4.0 version of the "example-package" package, y
60
npm dist-tag add example-package@1.4.0 stable
61
```
62
63
-
63
[semver]: about-semantic-versioning
64
[dist-tag]: /cli/dist-tag
content/packages-and-modules/contributing-packages-to-the-registry/creating-a-package-json-file.mdx
+14
-18
@@ -9,11 +9,9 @@ You can add a `package.json` file to your package to make it easy for others to
9
10
A `package.json` file:
11
12
-* lists the packages your project depends on
13
-* specifies versions of a package that your project
14
-can use using [semantic versioning rules][semver]
15
-* makes your build reproducible, and therefore easier
16
-to share with other developers
12
+- lists the packages your project depends on
13
+- specifies versions of a package that your project can use using [semantic versioning rules][semver]
14
+- makes your build reproducible, and therefore easier to share with other developers
15
16
<Note>
17
@@ -51,7 +49,7 @@ Your Name <email@example.com> (http://example.com)
49
50
## Creating a new `package.json` file
51
54
-You can create a `package.json` file by running a CLI questionnaire or creating a default `package.json` file.
52
+You can create a `package.json` file by running a CLI questionnaire or creating a default `package.json` file.
53
54
### Running a CLI questionnaire
55
@@ -75,7 +73,6 @@ To create a `package.json` file with values that you supply, use the `npm init`
73
74
If you expect to create many `package.json` files, you can customize the questions asked and fields created during the `init` process so all the `package.json` files contain a standard set of information.
75
78
-
76
1. In your home directory, create a file called `.npm-init.js`.
77
78
2. To add custom questions, using a text editor, add questions with the `prompt` function:
@@ -97,8 +94,7 @@ To learn more about creating advanced `npm init` customizations, see the [init-p
94
95
### Creating a default `package.json` file
96
100
-To create a default `package.json` using information extracted from the current directory, use the `npm init` command with the `--yes`
101
-or `-y` flag. For a list of default values, see "[Default values extracted from the current directory](#default-values-extracted-from-the-current-directory)".
97
+To create a default `package.json` using information extracted from the current directory, use the `npm init` command with the `--yes` or `-y` flag. For a list of default values, see "[Default values extracted from the current directory](#default-values-extracted-from-the-current-directory)".
98
99
1. On the command line, navigate to the root directory of your package.
100
@@ -141,15 +137,15 @@ Wrote to /home/monatheoctocat/my_package/package.json:
137
138
#### Default values extracted from the current directory
139
144
- - `name`: the current directory name
145
- - `version`: always `1.0.0`
146
- - `description`: info from the README, or an empty string `""`
147
- - `scripts`: by default creates an empty `test` script
148
- - `keywords`: empty
149
- - `author`: empty
150
- - `license`: [`ISC`][isc-license]
151
- - `bugs`: information from the current directory, if present
152
- - `homepage`: information from the current directory, if present
140
+- `name`: the current directory name
141
+- `version`: always `1.0.0`
142
+- `description`: info from the README, or an empty string `""`
143
+- `scripts`: by default creates an empty `test` script
144
+- `keywords`: empty
145
+- `author`: empty
146
+- `license`: [`ISC`][isc-license]
147
+- `bugs`: information from the current directory, if present
148
+- `homepage`: information from the current directory, if present
149
150
### Setting config options for the init command
151
content/packages-and-modules/contributing-packages-to-the-registry/creating-and-publishing-private-packages.mdx
+19
-18
@@ -3,6 +3,7 @@ title: Creating and publishing private packages
3
redirect_from:
4
- /private-modules/intro
5
---
6
+
7
import shared from '~/shared.js'
8
9
To share your code with a limited set of users or teams, you can publish private user-scoped or organization-scoped packages to the npm registry.
@@ -13,8 +14,7 @@ For more information on scopes and private packages, see "[About scopes][scopes]
14
15
**Note:** Before you can publish private user-scoped npm packages, you must <a href="https://npmjs.com/signup">sign up</a> for a paid npm user account.
16
16
-Additionally, to publish private organization-scoped packages, you must <a href="https://npmjs.com/signup">create an npm user account</a>, then <a href="https://www.npmjs.com/signup?next=/org/create">
17
-create a paid npm organization</a>.
17
+Additionally, to publish private organization-scoped packages, you must <a href="https://npmjs.com/signup">create an npm user account</a>, then <a href="https://www.npmjs.com/signup?next=/org/create"> create a paid npm organization</a>.
18
19
</Note>
20
@@ -22,37 +22,38 @@ create a paid npm organization</a>.
22
23
1. If you are using npmrc to [manage accounts on multiple registries][reg-config], on the command line, switch to the appropriate profile:
24
25
- ```
26
- npmrc <profile-name>
27
- ```
25
+ ```
26
+ npmrc <profile-name>
27
+ ```
28
29
2. On the command line, create a directory for your package:
30
31
- ```
32
- mkdir my-test-package
33
- ```
31
+ ```
32
+ mkdir my-test-package
33
+ ```
34
35
3. Navigate to the root directory of your package:
36
37
- ```
38
- cd my-test-package
39
- ```
37
+ ```
38
+ cd my-test-package
39
+ ```
40
41
4. If you are using git to manage your package code, in the package root directory, run the following commands, replacing `git-remote-url` with the git remote URL for your package:
42
43
- ```
44
- git init
45
- git remote add origin git://git-remote-url
46
- ```
43
+ ```
44
+ git init
45
+ git remote add origin git://git-remote-url
46
+ ```
47
48
5. In the package root directory, run the `npm init` command and pass the scope to the `scope` flag:
49
50
- * For an organization-scoped package, replace `my-org` with the name of your organization:
50
+ - For an organization-scoped package, replace `my-org` with the name of your organization:
51
+
52
```
53
npm init --scope=@my-org
54
```
55
55
- * For a user-scoped package, replace `my-username` with your username:
56
+ - For a user-scoped package, replace `my-username` with your username:
57
```
58
npm init --scope=@my-username
59
```
@@ -93,7 +94,7 @@ By default, scoped packages are published with private visibility.
94
npm publish
95
```
96
96
-3. To see your private package page, visit https://npmjs.com/package/*package-name*, replacing *package-name* with the name of your package. Private packages will say `private` below the package name on the npm website.
97
+3. To see your private package page, visit https://npmjs.com/package/*package-name*, replacing *package-name\* with the name of your package. Private packages will say `private` below the package name on the npm website.
98
99
<>{shared['organization-package-private'].image}</>
100
content/packages-and-modules/contributing-packages-to-the-registry/creating-and-publishing-scoped-public-packages.mdx
+26
-25
@@ -1,6 +1,7 @@
1
---
2
title: Creating and publishing scoped public packages
3
---
4
+
5
import shared from '~/shared.js'
6
7
To share your code publicly in a user or organization namespace, you can publish public user-scoped or organization-scoped packages to the npm registry.
@@ -19,37 +20,38 @@ Additionally, to publish organization-scoped packages, you must <a href="https:/
20
21
1. If you are using npmrc to [manage accounts on multiple registries][reg-config], on the command line, switch to the appropriate profile:
22
22
- ```
23
- npmrc <profile-name>
24
- ```
23
+ ```
24
+ npmrc <profile-name>
25
+ ```
26
27
2. On the command line, create a directory for your package:
28
28
- ```
29
- mkdir my-test-package
30
- ```
29
+ ```
30
+ mkdir my-test-package
31
+ ```
32
33
3. Navigate to the root directory of your package:
34
34
- ```
35
- cd my-test-package
36
- ```
35
+ ```
36
+ cd my-test-package
37
+ ```
38
39
4. If you are using git to manage your package code, in the package root directory, run the following commands, replacing `git-remote-url` with the git remote URL for your package:
40
40
- ```
41
- git init
42
- git remote add origin git://git-remote-url
43
- ```
41
+ ```
42
+ git init
43
+ git remote add origin git://git-remote-url
44
+ ```
45
46
5. In the package root directory, run the `npm init` command and pass the scope to the `scope` flag:
47
47
- * For an organization-scoped package, replace `my-org` with the name of your organization:
48
+ - For an organization-scoped package, replace `my-org` with the name of your organization:
49
+
50
```
51
npm init --scope=@my-org
52
```
53
52
- * For a user-scoped package, replace `my-username` with your username:
54
+ - For a user-scoped package, replace `my-username` with your username:
55
```
56
npm init --scope=@my-username
57
```
@@ -78,21 +80,21 @@ By default, scoped packages are published with private visibility. To publish a
80
81
1. On the command line, navigate to the root directory of your package.
82
81
- ```
82
- cd /path/to/package
83
- ```
83
+ ```
84
+ cd /path/to/package
85
+ ```
86
87
2. To publish your scoped public package to the npm registry, run:
88
87
- ```
88
- npm publish --access public
89
- ```
89
+ ```
90
+ npm publish --access public
91
+ ```
92
91
- <Note>
93
+ <Note>
94
93
- **Note:** If you use GitHub Actions to publish your packages, you can generate provenance information for each package you publish. For more information, see "[Generating provenance statements][provenance-how-to]."
95
+ **Note:** If you use GitHub Actions to publish your packages, you can generate provenance information for each package you publish. For more information, see "[Generating provenance statements][provenance-how-to]."
96
95
- </Note>
97
+ </Note>
98
99
3. To see your public package page, visit https://npmjs.com/package/\*package-name\*, replacing \*package-name\* with the name of your package. Public packages will say `public` below the package name on the npm website.
100
@@ -100,7 +102,6 @@ By default, scoped packages are published with private visibility. To publish a
102
103
For more information on the `publish` command, see the [CLI documentation][cli-publish].
104
103
-
105
[scopes]: /about-scopes
106
[user-signup]: https://www.npmjs.com/signup
107
[create-org]: https://www.npmjs.com/signup?next=/org/create
content/packages-and-modules/contributing-packages-to-the-registry/creating-and-publishing-unscoped-public-packages.mdx
+19
-20
@@ -20,22 +20,22 @@ For more information on package scope, access, and visibility, see "[Package sco
20
21
1. On the command line, create a directory for your package:
22
23
- ```
24
- mkdir my-test-package
25
- ```
23
+ ```
24
+ mkdir my-test-package
25
+ ```
26
27
2. Navigate to the root directory of your package:
28
29
- ```
30
- cd my-test-package
31
- ```
29
+ ```
30
+ cd my-test-package
31
+ ```
32
33
3. If you are using git to manage your package code, in the package root directory, run the following commands, replacing `git-remote-url` with the git remote URL for your package:
34
35
- ```
36
- git init
37
- git remote add origin git://git-remote-url
38
- ```
35
+ ```
36
+ git init
37
+ git remote add origin git://git-remote-url
38
+ ```
39
40
4. In the package root directory, run the `npm init` command.
41
5. Respond to the prompts to generate a <a href="https://docs.npmjs.com/about-package-json-and-package-lock-json-files">`package.json`</a> file. For help naming your package, see "[Package name guidelines][pkg-name]".
@@ -60,27 +60,26 @@ npm install path/to/my-package
60
61
1. On the command line, navigate to the root directory of your package.
62
63
- ```
64
- cd /path/to/package
65
- ```
63
+ ```
64
+ cd /path/to/package
65
+ ```
66
67
2. To publish your public package to the npm registry, run:
68
69
- ```
70
- npm publish
71
- ```
69
+ ```
70
+ npm publish
71
+ ```
72
73
- <Note>
73
+ <Note>
74
75
- **Note:** If you use GitHub Actions to publish your packages, you can generate provenance information for each package you publish. For more information, see "[Generating provenance statements][provenance-how-to]."
75
+ **Note:** If you use GitHub Actions to publish your packages, you can generate provenance information for each package you publish. For more information, see "[Generating provenance statements][provenance-how-to]."
76
77
- </Note>
77
+ </Note>
78
79
3. To see your public package page, visit `https://npmjs.com/package/*package-name*`, replacing `*package-name*` with the name of your package. Public packages will say `public` below the package name on the npm website.
80
81
For more information on the `publish` command, see the [CLI documentation][cli-publish].
82
83
-
83
[pkg-viz]: package-scope-access-level-and-visibility
84
[user-signup]: https://www.npmjs.com/signup
85
[create-org]: https://www.npmjs.com/signup?next=/org/create
content/packages-and-modules/contributing-packages-to-the-registry/creating-node-js-modules.mdx
-2
@@ -25,7 +25,6 @@ For more information on `package.json` files, see "[Creating a package.json file
25
26
## Create the file that will be loaded when your module is required by another application
27
28
-
28
In the file, add a function as a property of the `exports` object. This will make the function available to other code:
29
30
```
@@ -67,7 +66,6 @@ exports.printMsg = function() {
66
67
<YouTube id="3I78ELjTzlQ" />
68
70
-
69
[about-pkgs]: about-packages-and-modules
70
[scoped-pkg]: about-scopes
71
[unscoped-pkg]: creating-and-publishing-unscoped-public-packages
content/packages-and-modules/contributing-packages-to-the-registry/package-name-guidelines.mdx
-1
@@ -14,7 +14,6 @@ Additionally, when choosing a name for an [**unscoped** package][create-unscoped
14
- is not spelled in a similar way to another package name
15
- will not confuse others about authorship
16
17
-
17
[policies]: https://www.npmjs.com/policies
18
[npm-trademark]: https://docs.npmjs.com/policies/disputes#trademarks
19
[create-unscoped]: creating-and-publishing-unscoped-public-packages
content/packages-and-modules/contributing-packages-to-the-registry/specifying-dependencies-and-devdependencies-in-a-package-json-file.mdx
+1
-2
@@ -2,8 +2,7 @@
2
title: Specifying dependencies and devDependencies in a package.json file
3
---
4
5
-To specify the packages your project depends on, you must
6
-list them as `"dependencies"` or `"devDependencies"` in your package's [`package.json`][pkg-json] file. When you (or another user) run `npm install`, npm will download dependencies and devDependencies that are listed in `package.json` that meet the [semantic version][semver] requirements listed for each. To see which versions of a package will be installed, use the [semver calculator][semver-calc].
5
+To specify the packages your project depends on, you must list them as `"dependencies"` or `"devDependencies"` in your package's [`package.json`][pkg-json] file. When you (or another user) run `npm install`, npm will download dependencies and devDependencies that are listed in `package.json` that meet the [semantic version][semver] requirements listed for each. To see which versions of a package will be installed, use the [semver calculator][semver-calc].
6
7
- `"dependencies"`: Packages required by your application in production.
8
- `"devDependencies"`: Packages that are only needed for local development and testing.
content/packages-and-modules/getting-packages-from-the-registry/downloading-and-installing-packages-globally.mdx
-1
@@ -20,6 +20,5 @@ npm install -g <package_name>
20
21
If you get an EACCES permissions error, you may need to reinstall npm with a version manager or manually change npm's default directory. For more information, see "[Resolving EACCES permissions errors when installing packages globally][perm-errors]".
22
23
-
23
[cli-install]: /cli/install
24
[perm-errors]: resolving-eacces-permissions-errors-when-installing-packages-globally
content/packages-and-modules/getting-packages-from-the-registry/downloading-and-installing-packages-locally.mdx
-1
@@ -69,7 +69,6 @@ npm install example-package@beta
69
70
<YouTube id="JDSfqFFbNYQ" />
71
72
-
72
[scoped-public-pkg]: about-scopes
73
[private-pkg]: about-private-packages
74
[cli-install]: /cli-documentation/install
content/packages-and-modules/getting-packages-from-the-registry/resolving-eacces-permissions-errors-when-installing-packages-globally.mdx
+12
-12
@@ -30,9 +30,9 @@ To minimize the chance of permissions errors, you can configure npm to use a dif
30
31
2. On the command line, in your home directory, create a directory for global installations:
32
33
- ```
34
- mkdir ~/.npm-global
35
- ```
33
+ ```
34
+ mkdir ~/.npm-global
35
+ ```
36
37
3. Configure npm to use the new directory path:
38
@@ -42,21 +42,21 @@ To minimize the chance of permissions errors, you can configure npm to use a dif
42
43
4. In your preferred text editor, open or create a `~/.profile` file and add this line:
44
45
- ```
46
- export PATH=~/.npm-global/bin:$PATH
47
- ```
45
+ ```
46
+ export PATH=~/.npm-global/bin:$PATH
47
+ ```
48
49
5. On the command line, update your system variables:
50
51
- ```
52
- source ~/.profile
53
- ```
51
+ ```
52
+ source ~/.profile
53
+ ```
54
55
6. To test your new configuration, install a package globally without using `sudo`:
56
57
- ```
58
- npm install -g jshint
59
- ```
57
+ ```
58
+ npm install -g jshint
59
+ ```
60
61
Instead of steps 3-5, you can use the corresponding ENV variable (e.g. if you don't want to modify `~/.profile`):
62
content/packages-and-modules/getting-packages-from-the-registry/searching-for-and-choosing-packages-to-download.mdx
+11
-9
@@ -11,6 +11,7 @@ You can use the npm search bar to find packages to use in your projects. npm sea
11
1. In the search bar, type a search term and press **Enter**. As you type, possible choices will appear.
12
13
<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/search-qr.png" alt="Screenshot of a search text box" />
14
+
15
<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/search-qr-results.png" alt="Screenshot of the search text box and search results" />
16
17
2. To list packages ranked according to [package search rank criteria](#package-search-rank-criteria), in the left sidebar, under "Sort packages", click the criterion. For example, to sort packages by popularity, click "Popularity".
@@ -52,19 +53,19 @@ To view provenance information for a package in the npm registry:
53
54
2. On the package's page, in the **Version** field to the right of the README, look for a green check mark. If there is a green check mark, this means the package was published with provenance.
55
55
- <Screenshot src="packages-and-modules/getting-packages-from-the-registry/npm-provenance-check-mark.png" alt="Screenshot showing a Version field with a green check mark" />
56
+ <Screenshot src="packages-and-modules/getting-packages-from-the-registry/npm-provenance-check-mark.png" alt="Screenshot showing a Version field with a green check mark" />
57
58
3. Click on the check mark, then click **View more details**.
59
60
4. View the following information for the package:
61
61
- - **Build Environment**: The environment used to build the package.
62
- - **Build Summary**: A link to the workflow run that built the package.
63
- - **Source Commit**: A link to the commit the package was built from.
64
- - **Build File**: A link to the workflow file used to build the package.
65
- - **Public Ledger**: A link to a transparency log entry attesting an authorized user published the package.
62
+ - **Build Environment**: The environment used to build the package.
63
+ - **Build Summary**: A link to the workflow run that built the package.
64
+ - **Source Commit**: A link to the commit the package was built from.
65
+ - **Build File**: A link to the workflow file used to build the package.
66
+ - **Public Ledger**: A link to a transparency log entry attesting an authorized user published the package.
67
67
- <Screenshot src="packages-and-modules/getting-packages-from-the-registry/npm-provenance.png" alt="Screenshot showing npm provenance information for a published package" />
68
+ <Screenshot src="packages-and-modules/getting-packages-from-the-registry/npm-provenance.png" alt="Screenshot showing npm provenance information for a published package" />
69
70
<Note>
71
@@ -87,8 +88,9 @@ This command checks the registry signatures and provenance attestations. If a pa
88
<Note>
89
90
**Note:** In order to run the audit command to verify package provenance, you must:
90
- - Install npm CLI version `v9.5.0` or later: `npm install -g npm@latest`
91
- - Install dependencies with `npm install` or `npm ci`
91
+
92
+- Install npm CLI version `v9.5.0` or later: `npm install -g npm@latest`
93
+- Install dependencies with `npm install` or `npm ci`
94
95
</Note>
96
content/packages-and-modules/getting-packages-from-the-registry/uninstalling-packages-and-dependencies.mdx
-1
@@ -95,5 +95,4 @@ npm uninstall -g jshint
95
96
<YouTube id="XbvjZxUZJGg" />
97
98
-
98
[cli-uninstall]: /cli/uninstall
content/packages-and-modules/getting-packages-from-the-registry/updating-packages-downloaded-from-the-registry.mdx
-1
@@ -76,6 +76,5 @@ npm update -g
76
- [npm-update](/cli/update)
77
- [npm-outdated](/cli/outdated)
78
79
-
79
[npm-update]: /cli/update
80
[npm-outdated]: /cli/outdated
content/packages-and-modules/getting-packages-from-the-registry/using-npm-packages-in-your-projects.mdx
-5
@@ -10,7 +10,6 @@ Once you have [installed a package][install-pkg] in `node_modules`, you can use
10
11
If you are creating a Node.js module, you can use a package in your module by passing it as an argument to the `require` function.
12
13
-
13
```javascript
14
var lodash = require('lodash');
15
@@ -18,7 +17,6 @@ var output = lodash.without([1, 2, 3], 1);
17
console.log(output);
18
```
19
21
-
20
### package.json file
21
22
In `package.json`, list the package under dependencies. You can optionally include a [semantic version][semver].
@@ -37,7 +35,6 @@ To use a scoped package, simply include the scope wherever you use the package n
35
36
### Node.js module
37
40
-
38
```js
39
var projectName = require("@scope/package-name")
40
```
@@ -65,10 +62,8 @@ module.js:340
62
Error: Cannot find module 'lodash'
63
```
64
68
-
65
- For scoped packages, run `npm install <@scope/package_name>`
66
- For unscoped packages, run `npm install <package_name>`
67
72
-
68
[install-pkg]: downloading-and-installing-packages
69
[semver]: about-semantic-versioning
content/packages-and-modules/introduction-to-packages-and-modules/about-packages-and-modules.mdx
+12
-14
@@ -11,6 +11,7 @@ The npm registry contains packages, many of which are also Node modules, or cont
11
A **package** is a file or directory that is described by a `package.json` file. A package must contain a `package.json` file in order to be published to the npm registry. For more information on creating a `package.json` file, see "[Creating a package.json file][pkg-json]".
12
13
Packages can be unscoped or scoped to a user or organization, and scoped packages can be private or public. For more information, see
14
+
15
- "[About scopes][about-scopes]"
16
- "[About private packages][private-pkgs]"
17
- "[Package scope, access level, and visibility][pkg-viz]"
@@ -19,13 +20,13 @@ Packages can be unscoped or scoped to a user or organization, and scoped package
20
21
A package is any of the following:
22
22
-* a) A folder containing a program described by a `package.json` file.
23
-* b) A gzipped tarball containing (a).
24
-* c) A URL that resolves to (b).
25
-* d) A `<name>@<version>` that is published on the registry with (c).
26
-* e) A `<name>@<tag>` that points to (d).
27
-* f) A `<name>` that has a `latest` tag satisfying (e).
28
-* g) A `git` url that, when cloned, results in (a).
23
+- a) A folder containing a program described by a `package.json` file.
24
+- b) A gzipped tarball containing (a).
25
+- c) A URL that resolves to (b).
26
+- d) A `<name>@<version>` that is published on the registry with (c).
27
+- e) A `<name>@<tag>` that points to (d).
28
+- f) A `<name>` that has a `latest` tag satisfying (e).
29
+- g) A `git` url that, when cloned, results in (a).
30
31
### npm package git URL formats
32
@@ -36,8 +37,7 @@ Git URLs used for npm packages can be formatted in the following ways:
37
- `git+http://user@hostname/project/blah.git#commit-ish`
38
- `git+https://user@hostname/project/blah.git#commit-ish`
39
39
-The `commit-ish` can be any tag, sha, or branch that can be supplied as
40
-an argument to `git checkout`. The default `commit-ish` is `HEAD`.
40
+The `commit-ish` can be any tag, sha, or branch that can be supplied as an argument to `git checkout`. The default `commit-ish` is `HEAD`.
41
42
## About modules
43
@@ -45,8 +45,8 @@ A **module** is any file or directory in the `node_modules` directory that can b
45
46
To be loaded by the Node.js `require()` function, a module must be one of the following:
47
48
-* A folder with a `package.json` file containing a `"main"` field.
49
-* A JavaScript file.
48
+- A folder with a `package.json` file containing a `"main"` field.
49
+- A JavaScript file.
50
51
<Note>
52
@@ -54,14 +54,12 @@ To be loaded by the Node.js `require()` function, a module must be one of the fo
54
55
</Note>
56
57
-In the context of a Node program, the `module` is also the thing that
58
-was loaded *from* a file. For example, in the following program:
57
+In the context of a Node program, the `module` is also the thing that was loaded _from_ a file. For example, in the following program:
58
59
var req = require('request')
60
61
we might say that "The variable `req` refers to the `request` module".
62
64
-
63
[about-scopes]: about-scopes
64
[private-pkgs]: about-private-packages
65
[pkg-json]: creating-a-package-json-file
content/packages-and-modules/introduction-to-packages-and-modules/about-private-packages.mdx
+2
-3
@@ -6,7 +6,6 @@ title: About private packages
6
7
To use private packages, you must
8
9
-
9
- be using npm version 2.7.0 or greater. To upgrade, on the command line, run `npm install npm@latest -g`
10
- have a [paid user or organization account](https://www.npmjs.com/pricing)
11
@@ -16,8 +15,8 @@ With npm private packages, you can use the npm registry to host code that is onl
15
16
Private packages always have a scope, and scoped packages are private by default.
17
19
-* **User-scoped private packages** can only be accessed by you and collaborators to whom you have granted read or read/write access. For more information, see "[Adding collaborators to private packages owned by a user account][user-pkg-add]".
20
-* **Organization-scoped private packages** can only be accessed by teams that have been granted read or read/write access. For more information, see "[Managing team access to organization packages][team-pkg-add]".
18
+- **User-scoped private packages** can only be accessed by you and collaborators to whom you have granted read or read/write access. For more information, see "[Adding collaborators to private packages owned by a user account][user-pkg-add]".
19
+- **Organization-scoped private packages** can only be accessed by teams that have been granted read or read/write access. For more information, see "[Managing team access to organization packages][team-pkg-add]".
20
21
## Next steps
22
content/packages-and-modules/introduction-to-packages-and-modules/about-public-packages.mdx
+7
-8
@@ -4,17 +4,16 @@ title: About public packages
4
5
As an npm user or organization member, you can create and publish public packages that anyone can download and use in their own projects.
6
7
-* **Unscoped** public packages exist in the global public registry namespace and can be referenced in a `package.json` file with the package name alone: `package-name`.
8
-* **Scoped** public packages belong to a user or organization and must be preceded by the user or organization name when included as a dependency in a `package.json` file:
9
- * `@username/package-name`
10
- * `@org-name/package-name`
7
+- **Unscoped** public packages exist in the global public registry namespace and can be referenced in a `package.json` file with the package name alone: `package-name`.
8
+- **Scoped** public packages belong to a user or organization and must be preceded by the user or organization name when included as a dependency in a `package.json` file:
9
+ - `@username/package-name`
10
+ - `@org-name/package-name`
11
12
## Next steps
13
14
-* "[Creating and publishing scoped public packages][create-scoped-pkg]"
15
-* "[Creating and publishing unscoped public packages][create-unscoped-pkg]"
16
-* "[Using npm packages in your projects][use-pkg]"
17
-
14
+- "[Creating and publishing scoped public packages][create-scoped-pkg]"
15
+- "[Creating and publishing unscoped public packages][create-unscoped-pkg]"
16
+- "[Using npm packages in your projects][use-pkg]"
17
18
[create-scoped-pkg]: creating-and-publishing-scoped-public-packages
19
[create-unscoped-pkg]: creating-and-publishing-unscoped-public-packages
content/packages-and-modules/introduction-to-packages-and-modules/about-scopes.mdx
+5
-3
@@ -16,11 +16,14 @@ A scope allows you to create a package with the same name as a package created b
16
17
When listed as a dependent in a `package.json` file, scoped packages are preceded by their scope name. The scope name is everything between the `@` and the slash:
18
19
-* **"npm" scope:**
19
+- **"npm" scope:**
20
+
21
```
22
@npm/package-name
23
```
23
-* **"npmcorp" scope:**
24
+
25
+- **"npmcorp" scope:**
26
+
27
```
28
@npmcorp/package-name
29
```
@@ -37,7 +40,6 @@ To create and publish private scoped packages, see "[Creating and publishing pri
40
41
For more information on package scope and visibility, see "[Package scope, access level, and visibility][pkg-viz]".
42
40
-
43
[create-public-pkg]: creating-and-publishing-scoped-public-packages
44
[create-private-pkg]: creating-and-publishing-private-packages
45
[about-priv-pkg]: about-private-packages
content/packages-and-modules/introduction-to-packages-and-modules/package-scope-access-level-and-visibility.mdx
+6
-6
@@ -12,12 +12,12 @@ Visibility of npm packages depends on the scope (namespace) in which the package
12
13
## Public registry
14
15
-| Scope | Access level | Can view and download | Can write (publish) |
16
-|--------------|--------------|-----------------------------------------------------------------------------|---|
17
-| Org | Private | Members of a team in the organization with read access to the package | Members of a team in the organization with read and write access to the package |
18
-| Org | Public | Everyone | Members of a team in the organization with read and write access to the package |
19
-| User | Private | The package owner and users who have been granted read access to the package | The package owner and users who have been granted read and write access to the package |
20
-| User | Public | Everyone | The package owner and users who have been granted read and write access to the package |
15
+| Scope | Access level | Can view and download | Can write (publish) |
16
+| --- | --- | --- | --- |
17
+| Org | Private | Members of a team in the organization with read access to the package | Members of a team in the organization with read and write access to the package |
18
+| Org | Public | Everyone | Members of a team in the organization with read and write access to the package |
19
+| User | Private | The package owner and users who have been granted read access to the package | The package owner and users who have been granted read and write access to the package |
20
+| User | Public | Everyone | The package owner and users who have been granted read and write access to the package |
21
| Unscoped | Public | Everyone | The package owner and users who have been granted read and write access to the package |
22
23
<Note>
content/packages-and-modules/securing-your-code/about-audit-reports.mdx
+19
-13
@@ -10,39 +10,45 @@ Audit reports contain tables of information about security vulnerabilities in yo
10
11
## Vulnerability table fields
12
13
-* [Severity](#severity)
14
-* [Description](#description)
15
-* [Package](#package)
16
-* [Patched in](#patched-in)
17
-* [Dependency of](#dependency-of)
18
-* [Path](#path)
19
-* [More info](#more-info)
13
+- [Severity](#severity)
14
+- [Description](#description)
15
+- [Package](#package)
16
+- [Patched in](#patched-in)
17
+- [Dependency of](#dependency-of)
18
+- [Path](#path)
19
+- [More info](#more-info)
20
21
### Severity
22
23
The severity of the vulnerability, determined by the impact and exploitability of the vulnerability in its most common use case.
24
25
-| Severity | Recommended action |
26
-|:---------|:--------------------|
27
-| Critical | Address immediately |
28
-| High | Address as quickly as possible |
29
-| Moderate | Address as time allows |
30
-| Low | Address at your discretion |
25
+| Severity | Recommended action |
26
+| :------- | :----------------------------- |
27
+| Critical | Address immediately |
28
+| High | Address as quickly as possible |
29
+| Moderate | Address as time allows |
30
+| Low | Address at your discretion |
31
32
#### Description
33
+
34
The description of the vulnerability. For example, "Denial of service".
35
36
#### Package
37
+
38
The name of the package that contains the vulnerability.
39
40
#### Patched in
41
+
42
The semantic version range that describes which versions contain a fix for the vulnerability.
43
44
#### Dependency of
45
+
46
The module that the package with the vulnerability depends on.
47
48
#### Path
49
+
50
The path to the code that contains the vulnerability.
51
52
#### More info
53
+
54
A link to the security report.
content/packages-and-modules/securing-your-code/about-registry-signatures.mdx
+19
-19
@@ -26,14 +26,14 @@ The npm CLI supports registry signatures and signing keys provided by any regist
26
27
**1. Signatures are provided in the package's `packument` in each published version within the `dist` object:**
28
29
- ```
30
- "dist":{
31
- ..omitted..,
32
- "signatures": [{
33
- "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}",
34
- "sig": "a312b9c3cb4a1b693e8ebac5ee1ca9cc01f2661c14391917dcb111517f72370809..."
35
- }],
36
- ```
29
+```
30
+"dist":{
31
+ ..omitted..,
32
+ "signatures": [{
33
+ "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}",
34
+ "sig": "a312b9c3cb4a1b693e8ebac5ee1ca9cc01f2661c14391917dcb111517f72370809..."
35
+ }],
36
+```
37
38
See this <a href="https://registry.npmjs.org/light-cycle/1.4.3" target="_blank">example of a signed package from the public npm registry</a>.
39
@@ -45,17 +45,17 @@ The `keyid` must match one of the public signing keys below.
45
46
**2. Public signing keys are provided at `registry-host.tld/-/npm/v1/keys` in the following format:**
47
48
- ```
49
- {
50
- "keys": [{
51
- "expires": null,
52
- "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}",
53
- "keytype": "ecdsa-sha2-nistp256",
54
- "scheme": "ecdsa-sha2-nistp256",
55
- "key": "{{B64_PUBLIC_KEY}}"
56
- }]
57
- }
58
- ```
48
+```
49
+{
50
+ "keys": [{
51
+ "expires": null,
52
+ "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}",
53
+ "keytype": "ecdsa-sha2-nistp256",
54
+ "scheme": "ecdsa-sha2-nistp256",
55
+ "key": "{{B64_PUBLIC_KEY}}"
56
+ }]
57
+}
58
+```
59
60
Keys response:
61
content/packages-and-modules/securing-your-code/auditing-package-dependencies-for-security-vulnerabilities.mdx
+8
-9
@@ -29,8 +29,8 @@ The <a href="https://docs.npmjs.com/cli/audit">`npm audit` command</a> submits a
29
30
`npm audit` requires packages to have `package.json` and `package-lock.json` files.
31
32
-* If you get an `EAUDITNOPJSON` error, create a `package.json` file by following the steps in "[Creating a package.json file](creating-a-package-json-file)".
33
-* If you get an `EAUDITNOLOCK` error, make sure your package has a `package.json` file, then create the package lock file by running `npm i --package-lock-only`.
32
+- If you get an `EAUDITNOPJSON` error, create a `package.json` file by following the steps in "[Creating a package.json file](creating-a-package-json-file)".
33
+- If you get an `EAUDITNOLOCK` error, make sure your package has a `package.json` file, then create the package lock file by running `npm i --package-lock-only`.
34
35
## Reviewing and acting on the security audit report
36
@@ -40,8 +40,8 @@ Running `npm audit` will produce a report of security vulnerabilities with the a
40
41
If security vulnerabilities are found and updates are available, you can either:
42
43
-* Run the `npm audit fix` subcommand to automatically install compatible updates to vulnerable dependencies.
44
-* Run the recommended commands individually to install updates to vulnerable dependencies. (Some updates may be semver-breaking changes; for more information, see "[SEMVER warnings](#semver-warnings)".)
43
+- Run the `npm audit fix` subcommand to automatically install compatible updates to vulnerable dependencies.
44
+- Run the recommended commands individually to install updates to vulnerable dependencies. (Some updates may be semver-breaking changes; for more information, see "[SEMVER warnings](#semver-warnings)".)
45
46
<Screenshot src="/packages-and-modules/securing-your-code/audit-report-suggested-fixes.png" alt="Screenshot of command-line audit results with suggested fixes" />
47
@@ -57,10 +57,10 @@ If security vulnerabilities are found, but no patches are available, the audit r
57
58
To address the vulnerability, you can
59
60
-* [Check for mitigating factors](#check-for-mitigating-factors)
61
-* [Update dependent packages if a fix exists](#update-dependent-packages-if-a-fix-exists)
62
-* [Fix the vulnerability](#fix-the-vulnerability)
63
-* [Open an issue in the package or dependent package issue tracker](#open-an-issue-in-the-package-or-dependent-package-issue-tracker)
60
+- [Check for mitigating factors](#check-for-mitigating-factors)
61
+- [Update dependent packages if a fix exists](#update-dependent-packages-if-a-fix-exists)
62
+- [Fix the vulnerability](#fix-the-vulnerability)
63
+- [Open an issue in the package or dependent package issue tracker](#open-an-issue-in-the-package-or-dependent-package-issue-tracker)
64
65
#### Check for mitigating factors
66
@@ -119,7 +119,6 @@ npm set audit false
119
120
For more information, see the [`npm-config` management command][cli-config] and the [`npm-config` audit setting][cli-config-audit].
121
122
-
122
[cli-install]: /cli/install
123
[cli-config]: /cli/config
124
[cli-config-audit]: /cli/config#audit
content/packages-and-modules/securing-your-code/generating-provenance-statements.mdx
-2
@@ -23,7 +23,6 @@ The certificate authority federates with any OIDC provider that includes verifia
23
24
The transparency log service provides a public, verifiable, tamper-evident ledger of signed attestations. This ensures transparency of the public service, as well as providing a way to detect attempts to tamper with a package if a package registry were to be compromised.
25
26
-
26
## Provenance limitations
27
28
- To publish a package with provenance, you must build your package with a supported cloud CI/CD provider using a cloud-hosted runner. Today this includes GitHub Actions and GitLab CI/CD.
@@ -141,7 +140,6 @@ If you publish your packages with tools that do not directly invoke the `npm pub
140
141
</Note>
142
144
-
143
## Publishing packages with provenance via GitLab CI/CD
144
145
In order to establish provenance, you must use a supported cloud CI/CD provider and a cloud-hosted runner to publish your packages. GitLab CI/CD is a supported CI/CD platform that allows you to automate software development tasks. For more information, see [Generating provenance in GitLab CI/CD][gitlab-ci-cd-docs] in the GitLab documentation.
content/packages-and-modules/securing-your-code/reporting-malware-in-an-npm-package.mdx
+1
@@ -15,6 +15,7 @@ If you find malware in an npm package (either yours or someone else's), you can
15
## How npm Security handles malware
16
17
Malware is a major concern for npm Security and we have removed hundreds of malicious packages from the registry. For every malware report we receive, npm Security takes the following actions:
18
+
19
1. Confirm validity of the report.
20
2. Remove the package from the registry.
21
3. Publish a security placeholder for the package.
content/packages-and-modules/securing-your-code/requiring-2fa-for-package-publishing-and-settings-modification.mdx
+3
-1
@@ -1,6 +1,7 @@
1
---
2
title: Requiring 2FA for package publishing and settings modification
3
---
4
+
5
import shared from '~/shared.js'
6
7
To protect your packages, as a package publisher, you can require everyone who has write access to a package to have two-factor authentication (2FA) enabled. This will require that users provide 2FA credentials in addition to their login token when they publish the package. For more information, see "[Configuring two-factor authentication][config-2fa]".
@@ -20,11 +21,12 @@ You may also choose to allow publishing with either two-factor authentication _o
21
<Screenshot src="/packages-and-modules/securing-your-code/2fa-package-admin.png" alt="Screenshot showing the admin tab on a package page" />
22
23
4. Under "Publishing access", select the requirements to publish a package.
24
+
25
1. **Dont require two-factor authentication**
26
With this option, a maintainer can publish a package or change the package settings whether they have two-factor authentication enabled or not. This is the least secure setting.
27
28
2. **Require two-factor authentication or automation tokens or granular access token**
27
- With this option, maintainers must have two-factor authentication enabled for their account. If they publish a package interactively, using the `npm publish` command, they will be required to enter 2FA credentials when they perform the publish. However, maintainers may also create an [automation token][creating-automation-token] or a [granular access token][creating-granular-access-token] and use that to publish. A second factor is _not_ required when using a token, making it useful for continuous integration and continuous deployment workflows.
29
+ With this option, maintainers must have two-factor authentication enabled for their account. If they publish a package interactively, using the `npm publish` command, they will be required to enter 2FA credentials when they perform the publish. However, maintainers may also create an [automation token][creating-automation-token] or a [granular access token][creating-granular-access-token] and use that to publish. A second factor is _not_ required when using a token, making it useful for continuous integration and continuous deployment workflows.
30
31
3. **Require two-factor authentication and disallow tokens**
32
With this option, a maintainer must have two-factor authentication enabled for their account, and they must publish interactively. Maintainers will be required to enter 2FA credentials when they perform the publish. Automation tokens and granular access tokens cannot be used to publish packages.
content/packages-and-modules/securing-your-code/verifying-registry-signatures.mdx
+15
-16
@@ -13,34 +13,33 @@ To ensure the integrity of packages you download from the public npm registry, o
13
14
Registry signatures can be verified using the following `audit` command:
15
16
- ```
17
- npm audit signatures
18
- ```
16
+```
17
+npm audit signatures
18
+```
19
20
Example response if all installed versions have valid registry signatures:
21
22
- ```
23
- audited 1640 packages in 2s
22
+```
23
+audited 1640 packages in 2s
24
25
- 1640 have verified registry signatures
26
- ```
25
+1640 have verified registry signatures
26
+```
27
28
## Troubleshooting
29
30
### Some packages are missing registry signatures
31
32
-The CLI will error if packages don't have signatures *and* if the package registry supports signatures. This could mean an attacker might be trying to circumvent signature verification.
33
-You can check if the registry supports signatures by requesting the public signing keys from `registry-host.tld/-/npm/v1/keys`.
32
+The CLI will error if packages don't have signatures _and_ if the package registry supports signatures. This could mean an attacker might be trying to circumvent signature verification. You can check if the registry supports signatures by requesting the public signing keys from `registry-host.tld/-/npm/v1/keys`.
33
34
Example response if some versions have missing registry signatures:
35
37
- ```
38
- audited 1640 packages in 2s
36
+```
37
+audited 1640 packages in 2s
38
40
- 1405 packages have verified registry signatures
39
+1405 packages have verified registry signatures
40
42
- 235 packages have missing registry signatures but the registry is providing signing keys:
41
+235 packages have missing registry signatures but the registry is providing signing keys:
42
44
- missing-dep@1.0.0 (https://registry.npmjs.org/)
45
- ...
46
- ```
43
+missing-dep@1.0.0 (https://registry.npmjs.org/)
44
+...
45
+```
content/packages-and-modules/updating-and-managing-your-published-packages/changing-package-visibility.mdx
-1
@@ -66,7 +66,6 @@ npm access public <package-name>
66
67
For more information, see the [`npm access` CLI documentation][access-cli].
68
69
-
69
[contact-support]: https://www.npmjs.com/support
70
[pkg-viz]: package-scope-access-level-and-visibility
71
[npmjs-com]: https://npmjs.com
content/packages-and-modules/updating-and-managing-your-published-packages/deprecating-and-undeprecating-packages-or-package-versions.mdx
+14
-26
@@ -1,6 +1,7 @@
1
---
2
title: Deprecating and undeprecating packages or package versions
3
---
4
+
5
import shared from '~/shared.js'
6
7
If you no longer wish to maintain a package, or if you would like to encourage users to update to a new or different version, you can [deprecate][deprecate-cli] it. Deprecating a package or version will print a message to the terminal when a user installs it.
@@ -15,44 +16,31 @@ A deprecation warning or message can say anything. You may wish to include a mes
16
17
## Deprecating an entire package
18
18
-Deprecating an entire package will remove it from search results on the
19
-npm website and a deprecation message will also be displayed on the
20
-package page.
19
+Deprecating an entire package will remove it from search results on the npm website and a deprecation message will also be displayed on the package page.
20
21
<Screenshot src="/packages-and-modules/updating-and-managing-your-published-packages/deprecate-package.png" alt="Screenshot of package deprecation" />
22
24
-Deprecating a package is an alternative to deleting a package if
25
-your package does not meet the
26
-[unpublishing requirements](/policies/unpublish).
23
+Deprecating a package is an alternative to deleting a package if your package does not meet the [unpublishing requirements](/policies/unpublish).
24
25
### Using the website
26
30
-1. <>{shared["user-login"].text}</>
27
+1. <>{shared['user-login'].text}</>
28
32
- <>{shared["user-login"].image}</>
29
+ <>{shared['user-login'].image}</>
30
34
-2. Navigate to the package page for the package you want to deprecate, replacing `<your-package-name>` with the name of your package:
35
- `https://www.npmjs.com/package/<your-package-name>`.
31
+2. Navigate to the package page for the package you want to deprecate, replacing `<your-package-name>` with the name of your package: `https://www.npmjs.com/package/<your-package-name>`.
32
33
3. Click **Settings**.
38
- <Screenshot
39
- src="/packages-and-modules/securing-your-code/2fa-package-admin.png"
40
- alt="Screenshot showing the settings tab on a package page"
41
- />
34
+
35
+ <Screenshot src="/packages-and-modules/securing-your-code/2fa-package-admin.png" alt="Screenshot showing the settings tab on a package page" />
36
37
4. Under "deprecate package", click <strong>Deprecate package</strong>.
38
45
- <Screenshot
46
- src="/packages-and-modules/deleting-deprecating/deprecate-package-settings.png"
47
- alt="Screenshot showing the deprecate package button"
48
- />
39
+ <Screenshot src="/packages-and-modules/deleting-deprecating/deprecate-package-settings.png" alt="Screenshot showing the deprecate package button" />
40
41
5. If you are sure that you want to continue, enter your package name and click <strong>Deprecate package</strong>.
42
52
- <Screenshot
53
- src="packages-and-modules/deleting-deprecating/deprecate-package-confirm.png"
54
- alt="Screenshot showing the deprecate package confirmation"
55
- />
43
+ <Screenshot src="packages-and-modules/deleting-deprecating/deprecate-package-confirm.png" alt="Screenshot showing the deprecate package confirmation" />
44
45
### Using the command line
46
@@ -62,7 +50,7 @@ To deprecate an entire package, run the following command, replacing `<package-n
50
npm deprecate <package-name> "<message>"
51
```
52
65
-If you have enabled [two-factor authentication][two-factor-auth], add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator app).
53
+If you have enabled [two-factor authentication][two-factor-auth], add a one-time password to the command, `--otp=123456` (where _123456_ is the code from your authenticator app).
54
55
## Deprecating a single version of a package
56
@@ -80,7 +68,7 @@ npm deprecate <package-name>@<version> "<message>"
68
69
The CLI will also accept version ranges for `<version>`.
70
83
-If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).
71
+If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where _123456_ is the code from your authenticator).
72
73
## Undeprecating a package or version
74
@@ -92,7 +80,7 @@ For example, to undeprecate a package version, run the following command, replac
80
npm deprecate <package-name>@<version> ""
81
```
82
95
-If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).
83
+If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where _123456_ is the code from your authenticator).
84
85
## Transferring a deprecated package to npm
86
@@ -111,7 +99,7 @@ npm owner add npm <package-name>
99
npm owner rm <user> <package-name>
100
```
101
114
-If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).
102
+If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where _123456_ is the code from your authenticator).
103
104
[deprecate-cli]: /cli/deprecate
105
[two-factor-auth]: about-two-factor-authentication
content/packages-and-modules/updating-and-managing-your-published-packages/transferring-a-package-from-a-user-account-to-another-user-account.mdx
+4
-5
@@ -8,16 +8,15 @@ For more information on how npm support handles package name disputes between us
8
9
<Note>
10
11
-**Note:** You cannot transfer a scoped package to another user account or organization, because a package's scope _is_ the user account or organization name. You will need to create a new package in the new scope.
11
+**Note:** You cannot transfer a scoped package to another user account or organization, because a package's scope _is_ the user account or organization name. You will need to create a new package in the new scope.
12
13
</Note>
14
15
## Transferring a package from a user account to another user account on the website
16
17
-To transfer a package you own or maintain to another user, follow these steps:
17
+To transfer a package you own or maintain to another user, follow these steps:
18
19
-1. Navigate to the package page for the package you want to transfer, replacing `<your-package-name>` with the name of your package:
20
-`https://www.npmjs.com/package/<your-package-name>`.
19
+1. Navigate to the package page for the package you want to transfer, replacing `<your-package-name>` with the name of your package: `https://www.npmjs.com/package/<your-package-name>`.
20
21
2. On the package Admin tab, under "Maintainers", enter the npm username of the new maintainer.
22
@@ -41,7 +40,7 @@ npm owner add <their-username> <package-name>
40
npm owner rm <your-username> <package-name>
41
```
42
44
-If you have two-factor authentication enabled for writes, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator application).
43
+If you have two-factor authentication enabled for writes, add a one-time password to the command, `--otp=123456` (where _123456_ is the code from your authenticator application).
44
45
```
46
npm owner add <their-username> <package-name> --otp=123456
content/packages-and-modules/updating-and-managing-your-published-packages/unpublishing-packages-from-the-registry.mdx
+21
-30
@@ -1,11 +1,12 @@
1
---
2
title: Unpublishing packages from the registry
3
---
4
+
5
import shared from '~/shared.js'
6
7
As a package owner or collaborator, if your package has no dependents, you can permanently remove it from the npm registry by using the CLI. You can [unpublish](https://docs.npmjs.com/cli/commands/npm-unpublish) within 72 hours of the initial publish; beyond 72 hours, you can still unpublish your package if [it meets certain criteria](https://www.npmjs.com/policies/unpublish).
8
8
-These criteria are set to avoid damaging the JavaScript package ecosystem. If you cannot unpublish your package, you can [deprecate it instead](/deprecating-and-undeprecating-packages-or-package-versions).
9
+These criteria are set to avoid damaging the JavaScript package ecosystem. If you cannot unpublish your package, you can [deprecate it instead](/deprecating-and-undeprecating-packages-or-package-versions).
10
11
<Note>
12
@@ -15,44 +16,35 @@ These criteria are set to avoid damaging the JavaScript package ecosystem. If y
16
17
## Unpublishing a package
18
18
-If you want to completely remove all versions of a package from the registry, you can unpublish it completely. This will delete it from the registry and it will be unable to be installed.
19
+If you want to completely remove all versions of a package from the registry, you can unpublish it completely. This will delete it from the registry and it will be unable to be installed.
20
21
To unpublish a package, you must meet the requirements of the [package unpublishing rules][unpublish].
22
23
### Using the website
24
24
-1. <>{shared["user-login"].text}</>
25
+1. <>{shared['user-login'].text}</>
26
+
27
+ <>{shared['user-login'].image}</>
28
26
- <>{shared["user-login"].image}</>
29
+2. Navigate to the package page for the package you want to unpublish, replacing `<your-package-name>` with the name of your package: `https://www.npmjs.com/package/<your-package-name>`.
30
28
-2. Navigate to the package page for the package you want to unpublish, replacing `<your-package-name>` with the name of your package:
29
- `https://www.npmjs.com/package/<your-package-name>`.
31
+3. Click **Settings**.
32
31
-3. Click **Settings**.
32
- <Screenshot
33
- src="/packages-and-modules/securing-your-code/2fa-package-admin.png"
34
- alt="Screenshot showing the admin tab on a package page"
35
- />
33
+ <Screenshot src="/packages-and-modules/securing-your-code/2fa-package-admin.png" alt="Screenshot showing the admin tab on a package page" />
34
37
-4. Under "delete package", click <strong>Delete package</strong>.
35
+4. Under "delete package", click <strong>Delete package</strong>.
36
39
- <Screenshot
40
- src="/packages-and-modules/deleting-deprecating/delete-package-settings.png"
41
- alt="Screenshot showing the admin tab on a package page"
42
- />
37
+ <Screenshot src="/packages-and-modules/deleting-deprecating/delete-package-settings.png" alt="Screenshot showing the admin tab on a package page" />
38
39
<Note>
40
46
- **Note:** If you cannot delete the package because it does not meet the [unpublishing requirements][unpublish], then the delete package option will not be available. Instead, you will be prompted to [deprecate the package](/deprecating-and-undeprecating-packages-or-package-versions#deprecating-a-package-from-the-website).
41
+ **Note:** If you cannot delete the package because it does not meet the [unpublishing requirements][unpublish], then the delete package option will not be available. Instead, you will be prompted to [deprecate the package](/deprecating-and-undeprecating-packages-or-package-versions#deprecating-a-package-from-the-website).
42
43
</Note>
44
50
-5. If you are sure that you want to continue, enter your package name and click <strong>Delete package</strong>.
45
+5. If you are sure that you want to continue, enter your package name and click <strong>Delete package</strong>.
46
52
- <Screenshot
53
- src="/packages-and-modules/deleting-deprecating/delete-package-confirm.png"
54
- alt="Screenshot showing the admin tab on a package page"
55
- />
47
+ <Screenshot src="/packages-and-modules/deleting-deprecating/delete-package-confirm.png" alt="Screenshot showing the admin tab on a package page" />
48
49
### Using the command line
50
@@ -62,9 +54,9 @@ To unpublish an entire package, run the following command, replacing `<package-n
54
npm unpublish <package-name> -f
55
```
56
65
-If you have [two-factor authentication][two-factor-auth] enabled for writes, you will need to add a one-time password to the `unpublish` command, `--otp=123456` (where *123456* is the code from your authenticator app).
57
+If you have [two-factor authentication][two-factor-auth] enabled for writes, you will need to add a one-time password to the `unpublish` command, `--otp=123456` (where _123456_ is the code from your authenticator app).
58
67
-<>If you need help unpublishing your package, please {shared['contact-support'].text}. If you are an Enterprise customer, please {shared['contact-enterprise-support'].text}</>.
59
+If you need help unpublishing your package, please <>{shared['contact-support'].text}</>. If you are an Enterprise customer, please <>{shared['contact-enterprise-support'].text}</>.
60
61
<Note>
62
@@ -74,7 +66,7 @@ If you have [two-factor authentication][two-factor-auth] enabled for writes, you
66
67
## Unpublishing a single version of a package
68
77
-If you want to remove a single version of a package, you can unpublish one version without affecting the others. This will delete only that version from the registry and it will be unable to be installed. This option is only available via the npm CLI.
69
+If you want to remove a single version of a package, you can unpublish one version without affecting the others. This will delete only that version from the registry and it will be unable to be installed. This option is only available via the npm CLI.
70
71
### Using the command line
72
@@ -90,10 +82,10 @@ Unpublishing a package permanently removes the package from the registry so it i
82
83
You might want to unpublish a package because you:
84
93
-* Published something accidentally.
94
-* Wanted to test npm.
95
-* Published content you [didn't intend to be public][oh-no].
96
-* Want to rename a package. (The only way to rename a package is to re-publish it under a new name)
85
+- Published something accidentally.
86
+- Wanted to test npm.
87
+- Published content you [didn't intend to be public][oh-no].
88
+- Want to rename a package. (The only way to rename a package is to re-publish it under a new name)
89
90
<Note>
91
@@ -105,7 +97,6 @@ You might want to unpublish a package because you:
97
98
If you are no longer interested in maintaining a package, but want it to remain available for users to install, or if your package has dependents, we'd recommend [deprecating][deprecate-cli] it. To learn about how to deprecate a package, see "[Deprecating and undeprecating packages or package versions][deprecate-package]".
99
108
-
100
[oh-no]: https://blog.npmjs.org/post/101934969510/oh-no-i-accidentally-published-private-data-to
101
[deprecate-cli]: cli/deprecate
102
[deprecate-package]: deprecating-and-undeprecating-packages-or-package-versions
content/packages-and-modules/updating-and-managing-your-published-packages/updating-your-published-package-version-number.mdx
-1
@@ -22,6 +22,5 @@ When you make significant changes to a published package, we recommend updating
22
23
For more information on `npm version`, see the [CLI documentation][cli-version].
24
25
-
25
[semver]: about-semantic-versioning
26
[cli-version]: /cli/version
content/policies/conduct.mdx
+41
-123
@@ -2,146 +2,76 @@
2
title: npm Code of Conduct
3
edit_on_github: false
4
---
5
-npm exists to facilitate sharing code, by making it easy for
6
-JavaScript module developers to publish and distribute packages.
5
+
6
+npm exists to facilitate sharing code, by making it easy for JavaScript module developers to publish and distribute packages.
7
8
npm is a piece of technology, but more importantly, it is a community.
9
10
-We believe that our mission is best served in an environment that is
11
-friendly, safe, and accepting; free from intimidation or harassment.
10
+We believe that our mission is best served in an environment that is friendly, safe, and accepting; free from intimidation or harassment.
11
13
-Towards this end, certain behaviors and practices will not be
14
-tolerated.
12
+Towards this end, certain behaviors and practices will not be tolerated.
13
14
## tl;dr
15
18
-* Be respectful.
19
-* We're here to help
20
-* Abusive behavior is never tolerated.
21
-* Data published to npm is hosted at the discretion of the service
22
- administrators, and may be removed.
23
-* Violations of this code may result in swift and permanent expulsion
24
- from the npm community.
16
+- Be respectful.
17
+- We're here to help
18
+- Abusive behavior is never tolerated.
19
+- Data published to npm is hosted at the discretion of the service administrators, and may be removed.
20
+- Violations of this code may result in swift and permanent expulsion from the npm community.
21
22
## Scope
23
28
-We expect all members of the npm community, including paid and unpaid
29
-agents, administrators, users, and customers of npm, Inc., to abide by
30
-this Code of Conduct at all times in all npm community venues, online
31
-and in person, and in one-on-one communications pertaining to npm
32
-affairs.
24
+We expect all members of the npm community, including paid and unpaid agents, administrators, users, and customers of npm, Inc., to abide by this Code of Conduct at all times in all npm community venues, online and in person, and in one-on-one communications pertaining to npm affairs.
25
34
-This policy covers the usage of the npm registry, as well as the npm
35
-website, npm related events, and any other services offered by or on
36
-behalf of npm, Inc. (collectively, the "Service"). It also applies to
37
-behavior in the context of the npm Open Source project communities,
38
-including but not limited to public GitHub repositories, IRC channels,
39
-social media, mailing lists, and public events.
26
+This policy covers the usage of the npm registry, as well as the npm website, npm related events, and any other services offered by or on behalf of npm, Inc. (collectively, the "Service"). It also applies to behavior in the context of the npm Open Source project communities, including but not limited to public GitHub repositories, IRC channels, social media, mailing lists, and public events.
27
41
-This Code of Conduct is in addition to, and does not in any way
42
-nullify or invalidate, any other terms or conditions related to use of
43
-the Service.
28
+This Code of Conduct is in addition to, and does not in any way nullify or invalidate, any other terms or conditions related to use of the Service.
29
45
-The definitions of various subjective terms such as "discriminatory",
46
-"hateful", or "confusing" will be decided at the sole discretion of
47
-the npm abuse team.
30
+The definitions of various subjective terms such as "discriminatory", "hateful", or "confusing" will be decided at the sole discretion of the npm abuse team.
31
32
## Friendly Harassment-Free Space
33
51
-We are committed to providing a friendly, safe and welcoming
52
-environment for all, regardless of gender identity, sexual
53
-orientation, ability, ethnicity, religion, age, physical
54
-appearance, body size, race, or similar personal characteristics.
55
-
56
-We ask that you please respect that people have differences of opinion
57
-regarding technical choices, and that every design or implementation
58
-choice carries a trade-off and numerous costs. There is seldom a
59
-single right answer. A difference of technology preferences is not a
60
-license to be rude.
61
-
62
-Disputes over package rights must be handled respectfully, according
63
-to the terms described in the [Disputes Policy][disputes].
64
-There is never a good reason to be rude over package name disputes.
65
-
66
-Any spamming, trolling, flaming, baiting, or other attention-stealing
67
-behavior is not welcome, and will not be tolerated.
68
-
69
-Harassing other users of the Service is never tolerated, whether via
70
-public or private media.
71
-
72
-Avoid using offensive or harassing package names, nicknames, or other
73
-identifiers that might detract from a friendly, safe, and welcoming
74
-environment for all.
75
-
76
-Harassment includes, but is not limited to: harmful or prejudicial
77
-verbal or written comments related to gender identity, sexual
78
-orientation, ability, ethnicity, religion, age, physical
79
-appearance, body size, race, or similar personal characteristics;
80
-inappropriate use of nudity, sexual images, and/or sexually explicit
81
-language in public spaces; threats of physical or non-physical harm;
82
-deliberate intimidation, stalking or following; harassing photography
83
-or recording; sustained disruption of talks or other events;
84
-inappropriate physical contact; and unwelcome sexual attention.
34
+We are committed to providing a friendly, safe and welcoming environment for all, regardless of gender identity, sexual orientation, ability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics.
35
+
36
+We ask that you please respect that people have differences of opinion regarding technical choices, and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a single right answer. A difference of technology preferences is not a license to be rude.
37
+
38
+Disputes over package rights must be handled respectfully, according to the terms described in the [Disputes Policy][disputes]. There is never a good reason to be rude over package name disputes.
39
+
40
+Any spamming, trolling, flaming, baiting, or other attention-stealing behavior is not welcome, and will not be tolerated.
41
+
42
+Harassing other users of the Service is never tolerated, whether via public or private media.
43
+
44
+Avoid using offensive or harassing package names, nicknames, or other identifiers that might detract from a friendly, safe, and welcoming environment for all.
45
+
46
+Harassment includes, but is not limited to: harmful or prejudicial verbal or written comments related to gender identity, sexual orientation, ability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics; inappropriate use of nudity, sexual images, and/or sexually explicit language in public spaces; threats of physical or non-physical harm; deliberate intimidation, stalking or following; harassing photography or recording; sustained disruption of talks or other events; inappropriate physical contact; and unwelcome sexual attention.
47
48
## Acceptable Use
49
88
-The Service administrators reserve the right to make judgment calls
89
-about what is and isn't appropriate in published packages, package names,
90
-user and organization names, and other public content. Package that
91
-violates the npm Service's
92
-[Acceptable Use][acceptable-use]
93
-rules including its
94
-[Acceptable Content][acceptable-content]
95
-rules will be deleted, at the discretion of npm.
50
+The Service administrators reserve the right to make judgment calls about what is and isn't appropriate in published packages, package names, user and organization names, and other public content. Package that violates the npm Service's [Acceptable Use][acceptable-use] rules including its [Acceptable Content][acceptable-content] rules will be deleted, at the discretion of npm.
51
52
## Reporting Violations of this Code of Conduct
53
99
-Please select the method of contact you think is most appropriate for
100
-the form of violation:
54
+Please select the method of contact you think is most appropriate for the form of violation:
55
102
-* For urgent security issues, please open a ticket at [https://npmjs.com/support](https://npmjs.com/support).
103
- Requests to un-publish packages are not usually considered urgent security
104
- issues, as it is possible to [un-publish a package][unpublish]
105
- within 24 hours of its first publish. Any publicly published package
106
- is [immediately replicated to thousands of third-party mirrors](http://blog.npmjs.org/post/101934969510/oh-no-i-accidentally-published-private-data-to),
107
- so any confidential information contained in a package should be considered
108
- immediately compromised.
56
+- For urgent security issues, please open a ticket at [https://npmjs.com/support](https://npmjs.com/support). Requests to un-publish packages are not usually considered urgent security issues, as it is possible to [un-publish a package][unpublish] within 24 hours of its first publish. Any publicly published package is [immediately replicated to thousands of third-party mirrors](http://blog.npmjs.org/post/101934969510/oh-no-i-accidentally-published-private-data-to), so any confidential information contained in a package should be considered immediately compromised.
57
110
-* If you believe someone is harassing you or is demonstrating
111
- some other form of malicious or inappropriate behavior, open a support
112
- ticket at https://npmjs.com/support. If this is the initial report of a problem,
113
- please include as much detail as possible. It is easiest for us
114
- to address issues when we have more context.
58
+- If you believe someone is harassing you or is demonstrating some other form of malicious or inappropriate behavior, open a support ticket at https://npmjs.com/support. If this is the initial report of a problem, please include as much detail as possible. It is easiest for us to address issues when we have more context.
59
116
-* If you have concerns about a potential copyright violation,
117
- please refer to our [Copyright Policy][dmca]
118
- and take action as recommended by that policy.
60
+- If you have concerns about a potential copyright violation, please refer to our [Copyright Policy][dmca] and take action as recommended by that policy.
61
120
-* If you think a package or other content is "squatting" on a name,
121
- follow the process described in the
122
- [Disputes Policy][disputes].
62
+- If you think a package or other content is "squatting" on a name, follow the process described in the [Disputes Policy][disputes].
63
64
For any other issues, or if in doubt, [contact support](https://npmjs.com/support).
65
126
-
66
## Consequences
67
129
-All content published to the Service, including user account
130
-credentials, is hosted at the sole discretion of the npm
131
-administrators.
68
+All content published to the Service, including user account credentials, is hosted at the sole discretion of the npm administrators.
69
133
-Unacceptable behavior from any community member, including sponsors,
134
-employees, customers, or others with decision-making authority, will
135
-not be tolerated.
70
+Unacceptable behavior from any community member, including sponsors, employees, customers, or others with decision-making authority, will not be tolerated.
71
137
-Anyone asked to stop unacceptable behavior is expected to comply
138
-immediately.
72
+Anyone asked to stop unacceptable behavior is expected to comply immediately.
73
140
-If a community member engages in unacceptable behavior, the npm
141
-administrators may take any action they deem appropriate, up to and
142
-including a temporary ban or permanent expulsion from the community
143
-without warning (and without refund in the case of a paid event or
144
-service).
74
+If a community member engages in unacceptable behavior, the npm administrators may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event or service).
75
76
## Appeal and Reinstatement
77
@@ -149,31 +79,19 @@ If your content or account has been disabled or restricted and you seek reinstat
79
80
## Contact Info
81
152
-Please open a support ticket at [https://npmjs.com/support](https://npmjs.com/support) if you need to
153
-report a problem or address a grievance related to an abuse report.
82
+Please open a support ticket at [https://npmjs.com/support](https://npmjs.com/support) if you need to report a problem or address a grievance related to an abuse report.
83
155
-You are also encouraged to contact us if you are curious about
156
-something that might be "on the line" between appropriate and
157
-inappropriate content. We are happy to provide guidance to help you
158
-be a successful part of our community.
84
+You are also encouraged to contact us if you are curious about something that might be "on the line" between appropriate and inappropriate content. We are happy to provide guidance to help you be a successful part of our community.
85
86
## Changes
87
162
-This is a living document and may be updated from time to time.
163
-Please refer to the [git history for this
164
-document](https://github.com/npm/documentation/blob/main/content/policies/conduct.mdx)
165
-to view the changes.
88
+This is a living document and may be updated from time to time. Please refer to the [git history for this document](https://github.com/npm/documentation/blob/main/content/policies/conduct.mdx) to view the changes.
89
90
## Credit and License
91
169
-This Code of Conduct borrows heavily from the Stumptown Syndicate
170
-[Citizen's Code of Conduct](http://citizencodeofconduct.org/), and the
171
-[Rust Project Code of
172
-Conduct](https://www.rust-lang.org/conduct.html).
92
+This Code of Conduct borrows heavily from the Stumptown Syndicate [Citizen's Code of Conduct](http://citizencodeofconduct.org/), and the [Rust Project Code of Conduct](https://www.rust-lang.org/conduct.html).
93
174
-This document may be reused under a [Creative Commons
175
-Attribution-ShareAlike
176
-License](https://creativecommons.org/licenses/by-sa/4.0/).
94
+This document may be reused under a [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/4.0/).
95
96
[disputes]: /policies/disputes
97
[acceptable-use]: /policies/open-source-terms#acceptable-use
content/policies/disputes.mdx
+17
-60
@@ -3,113 +3,70 @@ title: Dispute Resolution
3
edit_on_github: false
4
---
5
6
-This document describes the steps that you should take to resolve
7
-naming disputes with other npm publishers. It also describes the steps
8
-you should take if you think a name [infringes your trademark](#trademarks).
6
+This document describes the steps that you should take to resolve naming disputes with other npm publishers. It also describes the steps you should take if you think a name [infringes your trademark](#trademarks).
7
10
-This document is additive to the guidelines in the
11
-[npm Code of Conduct][conduct] and
12
-[npm Open-Source terms][open-source-terms].
13
-Nothing in this document should be interpreted to contradict any aspect
14
-of the npm Code of Conduct or Open-Source Terms.
8
+This document is additive to the guidelines in the [npm Code of Conduct][conduct] and [npm Open-Source terms][open-source-terms]. Nothing in this document should be interpreted to contradict any aspect of the npm Code of Conduct or Open-Source Terms.
9
10
## tl;dr
11
12
1. Open a support ticket at [https://support.github.com/contact/npm-name-disputes](https://support.github.com/contact/npm-name-disputes).
13
1. Fill out the form with as much detail as possible.
20
-1. Support will address your request. Please note submitting a report does not
21
- guarantee the transfer of a package, org, or username.
14
+1. Support will address your request. Please note submitting a report does not guarantee the transfer of a package, org, or username.
15
16
## When to use this process
17
18
This process is an excellent way to:
19
27
-* Request a name that you believe is currently misleading or could be confused with a name used by your company or open source project
28
-* Request a name related to your company or open source project that cannot be claimed via account recovery
20
+- Request a name that you believe is currently misleading or could be confused with a name used by your company or open source project
21
+- Request a name related to your company or open source project that cannot be claimed via account recovery
22
30
-This process does not apply if the package violates our
31
-[Terms of Use][open-source-terms],
32
-in particular our
33
-[Acceptable Use][acceptable-use]
34
-and [Acceptable Content][acceptable-content]
35
-rules, or our [Code of Conduct][conduct].
36
-Those documents refer to this one to resolve cases of "squatting"; see
37
-below.
23
+This process does not apply if the package violates our [Terms of Use][open-source-terms], in particular our [Acceptable Use][acceptable-use] and [Acceptable Content][acceptable-content] rules, or our [Code of Conduct][conduct]. Those documents refer to this one to resolve cases of "squatting"; see below.
24
39
-If you see bad behavior or content you believe is unacceptable, refer to
40
-the Code of Conduct for guidelines on
41
-[reporting violations][violations].
42
-**You are never expected to resolve abusive behavior on your own.**
43
-**We are here to help.**
25
+If you see bad behavior or content you believe is unacceptable, refer to the Code of Conduct for guidelines on [reporting violations][violations]. **You are never expected to resolve abusive behavior on your own.** **We are here to help.**
26
27
## When not to use this process
28
47
-This process is not available for dispute requests due to lack of activity
48
-related to a specific name.
29
+This process is not available for dispute requests due to lack of activity related to a specific name.
30
50
-Please also note there are cases where a party may have claim to a specific name,
51
-but giving that name to the requesting party would pose a supply-chain risk
52
-to the npm ecosystem. In such cases, requests may be denied independent of
53
-the validity of the claim.
31
+Please also note there are cases where a party may have claim to a specific name, but giving that name to the requesting party would pose a supply-chain risk to the npm ecosystem. In such cases, requests may be denied independent of the validity of the claim.
32
33
## Trademarks
34
35
npm processes Trademark claims under GitHub's [Trademark Policy](https://docs.github.com/site-policy/content-removal-policies/github-trademark-policy).
36
59
-If you think another npm publisher is infringing your trademark, such
60
-as by using a confusingly similar package, org, or user account name, please submit a Trademark Policy Violation Report via our [form](https://support.github.com/contact/trademark-policy).
37
+If you think another npm publisher is infringing your trademark, such as by using a confusingly similar package, org, or user account name, please submit a Trademark Policy Violation Report via our [form](https://support.github.com/contact/trademark-policy).
38
39
Use of npm's own trademarks is covered by our [Logo and Usage Policy][logos-and-usage].
40
41
## Changes
42
66
-This is a living document and may be updated from time to time.
67
-Please refer to the [git history for this
68
-document](https://github.com/npm/documentation/blob/main/content/policies/disputes.mdx)
69
-to view the changes.
43
+This is a living document and may be updated from time to time. Please refer to the [git history for this document](https://github.com/npm/documentation/blob/main/content/policies/disputes.mdx) to view the changes.
44
45
## Definitions
46
47
### Squatting
48
75
-It is against npm's
76
-[Terms of Use][acceptable-content]
77
-to publish a package, register a user name or an organization name
78
-simply for the purposes of reserving it for future use.
49
+It is against npm's [Terms of Use][acceptable-content] to publish a package, register a user name or an organization name simply for the purposes of reserving it for future use.
50
80
-We do not pro-actively scan the registry for squatted packages, so
81
-the fact that a name is in use does not mean we consider it valid.
82
-The standards for what we consider squatting depend on what is being
83
-squatted:
51
+We do not pro-actively scan the registry for squatted packages, so the fact that a name is in use does not mean we consider it valid. The standards for what we consider squatting depend on what is being squatted:
52
53
#### Packages
54
87
-Package names are considered squatted if the package has no genuine
88
-function.
55
+Package names are considered squatted if the package has no genuine function.
56
57
#### Organizations
58
92
-Organization names are considered squatted if there are no packages
93
-published within a reasonable time. If an organization is a paid
94
-organization, it may have private packages that are invisible to
95
-third parties. For privacy reasons, we cannot reveal whether or not
96
-an organization has private packages, so a paid organization will
97
-never be considered squatted.
59
+Organization names are considered squatted if there are no packages published within a reasonable time. If an organization is a paid organization, it may have private packages that are invisible to third parties. For privacy reasons, we cannot reveal whether or not an organization has private packages, so a paid organization will never be considered squatted.
60
61
#### User names
62
101
-We are extremely unlikely to transfer control of a user name, as it
102
-is totally valid to be an npm user and never publish any packages:
103
-for instance, you might be part of an organization or need read-only
104
-access to private packages.
63
+We are extremely unlikely to transfer control of a user name, as it is totally valid to be an npm user and never publish any packages: for instance, you might be part of an organization or need read-only access to private packages.
64
65
## License
66
67
Copyright (C) npm, Inc., All rights reserved
68
110
-This document may be reused under a [Creative Commons
111
-Attribution-ShareAlike
112
-License](https://creativecommons.org/licenses/by-sa/4.0/).
69
+This document may be reused under a [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/4.0/).
70
71
[conduct]: /policies/conduct
72
[open-source-terms]: /policies/open-source-terms
content/policies/dmca.mdx
+3
-5
@@ -3,11 +3,9 @@ title: Copyright - DMCA Takedown Policy
3
edit_on_github: false
4
---
5
6
-This policy describes how we at npm, Inc., the company behind npmjs.com
7
-and the npm public registry, respond to claims that materials users
8
-have submitted to our service infringe copyright.
6
+This policy describes how we at npm, Inc., the company behind npmjs.com and the npm public registry, respond to claims that materials users have submitted to our service infringe copyright.
7
10
-npm follows GitHub's [Copyright - DMCA Takedown Policy](https://docs.github.com/site-policy/content-removal-policies/dmca-takedown-policy). Please carefully review that policy along with GitHub's [Guide to Submitting a DMCA Takedown Notice](https://docs.github.com/en/site-policy/content-removal-policies/guide-to-submitting-a-dmca-takedown-notice) to determine if you should submit a DMCA takedown.
8
+npm follows GitHub's [Copyright - DMCA Takedown Policy](https://docs.github.com/site-policy/content-removal-policies/dmca-takedown-policy). Please carefully review that policy along with GitHub's [Guide to Submitting a DMCA Takedown Notice](https://docs.github.com/en/site-policy/content-removal-policies/guide-to-submitting-a-dmca-takedown-notice) to determine if you should submit a DMCA takedown.
9
10
If you are ready to submit a DMCA takedown notice, the fastest way to get a response is to enter your information and answer all the questions on GitHub's [Copyright claims form](https://github.com/contact/dmca). Be sure to select the option indicating that your claim involves content on npm.js.
11
@@ -18,4 +16,4 @@ If you must send your notice by physical mail, you can do that too, but it will
16
GitHub, Inc
17
Attn: DMCA Agent
18
88 Colin P Kelly Jr St
21
-San Francisco, CA. 94107
19
+San Francisco, CA. 94107
content/policies/index.mdx
+1
-1
@@ -7,4 +7,4 @@ These are the legal policies of npm, Inc.
7
8
<Index />
9
10
-These are updated from time to time. Their sources are stored in a git repository at [https://github.com/npm/documentation/tree/main/content/policies](https://github.com/npm/documentation/tree/main/content/policies).
10
+These are updated from time to time. Their sources are stored in a git repository at [https://github.com/npm/documentation/tree/main/content/policies](https://github.com/npm/documentation/tree/main/content/policies).
content/policies/logos-and-usage.mdx
+26
-51
@@ -1,19 +1,16 @@
1
---
2
title: npm Logos and Usage
3
edit_on_github: false
4
----
4
+---
5
6
-This policy describes npm logos and trademarks and how you may use them.
7
-For information on what to do if someone infringes a trademark of
8
-_yours_ with a confusing package name, see the [Disputes policy][disputes].
6
+This policy describes npm logos and trademarks and how you may use them. For information on what to do if someone infringes a trademark of _yours_ with a confusing package name, see the [Disputes policy][disputes].
7
8
## What is npm?
9
10
The npm project contains two main parts:
11
12
1. The npm client. It is a command line tool to install and publish packages.
15
-2. The npm registry service. npm, Inc. runs the registry as a free (as in beer) public service for anyone
16
-wanting to publish an open source package and for anyone to install an open source package.
13
+2. The npm registry service. npm, Inc. runs the registry as a free (as in beer) public service for anyone wanting to publish an open source package and for anyone to install an open source package.
14
15
## Why npm, Inc. has a logo policy
16
@@ -21,12 +18,12 @@ wanting to publish an open source package and for anyone to install an open sour
18
19
## General rules
20
24
-* When referring to the npm software in body text, the first usage should be followed by a generic term such as "package manager," "services" or "client" to provide context.
25
-* "npm" should never be used or explained as an acronym.
26
-* When referring to the npm public registry, please follow npm with the word "registry" or the phrase "public registry".
27
-* When referring to a private registry for npm packages, please describe it as "private registry for npm packages" or a "proxy of the npm registry".
28
-* References to the owner of the npm client software and the operator of the npm public registry should be to "npm, Inc."
29
-* Any materials referring to npm should include the following notice in the footer or wherever you may have your own trademark notice: "npm is a registered trademark of npm, Inc."
21
+- When referring to the npm software in body text, the first usage should be followed by a generic term such as "package manager," "services" or "client" to provide context.
22
+- "npm" should never be used or explained as an acronym.
23
+- When referring to the npm public registry, please follow npm with the word "registry" or the phrase "public registry".
24
+- When referring to a private registry for npm packages, please describe it as "private registry for npm packages" or a "proxy of the npm registry".
25
+- References to the owner of the npm client software and the operator of the npm public registry should be to "npm, Inc."
26
+- Any materials referring to npm should include the following notice in the footer or wherever you may have your own trademark notice: "npm is a registered trademark of npm, Inc."
27
28
## Nominative use - No need to type ™ on Twitter®
29
@@ -36,9 +33,9 @@ It is not a referential use to incorporate the letters "npm" or any of the npm l
33
34
If you need to use "npm" to indicate compatibility, you should use "npm" after your own product or service name and an accurate preposition:
35
39
-* Pink Unicorn Consulting Ltd. services <strong>for</strong> npm
40
-* Purple Unicorn Inc. private registry server <strong>compatible with</strong> the npm client
41
-* Kappa, a hierarchical proxy <strong>of</strong> the npm registry
36
+- Pink Unicorn Consulting Ltd. services <strong>for</strong> npm
37
+- Purple Unicorn Inc. private registry server <strong>compatible with</strong> the npm client
38
+- Kappa, a hierarchical proxy <strong>of</strong> the npm registry
39
40
You need to ask for permission for any uses not described. When in doubt about your use of the npm name or logo, please contact [npm, Inc.](https://www.npmjs.com/contact) for clarification.
41
@@ -46,58 +43,36 @@ You need to ask for permission for any uses not described. When in doubt about y
43
44
We like to make it easy for anyone to use the npm name or logo for community-oriented efforts that help spread and improve npm. We are therefore likely to grant permission to use the npm name and logo in the following ways:
45
49
-* For projects where:
50
- * The primary purpose of your project is to promote the spread and
51
- improvement of the npm client software or the npm registry service.
52
- * Your project is non-commercial in nature (it can make money to cover
53
- its costs or contribute to non-profit entities, but it cannot be run
54
- as a for-profit project or business).
55
- * Your project neither promotes nor is associated with entities that
56
- currently fail to comply with the Artistic License 2.0 under which
57
- npm is distributed, or which are in violation of this policy.
58
-
59
-* For a user group name where:
60
- * The main focus of the group is the software.
61
- * Any software or services the group provides are without cost.
62
- * The group does not make a profit.
63
- * Any charge to attend meetings are to cover the cost of the venue, food and drink only.
46
+- For projects where:
47
+ - The primary purpose of your project is to promote the spread and improvement of the npm client software or the npm registry service.
48
+ - Your project is non-commercial in nature (it can make money to cover its costs or contribute to non-profit entities, but it cannot be run as a for-profit project or business).
49
+ - Your project neither promotes nor is associated with entities that currently fail to comply with the Artistic License 2.0 under which npm is distributed, or which are in violation of this policy.
50
+- For a user group name where:
51
+ - The main focus of the group is the software.
52
+ - Any software or services the group provides are without cost.
53
+ - The group does not make a profit.
54
+ - Any charge to attend meetings are to cover the cost of the venue, food and drink only.
55
56
Any other requests are not likely to be granted licenses, but feel free to [ask](https://www.npmjs.com/contact).
57
58
## The npm Logos
59
69
-Our npm Logos are very recognizable and deserve special treatment. In short, the npm logos represent only npm and should not be used to represent your products. The
70
-npm Logos signify us, or a special relationship with us, and you
71
-may use them only with our permission. Since the goal is to avoid
72
-confusion about you being us, or your relationship with us, context
73
-counts. We will [consider requests](https://www.npmjs.com/contact) on a case-by-case basis.
60
+Our npm Logos are very recognizable and deserve special treatment. In short, the npm logos represent only npm and should not be used to represent your products. The npm Logos signify us, or a special relationship with us, and you may use them only with our permission. Since the goal is to avoid confusion about you being us, or your relationship with us, context counts. We will [consider requests](https://www.npmjs.com/contact) on a case-by-case basis.
61
62
## The npm Wombat Mascot
63
77
-Like the npm Logo, the npm Wombat graphic is a very recognizable
78
-part of the npm brand, and signifies a special relationship with
79
-the npm project, service, or company. It should never be used except
80
-with explicit written permission. We will [consider requests](https://www.npmjs.com/contact) on a
81
-case-by-case basis.
64
+Like the npm Logo, the npm Wombat graphic is a very recognizable part of the npm brand, and signifies a special relationship with the npm project, service, or company. It should never be used except with explicit written permission. We will [consider requests](https://www.npmjs.com/contact) on a case-by-case basis.
65
83
-Please be advised that the Wombat and the logos generally may
84
-**not** be used to refer to the project, service, or company in a
85
-nominative sense, as any usage will almost always imply a special
86
-relationship with npm.
66
+Please be advised that the Wombat and the logos generally may **not** be used to refer to the project, service, or company in a nominative sense, as any usage will almost always imply a special relationship with npm.
67
68
## Changes
69
90
-This is a living document and may be updated from time to time.
91
-Please refer to the [git history for this
92
-document](https://github.com/npm/documentation/blob/main/content/policies/logos-and-usage.mdx)
93
-to view the changes.
70
+This is a living document and may be updated from time to time. Please refer to the [git history for this document](https://github.com/npm/documentation/blob/main/content/policies/logos-and-usage.mdx) to view the changes.
71
72
## License
73
74
Copyright © npm, Inc.
75
99
-This document may be reused under a [Creative Commons
100
-Attribution-ShareAlike
101
-License](https://creativecommons.org/licenses/by-sa/4.0/).
76
+This document may be reused under a [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/4.0/).
77
78
[disputes]: /policies/disputes
content/policies/npm-license.mdx
+33
-142
@@ -3,39 +3,25 @@ title: npm License
3
edit_on_github: false
4
---
5
6
-Copyright (c) npm, Inc. and Contributors
7
-All rights reserved.
6
+Copyright (c) npm, Inc. and Contributors All rights reserved.
7
9
-npm is released under the Artistic License 2.0, subject to additional terms
10
-that are listed below.
8
+npm is released under the Artistic License 2.0, subject to additional terms that are listed below.
9
12
-The text of the npm License follows and the text of the additional terms
13
-follows the Artistic License 2.0 terms:
14
-
15
-
16
---------
10
+The text of the npm License follows and the text of the additional terms follows the Artistic License 2.0 terms:
11
12
+---
13
14
The Artistic License 2.0
15
16
Copyright (c) 2000-2006, The Perl Foundation.
17
23
-Everyone is permitted to copy and distribute verbatim copies
24
-of this license document, but changing it is not allowed.
18
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
19
20
Preamble
21
28
-This license establishes the terms under which a given free software
29
-Package may be copied, modified, distributed, and/or redistributed.
30
-The intent is that the Copyright Holder maintains some artistic
31
-control over the development of that Package while still keeping the
32
-Package available as open source and free software.
22
+This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software.
23
34
-You are always permitted to make arrangements wholly outside of this
35
-license directly with the Copyright Holder of a given Package. If the
36
-terms of this license do not permit the full use that you propose to
37
-make of the Package, you should contact the Copyright Holder and seek
38
-a different licensing arrangement.
24
+You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement.
25
26
Definitions
27
@@ -81,37 +67,19 @@ Definitions
67
or any other form resulting from mechanical transformation or
68
translation of the Source form.
69
84
-
70
Permission for Use and Modification Without Distribution
71
87
-(1) You are permitted to use the Standard Version and create and use
88
-Modified Versions for any purpose without restriction, provided that
89
-you do not Distribute the Modified Version.
90
-
72
+(1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version.
73
74
Permissions for Redistribution of the Standard Version
75
94
-(2) You may Distribute verbatim copies of the Source form of the
95
-Standard Version of this Package in any medium without restriction,
96
-either gratis or for a Distributor Fee, provided that you duplicate
97
-all of the original copyright notices and associated disclaimers. At
98
-your discretion, such verbatim copies may or may not include a
99
-Compiled form of the Package.
100
-
101
-(3) You may apply any bug fixes, portability changes, and other
102
-modifications made available from the Copyright Holder. The resulting
103
-Package will still be considered the Standard Version, and as such
104
-will be subject to the Original License.
76
+(2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package.
77
78
+(3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License.
79
80
Distribution of Modified Versions of the Package as Source
81
109
-(4) You may Distribute your Modified Version as Source (either gratis
110
-or for a Distributor Fee, and with or without a Compiled form of the
111
-Modified Version) provided that you clearly document how it differs
112
-from the Standard Version, including, but not limited to, documenting
113
-any non-standard features, executables, or modules, and provided that
114
-you do at least ONE of the following:
82
+(4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following:
83
84
(a) make the Modified Version available to the Copyright Holder
85
of the Standard Version, under the Original License, so that the
@@ -137,131 +105,54 @@ you do at least ONE of the following:
105
available in that license fees are prohibited but Distributor
106
Fees are allowed.
107
108
+Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source
109
141
-Distribution of Compiled Forms of the Standard Version
142
-or Modified Versions without the Source
143
-
144
-(5) You may Distribute Compiled forms of the Standard Version without
145
-the Source, provided that you include complete instructions on how to
146
-get the Source of the Standard Version. Such instructions must be
147
-valid at the time of your distribution. If these instructions, at any
148
-time while you are carrying out such distribution, become invalid, you
149
-must provide new instructions on demand or cease further distribution.
150
-If you provide valid instructions or cease distribution within thirty
151
-days after you become aware that the instructions are invalid, then
152
-you do not forfeit any of your rights under this license.
153
-
154
-(6) You may Distribute a Modified Version in Compiled form without
155
-the Source, provided that you comply with Section 4 with respect to
156
-the Source of the Modified Version.
110
+(5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license.
111
112
+(6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version.
113
114
Aggregating or Linking the Package
115
161
-(7) You may aggregate the Package (either the Standard Version or
162
-Modified Version) with other packages and Distribute the resulting
163
-aggregation provided that you do not charge a licensing fee for the
164
-Package. Distributor Fees are permitted, and licensing fees for other
165
-components in the aggregation are permitted. The terms of this license
166
-apply to the use and Distribution of the Standard or Modified Versions
167
-as included in the aggregation.
168
-
169
-(8) You are permitted to link Modified and Standard Versions with
170
-other works, to embed the Package in a larger work of your own, or to
171
-build stand-alone binary or bytecode versions of applications that
172
-include the Package, and Distribute the result without restriction,
173
-provided the result does not expose a direct interface to the Package.
116
+(7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation.
117
118
+(8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package.
119
120
Items That are Not Considered Part of a Modified Version
121
178
-(9) Works (including, but not limited to, modules and scripts) that
179
-merely extend or make use of the Package, do not, by themselves, cause
180
-the Package to be a Modified Version. In addition, such works are not
181
-considered parts of the Package itself, and are not subject to the
182
-terms of this license.
183
-
122
+(9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license.
123
124
General Provisions
125
187
-(10) Any use, modification, and distribution of the Standard or
188
-Modified Versions is governed by this Artistic License. By using,
189
-modifying or distributing the Package, you accept this license. Do not
190
-use, modify, or distribute the Package, if you do not accept this
191
-license.
126
+(10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
127
193
-(11) If your Modified Version has been derived from a Modified
194
-Version made by someone other than you, you are nevertheless required
195
-to ensure that your Modified Version complies with the requirements of
196
-this license.
128
+(11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
129
198
-(12) This license does not grant you the right to use any trademark,
199
-service mark, tradename, or logo of the Copyright Holder.
130
+(12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
131
201
-(13) This license includes the non-exclusive, worldwide,
202
-free-of-charge patent license to make, have made, use, offer to sell,
203
-sell, import and otherwise transfer the Package with respect to any
204
-patent claims licensable by the Copyright Holder that are necessarily
205
-infringed by the Package. If you institute patent litigation
206
-(including a cross-claim or counterclaim) against any party alleging
207
-that the Package constitutes direct or contributory patent
208
-infringement, then this Artistic License to you shall terminate on the
209
-date that such litigation is filed.
132
+(13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.
133
211
-(14) Disclaimer of Warranty:
212
-THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
213
-IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
214
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
215
-NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
216
-LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
217
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
218
-DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
219
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
220
-
221
-
222
---------
134
+(14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
135
136
+---
137
225
-The following additional terms shall apply to use of the npm software, the npm
226
-website, the npm repository and any other services or products offered by npm,
227
-Inc.:
138
+The following additional terms shall apply to use of the npm software, the npm website, the npm repository and any other services or products offered by npm, Inc.:
139
229
-"Node.js" trademark Joyent, Inc. npm is not officially part of the Node.js
230
-project, and is neither owned by nor affiliated with Joyent, Inc.
140
+"Node.js" trademark Joyent, Inc. npm is not officially part of the Node.js project, and is neither owned by nor affiliated with Joyent, Inc.
141
142
"npm" and "The npm Registry" are owned by npm, Inc. All rights reserved.
143
234
-Modules published on the npm registry are not officially endorsed by npm, Inc.
235
-or the Node.js project.
144
+Modules published on the npm registry are not officially endorsed by npm, Inc. or the Node.js project.
145
237
-Data published to the npm registry is not part of npm itself, and is the sole
238
-property of the publisher. While every effort is made to ensure accountability,
239
-there is absolutely no guarantee, warrantee, or assertion expressed or implied
240
-as to the quality, fitness for a specific purpose, or lack of malice in any
241
-given npm package. Packages downloaded through the npm registry are
242
-independently licensed and are not covered by this license.
146
+Data published to the npm registry is not part of npm itself, and is the sole property of the publisher. While every effort is made to ensure accountability, there is absolutely no guarantee, warrantee, or assertion expressed or implied as to the quality, fitness for a specific purpose, or lack of malice in any given npm package. Packages downloaded through the npm registry are independently licensed and are not covered by this license.
147
244
-Additional policies relating to, and restrictions on use of, npm products and
245
-services are available on the npm website. All such policies and restrictions,
246
-as updated from time to time, are hereby incorporated into this license
247
-agreement. By using npm, you acknowledge your agreement to all such policies
248
-and restrictions.
148
+Additional policies relating to, and restrictions on use of, npm products and services are available on the npm website. All such policies and restrictions, as updated from time to time, are hereby incorporated into this license agreement. By using npm, you acknowledge your agreement to all such policies and restrictions.
149
250
-If you have a complaint about a package in the public npm registry, and cannot
251
-resolve it with the package owner, please
252
-[contact support](https://npmjs.com/support) and explain the situation.
253
-See the [npm Dispute Resolution policy](https://github.com/npm/documentation/blob/main/content/policies/disputes.mdx) for more details.
150
+If you have a complaint about a package in the public npm registry, and cannot resolve it with the package owner, please [contact support](https://npmjs.com/support) and explain the situation. See the [npm Dispute Resolution policy](https://github.com/npm/documentation/blob/main/content/policies/disputes.mdx) for more details.
151
255
-Any data published to The npm Registry (including user account information) may
256
-be removed or modified at the sole discretion of the npm server administrators.
152
+Any data published to The npm Registry (including user account information) may be removed or modified at the sole discretion of the npm server administrators.
153
258
-"npm Logo" contributed by Mathias Pettersson and Brian Hammond,
259
-use is subject to https://docs.npmjs.com/trademark
154
+"npm Logo" contributed by Mathias Pettersson and Brian Hammond, use is subject to https://docs.npmjs.com/trademark
155
261
-"Gubblebum Blocky" font
262
-Copyright (c) by Tjarda Koster, https://jelloween.deviantart.com
263
-included for use in the npm website and documentation,
264
-used with permission.
156
+"Gubblebum Blocky" font Copyright (c) by Tjarda Koster, https://jelloween.deviantart.com included for use in the npm website and documentation, used with permission.
157
266
-This program uses several Node modules contained in the node_modules/
267
-subdirectory, according to the terms of their respective licenses.
158
+This program uses several Node modules contained in the node_modules/ subdirectory, according to the terms of their respective licenses.
content/policies/open-source-terms.mdx
+101
-355
@@ -2,513 +2,259 @@
2
title: npm Open-Source Terms
3
edit_on_github: false
4
---
5
-{/* TODO: Replace last-updated date for every published change */}
6
-These npm Open Source terms of use (these _Terms_) govern access to
7
-and use of [https://www.npmjs.com](https://www.npmjs.com) (the _Website_) as well as the
8
-"npm Public Registry" at [https://registry.npmjs.org](https://registry.npmjs.org) (the _Public
9
-Registry_). npm, Inc. (_npm_) operates each of those
10
-services. These terms refer to all of them together as _npm Open
11
-Source_.
12
-
13
-npm last updated these npm Open Source Terms on
14
-March 10, 2022.
15
-You can review prior versions at
16
-[https://github.com/npm/documentation/blob/main/content/policies/open-source-terms.mdx](https://github.com/npm/documentation/blob/main/content/policies/open-source-terms.mdx).
5
+
6
+{/* TODO: Replace last-updated date for every published change */} These npm Open Source terms of use (these _Terms_) govern access to and use of [https://www.npmjs.com](https://www.npmjs.com) (the _Website_) as well as the "npm Public Registry" at [https://registry.npmjs.org](https://registry.npmjs.org) (the _Public Registry_). npm, Inc. (_npm_) operates each of those services. These terms refer to all of them together as _npm Open Source_.
7
+
8
+npm last updated these npm Open Source Terms on March 10, 2022. You can review prior versions at [https://github.com/npm/documentation/blob/main/content/policies/open-source-terms.mdx](https://github.com/npm/documentation/blob/main/content/policies/open-source-terms.mdx).
9
10
## Important Terms
11
20
-***These Terms include a number of important provisions that affect your
21
-rights and responsibilities, such as the disclaimers in "Disclaimers",
22
-limits on npm's liability to you in "Limits on Liability", and an
23
-agreement to arbitrate disputes individually in "Arbitration".***
12
+**_These Terms include a number of important provisions that affect your rights and responsibilities, such as the disclaimers in "Disclaimers", limits on npm's liability to you in "Limits on Liability", and an agreement to arbitrate disputes individually in "Arbitration"._**
13
14
## Other Terms
15
27
-npm offers additional, paid services (_Paid Services_) that are subject
28
-to additional terms:
16
+npm offers additional, paid services (_Paid Services_) that are subject to additional terms:
17
30
-- Additional terms for npm Paid Services are available at
31
- [https://docs.npmjs.com/policies/private-terms][private-terms].
18
+- Additional terms for npm Paid Services are available at [https://docs.npmjs.com/policies/private-terms][private-terms].
19
33
-npm Open Source and any Paid Services you may agree to use are together
34
-called _npm Services_ throughout these Terms.
20
+npm Open Source and any Paid Services you may agree to use are together called _npm Services_ throughout these Terms.
21
22
## Legal Agreement
23
38
-You may only access or use npm Services by agreeing to these Terms.
39
-If npm adds any additional functionality to npm Services, you must
40
-agree to these Terms to use that new functionality, too. You show your agreement
41
-with npm on these Terms by creating a user account (your _Account_)
42
-or by accessing or using npm Services without creating an account.
43
-The agreement between you and npm is a legally binding contract (this
44
-_Agreement_).
24
+You may only access or use npm Services by agreeing to these Terms. If npm adds any additional functionality to npm Services, you must agree to these Terms to use that new functionality, too. You show your agreement with npm on these Terms by creating a user account (your _Account_) or by accessing or using npm Services without creating an account. The agreement between you and npm is a legally binding contract (this _Agreement_).
25
26
## Changes
27
48
-npm may change these Terms and the additional terms for Paid Services
49
-in the future. npm will post changes on the Website with a new "last
50
-updated" date. If you have an Account, npm will notify you of changes
51
-by email to the address provided for your Account, by a message on the
52
-Website, or both. If you do not have an account, npm may notify you of
53
-changes by a general announcement via the Website, but it is up to you
54
-to check for changes to these Terms. After receiving notice of changes
55
-to these Terms, you must accept those changes to continue using npm
56
-Services. You accept changes to these Terms by continuing to use npm
57
-Services. npm may change, suspend, or discontinue npm Services at any
58
-time without notice or liability to you.
28
+npm may change these Terms and the additional terms for Paid Services in the future. npm will post changes on the Website with a new "last updated" date. If you have an Account, npm will notify you of changes by email to the address provided for your Account, by a message on the Website, or both. If you do not have an account, npm may notify you of changes by a general announcement via the Website, but it is up to you to check for changes to these Terms. After receiving notice of changes to these Terms, you must accept those changes to continue using npm Services. You accept changes to these Terms by continuing to use npm Services. npm may change, suspend, or discontinue npm Services at any time without notice or liability to you.
29
30
## npm Policies
31
62
-npm respects your privacy and limits use and sharing of information
63
-about you collected by npm Services. The privacy policy at
64
-[https://docs.npmjs.com/policies/privacy][privacy](the _Privacy Policy_)
65
-describes these policies. npm will abide by the Privacy Policy and honor
66
-the privacy settings that you choose via npm Services.
32
+npm respects your privacy and limits use and sharing of information about you collected by npm Services. The privacy policy at [https://docs.npmjs.com/policies/privacy][privacy](the _Privacy Policy_) describes these policies. npm will abide by the Privacy Policy and honor the privacy settings that you choose via npm Services.
33
68
-npm respects the exclusive rights of copyright holders and responds
69
-to notifications about alleged infringement via npm Services per
70
-the copyright policy at [https://docs.npmjs.com/dmca][dmca] (the
71
-_Copyright Policy_).
34
+npm respects the exclusive rights of copyright holders and responds to notifications about alleged infringement via npm Services per the copyright policy at [https://docs.npmjs.com/dmca][dmca] (the _Copyright Policy_).
35
73
-npm resolves disputes about package names, user names, and organization
74
-names in the Public Registry per the policy at
75
-[https://docs.npmjs.com/disputes][disputes] (_Dispute Policy_). This
76
-includes "package squatting".
36
+npm resolves disputes about package names, user names, and organization names in the Public Registry per the policy at [https://docs.npmjs.com/disputes][disputes] (_Dispute Policy_). This includes "package squatting".
37
78
-Use of all npm Services is governed by the code of conduct at
79
-[https://docs.npmjs.com/conduct][conduct] (_Code of Conduct_).
38
+Use of all npm Services is governed by the code of conduct at [https://docs.npmjs.com/conduct][conduct] (_Code of Conduct_).
39
81
-npm permits use of npm trademarks per the policy at
82
-[https://docs.npmjs.com/trademark][trademark].
40
+npm permits use of npm trademarks per the policy at [https://docs.npmjs.com/trademark][trademark].
41
42
## Use of npm Open Source
43
86
-Subject to these Terms, npm grants you permission to use npm Open
87
-Source. That permission is not exclusive to you, and you cannot transfer
88
-it to anyone else.
44
+Subject to these Terms, npm grants you permission to use npm Open Source. That permission is not exclusive to you, and you cannot transfer it to anyone else.
45
46
Your permission to use npm Open Source entitles you to do the following:
47
92
-1. You may search for, download, publish, and manage packages of
93
- computer code (_Packages_) in the Public Registry, and otherwise
94
- interact with the Public Registry, via the command-line tool
95
- published by npm at [https://www.github.com/npm/cli](https://www.github.com/npm/cli) (the _CLI_).
48
+1. You may search for, download, publish, and manage packages of computer code (_Packages_) in the Public Registry, and otherwise interact with the Public Registry, via the command-line tool published by npm at [https://www.github.com/npm/cli](https://www.github.com/npm/cli) (the _CLI_).
49
97
-2. You may search for, download, publish, and manage Packages using
98
- software other than CLI via application programming interfaces that
99
- npm publicly documents or makes available for public use (_Public
100
- APIs_).
50
+2. You may search for, download, publish, and manage Packages using software other than CLI via application programming interfaces that npm publicly documents or makes available for public use (_Public APIs_).
51
102
-3. You may search for and manage Packages in the Public Registry, and
103
- otherwise interact with the Public Registry, via the Website.
52
+3. You may search for and manage Packages in the Public Registry, and otherwise interact with the Public Registry, via the Website.
53
54
4. You may update and manage your Account via the Website.
55
107
-5. You may visit, create an account for, and participate in,
108
- discussions on npm.community.
56
+5. You may visit, create an account for, and participate in, discussions on npm.community.
57
58
## Conditions
59
112
-Your permission to use npm Open Source, as well as any permission you
113
-may have to use Paid Services, are subject to the following conditions:
60
+Your permission to use npm Open Source, as well as any permission you may have to use Paid Services, are subject to the following conditions:
61
62
1. You must be at least 13 years of age to use npm Services.
63
117
-2. You may not use npm Services after npm says you may not, such as by
118
- disabling your Account.
64
+2. You may not use npm Services after npm says you may not, such as by disabling your Account.
65
66
3. You must use npm Services only in accordance with "Acceptable Use".
67
122
-4. You may access and use data about the security of Packages, such
123
- as vulnerability reports, audit status reports, and supplementary
124
- security documentation, only for your own personal or internal
125
- business purposes. You may _not_ provide others access to, copies
126
- of, or use of npm data about the security of Packages, directly
127
- or as part of other products or services.
68
+4. You may access and use data about the security of Packages, such as vulnerability reports, audit status reports, and supplementary security documentation, only for your own personal or internal business purposes. You may _not_ provide others access to, copies of, or use of npm data about the security of Packages, directly or as part of other products or services.
69
70
## Acceptable Use
71
131
-1. You will abide by the
132
- [Code of Conduct][conduct] and the
133
- [Dispute Policy][disputes].
72
+1. You will abide by the [Code of Conduct][conduct] and the [Dispute Policy][disputes].
73
135
-2. You will not submit material to npm as a package or in any other
136
- form that violates npm's _Acceptable Content_, described below.
74
+2. You will not submit material to npm as a package or in any other form that violates npm's _Acceptable Content_, described below.
75
138
-3. You will not disclose information that you do not have the right to
139
- disclose, such as confidential information of others.
76
+3. You will not disclose information that you do not have the right to disclose, such as confidential information of others.
77
141
-4. You will not copy or share any personally identifiable information of
142
- any other person without their specific permission.
78
+4. You will not copy or share any personally identifiable information of any other person without their specific permission.
79
80
5. You will not violate any applicable law.
81
146
-6. You will not use or attempt to use another person's Account without
147
- their specific permission.
82
+6. You will not use or attempt to use another person's Account without their specific permission.
83
149
-7. You will not buy, sell, or otherwise trade in user names,
150
- organization names, names for _Packages_, or any other names
151
- reserved on _npm Services_, for money or other compensation.
84
+7. You will not buy, sell, or otherwise trade in user names, organization names, names for _Packages_, or any other names reserved on _npm Services_, for money or other compensation.
85
153
-8. You will not use _npm Services_' ability to send e-mail to send
154
- advertisements, chain letters, or other solicitations.
86
+8. You will not use _npm Services_' ability to send e-mail to send advertisements, chain letters, or other solicitations.
87
156
-9. You will not automate access to, use, or monitor the Website, such
157
- as with a web crawler, browser plug-in or add-on, or other computer
158
- program that is not a web browser. You may replicate data from the
159
- Public Registry using the Public APIs per this Agreement.
88
+9. You will not automate access to, use, or monitor the Website, such as with a web crawler, browser plug-in or add-on, or other computer program that is not a web browser. You may replicate data from the Public Registry using the Public APIs per this Agreement.
89
161
-10. You will not use npm Services to send email to distribution lists,
162
- newsgroups, or group mail aliases.
90
+10. You will not use npm Services to send email to distribution lists, newsgroups, or group mail aliases.
91
164
-11. You will not falsely imply that you are affiliated with or endorsed
165
- by npm.
92
+11. You will not falsely imply that you are affiliated with or endorsed by npm.
93
167
-12. You will not operate illegal schemes, such as pyramid schemes, via
168
- npm Services.
94
+12. You will not operate illegal schemes, such as pyramid schemes, via npm Services.
95
170
-13. You will not deep-hyperlink to images or other non-hypertext content
171
- served by npm Services.
96
+13. You will not deep-hyperlink to images or other non-hypertext content served by npm Services.
97
173
-14. You will not remove any marking indicating proprietary ownership
174
- from any material got via npm Services.
98
+14. You will not remove any marking indicating proprietary ownership from any material got via npm Services.
99
100
15. You will not display any portion of the Website via an HTML IFRAME.
101
178
-16. You will not disable, avoid, or circumvent any security or access
179
- restrictions of npm Services, or access parts of npm Services not
180
- intended for access by you.
102
+16. You will not disable, avoid, or circumvent any security or access restrictions of npm Services, or access parts of npm Services not intended for access by you.
103
182
-17. You will not strain infrastructure of npm Services with an
183
- unreasonable volume of requests, or requests designed to impose an
184
- unreasonable load on IT systems underlying npm Services. This rule
185
- is intentionally loose, to give npm the flexibility it needs to keep
186
- npm Services working for the user community as a whole. But to draw
187
- one clear line, under no circumstances are five million requests to
188
- npm Services in a single month-long period by any single individual,
189
- organization, or group of affiliated companies remotely reasonable. If
190
- you have a special need to make lots and lots of requests, [our
191
- sales team](mailto:sales@npmjs.com) can help.
104
+17. You will not strain infrastructure of npm Services with an unreasonable volume of requests, or requests designed to impose an unreasonable load on IT systems underlying npm Services. This rule is intentionally loose, to give npm the flexibility it needs to keep npm Services working for the user community as a whole. But to draw one clear line, under no circumstances are five million requests to npm Services in a single month-long period by any single individual, organization, or group of affiliated companies remotely reasonable. If you have a special need to make lots and lots of requests, [our sales team](mailto:sales@npmjs.com) can help.
105
193
-18. You will not encourage or assist any other person in violation of
194
- "Acceptable Use".
106
+18. You will not encourage or assist any other person in violation of "Acceptable Use".
107
108
## Acceptable Content
109
198
-Administrators at npm reserve the right to delete content hosted on
199
-the npm Services that they deem unacceptable. Unacceptable content
200
-can take the form of a package, a README file, a user or organization
201
-name, or any other content submitted to npm Services. A few examples
202
-of unacceptable content:
110
+Administrators at npm reserve the right to delete content hosted on the npm Services that they deem unacceptable. Unacceptable content can take the form of a package, a README file, a user or organization name, or any other content submitted to npm Services. A few examples of unacceptable content:
111
204
-1. Content that is illegal, offensive, or otherwise harmful. This includes
205
- content that is harassing, inappropriate, or abusive.
112
+1. Content that is illegal, offensive, or otherwise harmful. This includes content that is harassing, inappropriate, or abusive.
113
207
-2. Content in violation of law, infringing the intellectual property
208
- rights of others, violating the privacy or other rights of others,
209
- or in violation of any agreement with a third party. This includes
210
- code that violates a public license for others' work.
114
+2. Content in violation of law, infringing the intellectual property rights of others, violating the privacy or other rights of others, or in violation of any agreement with a third party. This includes code that violates a public license for others' work.
115
212
-3. Content containing malicious computer code, such as computer viruses,
213
- computer worms, rootkits, back doors, or spyware. This includes content
214
- submitted for research purposes. Tools designed and documented explicitly to
215
- assist in security research are acceptable, but exploits and malware that
216
- use the npm registry as a deployment or delivery vector are not.
116
+3. Content containing malicious computer code, such as computer viruses, computer worms, rootkits, back doors, or spyware. This includes content submitted for research purposes. Tools designed and documented explicitly to assist in security research are acceptable, but exploits and malware that use the npm registry as a deployment or delivery vector are not.
117
218
-4. Packages that are not functionally compatible with the npm
219
- command-line client. For example, a "package" cannot simply be
220
- a PNG or JPEG image, a movie file, or a text document uploaded
221
- directly to the registry. Using the Public Registry as a general purpose database is not allowed.
118
+4. Packages that are not functionally compatible with the npm command-line client. For example, a "package" cannot simply be a PNG or JPEG image, a movie file, or a text document uploaded directly to the registry. Using the Public Registry as a general purpose database is not allowed.
119
223
-5. Content that exists only to "reserve" a name, whether a package name,
224
- user name, or organization name. The
225
- [Dispute Policy][disputes] governs
226
- how npm handles such cases of "squatting".
120
+5. Content that exists only to "reserve" a name, whether a package name, user name, or organization name. The [Dispute Policy][disputes] governs how npm handles such cases of "squatting".
121
228
-To find out how to report violations of Acceptable Content, refer to the
229
-[Code of Conduct][conduct].
122
+To find out how to report violations of Acceptable Content, refer to the [Code of Conduct][conduct].
123
124
## Commercial Content
125
233
-The npm Public Registry is about Packages. All manner of
234
-useful Packages are welcome, from hobby projects to
235
-competitive products, enterprise infrastructure and tooling
236
-to the latest fun hack or work of software art.
126
+The npm Public Registry is about Packages. All manner of useful Packages are welcome, from hobby projects to competitive products, enterprise infrastructure and tooling to the latest fun hack or work of software art.
127
238
-At the same time, the npm Public Registry, the Website, and
239
-important conventions like `README` go beyond just code.
240
-Developers use all of those channels to communicate more
241
-broadly about code, who is developing it, why, and how.
128
+At the same time, the npm Public Registry, the Website, and important conventions like `README` go beyond just code. Developers use all of those channels to communicate more broadly about code, who is developing it, why, and how.
129
243
-That communication is important, and welcome, so long as it
244
-respects that the npm Public Registry, the website, and npm
245
-Open Source more generally remain neutral. You are free to
246
-use npm Open Source for commercial projects, to advance your
247
-career, and for other business purposes. But you may not
248
-leverage content or system conventions to make the npm
249
-Public Registry, Website, or CLI put business before code.
130
+That communication is important, and welcome, so long as it respects that the npm Public Registry, the website, and npm Open Source more generally remain neutral. You are free to use npm Open Source for commercial projects, to advance your career, and for other business purposes. But you may not leverage content or system conventions to make the npm Public Registry, Website, or CLI put business before code.
131
251
-These kinds of commercial content are generally acceptable
252
-in `README` files and other documentation:
132
+These kinds of commercial content are generally acceptable in `README` files and other documentation:
133
254
-1. Credits, acknowledgments, attributions, and other
255
- recognitions of contributions to Packages.
134
+1. Credits, acknowledgments, attributions, and other recognitions of contributions to Packages.
135
257
-2. Information on how to pay, donate to, and otherwise
258
- support Package development, Package developers, and
259
- Package steward organizations.
136
+2. Information on how to pay, donate to, and otherwise support Package development, Package developers, and Package steward organizations.
137
261
-3. Logos from, and links to, organizations developing,
262
- stewarding, or sponsoring Package development.
138
+3. Logos from, and links to, organizations developing, stewarding, or sponsoring Package development.
139
264
-4. Information on paid products and services related to
265
- Packages, such as enhanced versions, add-ons, commercial
266
- license terms, training, integration, or support.
140
+4. Information on paid products and services related to Packages, such as enhanced versions, add-ons, commercial license terms, training, integration, or support.
141
268
-These kinds of commercial content generally _aren't_
269
-acceptable:
142
+These kinds of commercial content generally _aren't_ acceptable:
143
271
-1. `README`, `package.json`, or other content displaying
272
- advertisements.
144
+1. `README`, `package.json`, or other content displaying advertisements.
145
274
-2. Packages that display ads at runtime, on installation,
275
- or at other stages of the software development
276
- lifecycle, such as via [npm
277
- scripts](https://docs.npmjs.com/misc/scripts). Packages
278
- with code that can be used to display ads are fine.
279
- Packages that themselves display ads are not.
146
+2. Packages that display ads at runtime, on installation, or at other stages of the software development lifecycle, such as via [npm scripts](https://docs.npmjs.com/misc/scripts). Packages with code that can be used to display ads are fine. Packages that themselves display ads are not.
147
281
-3. Packages that function primarily as ads, with only
282
- placeholder or negligible code, data, and other
283
- technical content.
148
+3. Packages that function primarily as ads, with only placeholder or negligible code, data, and other technical content.
149
285
-These examples are just examples. npm will continue to
286
-apply its judgment when deciding what content is acceptable.
287
-npm will continue to expect you to apply your own judgment
288
-when choosing what you share and how.
150
+These examples are just examples. npm will continue to apply its judgment when deciding what content is acceptable. npm will continue to expect you to apply your own judgment when choosing what you share and how.
151
152
## Enforcement of Acceptable Use
153
292
-npm may investigate and prosecute violations of this Agreement to the
293
-fullest legal extent. npm may notify and cooperate with law enforcement
294
-authorities in prosecuting violations of this Agreement.
154
+npm may investigate and prosecute violations of this Agreement to the fullest legal extent. npm may notify and cooperate with law enforcement authorities in prosecuting violations of this Agreement.
155
156
## Your Account
157
298
-You must create and log into an Account to access features of some npm
299
-Services, including npm Open Source.
158
+You must create and log into an Account to access features of some npm Services, including npm Open Source.
159
301
-To create an Account, you must provide certain information about
302
-yourself, as required by the account creation form on the Website or the
303
-CLI. If you create an Account, you will provide, at a minimum, a valid
304
-email address. You will keep that email address up-to-date. You will
305
-not impersonate any other individual. You may delete your Account at any
306
-time by [contacting support](https://npmjs.com/support).
160
+To create an Account, you must provide certain information about yourself, as required by the account creation form on the Website or the CLI. If you create an Account, you will provide, at a minimum, a valid email address. You will keep that email address up-to-date. You will not impersonate any other individual. You may delete your Account at any time by [contacting support](https://npmjs.com/support).
161
308
-You will be responsible for all action taken using your account, whether
309
-authorized by you or not, until you either close your account or give
310
-npm notice that the security of your Account has been compromised.
311
-You will notify npm immediately if you suspect the security of your
312
-Account has been compromised. You will select a secure password for your
313
-Account. You will keep your password secret.
162
+You will be responsible for all action taken using your account, whether authorized by you or not, until you either close your account or give npm notice that the security of your Account has been compromised. You will notify npm immediately if you suspect the security of your Account has been compromised. You will select a secure password for your Account. You will keep your password secret.
163
315
-npm may restrict, suspend, or terminate your Account according to the
316
-Copyright Policy, if npm reasonably believes that you are in breach of
317
-these Terms, or if npm reasonably believes that you have misused npm
318
-Services.
164
+npm may restrict, suspend, or terminate your Account according to the Copyright Policy, if npm reasonably believes that you are in breach of these Terms, or if npm reasonably believes that you have misused npm Services.
165
166
## Your Content
167
322
-Nothing in this Agreement gives npm any ownership rights in intellectual
323
-property that you share with npm Services, such as your Account
324
-information or any Packages you share with npm Services (_Your
325
-Content_). Nothing in this Agreement gives you any ownership rights in
326
-npm intellectual property provided via npm Services, like software,
327
-documentation, trademarks, service marks, logotypes, or other
328
-distinguishing graphics.
329
-
330
-Between you and npm, you remain solely responsible for Your Content. You
331
-will not wrongly imply that Your Content is sponsored or approved by
332
-npm. npm will not be obligated to store, maintain, or provide copies of
333
-your content, except per the Privacy Policy.
334
-
335
-npm may remove Your Content from npm Services without notice if npm
336
-suspects Your Content was submitted or used in violation of "Acceptable
337
-Use", as well as per the Copyright Policy.
338
-
339
-Your Content belongs to you. You decide whether and how to license it.
340
-But at a minimum, you license npm to provide Your Content to users
341
-of npm Services when you share Your Content. That special license
342
-allows npm to copy, publish, and analyze Your Content, and to share
343
-its analyses with others. npm may run computer code in Your Content to
344
-analyze it, but npm's special license alone does not give npm the right
345
-to run code for its functionality in npm products or services.
346
-
347
-When Your Content is removed from npm Services,
348
-whether by you or npm, npm's special license ends when the last copy
349
-disappears from npm's backups, caches, and other systems. Other
350
-licenses, such as open source licenses, may continue after Your Content
351
-is removed. Those licenses may give others, or npm itself, the right to
352
-share Your Content with npm Services again.
353
-
354
-Others who receive Your Content via npm Services may violate the terms
355
-on which you license Your Content. You agree that npm will not be liable
356
-to you for those violations or their consequences.
168
+Nothing in this Agreement gives npm any ownership rights in intellectual property that you share with npm Services, such as your Account information or any Packages you share with npm Services (_Your Content_). Nothing in this Agreement gives you any ownership rights in npm intellectual property provided via npm Services, like software, documentation, trademarks, service marks, logotypes, or other distinguishing graphics.
169
+
170
+Between you and npm, you remain solely responsible for Your Content. You will not wrongly imply that Your Content is sponsored or approved by npm. npm will not be obligated to store, maintain, or provide copies of your content, except per the Privacy Policy.
171
+
172
+npm may remove Your Content from npm Services without notice if npm suspects Your Content was submitted or used in violation of "Acceptable Use", as well as per the Copyright Policy.
173
+
174
+Your Content belongs to you. You decide whether and how to license it. But at a minimum, you license npm to provide Your Content to users of npm Services when you share Your Content. That special license allows npm to copy, publish, and analyze Your Content, and to share its analyses with others. npm may run computer code in Your Content to analyze it, but npm's special license alone does not give npm the right to run code for its functionality in npm products or services.
175
+
176
+When Your Content is removed from npm Services, whether by you or npm, npm's special license ends when the last copy disappears from npm's backups, caches, and other systems. Other licenses, such as open source licenses, may continue after Your Content is removed. Those licenses may give others, or npm itself, the right to share Your Content with npm Services again.
177
+
178
+Others who receive Your Content via npm Services may violate the terms on which you license Your Content. You agree that npm will not be liable to you for those violations or their consequences.
179
180
## Feedback
181
360
-npm welcomes your feedback and suggestions for npm Services. You agree
361
-that npm will be free to act on feedback and suggestions you provide
362
-without further notice, consent, or payment. You will not submit
363
-feedback or suggestions that you consider confidential or proprietary.
182
+npm welcomes your feedback and suggestions for npm Services. You agree that npm will be free to act on feedback and suggestions you provide without further notice, consent, or payment. You will not submit feedback or suggestions that you consider confidential or proprietary.
183
184
## Indemnity
185
367
-You will indemnify npm, its officers, directors, employees,
368
-representatives, and agents, and hold them harmless for, all liability,
369
-expenses, damages, and costs from any third-party claims, demands,
370
-lawsuits, or other proceedings alleging that Your Content, your use
371
-of npm Services, or both, violate the intellectual property right of
372
-a third party, this Agreement, or applicable law. You will not settle
373
-any such proceeding without the prior written consent of npm. npm will
374
-notify you of any such proceeding it becomes aware of.
186
+You will indemnify npm, its officers, directors, employees, representatives, and agents, and hold them harmless for, all liability, expenses, damages, and costs from any third-party claims, demands, lawsuits, or other proceedings alleging that Your Content, your use of npm Services, or both, violate the intellectual property right of a third party, this Agreement, or applicable law. You will not settle any such proceeding without the prior written consent of npm. npm will notify you of any such proceeding it becomes aware of.
187
188
## Disclaimers
189
378
-***Use of npm Services is at your sole risk. npm Services are provided
379
-on an "as is" and "as available" basis. npm expressly disclaims all
380
-warranties of any kind, whether express, implied, or statutory,
381
-including implied warranties of title, noninfringement, merchantability,
382
-and fitness for a particular purpose.***
190
+**_Use of npm Services is at your sole risk. npm Services are provided on an "as is" and "as available" basis. npm expressly disclaims all warranties of any kind, whether express, implied, or statutory, including implied warranties of title, noninfringement, merchantability, and fitness for a particular purpose._**
191
384
-***npm makes no warranty that npm Services will meet your requirements,
385
-operate in an uninterrupted, timely, secure, or error-free manner, or
386
-that errors in npm Services will be corrected.***
192
+**_npm makes no warranty that npm Services will meet your requirements, operate in an uninterrupted, timely, secure, or error-free manner, or that errors in npm Services will be corrected._**
193
388
-***You receive material via npm Services at your sole risk. You will be
389
-solely responsible for any damage to your computer system and network,
390
-as well as any data loss that may result from use of npm Services or
391
-material received via npm Services.***
194
+**_You receive material via npm Services at your sole risk. You will be solely responsible for any damage to your computer system and network, as well as any data loss that may result from use of npm Services or material received via npm Services._**
195
393
-npm Services may provide information and software that is inaccurate,
394
-incomplete, misleading, illegal, offensive, or otherwise harmful. npm
395
-may, but does not promise to, review content provided by npm Services.
196
+npm Services may provide information and software that is inaccurate, incomplete, misleading, illegal, offensive, or otherwise harmful. npm may, but does not promise to, review content provided by npm Services.
197
397
-npm Services provide information about ownership and licensing of
398
-Packages, as provided by those Packages' publishers. That information
399
-may be wrong. npm cannot and does not provide legal advice.
198
+npm Services provide information about ownership and licensing of Packages, as provided by those Packages' publishers. That information may be wrong. npm cannot and does not provide legal advice.
199
200
### Third-Party Services
201
403
-npm Services may hyperlink to and integrate with third-party
404
-applications, websites, and other services. You decide whether and how
405
-to use and interact with such services. npm does not make any warranty
406
-regarding such services or content they may provide, and will not be
407
-liable to you for any damages related to such services. Use of such
408
-third-party services may be governed by other terms and privacy notices
409
-that are not part of this Agreement and are not controlled by npm.
202
+npm Services may hyperlink to and integrate with third-party applications, websites, and other services. You decide whether and how to use and interact with such services. npm does not make any warranty regarding such services or content they may provide, and will not be liable to you for any damages related to such services. Use of such third-party services may be governed by other terms and privacy notices that are not part of this Agreement and are not controlled by npm.
203
204
## Limits on Liability
205
413
-***Neither npm nor any third-party service provider used by npm to
414
-provide npm Services will, under any circumstances, be liable to you
415
-for any indirect, incidental, consequential, special, or exemplary
416
-damages related to your use of npm Services or this Agreement, whether
417
-based on breach of contract, breach of warranty, tort (including
418
-negligence, product liability, or otherwise), or any other pecuniary
419
-loss, and whether or not npm has been advised of the possibility of such
420
-damages.***
206
+**_Neither npm nor any third-party service provider used by npm to provide npm Services will, under any circumstances, be liable to you for any indirect, incidental, consequential, special, or exemplary damages related to your use of npm Services or this Agreement, whether based on breach of contract, breach of warranty, tort (including negligence, product liability, or otherwise), or any other pecuniary loss, and whether or not npm has been advised of the possibility of such damages._**
207
422
-***To the maximum extent permitted by law, npm's liability to you for
423
-any damages related to this Agreement, for any one or more causes and
424
-regardless of the form of action, will not exceed $50.***
208
+**_To the maximum extent permitted by law, npm's liability to you for any damages related to this Agreement, for any one or more causes and regardless of the form of action, will not exceed $50._**
209
426
-Some jurisdictions do not allow exclusion of certain warranties or
427
-limits on liability for incidental or consequential damages. Some of
428
-"Disclaimers" and "Limits on Liability" may not apply to you.
210
+Some jurisdictions do not allow exclusion of certain warranties or limits on liability for incidental or consequential damages. Some of "Disclaimers" and "Limits on Liability" may not apply to you.
211
212
## Termination
213
432
-Either you or npm may terminate this Agreement at any time with notice
433
-to the other.
214
+Either you or npm may terminate this Agreement at any time with notice to the other.
215
435
-On termination of this Agreement, your permission to use npm Open
436
-Source, as well any permission you may have to access Paid Services
437
-under additional terms, also terminate.
216
+On termination of this Agreement, your permission to use npm Open Source, as well any permission you may have to access Paid Services under additional terms, also terminate.
217
439
-The following provisions survive termination of this Agreement: "Your
440
-Content", "Feedback", "Indemnity", "Disclaimers", "Limits on Liability",
441
-and "General Terms". Users of npm Services may continue to copy and
442
-share Your Content after termination of this Agreement.
218
+The following provisions survive termination of this Agreement: "Your Content", "Feedback", "Indemnity", "Disclaimers", "Limits on Liability", and "General Terms". Users of npm Services may continue to copy and share Your Content after termination of this Agreement.
219
220
## Payment Terms
221
446
-There is no charge for use of npm Open Source. If you use Paid Services
447
-from npm, our Paid Services Terms at [https://docs.npmjs.com/policies/private-terms][private-terms]
448
-apply.
222
+There is no charge for use of npm Open Source. If you use Paid Services from npm, our Paid Services Terms at [https://docs.npmjs.com/policies/private-terms][private-terms] apply.
223
224
## General Terms
225
452
-If a provision of this Agreement is unenforceable as written, but could
453
-be changed to make it enforceable, that provision should be modified to
454
-the minimum extent necessary to make it enforceable. Otherwise, that
455
-provision should be removed.
226
+If a provision of this Agreement is unenforceable as written, but could be changed to make it enforceable, that provision should be modified to the minimum extent necessary to make it enforceable. Otherwise, that provision should be removed.
227
457
-You may not assign this Agreement. npm may assign this Agreement to any
458
-affiliate of npm, any third party that obtains control of npm, or any
459
-third party that purchases assets of npm relating to npm Services. Any
460
-purported assignment of rights in breach of this provision is void.
228
+You may not assign this Agreement. npm may assign this Agreement to any affiliate of npm, any third party that obtains control of npm, or any third party that purchases assets of npm relating to npm Services. Any purported assignment of rights in breach of this provision is void.
229
462
-Neither the exercise of any right under this Agreement, nor waiver of
463
-any breach of this Agreement, waives any other breach of this Agreement.
230
+Neither the exercise of any right under this Agreement, nor waiver of any breach of this Agreement, waives any other breach of this Agreement.
231
465
-This Agreement, together with the additional terms for Paid Services
466
-and npm software that you and npm agree to, embody all the terms of
467
-agreement between you and npm about npm Services. This Agreement
468
-supersedes any other agreements about npm Services, written or not.
232
+This Agreement, together with the additional terms for Paid Services and npm software that you and npm agree to, embody all the terms of agreement between you and npm about npm Services. This Agreement supersedes any other agreements about npm Services, written or not.
233
234
## Disputes
235
472
-The law of the State of California will govern any dispute, including
473
-any legal proceedings, relating to this Agreement or your use of npm
474
-Services (a _Dispute_).
236
+The law of the State of California will govern any dispute, including any legal proceedings, relating to this Agreement or your use of npm Services (a _Dispute_).
237
476
-You and npm will seek injunctions related to this agreement only in
477
-state or federal court in San Francisco, California. Neither you nor npm
478
-will object to jurisdiction, forum, or venue in those courts.
238
+You and npm will seek injunctions related to this agreement only in state or federal court in San Francisco, California. Neither you nor npm will object to jurisdiction, forum, or venue in those courts.
239
480
-***Other than to seek an injunction, you and npm will resolve any
481
-Dispute by binding American Arbitration Association arbitration.
482
-Arbitration will follow the AAA's Commercial Arbitration Rules and
483
-Supplementary Procedures for Consumer Related Disputes. Arbitration will
484
-happen in San Francisco, California. You will settle any Dispute as an
485
-individual, and not as part of a class action or other representative
486
-proceeding, whether as the plaintiff or a class member. No arbitrator
487
-will consolidate any Dispute with any another arbitration without npm's
488
-permission.***
240
+**_Other than to seek an injunction, you and npm will resolve any Dispute by binding American Arbitration Association arbitration. Arbitration will follow the AAA's Commercial Arbitration Rules and Supplementary Procedures for Consumer Related Disputes. Arbitration will happen in San Francisco, California. You will settle any Dispute as an individual, and not as part of a class action or other representative proceeding, whether as the plaintiff or a class member. No arbitrator will consolidate any Dispute with any another arbitration without npm's permission._**
241
490
-Any arbitration award will include costs of the arbitration, reasonable
491
-attorneys' fees, and reasonable costs for witnesses. You or npm can
492
-enter arbitration awards in any court with jurisdiction.
242
+Any arbitration award will include costs of the arbitration, reasonable attorneys' fees, and reasonable costs for witnesses. You or npm can enter arbitration awards in any court with jurisdiction.
243
244
## Notices and Questions
245
496
-You may send notice to npm and questions about the terms governing npm
497
-products and services to [legal@npmjs.com](mailto:legal@npmjs.com) or
498
-by mail to:
246
+You may send notice to npm and questions about the terms governing npm products and services to [legal@npmjs.com](mailto:legal@npmjs.com) or by mail to:
247
248
GitHub, Inc
249
Attn: npm Legal Department
250
88 Colin P Kelly Jr St
251
San Francisco, CA. 94107
252
505
-npm may send you notice using the email address you provide for your
506
-Account or by posting a message to the homepage or your Account page
507
-on the Website.
253
+npm may send you notice using the email address you provide for your Account or by posting a message to the homepage or your Account page on the Website.
254
255
[private-terms]: /policies/private-terms
256
[conduct]: /policies/conduct
257
[trademark]: /policies/trademark
258
[disputes]: /policies/disputes
259
[dmca]: /policies/dmca
514
-[privacy]: /policies/privacy
\ No newline at end of file
260
+[privacy]: /policies/privacy
content/policies/orgs-plan.mdx
+5
-24
@@ -3,34 +3,15 @@ title: npm Orgs Payment Plan
3
edit_on_github: false
4
---
5
6
-This npm Orgs Payment Plan (this _Payment Plan_) supplements
7
-the terms for npm Open Source offered by npm, Inc. (_npm_) at
8
-[https://docs.npmjs.com/policies/open-source-terms][open-source-terms] (_npm Open Source
9
-Terms_), as well as the terms for npm Paid Services (_npm Paid Services_)
10
-at [https://docs.npmjs.com/policies/private-terms][private-terms] (_npm
11
-Paid Services Terms_). This Payment Plan governs payment for
12
-_Orgs_ and use of npm Paid Services by user
13
-accounts added as members of those Orgs.
6
+This npm Orgs Payment Plan (this _Payment Plan_) supplements the terms for npm Open Source offered by npm, Inc. (_npm_) at [https://docs.npmjs.com/policies/open-source-terms][open-source-terms] (_npm Open Source Terms_), as well as the terms for npm Paid Services (_npm Paid Services_) at [https://docs.npmjs.com/policies/private-terms][private-terms] (_npm Paid Services Terms_). This Payment Plan governs payment for _Orgs_ and use of npm Paid Services by user accounts added as members of those Orgs.
7
15
-This Payment Plan was last updated on
16
-August 6, 2018.
17
-You can review prior versions at
18
-[https://github.com/npm/documentation/blob/main/content/policies/orgs-plan.mdx](https://github.com/npm/documentation/blob/main/content/policies/orgs-plan.mdx).
8
+This Payment Plan was last updated on August 6, 2018. You can review prior versions at [https://github.com/npm/documentation/blob/main/content/policies/orgs-plan.mdx](https://github.com/npm/documentation/blob/main/content/policies/orgs-plan.mdx).
9
10
Under this Payment Plan, you may create one or more Orgs.
11
22
-You will pay a minimum of $7.00 via your Payment Card when you create
23
-an Org, and thereafter on the same day every month (your
24
-_Billing Day_), until you delete the Org. This minimum payment
25
-entitles you to a single member of the Org (a _New Paid Services
26
-User_). You will pay $7.00 via your Payment Card per each additional
27
-New Paid Services User that you add to an Org, counted and
28
-billed on your Billing Day.
12
+You will pay a minimum of $7.00 via your Payment Card when you create an Org, and thereafter on the same day every month (your _Billing Day_), until you delete the Org. This minimum payment entitles you to a single member of the Org (a _New Paid Services User_). You will pay $7.00 via your Payment Card per each additional New Paid Services User that you add to an Org, counted and billed on your Billing Day.
13
30
-Note that the npm Paid Services Terms require everyone using npm Paid
31
-Services to have an Account of their own, added under a Payment Plan.
32
-You must add a New Paid Services User to an Org for each
33
-person who will use npm Paid Services under this Payment Plan.
14
+Note that the npm Paid Services Terms require everyone using npm Paid Services to have an Account of their own, added under a Payment Plan. You must add a New Paid Services User to an Org for each person who will use npm Paid Services under this Payment Plan.
15
16
[open-source-terms]: /policies/open-source-terms
36
-[private-terms]: /policies/private-terms
\ No newline at end of file
17
+[private-terms]: /policies/private-terms
content/policies/privacy.mdx
+144
-404
@@ -7,587 +7,333 @@ This notice describes how [npm, Inc.](https://www.npmjs.com/about), or _npm_ for
7
8
## [What's most important?](#important)
9
10
-That depends on your personal situation, which is why you should read on
11
-and decide for yourself. But at a minimum, absolutely every npm user
12
-should understand:
10
+That depends on your personal situation, which is why you should read on and decide for yourself. But at a minimum, absolutely every npm user should understand:
11
14
-*The npm public registry is for making software available to everyone
15
-online.*
12
+_The npm public registry is for making software available to everyone online._
13
17
-But: *Software comes from people, and says something about us.*
14
+But: _Software comes from people, and says something about us._
15
19
-So: *Think carefully about what packages to publish, what data you put
20
-in those packages, and what others might do with that data.*
16
+So: _Think carefully about what packages to publish, what data you put in those packages, and what others might do with that data._
17
22
-When you create an account, certain contact information is displayed
23
-publicly in the npm platform. And when you upload a package, your name
24
-and contact information may become associated with that package.
25
-
26
-If you find yourself in a jam,
27
-[open a support ticket](https://npmjs.com/support).
18
+When you create an account, certain contact information is displayed publicly in the npm platform. And when you upload a package, your name and contact information may become associated with that package.
19
20
+If you find yourself in a jam, [open a support ticket](https://npmjs.com/support).
21
22
## [How does npm collect data about me?](#collection)
23
24
npm collects data about you:
25
34
-- when you use the [npm command](https://www.npmjs.com/package/npm),
35
- the [npx command](https://docs.npmjs.com/cli/commands/npx) or another
36
- program to access the [npm public registry](https://registry.npmjs.org/),
37
- [Enterprise registries that npm hosts](https://www.npmjs.com/enterprise),
38
- [private packages](https://www.npmjs.com/features),
39
- such as when you're publishing a software package, and APIs for
40
- functionality like account and permissions management
26
+- when you use the [npm command](https://www.npmjs.com/package/npm), the [npx command](https://docs.npmjs.com/cli/commands/npx) or another program to access the [npm public registry](https://registry.npmjs.org/), [Enterprise registries that npm hosts](https://www.npmjs.com/enterprise), [private packages](https://www.npmjs.com/features), such as when you're publishing a software package, and APIs for functionality like account and permissions management
27
42
-- when you browse the npm website, [npmjs.com](https://www.npmjs.com/)
28
+- when you browse the npm website, [npmjs.com](https://www.npmjs.com/)
29
44
-- when you use either the npm command or the website to create an npm account,
45
- update your account, and sign up for npm services
30
+- when you use either the npm command or the website to create an npm account, update your account, and sign up for npm services
31
47
-- when you send support, privacy, legal, and other requests to npm
32
+- when you send support, privacy, legal, and other requests to npm
33
49
-- when working with and researching current and potential customers
34
+- when working with and researching current and potential customers
35
51
-When researching potential customers, npm staff sometimes search the
52
-public World Wide Web or paid business databases. Otherwise, npm
53
-doesn't buy or receive data about you from data brokers or other
54
-private services.
36
+When researching potential customers, npm staff sometimes search the public World Wide Web or paid business databases. Otherwise, npm doesn't buy or receive data about you from data brokers or other private services.
37
56
-npm may inadvertently collect data about you if it is included in
57
-software packages that you or others upload.
38
+npm may inadvertently collect data about you if it is included in software packages that you or others upload.
39
40
## [What data does npm collect about me, and why?](#data)
41
42
### [npm collects data about how you use npm software and registries](#usage-data)
43
63
-When you use the `npm` command, the `npx` command, or other software to work
64
-with the npm public registry, an Enterprise registry that npm hosts, or
65
-private packages, npm logs data that might be identified to you:
44
+When you use the `npm` command, the `npx` command, or other software to work with the npm public registry, an Enterprise registry that npm hosts, or private packages, npm logs data that might be identified to you:
45
67
-- a random, unique identifier, called `npm-session`, for each time you
68
- run commands like `npm install`
46
+- a random, unique identifier, called `npm-session`, for each time you run commands like `npm install`
47
70
-- the names and versions of your project's dependencies, their
71
- dependencies, and so on, that come from the npm public registry,
72
- [but not of other dependencies, like Git
73
- dependencies](https://docs.npmjs.com/cli/audit)
48
+- the names and versions of your project's dependencies, their dependencies, and so on, that come from the npm public registry, [but not of other dependencies, like Git dependencies](https://docs.npmjs.com/cli/audit)
49
75
-- the versions of Node.js, the npm command, and the operating system
76
- you are using
50
+- the versions of Node.js, the npm command, and the operating system you are using
51
78
-- an `npm-in-ci` header, showing whether the command was run on a
79
- continuous integration server
52
+- an `npm-in-ci` header, showing whether the command was run on a continuous integration server
53
81
-- the scope of the package for which you ran `npm install`, as an
82
- `npm-scope` header
54
+- the scope of the package for which you ran `npm install`, as an `npm-scope` header
55
84
-- a `referrer` header that shows the command you ran, with any file or
85
- directory paths redacted
56
+- a `referrer` header that shows the command you ran, with any file or directory paths redacted
57
87
-- data about the software you're using to access the registry, such
88
- as the `User-Agent` string
58
+- data about the software you're using to access the registry, such as the `User-Agent` string
59
90
-- network request data, such as the date and time, your IP address,
91
- and the URL
60
+- network request data, such as the date and time, your IP address, and the URL
61
62
npm uses this data to:
63
95
-- fulfill your requests, such as by sending the packages you ask for
64
+- fulfill your requests, such as by sending the packages you ask for
65
97
-- send you alerts about security vulnerabilities that may affect the
98
- software you're building, when you run `npm install` or `npm audit`
66
+- send you alerts about security vulnerabilities that may affect the software you're building, when you run `npm install` or `npm audit`
67
100
-- keep registries working quickly and reliably
68
+- keep registries working quickly and reliably
69
102
-- debug and develop the `npm` command and other software
70
+- debug and develop the `npm` command and other software
71
104
-- defend registries from abuse and technical attacks
72
+- defend registries from abuse and technical attacks
73
106
-- compile statistics on package usage and popularity
74
+- compile statistics on package usage and popularity
75
108
-- prepare reports on trends in the developer community
76
+- prepare reports on trends in the developer community
77
110
-- improve search results on the website
78
+- improve search results on the website
79
112
-- recommend packages that may be relevant to your work
80
+- recommend packages that may be relevant to your work
81
82
### [npm collects data about how you use the website.](#website-data)
83
116
-When you visit [www.npmjs.com](https://www.npmjs.com/),
117
-[docs.npmjs.com](https://docs.npmjs.com/), and other npm
118
-websites, npm uses cookies, server logs, and other methods to collect
119
-data about what pages you visit, and when. npm also collects technical
120
-information about the software and computer you use, such as:
84
+When you visit [www.npmjs.com](https://www.npmjs.com/), [docs.npmjs.com](https://docs.npmjs.com/), and other npm websites, npm uses cookies, server logs, and other methods to collect data about what pages you visit, and when. npm also collects technical information about the software and computer you use, such as:
85
122
-- your IP address
86
+- your IP address
87
124
-- your preferred language
88
+- your preferred language
89
126
-- the web browser software you use
90
+- the web browser software you use
91
128
-- the kind of computer you use
92
+- the kind of computer you use
93
130
-- the website that referred you
94
+- the website that referred you
95
96
npm uses data about how you use the website to:
97
134
-- optimize the website, so that it's quick and easy to use
98
+- optimize the website, so that it's quick and easy to use
99
136
-- diagnose and debug technical errors
100
+- diagnose and debug technical errors
101
138
-- defend the website from abuse and technical attacks
102
+- defend the website from abuse and technical attacks
103
140
-- compile statistics on package popularity
104
+- compile statistics on package popularity
105
142
-- compile statistics on the kinds of software and computers visitors
143
- use
106
+- compile statistics on the kinds of software and computers visitors use
107
145
-- compile statistics on visitor searches and needs, to guide
146
- development of new website pages and functionality
108
+- compile statistics on visitor searches and needs, to guide development of new website pages and functionality
109
148
-- decide who to contact about about product announcements, service
149
- changes, and new features
110
+- decide who to contact about about product announcements, service changes, and new features
111
112
### [npm collects account data](#account-data)
113
153
-Many features of npm services require an npm account. For example, you
154
-must have an npm account to publish packages to the npm public registry.
114
+Many features of npm services require an npm account. For example, you must have an npm account to publish packages to the npm public registry.
115
156
-To create an npm account, npm requires a working email address and an
157
-available user name. npm uses this data to provide you access to
158
-features and identify you across npm services, publicly and within npm.
116
+To create an npm account, npm requires a working email address and an available user name. npm uses this data to provide you access to features and identify you across npm services, publicly and within npm.
117
160
-You do not have to give your personal or legal name to create an npm
161
-account. You can use a pseudonym instead. You can also open more than
162
-one account.
118
+You do not have to give your personal or legal name to create an npm account. You can use a pseudonym instead. You can also open more than one account.
119
164
-If you sign up for an account, then npm will publish account data for
165
-the whole world to see on user pages [like this one](https://www.npmjs.com/~kemitchell).
166
-npm also publishes account data through the npm public registry,
167
-which is available for everyone to see, and Enterprise registries that npm hosts for others to
168
-find with commands like npm owner ls tap.
120
+If you sign up for an account, then npm will publish account data for the whole world to see on user pages [like this one](https://www.npmjs.com/~kemitchell). npm also publishes account data through the npm public registry, which is available for everyone to see, and Enterprise registries that npm hosts for others to find with commands like npm owner ls tap.
121
170
-If you give npm a personal name or names on social media like
171
-[GitHub](https://github.com/) and
172
-[Twitter](https://twitter.com/) through the website, like
173
-when you include this on your profile or user page, npm publishes that
174
-data along with the email address and user name for the account. You
175
-don't have to give npm a personal name or any social media names, and
176
-you can remove this data at any time by updating your user page.
122
+If you give npm a personal name or names on social media like [GitHub](https://github.com/) and [Twitter](https://twitter.com/) through the website, like when you include this on your profile or user page, npm publishes that data along with the email address and user name for the account. You don't have to give npm a personal name or any social media names, and you can remove this data at any time by updating your user page.
123
124
npm uses your email to:
125
180
-- notify you about packages published using your account
126
+- notify you about packages published using your account
127
182
-- reset your password and help keep your account secure
128
+- reset your password and help keep your account secure
129
184
-- add metadata to packages that you publish
130
+- add metadata to packages that you publish
131
186
-- contact you in special circumstances related to your account or packages
132
+- contact you in special circumstances related to your account or packages
133
188
-- contact you about support requests
134
+- contact you about support requests
135
190
-- contact you about legal requests, like DMCA takedown requests and privacy complaints
136
+- contact you about legal requests, like DMCA takedown requests and privacy complaints
137
192
-- announce new npm product offerings, service changes, and features
138
+- announce new npm product offerings, service changes, and features
139
194
-- send you tips about how to better use free and paid services
140
+- send you tips about how to better use free and paid services
141
196
-- send you messages about paid services you might want
142
+- send you messages about paid services you might want
143
144
### [npm collects package data](#package-data)
145
200
-When you use npm publish or other software to publish packages to the
201
-npm public registry, an Enterprise registry that npm hosts, or as a
202
-private package, npm collects the contents of the package, plus
203
-[metadata](https://en.wikipedia.org/wiki/Metadata),
204
-including your account data. Other npm users may also publish packages
205
-that include data about you, such as the fact that you contributed code
206
-to a package.
146
+When you use npm publish or other software to publish packages to the npm public registry, an Enterprise registry that npm hosts, or as a private package, npm collects the contents of the package, plus [metadata](https://en.wikipedia.org/wiki/Metadata), including your account data. Other npm users may also publish packages that include data about you, such as the fact that you contributed code to a package.
147
208
-npm uses data in packages to provide those packages to you and others
209
-who request them:
148
+npm uses data in packages to provide those packages to you and others who request them:
149
211
-- When you publish a package to the npm public registry, or change a
212
- package from private to public, npm makes the package and metadata
213
- available to everyone, online.
150
+- When you publish a package to the npm public registry, or change a package from private to public, npm makes the package and metadata available to everyone, online.
151
215
-- When you publish a package to an Enterprise registry that npm hosts,
216
- or as a private package, npm makes all of that data available to
217
- other users according to how the registry or the private packages
218
- account is configured. You may be able to configure who can access
219
- the package, or that may be up to others, such as the
220
- administrator of your company's Enterprise registry.
152
+- When you publish a package to an Enterprise registry that npm hosts, or as a private package, npm makes all of that data available to other users according to how the registry or the private packages account is configured. You may be able to configure who can access the package, or that may be up to others, such as the administrator of your company's Enterprise registry.
153
222
-Making package data available to others allows them to download, build
223
-on, and depend on your work.
154
+Making package data available to others allows them to download, build on, and depend on your work.
155
156
### [npm collects payment card data](#payment-data)
157
227
-To sign up for paid services, npm requires your payment card data. npm
228
-itself does not collect or store enough information to charge your card
229
-itself. Rather, [Stripe](https://stripe.com/) collects
230
-that data on npm's behalf, and gives npm security tokens that allow npm
231
-to create charges and subscriptions.
158
+To sign up for paid services, npm requires your payment card data. npm itself does not collect or store enough information to charge your card itself. Rather, [Stripe](https://stripe.com/) collects that data on npm's behalf, and gives npm security tokens that allow npm to create charges and subscriptions.
159
160
npm uses your payment card data only to charge for npm services.
161
235
-npm instructs [Stripe](https://stripe.com/) to store your
236
-payment card data only as long as you use paid npm services.
237
-
162
+npm instructs [Stripe](https://stripe.com/) to store your payment card data only as long as you use paid npm services.
163
164
### [npm collects data about correspondence](#contact-data)
165
241
-npm collects data about you when you send npm support requests, legal
242
-complaints, privacy inquiries, and business inquiries. Those data
243
-usually include your name and email address, and may include your
244
-company or other affiliation.
166
+npm collects data about you when you send npm support requests, legal complaints, privacy inquiries, and business inquiries. Those data usually include your name and email address, and may include your company or other affiliation.
167
168
npm uses contact data to:
169
248
-- respond to you
170
+- respond to you
171
250
-- compile aggregate statistics about correspondence
172
+- compile aggregate statistics about correspondence
173
252
-- train support staff and other npm personnel
174
+- train support staff and other npm personnel
175
254
-- review the performance of npm personnel who respond
176
+- review the performance of npm personnel who respond
177
256
-- defend npm from legal claims
178
+- defend npm from legal claims
179
180
### [npm collects data about use of npm.community](#forum-data)
181
260
-npm collects data about visits, user accounts, and forum data on
261
-[npm.community](https://npm.community/), the discussion
262
-forum for users of npm products and services. npm uses data from
263
-npm.community to collaborate with the development community, and to
264
-inform development decisions about the command-line interface and other
265
-software.
182
+npm collects data about visits, user accounts, and forum data on [npm.community](https://npm.community/), the discussion forum for users of npm products and services. npm uses data from npm.community to collaborate with the development community, and to inform development decisions about the command-line interface and other software.
183
184
## [Does npm share data about me with others?](#sharing)
185
269
-npm shares account data with others as [mentioned in the section about
270
-account data](#account-data).
186
+npm shares account data with others as [mentioned in the section about account data](#account-data).
187
272
-npm shares package data with others as [mentioned in the section about
273
-package data](privacy#package-data).
188
+npm shares package data with others as [mentioned in the section about package data](privacy#package-data).
189
190
npm publishes posts and other content you submit to [npm.community](https://npm.community/).
191
277
-npm does not sell information about you to others. However, npm uses
278
-services provided by other companies to provide npm services. The types
279
-of service providers that npm uses include:
192
+npm does not sell information about you to others. However, npm uses services provided by other companies to provide npm services. The types of service providers that npm uses include:
193
281
-- Companies that enable us to offer features on our website, such as to display your avatar
194
+- Companies that enable us to offer features on our website, such as to display your avatar
195
283
-- Companies that facilitate the efficient distribution of content
196
+- Companies that facilitate the efficient distribution of content
197
285
-- Cloud computing platforms and services that host our discussion forums
198
+- Cloud computing platforms and services that host our discussion forums
199
287
-- Services that assist with the detection of spam, scams, abuse
288
- others, or other violations of our [terms of service][privacy]
200
+- Services that assist with the detection of spam, scams, abuse others, or other violations of our [terms of service][privacy]
201
290
-- Payment processors
202
+- Payment processors
203
292
-- Platforms to help us receive, manage, and respond to support requests
204
+- Platforms to help us receive, manage, and respond to support requests
205
294
-- Platforms for internal communication
206
+- Platforms for internal communication
207
208
### [npm uses cookies](#cookies)
209
298
-npm's website only uses cookies strictly necessary to provide, optimize
299
-and secure the website. For example, we use them to keep you logged in,
300
-remember your preferences, authenticate your device for security
301
-purposes, analyze your use of the service, compile statistical reports,
302
-and provide information for future development of npm. The website uses
303
-internal cookies for analytics purposes, not any third-party analytics
304
-or service providers.
210
+npm's website only uses cookies strictly necessary to provide, optimize and secure the website. For example, we use them to keep you logged in, remember your preferences, authenticate your device for security purposes, analyze your use of the service, compile statistical reports, and provide information for future development of npm. The website uses internal cookies for analytics purposes, not any third-party analytics or service providers.
211
306
-By using the website, you agree that we can place these types of
307
-cookies on your computer or device. If you disable your browser or
308
-device’s ability to accept these cookies, you will not be able to log
309
-in or use the website.
212
+By using the website, you agree that we can place these types of cookies on your computer or device. If you disable your browser or device’s ability to accept these cookies, you will not be able to log in or use the website.
213
214
## [How can I make choices about data collection?](#choice)
215
313
-You choose what data the npm publish command includes in package data.
314
-You can use an [.npmignore](https://docs.npmjs.com/files/package.json#files)
315
-file in your package to keep specific files out of the package. You can
316
-also use a [files list in package.json
317
-files](https://docs.npmjs.com/files/package.json#files) to
318
-instruct npm to include only specific files that you name, in addition
319
-to standard files like `README` files, `LICENSE` files, and package.json.
320
-
321
-To double check the data that you will share in a package that you plan
322
-to publish, run the `npm publish --dry-run` command. If you are running
323
-an older version of the npm command, run the npm pack command to create a
324
-[tarball](https://en.wikipedia.org/wiki/Tar_(computing)),
325
-then check its contents, such as with `tar tvzf $tarball`.
326
-
327
-To publish a package to the npm public registry, npm's terms of service
328
-require you to [license npm to share it][your-content].
329
-If a package is made public, it is available for everyone online to see.
330
-However, your [choice of public license for your package](https://docs.npmjs.com/files/package.json#license)
331
-may affect what others can do with data about you in your package.
216
+You choose what data the npm publish command includes in package data. You can use an [.npmignore](https://docs.npmjs.com/files/package.json#files) file in your package to keep specific files out of the package. You can also use a [files list in package.json files](https://docs.npmjs.com/files/package.json#files) to instruct npm to include only specific files that you name, in addition to standard files like `README` files, `LICENSE` files, and package.json.
217
+
218
+To double check the data that you will share in a package that you plan to publish, run the `npm publish --dry-run` command. If you are running an older version of the npm command, run the npm pack command to create a [tarball](<https://en.wikipedia.org/wiki/Tar_(computing)>), then check its contents, such as with `tar tvzf $tarball`.
219
+
220
+To publish a package to the npm public registry, npm's terms of service require you to [license npm to share it][your-content]. If a package is made public, it is available for everyone online to see. However, your [choice of public license for your package](https://docs.npmjs.com/files/package.json#license) may affect what others can do with data about you in your package.
221
222
npm does not respond to the [Do Not Track HTTP header](https://en.wikipedia.org/wiki/Do_Not_Track).
223
224
## [Where does npm keep data about me?](#locality)
225
337
-npm stores account data, data about website use, data about registry
338
-use, and private packages on servers in the United States of America.
339
-metadata about those packages worldwide, via content delivery
340
-networks.
226
+npm stores account data, data about website use, data about registry use, and private packages on servers in the United States of America. metadata about those packages worldwide, via content delivery networks.
227
342
-npm stores package data published to Enterprise registries that npm
343
-hosts, plus metadata about them, in cloud computing zones of customers' choosing.
228
+npm stores package data published to Enterprise registries that npm hosts, plus metadata about them, in cloud computing zones of customers' choosing.
229
345
-By using the npm platform, you consent to the collection and storage of
346
-your data as outlined in this section.
230
+By using the npm platform, you consent to the collection and storage of your data as outlined in this section.
231
232
## [How does npm handle data under the EU General Data Protection Regulation?](#gdpr)
233
234
+npm respects privacy rights under [Regulation (EU) 2016/679](http://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:OJ.L_.2016.119.01.0001.01.ENG), the European Union's General Data Protection Regulation (GDPR). npm processes "Personal Data" on the following legal bases: (1) with your consent; (2) as necessary to perform our agreement to provide our services; and (3) as necessary for our legitimate interests in providing our services where those interests do not override your fundamental rights and freedom related to data privacy. Information we collect may be transferred to, and stored and processed in, the United States or any other country in which we or our affiliates or subcontractors maintain facilities, as described above.
235
+
236
+If you reside in the EEA, Switzerland, or United Kingdom, you are entitled to certain rights, like the right to:
237
+
238
+- complain about our data collection or processing actions with the supervisor authority concerned. You can find a list of data protection authorities [here](http://ec.europa.eu/justice/data-protection/bodies/authorities/index_en.htm).
239
+
240
+- access to information held about you.
241
+
242
+- ask us to correct or amend inaccurate or incomplete information we have about you.
243
+
244
+- ask us to erase data that under certain circumstances, like (1) when it is no longer necessary for the purpose for which it was collected, (2) you withdraw consent and no other legal basis for processing exists, or (3) you believe your fundamental rights to data privacy and protection outweigh our legitimate interest in continuing the processing.
245
351
-npm respects privacy rights under [Regulation (EU) 2016/679](http://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:OJ.L_.2016.119.01.0001.01.ENG),
352
-the European Union's General Data Protection Regulation (GDPR). npm
353
-processes "Personal Data" on the following legal bases: (1) with your
354
-consent; (2) as necessary to perform our agreement to provide our
355
-services; and (3) as necessary for our legitimate interests in providing
356
-our services where those interests do not override your fundamental
357
-rights and freedom related to data privacy. Information we collect may
358
-be transferred to, and stored and processed in, the United States or any
359
-other country in which we or our affiliates or subcontractors maintain
360
-facilities, as described above.
361
-
362
-If you reside in the EEA, Switzerland, or United Kingdom, you are
363
-entitled to certain rights, like the right to:
364
-
365
-- complain about our data collection or processing actions with the
366
- supervisor authority concerned. You can find a list of data
367
- protection authorities [here](http://ec.europa.eu/justice/data-protection/bodies/authorities/index_en.htm).
368
-
369
-- access to information held about you.
370
-
371
-- ask us to correct or amend inaccurate or incomplete information we have about you.
372
-
373
-- ask us to erase data that under certain circumstances, like (1) when
374
- it is no longer necessary for the purpose for which it was
375
- collected, (2) you withdraw consent and no other legal basis for
376
- processing exists, or (3) you believe your fundamental rights to
377
- data privacy and protection outweigh our legitimate interest in
378
- continuing the processing.
379
-
380
-- request that we restrict our processing if we are processing your
381
- data based on legitimate interests or the performance of a task in
382
- the public interest as an exercise of official authority
383
- (including profiling); using your data for direct marketing
384
- (including profiling); or processing your data for purposes of
385
- scientific or historical research and statistics.
386
-
387
-When you exercise your rights, npm may need to verify your identity and
388
-provide us with information before we access records containing your
389
-information. If you want to exercise your rights, please contact npm by
390
-[opening a support ticket](https://npmjs.com/support). We
391
-may have a reason under the law why we do not have to comply with your
392
-request or may comply with it in a more limited way than you
393
-anticipated. If we do, we will explain that to you in our response.
246
+- request that we restrict our processing if we are processing your data based on legitimate interests or the performance of a task in the public interest as an exercise of official authority (including profiling); using your data for direct marketing (including profiling); or processing your data for purposes of scientific or historical research and statistics.
247
+
248
+When you exercise your rights, npm may need to verify your identity and provide us with information before we access records containing your information. If you want to exercise your rights, please contact npm by [opening a support ticket](https://npmjs.com/support). We may have a reason under the law why we do not have to comply with your request or may comply with it in a more limited way than you anticipated. If we do, we will explain that to you in our response.
249
250
## [How does npm handle data under the California Consumer Privacy Act?](#ccpa)
251
397
-npm respects the rights of California residents under the [California
398
-Consumer Privacy Act](https://www.oag.ca.gov/privacy/ccpa)
399
-(CCPA). Where we collect information that is subject to the
400
-CCPA, that information we collect and your rights are described below.
252
+npm respects the rights of California residents under the [California Consumer Privacy Act](https://www.oag.ca.gov/privacy/ccpa) (CCPA). Where we collect information that is subject to the CCPA, that information we collect and your rights are described below.
253
254
Categories of personal information we collect:
255
404
-- _Personal Identifiers_:
256
+- _Personal Identifiers_:
257
406
- - Name and email address when you create an account. You will also
407
- be asked to create a username and we will assign one or more
408
- unique identifiers to your profile. We use this information to
409
- provide our services, respond to your requests, and send
410
- information to you.
258
+ - Name and email address when you create an account. You will also be asked to create a username and we will assign one or more unique identifiers to your profile. We use this information to provide our services, respond to your requests, and send information to you.
259
412
- - We also collect your social media handle and basic account
413
- information if you provide it to us or interact with our
414
- services, such as our help desk, through social media.
260
+ - We also collect your social media handle and basic account information if you provide it to us or interact with our services, such as our help desk, through social media.
261
416
- - We collect your payment information through our service
417
- provider, Stripe, as described above.
262
+ - We collect your payment information through our service provider, Stripe, as described above.
263
419
-- _Internet or Other Electronic Network Activity Information_: device
420
- identifiers such as IP address and user agent; the assigned unique
421
- IDs in cookies (as described below); information about how you
422
- arrived at and navigated through our Services.
264
+- _Internet or Other Electronic Network Activity Information_: device identifiers such as IP address and user agent; the assigned unique IDs in cookies (as described below); information about how you arrived at and navigated through our Services.
265
424
-- _Geolocation Data:_ We do not collect your specific longitude and
425
- latitude. However, we do collect imprecise location (e.g., your IP address).
266
+- _Geolocation Data:_ We do not collect your specific longitude and latitude. However, we do collect imprecise location (e.g., your IP address).
267
427
-- _Professional or employment-related information:_ If you apply for
428
- employment with us, information about your employment history.
268
+- _Professional or employment-related information:_ If you apply for employment with us, information about your employment history.
269
430
-- _Education information:_ If you apply for employment with us,
431
- information about your educational history.
270
+- _Education information:_ If you apply for employment with us, information about your educational history.
271
433
-We may collect any other information about you contained in software
434
-packages uploaded to our site, as described above under the "npm
435
-collects package data" section. We also collect the contents of your
436
-communications with us, e.g., when you submit a question to us through
437
-a web form or comments to us on social media.
272
+We may collect any other information about you contained in software packages uploaded to our site, as described above under the "npm collects package data" section. We also collect the contents of your communications with us, e.g., when you submit a question to us through a web form or comments to us on social media.
273
439
-We may disclose any of the categories of personal information listed
440
-above and use them for the above-listed purposes or for other business
441
-or operational purposes compatible with the context in which the
442
-personal information was collected. Our disclosures of personal
443
-information include disclosures to our "service providers," which are
444
-companies that we engage for business purposes to conduct activities
445
-on our behalf. The categories of service providers with whom we share
446
-information and the services they provide are described below.
274
+We may disclose any of the categories of personal information listed above and use them for the above-listed purposes or for other business or operational purposes compatible with the context in which the personal information was collected. Our disclosures of personal information include disclosures to our "service providers," which are companies that we engage for business purposes to conduct activities on our behalf. The categories of service providers with whom we share information and the services they provide are described below.
275
276
Rights under CCPA:
277
450
-- _Access/Right to Know_: You have the right to request access to
451
- personal information we collected about you and information
452
- regarding the source of that personal information, the purposes
453
- for which we collect it, and the third parties and service
454
- providers with whom we share it.
278
+- _Access/Right to Know_: You have the right to request access to personal information we collected about you and information regarding the source of that personal information, the purposes for which we collect it, and the third parties and service providers with whom we share it.
279
456
-- _Deletion_: You have the right to request that we erase data we have
457
- collected from you. Please note that we may have a reason to deny
458
- your deletion request or delete data in a more limited way than
459
- you anticipated, e.g., because of a legal obligation to retain it.
280
+- _Deletion_: You have the right to request that we erase data we have collected from you. Please note that we may have a reason to deny your deletion request or delete data in a more limited way than you anticipated, e.g., because of a legal obligation to retain it.
281
461
-To exercise your rights above, you can
462
-[open a support ticket](https://npmjs.com/support). When we
463
-process your request, we must verify your identity by asking you to
464
-(1) provide personal identifiers that we can match against information
465
-we may have collected from you previously; and (2) confirm your
466
-request using the email stated in the request.
282
+To exercise your rights above, you can [open a support ticket](https://npmjs.com/support). When we process your request, we must verify your identity by asking you to (1) provide personal identifiers that we can match against information we may have collected from you previously; and (2) confirm your request using the email stated in the request.
283
284
Opt-out of sale:
285
470
-California residents have the right to request that we stop "selling"
471
-their personal information. A "sale" of personal information is
472
-defined broadly: "selling, renting, releasing, disclosing,
473
-disseminating, making available, transferring, or otherwise
474
-communicating orally, in writing, or by electronic or other means, a
475
-consumer's personal information by the business to another business or
476
-a third party for monetary or other valuable consideration." We do not
477
-sell your information as defined by the CCPA.
478
-
479
-Please note that your right to opt out does not apply to our sharing
480
-of personal information with service providers, who are parties we
481
-engage to perform a function on our behalf and are contractually
482
-obligated to use the Personal Information only for that function.
286
+California residents have the right to request that we stop "selling" their personal information. A "sale" of personal information is defined broadly: "selling, renting, releasing, disclosing, disseminating, making available, transferring, or otherwise communicating orally, in writing, or by electronic or other means, a consumer's personal information by the business to another business or a third party for monetary or other valuable consideration." We do not sell your information as defined by the CCPA.
287
484
-We may also disclose information to other entities who are not listed
485
-here when required by law or to protect our Company or other persons,
486
-as described in our Privacy Policy.
288
+Please note that your right to opt out does not apply to our sharing of personal information with service providers, who are parties we engage to perform a function on our behalf and are contractually obligated to use the Personal Information only for that function.
289
290
+We may also disclose information to other entities who are not listed here when required by law or to protect our Company or other persons, as described in our Privacy Policy.
291
292
## [How can I see what data is publicly available about me?](#access)
293
491
-You can access your account data at any time by visiting your account
492
-page on [www.npmjs.com](https://www.npmjs.com/). Your
493
-account page also lists all the packages published under your account or
494
-other accounts.
294
+You can access your account data at any time by visiting your account page on [www.npmjs.com](https://www.npmjs.com/). Your account page also lists all the packages published under your account or other accounts.
295
496
-You can access package data by downloading the packages, as long as
497
-they're public or you have permission to access them.
296
+You can access package data by downloading the packages, as long as they're public or you have permission to access them.
297
499
-You can see metadata about packages by running npm info $package, or by
500
-accessing the appropriate [registry's
501
-API](https://github.com/npm/registry/tree/master/docs).
502
-Registry APIs provide metadata in standard [JSON](https://www.json.org/)
503
-format, and packages as
504
-[tarballs](https://en.wikipedia.org/wiki/Tar_(computing)).
298
+You can see metadata about packages by running npm info $package, or by accessing the appropriate [registry's API](https://github.com/npm/registry/tree/master/docs). Registry APIs provide metadata in standard [JSON](https://www.json.org/) format, and packages as [tarballs](<https://en.wikipedia.org/wiki/Tar_(computing)>).
299
300
## [How can I change data about me?](#change)
301
508
-You can change your personal account data and payment card data at any
509
-time by visiting your account settings page on
510
-[www.npmjs.com](https://www.npmjs.com/). You can change
511
-account and payment data for Enterprise by [contacting support](https://npmjs.com/support).
512
-
513
-You can close your npm account at any time by e-mailing
514
-[contacting support](https://npmjs.com/support). Closing
515
-your account removes the profile from the public registry but does not
516
-automatically erase packages published under your account. We may retain
517
-some data about you internally even where you close your account.
518
-
519
-npm's [unpublish policy][unpublish]
520
-determines when you can erase packages from the npm public registry. The
521
-unpublish policy strikes a difficult balance between the purpose of
522
-publishing and hosting packages, others' reliance on what has been made
523
-public, and individual rights and freedoms.
524
-
525
-If another user improperly publishes personal data about you, in a
526
-package or otherwise,
527
-[open a support ticket](https://npmjs.com/support).
528
-
529
-Please note that while [npm publishes notices about published data
530
-that's been erased](#erasure-notice),
531
-npm can't make everyone who has downloaded published package data or
532
-account data erase that data on your behalf. Choosing a public
533
-license, such as an open source software license,
534
-may encourage and allow storage, distribution, and use of package data
535
-indefinitely. Nearly all popular open source software licenses actually
536
-require preserving personal data that attributes the software to you,
537
-such as copyright notices, as a condition of permission for the
538
-software.
302
+You can change your personal account data and payment card data at any time by visiting your account settings page on [www.npmjs.com](https://www.npmjs.com/). You can change account and payment data for Enterprise by [contacting support](https://npmjs.com/support).
303
304
+You can close your npm account at any time by e-mailing [contacting support](https://npmjs.com/support). Closing your account removes the profile from the public registry but does not automatically erase packages published under your account. We may retain some data about you internally even where you close your account.
305
541
-## [What is npm's policy on unpublishing packages?](#forgotten)
306
+npm's [unpublish policy][unpublish] determines when you can erase packages from the npm public registry. The unpublish policy strikes a difficult balance between the purpose of publishing and hosting packages, others' reliance on what has been made public, and individual rights and freedoms.
307
+
308
+If another user improperly publishes personal data about you, in a package or otherwise, [open a support ticket](https://npmjs.com/support).
309
543
-Please see [our policy on "unpublishing" packages][unpublish] or
544
-[our terms of service][open-source-terms] for more
545
-information on erasing packages].
310
+Please note that while [npm publishes notices about published data that's been erased](#erasure-notice), npm can't make everyone who has downloaded published package data or account data erase that data on your behalf. Choosing a public license, such as an open source software license, may encourage and allow storage, distribution, and use of package data indefinitely. Nearly all popular open source software licenses actually require preserving personal data that attributes the software to you, such as copyright notices, as a condition of permission for the software.
311
547
-If you accidentally publish a package that threatens your privacy, or
548
-discover someone else has published a package that does,
549
-[open a support ticket](https://npmjs.com/support).
550
-npm can and will take down packages in specific, exceptional situations
551
-to protect you, especially if others violate your privacy. Using npm to
552
-violate others' privacy is against our [terms of service][open-source-terms].
312
+## [What is npm's policy on unpublishing packages?](#forgotten)
313
314
+Please see [our policy on "unpublishing" packages][unpublish] or [our terms of service][open-source-terms] for more information on erasing packages].
315
555
-## [How does npm notify others about published data that's erased?](#erasure-notice)
316
+If you accidentally publish a package that threatens your privacy, or discover someone else has published a package that does, [open a support ticket](https://npmjs.com/support). npm can and will take down packages in specific, exceptional situations to protect you, especially if others violate your privacy. Using npm to violate others' privacy is against our [terms of service][open-source-terms].
317
557
-npm takes a few steps to notify others who may be copying data from the
558
-npm public registry that published data has been erased:
318
+## [How does npm notify others about published data that's erased?](#erasure-notice)
319
560
-- npm publishes new placeholder versions of some erased packages, with
561
- `README` files that mention the package has been erased, and why.
320
+npm takes a few steps to notify others who may be copying data from the npm public registry that published data has been erased:
321
563
-- npm's [registry APIs](https://github.com/npm/registry/tree/master/docs),
564
- special software services that others use to copy data from the
565
- npm public registry, send update messages about packages that have
566
- been erased.
322
+- npm publishes new placeholder versions of some erased packages, with `README` files that mention the package has been erased, and why.
323
324
+- npm's [registry APIs](https://github.com/npm/registry/tree/master/docs), special software services that others use to copy data from the npm public registry, send update messages about packages that have been erased.
325
326
## [What happens if npm merges with or is bought by another company?](#merge)
327
571
-We may transfer to another entity or its affiliates or service providers
572
-some or all information about you in connection with, or during
573
-negotiations of, any merger, acquisition, sale of assets or any line of
574
-business, change in ownership control, or financing transaction. We
575
-cannot promise that an acquiring party or the merged entity will have
576
-the same privacy practices or treat your information the same as
577
-described in this Policy.
578
-
328
+We may transfer to another entity or its affiliates or service providers some or all information about you in connection with, or during negotiations of, any merger, acquisition, sale of assets or any line of business, change in ownership control, or financing transaction. We cannot promise that an acquiring party or the merged entity will have the same privacy practices or treat your information the same as described in this Policy.
329
330
## [What are npm's information practices regarding information belonging to children?](#children)
331
582
-npm's site and services are intended for users age sixteen and older.
583
-npm does not knowingly collect information from children. If we discover
584
-that we have inadvertently collected information from anyone younger
585
-than the age of 16, we will delete that information.
332
+npm's site and services are intended for users age sixteen and older. npm does not knowingly collect information from children. If we discover that we have inadvertently collected information from anyone younger than the age of 16, we will delete that information.
333
334
## [Who can I contact about npm and my privacy?](#contact)
335
589
-Please [open a support ticket](https://npmjs.com/support). You may also
590
-contact our Data Protection Officer directly.
336
+Please [open a support ticket](https://npmjs.com/support). You may also contact our Data Protection Officer directly.
337
338
Our United States HQ:
339
@@ -608,15 +354,9 @@ The Netherlands
354
355
This version of npm's privacy questions and answers took effect June 3, 2020.
356
611
-npm will announce the next version on the [npm blog](https://blog.npmjs.org/).
612
-In the meantime, npm may update [its contact information](#contact)
613
-by updating the page at
614
-[https://docs.npmjs.com/privacy][privacy],
615
-without an announcement. npm may change how it announces changes in
616
-future privacy versions.
357
+npm will announce the next version on the [npm blog](https://blog.npmjs.org/). In the meantime, npm may update [its contact information](#contact) by updating the page at [https://docs.npmjs.com/privacy][privacy], without an announcement. npm may change how it announces changes in future privacy versions.
358
618
-You can review the history of changes in [the Git repository for npm's
619
-public policies](https://github.com/npm/documentation/blob/main/content/policies/privacy.mdx).
359
+You can review the history of changes in [the Git repository for npm's public policies](https://github.com/npm/documentation/blob/main/content/policies/privacy.mdx).
360
361
[terms]: /policies/terms
362
[privacy]: /policies/privacy
content/policies/private-terms.mdx
+16
-62
@@ -3,82 +3,36 @@ title: npm Paid Services Terms
3
edit_on_github: false
4
---
5
6
-These npm Paid Services Terms of Use (these _npm Paid Services Terms_)
7
-supplement the terms for npm Open Source offered by npm, Inc.
8
-(_npm_) at [https://docs.npmjs.com/policies/open-source-terms](https://docs.npmjs.com/policies/open-source-terms) (_npm Open
9
-Source Terms_). They govern access to and use of _npm Paid Services_,
10
-including but not limited to the products known as _npm Solo_ and
11
-_npm Orgs_, the private package storage, delivery,
12
-organization management, and access control features of
13
-[https://www.npmjs.com](https://www.npmjs.com) (the _Website_) and the npm public registry
14
-at [https://registry.npmjs.org](https://registry.npmjs.org) (the _Public Registry_). These are
15
-collectively called the _Paid Services_.
16
-
17
-These npm Paid Services Terms were last updated on
18
-March 10, 2022.
19
-You can review prior versions at
20
-[https://github.com/npm/documentation/blob/main/content/policies/private-terms.mdx](https://github.com/npm/documentation/blob/main/content/policies/private-terms.mdx).
21
-
22
-You may only access or use npm Paid Services by agreeing to the npm
23
-Open Source Terms as supplemented by these npm Paid Services Terms. If
24
-npm adds any additional functionality to npm Paid Services, you must
25
-agree to these npm Paid Services Terms to use those new features, too.
26
-You add these npm Paid Services Terms to your agreement with npm by
27
-using npm Paid Services with your account (your _Account_). These
28
-npm Paid Services Terms then become a part of the contract between you
29
-and npm, until you or npm disable npm Paid Services for your Account.
6
+These npm Paid Services Terms of Use (these _npm Paid Services Terms_) supplement the terms for npm Open Source offered by npm, Inc. (_npm_) at [https://docs.npmjs.com/policies/open-source-terms](https://docs.npmjs.com/policies/open-source-terms) (_npm Open Source Terms_). They govern access to and use of _npm Paid Services_, including but not limited to the products known as _npm Solo_ and _npm Orgs_, the private package storage, delivery, organization management, and access control features of [https://www.npmjs.com](https://www.npmjs.com) (the _Website_) and the npm public registry at [https://registry.npmjs.org](https://registry.npmjs.org) (the _Public Registry_). These are collectively called the _Paid Services_.
7
+
8
+These npm Paid Services Terms were last updated on March 10, 2022. You can review prior versions at [https://github.com/npm/documentation/blob/main/content/policies/private-terms.mdx](https://github.com/npm/documentation/blob/main/content/policies/private-terms.mdx).
9
+
10
+You may only access or use npm Paid Services by agreeing to the npm Open Source Terms as supplemented by these npm Paid Services Terms. If npm adds any additional functionality to npm Paid Services, you must agree to these npm Paid Services Terms to use those new features, too. You add these npm Paid Services Terms to your agreement with npm by using npm Paid Services with your account (your _Account_). These npm Paid Services Terms then become a part of the contract between you and npm, until you or npm disable npm Paid Services for your Account.
11
12
## Payment Terms
13
33
-There is no charge for use of npm Open Source. If you use Paid Services,
34
-these payment terms apply. When enabling Paid Services, you must provide
35
-all the payment card details requested by the Website (your _Payment
36
-Details_). Those details must be for a valid payment card that you have
37
-the right to use (your _Payment Card_). You must keep your Payment
38
-Details up-to-date via the Website.
14
+There is no charge for use of npm Open Source. If you use Paid Services, these payment terms apply. When enabling Paid Services, you must provide all the payment card details requested by the Website (your _Payment Details_). Those details must be for a valid payment card that you have the right to use (your _Payment Card_). You must keep your Payment Details up-to-date via the Website.
15
40
-You can disable Paid Services at any time via the Website. npm will not
41
-refund any payment you have already made for Paid Services when you
42
-disable Paid Services.
16
+You can disable Paid Services at any time via the Website. npm will not refund any payment you have already made for Paid Services when you disable Paid Services.
17
44
-Dollar amounts throughout this Agreement are amounts of United States
45
-Dollars. You must pay for Paid Services in United States Dollars.
18
+Dollar amounts throughout this Agreement are amounts of United States Dollars. You must pay for Paid Services in United States Dollars.
19
47
-Dollar amounts throughout this Agreement do not include tax. You will
48
-pay any tax.
20
+Dollar amounts throughout this Agreement do not include tax. You will pay any tax.
21
22
## Use of npm Paid Services
23
52
-npm will provide the private package storage and delivery features and
53
-services described in the public documentation for npm Paid Services
54
-at [https://docs.npmjs.com/](https://docs.npmjs.com/) (the _npm Paid Services
55
-Documentation_). npm grants you permission to use those features and
56
-services.
24
+npm will provide the private package storage and delivery features and services described in the public documentation for npm Paid Services at [https://docs.npmjs.com/](https://docs.npmjs.com/) (the _npm Paid Services Documentation_). npm grants you permission to use those features and services.
25
58
-npm will also provide the organization management and access control
59
-features described in the npm Paid Services Documentation, and grants
60
-you permission to use those features and services, for npm
61
-"organizations" to which your Account belongs.
26
+npm will also provide the organization management and access control features described in the npm Paid Services Documentation, and grants you permission to use those features and services, for npm "organizations" to which your Account belongs.
27
63
-Permission to use npm Paid Services is not exclusive to you, and you
64
-may not transfer it to others. These npm Paid Services Terms do not
65
-give you permission to give others rights to use npm Paid Services.
66
-If you agree to a Payment Plan that gives you that right, you may do so
67
-only according to that Payment Plan.
28
+Permission to use npm Paid Services is not exclusive to you, and you may not transfer it to others. These npm Paid Services Terms do not give you permission to give others rights to use npm Paid Services. If you agree to a Payment Plan that gives you that right, you may do so only according to that Payment Plan.
29
30
## Payment for npm Paid Services
31
71
-Both your permission to use npm Paid Services and npm's commitment to
72
-provide npm Paid Services are subject to these npm Paid Services
73
-Terms, the npm Open Source Terms, and payment for use of npm Paid
74
-Services by your Account under a _Payment Plan_. Payment plans include:
32
+Both your permission to use npm Paid Services and npm's commitment to provide npm Paid Services are subject to these npm Paid Services Terms, the npm Open Source Terms, and payment for use of npm Paid Services by your Account under a _Payment Plan_. Payment plans include:
33
76
-1. the npm Solo Payment Plan at
77
- [https://docs.npmjs.com/policies/solo-plan](https://docs.npmjs.com/policies/solo-plan)
34
+1. the npm Solo Payment Plan at [https://docs.npmjs.com/policies/solo-plan](https://docs.npmjs.com/policies/solo-plan)
35
79
-2. or the npm Orgs Payment Plan at
80
- [https://docs.npmjs.com/policies/orgs-plan](https://docs.npmjs.com/policies/orgs-plan)
36
+2. or the npm Orgs Payment Plan at [https://docs.npmjs.com/policies/orgs-plan](https://docs.npmjs.com/policies/orgs-plan)
37
82
-You may not use npm Paid Services unless you or someone else has
83
-agreed to a Payment Plan, enabled npm Paid Services for your Account
84
-under that Payment Plan, and made payment.
38
+You may not use npm Paid Services unless you or someone else has agreed to a Payment Plan, enabled npm Paid Services for your Account under that Payment Plan, and made payment.
content/policies/security.mdx
+11
-25
@@ -3,9 +3,7 @@ title: npm Security Policy
3
edit_on_github: false
4
---
5
6
-Outlined in this document are the practices and policies that npm
7
-applies to help ensure that we release stable/secure software, and
8
-react appropriately to security threats when they arise.
6
+Outlined in this document are the practices and policies that npm applies to help ensure that we release stable/secure software, and react appropriately to security threats when they arise.
7
8
## Table of Contents
9
@@ -15,39 +13,27 @@ react appropriately to security threats when they arise.
13
14
## Reporting Security Problems to npm
15
18
-If you need to report a security vulnerability. Please visit [https://npmjs.com/support](https://npmjs.com/support).
19
-If your issue is specific to your account, such as lost credentials or problems with two-factor authentication, contacting [our support team](https://npmjs.com/support) is more appropriate.
16
+If you need to report a security vulnerability. Please visit [https://npmjs.com/support](https://npmjs.com/support). If your issue is specific to your account, such as lost credentials or problems with two-factor authentication, contacting [our support team](https://npmjs.com/support) is more appropriate.
17
21
-We review all security reports on the next business day. Note that
22
-the npm staff is generally offline for most US holidays, but please do
23
-not delay your report! Our off-hours support staff can fix many
24
-issues, and will alert our security point of contact if needed.
18
+We review all security reports on the next business day. Note that the npm staff is generally offline for most US holidays, but please do not delay your report! Our off-hours support staff can fix many issues, and will alert our security point of contact if needed.
19
20
## Security Point of Contact
21
28
-Any security tickets opened using [https://npmjs.com/support](https://npmjs.com/support)
29
-will be escalated to the security point of contact, who will delegate incident response
30
-activities as appropriate. This is the best and fastest way to contact npm about any security-related matter.
22
+Any security tickets opened using [https://npmjs.com/support](https://npmjs.com/support) will be escalated to the security point of contact, who will delegate incident response activities as appropriate. This is the best and fastest way to contact npm about any security-related matter.
23
24
## Critical Updates And Security Notices
25
34
-We learn about critical software updates and security threats from a
35
-variety of sources:
26
+We learn about critical software updates and security threats from a variety of sources:
27
37
-* Ubuntu's security notices page: [https://usn.ubuntu.com/](https://usn.ubuntu.com/)
38
-* The Node.js mailing list.
39
-* [Security tickets](https://npmjs.com/support) sent to us.
40
-* and other media sources.
28
+- Ubuntu's security notices page: [https://usn.ubuntu.com/](https://usn.ubuntu.com/)
29
+- The Node.js mailing list.
30
+- [Security tickets](https://npmjs.com/support) sent to us.
31
+- and other media sources.
32
33
## Changes
34
44
-This is a living document and may be updated from time to time.
45
-Please refer to the [git history for this
46
-document](https://github.com/npm/documentation/blob/main/content/policies/security.mdx)
47
-to view the changes.
35
+This is a living document and may be updated from time to time. Please refer to the [git history for this document](https://github.com/npm/documentation/blob/main/content/policies/security.mdx) to view the changes.
36
37
## License
38
51
-This document may be reused under a [Creative Commons
52
-Attribution-ShareAlike
53
-License](https://creativecommons.org/licenses/by-sa/4.0/).
39
+This document may be reused under a [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/4.0/).
content/policies/solo-plan.mdx
+5
-20
@@ -3,28 +3,13 @@ title: Solo Payment Plan
3
edit_on_github: false
4
---
5
6
-This npm Solo Payment Plan (this _Payment Plan_) supplements
7
-the terms for npm Open Source offered by npm, Inc. (_npm_) at
8
-[https://docs.npmjs.com/policies/open-source-terms][open-source-terms] (_npm Open Source
9
-Terms_), as well as the terms for npm Paid Services (_npm Paid Services_)
10
-at [https://docs.npmjs.com/policies/private-terms][private-terms](_npm Paid
11
-Services Terms_). This Payment Plan governs payment for use of
12
-npm Solo by a single user account.
6
+This npm Solo Payment Plan (this _Payment Plan_) supplements the terms for npm Open Source offered by npm, Inc. (_npm_) at [https://docs.npmjs.com/policies/open-source-terms][open-source-terms] (_npm Open Source Terms_), as well as the terms for npm Paid Services (_npm Paid Services_) at [https://docs.npmjs.com/policies/private-terms][private-terms](_npm Paid Services Terms_). This Payment Plan governs payment for use of npm Solo by a single user account.
7
14
-This Payment Plan was last updated on
15
-August 6, 2018.
16
-You can review prior versions at
17
-[https://github.com/npm/documentation/blob/main/content/policies/solo-plan.mdx](https://github.com/npm/documentation/blob/main/content/policies/solo-plan.mdx).
8
+This Payment Plan was last updated on August 6, 2018. You can review prior versions at [https://github.com/npm/documentation/blob/main/content/policies/solo-plan.mdx](https://github.com/npm/documentation/blob/main/content/policies/solo-plan.mdx).
9
19
-You will pay $7.00 via your Payment Card when you enable npm Solo
20
-for your Account by selecting this Payment Plan, and thereafter
21
-on the same day every month while this Payment Plan remains
22
-selected for your Account.
10
+You will pay $7.00 via your Payment Card when you enable npm Solo for your Account by selecting this Payment Plan, and thereafter on the same day every month while this Payment Plan remains selected for your Account.
11
24
-Note that the npm Paid Services Terms require everyone using npm Paid
25
-Services to have an Account of their own, added under a Payment Plan.
26
-You may not allow anyone else to use npm Paid Services under this
27
-Payment Plan.
12
+Note that the npm Paid Services Terms require everyone using npm Paid Services to have an Account of their own, added under a Payment Plan. You may not allow anyone else to use npm Paid Services under this Payment Plan.
13
14
[open-source-terms]: /policies/open-source-terms
30
-[private-terms]: /policies/private-terms
\ No newline at end of file
15
+[private-terms]: /policies/private-terms
content/policies/terms.mdx
+13
-24
@@ -2,45 +2,34 @@
2
title: Terms and Licenses
3
edit_on_github: false
4
---
5
-npm, Inc. offers software and services under a few different licenses
6
-and terms of use.
5
+
6
+npm, Inc. offers software and services under a few different licenses and terms of use.
7
8
## Software from npm
9
10
-License terms and notices for the `npm` command-line program can
11
-be found in the LICENSE file of the project's source code at
12
-[https://www.github.com/npm/cli](https://www.github.com/npm/cli).
10
+License terms and notices for the `npm` command-line program can be found in the LICENSE file of the project's source code at [https://www.github.com/npm/cli](https://www.github.com/npm/cli).
11
12
## Free to use npm services
13
16
-Free usage of [https://www.npmjs.com](https://www.npmjs.com), and the npm public registry
17
-are covered by the npm Open Source Terms at [https://docs.npmjs.com/policies/open-source-terms](https://docs.npmjs.com/policies/open-source-terms).
18
-These terms include several important policies, including:
14
+Free usage of [https://www.npmjs.com](https://www.npmjs.com), and the npm public registry are covered by the npm Open Source Terms at [https://docs.npmjs.com/policies/open-source-terms](https://docs.npmjs.com/policies/open-source-terms). These terms include several important policies, including:
15
20
-* What npm considers [acceptable package content][acceptable-use].
16
+- What npm considers [acceptable package content][acceptable-use].
17
22
-* npm's [Code of Conduct][conduct], which includes our policy on harassment.
18
+- npm's [Code of Conduct][conduct], which includes our policy on harassment.
19
24
-* npm's [Privacy Policy][privacy], which limits use and sharing of information
25
-about you collected by npm Services.
20
+- npm's [Privacy Policy][privacy], which limits use and sharing of information about you collected by npm Services.
21
27
-* npm's policy on [copyright][dmca] including how to report violations thereof.
22
+- npm's policy on [copyright][dmca] including how to report violations thereof.
23
29
-* npm's [Dispute Policy][disputes] which addresses how to resolve disputes
30
-over the control of a package name, user name, or organization name in the Public Registry. This includes
31
-our policy on users "squatting" on these names.
24
+- npm's [Dispute Policy][disputes] which addresses how to resolve disputes over the control of a package name, user name, or organization name in the Public Registry. This includes our policy on users "squatting" on these names.
25
33
-* Use of npm's trademarks is governed by our [Trademark Policy][trademark]. If you
34
-have concerns about your own trademark's use on npm please see our [Disputes Policy][disputes-trademark].
26
+- Use of npm's trademarks is governed by our [Trademark Policy][trademark]. If you have concerns about your own trademark's use on npm please see our [Disputes Policy][disputes-trademark].
27
28
## Paid npm services
29
38
-npm's paid products, including the npm Solo and Orgs plans, are
39
-covered by the npm Paid Services Terms at [https://docs.npmjs.com/policies/private-terms](https://docs.npmjs.com/policies/private-terms).
30
+npm's paid products, including the npm Solo and Orgs plans, are covered by the npm Paid Services Terms at [https://docs.npmjs.com/policies/private-terms](https://docs.npmjs.com/policies/private-terms).
31
41
-The [npm Solo Payment Plan][solo-plan]
42
-and the [npm Orgs Payment Plan][orgs-plan]
43
-govern payment for these services.
32
+The [npm Solo Payment Plan][solo-plan] and the [npm Orgs Payment Plan][orgs-plan] govern payment for these services.
33
34
[acceptable-use]: /policies/open-source-terms#acceptable-use
35
[privacy]: /policies/privacy
@@ -50,4 +39,4 @@ govern payment for these services.
39
[disputes-trademark]: /policies/disputes#trademarks
40
[conduct]: /policies/conduct
41
[orgs-plan]: /policies/orgs-plan
53
-[solo-plan]: /policies/solo-plan
\ No newline at end of file
42
+[solo-plan]: /policies/solo-plan
content/policies/unpublish.mdx
+3
-8
@@ -52,22 +52,17 @@ This document is additive to the [unpublish procedures](https://docs.npmjs.com/u
52
53
If for some reason your package meets the unpublish policy criteria but the unpublish command fails, or if you need assistance with the deprecate process, please [reach out to our support team](https://npmjs.com/support) where we'll be happy to assist.
54
55
-If you believe a package violates npm's terms or policies, such as our terms of use, [reach out to our support team](https://www.npmjs.com/support). If a package infringes your copyright, [refer to npm's DMCA takedown policy][dmca]. If you believe a package violates your privacy rights, [contact our privacy team][contact] as soon as possible.
55
+If you believe a package violates npm's terms or policies, such as our terms of use, [reach out to our support team](https://www.npmjs.com/support). If a package infringes your copyright, [refer to npm's DMCA takedown policy][dmca]. If you believe a package violates your privacy rights, [contact our privacy team][contact] as soon as possible.
56
57
## Changes
58
59
-This is a living document and may be updated from time to time.
60
-Please refer to the [git history for this
61
-document](https://github.com/npm/documentation/blob/main/content/policies/unpublish.mdx)
62
-to view the changes.
59
+This is a living document and may be updated from time to time. Please refer to the [git history for this document](https://github.com/npm/documentation/blob/main/content/policies/unpublish.mdx) to view the changes.
60
61
## License
62
63
Copyright (C) npm, Inc., All rights reserved
64
68
-This document may be reused under a [Creative Commons
69
-Attribution-ShareAlike
70
-License](https://creativecommons.org/licenses/by-sa/4.0/).
65
+This document may be reused under a [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/4.0/).
66
67
[dmca]: /policies/dmca
68
[contact]: /policies/privacy#contact
package.json
+2
-1
@@ -22,7 +22,8 @@
22
"posttest": "npm run lint",
23
"test-all": "npm run test -ws -iwr --if-present",
24
"lint-all": "npm run lint -ws -iwr --if-present",
25
- "format": "prettier --write ."
25
+ "format": "prettier --write .",
26
+ "format:check": "prettier --check ."
27
},
28
"workspaces": [
29
"cli/"
scripts/template-oss/_step-lint.yml
new
+3
@@ -0,0 +1,3 @@
1
+{{> defaultStepLint }}
2
+- name: Check Format
3
+ run: {{ rootNpmPath }} run format:check --ignore-scripts --if-present {{~#if jobRunFlags}} {{ jobRunFlags }}{{/if}}
src/layout.js
+1
-1
@@ -1,6 +1,6 @@
1
import React from 'react'
2
import {Box, Heading, Text} from '@primer/react'
3
-import {H1} from './mdx'
3
+import {h1 as H1} from './mdx'
4
import PageFooter from './components/page-footer'
5
import * as TableOfContents from './components/table-of-contents'
6
import VariantSelect from './components/variant-select'
src/mdx/code.js
+68
-52
@@ -3,12 +3,12 @@ import {Box, Text, Button, Octicon, themeGet} from '@primer/react'
3
import {Highlight, themes, Prism} from 'prism-react-renderer'
4
import styled from 'styled-components'
5
import {CheckIcon, CopyIcon} from '@primer/octicons-react'
6
-import copy from 'copy-to-clipboard'
6
+import copyToClipboard from 'copy-to-clipboard'
7
import {announce} from '../util/aria-live'
8
;(typeof global !== 'undefined' ? global : window).Prism = Prism
9
require('prismjs/components/prism-bash')
10
11
-function ClipboardCopy({value, ...props}) {
11
+const ClipboardCopy = ({value, ...props}) => {
12
const [copied, setCopied] = React.useState(false)
13
14
React.useEffect(() => {
@@ -26,7 +26,7 @@ function ClipboardCopy({value, ...props}) {
26
{...props}
27
aria-label="Copy to clipboard"
28
onClick={() => {
29
- copy(value)
29
+ copyToClipboard(value)
30
setCopied(true)
31
announce(`Copied to clipboard`)
32
}}
@@ -44,7 +44,62 @@ export const InlineCode = styled.code`
44
border-radius: ${themeGet('radii.2')};
45
`
46
47
-function Code({className = '', children}) {
47
+const MonoText = props => <Text sx={{fontFamily: 'mono', fontSize: 1}} {...props} />
48
+
49
+const CodeBlock = ({children, code, className, style}) => (
50
+ <Box
51
+ sx={{
52
+ // Make <pre> adjust to the width of the container
53
+ // https://stackoverflow.com/a/14406386
54
+ display: 'table',
55
+ tableLayout: 'fixed',
56
+ width: '100%',
57
+ mb: 3,
58
+ }}
59
+ >
60
+ <Box
61
+ style={style}
62
+ sx={{
63
+ ...(code ? {display: 'flex', justifyContent: 'space-between', flexDirection: 'row-reverse'} : {}),
64
+ borderRadius: 2,
65
+ borderStyle: 'solid',
66
+ borderWidth: 1,
67
+ borderColor: 'border.muted',
68
+ }}
69
+ >
70
+ {code ? (
71
+ <ClipboardCopy
72
+ value={code}
73
+ sx={{
74
+ borderRadius: 0,
75
+ borderStyle: 'solid',
76
+ borderWidth: 1,
77
+ borderColor: 'border.muted',
78
+ marginTop: '-1px',
79
+ marginRight: '-1px',
80
+ borderTopRightRadius: 2,
81
+ borderBottomLeftRadius: 2,
82
+ }}
83
+ />
84
+ ) : null}
85
+ <Box sx={{m: 0, p: 3, overflowX: 'auto'}}>
86
+ <Box as="pre" className={className} tabIndex={0} sx={{m: 0}}>
87
+ {children}
88
+ </Box>
89
+ </Box>
90
+ </Box>
91
+ </Box>
92
+)
93
+
94
+function Code({className = '', prompt, children}) {
95
+ if (prompt) {
96
+ return (
97
+ <CodeBlock style={themes.github.plain}>
98
+ <MonoText>{children}</MonoText>
99
+ </CodeBlock>
100
+ )
101
+ }
102
+
103
const code = children.trim()
104
const isBlock = className.startsWith('language-') || code.includes('\n')
105
@@ -55,54 +110,15 @@ function Code({className = '', children}) {
110
return (
111
<Highlight code={code} language={className.replace(/language-/, '') || 'bash'} theme={themes.github}>
112
{({className: highlightClassName, style, tokens, getLineProps, getTokenProps}) => (
58
- <Box
59
- sx={{
60
- // Make <pre> adjust to the width of the container
61
- // https://stackoverflow.com/a/14406386
62
- display: 'table',
63
- tableLayout: 'fixed',
64
- width: '100%',
65
- mb: 3,
66
- }}
67
- >
68
- <Box
69
- style={style}
70
- sx={{
71
- display: 'flex',
72
- justifyContent: 'space-between',
73
- flexDirection: 'row-reverse',
74
- borderRadius: 2,
75
- borderStyle: 'solid',
76
- borderWidth: 1,
77
- borderColor: 'border.muted',
78
- }}
79
- >
80
- <ClipboardCopy
81
- value={code}
82
- sx={{
83
- borderRadius: 0,
84
- borderStyle: 'solid',
85
- borderWidth: 1,
86
- borderColor: 'border.muted',
87
- marginTop: '-1px',
88
- marginRight: '-1px',
89
- borderTopRightRadius: 2,
90
- borderBottomLeftRadius: 2,
91
- }}
92
- />
93
- <Box sx={{m: 0, p: 3, overflowX: 'auto'}}>
94
- <Box as="pre" className={highlightClassName} tabIndex={0} sx={{m: 0}}>
95
- {tokens.map((line, i) => (
96
- <div key={i} {...getLineProps({line, key: i})}>
97
- {line.map((token, key) => (
98
- <Text key={key} {...getTokenProps({token, key})} sx={{fontFamily: 'mono', fontSize: 1}} />
99
- ))}
100
- </div>
101
- ))}
102
- </Box>
103
- </Box>
104
- </Box>
105
- </Box>
113
+ <CodeBlock className={highlightClassName} style={style} code={code}>
114
+ {tokens.map((line, i) => (
115
+ <div key={i} {...getLineProps({line, key: i})}>
116
+ {line.map((token, key) => (
117
+ <MonoText key={key} {...getTokenProps({token, key})} />
118
+ ))}
119
+ </div>
120
+ ))}
121
+ </CodeBlock>
122
)}
123
</Highlight>
124
)
src/mdx/components.js
new
+311
@@ -0,0 +1,311 @@
1
+import React from 'react'
2
+import {Box, Heading, themeGet, Octicon} from '@primer/react'
3
+import styled from 'styled-components'
4
+import {variant as styledVariant} from 'styled-system'
5
+import {LinkIcon} from '@primer/octicons-react'
6
+import textContent from 'react-addons-text-content'
7
+import {SCROLL_MARGIN_TOP} from '../constants'
8
+import usePage from '../hooks/use-page'
9
+import SiteLink, {LinkNoUnderline} from '../components/link'
10
+import Code from './code'
11
+
12
+export {Code}
13
+export {default as Index} from './nav-hierarchy'
14
+
15
+const required = (prop, name) => {
16
+ if (!prop) {
17
+ throw new Error(`${name} prop is required`)
18
+ }
19
+ return prop
20
+}
21
+
22
+export const Link = props => <SiteLink underline {...props} />
23
+
24
+const StyledHeading = styled(Heading)`
25
+ margin-top: ${themeGet('space.4')};
26
+ margin-bottom: ${themeGet('space.3')};
27
+ scroll-margin-top: ${SCROLL_MARGIN_TOP}px;
28
+ line-height: ${themeGet('lineHeights.condensed')};
29
+
30
+ @media (hover: hover) {
31
+ & .octicon-link {
32
+ visibility: hidden;
33
+ }
34
+
35
+ &:hover .octicon-link,
36
+ &:focus-within .octicon-link {
37
+ visibility: visible;
38
+ }
39
+ }
40
+`
41
+
42
+const HeaderLink = ({autolink, children, ...props}) =>
43
+ autolink ? (
44
+ <LinkNoUnderline {...props} sx={{color: 'inherit'}}>
45
+ {children}
46
+ <Octicon
47
+ icon={LinkIcon}
48
+ className="octicon-link"
49
+ sx={{
50
+ ml: 2,
51
+ color: 'fg.muted',
52
+ // !important is needed here to override default icon styles
53
+ verticalAlign: 'middle !important',
54
+ }}
55
+ />
56
+ </LinkNoUnderline>
57
+ ) : (
58
+ children
59
+ )
60
+
61
+const Headings = {
62
+ Markdown: ({children, autolink = true, ...props}) => {
63
+ const childArray = React.Children.toArray(children)
64
+ const childLink =
65
+ React.Children.count(children) > 1 && childArray[0].type?.name === 'Link' ? childArray.shift() : null
66
+
67
+ const {slugger} = usePage()
68
+ const text = children ? textContent(children) : ''
69
+ const id = text ? slugger.slug(text) : ''
70
+ const linkProps = {
71
+ autolink,
72
+ 'aria-label': `${text} permalink`.trim(),
73
+ ...(id ? {href: `#${id}`} : {}),
74
+ }
75
+
76
+ return (
77
+ <StyledHeading {...(autolink && id ? {id} : {})} {...props}>
78
+ {childLink ? (
79
+ <React.Fragment>
80
+ {childLink}
81
+ <HeaderLink {...linkProps}>
82
+ {childArray.map((child, index) => (
83
+ <React.Fragment key={index}>{child}</React.Fragment>
84
+ ))}
85
+ </HeaderLink>
86
+ </React.Fragment>
87
+ ) : (
88
+ <HeaderLink {...linkProps}>{children}</HeaderLink>
89
+ )}
90
+ </StyledHeading>
91
+ )
92
+ },
93
+ h1: styled(StyledHeading).attrs({as: 'h1'})`
94
+ padding-bottom: ${themeGet('space.2')};
95
+ font-size: ${themeGet('fontSizes.6')};
96
+ border-bottom: 1px solid ${themeGet('colors.border.default')};
97
+ margin-top: 0;
98
+ `,
99
+ h2: styled(StyledHeading).attrs({as: 'h2'})`
100
+ padding-bottom: ${themeGet('space.2')};
101
+ font-size: ${themeGet('fontSizes.4')};
102
+ border-bottom: 1px solid ${themeGet('colors.border.default')};
103
+ font-weight: ${themeGet('fontWeights.semibold')};
104
+ `,
105
+ h3: styled(StyledHeading).attrs({as: 'h3'})`
106
+ font-size: ${themeGet('fontSizes.3')};
107
+ font-weight: ${themeGet('fontWeights.semibold')};
108
+ `,
109
+ h4: styled(StyledHeading).attrs({as: 'h4'})`
110
+ font-size: ${themeGet('fontSizes.2')};
111
+ font-weight: ${themeGet('fontWeights.semibold')};
112
+ `,
113
+ h5: styled(StyledHeading).attrs({as: 'h5'})`
114
+ font-size: ${themeGet('fontSizes.1')};
115
+ `,
116
+ h6: styled(StyledHeading).attrs({as: 'h6'})`
117
+ font-size: ${themeGet('fontSizes.1')};
118
+ color: ${themeGet('colors.fg.muted')};
119
+ `,
120
+ wrap(as) {
121
+ return props => <Headings.Markdown as={Headings[as]} {...props} />
122
+ },
123
+}
124
+
125
+export const H1 = Headings.wrap('h1')
126
+export const H2 = Headings.wrap('h2')
127
+export const H3 = Headings.wrap('h3')
128
+export const H4 = Headings.wrap('h4')
129
+export const H5 = Headings.wrap('h5')
130
+export const H6 = Headings.wrap('h6')
131
+
132
+export const Blockquote = styled.blockquote`
133
+ margin: 0 0 ${themeGet('space.3')};
134
+ padding: 0 ${themeGet('space.3')};
135
+ color: ${themeGet('colors.fg.muted')};
136
+ border-left: 0.25em solid ${themeGet('colors.border.default')};
137
+
138
+ > :first-child {
139
+ margin-top: 0;
140
+ }
141
+
142
+ > :last-child {
143
+ margin-bottom: 0;
144
+ }
145
+`
146
+
147
+export const DescriptionList = styled.dl`
148
+ padding: 0;
149
+
150
+ dt {
151
+ padding: 0;
152
+ margin-top: ${themeGet('space.3')};
153
+ font-size: 1em;
154
+ font-style: italic;
155
+ font-weight: ${themeGet('fontWeights.bold')};
156
+ }
157
+
158
+ dd {
159
+ padding: 0 ${themeGet('space.3')};
160
+ margin: 0 0 ${themeGet('space.3')};
161
+ }
162
+`
163
+
164
+export const HorizontalRule = styled.hr`
165
+ height: ${themeGet('borderWidths.1')};
166
+ padding: 0;
167
+ margin: ${themeGet('space.4')} 0;
168
+ background-color: ${themeGet('colors.border.default')};
169
+ border: 0;
170
+`
171
+
172
+export const UnorderedList = styled.ul`
173
+ padding-left: 2em;
174
+
175
+ ul,
176
+ ol {
177
+ margin-top: 0;
178
+ margin-bottom: 0;
179
+ }
180
+
181
+ li {
182
+ word-wrap: break-all;
183
+ }
184
+
185
+ li > p {
186
+ margin-top: ${themeGet('space.3')};
187
+ }
188
+
189
+ li + li {
190
+ margin-top: ${themeGet('space.1')};
191
+ }
192
+`
193
+
194
+export const OrderedList = UnorderedList.withComponent('ol')
195
+
196
+export const Paragraph = styled.p`
197
+ margin: 0 0 ${themeGet('space.3')};
198
+`
199
+
200
+export const Table = styled.table`
201
+ display: block;
202
+ width: 100%;
203
+ margin: 0 0 ${themeGet('space.3')};
204
+ overflow: auto;
205
+ border-collapse: separate;
206
+ border-spacing: 0px;
207
+
208
+ th {
209
+ font-weight: ${themeGet('fontWeights.bold')};
210
+ background-color: ${themeGet('colors.neutral.subtle')};
211
+ }
212
+
213
+ th,
214
+ td {
215
+ padding: ${themeGet('space.2')} ${themeGet('space.3')};
216
+ border-color: ${themeGet('colors.border.muted')};
217
+ border-style: solid;
218
+ border-width: 0;
219
+ border-left-width: ${themeGet('borderWidths.1')};
220
+ border-top-width: ${themeGet('borderWidths.1')};
221
+ }
222
+
223
+ tr:last-child td {
224
+ border-bottom-width: ${themeGet('borderWidths.1')};
225
+ }
226
+
227
+ tr td:last-child,
228
+ tr th:last-child {
229
+ border-right-width: ${themeGet('borderWidths.1')};
230
+ }
231
+
232
+ thead th:first-child {
233
+ border-top-left-radius: ${themeGet('radii.2')};
234
+ }
235
+
236
+ thead th:last-child {
237
+ border-top-right-radius: ${themeGet('radii.2')};
238
+ }
239
+
240
+ tbody tr:last-child td:last-child {
241
+ border-bottom-right-radius: ${themeGet('radii.2')};
242
+ }
243
+
244
+ tbody tr:last-child td:first-child {
245
+ border-bottom-left-radius: ${themeGet('radii.2')};
246
+ }
247
+
248
+ img {
249
+ background-color: transparent;
250
+ vertical-align: middle;
251
+ }
252
+`
253
+
254
+const StyledNote = styled.div`
255
+ padding: ${themeGet('space.3')};
256
+ margin-bottom: ${themeGet('space.3')};
257
+ border-radius: ${themeGet('radii.2')};
258
+ border-left: ${themeGet('radii.2')} solid;
259
+
260
+ & *:last-child {
261
+ margin-bottom: 0;
262
+ }
263
+
264
+ ${styledVariant({
265
+ variants: {
266
+ info: {
267
+ borderColor: 'accent.muted',
268
+ bg: 'accent.subtle',
269
+ },
270
+ warning: {
271
+ borderColor: 'attention.muted',
272
+ bg: 'attention.subtle',
273
+ },
274
+ danger: {
275
+ borderColor: 'danger.muted',
276
+ bg: 'danger.subtle',
277
+ },
278
+ },
279
+ })}
280
+`
281
+
282
+export const Note = ({variant = 'info', ...props}) => <StyledNote variant={variant} {...props} />
283
+
284
+export const Prompt = props => <Code prompt={true} {...props} />
285
+
286
+const RequiredImage = ({src, alt, ...props}) => <img src={required(src, 'src')} alt={required(alt, 'alt')} {...props} />
287
+
288
+export const Image = styled(RequiredImage)`
289
+ max-width: 100%;
290
+ box-sizing: content-box;
291
+`
292
+
293
+export const Screenshot = styled(RequiredImage)`
294
+ margin-top: ${themeGet('space.3')};
295
+ margin-bottom: ${themeGet('space.3')};
296
+ max-width: min(100%, 525px);
297
+ max-height: 300px;
298
+ border: 1px solid ${themeGet('colors.border.default')};
299
+ display: block;
300
+`
301
+
302
+export const YouTube = ({id}) => (
303
+ <Box
304
+ as="iframe"
305
+ sx={{aspectRatio: '16 / 9', width: '100%'}}
306
+ title="YouTube video"
307
+ src={`https://www.youtube.com/embed/${id}`}
308
+ frameBorder="0"
309
+ allowFullScreen
310
+ />
311
+)
src/mdx/index.js
+25
-324
@@ -1,324 +1,25 @@
1
-import React from 'react'
2
-import {Box, Heading, themeGet, Text, Octicon} from '@primer/react'
3
-import styled from 'styled-components'
4
-import {variant as styledVariant} from 'styled-system'
5
-import {LinkIcon} from '@primer/octicons-react'
6
-import textContent from 'react-addons-text-content'
7
-import {SCROLL_MARGIN_TOP} from '../constants'
8
-import usePage from '../hooks/use-page'
9
-import SiteLink, {LinkNoUnderline} from '../components/link'
10
-
11
-export {default as Code} from './code'
12
-export {default as Index} from './nav-hierarchy'
13
-
14
-const required = (prop, name) => {
15
- if (!prop) {
16
- throw new Error(`${name} prop is required`)
17
- }
18
- return prop
19
-}
20
-
21
-export const Link = props => <SiteLink underline {...props} />
22
-
23
-const StyledHeading = styled(Heading)`
24
- margin-top: ${themeGet('space.4')};
25
- margin-bottom: ${themeGet('space.3')};
26
- scroll-margin-top: ${SCROLL_MARGIN_TOP}px;
27
- line-height: ${themeGet('lineHeights.condensed')};
28
-
29
- @media (hover: hover) {
30
- & .octicon-link {
31
- visibility: hidden;
32
- }
33
-
34
- &:hover .octicon-link,
35
- &:focus-within .octicon-link {
36
- visibility: visible;
37
- }
38
- }
39
-`
40
-
41
-const HeaderLink = ({autolink, children, ...props}) =>
42
- autolink ? (
43
- <LinkNoUnderline {...props} sx={{color: 'inherit'}}>
44
- {children}
45
- <Octicon
46
- icon={LinkIcon}
47
- className="octicon-link"
48
- sx={{
49
- ml: 2,
50
- color: 'fg.muted',
51
- // !important is needed here to override default icon styles
52
- verticalAlign: 'middle !important',
53
- }}
54
- />
55
- </LinkNoUnderline>
56
- ) : (
57
- children
58
- )
59
-
60
-const Headings = {
61
- Markdown: ({children, autolink = true, ...props}) => {
62
- const childArray = React.Children.toArray(children)
63
- const childLink =
64
- React.Children.count(children) > 1 && childArray[0].type?.name === 'Link' ? childArray.shift() : null
65
-
66
- const {slugger} = usePage()
67
- const text = children ? textContent(children) : ''
68
- const id = text ? slugger.slug(text) : ''
69
- const linkProps = {
70
- autolink,
71
- 'aria-label': `${text} permalink`.trim(),
72
- ...(id ? {href: `#${id}`} : {}),
73
- }
74
-
75
- return (
76
- <StyledHeading {...(autolink && id ? {id} : {})} {...props}>
77
- {childLink ? (
78
- <React.Fragment>
79
- {childLink}
80
- <HeaderLink {...linkProps}>
81
- {childArray.map((child, index) => (
82
- <React.Fragment key={index}>{child}</React.Fragment>
83
- ))}
84
- </HeaderLink>
85
- </React.Fragment>
86
- ) : (
87
- <HeaderLink {...linkProps}>{children}</HeaderLink>
88
- )}
89
- </StyledHeading>
90
- )
91
- },
92
- h1: styled(StyledHeading).attrs({as: 'h1'})`
93
- padding-bottom: ${themeGet('space.2')};
94
- font-size: ${themeGet('fontSizes.6')};
95
- border-bottom: 1px solid ${themeGet('colors.border.default')};
96
- margin-top: 0;
97
- `,
98
- h2: styled(StyledHeading).attrs({as: 'h2'})`
99
- padding-bottom: ${themeGet('space.2')};
100
- font-size: ${themeGet('fontSizes.4')};
101
- border-bottom: 1px solid ${themeGet('colors.border.default')};
102
- font-weight: ${themeGet('fontWeights.semibold')};
103
- `,
104
- h3: styled(StyledHeading).attrs({as: 'h3'})`
105
- font-size: ${themeGet('fontSizes.3')};
106
- font-weight: ${themeGet('fontWeights.semibold')};
107
- `,
108
- h4: styled(StyledHeading).attrs({as: 'h4'})`
109
- font-size: ${themeGet('fontSizes.2')};
110
- font-weight: ${themeGet('fontWeights.semibold')};
111
- `,
112
- h5: styled(StyledHeading).attrs({as: 'h5'})`
113
- font-size: ${themeGet('fontSizes.1')};
114
- `,
115
- h6: styled(StyledHeading).attrs({as: 'h6'})`
116
- font-size: ${themeGet('fontSizes.1')};
117
- color: ${themeGet('colors.fg.muted')};
118
- `,
119
- wrap(as) {
120
- return props => <Headings.Markdown as={Headings[as]} {...props} />
121
- },
122
-}
123
-
124
-export const H1 = Headings.wrap('h1')
125
-export const H2 = Headings.wrap('h2')
126
-export const H3 = Headings.wrap('h3')
127
-export const H4 = Headings.wrap('h4')
128
-export const H5 = Headings.wrap('h5')
129
-export const H6 = Headings.wrap('h6')
130
-
131
-export const Blockquote = styled.blockquote`
132
- margin: 0 0 ${themeGet('space.3')};
133
- padding: 0 ${themeGet('space.3')};
134
- color: ${themeGet('colors.fg.muted')};
135
- border-left: 0.25em solid ${themeGet('colors.border.default')};
136
-
137
- > :first-child {
138
- margin-top: 0;
139
- }
140
-
141
- > :last-child {
142
- margin-bottom: 0;
143
- }
144
-`
145
-
146
-export const DescriptionList = styled.dl`
147
- padding: 0;
148
-
149
- dt {
150
- padding: 0;
151
- margin-top: ${themeGet('space.3')};
152
- font-size: 1em;
153
- font-style: italic;
154
- font-weight: ${themeGet('fontWeights.bold')};
155
- }
156
-
157
- dd {
158
- padding: 0 ${themeGet('space.3')};
159
- margin: 0 0 ${themeGet('space.3')};
160
- }
161
-`
162
-
163
-export const HorizontalRule = styled.hr`
164
- height: ${themeGet('borderWidths.1')};
165
- padding: 0;
166
- margin: ${themeGet('space.4')} 0;
167
- background-color: ${themeGet('colors.border.default')};
168
- border: 0;
169
-`
170
-
171
-export const UnorderedList = styled.ul`
172
- padding-left: 2em;
173
-
174
- ul,
175
- ol {
176
- margin-top: 0;
177
- margin-bottom: 0;
178
- }
179
-
180
- li {
181
- word-wrap: break-all;
182
- }
183
-
184
- li > p {
185
- margin-top: ${themeGet('space.3')};
186
- }
187
-
188
- li + li {
189
- margin-top: ${themeGet('space.1')};
190
- }
191
-`
192
-
193
-export const OrderedList = UnorderedList.withComponent('ol')
194
-
195
-export const Paragraph = styled.p`
196
- margin: 0 0 ${themeGet('space.3')};
197
-`
198
-
199
-export const Table = styled.table`
200
- display: block;
201
- width: 100%;
202
- margin: 0 0 ${themeGet('space.3')};
203
- overflow: auto;
204
- border-collapse: separate;
205
- border-spacing: 0px;
206
-
207
- th {
208
- font-weight: ${themeGet('fontWeights.bold')};
209
- background-color: ${themeGet('colors.neutral.subtle')};
210
- }
211
-
212
- th,
213
- td {
214
- padding: ${themeGet('space.2')} ${themeGet('space.3')};
215
- border-color: ${themeGet('colors.border.muted')};
216
- border-style: solid;
217
- border-width: 0;
218
- border-left-width: ${themeGet('borderWidths.1')};
219
- border-top-width: ${themeGet('borderWidths.1')};
220
- }
221
-
222
- tr:last-child td {
223
- border-bottom-width: ${themeGet('borderWidths.1')};
224
- }
225
-
226
- tr td:last-child,
227
- tr th:last-child {
228
- border-right-width: ${themeGet('borderWidths.1')};
229
- }
230
-
231
- thead th:first-child {
232
- border-top-left-radius: ${themeGet('radii.2')};
233
- }
234
-
235
- thead th:last-child {
236
- border-top-right-radius: ${themeGet('radii.2')};
237
- }
238
-
239
- tbody tr:last-child td:last-child {
240
- border-bottom-right-radius: ${themeGet('radii.2')};
241
- }
242
-
243
- tbody tr:last-child td:first-child {
244
- border-bottom-left-radius: ${themeGet('radii.2')};
245
- }
246
-
247
- img {
248
- background-color: transparent;
249
- vertical-align: middle;
250
- }
251
-`
252
-
253
-const StyledNote = styled.div`
254
- padding: ${themeGet('space.3')};
255
- margin-bottom: ${themeGet('space.3')};
256
- border-radius: ${themeGet('radii.2')};
257
- border-left: ${themeGet('radii.2')} solid;
258
-
259
- & *:last-child {
260
- margin-bottom: 0;
261
- }
262
-
263
- ${styledVariant({
264
- variants: {
265
- info: {
266
- borderColor: 'accent.muted',
267
- bg: 'accent.subtle',
268
- },
269
- warning: {
270
- borderColor: 'attention.muted',
271
- bg: 'attention.subtle',
272
- },
273
- danger: {
274
- borderColor: 'danger.muted',
275
- bg: 'danger.subtle',
276
- },
277
- },
278
- })}
279
-`
280
-
281
-export const Note = ({variant = 'info', ...props}) => <StyledNote variant={variant} {...props} />
282
-
283
-export const Prompt = ({children}) => (
284
- <Box
285
- as="pre"
286
- sx={{
287
- mt: 0,
288
- mb: 3,
289
- p: 3,
290
- border: 0,
291
- overflow: 'auto',
292
- }}
293
- >
294
- <Text sx={{fontFamily: 'mono', fontSize: 1}}>{children}</Text>
295
- </Box>
296
-)
297
-
298
-export const PromptReply = ({children}) => <strong>{children}</strong>
299
-
300
-const RequiredImage = ({src, alt, ...props}) => <img src={required(src, 'src')} alt={required(alt, 'alt')} {...props} />
301
-
302
-export const Image = styled(RequiredImage)`
303
- max-width: 100%;
304
- box-sizing: content-box;
305
-`
306
-
307
-export const Screenshot = styled(RequiredImage)`
308
- margin-top: ${themeGet('space.3')};
309
- max-width: min(100%, 525px);
310
- max-height: 300px;
311
- border: 1px solid ${themeGet('colors.border.default')};
312
- display: block;
313
-`
314
-
315
-export const YouTube = ({id}) => (
316
- <Box
317
- as="iframe"
318
- sx={{aspectRatio: '16 / 9', width: '100%'}}
319
- title="YouTube video"
320
- src={`https://www.youtube.com/embed/${id}`}
321
- frameBorder="0"
322
- allowFullScreen
323
- />
324
-)
1
+import * as Components from './components'
2
+
3
+export const a = Components.Link
4
+export const pre = ({children}) => children
5
+export const code = Components.Code
6
+export const table = Components.Table
7
+export const img = Components.Image
8
+export const p = Components.Paragraph
9
+export const hr = Components.HorizontalRule
10
+export const blockquote = Components.Blockquote
11
+export const h1 = Components.H1
12
+export const h2 = Components.H2
13
+export const h3 = Components.H3
14
+export const h4 = Components.H4
15
+export const h5 = Components.H5
16
+export const h6 = Components.H6
17
+export const ul = Components.UnorderedList
18
+export const ol = Components.OrderedList
19
+export const dl = Components.DescriptionList
20
+export const Index = Components.Index
21
+export const Note = Components.Note
22
+export const Prompt = Components.Prompt
23
+export const Screenshot = Components.Screenshot
24
+export const Link = Components.Link
25
+export const YouTube = Components.YouTube
src/root.js
+1
-28
@@ -1,34 +1,7 @@
1
import React from 'react'
2
import {MDXProvider} from '@mdx-js/react'
3
import {ThemeProvider} from './theme'
4
-import * as Components from './mdx'
5
-
6
-const components = {
7
- a: Components.Link,
8
- pre: ({children}) => children,
9
- code: Components.Code,
10
- table: Components.Table,
11
- img: Components.Image,
12
- p: Components.Paragraph,
13
- hr: Components.HorizontalRule,
14
- blockquote: Components.Blockquote,
15
- h1: Components.H1,
16
- h2: Components.H2,
17
- h3: Components.H3,
18
- h4: Components.H4,
19
- h5: Components.H5,
20
- h6: Components.H6,
21
- ul: Components.UnorderedList,
22
- ol: Components.OrderedList,
23
- dl: Components.DescriptionList,
24
- Index: Components.Index,
25
- Note: Components.Note,
26
- Prompt: Components.Prompt,
27
- PromptReply: Components.PromptReply,
28
- Screenshot: Components.Screenshot,
29
- Link: Components.Link,
30
- YouTube: Components.YouTube,
31
-}
4
+import * as components from './mdx'
5
6
const RootElement = ({element}) => (
7
<MDXProvider components={components}>
src/shared.js
+5
-5
@@ -1,5 +1,5 @@
1
import React from 'react'
2
-import {Link, Note, Screenshot} from './mdx'
2
+import {Link, Note, Screenshot, ul as Ul} from './mdx'
3
4
const shared = {
5
/* User login */
@@ -84,7 +84,7 @@ const shared = {
84
},
85
'connect-to-accounts': {
86
text: (
87
- <ul>
87
+ <Ul>
88
<li>
89
If you have previously linked a GitHub account to your npm account, select <strong>Connect to GitHub</strong>.
90
This will help our support team verify your account.
@@ -93,7 +93,7 @@ const shared = {
93
If you have previously linked a Twitter account to your npm account, select{' '}
94
<strong>Connect to Twitter</strong>. This will help our support team verify your account.
95
</li>
96
- </ul>
96
+ </Ul>
97
),
98
},
99
'submit-support-ticket': {
@@ -210,11 +210,11 @@ const shared = {
210
text: (
211
<>
212
In the billing information dialog box, enter your billing information:
213
- <ul>
213
+ <Ul>
214
<li>Email: the email address used for the billing contact</li>
215
<li>Name: the name on the credit card used to pay</li>
216
<li>Street, City, ZIP Code, Country: the billing address associated with the credit card</li>
217
- </ul>
217
+ </Ul>
218
</>
219
),
220
image: <Screenshot src="/shared/billing-form.png" alt="Screenshot of billing form" />,