The npm documentation

Edward Thomson committed Sep 22, 2020 at 23:58 UTC 64a3fe870093d9fec04bf941aa676dc525bbd5bc
424 files changed +82853
.github/workflows/publish.yml new
+62
@@ -0,0 +1,62 @@
1 +name: Publish
2 +
3 +on:
4 + push:
5 + branches: [ main ]
6 +
7 +jobs:
8 + build:
9 + runs-on: ubuntu-latest
10 + steps:
11 + # Check out the content (source branch)
12 + - name: Check out source
13 + uses: actions/checkout@v2
14 +
15 + # Check out the `dist` branch into the `public` directory.
16 + - name: Check out documentation branch
17 + uses: actions/checkout@v2
18 + with:
19 + ref: 'dist'
20 + path: 'public'
21 +
22 + - name: Use Node.js
23 + uses: actions/setup-node@v1
24 + with:
25 + node-version: 12.x
26 +
27 + # Update npm to v7
28 + - name: Update npm v7
29 + run: npm install -g npm@latest
30 +
31 + # Build the site
32 + - name: Install npm packages
33 + run: npm install
34 + - name: Build documentation
35 + run: npm run build
36 + env:
37 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 +
39 + # Check for changes; this avoids publishing a new change to the
40 + # dist branch when we made a change to (for example) a unit test.
41 + # If there were changes made in the publish step above, then this
42 + # will set the variable `has_changes` to `1` for subsequent steps.
43 + - name: Check for changes
44 + id: status
45 + run: |
46 + if [ -n "$(git status --porcelain)" ]; then
47 + echo "::set-output name=has_changes::1"
48 + fi
49 + working-directory: public
50 +
51 + # Commit the changes to the dist branch and push the changes up to
52 + # GitHub. (Replace the name and email address with your own.)
53 + # This step only runs if the previous step set `has_changes` to `1`.
54 + - name: Publish documentation
55 + run: |
56 + git add --verbose .
57 + git config user.name 'CI User'
58 + git config user.email 'noreply@npmjs.com'
59 + git commit -m 'Update from CI'
60 + git push origin dist
61 + if: steps.status.outputs.has_changes == '1'
62 + working-directory: public
.github/workflows/stage-pull-request.yml new
+59
@@ -0,0 +1,59 @@
1 +name: Stage Pull Request
2 +
3 +on:
4 + pull_request_target:
5 + types: [opened, synchronize, reopened, closed]
6 + workflow_dispatch:
7 + inputs:
8 + pr_number:
9 + description: 'Pull Request Number'
10 + required: true
11 +
12 +env:
13 + staging_repo: 'npm/docs-staging'
14 +
15 +jobs:
16 + stage_pr:
17 + runs-on: ubuntu-latest
18 + steps:
19 + - run: |
20 + echo "${{ toJson(github) }}"
21 + - name: Identify pull request
22 + id: pull_request
23 + run: |
24 + NOTIFY="false"
25 +
26 + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
27 + PR_NUMBER="${{ github.event.inputs.pr_number }}"
28 + elif [ "${{ github.event_name }}" = "pull_request_target" ]; then
29 + PR_NUMBER="${{ github.event.pull_request.number }}"
30 +
31 + if [ "${{github.event.action}}" = "opened" ]; then
32 + NOTIFY="true"
33 + fi
34 + fi
35 +
36 + if [ "$PR_NUMBER" = "" ]; then
37 + echo "::error::Unknown event type or unset pull request number"
38 + exit 1
39 + fi
40 +
41 + echo "Building pull request ${PR_NUMBER}"
42 +
43 + curl -f -X POST -u ":${{ secrets.NPM_DOCS_TOKEN }}" \
44 + -H "Accept: application/vnd.github.everest-preview+json" \
45 + -H "Content-Type: application/json" \
46 + --data "{ \"event_type\": \"publish_pr\", \"client_payload\": { \"pr_number\":\"$PR_NUMBER\", \"notify\":\"$NOTIFY\" } }" \
47 + https://api.github.com/repos/${{ env.staging_repo }}/dispatches
48 +
49 +# - name: Identify pull request
50 +# if: github.event_name == "pull_request_target"
51 +# uses: actions/github-script@v3
52 +# with:
53 +# script: |
54 +# github.issues.createComment({
55 +# issue_number: context.issue.number,
56 +# owner: context.repo.owner,
57 +# repo: context.repo.repo,
58 +# body: "👋 Thanks for opening a pull request! We're building a staging
59 +# })
.github/workflows/update-cli.yml new
+72
@@ -0,0 +1,72 @@
1 +name: Update CLI
2 +
3 +on:
4 + schedule:
5 + - cron: "14 2 * * *"
6 + workflow_dispatch:
7 +
8 +jobs:
9 + build:
10 + runs-on: ubuntu-latest
11 + steps:
12 + # Check out the content (source branch). Use a deploy key so that
13 + # when we push changes, it will trigger the documentation update
14 + # workflow run that runs on: push. (Using the GitHub token would
15 + # not run the workflow to prevent infinite recursion.)
16 + - name: Check out source
17 + uses: actions/checkout@v2
18 + with:
19 + ssh-key: ${{ secrets.CLI_DEPLOY_KEY }}
20 +
21 + # Make sure that the new content didn't break the build. We don't
22 + # want to promote anything that would breaks.
23 + - name: Use Node.js
24 + uses: actions/setup-node@v1
25 + with:
26 + node-version: 12.x
27 +
28 + # Update npm to v7
29 + - name: Update npm v7
30 + run: npm install -g npm@latest
31 +
32 + # Add the CLI documentation to the content directory.
33 + - name: Install npm packages
34 + run: npm install
35 + - name: Fetch latest documentation
36 + run: node cli/cli_fetch.js
37 + - name: Import documentation
38 + run: node cli/cli_import.js
39 +
40 + # Check for changes; this avoids publishing a new change to the
41 + # dist branch when we made a change to (for example) a unit test.
42 + # If there were changes made in the publish step above, then this
43 + # will set the variable `has_changes` to `1` for subsequent steps.
44 + - name: Check for changes
45 + id: status
46 + run: |
47 + if [ -n "$(git status --porcelain)" ]; then
48 + echo "::set-output name=has_changes::1"
49 + fi
50 +
51 + # Commit the changes to the dist branch and push the changes up to
52 + # GitHub. (Replace the name and email address with your own.)
53 + # This step only runs if the previous step set `has_changes` to `1`.
54 + - name: Check in documentation
55 + run: |
56 + git add --verbose .
57 + git config user.name 'CI User'
58 + git config user.email 'noreply@npmjs.com'
59 + git commit -m 'CLI documentation update from CI'
60 + if: steps.status.outputs.has_changes == '1'
61 +
62 + # Before we publish the changes, ensure the site builds so that we
63 + # don't break the main branch.
64 + - name: Build documentation
65 + run: npm run build
66 + env:
67 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68 +
69 + # Publish the documentation updates.
70 + - name: Publish documentation
71 + run: git push origin main
72 + if: steps.status.outputs.has_changes == '1'
.gitignore new
+91
@@ -0,0 +1,91 @@
1 +# Logs
2 +logs
3 +*.log
4 +npm-debug.log*
5 +yarn-debug.log*
6 +yarn-error.log*
7 +lerna-debug.log*
8 +
9 +# Diagnostic reports (https://nodejs.org/api/report.html)
10 +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 +
12 +# Runtime data
13 +pids
14 +*.pid
15 +*.seed
16 +*.pid.lock
17 +
18 +# Directory for instrumented libs generated by jscoverage/JSCover
19 +lib-cov
20 +
21 +# Coverage directory used by tools like istanbul
22 +coverage
23 +*.lcov
24 +
25 +# nyc test coverage
26 +.nyc_output
27 +
28 +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29 +.grunt
30 +
31 +# Bower dependency directory (https://bower.io/)
32 +bower_components
33 +
34 +# node-waf configuration
35 +.lock-wscript
36 +
37 +# Compiled binary addons (https://nodejs.org/api/addons.html)
38 +build/Release
39 +
40 +# Dependency directories
41 +node_modules/
42 +jspm_packages/
43 +
44 +# TypeScript v1 declaration files
45 +typings/
46 +
47 +# TypeScript cache
48 +*.tsbuildinfo
49 +
50 +# Optional npm cache directory
51 +.npm
52 +
53 +# Optional eslint cache
54 +.eslintcache
55 +
56 +# Optional REPL history
57 +.node_repl_history
58 +
59 +# Output of 'npm pack'
60 +*.tgz
61 +
62 +# Yarn Integrity file
63 +.yarn-integrity
64 +
65 +# dotenv environment variables file
66 +.env
67 +.env.test
68 +
69 +# parcel-bundler cache (https://parceljs.org/)
70 +.cache
71 +
72 +# next.js build output
73 +.next
74 +
75 +# nuxt.js build output
76 +.nuxt
77 +
78 +# vuepress build output
79 +.vuepress/dist
80 +
81 +# Serverless directories
82 +.serverless/
83 +
84 +# FuseBox cache
85 +.fusebox/
86 +
87 +# DynamoDB Local files
88 +.dynamodb/
89 +
90 +# Gatsby
91 +public/
.gitmodules new
+6
@@ -0,0 +1,6 @@
1 +[submodule "cli/v6"]
2 + path = cli/v6
3 + url = https://github.com/npm/cli
4 +[submodule "cli/v7"]
5 + path = cli/v7
6 + url = https://github.com/npm/cli
README.md new
+235
@@ -0,0 +1,235 @@
1 +# npm Documentation
2 +
3 +[![Publish](https://github.com/npm/documentation/actions/workflows/publish.yml/badge.svg)](https://github.com/npm/documentation/actions/workflows/publish.yml)
4 +
5 +This is the documentation for
6 +[https://docs.npmjs.com/](https://docs.npmjs.com/).
7 +
8 +### Table of Contents
9 +
10 +* [Quick start](#quick-start)
11 +* [Running locally](#running-locally)
12 +* [Updating content](#updating-content)
13 +* [Navigation](#navigation)
14 +* [CLI](#cli)
15 +* [Deploying changes](#deploying-changes)
16 +* [Theme](#theme)
17 +
18 +## Quick start
19 +
20 +1. `npm install` to download gatsby, our theme, and the dependencies
21 +2. `npm run develop`: starts the test server at `http://localhost:8000`.
22 +3. Update the content - it's Mdx, which is like markdown - in the `content`
23 + directory.
24 +4. Review your content at `http://localhost:8000`. (Gatsby watches the
25 + filesystem and will reload your content changes immediately.)
26 +5. Once you're happy, commit it and open a pull request at
27 + https://github.com/npm/documentation.
28 +6. A CI workflow run will publish your PR to the staging documentation
29 + site at https://docs-staging.npmjs.com/.
30 +8. Once the content is reviewed, merge the pull request. That will
31 + [deploy the site](https://github.com/npm/documentation/actions/workflows/publish.yml).
32 +
33 +## Running locally
34 +
35 +First, `npm install` the dependencies. This will install gatsby, et al.
36 +
37 +Next, `npm run develop` to start the test server to view your changes.
38 +The gatsby server will be started on port 8000. You can navigate to
39 +`http://localhost:8000` to view the site live.
40 +
41 +**Gatsby will watch your filesystem looking for updates.** Any content
42 +changes you make should be reflected in the site immediately.
43 +
44 +## Updating content
45 +
46 +### Documentation content
47 +
48 +The documentation content lives in the `content` directory, and is
49 +markdown. (Actually, [Mdx](https://mdxjs.com/), a sort of reactive
50 +markdown.)
51 +
52 +### Static content (images)
53 +
54 +Static content lives in the `static` directory. Since most of the
55 +static content is screenshots, you can use the `Screenshot` component
56 +to reference them, which is an extension of the `Img` component that
57 +is configured for the docs site. For example, an image living as
58 +`static/organizations/managing-temas/team-members.png` would be
59 +referenced as:
60 +
61 +```
62 +<Screenshot src="/organizations/managing-teams/team-members.png" alt="Screenshot of the team members button" />
63 +```
64 +
65 +(Note the `alt` tag, it is mandatory.)
66 +
67 +### "Shared" content
68 +
69 +There are various places where we want to share content between
70 +pages, to prevent copy-pasta. For example, we display a screenshot
71 +of the user login dialog repeatedly. Therefore this shared content
72 +is defined in `src/shared.js`, and includes a literal Mdx snippet.
73 +
74 +For example, `user-login` is defined with `text` and `image`
75 +properties:
76 +
77 +```js
78 +'user-login': {
79 + 'text': (<><Link href="https://www.npmjs.com/login">Log in</Link> to npm
80 + with your user account.</>),
81 + 'image': (<Screenshot src="/shared/user-login.png" alt="Screenshot of np
82 +m login dialog" />)
83 +},
84 +```
85 +
86 +Since Mdx is reactive, you can import the shared data at the top of the
87 +file, just beneath your frontmatter:
88 +
89 +```
90 +---
91 +title: Using shared content
92 +---
93 +import shared form '../../../src/shared.js'
94 +```
95 +
96 +And then reference the shared content within `<>`:
97 +
98 +```
99 +To login, <>{shared['user-login'].text}</>
100 +```
101 +
102 +### URLs
103 +
104 +Note that for backward compatibility reasons, the on-disk paths
105 +are not precisely identical to the URLs for the documentation.
106 +To keep URLs expressive but still short, intermediate directories
107 +are removed from a page's URL.
108 +
109 +You can see this navigating through the documentation hierarchy:
110 +if you visit the "Packages and modules" page, you'll navigate to
111 +`https://docs.npmjs.com/packages-and-modules`.
112 +
113 +There's then a folder beneath that, "Contributing packages to the
114 +registry", which is (sensibly) at
115 +`https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry`.
116 +
117 +You might (understandably) expect the page "Creating Node.js modules"
118 +to be URL-wise beneath `contributing-packages-to-the-registry`, but
119 +unfortunately, you would be wrong. To keep URLs short, the intermediate
120 +folder paths are removed from pages, so "Creating Node.js modules" becomes
121 +`https://docs.npmjs.com/creating-node-js-modules`.
122 +
123 +If you have only a URL and want to find where it lives on disk, you can
124 +consult the left-hand navigation on the site.
125 +
126 +<img width="353" alt="Screen Shot 2021-03-02 at 10 06 19" src="https://user-images.githubusercontent.com/1130014/109632522-04494980-7b3f-11eb-8b07-9e7bb992872f.png">
127 +
128 +You can also use `find` from within the `content` directory. For example:
129 +
130 +```
131 +find . -iname creating-node-js-modules\* -print
132 +```
133 +
134 +### Frontmatter
135 +
136 +The content pages should include
137 +[frontmatter](https://jekyllrb.com/docs/front-matter/).
138 +
139 +* `title`: the page's title (string); required
140 +* `redirect_from`: any URLs on the site that will be redirected to this page (array of strings)
141 +
142 +## Navigation
143 +
144 +The site's navigation (on the left-hand sidebar of the site) is controlled
145 +by `src/nav-base.yml`. If you add or remove a page from the site, you'll
146 +also want to add or remove it from the navigation configuration.
147 +
148 +Since the main documentation's navigation is combined with the CLI
149 +documentation's navigation to produce the overall navigation, you'll
150 +need to run the CLI update script (`cli/cli_import.js`) to combine
151 +the navigation. (More on that below.)
152 +
153 +**Todo:** we should isolate the navigational elements into their own
154 +script that runs as part of gatsby's `onPreBuild` phase.
155 +
156 +## CLI
157 +
158 +The documentation for the [npm cli](https://github.com/npm/cli) is not
159 +modified in this repository. Instead, the canonical location for it
160 +is in the [npm/cli](https://github.com/npm/cli) repository. Modifications
161 +to those files are automatically included here for completeness.
162 +
163 +**Pull requests to CLI documentation in this repository will be closed.**
164 +
165 +### Updating CLI Content
166 +
167 +Since the CLI documentation content lives in the [npm/cli
168 +repo](https://github.com/npm/cli), there is a [GitHub Actions
169 +workflow](https://github.com/npm/documentation/actions/workflows/update-cli.yml)
170 +that pulls documentation updates from the CLI into this repository.
171 +This is done nightly.
172 +
173 +This process can, of course, be done manually. This may be useful for
174 +editing its behavior or debugging.
175 +
176 +1. Review the configuration
177 + The `cli/releases.json` configures how the CLI documentation is
178 + included. It is an array of documentation versions, each having
179 + the following configuration:
180 +
181 + * `id`: A short identifier for the documentation version, eg
182 + `v6` or `v7`. This corresponds to a directory containing a
183 + version of the CLI repository (using a submodule). This will also
184 + be used as the output folder in the content.
185 + * `version`: The full semantic version number (eg `6.0.0`).
186 + * `title`: A long description of the version information. This will
187 + be used in the version picker,.
188 + * `branch`: The branch name for the version. This will be used to
189 + fetch the latest version of the documentation from GitHub.
190 +
191 +2. Fetch the latest content from the CLI repository
192 + Run `cli/cli_fetch.js` to download the submodules. This will
193 + initialize the submodules, fetch each one, and update them to
194 + the latest branch commit on the remote.
195 +
196 +3. Import the CLI's content into the main repository
197 + Run `cli/cli_import.js` to import the CLI's documentation from each
198 + directory. This will take the content in each submodule's
199 + `docs/content` directory, perform any necessary translations (like
200 + adding historical redirects) and putting it in this repository's
201 + `content` directory. In addition, it will take the `docs/nav.yml`
202 + and include it in this repository's navigation.
203 +
204 +## Reviewing changes
205 +
206 +The staging docs site (https://docs-staging.npmjs.com/) is published
207 +from a set of GitHub actions workflows. Since it is a separate site
208 +(with a separate GitHub Pages instance), the staging site lives in a
209 +[separate GitHub repository](https://github.com/npm/docs-staging).
210 +As a result when a pull request is opened in _this_ repository, we
211 +send a repository dispatch event to the `docs-staging` repository.
212 +
213 +A GitHub Actions workflow run in that repository will then build the
214 +pull request and publish the staging site for review.
215 +
216 +## Deploying changes
217 +
218 +The docs site (https://docs.npmjs.com/) is published from a
219 +[GitHub Actions workflow](https://github.com/npm/documentation/actions/workflows/publish.yml)
220 +on any push into the main branch. That means that the workflow for
221 +updating the site is:
222 +
223 +1. Make your changes locally, review them, commit them.
224 +2. Open a pull request for review
225 +3. Merge that pull request
226 +
227 +On step three, your changes will be published live! 🎉
228 +
229 +## Theme
230 +
231 +The gatsby theme used here is "doctornpm" - a variation of
232 +[doctocat](https://github.com/primer/doctocat) with some theme changes
233 +for npm's design language and additional components to support multiple
234 +versions of the CLI documentation.
235 +
cli/cli_fetch.js new
+55
@@ -0,0 +1,55 @@
1 +#!/usr/bin/env node
2 +// cli_fetch: download cli documentation updates from the cli repo
3 +//
4 +// This script will read the `releases.json` file to understand which
5 +// versions of the CLI should be updated, then fetch the submodule updates
6 +// for the specified branches.
7 +//
8 +// The `releases.json` file includes an array of versions:
9 +//
10 +// `id`: A short identifier for the version, eg `v6` or `v7`. This
11 +// is the directory that contains a submodule to update.
12 +// `branch`: The branch name for the version. This is the branch that
13 +// will be fetched.
14 +
15 +const path = require('path');
16 +const child_process = require('child_process');
17 +
18 +const config = require('./releases.json');
19 +
20 +const docsPath = __dirname;
21 +
22 +console.log(`# Updating CLI documentation...`);
23 +console.log(``);
24 +
25 +console.log(`# Configuring submodules...`);
26 +git([ "submodule", "update", "--init" ]);
27 +
28 +for (version of config) {
29 + console.log(``);
30 +
31 + console.log(`# Fetching updates for ${version.id}...`);
32 + console.log(`#`);
33 + git([ "fetch", "--all" ], version.id);
34 +
35 + console.log(``);
36 +
37 + console.log(`# Updating the ${version.branch} branch for ${version.id}...`);
38 + console.log(`#`);
39 + git([ "reset", "--hard", `origin/${version.branch}` ], version.id);
40 +}
41 +
42 +function git(args, version_id) {
43 + const cwd = version_id ? path.join(docsPath, version_id) : docsPath;
44 +
45 + const result = child_process.spawnSync("git", args, { cwd: cwd, stdio: 'inherit' });
46 +
47 + if (result.error) {
48 + throw result.error;
49 + }
50 +
51 + if (result.status != 0) {
52 + console.error(`git: process exited with status ${result.status}`);
53 + process.exit(result.status);
54 + }
55 +}
cli/cli_import.js new
+414
@@ -0,0 +1,414 @@
1 +#!/usr/bin/env node
2 +// cli_import: include the npm cli documentation into the main docs
3 +//
4 +// This script will:
5 +// 1. Read the `releases.json` file to understand which versions of the
6 +// CLI should be updated. The `releases.json` should contain an array
7 +// of versions, each with the following information:
8 +//
9 +// `id`: A short identifier for the version, eg `v6` or `v7`. This
10 +// will be used as the input folder for the documentation; an
11 +// instance of the CLI should reside at that path beneath the
12 +// `cli` directory. (Submodules are a good idea here.) It
13 +// will also be used as the output folder in the main content.
14 +// `version`: The full major semantic version number (eg `6.0.0`).
15 +// This will be used in examples in the documentation.
16 +// `title`: A long description of the version information. This will
17 +// be used in the version picker,.
18 +// `branch`: The branch name for the version.
19 +//
20 +// 2. Read each directory specified in the `releases.json`. The data in
21 +// `docs/content` will be read. Each file will be translated in order
22 +// to add `redirects` (as `redirect_from` frontmatter). Other
23 +// `translations` may be specified to make the data suitable for the
24 +// main documentation from the CLI documentation. Finally, metadata
25 +// will be added so that the gatsby theme knows the GitHub repository
26 +// information for the content.
27 +//
28 +// 3. The CLI's navigation (in `docs/nav.yml`) will be added to the
29 +// main site's base navigation (in `../src/nav-base.yml`) to produce
30 +// the resulting gatsby / doctornpm navigation (in
31 +// `../src/gatsby-theme-doctornpm/nav.yml`).
32 +
33 +const fs = require('fs');
34 +const path = require('path');
35 +const config = require('./releases.json');
36 +const yaml = require('yaml');
37 +const mkdirp = require('mkdirp');
38 +
39 +const githubRepo = 'npm/cli';
40 +const githubUrl = 'https://github.com/npm/cli';
41 +
42 +const docsPath = path.dirname(__dirname);
43 +const inputPath = path.join(docsPath, 'cli');
44 +const outputPath = path.join(docsPath, 'content');
45 +
46 +const baseNavFile = path.join(docsPath, 'src', 'nav-base.yml');
47 +const outputNavFile = path.join(docsPath, 'src', 'gatsby-theme-doctornpm', 'nav.yml');
48 +
49 +const cliTitle = 'npm CLI';
50 +const cliUrl = '/cli';
51 +
52 +const cliNavFile = path.join('docs', 'nav.yml');
53 +const cliContentPath = path.join('docs', 'content');
54 +
55 +const indexMarkdown = `<Index depth="1" />`;
56 +
57 +const translations = {
58 + 'index.mdx': {
59 + 'frontmatter': { 'title': 'CLI documentation' },
60 + 'mdx': indexMarkdown,
61 + },
62 + 'commands/index.mdx': {
63 + 'frontmatter': { 'title': 'CLI commands' },
64 + 'mdx': indexMarkdown,
65 + },
66 + 'configuring-npm/index.mdx': {
67 + 'frontmatter': { 'title': 'Configuring npm' },
68 + 'mdx': indexMarkdown,
69 + },
70 + 'using-npm/index.mdx': {
71 + 'frontmatter': { 'title': 'Using npm' },
72 + 'mdx': indexMarkdown,
73 + },
74 +};
75 +
76 +const redirects = {
77 + 'index.mdx': [
78 + '/cli-documentation',
79 + ],
80 + 'commands/index.mdx': [
81 + '/cli-documentation/cli',
82 + '/cli-documentation/cli-commands'
83 + ],
84 + 'commands/npm-access.md': [
85 + '/cli-documentation/access',
86 + ],
87 + 'commands/npm-install.md': [
88 + '/cli-documentation/install',
89 + ],
90 + 'configuring-npm/index.mdx': [
91 + '/cli-documentation/configuring-npm',
92 + '/cli-documentation/files',
93 + ],
94 + 'configuring-npm/folders.md': [
95 + '/files/folders',
96 + '/files/folders.html',
97 + ],
98 + 'configuring-npm/npmrc.md': [
99 + '/cli-documentation/files/npmrc',
100 + '/files/npmrc',
101 + '/files/npmrc.html'
102 + ],
103 + 'configuring-npm/package-json.md': [
104 + '/configuring-npm/package.json',
105 + '/creating-a-packge-json-file',
106 + '/files/package.json',
107 + '/files/package.json.html',
108 + ],
109 + 'configuring-npm/package-lock-json.md': [
110 + '/files/package-lock.json',
111 + '/files/package-lock.json.html',
112 + ],
113 + 'configuring-npm/package-locks.md': [
114 + '/files/package-locks',
115 + '/files/package-locks.html',
116 + ],
117 + 'configuring-npm/shrinkwrap-json.md': [
118 + '/files/shrinkwrap.json',
119 + '/files/shrinkwrap.json.html',
120 + ],
121 + 'using-npm/index.mdx': [
122 + 'cli-documentation/misc',
123 + 'cli-documentation/using-npm',
124 + '/misc/index.html',
125 + ],
126 + 'using-npm/removal.md': [
127 + '/misc/removing-npm',
128 + '/misc/removing-npm.html',
129 + ],
130 + 'using-npm/scope.md': [
131 + '/using-npm/npm-scope',
132 + ],
133 +};
134 +
135 +const pagesForVersion = { }
136 +
137 +config.forEach((version) => {
138 + pagesForVersion[version.id] = copyDocs(version);
139 +});
140 +
141 +updateNav(config);
142 +ensurePagesLinked(config);
143 +
144 +function updateNav(config) {
145 + const nav = yaml.parse(fs.readFileSync(baseNavFile, 'utf8'));
146 + const variants = new Array();
147 +
148 + config.forEach((version) => {
149 + variants.push(readNavForVersion(version));
150 + });
151 +
152 + nav.push({
153 + "title": cliTitle,
154 + "shortName": "CLI",
155 + "url": cliUrl,
156 + "variants": variants
157 + });
158 +
159 + const output = '# This file is automatically generated. Do not edit.\n' +
160 + '# For registry content, edit `src/nav-base.yml in this repository.\n' +
161 + '# For CLI content, edit `docs/nav.yml` in https://github.com/npm/cli.\n' +
162 + '\n' +
163 + yaml.stringify(nav);
164 +
165 + fs.writeFileSync(outputNavFile, output);
166 +}
167 +
168 +function readNavForVersion(config) {
169 + const navInputFile = path.join(inputPath, config.id, cliNavFile);
170 + const children = yaml.parse(fs.readFileSync(navInputFile, 'utf8'));
171 +
172 + rewriteUrls(config, children);
173 +
174 + return {
175 + "title": config.title,
176 + "shortName": config.id,
177 + "url": `${cliUrl}/${config.id}`,
178 + "default": config.default ? true : false,
179 + "children": children
180 + };
181 +}
182 +
183 +function rewriteUrls(config, nodes) {
184 + nodes.forEach((n) => {
185 + const path = n.url.startsWith('/') ? n.url.substring(1) : n.url;
186 + const data = translate(config, { path: path });
187 +
188 + n.url = `${cliUrl}/${config.id}/${data.path}`;
189 +
190 + if (n.children) {
191 + rewriteUrls(config, n.children);
192 + }
193 + });
194 +}
195 +
196 +function translate(config, data) {
197 + const translation = translations[data.path] ? translations[data.path] : { };
198 + let matches;
199 +
200 + if (!data.frontmatter) {
201 + data.frontmatter = { };
202 + }
203 +
204 + if (data.path.match(/^index(?:\.md(x)?)?/)) {
205 + if (config.default && data.frontmatter) {
206 + data.frontmatter['redirect_from'] = [
207 + `/cli`,
208 + ];
209 + }
210 + }
211 +
212 + else if ((matches = data.path.match(/(?:(.*)\/)index(?:\.md(x)?)?$/))) {
213 + if (config.default && data.frontmatter) {
214 + const section = matches[1];
215 +
216 + data.frontmatter['redirect_from'] = [
217 + `${section}`,
218 + `/cli/${section}`,
219 + ];
220 + }
221 + }
222 +
223 + else if (data.path.match(/^commands\/npm(\.md(x)?)?$/)) {
224 + if (config.default && data.frontmatter) {
225 + data.frontmatter['redirect_from'] = [
226 + `/cli/npm`,
227 + `/cli/npm.html`,
228 + `/cli/commands/npm`,
229 + `/cli-commands/npm`,
230 + `/cli-commands/npm.html`,
231 + ];
232 + }
233 + }
234 +
235 + else if ((matches = data.path.match(/^commands\/npm-(.*?)(\.md(?:x)?)?$/)) != null) {
236 + const command = matches[1];
237 + const extension = matches[2] ? matches[2] : '';
238 +
239 + if (config.default && data.frontmatter) {
240 + data.frontmatter['redirect_from'] = [
241 + `/cli/${command}`,
242 + `/cli/${command}.html`,
243 + `/cli/commands/${command}`,
244 + `/cli-commands/${command}`,
245 + `/cli-commands/${command}.html`,
246 + `/cli-commands/npm-${command}`,
247 + ];
248 + }
249 + }
250 +
251 + else if ((matches = data.path.match(/^(configuring-npm)\/(.*?)(\.md(?:x)?)?$/)) != null) {
252 + const path = matches[1];
253 + const page = matches[2];
254 + const extension = matches[3] ? matches[3] : '';
255 +
256 + if (config.default && data.frontmatter) {
257 + data.frontmatter['redirect_from'] = [
258 + `/${path}/${page}`,
259 + `/${path}/${page}.html`,
260 + ];
261 + }
262 + }
263 +
264 + else if ((matches = data.path.match(/^(using-npm)\/(.*?)(\.md(?:x)?)?$/)) != null) {
265 + const path = matches[1];
266 + const page = matches[2];
267 + const extension = matches[3] ? matches[3] : '';
268 +
269 + if (config.default && data.frontmatter) {
270 + data.frontmatter['redirect_from'] = [
271 + `/${path}/${page}`,
272 + `/${path}/${page}.html`,
273 + `/misc/${page}`,
274 + `/misc/${page}.html`,
275 + ];
276 + }
277 + }
278 +
279 + if (redirects[data.path] && config.default) {
280 + if (!data.frontmatter['redirect_from']) {
281 + data.frontmatter['redirect_from'] = { }
282 + }
283 +
284 + Array.prototype.push.apply(data.frontmatter['redirect_from'], redirects[data.path]);
285 + }
286 +
287 + if (data.frontmatter) {
288 + data.frontmatter['github_repo'] = `${githubRepo}`;
289 + data.frontmatter['github_branch'] = `${config.branch}`;
290 + data.frontmatter['github_path'] = `${cliContentPath}/${data.path}`;
291 + }
292 +
293 + if (data.frontmatter && translation.frontmatter) {
294 + for (let name of Object.keys(translation.frontmatter)) {
295 + data.frontmatter[name] = translation.frontmatter[name];
296 + }
297 + }
298 +
299 + if ((data.mdx || !data.contents) && translation.mdx) {
300 + data.mdx = translation.mdx;
301 + }
302 + else if (data.mdx) {
303 + function replacer(matches, p1, p2) {
304 + return `[${p1}](/cli/${config.id}/${p2})`;
305 + }
306 +
307 + data.mdx = data.mdx.replace(/@VERSION@/g, config.version)
308 + .replace(/\[([^\]]+)\]\(\/(commands\/[^)]+)\)/g, replacer)
309 + .replace(/\[([^\]]+)\]\(\/(configuring-npm\/[^)]+)\)/g, replacer)
310 + .replace(/\[([^\]]+)\]\(\/(using-npm\/[^)]+)\)/g, replacer);
311 + }
312 +
313 + return data;
314 +}
315 +
316 +function ensurePagesLinked(config) {
317 + const nav = yaml.parse(fs.readFileSync(outputNavFile, 'utf8'));
318 + let pages = { }
319 + let success = true
320 +
321 + Object.values(pagesForVersion).forEach((p) => {
322 + p.forEach((page) => {
323 + const file = path.join(path.sep, page).replace(/\.md$/, '');
324 + pages[file] = true;
325 + })
326 + })
327 +
328 + // identify nav items that aren't pages
329 + walkNavigation(nav, (n) => {
330 + if (!pages[n.url]) {
331 + console.log(`warning: ${n.url} included in navigation but does not exist`);
332 + success = false;
333 + }
334 + });
335 +
336 + // identify pages that aren't listed in the nav
337 + walkNavigation(nav, (n) => { delete pages[n.url] });
338 +
339 + Object.keys(pages).filter(p => !p.match("^(.*\/)?index\.md(x)?$")).forEach((page) => {
340 + console.log(`warning: ${page} is not included in navigation`);
341 + success = false;
342 + });
343 +
344 + return success;
345 +}
346 +
347 +function walkNavigation(nodes, fn) {
348 + nodes.forEach((n) => {
349 + if (!n.children && !n.variants && n.url.startsWith('/cli/')) {
350 + fn(n);
351 + }
352 +
353 + if (n.variants) {
354 + walkNavigation(n.variants, fn);
355 + }
356 +
357 + if (n.children) {
358 + walkNavigation(n.children, fn);
359 + }
360 + })
361 +}
362 +
363 +function copyDocs(config, relativedir) {
364 + const contentRoot = path.join(inputPath, config.id, cliContentPath);
365 + const dirPath = relativedir ? path.join(contentRoot, relativedir) : contentRoot;
366 +
367 + let paths = [ ]
368 +
369 + const children = fs.readdirSync(dirPath);
370 +
371 + if (!children.includes("index.md") && !children.includes("index.mdx")) {
372 + children.push("index.mdx");
373 + }
374 +
375 + children.forEach((fn) => {
376 + const relativechild = relativedir ? path.join(relativedir, fn) : fn;
377 + const childpath = path.join(contentRoot, relativechild);
378 + const exists = fs.existsSync(childpath);
379 +
380 + if (exists && fs.lstatSync(childpath).isDirectory()) {
381 + const childpaths = copyDocs(config, relativechild);
382 + paths = paths.concat(childpaths);
383 + }
384 + else {
385 + const contents = exists ? fs.readFileSync(childpath).toString() : null;
386 + const components = contents ? contents.match(/^---\n(.*)\n---\n(.*)/s) : null;
387 + let output;
388 +
389 + let filedata = {
390 + 'path': relativechild,
391 + 'contents': contents,
392 + 'frontmatter': components ? yaml.parse(components[1]) : null,
393 + 'mdx': components ? components[2] : null
394 + };
395 +
396 + filedata = translate(config, filedata);
397 +
398 + if (filedata) {
399 + output = "---\n" + yaml.stringify(filedata.frontmatter) + "---\n" + filedata.mdx;
400 + } else {
401 + output = contents;
402 + }
403 +
404 + const filePath = path.join('cli', config.id, filedata.path);
405 + const outputFilePath = path.join(outputPath, filePath);
406 + mkdirp.sync(path.dirname(outputFilePath));
407 + fs.writeFileSync(outputFilePath, output);
408 +
409 + paths.push(filePath)
410 + }
411 + });
412 +
413 + return paths;
414 +}
cli/releases.json new
+15
@@ -0,0 +1,15 @@
1 +[
2 + {
3 + "id": "v6",
4 + "version": "6.0.0",
5 + "title": "Version 6.x (Legacy release)",
6 + "branch": "v6-docs"
7 + },
8 + {
9 + "id": "v7",
10 + "version": "7.0.0",
11 + "title": "Version 7.x (Current release)",
12 + "branch": "latest",
13 + "default": true
14 + }
15 +]
cli/v6 new
+1
@@ -0,0 +1 @@
1 +Subproject commit 7ced2b2aa174a6ba6820aceae829e45846596712
cli/v7 new
+1
@@ -0,0 +1 @@
1 +Subproject commit dedb9c8f8b0891b30aa76e60cdb1c4f0f9b2f22f
content/about-npm/index.mdx new
+58
@@ -0,0 +1,58 @@
1 +---
2 +title: About npm
3 +redirect_from: [ /getting-started/what-is-npm ]
4 +---
5 +
6 +npm is the world's largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organizations use npm to manage private development as well.
7 +
8 +npm consists of three distinct components:
9 +
10 +* the website
11 +* the Command Line Interface (CLI)
12 +* the registry
13 +
14 +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 +
16 +The [*CLI*](https://docs.npmjs.com/cli/npm) runs from a terminal, and is how most developers interact with npm.
17 +
18 +The [*registry*](https://docs.npmjs.com/misc/registry) is a large public database of JavaScript software and the meta-information surrounding it.
19 +
20 +
21 +## Use npm to . . .
22 +
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://www.npmjs.com/package/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 +
37 +To get started with npm, you can [create an account](https://www.npmjs.com/signup), which will be available at http://www.npmjs.com/~*yourusername*.
38 +
39 +After you set up an npm account, the next step is to use the command line interface (CLI) to [install npm][install-npm]. We look forward to seeing what you create!
40 +
41 +## Sharing packages and collaborating with others
42 +
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). Or you can sign up for a private instance of npm for your company, called **[npm Enterprise](https://npmjs.com/enterprise)**, so you can develop packages internally that are not shared publicly.
44 +
45 +## Learn more
46 +
47 +To learn more about npm as a product, upcoming new features, and interesting uses of npm, sign up for our newsletter at [npm-weekly](https://www.npmjs.com/npm-weekly), and be sure to follow [@npmjs](https://twitter.com/npmjs) on Twitter.
48 +
49 +For mentoring, tutorials, and learning, visit [node school](https://nodeschool.io). Consider attending or hosting a nodeschool event (usually free!) at a site near you, or use the self-help tools you can find on the site.
50 +
51 +### CLI reference documentation
52 +
53 +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].
54 +
55 +
56 +[orgs-docs]: /organizations
57 +[install-npm]: /downloading-and-installing-node-js-and-npm
58 +[cli-docs]: /cli-documentation
content/cli/v6/commands/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +github_repo: npm/cli
3 +github_branch: v6-docs
4 +github_path: docs/content/commands/index.mdx
5 +title: CLI commands
6 +---
7 +<Index depth="1" />
\ No newline at end of file
content/cli/v6/commands/npm-access.md new
+92
@@ -0,0 +1,92 @@
1 +---
2 +title: npm-access
3 +section: 1
4 +description: Set access level on published packages
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-access.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm access public [<package>]
14 +npm access restricted [<package>]
15 +
16 +npm access grant <read-only|read-write> <scope:team> [<package>]
17 +npm access revoke <scope:team> [<package>]
18 +
19 +npm access 2fa-required [<package>]
20 +npm access 2fa-not-required [<package>]
21 +
22 +npm access ls-packages [<user>|<scope>|<scope:team>]
23 +npm access ls-collaborators [<package> [<user>]]
24 +npm access edit [<package>]
25 +```
26 +
27 +### Description
28 +
29 +Used to set access controls on private packages.
30 +
31 +For all of the subcommands, `npm access` will perform actions on the packages
32 +in the current working directory if no package name is passed to the
33 +subcommand.
34 +
35 +* public / restricted:
36 + Set a package to be either publicly accessible or restricted.
37 +
38 +* grant / revoke:
39 + Add or remove the ability of users and teams to have read-only or read-write
40 + access to a package.
41 +
42 +* 2fa-required / 2fa-not-required:
43 + Configure whether a package requires that anyone publishing it have two-factor
44 + authentication enabled on their account.
45 +
46 +* ls-packages:
47 + Show all of the packages a user or a team is able to access, along with the
48 + access level, except for read-only public packages (it won't print the whole
49 + registry listing)
50 +
51 +* ls-collaborators:
52 + Show all of the access privileges for a package. Will only show permissions
53 + for packages to which you have at least read access. If `<user>` is passed in,
54 + the list is filtered only to teams _that_ user happens to belong to.
55 +
56 +* edit:
57 + Set the access privileges for a package at once using `$EDITOR`.
58 +
59 +### Details
60 +
61 +`npm access` always operates directly on the current registry, configurable
62 +from the command line using `--registry=<registry url>`.
63 +
64 +Unscoped packages are *always public*.
65 +
66 +Scoped packages *default to restricted*, but you can either publish them as
67 +public using `npm publish --access=public`, or set their access as public using
68 +`npm access public` after the initial publish.
69 +
70 +You must have privileges to set the access of a package:
71 +
72 +* You are an owner of an unscoped or scoped package.
73 +* You are a member of the team that owns a scope.
74 +* You have been given read-write privileges for a package, either as a member
75 + of a team or directly as an owner.
76 +
77 +If you have two-factor authentication enabled then you'll have to pass in an
78 +otp with `--otp` when making access changes.
79 +
80 +If your account is not paid, then attempts to publish scoped packages will fail
81 +with an HTTP 402 status code (logically enough), unless you use
82 +`--access=public`.
83 +
84 +Management of teams and team memberships is done with the `npm team` command.
85 +
86 +### See Also
87 +
88 +* [`libnpmaccess`](https://npm.im/libnpmaccess)
89 +* [npm team](/cli/v6/commands/npm-team)
90 +* [npm publish](/cli/v6/commands/npm-publish)
91 +* [npm config](/cli/v6/commands/npm-config)
92 +* [npm registry](/cli/v6/using-npm/registry)
content/cli/v6/commands/npm-adduser.md new
+94
@@ -0,0 +1,94 @@
1 +---
2 +title: npm-adduser
3 +section: 1
4 +description: Add a registry user account
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-adduser.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]
14 +
15 +aliases: login, add-user
16 +```
17 +
18 +### Description
19 +
20 +Create or verify a user named `<username>` in the specified registry, and
21 +save the credentials to the `.npmrc` file. If no registry is specified,
22 +the default registry will be used (see [`config`](/cli/v6/using-npm/config)).
23 +
24 +The username, password, and email are read in from prompts.
25 +
26 +To reset your password, go to <https://www.npmjs.com/forgot>
27 +
28 +To change your email address, go to <https://www.npmjs.com/email-edit>
29 +
30 +You may use this command multiple times with the same user account to
31 +authorize on a new machine. When authenticating on a new machine,
32 +the username, password and email address must all match with
33 +your existing record.
34 +
35 +`npm login` is an alias to `adduser` and behaves exactly the same way.
36 +
37 +### Configuration
38 +
39 +#### registry
40 +
41 +Default: https://registry.npmjs.org/
42 +
43 +The base URL of the npm package registry. If `scope` is also specified,
44 +this registry will only be used for packages with that scope. `scope` defaults
45 +to the scope of the project directory you're currently in, if any. See [`scope`](/cli/v6/using-npm/scope).
46 +
47 +#### scope
48 +
49 +Default: none
50 +
51 +If specified, the user and login credentials given will be associated
52 +with the specified scope. See [`scope`](/cli/v6/using-npm/scope). You can use both at the same time,
53 +e.g.
54 +
55 +```bash
56 + npm adduser --registry=http://myregistry.example.com --scope=@myco
57 +```
58 +
59 +This will set a registry for the given scope and login or create a user for
60 +that registry at the same time.
61 +
62 +#### always-auth
63 +
64 +Default: false
65 +
66 +If specified, save configuration indicating that all requests to the given
67 +registry should include authorization information. Useful for private
68 +registries. Can be used with `--registry` and / or `--scope`, e.g.
69 +
70 +```bash
71 + npm adduser --registry=http://private-registry.example.com --always-auth
72 +```
73 +
74 +This will ensure that all requests to that registry (including for tarballs)
75 +include an authorization header. This setting may be necessary for use with
76 +private registries where metadata and package tarballs are stored on hosts with
77 +different hostnames. See `always-auth` in [`config`](/cli/v6/using-npm/config) for more details on always-auth. Registry-specific configuration of `always-auth` takes precedence over any global configuration.
78 +
79 +#### auth-type
80 +
81 +* Default: `'legacy'`
82 +* Type: `'legacy'`, `'sso'`, `'saml'`, `'oauth'`
83 +
84 +What authentication strategy to use with `adduser`/`login`. Some npm registries
85 +(for example, npmE) might support alternative auth strategies besides classic
86 +username/password entry in legacy npm.
87 +
88 +### See Also
89 +
90 +* [npm registry](/cli/v6/using-npm/registry)
91 +* [npm config](/cli/v6/commands/npm-config)
92 +* [npmrc](/cli/v6/configuring-npm/npmrc)
93 +* [npm owner](/cli/v6/commands/npm-owner)
94 +* [npm whoami](/cli/v6/commands/npm-whoami)
content/cli/v6/commands/npm-audit.md new
+135
@@ -0,0 +1,135 @@
1 +---
2 +title: npm-audit
3 +section: 1
4 +description: Run a security audit
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-audit.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm audit [--json|--parseable|--audit-level=(low|moderate|high|critical)]
14 +npm audit fix [--force|--package-lock-only|--dry-run]
15 +
16 +common options: [--production] [--only=(dev|prod)]
17 +```
18 +
19 +### Examples
20 +
21 +Scan your project for vulnerabilities and automatically install any compatible
22 +updates to vulnerable dependencies:
23 +```bash
24 +$ npm audit fix
25 +```
26 +
27 +Run `audit fix` without modifying `node_modules`, but still updating the
28 +pkglock:
29 +```bash
30 +$ npm audit fix --package-lock-only
31 +```
32 +
33 +Skip updating `devDependencies`:
34 +```bash
35 +$ npm audit fix --only=prod
36 +```
37 +
38 +Have `audit fix` install semver-major updates to toplevel dependencies, not just
39 +semver-compatible ones:
40 +```bash
41 +$ npm audit fix --force
42 +```
43 +
44 +Do a dry run to get an idea of what `audit fix` will do, and _also_ output
45 +install information in JSON format:
46 +```bash
47 +$ npm audit fix --dry-run --json
48 +```
49 +
50 +Scan your project for vulnerabilities and just show the details, without fixing
51 +anything:
52 +```bash
53 +$ npm audit
54 +```
55 +
56 +Get the detailed audit report in JSON format:
57 +```bash
58 +$ npm audit --json
59 +```
60 +
61 +Get the detailed audit report in plain text result, separated by tab characters, allowing for
62 +future reuse in scripting or command line post processing, like for example, selecting
63 +some of the columns printed:
64 +```bash
65 +$ npm audit --parseable
66 +```
67 +
68 +To parse columns, you can use for example `awk`, and just print some of them:
69 +```bash
70 +$ npm audit --parseable | awk -F $'\t' '{print $1,$4}'
71 +```
72 +
73 +Fail an audit only if the results include a vulnerability with a level of moderate or higher:
74 +```bash
75 +$ npm audit --audit-level=moderate
76 +```
77 +
78 +### Description
79 +
80 +The audit command submits a description of the dependencies configured in
81 +your project to your default registry and asks for a report of known
82 +vulnerabilities. The report returned includes instructions on how to act on
83 +this information. The command will exit with a 0 exit code if no
84 +vulnerabilities were found.
85 +
86 +You can also have npm automatically fix the vulnerabilities by running `npm
87 +audit fix`. Note that some vulnerabilities cannot be fixed automatically and
88 +will require manual intervention or review. Also note that since `npm audit fix`
89 +runs a full-fledged `npm install` under the hood, all configs that apply to the
90 +installer will also apply to `npm install` -- so things like `npm audit fix
91 +--package-lock-only` will work as expected.
92 +
93 +By default, the audit command will exit with a non-zero code if any vulnerability
94 +is found. It may be useful in CI environments to include the `--audit-level` parameter
95 +to specify the minimum vulnerability level that will cause the command to fail. This
96 +option does not filter the report output, it simply changes the command's failure
97 +threshold.
98 +
99 +### Content Submitted
100 +
101 +* npm_version
102 +* node_version
103 +* platform
104 +* node_env
105 +* A scrubbed version of your package-lock.json or npm-shrinkwrap.json
106 +
107 +#### Scrubbing
108 +
109 +In order to ensure that potentially sensitive information is not included in
110 +the audit data bundle, some dependencies may have their names (and sometimes
111 +versions) replaced with opaque non-reversible identifiers. It is done for
112 +the following dependency types:
113 +
114 +* Any module referencing a scope that is configured for a non-default
115 + registry has its name scrubbed. (That is, a scope you did a `npm login --scope=@ourscope` for.)
116 +* All git dependencies have their names and specifiers scrubbed.
117 +* All remote tarball dependencies have their names and specifiers scrubbed.
118 +* All local directory and tarball dependencies have their names and specifiers scrubbed.
119 +
120 +The non-reversible identifiers are a sha256 of a session-specific UUID and the
121 +value being replaced, ensuring a consistent value within the payload that is
122 +different between runs.
123 +
124 +### Exit Code
125 +
126 +The `npm audit` command will exit with a 0 exit code if no vulnerabilities were found.
127 +
128 +If vulnerabilities were found the exit code will depend on the `audit-level`
129 +configuration setting.
130 +
131 +### See Also
132 +
133 +* [npm install](/cli/v6/commands/npm-install)
134 +* [package-locks](/cli/v6/configuring-npm/package-locks)
135 +* [config](/cli/v6/using-npm/config)
content/cli/v6/commands/npm-bin.md new
+25
@@ -0,0 +1,25 @@
1 +---
2 +title: npm-bin
3 +section: 1
4 +description: Display npm bin folder
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-bin.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm bin [-g|--global]
13 +```
14 +
15 +### Description
16 +
17 +Print the folder where npm will install executables.
18 +
19 +### See Also
20 +
21 +* [npm prefix](/cli/v6/commands/npm-prefix)
22 +* [npm root](/cli/v6/commands/npm-root)
23 +* [npm folders](/cli/v6/configuring-npm/folders)
24 +* [npm config](/cli/v6/commands/npm-config)
25 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-bugs.md new
+49
@@ -0,0 +1,49 @@
1 +---
2 +title: npm-bugs
3 +section: 1
4 +description: Bugs for a package in a web browser maybe
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-bugs.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm bugs [<pkgname>]
13 +
14 +aliases: issues
15 +```
16 +
17 +### Description
18 +
19 +This command tries to guess at the likely location of a package's
20 +bug tracker URL, and then tries to open it using the `--browser`
21 +config param. If no package name is provided, it will search for
22 +a `package.json` in the current folder and use the `name` property.
23 +
24 +### Configuration
25 +
26 +#### browser
27 +
28 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
29 +* Type: String
30 +
31 +The browser that is called by the `npm bugs` command to open websites.
32 +
33 +#### registry
34 +
35 +* Default: https://registry.npmjs.org/
36 +* Type: url
37 +
38 +The base URL of the npm package registry.
39 +
40 +
41 +### See Also
42 +
43 +* [npm docs](/cli/v6/commands/npm-docs)
44 +* [npm view](/cli/v6/commands/npm-view)
45 +* [npm publish](/cli/v6/commands/npm-publish)
46 +* [npm registry](/cli/v6/using-npm/registry)
47 +* [npm config](/cli/v6/commands/npm-config)
48 +* [npmrc](/cli/v6/configuring-npm/npmrc)
49 +* [package.json](/cli/v6/configuring-npm/package-json)
content/cli/v6/commands/npm-build.md new
+33
@@ -0,0 +1,33 @@
1 +---
2 +title: npm-build
3 +section: 1
4 +description: Build a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-build.md
8 +---
9 +
10 +### Synopsis
11 +```shell
12 +npm build [<package-folder>]
13 +```
14 +
15 +* `<package-folder>`:
16 + A folder containing a `package.json` file in its root.
17 +
18 +### Description
19 +
20 +This is the plumbing command called by `npm link` and `npm install`.
21 +
22 +It should generally be called during installation, but if you need to run it
23 +directly, run:
24 +```bash
25 + npm run-script build
26 +```
27 +
28 +### See Also
29 +
30 +* [npm install](/cli/v6/commands/npm-install)
31 +* [npm link](/cli/v6/commands/npm-link)
32 +* [npm scripts](/cli/v6/using-npm/scripts)
33 +* [package.json](/cli/v6/configuring-npm/package-json)
content/cli/v6/commands/npm-bundle.md new
+20
@@ -0,0 +1,20 @@
1 +---
2 +title: npm-bundle
3 +section: 1
4 +description: REMOVED
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-bundle.md
8 +---
9 +
10 +### Description
11 +
12 +The `npm bundle` command has been removed in 1.0, for the simple reason
13 +that it is no longer necessary, as the default behavior is now to
14 +install packages into the local space.
15 +
16 +Just use `npm install` now to do what `npm bundle` used to do.
17 +
18 +### See Also
19 +
20 +* [npm install](/cli/v6/commands/npm-install)
content/cli/v6/commands/npm-cache.md new
+90
@@ -0,0 +1,90 @@
1 +---
2 +title: npm-cache
3 +section: 1
4 +description: Manipulates packages cache
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-cache.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm cache add <tarball file>
14 +npm cache add <folder>
15 +npm cache add <tarball url>
16 +npm cache add <name>@<version>
17 +
18 +npm cache clean [<path>]
19 +aliases: npm cache clear, npm cache rm
20 +
21 +npm cache verify
22 +```
23 +
24 +### Description
25 +
26 +Used to add, list, or clean the npm cache folder.
27 +
28 +* add:
29 + Add the specified package to the local cache. This command is primarily
30 + intended to be used internally by npm, but it can provide a way to
31 + add data to the local installation cache explicitly.
32 +
33 +* clean:
34 + Delete all data out of the cache folder.
35 +
36 +* verify:
37 + Verify the contents of the cache folder, garbage collecting any unneeded data,
38 + and verifying the integrity of the cache index and all cached data.
39 +
40 +### Details
41 +
42 +npm stores cache data in an opaque directory within the configured `cache`,
43 +named `_cacache`. This directory is a `cacache`-based content-addressable cache
44 +that stores all http request data as well as other package-related data. This
45 +directory is primarily accessed through `pacote`, the library responsible for
46 +all package fetching as of npm@5.
47 +
48 +All data that passes through the cache is fully verified for integrity on both
49 +insertion and extraction. Cache corruption will either trigger an error, or
50 +signal to `pacote` that the data must be refetched, which it will do
51 +automatically. For this reason, it should never be necessary to clear the cache
52 +for any reason other than reclaiming disk space, thus why `clean` now requires
53 +`--force` to run.
54 +
55 +There is currently no method exposed through npm to inspect or directly manage
56 +the contents of this cache. In order to access it, `cacache` must be used
57 +directly.
58 +
59 +npm will not remove data by itself: the cache will grow as new packages are
60 +installed.
61 +
62 +### A note about the cache's design
63 +
64 +The npm cache is strictly a cache: it should not be relied upon as a persistent
65 +and reliable data store for package data. npm makes no guarantee that a
66 +previously-cached piece of data will be available later, and will automatically
67 +delete corrupted contents. The primary guarantee that the cache makes is that,
68 +if it does return data, that data will be exactly the data that was inserted.
69 +
70 +To run an offline verification of existing cache contents, use `npm cache
71 +verify`.
72 +
73 +### Configuration
74 +
75 +#### cache
76 +
77 +Default: `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows.
78 +
79 +The root cache folder.
80 +
81 +### See Also
82 +
83 +* [npm folders](/cli/v6/configuring-npm/folders)
84 +* [npm config](/cli/v6/commands/npm-config)
85 +* [npmrc](/cli/v6/configuring-npm/npmrc)
86 +* [npm install](/cli/v6/commands/npm-install)
87 +* [npm publish](/cli/v6/commands/npm-publish)
88 +* [npm pack](/cli/v6/commands/npm-pack)
89 +* https://npm.im/cacache
90 +* https://npm.im/pacote
content/cli/v6/commands/npm-ci.md new
+66
@@ -0,0 +1,66 @@
1 +---
2 +title: npm-ci
3 +section: 1
4 +description: Install a project with a clean slate
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-ci.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm ci
13 +```
14 +
15 +### Example
16 +
17 +Make sure you have a package-lock and an up-to-date install:
18 +
19 +```bash
20 +$ cd ./my/npm/project
21 +$ npm install
22 +added 154 packages in 10s
23 +$ ls | grep package-lock
24 +```
25 +
26 +Run `npm ci` in that project
27 +
28 +```bash
29 +$ npm ci
30 +added 154 packages in 5s
31 +```
32 +
33 +Configure Travis to build using `npm ci` instead of `npm install`:
34 +
35 +```bash
36 +# .travis.yml
37 +install:
38 +- npm ci
39 +# keep the npm cache around to speed up installs
40 +cache:
41 + directories:
42 + - "$HOME/.npm"
43 +```
44 +
45 +### Description
46 +
47 +This command is similar to [`npm install`](/cli/v6/commands/npm-install), except it's meant to be used in
48 +automated environments such as test platforms, continuous integration, and
49 +deployment -- or any situation where you want to make sure you're doing a clean
50 +install of your dependencies. It can be significantly faster than a regular npm
51 +install by skipping certain user-oriented features. It is also more strict than
52 +a regular install, which can help catch errors or inconsistencies caused by the
53 +incrementally-installed local environments of most npm users.
54 +
55 +In short, the main differences between using `npm install` and `npm ci` are:
56 +
57 +* The project **must** have an existing `package-lock.json` or `npm-shrinkwrap.json`.
58 +* If dependencies in the package lock do not match those in `package.json`, `npm ci` will exit with an error, instead of updating the package lock.
59 +* `npm ci` can only install entire projects at a time: individual dependencies cannot be added with this command.
60 +* If a `node_modules` is already present, it will be automatically removed before `npm ci` begins its install.
61 +* It will never write to `package.json` or any of the package-locks: installs are essentially frozen.
62 +
63 +### See Also
64 +
65 +* [npm install](/cli/v6/commands/npm-install)
66 +* [package-locks](/cli/v6/configuring-npm/package-locks)
content/cli/v6/commands/npm-completion.md new
+41
@@ -0,0 +1,41 @@
1 +---
2 +title: npm-completion
3 +section: 1
4 +description: Tab Completion for npm
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-completion.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +source <(npm completion)
13 +```
14 +
15 +### Description
16 +
17 +Enables tab-completion in all npm commands.
18 +
19 +The synopsis above
20 +loads the completions into your current shell. Adding it to
21 +your ~/.bashrc or ~/.zshrc will make the completions available
22 +everywhere:
23 +
24 +```bash
25 +npm completion >> ~/.bashrc
26 +npm completion >> ~/.zshrc
27 +```
28 +
29 +You may of course also pipe the output of `npm completion` to a file
30 +such as `/usr/local/etc/bash_completion.d/npm` or
31 +`/etc/bash_completion.d/npm` if you have a system that will read
32 +that file for you.
33 +
34 +When `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the
35 +environment, `npm completion` acts in "plumbing mode", and outputs
36 +completions based on the arguments.
37 +
38 +### See Also
39 +
40 +* [npm developers](/cli/v6/using-npm/developers)
41 +* [npm](/cli/v6/commands/npm)
content/cli/v6/commands/npm-config.md new
+84
@@ -0,0 +1,84 @@
1 +---
2 +title: npm-config
3 +section: 1
4 +description: Manage the npm configuration files
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-config.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm config set <key> <value> [-g|--global]
13 +npm config get <key>
14 +npm config delete <key>
15 +npm config list [-l] [--json]
16 +npm config edit
17 +npm get <key>
18 +npm set <key> <value> [-g|--global]
19 +
20 +aliases: c
21 +```
22 +
23 +### Description
24 +
25 +npm gets its config settings from the command line, environment
26 +variables, `npmrc` files, and in some cases, the `package.json` file.
27 +
28 +See [npmrc](/cli/v6/configuring-npm/npmrc) for more information about the npmrc files.
29 +
30 +See [config](/cli/v6/using-npm/config) for a more thorough discussion of the mechanisms
31 +involved.
32 +
33 +The `npm config` command can be used to update and edit the contents
34 +of the user and global npmrc files.
35 +
36 +### Sub-commands
37 +
38 +Config supports the following sub-commands:
39 +
40 +#### set
41 +```bash
42 +npm config set key value
43 +```
44 +Sets the config key to the value.
45 +
46 +If value is omitted, then it sets it to "true".
47 +
48 +#### get
49 +```bash
50 +npm config get key
51 +```
52 +
53 +Echo the config value to stdout.
54 +
55 +#### list
56 +```bash
57 +npm config list
58 +```
59 +
60 +Show all the config settings. Use `-l` to also show defaults. Use `--json`
61 +to show the settings in json format.
62 +
63 +#### delete
64 +```bash
65 +npm config delete key
66 +```
67 +
68 +Deletes the key from all configuration files.
69 +
70 +#### edit
71 +```bash
72 +npm config edit
73 +```
74 +
75 +Opens the config file in an editor. Use the `--global` flag to edit the
76 +global config.
77 +
78 +### See Also
79 +
80 +* [npm folders](/cli/v6/configuring-npm/folders)
81 +* [npm config](/cli/v6/commands/npm-config)
82 +* [package.json](/cli/v6/configuring-npm/package-json)
83 +* [npmrc](/cli/v6/configuring-npm/npmrc)
84 +* [npm](/cli/v6/commands/npm)
content/cli/v6/commands/npm-dedupe.md new
+66
@@ -0,0 +1,66 @@
1 +---
2 +title: npm-dedupe
3 +section: 1
4 +description: Reduce duplication
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-dedupe.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm dedupe
13 +npm ddp
14 +
15 +aliases: find-dupes, ddp
16 +```
17 +
18 +### Description
19 +
20 +Searches the local package tree and attempts to simplify the overall
21 +structure by moving dependencies further up the tree, where they can
22 +be more effectively shared by multiple dependent packages.
23 +
24 +For example, consider this dependency graph:
25 +
26 +```bash
27 +a
28 ++-- b <-- depends on c@1.0.x
29 +| `-- c@1.0.3
30 +`-- d <-- depends on c@~1.0.9
31 + `-- c@1.0.10
32 +```
33 +
34 +In this case, `npm dedupe` will transform the tree to:
35 +
36 +```bash
37 +a
38 ++-- b
39 ++-- d
40 +`-- c@1.0.10
41 +```
42 +
43 +Because of the hierarchical nature of node's module lookup, b and d
44 +will both get their dependency met by the single c package at the root
45 +level of the tree.
46 +
47 +The deduplication algorithm walks the tree, moving each dependency as far
48 +up in the tree as possible, even if duplicates are not found. This will
49 +result in both a flat and deduplicated tree.
50 +
51 +If a suitable version exists at the target location in the tree
52 +already, then it will be left untouched, but the other duplicates will
53 +be deleted.
54 +
55 +Arguments are ignored. Dedupe always acts on the entire tree.
56 +
57 +Modules
58 +
59 +Note that this operation transforms the dependency tree, but will never
60 +result in new modules being installed.
61 +
62 +### See Also
63 +
64 +* [npm ls](/cli/v6/commands/npm-ls)
65 +* [npm update](/cli/v6/commands/npm-update)
66 +* [npm install](/cli/v6/commands/npm-install)
content/cli/v6/commands/npm-deprecate.md new
+36
@@ -0,0 +1,36 @@
1 +---
2 +title: npm-deprecate
3 +section: 1
4 +description: Deprecate a version of a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-deprecate.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm deprecate <pkg>[@<version>] <message>
13 +```
14 +
15 +### Description
16 +
17 +This command will update the npm registry entry for a package, providing
18 +a deprecation warning to all who attempt to install it.
19 +
20 +It works on [version ranges](https://semver.npmjs.com/) as well as specific
21 +versions, so you can do something like this:
22 +```bash
23 +npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
24 +```
25 +
26 +Note that you must be the package owner to deprecate something. See the
27 +`owner` and `adduser` help topics.
28 +
29 +To un-deprecate a package, specify an empty string (`""`) for the `message`
30 +argument. Note that you must use double quotes with no space between them to
31 +format an empty string.
32 +
33 +### See Also
34 +
35 +* [npm publish](/cli/v6/commands/npm-publish)
36 +* [npm registry](/cli/v6/using-npm/registry)
content/cli/v6/commands/npm-dist-tag.md new
+98
@@ -0,0 +1,98 @@
1 +---
2 +title: npm-dist-tag
3 +section: 1
4 +description: Modify package distribution tags
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-dist-tag.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm dist-tag add <pkg>@<version> [<tag>]
13 +npm dist-tag rm <pkg> <tag>
14 +npm dist-tag ls [<pkg>]
15 +
16 +aliases: dist-tags
17 +```
18 +
19 +### Description
20 +
21 +Add, remove, and enumerate distribution tags on a package:
22 +
23 +* add:
24 + Tags the specified version of the package with the specified tag, or the
25 + `--tag` config if not specified. If you have two-factor authentication on
26 + auth-and-writes then you’ll need to include a one-time password on the
27 + command line with `--otp <one-time password>`.
28 +
29 +* rm:
30 + Clear a tag that is no longer in use from the package.
31 +
32 +* ls:
33 + Show all of the dist-tags for a package, defaulting to the package in
34 + the current prefix. This is the default action if none is specified.
35 +
36 +A tag can be used when installing packages as a reference to a version instead
37 +of using a specific version number:
38 +
39 +```bash
40 +npm install <name>@<tag>
41 +```
42 +
43 +When installing dependencies, a preferred tagged version may be specified:
44 +
45 +```bash
46 +npm install --tag <tag>
47 +```
48 +
49 +This also applies to `npm dedupe`.
50 +
51 +Publishing a package sets the `latest` tag to the published version unless the
52 +`--tag` option is used. For example, `npm publish --tag=beta`.
53 +
54 +By default, `npm install <pkg>` (without any `@<version>` or `@<tag>`
55 +specifier) installs the `latest` tag.
56 +
57 +### Purpose
58 +
59 +Tags can be used to provide an alias instead of version numbers.
60 +
61 +For example, a project might choose to have multiple streams of development
62 +and use a different tag for each stream,
63 +e.g., `stable`, `beta`, `dev`, `canary`.
64 +
65 +By default, the `latest` tag is used by npm to identify the current version of
66 +a package, and `npm install <pkg>` (without any `@<version>` or `@<tag>`
67 +specifier) installs the `latest` tag. Typically, projects only use the `latest`
68 +tag for stable release versions, and use other tags for unstable versions such
69 +as prereleases.
70 +
71 +The `next` tag is used by some projects to identify the upcoming version.
72 +
73 +By default, other than `latest`, no tag has any special significance to npm
74 +itself.
75 +
76 +### Caveats
77 +
78 +This command used to be known as `npm tag`, which only created new tags, and so
79 +had a different syntax.
80 +
81 +Tags must share a namespace with version numbers, because they are specified in
82 +the same slot: `npm install <pkg>@<version>` vs `npm install <pkg>@<tag>`.
83 +
84 +Tags that can be interpreted as valid semver ranges will be rejected. For
85 +example, `v1.4` cannot be used as a tag, because it is interpreted by semver as
86 +`>=1.4.0 <1.5.0`. See <https://github.com/npm/npm/issues/6082>.
87 +
88 +The simplest way to avoid semver problems with tags is to use tags that do not
89 +begin with a number or the letter `v`.
90 +
91 +### See Also
92 +
93 +* [npm publish](/cli/v6/commands/npm-publish)
94 +* [npm install](/cli/v6/commands/npm-install)
95 +* [npm dedupe](/cli/v6/commands/npm-dedupe)
96 +* [npm registry](/cli/v6/using-npm/registry)
97 +* [npm config](/cli/v6/commands/npm-config)
98 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-docs.md new
+51
@@ -0,0 +1,51 @@
1 +---
2 +title: npm-docs
3 +section: 1
4 +description: Docs for a package in a web browser maybe
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-docs.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm docs [<pkgname> [<pkgname> ...]]
14 +npm docs .
15 +npm home [<pkgname> [<pkgname> ...]]
16 +npm home .
17 +```
18 +
19 +### Description
20 +
21 +This command tries to guess at the likely location of a package's
22 +documentation URL, and then tries to open it using the `--browser`
23 +config param. You can pass multiple package names at once. If no
24 +package name is provided, it will search for a `package.json` in
25 +the current folder and use the `name` property.
26 +
27 +### Configuration
28 +
29 +#### browser
30 +
31 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
32 +* Type: String
33 +
34 +The browser that is called by the `npm docs` command to open websites.
35 +
36 +#### registry
37 +
38 +* Default: https://registry.npmjs.org/
39 +* Type: url
40 +
41 +The base URL of the npm package registry.
42 +
43 +
44 +### See Also
45 +
46 +* [npm view](/cli/v6/commands/npm-view)
47 +* [npm publish](/cli/v6/commands/npm-publish)
48 +* [npm registry](/cli/v6/using-npm/registry)
49 +* [npm config](/cli/v6/commands/npm-config)
50 +* [npmrc](/cli/v6/configuring-npm/npmrc)
51 +* [package.json](/cli/v6/configuring-npm/package-json)
content/cli/v6/commands/npm-doctor.md new
+110
@@ -0,0 +1,110 @@
1 +---
2 +title: npm-doctor
3 +section: 1
4 +description: Check your environments
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-doctor.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm doctor
14 +```
15 +
16 +### Description
17 +
18 +`npm doctor` runs a set of checks to ensure that your npm installation has
19 +what it needs to manage your JavaScript packages. npm is mostly a standalone tool, but it does
20 +have some basic requirements that must be met:
21 +
22 ++ Node.js and git must be executable by npm.
23 ++ The primary npm registry, `registry.npmjs.com`, or another service that uses
24 + the registry API, is available.
25 ++ The directories that npm uses, `node_modules` (both locally and globally),
26 + exist and can be written by the current user.
27 ++ The npm cache exists, and the package tarballs within it aren't corrupt.
28 +
29 +Without all of these working properly, npm may not work properly. Many issues
30 +are often attributable to things that are outside npm's code base, so `npm
31 +doctor` confirms that the npm installation is in a good state.
32 +
33 +Also, in addition to this, there are also very many issue reports due to using
34 +old versions of npm. Since npm is constantly improving, running `npm@latest` is
35 +better than an old version.
36 +
37 +`npm doctor` verifies the following items in your environment, and if there are
38 +any recommended changes, it will display them.
39 +
40 +#### `npm ping`
41 +
42 +By default, npm installs from the primary npm registry, `registry.npmjs.org`.
43 +`npm doctor` hits a special ping endpoint within the registry. This can also be
44 +checked with `npm ping`. If this check fails, you may be using a proxy that
45 +needs to be configured, or may need to talk to your IT staff to get access over
46 +HTTPS to `registry.npmjs.org`.
47 +
48 +This check is done against whichever registry you've configured (you can see
49 +what that is by running `npm config get registry`), and if you're using a
50 +private registry that doesn't support the `/whoami` endpoint supported by the
51 +primary registry, this check may fail.
52 +
53 +#### `npm -v`
54 +
55 +While Node.js may come bundled with a particular version of npm, it's the
56 +policy of the CLI team that we recommend all users run `npm@latest` if they
57 +can. As the CLI is maintained by a small team of contributors, there are only
58 +resources for a single line of development, so npm's own long-term support
59 +releases typically only receive critical security and regression fixes. The
60 +team believes that the latest tested version of npm is almost always likely to
61 +be the most functional and defect-free version of npm.
62 +
63 +#### `node -v`
64 +
65 +For most users, in most circumstances, the best version of Node will be the
66 +latest long-term support (LTS) release. Those of you who want access to new
67 +ECMAscript features or bleeding-edge changes to Node's standard library may be
68 +running a newer version, and some of you may be required to run an older
69 +version of Node because of enterprise change control policies. That's OK! But
70 +in general, the npm team recommends that most users run Node.js LTS.
71 +
72 +#### `npm config get registry`
73 +
74 +Some of you may be installing from private package registries for your project
75 +or company. That's great! Others of you may be following tutorials or
76 +StackOverflow questions in an effort to troubleshoot problems you may be
77 +having. Sometimes, this may entail changing the registry you're pointing at.
78 +This part of `npm doctor` just lets you, and maybe whoever's helping you with
79 +support, know that you're not using the default registry.
80 +
81 +#### `which git`
82 +
83 +While it's documented in the README, it may not be obvious that npm needs Git
84 +installed to do many of the things that it does. Also, in some cases
85 +– especially on Windows – you may have Git set up in such a way that it's not
86 +accessible via your `PATH` so that npm can find it. This check ensures that Git
87 +is available.
88 +
89 +#### Permissions checks
90 +
91 +* Your cache must be readable and writable by the user running npm.
92 +* Global package binaries must be writable by the user running npm.
93 +* Your local `node_modules` path, if you're running `npm doctor` with a project
94 + directory, must be readable and writable by the user running npm.
95 +
96 +#### Validate the checksums of cached packages
97 +
98 +When an npm package is published, the publishing process generates a checksum
99 +that npm uses at install time to verify that the package didn't get corrupted
100 +in transit. `npm doctor` uses these checksums to validate the package tarballs
101 +in your local cache (you can see where that cache is located with `npm config
102 +get cache`, and see what's in that cache with `npm cache ls` – probably more
103 +than you were expecting!). In the event that there are corrupt packages in your
104 +cache, you should probably run `npm cache clean` and reset the cache.
105 +
106 +### See Also
107 +
108 +* [npm bugs](/cli/v6/commands/npm-bugs)
109 +* [npm help](/cli/v6/commands/npm-help)
110 +* [npm ping](/cli/v6/commands/npm-ping)
content/cli/v6/commands/npm-edit.md new
+46
@@ -0,0 +1,46 @@
1 +---
2 +title: npm-edit
3 +section: 1
4 +description: Edit an installed package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-edit.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm edit <pkg>[/<subpkg>...]
14 +```
15 +
16 +### Description
17 +
18 +Selects a (sub)dependency in the current
19 +working directory and opens the package folder in the default editor
20 +(or whatever you've configured as the npm `editor` config -- see
21 +[`npm-config`](npm-config).)
22 +
23 +After it has been edited, the package is rebuilt so as to pick up any
24 +changes in compiled packages.
25 +
26 +For instance, you can do `npm install connect` to install connect
27 +into your package, and then `npm edit connect` to make a few
28 +changes to your locally installed copy.
29 +
30 +### Configuration
31 +
32 +#### editor
33 +
34 +* Default: `EDITOR` environment variable if set, or `"vi"` on Posix,
35 + or `"notepad"` on Windows.
36 +* Type: path
37 +
38 +The command to run for `npm edit` or `npm config edit`.
39 +
40 +### See Also
41 +
42 +* [npm folders](/cli/v6/configuring-npm/folders)
43 +* [npm explore](/cli/v6/commands/npm-explore)
44 +* [npm install](/cli/v6/commands/npm-install)
45 +* [npm config](/cli/v6/commands/npm-config)
46 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-explore.md new
+49
@@ -0,0 +1,49 @@
1 +---
2 +title: npm-explore
3 +section: 1
4 +description: Browse an installed package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-explore.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm explore <pkg> [ -- <command>]
14 +```
15 +
16 +### Description
17 +
18 +Spawn a subshell in the directory of the installed package specified.
19 +
20 +If a command is specified, then it is run in the subshell, which then
21 +immediately terminates.
22 +
23 +This is particularly handy in the case of git submodules in the
24 +`node_modules` folder:
25 +
26 +```bash
27 +npm explore some-dependency -- git pull origin master
28 +```
29 +
30 +Note that the package is *not* automatically rebuilt afterwards, so be
31 +sure to use `npm rebuild <pkg>` if you make any changes.
32 +
33 +### Configuration
34 +
35 +#### shell
36 +
37 +* Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
38 + Windows
39 +* Type: path
40 +
41 +The shell to run for the `npm explore` command.
42 +
43 +### See Also
44 +
45 +* [npm folders](/cli/v6/configuring-npm/folders)
46 +* [npm edit](/cli/v6/commands/npm-edit)
47 +* [npm rebuild](/cli/v6/commands/npm-rebuild)
48 +* [npm build](/cli/v6/commands/npm-build)
49 +* [npm install](/cli/v6/commands/npm-install)
content/cli/v6/commands/npm-fund.md new
+67
@@ -0,0 +1,67 @@
1 +---
2 +title: npm-fund
3 +section: 1
4 +description: Retrieve funding information
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-fund.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 + npm fund [<pkg>]
14 +```
15 +
16 +### Description
17 +
18 +This command retrieves information on how to fund the dependencies of
19 +a given project. If no package name is provided, it will list all
20 +dependencies that are looking for funding in a tree-structure in which
21 +are listed the type of funding and the url to visit. If a package name
22 +is provided then it tries to open its funding url using the `--browser`
23 +config param; if there are multiple funding sources for the package, the
24 +user will be instructed to pass the `--which` command to disambiguate.
25 +
26 +The list will avoid duplicated entries and will stack all packages
27 +that share the same type/url as a single entry. Given this nature the
28 +list is not going to have the same shape of the output from `npm ls`.
29 +
30 +### Configuration
31 +
32 +#### browser
33 +
34 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
35 +* Type: String
36 +
37 +The browser that is called by the `npm fund` command to open websites.
38 +
39 +#### json
40 +
41 +* Type: Boolean
42 +* Default: false
43 +
44 +Show information in JSON format.
45 +
46 +#### unicode
47 +
48 +* Type: Boolean
49 +* Default: true
50 +
51 +Whether to represent the tree structure using unicode characters.
52 +Set it to `false` in order to use all-ansi output.
53 +
54 +#### which
55 +
56 +* Type: Number
57 +* Default: undefined
58 +
59 +If there are multiple funding sources, which 1-indexed source URL to open.
60 +
61 +## See Also
62 +
63 +* [npm docs](/cli/v6/commands/npm-docs)
64 +* [npm config](/cli/v6/commands/npm-config)
65 +* [npm install](/cli/v6/commands/npm-install)
66 +* [npm ls](/cli/v6/commands/npm-ls)
67 +
content/cli/v6/commands/npm-help-search.md new
+42
@@ -0,0 +1,42 @@
1 +---
2 +title: npm-help-search
3 +section: 1
4 +description: Search npm help documentation
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-help-search.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm help-search <text>
14 +```
15 +
16 +### Description
17 +
18 +This command will search the npm markdown documentation files for the
19 +terms provided, and then list the results, sorted by relevance.
20 +
21 +If only one result is found, then it will show that help topic.
22 +
23 +If the argument to `npm help` is not a known help topic, then it will
24 +call `help-search`. It is rarely if ever necessary to call this
25 +command directly.
26 +
27 +### Configuration
28 +
29 +#### long
30 +
31 +* Type: Boolean
32 +* Default: false
33 +
34 +If true, the "long" flag will cause help-search to output context around
35 +where the terms were found in the documentation.
36 +
37 +If false, then help-search will just list out the help topics found.
38 +
39 +### See Also
40 +
41 +* [npm](/cli/v6/commands/npm)
42 +* [npm help](/cli/v6/commands/npm-help)
content/cli/v6/commands/npm-help.md new
+43
@@ -0,0 +1,43 @@
1 +---
2 +title: npm-help
3 +section: 1
4 +description: Get help on npm
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-help.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm help <term> [<terms..>]
14 +```
15 +
16 +### Description
17 +
18 +If supplied a topic, then show the appropriate documentation page.
19 +
20 +If the topic does not exist, or if multiple terms are provided, then run
21 +the `help-search` command to find a match. Note that, if `help-search`
22 +finds a single subject, then it will run `help` on that topic, so unique
23 +matches are equivalent to specifying a topic name.
24 +
25 +### Configuration
26 +
27 +#### viewer
28 +
29 +* Default: "man" on Posix, "browser" on Windows
30 +* Type: path
31 +
32 +The program to use to view help content.
33 +
34 +Set to `"browser"` to view html help content in the default web browser.
35 +
36 +### See Also
37 +
38 +* [npm](/cli/v6/commands/npm)
39 +* [npm folders](/cli/v6/configuring-npm/folders)
40 +* [npm config](/cli/v6/commands/npm-config)
41 +* [npmrc](/cli/v6/configuring-npm/npmrc)
42 +* [package.json](/cli/v6/configuring-npm/package-json)
43 +* [npm help-search](/cli/v6/commands/npm-help-search)
content/cli/v6/commands/npm-hook.md new
+79
@@ -0,0 +1,79 @@
1 +---
2 +title: npm-hook
3 +section: 1
4 +description: Manage registry hooks
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-hook.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm hook ls [pkg]
14 +npm hook add <entity> <url> <secret>
15 +npm hook update <id> <url> [secret]
16 +npm hook rm <id>
17 +```
18 +
19 +### Example
20 +
21 +Add a hook to watch a package for changes:
22 +```bash
23 +$ npm hook add lodash https://example.com/ my-shared-secret
24 +```
25 +
26 +Add a hook to watch packages belonging to the user `substack`:
27 +```bash
28 +$ npm hook add ~substack https://example.com/ my-shared-secret
29 +```
30 +
31 +Add a hook to watch packages in the scope `@npm`
32 +```bash
33 +$ npm hook add @npm https://example.com/ my-shared-secret
34 +```
35 +
36 +List all your active hooks:
37 +```bash
38 +$ npm hook ls
39 +```
40 +
41 +List your active hooks for the `lodash` package:
42 +```bash
43 +$ npm hook ls lodash
44 +```
45 +
46 +Update an existing hook's url:
47 +```bash
48 +$ npm hook update id-deadbeef https://my-new-website.here/
49 +```
50 +
51 +Remove a hook:
52 +```bash
53 +$ npm hook rm id-deadbeef
54 +```
55 +
56 +### Description
57 +
58 +Allows you to manage [npm hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm),
59 +including adding, removing, listing, and updating.
60 +
61 +Hooks allow you to configure URL endpoints that will be notified whenever a
62 +change happens to any of the supported entity types. Three different types of
63 +entities can be watched by hooks: packages, owners, and scopes.
64 +
65 +To create a package hook, simply reference the package name.
66 +
67 +To create an owner hook, prefix the owner name with `~` (as in, `~youruser`).
68 +
69 +To create a scope hook, prefix the scope name with `@` (as in, `@yourscope`).
70 +
71 +The hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls` for
72 +that particular hook.
73 +
74 +The shared secret will be sent along to the URL endpoint so you can verify the
75 +request came from your own configured hook.
76 +
77 +### See Also
78 +
79 +* ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)
content/cli/v6/commands/npm-init.md new
+73
@@ -0,0 +1,73 @@
1 +---
2 +title: npm-init
3 +section: 1
4 +description: create a package.json file
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-init.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm init [--force|-f|--yes|-y|--scope]
13 +npm init <@scope> (same as `npx <@scope>/create`)
14 +npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)
15 +```
16 +
17 +### Examples
18 +
19 +Create a new React-based project using [`create-react-app`](https://npm.im/create-react-app):
20 +```bash
21 +$ npm init react-app ./my-react-app
22 +```
23 +
24 +Create a new `esm`-compatible package using [`create-esm`](https://npm.im/create-esm):
25 +```bash
26 +$ mkdir my-esm-lib && cd my-esm-lib
27 +$ npm init esm --yes
28 +```
29 +
30 +Generate a plain old package.json using legacy init:
31 +```bash
32 +$ mkdir my-npm-pkg && cd my-npm-pkg
33 +$ git init
34 +$ npm init
35 +```
36 +
37 +Generate it without having it ask any questions:
38 +```bash
39 +$ npm init -y
40 +```
41 +
42 +### Description
43 +
44 +`npm init <initializer>` can be used to set up a new or existing npm package.
45 +
46 +`initializer` in this case is an npm package named `create-<initializer>`, which
47 +will be installed by [`npx`](https://npm.im/npx), and then have its main bin
48 +executed -- presumably creating or updating `package.json` and running any other
49 +initialization-related operations.
50 +
51 +The init command is transformed to a corresponding `npx` operation as follows:
52 +
53 +* `npm init foo` -> `npx create-foo`
54 +* `npm init @usr/foo` -> `npx @usr/create-foo`
55 +* `npm init @usr` -> `npx @usr/create`
56 +
57 +Any additional options will be passed directly to the command, so `npm init foo
58 +--hello` will map to `npx create-foo --hello`.
59 +
60 +If the initializer is omitted (by just calling `npm init`), init will fall back
61 +to legacy init behavior. It will ask you a bunch of questions, and then write a
62 +package.json for you. It will attempt to make reasonable guesses based on
63 +existing fields, dependencies, and options selected. It is strictly additive, so
64 +it will keep any fields and values that were already set. You can also use
65 +`-y`/`--yes` to skip the questionnaire altogether. If you pass `--scope`, it
66 +will create a scoped package.
67 +
68 +### See Also
69 +
70 +* <https://github.com/isaacs/init-package-json>
71 +* [package.json](/cli/v6/configuring-npm/package-json)
72 +* [npm version](/cli/v6/commands/npm-version)
73 +* [npm scope](/cli/v6/using-npm/scope)
content/cli/v6/commands/npm-install-ci-test.md new
+25
@@ -0,0 +1,25 @@
1 +---
2 +title: npm-install-ci-test
3 +section: 1
4 +description: Install a project with a clean slate and run tests
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-install-ci-test.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm install-ci-test
14 +
15 +alias: npm cit
16 +```
17 +
18 +### Description
19 +
20 +This command runs an `npm ci` followed immediately by an `npm test`.
21 +
22 +### See Also
23 +
24 +* [npm ci](/cli/v6/commands/npm-ci)
25 +* [npm test](/cli/v6/commands/npm-test)
content/cli/v6/commands/npm-install-test.md new
+34
@@ -0,0 +1,34 @@
1 +---
2 +title: npm-install-test
3 +section: 1
4 +description: Install package(s) and run tests
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-install-test.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm install-test (with no args, in package dir)
14 +npm install-test [<@scope>/]<name>
15 +npm install-test [<@scope>/]<name>@<tag>
16 +npm install-test [<@scope>/]<name>@<version>
17 +npm install-test [<@scope>/]<name>@<version range>
18 +npm install-test <tarball file>
19 +npm install-test <tarball url>
20 +npm install-test <folder>
21 +
22 +alias: npm it
23 +common options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]
24 +```
25 +
26 +### Description
27 +
28 +This command runs an `npm install` followed immediately by an `npm test`. It
29 +takes exactly the same arguments as `npm install`.
30 +
31 +### See Also
32 +
33 +* [npm install](/cli/v6/commands/npm-install)
34 +* [npm test](/cli/v6/commands/npm-test)
content/cli/v6/commands/npm-install.md new
+518
@@ -0,0 +1,518 @@
1 +---
2 +title: npm-install
3 +section: 1
4 +description: Install a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-install.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm install (with no args, in package dir)
14 +npm install [<@scope>/]<name>
15 +npm install [<@scope>/]<name>@<tag>
16 +npm install [<@scope>/]<name>@<version>
17 +npm install [<@scope>/]<name>@<version range>
18 +npm install <alias>@npm:<name>
19 +npm install <git-host>:<git-user>/<repo-name>
20 +npm install <git repo url>
21 +npm install <tarball file>
22 +npm install <tarball url>
23 +npm install <folder>
24 +
25 +aliases: npm i, npm add
26 +common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
27 +```
28 +
29 +### Description
30 +
31 +This command installs a package, and any packages that it depends on. If the
32 +package has a package-lock or shrinkwrap file, the installation of dependencies
33 +will be driven by that, with an `npm-shrinkwrap.json` taking precedence if both
34 +files exist. See [package-lock.json](/cli/v6/configuring-npm/package-lock-json) and [`npm shrinkwrap`](/cli/v6/commands/npm-shrinkwrap).
35 +
36 +A `package` is:
37 +
38 +* a) a folder containing a program described by a [`package.json`](/cli/v6/configuring-npm/package-json) file
39 +* b) a gzipped tarball containing (a)
40 +* c) a url that resolves to (b)
41 +* d) a `<name>@<version>` that is published on the registry (see [`registry`](/cli/v6/using-npm/registry)) with (c)
42 +* e) a `<name>@<tag>` (see [`npm dist-tag`](/cli/v6/commands/npm-dist-tag)) that points to (d)
43 +* f) a `<name>` that has a "latest" tag satisfying (e)
44 +* g) a `<git remote url>` that resolves to (a)
45 +
46 +Even if you never publish your package, you can still get a lot of
47 +benefits of using npm if you just want to write a node program (a), and
48 +perhaps if you also want to be able to easily install it elsewhere
49 +after packing it up into a tarball (b).
50 +
51 +
52 +* `npm install` (in package directory, no arguments):
53 +
54 + Install the dependencies in the local node_modules folder.
55 +
56 + In global mode (ie, with `-g` or `--global` appended to the command),
57 + it installs the current package context (ie, the current working
58 + directory) as a global package.
59 +
60 + By default, `npm install` will install all modules listed as dependencies
61 + in [`package.json`](/cli/v6/configuring-npm/package-json).
62 +
63 + With the `--production` flag (or when the `NODE_ENV` environment variable
64 + is set to `production`), npm will not install modules listed in
65 + `devDependencies`. To install all modules listed in both `dependencies`
66 + and `devDependencies` when `NODE_ENV` environment variable is set to `production`,
67 + you can use `--production=false`.
68 +
69 + > NOTE: The `--production` flag has no particular meaning when adding a
70 + dependency to a project.
71 +
72 +* `npm install <folder>`:
73 +
74 + Install the package in the directory as a symlink in the current project.
75 + Its dependencies will be installed before it's linked. If `<folder>` sits
76 + inside the root of your project, its dependencies may be hoisted to the
77 + toplevel `node_modules` as they would for other types of dependencies.
78 +
79 +* `npm install <tarball file>`:
80 +
81 + Install a package that is sitting on the filesystem. Note: if you just want
82 + to link a dev directory into your npm root, you can do this more easily by
83 + using `npm link`.
84 +
85 + Tarball requirements:
86 + * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as
87 + the extension.
88 + * The package contents should reside in a subfolder inside the tarball (usually it is called `package/`). npm strips one directory layer when installing the package (an equivalent of `tar x --strip-components=1` is run).
89 + * The package must contain a `package.json` file with `name` and `version` properties.
90 +
91 + Example:
92 +
93 + npm install ./package.tgz
94 +
95 +* `npm install <tarball url>`:
96 +
97 + Fetch the tarball url, and then install it. In order to distinguish between
98 + this and other options, the argument must start with "http://" or "https://"
99 +
100 + Example:
101 +
102 + npm install https://github.com/indexzero/forever/tarball/v0.5.6
103 +
104 +* `npm install [<@scope>/]<name>`:
105 +
106 + Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
107 + [`config`](/cli/v6/using-npm/config). The config's default value is `latest`.)
108 +
109 + In most cases, this will install the version of the modules tagged as
110 + `latest` on the npm registry.
111 +
112 + Example:
113 +
114 + npm install sax
115 +
116 +* `npm install <alias>@npm:<name>`:
117 +
118 + Install a package under a custom alias. Allows multiple versions of
119 + a same-name package side-by-side, more convenient import names for
120 + packages with otherwise long ones and using git forks replacements
121 + or forked npm packages as replacements. Aliasing works only on your
122 + project and does not rename packages in transitive dependencies.
123 + Aliases should follow the naming conventions stated in
124 + [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules).
125 +
126 + Examples:
127 +
128 + npm install my-react@npm:react
129 + npm install jquery2@npm:jquery@2
130 + npm install jquery3@npm:jquery@3
131 + npm install npa@npm:npm-package-arg
132 +
133 +
134 + `npm install` saves any specified packages into `dependencies` by default.
135 + Additionally, you can control where and how they get saved with some
136 + additional flags:
137 +
138 + * `-P, --save-prod`: Package will appear in your `dependencies`. This is the
139 + default unless `-D` or `-O` are present.
140 +
141 + * `-D, --save-dev`: Package will appear in your `devDependencies`.
142 +
143 + * `-O, --save-optional`: Package will appear in your `optionalDependencies`.
144 +
145 + * `--no-save`: Prevents saving to `dependencies`.
146 +
147 + When using any of the above options to save dependencies to your
148 + package.json, there are two additional, optional flags:
149 +
150 + * `-E, --save-exact`: Saved dependencies will be configured with an
151 + exact version rather than using npm's default semver range
152 + operator.
153 +
154 + * `-B, --save-bundle`: Saved dependencies will also be added to your `bundleDependencies` list.
155 +
156 + Further, if you have an `npm-shrinkwrap.json` or `package-lock.json` then it
157 + will be updated as well.
158 +
159 + `<scope>` is optional. The package will be downloaded from the registry
160 + associated with the specified scope. If no registry is associated with
161 + the given scope the default registry is assumed. See [`scope`](/cli/v6/using-npm/scope).
162 +
163 + Note: if you do not include the @-symbol on your scope name, npm will
164 + interpret this as a GitHub repository instead, see below. Scopes names
165 + must also be followed by a slash.
166 +
167 + Examples:
168 +
169 + ```bash
170 + npm install sax
171 + npm install githubname/reponame
172 + npm install @myorg/privatepackage
173 + npm install node-tap --save-dev
174 + npm install dtrace-provider --save-optional
175 + npm install readable-stream --save-exact
176 + npm install ansi-regex --save-bundle
177 + ```
178 +
179 + **Note**: If there is a file or folder named `<name>` in the current
180 + working directory, then it will try to install that, and only try to
181 + fetch the package by name if it is not valid.
182 +
183 +* `npm install [<@scope>/]<name>@<tag>`:
184 +
185 + Install the version of the package that is referenced by the specified tag.
186 + If the tag does not exist in the registry data for that package, then this
187 + will fail.
188 +
189 + Example:
190 +
191 + ```bash
192 + npm install sax@latest
193 + npm install @myorg/mypackage@latest
194 + ```
195 +
196 +* `npm install [<@scope>/]<name>@<version>`:
197 +
198 + Install the specified version of the package. This will fail if the
199 + version has not been published to the registry.
200 +
201 + Example:
202 +
203 + ```bash
204 + npm install sax@0.1.1
205 + npm install @myorg/privatepackage@1.5.0
206 + ```
207 +
208 +* `npm install [<@scope>/]<name>@<version range>`:
209 +
210 + Install a version of the package matching the specified version range. This
211 + will follow the same rules for resolving dependencies described in [`package.json`](/cli/v6/configuring-npm/package-json).
212 +
213 + Note that most version ranges must be put in quotes so that your shell will
214 + treat it as a single argument.
215 +
216 + Example:
217 + ```bash
218 + npm install sax@">=0.1.0 <0.2.0"
219 + npm install @myorg/privatepackage@">=0.1.0 <0.2.0"
220 + ```
221 +
222 +* `npm install <git remote url>`:
223 +
224 + Installs the package from the hosted git provider, cloning it with `git`.
225 + For a full git remote url, only that URL will be attempted.
226 +
227 + ```bash
228 + <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
229 + ```
230 +
231 + `<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or
232 + `git+file`.
233 +
234 + If `#<commit-ish>` is provided, it will be used to clone exactly that
235 + commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
236 + be any valid semver range or exact version, and npm will look for any tags
237 + or refs matching that range in the remote repository, much as it would for a
238 + registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
239 + specified, then the default branch of the repository is used.
240 +
241 + If the repository makes use of submodules, those submodules will be cloned
242 + as well.
243 +
244 + If the package being installed contains a `prepare` script, its
245 + `dependencies` and `devDependencies` will be installed, and the prepare
246 + script will be run, before the package is packaged and installed.
247 +
248 + The following git environment variables are recognized by npm and will be
249 + added to the environment when running git:
250 +
251 + * `GIT_ASKPASS`
252 + * `GIT_EXEC_PATH`
253 + * `GIT_PROXY_COMMAND`
254 + * `GIT_SSH`
255 + * `GIT_SSH_COMMAND`
256 + * `GIT_SSL_CAINFO`
257 + * `GIT_SSL_NO_VERIFY`
258 +
259 + See the git man page for details.
260 +
261 + Examples:
262 +
263 + ```bash
264 + npm install git+ssh://git@github.com:npm/cli.git#v1.0.27
265 + npm install git+ssh://git@github.com:npm/cli#semver:^5.0
266 + npm install git+https://isaacs@github.com/npm/cli.git
267 + npm install git://github.com/npm/cli.git#v1.0.27
268 + GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git
269 + ```
270 +
271 +* `npm install <githubname>/<githubrepo>[#<commit-ish>]`:
272 +* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`:
273 +
274 + Install the package at `https://github.com/githubname/githubrepo` by
275 + attempting to clone it using `git`.
276 +
277 + If `#<commit-ish>` is provided, it will be used to clone exactly that
278 + commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
279 + be any valid semver range or exact version, and npm will look for any tags
280 + or refs matching that range in the remote repository, much as it would for a
281 + registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
282 + specified, then `master` is used.
283 +
284 + As with regular git dependencies, `dependencies` and `devDependencies` will
285 + be installed if the package has a `prepare` script, before the package is
286 + done installing.
287 +
288 + Examples:
289 +
290 + ```bash
291 + npm install mygithubuser/myproject
292 + npm install github:mygithubuser/myproject
293 + ```
294 +
295 +* `npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]`:
296 +
297 + Install the package at `https://gist.github.com/gistID` by attempting to
298 + clone it using `git`. The GitHub username associated with the gist is
299 + optional and will not be saved in `package.json`.
300 +
301 + As with regular git dependencies, `dependencies` and `devDependencies` will
302 + be installed if the package has a `prepare` script, before the package is
303 + done installing.
304 +
305 + Example:
306 +
307 + ```bash
308 + npm install gist:101a11beef
309 + ```
310 +
311 +* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]`:
312 +
313 + Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo`
314 + by attempting to clone it using `git`.
315 +
316 + If `#<commit-ish>` is provided, it will be used to clone exactly that
317 + commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
318 + be any valid semver range or exact version, and npm will look for any tags
319 + or refs matching that range in the remote repository, much as it would for a
320 + registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
321 + specified, then `master` is used.
322 +
323 + As with regular git dependencies, `dependencies` and `devDependencies` will
324 + be installed if the package has a `prepare` script, before the package is
325 + done installing.
326 +
327 + Example:
328 +
329 + ```bash
330 + npm install bitbucket:mybitbucketuser/myproject
331 + ```
332 +
333 +* `npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]`:
334 +
335 + Install the package at `https://gitlab.com/gitlabname/gitlabrepo`
336 + by attempting to clone it using `git`.
337 +
338 + If `#<commit-ish>` is provided, it will be used to clone exactly that
339 + commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
340 + be any valid semver range or exact version, and npm will look for any tags
341 + or refs matching that range in the remote repository, much as it would for a
342 + registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
343 + specified, then `master` is used.
344 +
345 + As with regular git dependencies, `dependencies` and `devDependencies` will
346 + be installed if the package has a `prepare` script, before the package is
347 + done installing.
348 +
349 + Example:
350 +
351 + ```bash
352 + npm install gitlab:mygitlabuser/myproject
353 + npm install gitlab:myusr/myproj#semver:^5.0
354 + ```
355 +
356 +You may combine multiple arguments, and even multiple types of arguments.
357 +For example:
358 +
359 +```bash
360 +npm install sax@">=0.1.0 <0.2.0" bench supervisor
361 +```
362 +
363 +The `--tag` argument will apply to all of the specified install targets. If a
364 +tag with the given name exists, the tagged version is preferred over newer
365 +versions.
366 +
367 +The `--dry-run` argument will report in the usual way what the install would
368 +have done without actually installing anything.
369 +
370 +The `--package-lock-only` argument will only update the `package-lock.json`,
371 +instead of checking `node_modules` and downloading dependencies.
372 +
373 +The `-f` or `--force` argument will force npm to fetch remote resources even if a
374 +local copy exists on disk.
375 +
376 +```bash
377 +npm install sax --force
378 +```
379 +
380 +The `--no-fund` argument will hide the message displayed at the end of each
381 +install that acknowledges the number of dependencies looking for funding.
382 +See `npm-fund(1)`
383 +
384 +The `-g` or `--global` argument will cause npm to install the package globally
385 +rather than locally. See [folders](/cli/v6/configuring-npm/folders).
386 +
387 +The `--global-style` argument will cause npm to install the package into
388 +your local `node_modules` folder with the same layout it uses with the
389 +global `node_modules` folder. Only your direct dependencies will show in
390 +`node_modules` and everything they depend on will be flattened in their
391 +`node_modules` folders. This obviously will eliminate some deduping.
392 +
393 +The `--ignore-scripts` argument will cause npm to not execute any
394 +scripts defined in the package.json. See [`scripts`](/cli/v6/using-npm/scripts).
395 +
396 +The `--legacy-bundling` argument will cause npm to install the package such
397 +that versions of npm prior to 1.4, such as the one included with node 0.8,
398 +can install the package. This eliminates all automatic deduping.
399 +
400 +The `--link` argument will cause npm to link global installs into the
401 +local space in some cases.
402 +
403 +The `--no-bin-links` argument will prevent npm from creating symlinks for
404 +any binaries the package might contain.
405 +
406 +The `--no-optional` argument will prevent optional dependencies from
407 +being installed.
408 +
409 +The `--no-shrinkwrap` argument, which will ignore an available
410 +package lock or shrinkwrap file and use the package.json instead.
411 +
412 +The `--no-package-lock` argument will prevent npm from creating a
413 +`package-lock.json` file. When running with package-lock's disabled npm
414 +will not automatically prune your node modules when installing.
415 +
416 +The `--nodedir=/path/to/node/source` argument will allow npm to find the
417 +node source code so that npm can compile native modules.
418 +
419 +The `--only={prod[uction]|dev[elopment]}` argument will cause either only
420 +`devDependencies` or only non-`devDependencies` to be installed regardless of the `NODE_ENV`.
421 +
422 +The `--no-audit` argument can be used to disable sending of audit reports to
423 +the configured registries. See [`npm-audit`](npm-audit) for details on what is sent.
424 +
425 +See [`config`](/cli/v6/using-npm/config). Many of the configuration params have some
426 +effect on installation, since that's most of what npm does.
427 +
428 +#### Algorithm
429 +
430 +To install a package, npm uses the following algorithm:
431 +```bash
432 +load the existing node_modules tree from disk
433 +clone the tree
434 +fetch the package.json and assorted metadata and add it to the clone
435 +walk the clone and add any missing dependencies
436 + dependencies will be added as close to the top as is possible
437 + without breaking any other modules
438 +compare the original tree with the cloned tree and make a list of
439 +actions to take to convert one to the other
440 +execute all of the actions, deepest first
441 + kinds of actions are install, update, remove and move
442 +```
443 +
444 +For this `package{dep}` structure: `A{B,C}, B{C}, C{D}`,
445 +this algorithm produces:
446 +
447 +```bash
448 +A
449 ++-- B
450 ++-- C
451 ++-- D
452 +```
453 +
454 +That is, the dependency from B to C is satisfied by the fact that A
455 +already caused C to be installed at a higher level. D is still installed
456 +at the top level because nothing conflicts with it.
457 +
458 +For `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces:
459 +
460 +```bash
461 +A
462 ++-- B
463 ++-- C
464 + `-- D@2
465 ++-- D@1
466 +```
467 +
468 +Because B's D@1 will be installed in the top level, C now has to install D@2
469 +privately for itself. This algorithm is deterministic, but different trees may
470 +be produced if two dependencies are requested for installation in a different
471 +order.
472 +
473 +See [folders](/cli/v6/configuring-npm/folders) for a more detailed description of the specific folder structures that npm creates.
474 +
475 +### Limitations of npm's Install Algorithm
476 +
477 +npm will refuse to install any package with an identical name to the
478 +current package. This can be overridden with the `--force` flag, but in
479 +most cases can simply be addressed by changing the local package name.
480 +
481 +There are some very rare and pathological edge-cases where a cycle can
482 +cause npm to try to install a never-ending tree of packages. Here is
483 +the simplest case:
484 +
485 +```bash
486 +A -> B -> A' -> B' -> A -> B -> A' -> B' -> A -> ...
487 +```
488 +
489 +where `A` is some version of a package, and `A'` is a different version
490 +of the same package. Because `B` depends on a different version of `A`
491 +than the one that is already in the tree, it must install a separate
492 +copy. The same is true of `A'`, which must install `B'`. Because `B'`
493 +depends on the original version of `A`, which has been overridden, the
494 +cycle falls into infinite regress.
495 +
496 +To avoid this situation, npm flat-out refuses to install any
497 +`name@version` that is already present anywhere in the tree of package
498 +folder ancestors. A more correct, but more complex, solution would be
499 +to symlink the existing version into the new location. If this ever
500 +affects a real use-case, it will be investigated.
501 +
502 +### See Also
503 +
504 +* [npm folders](/cli/v6/configuring-npm/folders)
505 +* [npm update](/cli/v6/commands/npm-update)
506 +* [npm audit](/cli/v6/commands/npm-audit)
507 +* [npm fund](/cli/v6/commands/npm-fund)
508 +* [npm link](/cli/v6/commands/npm-link)
509 +* [npm rebuild](/cli/v6/commands/npm-rebuild)
510 +* [npm scripts](/cli/v6/using-npm/scripts)
511 +* [npm build](/cli/v6/commands/npm-build)
512 +* [npm config](/cli/v6/commands/npm-config)
513 +* [npmrc](/cli/v6/configuring-npm/npmrc)
514 +* [npm registry](/cli/v6/using-npm/registry)
515 +* [npm dist-tag](/cli/v6/commands/npm-dist-tag)
516 +* [npm uninstall](/cli/v6/commands/npm-uninstall)
517 +* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)
518 +* [package.json](/cli/v6/configuring-npm/package-json)
content/cli/v6/commands/npm-link.md new
+91
@@ -0,0 +1,91 @@
1 +---
2 +title: npm-link
3 +section: 1
4 +description: Symlink a package folder
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-link.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm link (in package dir)
14 +npm link [<@scope>/]<pkg>[@<version>]
15 +
16 +alias: npm ln
17 +```
18 +
19 +### Description
20 +
21 +Package linking is a two-step process.
22 +
23 +First, `npm link` in a package folder will create a symlink in the global folder
24 +`{prefix}/lib/node_modules/<package>` that links to the package where the `npm
25 +link` command was executed. It will also link any bins in the package to `{prefix}/bin/{name}`.
26 +Note that `npm link` uses the global prefix (see `npm prefix -g` for its value).
27 +
28 +Next, in some other location, `npm link package-name` will create a
29 +symbolic link from globally-installed `package-name` to `node_modules/`
30 +of the current folder.
31 +
32 +Note that `package-name` is taken from `package.json`,
33 +not from directory name.
34 +
35 +The package name can be optionally prefixed with a scope. See [`scope`](/cli/v6/using-npm/scope).
36 +The scope must be preceded by an @-symbol and followed by a slash.
37 +
38 +When creating tarballs for `npm publish`, the linked packages are
39 +"snapshotted" to their current state by resolving the symbolic links.
40 +
41 +This is handy for installing your own stuff, so that you can work on it and
42 +test it iteratively without having to continually rebuild.
43 +
44 +For example:
45 +
46 +```bash
47 + cd ~/projects/node-redis # go into the package directory
48 + npm link # creates global link
49 + cd ~/projects/node-bloggy # go into some other package directory.
50 + npm link redis # link-install the package
51 +```
52 +
53 +Now, any changes to ~/projects/node-redis will be reflected in
54 +~/projects/node-bloggy/node_modules/node-redis/. Note that the link should
55 +be to the package name, not the directory name for that package.
56 +
57 +You may also shortcut the two steps in one. For example, to do the
58 +above use-case in a shorter way:
59 +
60 +```bash
61 +cd ~/projects/node-bloggy # go into the dir of your main project
62 +npm link ../node-redis # link the dir of your dependency
63 +```
64 +
65 +The second line is the equivalent of doing:
66 +
67 +```bash
68 +(cd ../node-redis; npm link)
69 +npm link redis
70 +```
71 +
72 +That is, it first creates a global link, and then links the global
73 +installation target into your project's `node_modules` folder.
74 +
75 +Note that in this case, you are referring to the directory name, `node-redis`,
76 +rather than the package name `redis`.
77 +
78 +If your linked package is scoped (see [`scope`](/cli/v6/using-npm/scope)) your link command must include that scope, e.g.
79 +
80 +```bash
81 +npm link @myorg/privatepackage
82 +```
83 +
84 +### See Also
85 +
86 +* [npm developers](/cli/v6/using-npm/developers)
87 +* [package.json](/cli/v6/configuring-npm/package-json)
88 +* [npm install](/cli/v6/commands/npm-install)
89 +* [npm folders](/cli/v6/configuring-npm/folders)
90 +* [npm config](/cli/v6/commands/npm-config)
91 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-logout.md new
+53
@@ -0,0 +1,53 @@
1 +---
2 +title: npm-logout
3 +section: 1
4 +description: Log out of the registry
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-logout.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm logout [--registry=<url>] [--scope=<@scope>]
14 +```
15 +
16 +### Description
17 +
18 +When logged into a registry that supports token-based authentication, tell the
19 +server to end this token's session. This will invalidate the token everywhere
20 +you're using it, not just for the current environment.
21 +
22 +When logged into a legacy registry that uses username and password authentication, this will
23 +clear the credentials in your user configuration. In this case, it will _only_ affect
24 +the current environment.
25 +
26 +If `--scope` is provided, this will find the credentials for the registry
27 +connected to that scope, if set.
28 +
29 +### Configuration
30 +
31 +#### registry
32 +
33 +Default: https://registry.npmjs.org/
34 +
35 +The base URL of the npm package registry. If `scope` is also specified,
36 +it takes precedence.
37 +
38 +#### scope
39 +
40 +Default: The scope of your current project, if any, otherwise none.
41 +
42 +If specified, you will be logged out of the specified scope. See [`scope`](/cli/v6/using-npm/scope).
43 +
44 +```bash
45 +npm logout --scope=@myco
46 +```
47 +
48 +### See Also
49 +
50 +* [npm adduser](/cli/v6/commands/npm-adduser)
51 +* [npm registry](/cli/v6/using-npm/registry)
52 +* [npm config](/cli/v6/commands/npm-config)
53 +* [npm whoami](/cli/v6/commands/npm-whoami)
content/cli/v6/commands/npm-ls.md new
+128
@@ -0,0 +1,128 @@
1 +---
2 +title: npm-ls
3 +section: 1
4 +description: List installed packages
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-ls.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm ls [[<@scope>/]<pkg> ...]
14 +
15 +aliases: list, la, ll
16 +```
17 +
18 +### Description
19 +
20 +This command will print to stdout all the versions of packages that are
21 +installed, as well as their dependencies, in a tree-structure.
22 +
23 +Positional arguments are `name@version-range` identifiers, which will
24 +limit the results to only the paths to the packages named. Note that
25 +nested packages will *also* show the paths to the specified packages.
26 +For example, running `npm ls promzard` in npm's source tree will show:
27 +
28 +```bash
29 + npm@6.0.0 /path/to/npm
30 + └─┬ init-package-json@0.0.4
31 + └── promzard@0.1.5
32 +```
33 +
34 +It will print out extraneous, missing, and invalid packages.
35 +
36 +If a project specifies git urls for dependencies these are shown
37 +in parentheses after the name@version to make it easier for users to
38 +recognize potential forks of a project.
39 +
40 +The tree shown is the logical dependency tree, based on package
41 +dependencies, not the physical layout of your node_modules folder.
42 +
43 +When run as `ll` or `la`, it shows extended information by default.
44 +
45 +### Configuration
46 +
47 +#### json
48 +
49 +* Default: false
50 +* Type: Boolean
51 +
52 +Show information in JSON format.
53 +
54 +#### long
55 +
56 +* Default: false
57 +* Type: Boolean
58 +
59 +Show extended information.
60 +
61 +#### parseable
62 +
63 +* Default: false
64 +* Type: Boolean
65 +
66 +Show parseable output instead of tree view.
67 +
68 +#### global
69 +
70 +* Default: false
71 +* Type: Boolean
72 +
73 +List packages in the global install prefix instead of in the current
74 +project.
75 +
76 +#### depth
77 +
78 +* Type: Int
79 +
80 +Max display depth of the dependency tree.
81 +
82 +#### prod / production
83 +
84 +* Type: Boolean
85 +* Default: false
86 +
87 +Display only the dependency tree for packages in `dependencies`.
88 +
89 +#### dev / development
90 +
91 +* Type: Boolean
92 +* Default: false
93 +
94 +Display only the dependency tree for packages in `devDependencies`.
95 +
96 +#### only
97 +
98 +* Type: String
99 +
100 +When "dev" or "development", is an alias to `dev`.
101 +
102 +When "prod" or "production", is an alias to `production`.
103 +
104 +#### link
105 +
106 +* Type: Boolean
107 +* Default: false
108 +
109 +Display only dependencies which are linked
110 +
111 +#### unicode
112 +
113 +* Type: Boolean
114 +* Default: true
115 +
116 +Whether to represent the tree structure using unicode characters.
117 +Set it to false in order to use all-ansi output.
118 +
119 +### See Also
120 +
121 +* [npm config](/cli/v6/commands/npm-config)
122 +* [npmrc](/cli/v6/configuring-npm/npmrc)
123 +* [npm folders](/cli/v6/configuring-npm/folders)
124 +* [npm install](/cli/v6/commands/npm-install)
125 +* [npm link](/cli/v6/commands/npm-link)
126 +* [npm prune](/cli/v6/commands/npm-prune)
127 +* [npm outdated](/cli/v6/commands/npm-outdated)
128 +* [npm update](/cli/v6/commands/npm-update)
content/cli/v6/commands/npm-org.md new
+64
@@ -0,0 +1,64 @@
1 +---
2 +title: npm-org
3 +section: 1
4 +description: Manage orgs
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-org.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm org set <orgname> <username> [developer | admin | owner]
14 +npm org rm <orgname> <username>
15 +npm org ls <orgname> [<username>]
16 +```
17 +
18 +### Example
19 +
20 +Add a new developer to an org:
21 +
22 +```bash
23 +$ npm org set my-org @mx-smith
24 +```
25 +
26 +Add a new admin to an org (or change a developer to an admin):
27 +
28 +```bash
29 +$ npm org set my-org @mx-santos admin
30 +```
31 +
32 +Remove a user from an org:
33 +
34 +```bash
35 +$ npm org rm my-org mx-santos
36 +```
37 +
38 +List all users in an org:
39 +
40 +```bash
41 +$ npm org ls my-org
42 +```
43 +
44 +List all users in JSON format:
45 +
46 +```bash
47 +$ npm org ls my-org --json
48 +```
49 +
50 +See what role a user has in an org:
51 +
52 +```bash
53 +$ npm org ls my-org @mx-santos
54 +```
55 +
56 +### Description
57 +
58 +You can use the `npm org` commands to manage and view users of an organization.
59 +It supports adding and removing users, changing their roles, listing them, and
60 +finding specific ones and their roles.
61 +
62 +### See Also
63 +
64 +* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/)
content/cli/v6/commands/npm-outdated.md new
+123
@@ -0,0 +1,123 @@
1 +---
2 +title: npm-outdated
3 +section: 1
4 +description: Check for outdated packages
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-outdated.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm outdated [[<@scope>/]<pkg> ...]
14 +```
15 +
16 +### Description
17 +
18 +This command will check the registry to see if any (or, specific) installed
19 +packages are currently outdated.
20 +
21 +In the output:
22 +
23 +* `wanted` is the maximum version of the package that satisfies the semver
24 + range specified in `package.json`. If there's no available semver range (i.e.
25 + you're running `npm outdated --global`, or the package isn't included in
26 + `package.json`), then `wanted` shows the currently-installed version.
27 +* `latest` is the version of the package tagged as latest in the registry.
28 + Running `npm publish` with no special configuration will publish the package
29 + with a dist-tag of `latest`. This may or may not be the maximum version of
30 + the package, or the most-recently published version of the package, depending
31 + on how the package's developer manages the latest [dist-tag](npm-dist-tag).
32 +* `location` is where in the dependency tree the package is located. Note that
33 + `npm outdated` defaults to a depth of 0, so unless you override that, you'll
34 + always be seeing only top-level dependencies that are outdated.
35 +* `package type` (when using `--long` / `-l`) tells you whether this package is
36 + a `dependency` or a `devDependency`. Packages not included in `package.json`
37 + are always marked `dependencies`.
38 +* `homepage` (when using `--long` / `-l`) is the `homepage` value contained in the package's `package.json`
39 +* Red means there's a newer version matching your semver requirements, so you should update now.
40 +* Yellow indicates that there's a newer version above your semver requirements (usually new major, or new 0.x minor) so proceed with caution.
41 +
42 +### An example
43 +
44 +```bash
45 +$ npm outdated
46 +Package Current Wanted Latest Location
47 +glob 5.0.15 5.0.15 6.0.1 test-outdated-output
48 +nothingness 0.0.3 git git test-outdated-output
49 +npm 3.5.1 3.5.2 3.5.1 test-outdated-output
50 +local-dev 0.0.3 linked linked test-outdated-output
51 +once 1.3.2 1.3.3 1.3.3 test-outdated-output
52 +```
53 +
54 +With these `dependencies`:
55 +```json
56 +{
57 + "glob": "^5.0.15",
58 + "nothingness": "github:othiym23/nothingness#master",
59 + "npm": "^3.5.1",
60 + "once": "^1.3.1"
61 +}
62 +```
63 +
64 +A few things to note:
65 +
66 +* `glob` requires `^5`, which prevents npm from installing `glob@6`, which is
67 + outside the semver range.
68 +* Git dependencies will always be reinstalled, because of how they're specified.
69 + The installed committish might satisfy the dependency specifier (if it's
70 + something immutable, like a commit SHA), or it might not, so `npm outdated` and
71 + `npm update` have to fetch Git repos to check. This is why currently doing a
72 + reinstall of a Git dependency always forces a new clone and install.
73 +* `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because npm
74 + uses dist-tags to manage its `latest` and `next` release channels. `npm update`
75 + will install the _newest_ version, but `npm install npm` (with no semver range)
76 + will install whatever's tagged as `latest`.
77 +* `once` is just plain out of date. Reinstalling `node_modules` from scratch or
78 + running `npm update` will bring it up to spec.
79 +
80 +### Configuration
81 +
82 +#### json
83 +
84 +* Default: false
85 +* Type: Boolean
86 +
87 +Show information in JSON format.
88 +
89 +#### long
90 +
91 +* Default: false
92 +* Type: Boolean
93 +
94 +Show extended information.
95 +
96 +#### parseable
97 +
98 +* Default: false
99 +* Type: Boolean
100 +
101 +Show parseable output instead of tree view.
102 +
103 +#### global
104 +
105 +* Default: false
106 +* Type: Boolean
107 +
108 +Check packages in the global install prefix instead of in the current
109 +project.
110 +
111 +#### depth
112 +
113 +* Default: 0
114 +* Type: Int
115 +
116 +Max depth for checking dependency tree.
117 +
118 +### See Also
119 +
120 +* [npm update](/cli/v6/commands/npm-update)
121 +* [npm dist-tag](/cli/v6/commands/npm-dist-tag)
122 +* [npm registry](/cli/v6/using-npm/registry)
123 +* [npm folders](/cli/v6/configuring-npm/folders)
content/cli/v6/commands/npm-owner.md new
+47
@@ -0,0 +1,47 @@
1 +---
2 +title: npm-owner
3 +section: 1
4 +description: Manage package owners
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-owner.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm owner add <user> [<@scope>/]<pkg>
14 +npm owner rm <user> [<@scope>/]<pkg>
15 +npm owner ls [<@scope>/]<pkg>
16 +
17 +aliases: author
18 +```
19 +
20 +### Description
21 +
22 +Manage ownership of published packages.
23 +
24 +* ls:
25 + List all the users who have access to modify a package and push new versions.
26 + Handy when you need to know who to bug for help.
27 +* add:
28 + Add a new user as a maintainer of a package. This user is enabled to modify
29 + metadata, publish new versions, and add other owners.
30 +* rm:
31 + Remove a user from the package owner list. This immediately revokes their
32 + privileges.
33 +
34 +Note that there is only one level of access. Either you can modify a package,
35 +or you can't. Future versions may contain more fine-grained access levels, but
36 +that is not implemented at this time.
37 +
38 +If you have two-factor authentication enabled with `auth-and-writes` then
39 +you'll need to include an otp on the command line when changing ownership
40 +with `--otp`.
41 +
42 +### See Also
43 +
44 +* [npm publish](/cli/v6/commands/npm-publish)
45 +* [npm registry](/cli/v6/using-npm/registry)
46 +* [npm adduser](/cli/v6/commands/npm-adduser)
47 +* [npm disputes](/cli/v6/using-npm/disputes)
content/cli/v6/commands/npm-pack.md new
+37
@@ -0,0 +1,37 @@
1 +---
2 +title: npm-pack
3 +section: 1
4 +description: Create a tarball from a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-pack.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm pack [[<@scope>/]<pkg>...] [--dry-run]
14 +```
15 +
16 +### Description
17 +
18 +For anything that's installable (that is, a package folder, tarball,
19 +tarball url, name@tag, name@version, name, or scoped name), this
20 +command will fetch it to the cache, and then copy the tarball to the
21 +current working directory as `<name>-<version>.tgz`, and then write
22 +the filenames out to stdout.
23 +
24 +If the same package is specified multiple times, then the file will be
25 +overwritten the second time.
26 +
27 +If no arguments are supplied, then npm packs the current package folder.
28 +
29 +The `--dry-run` argument will do everything that pack usually does without
30 +actually packing anything. Reports on what would have gone into the tarball.
31 +
32 +### See Also
33 +
34 +* [npm cache](/cli/v6/commands/npm-cache)
35 +* [npm publish](/cli/v6/commands/npm-publish)
36 +* [npm config](/cli/v6/commands/npm-config)
37 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-ping.md new
+32
@@ -0,0 +1,32 @@
1 +---
2 +title: npm-ping
3 +section: 1
4 +description: Ping npm registry
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-ping.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm ping [--registry <registry>]
14 +```
15 +
16 +### Description
17 +
18 +Ping the configured or given npm registry and verify authentication.
19 +If it works it will output something like:
20 +
21 +```bash
22 +Ping success: {*Details about registry*}
23 +```
24 +otherwise you will get:
25 +```bash
26 +Ping error: {*Detail about error}
27 +```
28 +
29 +### See Also
30 +
31 +* [npm config](/cli/v6/commands/npm-config)
32 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-prefix.md new
+31
@@ -0,0 +1,31 @@
1 +---
2 +title: npm-prefix
3 +section: 1
4 +description: Display prefix
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-prefix.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm prefix [-g]
14 +```
15 +
16 +### Description
17 +
18 +Print the local prefix to standard out. This is the closest parent directory
19 +to contain a `package.json` file or `node_modules` directory, unless `-g` is
20 +also specified.
21 +
22 +If `-g` is specified, this will be the value of the global prefix. See
23 +[`npm config`](/cli/v6/commands/npm-config) for more detail.
24 +
25 +### See Also
26 +
27 +* [npm root](/cli/v6/commands/npm-root)
28 +* [npm bin](/cli/v6/commands/npm-bin)
29 +* [npm folders](/cli/v6/configuring-npm/folders)
30 +* [npm config](/cli/v6/commands/npm-config)
31 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-profile.md new
+82
@@ -0,0 +1,82 @@
1 +---
2 +title: npm-profile
3 +section: 1
4 +description: Change settings on your registry profile
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-profile.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm profile get [--json|--parseable] [<property>]
14 +npm profile set [--json|--parseable] <property> <value>
15 +npm profile set password
16 +npm profile enable-2fa [auth-and-writes|auth-only]
17 +npm profile disable-2fa
18 +```
19 +
20 +### Description
21 +
22 +Change your profile information on the registry. This not be available if
23 +you're using a non-npmjs registry.
24 +
25 +* `npm profile get [<property>]`:
26 + Display all of the properties of your profile, or one or more specific
27 + properties. It looks like:
28 +
29 +```bash
30 ++-----------------+---------------------------+
31 +| name | example |
32 ++-----------------+---------------------------+
33 +| email | me@example.com (verified) |
34 ++-----------------+---------------------------+
35 +| two factor auth | auth-and-writes |
36 ++-----------------+---------------------------+
37 +| fullname | Example User |
38 ++-----------------+---------------------------+
39 +| homepage | |
40 ++-----------------+---------------------------+
41 +| freenode | |
42 ++-----------------+---------------------------+
43 +| twitter | |
44 ++-----------------+---------------------------+
45 +| github | |
46 ++-----------------+---------------------------+
47 +| created | 2015-02-26T01:38:35.892Z |
48 ++-----------------+---------------------------+
49 +| updated | 2017-10-02T21:29:45.922Z |
50 ++-----------------+---------------------------+
51 +```
52 +
53 +* `npm profile set <property> <value>`:
54 + Set the value of a profile property. You can set the following properties this way:
55 + email, fullname, homepage, freenode, twitter, github
56 +
57 +* `npm profile set password`:
58 + Change your password. This is interactive, you'll be prompted for your
59 + current password and a new password. You'll also be prompted for an OTP
60 + if you have two-factor authentication enabled.
61 +
62 +* `npm profile enable-2fa [auth-and-writes|auth-only]`:
63 + Enables two-factor authentication. Defaults to `auth-and-writes` mode. Modes are:
64 + * `auth-only`: Require an OTP when logging in or making changes to your
65 + account's authentication. The OTP will be required on both the website
66 + and the command line.
67 + * `auth-and-writes`: Requires an OTP at all the times `auth-only` does, and also requires one when
68 + publishing a module, setting the `latest` dist-tag, or changing access
69 + via `npm access` and `npm owner`.
70 +
71 +* `npm profile disable-2fa`:
72 + Disables two-factor authentication.
73 +
74 +### Details
75 +
76 +All of the `npm profile` subcommands accept `--json` and `--parseable` and
77 +will tailor their output based on those. Some of these commands may not be
78 +available on non npmjs.com registries.
79 +
80 +### See Also
81 +
82 +* [npm config](/cli/v6/commands/npm-config)
content/cli/v6/commands/npm-prune.md new
+46
@@ -0,0 +1,46 @@
1 +---
2 +title: npm-prune
3 +section: 1
4 +description: Remove extraneous packages
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-prune.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
14 +```
15 +
16 +### Description
17 +
18 +This command removes "extraneous" packages. If a package name is
19 +provided, then only packages matching one of the supplied names are
20 +removed.
21 +
22 +Extraneous packages are packages that are not listed on the parent
23 +package's dependencies list.
24 +
25 +If the `--production` flag is specified or the `NODE_ENV` environment
26 +variable is set to `production`, this command will remove the packages
27 +specified in your `devDependencies`. Setting `--no-production` will
28 +negate `NODE_ENV` being set to `production`.
29 +
30 +If the `--dry-run` flag is used then no changes will actually be made.
31 +
32 +If the `--json` flag is used then the changes `npm prune` made (or would
33 +have made with `--dry-run`) are printed as a JSON object.
34 +
35 +In normal operation with package-locks enabled, extraneous modules are
36 +pruned automatically when modules are installed and you'll only need
37 +this command with the `--production` flag.
38 +
39 +If you've disabled package-locks then extraneous modules will not be removed
40 +and it's up to you to run `npm prune` from time-to-time to remove them.
41 +
42 +### See Also
43 +
44 +* [npm uninstall](/cli/v6/commands/npm-uninstall)
45 +* [npm folders](/cli/v6/configuring-npm/folders)
46 +* [npm ls](/cli/v6/commands/npm-ls)
content/cli/v6/commands/npm-publish.md new
+81
@@ -0,0 +1,81 @@
1 +---
2 +title: npm-publish
3 +section: 1
4 +description: Publish a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-publish.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]
14 +
15 +Publishes '.' if no argument supplied
16 +Sets tag 'latest' if no --tag specified
17 +```
18 +
19 +### Description
20 +
21 +Publishes a package to the registry so that it can be installed by name. All
22 +files in the package directory are included if no local `.gitignore` or
23 +`.npmignore` file exists. If both files exist and a file is ignored by
24 +`.gitignore` but not by `.npmignore` then it will be included. See
25 +[`developers`](/cli/v6/using-npm/developers) for full details on what's included in the published package, as well as details on how the package is built.
26 +
27 +By default npm will publish to the public registry. This can be overridden by
28 +specifying a different default registry or using a [`scope`](/cli/v6/using-npm/scope) in the name (see [`package.json`](/cli/v6/configuring-npm/package-json)).
29 +
30 +* `<folder>`:
31 + A folder containing a package.json file
32 +
33 +* `<tarball>`:
34 + A url or file path to a gzipped tar archive containing a single folder
35 + with a package.json file inside.
36 +
37 +* `[--tag <tag>]`
38 + Registers the published package with the given tag, such that
39 + `npm install <name>@<tag>` will install this version. By default,
40 + `npm publish` updates and `npm install` installs the `latest` tag. See
41 + [`npm-dist-tag`](npm-dist-tag) for details about tags.
42 +
43 +* `[--access <public|restricted>]`
44 + Tells the registry whether this package should be published as public or
45 + restricted. Only applies to scoped packages, which default to `restricted`.
46 + If you don't have a paid account, you must publish with `--access public`
47 + to publish scoped packages.
48 +
49 +* `[--otp <otpcode>]`
50 + If you have two-factor authentication enabled in `auth-and-writes` mode
51 + then you can provide a code from your authenticator with this. If you
52 + don't include this and you're running from a TTY then you'll be prompted.
53 +
54 +* `[--dry-run]`
55 + As of `npm@6`, does everything publish would do except actually publishing
56 + to the registry. Reports the details of what would have been published.
57 +
58 +Fails if the package name and version combination already exists in
59 +the specified registry.
60 +
61 +Once a package is published with a given name and version, that
62 +specific name and version combination can never be used again, even if
63 +it is removed with [`npm unpublish`](/cli/v6/commands/npm-unpublish).
64 +
65 +As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the
66 +tarball will be submitted to the registry during publication. Subsequent
67 +installs will use the strongest supported algorithm to verify downloads.
68 +
69 +Similar to `--dry-run` see [`npm pack`](/cli/v6/commands/npm-pack), which figures out the files to be
70 +included and packs them into a tarball to be uploaded to the registry.
71 +
72 +### See Also
73 +
74 +* [npm registry](/cli/v6/using-npm/registry)
75 +* [npm scope](/cli/v6/using-npm/scope)
76 +* [npm adduser](/cli/v6/commands/npm-adduser)
77 +* [npm owner](/cli/v6/commands/npm-owner)
78 +* [npm deprecate](/cli/v6/commands/npm-deprecate)
79 +* [npm dist-tag](/cli/v6/commands/npm-dist-tag)
80 +* [npm pack](/cli/v6/commands/npm-pack)
81 +* [npm profile](/cli/v6/commands/npm-profile)
content/cli/v6/commands/npm-rebuild.md new
+25
@@ -0,0 +1,25 @@
1 +---
2 +title: npm-rebuild
3 +section: 1
4 +description: Rebuild a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-rebuild.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm rebuild [[<@scope>/<name>]...]
14 +
15 +alias: npm rb
16 +```
17 +
18 +### Description
19 +
20 +This command runs the `npm build` command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.
21 +
22 +### See Also
23 +
24 +* [npm build](/cli/v6/commands/npm-build)
25 +* [npm install](/cli/v6/commands/npm-install)
content/cli/v6/commands/npm-repo.md new
+35
@@ -0,0 +1,35 @@
1 +---
2 +title: npm-repo
3 +section: 1
4 +description: Open package repository page in the browser
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-repo.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm repo [<pkg>]
14 +```
15 +
16 +### Description
17 +
18 +This command tries to guess at the likely location of a package's
19 +repository URL, and then tries to open it using the `--browser`
20 +config param. If no package name is provided, it will search for
21 +a `package.json` in the current folder and use the `name` property.
22 +
23 +### Configuration
24 +
25 +#### browser
26 +
27 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
28 +* Type: String
29 +
30 +The browser that is called by the `npm repo` command to open websites.
31 +
32 +### See Also
33 +
34 +* [npm docs](/cli/v6/commands/npm-docs)
35 +* [npm config](/cli/v6/commands/npm-config)
content/cli/v6/commands/npm-restart.md new
+48
@@ -0,0 +1,48 @@
1 +---
2 +title: npm-restart
3 +section: 1
4 +description: Restart a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-restart.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm restart [-- <args>]
14 +```
15 +
16 +### Description
17 +
18 +This restarts a package.
19 +
20 +This runs a package's "stop", "restart", and "start" scripts, and associated
21 +pre- and post- scripts, in the order given below:
22 +
23 +1. prerestart
24 +2. prestop
25 +3. stop
26 +4. poststop
27 +5. restart
28 +6. prestart
29 +7. start
30 +8. poststart
31 +9. postrestart
32 +
33 +### Note
34 +
35 +Note that the "restart" script is run **in addition to** the "stop"
36 +and "start" scripts, not instead of them.
37 +
38 +This is the behavior as of `npm` major version 2. A change in this
39 +behavior will be accompanied by an increase in major version number
40 +
41 +### See Also
42 +
43 +* [npm run-script](/cli/v6/commands/npm-run-script)
44 +* [npm scripts](/cli/v6/using-npm/scripts)
45 +* [npm test](/cli/v6/commands/npm-test)
46 +* [npm start](/cli/v6/commands/npm-start)
47 +* [npm stop](/cli/v6/commands/npm-stop)
48 +* [npm restart](/cli/v6/commands/npm-restart)
content/cli/v6/commands/npm-root.md new
+25
@@ -0,0 +1,25 @@
1 +---
2 +title: npm-root
3 +section: 1
4 +description: Display npm root
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-root.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm root [-g]
13 +```
14 +
15 +### Description
16 +
17 +Print the effective `node_modules` folder to standard out.
18 +
19 +### See Also
20 +
21 +* [npm prefix](/cli/v6/commands/npm-prefix)
22 +* [npm bin](/cli/v6/commands/npm-bin)
23 +* [npm folders](/cli/v6/configuring-npm/folders)
24 +* [npm config](/cli/v6/commands/npm-config)
25 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-run-script.md new
+96
@@ -0,0 +1,96 @@
1 +---
2 +title: npm-run-script
3 +section: 1
4 +description: Run arbitrary package scripts
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-run-script.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm run-script <command> [--silent] [-- <args>...]
14 +
15 +alias: npm run
16 +```
17 +
18 +### Description
19 +
20 +This runs an arbitrary command from a package's `"scripts"` object. If no
21 +`"command"` is provided, it will list the available scripts. `run[-script]` is
22 +used by the test, start, restart, and stop commands, but can be called
23 +directly, as well. When the scripts in the package are printed out, they're
24 +separated into lifecycle (test, start, restart) and directly-run scripts.
25 +
26 +As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
27 +use custom arguments when executing scripts. The special option `--` is used by
28 +[getopt](https://goo.gl/KxMmtG) to delimit the end of the options. npm will pass
29 +all the arguments after the `--` directly to your script:
30 +
31 +```bash
32 +npm run test -- --grep="pattern"
33 +```
34 +
35 +The arguments will only be passed to the script specified after ```npm run```
36 +and not to any pre or post script.
37 +
38 +The `env` script is a special built-in command that can be used to list
39 +environment variables that will be available to the script at runtime. If an
40 +"env" command is defined in your package, it will take precedence over the
41 +built-in.
42 +
43 +In addition to the shell's pre-existing `PATH`, `npm run` adds
44 +`node_modules/.bin` to the `PATH` provided to scripts. Any binaries provided by
45 +locally-installed dependencies can be used without the `node_modules/.bin`
46 +prefix. For example, if there is a `devDependency` on `tap` in your package,
47 +you should write:
48 +
49 +```bash
50 +"scripts": {"test": "tap test/\*.js"}
51 +```
52 +
53 +instead of
54 +
55 +```bash
56 +"scripts": {"test": "node_modules/.bin/tap test/\*.js"}
57 +```
58 +
59 +to run your tests.
60 +
61 +The actual shell your script is run within is platform dependent. By default,
62 +on Unix-like systems it is the `/bin/sh` command, on Windows it is the `cmd.exe`.
63 +The actual shell referred to by `/bin/sh` also depends on the system.
64 +As of [`npm@5.1.0`](https://github.com/npm/npm/releases/tag/v5.1.0) you can
65 +customize the shell with the `script-shell` configuration.
66 +
67 +Scripts are run from the root of the module, regardless of what your current
68 +working directory is when you call `npm run`. If you want your script to
69 +use different behavior based on what subdirectory you're in, you can use the
70 +`INIT_CWD` environment variable, which holds the full path you were in when
71 +you ran `npm run`.
72 +
73 +`npm run` sets the `NODE` environment variable to the `node` executable with
74 +which `npm` is executed. Also, if the `--scripts-prepend-node-path` is passed,
75 +the directory within which `node` resides is added to the
76 +`PATH`. If `--scripts-prepend-node-path=auto` is passed (which has been the
77 +default in `npm` v3), this is only performed when that `node` executable is
78 +not found in the `PATH`.
79 +
80 +If you try to run a script without having a `node_modules` directory and it fails,
81 +you will be given a warning to run `npm install`, just in case you've forgotten.
82 +
83 +You can use the `--silent` flag to prevent showing `npm ERR!` output on error.
84 +
85 +You can use the `--if-present` flag to avoid exiting with a non-zero exit code
86 +when the script is undefined. This lets you run potentially undefined scripts
87 +without breaking the execution chain.
88 +
89 +### See Also
90 +
91 +* [npm scripts](/cli/v6/using-npm/scripts)
92 +* [npm test](/cli/v6/commands/npm-test)
93 +* [npm start](/cli/v6/commands/npm-start)
94 +* [npm restart](/cli/v6/commands/npm-restart)
95 +* [npm stop](/cli/v6/commands/npm-stop)
96 +* [npm config](/cli/v6/commands/npm-config)
content/cli/v6/commands/npm-search.md new
+113
@@ -0,0 +1,113 @@
1 +---
2 +title: npm-search
3 +section: 1
4 +description: Search for packages
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-search.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]
14 +
15 +aliases: s, se, find
16 +```
17 +
18 +### Description
19 +
20 +Search the registry for packages matching the search terms. `npm search`
21 +performs a linear, incremental, lexically-ordered search through package
22 +metadata for all files in the registry. If color is enabled, it will further
23 +highlight the matches in the results.
24 +
25 +Additionally, using the `--searchopts` and `--searchexclude` options paired with
26 +more search terms will respectively include and exclude further patterns. The
27 +main difference between `--searchopts` and the standard search terms is that the
28 +former does not highlight results in the output and can be used for more
29 +fine-grained filtering. Additionally, both of these can be added to `.npmrc` for
30 +default search filtering behavior.
31 +
32 +Search also allows targeting of maintainers in search results, by prefixing
33 +their npm username with `=`.
34 +
35 +If a term starts with `/`, then it's interpreted as a regular expression and
36 +supports standard JavaScript RegExp syntax. A trailing `/` will be ignored in
37 +this case. (Note that many regular expression characters must be escaped or
38 +quoted in most shells.)
39 +
40 +### A Note on caching
41 +
42 +### Configuration
43 +
44 +#### description
45 +
46 +* Default: true
47 +* Type: Boolean
48 +
49 +Used as `--no-description`, disables search matching in package descriptions and
50 +suppresses display of that field in results.
51 +
52 +#### json
53 +
54 +* Default: false
55 +* Type: Boolean
56 +
57 +Output search results as a JSON array.
58 +
59 +#### parseable
60 +
61 +* Default: false
62 +* Type: Boolean
63 +
64 +Output search results as lines with tab-separated columns.
65 +
66 +#### long
67 +
68 +* Default: false
69 +* Type: Boolean
70 +
71 +Display full package descriptions and other long text across multiple
72 +lines. When disabled (default) search results are truncated to fit
73 +neatly on a single line. Modules with extremely long names will
74 +fall on multiple lines.
75 +
76 +#### searchopts
77 +
78 +* Default: ""
79 +* Type: String
80 +
81 +Space-separated options that are always passed to search.
82 +
83 +#### searchexclude
84 +
85 +* Default: ""
86 +* Type: String
87 +
88 +Space-separated options that limit the results from search.
89 +
90 +#### searchstaleness
91 +
92 +* Default: 900 (15 minutes)
93 +* Type: Number
94 +
95 +The age of the cache, in seconds, before another registry request is made.
96 +
97 +#### registry
98 +
99 + * Default: https://registry.npmjs.org/
100 + * Type: url
101 +
102 +Search the specified registry for modules. If you have configured npm to point
103 +to a different default registry, such as your internal private module
104 +repository, `npm search` will default to that registry when searching. Pass a
105 +different registry url such as the default above in order to override this
106 +setting.
107 +
108 +### See Also
109 +
110 +* [npm registry](/cli/v6/using-npm/registry)
111 +* [npm config](/cli/v6/commands/npm-config)
112 +* [npmrc](/cli/v6/configuring-npm/npmrc)
113 +* [npm view](/cli/v6/commands/npm-view)
content/cli/v6/commands/npm-shrinkwrap.md new
+33
@@ -0,0 +1,33 @@
1 +---
2 +title: npm-shrinkwrap
3 +section: 1
4 +description: Lock down dependency versions for publication
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-shrinkwrap.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm shrinkwrap
14 +```
15 +
16 +### Description
17 +
18 +This command repurposes `package-lock.json` into a publishable
19 +`npm-shrinkwrap.json` or simply creates a new one. The file created and updated
20 +by this command will then take precedence over any other existing or future
21 +`package-lock.json` files. For a detailed explanation of the design and purpose
22 +of package locks in npm, see [package-locks](/cli/v6/configuring-npm/package-locks).
23 +
24 +### See Also
25 +
26 +* [npm install](/cli/v6/commands/npm-install)
27 +* [npm run-script](/cli/v6/commands/npm-run-script)
28 +* [npm scripts](/cli/v6/using-npm/scripts)
29 +* [package.js](/cli/v6/configuring-npm/package-json)
30 +* [package-locks](/cli/v6/configuring-npm/package-locks)
31 +* [package-lock.json](/cli/v6/configuring-npm/package-lock-json)
32 +* [shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json)
33 +* [npm ls](/cli/v6/commands/npm-ls)
content/cli/v6/commands/npm-star.md new
+30
@@ -0,0 +1,30 @@
1 +---
2 +title: npm-star
3 +section: 1
4 +description: Mark your favorite packages
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-star.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm star [<pkg>...]
14 +npm unstar [<pkg>...]
15 +```
16 +
17 +### Description
18 +
19 +"Starring" a package means that you have some interest in it. It's
20 +a vaguely positive way to show that you care.
21 +
22 +"Unstarring" is the same thing, but in reverse.
23 +
24 +It's a boolean thing. Starring repeatedly has no additional effect.
25 +
26 +### See Also
27 +
28 +* [npm view](/cli/v6/commands/npm-view)
29 +* [npm whoami](/cli/v6/commands/npm-whoami)
30 +* [npm adduser](/cli/v6/commands/npm-adduser)
content/cli/v6/commands/npm-stars.md new
+28
@@ -0,0 +1,28 @@
1 +---
2 +title: npm-stars
3 +section: 1
4 +description: View packages marked as favorites
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-stars.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 +npm stars [<user>]
13 +```
14 +
15 +### Description
16 +
17 +If you have starred a lot of neat things and want to find them again
18 +quickly this command lets you do just that.
19 +
20 +You may also want to see your friend's favorite packages, in this case
21 +you will most certainly enjoy this command.
22 +
23 +### See Also
24 +
25 +* [npm star](/cli/v6/commands/npm-star)
26 +* [npm view](/cli/v6/commands/npm-view)
27 +* [npm whoami](/cli/v6/commands/npm-whoami)
28 +* [npm adduser](/cli/v6/commands/npm-adduser)
content/cli/v6/commands/npm-start.md new
+31
@@ -0,0 +1,31 @@
1 +---
2 +title: npm-start
3 +section: 1
4 +description: Start a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-start.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm start [-- <args>]
14 +```
15 +
16 +### Description
17 +
18 +This runs an arbitrary command specified in the package's `"start"` property of
19 +its `"scripts"` object. If no `"start"` property is specified on the
20 +`"scripts"` object, it will run `node server.js`.
21 +
22 +As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
23 +use custom arguments when executing scripts. Refer to [`npm run-script`](/cli/v6/commands/npm-run-script) for more details.
24 +
25 +### See Also
26 +
27 +* [npm run-script](/cli/v6/commands/npm-run-script)
28 +* [npm scripts](/cli/v6/using-npm/scripts)
29 +* [npm test](/cli/v6/commands/npm-test)
30 +* [npm restart](/cli/v6/commands/npm-restart)
31 +* [npm stop](/cli/v6/commands/npm-stop)
content/cli/v6/commands/npm-stop.md new
+26
@@ -0,0 +1,26 @@
1 +---
2 +title: npm-stop
3 +section: 1
4 +description: Stop a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-stop.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm stop [-- <args>]
14 +```
15 +
16 +### Description
17 +
18 +This runs a package's "stop" script, if one was provided.
19 +
20 +### See Also
21 +
22 +* [npm run-script](/cli/v6/commands/npm-run-script)
23 +* [npm scripts](/cli/v6/using-npm/scripts)
24 +* [npm test](/cli/v6/commands/npm-test)
25 +* [npm start](/cli/v6/commands/npm-start)
26 +* [npm restart](/cli/v6/commands/npm-restart)
content/cli/v6/commands/npm-team.md new
+65
@@ -0,0 +1,65 @@
1 +---
2 +title: npm-team
3 +section: 1
4 +description: Manage organization teams and team memberships
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-team.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm team create <scope:team>
14 +npm team destroy <scope:team>
15 +
16 +npm team add <scope:team> <user>
17 +npm team rm <scope:team> <user>
18 +
19 +npm team ls <scope>|<scope:team>
20 +
21 +npm team edit <scope:team>
22 +```
23 +
24 +### Description
25 +
26 +Used to manage teams in organizations, and change team memberships. Does not
27 +handle permissions for packages.
28 +
29 +Teams must always be fully qualified with the organization/scope they belong to
30 +when operating on them, separated by a colon (`:`). That is, if you have a `wombats` team in a `wisdom` organization, you must always refer to that team as `wisdom:wombats` in these commands.
31 +
32 +If you have two-factor authentication enabled in `auth-and-writes` mode, then you can provide a code from your authenticator with `[--otp <otpcode>]`. If you don't include this then you will be prompted.
33 +
34 +* create / destroy:
35 + Create a new team, or destroy an existing one. Note: You cannot remove the `developers` team, <a href="https://docs.npmjs.com/about-developers-team" target="_blank">learn more.</a>
36 +* add / rm:
37 + Add a user to an existing team, or remove a user from a team they belong to.
38 +
39 +* ls:
40 + If performed on an organization name, will return a list of existing teams
41 + under that organization. If performed on a team, it will instead return a list
42 + of all users belonging to that particular team.
43 +
44 +* edit:
45 + Edit a current team.
46 +
47 +### Details
48 +
49 +`npm team` always operates directly on the current registry, configurable from
50 +the command line using `--registry=<registry url>`.
51 +
52 +In order to create teams and manage team membership, you must be a *team admin*
53 +under the given organization. Listing teams and team memberships may be done by
54 +any member of the organizations.
55 +
56 +Organization creation and management of team admins and *organization* members
57 +is done through the website, not the npm CLI.
58 +
59 +To use teams to manage permissions on packages belonging to your organization,
60 +use the `npm access` command to grant or revoke the appropriate permissions.
61 +
62 +### See Also
63 +
64 +* [npm access](/cli/v6/commands/npm-access)
65 +* [npm registry](/cli/v6/using-npm/registry)
content/cli/v6/commands/npm-test.md new
+28
@@ -0,0 +1,28 @@
1 +---
2 +title: npm-test
3 +section: 1
4 +description: Test a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-test.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm test [-- <args>]
14 +
15 +aliases: t, tst
16 +```
17 +
18 +### Description
19 +
20 +This runs a package's "test" script, if one was provided.
21 +
22 +### See Also
23 +
24 +* [npm run-script](/cli/v6/commands/npm-run-script)
25 +* [npm scripts](/cli/v6/using-npm/scripts)
26 +* [npm start](/cli/v6/commands/npm-start)
27 +* [npm restart](/cli/v6/commands/npm-restart)
28 +* [npm stop](/cli/v6/commands/npm-stop)
content/cli/v6/commands/npm-token.md new
+67
@@ -0,0 +1,67 @@
1 +---
2 +title: npm-token
3 +section: 1
4 +description: Manage your authentication tokens
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-token.md
8 +---
9 +
10 +### Synopsis
11 +```bash
12 + npm token list [--json|--parseable]
13 + npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]
14 + npm token revoke <id|token>
15 + ```
16 +
17 +### Description
18 +
19 +This lets you list, create and revoke authentication tokens.
20 +
21 +* `npm token list`:
22 + Shows a table of all active authentication tokens. You can request this as
23 + JSON with `--json` or tab-separated values with `--parseable`.
24 +
25 +```bash
26 ++--------+---------+------------+----------+----------------+
27 +| id | token | created | read-only | CIDR whitelist |
28 ++--------+---------+------------+----------+----------------+
29 +| 7f3134 | 1fa9ba… | 2017-10-02 | yes | |
30 ++--------+---------+------------+----------+----------------+
31 +| c03241 | af7aef… | 2017-10-02 | no | 192.168.0.1/24 |
32 ++--------+---------+------------+----------+----------------+
33 +| e0cf92 | 3a436a… | 2017-10-02 | no | |
34 ++--------+---------+------------+----------+----------------+
35 +| 63eb9d | 74ef35… | 2017-09-28 | no | |
36 ++--------+---------+------------+----------+----------------+
37 +| 2daaa8 | cbad5f… | 2017-09-26 | no | |
38 ++--------+---------+------------+----------+----------------+
39 +| 68c2fe | 127e51… | 2017-09-23 | no | |
40 ++--------+---------+------------+----------+----------------+
41 +| 6334e1 | 1dadd1… | 2017-09-23 | no | |
42 ++--------+---------+------------+----------+----------------+
43 +```
44 +
45 +* `npm token create [--read-only] [--cidr=<cidr-ranges>]`:
46 + Create a new authentication token. It can be `--read-only` or accept a list of
47 + [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) ranges to
48 + limit use of this token to. This will prompt you for your password, and, if you have
49 + two-factor authentication enabled, an otp.
50 +
51 +```bash
52 ++----------------+--------------------------------------+
53 +| token | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
54 ++----------------+--------------------------------------+
55 +| cidr_whitelist | |
56 ++----------------+--------------------------------------+
57 +| readonly | false |
58 ++----------------+--------------------------------------+
59 +| created | 2017-10-02T07:52:24.838Z |
60 ++----------------+--------------------------------------+
61 +```
62 +
63 +* `npm token revoke <token|id>`:
64 + This removes an authentication token, making it immediately unusable. This can accept
65 + both complete tokens (as you get back from `npm token create` and will
66 + find in your `.npmrc`) and ids as seen in the `npm token list` output.
67 + This will NOT accept the truncated token found in `npm token list` output.
content/cli/v6/commands/npm-uninstall.md new
+63
@@ -0,0 +1,63 @@
1 +---
2 +title: npm-uninstall
3 +section: 1
4 +description: Remove a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-uninstall.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|-D|--save-dev|-O|--save-optional|--no-save]
14 +
15 +aliases: remove, rm, r, un, unlink
16 +```
17 +
18 +### Description
19 +
20 +This uninstalls a package, completely removing everything npm installed
21 +on its behalf.
22 +
23 +Example:
24 +
25 +```bash
26 +npm uninstall sax
27 +```
28 +
29 +In global mode (ie, with `-g` or `--global` appended to the command),
30 +it uninstalls the current package context as a global package.
31 +
32 +`npm uninstall` takes 3 exclusive, optional flags which save or update
33 +the package version in your main package.json:
34 +
35 +* `-S, --save`: Package will be removed from your `dependencies`.
36 +
37 +* `-D, --save-dev`: Package will be removed from your `devDependencies`.
38 +
39 +* `-O, --save-optional`: Package will be removed from your `optionalDependencies`.
40 +
41 +* `--no-save`: Package will not be removed from your `package.json` file.
42 +
43 +Further, if you have an `npm-shrinkwrap.json` then it will be updated as
44 +well.
45 +
46 +Scope is optional and follows the usual rules for [`scope`](/cli/v6/using-npm/scope).
47 +
48 +Examples:
49 +```bash
50 +npm uninstall sax --save
51 +npm uninstall @myorg/privatepackage --save
52 +npm uninstall node-tap --save-dev
53 +npm uninstall dtrace-provider --save-optional
54 +npm uninstall lodash --no-save
55 +```
56 +
57 +### See Also
58 +
59 +* [npm prune](/cli/v6/commands/npm-prune)
60 +* [npm install](/cli/v6/commands/npm-install)
61 +* [npm folders](/cli/v6/configuring-npm/folders)
62 +* [npm config](/cli/v6/commands/npm-config)
63 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/commands/npm-unpublish.md new
+49
@@ -0,0 +1,49 @@
1 +---
2 +title: npm-unpublish
3 +section: 1
4 +description: Remove a package from the registry
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-unpublish.md
8 +---
9 +
10 +### Synopsis
11 +
12 +#### Unpublishing a single version of a package
13 +
14 +```bash
15 +npm unpublish [<@scope>/]<pkg>@<version>
16 +```
17 +
18 +#### Unpublishing an entire package
19 +
20 +```bash
21 +npm unpublish [<@scope>/]<pkg> --force
22 +```
23 +
24 +### Warning
25 +
26 +Consider using the `deprecate` command instead, if your intent is to encourage users to upgrade, or if you no longer want to maintain a package.
27 +
28 +### Description
29 +
30 +This removes a package version from the registry, deleting its
31 +entry and removing the tarball.
32 +
33 +If no version is specified, or if all versions are removed then
34 +the root package entry is removed from the registry entirely.
35 +
36 +Even if a package version is unpublished, that specific name and
37 +version combination can never be reused. In order to publish the
38 +package again, a new version number must be used. If you unpublish the entire package, you may not publish any new versions of that package until 24 hours have passed.
39 +
40 +To learn more about how unpublish is treated on the npm registry, see our <a href="https://www.npmjs.com/policies/unpublish" target="_blank" rel="noopener noreferrer"> unpublish policies</a>.
41 +
42 +
43 +### See Also
44 +
45 +* [npm deprecate](/cli/v6/commands/npm-deprecate)
46 +* [npm publish](/cli/v6/commands/npm-publish)
47 +* [npm registry](/cli/v6/using-npm/registry)
48 +* [npm adduser](/cli/v6/commands/npm-adduser)
49 +* [npm owner](/cli/v6/commands/npm-owner)
content/cli/v6/commands/npm-update.md new
+139
@@ -0,0 +1,139 @@
1 +---
2 +title: npm-update
3 +section: 1
4 +description: Update a package
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-update.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm update [-g] [<pkg>...]
14 +
15 +aliases: up, upgrade
16 +```
17 +
18 +### Description
19 +
20 +This command will update all the packages listed to the latest version
21 +(specified by the `tag` config), respecting semver.
22 +
23 +It will also install missing packages. As with all commands that install
24 +packages, the `--dev` flag will cause `devDependencies` to be processed
25 +as well.
26 +
27 +If the `-g` flag is specified, this command will update globally installed
28 +packages.
29 +
30 +If no package name is specified, all packages in the specified location (global
31 +or local) will be updated.
32 +
33 +As of `npm@2.6.1`, the `npm update` will only inspect top-level packages.
34 +Prior versions of `npm` would also recursively inspect all dependencies.
35 +To get the old behavior, use `npm --depth 9999 update`.
36 +
37 +As of `npm@5.0.0`, the `npm update` will change `package.json` to save the
38 +new version as the minimum required dependency. To get the old behavior,
39 +use `npm update --no-save`.
40 +
41 +### Example
42 +
43 +IMPORTANT VERSION NOTE: these examples assume `npm@2.6.1` or later. For
44 +older versions of `npm`, you must specify `--depth 0` to get the behavior
45 +described below.
46 +
47 +For the examples below, assume that the current package is `app` and it depends
48 +on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` are:
49 +
50 +```json
51 +{
52 + "dist-tags": { "latest": "1.2.2" },
53 + "versions": [
54 + "1.2.2",
55 + "1.2.1",
56 + "1.2.0",
57 + "1.1.2",
58 + "1.1.1",
59 + "1.0.0",
60 + "0.4.1",
61 + "0.4.0",
62 + "0.2.0"
63 + ]
64 +}
65 +```
66 +
67 +#### Caret Dependencies
68 +
69 +If `app`'s `package.json` contains:
70 +
71 +```json
72 +"dependencies": {
73 + "dep1": "^1.1.1"
74 +}
75 +```
76 +
77 +Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and
78 +`1.2.2` satisfies `^1.1.1`.
79 +
80 +#### Tilde Dependencies
81 +
82 +However, if `app`'s `package.json` contains:
83 +
84 +```json
85 +"dependencies": {
86 + "dep1": "~1.1.1"
87 +}
88 +```
89 +
90 +In this case, running `npm update` will install `dep1@1.1.2`. Even though the `latest`
91 +tag points to `1.2.2`, this version does not satisfy `~1.1.1`, which is equivalent
92 +to `>=1.1.1 <1.2.0`. So the highest-sorting version that satisfies `~1.1.1` is used,
93 +which is `1.1.2`.
94 +
95 +#### Caret Dependencies below 1.0.0
96 +
97 +Suppose `app` has a caret dependency on a version below `1.0.0`, for example:
98 +
99 +```json
100 +"dependencies": {
101 + "dep1": "^0.2.0"
102 +}
103 +```
104 +
105 +`npm update` will install `dep1@0.2.0`, because there are no other
106 +versions which satisfy `^0.2.0`.
107 +
108 +If the dependence were on `^0.4.0`:
109 +
110 +```json
111 +"dependencies": {
112 + "dep1": "^0.4.0"
113 +}
114 +```
115 +
116 +Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting
117 +version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)
118 +
119 +
120 +#### Updating Globally-Installed Packages
121 +
122 +`npm update -g` will apply the `update` action to each globally installed
123 +package that is `outdated` -- that is, has a version that is different from
124 +`wanted`.
125 +
126 +Note: Globally installed packages are treated as if they are installed with a caret semver range specified. So if you require to update to `latest` you may need to run `npm install -g [<pkg>...]`
127 +
128 +NOTE: If a package has been upgraded to a version newer than `latest`, it will
129 +be _downgraded_.
130 +
131 +
132 +### See Also
133 +
134 +* [npm install](/cli/v6/commands/npm-install)
135 +* [npm outdated](/cli/v6/commands/npm-outdated)
136 +* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)
137 +* [npm registry](/cli/v6/using-npm/registry)
138 +* [npm folders](/cli/v6/configuring-npm/folders)
139 +* [npm ls](/cli/v6/commands/npm-ls)
content/cli/v6/commands/npm-version.md new
+133
@@ -0,0 +1,133 @@
1 +---
2 +title: npm-version
3 +section: 1
4 +description: Bump a package version
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-version.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
14 +
15 +'npm [-v | --version]' to print npm version
16 +'npm view <pkg> version' to view a package's published version
17 +'npm ls' to inspect current package/dependency versions
18 +```
19 +
20 +### Description
21 +
22 +Run this in a package directory to bump the version and write the new
23 +data back to `package.json`, `package-lock.json`, and, if present, `npm-shrinkwrap.json`.
24 +
25 +The `newversion` argument should be a valid semver string, a
26 +valid second argument to [semver.inc](https://github.com/npm/node-semver#functions) (one of `patch`, `minor`, `major`,
27 +`prepatch`, `preminor`, `premajor`, `prerelease`), or `from-git`. In the second case,
28 +the existing version will be incremented by 1 in the specified field.
29 +`from-git` will try to read the latest git tag, and use that as the new npm version.
30 +
31 +If run in a git repo, it will also create a version commit and tag.
32 +This behavior is controlled by `git-tag-version` (see below), and can
33 +be disabled on the command line by running `npm --no-git-tag-version version`.
34 +It will fail if the working directory is not clean, unless the `-f` or
35 +`--force` flag is set.
36 +
37 +If supplied with `-m` or `--message` config option, npm will
38 +use it as a commit message when creating a version commit. If the
39 +`message` config contains `%s` then that will be replaced with the
40 +resulting version number. For example:
41 +
42 +```bash
43 +npm version patch -m "Upgrade to %s for reasons"
44 +```
45 +
46 +If the `sign-git-tag` config is set, then the tag will be signed using
47 +the `-s` flag to git. Note that you must have a default GPG key set up
48 +in your git config for this to work properly. For example:
49 +
50 +```bash
51 +$ npm config set sign-git-tag true
52 +$ npm version patch
53 +
54 +You need a passphrase to unlock the secret key for
55 +user: "isaacs (http://blog.izs.me/) <i@izs.me>"
56 +2048-bit RSA key, ID 6C481CF6, created 2010-08-31
57 +
58 +Enter passphrase:
59 +```
60 +
61 +If `preversion`, `version`, or `postversion` are in the `scripts` property of
62 +the package.json, they will be executed as part of running `npm version`.
63 +
64 +The exact order of execution is as follows:
65 + 1. Check to make sure the git working directory is clean before we get started.
66 + Your scripts may add files to the commit in future steps.
67 + This step is skipped if the `--force` flag is set.
68 + 2. Run the `preversion` script. These scripts have access to the old `version` in package.json.
69 + A typical use would be running your full test suite before deploying.
70 + Any files you want added to the commit should be explicitly added using `git add`.
71 + 3. Bump `version` in `package.json` as requested (`patch`, `minor`, `major`, etc).
72 + 4. Run the `version` script. These scripts have access to the new `version` in package.json
73 + (so they can incorporate it into file headers in generated files for example).
74 + Again, scripts should explicitly add generated files to the commit using `git add`.
75 + 5. Commit and tag.
76 + 6. Run the `postversion` script. Use it to clean up the file system or automatically push
77 + the commit and/or tag.
78 +
79 +Take the following example:
80 +
81 +```json
82 + "scripts": {
83 + "preversion": "npm test",
84 + "version": "npm run build && git add -A dist",
85 + "postversion": "git push && git push --tags && rm -rf build/temp"
86 + }
87 +```
88 +
89 +This runs all your tests, and proceeds only if they pass. Then runs your `build` script, and
90 +adds everything in the `dist` directory to the commit. After the commit, it pushes the new commit
91 +and tag up to the server, and deletes the `build/temp` directory.
92 +
93 +### Configuration
94 +
95 +#### allow-same-version
96 +
97 +* Default: false
98 +* Type: Boolean
99 +
100 +Prevents throwing an error when `npm version` is used to set the new version
101 +to the same value as the current version.
102 +
103 +#### git-tag-version
104 +
105 +* Default: true
106 +* Type: Boolean
107 +
108 +Commit and tag the version change.
109 +
110 +#### commit-hooks
111 +
112 +* Default: true
113 +* Type: Boolean
114 +
115 +Run git commit hooks when committing the version change.
116 +
117 +#### sign-git-tag
118 +
119 +* Default: false
120 +* Type: Boolean
121 +
122 +Pass the `-s` flag to git to sign the tag.
123 +
124 +Note that you must have a default GPG key set up in your git config for this to work properly.
125 +
126 +### See Also
127 +
128 +* [npm init](/cli/v6/commands/npm-init)
129 +* [npm run-script](/cli/v6/commands/npm-run-script)
130 +* [npm scripts](/cli/v6/using-npm/scripts)
131 +* [package.json](/cli/v6/configuring-npm/package-json)
132 +* [semver](/cli/v6/using-npm/semver)
133 +* [config](/cli/v6/using-npm/config)
content/cli/v6/commands/npm-view.md new
+123
@@ -0,0 +1,123 @@
1 +---
2 +title: npm-view
3 +section: 1
4 +description: View registry info
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-view.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]
14 +
15 +aliases: info, show, v
16 +```
17 +
18 +### Description
19 +
20 +This command shows data about a package and prints it to the stream
21 +referenced by the `outfd` config, which defaults to stdout.
22 +
23 +To show the package registry entry for the `connect` package, you can do
24 +this:
25 +
26 +```bash
27 +npm view connect
28 +```
29 +
30 +The default version is "latest" if unspecified.
31 +
32 +Field names can be specified after the package descriptor.
33 +For example, to show the dependencies of the `ronn` package at version
34 +0.3.5, you could do the following:
35 +
36 +```bash
37 +npm view ronn@0.3.5 dependencies
38 +```
39 +
40 +You can view child fields by separating them with a period.
41 +To view the git repository URL for the latest version of npm, you could
42 +do this:
43 +
44 +```bash
45 +npm view npm repository.url
46 +```
47 +
48 +This makes it easy to view information about a dependency with a bit of
49 +shell scripting. For example, to view all the data about the version of
50 +opts that ronn depends on, you can do this:
51 +
52 +```bash
53 +npm view opts@$(npm view ronn dependencies.opts)
54 +```
55 +
56 +For fields that are arrays, requesting a non-numeric field will return
57 +all of the values from the objects in the list. For example, to get all
58 +the contributor names for the "express" project, you can do this:
59 +
60 +```bash
61 +npm view express contributors.email
62 +```
63 +
64 +You may also use numeric indices in square braces to specifically select
65 +an item in an array field. To just get the email address of the first
66 +contributor in the list, you can do this:
67 +
68 +```bash
69 +npm view express contributors[0].email
70 +```
71 +
72 +Multiple fields may be specified, and will be printed one after another.
73 +For example, to get all the contributor names and email addresses, you
74 +can do this:
75 +
76 +```bash
77 +npm view express contributors.name contributors.email
78 +```
79 +
80 +"Person" fields are shown as a string if they would be shown as an
81 +object. So, for example, this will show the list of npm contributors in
82 +the shortened string format. (See [`package.json`](/cli/v6/configuring-npm/package-json) for more on this.)
83 +
84 +```bash
85 +npm view npm contributors
86 +```
87 +
88 +If a version range is provided, then data will be printed for every
89 +matching version of the package. This will show which version of jsdom
90 +was required by each matching version of yui3:
91 +
92 +```bash
93 +npm view yui3@'>0.5.4' dependencies.jsdom
94 +```
95 +
96 +To show the `connect` package version history, you can do
97 +this:
98 +
99 +```bash
100 +npm view connect versions
101 +```
102 +
103 +### Output
104 +
105 +If only a single string field for a single version is output, then it
106 +will not be colorized or quoted, so as to enable piping the output to
107 +another command. If the field is an object, it will be output as a JavaScript object literal.
108 +
109 +If the --json flag is given, the outputted fields will be JSON.
110 +
111 +If the version range matches multiple versions, than each printed value
112 +will be prefixed with the version it applies to.
113 +
114 +If multiple fields are requested, than each of them are prefixed with
115 +the field name.
116 +
117 +### See Also
118 +
119 +* [npm search](/cli/v6/commands/npm-search)
120 +* [npm registry](/cli/v6/using-npm/registry)
121 +* [npm config](/cli/v6/commands/npm-config)
122 +* [npmrc](/cli/v6/configuring-npm/npmrc)
123 +* [npm docs](/cli/v6/commands/npm-docs)
content/cli/v6/commands/npm-whoami.md new
+24
@@ -0,0 +1,24 @@
1 +---
2 +title: npm-whoami
3 +section: 1
4 +description: Display npm username
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm-whoami.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm whoami [--registry <registry>]
14 +```
15 +
16 +### Description
17 +
18 +Print the `username` config to standard output.
19 +
20 +### See Also
21 +
22 +* [npm config](/cli/v6/commands/npm-config)
23 +* [npmrc](/cli/v6/configuring-npm/npmrc)
24 +* [npm adduser](/cli/v6/commands/npm-adduser)
content/cli/v6/commands/npm.md new
+167
@@ -0,0 +1,167 @@
1 +---
2 +title: npm
3 +section: 1
4 +description: javascript package manager
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/commands/npm.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm <command> [args]
14 +```
15 +
16 +### Version
17 +
18 +6.0.0
19 +
20 +### Description
21 +
22 +npm is the package manager for the Node JavaScript platform. It puts
23 +modules in place so that node can find them, and manages dependency
24 +conflicts intelligently.
25 +
26 +It is extremely configurable to support a wide variety of use cases.
27 +Most commonly, it is used to publish, discover, install, and develop node
28 +programs.
29 +
30 +Run `npm help` to get a list of available commands.
31 +
32 +### Important
33 +
34 +npm is configured to use npm, Inc.'s public registry at
35 +https://registry.npmjs.org by default. Use of the npm public registry is
36 +subject to terms of use available at https://www.npmjs.com/policies/terms.
37 +
38 +You can configure npm to use any compatible registry you like, and even run
39 +your own registry. Use of someone else's registry may be governed by their
40 +terms of use.
41 +
42 +### Introduction
43 +
44 +You probably got npm because you want to install stuff.
45 +
46 +Use `npm install blerg` to install the latest version of "blerg". Check out
47 +[`npm install`](/cli/v6/commands/npm-install) for more info. It can do a lot of stuff.
48 +
49 +Use the `npm search` command to show everything that's available.
50 +Use `npm ls` to show everything you've installed.
51 +
52 +### Dependencies
53 +
54 +If a package references to another package with a git URL, npm depends
55 +on a preinstalled git.
56 +
57 +If one of the packages npm tries to install is a native node module and
58 +requires compiling of C++ Code, npm will use
59 +[node-gyp](https://github.com/nodejs/node-gyp) for that task.
60 +For a Unix system, [node-gyp](https://github.com/nodejs/node-gyp)
61 +needs Python, make and a buildchain like GCC. On Windows,
62 +Python and Microsoft Visual Studio C++ are needed.
63 +For more information visit
64 +[the node-gyp repository](https://github.com/nodejs/node-gyp) and
65 +the [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki).
66 +
67 +### Directories
68 +
69 +See [`folders`](/cli/v6/configuring-npm/folders) to learn about where npm puts stuff.
70 +
71 +In particular, npm has two modes of operation:
72 +
73 +* global mode:
74 + npm installs packages into the install prefix at
75 + `prefix/lib/node_modules` and bins are installed in `prefix/bin`.
76 +* local mode:
77 + npm installs packages into the current project directory, which
78 + defaults to the current working directory. Packages are installed to
79 + `./node_modules`, and bins are installed to `./node_modules/.bin`.
80 +
81 +Local mode is the default. Use `-g` or `--global` on any command to
82 +operate in global mode instead.
83 +
84 +### Developer Usage
85 +
86 +If you're using npm to develop and publish your code, check out the
87 +following help topics:
88 +
89 +* json:
90 + Make a package.json file. See [`package.json`](/cli/v6/configuring-npm/package-json).
91 +* link:
92 + For linking your current working code into Node's path, so that you
93 + don't have to reinstall every time you make a change. Use
94 + `npm link` to do this.
95 +* install:
96 + It's a good idea to install things if you don't need the symbolic link.
97 + Especially, installing other peoples code from the registry is done via
98 + `npm install`
99 +* adduser:
100 + Create an account or log in. Credentials are stored in the
101 + user config file.
102 +* publish:
103 + Use the `npm publish` command to upload your code to the registry.
104 +
105 +#### Configuration
106 +
107 +npm is extremely configurable. It reads its configuration options from
108 +5 places.
109 +
110 +* Command line switches:
111 + Set a config with `--key val`. All keys take a value, even if they
112 + are booleans (the config parser doesn't know what the options are at
113 + the time of parsing). If no value is provided, then the option is set
114 + to boolean `true`.
115 +* Environment Variables:
116 + Set any config by prefixing the name in an environment variable with
117 + `npm_config_`. For example, `export npm_config_key=val`.
118 +* User Configs:
119 + The file at $HOME/.npmrc is an ini-formatted list of configs. If
120 + present, it is parsed. If the `userconfig` option is set in the cli
121 + or env, then that will be used instead.
122 +* Global Configs:
123 + The file found at ../etc/npmrc (from the node executable, by default
124 + this resolves to /usr/local/etc/npmrc) will be parsed if it is found.
125 + If the `globalconfig` option is set in the cli, env, or user config,
126 + then that file is parsed instead.
127 +* Defaults:
128 + npm's default configuration options are defined in
129 + lib/utils/config-defs.js. These must not be changed.
130 +
131 +See [`config`](/cli/v6/using-npm/config) for much much more information.
132 +
133 +### Contributions
134 +
135 +Patches welcome!
136 +
137 +If you would like to contribute, but don't know what to work on, read
138 +the contributing guidelines and check the issues list.
139 +
140 +* [CONTRIBUTING.md](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md)
141 +* [Bug tracker](https://github.com/npm/cli/issues)
142 +
143 +### Bugs
144 +
145 +When you find issues, please report them:
146 +
147 +* web:
148 + <https://npm.community/c/bugs>
149 +
150 +Be sure to follow the template and bug reporting guidelines. You can also ask
151 +for help in the [support forum](https://npm.community/c/support) if you're
152 +unsure if it's actually a bug or are having trouble coming up with a detailed
153 +reproduction to report.
154 +
155 +### Author
156 +
157 +[Isaac Z. Schlueter](http://blog.izs.me/) ::
158 +[isaacs](https://github.com/isaacs/) ::
159 +[@izs](https://twitter.com/izs) ::
160 +<i@izs.me>
161 +
162 +### See Also
163 +* [npm help](/cli/v6/commands/npm-help)
164 +* [package.json](/cli/v6/configuring-npm/package-json)
165 +* [npm install](/cli/v6/commands/npm-install)
166 +* [npm config](/cli/v6/commands/npm-config)
167 +* [npmrc](/cli/v6/configuring-npm/npmrc)
content/cli/v6/configuring-npm/folders.md new
+222
@@ -0,0 +1,222 @@
1 +---
2 +title: folders
3 +section: 5
4 +description: Folder Structures Used by npm
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/configuring-npm/folders.md
8 +---
9 +
10 +### Description
11 +
12 +npm puts various things on your computer. That's its job.
13 +
14 +This document will tell you what it puts where.
15 +
16 +#### tl;dr
17 +
18 +* Local install (default): puts stuff in `./node_modules` of the current
19 + package root.
20 +* Global install (with `-g`): puts stuff in /usr/local or wherever node
21 + is installed.
22 +* Install it **locally** if you're going to `require()` it.
23 +* Install it **globally** if you're going to run it on the command line.
24 +* If you need both, then install it in both places, or use `npm link`.
25 +
26 +#### prefix Configuration
27 +
28 +The `prefix` config defaults to the location where node is installed.
29 +On most systems, this is `/usr/local`. On Windows, it's `%AppData%\npm`.
30 +On Unix systems, it's one level up, since node is typically installed at
31 +`{prefix}/bin/node` rather than `{prefix}/node.exe`.
32 +
33 +When the `global` flag is set, npm installs things into this prefix.
34 +When it is not set, it uses the root of the current package, or the
35 +current working directory if not in a package already.
36 +
37 +#### Node Modules
38 +
39 +Packages are dropped into the `node_modules` folder under the `prefix`.
40 +When installing locally, this means that you can
41 +`require("packagename")` to load its main module, or
42 +`require("packagename/lib/path/to/sub/module")` to load other modules.
43 +
44 +Global installs on Unix systems go to `{prefix}/lib/node_modules`.
45 +Global installs on Windows go to `{prefix}/node_modules` (that is, no
46 +`lib` folder.)
47 +
48 +Scoped packages are installed the same way, except they are grouped together
49 +in a sub-folder of the relevant `node_modules` folder with the name of that
50 +scope prefix by the @ symbol, e.g. `npm install @myorg/package` would place
51 +the package in `{prefix}/node_modules/@myorg/package`. See [`scope`](/cli/v6/using-npm/scope) for more details.
52 +
53 +If you wish to `require()` a package, then install it locally.
54 +
55 +#### Executables
56 +
57 +When in global mode, executables are linked into `{prefix}/bin` on Unix,
58 +or directly into `{prefix}` on Windows.
59 +
60 +When in local mode, executables are linked into
61 +`./node_modules/.bin` so that they can be made available to scripts run
62 +through npm. (For example, so that a test runner will be in the path
63 +when you run `npm test`.)
64 +
65 +#### Man Pages
66 +
67 +When in global mode, man pages are linked into `{prefix}/share/man`.
68 +
69 +When in local mode, man pages are not installed.
70 +
71 +Man pages are not installed on Windows systems.
72 +
73 +#### Cache
74 +
75 +See [`npm cache`](/cli/v6/commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or
76 +`%AppData%/npm-cache` on Windows.
77 +
78 +This is controlled by the `cache` configuration param.
79 +
80 +#### Temp Files
81 +
82 +Temporary files are stored by default in the folder specified by the
83 +`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment
84 +variables, or `/tmp` on Unix and `c:\windows\temp` on Windows.
85 +
86 +Temp files are given a unique folder under this root for each run of the
87 +program, and are deleted upon successful exit.
88 +
89 +### More Information
90 +
91 +When installing locally, npm first tries to find an appropriate
92 +`prefix` folder. This is so that `npm install foo@1.2.3` will install
93 +to the sensible root of your package, even if you happen to have `cd`ed
94 +into some other folder.
95 +
96 +Starting at the $PWD, npm will walk up the folder tree checking for a
97 +folder that contains either a `package.json` file, or a `node_modules`
98 +folder. If such a thing is found, then that is treated as the effective
99 +"current directory" for the purpose of running npm commands. (This
100 +behavior is inspired by and similar to git's .git-folder seeking
101 +logic when running git commands in a working dir.)
102 +
103 +If no package root is found, then the current folder is used.
104 +
105 +When you run `npm install foo@1.2.3`, then the package is loaded into
106 +the cache, and then unpacked into `./node_modules/foo`. Then, any of
107 +foo's dependencies are similarly unpacked into
108 +`./node_modules/foo/node_modules/...`.
109 +
110 +Any bin files are symlinked to `./node_modules/.bin/`, so that they may
111 +be found by npm scripts when necessary.
112 +
113 +#### Global Installation
114 +
115 +If the `global` configuration is set to true, then npm will
116 +install packages "globally".
117 +
118 +For global installation, packages are installed roughly the same way,
119 +but using the folders described above.
120 +
121 +#### Cycles, Conflicts, and Folder Parsimony
122 +
123 +Cycles are handled using the property of node's module system that it
124 +walks up the directories looking for `node_modules` folders. So, at every
125 +stage, if a package is already installed in an ancestor `node_modules`
126 +folder, then it is not installed at the current location.
127 +
128 +Consider the case above, where `foo -> bar -> baz`. Imagine if, in
129 +addition to that, baz depended on bar, so you'd have:
130 +`foo -> bar -> baz -> bar -> baz ...`. However, since the folder
131 +structure is: `foo/node_modules/bar/node_modules/baz`, there's no need to
132 +put another copy of bar into `.../baz/node_modules`, since when it calls
133 +require("bar"), it will get the copy that is installed in
134 +`foo/node_modules/bar`.
135 +
136 +This shortcut is only used if the exact same
137 +version would be installed in multiple nested `node_modules` folders. It
138 +is still possible to have `a/node_modules/b/node_modules/a` if the two
139 +"a" packages are different versions. However, without repeating the
140 +exact same package multiple times, an infinite regress will always be
141 +prevented.
142 +
143 +Another optimization can be made by installing dependencies at the
144 +highest level possible, below the localized "target" folder.
145 +
146 +#### Example
147 +
148 +Consider this dependency graph:
149 +
150 +```bash
151 +foo
152 ++-- blerg@1.2.5
153 ++-- bar@1.2.3
154 +| +-- blerg@1.x (latest=1.3.7)
155 +| +-- baz@2.x
156 +| | `-- quux@3.x
157 +| | `-- bar@1.2.3 (cycle)
158 +| `-- asdf@*
159 +`-- baz@1.2.3
160 + `-- quux@3.x
161 + `-- bar
162 +```
163 +
164 +In this case, we might expect a folder structure like this:
165 +
166 +```bash
167 +foo
168 ++-- node_modules
169 + +-- blerg (1.2.5) <---[A]
170 + +-- bar (1.2.3) <---[B]
171 + | `-- node_modules
172 + | +-- baz (2.0.2) <---[C]
173 + | | `-- node_modules
174 + | | `-- quux (3.2.0)
175 + | `-- asdf (2.3.4)
176 + `-- baz (1.2.3) <---[D]
177 + `-- node_modules
178 + `-- quux (3.2.0) <---[E]
179 +```
180 +
181 +Since foo depends directly on `bar@1.2.3` and `baz@1.2.3`, those are
182 +installed in foo's `node_modules` folder.
183 +
184 +Even though the latest copy of blerg is 1.3.7, foo has a specific
185 +dependency on version 1.2.5. So, that gets installed at [A]. Since the
186 +parent installation of blerg satisfies bar's dependency on `blerg@1.x`,
187 +it does not install another copy under [B].
188 +
189 +Bar [B] also has dependencies on baz and asdf, so those are installed in
190 +bar's `node_modules` folder. Because it depends on `baz@2.x`, it cannot
191 +re-use the `baz@1.2.3` installed in the parent `node_modules` folder [D],
192 +and must install its own copy [C].
193 +
194 +Underneath bar, the `baz -> quux -> bar` dependency creates a cycle.
195 +However, because bar is already in quux's ancestry [B], it does not
196 +unpack another copy of bar into that folder.
197 +
198 +Underneath `foo -> baz` [D], quux's [E] folder tree is empty, because its
199 +dependency on bar is satisfied by the parent folder copy installed at [B].
200 +
201 +For a graphical breakdown of what is installed where, use `npm ls`.
202 +
203 +#### Publishing
204 +
205 +Upon publishing, npm will look in the `node_modules` folder. If any of
206 +the items there are not in the `bundledDependencies` array, then they will
207 +not be included in the package tarball.
208 +
209 +This allows a package maintainer to install all of their dependencies
210 +(and dev dependencies) locally, but only re-publish those items that
211 +cannot be found elsewhere. See [`package.json`](/cli/v6/configuring-npm/package-json) for more information.
212 +
213 +### See also
214 +
215 +* [package.json](/cli/v6/configuring-npm/package-json)
216 +* [npm install](/cli/v6/commands/npm-install)
217 +* [npm pack](/cli/v6/commands/npm-pack)
218 +* [npm cache](/cli/v6/commands/npm-cache)
219 +* [npm config](/cli/v6/commands/npm-config)
220 +* [npmrc](/cli/v6/configuring-npm/npmrc)
221 +* [config](/cli/v6/using-npm/config)
222 +* [npm publish](/cli/v6/commands/npm-publish)
content/cli/v6/configuring-npm/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +github_repo: npm/cli
3 +github_branch: v6-docs
4 +github_path: docs/content/configuring-npm/index.mdx
5 +title: Configuring npm
6 +---
7 +<Index depth="1" />
\ No newline at end of file
content/cli/v6/configuring-npm/install.md new
+69
@@ -0,0 +1,69 @@
1 +---
2 +title: install
3 +section: 5
4 +description: Download and install node and npm
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/configuring-npm/install.md
8 +---
9 +
10 +### Description
11 +
12 +To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. **We strongly recommend using a Node version manager to install Node.js and npm.** We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.
13 +
14 +### Overview
15 +
16 +- [Checking your version of npm and Node.js](#checking-your-version-of-npm-and-node-js)
17 +- [Using a Node version manager to install Node.js and npm](#using-a-node-version-manager-to-install-node-js-and-npm)
18 +- [Using a Node installer to install Node.js and npm](#using-a-node-installer-to-install-node-js-and-npm)
19 +
20 +### Checking your version of npm and Node.js
21 +
22 +To see if you already have Node.js and npm installed and check the installed version, run the following commands:
23 +
24 +```
25 +node -v
26 +npm -v
27 +```
28 +
29 +### Using a Node version manager to install Node.js and npm
30 +
31 +Node version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions.
32 +
33 +#### OSX or Linux Node version managers
34 +
35 +* [nvm](https://github.com/creationix/nvm)
36 +* [n](https://github.com/tj/n)
37 +
38 +#### Windows Node version managers
39 +
40 +* [nodist](https://github.com/marcelklehr/nodist)
41 +* [nvm-windows](https://github.com/coreybutler/nvm-windows)
42 +
43 +### Using a Node installer to install Node.js and npm
44 +
45 +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.
46 +
47 +* [Node.js installer](https://nodejs.org/en/download/)
48 +* [NodeSource installer](https://github.com/nodesource/distributions). If you use Linux, we recommend that you use a NodeSource installer.
49 +
50 +#### OS X or Windows Node installers
51 +
52 +If you're using OS X or Windows, use one of the installers from the [Node.js download page](https://nodejs.org/en/download/). Be sure to install the version labeled **LTS**. Other versions have not yet been tested with npm.
53 +
54 +#### Linux or other operating systems Node installers
55 +
56 +If you're using Linux or another operating system, use one of the following installers:
57 +
58 +- [NodeSource installer](https://github.com/nodesource/distributions) (recommended)
59 +- One of the installers on the [Node.js download page](https://nodejs.org/en/download/)
60 +
61 +Or see [this page](https://nodejs.org/en/download/package-manager/) to install npm for Linux in the way many Linux developers prefer.
62 +
63 +
64 +#### Less-common operating systems
65 +
66 +For more information on installing Node.js on a variety of operating systems, see [this page][pkg-mgr].
67 +
68 +
69 +[pkg-mgr]: https://nodejs.org/en/download/package-manager/
content/cli/v6/configuring-npm/npmrc.md new
+102
@@ -0,0 +1,102 @@
1 +---
2 +title: npmrc
3 +section: 5
4 +description: The npm config files
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/configuring-npm/npmrc.md
8 +---
9 +
10 +### Description
11 +
12 +npm gets its config settings from the command line, environment
13 +variables, and `npmrc` files.
14 +
15 +The `npm config` command can be used to update and edit the contents
16 +of the user and global npmrc files.
17 +
18 +For a list of available configuration options, see [config](/cli/v6/using-npm/config).
19 +
20 +### Files
21 +
22 +The four relevant files are:
23 +
24 +* per-project config file (/path/to/my/project/.npmrc)
25 +* per-user config file (~/.npmrc)
26 +* global config file ($PREFIX/etc/npmrc)
27 +* npm builtin config file (/path/to/npm/npmrc)
28 +
29 +All npm config files are an ini-formatted list of `key = value`
30 +parameters. Environment variables can be replaced using
31 +`${VARIABLE_NAME}`. For example:
32 +
33 +```bash
34 +prefix = ${HOME}/.npm-packages
35 +```
36 +
37 +Each of these files is loaded, and config options are resolved in
38 +priority order. For example, a setting in the userconfig file would
39 +override the setting in the globalconfig file.
40 +
41 +Array values are specified by adding "[]" after the key name. For
42 +example:
43 +
44 +```bash
45 +key[] = "first value"
46 +key[] = "second value"
47 +```
48 +
49 +#### Comments
50 +
51 +Lines in `.npmrc` files are interpreted as comments when they begin with a `;` or `#` character. `.npmrc` files are parsed by [npm/ini](https://github.com/npm/ini), which specifies this comment syntax.
52 +
53 +For example:
54 +
55 +```bash
56 +# last modified: 01 Jan 2016
57 +; Set a new registry for a scoped package
58 +@myscope:registry=https://mycustomregistry.example.org
59 +```
60 +
61 +#### Per-project config file
62 +
63 +When working locally in a project, a `.npmrc` file in the root of the
64 +project (ie, a sibling of `node_modules` and `package.json`) will set
65 +config values specific to this project.
66 +
67 +Note that this only applies to the root of the project that you're
68 +running npm in. It has no effect when your module is published. For
69 +example, you can't publish a module that forces itself to install
70 +globally, or in a different location.
71 +
72 +Additionally, this file is not read in global mode, such as when running
73 +`npm install -g`.
74 +
75 +#### Per-user config file
76 +
77 +`$HOME/.npmrc` (or the `userconfig` param, if set in the environment
78 +or on the command line)
79 +
80 +#### Global config file
81 +
82 +`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above):
83 +This file is an ini-file formatted list of `key = value` parameters.
84 +Environment variables can be replaced as above.
85 +
86 +#### Built-in config file
87 +
88 +`path/to/npm/itself/npmrc`
89 +
90 +This is an unchangeable "builtin" configuration file that npm keeps
91 +consistent across updates. Set fields in here using the `./configure`
92 +script that comes with npm. This is primarily for distribution
93 +maintainers to override default configs in a standard and consistent
94 +manner.
95 +
96 +### See also
97 +
98 +* [npm folders](/cli/v6/configuring-npm/folders)
99 +* [npm config](/cli/v6/commands/npm-config)
100 +* [config](/cli/v6/using-npm/config)
101 +* [package.json](/cli/v6/configuring-npm/package-json)
102 +* [npm](/cli/v6/commands/npm)
content/cli/v6/configuring-npm/package-json.md new
+916
@@ -0,0 +1,916 @@
1 +---
2 +title: package.json
3 +section: 5
4 +description: Specifics of npm's package.json handling
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/configuring-npm/package-json.md
8 +---
9 +
10 +### Description
11 +
12 +This document is all you need to know about what's required in your package.json
13 +file. It must be actual JSON, not just a JavaScript object literal.
14 +
15 +A lot of the behavior described in this document is affected by the config
16 +settings described in [`config`](/cli/v6/using-npm/config).
17 +
18 +### name
19 +
20 +If you plan to publish your package, the *most* important things in your
21 +package.json are the name and version fields as they will be required. The name
22 +and version together form an identifier that is assumed to be completely unique.
23 +Changes to the package should come along with changes to the version. If you don't
24 +plan to publish your package, the name and version fields are optional.
25 +
26 +The name is what your thing is called.
27 +
28 +Some rules:
29 +
30 +* The name must be less than or equal to 214 characters. This includes the scope for
31 + scoped packages.
32 +* The names of scoped packages can begin with a dot or an underscore. This is not permitted without a scope.
33 +* New packages must not have uppercase letters in the name.
34 +* The name ends up being part of a URL, an argument on the command line, and a
35 + folder name. Therefore, the name can't contain any non-URL-safe characters.
36 +
37 +Some tips:
38 +
39 +* Don't use the same name as a core Node module.
40 +* Don't put "js" or "node" in the name. It's assumed that it's js, since you're
41 + writing a package.json file, and you can specify the engine using the "engines"
42 + field. (See below.)
43 +* The name will probably be passed as an argument to require(), so it should
44 + be something short, but also reasonably descriptive.
45 +* You may want to check the npm registry to see if there's something by that name
46 + already, before you get too attached to it. <https://www.npmjs.com/>
47 +
48 +A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See
49 +[`scope`](/cli/v6/using-npm/scope) for more detail.
50 +
51 +### version
52 +
53 +If you plan to publish your package, the *most* important things in your
54 +package.json are the name and version fields as they will be required. The name
55 +and version together form an identifier that is assumed to be completely unique.
56 +Changes to the package should come along with changes to the version. If you don't
57 +plan to publish your package, the name and version fields are optional.
58 +
59 +Version must be parseable by
60 +[node-semver](https://github.com/isaacs/node-semver), which is bundled
61 +with npm as a dependency. (`npm install semver` to use it yourself.)
62 +
63 +More on version numbers and ranges at [semver](/cli/v6/using-npm/semver).
64 +
65 +### description
66 +
67 +Put a description in it. It's a string. This helps people discover your
68 +package, as it's listed in `npm search`.
69 +
70 +### keywords
71 +
72 +Put keywords in it. It's an array of strings. This helps people
73 +discover your package as it's listed in `npm search`.
74 +
75 +### homepage
76 +
77 +The url to the project homepage.
78 +
79 +Example:
80 +
81 +```json
82 +"homepage": "https://github.com/owner/project#readme"
83 +```
84 +
85 +### bugs
86 +
87 +The url to your project's issue tracker and / or the email address to which
88 +issues should be reported. These are helpful for people who encounter issues
89 +with your package.
90 +
91 +It should look like this:
92 +
93 +```json
94 +{ "url" : "https://github.com/owner/project/issues"
95 +, "email" : "project@hostname.com"
96 +}
97 +```
98 +
99 +You can specify either one or both values. If you want to provide only a url,
100 +you can specify the value for "bugs" as a simple string instead of an object.
101 +
102 +If a url is provided, it will be used by the `npm bugs` command.
103 +
104 +### license
105 +
106 +You should specify a license for your package so that people know how they are
107 +permitted to use it, and any restrictions you're placing on it.
108 +
109 +If you're using a common license such as BSD-2-Clause or MIT, add a
110 +current SPDX license identifier for the license you're using, like this:
111 +
112 +```json
113 +{ "license" : "BSD-3-Clause" }
114 +```
115 +
116 +You can check [the full list of SPDX license IDs](https://spdx.org/licenses/).
117 +Ideally you should pick one that is
118 +[OSI](https://opensource.org/licenses/alphabetical) approved.
119 +
120 +If your package is licensed under multiple common licenses, use an [SPDX license
121 +expression syntax version 2.0 string](https://www.npmjs.com/package/spdx), like this:
122 +
123 +```json
124 +{ "license" : "(ISC OR GPL-3.0)" }
125 +```
126 +If you are using a license that hasn't been assigned an SPDX identifier, or if
127 +you are using a custom license, use a string value like this one:
128 +
129 +```json
130 +{ "license" : "SEE LICENSE IN <filename>" }
131 +```
132 +Then include a file named `<filename>` at the top level of the package.
133 +
134 +Some old packages used license objects or a "licenses" property containing an
135 +array of license objects:
136 +
137 +```json
138 +// Not valid metadata
139 +{ "license" :
140 + { "type" : "ISC"
141 + , "url" : "https://opensource.org/licenses/ISC"
142 + }
143 +}
144 +
145 +// Not valid metadata
146 +{ "licenses" :
147 + [
148 + { "type": "MIT"
149 + , "url": "https://www.opensource.org/licenses/mit-license.php"
150 + }
151 + , { "type": "Apache-2.0"
152 + , "url": "https://opensource.org/licenses/apache2.0.php"
153 + }
154 + ]
155 +}
156 +```
157 +
158 +Those styles are now deprecated. Instead, use SPDX expressions, like this:
159 +
160 +```json
161 +{ "license": "ISC" }
162 +
163 +{ "license": "(MIT OR Apache-2.0)" }
164 +```
165 +
166 +Finally, if you do not wish to grant others the right to use a private or
167 +unpublished package under any terms:
168 +
169 +```json
170 +{ "license": "UNLICENSED" }
171 +```
172 +Consider also setting `"private": true` to prevent accidental publication.
173 +
174 +### people fields: author, contributors
175 +
176 +The "author" is one person. "contributors" is an array of people. A "person"
177 +is an object with a "name" field and optionally "url" and "email", like this:
178 +
179 +```json
180 +{ "name" : "Barney Rubble"
181 +, "email" : "b@rubble.com"
182 +, "url" : "http://barnyrubble.tumblr.com/"
183 +}
184 +```
185 +
186 +Or you can shorten that all into a single string, and npm will parse it for you:
187 +
188 +```json
189 +"Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
190 +```
191 +
192 +Both email and url are optional either way.
193 +
194 +npm also sets a top-level "maintainers" field with your npm user info.
195 +
196 +### funding
197 +
198 +You can specify an object containing an URL that provides up-to-date
199 +information about ways to help fund development of your package, or
200 +a string URL, or an array of these:
201 +
202 + "funding": {
203 + "type" : "individual",
204 + "url" : "http://example.com/donate"
205 + }
206 +
207 + "funding": {
208 + "type" : "patreon",
209 + "url" : "https://www.patreon.com/my-account"
210 + }
211 +
212 + "funding": "http://example.com/donate"
213 +
214 + "funding": [
215 + {
216 + "type" : "individual",
217 + "url" : "http://example.com/donate"
218 + },
219 + "http://example.com/donateAlso",
220 + {
221 + "type" : "patreon",
222 + "url" : "https://www.patreon.com/my-account"
223 + }
224 + ]
225 +
226 +
227 +Users can use the `npm fund` subcommand to list the `funding` URLs of all
228 +dependencies of their project, direct and indirect. A shortcut to visit each
229 +funding url is also available when providing the project name such as:
230 +`npm fund <projectname>` (when there are multiple URLs, the first one will be
231 +visited)
232 +
233 +### files
234 +
235 +The optional `files` field is an array of file patterns that describes
236 +the entries to be included when your package is installed as a
237 +dependency. File patterns follow a similar syntax to `.gitignore`, but
238 +reversed: including a file, directory, or glob pattern (`*`, `**/*`, and such)
239 +will make it so that file is included in the tarball when it's packed. Omitting
240 +the field will make it default to `["*"]`, which means it will include all files.
241 +
242 +Some special files and directories are also included or excluded regardless of
243 +whether they exist in the `files` array (see below).
244 +
245 +You can also provide a `.npmignore` file in the root of your package or
246 +in subdirectories, which will keep files from being included. At the
247 +root of your package it will not override the "files" field, but in
248 +subdirectories it will. The `.npmignore` file works just like a
249 +`.gitignore`. If there is a `.gitignore` file, and `.npmignore` is
250 +missing, `.gitignore`'s contents will be used instead.
251 +
252 +Files included with the "package.json#files" field _cannot_ be excluded
253 +through `.npmignore` or `.gitignore`.
254 +
255 +Certain files are always included, regardless of settings:
256 +
257 +* `package.json`
258 +* `README`
259 +* `CHANGES` / `CHANGELOG` / `HISTORY`
260 +* `LICENSE` / `LICENCE`
261 +* `NOTICE`
262 +* The file in the "main" field
263 +
264 +`README`, `CHANGES`, `LICENSE` & `NOTICE` can have any case and extension.
265 +
266 +Conversely, some files are always ignored:
267 +
268 +* `.git`
269 +* `CVS`
270 +* `.svn`
271 +* `.hg`
272 +* `.lock-wscript`
273 +* `.wafpickle-N`
274 +* `.DS_Store`
275 +* `npm-debug.log`
276 +* `.npmrc`
277 +* `node_modules`
278 +* `config.gypi`
279 +* `package-lock.json` (use shrinkwrap instead)
280 +* All files containing a `*` character (incompatible with Windows)
281 +
282 +### main
283 +
284 +The main field is a module ID that is the primary entry point to your program.
285 +That is, if your package is named `foo`, and a user installs it, and then does
286 +`require("foo")`, then your main module's exports object will be returned.
287 +
288 +This should be a module ID relative to the root of your package folder.
289 +
290 +For most modules, it makes the most sense to have a main script and often not
291 +much else.
292 +
293 +### browser
294 +
295 +If your module is meant to be used client-side the browser field should be
296 +used instead of the main field. This is helpful to hint users that it might
297 +rely on primitives that aren't available in Node.js modules. (e.g. `window`)
298 +
299 +### bin
300 +
301 +A lot of packages have one or more executable files that they'd like to
302 +install into the PATH. npm makes this pretty easy (in fact, it uses this
303 +feature to install the "npm" executable.)
304 +
305 +To use this, supply a `bin` field in your package.json which is a map of
306 +command name to local file name. On install, npm will symlink that file into
307 +`prefix/bin` for global installs, or `./node_modules/.bin/` for local
308 +installs.
309 +
310 +
311 +For example, myapp could have this:
312 +
313 +```json
314 +{ "bin" : { "myapp" : "./cli.js" } }
315 +```
316 +
317 +So, when you install myapp, it'll create a symlink from the `cli.js` script to
318 +`/usr/local/bin/myapp`.
319 +
320 +If you have a single executable, and its name should be the name
321 +of the package, then you can just supply it as a string. For example:
322 +
323 +```json
324 +{ "name": "my-program"
325 +, "version": "1.2.5"
326 +, "bin": "./path/to/program" }
327 +```
328 +
329 +would be the same as this:
330 +
331 +```json
332 +{ "name": "my-program"
333 +, "version": "1.2.5"
334 +, "bin" : { "my-program" : "./path/to/program" } }
335 +```
336 +
337 +Please make sure that your file(s) referenced in `bin` starts with
338 +`#!/usr/bin/env node`, otherwise the scripts are started without the node
339 +executable!
340 +
341 +### man
342 +
343 +Specify either a single file or an array of filenames to put in place for the
344 +`man` program to find.
345 +
346 +If only a single file is provided, then it's installed such that it is the
347 +result from `man <pkgname>`, regardless of its actual filename. For example:
348 +
349 +```json
350 +{ "name" : "foo"
351 +, "version" : "1.2.3"
352 +, "description" : "A packaged foo fooer for fooing foos"
353 +, "main" : "foo.js"
354 +, "man" : "./man/doc.1"
355 +}
356 +```
357 +
358 +would link the `./man/doc.1` file in such that it is the target for `man foo`
359 +
360 +If the filename doesn't start with the package name, then it's prefixed.
361 +So, this:
362 +
363 +```json
364 +{ "name" : "foo"
365 +, "version" : "1.2.3"
366 +, "description" : "A packaged foo fooer for fooing foos"
367 +, "main" : "foo.js"
368 +, "man" : [ "./man/foo.1", "./man/bar.1" ]
369 +}
370 +```
371 +
372 +will create files to do `man foo` and `man foo-bar`.
373 +
374 +Man files must end with a number, and optionally a `.gz` suffix if they are
375 +compressed. The number dictates which man section the file is installed into.
376 +
377 +```json
378 +{ "name" : "foo"
379 +, "version" : "1.2.3"
380 +, "description" : "A packaged foo fooer for fooing foos"
381 +, "main" : "foo.js"
382 +, "man" : [ "./man/foo.1", "./man/foo.2" ]
383 +}
384 +```
385 +will create entries for `man foo` and `man 2 foo`
386 +
387 +### directories
388 +
389 +The CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec details a
390 +few ways that you can indicate the structure of your package using a `directories`
391 +object. If you look at [npm's package.json](https://registry.npmjs.org/npm/latest),
392 +you'll see that it has directories for doc, lib, and man.
393 +
394 +In the future, this information may be used in other creative ways.
395 +
396 +#### directories.lib
397 +
398 +Tell people where the bulk of your library is. Nothing special is done
399 +with the lib folder in any way, but it's useful meta info.
400 +
401 +#### directories.bin
402 +
403 +If you specify a `bin` directory in `directories.bin`, all the files in
404 +that folder will be added.
405 +
406 +Because of the way the `bin` directive works, specifying both a
407 +`bin` path and setting `directories.bin` is an error. If you want to
408 +specify individual files, use `bin`, and for all the files in an
409 +existing `bin` directory, use `directories.bin`.
410 +
411 +#### directories.man
412 +
413 +A folder that is full of man pages. Sugar to generate a "man" array by
414 +walking the folder.
415 +
416 +#### directories.doc
417 +
418 +Put markdown files in here. Eventually, these will be displayed nicely,
419 +maybe, someday.
420 +
421 +#### directories.example
422 +
423 +Put example scripts in here. Someday, it might be exposed in some clever way.
424 +
425 +#### directories.test
426 +
427 +Put your tests in here. It is currently not exposed, but it might be in the
428 +future.
429 +
430 +### repository
431 +
432 +Specify the place where your code lives. This is helpful for people who
433 +want to contribute. If the git repo is on GitHub, then the `npm docs`
434 +command will be able to find you.
435 +
436 +Do it like this:
437 +
438 +```json
439 +"repository": {
440 + "type" : "git",
441 + "url" : "https://github.com/npm/cli.git"
442 +}
443 +
444 +"repository": {
445 + "type" : "svn",
446 + "url" : "https://v8.googlecode.com/svn/trunk/"
447 +}
448 +```
449 +
450 +The URL should be a publicly available (perhaps read-only) url that can be handed
451 +directly to a VCS program without any modification. It should not be a url to an
452 +html project page that you put in your browser. It's for computers.
453 +
454 +For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same
455 +shortcut syntax you use for `npm install`:
456 +
457 +```json
458 +"repository": "npm/npm"
459 +
460 +"repository": "github:user/repo"
461 +
462 +"repository": "gist:11081aaa281"
463 +
464 +"repository": "bitbucket:user/repo"
465 +
466 +"repository": "gitlab:user/repo"
467 +```
468 +
469 +If the `package.json` for your package is not in the root directory (for example
470 +if it is part of a monorepo), you can specify the directory in which it lives:
471 +
472 +```json
473 +"repository": {
474 + "type" : "git",
475 + "url" : "https://github.com/facebook/react.git",
476 + "directory": "packages/react-dom"
477 +}
478 +```
479 +
480 +### scripts
481 +
482 +The "scripts" property is a dictionary containing script commands that are run
483 +at various times in the lifecycle of your package. The key is the lifecycle
484 +event, and the value is the command to run at that point.
485 +
486 +See [`scripts`](/cli/v6/using-npm/scripts) to find out more about writing package scripts.
487 +
488 +### config
489 +
490 +A "config" object can be used to set configuration parameters used in package
491 +scripts that persist across upgrades. For instance, if a package had the
492 +following:
493 +
494 +```json
495 +{ "name" : "foo"
496 +, "config" : { "port" : "8080" } }
497 +```
498 +
499 +and then had a "start" command that then referenced the
500 +`npm_package_config_port` environment variable, then the user could
501 +override that by doing `npm config set foo:port 8001`.
502 +
503 +See [`config`](/cli/v6/using-npm/config) and [`scripts`](/cli/v6/using-npm/scripts) for more on package
504 +configs.
505 +
506 +### dependencies
507 +
508 +Dependencies are specified in a simple object that maps a package name to a
509 +version range. The version range is a string which has one or more
510 +space-separated descriptors. Dependencies can also be identified with a
511 +tarball or git URL.
512 +
513 +**Please do not put test harnesses or transpilers in your
514 +`dependencies` object.** See `devDependencies`, below.
515 +
516 +See [semver](/cli/v6/using-npm/semver) for more details about specifying version ranges.
517 +
518 +* `version` Must match `version` exactly
519 +* `>version` Must be greater than `version`
520 +* `>=version` etc
521 +* `<version`
522 +* `<=version`
523 +* `~version` "Approximately equivalent to version" See [semver](/cli/v6/using-npm/semver)
524 +* `^version` "Compatible with version" See [semver](/cli/v6/using-npm/semver)
525 +* `1.2.x` 1.2.0, 1.2.1, etc., but not 1.3.0
526 +* `http://...` See 'URLs as Dependencies' below
527 +* `*` Matches any version
528 +* `""` (just an empty string) Same as `*`
529 +* `version1 - version2` Same as `>=version1 <=version2`.
530 +* `range1 || range2` Passes if either range1 or range2 are satisfied.
531 +* `git...` See 'Git URLs as Dependencies' below
532 +* `user/repo` See 'GitHub URLs' below
533 +* `tag` A specific version tagged and published as `tag` See [`npm dist-tag`](/cli/v6/commands/npm-dist-tag)
534 +* `path/path/path` See [Local Paths](#local-paths) below
535 +
536 +For example, these are all valid:
537 +
538 +```json
539 +{ "dependencies" :
540 + { "foo" : "1.0.0 - 2.9999.9999"
541 + , "bar" : ">=1.0.2 <2.1.2"
542 + , "baz" : ">1.0.2 <=2.3.4"
543 + , "boo" : "2.0.1"
544 + , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0"
545 + , "asd" : "http://asdf.com/asdf.tar.gz"
546 + , "til" : "~1.2"
547 + , "elf" : "~1.2.3"
548 + , "two" : "2.x"
549 + , "thr" : "3.3.x"
550 + , "lat" : "latest"
551 + , "dyl" : "file:../dyl"
552 + }
553 +}
554 +```
555 +
556 +#### URLs as Dependencies
557 +
558 +You may specify a tarball URL in place of a version range.
559 +
560 +This tarball will be downloaded and installed locally to your package at
561 +install time.
562 +
563 +#### Git URLs as Dependencies
564 +
565 +Git urls are of the form:
566 +
567 +```bash
568 +<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
569 +```
570 +
571 +`<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or
572 +`git+file`.
573 +
574 +If `#<commit-ish>` is provided, it will be used to clone exactly that
575 +commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
576 +be any valid semver range or exact version, and npm will look for any tags
577 +or refs matching that range in the remote repository, much as it would for a
578 +registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
579 +specified, then `master` is used.
580 +
581 +Examples:
582 +
583 +```bash
584 +git+ssh://git@github.com:npm/cli.git#v1.0.27
585 +git+ssh://git@github.com:npm/cli#semver:^5.0
586 +git+https://isaacs@github.com/npm/cli.git
587 +git://github.com/npm/cli.git#v1.0.27
588 +```
589 +
590 +#### GitHub URLs
591 +
592 +As of version 1.1.65, you can refer to GitHub urls as just "foo":
593 +"user/foo-project". Just as with git URLs, a `commit-ish` suffix can be
594 +included. For example:
595 +
596 +```json
597 +{
598 + "name": "foo",
599 + "version": "0.0.0",
600 + "dependencies": {
601 + "express": "expressjs/express",
602 + "mocha": "mochajs/mocha#4727d357ea",
603 + "module": "user/repo#feature\/branch"
604 + }
605 +}
606 +```
607 +
608 +#### Local Paths
609 +
610 +As of version 2.0.0 you can provide a path to a local directory that contains a
611 +package. Local paths can be saved using `npm install -S` or
612 +`npm install --save`, using any of these forms:
613 +
614 +```bash
615 +../foo/bar
616 +~/foo/bar
617 +./foo/bar
618 +/foo/bar
619 +```
620 +
621 +in which case they will be normalized to a relative path and added to your
622 +`package.json`. For example:
623 +
624 +```json
625 +{
626 + "name": "baz",
627 + "dependencies": {
628 + "bar": "file:../foo/bar"
629 + }
630 +}
631 +```
632 +
633 +This feature is helpful for local offline development and creating
634 +tests that require npm installing where you don't want to hit an
635 +external server, but should not be used when publishing packages
636 +to the public registry.
637 +
638 +### devDependencies
639 +
640 +If someone is planning on downloading and using your module in their
641 +program, then they probably don't want or need to download and build
642 +the external test or documentation framework that you use.
643 +
644 +In this case, it's best to map these additional items in a `devDependencies`
645 +object.
646 +
647 +These things will be installed when doing `npm link` or `npm install`
648 +from the root of a package, and can be managed like any other npm
649 +configuration param. See [`config`](/cli/v6/using-npm/config) for more on the topic.
650 +
651 +For build steps that are not platform-specific, such as compiling
652 +CoffeeScript or other languages to JavaScript, use the `prepare`
653 +script to do this, and make the required package a devDependency.
654 +
655 +For example:
656 +
657 +```json
658 +{ "name": "ethopia-waza",
659 + "description": "a delightfully fruity coffee varietal",
660 + "version": "1.2.3",
661 + "devDependencies": {
662 + "coffee-script": "~1.6.3"
663 + },
664 + "scripts": {
665 + "prepare": "coffee -o lib/ -c src/waza.coffee"
666 + },
667 + "main": "lib/waza.js"
668 +}
669 +```
670 +
671 +The `prepare` script will be run before publishing, so that users
672 +can consume the functionality without requiring them to compile it
673 +themselves. In dev mode (ie, locally running `npm install`), it'll
674 +run this script as well, so that you can test it easily.
675 +
676 +### peerDependencies
677 +
678 +In some cases, you want to express the compatibility of your package with a
679 +host tool or library, while not necessarily doing a `require` of this host.
680 +This is usually referred to as a *plugin*. Notably, your module may be exposing
681 +a specific interface, expected and specified by the host documentation.
682 +
683 +For example:
684 +
685 +```json
686 +{
687 + "name": "tea-latte",
688 + "version": "1.3.5",
689 + "peerDependencies": {
690 + "tea": "2.x"
691 + }
692 +}
693 +```
694 +
695 +This ensures your package `tea-latte` can be installed *along* with the second
696 +major version of the host package `tea` only. `npm install tea-latte` could
697 +possibly yield the following dependency graph:
698 +
699 +```bash
700 +├── tea-latte@1.3.5
701 +└── tea@2.2.0
702 +```
703 +
704 +**NOTE: npm versions 1 and 2 will automatically install `peerDependencies` if
705 +they are not explicitly depended upon higher in the dependency tree. In the
706 +next major version of npm (npm@3), this will no longer be the case. You will
707 +receive a warning that the peerDependency is not installed instead.** The
708 +behavior in npms 1 & 2 was frequently confusing and could easily put you into
709 +dependency hell, a situation that npm is designed to avoid as much as possible.
710 +
711 +Trying to install another plugin with a conflicting requirement will cause an
712 +error. For this reason, make sure your plugin requirement is as broad as
713 +possible, and not to lock it down to specific patch versions.
714 +
715 +Assuming the host complies with [semver](https://semver.org/), only changes in
716 +the host package's major version will break your plugin. Thus, if you've worked
717 +with every 1.x version of the host package, use `"^1.0"` or `"1.x"` to express
718 +this. If you depend on features introduced in 1.5.2, use `">= 1.5.2 < 2"`.
719 +
720 +### bundledDependencies
721 +
722 +This defines an array of package names that will be bundled when publishing
723 +the package.
724 +
725 +In cases where you need to preserve npm packages locally or have them
726 +available through a single file download, you can bundle the packages in a
727 +tarball file by specifying the package names in the `bundledDependencies`
728 +array and executing `npm pack`.
729 +
730 +For example:
731 +
732 +If we define a package.json like this:
733 +
734 +```json
735 +{
736 + "name": "awesome-web-framework",
737 + "version": "1.0.0",
738 + "bundledDependencies": [
739 + "renderized", "super-streams"
740 + ]
741 +}
742 +```
743 +we can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`.
744 +This file contains the dependencies `renderized` and `super-streams` which
745 +can be installed in a new project by executing `npm install
746 +awesome-web-framework-1.0.0.tgz`. Note that the package names do not include
747 +any versions, as that information is specified in `dependencies`.
748 +
749 +If this is spelled `"bundleDependencies"`, then that is also honored.
750 +
751 +### optionalDependencies
752 +
753 +If a dependency can be used, but you would like npm to proceed if it cannot be
754 +found or fails to install, then you may put it in the `optionalDependencies`
755 +object. This is a map of package name to version or url, just like the
756 +`dependencies` object. The difference is that build failures do not cause
757 +installation to fail. Running `npm install --no-optional` will prevent these
758 +dependencies from being installed.
759 +
760 +It is still your program's responsibility to handle the lack of the
761 +dependency. For example, something like this:
762 +
763 +```js
764 +try {
765 + var foo = require('foo')
766 + var fooVersion = require('foo/package.json').version
767 +} catch (er) {
768 + foo = null
769 +}
770 +if ( notGoodFooVersion(fooVersion) ) {
771 + foo = null
772 +}
773 +
774 +// .. then later in your program ..
775 +
776 +if (foo) {
777 + foo.doFooThings()
778 +}
779 +```
780 +
781 +Entries in `optionalDependencies` will override entries of the same name in
782 +`dependencies`, so it's usually best to only put in one place.
783 +
784 +### engines
785 +
786 +You can specify the version of node that your stuff works on:
787 +
788 +```json
789 +{ "engines" : { "node" : ">=0.10.3 <0.12" } }
790 +```
791 +
792 +And, like with dependencies, if you don't specify the version (or if you
793 +specify "\*" as the version), then any version of node will do.
794 +
795 +If you specify an "engines" field, then npm will require that "node" be
796 +somewhere on that list. If "engines" is omitted, then npm will just assume
797 +that it works on node.
798 +
799 +You can also use the "engines" field to specify which versions of npm
800 +are capable of properly installing your program. For example:
801 +
802 +```json
803 +{ "engines" : { "npm" : "~1.0.20" } }
804 +```
805 +
806 +Unless the user has set the `engine-strict` config flag, this
807 +field is advisory only and will only produce warnings when your package is installed as a dependency.
808 +
809 +### engineStrict
810 +
811 +**This feature was removed in npm 3.0.0**
812 +
813 +Prior to npm 3.0.0, this feature was used to treat this package as if the
814 +user had set `engine-strict`. It is no longer used.
815 +
816 +### os
817 +
818 +You can specify which operating systems your
819 +module will run on:
820 +
821 +```json
822 +"os" : [ "darwin", "linux" ]
823 +```
824 +
825 +You can also blacklist instead of whitelist operating systems,
826 +just prepend the blacklisted os with a '!':
827 +
828 +```json
829 +"os" : [ "!win32" ]
830 +```
831 +
832 +The host operating system is determined by `process.platform`
833 +
834 +It is allowed to both blacklist, and whitelist, although there isn't any
835 +good reason to do this.
836 +
837 +### cpu
838 +
839 +If your code only runs on certain cpu architectures,
840 +you can specify which ones.
841 +
842 +```json
843 +"cpu" : [ "x64", "ia32" ]
844 +```
845 +
846 +Like the `os` option, you can also blacklist architectures:
847 +
848 +```json
849 +"cpu" : [ "!arm", "!mips" ]
850 +```
851 +
852 +The host architecture is determined by `process.arch`
853 +
854 +### preferGlobal
855 +
856 +**DEPRECATED**
857 +
858 +This option used to trigger an npm warning, but it will no longer warn. It is
859 +purely there for informational purposes. It is now recommended that you install
860 +any binaries as local devDependencies wherever possible.
861 +
862 +### private
863 +
864 +If you set `"private": true` in your package.json, then npm will refuse
865 +to publish it.
866 +
867 +This is a way to prevent accidental publication of private repositories. If
868 +you would like to ensure that a given package is only ever published to a
869 +specific registry (for example, an internal registry), then use the
870 +`publishConfig` dictionary described below to override the `registry` config
871 +param at publish-time.
872 +
873 +### publishConfig
874 +
875 +This is a set of config values that will be used at publish-time. It's
876 +especially handy if you want to set the tag, registry or access, so that
877 +you can ensure that a given package is not tagged with "latest", published
878 +to the global public registry or that a scoped module is private by default.
879 +
880 +Any config values can be overridden, but only "tag", "registry" and "access"
881 +probably matter for the purposes of publishing.
882 +
883 +See [`config`](/cli/v6/using-npm/config) to see the list of config options that can be
884 +overridden.
885 +
886 +### DEFAULT VALUES
887 +
888 +npm will default some values based on package contents.
889 +
890 +* `"scripts": {"start": "node server.js"}`
891 +
892 + If there is a `server.js` file in the root of your package, then npm
893 + will default the `start` command to `node server.js`.
894 +
895 +* `"scripts":{"install": "node-gyp rebuild"}`
896 +
897 + If there is a `binding.gyp` file in the root of your package and you have not defined an `install` or `preinstall` script, npm will
898 + default the `install` command to compile using node-gyp.
899 +
900 +* `"contributors": [...]`
901 +
902 + If there is an `AUTHORS` file in the root of your package, npm will
903 + treat each line as a `Name <email> (url)` format, where email and url
904 + are optional. Lines which start with a `#` or are blank, will be
905 + ignored.
906 +
907 +### SEE ALSO
908 +
909 +* [semver](/cli/v6/using-npm/semver)
910 +* [npm init](/cli/v6/commands/npm-init)
911 +* [npm version](/cli/v6/commands/npm-version)
912 +* [npm config](/cli/v6/commands/npm-config)
913 +* [npm help](/cli/v6/commands/npm-help)
914 +* [npm install](/cli/v6/commands/npm-install)
915 +* [npm publish](/cli/v6/commands/npm-publish)
916 +* [npm uninstall](/cli/v6/commands/npm-uninstall)
content/cli/v6/configuring-npm/package-lock-json.md new
+148
@@ -0,0 +1,148 @@
1 +---
2 +title: package-lock.json
3 +section: 5
4 +description: A manifestation of the manifest
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/configuring-npm/package-lock-json.md
8 +---
9 +
10 +### Description
11 +
12 +`package-lock.json` is automatically generated for any operations where npm
13 +modifies either the `node_modules` tree, or `package.json`. It describes the
14 +exact tree that was generated, such that subsequent installs are able to
15 +generate identical trees, regardless of intermediate dependency updates.
16 +
17 +This file is intended to be committed into source repositories, and serves
18 +various purposes:
19 +
20 +* Describe a single representation of a dependency tree such that teammates, deployments, and continuous integration are guaranteed to install exactly the same dependencies.
21 +
22 +* Provide a facility for users to "time-travel" to previous states of `node_modules` without having to commit the directory itself.
23 +
24 +* To facilitate greater visibility of tree changes through readable source control diffs.
25 +
26 +* And optimize the installation process by allowing npm to skip repeated metadata resolutions for previously-installed packages.
27 +
28 +One key detail about `package-lock.json` is that it cannot be published, and it
29 +will be ignored if found in any place other than the toplevel package. It shares
30 +a format with [npm-shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json), which is essentially the same file, but
31 +allows publication. This is not recommended unless deploying a CLI tool or
32 +otherwise using the publication process for producing production packages.
33 +
34 +If both `package-lock.json` and `npm-shrinkwrap.json` are present in the root of
35 +a package, `package-lock.json` will be completely ignored.
36 +
37 +
38 +### File Format
39 +
40 +#### name
41 +
42 +The name of the package this is a package-lock for. This must match what's in
43 +`package.json`.
44 +
45 +#### version
46 +
47 +The version of the package this is a package-lock for. This must match what's in
48 +`package.json`.
49 +
50 +#### lockfileVersion
51 +
52 +An integer version, starting at `1` with the version number of this document
53 +whose semantics were used when generating this `package-lock.json`.
54 +
55 +#### packageIntegrity
56 +
57 +This is a [subresource
58 +integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) value
59 +created from the `package.json`. No preprocessing of the `package.json` should
60 +be done. Subresource integrity strings can be produced by modules like
61 +[`ssri`](https://www.npmjs.com/package/ssri).
62 +
63 +#### preserveSymlinks
64 +
65 +Indicates that the install was done with the environment variable
66 +`NODE_PRESERVE_SYMLINKS` enabled. The installer should insist that the value of
67 +this property match that environment variable.
68 +
69 +#### dependencies
70 +
71 +A mapping of package name to dependency object. Dependency objects have the
72 +following properties:
73 +
74 +##### version
75 +
76 +This is a specifier that uniquely identifies this package and should be
77 +usable in fetching a new copy of it.
78 +
79 +* bundled dependencies: Regardless of source, this is a version number that is purely for informational purposes.
80 +* registry sources: This is a version number. (eg, `1.2.3`)
81 +* git sources: This is a git specifier with resolved committish. (eg, `git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e`)
82 +* http tarball sources: This is the URL of the tarball. (eg, `https://example.com/example-1.3.0.tgz`)
83 +* local tarball sources: This is the file URL of the tarball. (eg `file:///opt/storage/example-1.3.0.tgz`)
84 +* local link sources: This is the file URL of the link. (eg `file:libs/our-module`)
85 +
86 +##### integrity
87 +
88 +This is a [Standard Subresource
89 +Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) for this
90 +resource.
91 +
92 +* For bundled dependencies this is not included, regardless of source.
93 +* For registry sources, this is the `integrity` that the registry provided, or if one wasn't provided the SHA1 in `shasum`.
94 +* For git sources this is the specific commit hash we cloned from.
95 +* For remote tarball sources this is an integrity based on a SHA512 of
96 + the file.
97 +* For local tarball sources: This is an integrity field based on the SHA512 of the file.
98 +
99 +##### resolved
100 +
101 +* For bundled dependencies this is not included, regardless of source.
102 +* For registry sources this is path of the tarball relative to the registry
103 + URL. If the tarball URL isn't on the same server as the registry URL then
104 + this is a complete URL.
105 +
106 +##### bundled
107 +
108 +If true, this is the bundled dependency and will be installed by the parent
109 +module. When installing, this module will be extracted from the parent
110 +module during the extract phase, not installed as a separate dependency.
111 +
112 +##### dev
113 +
114 +If true then this dependency is either a development dependency ONLY of the
115 +top level module or a transitive dependency of one. This is false for
116 +dependencies that are both a development dependency of the top level and a
117 +transitive dependency of a non-development dependency of the top level.
118 +
119 +##### optional
120 +
121 +If true then this dependency is either an optional dependency ONLY of the
122 +top level module or a transitive dependency of one. This is false for
123 +dependencies that are both an optional dependency of the top level and a
124 +transitive dependency of a non-optional dependency of the top level.
125 +
126 +All optional dependencies should be included even if they're uninstallable
127 +on the current platform.
128 +
129 +
130 +##### requires
131 +
132 +This is a mapping of module name to version. This is a list of everything
133 +this module requires, regardless of where it will be installed. The version
134 +should match via normal matching rules a dependency either in our
135 +`dependencies` or in a level higher than us.
136 +
137 +
138 +##### dependencies
139 +
140 +The dependencies of this dependency, exactly as at the top level.
141 +
142 +### See also
143 +
144 +* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)
145 +* [shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json)
146 +* [package-locks](/cli/v6/configuring-npm/package-locks)
147 +* [package.json](/cli/v6/configuring-npm/package-json)
148 +* [npm install](/cli/v6/commands/npm-install)
content/cli/v6/configuring-npm/package-locks.md new
+181
@@ -0,0 +1,181 @@
1 +---
2 +title: package-locks
3 +section: 5
4 +description: An explanation of npm lockfiles
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/configuring-npm/package-locks.md
8 +---
9 +
10 +### Description
11 +
12 +Conceptually, the "input" to [`npm install`](/cli/v6/commands/npm-install) is a [package.json](/cli/v6/configuring-npm/package-json), while its
13 +"output" is a fully-formed `node_modules` tree: a representation of the
14 +dependencies you declared. In an ideal world, npm would work like a pure
15 +function: the same `package.json` should produce the exact same `node_modules`
16 +tree, any time. In some cases, this is indeed true. But in many others, npm is
17 +unable to do this. There are multiple reasons for this:
18 +
19 +* different versions of npm (or other package managers) may have been used to install a package, each using slightly different installation algorithms.
20 +
21 +* a new version of a direct semver-range package may have been published since the last time your packages were installed, and thus a newer version will be used.
22 +
23 +* A dependency of one of your dependencies may have published a new version, which will update even if you used pinned dependency specifiers (`1.2.3` instead of `^1.2.3`)
24 +
25 +* The registry you installed from is no longer available, or allows mutation of versions (unlike the primary npm registry), and a different version of a package exists under the same version number now.
26 +
27 +As an example, consider package A:
28 +
29 +```json
30 +{
31 + "name": "A",
32 + "version": "0.1.0",
33 + "dependencies": {
34 + "B": "<0.1.0"
35 + }
36 +}
37 +```
38 +
39 +package B:
40 +
41 +```json
42 +{
43 + "name": "B",
44 + "version": "0.0.1",
45 + "dependencies": {
46 + "C": "<0.1.0"
47 + }
48 +}
49 +```
50 +
51 +and package C:
52 +```json
53 +{
54 + "name": "C",
55 + "version": "0.0.1"
56 +}
57 +```
58 +
59 +If these are the only versions of A, B, and C available in the
60 +registry, then a normal `npm install A` will install:
61 +
62 +```json
63 +A@0.1.0
64 +`-- B@0.0.1
65 + `-- C@0.0.1
66 +```
67 +
68 +However, if B@0.0.2 is published, then a fresh `npm install A` will
69 +install:
70 +
71 +```bash
72 +A@0.1.0
73 +`-- B@0.0.2
74 + `-- C@0.0.1
75 +```
76 +
77 +assuming the new version did not modify B's dependencies. Of course,
78 +the new version of B could include a new version of C and any number
79 +of new dependencies. If such changes are undesirable, the author of A
80 +could specify a dependency on B@0.0.1. However, if A's author and B's
81 +author are not the same person, there's no way for A's author to say
82 +that he or she does not want to pull in newly published versions of C
83 +when B hasn't changed at all.
84 +
85 +To prevent this potential issue, npm uses [package-lock.json](/cli/v6/configuring-npm/package-lock-json) or, if present, [npm-shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json). These files are called package locks, or lockfiles.
86 +
87 +Whenever you run `npm install`, npm generates or updates your package lock,
88 +which will look something like this:
89 +
90 +```json
91 +{
92 + "name": "A",
93 + "version": "0.1.0",
94 + ...metadata fields...
95 + "dependencies": {
96 + "B": {
97 + "version": "0.0.1",
98 + "resolved": "https://registry.npmjs.org/B/-/B-0.0.1.tgz",
99 + "integrity": "sha512-DeAdb33F+"
100 + "dependencies": {
101 + "C": {
102 + "version": "git://github.com/org/C.git#5c380ae319fc4efe9e7f2d9c78b0faa588fd99b4"
103 + }
104 + }
105 + }
106 + }
107 +}
108 +```
109 +
110 +This file describes an *exact*, and more importantly *reproducible*
111 +`node_modules` tree. Once it's present, any future installation will base its
112 +work off this file, instead of recalculating dependency versions off
113 +[package.json](/cli/v6/configuring-npm/package-json).
114 +
115 +The presence of a package lock changes the installation behavior such that:
116 +
117 +1. The module tree described by the package lock is reproduced. This means
118 +reproducing the structure described in the file, using the specific files
119 +referenced in "resolved" if available, falling back to normal package resolution
120 +using "version" if one isn't.
121 +
122 +2. The tree is walked and any missing dependencies are installed in the usual
123 +fashion.
124 +
125 +If `preshrinkwrap`, `shrinkwrap` or `postshrinkwrap` are in the `scripts`
126 +property of the `package.json`, they will be executed in order. `preshrinkwrap`
127 +and `shrinkwrap` are executed before the shrinkwrap, `postshrinkwrap` is
128 +executed afterwards. These scripts run for both `package-lock.json` and
129 +`npm-shrinkwrap.json`. For example to run some postprocessing on the generated
130 +file:
131 +
132 +```json
133 + "scripts": {
134 + "postshrinkwrap": "json -I -e \"this.myMetadata = $MY_APP_METADATA\""
135 + }
136 +```
137 +
138 +#### Using locked packages
139 +
140 +Using a locked package is no different than using any package without a package
141 +lock: any commands that update `node_modules` and/or `package.json`'s
142 +dependencies will automatically sync the existing lockfile. This includes `npm
143 +install`, `npm rm`, `npm update`, etc. To prevent this update from happening,
144 +you can use the `--no-save` option to prevent saving altogether, or
145 +`--no-shrinkwrap` to allow `package.json` to be updated while leaving
146 +`package-lock.json` or `npm-shrinkwrap.json` intact.
147 +
148 +It is highly recommended you commit the generated package lock to source
149 +control: this will allow anyone else on your team, your deployments, your
150 +CI/continuous integration, and anyone else who runs `npm install` in your
151 +package source to get the exact same dependency tree that you were developing
152 +on. Additionally, the diffs from these changes are human-readable and will
153 +inform you of any changes npm has made to your `node_modules`, so you can notice
154 +if any transitive dependencies were updated, hoisted, etc.
155 +
156 +#### Resolving lockfile conflicts
157 +
158 +Occasionally, two separate npm install will create package locks that cause
159 +merge conflicts in source control systems. As of `npm@5.7.0`, these conflicts
160 +can be resolved by manually fixing any `package.json` conflicts, and then
161 +running `npm install [--package-lock-only]` again. npm will automatically
162 +resolve any conflicts for you and write a merged package lock that includes all
163 +the dependencies from both branches in a reasonable tree. If
164 +`--package-lock-only` is provided, it will do this without also modifying your
165 +local `node_modules/`.
166 +
167 +To make this process seamless on git, consider installing
168 +[`npm-merge-driver`](https://npm.im/npm-merge-driver), which will teach git how
169 +to do this itself without any user interaction. In short: `$ npx
170 +npm-merge-driver install -g` will let you do this, and even works with
171 +pre-`npm@5.7.0` versions of npm 5, albeit a bit more noisily. Note that if
172 +`package.json` itself conflicts, you will have to resolve that by hand and run
173 +`npm install` manually, even with the merge driver.
174 +
175 +### See Also
176 +
177 +* https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527
178 +* [package.json](/cli/v6/configuring-npm/package-json)
179 +* [package-lock.json](/cli/v6/configuring-npm/package-lock-json)
180 +* [shrinkwrap.json](/cli/v6/configuring-npm/shrinkwrap-json)
181 +* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)
content/cli/v6/configuring-npm/shrinkwrap-json.md new
+33
@@ -0,0 +1,33 @@
1 +---
2 +title: shrinkwrap.json
3 +section: 5
4 +description: A publishable lockfile
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/configuring-npm/shrinkwrap-json.md
8 +---
9 +
10 +### Description
11 +
12 +`npm-shrinkwrap.json` is a file created by [`npm shrinkwrap`](/cli/v6/commands/npm-shrinkwrap). It is identical to
13 +`package-lock.json`, with one major caveat: Unlike `package-lock.json`,
14 +`npm-shrinkwrap.json` may be included when publishing a package.
15 +
16 +The recommended use-case for `npm-shrinkwrap.json` is applications deployed
17 +through the publishing process on the registry: for example, daemons and
18 +command-line tools intended as global installs or `devDependencies`. It's
19 +strongly discouraged for library authors to publish this file, since that would
20 +prevent end users from having control over transitive dependency updates.
21 +
22 +Additionally, if both `package-lock.json` and `npm-shrinkwrap.json` are present
23 +in a package root, `package-lock.json` will be ignored in favor of this file.
24 +
25 +For full details and description of the `npm-shrinkwrap.json` file format, refer
26 +to the manual page for [package-lock.json](/cli/v6/configuring-npm/package-lock-json).
27 +
28 +### See also
29 +
30 +* [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap)
31 +* [package-lock.json](/cli/v6/configuring-npm/package-lock-json)
32 +* [package.json](/cli/v6/configuring-npm/package-json)
33 +* [npm install](/cli/v6/commands/npm-install)
content/cli/v6/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +github_repo: npm/cli
3 +github_branch: v6-docs
4 +github_path: docs/content/index.mdx
5 +title: CLI documentation
6 +---
7 +<Index depth="1" />
\ No newline at end of file
content/cli/v6/using-npm/config.md new
+1299
@@ -0,0 +1,1299 @@
1 +---
2 +title: config
3 +section: 7
4 +description: More than you probably want to know about npm configuration
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/config.md
8 +---
9 +
10 +### Description
11 +
12 +npm gets its configuration values from the following sources, sorted by priority:
13 +
14 +#### Command Line Flags
15 +
16 +Putting `--foo bar` on the command line sets the `foo` configuration
17 +parameter to `"bar"`. A `--` argument tells the cli parser to stop
18 +reading flags. Using `--flag` without specifying any value will set
19 +the value to `true`.
20 +
21 +Example: `--flag1 --flag2` will set both configuration parameters
22 +to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`,
23 +and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set
24 +both configuration parameters to `true`, and the `bar` is taken
25 +as a command argument.
26 +
27 +#### Environment Variables
28 +
29 +Any environment variables that start with `npm_config_` will be
30 +interpreted as a configuration parameter. For example, putting
31 +`npm_config_foo=bar` in your environment will set the `foo`
32 +configuration parameter to `bar`. Any environment configurations that
33 +are not given a value will be given the value of `true`. Config
34 +values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the
35 +same. However, please note that inside [`scripts`](/cli/v6/using-npm/scripts)
36 +npm will set its own environment variables and Node will prefer
37 +those lowercase versions over any uppercase ones that you might set.
38 +For details see [this issue](https://github.com/npm/npm/issues/14528).
39 +
40 +Notice that you need to use underscores instead of dashes, so `--allow-same-version`
41 +would become `npm_config_allow_same_version=true`.
42 +
43 +#### npmrc Files
44 +
45 +The four relevant files are:
46 +
47 +* per-project configuration file (`/path/to/my/project/.npmrc`)
48 +* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI
49 + option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`)
50 +* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via
51 + CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`)
52 +* npm's built-in configuration file (`/path/to/npm/npmrc`)
53 +
54 +See [npmrc](/cli/v6/configuring-npm/npmrc) for more details.
55 +
56 +#### Default Configs
57 +
58 +Run `npm config ls -l` to see a set of configuration parameters that are
59 +internal to npm, and are defaults if nothing else is specified.
60 +
61 +### Shorthands and Other CLI Niceties
62 +
63 +The following shorthands are parsed on the command-line:
64 +
65 +* `-v`: `--version`
66 +* `-h`, `-?`, `--help`, `-H`: `--usage`
67 +* `-s`, `--silent`: `--loglevel silent`
68 +* `-q`, `--quiet`: `--loglevel warn`
69 +* `-d`: `--loglevel info`
70 +* `-dd`, `--verbose`: `--loglevel verbose`
71 +* `-ddd`: `--loglevel silly`
72 +* `-g`: `--global`
73 +* `-C`: `--prefix`
74 +* `-l`: `--long`
75 +* `-m`: `--message`
76 +* `-p`, `--porcelain`: `--parseable`
77 +* `-reg`: `--registry`
78 +* `-f`: `--force`
79 +* `-desc`: `--description`
80 +* `-S`: `--save`
81 +* `-P`: `--save-prod`
82 +* `-D`: `--save-dev`
83 +* `-O`: `--save-optional`
84 +* `-B`: `--save-bundle`
85 +* `-E`: `--save-exact`
86 +* `-y`: `--yes`
87 +* `-n`: `--yes false`
88 +* `ll` and `la` commands: `ls --long`
89 +
90 +If the specified configuration param resolves unambiguously to a known
91 +configuration parameter, then it is expanded to that configuration
92 +parameter. For example:
93 +
94 +```bash
95 +npm ls --par
96 +# same as:
97 +npm ls --parseable
98 +```
99 +
100 +If multiple single-character shorthands are strung together, and the
101 +resulting combination is unambiguously not some other configuration
102 +param, then it is expanded to its various component pieces. For
103 +example:
104 +
105 +```bash
106 +npm ls -gpld
107 +# same as:
108 +npm ls --global --parseable --long --loglevel info
109 +```
110 +
111 +### Per-Package Config Settings
112 +
113 +When running scripts (see [`scripts`](/cli/v6/using-npm/scripts)) the package.json "config"
114 +keys are overwritten in the environment if there is a config param of
115 +`<name>[@<version>]:<key>`. For example, if the package.json has
116 +this:
117 +
118 +```json
119 +{ "name" : "foo"
120 +, "config" : { "port" : "8080" }
121 +, "scripts" : { "start" : "node server.js" } }
122 +```
123 +
124 +and the server.js is this:
125 +
126 +```javascript
127 +http.createServer(...).listen(process.env.npm_package_config_port)
128 +```
129 +
130 +then the user could change the behavior by doing:
131 +
132 +```bash
133 +npm config set foo:port 80
134 +```
135 +
136 +See [package.json](/cli/v6/configuring-npm/package-json) for more information.
137 +
138 +### Config Settings
139 +
140 +#### access
141 +
142 +* Default: `restricted`
143 +* Type: Access
144 +
145 +When publishing scoped packages, the access level defaults to `restricted`. If
146 +you want your scoped package to be publicly viewable (and installable) set
147 +`--access=public`. The only valid values for `access` are `public` and
148 +`restricted`. Unscoped packages _always_ have an access level of `public`.
149 +
150 +#### allow-same-version
151 +
152 +* Default: false
153 +* Type: Boolean
154 +
155 +Prevents throwing an error when `npm version` is used to set the new version
156 +to the same value as the current version.
157 +
158 +#### always-auth
159 +
160 +* Default: false
161 +* Type: Boolean
162 +
163 +Force npm to always require authentication when accessing the registry,
164 +even for `GET` requests.
165 +
166 +#### also
167 +
168 +* Default: null
169 +* Type: String
170 +
171 +When "dev" or "development" and running local `npm shrinkwrap`,
172 +`npm outdated`, or `npm update`, is an alias for `--dev`.
173 +
174 +#### audit
175 +
176 +* Default: true
177 +* Type: Boolean
178 +
179 +When "true" submit audit reports alongside `npm install` runs to the default
180 +registry and all registries configured for scopes. See the documentation
181 +for [`npm audit`](/cli/v6/commands/npm-audit) for details on what is submitted.
182 +
183 +#### audit-level
184 +
185 +* Default: `"low"`
186 +* Type: `'low'`, `'moderate'`, `'high'`, `'critical'`
187 +
188 +The minimum level of vulnerability for `npm audit` to exit with
189 +a non-zero exit code.
190 +
191 +#### auth-type
192 +
193 +* Default: `'legacy'`
194 +* Type: `'legacy'`, `'sso'`, `'saml'`, `'oauth'`
195 +
196 +What authentication strategy to use with `adduser`/`login`.
197 +
198 +#### before
199 +
200 +* Alias: enjoy-by
201 +* Default: null
202 +* Type: Date
203 +
204 +If passed to `npm install`, will rebuild the npm tree such that only versions
205 +that were available **on or before** the `--before` time get installed.
206 +If there's no versions available for the current set of direct dependencies, the
207 +command will error.
208 +
209 +If the requested version is a `dist-tag` and the given tag does not pass the
210 +`--before` filter, the most recent version less than or equal to that tag will
211 +be used. For example, `foo@latest` might install `foo@1.2` even though `latest`
212 +is `2.0`.
213 +
214 +#### bin-links
215 +
216 +* Default: `true`
217 +* Type: Boolean
218 +
219 +Tells npm to create symlinks (or `.cmd` shims on Windows) for package
220 +executables.
221 +
222 +Set to false to have it not do this. This can be used to work around
223 +the fact that some file systems don't support symlinks, even on
224 +ostensibly Unix systems.
225 +
226 +#### browser
227 +
228 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
229 +* Type: String
230 +
231 +The browser that is called by the `npm docs` command to open websites.
232 +
233 +#### ca
234 +
235 +* Default: The npm CA certificate
236 +* Type: String, Array or null
237 +
238 +The Certificate Authority signing certificate that is trusted for SSL
239 +connections to the registry. Values should be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines
240 +replaced by the string "\n". For example:
241 +
242 +```bash
243 +ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
244 +```
245 +
246 +Set to `null` to only allow "known" registrars, or to a specific CA cert
247 +to trust only that specific signing authority.
248 +
249 +Multiple CAs can be trusted by specifying an array of certificates:
250 +
251 +```bash
252 +ca[]="..."
253 +ca[]="..."
254 +```
255 +
256 +See also the `strict-ssl` config.
257 +
258 +#### cafile
259 +
260 +* Default: `null`
261 +* Type: path
262 +
263 +A path to a file containing one or multiple Certificate Authority signing
264 +certificates. Similar to the `ca` setting, but allows for multiple CA's, as
265 +well as for the CA information to be stored in a file on disk.
266 +
267 +#### cache
268 +
269 +* Default: Windows: `%AppData%\npm-cache`, Posix: `~/.npm`
270 +* Type: path
271 +
272 +The location of npm's cache directory. See [`npm cache`](/cli/v6/commands/npm-cache)
273 +
274 +#### cache-lock-stale
275 +
276 +* Default: 60000 (1 minute)
277 +* Type: Number
278 +
279 +The number of ms before cache folder lockfiles are considered stale.
280 +
281 +#### cache-lock-retries
282 +
283 +* Default: 10
284 +* Type: Number
285 +
286 +Number of times to retry to acquire a lock on cache folder lockfiles.
287 +
288 +#### cache-lock-wait
289 +
290 +* Default: 10000 (10 seconds)
291 +* Type: Number
292 +
293 +Number of ms to wait for cache lock files to expire.
294 +
295 +#### cache-max
296 +
297 +* Default: Infinity
298 +* Type: Number
299 +
300 +**DEPRECATED**: This option has been deprecated in favor of `--prefer-online`.
301 +
302 +`--cache-max=0` is an alias for `--prefer-online`.
303 +
304 +#### cache-min
305 +
306 +* Default: 10
307 +* Type: Number
308 +
309 +**DEPRECATED**: This option has been deprecated in favor of `--prefer-offline`.
310 +
311 +`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.
312 +
313 +#### cert
314 +
315 +* Default: `null`
316 +* Type: String
317 +
318 +A client certificate to pass when accessing the registry. Values should be in
319 +PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example:
320 +
321 +```bash
322 +cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
323 +```
324 +
325 +It is _not_ the path to a certificate file (and there is no "certfile" option).
326 +
327 +#### cidr
328 +
329 +* Default: `null`
330 +* Type: String, Array, null
331 +
332 +This is a list of CIDR address to be used when configuring limited access tokens with the `npm token create` command.
333 +
334 +#### color
335 +
336 +* Default: true
337 +* Type: Boolean or `"always"`
338 +
339 +If false, never shows colors. If `"always"` then always shows colors.
340 +If true, then only prints color codes for tty file descriptors.
341 +
342 +This option can also be changed using the environment: colors are
343 +disabled when the environment variable `NO_COLOR` is set to any value.
344 +
345 +#### depth
346 +
347 +* Default: Infinity
348 +* Type: Number
349 +
350 +The depth to go when recursing directories for `npm ls`,
351 +`npm cache ls`, and `npm outdated`.
352 +
353 +For `npm outdated`, a setting of `Infinity` will be treated as `0`
354 +since that gives more useful information. To show the outdated status
355 +of all packages and dependents, use a large integer value,
356 +e.g., `npm outdated --depth 9999`
357 +
358 +#### description
359 +
360 +* Default: true
361 +* Type: Boolean
362 +
363 +Show the description in `npm search`
364 +
365 +#### dev
366 +
367 +* Default: false
368 +* Type: Boolean
369 +
370 +Install `dev-dependencies` along with packages.
371 +
372 +#### dry-run
373 +
374 +* Default: false
375 +* Type: Boolean
376 +
377 +Indicates that you don't want npm to make any changes and that it should
378 +only report what it would have done. This can be passed into any of the
379 +commands that modify your local installation, eg, `install`, `update`,
380 +`dedupe`, `uninstall`. This is NOT currently honored by some network related
381 +commands, eg `dist-tags`, `owner`, etc.
382 +
383 +#### editor
384 +
385 +* Default: `EDITOR` environment variable if set, or `"vi"` on Posix,
386 + or `"notepad"` on Windows.
387 +* Type: path
388 +
389 +The command to run for `npm edit` or `npm config edit`.
390 +
391 +#### engine-strict
392 +
393 +* Default: false
394 +* Type: Boolean
395 +
396 +If set to true, then npm will stubbornly refuse to install (or even
397 +consider installing) any package that claims to not be compatible with
398 +the current Node.js version.
399 +
400 +#### force
401 +
402 +* Default: false
403 +* Type: Boolean
404 +
405 +Makes various commands more forceful.
406 +
407 +* lifecycle script failure does not block progress.
408 +* publishing clobbers previously published versions.
409 +* skips cache when requesting from the registry.
410 +* prevents checks against clobbering non-npm files.
411 +
412 +#### format-package-lock
413 +
414 +* Default: true
415 +* Type: Boolean
416 +
417 +Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable file.
418 +
419 +#### fetch-retries
420 +
421 +* Default: 2
422 +* Type: Number
423 +
424 +The "retries" config for the `retry` module to use when fetching
425 +packages from the registry.
426 +
427 +#### fetch-retry-factor
428 +
429 +* Default: 10
430 +* Type: Number
431 +
432 +The "factor" config for the `retry` module to use when fetching
433 +packages.
434 +
435 +#### fetch-retry-mintimeout
436 +
437 +* Default: 10000 (10 seconds)
438 +* Type: Number
439 +
440 +The "minTimeout" config for the `retry` module to use when fetching
441 +packages.
442 +
443 +#### fetch-retry-maxtimeout
444 +
445 +* Default: 60000 (1 minute)
446 +* Type: Number
447 +
448 +The "maxTimeout" config for the `retry` module to use when fetching
449 +packages.
450 +
451 +#### fund
452 +
453 +* Default: true
454 +* Type: Boolean
455 +
456 +When "true" displays the message at the end of each `npm install`
457 +acknowledging the number of dependencies looking for funding.
458 +See [`npm fund`](/cli/v6/commands/npm-fund) for details.
459 +
460 +#### git
461 +
462 +* Default: `"git"`
463 +* Type: String
464 +
465 +The command to use for git commands. If git is installed on the
466 +computer, but is not in the `PATH`, then set this to the full path to
467 +the git binary.
468 +
469 +#### git-tag-version
470 +
471 +* Default: `true`
472 +* Type: Boolean
473 +
474 +Tag the commit when using the `npm version` command.
475 +
476 +#### commit-hooks
477 +
478 +* Default: `true`
479 +* Type: Boolean
480 +
481 +Run git commit hooks when using the `npm version` command.
482 +
483 +#### global
484 +
485 +* Default: false
486 +* Type: Boolean
487 +
488 +Operates in "global" mode, so that packages are installed into the
489 +`prefix` folder instead of the current working directory. See
490 +[folders](/cli/v6/configuring-npm/folders) for more on the differences in behavior.
491 +
492 +* packages are installed into the `{prefix}/lib/node_modules` folder, instead of the
493 + current working directory.
494 +* bin files are linked to `{prefix}/bin`
495 +* man pages are linked to `{prefix}/share/man`
496 +
497 +#### globalconfig
498 +
499 +* Default: {prefix}/etc/npmrc
500 +* Type: path
501 +
502 +The config file to read for global config options.
503 +
504 +#### global-style
505 +
506 +* Default: false
507 +* Type: Boolean
508 +
509 +Causes npm to install the package into your local `node_modules` folder with
510 +the same layout it uses with the global `node_modules` folder. Only your
511 +direct dependencies will show in `node_modules` and everything they depend
512 +on will be flattened in their `node_modules` folders. This obviously will
513 +eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be
514 +preferred.
515 +
516 +#### group
517 +
518 +* Default: GID of the current process
519 +* Type: String or Number
520 +
521 +The group to use when running package scripts in global mode as the root
522 +user.
523 +
524 +#### heading
525 +
526 +* Default: `"npm"`
527 +* Type: String
528 +
529 +The string that starts all the debugging log output.
530 +
531 +#### https-proxy
532 +
533 +* Default: null
534 +* Type: url
535 +
536 +A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or
537 +`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,
538 +proxy settings will be honored by the underlying `request` library.
539 +
540 +#### if-present
541 +
542 +* Default: false
543 +* Type: Boolean
544 +
545 +If true, npm will not exit with an error code when `run-script` is invoked for
546 +a script that isn't defined in the `scripts` section of `package.json`. This
547 +option can be used when it's desirable to optionally run a script when it's
548 +present and fail if the script fails. This is useful, for example, when running
549 +scripts that may only apply for some builds in an otherwise generic CI setup.
550 +
551 +#### ignore-prepublish
552 +
553 +* Default: false
554 +* Type: Boolean
555 +
556 +If true, npm will not run `prepublish` scripts.
557 +
558 +#### ignore-scripts
559 +
560 +* Default: false
561 +* Type: Boolean
562 +
563 +If true, npm does not run scripts specified in package.json files.
564 +
565 +#### init-module
566 +
567 +* Default: ~/.npm-init.js
568 +* Type: path
569 +
570 +A module that will be loaded by the `npm init` command. See the
571 +documentation for the
572 +[init-package-json](https://github.com/isaacs/init-package-json) module
573 +for more information, or [npm init](/cli/v6/commands/npm-init).
574 +
575 +#### init-author-name
576 +
577 +* Default: ""
578 +* Type: String
579 +
580 +The value `npm init` should use by default for the package author's name.
581 +
582 +#### init-author-email
583 +
584 +* Default: ""
585 +* Type: String
586 +
587 +The value `npm init` should use by default for the package author's email.
588 +
589 +#### init-author-url
590 +
591 +* Default: ""
592 +* Type: String
593 +
594 +The value `npm init` should use by default for the package author's homepage.
595 +
596 +#### init-license
597 +
598 +* Default: "ISC"
599 +* Type: String
600 +
601 +The value `npm init` should use by default for the package license.
602 +
603 +#### init-version
604 +
605 +* Default: "1.0.0"
606 +* Type: semver
607 +
608 +The value that `npm init` should use by default for the package
609 +version number, if not already set in package.json.
610 +
611 +#### json
612 +
613 +* Default: false
614 +* Type: Boolean
615 +
616 +Whether or not to output JSON data, rather than the normal output.
617 +
618 +This feature is currently experimental, and the output data structures for many
619 +commands is either not implemented in JSON yet, or subject to change. Only the
620 +output from `npm ls --json` and `npm search --json` are currently valid.
621 +
622 +#### key
623 +
624 +* Default: `null`
625 +* Type: String
626 +
627 +A client key to pass when accessing the registry. Values should be in PEM
628 +format with newlines replaced by the string "\n". For example:
629 +
630 +```json
631 +key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
632 +```
633 +
634 +It is _not_ the path to a key file (and there is no "keyfile" option).
635 +
636 +#### legacy-bundling
637 +
638 +* Default: false
639 +* Type: Boolean
640 +
641 +Causes npm to install the package such that versions of npm prior to 1.4,
642 +such as the one included with node 0.8, can install the package. This
643 +eliminates all automatic deduping. If used with `global-style` this option
644 +will be preferred.
645 +
646 +#### link
647 +
648 +* Default: false
649 +* Type: Boolean
650 +
651 +If true, then local installs will link if there is a suitable globally
652 +installed package.
653 +
654 +Note that this means that local installs can cause things to be
655 +installed into the global space at the same time. The link is only done
656 +if one of the two conditions are met:
657 +
658 +* The package is not already installed globally, or
659 +* the globally installed version is identical to the version that is
660 + being installed locally.
661 +
662 +#### local-address
663 +
664 +* Default: undefined
665 +* Type: IP Address
666 +
667 +The IP address of the local interface to use when making connections
668 +to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
669 +
670 +#### loglevel
671 +
672 +* Default: "notice"
673 +* Type: String
674 +* Values: "silent", "error", "warn", "notice", "http", "timing", "info",
675 + "verbose", "silly"
676 +
677 +What level of logs to report. On failure, *all* logs are written to
678 +`npm-debug.log` in the current working directory.
679 +
680 +Any logs of a higher level than the setting are shown. The default is "notice".
681 +
682 +#### logstream
683 +
684 +* Default: process.stderr
685 +* Type: Stream
686 +
687 +This is the stream that is passed to the
688 +[npmlog](https://github.com/npm/npmlog) module at run time.
689 +
690 +It cannot be set from the command line, but if you are using npm
691 +programmatically, you may wish to send logs to somewhere other than
692 +stderr.
693 +
694 +If the `color` config is set to true, then this stream will receive
695 +colored output if it is a TTY.
696 +
697 +#### logs-max
698 +
699 +* Default: 10
700 +* Type: Number
701 +
702 +The maximum number of log files to store.
703 +
704 +#### long
705 +
706 +* Default: false
707 +* Type: Boolean
708 +
709 +Show extended information in `npm ls` and `npm search`.
710 +
711 +#### maxsockets
712 +
713 +* Default: 50
714 +* Type: Number
715 +
716 +The maximum number of connections to use per origin (protocol/host/port
717 +combination). Passed to the `http` `Agent` used to make the request.
718 +
719 +#### message
720 +
721 +* Default: "%s"
722 +* Type: String
723 +
724 +Commit message which is used by `npm version` when creating version commit.
725 +
726 +Any "%s" in the message will be replaced with the version number.
727 +
728 +#### metrics-registry
729 +
730 +* Default: The value of `registry` (which defaults to "https://registry.npmjs.org/")
731 +* Type: String
732 +
733 +The registry you want to send cli metrics to if `send-metrics` is true.
734 +
735 +#### node-options
736 +
737 +* Default: null
738 +* Type: String
739 +
740 +Options to pass through to Node.js via the `NODE_OPTIONS` environment
741 +variable. This does not impact how npm itself is executed but it does
742 +impact how lifecycle scripts are called.
743 +
744 +#### node-version
745 +
746 +* Default: process.version
747 +* Type: semver or false
748 +
749 +The node version to use when checking a package's `engines` map.
750 +
751 +#### noproxy
752 +
753 +* Default: null
754 +* Type: String or Array
755 +
756 +A comma-separated string or an array of domain extensions that a proxy should not be used for.
757 +
758 +#### offline
759 +
760 +* Default: false
761 +* Type: Boolean
762 +
763 +Force offline mode: no network requests will be done during install. To allow
764 +the CLI to fill in missing cache data, see `--prefer-offline`.
765 +
766 +#### onload-script
767 +
768 +* Default: false
769 +* Type: path
770 +
771 +A node module to `require()` when npm loads. Useful for programmatic
772 +usage.
773 +
774 +#### only
775 +
776 +* Default: null
777 +* Type: String
778 +
779 +When "dev" or "development" and running local `npm install` without any
780 +arguments, only devDependencies (and their dependencies) are installed.
781 +
782 +When "dev" or "development" and running local `npm ls`, `npm outdated`, or
783 +`npm update`, is an alias for `--dev`.
784 +
785 +When "prod" or "production" and running local `npm install` without any
786 +arguments, only non-devDependencies (and their dependencies) are
787 +installed.
788 +
789 +When "prod" or "production" and running local `npm ls`, `npm outdated`, or
790 +`npm update`, is an alias for `--production`.
791 +
792 +#### optional
793 +
794 +* Default: true
795 +* Type: Boolean
796 +
797 +Attempt to install packages in the `optionalDependencies` object. Note
798 +that if these packages fail to install, the overall installation
799 +process is not aborted.
800 +
801 +#### otp
802 +
803 +* Default: null
804 +* Type: Number
805 +
806 +This is a one-time password from a two-factor authenticator. It's needed
807 +when publishing or changing package permissions with `npm access`.
808 +
809 +#### package-lock
810 +
811 +* Default: true
812 +* Type: Boolean
813 +
814 +If set to false, then ignore `package-lock.json` files when installing. This
815 +will also prevent _writing_ `package-lock.json` if `save` is true.
816 +
817 +When package package-locks are disabled, automatic pruning of extraneous
818 +modules will also be disabled. To remove extraneous modules with
819 +package-locks disabled use `npm prune`.
820 +
821 +This option is an alias for `--shrinkwrap`.
822 +
823 +#### package-lock-only
824 +
825 +* Default: false
826 +* Type: Boolean
827 +
828 +If set to true, it will update only the `package-lock.json`,
829 +instead of checking `node_modules` and downloading dependencies.
830 +
831 +#### parseable
832 +
833 +* Default: false
834 +* Type: Boolean
835 +
836 +Output parseable results from commands that write to
837 +standard output. For `npm search`, this will be tab-separated table format.
838 +
839 +#### prefer-offline
840 +
841 +* Default: false
842 +* Type: Boolean
843 +
844 +If true, staleness checks for cached data will be bypassed, but missing data
845 +will be requested from the server. To force full offline mode, use `--offline`.
846 +
847 +This option is effectively equivalent to `--cache-min=9999999`.
848 +
849 +#### prefer-online
850 +
851 +* Default: false
852 +* Type: Boolean
853 +
854 +If true, staleness checks for cached data will be forced, making the CLI look
855 +for updates immediately even for fresh package data.
856 +
857 +#### prefix
858 +
859 +* Default: see [folders](/cli/v6/configuring-npm/folders)
860 +* Type: path
861 +
862 +The location to install global items. If set on the command line, then
863 +it forces non-global commands to run in the specified folder.
864 +
865 +#### preid
866 +
867 +* Default: ""
868 +* Type: String
869 +
870 +The "prerelease identifier" to use as a prefix for the "prerelease" part of a
871 +semver. Like the `rc` in `1.2.0-rc.8`.
872 +
873 +#### production
874 +
875 +* Default: false
876 +* Type: Boolean
877 +
878 +Set to true to run in "production" mode.
879 +
880 +1. devDependencies are not installed at the topmost level when running
881 + local `npm install` without any arguments.
882 +2. Set the NODE_ENV="production" for lifecycle scripts.
883 +
884 +#### progress
885 +
886 +* Default: true, unless TRAVIS or CI env vars set.
887 +* Type: Boolean
888 +
889 +When set to `true`, npm will display a progress bar during time intensive
890 +operations, if `process.stderr` is a TTY.
891 +
892 +Set to `false` to suppress the progress bar.
893 +
894 +#### proxy
895 +
896 +* Default: null
897 +* Type: url
898 +
899 +A proxy to use for outgoing http requests. If the `HTTP_PROXY` or
900 +`http_proxy` environment variables are set, proxy settings will be
901 +honored by the underlying `request` library.
902 +
903 +#### read-only
904 +
905 +* Default: false
906 +* Type: Boolean
907 +
908 +This is used to mark a token as unable to publish when configuring limited access tokens with the `npm token create` command.
909 +
910 +#### rebuild-bundle
911 +
912 +* Default: true
913 +* Type: Boolean
914 +
915 +Rebuild bundled dependencies after installation.
916 +
917 +#### registry
918 +
919 +* Default: https://registry.npmjs.org/
920 +* Type: url
921 +
922 +The base URL of the npm package registry.
923 +
924 +#### rollback
925 +
926 +* Default: true
927 +* Type: Boolean
928 +
929 +Remove failed installs.
930 +
931 +#### save
932 +
933 +* Default: true
934 +* Type: Boolean
935 +
936 +Save installed packages to a package.json file as dependencies.
937 +
938 +When used with the `npm rm` command, it removes it from the `dependencies`
939 +object.
940 +
941 +Only works if there is already a package.json file present.
942 +
943 +#### save-bundle
944 +
945 +* Default: false
946 +* Type: Boolean
947 +
948 +If a package would be saved at install time by the use of `--save`,
949 +`--save-dev`, or `--save-optional`, then also put it in the
950 +`bundleDependencies` list.
951 +
952 +When used with the `npm rm` command, it removes it from the
953 +bundledDependencies list.
954 +
955 +#### save-prod
956 +
957 +* Default: false
958 +* Type: Boolean
959 +
960 +Makes sure that a package will be saved into `dependencies` specifically. This
961 +is useful if a package already exists in `devDependencies` or
962 +`optionalDependencies`, but you want to move it to be a production dep. This is
963 +also the default behavior if `--save` is true, and neither `--save-dev` or
964 +`--save-optional` are true.
965 +
966 +#### save-dev
967 +
968 +* Default: false
969 +* Type: Boolean
970 +
971 +Save installed packages to a package.json file as `devDependencies`.
972 +
973 +When used with the `npm rm` command, it removes it from the
974 +`devDependencies` object.
975 +
976 +Only works if there is already a package.json file present.
977 +
978 +#### save-exact
979 +
980 +* Default: false
981 +* Type: Boolean
982 +
983 +Dependencies saved to package.json using `--save`, `--save-dev` or
984 +`--save-optional` will be configured with an exact version rather than
985 +using npm's default semver range operator.
986 +
987 +#### save-optional
988 +
989 +* Default: false
990 +* Type: Boolean
991 +
992 +Save installed packages to a package.json file as
993 +optionalDependencies.
994 +
995 +When used with the `npm rm` command, it removes it from the
996 +`devDependencies` object.
997 +
998 +Only works if there is already a package.json file present.
999 +
1000 +#### save-prefix
1001 +
1002 +* Default: '^'
1003 +* Type: String
1004 +
1005 +Configure how versions of packages installed to a package.json file via
1006 +`--save` or `--save-dev` get prefixed.
1007 +
1008 +For example if a package has version `1.2.3`, by default its version is
1009 +set to `^1.2.3` which allows minor upgrades for that package, but after
1010 +`npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows
1011 +patch upgrades.
1012 +
1013 +#### scope
1014 +
1015 +* Default: the scope of the current project, if any, or ""
1016 +* Type: String
1017 +
1018 +Associate an operation with a scope for a scoped registry. Useful when logging
1019 +in to a private registry for the first time:
1020 +`npm login --scope=@organization --registry=registry.organization.com`, which
1021 +will cause `@organization` to be mapped to the registry for future installation
1022 +of packages specified according to the pattern `@organization/package`.
1023 +
1024 +#### script-shell
1025 +
1026 +* Default: `null`
1027 +* Type: path
1028 +
1029 +The shell to use for scripts run with the `npm run` command.
1030 +
1031 +#### scripts-prepend-node-path
1032 +
1033 +* Default: "warn-only"
1034 +* Type: Boolean, `"auto"` or `"warn-only"`
1035 +
1036 +If set to `true`, add the directory in which the current `node` executable
1037 +resides to the `PATH` environment variable when running scripts,
1038 +even if that means that `npm` will invoke a different `node` executable than
1039 +the one which it is running.
1040 +
1041 +If set to `false`, never modify `PATH` with that.
1042 +
1043 +If set to `"warn-only"`, never modify `PATH` but print a warning if `npm` thinks
1044 +that you may want to run it with `true`, e.g. because the `node` executable
1045 +in the `PATH` is not the one `npm` was invoked with.
1046 +
1047 +If set to `auto`, only add that directory to the `PATH` environment variable
1048 +if the `node` executable with which `npm` was invoked and the one that is found
1049 +first on the `PATH` are different.
1050 +
1051 +#### searchexclude
1052 +
1053 +* Default: ""
1054 +* Type: String
1055 +
1056 +Space-separated options that limit the results from search.
1057 +
1058 +#### searchopts
1059 +
1060 +* Default: ""
1061 +* Type: String
1062 +
1063 +Space-separated options that are always passed to search.
1064 +
1065 +#### searchlimit
1066 +
1067 +* Default: 20
1068 +* Type: Number
1069 +
1070 +Number of items to limit search results to. Will not apply at all to legacy
1071 +searches.
1072 +
1073 +#### searchstaleness
1074 +
1075 +* Default: 900 (15 minutes)
1076 +* Type: Number
1077 +
1078 +The age of the cache, in seconds, before another registry request is made if
1079 +using legacy search endpoint.
1080 +
1081 +#### send-metrics
1082 +
1083 +* Default: false
1084 +* Type: Boolean
1085 +
1086 +If true, success/failure metrics will be reported to the registry stored in
1087 +`metrics-registry`. These requests contain the number of successful and
1088 +failing runs of the npm CLI and the time period overwhich those counts were
1089 +gathered. No identifying information is included in these requests.
1090 +
1091 +#### shell
1092 +
1093 +* Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
1094 + Windows
1095 +* Type: path
1096 +
1097 +The shell to run for the `npm explore` command.
1098 +
1099 +#### shrinkwrap
1100 +
1101 +* Default: true
1102 +* Type: Boolean
1103 +
1104 +If set to false, then ignore `npm-shrinkwrap.json` files when installing. This
1105 +will also prevent _writing_ `npm-shrinkwrap.json` if `save` is true.
1106 +
1107 +This option is an alias for `--package-lock`.
1108 +
1109 +#### sign-git-commit
1110 +
1111 +* Default: false
1112 +* Type: Boolean
1113 +
1114 +If set to true, then the `npm version` command will commit the new package
1115 +version using `-S` to add a signature.
1116 +
1117 +Note that git requires you to have set up GPG keys in your git configs
1118 +for this to work properly.
1119 +
1120 +#### sign-git-tag
1121 +
1122 +* Default: false
1123 +* Type: Boolean
1124 +
1125 +If set to true, then the `npm version` command will tag the version
1126 +using `-s` to add a signature.
1127 +
1128 +Note that git requires you to have set up GPG keys in your git configs
1129 +for this to work properly.
1130 +
1131 +#### sso-poll-frequency
1132 +
1133 +* Default: 500
1134 +* Type: Number
1135 +
1136 +When used with SSO-enabled `auth-type`s, configures how regularly the registry
1137 +should be polled while the user is completing authentication.
1138 +
1139 +#### sso-type
1140 +
1141 +* Default: 'oauth'
1142 +* Type: 'oauth', 'saml', or null
1143 +
1144 +If `--auth-type=sso`, the type of SSO type to use.
1145 +
1146 +#### strict-ssl
1147 +
1148 +* Default: true
1149 +* Type: Boolean
1150 +
1151 +Whether or not to do SSL key validation when making requests to the
1152 +registry via https.
1153 +
1154 +See also the `ca` config.
1155 +
1156 +#### tag
1157 +
1158 +* Default: latest
1159 +* Type: String
1160 +
1161 +If you ask npm to install a package and don't tell it a specific version, then
1162 +it will install the specified tag.
1163 +
1164 +Also the tag that is added to the package@version specified by the `npm
1165 +tag` command, if no explicit tag is given.
1166 +
1167 +#### tag-version-prefix
1168 +
1169 +* Default: `"v"`
1170 +* Type: String
1171 +
1172 +If set, alters the prefix used when tagging a new version when performing a
1173 +version increment using `npm-version`. To remove the prefix altogether, set it
1174 +to the empty string: `""`.
1175 +
1176 +Because other tools may rely on the convention that npm version tags look like
1177 +`v1.0.0`, _only use this property if it is absolutely necessary_. In
1178 +particular, use care when overriding this setting for public packages.
1179 +
1180 +#### timing
1181 +
1182 +* Default: `false`
1183 +* Type: Boolean
1184 +
1185 +If true, writes an `npm-debug` log to `_logs` and timing information to
1186 +`_timing.json`, both in your cache. `_timing.json` is a newline delimited
1187 +list of JSON objects. You can quickly view it with this
1188 +[json](https://www.npmjs.com/package/json) command line:
1189 +`json -g < ~/.npm/_timing.json`.
1190 +
1191 +#### tmp
1192 +
1193 +* Default: TMPDIR environment variable, or "/tmp"
1194 +* Type: path
1195 +
1196 +Where to store temporary files and folders. All temp files are deleted
1197 +on success, but left behind on failure for forensic purposes.
1198 +
1199 +#### unicode
1200 +
1201 +* Default: false on windows, true on mac/unix systems with a unicode locale
1202 +* Type: Boolean
1203 +
1204 +When set to true, npm uses unicode characters in the tree output. When
1205 +false, it uses ascii characters to draw trees.
1206 +
1207 +#### unsafe-perm
1208 +
1209 +* Default: false if running as root, true otherwise
1210 +* Type: Boolean
1211 +
1212 +Set to true to suppress the UID/GID switching when running package
1213 +scripts. If set explicitly to false, then installing as a non-root user
1214 +will fail.
1215 +
1216 +#### update-notifier
1217 +
1218 +* Default: true
1219 +* Type: Boolean
1220 +
1221 +Set to false to suppress the update notification when using an older
1222 +version of npm than the latest.
1223 +
1224 +#### usage
1225 +
1226 +* Default: false
1227 +* Type: Boolean
1228 +
1229 +Set to show short usage output (like the -H output)
1230 +instead of complete help when doing [`npm help`](/cli/v6/commands/npm-help).
1231 +
1232 +#### user
1233 +
1234 +* Default: "nobody"
1235 +* Type: String or Number
1236 +
1237 +The UID to set to when running package scripts as root.
1238 +
1239 +#### userconfig
1240 +
1241 +* Default: ~/.npmrc
1242 +* Type: path
1243 +
1244 +The location of user-level configuration settings.
1245 +
1246 +#### umask
1247 +
1248 +* Default: 022
1249 +* Type: Octal numeric string in range 0000..0777 (0..511)
1250 +
1251 +The "umask" value to use when setting the file creation mode on files
1252 +and folders.
1253 +
1254 +Folders and executables are given a mode which is `0777` masked against
1255 +this value. Other files are given a mode which is `0666` masked against
1256 +this value. Thus, the defaults are `0755` and `0644` respectively.
1257 +
1258 +#### user-agent
1259 +
1260 +* Default: node/{process.version} {process.platform} {process.arch}
1261 +* Type: String
1262 +
1263 +Sets a User-Agent to the request header
1264 +
1265 +#### version
1266 +
1267 +* Default: false
1268 +* Type: boolean
1269 +
1270 +If true, output the npm version and exit successfully.
1271 +
1272 +Only relevant when specified explicitly on the command line.
1273 +
1274 +#### versions
1275 +
1276 +* Default: false
1277 +* Type: boolean
1278 +
1279 +If true, output the npm version as well as node's `process.versions` map, and
1280 +exit successfully.
1281 +
1282 +Only relevant when specified explicitly on the command line.
1283 +
1284 +#### viewer
1285 +
1286 +* Default: "man" on Posix, "browser" on Windows
1287 +* Type: path
1288 +
1289 +The program to use to view help content.
1290 +
1291 +Set to `"browser"` to view html help content in the default web browser.
1292 +
1293 +### See also
1294 +
1295 +* [npm config](/cli/v6/commands/npm-config)
1296 +* [npmrc](/cli/v6/configuring-npm/npmrc)
1297 +* [npm scripts](/cli/v6/using-npm/scripts)
1298 +* [npm folders](/cli/v6/configuring-npm/folders)
1299 +* [npm](/cli/v6/commands/npm)
content/cli/v6/using-npm/developers.md new
+251
@@ -0,0 +1,251 @@
1 +---
2 +title: developers
3 +section: 7
4 +description: Developer Guide
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/developers.md
8 +---
9 +
10 +### Description
11 +
12 +So, you've decided to use npm to develop (and maybe publish/deploy)
13 +your project.
14 +
15 +Fantastic!
16 +
17 +There are a few things that you need to do above the simple steps
18 +that your users will do to install your program.
19 +
20 +### About These Documents
21 +
22 +These are man pages. If you install npm, you should be able to
23 +then do `man npm-thing` to get the documentation on a particular
24 +topic, or `npm help thing` to see the same information.
25 +
26 +### What is a package
27 +
28 +A package is:
29 +
30 +* a) a folder containing a program described by a package.json file
31 +* b) a gzipped tarball containing (a)
32 +* c) a url that resolves to (b)
33 +* d) a `<name>@<version>` that is published on the registry with (c)
34 +* e) a `<name>@<tag>` that points to (d)
35 +* f) a `<name>` that has a "latest" tag satisfying (e)
36 +* g) a `git` url that, when cloned, results in (a).
37 +
38 +Even if you never publish your package, you can still get a lot of
39 +benefits of using npm if you just want to write a node program (a), and
40 +perhaps if you also want to be able to easily install it elsewhere
41 +after packing it up into a tarball (b).
42 +
43 +Git urls can be of the form:
44 +
45 +```bash
46 +git://github.com/user/project.git#commit-ish
47 +git+ssh://user@hostname:project.git#commit-ish
48 +git+http://user@hostname/project/blah.git#commit-ish
49 +git+https://user@hostname/project/blah.git#commit-ish
50 +```
51 +
52 +The `commit-ish` can be any tag, sha, or branch which can be supplied as
53 +an argument to `git checkout`. The default is `master`.
54 +
55 +### The package.json File
56 +
57 +You need to have a `package.json` file in the root of your project to do
58 +much of anything with npm. That is basically the whole interface.
59 +
60 +See [`package.json`](/cli/v6/configuring-npm/package-json) for details about what goes in that file. At the very
61 +least, you need:
62 +
63 +* name:
64 + This should be a string that identifies your project. Please do not
65 + use the name to specify that it runs on node, or is in JavaScript.
66 + You can use the "engines" field to explicitly state the versions of
67 + node (or whatever else) that your program requires, and it's pretty
68 + well assumed that it's JavaScript.
69 +
70 + It does not necessarily need to match your github repository name.
71 +
72 + So, `node-foo` and `bar-js` are bad names. `foo` or `bar` are better.
73 +
74 +* version:
75 + A semver-compatible version.
76 +
77 +* engines:
78 + Specify the versions of node (or whatever else) that your program
79 + runs on. The node API changes a lot, and there may be bugs or new
80 + functionality that you depend on. Be explicit.
81 +
82 +* author:
83 + Take some credit.
84 +
85 +* scripts:
86 + If you have a special compilation or installation script, then you
87 + should put it in the `scripts` object. You should definitely have at
88 + least a basic smoke-test command as the "scripts.test" field.
89 + See [scripts](/cli/v6/using-npm/scripts).
90 +
91 +* main:
92 + If you have a single module that serves as the entry point to your
93 + program (like what the "foo" package gives you at require("foo")),
94 + then you need to specify that in the "main" field.
95 +
96 +* directories:
97 + This is an object mapping names to folders. The best ones to include are
98 + "lib" and "doc", but if you use "man" to specify a folder full of man pages,
99 + they'll get installed just like these ones.
100 +
101 +You can use `npm init` in the root of your package in order to get you
102 +started with a pretty basic package.json file. See [`npm init`](/cli/v6/commands/npm-init) for
103 +more info.
104 +
105 +### Keeping files *out* of your package
106 +
107 +Use a `.npmignore` file to keep stuff out of your package. If there's
108 +no `.npmignore` file, but there *is* a `.gitignore` file, then npm will
109 +ignore the stuff matched by the `.gitignore` file. If you *want* to
110 +include something that is excluded by your `.gitignore` file, you can
111 +create an empty `.npmignore` file to override it. Like `git`, `npm` looks
112 +for `.npmignore` and `.gitignore` files in all subdirectories of your
113 +package, not only the root directory.
114 +
115 +`.npmignore` files follow the [same pattern rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files)
116 +as `.gitignore` files:
117 +
118 +* Blank lines or lines starting with `#` are ignored.
119 +* Standard glob patterns work.
120 +* You can end patterns with a forward slash `/` to specify a directory.
121 +* You can negate a pattern by starting it with an exclamation point `!`.
122 +
123 +By default, the following paths and files are ignored, so there's no
124 +need to add them to `.npmignore` explicitly:
125 +
126 +* `.*.swp`
127 +* `._*`
128 +* `.DS_Store`
129 +* `.git`
130 +* `.hg`
131 +* `.npmrc`
132 +* `.lock-wscript`
133 +* `.svn`
134 +* `.wafpickle-*`
135 +* `config.gypi`
136 +* `CVS`
137 +* `npm-debug.log`
138 +
139 +Additionally, everything in `node_modules` is ignored, except for
140 +bundled dependencies. npm automatically handles this for you, so don't
141 +bother adding `node_modules` to `.npmignore`.
142 +
143 +The following paths and files are never ignored, so adding them to
144 +`.npmignore` is pointless:
145 +
146 +* `package.json`
147 +* `README` (and its variants)
148 +* `CHANGELOG` (and its variants)
149 +* `LICENSE` / `LICENCE`
150 +
151 +If, given the structure of your project, you find `.npmignore` to be a
152 +maintenance headache, you might instead try populating the `files`
153 +property of `package.json`, which is an array of file or directory names
154 +that should be included in your package. Sometimes a whitelist is easier
155 +to manage than a blacklist.
156 +
157 +#### Testing whether your `.npmignore` or `files` config works
158 +
159 +If you want to double check that your package will include only the files
160 +you intend it to when published, you can run the `npm pack` command locally
161 +which will generate a tarball in the working directory, the same way it
162 +does for publishing.
163 +
164 +### Link Packages
165 +
166 +`npm link` is designed to install a development package and see the
167 +changes in real time without having to keep re-installing it. (You do
168 +need to either re-link or `npm rebuild -g` to update compiled packages,
169 +of course.)
170 +
171 +More info at [`npm link`](/cli/v6/commands/npm-link).
172 +
173 +### Before Publishing: Make Sure Your Package Installs and Works
174 +
175 +**This is important.**
176 +
177 +If you can not install it locally, you'll have
178 +problems trying to publish it. Or, worse yet, you'll be able to
179 +publish it, but you'll be publishing a broken or pointless package.
180 +So don't do that.
181 +
182 +In the root of your package, do this:
183 +
184 +```bash
185 +npm install . -g
186 +```
187 +
188 +That'll show you that it's working. If you'd rather just create a symlink
189 +package that points to your working directory, then do this:
190 +
191 +```bash
192 +npm link
193 +```
194 +
195 +Use `npm ls -g` to see if it's there.
196 +
197 +To test a local install, go into some other folder, and then do:
198 +
199 +```bash
200 +cd ../some-other-folder
201 +npm install ../my-package
202 +```
203 +
204 +to install it locally into the node_modules folder in that other place.
205 +
206 +Then go into the node-repl, and try using require("my-thing") to
207 +bring in your module's main module.
208 +
209 +### Create a User Account
210 +
211 +Create a user with the adduser command. It works like this:
212 +
213 +```bash
214 +npm adduser
215 +```
216 +
217 +and then follow the prompts.
218 +
219 +This is documented better in [npm adduser](/cli/v6/commands/npm-adduser).
220 +
221 +### Publish your package
222 +
223 +This part's easy. In the root of your folder, do this:
224 +
225 +```bash
226 +npm publish
227 +```
228 +
229 +You can give publish a url to a tarball, or a filename of a tarball,
230 +or a path to a folder.
231 +
232 +Note that pretty much **everything in that folder will be exposed**
233 +by default. So, if you have secret stuff in there, use a
234 +`.npmignore` file to list out the globs to ignore, or publish
235 +from a fresh checkout.
236 +
237 +### Brag about it
238 +
239 +Send emails, write blogs, blab in IRC.
240 +
241 +Tell the world how easy it is to install your program!
242 +
243 +### See also
244 +
245 +* [npm](/cli/v6/commands/npm)
246 +* [npm init](/cli/v6/commands/npm-init)
247 +* [package.json](/cli/v6/configuring-npm/package-json)
248 +* [npm scripts](/cli/v6/using-npm/scripts)
249 +* [npm publish](/cli/v6/commands/npm-publish)
250 +* [npm adduser](/cli/v6/commands/npm-adduser)
251 +* [npm registry](/cli/v6/using-npm/registry)
content/cli/v6/using-npm/disputes.md new
+136
@@ -0,0 +1,136 @@
1 +---
2 +title: disputes
3 +section: 7
4 +description: Handling Module Name Disputes
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/disputes.md
8 +---
9 +
10 +This document describes the steps that you should take to resolve module name
11 +disputes with other npm publishers. It also describes special steps you should
12 +take about names you think infringe your trademarks.
13 +
14 +This document is a clarification of the acceptable behavior outlined in the
15 +[npm Code of Conduct](https://www.npmjs.com/policies/conduct), and nothing in
16 +this document should be interpreted to contradict any aspect of the npm Code of
17 +Conduct.
18 +
19 +### TL;DR
20 +
21 +1. Get the author email with `npm owner ls <pkgname>`
22 +2. Email the author, CC <support@npmjs.com>
23 +3. After a few weeks, if there's no resolution, we'll sort it out.
24 +
25 +Don't squat on package names. Publish code or move out of the way.
26 +
27 +### Description
28 +
29 +There sometimes arise cases where a user publishes a module, and then later,
30 +some other user wants to use that name. Here are some common ways that happens
31 +(each of these is based on actual events.)
32 +
33 +1. Alice writes a JavaScript module `foo`, which is not node-specific. Alice
34 + doesn't use node at all. Yusuf wants to use `foo` in node, so he wraps it in
35 + an npm module. Some time later, Alice starts using node, and wants to take
36 + over management of her program.
37 +2. Yusuf writes an npm module `foo`, and publishes it. Perhaps much later, Alice
38 + finds a bug in `foo`, and fixes it. She sends a pull request to Yusuf, but
39 + Yusuf doesn't have the time to deal with it, because he has a new job and a
40 + new baby and is focused on his new Erlang project, and kind of not involved
41 + with node any more. Alice would like to publish a new `foo`, but can't,
42 + because the name is taken.
43 +3. Yusuf writes a 10-line flow-control library, and calls it `foo`, and
44 + publishes it to the npm registry. Being a simple little thing, it never
45 + really has to be updated. Alice works for Foo Inc, the makers of the
46 + critically acclaimed and widely-marketed `foo` JavaScript toolkit framework.
47 + They publish it to npm as `foojs`, but people are routinely confused when
48 + `npm install foo` is some different thing.
49 +4. Yusuf writes a parser for the widely-known `foo` file format, because he
50 + needs it for work. Then, he gets a new job, and never updates the prototype.
51 + Later on, Alice writes a much more complete `foo` parser, but can't publish,
52 + because Yusuf's `foo` is in the way.
53 +
54 +1. `npm owner ls foo`. This will tell Alice the email address of the owner
55 + (Yusuf).
56 +2. Alice emails Yusuf, explaining the situation **as respectfully as possible**,
57 + and what she would like to do with the module name. She adds the npm support
58 + staff <support@npmjs.com> to the CC list of the email. Mention in the email
59 + that Yusuf can run npm owner `add alice foo` to add Alice as an owner of the
60 + foo package.
61 +3. After a reasonable amount of time, if Yusuf has not responded, or if Yusuf
62 + and Alice can't come to any sort of resolution, email support
63 + <support@npmjs.com> and we'll sort it out. ("Reasonable" is usually at least
64 + 4 weeks.)
65 +
66 +### Reasoning
67 +
68 +In almost every case so far, the parties involved have been able to reach an
69 +amicable resolution without any major intervention. Most people really do want
70 +to be reasonable, and are probably not even aware that they're in your way.
71 +
72 +Module ecosystems are most vibrant and powerful when they are as self-directed
73 +as possible. If an admin one day deletes something you had worked on, then that
74 +is going to make most people quite upset, regardless of the justification. When
75 +humans solve their problems by talking to other humans with respect, everyone
76 +has the chance to end up feeling good about the interaction.
77 +
78 +### Exceptions
79 +
80 +Some things are not allowed, and will be removed without discussion if they are
81 +brought to the attention of the npm registry admins, including but not limited
82 +to:
83 +
84 +1. Malware (that is, a package designed to exploit or harm the machine on which
85 + it is installed).
86 +2. Violations of copyright or licenses (for example, cloning an MIT-licensed
87 + program, and then removing or changing the copyright and license statement).
88 +3. Illegal content.
89 +4. "Squatting" on a package name that you plan to use, but aren't actually
90 + using. Sorry, I don't care how great the name is, or how perfect a fit it is
91 + for the thing that someday might happen. If someone wants to use it today,
92 + and you're just taking up space with an empty tarball, you're going to be
93 + evicted.
94 +5. Putting empty packages in the registry. Packages must have SOME
95 + functionality. It can be silly, but it can't be nothing. (See also:
96 + squatting.)
97 +6. Doing weird things with the registry, like using it as your own personal
98 + application database or otherwise putting non-packagey things into it.
99 +7. Other things forbidden by the npm
100 + [Code of Conduct](https://www.npmjs.com/policies/conduct) such as hateful
101 + language, pornographic content, or harassment.
102 +
103 +If you see bad behavior like this, please report it to <abuse@npmjs.com> right
104 +away. **You are never expected to resolve abusive behavior on your own. We are
105 +here to help.**
106 +
107 +### Trademarks
108 +
109 +If you think another npm publisher is infringing your trademark, such as by
110 +using a confusingly similar package name, email <abuse@npmjs.com> with a link to
111 +the package or user account on [https://www.npmjs.com/](https://www.npmjs.com/).
112 +Attach a copy of your trademark registration certificate.
113 +
114 +If we see that the package's publisher is intentionally misleading others by
115 +misusing your registered mark without permission, we will transfer the package
116 +name to you. Otherwise, we will contact the package publisher and ask them to
117 +clear up any confusion with changes to their package's `README` file or
118 +metadata.
119 +
120 +### Changes
121 +
122 +This is a living document and may be updated from time to time. Please refer to
123 +the [git history for this document](https://github.com/npm/cli/commits/latest/doc/misc/npm-disputes.md)
124 +to view the changes.
125 +
126 +### License
127 +
128 +Copyright (C) npm, Inc., All rights reserved
129 +
130 +This document may be reused under a Creative Commons Attribution-ShareAlike
131 +License.
132 +
133 +### See also
134 +
135 +* [npm registry](/cli/v6/using-npm/registry)
136 +* [npm owner](/cli/v6/commands/npm-owner)
content/cli/v6/using-npm/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +github_repo: npm/cli
3 +github_branch: v6-docs
4 +github_path: docs/content/using-npm/index.mdx
5 +title: Using npm
6 +---
7 +<Index depth="1" />
\ No newline at end of file
content/cli/v6/using-npm/orgs.md new
+96
@@ -0,0 +1,96 @@
1 +---
2 +title: orgs
3 +section: 7
4 +description: Working with Teams & Orgs
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/orgs.md
8 +---
9 +
10 +### Description
11 +
12 +There are three levels of org users:
13 +
14 +1. Super admin, controls billing & adding people to the org.
15 +2. Team admin, manages team membership & package access.
16 +3. Developer, works on packages they are given access to.
17 +
18 +The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a `developers` team that all users are automatically added to.
19 +
20 +The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.
21 +
22 +The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.
23 +
24 +There are two main commands:
25 +
26 +1. `npm team` see [npm team](/cli/v6/commands/npm-team) for more details
27 +2. `npm access` see [npm access](/cli/v6/commands/npm-access) for more details
28 +
29 +### Team Admins create teams
30 +
31 +* Check who you’ve added to your org:
32 +
33 +```bash
34 +npm team ls <org>:developers
35 +```
36 +
37 +* Each org is automatically given a `developers` team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the `access` command.
38 +
39 +* Create a new team:
40 +
41 +```bash
42 +npm team create <org:team>
43 +```
44 +
45 +* Add members to that team:
46 +
47 +```bash
48 +npm team add <org:team> <user>
49 +```
50 +
51 +### Publish a package and adjust package access
52 +
53 +* In package directory, run
54 +
55 +```bash
56 +npm init --scope=<org>
57 +```
58 +to scope it for your org & publish as usual
59 +
60 +* Grant access:
61 +
62 +```bash
63 +npm access grant <read-only|read-write> <org:team> [<package>]
64 +```
65 +
66 +* Revoke access:
67 +
68 +```bash
69 +npm access revoke <org:team> [<package>]
70 +```
71 +
72 +### Monitor your package access
73 +
74 +* See what org packages a team member can access:
75 +
76 +```bash
77 +npm access ls-packages <org> <user>
78 +```
79 +
80 +* See packages available to a specific team:
81 +
82 +```bash
83 +npm access ls-packages <org:team>
84 +```
85 +
86 +* Check which teams are collaborating on a package:
87 +
88 +```bash
89 +npm access ls-collaborators <pkg>
90 +```
91 +
92 +### See also
93 +
94 +* [npm team](/cli/v6/commands/npm-team)
95 +* [npm access](/cli/v6/commands/npm-access)
96 +* [npm scope](/cli/v6/using-npm/scope)
content/cli/v6/using-npm/registry.md new
+106
@@ -0,0 +1,106 @@
1 +---
2 +title: registry
3 +section: 7
4 +description: The JavaScript Package Registry
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/registry.md
8 +---
9 +
10 +### Description
11 +
12 +To resolve packages by name and version, npm talks to a registry website
13 +that implements the CommonJS Package Registry specification for reading
14 +package info.
15 +
16 +npm is configured to use npm, Inc.'s public registry at
17 +<https://registry.npmjs.org> by default. Use of the npm public registry is
18 +subject to terms of use available at <https://www.npmjs.com/policies/terms>.
19 +
20 +You can configure npm to use any compatible registry you like, and even run
21 +your own registry. Use of someone else's registry may be governed by their
22 +terms of use.
23 +
24 +npm's package registry implementation supports several
25 +write APIs as well, to allow for publishing packages and managing user
26 +account information.
27 +
28 +The npm public registry is powered by a CouchDB database,
29 +of which there is a public mirror at
30 +<https://skimdb.npmjs.com/registry>. The code for the couchapp is
31 +available at <https://github.com/npm/npm-registry-couchapp>.
32 +
33 +The registry URL used is determined by the scope of the package (see
34 +[`scope`](/cli/v6/using-npm/scope). If no scope is specified, the default registry is used, which is
35 +supplied by the `registry` config parameter. See [`npm config`](/cli/v6/commands/npm-config),
36 +[`npmrc`](/cli/v6/configuring-npm/npmrc), and [`config`](/cli/v6/using-npm/config) for more on managing npm's configuration.
37 +
38 +### Does npm send any information about me back to the registry?
39 +
40 +Yes.
41 +
42 +When making requests of the registry npm adds two headers with information
43 +about your environment:
44 +
45 +* `Npm-Scope` – If your project is scoped, this header will contain its
46 + scope. In the future npm hopes to build registry features that use this
47 + information to allow you to customize your experience for your
48 + organization.
49 +* `Npm-In-CI` – Set to "true" if npm believes this install is running in a
50 + continuous integration environment, "false" otherwise. This is detected by
51 + looking for the following environment variables: `CI`, `TDDIUM`,
52 + `JENKINS_URL`, `bamboo.buildKey`. If you'd like to learn more you may find
53 + the [original PR](https://github.com/npm/npm-registry-client/pull/129)
54 + interesting.
55 + This is used to gather better metrics on how npm is used by humans, versus
56 + build farms.
57 +
58 +The npm registry does not try to correlate the information in these headers
59 +with any authenticated accounts that may be used in the same requests.
60 +
61 +### Can I run my own private registry?
62 +
63 +Yes!
64 +
65 +The easiest way is to replicate the couch database, and use the same (or
66 +similar) design doc to implement the APIs.
67 +
68 +If you set up continuous replication from the official CouchDB, and then
69 +set your internal CouchDB as the registry config, then you'll be able
70 +to read any published packages, in addition to your private ones, and by
71 +default will only publish internally.
72 +
73 +If you then want to publish a package for the whole world to see, you can
74 +simply override the `--registry` option for that `publish` command.
75 +
76 +### I don't want my package published in the official registry. It's private.
77 +
78 +Set `"private": true` in your package.json to prevent it from being
79 +published at all, or
80 +`"publishConfig":{"registry":"http://my-internal-registry.local"}`
81 +to force it to be published only to your internal registry.
82 +
83 +See [`package.json`](/cli/v6/configuring-npm/package-json) for more info on what goes in the package.json file.
84 +
85 +### Will you replicate from my registry into the public one?
86 +
87 +No. If you want things to be public, then publish them into the public
88 +registry using npm. What little security there is would be for nought
89 +otherwise.
90 +
91 +### Do I have to use couchdb to build a registry that npm can talk to?
92 +
93 +No, but it's way easier. Basically, yes, you do, or you have to
94 +effectively implement the entire CouchDB API anyway.
95 +
96 +### Is there a website or something to see package docs and such?
97 +
98 +Yes, head over to <https://www.npmjs.com/>
99 +
100 +### See also
101 +
102 +* [npm config](/cli/v6/commands/npm-config)
103 +* [config](/cli/v6/using-npm/config)
104 +* [npmrc](/cli/v6/configuring-npm/npmrc)
105 +* [npm developers](/cli/v6/using-npm/developers)
106 +* [npm disputes](/cli/v6/using-npm/disputes)
content/cli/v6/using-npm/removal.md new
+69
@@ -0,0 +1,69 @@
1 +---
2 +title: removal
3 +section: 7
4 +description: Cleaning the Slate
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/removal.md
8 +---
9 +
10 +### Synopsis
11 +
12 +So sad to see you go.
13 +
14 +```bash
15 +sudo npm uninstall npm -g
16 +```
17 +
18 +Or, if that fails, get the npm source code, and do:
19 +
20 +```bash
21 +sudo make uninstall
22 +```
23 +
24 +### More Severe Uninstalling
25 +
26 +Usually, the above instructions are sufficient. That will remove
27 +npm, but leave behind anything you've installed.
28 +
29 +If that doesn't work, or if you require more drastic measures,
30 +continue reading.
31 +
32 +Note that this is only necessary for globally-installed packages. Local
33 +installs are completely contained within a project's `node_modules`
34 +folder. Delete that folder, and everything is gone less a package's
35 +install script is particularly ill-behaved).
36 +
37 +This assumes that you installed node and npm in the default place. If
38 +you configured node with a different `--prefix`, or installed npm with a
39 +different prefix setting, then adjust the paths accordingly, replacing
40 +`/usr/local` with your install prefix.
41 +
42 +To remove everything npm-related manually:
43 +
44 +```bash
45 +rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
46 +```
47 +
48 +If you installed things *with* npm, then your best bet is to uninstall
49 +them with npm first, and then install them again once you have a
50 +proper install. This can help find any symlinks that are lying
51 +around:
52 +
53 +```bash
54 +ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
55 +```
56 +
57 +Prior to version 0.3, npm used shim files for executables and node
58 +modules. To track those down, you can do the following:
59 +
60 +```bash
61 +find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
62 +```
63 +
64 +(This is also in the README file.)
65 +
66 +### See also
67 +
68 +* [npm uninstall](/cli/v6/commands/npm-uninstall)
69 +* [npm prune](/cli/v6/commands/npm-prune)
content/cli/v6/using-npm/scope.md new
+131
@@ -0,0 +1,131 @@
1 +---
2 +title: scope
3 +section: 7
4 +description: Scoped packages
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/scope.md
8 +---
9 +
10 +### Description
11 +
12 +All npm packages have a name. Some package names also have a scope. A scope
13 +follows the usual rules for package names (URL-safe characters, no leading dots
14 +or underscores). When used in package names, scopes are preceded by an `@` symbol
15 +and followed by a slash, e.g.
16 +
17 +```bash
18 +@somescope/somepackagename
19 +```
20 +
21 +Scopes are a way of grouping related packages together, and also affect a few
22 +things about the way npm treats the package.
23 +
24 +Each npm user/organization has their own scope, and only you can add packages
25 +in your scope. This means you don't have to worry about someone taking your
26 +package name ahead of you. Thus it is also a good way to signal official packages
27 +for organizations.
28 +
29 +Scoped packages can be published and installed as of `npm@2` and are supported
30 +by the primary npm registry. Unscoped packages can depend on scoped packages and
31 +vice versa. The npm client is backwards-compatible with unscoped registries,
32 +so it can be used to work with scoped and unscoped registries at the same time.
33 +
34 +### Installing scoped packages
35 +
36 +Scoped packages are installed to a sub-folder of the regular installation
37 +folder, e.g. if your other packages are installed in `node_modules/packagename`,
38 +scoped modules will be installed in `node_modules/@myorg/packagename`. The scope
39 +folder (`@myorg`) is simply the name of the scope preceded by an `@` symbol, and can
40 +contain any number of scoped packages.
41 +
42 +A scoped package is installed by referencing it by name, preceded by an
43 +`@` symbol, in `npm install`:
44 +
45 +```bash
46 +npm install @myorg/mypackage
47 +```
48 +
49 +Or in `package.json`:
50 +
51 +```json
52 +"dependencies": {
53 + "@myorg/mypackage": "^1.3.0"
54 +}
55 +```
56 +
57 +Note that if the `@` symbol is omitted, in either case, npm will instead attempt to
58 +install from GitHub; see [`npm install`](/cli/v6/commands/npm-install).
59 +
60 +### Requiring scoped packages
61 +
62 +Because scoped packages are installed into a scope folder, you have to
63 +include the name of the scope when requiring them in your code, e.g.
64 +
65 +```javascript
66 +require('@myorg/mypackage')
67 +```
68 +
69 +There is nothing special about the way Node treats scope folders. This
70 +simply requires the `mypackage` module in the folder named `@myorg`.
71 +
72 +### Publishing scoped packages
73 +
74 +Scoped packages can be published from the CLI as of `npm@2` and can be
75 +published to any registry that supports them, including the primary npm
76 +registry.
77 +
78 +(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry
79 +**does** support scoped packages.)
80 +
81 +If you wish, you may associate a scope with a registry; see below.
82 +
83 +#### Publishing public scoped packages to the primary npm registry
84 +
85 +To publish a public scoped package, you must specify `--access public` with
86 +the initial publication. This will publish the package and set access
87 +to `public` as if you had run `npm access public` after publishing.
88 +
89 +#### Publishing private scoped packages to the npm registry
90 +
91 +To publish a private scoped package to the npm registry, you must have
92 +an [npm Private Modules](https://docs.npmjs.com/private-modules/intro)
93 +account.
94 +
95 +You can then publish the module with `npm publish` or `npm publish
96 +--access restricted`, and it will be present in the npm registry, with
97 +restricted access. You can then change the access permissions, if
98 +desired, with `npm access` or on the npmjs.com website.
99 +
100 +### Associating a scope with a registry
101 +
102 +Scopes can be associated with a separate registry. This allows you to
103 +seamlessly use a mix of packages from the primary npm registry and one or more
104 +private registries, such as npm Enterprise.
105 +
106 +You can associate a scope with a registry at login, e.g.
107 +
108 +```bash
109 +npm login --registry=http://reg.example.com --scope=@myco
110 +```
111 +
112 +Scopes have a many-to-one relationship with registries: one registry can
113 +host multiple scopes, but a scope only ever points to one registry.
114 +
115 +You can also associate a scope with a registry using `npm config`:
116 +
117 +```bash
118 +npm config set @myco:registry http://reg.example.com
119 +```
120 +
121 +Once a scope is associated with a registry, any `npm install` for a package
122 +with that scope will request packages from that registry instead. Any
123 +`npm publish` for a package name that contains the scope will be published to
124 +that registry instead.
125 +
126 +### See also
127 +
128 +* [npm install](/cli/v6/commands/npm-install)
129 +* [npm publish](/cli/v6/commands/npm-publish)
130 +* [npm access](/cli/v6/commands/npm-access)
131 +* [npm registry](/cli/v6/using-npm/registry)
content/cli/v6/using-npm/scripts.md new
+309
@@ -0,0 +1,309 @@
1 +---
2 +title: scripts
3 +section: 7
4 +description: How npm handles the "scripts" field
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/scripts.md
8 +---
9 +
10 +### Description
11 +
12 +The `"scripts"` property of of your `package.json` file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running `npm run-script <stage>` or `npm run <stage>` for short. *Pre* and *post* commands with matching names will be run for those as well (e.g. `premyscript`, `myscript`, `postmyscript`). Scripts from dependencies can be run with `npm explore <pkg> -- npm run <stage>`.
13 +
14 +### Pre & Post Scripts
15 +
16 +To create "pre" or "post" scripts for any scripts defined in the `"scripts"` section of the `package.json`, simply create another script *with a matching name* and add "pre" or "post" to the beginning of them.
17 +
18 +```json
19 +{
20 + "scripts": {
21 + "precompress": "{{ executes BEFORE the `compress` script }}",
22 + "compress": "{{ run command to compress files }}",
23 + "postcompress": "{{ executes AFTER `compress` script }}"
24 + }
25 +}
26 +```
27 +
28 +### Life Cycle Scripts
29 +
30 +There are some special life cycle scripts that happen only in certain situations. These scripts happen in addtion to the "pre" and "post" script.
31 +* `prepare`, `prepublish`, `prepublishOnly`, `prepack`, `postpack`
32 +
33 +**prepare** (since `npm@4.0.0`)
34 +* Runs BEFORE the package is packed
35 +* Runs BEFORE the package is published
36 +* Runs on local `npm install` without any arguments
37 +* Run AFTER `prepublish`, but BEFORE `prepublishOnly`
38 +* NOTE: If a package being installed through git contains a `prepare` script, its `dependencies` and `devDependencies` will be installed, and the prepare script will be run, before the package is packaged and installed.
39 +
40 +**prepublish** (DEPRECATED)
41 +* Same as `prepare`
42 +
43 +**prepublishOnly**
44 +* Runs BEFORE the package is prepared and packed, ONLY on `npm publish`.
45 +
46 +**prepack**
47 +* Runs BEFORE a tarball is packed (on "`npm pack`", "`npm publish`", and when installing a git dependencies).
48 +* NOTE: "`npm run pack`" is NOT the same as "`npm pack`". "`npm run pack`" is an arbitrary user defined script name, where as, "`npm pack`" is a CLI defined command.
49 +
50 +**postpack**
51 +* Runs AFTER the tarball has been generated and moved to its final destination.
52 +
53 +#### Prepare and Prepublish
54 +
55 +**Deprecation Note: prepublish**
56 +
57 +Since `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074). As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape).
58 +
59 +See <https://github.com/npm/npm/issues/10074> for a much lengthier justification, with further reading, for this change.
60 +
61 +**Use Cases**
62 +
63 +If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a `prepublish` script. This includes tasks such as:
64 +
65 +* Compiling CoffeeScript source code into JavaScript.
66 +* Creating minified versions of JavaScript source code.
67 +* Fetching remote resources that your package will use.
68 +
69 +The advantage of doing these things at `prepublish` time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that:
70 +
71 +* You can depend on `coffee-script` as a `devDependency`, and thus
72 + your users don't need to have it installed.
73 +* You don't need to include minifiers in your package, reducing
74 + the size for your users.
75 +* You don't need to rely on your users having `curl` or `wget` or
76 + other system tools on the target machines.
77 +
78 +### Life Cycle Operation Order
79 +
80 +#### [`npm publish`](/cli/v6/commands/npm-publish)
81 +
82 +* `prepublishOnly`
83 +* `prepare`
84 +* `prepublish`
85 +* `publish`
86 +* `postpublish`
87 +
88 +#### [`npm pack`](/cli/v6/commands/npm-pack)
89 +
90 +* `prepack`
91 +* `postpack`
92 +
93 +#### [`npm install`](/cli/v6/commands/npm-install)
94 +
95 +* `preinstall`
96 +* `install`
97 +* `postinstall`
98 +
99 +Also triggers
100 +
101 +* `prepublish` (when on local)
102 +* `prepare` (when on local)
103 +
104 +#### [`npm start`](/cli/v6/commands/npm-start)
105 +
106 +`npm run start` has an `npm start` shorthand.
107 +
108 +* `prestart`
109 +* `start`
110 +* `poststart`
111 +
112 +### Default Values
113 +npm will default some script values based on package contents.
114 +
115 +* `"start": "node server.js"`:
116 +
117 + If there is a `server.js` file in the root of your package, then npm
118 + will default the `start` command to `node server.js`.
119 +
120 +* `"install": "node-gyp rebuild"`:
121 +
122 + If there is a `binding.gyp` file in the root of your package and you
123 + haven't defined your own `install` or `preinstall` scripts, npm will
124 + default the `install` command to compile using node-gyp.
125 +
126 +### User
127 +
128 +If npm was invoked with root privileges, then it will change the uid
129 +to the user account or uid specified by the `user` config, which
130 +defaults to `nobody`. Set the `unsafe-perm` flag to run scripts with
131 +root privileges.
132 +
133 +### Environment
134 +
135 +Package scripts run in an environment where many pieces of information
136 +are made available regarding the setup of npm and the current state of
137 +the process.
138 +
139 +
140 +#### path
141 +
142 +If you depend on modules that define executable scripts, like test
143 +suites, then those executables will be added to the `PATH` for
144 +executing the scripts. So, if your package.json has this:
145 +
146 +```json
147 +{
148 + "name" : "foo",
149 + "dependencies" : {
150 + "bar" : "0.1.x"
151 + },
152 + "scripts": {
153 + "start" : "bar ./test"
154 + }
155 +}
156 +```
157 +
158 +then you could run `npm start` to execute the `bar` script, which is
159 +exported into the `node_modules/.bin` directory on `npm install`.
160 +
161 +#### package.json vars
162 +
163 +The package.json fields are tacked onto the `npm_package_` prefix. So,
164 +for instance, if you had `{"name":"foo", "version":"1.2.5"}` in your
165 +package.json file, then your package scripts would have the
166 +`npm_package_name` environment variable set to "foo", and the
167 +`npm_package_version` set to "1.2.5". You can access these variables
168 +in your code with `process.env.npm_package_name` and
169 +`process.env.npm_package_version`, and so on for other fields.
170 +
171 +#### configuration
172 +
173 +Configuration parameters are put in the environment with the
174 +`npm_config_` prefix. For instance, you can view the effective `root`
175 +config by checking the `npm_config_root` environment variable.
176 +
177 +#### Special: package.json "config" object
178 +
179 +The package.json "config" keys are overwritten in the environment if
180 +there is a config param of `<name>[@<version>]:<key>`. For example,
181 +if the package.json has this:
182 +
183 +```json
184 +{
185 + "name" : "foo",
186 + "config" : {
187 + "port" : "8080"
188 + },
189 + "scripts" : {
190 + "start" : "node server.js"
191 + }
192 +}
193 +```
194 +
195 +and the server.js is this:
196 +
197 +```javascript
198 +http.createServer(...).listen(process.env.npm_package_config_port)
199 +```
200 +
201 +then the user could change the behavior by doing:
202 +
203 +```bash
204 + npm config set foo:port 80
205 + ```
206 +
207 +#### current lifecycle event
208 +
209 +Lastly, the `npm_lifecycle_event` environment variable is set to
210 +whichever stage of the cycle is being executed. So, you could have a
211 +single script used for different parts of the process which switches
212 +based on what's currently happening.
213 +
214 +Objects are flattened following this format, so if you had
215 +`{"scripts":{"install":"foo.js"}}` in your package.json, then you'd
216 +see this in the script:
217 +
218 +```bash
219 +process.env.npm_package_scripts_install === "foo.js"
220 +```
221 +
222 +### Examples
223 +
224 +For example, if your package.json contains this:
225 +
226 +```json
227 +{
228 + "scripts" : {
229 + "install" : "scripts/install.js",
230 + "postinstall" : "scripts/install.js",
231 + "uninstall" : "scripts/uninstall.js"
232 + }
233 +}
234 +```
235 +
236 +then `scripts/install.js` will be called for the install
237 +and post-install stages of the lifecycle, and `scripts/uninstall.js`
238 +will be called when the package is uninstalled. Since
239 +`scripts/install.js` is running for two different phases, it would
240 +be wise in this case to look at the `npm_lifecycle_event` environment
241 +variable.
242 +
243 +If you want to run a make command, you can do so. This works just
244 +fine:
245 +
246 +```json
247 +{
248 + "scripts" : {
249 + "preinstall" : "./configure",
250 + "install" : "make && make install",
251 + "test" : "make test"
252 + }
253 +}
254 +```
255 +
256 +### Exiting
257 +
258 +Scripts are run by passing the line as a script argument to `sh`.
259 +
260 +If the script exits with a code other than 0, then this will abort the
261 +process.
262 +
263 +Note that these script files don't have to be nodejs or even
264 +javascript programs. They just have to be some kind of executable
265 +file.
266 +
267 +### Hook Scripts
268 +
269 +If you want to run a specific script at a specific lifecycle event for
270 +ALL packages, then you can use a hook script.
271 +
272 +Place an executable file at `node_modules/.hooks/{eventname}`, and
273 +it'll get run for all packages when they are going through that point
274 +in the package lifecycle for any packages installed in that root.
275 +
276 +Hook scripts are run exactly the same way as package.json scripts.
277 +That is, they are in a separate child process, with the env described
278 +above.
279 +
280 +### Best Practices
281 +
282 +* Don't exit with a non-zero error code unless you *really* mean it.
283 + Except for uninstall scripts, this will cause the npm action to
284 + fail, and potentially be rolled back. If the failure is minor or
285 + only will prevent some optional features, then it's better to just
286 + print a warning and exit successfully.
287 +* Try not to use scripts to do what npm can do for you. Read through
288 + [`package.json`](/cli/v6/configuring-npm/package-json) to see all the things that you can specify and enable
289 + by simply describing your package appropriately. In general, this
290 + will lead to a more robust and consistent state.
291 +* Inspect the env to determine where to put things. For instance, if
292 + the `npm_config_binroot` environment variable is set to `/home/user/bin`, then
293 + don't try to install executables into `/usr/local/bin`. The user
294 + probably set it up that way for a reason.
295 +* Don't prefix your script commands with "sudo". If root permissions
296 + are required for some reason, then it'll fail with that error, and
297 + the user will sudo the npm command in question.
298 +* Don't use `install`. Use a `.gyp` file for compilation, and `prepublish`
299 + for anything else. You should almost never have to explicitly set a
300 + preinstall or install script. If you are doing this, please consider if
301 + there is another option. The only valid use of `install` or `preinstall`
302 + scripts is for compilation which must be done on the target architecture.
303 +
304 +### See Also
305 +
306 +* [npm run-script](/cli/v6/commands/npm-run-script)
307 +* [package.json](/cli/v6/configuring-npm/package-json)
308 +* [npm developers](/cli/v6/using-npm/developers)
309 +* [npm install](/cli/v6/commands/npm-install)
content/cli/v6/using-npm/semver.md new
+418
@@ -0,0 +1,418 @@
1 +---
2 +title: semver
3 +section: 7
4 +description: The semantic versioner for npm
5 +github_repo: npm/cli
6 +github_branch: v6-docs
7 +github_path: docs/content/using-npm/semver.md
8 +---
9 +
10 +## Install
11 +
12 +```bash
13 +npm install --save semver
14 +````
15 +
16 +## Usage
17 +
18 +As a node module:
19 +
20 +```js
21 +const semver = require('semver')
22 +
23 +semver.valid('1.2.3') // '1.2.3'
24 +semver.valid('a.b.c') // null
25 +semver.clean(' =v1.2.3 ') // '1.2.3'
26 +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
27 +semver.gt('1.2.3', '9.8.7') // false
28 +semver.lt('1.2.3', '9.8.7') // true
29 +semver.minVersion('>=1.0.0') // '1.0.0'
30 +semver.valid(semver.coerce('v2')) // '2.0.0'
31 +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
32 +```
33 +
34 +As a command-line utility:
35 +
36 +```
37 +$ semver -h
38 +
39 +A JavaScript implementation of the https://semver.org/ specification
40 +Copyright Isaac Z. Schlueter
41 +
42 +Usage: semver [options] <version> [<version> [...]]
43 +Prints valid versions sorted by SemVer precedence
44 +
45 +Options:
46 +-r --range <range>
47 + Print versions that match the specified range.
48 +
49 +-i --increment [<level>]
50 + Increment a version by the specified level. Level can
51 + be one of: major, minor, patch, premajor, preminor,
52 + prepatch, or prerelease. Default level is 'patch'.
53 + Only one version may be specified.
54 +
55 +--preid <identifier>
56 + Identifier to be used to prefix premajor, preminor,
57 + prepatch or prerelease version increments.
58 +
59 +-l --loose
60 + Interpret versions and ranges loosely
61 +
62 +-p --include-prerelease
63 + Always include prerelease versions in range matching
64 +
65 +-c --coerce
66 + Coerce a string into SemVer if possible
67 + (does not imply --loose)
68 +
69 +Program exits successfully if any valid version satisfies
70 +all supplied ranges, and prints all satisfying versions.
71 +
72 +If no satisfying versions are found, then exits failure.
73 +
74 +Versions are printed in ascending order, so supplying
75 +multiple versions to the utility will just sort them.
76 +```
77 +
78 +## Versions
79 +
80 +A "version" is described by the `v2.0.0` specification found at
81 +<https://semver.org/>.
82 +
83 +A leading `"="` or `"v"` character is stripped off and ignored.
84 +
85 +## Ranges
86 +
87 +A `version range` is a set of `comparators` which specify versions
88 +that satisfy the range.
89 +
90 +A `comparator` is composed of an `operator` and a `version`. The set
91 +of primitive `operators` is:
92 +
93 +* `<` Less than
94 +* `<=` Less than or equal to
95 +* `>` Greater than
96 +* `>=` Greater than or equal to
97 +* `=` Equal. If no operator is specified, then equality is assumed,
98 + so this operator is optional, but MAY be included.
99 +
100 +For example, the comparator `>=1.2.7` would match the versions
101 +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
102 +or `1.1.0`.
103 +
104 +Comparators can be joined by whitespace to form a `comparator set`,
105 +which is satisfied by the **intersection** of all of the comparators
106 +it includes.
107 +
108 +A range is composed of one or more comparator sets, joined by `||`. A
109 +version matches a range if and only if every comparator in at least
110 +one of the `||`-separated comparator sets is satisfied by the version.
111 +
112 +For example, the range `>=1.2.7 <1.3.0` would match the versions
113 +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
114 +or `1.1.0`.
115 +
116 +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
117 +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
118 +
119 +### Prerelease Tags
120 +
121 +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
122 +it will only be allowed to satisfy comparator sets if at least one
123 +comparator with the same `[major, minor, patch]` tuple also has a
124 +prerelease tag.
125 +
126 +For example, the range `>1.2.3-alpha.3` would be allowed to match the
127 +version `1.2.3-alpha.7`, but it would *not* be satisfied by
128 +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
129 +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
130 +range only accepts prerelease tags on the `1.2.3` version. The
131 +version `3.4.5` *would* satisfy the range, because it does not have a
132 +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
133 +
134 +The purpose for this behavior is twofold. First, prerelease versions
135 +frequently are updated very quickly, and contain many breaking changes
136 +that are (by the author's design) not yet fit for public consumption.
137 +Therefore, by default, they are excluded from range matching
138 +semantics.
139 +
140 +Second, a user who has opted into using a prerelease version has
141 +clearly indicated the intent to use *that specific* set of
142 +alpha/beta/rc versions. By including a prerelease tag in the range,
143 +the user is indicating that they are aware of the risk. However, it
144 +is still not appropriate to assume that they have opted into taking a
145 +similar risk on the *next* set of prerelease versions.
146 +
147 +Note that this behavior can be suppressed (treating all prerelease
148 +versions as if they were normal versions, for the purpose of range
149 +matching) by setting the `includePrerelease` flag on the options
150 +object to any
151 +[functions](https://github.com/npm/node-semver#functions) that do
152 +range matching.
153 +
154 +#### Prerelease Identifiers
155 +
156 +The method `.inc` takes an additional `identifier` string argument that
157 +will append the value of the string as a prerelease identifier:
158 +
159 +```javascript
160 +semver.inc('1.2.3', 'prerelease', 'beta')
161 +// '1.2.4-beta.0'
162 +```
163 +
164 +command-line example:
165 +
166 +```bash
167 +$ semver 1.2.3 -i prerelease --preid beta
168 +1.2.4-beta.0
169 +```
170 +
171 +Which then can be used to increment further:
172 +
173 +```bash
174 +$ semver 1.2.4-beta.0 -i prerelease
175 +1.2.4-beta.1
176 +```
177 +
178 +### Advanced Range Syntax
179 +
180 +Advanced range syntax desugars to primitive comparators in
181 +deterministic ways.
182 +
183 +Advanced ranges may be combined in the same way as primitive
184 +comparators using white space or `||`.
185 +
186 +#### Hyphen Ranges `X.Y.Z - A.B.C`
187 +
188 +Specifies an inclusive set.
189 +
190 +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
191 +
192 +If a partial version is provided as the first version in the inclusive
193 +range, then the missing pieces are replaced with zeroes.
194 +
195 +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
196 +
197 +If a partial version is provided as the second version in the
198 +inclusive range, then all versions that start with the supplied parts
199 +of the tuple are accepted, but nothing that would be greater than the
200 +provided tuple parts.
201 +
202 +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
203 +* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
204 +
205 +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
206 +
207 +Any of `X`, `x`, or `*` may be used to "stand in" for one of the
208 +numeric values in the `[major, minor, patch]` tuple.
209 +
210 +* `*` := `>=0.0.0` (Any version satisfies)
211 +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
212 +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
213 +
214 +A partial version range is treated as an X-Range, so the special
215 +character is in fact optional.
216 +
217 +* `""` (empty string) := `*` := `>=0.0.0`
218 +* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
219 +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
220 +
221 +#### Tilde Ranges `~1.2.3` `~1.2` `~1`
222 +
223 +Allows patch-level changes if a minor version is specified on the
224 +comparator. Allows minor-level changes if not.
225 +
226 +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
227 +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
228 +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
229 +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
230 +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
231 +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
232 +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
233 + the `1.2.3` version will be allowed, if they are greater than or
234 + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
235 + `1.2.4-beta.2` would not, because it is a prerelease of a
236 + different `[major, minor, patch]` tuple.
237 +
238 +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
239 +
240 +Allows changes that do not modify the left-most non-zero digit in the
241 +`[major, minor, patch]` tuple. In other words, this allows patch and
242 +minor updates for versions `1.0.0` and above, patch updates for
243 +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
244 +
245 +Many authors treat a `0.x` version as if the `x` were the major
246 +"breaking-change" indicator.
247 +
248 +Caret ranges are ideal when an author may make breaking changes
249 +between `0.2.4` and `0.3.0` releases, which is a common practice.
250 +However, it presumes that there will *not* be breaking changes between
251 +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
252 +additive (but non-breaking), according to commonly observed practices.
253 +
254 +* `^1.2.3` := `>=1.2.3 <2.0.0`
255 +* `^0.2.3` := `>=0.2.3 <0.3.0`
256 +* `^0.0.3` := `>=0.0.3 <0.0.4`
257 +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
258 + the `1.2.3` version will be allowed, if they are greater than or
259 + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
260 + `1.2.4-beta.2` would not, because it is a prerelease of a
261 + different `[major, minor, patch]` tuple.
262 +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
263 + `0.0.3` version *only* will be allowed, if they are greater than or
264 + equal to `beta`. So, `0.0.3-pr.2` would be allowed.
265 +
266 +When parsing caret ranges, a missing `patch` value desugars to the
267 +number `0`, but will allow flexibility within that value, even if the
268 +major and minor versions are both `0`.
269 +
270 +* `^1.2.x` := `>=1.2.0 <2.0.0`
271 +* `^0.0.x` := `>=0.0.0 <0.1.0`
272 +* `^0.0` := `>=0.0.0 <0.1.0`
273 +
274 +A missing `minor` and `patch` values will desugar to zero, but also
275 +allow flexibility within those values, even if the major version is
276 +zero.
277 +
278 +* `^1.x` := `>=1.0.0 <2.0.0`
279 +* `^0.x` := `>=0.0.0 <1.0.0`
280 +
281 +### Range Grammar
282 +
283 +Putting all this together, here is a Backus-Naur grammar for ranges,
284 +for the benefit of parser authors:
285 +
286 +```bnf
287 +range-set ::= range ( logical-or range ) *
288 +logical-or ::= ( ' ' ) * '||' ( ' ' ) *
289 +range ::= hyphen | simple ( ' ' simple ) * | ''
290 +hyphen ::= partial ' - ' partial
291 +simple ::= primitive | partial | tilde | caret
292 +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
293 +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
294 +xr ::= 'x' | 'X' | '*' | nr
295 +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
296 +tilde ::= '~' partial
297 +caret ::= '^' partial
298 +qualifier ::= ( '-' pre )? ( '+' build )?
299 +pre ::= parts
300 +build ::= parts
301 +parts ::= part ( '.' part ) *
302 +part ::= nr | [-0-9A-Za-z]+
303 +```
304 +
305 +## Functions
306 +
307 +All methods and classes take a final `options` object argument. All
308 +options in this object are `false` by default. The options supported
309 +are:
310 +
311 +- `loose` Be more forgiving about not-quite-valid semver strings.
312 + (Any resulting output will always be 100% strict compliant, of
313 + course.) For backwards compatibility reasons, if the `options`
314 + argument is a boolean value instead of an object, it is interpreted
315 + to be the `loose` param.
316 +- `includePrerelease` Set to suppress the [default
317 + behavior](https://github.com/npm/node-semver#prerelease-tags) of
318 + excluding prerelease tagged versions from ranges unless they are
319 + explicitly opted into.
320 +
321 +Strict-mode Comparators and Ranges will be strict about the SemVer
322 +strings that they parse.
323 +
324 +* `valid(v)`: Return the parsed version, or null if it's not valid.
325 +* `inc(v, release)`: Return the version incremented by the release
326 + type (`major`, `premajor`, `minor`, `preminor`, `patch`,
327 + `prepatch`, or `prerelease`), or null if it's not valid
328 + * `premajor` in one call will bump the version up to the next major
329 + version and down to a prerelease of that major version.
330 + `preminor`, and `prepatch` work the same way.
331 + * If called from a non-prerelease version, the `prerelease` will work the
332 + same as `prepatch`. It increments the patch version, then makes a
333 + prerelease. If the input version is already a prerelease it simply
334 + increments it.
335 +* `prerelease(v)`: Returns an array of prerelease components, or null
336 + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
337 +* `major(v)`: Return the major version number.
338 +* `minor(v)`: Return the minor version number.
339 +* `patch(v)`: Return the patch version number.
340 +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
341 + or comparators intersect.
342 +* `parse(v)`: Attempt to parse a string as a semantic version, returning either
343 + a `SemVer` object or `null`.
344 +
345 +### Comparison
346 +
347 +* `gt(v1, v2)`: `v1 > v2`
348 +* `gte(v1, v2)`: `v1 >= v2`
349 +* `lt(v1, v2)`: `v1 < v2`
350 +* `lte(v1, v2)`: `v1 <= v2`
351 +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
352 + even if they're not the exact same string. You already know how to
353 + compare strings.
354 +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
355 +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
356 + the corresponding function above. `"==="` and `"!=="` do simple
357 + string comparison, but are included for completeness. Throws if an
358 + invalid comparison string is provided.
359 +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
360 + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
361 +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
362 + in descending order when passed to `Array.sort()`.
363 +* `diff(v1, v2)`: Returns difference between two versions by the release type
364 + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
365 + or null if the versions are the same.
366 +
367 +### Comparators
368 +
369 +* `intersects(comparator)`: Return true if the comparators intersect
370 +
371 +### Ranges
372 +
373 +* `validRange(range)`: Return the valid range or null if it's not valid
374 +* `satisfies(version, range)`: Return true if the version satisfies the
375 + range.
376 +* `maxSatisfying(versions, range)`: Return the highest version in the list
377 + that satisfies the range, or `null` if none of them do.
378 +* `minSatisfying(versions, range)`: Return the lowest version in the list
379 + that satisfies the range, or `null` if none of them do.
380 +* `minVersion(range)`: Return the lowest version that can possibly match
381 + the given range.
382 +* `gtr(version, range)`: Return `true` if version is greater than all the
383 + versions possible in the range.
384 +* `ltr(version, range)`: Return `true` if version is less than all the
385 + versions possible in the range.
386 +* `outside(version, range, hilo)`: Return true if the version is outside
387 + the bounds of the range in either the high or low direction. The
388 + `hilo` argument must be either the string `'>'` or `'<'`. (This is
389 + the function called by `gtr` and `ltr`.)
390 +* `intersects(range)`: Return true if any of the ranges comparators intersect
391 +
392 +Note that, since ranges may be non-contiguous, a version might not be
393 +greater than a range, less than a range, *or* satisfy a range! For
394 +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
395 +until `2.0.0`, so the version `1.2.10` would not be greater than the
396 +range (because `2.0.1` satisfies, which is higher), nor less than the
397 +range (since `1.2.8` satisfies, which is lower), and it also does not
398 +satisfy the range.
399 +
400 +If you want to know if a version satisfies or does not satisfy a
401 +range, use the `satisfies(version, range)` function.
402 +
403 +### Coercion
404 +
405 +* `coerce(version)`: Coerces a string to semver if possible
406 +
407 +This aims to provide a very forgiving translation of a non-semver string to
408 +semver. It looks for the first digit in a string, and consumes all
409 +remaining characters which satisfy at least a partial semver (e.g., `1`,
410 +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
411 +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
412 +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
413 +`3.4.0`). Only text which lacks digits will fail coercion (`version one`
414 +is not valid). The maximum length for any semver component considered for
415 +coercion is 16 characters; longer components will be ignored
416 +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
417 +semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
418 +components are invalid (`9999999999999999.4.7.4` is likely invalid).
content/cli/v7/commands/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +redirect_from:
3 + - commands
4 + - /cli/commands
5 + - /cli-documentation/cli
6 + - /cli-documentation/cli-commands
7 +github_repo: npm/cli
8 +github_branch: latest
9 +github_path: docs/content/commands/index.mdx
10 +title: CLI commands
11 +---
12 +<Index depth="1" />
\ No newline at end of file
content/cli/v7/commands/npm-access.md new
+101
@@ -0,0 +1,101 @@
1 +---
2 +title: npm-access
3 +section: 1
4 +description: Set access level on published packages
5 +redirect_from:
6 + - /cli/access
7 + - /cli/access.html
8 + - /cli/commands/access
9 + - /cli-commands/access
10 + - /cli-commands/access.html
11 + - /cli-commands/npm-access
12 + - /cli-documentation/access
13 +github_repo: npm/cli
14 +github_branch: latest
15 +github_path: docs/content/commands/npm-access.md
16 +---
17 +
18 +### Synopsis
19 +
20 +```bash
21 +npm access public [<package>]
22 +npm access restricted [<package>]
23 +
24 +npm access grant <read-only|read-write> <scope:team> [<package>]
25 +npm access revoke <scope:team> [<package>]
26 +
27 +npm access 2fa-required [<package>]
28 +npm access 2fa-not-required [<package>]
29 +
30 +npm access ls-packages [<user>|<scope>|<scope:team>]
31 +npm access ls-collaborators [<package> [<user>]]
32 +npm access edit [<package>]
33 +```
34 +
35 +### Description
36 +
37 +Used to set access controls on private packages.
38 +
39 +For all of the subcommands, `npm access` will perform actions on the packages
40 +in the current working directory if no package name is passed to the
41 +subcommand.
42 +
43 +* public / restricted:
44 + Set a package to be either publicly accessible or restricted.
45 +
46 +* grant / revoke:
47 + Add or remove the ability of users and teams to have read-only or read-write
48 + access to a package.
49 +
50 +* 2fa-required / 2fa-not-required:
51 + Configure whether a package requires that anyone publishing it have two-factor
52 + authentication enabled on their account.
53 +
54 +* ls-packages:
55 + Show all of the packages a user or a team is able to access, along with the
56 + access level, except for read-only public packages (it won't print the whole
57 + registry listing)
58 +
59 +* ls-collaborators:
60 + Show all of the access privileges for a package. Will only show permissions
61 + for packages to which you have at least read access. If `<user>` is passed in,
62 + the list is filtered only to teams _that_ user happens to belong to.
63 +
64 +* edit:
65 + Set the access privileges for a package at once using `$EDITOR`.
66 +
67 +### Details
68 +
69 +`npm access` always operates directly on the current registry, configurable
70 +from the command line using `--registry=<registry url>`.
71 +
72 +Unscoped packages are *always public*.
73 +
74 +Scoped packages *default to restricted*, but you can either publish them as
75 +public using `npm publish --access=public`, or set their access as public using
76 +`npm access public` after the initial publish.
77 +
78 +You must have privileges to set the access of a package:
79 +
80 +* You are an owner of an unscoped or scoped package.
81 +* You are a member of the team that owns a scope.
82 +* You have been given read-write privileges for a package, either as a member
83 + of a team or directly as an owner.
84 +
85 +If you have two-factor authentication enabled then you'll be prompted to
86 +provide an otp token, or may use the `--otp=...` option to specify it on
87 +the command line.
88 +
89 +If your account is not paid, then attempts to publish scoped packages will
90 +fail with an HTTP 402 status code (logically enough), unless you use
91 +`--access=public`.
92 +
93 +Management of teams and team memberships is done with the `npm team` command.
94 +
95 +### See Also
96 +
97 +* [`libnpmaccess`](https://npm.im/libnpmaccess)
98 +* [npm team](/cli/v7/commands/npm-team)
99 +* [npm publish](/cli/v7/commands/npm-publish)
100 +* [npm config](/cli/v7/commands/npm-config)
101 +* [npm registry](/cli/v7/using-npm/registry)
content/cli/v7/commands/npm-adduser.md new
+103
@@ -0,0 +1,103 @@
1 +---
2 +title: npm-adduser
3 +section: 1
4 +description: Add a registry user account
5 +redirect_from:
6 + - /cli/adduser
7 + - /cli/adduser.html
8 + - /cli/commands/adduser
9 + - /cli-commands/adduser
10 + - /cli-commands/adduser.html
11 + - /cli-commands/npm-adduser
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-adduser.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm adduser [--registry=url] [--scope=@orgname] [--always-auth] [--auth-type=legacy]
21 +
22 +aliases: login, add-user
23 +```
24 +
25 +Note: This command is unaware of workspaces.
26 +
27 +### Description
28 +
29 +Create or verify a user named `<username>` in the specified registry, and
30 +save the credentials to the `.npmrc` file. If no registry is specified,
31 +the default registry will be used (see [`config`](/cli/v7/using-npm/config)).
32 +
33 +The username, password, and email are read in from prompts.
34 +
35 +To reset your password, go to <https://www.npmjs.com/forgot>
36 +
37 +To change your email address, go to <https://www.npmjs.com/email-edit>
38 +
39 +You may use this command multiple times with the same user account to
40 +authorize on a new machine. When authenticating on a new machine,
41 +the username, password and email address must all match with
42 +your existing record.
43 +
44 +`npm login` is an alias to `adduser` and behaves exactly the same way.
45 +
46 +### Configuration
47 +
48 +#### registry
49 +
50 +Default: https://registry.npmjs.org/
51 +
52 +The base URL of the npm package registry. If `scope` is also specified,
53 +this registry will only be used for packages with that scope. `scope` defaults
54 +to the scope of the project directory you're currently in, if any. See [`scope`](/cli/v7/using-npm/scope).
55 +
56 +#### scope
57 +
58 +Default: none
59 +
60 +If specified, the user and login credentials given will be associated
61 +with the specified scope. See [`scope`](/cli/v7/using-npm/scope). You can use both at the same time,
62 +e.g.
63 +
64 +```bash
65 +npm adduser --registry=http://myregistry.example.com --scope=@myco
66 +```
67 +
68 +This will set a registry for the given scope and login or create a user for
69 +that registry at the same time.
70 +
71 +#### always-auth
72 +
73 +Default: false
74 +
75 +If specified, save configuration indicating that all requests to the given
76 +registry should include authorization information. Useful for private
77 +registries. Can be used with `--registry` and / or `--scope`, e.g.
78 +
79 +```bash
80 +npm adduser --registry=http://private-registry.example.com --always-auth
81 +```
82 +
83 +This will ensure that all requests to that registry (including for tarballs)
84 +include an authorization header. This setting may be necessary for use with
85 +private registries where metadata and package tarballs are stored on hosts with
86 +different hostnames. See `always-auth` in [`config`](/cli/v7/using-npm/config) for more details on always-auth. Registry-specific configuration of `always-auth` takes precedence over any global configuration.
87 +
88 +#### auth-type
89 +
90 +* Default: `'legacy'`
91 +* Type: `'legacy'`, `'sso'`, `'saml'`, `'oauth'`
92 +
93 +What authentication strategy to use with `adduser`/`login`. Some npm registries
94 +(for example, npmE) might support alternative auth strategies besides classic
95 +username/password entry in legacy npm.
96 +
97 +### See Also
98 +
99 +* [npm registry](/cli/v7/using-npm/registry)
100 +* [npm config](/cli/v7/commands/npm-config)
101 +* [npmrc](/cli/v7/configuring-npm/npmrc)
102 +* [npm owner](/cli/v7/commands/npm-owner)
103 +* [npm whoami](/cli/v7/commands/npm-whoami)
content/cli/v7/commands/npm-audit.md new
+203
@@ -0,0 +1,203 @@
1 +---
2 +title: npm-audit
3 +section: 1
4 +description: Run a security audit
5 +redirect_from:
6 + - /cli/audit
7 + - /cli/audit.html
8 + - /cli/commands/audit
9 + - /cli-commands/audit
10 + - /cli-commands/audit.html
11 + - /cli-commands/npm-audit
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-audit.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm audit [--json] [--production] [--audit-level=(low|moderate|high|critical)]
21 +npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]
22 +
23 +common options: [--production] [--only=(dev|prod)]
24 +```
25 +
26 +### Description
27 +
28 +The audit command submits a description of the dependencies configured in
29 +your project to your default registry and asks for a report of known
30 +vulnerabilities. If any vulnerabilities are found, then the impact and
31 +appropriate remediation will be calculated. If the `fix` argument is
32 +provided, then remediations will be applied to the package tree.
33 +
34 +The command will exit with a 0 exit code if no vulnerabilities were found.
35 +
36 +Note that some vulnerabilities cannot be fixed automatically and will
37 +require manual intervention or review. Also note that since `npm audit
38 +fix` runs a full-fledged `npm install` under the hood, all configs that
39 +apply to the installer will also apply to `npm install` -- so things like
40 +`npm audit fix --package-lock-only` will work as expected.
41 +
42 +By default, the audit command will exit with a non-zero code if any
43 +vulnerability is found. It may be useful in CI environments to include the
44 +`--audit-level` parameter to specify the minimum vulnerability level that
45 +will cause the command to fail. This option does not filter the report
46 +output, it simply changes the command's failure threshold.
47 +
48 +### Audit Endpoints
49 +
50 +There are two audit endpoints that npm may use to fetch vulnerability
51 +information: the `Bulk Advisory` endpoint and the `Quick Audit` endpoint.
52 +
53 +#### Bulk Advisory Endpoint
54 +
55 +As of version 7, npm uses the much faster `Bulk Advisory` endpoint to
56 +optimize the speed of calculating audit results.
57 +
58 +npm will generate a JSON payload with the name and list of versions of each
59 +package in the tree, and POST it to the default configured registry at
60 +the path `/-/npm/v1/security/advisories/bulk`.
61 +
62 +Any packages in the tree that do not have a `version` field in their
63 +package.json file will be ignored. If any `--omit` options are specified
64 +(either via the `--omit` config, or one of the shorthands such as
65 +`--production`, `--only=dev`, and so on), then packages will be omitted
66 +from the submitted payload as appropriate.
67 +
68 +If the registry responds with an error, or with an invalid response, then
69 +npm will attempt to load advisory data from the `Quick Audit` endpoint.
70 +
71 +The expected result will contain a set of advisory objects for each
72 +dependency that matches the advisory range. Each advisory object contains
73 +a `name`, `url`, `id`, `severity`, `vulnerable_versions`, and `title`.
74 +
75 +npm then uses these advisory objects to calculate vulnerabilities and
76 +meta-vulnerabilities of the dependencies within the tree.
77 +
78 +#### Quick Audit Endpoint
79 +
80 +If the `Bulk Advisory` endpoint returns an error, or invalid data, npm will
81 +attempt to load advisory data from the `Quick Audit` endpoint, which is
82 +considerably slower in most cases.
83 +
84 +The full package tree as found in `package-lock.json` is submitted, along
85 +with the following pieces of additional metadata:
86 +
87 +* `npm_version`
88 +* `node_version`
89 +* `platform`
90 +* `arch`
91 +* `node_env`
92 +
93 +All packages in the tree are submitted to the Quick Audit endpoint.
94 +Omitted dependency types are skipped when generating the report.
95 +
96 +#### Scrubbing
97 +
98 +Out of an abundance of caution, npm versions 5 and 6 would "scrub" any
99 +packages from the submitted report if their name contained a `/` character,
100 +so as to avoid leaking the names of potentially private packages or git
101 +URLs.
102 +
103 +However, in practice, this resulted in audits often failing to properly
104 +detect meta-vulnerabilities, because the tree would appear to be invalid
105 +due to missing dependencies, and prevented the detection of vulnerabilities
106 +in package trees that used git dependencies or private modules.
107 +
108 +This scrubbing has been removed from npm as of version 7.
109 +
110 +#### Calculating Meta-Vulnerabilities and Remediations
111 +
112 +npm uses the
113 +[`@npmcli/metavuln-calculator`](http://npm.im/@npmcli/metavuln-calculator)
114 +module to turn a set of security advisories into a set of "vulnerability"
115 +objects. A "meta-vulnerability" is a dependency that is vulnerable by
116 +virtue of dependence on vulnerable versions of a vulnerable package.
117 +
118 +For example, if the package `foo` is vulnerable in the range `>=1.0.2
119 +<2.0.0`, and the package `bar` depends on `foo@^1.1.0`, then that version
120 +of `bar` can only be installed by installing a vulnerable version of `foo`.
121 +In this case, `bar` is a "metavulnerability".
122 +
123 +Once metavulnerabilities for a given package are calculated, they are
124 +cached in the `~/.npm` folder and only re-evaluated if the advisory range
125 +changes, or a new version of the package is published (in which case, the
126 +new version is checked for metavulnerable status as well).
127 +
128 +If the chain of metavulnerabilities extends all the way to the root
129 +project, and it cannot be updated without changing its dependency ranges,
130 +then `npm audit fix` will require the `--force` option to apply the
131 +remediation. If remediations do not require changes to the dependency
132 +ranges, then all vulnerable packages will be updated to a version that does
133 +not have an advisory or metavulnerability posted against it.
134 +
135 +### Exit Code
136 +
137 +The `npm audit` command will exit with a 0 exit code if no vulnerabilities
138 +were found. The `npm audit fix` command will exit with 0 exit code if no
139 +vulnerabilities are found _or_ if the remediation is able to successfully
140 +fix all vulnerabilities.
141 +
142 +If vulnerabilities were found the exit code will depend on the
143 +`audit-level` configuration setting.
144 +
145 +### Examples
146 +
147 +Scan your project for vulnerabilities and automatically install any compatible
148 +updates to vulnerable dependencies:
149 +
150 +```bash
151 +$ npm audit fix
152 +```
153 +
154 +Run `audit fix` without modifying `node_modules`, but still updating the
155 +pkglock:
156 +
157 +```bash
158 +$ npm audit fix --package-lock-only
159 +```
160 +
161 +Skip updating `devDependencies`:
162 +
163 +```bash
164 +$ npm audit fix --only=prod
165 +```
166 +
167 +Have `audit fix` install SemVer-major updates to toplevel dependencies, not
168 +just SemVer-compatible ones:
169 +
170 +```bash
171 +$ npm audit fix --force
172 +```
173 +
174 +Do a dry run to get an idea of what `audit fix` will do, and _also_ output
175 +install information in JSON format:
176 +
177 +```bash
178 +$ npm audit fix --dry-run --json
179 +```
180 +
181 +Scan your project for vulnerabilities and just show the details, without
182 +fixing anything:
183 +
184 +```bash
185 +$ npm audit
186 +```
187 +
188 +Get the detailed audit report in JSON format:
189 +
190 +```bash
191 +$ npm audit --json
192 +```
193 +
194 +Fail an audit only if the results include a vulnerability with a level of moderate or higher:
195 +
196 +```bash
197 +$ npm audit --audit-level=moderate
198 +```
199 +
200 +### See Also
201 +
202 +* [npm install](/cli/v7/commands/npm-install)
203 +* [config](/cli/v7/using-npm/config)
content/cli/v7/commands/npm-bin.md new
+35
@@ -0,0 +1,35 @@
1 +---
2 +title: npm-bin
3 +section: 1
4 +description: Display npm bin folder
5 +redirect_from:
6 + - /cli/bin
7 + - /cli/bin.html
8 + - /cli/commands/bin
9 + - /cli-commands/bin
10 + - /cli-commands/bin.html
11 + - /cli-commands/npm-bin
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-bin.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm bin [-g|--global]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +Print the folder where npm will install executables.
28 +
29 +### See Also
30 +
31 +* [npm prefix](/cli/v7/commands/npm-prefix)
32 +* [npm root](/cli/v7/commands/npm-root)
33 +* [npm folders](/cli/v7/configuring-npm/folders)
34 +* [npm config](/cli/v7/commands/npm-config)
35 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-bugs.md new
+61
@@ -0,0 +1,61 @@
1 +---
2 +title: npm-bugs
3 +section: 1
4 +description: Report bugs for a package in a web browser
5 +redirect_from:
6 + - /cli/bugs
7 + - /cli/bugs.html
8 + - /cli/commands/bugs
9 + - /cli-commands/bugs
10 + - /cli-commands/bugs.html
11 + - /cli-commands/npm-bugs
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-bugs.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm bugs [<pkgname> [<pkgname> ...]]
21 +
22 +aliases: issues
23 +```
24 +
25 +### Description
26 +
27 +This command tries to guess at the likely location of a package's bug
28 +tracker URL, and then tries to open it using the `--browser` config param.
29 +If no package name is provided, it will search for a `package.json` in the
30 +current folder and use the `name` property.
31 +
32 +### Configuration
33 +
34 +#### browser
35 +
36 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
37 +* Type: String or Boolean
38 +
39 +The browser that is called by the `npm bugs` command to open websites.
40 +
41 +Set to `false` to suppress browser behavior and instead print urls to
42 +terminal.
43 +
44 +Set to `true` to use default system URL opener.
45 +
46 +#### registry
47 +
48 +* Default: https://registry.npmjs.org/
49 +* Type: url
50 +
51 +The base URL of the npm package registry.
52 +
53 +### See Also
54 +
55 +* [npm docs](/cli/v7/commands/npm-docs)
56 +* [npm view](/cli/v7/commands/npm-view)
57 +* [npm publish](/cli/v7/commands/npm-publish)
58 +* [npm registry](/cli/v7/using-npm/registry)
59 +* [npm config](/cli/v7/commands/npm-config)
60 +* [npmrc](/cli/v7/configuring-npm/npmrc)
61 +* [package.json](/cli/v7/configuring-npm/package-json)
content/cli/v7/commands/npm-bundle.md new
+20
@@ -0,0 +1,20 @@
1 +---
2 +title: npm-bundle
3 +section: 1
4 +description: REMOVED
5 +github_repo: npm/cli
6 +github_branch: release/v7.0.0-beta
7 +github_path: docs/content/commands/npm-bundle.md
8 +---
9 +
10 +### Description
11 +
12 +The `npm bundle` command has been removed in 1.0, for the simple reason
13 +that it is no longer necessary, as the default behavior is now to
14 +install packages into the local space.
15 +
16 +Just use `npm install` now to do what `npm bundle` used to do.
17 +
18 +### See Also
19 +
20 +* [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-cache.md new
+105
@@ -0,0 +1,105 @@
1 +---
2 +title: npm-cache
3 +section: 1
4 +description: Manipulates packages cache
5 +redirect_from:
6 + - /cli/cache
7 + - /cli/cache.html
8 + - /cli/commands/cache
9 + - /cli-commands/cache
10 + - /cli-commands/cache.html
11 + - /cli-commands/npm-cache
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-cache.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm cache add <tarball file>
21 +npm cache add <folder>
22 +npm cache add <tarball url>
23 +npm cache add <name>@<version>
24 +
25 +npm cache clean
26 +aliases: npm cache clear, npm cache rm
27 +
28 +npm cache verify
29 +```
30 +
31 +Note: This command is unaware of workspaces.
32 +
33 +### Description
34 +
35 +Used to add, list, or clean the npm cache folder.
36 +
37 +* add:
38 + Add the specified package to the local cache. This command is primarily
39 + intended to be used internally by npm, but it can provide a way to
40 + add data to the local installation cache explicitly.
41 +
42 +* clean:
43 + Delete all data out of the cache folder. Note that this is typically
44 + unnecessary, as npm's cache is self-healing and resistant to data
45 + corruption issues.
46 +
47 +* verify:
48 + Verify the contents of the cache folder, garbage collecting any unneeded
49 + data, and verifying the integrity of the cache index and all cached data.
50 +
51 +### Details
52 +
53 +npm stores cache data in an opaque directory within the configured `cache`,
54 +named `_cacache`. This directory is a
55 +[`cacache`](http://npm.im/cacache)-based content-addressable cache that
56 +stores all http request data as well as other package-related data. This
57 +directory is primarily accessed through `pacote`, the library responsible
58 +for all package fetching as of npm@5.
59 +
60 +All data that passes through the cache is fully verified for integrity on
61 +both insertion and extraction. Cache corruption will either trigger an
62 +error, or signal to `pacote` that the data must be refetched, which it will
63 +do automatically. For this reason, it should never be necessary to clear
64 +the cache for any reason other than reclaiming disk space, thus why `clean`
65 +now requires `--force` to run.
66 +
67 +There is currently no method exposed through npm to inspect or directly
68 +manage the contents of this cache. In order to access it, `cacache` must be
69 +used directly.
70 +
71 +npm will not remove data by itself: the cache will grow as new packages are
72 +installed.
73 +
74 +### A note about the cache's design
75 +
76 +The npm cache is strictly a cache: it should not be relied upon as a
77 +persistent and reliable data store for package data. npm makes no guarantee
78 +that a previously-cached piece of data will be available later, and will
79 +automatically delete corrupted contents. The primary guarantee that the
80 +cache makes is that, if it does return data, that data will be exactly the
81 +data that was inserted.
82 +
83 +To run an offline verification of existing cache contents, use `npm cache
84 +verify`.
85 +
86 +### Configuration
87 +
88 +#### cache
89 +
90 +Default: `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows.
91 +
92 +The root cache folder.
93 +
94 +### See Also
95 +
96 +* [npm folders](/cli/v7/configuring-npm/folders)
97 +* [npm config](/cli/v7/commands/npm-config)
98 +* [npmrc](/cli/v7/configuring-npm/npmrc)
99 +* [npm install](/cli/v7/commands/npm-install)
100 +* [npm publish](/cli/v7/commands/npm-publish)
101 +* [npm pack](/cli/v7/commands/npm-pack)
102 +* https://npm.im/cacache
103 +* https://npm.im/pacote
104 +* https://npm.im/@npmcli/arborist
105 +* https://npm.im/make-fetch-happen
content/cli/v7/commands/npm-ci.md new
+81
@@ -0,0 +1,81 @@
1 +---
2 +title: npm-ci
3 +section: 1
4 +description: Install a project with a clean slate
5 +redirect_from:
6 + - /cli/ci
7 + - /cli/ci.html
8 + - /cli/commands/ci
9 + - /cli-commands/ci
10 + - /cli-commands/ci.html
11 + - /cli-commands/npm-ci
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-ci.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm ci
21 +```
22 +
23 +### Description
24 +
25 +This command is similar to [`npm install`](/cli-commands/install), except
26 +it's meant to be used in automated environments such as test platforms,
27 +continuous integration, and deployment -- or any situation where you want
28 +to make sure you're doing a clean install of your dependencies.
29 +
30 +`npm ci` will be significantly faster when:
31 +
32 +- There is a `package-lock.json` or `npm-shrinkwrap.json` file.
33 +- The `node_modules` folder is missing or empty.
34 +
35 +In short, the main differences between using `npm install` and `npm ci` are:
36 +
37 +* The project **must** have an existing `package-lock.json` or
38 + `npm-shrinkwrap.json`.
39 +* If dependencies in the package lock do not match those in `package.json`,
40 + `npm ci` will exit with an error, instead of updating the package lock.
41 +* `npm ci` can only install entire projects at a time: individual
42 + dependencies cannot be added with this command.
43 +* If a `node_modules` is already present, it will be automatically removed
44 + before `npm ci` begins its install.
45 +* It will never write to `package.json` or any of the package-locks:
46 + installs are essentially frozen.
47 +
48 +### Example
49 +
50 +Make sure you have a package-lock and an up-to-date install:
51 +
52 +```bash
53 +$ cd ./my/npm/project
54 +$ npm install
55 +added 154 packages in 10s
56 +$ ls | grep package-lock
57 +```
58 +
59 +Run `npm ci` in that project
60 +
61 +```bash
62 +$ npm ci
63 +added 154 packages in 5s
64 +```
65 +
66 +Configure Travis to build using `npm ci` instead of `npm install`:
67 +
68 +```bash
69 +# .travis.yml
70 +install:
71 +- npm ci
72 +# keep the npm cache around to speed up installs
73 +cache:
74 + directories:
75 + - "$HOME/.npm"
76 +```
77 +
78 +### See Also
79 +
80 +* [npm install](/cli/v7/commands/npm-install)
81 +* [package-lock.json](/cli/v7/configuring-npm/package-lock-json)
content/cli/v7/commands/npm-completion.md new
+51
@@ -0,0 +1,51 @@
1 +---
2 +title: npm-completion
3 +section: 1
4 +description: Tab Completion for npm
5 +redirect_from:
6 + - /cli/completion
7 + - /cli/completion.html
8 + - /cli/commands/completion
9 + - /cli-commands/completion
10 + - /cli-commands/completion.html
11 + - /cli-commands/npm-completion
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-completion.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +source <(npm completion)
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +Enables tab-completion in all npm commands.
28 +
29 +The synopsis above
30 +loads the completions into your current shell. Adding it to
31 +your ~/.bashrc or ~/.zshrc will make the completions available
32 +everywhere:
33 +
34 +```bash
35 +npm completion >> ~/.bashrc
36 +npm completion >> ~/.zshrc
37 +```
38 +
39 +You may of course also pipe the output of `npm completion` to a file
40 +such as `/usr/local/etc/bash_completion.d/npm` or
41 +`/etc/bash_completion.d/npm` if you have a system that will read
42 +that file for you.
43 +
44 +When `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the
45 +environment, `npm completion` acts in "plumbing mode", and outputs
46 +completions based on the arguments.
47 +
48 +### See Also
49 +
50 +* [npm developers](/cli/v7/using-npm/developers)
51 +* [npm](/cli/v7/commands/npm)
content/cli/v7/commands/npm-config.md new
+112
@@ -0,0 +1,112 @@
1 +---
2 +title: npm-config
3 +section: 1
4 +description: Manage the npm configuration files
5 +redirect_from:
6 + - /cli/config
7 + - /cli/config.html
8 + - /cli/commands/config
9 + - /cli-commands/config
10 + - /cli-commands/config.html
11 + - /cli-commands/npm-config
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-config.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm config set <key>=<value> [<key>=<value> ...]
21 +npm config get [<key> [<key> ...]]
22 +npm config delete <key> [<key> ...]
23 +npm config list [--json]
24 +npm config edit
25 +npm set <key>=<value> [<key>=<value> ...]
26 +npm get [<key> [<key> ...]]
27 +
28 +alias: c
29 +```
30 +
31 +Note: This command is unaware of workspaces.
32 +
33 +### Description
34 +
35 +npm gets its config settings from the command line, environment
36 +variables, `npmrc` files, and in some cases, the `package.json` file.
37 +
38 +See [npmrc](/cli/v7/configuring-npm/npmrc) for more information about the npmrc
39 +files.
40 +
41 +See [config(7)](/cli/v7/using-npm/config) for a more thorough explanation of the
42 +mechanisms involved, and a full list of config options available.
43 +
44 +The `npm config` command can be used to update and edit the contents
45 +of the user and global npmrc files.
46 +
47 +### Sub-commands
48 +
49 +Config supports the following sub-commands:
50 +
51 +#### set
52 +
53 +```bash
54 +npm config set key=value [key=value...]
55 +npm set key=value [key=value...]
56 +```
57 +
58 +Sets each of the config keys to the value provided.
59 +
60 +If value is omitted, then it sets it to an empty string.
61 +
62 +Note: for backwards compatibility, `npm config set key value` is supported
63 +as an alias for `npm config set key=value`.
64 +
65 +#### get
66 +
67 +```bash
68 +npm config get [key ...]
69 +npm get [key ...]
70 +```
71 +
72 +Echo the config value(s) to stdout.
73 +
74 +If multiple keys are provided, then the values will be prefixed with the
75 +key names.
76 +
77 +If no keys are provided, then this command behaves the same as `npm config
78 +list`.
79 +
80 +#### list
81 +
82 +```bash
83 +npm config list
84 +```
85 +
86 +Show all the config settings. Use `-l` to also show defaults. Use `--json`
87 +to show the settings in json format.
88 +
89 +#### delete
90 +
91 +```bash
92 +npm config delete key [key ...]
93 +```
94 +
95 +Deletes the specified keys from all configuration files.
96 +
97 +#### edit
98 +
99 +```bash
100 +npm config edit
101 +```
102 +
103 +Opens the config file in an editor. Use the `--global` flag to edit the
104 +global config.
105 +
106 +### See Also
107 +
108 +* [npm folders](/cli/v7/configuring-npm/folders)
109 +* [npm config](/cli/v7/commands/npm-config)
110 +* [package.json](/cli/v7/configuring-npm/package-json)
111 +* [npmrc](/cli/v7/configuring-npm/npmrc)
112 +* [npm](/cli/v7/commands/npm)
content/cli/v7/commands/npm-dedupe.md new
+90
@@ -0,0 +1,90 @@
1 +---
2 +title: npm-dedupe
3 +section: 1
4 +description: Reduce duplication in the package tree
5 +redirect_from:
6 + - /cli/dedupe
7 + - /cli/dedupe.html
8 + - /cli/commands/dedupe
9 + - /cli-commands/dedupe
10 + - /cli-commands/dedupe.html
11 + - /cli-commands/npm-dedupe
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-dedupe.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm dedupe
21 +npm ddp
22 +
23 +aliases: ddp
24 +```
25 +
26 +### Description
27 +
28 +Searches the local package tree and attempts to simplify the overall
29 +structure by moving dependencies further up the tree, where they can
30 +be more effectively shared by multiple dependent packages.
31 +
32 +For example, consider this dependency graph:
33 +
34 +```
35 +a
36 ++-- b <-- depends on c@1.0.x
37 +| `-- c@1.0.3
38 +`-- d <-- depends on c@~1.0.9
39 + `-- c@1.0.10
40 +```
41 +
42 +In this case, `npm dedupe` will transform the tree to:
43 +
44 +```bash
45 +a
46 ++-- b
47 ++-- d
48 +`-- c@1.0.10
49 +```
50 +
51 +Because of the hierarchical nature of node's module lookup, b and d
52 +will both get their dependency met by the single c package at the root
53 +level of the tree.
54 +
55 +In some cases, you may have a dependency graph like this:
56 +
57 +```
58 +a
59 ++-- b <-- depends on c@1.0.x
60 ++-- c@1.0.3
61 +`-- d <-- depends on c@1.x
62 + `-- c@1.9.9
63 +```
64 +
65 +During the installation process, the `c@1.0.3` dependency for `b` was
66 +placed in the root of the tree. Though `d`'s dependency on `c@1.x` could
67 +have been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used,
68 +because npm favors updates by default, even when doing so causes
69 +duplication.
70 +
71 +Running `npm dedupe` will cause npm to note the duplication and
72 +re-evaluate, deleting the nested `c` module, because the one in the root is
73 +sufficient.
74 +
75 +To prefer deduplication over novelty during the installation process, run
76 +`npm install --prefer-dedupe` or `npm config set prefer-dedupe true`.
77 +
78 +Arguments are ignored. Dedupe always acts on the entire tree.
79 +
80 +Note that this operation transforms the dependency tree, but will never
81 +result in new modules being installed.
82 +
83 +Using `npm find-dupes` will run the command in `--dry-run` mode.
84 +
85 +### See Also
86 +
87 +* [npm find-dupes](/cli-commands/find-dupes)
88 +* [npm ls](/cli-commands/ls)
89 +* [npm update](/cli-commands/update)
90 +* [npm install](/cli-commands/install)
content/cli/v7/commands/npm-deprecate.md new
+58
@@ -0,0 +1,58 @@
1 +---
2 +title: npm-deprecate
3 +section: 1
4 +description: Deprecate a version of a package
5 +redirect_from:
6 + - /cli/deprecate
7 + - /cli/deprecate.html
8 + - /cli/commands/deprecate
9 + - /cli-commands/deprecate
10 + - /cli-commands/deprecate.html
11 + - /cli-commands/npm-deprecate
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-deprecate.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm deprecate <pkg>[@<version range>] <message>
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +This command will update the npm registry entry for a package, providing a
28 +deprecation warning to all who attempt to install it.
29 +
30 +It works on [version ranges](https://semver.npmjs.com/) as well as specific
31 +versions, so you can do something like this:
32 +
33 +```bash
34 +npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
35 +```
36 +
37 +SemVer ranges passed to this command are interpreted such that they *do*
38 +include prerelease versions. For example:
39 +
40 +```bash
41 +npm deprecate my-thing@1.x "1.x is no longer supported"
42 +```
43 +
44 +In this case, a version `my-thing@1.0.0-beta.0` will also be deprecated.
45 +
46 +You must be the package owner to deprecate something. See the `owner` and
47 +`adduser` help topics.
48 +
49 +To un-deprecate a package, specify an empty string (`""`) for the `message`
50 +argument. Note that you must use double quotes with no space between them to
51 +format an empty string.
52 +
53 +### See Also
54 +
55 +* [npm publish](/cli/v7/commands/npm-publish)
56 +* [npm registry](/cli/v7/using-npm/registry)
57 +* [npm owner](/cli-commands/owner)
58 +* [npm owner](/cli-commands/adduser)
content/cli/v7/commands/npm-diff.md new
+247
@@ -0,0 +1,247 @@
1 +---
2 +title: npm-diff
3 +section: 1
4 +description: The registry diff command
5 +redirect_from:
6 + - /cli/diff
7 + - /cli/diff.html
8 + - /cli/commands/diff
9 + - /cli-commands/diff
10 + - /cli-commands/diff.html
11 + - /cli-commands/npm-diff
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-diff.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm diff [...<paths>]
21 +npm diff --diff=<pkg-name> [...<paths>]
22 +npm diff --diff=<version-a> [--diff=<version-b>] [...<paths>]
23 +npm diff --diff=<spec-a> [--diff=<spec-b>] [...<paths>]
24 +npm diff [--diff-ignore-all-space] [--diff-name-only] [...<paths>]
25 +```
26 +
27 +### Description
28 +
29 +Similar to its `git diff` counterpart, this command will print diff patches
30 +of files for packages published to the npm registry.
31 +
32 +* `npm diff --diff=<spec-a> --diff=<spec-b>`
33 +
34 + Compares two package versions using their registry specifiers, e.g:
35 + `npm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0`. It's also possible to
36 + compare across forks of any package,
37 + e.g: `npm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0`.
38 +
39 + Any valid spec can be used, so that it's also possible to compare
40 + directories or git repositories,
41 + e.g: `npm diff --diff=pkg@latest --diff=./packages/pkg`
42 +
43 + Here's an example comparing two different versions of a package named
44 + `abbrev` from the registry:
45 +
46 + ```bash
47 + npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1
48 + ```
49 +
50 + On success, output looks like:
51 +
52 + ```bash
53 + diff --git a/package.json b/package.json
54 + index v1.1.0..v1.1.1 100644
55 + --- a/package.json
56 + +++ b/package.json
57 + @@ -1,6 +1,6 @@
58 + {
59 + "name": "abbrev",
60 + - "version": "1.1.0",
61 + + "version": "1.1.1",
62 + "description": "Like ruby's abbrev module, but in js",
63 + "author": "Isaac Z. Schlueter <i@izs.me>",
64 + "main": "abbrev.js",
65 + ```
66 +
67 + Given the flexible nature of npm specs, you can also target local
68 + directories or git repos just like when using `npm install`:
69 +
70 + ```bash
71 + npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path
72 + ```
73 +
74 + In the example above we can compare the contents from the package installed
75 + from the git repo at `github.com/npm/libnpmdiff` with the contents of the
76 + `./local-path` that contains a valid package, such as a modified copy of
77 + the original.
78 +
79 +* `npm diff` (in a package directory, no arguments):
80 +
81 + If the package is published to the registry, `npm diff` will fetch the
82 + tarball version tagged as `latest` (this value can be configured using the
83 + `tag` option) and proceed to compare the contents of files present in that
84 + tarball, with the current files in your local file system.
85 +
86 + This workflow provides a handy way for package authors to see what
87 + package-tracked files have been changed in comparison with the latest
88 + published version of that package.
89 +
90 +* `npm diff --diff=<pkg-name>` (in a package directory):
91 +
92 + When using a single package name (with no version or tag specifier) as an
93 + argument, `npm diff` will work in a similar way to
94 + [`npm-outdated`](npm-outdated) and reach for the registry to figure out
95 + what current published version of the package named `<pkg-name>`
96 + will satisfy its dependent declared semver-range. Once that specific
97 + version is known `npm diff` will print diff patches comparing the
98 + current version of `<pkg-name>` found in the local file system with
99 + that specific version returned by the registry.
100 +
101 + Given a package named `abbrev` that is currently installed:
102 +
103 + ```bash
104 + npm diff --diff=abbrev
105 + ```
106 +
107 + That will request from the registry its most up to date version and
108 + will print a diff output comparing the currently installed version to this
109 + newer one if the version numbers are not the same.
110 +
111 +* `npm diff --diff=<spec-a>` (in a package directory):
112 +
113 + Similar to using only a single package name, it's also possible to declare
114 + a full registry specifier version if you wish to compare the local version
115 + of an installed package with the specific version/tag/semver-range provided
116 + in `<spec-a>`.
117 +
118 + An example: assuming `pkg@1.0.0` is installed in the current `node_modules`
119 + folder, running:
120 +
121 + ```bash
122 + npm diff --diff=pkg@2.0.0
123 + ```
124 +
125 + It will effectively be an alias to
126 + `npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0`.
127 +
128 +* `npm diff --diff=<semver-a> [--diff=<semver-b>]` (in a package directory):
129 +
130 + Using `npm diff` along with semver-valid version numbers is a shorthand
131 + to compare different versions of the current package.
132 +
133 + It needs to be run from a package directory, such that for a package named
134 + `pkg` running `npm diff --diff=1.0.0 --diff=1.0.1` is the same as running
135 + `npm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1`.
136 +
137 + If only a single argument `<version-a>` is provided, then the current local
138 + file system is going to be compared against that version.
139 +
140 + Here's an example comparing two specific versions (published to the
141 + configured registry) of the current project directory:
142 +
143 + ```bash
144 + npm diff --diff=1.0.0 --diff=1.1.0
145 + ```
146 +
147 +Note that tag names are not valid `--diff` argument values, if you wish to
148 +compare to a published tag, you must use the `pkg@tagname` syntax.
149 +
150 +#### Filtering files
151 +
152 +It's possible to also specify positional arguments using file names or globs
153 +pattern matching in order to limit the result of diff patches to only a subset
154 +of files for a given package, e.g:
155 +
156 + ```bash
157 + npm diff --diff=pkg@2 ./lib/ CHANGELOG.md
158 + ```
159 +
160 +In the example above the diff output is only going to print contents of files
161 +located within the folder `./lib/` and changed lines of code within the
162 +`CHANGELOG.md` file.
163 +
164 +### Configuration
165 +
166 +#### diff
167 +
168 +* Type: Array
169 +* Default: null
170 +
171 +Defines npm package specifiers to compare using the `npm diff` command.
172 +
173 +This can be specified up to 2 times.
174 +
175 +#### diff-name-only
176 +
177 +* Type: Boolean
178 +* Default: false
179 +
180 +When set to `true` running `npm diff` only returns the names of the files that
181 +have any difference.
182 +
183 +#### diff-unified
184 +
185 +* Type: Number
186 +* Default: `3`
187 +
188 +The number of lines of context to print in the unified diff format output.
189 +
190 +#### diff-ignore-all-space
191 +
192 +* Type: Boolean
193 +* Default: false
194 +
195 +Ignore whitespace when comparing lines. This ignores differences even if one
196 +line has whitespace where the other line has none.
197 +
198 +#### diff-no-prefix
199 +
200 +* Type: Boolean
201 +* Default: false
202 +
203 +Do not show any source or destination prefix.
204 +
205 +#### diff-src-prefix
206 +
207 +* Type: String
208 +* Default: `"a/"`
209 +
210 +Show the given source prefix in diff patches headers instead of using "a/".
211 +
212 +#### diff-dst-prefix
213 +
214 +* Type: String
215 +* Default: `"b/"`
216 +
217 +Show the given source prefix in diff patches headers instead of using "b/".
218 +
219 +#### diff-text
220 +
221 +* Type: Boolean
222 +* Default: false
223 +
224 +Treat all files as text.
225 +
226 +#### global
227 +
228 +* Default: false
229 +* Type: Boolean
230 +
231 +Uses packages from the global space as a source for comparison.
232 +
233 +#### tag
234 +
235 +* Type: String
236 +* Default: `"latest"`
237 +
238 +The tag used to fetch the tarball that will be compared with the local file
239 +system files when running npm diff with no arguments.
240 +
241 +
242 +## See Also
243 +
244 +* [npm outdated](/cli/v7/commands/npm-outdated)
245 +* [npm install](/cli/v7/commands/npm-install)
246 +* [npm config](/cli/v7/commands/npm-config)
247 +* [npm registry](/cli/v7/using-npm/registry)
content/cli/v7/commands/npm-dist-tag.md new
+108
@@ -0,0 +1,108 @@
1 +---
2 +title: npm-dist-tag
3 +section: 1
4 +description: Modify package distribution tags
5 +redirect_from:
6 + - /cli/dist-tag
7 + - /cli/dist-tag.html
8 + - /cli/commands/dist-tag
9 + - /cli-commands/dist-tag
10 + - /cli-commands/dist-tag.html
11 + - /cli-commands/npm-dist-tag
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-dist-tag.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm dist-tag add <pkg>@<version> [<tag>]
21 +npm dist-tag rm <pkg> <tag>
22 +npm dist-tag ls [<pkg>]
23 +
24 +aliases: dist-tags
25 +```
26 +
27 +### Description
28 +
29 +Add, remove, and enumerate distribution tags on a package:
30 +
31 +* add: Tags the specified version of the package with the specified tag, or
32 + the `--tag` config if not specified. If you have two-factor
33 + authentication on auth-and-writes then you’ll need to include a one-time
34 + password on the command line with `--otp <one-time password>`, or at the
35 + OTP prompt.
36 +
37 +* rm: Clear a tag that is no longer in use from the package. If you have
38 + two-factor authentication on auth-and-writes then you’ll need to include
39 + a one-time password on the command line with `--otp <one-time password>`,
40 + or at the OTP prompt.
41 +
42 +* ls: Show all of the dist-tags for a package, defaulting to the package in
43 + the current prefix. This is the default action if none is specified.
44 +
45 +A tag can be used when installing packages as a reference to a version instead
46 +of using a specific version number:
47 +
48 +```bash
49 +npm install <name>@<tag>
50 +```
51 +
52 +When installing dependencies, a preferred tagged version may be specified:
53 +
54 +```bash
55 +npm install --tag <tag>
56 +```
57 +
58 +(This also applies to any other commands that resolve and install
59 +dependencies, such as `npm dedupe`, `npm update`, and `npm audit fix`.)
60 +
61 +Publishing a package sets the `latest` tag to the published version unless the
62 +`--tag` option is used. For example, `npm publish --tag=beta`.
63 +
64 +By default, `npm install <pkg>` (without any `@<version>` or `@<tag>`
65 +specifier) installs the `latest` tag.
66 +
67 +### Purpose
68 +
69 +Tags can be used to provide an alias instead of version numbers.
70 +
71 +For example, a project might choose to have multiple streams of development
72 +and use a different tag for each stream, e.g., `stable`, `beta`, `dev`,
73 +`canary`.
74 +
75 +By default, the `latest` tag is used by npm to identify the current version
76 +of a package, and `npm install <pkg>` (without any `@<version>` or `@<tag>`
77 +specifier) installs the `latest` tag. Typically, projects only use the
78 +`latest` tag for stable release versions, and use other tags for unstable
79 +versions such as prereleases.
80 +
81 +The `next` tag is used by some projects to identify the upcoming version.
82 +
83 +Other than `latest`, no tag has any special significance to npm itself.
84 +
85 +### Caveats
86 +
87 +This command used to be known as `npm tag`, which only created new tags,
88 +and so had a different syntax.
89 +
90 +Tags must share a namespace with version numbers, because they are
91 +specified in the same slot: `npm install <pkg>@<version>` vs
92 +`npm install <pkg>@<tag>`.
93 +
94 +Tags that can be interpreted as valid semver ranges will be rejected. For
95 +example, `v1.4` cannot be used as a tag, because it is interpreted by
96 +semver as `>=1.4.0 <1.5.0`. See <https://github.com/npm/npm/issues/6082>.
97 +
98 +The simplest way to avoid semver problems with tags is to use tags that do
99 +not begin with a number or the letter `v`.
100 +
101 +### See Also
102 +
103 +* [npm publish](/cli/v7/commands/npm-publish)
104 +* [npm install](/cli/v7/commands/npm-install)
105 +* [npm dedupe](/cli/v7/commands/npm-dedupe)
106 +* [npm registry](/cli/v7/using-npm/registry)
107 +* [npm config](/cli/v7/commands/npm-config)
108 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-docs.md new
+74
@@ -0,0 +1,74 @@
1 +---
2 +title: npm-docs
3 +section: 1
4 +description: Open documentation for a package in a web browser
5 +redirect_from:
6 + - /cli/docs
7 + - /cli/docs.html
8 + - /cli/commands/docs
9 + - /cli-commands/docs
10 + - /cli-commands/docs.html
11 + - /cli-commands/npm-docs
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-docs.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm docs [<pkgname> [<pkgname> ...]]
21 +
22 +aliases: home
23 +```
24 +
25 +### Description
26 +
27 +This command tries to guess at the likely location of a package's
28 +documentation URL, and then tries to open it using the `--browser` config
29 +param. You can pass multiple package names at once. If no package name is
30 +provided, it will search for a `package.json` in the current folder and use
31 +the `name` property.
32 +
33 +### Configuration
34 +
35 +#### browser
36 +
37 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
38 +* Type: String or Boolean
39 +
40 +The browser that is called by the `npm docs` command to open websites.
41 +
42 +Set to `false` to suppress browser behavior and instead print urls to
43 +terminal.
44 +
45 +Set to `true` to use default system URL opener.
46 +
47 +#### registry
48 +
49 +* Default: https://registry.npmjs.org/
50 +* Type: url
51 +
52 +The base URL of the npm package registry.
53 +
54 +#### workspaces
55 +
56 +Enables workspaces context while searching the `package.json` in the
57 +current folder. Documentation urls for the packages named in each
58 +workspace will be opened.
59 +
60 +#### workspace
61 +
62 +Enables workspaces context and limits results to only those specified by
63 +this config item. Only the documentation urls for the packages named in
64 +the workspaces given here will be opened.
65 +
66 +
67 +### See Also
68 +
69 +* [npm view](/cli/v7/commands/npm-view)
70 +* [npm publish](/cli/v7/commands/npm-publish)
71 +* [npm registry](/cli/v7/using-npm/registry)
72 +* [npm config](/cli/v7/commands/npm-config)
73 +* [npmrc](/cli/v7/configuring-npm/npmrc)
74 +* [package.json](/cli/v7/configuring-npm/package-json)
content/cli/v7/commands/npm-doctor.md new
+119
@@ -0,0 +1,119 @@
1 +---
2 +title: npm-doctor
3 +section: 1
4 +description: Check your npm environment
5 +redirect_from:
6 + - /cli/doctor
7 + - /cli/doctor.html
8 + - /cli/commands/doctor
9 + - /cli-commands/doctor
10 + - /cli-commands/doctor.html
11 + - /cli-commands/npm-doctor
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-doctor.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm doctor
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +`npm doctor` runs a set of checks to ensure that your npm installation has
28 +what it needs to manage your JavaScript packages. npm is mostly a
29 +standalone tool, but it does have some basic requirements that must be met:
30 +
31 ++ Node.js and git must be executable by npm.
32 ++ The primary npm registry, `registry.npmjs.com`, or another service that
33 + uses the registry API, is available.
34 ++ The directories that npm uses, `node_modules` (both locally and
35 + globally), exist and can be written by the current user.
36 ++ The npm cache exists, and the package tarballs within it aren't corrupt.
37 +
38 +Without all of these working properly, npm may not work properly. Many
39 +issues are often attributable to things that are outside npm's code base,
40 +so `npm doctor` confirms that the npm installation is in a good state.
41 +
42 +Also, in addition to this, there are also very many issue reports due to
43 +using old versions of npm. Since npm is constantly improving, running
44 +`npm@latest` is better than an old version.
45 +
46 +`npm doctor` verifies the following items in your environment, and if there
47 +are any recommended changes, it will display them.
48 +
49 +#### `npm ping`
50 +
51 +By default, npm installs from the primary npm registry,
52 +`registry.npmjs.org`. `npm doctor` hits a special ping endpoint within the
53 +registry. This can also be checked with `npm ping`. If this check fails,
54 +you may be using a proxy that needs to be configured, or may need to talk
55 +to your IT staff to get access over HTTPS to `registry.npmjs.org`.
56 +
57 +This check is done against whichever registry you've configured (you can
58 +see what that is by running `npm config get registry`), and if you're using
59 +a private registry that doesn't support the `/whoami` endpoint supported by
60 +the primary registry, this check may fail.
61 +
62 +#### `npm -v`
63 +
64 +While Node.js may come bundled with a particular version of npm, it's the
65 +policy of the CLI team that we recommend all users run `npm@latest` if they
66 +can. As the CLI is maintained by a small team of contributors, there are
67 +only resources for a single line of development, so npm's own long-term
68 +support releases typically only receive critical security and regression
69 +fixes. The team believes that the latest tested version of npm is almost
70 +always likely to be the most functional and defect-free version of npm.
71 +
72 +#### `node -v`
73 +
74 +For most users, in most circumstances, the best version of Node will be the
75 +latest long-term support (LTS) release. Those of you who want access to new
76 +ECMAscript features or bleeding-edge changes to Node's standard library may
77 +be running a newer version, and some may be required to run an older
78 +version of Node because of enterprise change control policies. That's OK!
79 +But in general, the npm team recommends that most users run Node.js LTS.
80 +
81 +#### `npm config get registry`
82 +
83 +You may be installing from private package registries for your project or
84 +company. That's great! Others may be following tutorials or StackOverflow
85 +questions in an effort to troubleshoot problems you may be having.
86 +Sometimes, this may entail changing the registry you're pointing at. This
87 +part of `npm doctor` just lets you, and maybe whoever's helping you with
88 +support, know that you're not using the default registry.
89 +
90 +#### `which git`
91 +
92 +While it's documented in the README, it may not be obvious that npm needs
93 +Git installed to do many of the things that it does. Also, in some cases
94 +– especially on Windows – you may have Git set up in such a way that it's
95 +not accessible via your `PATH` so that npm can find it. This check ensures
96 +that Git is available.
97 +
98 +#### Permissions checks
99 +
100 +* Your cache must be readable and writable by the user running npm.
101 +* Global package binaries must be writable by the user running npm.
102 +* Your local `node_modules` path, if you're running `npm doctor` with a
103 + project directory, must be readable and writable by the user running npm.
104 +
105 +#### Validate the checksums of cached packages
106 +
107 +When an npm package is published, the publishing process generates a
108 +checksum that npm uses at install time to verify that the package didn't
109 +get corrupted in transit. `npm doctor` uses these checksums to validate the
110 +package tarballs in your local cache (you can see where that cache is
111 +located with `npm config get cache`). In the event that there are corrupt
112 +packages in your cache, you should probably run `npm cache clean -f` and
113 +reset the cache.
114 +
115 +### See Also
116 +
117 +* [npm bugs](/cli/v7/commands/npm-bugs)
118 +* [npm help](/cli/v7/commands/npm-help)
119 +* [npm ping](/cli/v7/commands/npm-ping)
content/cli/v7/commands/npm-edit.md new
+54
@@ -0,0 +1,54 @@
1 +---
2 +title: npm-edit
3 +section: 1
4 +description: Edit an installed package
5 +redirect_from:
6 + - /cli/edit
7 + - /cli/edit.html
8 + - /cli/commands/edit
9 + - /cli-commands/edit
10 + - /cli-commands/edit.html
11 + - /cli-commands/npm-edit
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-edit.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm edit <pkg>
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +Selects a dependency in the current project and opens the package folder in
28 +the default editor (or whatever you've configured as the npm `editor`
29 +config -- see [`npm-config`](npm-config).)
30 +
31 +After it has been edited, the package is rebuilt so as to pick up any
32 +changes in compiled packages.
33 +
34 +For instance, you can do `npm install connect` to install connect
35 +into your package, and then `npm edit connect` to make a few
36 +changes to your locally installed copy.
37 +
38 +### Configuration
39 +
40 +#### editor
41 +
42 +* Default: `EDITOR` environment variable if set, or `"vi"` on Posix,
43 + or `"notepad"` on Windows.
44 +* Type: path
45 +
46 +The command to run for `npm edit` or `npm config edit`.
47 +
48 +### See Also
49 +
50 +* [npm folders](/cli/v7/configuring-npm/folders)
51 +* [npm explore](/cli/v7/commands/npm-explore)
52 +* [npm install](/cli/v7/commands/npm-install)
53 +* [npm config](/cli/v7/commands/npm-config)
54 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-exec.md new
+303
@@ -0,0 +1,303 @@
1 +---
2 +title: npm-exec
3 +section: 1
4 +description: Run a command from a local or remote npm package
5 +redirect_from:
6 + - /cli/exec
7 + - /cli/exec.html
8 + - /cli/commands/exec
9 + - /cli-commands/exec
10 + - /cli-commands/exec.html
11 + - /cli-commands/npm-exec
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-exec.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm exec -- <pkg>[@<version>] [args...]
21 +npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
22 +npm exec -c '<cmd> [args...]'
23 +npm exec --package=foo -c '<cmd> [args...]'
24 +npm exec [-ws] [-w <workspace-name] [args...]
25 +
26 +npx <pkg>[@<specifier>] [args...]
27 +npx -p <pkg>[@<specifier>] <cmd> [args...]
28 +npx -c '<cmd> [args...]'
29 +npx -p <pkg>[@<specifier>] -c '<cmd> [args...]'
30 +Run without --call or positional args to open interactive subshell
31 +
32 +alias: npm x, npx
33 +
34 +common options:
35 +--package=<pkg> (may be specified multiple times)
36 +-p is a shorthand for --package only when using npx executable
37 +-c <cmd> --call=<cmd> (may not be mixed with positional arguments)
38 +```
39 +
40 +### Description
41 +
42 +This command allows you to run an arbitrary command from an npm package
43 +(either one installed locally, or fetched remotely), in a similar context
44 +as running it via `npm run`.
45 +
46 +Run without positional arguments or `--call`, this allows you to
47 +interactively run commands in the same sort of shell environment that
48 +`package.json` scripts are run. Interactive mode is not supported in CI
49 +environments when standard input is a TTY, to prevent hangs.
50 +
51 +Whatever packages are specified by the `--package` option will be
52 +provided in the `PATH` of the executed command, along with any locally
53 +installed package executables. The `--package` option may be
54 +specified multiple times, to execute the supplied command in an environment
55 +where all specified packages are available.
56 +
57 +If any requested packages are not present in the local project
58 +dependencies, then they are installed to a folder in the npm cache, which
59 +is added to the `PATH` environment variable in the executed process. A
60 +prompt is printed (which can be suppressed by providing either `--yes` or
61 +`--no`).
62 +
63 +Package names provided without a specifier will be matched with whatever
64 +version exists in the local project. Package names with a specifier will
65 +only be considered a match if they have the exact same name and version as
66 +the local dependency.
67 +
68 +If no `-c` or `--call` option is provided, then the positional arguments
69 +are used to generate the command string. If no `--package` options
70 +are provided, then npm will attempt to determine the executable name from
71 +the package specifier provided as the first positional argument according
72 +to the following heuristic:
73 +
74 +- If the package has a single entry in its `bin` field in `package.json`,
75 + or if all entries are aliases of the same command, then that command
76 + will be used.
77 +- If the package has multiple `bin` entries, and one of them matches the
78 + unscoped portion of the `name` field, then that command will be used.
79 +- If this does not result in exactly one option (either because there are
80 + no bin entries, or none of them match the `name` of the package), then
81 + `npm exec` exits with an error.
82 +
83 +To run a binary _other than_ the named binary, specify one or more
84 +`--package` options, which will prevent npm from inferring the package from
85 +the first command argument.
86 +
87 +### `npx` vs `npm exec`
88 +
89 +When run via the `npx` binary, all flags and options *must* be set prior to
90 +any positional arguments. When run via `npm exec`, a double-hyphen `--`
91 +flag can be used to suppress npm's parsing of switches and options that
92 +should be sent to the executed command.
93 +
94 +For example:
95 +
96 +```
97 +$ npx foo@latest bar --package=@npmcli/foo
98 +```
99 +
100 +In this case, npm will resolve the `foo` package name, and run the
101 +following command:
102 +
103 +```
104 +$ foo bar --package=@npmcli/foo
105 +```
106 +
107 +Since the `--package` option comes _after_ the positional arguments, it is
108 +treated as an argument to the executed command.
109 +
110 +In contrast, due to npm's argument parsing logic, running this command is
111 +different:
112 +
113 +```
114 +$ npm exec foo@latest bar --package=@npmcli/foo
115 +```
116 +
117 +In this case, npm will parse the `--package` option first, resolving the
118 +`@npmcli/foo` package. Then, it will execute the following command in that
119 +context:
120 +
121 +```
122 +$ foo@latest bar
123 +```
124 +
125 +The double-hyphen character is recommended to explicitly tell npm to stop
126 +parsing command line options and switches. The following command would
127 +thus be equivalent to the `npx` command above:
128 +
129 +```
130 +$ npm exec -- foo@latest bar --package=@npmcli/foo
131 +```
132 +
133 +### Examples
134 +
135 +Run the version of `tap` in the local dependencies, with the provided
136 +arguments:
137 +
138 +```
139 +$ npm exec -- tap --bail test/foo.js
140 +$ npx tap --bail test/foo.js
141 +```
142 +
143 +Run a command _other than_ the command whose name matches the package name
144 +by specifying a `--package` option:
145 +
146 +```
147 +$ npm exec --package=foo -- bar --bar-argument
148 +# ~ or ~
149 +$ npx --package=foo bar --bar-argument
150 +```
151 +
152 +Run an arbitrary shell script, in the context of the current project:
153 +
154 +```
155 +$ npm x -c 'eslint && say "hooray, lint passed"'
156 +$ npx -c 'eslint && say "hooray, lint passed"'
157 +```
158 +
159 +### Workspaces support
160 +
161 +You may use the `workspace` or `workspaces` configs in order to run an
162 +arbitrary command from an npm package (either one installed locally, or fetched
163 +remotely) in the context of the specified workspaces.
164 +If no positional argument or `--call` option is provided, it will open an
165 +interactive subshell in the context of each of these configured workspaces one
166 +at a time.
167 +
168 +Given a project with configured workspaces, e.g:
169 +
170 +```
171 +.
172 ++-- package.json
173 +`-- packages
174 + +-- a
175 + | `-- package.json
176 + +-- b
177 + | `-- package.json
178 + `-- c
179 + `-- package.json
180 +```
181 +
182 +Assuming the workspace configuration is properly set up at the root level
183 +`package.json` file. e.g:
184 +
185 +```
186 +{
187 + "workspaces": [ "./packages/*" ]
188 +}
189 +```
190 +
191 +You can execute an arbitrary command from a package in the context of each of
192 +the configured workspaces when using the `workspaces` configuration options,
193 +in this example we're using **eslint** to lint any js file found within each
194 +workspace folder:
195 +
196 +```
197 +npm exec -ws -- eslint ./*.js
198 +```
199 +
200 +#### Filtering workspaces
201 +
202 +It's also possible to execute a command in a single workspace using the
203 +`workspace` config along with a name or directory path:
204 +
205 +```
206 +npm exec --workspace=a -- eslint ./*.js
207 +```
208 +
209 +The `workspace` config can also be specified multiple times in order to run a
210 +specific script in the context of multiple workspaces. When defining values for
211 +the `workspace` config in the command line, it also possible to use `-w` as a
212 +shorthand, e.g:
213 +
214 +```
215 +npm exec -w a -w b -- eslint ./*.js
216 +```
217 +
218 +This last command will run the `eslint` command in both `./packages/a` and
219 +`./packages/b` folders.
220 +
221 +### Compatibility with Older npx Versions
222 +
223 +The `npx` binary was rewritten in npm v7.0.0, and the standalone `npx`
224 +package deprecated at that time. `npx` uses the `npm exec`
225 +command instead of a separate argument parser and install process, with
226 +some affordances to maintain backwards compatibility with the arguments it
227 +accepted in previous versions.
228 +
229 +This resulted in some shifts in its functionality:
230 +
231 +- Any `npm` config value may be provided.
232 +- To prevent security and user-experience problems from mistyping package
233 + names, `npx` prompts before installing anything. Suppress this
234 + prompt with the `-y` or `--yes` option.
235 +- The `--no-install` option is deprecated, and will be converted to `--no`.
236 +- Shell fallback functionality is removed, as it is not advisable.
237 +- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand
238 + for `--package` in npx. This is maintained, but only for the `npx`
239 + executable.
240 +- The `--ignore-existing` option is removed. Locally installed bins are
241 + always present in the executed process `PATH`.
242 +- The `--npm` option is removed. `npx` will always use the `npm` it ships
243 + with.
244 +- The `--node-arg` and `-n` options are removed.
245 +- The `--always-spawn` option is redundant, and thus removed.
246 +- The `--shell` option is replaced with `--script-shell`, but maintained
247 + in the `npx` executable for backwards compatibility.
248 +
249 +### A note on caching
250 +
251 +The npm cli utilizes its internal package cache when using the package
252 +name specified. You can use the following to change how and when the
253 +cli uses this cache. See [`npm cache`](/cli/v7/commands/npm-cache) for more on
254 +how the cache works.
255 +
256 +#### prefer-online
257 +
258 +Forces staleness checks for packages, making the cli look for updates
259 +immediately even if the package is already in the cache.
260 +
261 +#### prefer-offline
262 +
263 +Bypasses staleness checks for packages. Missing data will still be
264 +requested from the server. To force full offline mode, use `offline`.
265 +
266 +#### offline
267 +
268 +Forces full offline mode. Any packages not locally cached will result in
269 +an error.
270 +
271 +#### workspace
272 +
273 +* Alias: `-w`
274 +* Type: Array
275 +* Default: `[]`
276 +
277 +Enable running scripts in the context of workspaces while also filtering by
278 +the provided names or paths provided.
279 +
280 +Valid values for the `workspace` config are either:
281 +- Workspace names
282 +- Path to a workspace directory
283 +- Path to a parent workspace directory (will result to selecting all of the
284 +children workspaces)
285 +
286 +#### workspaces
287 +
288 +* Alias: `-ws`
289 +* Type: Boolean
290 +* Default: `false`
291 +
292 +Run scripts in the context of all configured workspaces for the current
293 +project.
294 +
295 +### See Also
296 +
297 +* [npm run-script](/cli/v7/commands/npm-run-script)
298 +* [npm scripts](/cli/v7/using-npm/scripts)
299 +* [npm test](/cli/v7/commands/npm-test)
300 +* [npm start](/cli/v7/commands/npm-start)
301 +* [npm restart](/cli/v7/commands/npm-restart)
302 +* [npm stop](/cli/v7/commands/npm-stop)
303 +* [npm config](/cli/v7/commands/npm-config)
content/cli/v7/commands/npm-explain.md new
+85
@@ -0,0 +1,85 @@
1 +---
2 +title: npm-explain
3 +section: 1
4 +description: Explain installed packages
5 +redirect_from:
6 + - /cli/explain
7 + - /cli/explain.html
8 + - /cli/commands/explain
9 + - /cli-commands/explain
10 + - /cli-commands/explain.html
11 + - /cli-commands/npm-explain
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-explain.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm explain <folder | specifier>
21 +
22 +alias: why
23 +```
24 +
25 +### Description
26 +
27 +This command will print the chain of dependencies causing a given package
28 +to be installed in the current project.
29 +
30 +Positional arguments can be either folders within `node_modules`, or
31 +`name@version-range` specifiers, which will select the dependency
32 +relationships to explain.
33 +
34 +For example, running `npm explain glob` within npm's source tree will show:
35 +
36 +```bash
37 +glob@7.1.6
38 +node_modules/glob
39 + glob@"^7.1.4" from the root project
40 +
41 +glob@7.1.1 dev
42 +node_modules/tacks/node_modules/glob
43 + glob@"^7.0.5" from rimraf@2.6.2
44 + node_modules/tacks/node_modules/rimraf
45 + rimraf@"^2.6.2" from tacks@1.3.0
46 + node_modules/tacks
47 + dev tacks@"^1.3.0" from the root project
48 +```
49 +
50 +To explain just the package residing at a specific folder, pass that as the
51 +argument to the command. This can be useful when trying to figure out
52 +exactly why a given dependency is being duplicated to satisfy conflicting
53 +version requirements within the project.
54 +
55 +```bash
56 +$ npm explain node_modules/nyc/node_modules/find-up
57 +find-up@3.0.0 dev
58 +node_modules/nyc/node_modules/find-up
59 + find-up@"^3.0.0" from nyc@14.1.1
60 + node_modules/nyc
61 + nyc@"^14.1.1" from tap@14.10.8
62 + node_modules/tap
63 + dev tap@"^14.10.8" from the root project
64 +```
65 +
66 +### Configuration
67 +
68 +#### json
69 +
70 +* Default: false
71 +* Type: Boolean
72 +
73 +Show information in JSON format.
74 +
75 +### See Also
76 +
77 +* [npm config](/cli/v7/commands/npm-config)
78 +* [npmrc](/cli/v7/configuring-npm/npmrc)
79 +* [npm folders](/cli/v7/configuring-npm/folders)
80 +* [npm ls](/cli/v7/commands/npm-ls)
81 +* [npm install](/cli/v7/commands/npm-install)
82 +* [npm link](/cli/v7/commands/npm-link)
83 +* [npm prune](/cli/v7/commands/npm-prune)
84 +* [npm outdated](/cli/v7/commands/npm-outdated)
85 +* [npm update](/cli/v7/commands/npm-update)
content/cli/v7/commands/npm-explore.md new
+58
@@ -0,0 +1,58 @@
1 +---
2 +title: npm-explore
3 +section: 1
4 +description: Browse an installed package
5 +redirect_from:
6 + - /cli/explore
7 + - /cli/explore.html
8 + - /cli/commands/explore
9 + - /cli-commands/explore
10 + - /cli-commands/explore.html
11 + - /cli-commands/npm-explore
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-explore.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm explore <pkg> [ -- <command>]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +Spawn a subshell in the directory of the installed package specified.
28 +
29 +If a command is specified, then it is run in the subshell, which then
30 +immediately terminates.
31 +
32 +This is particularly handy in the case of git submodules in the
33 +`node_modules` folder:
34 +
35 +```bash
36 +npm explore some-dependency -- git pull origin master
37 +```
38 +
39 +Note that the package is *not* automatically rebuilt afterwards, so be
40 +sure to use `npm rebuild <pkg>` if you make any changes.
41 +
42 +### Configuration
43 +
44 +#### shell
45 +
46 +* Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
47 + Windows
48 +* Type: path
49 +
50 +The shell to run for the `npm explore` command.
51 +
52 +### See Also
53 +
54 +* [npm folders](/cli/v7/configuring-npm/folders)
55 +* [npm edit](/cli/v7/commands/npm-edit)
56 +* [npm rebuild](/cli/v7/commands/npm-rebuild)
57 +* [npm build](/cli/v7/commands/npm-build)
58 +* [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-find-dupes.md new
+34
@@ -0,0 +1,34 @@
1 +---
2 +title: npm-find-dupes
3 +section: 1
4 +description: Find duplication in the package tree
5 +redirect_from:
6 + - /cli/find-dupes
7 + - /cli/find-dupes.html
8 + - /cli/commands/find-dupes
9 + - /cli-commands/find-dupes
10 + - /cli-commands/find-dupes.html
11 + - /cli-commands/npm-find-dupes
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-find-dupes.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm find-dupes
21 +```
22 +
23 +### Description
24 +
25 +Runs `npm dedupe` in `--dry-run` mode, making npm only output the
26 +duplications, without actually changing the package tree.
27 +
28 +### See Also
29 +
30 +* [npm dedupe](/cli-commands/dedupe)
31 +* [npm ls](/cli-commands/ls)
32 +* [npm update](/cli-commands/update)
33 +* [npm install](/cli-commands/install)
34 +
content/cli/v7/commands/npm-fund.md new
+73
@@ -0,0 +1,73 @@
1 +---
2 +title: npm-fund
3 +section: 1
4 +description: Retrieve funding information
5 +redirect_from:
6 + - /cli/fund
7 + - /cli/fund.html
8 + - /cli/commands/fund
9 + - /cli-commands/fund
10 + - /cli-commands/fund.html
11 + - /cli-commands/npm-fund
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-fund.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm fund [<pkg>]
21 +```
22 +
23 +### Description
24 +
25 +This command retrieves information on how to fund the dependencies of a
26 +given project. If no package name is provided, it will list all
27 +dependencies that are looking for funding in a tree structure, listing the
28 +type of funding and the url to visit. If a package name is provided then it
29 +tries to open its funding url using the `--browser` config param; if there
30 +are multiple funding sources for the package, the user will be instructed
31 +to pass the `--which` option to disambiguate.
32 +
33 +The list will avoid duplicated entries and will stack all packages that
34 +share the same url as a single entry. Thus, the list does not have the same
35 +shape of the output from `npm ls`.
36 +
37 +### Configuration
38 +
39 +#### browser
40 +
41 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
42 +* Type: String
43 +
44 +The browser that is called by the `npm fund` command to open websites.
45 +
46 +#### json
47 +
48 +* Type: Boolean
49 +* Default: false
50 +
51 +Show information in JSON format.
52 +
53 +#### unicode
54 +
55 +* Type: Boolean
56 +* Default: true
57 +
58 +Whether to represent the tree structure using unicode characters.
59 +Set it to `false` in order to use all-ansi output.
60 +
61 +#### which
62 +
63 +* Type: Number
64 +* Default: undefined
65 +
66 +If there are multiple funding sources, which 1-indexed source URL to open.
67 +
68 +## See Also
69 +
70 +* [npm install](/cli/v7/commands/npm-install)
71 +* [npm docs](/cli/v7/commands/npm-docs)
72 +* [npm ls](/cli/v7/commands/npm-ls)
73 +* [npm config](/cli/v7/commands/npm-config)
content/cli/v7/commands/npm-help-search.md new
+51
@@ -0,0 +1,51 @@
1 +---
2 +title: npm-help-search
3 +section: 1
4 +description: Search npm help documentation
5 +redirect_from:
6 + - /cli/help-search
7 + - /cli/help-search.html
8 + - /cli/commands/help-search
9 + - /cli-commands/help-search
10 + - /cli-commands/help-search.html
11 + - /cli-commands/npm-help-search
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-help-search.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm help-search <text>
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +This command will search the npm markdown documentation files for the terms
28 +provided, and then list the results, sorted by relevance.
29 +
30 +If only one result is found, then it will show that help topic.
31 +
32 +If the argument to `npm help` is not a known help topic, then it will call
33 +`help-search`. It is rarely if ever necessary to call this command
34 +directly.
35 +
36 +### Configuration
37 +
38 +#### long
39 +
40 +* Type: Boolean
41 +* Default: false
42 +
43 +If true, the "long" flag will cause help-search to output context around
44 +where the terms were found in the documentation.
45 +
46 +If false, then help-search will just list out the help topics found.
47 +
48 +### See Also
49 +
50 +* [npm](/cli/v7/commands/npm)
51 +* [npm help](/cli/v7/commands/npm-help)
content/cli/v7/commands/npm-help.md new
+52
@@ -0,0 +1,52 @@
1 +---
2 +title: npm-help
3 +section: 1
4 +description: Get help on npm
5 +redirect_from:
6 + - /cli/help
7 + - /cli/help.html
8 + - /cli/commands/help
9 + - /cli-commands/help
10 + - /cli-commands/help.html
11 + - /cli-commands/npm-help
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-help.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm help <term> [<terms..>]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +If supplied a topic, then show the appropriate documentation page.
28 +
29 +If the topic does not exist, or if multiple terms are provided, then npm
30 +will run the `help-search` command to find a match. Note that, if
31 +`help-search` finds a single subject, then it will run `help` on that
32 +topic, so unique matches are equivalent to specifying a topic name.
33 +
34 +### Configuration
35 +
36 +#### viewer
37 +
38 +* Default: "man" on Posix, "browser" on Windows
39 +* Type: path
40 +
41 +The program to use to view help content.
42 +
43 +Set to `"browser"` to view html help content in the default web browser.
44 +
45 +### See Also
46 +
47 +* [npm](/cli/v7/commands/npm)
48 +* [npm folders](/cli/v7/configuring-npm/folders)
49 +* [npm config](/cli/v7/commands/npm-config)
50 +* [npmrc](/cli/v7/configuring-npm/npmrc)
51 +* [package.json](/cli/v7/configuring-npm/package-json)
52 +* [npm help-search](/cli/v7/commands/npm-help-search)
content/cli/v7/commands/npm-hook.md new
+98
@@ -0,0 +1,98 @@
1 +---
2 +title: npm-hook
3 +section: 1
4 +description: Manage registry hooks
5 +redirect_from:
6 + - /cli/hook
7 + - /cli/hook.html
8 + - /cli/commands/hook
9 + - /cli-commands/hook
10 + - /cli-commands/hook.html
11 + - /cli-commands/npm-hook
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-hook.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm hook ls [pkg]
21 +npm hook add <entity> <url> <secret>
22 +npm hook update <id> <url> [secret]
23 +npm hook rm <id>
24 +```
25 +
26 +Note: This command is unaware of workspaces.
27 +
28 +### Description
29 +
30 +Allows you to manage [npm
31 +hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm),
32 +including adding, removing, listing, and updating.
33 +
34 +Hooks allow you to configure URL endpoints that will be notified whenever a
35 +change happens to any of the supported entity types. Three different types
36 +of entities can be watched by hooks: packages, owners, and scopes.
37 +
38 +To create a package hook, simply reference the package name.
39 +
40 +To create an owner hook, prefix the owner name with `~` (as in,
41 +`~youruser`).
42 +
43 +To create a scope hook, prefix the scope name with `@` (as in,
44 +`@yourscope`).
45 +
46 +The hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls`
47 +for that particular hook.
48 +
49 +The shared secret will be sent along to the URL endpoint so you can verify
50 +the request came from your own configured hook.
51 +
52 +### Example
53 +
54 +Add a hook to watch a package for changes:
55 +
56 +```bash
57 +$ npm hook add lodash https://example.com/ my-shared-secret
58 +```
59 +
60 +Add a hook to watch packages belonging to the user `substack`:
61 +
62 +```bash
63 +$ npm hook add ~substack https://example.com/ my-shared-secret
64 +```
65 +
66 +Add a hook to watch packages in the scope `@npm`
67 +
68 +```bash
69 +$ npm hook add @npm https://example.com/ my-shared-secret
70 +```
71 +
72 +List all your active hooks:
73 +
74 +```bash
75 +$ npm hook ls
76 +```
77 +
78 +List your active hooks for the `lodash` package:
79 +
80 +```bash
81 +$ npm hook ls lodash
82 +```
83 +
84 +Update an existing hook's url:
85 +
86 +```bash
87 +$ npm hook update id-deadbeef https://my-new-website.here/
88 +```
89 +
90 +Remove a hook:
91 +
92 +```bash
93 +$ npm hook rm id-deadbeef
94 +```
95 +
96 +### See Also
97 +
98 +* ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)
content/cli/v7/commands/npm-init.md new
+112
@@ -0,0 +1,112 @@
1 +---
2 +title: npm-init
3 +section: 1
4 +description: Create a package.json file
5 +redirect_from:
6 + - /cli/init
7 + - /cli/init.html
8 + - /cli/commands/init
9 + - /cli-commands/init
10 + - /cli-commands/init.html
11 + - /cli-commands/npm-init
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-init.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm init [--force|-f|--yes|-y|--scope]
21 +npm init <@scope> (same as `npx <@scope>/create`)
22 +npm init [<@scope>/]<name> (same as `npx [<@scope>/]create-<name>`)
23 +```
24 +
25 +### Description
26 +
27 +`npm init <initializer>` can be used to set up a new or existing npm
28 +package.
29 +
30 +`initializer` in this case is an npm package named `create-<initializer>`,
31 +which will be installed by [`npx`](https://npm.im/npx), and then have its
32 +main bin executed -- presumably creating or updating `package.json` and
33 +running any other initialization-related operations.
34 +
35 +The init command is transformed to a corresponding `npx` operation as
36 +follows:
37 +
38 +* `npm init foo` -> `npx create-foo`
39 +* `npm init @usr/foo` -> `npx @usr/create-foo`
40 +* `npm init @usr` -> `npx @usr/create`
41 +
42 +Any additional options will be passed directly to the command, so `npm init
43 +foo -- --hello` will map to `npx create-foo --hello`.
44 +
45 +If the initializer is omitted (by just calling `npm init`), init will fall
46 +back to legacy init behavior. It will ask you a bunch of questions, and
47 +then write a package.json for you. It will attempt to make reasonable
48 +guesses based on existing fields, dependencies, and options selected. It is
49 +strictly additive, so it will keep any fields and values that were already
50 +set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If
51 +you pass `--scope`, it will create a scoped package.
52 +
53 +### Examples
54 +
55 +Create a new React-based project using
56 +[`create-react-app`](https://npm.im/create-react-app):
57 +
58 +```bash
59 +$ npm init react-app ./my-react-app
60 +```
61 +
62 +Create a new `esm`-compatible package using
63 +[`create-esm`](https://npm.im/create-esm):
64 +
65 +```bash
66 +$ mkdir my-esm-lib && cd my-esm-lib
67 +$ npm init esm --yes
68 +```
69 +
70 +Generate a plain old package.json using legacy init:
71 +
72 +```bash
73 +$ mkdir my-npm-pkg && cd my-npm-pkg
74 +$ git init
75 +$ npm init
76 +```
77 +
78 +Generate it without having it ask any questions:
79 +
80 +```bash
81 +$ npm init -y
82 +```
83 +
84 +### A note on caching
85 +
86 +The npm cli utilizes its internal package cache when using the package
87 +name specified. You can use the following to change how and when the
88 +cli uses this cache. See [`npm cache`](/cli/v7/commands/npm-cache) for more on
89 +how the cache works.
90 +
91 +#### prefer-online
92 +
93 +Forces staleness checks for packages, making the cli look for updates
94 +immediately even if the package is already in the cache.
95 +
96 +#### prefer-offline
97 +
98 +Bypasses staleness checks for packages. Missing data will still be
99 +requested from the server. To force full offline mode, use `offline`.
100 +
101 +#### offline
102 +
103 +Forces full offline mode. Any packages not locally cached will result in
104 +an error.
105 +
106 +### See Also
107 +
108 +* [init-package-json module](http://npm.im/init-package-json)
109 +* [package.json](/cli/v7/configuring-npm/package-json)
110 +* [npm version](/cli/v7/commands/npm-version)
111 +* [npm scope](/cli/v7/using-npm/scope)
112 +* [npm exec](/cli/v7/commands/npm-exec)
content/cli/v7/commands/npm-install-ci-test.md new
+33
@@ -0,0 +1,33 @@
1 +---
2 +title: npm-install-ci-test
3 +section: 1
4 +description: Install a project with a clean slate and run tests
5 +redirect_from:
6 + - /cli/install-ci-test
7 + - /cli/install-ci-test.html
8 + - /cli/commands/install-ci-test
9 + - /cli-commands/install-ci-test
10 + - /cli-commands/install-ci-test.html
11 + - /cli-commands/npm-install-ci-test
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-install-ci-test.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm install-ci-test
21 +
22 +alias: npm cit
23 +```
24 +
25 +### Description
26 +
27 +This command runs `npm ci` followed immediately by `npm test`.
28 +
29 +### See Also
30 +
31 +* [npm install-test](/cli/v7/commands/npm-install-test)
32 +* [npm ci](/cli/v7/commands/npm-ci)
33 +* [npm test](/cli/v7/commands/npm-test)
content/cli/v7/commands/npm-install-test.md new
+42
@@ -0,0 +1,42 @@
1 +---
2 +title: npm-install-test
3 +section: 1
4 +description: Install package(s) and run tests
5 +redirect_from:
6 + - /cli/install-test
7 + - /cli/install-test.html
8 + - /cli/commands/install-test
9 + - /cli-commands/install-test
10 + - /cli-commands/install-test.html
11 + - /cli-commands/npm-install-test
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-install-test.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm install-test (with no args, in package dir)
21 +npm install-test [<@scope>/]<name>
22 +npm install-test [<@scope>/]<name>@<tag>
23 +npm install-test [<@scope>/]<name>@<version>
24 +npm install-test [<@scope>/]<name>@<version range>
25 +npm install-test <tarball file>
26 +npm install-test <tarball url>
27 +npm install-test <folder>
28 +
29 +alias: npm it
30 +common options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]
31 +```
32 +
33 +### Description
34 +
35 +This command runs an `npm install` followed immediately by an `npm test`. It
36 +takes exactly the same arguments as `npm install`.
37 +
38 +### See Also
39 +
40 +* [npm install](/cli/v7/commands/npm-install)
41 +* [npm install-ci-test](/cli/v7/commands/npm-install-ci-test)
42 +* [npm test](/cli/v7/commands/npm-test)
content/cli/v7/commands/npm-install.md new
+560
@@ -0,0 +1,560 @@
1 +---
2 +title: npm-install
3 +section: 1
4 +description: Install a package
5 +redirect_from:
6 + - /cli/install
7 + - /cli/install.html
8 + - /cli/commands/install
9 + - /cli-commands/install
10 + - /cli-commands/install.html
11 + - /cli-commands/npm-install
12 + - /cli-documentation/install
13 +github_repo: npm/cli
14 +github_branch: latest
15 +github_path: docs/content/commands/npm-install.md
16 +---
17 +
18 +### Synopsis
19 +
20 +```bash
21 +npm install (with no args, in package dir)
22 +npm install [<@scope>/]<name>
23 +npm install [<@scope>/]<name>@<tag>
24 +npm install [<@scope>/]<name>@<version>
25 +npm install [<@scope>/]<name>@<version range>
26 +npm install <alias>@npm:<name>
27 +npm install <git-host>:<git-user>/<repo-name>
28 +npm install <git repo url>
29 +npm install <tarball file>
30 +npm install <tarball url>
31 +npm install <folder>
32 +
33 +aliases: npm i, npm add
34 +common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
35 +```
36 +
37 +### Description
38 +
39 +This command installs a package and any packages that it depends on. If the
40 +package has a package-lock, or an npm shrinkwrap file, or a yarn lock file,
41 +the installation of dependencies will be driven by that, respecting the
42 +following order of precedence:
43 +
44 +* `npm-shrinkwrap.json`
45 +* `package-lock.json`
46 +* `yarn.lock`
47 +
48 +See [package-lock.json](/cli/v7/configuring-npm/package-lock-json) and
49 +[`npm shrinkwrap`](/cli/v7/commands/npm-shrinkwrap).
50 +
51 +A `package` is:
52 +
53 +* a) a folder containing a program described by a
54 + [`package.json`](/cli/v7/configuring-npm/package-json) file
55 +* b) a gzipped tarball containing (a)
56 +* c) a url that resolves to (b)
57 +* d) a `<name>@<version>` that is published on the registry (see
58 + [`registry`](/cli/v7/using-npm/registry)) with (c)
59 +* e) a `<name>@<tag>` (see [`npm dist-tag`](/cli/v7/commands/npm-dist-tag)) that
60 + points to (d)
61 +* f) a `<name>` that has a "latest" tag satisfying (e)
62 +* g) a `<git remote url>` that resolves to (a)
63 +
64 +Even if you never publish your package, you can still get a lot of benefits
65 +of using npm if you just want to write a node program (a), and perhaps if
66 +you also want to be able to easily install it elsewhere after packing it up
67 +into a tarball (b).
68 +
69 +
70 +* `npm install` (in a package directory, no arguments):
71 +
72 + Install the dependencies in the local `node_modules` folder.
73 +
74 + In global mode (ie, with `-g` or `--global` appended to the command),
75 + it installs the current package context (ie, the current working
76 + directory) as a global package.
77 +
78 + By default, `npm install` will install all modules listed as
79 + dependencies in [`package.json`](/cli/v7/configuring-npm/package-json).
80 +
81 + With the `--production` flag (or when the `NODE_ENV` environment
82 + variable is set to `production`), npm will not install modules listed
83 + in `devDependencies`. To install all modules listed in both
84 + `dependencies` and `devDependencies` when `NODE_ENV` environment
85 + variable is set to `production`, you can use `--production=false`.
86 +
87 + > NOTE: The `--production` flag has no particular meaning when adding a
88 + dependency to a project.
89 +
90 +* `npm install <folder>`:
91 +
92 + Install the package in the directory as a symlink in the current
93 + project. Its dependencies will be installed before it's linked. If
94 + `<folder>` sits inside the root of your project, its dependencies may
95 + be hoisted to the top-level `node_modules` as they would for other
96 + types of dependencies.
97 +
98 +* `npm install <tarball file>`:
99 +
100 + Install a package that is sitting on the filesystem. Note: if you just
101 + want to link a dev directory into your npm root, you can do this more
102 + easily by using [`npm link`](/cli/v7/commands/npm-link).
103 +
104 + Tarball requirements:
105 + * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as the
106 + extension.
107 + * The package contents should reside in a subfolder inside the tarball
108 + (usually it is called `package/`). npm strips one directory layer
109 + when installing the package (an equivalent of `tar x
110 + --strip-components=1` is run).
111 + * The package must contain a `package.json` file with `name` and
112 + `version` properties.
113 +
114 + Example:
115 +
116 + ```bash
117 + npm install ./package.tgz
118 + ```
119 +
120 +* `npm install <tarball url>`:
121 +
122 + Fetch the tarball url, and then install it. In order to distinguish between
123 + this and other options, the argument must start with "http://" or "https://"
124 +
125 + Example:
126 +
127 + ```bash
128 + npm install https://github.com/indexzero/forever/tarball/v0.5.6
129 + ```
130 +
131 +* `npm install [<@scope>/]<name>`:
132 +
133 + Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
134 + [`config`](/cli/v7/using-npm/config). The config's default value is `latest`.)
135 +
136 + In most cases, this will install the version of the modules tagged as
137 + `latest` on the npm registry.
138 +
139 + Example:
140 +
141 + ```bash
142 + npm install sax
143 + ```
144 +
145 + `npm install` saves any specified packages into `dependencies` by default.
146 + Additionally, you can control where and how they get saved with some
147 + additional flags:
148 +
149 + * `-P, --save-prod`: Package will appear in your `dependencies`. This
150 + is the default unless `-D` or `-O` are present.
151 +
152 + * `-D, --save-dev`: Package will appear in your `devDependencies`.
153 +
154 + * `-O, --save-optional`: Package will appear in your
155 + `optionalDependencies`.
156 +
157 + * `--no-save`: Prevents saving to `dependencies`.
158 +
159 + When using any of the above options to save dependencies to your
160 + package.json, there are two additional, optional flags:
161 +
162 + * `-E, --save-exact`: Saved dependencies will be configured with an
163 + exact version rather than using npm's default semver range operator.
164 +
165 + * `-B, --save-bundle`: Saved dependencies will also be added to your
166 + `bundleDependencies` list.
167 +
168 + Further, if you have an `npm-shrinkwrap.json` or `package-lock.json`
169 + then it will be updated as well.
170 +
171 + `<scope>` is optional. The package will be downloaded from the registry
172 + associated with the specified scope. If no registry is associated with
173 + the given scope the default registry is assumed. See
174 + [`scope`](/cli/v7/using-npm/scope).
175 +
176 + Note: if you do not include the @-symbol on your scope name, npm will
177 + interpret this as a GitHub repository instead, see below. Scopes names
178 + must also be followed by a slash.
179 +
180 + Examples:
181 +
182 + ```bash
183 + npm install sax
184 + npm install githubname/reponame
185 + npm install @myorg/privatepackage
186 + npm install node-tap --save-dev
187 + npm install dtrace-provider --save-optional
188 + npm install readable-stream --save-exact
189 + npm install ansi-regex --save-bundle
190 + ```
191 +
192 + **Note**: If there is a file or folder named `<name>` in the current
193 + working directory, then it will try to install that, and only try to
194 + fetch the package by name if it is not valid.
195 +
196 +* `npm install <alias>@npm:<name>`:
197 +
198 + Install a package under a custom alias. Allows multiple versions of
199 + a same-name package side-by-side, more convenient import names for
200 + packages with otherwise long ones, and using git forks replacements
201 + or forked npm packages as replacements. Aliasing works only on your
202 + project and does not rename packages in transitive dependencies.
203 + Aliases should follow the naming conventions stated in
204 + [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules).
205 +
206 + Examples:
207 +
208 + ```bash
209 + npm install my-react@npm:react
210 + npm install jquery2@npm:jquery@2
211 + npm install jquery3@npm:jquery@3
212 + npm install npa@npm:npm-package-arg
213 + ```
214 +
215 +* `npm install [<@scope>/]<name>@<tag>`:
216 +
217 + Install the version of the package that is referenced by the specified tag.
218 + If the tag does not exist in the registry data for that package, then this
219 + will fail.
220 +
221 + Example:
222 +
223 + ```bash
224 + npm install sax@latest
225 + npm install @myorg/mypackage@latest
226 + ```
227 +
228 +* `npm install [<@scope>/]<name>@<version>`:
229 +
230 + Install the specified version of the package. This will fail if the
231 + version has not been published to the registry.
232 +
233 + Example:
234 +
235 + ```bash
236 + npm install sax@0.1.1
237 + npm install @myorg/privatepackage@1.5.0
238 + ```
239 +
240 +* `npm install [<@scope>/]<name>@<version range>`:
241 +
242 + Install a version of the package matching the specified version range.
243 + This will follow the same rules for resolving dependencies described in
244 + [`package.json`](/cli/v7/configuring-npm/package-json).
245 +
246 + Note that most version ranges must be put in quotes so that your shell
247 + will treat it as a single argument.
248 +
249 + Example:
250 +
251 + ```bash
252 + npm install sax@">=0.1.0 <0.2.0"
253 + npm install @myorg/privatepackage@"16 - 17"
254 + ```
255 +
256 +* `npm install <git remote url>`:
257 +
258 + Installs the package from the hosted git provider, cloning it with
259 + `git`. For a full git remote url, only that URL will be attempted.
260 +
261 + ```bash
262 + <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
263 + ```
264 +
265 + `<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or
266 + `git+file`.
267 +
268 + If `#<commit-ish>` is provided, it will be used to clone exactly that
269 + commit. If the commit-ish has the format `#semver:<semver>`, `<semver>`
270 + can be any valid semver range or exact version, and npm will look for
271 + any tags or refs matching that range in the remote repository, much as
272 + it would for a registry dependency. If neither `#<commit-ish>` or
273 + `#semver:<semver>` is specified, then the default branch of the
274 + repository is used.
275 +
276 + If the repository makes use of submodules, those submodules will be
277 + cloned as well.
278 +
279 + If the package being installed contains a `prepare` script, its
280 + `dependencies` and `devDependencies` will be installed, and the prepare
281 + script will be run, before the package is packaged and installed.
282 +
283 + The following git environment variables are recognized by npm and will
284 + be added to the environment when running git:
285 +
286 + * `GIT_ASKPASS`
287 + * `GIT_EXEC_PATH`
288 + * `GIT_PROXY_COMMAND`
289 + * `GIT_SSH`
290 + * `GIT_SSH_COMMAND`
291 + * `GIT_SSL_CAINFO`
292 + * `GIT_SSL_NO_VERIFY`
293 +
294 + See the git man page for details.
295 +
296 + Examples:
297 +
298 + ```bash
299 + npm install git+ssh://git@github.com:npm/cli.git#v1.0.27
300 + npm install git+ssh://git@github.com:npm/cli#pull/273
301 + npm install git+ssh://git@github.com:npm/cli#semver:^5.0
302 + npm install git+https://isaacs@github.com/npm/cli.git
303 + npm install git://github.com/npm/cli.git#v1.0.27
304 + GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git
305 + ```
306 +
307 +* `npm install <githubname>/<githubrepo>[#<commit-ish>]`:
308 +* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`:
309 +
310 + Install the package at `https://github.com/githubname/githubrepo` by
311 + attempting to clone it using `git`.
312 +
313 + If `#<commit-ish>` is provided, it will be used to clone exactly that
314 + commit. If the commit-ish has the format `#semver:<semver>`, `<semver>`
315 + can be any valid semver range or exact version, and npm will look for
316 + any tags or refs matching that range in the remote repository, much as
317 + it would for a registry dependency. If neither `#<commit-ish>` or
318 + `#semver:<semver>` is specified, then `master` is used.
319 +
320 + As with regular git dependencies, `dependencies` and `devDependencies`
321 + will be installed if the package has a `prepare` script before the
322 + package is done installing.
323 +
324 + Examples:
325 +
326 + ```bash
327 + npm install mygithubuser/myproject
328 + npm install github:mygithubuser/myproject
329 + ```
330 +
331 +* `npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]`:
332 +
333 + Install the package at `https://gist.github.com/gistID` by attempting to
334 + clone it using `git`. The GitHub username associated with the gist is
335 + optional and will not be saved in `package.json`.
336 +
337 + As with regular git dependencies, `dependencies` and `devDependencies` will
338 + be installed if the package has a `prepare` script before the package is
339 + done installing.
340 +
341 + Example:
342 +
343 + ```bash
344 + npm install gist:101a11beef
345 + ```
346 +
347 +* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]`:
348 +
349 + Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo`
350 + by attempting to clone it using `git`.
351 +
352 + If `#<commit-ish>` is provided, it will be used to clone exactly that
353 + commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
354 + be any valid semver range or exact version, and npm will look for any tags
355 + or refs matching that range in the remote repository, much as it would for a
356 + registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
357 + specified, then `master` is used.
358 +
359 + As with regular git dependencies, `dependencies` and `devDependencies` will
360 + be installed if the package has a `prepare` script before the package is
361 + done installing.
362 +
363 + Example:
364 +
365 + ```bash
366 + npm install bitbucket:mybitbucketuser/myproject
367 + ```
368 +
369 +* `npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]`:
370 +
371 + Install the package at `https://gitlab.com/gitlabname/gitlabrepo`
372 + by attempting to clone it using `git`.
373 +
374 + If `#<commit-ish>` is provided, it will be used to clone exactly that
375 + commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
376 + be any valid semver range or exact version, and npm will look for any tags
377 + or refs matching that range in the remote repository, much as it would for a
378 + registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
379 + specified, then `master` is used.
380 +
381 + As with regular git dependencies, `dependencies` and `devDependencies` will
382 + be installed if the package has a `prepare` script before the package is
383 + done installing.
384 +
385 + Example:
386 +
387 + ```bash
388 + npm install gitlab:mygitlabuser/myproject
389 + npm install gitlab:myusr/myproj#semver:^5.0
390 + ```
391 +
392 +You may combine multiple arguments and even multiple types of arguments.
393 +For example:
394 +
395 +```bash
396 +npm install sax@">=0.1.0 <0.2.0" bench supervisor
397 +```
398 +
399 +The `--tag` argument will apply to all of the specified install targets. If
400 +a tag with the given name exists, the tagged version is preferred over
401 +newer versions.
402 +
403 +The `--dry-run` argument will report in the usual way what the install
404 +would have done without actually installing anything.
405 +
406 +The `--package-lock-only` argument will only update the
407 +`package-lock.json`, instead of checking `node_modules` and downloading
408 +dependencies.
409 +
410 +The `-f` or `--force` argument will force npm to fetch remote resources
411 +even if a local copy exists on disk.
412 +
413 +```bash
414 +npm install sax --force
415 +```
416 +
417 +### Configuration
418 +
419 +See the [`config`](/cli/v7/using-npm/config) help doc. Many of the configuration
420 +params have some effect on installation, since that's most of what npm
421 +does.
422 +
423 +These are some of the most common options related to installation.
424 +
425 +#### Configuration Options Affecting Dependency Resolution And Tree Design
426 +
427 +* `-g` or `--global`: install the package globally rather than locally.
428 + See [folders](/cli/v7/configuring-npm/folders).
429 +
430 +* `--global-style`: install the package into your local `node_modules`
431 + folder with the same layout it uses with the global `node_modules`
432 + folder. Only your direct dependencies will show in `node_modules` and
433 + everything they depend on will be flattened in their `node_modules`
434 + folders. This obviously will eliminate some deduping.
435 +
436 +* `--legacy-bundling`: install the package in the style of versions of npm
437 + prior to 1.4, where dependencies are not automatically deduped up to the
438 + shallowest level in the tree possible. This is extremely
439 + disk-inefficient.
440 +
441 +* `--legacy-peer-deps`: ignore all `peerDependencies` when installing, in
442 + the style of npm version 4 through version 6.
443 +
444 +* `--strict-peer-deps`: fail and abort the install process for any
445 + conflicting peerDependencies when encountered. By default, npm will only
446 + crash for peerDependencies conflicts caused by the direct dependencies of
447 + the root project.
448 +
449 +* `--no-package-lock` (alias: `--no-shrinkwrap`): do not read the
450 + lockfile (`package-lock.json` or `npm-shrinkwrap.json`) for the intended
451 + package tree, and do not save the resulting package tree back to a
452 + lockfile.
453 +
454 +#### Omitting Dependency Types
455 +
456 +You may omit certain types of dependencies by using the `--omit=<type>`
457 +config option. This may be specified multiple types on the command line.
458 +To enter `omit` options in `.npmrc` files, use the following syntax:
459 +
460 +```ini
461 +omit[] = dev
462 +omit[] = optional
463 +; etc...
464 +```
465 +
466 +The dependency types that may be omitted or included are:
467 +
468 +* `peer`: any `peerDependencies`, including those with a
469 + `peerDependenciesMeta` entry specifying `optional: true`
470 +* `optional`: dependencies listed in `optionalDependencies`
471 +* `dev`: dependencies listed in `devDependencies`
472 +
473 +To re-include dependency, use the `--include` option, which may also be
474 +specified multiple times.
475 +
476 +Legacy shorthands for `omit` settings are:
477 +
478 +* `--no-optional`: prevent optionalDependencies from being installed. Note
479 + that their presence is still entered in the `package-lock.json` file, and
480 + the tree is designed such that they _can_ be installed in the future.
481 +
482 +* `--prod`: prevent devDependencies from being installed.
483 +
484 +* `--only=prod`: omit `devDependencies`
485 +
486 +* `--also=dev`: include `devDependencies`
487 +
488 +#### Configuration Options Affecting Build Process
489 +
490 +* `--ignore-scripts`: do not execute any scripts defined in the
491 + package.json. See [`scripts`](/cli/v7/using-npm/scripts).
492 +
493 +* `--no-audit`: disable sending audit reports to the configured registries.
494 + See [`npm-audit`](npm-audit) for details on what is sent.
495 +
496 +* `--no-bin-links`: prevent npm from creating symlinks for any binaries the
497 + package might contain.
498 +
499 +* `--no-fund`: suppress the message displayed at the end of each install
500 + that acknowledges the number of dependencies looking for funding. See
501 + [`npm-fund`](/cli/v7/commands/npm-fund)
502 +
503 +* `--dry-run`: Do not actually install anything into the `node_modules`
504 + folder. Just build the intended tree in memory, and report on it.
505 +
506 +* `--no-save`: Do not save installed dependencies to `package.json` or
507 + `package-lock.json`.
508 +
509 +### Algorithm
510 +
511 +Given a `package{dep}` structure: `A{B,C}, B{C}, C{D}`,
512 +the npm install algorithm produces:
513 +
514 +```bash
515 +A
516 ++-- B
517 ++-- C
518 ++-- D
519 +```
520 +
521 +That is, the dependency from B to C is satisfied by the fact that A already
522 +caused C to be installed at a higher level. D is still installed at the top
523 +level because nothing conflicts with it.
524 +
525 +For `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces:
526 +
527 +```bash
528 +A
529 ++-- B
530 ++-- C
531 + `-- D@2
532 ++-- D@1
533 +```
534 +
535 +Because B's D@1 will be installed in the top-level, C now has to install
536 +D@2 privately for itself. This algorithm is deterministic, but different
537 +trees may be produced if two dependencies are requested for installation in
538 +a different order.
539 +
540 +See [folders](/cli/v7/configuring-npm/folders) for a more detailed description of
541 +the specific folder structures that npm creates.
542 +
543 +### See Also
544 +
545 +* [npm folders](/cli/v7/configuring-npm/folders)
546 +* [npm update](/cli/v7/commands/npm-update)
547 +* [npm audit](/cli/v7/commands/npm-audit)
548 +* [npm fund](/cli/v7/commands/npm-fund)
549 +* [npm link](/cli/v7/commands/npm-link)
550 +* [npm rebuild](/cli/v7/commands/npm-rebuild)
551 +* [npm scripts](/cli/v7/using-npm/scripts)
552 +* [npm build](/cli/v7/commands/npm-build)
553 +* [npm config](/cli/v7/commands/npm-config)
554 +* [npmrc](/cli/v7/configuring-npm/npmrc)
555 +* [npm registry](/cli/v7/using-npm/registry)
556 +* [npm dist-tag](/cli/v7/commands/npm-dist-tag)
557 +* [npm uninstall](/cli/v7/commands/npm-uninstall)
558 +* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)
559 +* [package.json](/cli/v7/configuring-npm/package-json)
560 +* [workspaces](/cli/v7/using-npm/workspaces)
content/cli/v7/commands/npm-link.md new
+119
@@ -0,0 +1,119 @@
1 +---
2 +title: npm-link
3 +section: 1
4 +description: Symlink a package folder
5 +redirect_from:
6 + - /cli/link
7 + - /cli/link.html
8 + - /cli/commands/link
9 + - /cli-commands/link
10 + - /cli-commands/link.html
11 + - /cli-commands/npm-link
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-link.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm link (in package dir)
21 +npm link [<@scope>/]<pkg>[@<version>]
22 +
23 +alias: npm ln
24 +```
25 +
26 +### Description
27 +
28 +This is handy for installing your own stuff, so that you can work on it and
29 +test iteratively without having to continually rebuild.
30 +
31 +Package linking is a two-step process.
32 +
33 +First, `npm link` in a package folder will create a symlink in the global
34 +folder `{prefix}/lib/node_modules/<package>` that links to the package
35 +where the `npm link` command was executed. It will also link any bins in
36 +the package to `{prefix}/bin/{name}`. Note that `npm link` uses the global
37 +prefix (see `npm prefix -g` for its value).
38 +
39 +Next, in some other location, `npm link package-name` will create a
40 +symbolic link from globally-installed `package-name` to `node_modules/` of
41 +the current folder.
42 +
43 +Note that `package-name` is taken from `package.json`, _not_ from the
44 +directory name.
45 +
46 +The package name can be optionally prefixed with a scope. See
47 +[`scope`](/cli/v7/using-npm/scope). The scope must be preceded by an @-symbol and
48 +followed by a slash.
49 +
50 +When creating tarballs for `npm publish`, the linked packages are
51 +"snapshotted" to their current state by resolving the symbolic links, if
52 +they are included in `bundleDependencies`.
53 +
54 +For example:
55 +
56 +```bash
57 +cd ~/projects/node-redis # go into the package directory
58 +npm link # creates global link
59 +cd ~/projects/node-bloggy # go into some other package directory.
60 +npm link redis # link-install the package
61 +```
62 +
63 +Now, any changes to `~/projects/node-redis` will be reflected in
64 +`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link
65 +should be to the package name, not the directory name for that package.
66 +
67 +You may also shortcut the two steps in one. For example, to do the
68 +above use-case in a shorter way:
69 +
70 +```bash
71 +cd ~/projects/node-bloggy # go into the dir of your main project
72 +npm link ../node-redis # link the dir of your dependency
73 +```
74 +
75 +The second line is the equivalent of doing:
76 +
77 +```bash
78 +(cd ../node-redis; npm link)
79 +npm link redis
80 +```
81 +
82 +That is, it first creates a global link, and then links the global
83 +installation target into your project's `node_modules` folder.
84 +
85 +Note that in this case, you are referring to the directory name,
86 +`node-redis`, rather than the package name `redis`.
87 +
88 +If your linked package is scoped (see [`scope`](/cli/v7/using-npm/scope)) your
89 +link command must include that scope, e.g.
90 +
91 +```bash
92 +npm link @myorg/privatepackage
93 +```
94 +
95 +### Caveat
96 +
97 +Note that package dependencies linked in this way are _not_ saved to
98 +`package.json` by default, on the assumption that the intention is to have
99 +a link stand in for a regular non-link dependency. Otherwise, for example,
100 +if you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace
101 +the `^3.0.1` dependency with `file:../path/to/node-redis`, which you
102 +probably don't want! Additionally, other users or developers on your
103 +project would run into issues if they do not have their folders set up
104 +exactly the same as yours.
105 +
106 +If you are adding a _new_ dependency as a link, you should add it to the
107 +relevant metadata by running `npm install <dep> --package-lock-only`.
108 +
109 +If you _want_ to save the `file:` reference in your `package.json` and
110 +`package-lock.json` files, you can use `npm link <dep> --save` to do so.
111 +
112 +### See Also
113 +
114 +* [npm developers](/cli/v7/using-npm/developers)
115 +* [package.json](/cli/v7/configuring-npm/package-json)
116 +* [npm install](/cli/v7/commands/npm-install)
117 +* [npm folders](/cli/v7/configuring-npm/folders)
118 +* [npm config](/cli/v7/commands/npm-config)
119 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-logout.md new
+62
@@ -0,0 +1,62 @@
1 +---
2 +title: npm-logout
3 +section: 1
4 +description: Log out of the registry
5 +redirect_from:
6 + - /cli/logout
7 + - /cli/logout.html
8 + - /cli/commands/logout
9 + - /cli-commands/logout
10 + - /cli-commands/logout.html
11 + - /cli-commands/npm-logout
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-logout.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm logout [--registry=<url>] [--scope=<@scope>]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +When logged into a registry that supports token-based authentication, tell
28 +the server to end this token's session. This will invalidate the token
29 +everywhere you're using it, not just for the current environment.
30 +
31 +When logged into a legacy registry that uses username and password
32 +authentication, this will clear the credentials in your user configuration.
33 +In this case, it will _only_ affect the current environment.
34 +
35 +If `--scope` is provided, this will find the credentials for the registry
36 +connected to that scope, if set.
37 +
38 +### Configuration
39 +
40 +#### registry
41 +
42 +Default: https://registry.npmjs.org/
43 +
44 +The base URL of the npm package registry. If `scope` is also specified,
45 +it takes precedence.
46 +
47 +#### scope
48 +
49 +Default: The scope of your current project, if any, otherwise none.
50 +
51 +If specified, you will be logged out of the specified scope. See [`scope`](/cli/v7/using-npm/scope).
52 +
53 +```bash
54 +npm logout --scope=@myco
55 +```
56 +
57 +### See Also
58 +
59 +* [npm adduser](/cli/v7/commands/npm-adduser)
60 +* [npm registry](/cli/v7/using-npm/registry)
61 +* [npm config](/cli/v7/commands/npm-config)
62 +* [npm whoami](/cli/v7/commands/npm-whoami)
content/cli/v7/commands/npm-ls.md new
+178
@@ -0,0 +1,178 @@
1 +---
2 +title: npm-ls
3 +section: 1
4 +description: List installed packages
5 +redirect_from:
6 + - /cli/ls
7 + - /cli/ls.html
8 + - /cli/commands/ls
9 + - /cli-commands/ls
10 + - /cli-commands/ls.html
11 + - /cli-commands/npm-ls
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-ls.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm ls [[<@scope>/]<pkg> ...]
21 +
22 +aliases: list, la, ll
23 +```
24 +
25 +### Description
26 +
27 +This command will print to stdout all the versions of packages that are
28 +installed, as well as their dependencies when `--all` is specified, in a
29 +tree structure.
30 +
31 +Note: to get a "bottoms up" view of why a given package is included in the
32 +tree at all, use [`npm explain`](/cli/v7/commands/npm-explain).
33 +
34 +Positional arguments are `name@version-range` identifiers, which will limit
35 +the results to only the paths to the packages named. Note that nested
36 +packages will *also* show the paths to the specified packages. For
37 +example, running `npm ls promzard` in npm's source tree will show:
38 +
39 +```bash
40 +npm@7.0.0 /path/to/npm
41 +└─┬ init-package-json@0.0.4
42 + └── promzard@0.1.5
43 +```
44 +
45 +It will print out extraneous, missing, and invalid packages.
46 +
47 +If a project specifies git urls for dependencies these are shown
48 +in parentheses after the name@version to make it easier for users to
49 +recognize potential forks of a project.
50 +
51 +The tree shown is the logical dependency tree, based on package
52 +dependencies, not the physical layout of your `node_modules` folder.
53 +
54 +When run as `ll` or `la`, it shows extended information by default.
55 +
56 +### Note: Design Changes Pending
57 +
58 +The `npm ls` command's output and behavior made a _ton_ of sense when npm
59 +created a `node_modules` folder that naively nested every dependency. In
60 +such a case, the logical dependency graph and physical tree of packages on
61 +disk would be roughly identical.
62 +
63 +With the advent of automatic install-time deduplication of dependencies in
64 +npm v3, the `ls` output was modified to display the logical dependency
65 +graph as a tree structure, since this was more useful to most users.
66 +However, without using `npm ls -l`, it became impossible show _where_ a
67 +package was actually installed much of the time!
68 +
69 +With the advent of automatic installation of `peerDependencies` in npm v7,
70 +this gets even more curious, as `peerDependencies` are logically
71 +"underneath" their dependents in the dependency graph, but are always
72 +physically at or above their location on disk.
73 +
74 +Also, in the years since npm got an `ls` command (in version 0.0.2!),
75 +dependency graphs have gotten much larger as a general rule. Therefore, in
76 +order to avoid dumping an excessive amount of content to the terminal, `npm
77 +ls` now only shows the _top_ level dependencies, unless `--all` is
78 +provided.
79 +
80 +A thorough re-examination of the use cases, intention, behavior, and output
81 +of this command, is currently underway. Expect significant changes to at
82 +least the default human-readable `npm ls` output in npm v8.
83 +
84 +### Configuration
85 +
86 +#### all
87 +
88 +* Default: `false`
89 +* Type: Boolean
90 +
91 +When running `npm outdated` and `npm ls`, setting `--all` will show all
92 +outdated or installed packages, rather than only those directly depended
93 +upon by the current project.
94 +
95 +#### json
96 +
97 +* Default: false
98 +* Type: Boolean
99 +
100 +Show information in JSON format.
101 +
102 +#### long
103 +
104 +* Default: false
105 +* Type: Boolean
106 +
107 +Show extended information.
108 +
109 +#### parseable
110 +
111 +* Default: false
112 +* Type: Boolean
113 +
114 +Show parseable output instead of tree view.
115 +
116 +#### global
117 +
118 +* Default: false
119 +* Type: Boolean
120 +
121 +List packages in the global install prefix instead of in the current
122 +project.
123 +
124 +#### depth
125 +
126 +* Type: Int
127 +
128 +Max display depth of the dependency tree.
129 +
130 +#### prod / production
131 +
132 +* Type: Boolean
133 +* Default: false
134 +
135 +Display only the dependency tree for packages in `dependencies`.
136 +
137 +#### dev / development
138 +
139 +* Type: Boolean
140 +* Default: false
141 +
142 +Display only the dependency tree for packages in `devDependencies`.
143 +
144 +#### only
145 +
146 +* Type: String
147 +
148 +When "dev" or "development", is an alias to `dev`.
149 +
150 +When "prod" or "production", is an alias to `production`.
151 +
152 +#### link
153 +
154 +* Type: Boolean
155 +* Default: false
156 +
157 +Display only dependencies which are linked
158 +
159 +#### unicode
160 +
161 +* Type: Boolean
162 +* Default: true
163 +
164 +Whether to represent the tree structure using unicode characters.
165 +Set it to false in order to use all-ansi output.
166 +
167 +### See Also
168 +
169 +* [npm explain](/cli/v7/commands/npm-explain)
170 +* [npm config](/cli/v7/commands/npm-config)
171 +* [npmrc](/cli/v7/configuring-npm/npmrc)
172 +* [npm folders](/cli/v7/configuring-npm/folders)
173 +* [npm explain](/cli/v7/commands/npm-explain)
174 +* [npm install](/cli/v7/commands/npm-install)
175 +* [npm link](/cli/v7/commands/npm-link)
176 +* [npm prune](/cli/v7/commands/npm-prune)
177 +* [npm outdated](/cli/v7/commands/npm-outdated)
178 +* [npm update](/cli/v7/commands/npm-update)
content/cli/v7/commands/npm-org.md new
+74
@@ -0,0 +1,74 @@
1 +---
2 +title: npm-org
3 +section: 1
4 +description: Manage orgs
5 +redirect_from:
6 + - /cli/org
7 + - /cli/org.html
8 + - /cli/commands/org
9 + - /cli-commands/org
10 + - /cli-commands/org.html
11 + - /cli-commands/npm-org
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-org.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm org set <orgname> <username> [developer | admin | owner]
21 +npm org rm <orgname> <username>
22 +npm org ls <orgname> [<username>]
23 +```
24 +
25 +Note: This command is unaware of workspaces.
26 +
27 +### Example
28 +
29 +Add a new developer to an org:
30 +
31 +```bash
32 +$ npm org set my-org @mx-smith
33 +```
34 +
35 +Add a new admin to an org (or change a developer to an admin):
36 +
37 +```bash
38 +$ npm org set my-org @mx-santos admin
39 +```
40 +
41 +Remove a user from an org:
42 +
43 +```bash
44 +$ npm org rm my-org mx-santos
45 +```
46 +
47 +List all users in an org:
48 +
49 +```bash
50 +$ npm org ls my-org
51 +```
52 +
53 +List all users in JSON format:
54 +
55 +```bash
56 +$ npm org ls my-org --json
57 +```
58 +
59 +See what role a user has in an org:
60 +
61 +```bash
62 +$ npm org ls my-org @mx-santos
63 +```
64 +
65 +### Description
66 +
67 +You can use the `npm org` commands to manage and view users of an
68 +organization. It supports adding and removing users, changing their roles,
69 +listing them, and finding specific ones and their roles.
70 +
71 +### See Also
72 +
73 +* [using orgs](/cli/v7/using-npm/orgs)
74 +* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/)
content/cli/v7/commands/npm-outdated.md new
+139
@@ -0,0 +1,139 @@
1 +---
2 +title: npm-outdated
3 +section: 1
4 +description: Check for outdated packages
5 +redirect_from:
6 + - /cli/outdated
7 + - /cli/outdated.html
8 + - /cli/commands/outdated
9 + - /cli-commands/outdated
10 + - /cli-commands/outdated.html
11 + - /cli-commands/npm-outdated
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-outdated.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm outdated [[<@scope>/]<pkg> ...]
21 +```
22 +
23 +### Description
24 +
25 +This command will check the registry to see if any (or, specific) installed
26 +packages are currently outdated.
27 +
28 +By default, only the direct dependencies of the root project are shown.
29 +Use `--all` to find all outdated meta-dependencies as well.
30 +
31 +In the output:
32 +
33 +* `wanted` is the maximum version of the package that satisfies the semver
34 + range specified in `package.json`. If there's no available semver range
35 + (i.e. you're running `npm outdated --global`, or the package isn't
36 + included in `package.json`), then `wanted` shows the currently-installed
37 + version.
38 +* `latest` is the version of the package tagged as latest in the registry.
39 + Running `npm publish` with no special configuration will publish the
40 + package with a dist-tag of `latest`. This may or may not be the maximum
41 + version of the package, or the most-recently published version of the
42 + package, depending on how the package's developer manages the latest
43 + [dist-tag](/cli/v7/commands/npm-dist-tag).
44 +* `location` is where in the physical tree the package is located.
45 +* `depended by` shows which package depends on the displayed dependency
46 +* `package type` (when using `--long` / `-l`) tells you whether this
47 + package is a `dependency` or a dev/peer/optional dependency. Packages not
48 + included in `package.json` are always marked `dependencies`.
49 +* `homepage` (when using `--long` / `-l`) is the `homepage` value contained
50 + in the package's packument
51 +* Red means there's a newer version matching your semver requirements, so
52 + you should update now.
53 +* Yellow indicates that there's a newer version _above_ your semver
54 + requirements (usually new major, or new 0.x minor) so proceed with
55 + caution.
56 +
57 +### An example
58 +
59 +```bash
60 +$ npm outdated
61 +Package Current Wanted Latest Location Depended by
62 +glob 5.0.15 5.0.15 6.0.1 node_modules/glob dependent-package-name
63 +nothingness 0.0.3 git git node_modules/nothingness dependent-package-name
64 +npm 3.5.1 3.5.2 3.5.1 node_modules/npm dependent-package-name
65 +local-dev 0.0.3 linked linked local-dev dependent-package-name
66 +once 1.3.2 1.3.3 1.3.3 node_modules/once dependent-package-name
67 +```
68 +
69 +With these `dependencies`:
70 +```json
71 +{
72 + "glob": "^5.0.15",
73 + "nothingness": "github:othiym23/nothingness#master",
74 + "npm": "^3.5.1",
75 + "once": "^1.3.1"
76 +}
77 +```
78 +
79 +A few things to note:
80 +
81 +* `glob` requires `^5`, which prevents npm from installing `glob@6`, which
82 + is outside the semver range.
83 +* Git dependencies will always be reinstalled, because of how they're
84 + specified. The installed committish might satisfy the dependency
85 + specifier (if it's something immutable, like a commit SHA), or it might
86 + not, so `npm outdated` and `npm update` have to fetch Git repos to check.
87 + This is why currently doing a reinstall of a Git dependency always forces
88 + a new clone and install.
89 +* `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because
90 + npm uses dist-tags to manage its `latest` and `next` release channels.
91 + `npm update` will install the _newest_ version, but `npm install npm`
92 + (with no semver range) will install whatever's tagged as `latest`.
93 +* `once` is just plain out of date. Reinstalling `node_modules` from
94 + scratch or running `npm update` will bring it up to spec.
95 +
96 +### Configuration
97 +
98 +#### json
99 +
100 +* Default: false
101 +* Type: Boolean
102 +
103 +Show information in JSON format.
104 +
105 +#### long
106 +
107 +* Default: false
108 +* Type: Boolean
109 +
110 +Show extended information.
111 +
112 +#### parseable
113 +
114 +* Default: false
115 +* Type: Boolean
116 +
117 +Show parseable output instead of tree view.
118 +
119 +#### global
120 +
121 +* Default: false
122 +* Type: Boolean
123 +
124 +Check packages in the global install prefix instead of in the current
125 +project.
126 +
127 +#### all
128 +
129 +* Default: false
130 +* Type: Boolean
131 +
132 +Display all outdated dependencies on the tree.
133 +
134 +### See Also
135 +
136 +* [npm update](/cli/v7/commands/npm-update)
137 +* [npm dist-tag](/cli/v7/commands/npm-dist-tag)
138 +* [npm registry](/cli/v7/using-npm/registry)
139 +* [npm folders](/cli/v7/configuring-npm/folders)
content/cli/v7/commands/npm-owner.md new
+53
@@ -0,0 +1,53 @@
1 +---
2 +title: npm-owner
3 +section: 1
4 +description: Manage package owners
5 +redirect_from:
6 + - /cli/owner
7 + - /cli/owner.html
8 + - /cli/commands/owner
9 + - /cli-commands/owner
10 + - /cli-commands/owner.html
11 + - /cli-commands/npm-owner
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-owner.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm owner add <user> [<@scope>/]<pkg>
21 +npm owner rm <user> [<@scope>/]<pkg>
22 +npm owner ls [<@scope>/]<pkg>
23 +
24 +aliases: author
25 +```
26 +
27 +Note: This command is unaware of workspaces.
28 +
29 +### Description
30 +
31 +Manage ownership of published packages.
32 +
33 +* ls: List all the users who have access to modify a package and push new
34 + versions. Handy when you need to know who to bug for help.
35 +* add: Add a new user as a maintainer of a package. This user is enabled
36 + to modify metadata, publish new versions, and add other owners.
37 +* rm: Remove a user from the package owner list. This immediately revokes
38 + their privileges.
39 +
40 +Note that there is only one level of access. Either you can modify a package,
41 +or you can't. Future versions may contain more fine-grained access levels, but
42 +that is not implemented at this time.
43 +
44 +If you have two-factor authentication enabled with `auth-and-writes` (see
45 +[`npm-profile`](/cli/v7/commands/npm-profile)) then you'll need to include an otp
46 +on the command line when changing ownership with `--otp`.
47 +
48 +### See Also
49 +
50 +* [npm profile](/cli/v7/commands/npm-profile)
51 +* [npm publish](/cli/v7/commands/npm-publish)
52 +* [npm registry](/cli/v7/using-npm/registry)
53 +* [npm adduser](/cli/v7/commands/npm-adduser)
content/cli/v7/commands/npm-pack.md new
+46
@@ -0,0 +1,46 @@
1 +---
2 +title: npm-pack
3 +section: 1
4 +description: Create a tarball from a package
5 +redirect_from:
6 + - /cli/pack
7 + - /cli/pack.html
8 + - /cli/commands/pack
9 + - /cli-commands/pack
10 + - /cli-commands/pack.html
11 + - /cli-commands/npm-pack
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-pack.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm pack [[<@scope>/]<pkg>...] [--dry-run]
21 +```
22 +
23 +### Description
24 +
25 +For anything that's installable (that is, a package folder, tarball,
26 +tarball url, git url, name@tag, name@version, name, or scoped name), this
27 +command will fetch it to the cache, copy the tarball to the current working
28 +directory as `<name>-<version>.tgz`, and then write the filenames out to
29 +stdout.
30 +
31 +If the same package is specified multiple times, then the file will be
32 +overwritten the second time.
33 +
34 +If no arguments are supplied, then npm packs the current package folder.
35 +
36 +The `--dry-run` argument will do everything that pack usually does without
37 +actually packing anything. That is, it reports on what would have gone
38 +into the tarball, but nothing else.
39 +
40 +### See Also
41 +
42 +* [npm-packlist package](http://npm.im/npm-packlist)
43 +* [npm cache](/cli/v7/commands/npm-cache)
44 +* [npm publish](/cli/v7/commands/npm-publish)
45 +* [npm config](/cli/v7/commands/npm-config)
46 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-ping.md new
+42
@@ -0,0 +1,42 @@
1 +---
2 +title: npm-ping
3 +section: 1
4 +description: Ping npm registry
5 +redirect_from:
6 + - /cli/ping
7 + - /cli/ping.html
8 + - /cli/commands/ping
9 + - /cli-commands/ping
10 + - /cli-commands/ping.html
11 + - /cli-commands/npm-ping
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-ping.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm ping [--registry <registry>]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +Ping the configured or given npm registry and verify authentication.
28 +If it works it will output something like:
29 +
30 +```bash
31 +Ping success: {*Details about registry*}
32 +```
33 +otherwise you will get:
34 +```bash
35 +Ping error: {*Detail about error}
36 +```
37 +
38 +### See Also
39 +
40 +* [npm doctor](/cli/v7/commands/npm-doctor)
41 +* [npm config](/cli/v7/commands/npm-config)
42 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-prefix.md new
+52
@@ -0,0 +1,52 @@
1 +---
2 +title: npm-prefix
3 +section: 1
4 +description: Display prefix
5 +redirect_from:
6 + - /cli/prefix
7 + - /cli/prefix.html
8 + - /cli/commands/prefix
9 + - /cli-commands/prefix
10 + - /cli-commands/prefix.html
11 + - /cli-commands/npm-prefix
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-prefix.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm prefix [-g]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +Print the local prefix to standard output. This is the closest parent directory
28 +to contain a `package.json` file or `node_modules` directory, unless `-g` is
29 +also specified.
30 +
31 +If `-g` is specified, this will be the value of the global prefix. See
32 +[`npm config`](/cli/v7/commands/npm-config) for more detail.
33 +
34 +### Example
35 +
36 +```bash
37 +npm prefix
38 +/usr/local/projects/foo
39 +```
40 +
41 +```bash
42 +npm prefix -g
43 +/usr/local
44 +```
45 +
46 +### See Also
47 +
48 +* [npm root](/cli/v7/commands/npm-root)
49 +* [npm bin](/cli/v7/commands/npm-bin)
50 +* [npm folders](/cli/v7/configuring-npm/folders)
51 +* [npm config](/cli/v7/commands/npm-config)
52 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-profile.md new
+92
@@ -0,0 +1,92 @@
1 +---
2 +title: npm-profile
3 +section: 1
4 +description: Change settings on your registry profile
5 +redirect_from:
6 + - /cli/profile
7 + - /cli/profile.html
8 + - /cli/commands/profile
9 + - /cli-commands/profile
10 + - /cli-commands/profile.html
11 + - /cli-commands/npm-profile
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-profile.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm profile get [--json|--parseable] [<property>]
21 +npm profile set [--json|--parseable] <property> <value>
22 +npm profile set password
23 +npm profile enable-2fa [auth-and-writes|auth-only]
24 +npm profile disable-2fa
25 +```
26 +
27 +Note: This command is unaware of workspaces.
28 +
29 +### Description
30 +
31 +Change your profile information on the registry. Note that this command
32 +depends on the registry implementation, so third-party registries may not
33 +support this interface.
34 +
35 +* `npm profile get [<property>]`: Display all of the properties of your
36 + profile, or one or more specific properties. It looks like:
37 +
38 +```bash
39 ++-----------------+---------------------------+
40 +| name | example |
41 ++-----------------+---------------------------+
42 +| email | me@example.com (verified) |
43 ++-----------------+---------------------------+
44 +| two factor auth | auth-and-writes |
45 ++-----------------+---------------------------+
46 +| fullname | Example User |
47 ++-----------------+---------------------------+
48 +| homepage | |
49 ++-----------------+---------------------------+
50 +| freenode | |
51 ++-----------------+---------------------------+
52 +| twitter | |
53 ++-----------------+---------------------------+
54 +| github | |
55 ++-----------------+---------------------------+
56 +| created | 2015-02-26T01:38:35.892Z |
57 ++-----------------+---------------------------+
58 +| updated | 2017-10-02T21:29:45.922Z |
59 ++-----------------+---------------------------+
60 +```
61 +
62 +* `npm profile set <property> <value>`: Set the value of a profile
63 + property. You can set the following properties this way: email, fullname,
64 + homepage, freenode, twitter, github
65 +
66 +* `npm profile set password`: Change your password. This is interactive,
67 + you'll be prompted for your current password and a new password. You'll
68 + also be prompted for an OTP if you have two-factor authentication
69 + enabled.
70 +
71 +* `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor
72 + authentication. Defaults to `auth-and-writes` mode. Modes are:
73 + * `auth-only`: Require an OTP when logging in or making changes to your
74 + account's authentication. The OTP will be required on both the website
75 + and the command line.
76 + * `auth-and-writes`: Requires an OTP at all the times `auth-only` does,
77 + and also requires one when publishing a module, setting the `latest`
78 + dist-tag, or changing access via `npm access` and `npm owner`.
79 +
80 +* `npm profile disable-2fa`: Disables two-factor authentication.
81 +
82 +### Details
83 +
84 +All of the `npm profile` subcommands accept `--json` and `--parseable` and
85 +will tailor their output based on those. Some of these commands may not be
86 +available on non npmjs.com registries.
87 +
88 +### See Also
89 +
90 +* [npm adduser](/cli/v7/commands/npm-adduser)
91 +* [npm logout](/cli/v7/commands/npm-logout)
92 +* [npm config](/cli/v7/commands/npm-config)
content/cli/v7/commands/npm-prune.md new
+50
@@ -0,0 +1,50 @@
1 +---
2 +title: npm-prune
3 +section: 1
4 +description: Remove extraneous packages
5 +redirect_from:
6 + - /cli/prune
7 + - /cli/prune.html
8 + - /cli/commands/prune
9 + - /cli-commands/prune
10 + - /cli-commands/prune.html
11 + - /cli-commands/npm-prune
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-prune.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
21 +```
22 +
23 +### Description
24 +
25 +This command removes "extraneous" packages. If a package name is provided,
26 +then only packages matching one of the supplied names are removed.
27 +
28 +Extraneous packages are those present in the `node_modules` folder that are
29 +not listed as any package's dependency list.
30 +
31 +If the `--production` flag is specified or the `NODE_ENV` environment
32 +variable is set to `production`, this command will remove the packages
33 +specified in your `devDependencies`. Setting `--no-production` will negate
34 +`NODE_ENV` being set to `production`.
35 +
36 +If the `--dry-run` flag is used then no changes will actually be made.
37 +
38 +If the `--json` flag is used, then the changes `npm prune` made (or would
39 +have made with `--dry-run`) are printed as a JSON object.
40 +
41 +In normal operation, extraneous modules are pruned automatically, so you'll
42 +only need this command with the `--production` flag. However, in the real
43 +world, operation is not always "normal". When crashes or mistakes happen,
44 +this command can help clean up any resulting garbage.
45 +
46 +### See Also
47 +
48 +* [npm uninstall](/cli/v7/commands/npm-uninstall)
49 +* [npm folders](/cli/v7/configuring-npm/folders)
50 +* [npm ls](/cli/v7/commands/npm-ls)
content/cli/v7/commands/npm-publish.md new
+120
@@ -0,0 +1,120 @@
1 +---
2 +title: npm-publish
3 +section: 1
4 +description: Publish a package
5 +redirect_from:
6 + - /cli/publish
7 + - /cli/publish.html
8 + - /cli/commands/publish
9 + - /cli-commands/publish
10 + - /cli-commands/publish.html
11 + - /cli-commands/npm-publish
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-publish.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]
21 +
22 +Publishes '.' if no argument supplied
23 +Sets tag 'latest' if no --tag specified
24 +```
25 +
26 +### Description
27 +
28 +Publishes a package to the registry so that it can be installed by name.
29 +
30 +By default npm will publish to the public registry. This can be overridden
31 +by specifying a different default registry or using a
32 +[`scope`](/cli/v7/using-npm/scope) in the name (see
33 +[`package.json`](/cli/v7/configuring-npm/package-json)).
34 +
35 +* `<folder>`: A folder containing a package.json file
36 +
37 +* `<tarball>`: A url or file path to a gzipped tar archive containing a
38 + single folder with a package.json file inside.
39 +
40 +* `[--tag <tag>]`: Registers the published package with the given tag, such
41 + that `npm install <name>@<tag>` will install this version. By default,
42 + `npm publish` updates and `npm install` installs the `latest` tag. See
43 + [`npm-dist-tag`](npm-dist-tag) for details about tags.
44 +
45 +* `[--access <public|restricted>]`: Tells the registry whether this package
46 + should be published as public or restricted. Only applies to scoped
47 + packages, which default to `restricted`. If you don't have a paid
48 + account, you must publish with `--access public` to publish scoped
49 + packages.
50 +
51 +* `[--otp <otpcode>]`: If you have two-factor authentication enabled in
52 + `auth-and-writes` mode then you can provide a code from your
53 + authenticator with this. If you don't include this and you're running
54 + from a TTY then you'll be prompted.
55 +
56 +* `[--dry-run]`: As of `npm@6`, does everything publish would do except
57 + actually publishing to the registry. Reports the details of what would
58 + have been published.
59 +
60 +The publish will fail if the package name and version combination already
61 +exists in the specified registry.
62 +
63 +Once a package is published with a given name and version, that specific
64 +name and version combination can never be used again, even if it is removed
65 +with [`npm unpublish`](/cli/v7/commands/npm-unpublish).
66 +
67 +As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the
68 +tarball will be submitted to the registry during publication. Subsequent
69 +installs will use the strongest supported algorithm to verify downloads.
70 +
71 +Similar to `--dry-run` see [`npm pack`](/cli/v7/commands/npm-pack), which figures
72 +out the files to be included and packs them into a tarball to be uploaded
73 +to the registry.
74 +
75 +### Files included in package
76 +
77 +To see what will be included in your package, run `npx npm-packlist`. All
78 +files are included by default, with the following exceptions:
79 +
80 +- Certain files that are relevant to package installation and distribution
81 + are always included. For example, `package.json`, `README.md`,
82 + `LICENSE`, and so on.
83 +
84 +- If there is a "files" list in
85 + [`package.json`](/cli/v7/configuring-npm/package-json), then only the files
86 + specified will be included. (If directories are specified, then they
87 + will be walked recursively and their contents included, subject to the
88 + same ignore rules.)
89 +
90 +- If there is a `.gitignore` or `.npmignore` file, then ignored files in
91 + that and all child directories will be excluded from the package. If
92 + _both_ files exist, then the `.gitignore` is ignored, and only the
93 + `.npmignore` is used.
94 +
95 + `.npmignore` files follow the [same pattern
96 + rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring)
97 + as `.gitignore` files
98 +
99 +- If the file matches certain patterns, then it will _never_ be included,
100 + unless explicitly added to the `"files"` list in `package.json`, or
101 + un-ignored with a `!` rule in a `.npmignore` or `.gitignore` file.
102 +
103 +- Symbolic links are never included in npm packages.
104 +
105 +
106 +See [`developers`](/cli/v7/using-npm/developers) for full details on what's
107 +included in the published package, as well as details on how the package is
108 +built.
109 +
110 +### See Also
111 +
112 +* [npm-packlist package](http://npm.im/npm-packlist)
113 +* [npm registry](/cli/v7/using-npm/registry)
114 +* [npm scope](/cli/v7/using-npm/scope)
115 +* [npm adduser](/cli/v7/commands/npm-adduser)
116 +* [npm owner](/cli/v7/commands/npm-owner)
117 +* [npm deprecate](/cli/v7/commands/npm-deprecate)
118 +* [npm dist-tag](/cli/v7/commands/npm-dist-tag)
119 +* [npm pack](/cli/v7/commands/npm-pack)
120 +* [npm profile](/cli/v7/commands/npm-profile)
content/cli/v7/commands/npm-rebuild.md new
+39
@@ -0,0 +1,39 @@
1 +---
2 +title: npm-rebuild
3 +section: 1
4 +description: Rebuild a package
5 +redirect_from:
6 + - /cli/rebuild
7 + - /cli/rebuild.html
8 + - /cli/commands/rebuild
9 + - /cli-commands/rebuild
10 + - /cli-commands/rebuild.html
11 + - /cli-commands/npm-rebuild
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-rebuild.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm rebuild [[<@scope>/]<name>[@<version>] ...]
21 +
22 +alias: rb
23 +```
24 +
25 +### Description
26 +
27 +This command runs the `npm build` command on the matched folders. This is
28 +useful when you install a new version of node, and must recompile all your
29 +C++ addons with the new binary. It is also useful when installing with
30 +`--ignore-scripts` and `--no-bin-links`, to explicitly choose which
31 +packages to build and/or link bins.
32 +
33 +If one or more package names (and optionally version ranges) are provided,
34 +then only packages with a name and version matching one of the specifiers
35 +will be rebuilt.
36 +
37 +### See Also
38 +
39 +* [npm install](/cli/v7/commands/npm-install)
content/cli/v7/commands/npm-repo.md new
+60
@@ -0,0 +1,60 @@
1 +---
2 +title: npm-repo
3 +section: 1
4 +description: Open package repository page in the browser
5 +redirect_from:
6 + - /cli/repo
7 + - /cli/repo.html
8 + - /cli/commands/repo
9 + - /cli-commands/repo
10 + - /cli-commands/repo.html
11 + - /cli-commands/npm-repo
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-repo.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm repo [<pkgname> [<pkgname> ...]]
21 +```
22 +
23 +### Description
24 +
25 +This command tries to guess at the likely location of a package's
26 +repository URL, and then tries to open it using the `--browser` config
27 +param. If no package name is provided, it will search for a `package.json`
28 +in the current folder and use the `repository` property.
29 +
30 +### Configuration
31 +
32 +#### browser
33 +
34 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
35 +* Type: String or Boolean
36 +
37 +The browser that is called by the `npm repo` command to open websites.
38 +
39 +Set to `false` to suppress browser behavior and instead print urls to
40 +terminal.
41 +
42 +Set to `true` to use default system URL opener.
43 +
44 +#### workspaces
45 +
46 +Enables workspaces context while searching the `package.json` in the
47 +current folder. Repo urls for the packages named in each workspace will
48 +be opened.
49 +
50 +#### workspace
51 +
52 +Enables workspaces context and limits results to only those specified by
53 +this config item. Only the repo urls for the packages named in the
54 +workspaces given here will be opened.
55 +
56 +
57 +### See Also
58 +
59 +* [npm docs](/cli/v7/commands/npm-docs)
60 +* [npm config](/cli/v7/commands/npm-config)
content/cli/v7/commands/npm-restart.md new
+54
@@ -0,0 +1,54 @@
1 +---
2 +title: npm-restart
3 +section: 1
4 +description: Restart a package
5 +redirect_from:
6 + - /cli/restart
7 + - /cli/restart.html
8 + - /cli/commands/restart
9 + - /cli-commands/restart
10 + - /cli-commands/restart.html
11 + - /cli-commands/npm-restart
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-restart.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm restart [-- <args>]
21 +```
22 +
23 +### Description
24 +
25 +This restarts a project. It is equivalent to running `npm run-script
26 +restart`.
27 +
28 +If the current project has a `"restart"` script specified in
29 +`package.json`, then the following scripts will be run:
30 +
31 +1. prerestart
32 +2. restart
33 +3. postrestart
34 +
35 +If it does _not_ have a `"restart"` script specified, but it does have
36 +`stop` and/or `start` scripts, then the following scripts will be run:
37 +
38 +1. prerestart
39 +2. prestop
40 +3. stop
41 +4. poststop
42 +6. prestart
43 +7. start
44 +8. poststart
45 +9. postrestart
46 +
47 +### See Also
48 +
49 +* [npm run-script](/cli/v7/commands/npm-run-script)
50 +* [npm scripts](/cli/v7/using-npm/scripts)
51 +* [npm test](/cli/v7/commands/npm-test)
52 +* [npm start](/cli/v7/commands/npm-start)
53 +* [npm stop](/cli/v7/commands/npm-stop)
54 +* [npm restart](/cli/v7/commands/npm-restart)
content/cli/v7/commands/npm-root.md new
+42
@@ -0,0 +1,42 @@
1 +---
2 +title: npm-root
3 +section: 1
4 +description: Display npm root
5 +redirect_from:
6 + - /cli/root
7 + - /cli/root.html
8 + - /cli/commands/root
9 + - /cli-commands/root
10 + - /cli-commands/root.html
11 + - /cli-commands/npm-root
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-root.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm root [-g]
21 +```
22 +
23 +### Description
24 +
25 +Print the effective `node_modules` folder to standard out.
26 +
27 +Useful for using npm in shell scripts that do things with the
28 +`node_modules` folder. For example:
29 +
30 +```bash
31 +#!/bin/bash
32 +global_node_modules="$(npm root --global)"
33 +echo "Global packages installed in: ${global_node_modules}"
34 +```
35 +
36 +### See Also
37 +
38 +* [npm prefix](/cli/v7/commands/npm-prefix)
39 +* [npm bin](/cli/v7/commands/npm-bin)
40 +* [npm folders](/cli/v7/configuring-npm/folders)
41 +* [npm config](/cli/v7/commands/npm-config)
42 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-run-script.md new
+216
@@ -0,0 +1,216 @@
1 +---
2 +title: npm-run-script
3 +section: 1
4 +description: Run arbitrary package scripts
5 +redirect_from:
6 + - /cli/run-script
7 + - /cli/run-script.html
8 + - /cli/commands/run-script
9 + - /cli-commands/run-script
10 + - /cli-commands/run-script.html
11 + - /cli-commands/npm-run-script
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-run-script.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm run-script <command> [--if-present] [--silent] [-- <args>]
21 +npm run-script <command> [--workspace=<workspace-name>]
22 +npm run-script <command> [--workspaces]
23 +
24 +aliases: run, rum, urn
25 +```
26 +
27 +### Description
28 +
29 +This runs an arbitrary command from a package's `"scripts"` object. If no
30 +`"command"` is provided, it will list the available scripts.
31 +
32 +`run[-script]` is used by the test, start, restart, and stop commands, but
33 +can be called directly, as well. When the scripts in the package are
34 +printed out, they're separated into lifecycle (test, start, restart) and
35 +directly-run scripts.
36 +
37 +Any positional arguments are passed to the specified script. Use `--` to
38 +pass `-`-prefixed flags and options which would otherwise be parsed by npm.
39 +
40 +For example:
41 +
42 +```bash
43 +npm run test -- --grep="pattern"
44 +```
45 +
46 +The arguments will only be passed to the script specified after ```npm run```
47 +and not to any `pre` or `post` script.
48 +
49 +The `env` script is a special built-in command that can be used to list
50 +environment variables that will be available to the script at runtime. If an
51 +"env" command is defined in your package, it will take precedence over the
52 +built-in.
53 +
54 +In addition to the shell's pre-existing `PATH`, `npm run` adds
55 +`node_modules/.bin` to the `PATH` provided to scripts. Any binaries
56 +provided by locally-installed dependencies can be used without the
57 +`node_modules/.bin` prefix. For example, if there is a `devDependency` on
58 +`tap` in your package, you should write:
59 +
60 +```bash
61 +"scripts": {"test": "tap test/*.js"}
62 +```
63 +
64 +instead of
65 +
66 +```bash
67 +"scripts": {"test": "node_modules/.bin/tap test/*.js"}
68 +```
69 +
70 +The actual shell your script is run within is platform dependent. By default,
71 +on Unix-like systems it is the `/bin/sh` command, on Windows it is
72 +`cmd.exe`.
73 +The actual shell referred to by `/bin/sh` also depends on the system.
74 +You can customize the shell with the `script-shell` configuration.
75 +
76 +Scripts are run from the root of the package folder, regardless of what the
77 +current working directory is when `npm run` is called. If you want your
78 +script to use different behavior based on what subdirectory you're in, you
79 +can use the `INIT_CWD` environment variable, which holds the full path you
80 +were in when you ran `npm run`.
81 +
82 +`npm run` sets the `NODE` environment variable to the `node` executable
83 +with which `npm` is executed. Also, if the `--scripts-prepend-node-path` is
84 +passed, the directory within which `node` resides is added to the `PATH`.
85 +If `--scripts-prepend-node-path=auto` is passed (which has been the default
86 +in `npm` v3), this is only performed when that `node` executable is not
87 +found in the `PATH`.
88 +
89 +If you try to run a script without having a `node_modules` directory and it
90 +fails, you will be given a warning to run `npm install`, just in case you've
91 +forgotten.
92 +
93 +### Workspaces support
94 +
95 +You may use the `workspace` or `workspaces` configs in order to run an
96 +arbitrary command from a package's `"scripts"` object in the context of the
97 +specified workspaces. If no `"command"` is provided, it will list the available
98 +scripts for each of these configured workspaces.
99 +
100 +Given a project with configured workspaces, e.g:
101 +
102 +```
103 +.
104 ++-- package.json
105 +`-- packages
106 + +-- a
107 + | `-- package.json
108 + +-- b
109 + | `-- package.json
110 + `-- c
111 + `-- package.json
112 +```
113 +
114 +Assuming the workspace configuration is properly set up at the root level
115 +`package.json` file. e.g:
116 +
117 +```
118 +{
119 + "workspaces": [ "./packages/*" ]
120 +}
121 +```
122 +
123 +And that each of the configured workspaces has a configured `test` script,
124 +we can run tests in all of them using the `workspaces` config:
125 +
126 +```
127 +npm test --workspaces
128 +```
129 +
130 +#### Filtering workspaces
131 +
132 +It's also possible to run a script in a single workspace using the `workspace`
133 +config along with a name or directory path:
134 +
135 +```
136 +npm test --workspace=a
137 +```
138 +
139 +The `workspace` config can also be specified multiple times in order to run a
140 +specific script in the context of multiple workspaces. When defining values for
141 +the `workspace` config in the command line, it also possible to use `-w` as a
142 +shorthand, e.g:
143 +
144 +```
145 +npm test -w a -w b
146 +```
147 +
148 +This last command will run `test` in both `./packages/a` and `./packages/b`
149 +packages.
150 +
151 +
152 +### Configuration
153 +
154 +#### if-present
155 +
156 +* Type: Boolean
157 +* Default: false
158 +
159 +You can use the `--if-present` flag to avoid exiting with a non-zero exit code
160 +when the script is undefined. This lets you run potentially undefined scripts
161 +without breaking the execution chain.
162 +
163 +#### ignore-scripts
164 +
165 +* Type: Boolean
166 +* Default: false
167 +
168 +Skips running `pre` and `post` scripts.
169 +
170 +#### script-shell
171 +
172 +* Type: String
173 +* Default: `null`
174 +
175 +Optional custom script to use to execute the command. If not defined defaults
176 +to `/bin/sh` on Unix, defaults to `env.comspec` or `cmd.exe` on Windows.
177 +
178 +#### silent
179 +
180 +* Type: Boolean
181 +* Default: false
182 +
183 +You can use the `--silent` flag to prevent showing `npm ERR!` output on error.
184 +
185 +#### workspace
186 +
187 +* Alias: `-w`
188 +* Type: Array
189 +* Default: `[]`
190 +
191 +Enable running scripts in the context of workspaces while also filtering by
192 +the provided names or paths provided.
193 +
194 +Valid values for the `workspace` config are either:
195 +- Workspace names
196 +- Path to a workspace directory
197 +- Path to a parent workspace directory (will result to selecting all of the
198 +children workspaces)
199 +
200 +#### workspaces
201 +
202 +* Alias: `-ws`
203 +* Type: Boolean
204 +* Default: `false`
205 +
206 +Run scripts in the context of all configured workspaces for the current
207 +project.
208 +
209 +### See Also
210 +
211 +* [npm scripts](/cli/v7/using-npm/scripts)
212 +* [npm test](/cli/v7/commands/npm-test)
213 +* [npm start](/cli/v7/commands/npm-start)
214 +* [npm restart](/cli/v7/commands/npm-restart)
215 +* [npm stop](/cli/v7/commands/npm-stop)
216 +* [npm config](/cli/v7/commands/npm-config)
content/cli/v7/commands/npm-search.md new
+145
@@ -0,0 +1,145 @@
1 +---
2 +title: npm-search
3 +section: 1
4 +description: Search for packages
5 +redirect_from:
6 + - /cli/search
7 + - /cli/search.html
8 + - /cli/commands/search
9 + - /cli-commands/search
10 + - /cli-commands/search.html
11 + - /cli-commands/npm-search
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-search.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]
21 +
22 +aliases: s, se, find
23 +```
24 +
25 +Note: This command is unaware of workspaces.
26 +
27 +### Description
28 +
29 +Search the registry for packages matching the search terms. `npm search`
30 +performs a linear, incremental, lexically-ordered search through package
31 +metadata for all files in the registry. If your terminal has color
32 +support, it will further highlight the matches in the results. This can
33 +be disabled with the config item `color`
34 +
35 +Additionally, using the `--searchopts` and `--searchexclude` options
36 +paired with more search terms will include and exclude further patterns.
37 +The main difference between `--searchopts` and the standard search terms
38 +is that the former does not highlight results in the output and you can
39 +use them more fine-grained filtering. Additionally, you can add both of
40 +these to your config to change default search filtering behavior.
41 +
42 +Search also allows targeting of maintainers in search results, by prefixing
43 +their npm username with `=`.
44 +
45 +If a term starts with `/`, then it's interpreted as a regular expression
46 +and supports standard JavaScript RegExp syntax. In this case search will
47 +ignore a trailing `/` . (Note you must escape or quote many regular
48 +expression characters in most shells.)
49 +
50 +### Configuration
51 +
52 +All of the following can be defined in a `.npmrc` file, or passed as
53 +parameters to the cli prefixed with `--` (e.g. `--json`)
54 +
55 +#### description
56 +
57 +* Default: true
58 +* Type: Boolean
59 +
60 +#### color
61 +
62 + * Default: true
63 + * Type: Boolean
64 +
65 +Used as `--no-color`, disables color highlighting of matches in the
66 +results.
67 +
68 +#### json
69 +
70 +* Default: false
71 +* Type: Boolean
72 +
73 +Output search results as a JSON array.
74 +
75 +#### parseable
76 +
77 +* Default: false
78 +* Type: Boolean
79 +
80 +Output search results as lines with tab-separated columns.
81 +
82 +#### long
83 +
84 +* Default: false
85 +* Type: Boolean
86 +
87 +Display full package descriptions and other long text across multiple
88 +lines. When disabled (which is the default) the output will
89 +truncate search results to fit neatly on a single line. Modules with
90 +extremely long names will fall on multiple lines.
91 +
92 +#### searchopts
93 +
94 +* Default: ""
95 +* Type: String
96 +
97 +Space-separated options that are always passed to search.
98 +
99 +#### searchexclude
100 +
101 +* Default: ""
102 +* Type: String
103 +
104 +Space-separated options that limit the results from search.
105 +
106 +#### registry
107 +
108 + * Default: https://registry.npmjs.org/
109 + * Type: url
110 +
111 +Search the specified registry for modules. If you have configured npm to
112 +point to a different default registry (such as your internal private
113 +module repository), `npm search` will also default to that registry when
114 +searching.
115 +
116 +### A note on caching
117 +
118 +The npm cli caches search results with the same terms and options
119 +locally in its cache. You can use the following to change how and when
120 +the cli uses this cache. See [`npm cache`](/cli/v7/commands/npm-cache) for more
121 +on how the cache works.
122 +
123 +#### prefer-online
124 +
125 +Forces staleness checks for cached searches, making the cli look for
126 +updates immediately even for fresh search results.
127 +
128 +#### prefer-offline
129 +
130 +Bypasses staleness checks for cached searches. Missing data will still
131 +be requested from the server. To force full offline mode, use `offline`.
132 +
133 +#### offline
134 +
135 +Forces full offline mode. Any searches not locally cached will result in
136 +an error.
137 +
138 +### See Also
139 +
140 +* [npm registry](/cli/v7/using-npm/registry)
141 +* [npm config](/cli/v7/commands/npm-config)
142 +* [npmrc](/cli/v7/configuring-npm/npmrc)
143 +* [npm view](/cli/v7/commands/npm-view)
144 +* [npm cache](/cli/v7/commands/npm-cache)
145 +* https://npm.im/npm-registry-fetch
content/cli/v7/commands/npm-set-script.md new
+57
@@ -0,0 +1,57 @@
1 +---
2 +title: npm-set-script
3 +section: 1
4 +description: Set tasks in the scripts section of package.json
5 +redirect_from:
6 + - /cli/set-script
7 + - /cli/set-script.html
8 + - /cli/commands/set-script
9 + - /cli-commands/set-script
10 + - /cli-commands/set-script.html
11 + - /cli-commands/npm-set-script
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-set-script.md
15 +---
16 +
17 +### Synopsis
18 +An npm command that lets you create a task in the `scripts` section of the `package.json`.
19 +
20 +```bash
21 +npm set-script [<script>] [<command>]
22 +```
23 +
24 +
25 +**Example:**
26 +
27 +* `npm set-script start "http-server ."`
28 +
29 +```json
30 +{
31 + "name": "my-project",
32 + "scripts": {
33 + "start": "http-server .",
34 + "test": "some existing value"
35 + }
36 +}
37 +```
38 +
39 +### Configuration
40 +
41 +#### workspaces
42 +
43 +Enables workspaces context. Tasks will be created in the `scripts` section
44 +of the `package.json` of each workspace.
45 +
46 +#### workspace
47 +
48 +Enables workspaces context and limits creating a task to the
49 +`package.json` files of the workspaces given.
50 +
51 +
52 +### See Also
53 +
54 +* [npm run-script](/cli/v7/commands/npm-run-script)
55 +* [npm install](/cli/v7/commands/npm-install)
56 +* [npm test](/cli/v7/commands/npm-test)
57 +* [npm start](/cli/v7/commands/npm-start)
content/cli/v7/commands/npm-shrinkwrap.md new
+42
@@ -0,0 +1,42 @@
1 +---
2 +title: npm-shrinkwrap
3 +section: 1
4 +description: Lock down dependency versions for publication
5 +redirect_from:
6 + - /cli/shrinkwrap
7 + - /cli/shrinkwrap.html
8 + - /cli/commands/shrinkwrap
9 + - /cli-commands/shrinkwrap
10 + - /cli-commands/shrinkwrap.html
11 + - /cli-commands/npm-shrinkwrap
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-shrinkwrap.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm shrinkwrap
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +This command repurposes `package-lock.json` into a publishable
28 +`npm-shrinkwrap.json` or simply creates a new one. The file created and
29 +updated by this command will then take precedence over any other existing
30 +or future `package-lock.json` files. For a detailed explanation of the
31 +design and purpose of package locks in npm, see
32 +[package-lock-json](/cli/v7/configuring-npm/package-lock-json).
33 +
34 +### See Also
35 +
36 +* [npm install](/cli/v7/commands/npm-install)
37 +* [npm run-script](/cli/v7/commands/npm-run-script)
38 +* [npm scripts](/cli/v7/using-npm/scripts)
39 +* [package.json](/cli/v7/configuring-npm/package-json)
40 +* [package-lock.json](/cli/v7/configuring-npm/package-lock-json)
41 +* [npm-shrinkwrap.json](/cli/v7/configuring-npm/npm-shrinkwrap-json)
42 +* [npm ls](/cli/v7/commands/npm-ls)
content/cli/v7/commands/npm-star.md new
+52
@@ -0,0 +1,52 @@
1 +---
2 +title: npm-star
3 +section: 1
4 +description: Mark your favorite packages
5 +redirect_from:
6 + - /cli/star
7 + - /cli/star.html
8 + - /cli/commands/star
9 + - /cli-commands/star
10 + - /cli-commands/star.html
11 + - /cli-commands/npm-star
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-star.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm star [<pkg>...]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +"Starring" a package means that you have some interest in it. It's
28 +a vaguely positive way to show that you care.
29 +
30 +It's a boolean thing. Starring repeatedly has no additional effect.
31 +
32 +### More
33 +
34 +There's also these extra commands to help you manage your favorite packages:
35 +
36 +#### Unstar
37 +
38 +You can also "unstar" a package using [`npm unstar`](/cli/v7/commands/npm-unstar)
39 +
40 +"Unstarring" is the same thing, but in reverse.
41 +
42 +#### Listing stars
43 +
44 +You can see all your starred packages using [`npm stars`](/cli/v7/commands/npm-stars)
45 +
46 +### See Also
47 +
48 +* [npm unstar](/cli/v7/commands/npm-unstar)
49 +* [npm stars](/cli/v7/commands/npm-stars)
50 +* [npm view](/cli/v7/commands/npm-view)
51 +* [npm whoami](/cli/v7/commands/npm-whoami)
52 +* [npm adduser](/cli/v7/commands/npm-adduser)
content/cli/v7/commands/npm-stars.md new
+38
@@ -0,0 +1,38 @@
1 +---
2 +title: npm-stars
3 +section: 1
4 +description: View packages marked as favorites
5 +redirect_from:
6 + - /cli/stars
7 + - /cli/stars.html
8 + - /cli/commands/stars
9 + - /cli-commands/stars
10 + - /cli-commands/stars.html
11 + - /cli-commands/npm-stars
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-stars.md
15 +---
16 +
17 +### Synopsis
18 +```bash
19 +npm stars [<user>]
20 +```
21 +
22 +Note: This command is unaware of workspaces.
23 +
24 +### Description
25 +
26 +If you have starred a lot of neat things and want to find them again
27 +quickly this command lets you do just that.
28 +
29 +You may also want to see your friend's favorite packages, in this case
30 +you will most certainly enjoy this command.
31 +
32 +### See Also
33 +
34 +* [npm star](/cli/v7/commands/npm-star)
35 +* [npm unstar](/cli/v7/commands/npm-unstar)
36 +* [npm view](/cli/v7/commands/npm-view)
37 +* [npm whoami](/cli/v7/commands/npm-whoami)
38 +* [npm adduser](/cli/v7/commands/npm-adduser)
content/cli/v7/commands/npm-start.md new
+64
@@ -0,0 +1,64 @@
1 +---
2 +title: npm-start
3 +section: 1
4 +description: Start a package
5 +redirect_from:
6 + - /cli/start
7 + - /cli/start.html
8 + - /cli/commands/start
9 + - /cli-commands/start
10 + - /cli-commands/start.html
11 + - /cli-commands/npm-start
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-start.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm start [-- <args>]
21 +```
22 +
23 +### Description
24 +
25 +This runs a predefined command specified in the `"start"` property of
26 +a package's `"scripts"` object.
27 +
28 +If the `"scripts"` object does not define a `"start"` property, npm
29 +will run `node server.js`.
30 +
31 +Note that this is different from the default node behavior of running
32 +the file specified in a package's `"main"` attribute when evoking with
33 +`node .`
34 +
35 +As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
36 +use custom arguments when executing scripts. Refer to [`npm run-script`](/cli/v7/commands/npm-run-script) for more details.
37 +
38 +### Example
39 +
40 +```json
41 +{
42 + "scripts": {
43 + "start": "node foo.js"
44 + }
45 +}
46 +```
47 +
48 +```bash
49 +npm start
50 +
51 +> npm@x.x.x start
52 +> node foo.js
53 +
54 +(foo.js output would be here)
55 +
56 +```
57 +
58 +### See Also
59 +
60 +* [npm run-script](/cli/v7/commands/npm-run-script)
61 +* [npm scripts](/cli/v7/using-npm/scripts)
62 +* [npm test](/cli/v7/commands/npm-test)
63 +* [npm restart](/cli/v7/commands/npm-restart)
64 +* [npm stop](/cli/v7/commands/npm-stop)
content/cli/v7/commands/npm-stop.md new
+57
@@ -0,0 +1,57 @@
1 +---
2 +title: npm-stop
3 +section: 1
4 +description: Stop a package
5 +redirect_from:
6 + - /cli/stop
7 + - /cli/stop.html
8 + - /cli/commands/stop
9 + - /cli-commands/stop
10 + - /cli-commands/stop.html
11 + - /cli-commands/npm-stop
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-stop.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm stop [-- <args>]
21 +```
22 +
23 +### Description
24 +
25 +This runs a predefined command specified in the "stop" property of a
26 +package's "scripts" object.
27 +
28 +Unlike with [npm start](/cli/v7/commands/npm-start), there is no default script
29 +that will run if the `"stop"` property is not defined.
30 +
31 +### Example
32 +
33 +```json
34 +{
35 + "scripts": {
36 + "stop": "node bar.js"
37 + }
38 +}
39 +```
40 +
41 +```bash
42 +npm stop
43 +
44 +> npm@x.x.x stop
45 +> node bar.js
46 +
47 +(bar.js output would be here)
48 +
49 +```
50 +
51 +### See Also
52 +
53 +* [npm run-script](/cli/v7/commands/npm-run-script)
54 +* [npm scripts](/cli/v7/using-npm/scripts)
55 +* [npm test](/cli/v7/commands/npm-test)
56 +* [npm start](/cli/v7/commands/npm-start)
57 +* [npm restart](/cli/v7/commands/npm-restart)
content/cli/v7/commands/npm-team.md new
+118
@@ -0,0 +1,118 @@
1 +---
2 +title: npm-team
3 +section: 1
4 +description: Manage organization teams and team memberships
5 +redirect_from:
6 + - /cli/team
7 + - /cli/team.html
8 + - /cli/commands/team
9 + - /cli-commands/team
10 + - /cli-commands/team.html
11 + - /cli-commands/npm-team
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-team.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm team create <scope:team>
21 +npm team destroy <scope:team>
22 +
23 +npm team add <scope:team> <user>
24 +npm team rm <scope:team> <user>
25 +
26 +npm team ls <scope>|<scope:team>
27 +```
28 +
29 +Note: This command is unaware of workspaces.
30 +
31 +### Description
32 +
33 +Used to manage teams in organizations, and change team memberships. Does not
34 +handle permissions for packages.
35 +
36 +Teams must always be fully qualified with the organization/scope they belong to
37 +when operating on them, separated by a colon (`:`). That is, if you have a
38 +`newteam` team in an `org` organization, you must always refer to that team
39 +as `@org:newteam` in these commands.
40 +
41 +If you have two-factor authentication enabled in `auth-and-writes` mode, then
42 +you can provide a code from your authenticator with `[--otp <otpcode>]`.
43 +If you don't include this then you will be prompted.
44 +
45 +* create / destroy:
46 + Create a new team, or destroy an existing one. Note: You cannot remove the
47 + `developers` team, <a href="https://docs.npmjs.com/about-developers-team" target="_blank">learn more.</a>
48 +
49 + Here's how to create a new team `newteam` under the `org` org:
50 +
51 + ```bash
52 + npm team create @org:newteam
53 + ```
54 +
55 + You should see a confirming message such as: `+@org:newteam` once the new
56 + team has been created.
57 +
58 +* add:
59 + Add a user to an existing team.
60 +
61 + Adding a new user `username` to a team named `newteam` under the `org` org:
62 +
63 + ```bash
64 + npm team add @org:newteam username
65 + ```
66 +
67 + On success, you should see a message: `username added to @org:newteam`
68 +
69 +* rm:
70 + Using `npm team rm` you can also remove users from a team they belong to.
71 +
72 + Here's an example removing user `username` from `newteam` team
73 + in `org` organization:
74 +
75 + ```bash
76 + npm team rm @org:newteam username
77 + ```
78 +
79 + Once the user is removed a confirmation message is displayed:
80 + `username removed from @org:newteam`
81 +
82 +* ls:
83 + If performed on an organization name, will return a list of existing teams
84 + under that organization. If performed on a team, it will instead return a list
85 + of all users belonging to that particular team.
86 +
87 + Here's an example of how to list all teams from an org named `org`:
88 +
89 + ```bash
90 + npm team ls @org
91 + ```
92 +
93 + Example listing all members of a team named `newteam`:
94 +
95 + ```bash
96 + npm team ls @org:newteam
97 + ```
98 +
99 +### Details
100 +
101 +`npm team` always operates directly on the current registry, configurable from
102 +the command line using `--registry=<registry url>`.
103 +
104 +You must be a *team admin* to create teams and manage team membership, under
105 +the given organization. Listing teams and team memberships may be done by
106 +any member of the organization.
107 +
108 +Organization creation and management of team admins and *organization* members
109 +is done through the website, not the npm CLI.
110 +
111 +To use teams to manage permissions on packages belonging to your organization,
112 +use the `npm access` command to grant or revoke the appropriate permissions.
113 +
114 +### See Also
115 +
116 +* [npm access](/cli/v7/commands/npm-access)
117 +* [npm config](/cli/v7/commands/npm-config)
118 +* [npm registry](/cli/v7/using-npm/registry)
content/cli/v7/commands/npm-test.md new
+56
@@ -0,0 +1,56 @@
1 +---
2 +title: npm-test
3 +section: 1
4 +description: Test a package
5 +redirect_from:
6 + - /cli/test
7 + - /cli/test.html
8 + - /cli/commands/test
9 + - /cli-commands/test
10 + - /cli-commands/test.html
11 + - /cli-commands/npm-test
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-test.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm test [-- <args>]
21 +
22 +aliases: t, tst
23 +```
24 +
25 +### Description
26 +
27 +This runs a predefined command specified in the `"test"` property of
28 +a package's `"scripts"` object.
29 +
30 +### Example
31 +
32 +```json
33 +{
34 + "scripts": {
35 + "test": "node test.js"
36 + }
37 +}
38 +```
39 +
40 +```bash
41 +npm test
42 +> npm@x.x.x test
43 +> node test.js
44 +
45 +(test.js output would be here)
46 +```
47 +
48 +
49 +
50 +### See Also
51 +
52 +* [npm run-script](/cli/v7/commands/npm-run-script)
53 +* [npm scripts](/cli/v7/using-npm/scripts)
54 +* [npm start](/cli/v7/commands/npm-start)
55 +* [npm restart](/cli/v7/commands/npm-restart)
56 +* [npm stop](/cli/v7/commands/npm-stop)
content/cli/v7/commands/npm-token.md new
+85
@@ -0,0 +1,85 @@
1 +---
2 +title: npm-token
3 +section: 1
4 +description: Manage your authentication tokens
5 +redirect_from:
6 + - /cli/token
7 + - /cli/token.html
8 + - /cli/commands/token
9 + - /cli-commands/token
10 + - /cli-commands/token.html
11 + - /cli-commands/npm-token
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-token.md
15 +---
16 +
17 +### Synopsis
18 +```bash
19 + npm token list [--json|--parseable]
20 + npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]
21 + npm token revoke <id|token>
22 +```
23 +
24 +Note: This command is unaware of workspaces.
25 +
26 +### Description
27 +
28 +This lets you list, create and revoke authentication tokens.
29 +
30 +* `npm token list`:
31 + Shows a table of all active authentication tokens. You can request
32 + this as JSON with `--json` or tab-separated values with `--parseable`.
33 +
34 +```bash
35 ++--------+---------+------------+----------+----------------+
36 +| id | token | created | read-only | CIDR whitelist |
37 ++--------+---------+------------+----------+----------------+
38 +| 7f3134 | 1fa9ba… | 2017-10-02 | yes | |
39 ++--------+---------+------------+----------+----------------+
40 +| c03241 | af7aef… | 2017-10-02 | no | 192.168.0.1/24 |
41 ++--------+---------+------------+----------+----------------+
42 +| e0cf92 | 3a436a… | 2017-10-02 | no | |
43 ++--------+---------+------------+----------+----------------+
44 +| 63eb9d | 74ef35… | 2017-09-28 | no | |
45 ++--------+---------+------------+----------+----------------+
46 +| 2daaa8 | cbad5f… | 2017-09-26 | no | |
47 ++--------+---------+------------+----------+----------------+
48 +| 68c2fe | 127e51… | 2017-09-23 | no | |
49 ++--------+---------+------------+----------+----------------+
50 +| 6334e1 | 1dadd1… | 2017-09-23 | no | |
51 ++--------+---------+------------+----------+----------------+
52 +```
53 +
54 +* `npm token create [--read-only] [--cidr=<cidr-ranges>]`:
55 + Create a new authentication token. It can be `--read-only`, or accept
56 + a list of
57 + [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
58 + ranges with which to limit use of this token. This will prompt you for
59 + your password, and, if you have two-factor authentication enabled, an
60 + otp.
61 +
62 + Currently, the cli can not generate automation tokens. Please refer to
63 + the [docs
64 + website](https://docs.npmjs.com/creating-and-viewing-access-tokens)
65 + for more information on generating automation tokens.
66 +
67 +```bash
68 ++----------------+--------------------------------------+
69 +| token | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
70 ++----------------+--------------------------------------+
71 +| cidr_whitelist | |
72 ++----------------+--------------------------------------+
73 +| readonly | false |
74 ++----------------+--------------------------------------+
75 +| created | 2017-10-02T07:52:24.838Z |
76 ++----------------+--------------------------------------+
77 +```
78 +
79 +* `npm token revoke <token|id>`:
80 + Immediately removes an authentication token from the registry. You
81 + will no longer be able to use it. This can accept both complete
82 + tokens (such as those you get back from `npm token create`, and those
83 + found in your `.npmrc`), and ids as seen in the parseable or json
84 + output of `npm token list`. This will NOT accept the truncated token
85 + found in the normal `npm token list` output.
content/cli/v7/commands/npm-uninstall.md new
+73
@@ -0,0 +1,73 @@
1 +---
2 +title: npm-uninstall
3 +section: 1
4 +description: Remove a package
5 +redirect_from:
6 + - /cli/uninstall
7 + - /cli/uninstall.html
8 + - /cli/commands/uninstall
9 + - /cli-commands/uninstall
10 + - /cli-commands/uninstall.html
11 + - /cli-commands/npm-uninstall
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-uninstall.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm uninstall [<@scope>/]<pkg>[@<version>]... [-S|--save|--no-save]
21 +
22 +aliases: remove, rm, r, un, unlink
23 +```
24 +
25 +### Description
26 +
27 +This uninstalls a package, completely removing everything npm installed
28 +on its behalf.
29 +
30 +It also removes the package from the `dependencies`, `devDependencies`,
31 +`optionalDependencies`, and `peerDependencies` objects in your
32 +`package.json`.
33 +
34 +Futher, if you have an `npm-shrinkwrap.json` or `package-lock.json`, npm
35 +will update those files as well.
36 +
37 +`--no-save` will tell npm not to remove the package from your
38 +`package.json`, `npm-shrinkwrap.json`, or `package-lock.json` files.
39 +
40 +`--save` or `-S` will tell npm to remove the package from your
41 +`package.json`, `npm-shrinkwrap.json`, and `package-lock.json` files.
42 +This is the default, but you may need to use this if you have for
43 +instance `save=false` in your `npmrc` file
44 +
45 +In global mode (ie, with `-g` or `--global` appended to the command),
46 +it uninstalls the current package context as a global package.
47 +`--no-save` is ignored in this case.
48 +
49 +Scope is optional and follows the usual rules for [`scope`](/cli/v7/using-npm/scope).
50 +
51 +### Examples
52 +
53 +```bash
54 +npm uninstall sax
55 +```
56 +
57 +`sax` will no longer be in your `package.json`, `npm-shrinkwrap.json`, or
58 +`package-lock.json` files.
59 +
60 +```bash
61 +npm uninstall lodash --no-save
62 +```
63 +
64 +`lodash` will not be removed from your `package.json`,
65 +`npm-shrinkwrap.json`, or `package-lock.json` files.
66 +
67 +### See Also
68 +
69 +* [npm prune](/cli/v7/commands/npm-prune)
70 +* [npm install](/cli/v7/commands/npm-install)
71 +* [npm folders](/cli/v7/configuring-npm/folders)
72 +* [npm config](/cli/v7/commands/npm-config)
73 +* [npmrc](/cli/v7/configuring-npm/npmrc)
content/cli/v7/commands/npm-unpublish.md new
+65
@@ -0,0 +1,65 @@
1 +---
2 +title: npm-unpublish
3 +section: 1
4 +description: Remove a package from the registry
5 +redirect_from:
6 + - /cli/unpublish
7 + - /cli/unpublish.html
8 + - /cli/commands/unpublish
9 + - /cli-commands/unpublish
10 + - /cli-commands/unpublish.html
11 + - /cli-commands/npm-unpublish
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-unpublish.md
15 +---
16 +
17 +### Synopsis
18 +
19 +To learn more about how the npm registry treats unpublish, see our <a
20 +href="https://www.npmjs.com/policies/unpublish" target="_blank"
21 +rel="noopener noreferrer"> unpublish policies</a>
22 +
23 +#### Unpublishing a single version of a package
24 +
25 +```bash
26 +npm unpublish [<@scope>/]<pkg>@<version>
27 +```
28 +
29 +#### Unpublishing an entire package
30 +
31 +```bash
32 +npm unpublish [<@scope>/]<pkg> --force
33 +```
34 +
35 +### Warning
36 +
37 +Consider using the [`deprecate`](/cli/v7/commands/npm-deprecate) command instead,
38 +if your intent is to encourage users to upgrade, or if you no longer
39 +want to maintain a package.
40 +
41 +### Description
42 +
43 +This removes a package version from the registry, deleting its entry and
44 +removing the tarball.
45 +
46 +The npm registry will return an error if you are not [logged
47 +in](/cli/v7/commands/npm-login).
48 +
49 +If you do not specify a version or if you remove all of a package's
50 +versions then the registry will remove the root package entry entirely.
51 +
52 +Even if you unpublish a package version, that specific name and version
53 +combination can never be reused. In order to publish the package again,
54 +you must use a new version number. If you unpublish the entire package,
55 +you may not publish any new versions of that package until 24 hours have
56 +passed.
57 +
58 +### See Also
59 +
60 +* [npm deprecate](/cli/v7/commands/npm-deprecate)
61 +* [npm publish](/cli/v7/commands/npm-publish)
62 +* [npm registry](/cli/v7/using-npm/registry)
63 +* [npm adduser](/cli/v7/commands/npm-adduser)
64 +* [npm owner](/cli/v7/commands/npm-owner)
65 +* [npm login](/cli/v7/commands/npm-login)
content/cli/v7/commands/npm-unstar.md new
+49
@@ -0,0 +1,49 @@
1 +---
2 +title: npm-unstar
3 +section: 1
4 +description: Remove an item from your favorite packages
5 +redirect_from:
6 + - /cli/unstar
7 + - /cli/unstar.html
8 + - /cli/commands/unstar
9 + - /cli-commands/unstar
10 + - /cli-commands/unstar.html
11 + - /cli-commands/npm-unstar
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-unstar.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm unstar [<pkg>...]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +"Unstarring" a package is the opposite of [`npm star`](/cli/v7/commands/npm-star),
28 +it removes an item from your list of favorite packages.
29 +
30 +### More
31 +
32 +There's also these extra commands to help you manage your favorite packages:
33 +
34 +#### Star
35 +
36 +You can "star" a package using [`npm star`](/cli/v7/commands/npm-star)
37 +
38 +#### Listing stars
39 +
40 +You can see all your starred packages using [`npm stars`](/cli/v7/commands/npm-stars)
41 +
42 +### See Also
43 +
44 +* [npm star](/cli/v7/commands/npm-star)
45 +* [npm stars](/cli/v7/commands/npm-stars)
46 +* [npm view](/cli/v7/commands/npm-view)
47 +* [npm whoami](/cli/v7/commands/npm-whoami)
48 +* [npm adduser](/cli/v7/commands/npm-adduser)
49 +
content/cli/v7/commands/npm-update.md new
+137
@@ -0,0 +1,137 @@
1 +---
2 +title: npm-update
3 +section: 1
4 +description: Update packages
5 +redirect_from:
6 + - /cli/update
7 + - /cli/update.html
8 + - /cli/commands/update
9 + - /cli-commands/update
10 + - /cli-commands/update.html
11 + - /cli-commands/npm-update
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-update.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm update [-g] [<pkg>...]
21 +
22 +aliases: up, upgrade
23 +```
24 +
25 +### Description
26 +
27 +This command will update all the packages listed to the latest version
28 +(specified by the `tag` config), respecting semver.
29 +
30 +It will also install missing packages. As with all commands that install
31 +packages, the `--dev` flag will cause `devDependencies` to be processed
32 +as well.
33 +
34 +If the `-g` flag is specified, this command will update globally installed
35 +packages.
36 +
37 +If no package name is specified, all packages in the specified location (global
38 +or local) will be updated.
39 +
40 +### Example
41 +
42 +For the examples below, assume that the current package is `app` and it depends
43 +on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1`
44 +are:
45 +
46 +```json
47 +{
48 + "dist-tags": { "latest": "1.2.2" },
49 + "versions": [
50 + "1.2.2",
51 + "1.2.1",
52 + "1.2.0",
53 + "1.1.2",
54 + "1.1.1",
55 + "1.0.0",
56 + "0.4.1",
57 + "0.4.0",
58 + "0.2.0"
59 + ]
60 +}
61 +```
62 +
63 +#### Caret Dependencies
64 +
65 +If `app`'s `package.json` contains:
66 +
67 +```json
68 +"dependencies": {
69 + "dep1": "^1.1.1"
70 +}
71 +```
72 +
73 +Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and
74 +`1.2.2` satisfies `^1.1.1`.
75 +
76 +#### Tilde Dependencies
77 +
78 +However, if `app`'s `package.json` contains:
79 +
80 +```json
81 +"dependencies": {
82 + "dep1": "~1.1.1"
83 +}
84 +```
85 +
86 +In this case, running `npm update` will install `dep1@1.1.2`. Even though the
87 +`latest` tag points to `1.2.2`, this version do not satisfy `~1.1.1`, which is
88 +equivalent to `>=1.1.1 <1.2.0`. So the highest-sorting version that satisfies
89 +`~1.1.1` is used, which is `1.1.2`.
90 +
91 +#### Caret Dependencies below 1.0.0
92 +
93 +Suppose `app` has a caret dependency on a version below `1.0.0`, for example:
94 +
95 +```json
96 +"dependencies": {
97 + "dep1": "^0.2.0"
98 +}
99 +```
100 +
101 +`npm update` will install `dep1@0.2.0`, because there are no other
102 +versions which satisfy `^0.2.0`.
103 +
104 +If the dependence were on `^0.4.0`:
105 +
106 +```json
107 +"dependencies": {
108 + "dep1": "^0.4.0"
109 +}
110 +```
111 +
112 +Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting
113 +version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`)
114 +
115 +
116 +#### Updating Globally-Installed Packages
117 +
118 +`npm update -g` will apply the `update` action to each globally installed
119 +package that is `outdated` -- that is, has a version that is different from
120 +`wanted`.
121 +
122 +Note: Globally installed packages are treated as if they are installed with a
123 +caret semver range specified. So if you require to update to `latest` you may
124 +need to run `npm install -g [<pkg>...]`
125 +
126 +NOTE: If a package has been upgraded to a version newer than `latest`, it will
127 +be _downgraded_.
128 +
129 +
130 +### See Also
131 +
132 +* [npm install](/cli/v7/commands/npm-install)
133 +* [npm outdated](/cli/v7/commands/npm-outdated)
134 +* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)
135 +* [npm registry](/cli/v7/using-npm/registry)
136 +* [npm folders](/cli/v7/configuring-npm/folders)
137 +* [npm ls](/cli/v7/commands/npm-ls)
content/cli/v7/commands/npm-version.md new
+139
@@ -0,0 +1,139 @@
1 +---
2 +title: npm-version
3 +section: 1
4 +description: Bump a package version
5 +redirect_from:
6 + - /cli/version
7 + - /cli/version.html
8 + - /cli/commands/version
9 + - /cli-commands/version
10 + - /cli-commands/version.html
11 + - /cli-commands/npm-version
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-version.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
21 +
22 +'npm [-v | --version]' to print npm version
23 +'npm view <pkg> version' to view a package's published version
24 +'npm ls' to inspect current package/dependency versions
25 +```
26 +
27 +### Description
28 +
29 +Run this in a package directory to bump the version and write the new
30 +data back to `package.json`, `package-lock.json`, and, if present, `npm-shrinkwrap.json`.
31 +
32 +The `newversion` argument should be a valid semver string, a
33 +valid second argument to [semver.inc](https://github.com/npm/node-semver#functions) (one of `patch`, `minor`, `major`,
34 +`prepatch`, `preminor`, `premajor`, `prerelease`), or `from-git`. In the second case,
35 +the existing version will be incremented by 1 in the specified field.
36 +`from-git` will try to read the latest git tag, and use that as the new npm version.
37 +
38 +If run in a git repo, it will also create a version commit and tag.
39 +This behavior is controlled by `git-tag-version` (see below), and can
40 +be disabled on the command line by running `npm --no-git-tag-version version`.
41 +It will fail if the working directory is not clean, unless the `-f` or
42 +`--force` flag is set.
43 +
44 +If supplied with `-m` or `--message` config option, npm will
45 +use it as a commit message when creating a version commit. If the
46 +`message` config contains `%s` then that will be replaced with the
47 +resulting version number. For example:
48 +
49 +```bash
50 +npm version patch -m "Upgrade to %s for reasons"
51 +```
52 +
53 +If the `sign-git-tag` config is set, then the tag will be signed using
54 +the `-s` flag to git. Note that you must have a default GPG key set up
55 +in your git config for this to work properly. For example:
56 +
57 +```bash
58 +$ npm config set sign-git-tag true
59 +$ npm version patch
60 +
61 +You need a passphrase to unlock the secret key for
62 +user: "isaacs (http://blog.izs.me/) <i@izs.me>"
63 +2048-bit RSA key, ID 6C481CF6, created 2010-08-31
64 +
65 +Enter passphrase:
66 +```
67 +
68 +If `preversion`, `version`, or `postversion` are in the `scripts` property of
69 +the package.json, they will be executed as part of running `npm version`.
70 +
71 +The exact order of execution is as follows:
72 + 1. Check to make sure the git working directory is clean before we get started.
73 + Your scripts may add files to the commit in future steps.
74 + This step is skipped if the `--force` flag is set.
75 + 2. Run the `preversion` script. These scripts have access to the old `version` in package.json.
76 + A typical use would be running your full test suite before deploying.
77 + Any files you want added to the commit should be explicitly added using `git add`.
78 + 3. Bump `version` in `package.json` as requested (`patch`, `minor`, `major`, etc).
79 + 4. Run the `version` script. These scripts have access to the new `version` in package.json
80 + (so they can incorporate it into file headers in generated files for example).
81 + Again, scripts should explicitly add generated files to the commit using `git add`.
82 + 5. Commit and tag.
83 + 6. Run the `postversion` script. Use it to clean up the file system or automatically push
84 + the commit and/or tag.
85 +
86 +Take the following example:
87 +
88 +```json
89 + "scripts": {
90 + "preversion": "npm test",
91 + "version": "npm run build && git add -A dist",
92 + "postversion": "git push && git push --tags && rm -rf build/temp"
93 + }
94 +```
95 +
96 +This runs all your tests and proceeds only if they pass. Then runs your `build` script, and
97 +adds everything in the `dist` directory to the commit. After the commit, it pushes the new commit
98 +and tag up to the server, and deletes the `build/temp` directory.
99 +
100 +### Configuration
101 +
102 +#### `allow-same-version`
103 +
104 +* Default: `false`
105 +* Type: Boolean
106 +
107 +Prevents throwing an error when `npm version` is used to set the new version
108 +to the same value as the current version.
109 +
110 +#### `git-tag-version`
111 +
112 +* Default: `true`
113 +* Type: Boolean
114 +
115 +Commit and tag the version change.
116 +
117 +#### `commit-hooks`
118 +
119 +* Default: `true`
120 +* Type: Boolean
121 +
122 +Run git commit hooks when committing the version change.
123 +
124 +#### `sign-git-tag`
125 +
126 +* Default: `false`
127 +* Type: Boolean
128 +
129 +Pass the `-s` flag to git to sign the tag.
130 +
131 +Note that you must have a default GPG key set up in your git config for this to work properly.
132 +
133 +### See Also
134 +
135 +* [npm init](/cli/v7/commands/npm-init)
136 +* [npm run-script](/cli/v7/commands/npm-run-script)
137 +* [npm scripts](/cli/v7/using-npm/scripts)
138 +* [package.json](/cli/v7/configuring-npm/package-json)
139 +* [config](/cli/v7/using-npm/config)
content/cli/v7/commands/npm-view.md new
+127
@@ -0,0 +1,127 @@
1 +---
2 +title: npm-view
3 +section: 1
4 +description: View registry info
5 +redirect_from:
6 + - /cli/view
7 + - /cli/view.html
8 + - /cli/commands/view
9 + - /cli-commands/view
10 + - /cli-commands/view.html
11 + - /cli-commands/npm-view
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-view.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm view [<@scope>/]<name>[@<version>] [<field>[.<subfield>]...]
21 +
22 +aliases: info, show, v
23 +```
24 +
25 +### Description
26 +
27 +This command shows data about a package and prints it to stdout.
28 +
29 +As an example, to view information about the `connect` package from the registry, you would run:
30 +
31 +```bash
32 +npm view connect
33 +```
34 +
35 +The default version is `"latest"` if unspecified.
36 +
37 +Field names can be specified after the package descriptor.
38 +For example, to show the dependencies of the `ronn` package at version
39 +`0.3.5`, you could do the following:
40 +
41 +```bash
42 +npm view ronn@0.3.5 dependencies
43 +```
44 +
45 +You can view child fields by separating them with a period.
46 +To view the git repository URL for the latest version of `npm`, you would run the following command:
47 +
48 +```bash
49 +npm view npm repository.url
50 +```
51 +
52 +This makes it easy to view information about a dependency with a bit of
53 +shell scripting. For example, to view all the data about the version of
54 +`opts` that `ronn` depends on, you could write the following:
55 +
56 +```bash
57 +npm view opts@$(npm view ronn dependencies.opts)
58 +```
59 +
60 +For fields that are arrays, requesting a non-numeric field will return
61 +all of the values from the objects in the list. For example, to get all
62 +the contributor names for the `express` package, you would run:
63 +
64 +```bash
65 +npm view express contributors.email
66 +```
67 +
68 +You may also use numeric indices in square braces to specifically select
69 +an item in an array field. To just get the email address of the first
70 +contributor in the list, you can run:
71 +
72 +```bash
73 +npm view express contributors[0].email
74 +```
75 +
76 +Multiple fields may be specified, and will be printed one after another.
77 +For example, to get all the contributor names and email addresses, you
78 +can do this:
79 +
80 +```bash
81 +npm view express contributors.name contributors.email
82 +```
83 +
84 +"Person" fields are shown as a string if they would be shown as an
85 +object. So, for example, this will show the list of `npm` contributors in
86 +the shortened string format. (See [`package.json`](/cli/v7/configuring-npm/package.json) for more on this.)
87 +
88 +```bash
89 +npm view npm contributors
90 +```
91 +
92 +If a version range is provided, then data will be printed for every
93 +matching version of the package. This will show which version of `jsdom`
94 +was required by each matching version of `yui3`:
95 +
96 +```bash
97 +npm view yui3@'>0.5.4' dependencies.jsdom
98 +```
99 +
100 +To show the `connect` package version history, you can do
101 +this:
102 +
103 +```bash
104 +npm view connect versions
105 +```
106 +
107 +### Output
108 +
109 +If only a single string field for a single version is output, then it
110 +will not be colorized or quoted, to enable piping the output to
111 +another command. If the field is an object, it will be output as a JavaScript object literal.
112 +
113 +If the `--json` flag is given, the outputted fields will be JSON.
114 +
115 +If the version range matches multiple versions then each printed value
116 +will be prefixed with the version it applies to.
117 +
118 +If multiple fields are requested, then each of them is prefixed with
119 +the field name.
120 +
121 +### See Also
122 +
123 +* [npm search](/cli/v7/commands/npm-search)
124 +* [npm registry](/cli/v7/using-npm/registry)
125 +* [npm config](/cli/v7/commands/npm-config)
126 +* [npmrc](/cli/v7/configuring-npm/npmrc)
127 +* [npm docs](/cli/v7/commands/npm-docs)
content/cli/v7/commands/npm-whoami.md new
+33
@@ -0,0 +1,33 @@
1 +---
2 +title: npm-whoami
3 +section: 1
4 +description: Display npm username
5 +redirect_from:
6 + - /cli/whoami
7 + - /cli/whoami.html
8 + - /cli/commands/whoami
9 + - /cli-commands/whoami
10 + - /cli-commands/whoami.html
11 + - /cli-commands/npm-whoami
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/commands/npm-whoami.md
15 +---
16 +
17 +### Synopsis
18 +
19 +```bash
20 +npm whoami [--registry <registry>]
21 +```
22 +
23 +Note: This command is unaware of workspaces.
24 +
25 +### Description
26 +
27 +Print the `username` config to standard output.
28 +
29 +### See Also
30 +
31 +* [npm config](/cli/v7/commands/npm-config)
32 +* [npmrc](/cli/v7/configuring-npm/npmrc)
33 +* [npm adduser](/cli/v7/commands/npm-adduser)
content/cli/v7/commands/npm.md new
+184
@@ -0,0 +1,184 @@
1 +---
2 +title: npm
3 +section: 1
4 +description: javascript package manager
5 +redirect_from:
6 + - /cli/npm
7 + - /cli/npm.html
8 + - /cli/commands/npm
9 + - /cli-commands/npm
10 + - /cli-commands/npm.html
11 +github_repo: npm/cli
12 +github_branch: latest
13 +github_path: docs/content/commands/npm.md
14 +---
15 +
16 +### Synopsis
17 +
18 +```bash
19 +npm <command> [args]
20 +```
21 +
22 +### Version
23 +
24 +7.0.0
25 +
26 +### Description
27 +
28 +npm is the package manager for the Node JavaScript platform. It puts
29 +modules in place so that node can find them, and manages dependency
30 +conflicts intelligently.
31 +
32 +It is extremely configurable to support a variety of use cases. Most
33 +commonly, you use it to publish, discover, install, and develop node
34 +programs.
35 +
36 +Run `npm help` to get a list of available commands.
37 +
38 +### Important
39 +
40 +npm comes preconfigured to use npm's public registry at
41 +https://registry.npmjs.org by default. Use of the npm public registry is
42 +subject to terms of use available at
43 +https://www.npmjs.com/policies/terms.
44 +
45 +You can configure npm to use any compatible registry you like, and even
46 +run your own registry. Use of someone else's registry is governed by
47 +their terms of use.
48 +
49 +### Introduction
50 +
51 +You probably got npm because you want to install stuff.
52 +
53 +The very first thing you will most likely want to run in any node
54 +program is `npm install` to install its dependencies.
55 +
56 +You can also run `npm install blerg` to install the latest version of
57 +"blerg". Check out [`npm install`](/cli/v7/commands/npm-install) for more
58 +info. It can do a lot of stuff.
59 +
60 +Use the `npm search` command to show everything that's available in the
61 +public registry. Use `npm ls` to show everything you've installed.
62 +
63 +### Dependencies
64 +
65 +If a package lists a dependency using a git URL, npm will install that
66 +dependency using the [`git`](https://github.com/git-guides/install-git)
67 +command and will generate an error if it is not installed.
68 +
69 +If one of the packages npm tries to install is a native node module and
70 +requires compiling of C++ Code, npm will use
71 +[node-gyp](https://github.com/nodejs/node-gyp) for that task.
72 +For a Unix system, [node-gyp](https://github.com/nodejs/node-gyp)
73 +needs Python, make and a buildchain like GCC. On Windows,
74 +Python and Microsoft Visual Studio C++ are needed. Python 3 is
75 +not supported by [node-gyp](https://github.com/nodejs/node-gyp).
76 +For more information visit
77 +[the node-gyp repository](https://github.com/nodejs/node-gyp) and
78 +the [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki).
79 +
80 +### Directories
81 +
82 +See [`folders`](/cli/v7/configuring-npm/folders) to learn about where npm puts
83 +stuff.
84 +
85 +In particular, npm has two modes of operation:
86 +
87 +* local mode:
88 + npm installs packages into the current project directory, which
89 + defaults to the current working directory. Packages install to
90 + `./node_modules`, and bins to `./node_modules/.bin`.
91 +* global mode:
92 + npm installs packages into the install prefix at
93 + `$npm_config_prefix/lib/node_modules` and bins to
94 + `$npm_config_prefix/bin`.
95 +
96 +Local mode is the default. Use `-g` or `--global` on any command to
97 +run in global mode instead.
98 +
99 +### Developer Usage
100 +
101 +If you're using npm to develop and publish your code, check out the
102 +following help topics:
103 +
104 +* json:
105 + Make a package.json file. See
106 + [`package.json`](/cli/v7/configuring-npm/package-json).
107 +* link:
108 + Links your current working code into Node's path, so that you don't
109 + have to reinstall every time you make a change. Use [`npm
110 + link`](/cli/v7/commands/npm-link) to do this.
111 +* install:
112 + It's a good idea to install things if you don't need the symbolic
113 + link. Especially, installing other peoples code from the registry is
114 + done via [`npm install`](/cli/v7/commands/npm-install)
115 +* adduser:
116 + Create an account or log in. When you do this, npm will store
117 + credentials in the user config file config file.
118 +* publish:
119 + Use the [`npm publish`](/cli/v7/commands/npm-publish`) command to upload your
120 + code to the registry.
121 +
122 +#### Configuration
123 +
124 +npm is extremely configurable. It reads its configuration options from
125 +5 places.
126 +
127 +* Command line switches:
128 + Set a config with `--key val`. All keys take a value, even if they
129 + are booleans (the config parser doesn't know what the options are at
130 + the time of parsing). If you do not provide a value (`--key`) then
131 + the option is set to boolean `true`.
132 +* Environment Variables:
133 + Set any config by prefixing the name in an environment variable with
134 + `npm_config_`. For example, `export npm_config_key=val`.
135 +* User Configs:
136 + The file at `$HOME/.npmrc` is an ini-formatted list of configs. If
137 + present, it is parsed. If the `userconfig` option is set in the cli
138 + or env, that file will be used instead.
139 +* Global Configs:
140 + The file found at `./etc/npmrc` (relative to the global prefix will be
141 + parsed if it is found. See [`npm prefix`](/cli/v7/commands/npm-prefix) for
142 + more info on the global prefix. If the `globalconfig` option is set
143 + in the cli, env, or user config, then that file is parsed instead.
144 +* Defaults:
145 + npm's default configuration options are defined in
146 + lib/utils/config-defs.js. These must not be changed.
147 +
148 +See [`config`](/cli/v7/using-npm/config) for much much more information.
149 +
150 +### Contributions
151 +
152 +Patches welcome!
153 +
154 +If you would like to help, but don't know what to work on, read the
155 +[contributing
156 +guidelines](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) and
157 +check the issues list.
158 +
159 +### Bugs
160 +
161 +When you find issues, please report them:
162 +<https://github.com/npm/cli/issues>
163 +
164 +Please be sure to follow the template and bug reporting guidelines.
165 +
166 +### Feature Requests
167 +
168 +Discuss new feature ideas on our discussion forum:
169 +
170 +* <https://github.com/npm/feedback>
171 +
172 +Or suggest formal RFC proposals:
173 +
174 +* <https://github.com/npm/rfcs>
175 +
176 +### See Also
177 +
178 +* [npm help](/cli/v7/commands/npm-help)
179 +* [package.json](/cli/v7/configuring-npm/package-json)
180 +* [npmrc](/cli/v7/configuring-npm/npmrc)
181 +* [npm config](/cli/v7/commands/npm-config)
182 +* [npm install](/cli/v7/commands/npm-install)
183 +* [npm prefix](/cli/v7/commands/npm-prefix)
184 +* [npm publish](/cli/v7/commands/npm-publish)
content/cli/v7/commands/npx.md new
+180
@@ -0,0 +1,180 @@
1 +---
2 +title: npx
3 +section: 1
4 +description: Run a command from a local or remote npm package
5 +github_repo: npm/cli
6 +github_branch: latest
7 +github_path: docs/content/commands/npx.md
8 +---
9 +
10 +### Synopsis
11 +
12 +```bash
13 +npm exec -- <pkg>[@<version>] [args...]
14 +npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
15 +npm exec -c '<cmd> [args...]'
16 +npm exec --package=foo -c '<cmd> [args...]'
17 +
18 +npx <pkg>[@<specifier>] [args...]
19 +npx -p <pkg>[@<specifier>] <cmd> [args...]
20 +npx -c '<cmd> [args...]'
21 +npx -p <pkg>[@<specifier>] -c '<cmd> [args...]'
22 +
23 +alias: npm x, npx
24 +
25 +--package=<pkg> (may be specified multiple times)
26 +-p is a shorthand for --package only when using npx executable
27 +-c <cmd> --call=<cmd> (may not be mixed with positional arguments)
28 +```
29 +
30 +### Description
31 +
32 +This command allows you to run an arbitrary command from an npm package
33 +(either one installed locally, or fetched remotely), in a similar context
34 +as running it via `npm run`.
35 +
36 +Whatever packages are specified by the `--package` option will be
37 +provided in the `PATH` of the executed command, along with any locally
38 +installed package executables. The `--package` option may be
39 +specified multiple times, to execute the supplied command in an environment
40 +where all specified packages are available.
41 +
42 +If any requested packages are not present in the local project
43 +dependencies, then they are installed to a folder in the npm cache, which
44 +is added to the `PATH` environment variable in the executed process. A
45 +prompt is printed (which can be suppressed by providing either `--yes` or
46 +`--no`).
47 +
48 +Package names provided without a specifier will be matched with whatever
49 +version exists in the local project. Package names with a specifier will
50 +only be considered a match if they have the exact same name and version as
51 +the local dependency.
52 +
53 +If no `-c` or `--call` option is provided, then the positional arguments
54 +are used to generate the command string. If no `--package` options
55 +are provided, then npm will attempt to determine the executable name from
56 +the package specifier provided as the first positional argument according
57 +to the following heuristic:
58 +
59 +- If the package has a single entry in its `bin` field in `package.json`,
60 + or if all entries are aliases of the same command, then that command
61 + will be used.
62 +- If the package has multiple `bin` entries, and one of them matches the
63 + unscoped portion of the `name` field, then that command will be used.
64 +- If this does not result in exactly one option (either because there are
65 + no bin entries, or none of them match the `name` of the package), then
66 + `npm exec` exits with an error.
67 +
68 +To run a binary _other than_ the named binary, specify one or more
69 +`--package` options, which will prevent npm from inferring the package from
70 +the first command argument.
71 +
72 +### `npx` vs `npm exec`
73 +
74 +When run via the `npx` binary, all flags and options *must* be set prior to
75 +any positional arguments. When run via `npm exec`, a double-hyphen `--`
76 +flag can be used to suppress npm's parsing of switches and options that
77 +should be sent to the executed command.
78 +
79 +For example:
80 +
81 +```
82 +$ npx foo@latest bar --package=@npmcli/foo
83 +```
84 +
85 +In this case, npm will resolve the `foo` package name, and run the
86 +following command:
87 +
88 +```
89 +$ foo bar --package=@npmcli/foo
90 +```
91 +
92 +Since the `--package` option comes _after_ the positional arguments, it is
93 +treated as an argument to the executed command.
94 +
95 +In contrast, due to npm's argument parsing logic, running this command is
96 +different:
97 +
98 +```
99 +$ npm exec foo@latest bar --package=@npmcli/foo
100 +```
101 +
102 +In this case, npm will parse the `--package` option first, resolving the
103 +`@npmcli/foo` package. Then, it will execute the following command in that
104 +context:
105 +
106 +```
107 +$ foo@latest bar
108 +```
109 +
110 +The double-hyphen character is recommended to explicitly tell npm to stop
111 +parsing command line options and switches. The following command would
112 +thus be equivalent to the `npx` command above:
113 +
114 +```
115 +$ npm exec -- foo@latest bar --package=@npmcli/foo
116 +```
117 +
118 +### Examples
119 +
120 +Run the version of `tap` in the local dependencies, with the provided
121 +arguments:
122 +
123 +```
124 +$ npm exec -- tap --bail test/foo.js
125 +$ npx tap --bail test/foo.js
126 +```
127 +
128 +Run a command _other than_ the command whose name matches the package name
129 +by specifying a `--package` option:
130 +
131 +```
132 +$ npm exec --package=foo -- bar --bar-argument
133 +# ~ or ~
134 +$ npx --package=foo bar --bar-argument
135 +```
136 +
137 +Run an arbitrary shell script, in the context of the current project:
138 +
139 +```
140 +$ npm x -c 'eslint && say "hooray, lint passed"'
141 +$ npx -c 'eslint && say "hooray, lint passed"'
142 +```
143 +
144 +### Compatibility with Older npx Versions
145 +
146 +The `npx` binary was rewritten in npm v7.0.0, and the standalone `npx`
147 +package deprecated at that time. `npx` uses the `npm exec`
148 +command instead of a separate argument parser and install process, with
149 +some affordances to maintain backwards compatibility with the arguments it
150 +accepted in previous versions.
151 +
152 +This resulted in some shifts in its functionality:
153 +
154 +- Any `npm` config value may be provided.
155 +- To prevent security and user-experience problems from mistyping package
156 + names, `npx` prompts before installing anything. Suppress this
157 + prompt with the `-y` or `--yes` option.
158 +- The `--no-install` option is deprecated, and will be converted to `--no`.
159 +- Shell fallback functionality is removed, as it is not advisable.
160 +- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand
161 + for `--package` in npx. This is maintained, but only for the `npx`
162 + executable.
163 +- The `--ignore-existing` option is removed. Locally installed bins are
164 + always present in the executed process `PATH`.
165 +- The `--npm` option is removed. `npx` will always use the `npm` it ships
166 + with.
167 +- The `--node-arg` and `-n` options are removed.
168 +- The `--always-spawn` option is redundant, and thus removed.
169 +- The `--shell` option is replaced with `--script-shell`, but maintained
170 + in the `npx` executable for backwards compatibility.
171 +
172 +### See Also
173 +
174 +* [npm run-script](/cli/v7/commands/npm-run-script)
175 +* [npm scripts](/cli/v7/using-npm/scripts)
176 +* [npm test](/cli/v7/commands/npm-test)
177 +* [npm start](/cli/v7/commands/npm-start)
178 +* [npm restart](/cli/v7/commands/npm-restart)
179 +* [npm stop](/cli/v7/commands/npm-stop)
180 +* [npm config](/cli/v7/commands/npm-config)
content/cli/v7/configuring-npm/folders.md new
+227
@@ -0,0 +1,227 @@
1 +---
2 +title: folders
3 +section: 5
4 +description: Folder Structures Used by npm
5 +redirect_from:
6 + - /configuring-npm/folders
7 + - /configuring-npm/folders.html
8 + - /files/folders
9 + - /files/folders.html
10 +github_repo: npm/cli
11 +github_branch: latest
12 +github_path: docs/content/configuring-npm/folders.md
13 +---
14 +
15 +### Description
16 +
17 +npm puts various things on your computer. That's its job.
18 +
19 +This document will tell you what it puts where.
20 +
21 +#### tl;dr
22 +
23 +* Local install (default): puts stuff in `./node_modules` of the current
24 + package root.
25 +* Global install (with `-g`): puts stuff in /usr/local or wherever node
26 + is installed.
27 +* Install it **locally** if you're going to `require()` it.
28 +* Install it **globally** if you're going to run it on the command line.
29 +* If you need both, then install it in both places, or use `npm link`.
30 +
31 +#### prefix Configuration
32 +
33 +The `prefix` config defaults to the location where node is installed.
34 +On most systems, this is `/usr/local`. On Windows, it's `%AppData%\npm`.
35 +On Unix systems, it's one level up, since node is typically installed at
36 +`{prefix}/bin/node` rather than `{prefix}/node.exe`.
37 +
38 +When the `global` flag is set, npm installs things into this prefix.
39 +When it is not set, it uses the root of the current package, or the
40 +current working directory if not in a package already.
41 +
42 +#### Node Modules
43 +
44 +Packages are dropped into the `node_modules` folder under the `prefix`.
45 +When installing locally, this means that you can
46 +`require("packagename")` to load its main module, or
47 +`require("packagename/lib/path/to/sub/module")` to load other modules.
48 +
49 +Global installs on Unix systems go to `{prefix}/lib/node_modules`.
50 +Global installs on Windows go to `{prefix}/node_modules` (that is, no
51 +`lib` folder.)
52 +
53 +Scoped packages are installed the same way, except they are grouped together
54 +in a sub-folder of the relevant `node_modules` folder with the name of that
55 +scope prefix by the @ symbol, e.g. `npm install @myorg/package` would place
56 +the package in `{prefix}/node_modules/@myorg/package`. See [`scope`](/cli/v7/using-npm/scope) for more details.
57 +
58 +If you wish to `require()` a package, then install it locally.
59 +
60 +#### Executables
61 +
62 +When in global mode, executables are linked into `{prefix}/bin` on Unix,
63 +or directly into `{prefix}` on Windows.
64 +
65 +When in local mode, executables are linked into
66 +`./node_modules/.bin` so that they can be made available to scripts run
67 +through npm. (For example, so that a test runner will be in the path
68 +when you run `npm test`.)
69 +
70 +#### Man Pages
71 +
72 +When in global mode, man pages are linked into `{prefix}/share/man`.
73 +
74 +When in local mode, man pages are not installed.
75 +
76 +Man pages are not installed on Windows systems.
77 +
78 +#### Cache
79 +
80 +See [`npm cache`](/cli/v7/commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or
81 +`%AppData%/npm-cache` on Windows.
82 +
83 +This is controlled by the `cache` configuration param.
84 +
85 +#### Temp Files
86 +
87 +Temporary files are stored by default in the folder specified by the
88 +`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment
89 +variables, or `/tmp` on Unix and `c:\windows\temp` on Windows.
90 +
91 +Temp files are given a unique folder under this root for each run of the
92 +program, and are deleted upon successful exit.
93 +
94 +### More Information
95 +
96 +When installing locally, npm first tries to find an appropriate
97 +`prefix` folder. This is so that `npm install foo@1.2.3` will install
98 +to the sensible root of your package, even if you happen to have `cd`ed
99 +into some other folder.
100 +
101 +Starting at the $PWD, npm will walk up the folder tree checking for a
102 +folder that contains either a `package.json` file, or a `node_modules`
103 +folder. If such a thing is found, then that is treated as the effective
104 +"current directory" for the purpose of running npm commands. (This
105 +behavior is inspired by and similar to git's .git-folder seeking
106 +logic when running git commands in a working dir.)
107 +
108 +If no package root is found, then the current folder is used.
109 +
110 +When you run `npm install foo@1.2.3`, then the package is loaded into
111 +the cache, and then unpacked into `./node_modules/foo`. Then, any of
112 +foo's dependencies are similarly unpacked into
113 +`./node_modules/foo/node_modules/...`.
114 +
115 +Any bin files are symlinked to `./node_modules/.bin/`, so that they may
116 +be found by npm scripts when necessary.
117 +
118 +#### Global Installation
119 +
120 +If the `global` configuration is set to true, then npm will
121 +install packages "globally".
122 +
123 +For global installation, packages are installed roughly the same way,
124 +but using the folders described above.
125 +
126 +#### Cycles, Conflicts, and Folder Parsimony
127 +
128 +Cycles are handled using the property of node's module system that it
129 +walks up the directories looking for `node_modules` folders. So, at every
130 +stage, if a package is already installed in an ancestor `node_modules`
131 +folder, then it is not installed at the current location.
132 +
133 +Consider the case above, where `foo -> bar -> baz`. Imagine if, in
134 +addition to that, baz depended on bar, so you'd have:
135 +`foo -> bar -> baz -> bar -> baz ...`. However, since the folder
136 +structure is: `foo/node_modules/bar/node_modules/baz`, there's no need to
137 +put another copy of bar into `.../baz/node_modules`, since when it calls
138 +require("bar"), it will get the copy that is installed in
139 +`foo/node_modules/bar`.
140 +
141 +This shortcut is only used if the exact same
142 +version would be installed in multiple nested `node_modules` folders. It
143 +is still possible to have `a/node_modules/b/node_modules/a` if the two
144 +"a" packages are different versions. However, without repeating the
145 +exact same package multiple times, an infinite regress will always be
146 +prevented.
147 +
148 +Another optimization can be made by installing dependencies at the
149 +highest level possible, below the localized "target" folder.
150 +
151 +#### Example
152 +
153 +Consider this dependency graph:
154 +
155 +```bash
156 +foo
157 ++-- blerg@1.2.5
158 ++-- bar@1.2.3
159 +| +-- blerg@1.x (latest=1.3.7)
160 +| +-- baz@2.x
161 +| | `-- quux@3.x
162 +| | `-- bar@1.2.3 (cycle)
163 +| `-- asdf@*
164 +`-- baz@1.2.3
165 + `-- quux@3.x
166 + `-- bar
167 +```
168 +
169 +In this case, we might expect a folder structure like this:
170 +
171 +```bash
172 +foo
173 ++-- node_modules
174 + +-- blerg (1.2.5) <---[A]
175 + +-- bar (1.2.3) <---[B]
176 + | `-- node_modules
177 + | +-- baz (2.0.2) <---[C]
178 + | | `-- node_modules
179 + | | `-- quux (3.2.0)
180 + | `-- asdf (2.3.4)
181 + `-- baz (1.2.3) <---[D]
182 + `-- node_modules
183 + `-- quux (3.2.0) <---[E]
184 +```
185 +
186 +Since foo depends directly on `bar@1.2.3` and `baz@1.2.3`, those are
187 +installed in foo's `node_modules` folder.
188 +
189 +Even though the latest copy of blerg is 1.3.7, foo has a specific
190 +dependency on version 1.2.5. So, that gets installed at [A]. Since the
191 +parent installation of blerg satisfies bar's dependency on `blerg@1.x`,
192 +it does not install another copy under [B].
193 +
194 +Bar [B] also has dependencies on baz and asdf, so those are installed in
195 +bar's `node_modules` folder. Because it depends on `baz@2.x`, it cannot
196 +re-use the `baz@1.2.3` installed in the parent `node_modules` folder [D],
197 +and must install its own copy [C].
198 +
199 +Underneath bar, the `baz -> quux -> bar` dependency creates a cycle.
200 +However, because bar is already in quux's ancestry [B], it does not
201 +unpack another copy of bar into that folder.
202 +
203 +Underneath `foo -> baz` [D], quux's [E] folder tree is empty, because its
204 +dependency on bar is satisfied by the parent folder copy installed at [B].
205 +
206 +For a graphical breakdown of what is installed where, use `npm ls`.
207 +
208 +#### Publishing
209 +
210 +Upon publishing, npm will look in the `node_modules` folder. If any of
211 +the items there are not in the `bundledDependencies` array, then they will
212 +not be included in the package tarball.
213 +
214 +This allows a package maintainer to install all of their dependencies
215 +(and dev dependencies) locally, but only re-publish those items that
216 +cannot be found elsewhere. See [`package.json`](/cli/v7/configuring-npm/package.json) for more information.
217 +
218 +### See also
219 +
220 +* [package.json](/cli/v7/configuring-npm/package-json)
221 +* [npm install](/cli/v7/commands/npm-install)
222 +* [npm pack](/cli/v7/commands/npm-pack)
223 +* [npm cache](/cli/v7/commands/npm-cache)
224 +* [npm config](/cli/v7/commands/npm-config)
225 +* [npmrc](/cli/v7/configuring-npm/npmrc)
226 +* [config](/cli/v7/using-npm/config)
227 +* [npm publish](/cli/v7/commands/npm-publish)
content/cli/v7/configuring-npm/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +redirect_from:
3 + - configuring-npm
4 + - /cli/configuring-npm
5 + - /cli-documentation/configuring-npm
6 + - /cli-documentation/files
7 +github_repo: npm/cli
8 +github_branch: latest
9 +github_path: docs/content/configuring-npm/index.mdx
10 +title: Configuring npm
11 +---
12 +<Index depth="1" />
\ No newline at end of file
content/cli/v7/configuring-npm/install.md new
+93
@@ -0,0 +1,93 @@
1 +---
2 +title: install
3 +section: 5
4 +description: Download and install node and npm
5 +redirect_from:
6 + - /configuring-npm/install
7 + - /configuring-npm/install.html
8 +github_repo: npm/cli
9 +github_branch: latest
10 +github_path: docs/content/configuring-npm/install.md
11 +---
12 +
13 +### Description
14 +
15 +To publish and install packages to and from the public npm registry, you
16 +must install Node.js and the npm command line interface using either a Node
17 +version manager or a Node installer. **We strongly recommend using a Node
18 +version manager to install Node.js and npm.** We do not recommend using a
19 +Node installer, since the Node installation process installs npm in a
20 +directory with local permissions and can cause permissions errors when you
21 +run npm packages globally.
22 +
23 +### Overview
24 +
25 +- [Checking your version of npm and
26 + Node.js](#checking-your-version-of-npm-and-node-js)
27 +- [Using a Node version manager to install Node.js and
28 + npm](#using-a-node-version-manager-to-install-node-js-and-npm)
29 +- [Using a Node installer to install Node.js and
30 + npm](#using-a-node-installer-to-install-node-js-and-npm)
31 +
32 +### Checking your version of npm and Node.js
33 +
34 +To see if you already have Node.js and npm installed and check the
35 +installed version, run the following commands:
36 +
37 +```
38 +node -v
39 +npm -v
40 +```
41 +
42 +### Using a Node version manager to install Node.js and npm
43 +
44 +Node version managers allow you to install and switch between multiple
45 +versions of Node.js and npm on your system so you can test your
46 +applications on multiple versions of npm to ensure they work for users on
47 +different versions.
48 +
49 +#### OSX or Linux Node version managers
50 +
51 +* [nvm](https://github.com/creationix/nvm)
52 +* [n](https://github.com/tj/n)
53 +
54 +#### Windows Node version managers
55 +
56 +* [nodist](https://github.com/marcelklehr/nodist)
57 +* [nvm-windows](https://github.com/coreybutler/nvm-windows)
58 +
59 +### Using a Node installer to install Node.js and npm
60 +
61 +If you are unable to use a Node version manager, you can use a Node
62 +installer to install both Node.js and npm on your system.
63 +
64 +* [Node.js installer](https://nodejs.org/en/download/)
65 +* [NodeSource installer](https://github.com/nodesource/distributions). If
66 + you use Linux, we recommend that you use a NodeSource installer.
67 +
68 +#### OS X or Windows Node installers
69 +
70 +If you're using OS X or Windows, use one of the installers from the
71 +[Node.js download page](https://nodejs.org/en/download/). Be sure to
72 +install the version labeled **LTS**. Other versions have not yet been
73 +tested with npm.
74 +
75 +#### Linux or other operating systems Node installers
76 +
77 +If you're using Linux or another operating system, use one of the following
78 +installers:
79 +
80 +- [NodeSource installer](https://github.com/nodesource/distributions)
81 + (recommended)
82 +- One of the installers on the [Node.js download
83 + page](https://nodejs.org/en/download/)
84 +
85 +Or see [this page](https://nodejs.org/en/download/package-manager/) to
86 +install npm for Linux in the way many Linux developers prefer.
87 +
88 +#### Less-common operating systems
89 +
90 +For more information on installing Node.js on a variety of operating
91 +systems, see [this page][pkg-mgr].
92 +
93 +[pkg-mgr]: https://nodejs.org/en/download/package-manager/
content/cli/v7/configuring-npm/npm-shrinkwrap-json.md new
+40
@@ -0,0 +1,40 @@
1 +---
2 +title: npm-shrinkwrap.json
3 +section: 5
4 +description: A publishable lockfile
5 +redirect_from:
6 + - /configuring-npm/npm-shrinkwrap-json
7 + - /configuring-npm/npm-shrinkwrap-json.html
8 +github_repo: npm/cli
9 +github_branch: latest
10 +github_path: docs/content/configuring-npm/npm-shrinkwrap-json.md
11 +---
12 +
13 +### Description
14 +
15 +`npm-shrinkwrap.json` is a file created by [`npm
16 +shrinkwrap`](/cli/v7/commands/npm-shrinkwrap). It is identical to
17 +`package-lock.json`, with one major caveat: Unlike `package-lock.json`,
18 +`npm-shrinkwrap.json` may be included when publishing a package.
19 +
20 +The recommended use-case for `npm-shrinkwrap.json` is applications deployed
21 +through the publishing process on the registry: for example, daemons and
22 +command-line tools intended as global installs or `devDependencies`. It's
23 +strongly discouraged for library authors to publish this file, since that
24 +would prevent end users from having control over transitive dependency
25 +updates.
26 +
27 +If both `package-lock.json` and `npm-shrinkwrap.json` are present in a
28 +package root, `npm-shrinkwrap.json` will be preferred over the
29 +`package-lock.json` file.
30 +
31 +For full details and description of the `npm-shrinkwrap.json` file format,
32 +refer to the manual page for
33 +[package-lock.json](/cli/v7/configuring-npm/package-lock-json).
34 +
35 +### See also
36 +
37 +* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)
38 +* [package-lock.json](/cli/v7/configuring-npm/package-lock-json)
39 +* [package.json](/cli/v7/configuring-npm/package-json)
40 +* [npm install](/cli/v7/commands/npm-install)
content/cli/v7/configuring-npm/npmrc.md new
+109
@@ -0,0 +1,109 @@
1 +---
2 +title: npmrc
3 +section: 5
4 +description: The npm config files
5 +redirect_from:
6 + - /configuring-npm/npmrc
7 + - /configuring-npm/npmrc.html
8 + - /cli-documentation/files/npmrc
9 + - /files/npmrc
10 + - /files/npmrc.html
11 +github_repo: npm/cli
12 +github_branch: latest
13 +github_path: docs/content/configuring-npm/npmrc.md
14 +---
15 +
16 +### Description
17 +
18 +npm gets its config settings from the command line, environment variables,
19 +and `npmrc` files.
20 +
21 +The `npm config` command can be used to update and edit the contents of the
22 +user and global npmrc files.
23 +
24 +For a list of available configuration options, see
25 +[config](/cli/v7/using-npm/config).
26 +
27 +### Files
28 +
29 +The four relevant files are:
30 +
31 +* per-project config file (/path/to/my/project/.npmrc)
32 +* per-user config file (~/.npmrc)
33 +* global config file ($PREFIX/etc/npmrc)
34 +* npm builtin config file (/path/to/npm/npmrc)
35 +
36 +All npm config files are an ini-formatted list of `key = value` parameters.
37 +Environment variables can be replaced using `${VARIABLE_NAME}`. For
38 +example:
39 +
40 +```bash
41 +prefix = ${HOME}/.npm-packages
42 +```
43 +
44 +Each of these files is loaded, and config options are resolved in priority
45 +order. For example, a setting in the userconfig file would override the
46 +setting in the globalconfig file.
47 +
48 +Array values are specified by adding "[]" after the key name. For example:
49 +
50 +```bash
51 +key[] = "first value"
52 +key[] = "second value"
53 +```
54 +
55 +#### Comments
56 +
57 +Lines in `.npmrc` files are interpreted as comments when they begin with a
58 +`;` or `#` character. `.npmrc` files are parsed by
59 +[npm/ini](https://github.com/npm/ini), which specifies this comment syntax.
60 +
61 +For example:
62 +
63 +```bash
64 +# last modified: 01 Jan 2016
65 +; Set a new registry for a scoped package
66 +@myscope:registry=https://mycustomregistry.example.org
67 +```
68 +
69 +#### Per-project config file
70 +
71 +When working locally in a project, a `.npmrc` file in the root of the
72 +project (ie, a sibling of `node_modules` and `package.json`) will set
73 +config values specific to this project.
74 +
75 +Note that this only applies to the root of the project that you're running
76 +npm in. It has no effect when your module is published. For example, you
77 +can't publish a module that forces itself to install globally, or in a
78 +different location.
79 +
80 +Additionally, this file is not read in global mode, such as when running
81 +`npm install -g`.
82 +
83 +#### Per-user config file
84 +
85 +`$HOME/.npmrc` (or the `userconfig` param, if set in the environment or on
86 +the command line)
87 +
88 +#### Global config file
89 +
90 +`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above): This file
91 +is an ini-file formatted list of `key = value` parameters. Environment
92 +variables can be replaced as above.
93 +
94 +#### Built-in config file
95 +
96 +`path/to/npm/itself/npmrc`
97 +
98 +This is an unchangeable "builtin" configuration file that npm keeps
99 +consistent across updates. Set fields in here using the `./configure`
100 +script that comes with npm. This is primarily for distribution maintainers
101 +to override default configs in a standard and consistent manner.
102 +
103 +### See also
104 +
105 +* [npm folders](/cli/v7/configuring-npm/folders)
106 +* [npm config](/cli/v7/commands/npm-config)
107 +* [config](/cli/v7/using-npm/config)
108 +* [package.json](/cli/v7/configuring-npm/package-json)
109 +* [npm](/cli/v7/commands/npm)
content/cli/v7/configuring-npm/package-json.md new
+1047
@@ -0,0 +1,1047 @@
1 +---
2 +title: package.json
3 +section: 5
4 +description: Specifics of npm's package.json handling
5 +redirect_from:
6 + - /configuring-npm/package-json
7 + - /configuring-npm/package-json.html
8 + - /configuring-npm/package.json
9 + - /creating-a-packge-json-file
10 + - /files/package.json
11 + - /files/package.json.html
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/configuring-npm/package-json.md
15 +---
16 +
17 +### Description
18 +
19 +This document is all you need to know about what's required in your
20 +package.json file. It must be actual JSON, not just a JavaScript object
21 +literal.
22 +
23 +A lot of the behavior described in this document is affected by the config
24 +settings described in [`config`](/cli/v7/using-npm/config).
25 +
26 +### name
27 +
28 +If you plan to publish your package, the *most* important things in your
29 +package.json are the name and version fields as they will be required. The
30 +name and version together form an identifier that is assumed to be
31 +completely unique. Changes to the package should come along with changes
32 +to the version. If you don't plan to publish your package, the name and
33 +version fields are optional.
34 +
35 +The name is what your thing is called.
36 +
37 +Some rules:
38 +
39 +* The name must be less than or equal to 214 characters. This includes the
40 + scope for scoped packages.
41 +* The names of scoped packages can begin with a dot or an underscore. This
42 + is not permitted without a scope.
43 +* New packages must not have uppercase letters in the name.
44 +* The name ends up being part of a URL, an argument on the command line,
45 + and a folder name. Therefore, the name can't contain any non-URL-safe
46 + characters.
47 +
48 +Some tips:
49 +
50 +* Don't use the same name as a core Node module.
51 +* Don't put "js" or "node" in the name. It's assumed that it's js, since
52 + you're writing a package.json file, and you can specify the engine using
53 + the "engines" field. (See below.)
54 +* The name will probably be passed as an argument to require(), so it
55 + should be something short, but also reasonably descriptive.
56 +* You may want to check the npm registry to see if there's something by
57 + that name already, before you get too attached to it.
58 + <https://www.npmjs.com/>
59 +
60 +A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See
61 +[`scope`](/cli/v7/using-npm/scope) for more detail.
62 +
63 +### version
64 +
65 +If you plan to publish your package, the *most* important things in your
66 +package.json are the name and version fields as they will be required. The
67 +name and version together form an identifier that is assumed to be
68 +completely unique. Changes to the package should come along with changes
69 +to the version. If you don't plan to publish your package, the name and
70 +version fields are optional.
71 +
72 +Version must be parseable by
73 +[node-semver](https://github.com/npm/node-semver), which is bundled with
74 +npm as a dependency. (`npm install semver` to use it yourself.)
75 +
76 +### description
77 +
78 +Put a description in it. It's a string. This helps people discover your
79 +package, as it's listed in `npm search`.
80 +
81 +### keywords
82 +
83 +Put keywords in it. It's an array of strings. This helps people discover
84 +your package as it's listed in `npm search`.
85 +
86 +### homepage
87 +
88 +The url to the project homepage.
89 +
90 +Example:
91 +
92 +```json
93 +"homepage": "https://github.com/owner/project#readme"
94 +```
95 +
96 +### bugs
97 +
98 +The url to your project's issue tracker and / or the email address to which
99 +issues should be reported. These are helpful for people who encounter
100 +issues with your package.
101 +
102 +It should look like this:
103 +
104 +```json
105 +{
106 + "url" : "https://github.com/owner/project/issues",
107 + "email" : "project@hostname.com"
108 +}
109 +```
110 +
111 +You can specify either one or both values. If you want to provide only a
112 +url, you can specify the value for "bugs" as a simple string instead of an
113 +object.
114 +
115 +If a url is provided, it will be used by the `npm bugs` command.
116 +
117 +### license
118 +
119 +You should specify a license for your package so that people know how they
120 +are permitted to use it, and any restrictions you're placing on it.
121 +
122 +If you're using a common license such as BSD-2-Clause or MIT, add a current
123 +SPDX license identifier for the license you're using, like this:
124 +
125 +```json
126 +{
127 + "license" : "BSD-3-Clause"
128 +}
129 +```
130 +
131 +You can check [the full list of SPDX license
132 +IDs](https://spdx.org/licenses/). Ideally you should pick one that is
133 +[OSI](https://opensource.org/licenses/alphabetical) approved.
134 +
135 +If your package is licensed under multiple common licenses, use an [SPDX
136 +license expression syntax version 2.0
137 +string](https://www.npmjs.com/package/spdx), like this:
138 +
139 +```json
140 +{
141 + "license" : "(ISC OR GPL-3.0)"
142 +}
143 +```
144 +If you are using a license that hasn't been assigned an SPDX identifier, or if
145 +you are using a custom license, use a string value like this one:
146 +
147 +```json
148 +{
149 + "license" : "SEE LICENSE IN <filename>"
150 +}
151 +```
152 +Then include a file named `<filename>` at the top level of the package.
153 +
154 +Some old packages used license objects or a "licenses" property containing
155 +an array of license objects:
156 +
157 +```json
158 +// Not valid metadata
159 +{
160 + "license" : {
161 + "type" : "ISC",
162 + "url" : "https://opensource.org/licenses/ISC"
163 + }
164 +}
165 +
166 +// Not valid metadata
167 +{
168 + "licenses" : [
169 + {
170 + "type": "MIT",
171 + "url": "https://www.opensource.org/licenses/mit-license.php"
172 + },
173 + {
174 + "type": "Apache-2.0",
175 + "url": "https://opensource.org/licenses/apache2.0.php"
176 + }
177 + ]
178 +}
179 +```
180 +
181 +Those styles are now deprecated. Instead, use SPDX expressions, like this:
182 +
183 +```json
184 +{
185 + "license": "ISC"
186 +}
187 +```
188 +
189 +```json
190 +{
191 + "license": "(MIT OR Apache-2.0)"
192 +}
193 +```
194 +
195 +Finally, if you do not wish to grant others the right to use a private or
196 +unpublished package under any terms:
197 +
198 +```json
199 +{
200 + "license": "UNLICENSED"
201 +}
202 +```
203 +
204 +Consider also setting `"private": true` to prevent accidental publication.
205 +
206 +### people fields: author, contributors
207 +
208 +The "author" is one person. "contributors" is an array of people. A
209 +"person" is an object with a "name" field and optionally "url" and "email",
210 +like this:
211 +
212 +```json
213 +{
214 + "name" : "Barney Rubble",
215 + "email" : "b@rubble.com",
216 + "url" : "http://barnyrubble.tumblr.com/"
217 +}
218 +```
219 +
220 +Or you can shorten that all into a single string, and npm will parse it for
221 +you:
222 +
223 +```json
224 +{
225 + "author": "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
226 +}
227 +```
228 +
229 +Both email and url are optional either way.
230 +
231 +npm also sets a top-level "maintainers" field with your npm user info.
232 +
233 +### funding
234 +
235 +You can specify an object containing an URL that provides up-to-date
236 +information about ways to help fund development of your package, or a
237 +string URL, or an array of these:
238 +
239 +```json
240 +{
241 + "funding": {
242 + "type" : "individual",
243 + "url" : "http://example.com/donate"
244 + },
245 +
246 + "funding": {
247 + "type" : "patreon",
248 + "url" : "https://www.patreon.com/my-account"
249 + },
250 +
251 + "funding": "http://example.com/donate",
252 +
253 + "funding": [
254 + {
255 + "type" : "individual",
256 + "url" : "http://example.com/donate"
257 + },
258 + "http://example.com/donateAlso",
259 + {
260 + "type" : "patreon",
261 + "url" : "https://www.patreon.com/my-account"
262 + }
263 + ]
264 +}
265 +```
266 +
267 +Users can use the `npm fund` subcommand to list the `funding` URLs of all
268 +dependencies of their project, direct and indirect. A shortcut to visit
269 +each funding url is also available when providing the project name such as:
270 +`npm fund <projectname>` (when there are multiple URLs, the first one will
271 +be visited)
272 +
273 +### files
274 +
275 +The optional `files` field is an array of file patterns that describes the
276 +entries to be included when your package is installed as a dependency. File
277 +patterns follow a similar syntax to `.gitignore`, but reversed: including a
278 +file, directory, or glob pattern (`*`, `**/*`, and such) will make it so
279 +that file is included in the tarball when it's packed. Omitting the field
280 +will make it default to `["*"]`, which means it will include all files.
281 +
282 +Some special files and directories are also included or excluded regardless
283 +of whether they exist in the `files` array (see below).
284 +
285 +You can also provide a `.npmignore` file in the root of your package or in
286 +subdirectories, which will keep files from being included. At the root of
287 +your package it will not override the "files" field, but in subdirectories
288 +it will. The `.npmignore` file works just like a `.gitignore`. If there is
289 +a `.gitignore` file, and `.npmignore` is missing, `.gitignore`'s contents
290 +will be used instead.
291 +
292 +Files included with the "package.json#files" field _cannot_ be excluded
293 +through `.npmignore` or `.gitignore`.
294 +
295 +Certain files are always included, regardless of settings:
296 +
297 +* `package.json`
298 +* `README`
299 +* `CHANGES` / `CHANGELOG` / `HISTORY`
300 +* `LICENSE` / `LICENCE`
301 +* `NOTICE`
302 +* The file in the "main" field
303 +
304 +`README`, `CHANGES`, `LICENSE` & `NOTICE` can have any case and extension.
305 +
306 +Conversely, some files are always ignored:
307 +
308 +* `.git`
309 +* `CVS`
310 +* `.svn`
311 +* `.hg`
312 +* `.lock-wscript`
313 +* `.wafpickle-N`
314 +* `.*.swp`
315 +* `.DS_Store`
316 +* `._*`
317 +* `npm-debug.log`
318 +* `.npmrc`
319 +* `node_modules`
320 +* `config.gypi`
321 +* `*.orig`
322 +* `package-lock.json` (use
323 + [`npm-shrinkwrap.json`](/cli/v7/configuring-npm/npm-shrinkwrap-json) if you wish
324 + it to be published)
325 +
326 +### main
327 +
328 +The main field is a module ID that is the primary entry point to your
329 +program. That is, if your package is named `foo`, and a user installs it,
330 +and then does `require("foo")`, then your main module's exports object will
331 +be returned.
332 +
333 +This should be a module relative to the root of your package folder.
334 +
335 +For most modules, it makes the most sense to have a main script and often
336 +not much else.
337 +
338 +If `main` is not set it defaults to `index.js` in the packages root folder.
339 +
340 +### browser
341 +
342 +If your module is meant to be used client-side the browser field should be
343 +used instead of the main field. This is helpful to hint users that it might
344 +rely on primitives that aren't available in Node.js modules. (e.g.
345 +`window`)
346 +
347 +### bin
348 +
349 +A lot of packages have one or more executable files that they'd like to
350 +install into the PATH. npm makes this pretty easy (in fact, it uses this
351 +feature to install the "npm" executable.)
352 +
353 +To use this, supply a `bin` field in your package.json which is a map of
354 +command name to local file name. On install, npm will symlink that file
355 +into `prefix/bin` for global installs, or `./node_modules/.bin/` for local
356 +installs.
357 +
358 +
359 +For example, myapp could have this:
360 +
361 +```json
362 +{
363 + "bin": {
364 + "myapp": "./cli.js"
365 + }
366 +}
367 +```
368 +
369 +So, when you install myapp, it'll create a symlink from the `cli.js` script
370 +to `/usr/local/bin/myapp`.
371 +
372 +If you have a single executable, and its name should be the name of the
373 +package, then you can just supply it as a string. For example:
374 +
375 +```json
376 +{
377 + "name": "my-program",
378 + "version": "1.2.5",
379 + "bin": "./path/to/program"
380 +}
381 +```
382 +
383 +would be the same as this:
384 +
385 +```json
386 +{
387 + "name": "my-program",
388 + "version": "1.2.5",
389 + "bin": {
390 + "my-program": "./path/to/program"
391 + }
392 +}
393 +```
394 +
395 +Please make sure that your file(s) referenced in `bin` starts with
396 +`#!/usr/bin/env node`, otherwise the scripts are started without the node
397 +executable!
398 +
399 +### man
400 +
401 +Specify either a single file or an array of filenames to put in place for
402 +the `man` program to find.
403 +
404 +If only a single file is provided, then it's installed such that it is the
405 +result from `man <pkgname>`, regardless of its actual filename. For
406 +example:
407 +
408 +```json
409 +{
410 + "name": "foo",
411 + "version": "1.2.3",
412 + "description": "A packaged foo fooer for fooing foos",
413 + "main": "foo.js",
414 + "man": "./man/doc.1"
415 +}
416 +```
417 +
418 +would link the `./man/doc.1` file in such that it is the target for `man
419 +foo`
420 +
421 +If the filename doesn't start with the package name, then it's prefixed.
422 +So, this:
423 +
424 +```json
425 +{
426 + "name": "foo",
427 + "version": "1.2.3",
428 + "description": "A packaged foo fooer for fooing foos",
429 + "main": "foo.js",
430 + "man": [
431 + "./man/foo.1",
432 + "./man/bar.1"
433 + ]
434 +}
435 +```
436 +
437 +will create files to do `man foo` and `man foo-bar`.
438 +
439 +Man files must end with a number, and optionally a `.gz` suffix if they are
440 +compressed. The number dictates which man section the file is installed
441 +into.
442 +
443 +```json
444 +{
445 + "name": "foo",
446 + "version": "1.2.3",
447 + "description": "A packaged foo fooer for fooing foos",
448 + "main": "foo.js",
449 + "man": [
450 + "./man/foo.1",
451 + "./man/foo.2"
452 + ]
453 +}
454 +```
455 +
456 +will create entries for `man foo` and `man 2 foo`
457 +
458 +### directories
459 +
460 +The CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec
461 +details a few ways that you can indicate the structure of your package
462 +using a `directories` object. If you look at [npm's
463 +package.json](https://registry.npmjs.org/npm/latest), you'll see that it
464 +has directories for doc, lib, and man.
465 +
466 +In the future, this information may be used in other creative ways.
467 +
468 +#### directories.bin
469 +
470 +If you specify a `bin` directory in `directories.bin`, all the files in
471 +that folder will be added.
472 +
473 +Because of the way the `bin` directive works, specifying both a `bin` path
474 +and setting `directories.bin` is an error. If you want to specify
475 +individual files, use `bin`, and for all the files in an existing `bin`
476 +directory, use `directories.bin`.
477 +
478 +#### directories.man
479 +
480 +A folder that is full of man pages. Sugar to generate a "man" array by
481 +walking the folder.
482 +
483 +### repository
484 +
485 +Specify the place where your code lives. This is helpful for people who
486 +want to contribute. If the git repo is on GitHub, then the `npm docs`
487 +command will be able to find you.
488 +
489 +Do it like this:
490 +
491 +```json
492 +{
493 + "repository": {
494 + "type": "git",
495 + "url": "https://github.com/npm/cli.git"
496 + }
497 +}
498 +```
499 +
500 +The URL should be a publicly available (perhaps read-only) url that can be
501 +handed directly to a VCS program without any modification. It should not
502 +be a url to an html project page that you put in your browser. It's for
503 +computers.
504 +
505 +For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the
506 +same shortcut syntax you use for `npm install`:
507 +
508 +```json
509 +{
510 + "repository": "npm/npm",
511 +
512 + "repository": "github:user/repo",
513 +
514 + "repository": "gist:11081aaa281",
515 +
516 + "repository": "bitbucket:user/repo",
517 +
518 + "repository": "gitlab:user/repo"
519 +}
520 +```
521 +
522 +If the `package.json` for your package is not in the root directory (for
523 +example if it is part of a monorepo), you can specify the directory in
524 +which it lives:
525 +
526 +```json
527 +{
528 + "repository": {
529 + "type": "git",
530 + "url": "https://github.com/facebook/react.git",
531 + "directory": "packages/react-dom"
532 + }
533 +}
534 +```
535 +
536 +### scripts
537 +
538 +The "scripts" property is a dictionary containing script commands that are
539 +run at various times in the lifecycle of your package. The key is the
540 +lifecycle event, and the value is the command to run at that point.
541 +
542 +See [`scripts`](/cli/v7/using-npm/scripts) to find out more about writing package
543 +scripts.
544 +
545 +### config
546 +
547 +A "config" object can be used to set configuration parameters used in
548 +package scripts that persist across upgrades. For instance, if a package
549 +had the following:
550 +
551 +```json
552 +{
553 + "name": "foo",
554 + "config": {
555 + "port": "8080"
556 + }
557 +}
558 +```
559 +
560 +and then had a "start" command that then referenced the
561 +`npm_package_config_port` environment variable, then the user could
562 +override that by doing `npm config set foo:port 8001`.
563 +
564 +See [`config`](/cli/v7/using-npm/config) and [`scripts`](/cli/v7/using-npm/scripts) for
565 +more on package configs.
566 +
567 +### dependencies
568 +
569 +Dependencies are specified in a simple object that maps a package name to a
570 +version range. The version range is a string which has one or more
571 +space-separated descriptors. Dependencies can also be identified with a
572 +tarball or git URL.
573 +
574 +**Please do not put test harnesses or transpilers or other "development"
575 +time tools in your `dependencies` object.** See `devDependencies`, below.
576 +
577 +See [semver](/cli/v7/using-npm/semver#versions) for more details about specifying version ranges.
578 +
579 +* `version` Must match `version` exactly
580 +* `>version` Must be greater than `version`
581 +* `>=version` etc
582 +* `<version`
583 +* `<=version`
584 +* `~version` "Approximately equivalent to version" See
585 + [semver](https://github.com/npm/node-semver#versions)
586 +* `^version` "Compatible with version" See [semver](https://github.com/npm/node-semver#versions)
587 +* `1.2.x` 1.2.0, 1.2.1, etc., but not 1.3.0
588 +* `http://...` See 'URLs as Dependencies' below
589 +* `*` Matches any version
590 +* `""` (just an empty string) Same as `*`
591 +* `version1 - version2` Same as `>=version1 <=version2`.
592 +* `range1 || range2` Passes if either range1 or range2 are satisfied.
593 +* `git...` See 'Git URLs as Dependencies' below
594 +* `user/repo` See 'GitHub URLs' below
595 +* `tag` A specific version tagged and published as `tag` See [`npm
596 + dist-tag`](/cli/v7/commands/npm-dist-tag)
597 +* `path/path/path` See [Local Paths](#local-paths) below
598 +
599 +For example, these are all valid:
600 +
601 +```json
602 +{
603 + "dependencies": {
604 + "foo": "1.0.0 - 2.9999.9999",
605 + "bar": ">=1.0.2 <2.1.2",
606 + "baz": ">1.0.2 <=2.3.4",
607 + "boo": "2.0.1",
608 + "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0",
609 + "asd": "http://asdf.com/asdf.tar.gz",
610 + "til": "~1.2",
611 + "elf": "~1.2.3",
612 + "two": "2.x",
613 + "thr": "3.3.x",
614 + "lat": "latest",
615 + "dyl": "file:../dyl"
616 + }
617 +}
618 +```
619 +
620 +#### URLs as Dependencies
621 +
622 +You may specify a tarball URL in place of a version range.
623 +
624 +This tarball will be downloaded and installed locally to your package at
625 +install time.
626 +
627 +#### Git URLs as Dependencies
628 +
629 +Git urls are of the form:
630 +
631 +```bash
632 +<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
633 +```
634 +
635 +`<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or
636 +`git+file`.
637 +
638 +If `#<commit-ish>` is provided, it will be used to clone exactly that
639 +commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
640 +be any valid semver range or exact version, and npm will look for any tags
641 +or refs matching that range in the remote repository, much as it would for
642 +a registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
643 +specified, then `master` is used.
644 +
645 +Examples:
646 +
647 +```bash
648 +git+ssh://git@github.com:npm/cli.git#v1.0.27
649 +git+ssh://git@github.com:npm/cli#semver:^5.0
650 +git+https://isaacs@github.com/npm/cli.git
651 +git://github.com/npm/cli.git#v1.0.27
652 +```
653 +
654 +#### GitHub URLs
655 +
656 +As of version 1.1.65, you can refer to GitHub urls as just "foo":
657 +"user/foo-project". Just as with git URLs, a `commit-ish` suffix can be
658 +included. For example:
659 +
660 +```json
661 +{
662 + "name": "foo",
663 + "version": "0.0.0",
664 + "dependencies": {
665 + "express": "expressjs/express",
666 + "mocha": "mochajs/mocha#4727d357ea",
667 + "module": "user/repo#feature\/branch"
668 + }
669 +}
670 +```
671 +
672 +#### Local Paths
673 +
674 +As of version 2.0.0 you can provide a path to a local directory that
675 +contains a package. Local paths can be saved using `npm install -S` or `npm
676 +install --save`, using any of these forms:
677 +
678 +```bash
679 +../foo/bar
680 +~/foo/bar
681 +./foo/bar
682 +/foo/bar
683 +```
684 +
685 +in which case they will be normalized to a relative path and added to your
686 +`package.json`. For example:
687 +
688 +```json
689 +{
690 + "name": "baz",
691 + "dependencies": {
692 + "bar": "file:../foo/bar"
693 + }
694 +}
695 +```
696 +
697 +This feature is helpful for local offline development and creating tests
698 +that require npm installing where you don't want to hit an external server,
699 +but should not be used when publishing packages to the public registry.
700 +
701 +### devDependencies
702 +
703 +If someone is planning on downloading and using your module in their
704 +program, then they probably don't want or need to download and build the
705 +external test or documentation framework that you use.
706 +
707 +In this case, it's best to map these additional items in a
708 +`devDependencies` object.
709 +
710 +These things will be installed when doing `npm link` or `npm install` from
711 +the root of a package, and can be managed like any other npm configuration
712 +param. See [`config`](/cli/v7/using-npm/config) for more on the topic.
713 +
714 +For build steps that are not platform-specific, such as compiling
715 +CoffeeScript or other languages to JavaScript, use the `prepare` script to
716 +do this, and make the required package a devDependency.
717 +
718 +For example:
719 +
720 +```json
721 +{
722 + "name": "ethopia-waza",
723 + "description": "a delightfully fruity coffee varietal",
724 + "version": "1.2.3",
725 + "devDependencies": {
726 + "coffee-script": "~1.6.3"
727 + },
728 + "scripts": {
729 + "prepare": "coffee -o lib/ -c src/waza.coffee"
730 + },
731 + "main": "lib/waza.js"
732 +}
733 +```
734 +
735 +The `prepare` script will be run before publishing, so that users can
736 +consume the functionality without requiring them to compile it themselves.
737 +In dev mode (ie, locally running `npm install`), it'll run this script as
738 +well, so that you can test it easily.
739 +
740 +### peerDependencies
741 +
742 +In some cases, you want to express the compatibility of your package with a
743 +host tool or library, while not necessarily doing a `require` of this host.
744 +This is usually referred to as a *plugin*. Notably, your module may be
745 +exposing a specific interface, expected and specified by the host
746 +documentation.
747 +
748 +For example:
749 +
750 +```json
751 +{
752 + "name": "tea-latte",
753 + "version": "1.3.5",
754 + "peerDependencies": {
755 + "tea": "2.x"
756 + }
757 +}
758 +```
759 +
760 +This ensures your package `tea-latte` can be installed *along* with the
761 +second major version of the host package `tea` only. `npm install
762 +tea-latte` could possibly yield the following dependency graph:
763 +
764 +```bash
765 +├── tea-latte@1.3.5
766 +└── tea@2.2.0
767 +```
768 +
769 +In npm versions 3 through 6, `peerDependencies` were not automatically
770 +installed, and would raise a warning if an invalid version of the peer
771 +dependency was found in the tree. As of npm v7, peerDependencies _are_
772 +installed by default.
773 +
774 +Trying to install another plugin with a conflicting requirement may cause
775 +an error if the tree cannot be resolved correctly. For this reason, make
776 +sure your plugin requirement is as broad as possible, and not to lock it
777 +down to specific patch versions.
778 +
779 +Assuming the host complies with [semver](https://semver.org/), only changes
780 +in the host package's major version will break your plugin. Thus, if you've
781 +worked with every 1.x version of the host package, use `"^1.0"` or `"1.x"`
782 +to express this. If you depend on features introduced in 1.5.2, use
783 +`"^1.5.2"`.
784 +
785 +### peerDependenciesMeta
786 +
787 +When a user installs your package, npm will emit warnings if packages
788 +specified in `peerDependencies` are not already installed. The
789 +`peerDependenciesMeta` field serves to provide npm more information on how
790 +your peer dependencies are to be used. Specifically, it allows peer
791 +dependencies to be marked as optional.
792 +
793 +For example:
794 +
795 +```json
796 +{
797 + "name": "tea-latte",
798 + "version": "1.3.5",
799 + "peerDependencies": {
800 + "tea": "2.x",
801 + "soy-milk": "1.2"
802 + },
803 + "peerDependenciesMeta": {
804 + "soy-milk": {
805 + "optional": true
806 + }
807 + }
808 +}
809 +```
810 +
811 +Marking a peer dependency as optional ensures npm will not emit a warning
812 +if the `soy-milk` package is not installed on the host. This allows you to
813 +integrate and interact with a variety of host packages without requiring
814 +all of them to be installed.
815 +
816 +### bundledDependencies
817 +
818 +This defines an array of package names that will be bundled when publishing
819 +the package.
820 +
821 +In cases where you need to preserve npm packages locally or have them
822 +available through a single file download, you can bundle the packages in a
823 +tarball file by specifying the package names in the `bundledDependencies`
824 +array and executing `npm pack`.
825 +
826 +For example:
827 +
828 +If we define a package.json like this:
829 +
830 +```json
831 +{
832 + "name": "awesome-web-framework",
833 + "version": "1.0.0",
834 + "bundledDependencies": [
835 + "renderized",
836 + "super-streams"
837 + ]
838 +}
839 +```
840 +
841 +we can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`.
842 +This file contains the dependencies `renderized` and `super-streams` which
843 +can be installed in a new project by executing `npm install
844 +awesome-web-framework-1.0.0.tgz`. Note that the package names do not
845 +include any versions, as that information is specified in `dependencies`.
846 +
847 +If this is spelled `"bundleDependencies"`, then that is also honored.
848 +
849 +### optionalDependencies
850 +
851 +If a dependency can be used, but you would like npm to proceed if it cannot
852 +be found or fails to install, then you may put it in the
853 +`optionalDependencies` object. This is a map of package name to version or
854 +url, just like the `dependencies` object. The difference is that build
855 +failures do not cause installation to fail. Running `npm install
856 +--no-optional` will prevent these dependencies from being installed.
857 +
858 +It is still your program's responsibility to handle the lack of the
859 +dependency. For example, something like this:
860 +
861 +```js
862 +try {
863 + var foo = require('foo')
864 + var fooVersion = require('foo/package.json').version
865 +} catch (er) {
866 + foo = null
867 +}
868 +if ( notGoodFooVersion(fooVersion) ) {
869 + foo = null
870 +}
871 +
872 +// .. then later in your program ..
873 +
874 +if (foo) {
875 + foo.doFooThings()
876 +}
877 +```
878 +
879 +Entries in `optionalDependencies` will override entries of the same name in
880 +`dependencies`, so it's usually best to only put in one place.
881 +
882 +### engines
883 +
884 +You can specify the version of node that your stuff works on:
885 +
886 +```json
887 +{
888 + "engines": {
889 + "node": ">=0.10.3 <15"
890 + }
891 +}
892 +```
893 +
894 +And, like with dependencies, if you don't specify the version (or if you
895 +specify "\*" as the version), then any version of node will do.
896 +
897 +You can also use the "engines" field to specify which versions of npm are
898 +capable of properly installing your program. For example:
899 +
900 +```json
901 +{
902 + "engines": {
903 + "npm": "~1.0.20"
904 + }
905 +}
906 +```
907 +
908 +Unless the user has set the `engine-strict` config flag, this field is
909 +advisory only and will only produce warnings when your package is installed
910 +as a dependency.
911 +
912 +### os
913 +
914 +You can specify which operating systems your
915 +module will run on:
916 +
917 +```json
918 +{
919 + "os": [
920 + "darwin",
921 + "linux"
922 + ]
923 +}
924 +```
925 +
926 +You can also block instead of allowing operating systems, just prepend the
927 +blocked os with a '!':
928 +
929 +```json
930 +{
931 + "os": [
932 + "!win32"
933 + ]
934 +}
935 +```
936 +
937 +The host operating system is determined by `process.platform`
938 +
939 +It is allowed to both block and allow an item, although there isn't any
940 +good reason to do this.
941 +
942 +### cpu
943 +
944 +If your code only runs on certain cpu architectures,
945 +you can specify which ones.
946 +
947 +```json
948 +{
949 + "cpu": [
950 + "x64",
951 + "ia32"
952 + ]
953 +}
954 +```
955 +
956 +Like the `os` option, you can also block architectures:
957 +
958 +```json
959 +{
960 + "cpu": [
961 + "!arm",
962 + "!mips"
963 + ]
964 +}
965 +```
966 +
967 +The host architecture is determined by `process.arch`
968 +
969 +### private
970 +
971 +If you set `"private": true` in your package.json, then npm will refuse to
972 +publish it.
973 +
974 +This is a way to prevent accidental publication of private repositories.
975 +If you would like to ensure that a given package is only ever published to
976 +a specific registry (for example, an internal registry), then use the
977 +`publishConfig` dictionary described below to override the `registry`
978 +config param at publish-time.
979 +
980 +### publishConfig
981 +
982 +This is a set of config values that will be used at publish-time. It's
983 +especially handy if you want to set the tag, registry or access, so that
984 +you can ensure that a given package is not tagged with "latest", published
985 +to the global public registry or that a scoped module is private by
986 +default.
987 +
988 +See [`config`](/cli/v7/using-npm/config) to see the list of config options that
989 +can be overridden.
990 +
991 +### workspaces
992 +
993 +The optional `workspaces` field is an array of file patterns that describes
994 +locations within the local file system that the install client should look
995 +up to find each [workspace](/cli/v7/using-npm/workspaces) that needs to be
996 +symlinked to the top level `node_modules` folder.
997 +
998 +It can describe either the direct paths of the folders to be used as
999 +workspaces or it can define globs that will resolve to these same folders.
1000 +
1001 +In the following example, all folders located inside the folder
1002 +`./packages` will be treated as workspaces as long as they have valid
1003 +`package.json` files inside them:
1004 +
1005 +```json
1006 +{
1007 + "name": "workspace-example",
1008 + "workspaces": [
1009 + "./packages/*"
1010 + ]
1011 +}
1012 +```
1013 +
1014 +See [`workspaces`](/cli/v7/using-npm/workspaces) for more examples.
1015 +
1016 +### DEFAULT VALUES
1017 +
1018 +npm will default some values based on package contents.
1019 +
1020 +* `"scripts": {"start": "node server.js"}`
1021 +
1022 + If there is a `server.js` file in the root of your package, then npm will
1023 + default the `start` command to `node server.js`.
1024 +
1025 +* `"scripts":{"install": "node-gyp rebuild"}`
1026 +
1027 + If there is a `binding.gyp` file in the root of your package and you have
1028 + not defined an `install` or `preinstall` script, npm will default the
1029 + `install` command to compile using node-gyp.
1030 +
1031 +* `"contributors": [...]`
1032 +
1033 + If there is an `AUTHORS` file in the root of your package, npm will treat
1034 + each line as a `Name <email> (url)` format, where email and url are
1035 + optional. Lines which start with a `#` or are blank, will be ignored.
1036 +
1037 +### SEE ALSO
1038 +
1039 +* [semver](https://github.com/npm/node-semver#versions)
1040 +* [workspaces](/cli/v7/using-npm/workspaces)
1041 +* [npm init](/cli/v7/commands/npm-init)
1042 +* [npm version](/cli/v7/commands/npm-version)
1043 +* [npm config](/cli/v7/commands/npm-config)
1044 +* [npm help](/cli/v7/commands/npm-help)
1045 +* [npm install](/cli/v7/commands/npm-install)
1046 +* [npm publish](/cli/v7/commands/npm-publish)
1047 +* [npm uninstall](/cli/v7/commands/npm-uninstall)
content/cli/v7/configuring-npm/package-lock-json.md new
+244
@@ -0,0 +1,244 @@
1 +---
2 +title: package-lock.json
3 +section: 5
4 +description: A manifestation of the manifest
5 +redirect_from:
6 + - /configuring-npm/package-lock-json
7 + - /configuring-npm/package-lock-json.html
8 + - /files/package-lock.json
9 + - /files/package-lock.json.html
10 +github_repo: npm/cli
11 +github_branch: latest
12 +github_path: docs/content/configuring-npm/package-lock-json.md
13 +---
14 +
15 +### Description
16 +
17 +`package-lock.json` is automatically generated for any operations where npm
18 +modifies either the `node_modules` tree, or `package.json`. It describes the
19 +exact tree that was generated, such that subsequent installs are able to
20 +generate identical trees, regardless of intermediate dependency updates.
21 +
22 +This file is intended to be committed into source repositories, and serves
23 +various purposes:
24 +
25 +* Describe a single representation of a dependency tree such that
26 + teammates, deployments, and continuous integration are guaranteed to
27 + install exactly the same dependencies.
28 +
29 +* Provide a facility for users to "time-travel" to previous states of
30 + `node_modules` without having to commit the directory itself.
31 +
32 +* Facilitate greater visibility of tree changes through readable source
33 + control diffs.
34 +
35 +* Optimize the installation process by allowing npm to skip repeated
36 + metadata resolutions for previously-installed packages.
37 +
38 +* As of npm v7, lockfiles include enough information to gain a complete
39 + picture of the package tree, reducing the need to read `package.json`
40 + files, and allowing for significant performance improvements.
41 +
42 +### `package-lock.json` vs `npm-shrinkwrap.json`
43 +
44 +Both of these files have the same format, and perform similar functions in
45 +the root of a project.
46 +
47 +The difference is that `package-lock.json` is that it cannot be published,
48 +and it will be ignored if found in any place other than the root project.
49 +
50 +In contrast, [npm-shrinkwrap.json](/cli/v7/configuring-npm/npm-shrinkwrap-json) allows
51 +publication, and defines the dependency tree from the point encountered.
52 +This is not recommended unless deploying a CLI tool or otherwise using the
53 +publication process for producing production packages.
54 +
55 +If both `package-lock.json` and `npm-shrinkwrap.json` are present in the
56 +root of a project, `npm-shrinkwrap.json` will take precedence and
57 +`package-lock.json` will be ignored.
58 +
59 +### Hidden Lockfiles
60 +
61 +In order to avoid processing the `node_modules` folder repeatedly, npm as
62 +of v7 uses a "hidden" lockfile present in
63 +`node_modules/.package-lock.json`. This contains information about the
64 +tree, and is used in lieu of reading the entire `node_modules` hierarchy
65 +provided that the following conditions are met:
66 +
67 +- All package folders it references exist in the `node_modules` hierarchy.
68 +- No package folders exist in the `node_modules` hierarchy that are not
69 + listed in the lockfile.
70 +- The modified time of the file is at least as recent as all of the package
71 + folders it references.
72 +
73 +That is, the hidden lockfile will only be relevant if it was created as
74 +part of the most recent update to the package tree. If another CLI mutates
75 +the tree in any way, this will be detected, and the hidden lockfile will be
76 +ignored.
77 +
78 +Note that it _is_ possible to manually change the _contents_ of a package
79 +in such a way that the modified time of the package folder is unaffected.
80 +For example, if you add a file to `node_modules/foo/lib/bar.js`, then the
81 +modified time on `node_modules/foo` will not reflect this change. If you
82 +are manually editing files in `node_modules`, it is generally best to
83 +delete the file at `node_modules/.package-lock.json`.
84 +
85 +As the hidden lockfile is ignored by older npm versions, it does not
86 +contain the backwards compatibility affordances present in "normal"
87 +lockfiles. That is, it is `lockfileVersion: 3`, rather than
88 +`lockfileVersion: 2`.
89 +
90 +### Handling Old Lockfiles
91 +
92 +When npm detects a lockfile from npm v6 or before during the package
93 +installation process, it is automatically updated to fetch missing
94 +information from either the `node_modules` tree or (in the case of empty
95 +`node_modules` trees or very old lockfile formats) the npm registry.
96 +
97 +### File Format
98 +
99 +#### `name`
100 +
101 +The name of the package this is a package-lock for. This will match what's
102 +in `package.json`.
103 +
104 +#### `version`
105 +
106 +The version of the package this is a package-lock for. This will match
107 +what's in `package.json`.
108 +
109 +#### `lockfileVersion`
110 +
111 +An integer version, starting at `1` with the version number of this
112 +document whose semantics were used when generating this
113 +`package-lock.json`.
114 +
115 +Note that the file format changed significantly in npm v7 to track
116 +information that would have otherwise required looking in `node_modules` or
117 +the npm registry. Lockfiles generated by npm v7 will contain
118 +`lockfileVersion: 2`.
119 +
120 +* No version provided: an "ancient" shrinkwrap file from a version of npm
121 + prior to npm v5.
122 +* `1`: The lockfile version used by npm v5 and v6.
123 +* `2`: The lockfile version used by npm v7, which is backwards compatible
124 + to v1 lockfiles.
125 +* `3`: The lockfile version used by npm v7, _without_ backwards
126 + compatibility affordances. This is used for the hidden lockfile at
127 + `node_modules/.package-lock.json`, and will likely be used in a future
128 + version of npm, once support for npm v6 is no longer relevant.
129 +
130 +npm will always attempt to get whatever data it can out of a lockfile, even
131 +if it is not a version that it was designed to support.
132 +
133 +#### `packages`
134 +
135 +This is an object that maps package locations to an object containing the
136 +information about that package.
137 +
138 +The root project is typically listed with a key of `""`, and all other
139 +packages are listed with their relative paths from the root project folder.
140 +
141 +Package descriptors have the following fields:
142 +
143 +* version: The version found in `package.json`
144 +
145 +* resolved: The place where the package was actually resolved from. In
146 + the case of packages fetched from the registry, this will be a url to a
147 + tarball. In the case of git dependencies, this will be the full git url
148 + with commit sha. In the case of link dependencies, this will be the
149 + location of the link target.
150 +
151 +* integrity: A `sha512` or `sha1` [Standard Subresource
152 + Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/)
153 + string for the artifact that was unpacked in this location.
154 +
155 +* link: A flag to indicate that this is a symbolic link. If this is
156 + present, no other fields are specified, since the link target will also
157 + be included in the lockfile.
158 +
159 +* dev, optional, devOptional: If the package is strictly part of the
160 + `devDependencies` tree, then `dev` will be true. If it is strictly part
161 + of the `optionalDependencies` tree, then `optional` will be set. If it
162 + is both a `dev` dependency _and_ an `optional` dependency of a non-dev
163 + dependency, then `devOptional` will be set. (An `optional` dependency of
164 + a `dev` dependency will have both `dev` and `optional` set.)
165 +
166 +* inBundle: A flag to indicate that the package is a bundled dependency.
167 +
168 +* hasInstallScript: A flag to indicate that the package has a `preinstall`,
169 + `install`, or `postinstall` script.
170 +
171 +* hasShrinkwrap: A flag to indicate that the package has an
172 + `npm-shrinkwrap.json` file.
173 +
174 +* bin, license, engines, dependencies, optionalDependencies: fields from
175 + `package.json`
176 +
177 +#### dependencies
178 +
179 +Legacy data for supporting versions of npm that use `lockfileVersion: 1`.
180 +This is a mapping of package names to dependency objects. Because the
181 +object structure is strictly hierarchical, symbolic link dependencies are
182 +somewhat challenging to represent in some cases.
183 +
184 +npm v7 ignores this section entirely if a `packages` section is present,
185 +but does keep it up to date in order to support switching between npm v6
186 +and npm v7.
187 +
188 +Dependency objects have the following fields:
189 +
190 +* version: a specifier that varies depending on the nature of the package,
191 + and is usable in fetching a new copy of it.
192 +
193 + * bundled dependencies: Regardless of source, this is a version number
194 + that is purely for informational purposes.
195 + * registry sources: This is a version number. (eg, `1.2.3`)
196 + * git sources: This is a git specifier with resolved committish. (eg,
197 + `git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e`)
198 + * http tarball sources: This is the URL of the tarball. (eg,
199 + `https://example.com/example-1.3.0.tgz`)
200 + * local tarball sources: This is the file URL of the tarball. (eg
201 + `file:///opt/storage/example-1.3.0.tgz`)
202 + * local link sources: This is the file URL of the link. (eg
203 + `file:libs/our-module`)
204 +
205 +* integrity: A `sha512` or `sha1` [Standard Subresource
206 + Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/)
207 + string for the artifact that was unpacked in this location. For git
208 + dependencies, this is the commit sha.
209 +
210 +* resolved: For registry sources this is path of the tarball relative to
211 + the registry URL. If the tarball URL isn't on the same server as the
212 + registry URL then this is a complete URL.
213 +
214 +* bundled: If true, this is the bundled dependency and will be installed
215 + by the parent module. When installing, this module will be extracted
216 + from the parent module during the extract phase, not installed as a
217 + separate dependency.
218 +
219 +* dev: If true then this dependency is either a development dependency ONLY
220 + of the top level module or a transitive dependency of one. This is false
221 + for dependencies that are both a development dependency of the top level
222 + and a transitive dependency of a non-development dependency of the top
223 + level.
224 +
225 +* optional: If true then this dependency is either an optional dependency
226 + ONLY of the top level module or a transitive dependency of one. This is
227 + false for dependencies that are both an optional dependency of the top
228 + level and a transitive dependency of a non-optional dependency of the top
229 + level.
230 +
231 +* requires: This is a mapping of module name to version. This is a list of
232 + everything this module requires, regardless of where it will be
233 + installed. The version should match via normal matching rules a
234 + dependency either in our `dependencies` or in a level higher than us.
235 +
236 +* dependencies: The dependencies of this dependency, exactly as at the top
237 + level.
238 +
239 +### See also
240 +
241 +* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)
242 +* [npm-shrinkwrap.json](/cli/v7/configuring-npm/npm-shrinkwrap-json)
243 +* [package.json](/cli/v7/configuring-npm/package-json)
244 +* [npm install](/cli/v7/commands/npm-install)
content/cli/v7/configuring-npm/package-locks.md new
+181
@@ -0,0 +1,181 @@
1 +---
2 +title: package-locks
3 +section: 5
4 +description: An explanation of npm lockfiles
5 +github_repo: npm/cli
6 +github_branch: latest
7 +github_path: docs/content/configuring-npm/package-locks.md
8 +---
9 +
10 +### Description
11 +
12 +Conceptually, the "input" to [`npm install`](/cli/v7/commands/npm-install) is a [package.json](/cli/v7/configuring-npm/package-json), while its
13 +"output" is a fully-formed `node_modules` tree: a representation of the
14 +dependencies you declared. In an ideal world, npm would work like a pure
15 +function: the same `package.json` should produce the exact same `node_modules`
16 +tree, any time. In some cases, this is indeed true. But in many others, npm is
17 +unable to do this. There are multiple reasons for this:
18 +
19 +* different versions of npm (or other package managers) may have been used to install a package, each using slightly different installation algorithms.
20 +
21 +* a new version of a direct semver-range package may have been published since the last time your packages were installed, and thus a newer version will be used.
22 +
23 +* A dependency of one of your dependencies may have published a new version, which will update even if you used pinned dependency specifiers (`1.2.3` instead of `^1.2.3`)
24 +
25 +* The registry you installed from is no longer available, or allows mutation of versions (unlike the primary npm registry), and a different version of a package exists under the same version number now.
26 +
27 +As an example, consider package A:
28 +
29 +```json
30 +{
31 + "name": "A",
32 + "version": "0.1.0",
33 + "dependencies": {
34 + "B": "<0.1.0"
35 + }
36 +}
37 +```
38 +
39 +package B:
40 +
41 +```json
42 +{
43 + "name": "B",
44 + "version": "0.0.1",
45 + "dependencies": {
46 + "C": "<0.1.0"
47 + }
48 +}
49 +```
50 +
51 +and package C:
52 +```json
53 +{
54 + "name": "C",
55 + "version": "0.0.1"
56 +}
57 +```
58 +
59 +If these are the only versions of A, B, and C available in the
60 +registry, then a normal `npm install A` will install:
61 +
62 +```json
63 +A@0.1.0
64 +`-- B@0.0.1
65 + `-- C@0.0.1
66 +```
67 +
68 +However, if B@0.0.2 is published, then a fresh `npm install A` will
69 +install:
70 +
71 +```bash
72 +A@0.1.0
73 +`-- B@0.0.2
74 + `-- C@0.0.1
75 +```
76 +
77 +assuming the new version did not modify B's dependencies. Of course,
78 +the new version of B could include a new version of C and any number
79 +of new dependencies. If such changes are undesirable, the author of A
80 +could specify a dependency on B@0.0.1. However, if A's author and B's
81 +author are not the same person, there's no way for A's author to say
82 +that he or she does not want to pull in newly published versions of C
83 +when B hasn't changed at all.
84 +
85 +To prevent this potential issue, npm uses [package-lock.json](/cli/v7/configuring-npm/package-lock-json) or, if present, [npm-shrinkwrap.json](/cli/v7/configuring-npm/shrinkwrap-json). These files are called package locks, or lockfiles.
86 +
87 +Whenever you run `npm install`, npm generates or updates your package lock,
88 +which will look something like this:
89 +
90 +```json
91 +{
92 + "name": "A",
93 + "version": "0.1.0",
94 + ...metadata fields...
95 + "dependencies": {
96 + "B": {
97 + "version": "0.0.1",
98 + "resolved": "https://registry.npmjs.org/B/-/B-0.0.1.tgz",
99 + "integrity": "sha512-DeAdb33F+"
100 + "dependencies": {
101 + "C": {
102 + "version": "git://github.com/org/C.git#5c380ae319fc4efe9e7f2d9c78b0faa588fd99b4"
103 + }
104 + }
105 + }
106 + }
107 +}
108 +```
109 +
110 +This file describes an *exact*, and more importantly *reproducible*
111 +`node_modules` tree. Once it's present, any future installation will base its
112 +work off this file, instead of recalculating dependency versions off
113 +[package.json](/cli/v7/configuring-npm/package-json).
114 +
115 +The presence of a package lock changes the installation behavior such that:
116 +
117 +1. The module tree described by the package lock is reproduced. This means
118 +reproducing the structure described in the file, using the specific files
119 +referenced in "resolved" if available, falling back to normal package resolution
120 +using "version" if one isn't.
121 +
122 +2. The tree is walked and any missing dependencies are installed in the usual
123 +fashion.
124 +
125 +If `preshrinkwrap`, `shrinkwrap` or `postshrinkwrap` are in the `scripts`
126 +property of the `package.json`, they will be executed in order. `preshrinkwrap`
127 +and `shrinkwrap` are executed before the shrinkwrap, `postshrinkwrap` is
128 +executed afterwards. These scripts run for both `package-lock.json` and
129 +`npm-shrinkwrap.json`. For example to run some postprocessing on the generated
130 +file:
131 +
132 +```json
133 + "scripts": {
134 + "postshrinkwrap": "json -I -e \"this.myMetadata = $MY_APP_METADATA\""
135 + }
136 +```
137 +
138 +#### Using locked packages
139 +
140 +Using a locked package is no different than using any package without a package
141 +lock: any commands that update `node_modules` and/or `package.json`'s
142 +dependencies will automatically sync the existing lockfile. This includes `npm
143 +install`, `npm rm`, `npm update`, etc. To prevent this update from happening,
144 +you can use the `--no-save` option to prevent saving altogether, or
145 +`--no-shrinkwrap` to allow `package.json` to be updated while leaving
146 +`package-lock.json` or `npm-shrinkwrap.json` intact.
147 +
148 +It is highly recommended you commit the generated package lock to source
149 +control: this will allow anyone else on your team, your deployments, your
150 +CI/continuous integration, and anyone else who runs `npm install` in your
151 +package source to get the exact same dependency tree that you were developing
152 +on. Additionally, the diffs from these changes are human-readable and will
153 +inform you of any changes npm has made to your `node_modules`, so you can notice
154 +if any transitive dependencies were updated, hoisted, etc.
155 +
156 +#### Resolving lockfile conflicts
157 +
158 +Occasionally, two separate npm install will create package locks that cause
159 +merge conflicts in source control systems. As of `npm@5.7.0`, these conflicts
160 +can be resolved by manually fixing any `package.json` conflicts, and then
161 +running `npm install [--package-lock-only]` again. npm will automatically
162 +resolve any conflicts for you and write a merged package lock that includes all
163 +the dependencies from both branches in a reasonable tree. If
164 +`--package-lock-only` is provided, it will do this without also modifying your
165 +local `node_modules/`.
166 +
167 +To make this process seamless on git, consider installing
168 +[`npm-merge-driver`](https://npm.im/npm-merge-driver), which will teach git how
169 +to do this itself without any user interaction. In short: `$ npx
170 +npm-merge-driver install -g` will let you do this, and even works with
171 +pre-`npm@5.7.0` versions of npm 5, albeit a bit more noisily. Note that if
172 +`package.json` itself conflicts, you will have to resolve that by hand and run
173 +`npm install` manually, even with the merge driver.
174 +
175 +### See Also
176 +
177 +* https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527
178 +* [package.json](/cli/v7/configuring-npm/package-json)
179 +* [package-lock.json](/cli/v7/configuring-npm/package-lock-json)
180 +* [shrinkwrap.json](/cli/v7/configuring-npm/shrinkwrap-json)
181 +* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)
content/cli/v7/configuring-npm/shrinkwrap-json.md new
+33
@@ -0,0 +1,33 @@
1 +---
2 +title: shrinkwrap.json
3 +section: 5
4 +description: A publishable lockfile
5 +github_repo: npm/cli
6 +github_branch: latest
7 +github_path: docs/content/configuring-npm/shrinkwrap-json.md
8 +---
9 +
10 +### Description
11 +
12 +`npm-shrinkwrap.json` is a file created by [`npm shrinkwrap`](/cli/v7/commands/npm-shrinkwrap). It is identical to
13 +`package-lock.json`, with one major caveat: Unlike `package-lock.json`,
14 +`npm-shrinkwrap.json` may be included when publishing a package.
15 +
16 +The recommended use-case for `npm-shrinkwrap.json` is applications deployed
17 +through the publishing process on the registry: for example, daemons and
18 +command-line tools intended as global installs or `devDependencies`. It's
19 +strongly discouraged for library authors to publish this file, since that would
20 +prevent end users from having control over transitive dependency updates.
21 +
22 +Additionally, if both `package-lock.json` and `npm-shrinkwrap.json` are present
23 +in a package root, `package-lock.json` will be ignored in favor of this file.
24 +
25 +For full details and description of the `npm-shrinkwrap.json` file format, refer
26 +to the manual page for [package-lock.json](/cli/v7/configuring-npm/package-lock-json).
27 +
28 +### See also
29 +
30 +* [npm shrinkwrap](/cli/v7/commands/npm-shrinkwrap)
31 +* [package-lock.json](/cli/v7/configuring-npm/package-lock-json)
32 +* [package.json](/cli/v7/configuring-npm/package-json)
33 +* [npm install](/cli/v7/commands/npm-install)
content/cli/v7/index.mdx new
+10
@@ -0,0 +1,10 @@
1 +---
2 +redirect_from:
3 + - /cli
4 + - /cli-documentation
5 +github_repo: npm/cli
6 +github_branch: latest
7 +github_path: docs/content/index.mdx
8 +title: CLI documentation
9 +---
10 +<Index depth="1" />
\ No newline at end of file
content/cli/v7/using-npm/config.md new
+1527
@@ -0,0 +1,1527 @@
1 +---
2 +title: config
3 +section: 7
4 +description: More than you probably want to know about npm configuration
5 +redirect_from:
6 + - /using-npm/config
7 + - /using-npm/config.html
8 + - /misc/config
9 + - /misc/config.html
10 +github_repo: npm/cli
11 +github_branch: latest
12 +github_path: docs/content/using-npm/config.md
13 +---
14 +
15 +### Description
16 +
17 +npm gets its configuration values from the following sources, sorted by priority:
18 +
19 +#### Command Line Flags
20 +
21 +Putting `--foo bar` on the command line sets the `foo` configuration
22 +parameter to `"bar"`. A `--` argument tells the cli parser to stop
23 +reading flags. Using `--flag` without specifying any value will set
24 +the value to `true`.
25 +
26 +Example: `--flag1 --flag2` will set both configuration parameters
27 +to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`,
28 +and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set
29 +both configuration parameters to `true`, and the `bar` is taken
30 +as a command argument.
31 +
32 +#### Environment Variables
33 +
34 +Any environment variables that start with `npm_config_` will be
35 +interpreted as a configuration parameter. For example, putting
36 +`npm_config_foo=bar` in your environment will set the `foo`
37 +configuration parameter to `bar`. Any environment configurations that
38 +are not given a value will be given the value of `true`. Config
39 +values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the
40 +same. However, please note that inside [`scripts`](/cli/v7/using-npm/scripts)
41 +npm will set its own environment variables and Node will prefer
42 +those lowercase versions over any uppercase ones that you might set.
43 +For details see [this issue](https://github.com/npm/npm/issues/14528).
44 +
45 +Notice that you need to use underscores instead of dashes, so `--allow-same-version`
46 +would become `npm_config_allow_same_version=true`.
47 +
48 +#### npmrc Files
49 +
50 +The four relevant files are:
51 +
52 +* per-project configuration file (`/path/to/my/project/.npmrc`)
53 +* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI
54 + option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`)
55 +* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via
56 + CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`)
57 +* npm's built-in configuration file (`/path/to/npm/npmrc`)
58 +
59 +See [npmrc](/cli/v7/configuring-npm/npmrc) for more details.
60 +
61 +#### Default Configs
62 +
63 +Run `npm config ls -l` to see a set of configuration parameters that are
64 +internal to npm, and are defaults if nothing else is specified.
65 +
66 +### Shorthands and Other CLI Niceties
67 +
68 +The following shorthands are parsed on the command-line:
69 +
70 +<!-- AUTOGENERATED CONFIG SHORTHANDS START -->
71 +<!-- automatically generated, do not edit manually -->
72 +* `-a`: `--all`
73 +* `--enjoy-by`: `--before`
74 +* `-c`: `--call`
75 +* `--desc`: `--description`
76 +* `-f`: `--force`
77 +* `-g`: `--global`
78 +* `-d`: `--loglevel info`
79 +* `-s`: `--loglevel silent`
80 +* `--silent`: `--loglevel silent`
81 +* `--ddd`: `--loglevel silly`
82 +* `--dd`: `--loglevel verbose`
83 +* `--verbose`: `--loglevel verbose`
84 +* `-q`: `--loglevel warn`
85 +* `--quiet`: `--loglevel warn`
86 +* `-l`: `--long`
87 +* `-m`: `--message`
88 +* `--local`: `--no-global`
89 +* `-n`: `--no-yes`
90 +* `--no`: `--no-yes`
91 +* `-p`: `--parseable`
92 +* `--porcelain`: `--parseable`
93 +* `-C`: `--prefix`
94 +* `--readonly`: `--read-only`
95 +* `--reg`: `--registry`
96 +* `-S`: `--save`
97 +* `-B`: `--save-bundle`
98 +* `-D`: `--save-dev`
99 +* `-E`: `--save-exact`
100 +* `-O`: `--save-optional`
101 +* `-P`: `--save-prod`
102 +* `-?`: `--usage`
103 +* `-h`: `--usage`
104 +* `-H`: `--usage`
105 +* `--help`: `--usage`
106 +* `-v`: `--version`
107 +* `-w`: `--workspace`
108 +* `--ws`: `--workspaces`
109 +* `-y`: `--yes`
110 +
111 +<!-- AUTOGENERATED CONFIG SHORTHANDS END -->
112 +
113 +If the specified configuration param resolves unambiguously to a known
114 +configuration parameter, then it is expanded to that configuration
115 +parameter. For example:
116 +
117 +```bash
118 +npm ls --par
119 +# same as:
120 +npm ls --parseable
121 +```
122 +
123 +If multiple single-character shorthands are strung together, and the
124 +resulting combination is unambiguously not some other configuration
125 +param, then it is expanded to its various component pieces. For
126 +example:
127 +
128 +```bash
129 +npm ls -gpld
130 +# same as:
131 +npm ls --global --parseable --long --loglevel info
132 +```
133 +
134 +### Config Settings
135 +
136 +<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
137 +<!-- automatically generated, do not edit manually -->
138 +#### `_auth`
139 +
140 +* Default: null
141 +* Type: null or String
142 +
143 +A basic-auth string to use when authenticating against the npm registry.
144 +
145 +Warning: This should generally not be set via a command-line option. It is
146 +safer to use a registry-provided authentication bearer token stored in the
147 +~/.npmrc file by running `npm login`.
148 +
149 +#### `access`
150 +
151 +* Default: 'restricted' for scoped packages, 'public' for unscoped packages
152 +* Type: null, "restricted", or "public"
153 +
154 +When publishing scoped packages, the access level defaults to `restricted`.
155 +If you want your scoped package to be publicly viewable (and installable)
156 +set `--access=public`. The only valid values for `access` are `public` and
157 +`restricted`. Unscoped packages _always_ have an access level of `public`.
158 +
159 +#### `all`
160 +
161 +* Default: false
162 +* Type: Boolean
163 +
164 +When running `npm outdated` and `npm ls`, setting `--all` will show all
165 +outdated or installed packages, rather than only those directly depended
166 +upon by the current project.
167 +
168 +#### `allow-same-version`
169 +
170 +* Default: false
171 +* Type: Boolean
172 +
173 +Prevents throwing an error when `npm version` is used to set the new version
174 +to the same value as the current version.
175 +
176 +#### `always-auth`
177 +
178 +* Default: false
179 +* Type: Boolean
180 +
181 +Force npm to always require authentication when accessing the registry, even
182 +for `GET` requests.
183 +
184 +#### `audit`
185 +
186 +* Default: true
187 +* Type: Boolean
188 +
189 +When "true" submit audit reports alongside `npm install` runs to the default
190 +registry and all registries configured for scopes. See the documentation for
191 +[`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
192 +
193 +#### `audit-level`
194 +
195 +* Default: null
196 +* Type: null, "info", "low", "moderate", "high", "critical", or "none"
197 +
198 +The minimum level of vulnerability for `npm audit` to exit with a non-zero
199 +exit code.
200 +
201 +#### `before`
202 +
203 +* Default: null
204 +* Type: null or Date
205 +
206 +If passed to `npm install`, will rebuild the npm tree such that only
207 +versions that were available **on or before** the `--before` time get
208 +installed. If there's no versions available for the current set of direct
209 +dependencies, the command will error.
210 +
211 +If the requested version is a `dist-tag` and the given tag does not pass the
212 +`--before` filter, the most recent version less than or equal to that tag
213 +will be used. For example, `foo@latest` might install `foo@1.2` even though
214 +`latest` is `2.0`.
215 +
216 +#### `bin-links`
217 +
218 +* Default: true
219 +* Type: Boolean
220 +
221 +Tells npm to create symlinks (or `.cmd` shims on Windows) for package
222 +executables.
223 +
224 +Set to false to have it not do this. This can be used to work around the
225 +fact that some file systems don't support symlinks, even on ostensibly Unix
226 +systems.
227 +
228 +#### `browser`
229 +
230 +* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
231 +* Type: null, Boolean, or String
232 +
233 +The browser that is called by npm commands to open websites.
234 +
235 +Set to `false` to suppress browser behavior and instead print urls to
236 +terminal.
237 +
238 +Set to `true` to use default system URL opener.
239 +
240 +#### `ca`
241 +
242 +* Default: null
243 +* Type: null or String (can be set multiple times)
244 +
245 +The Certificate Authority signing certificate that is trusted for SSL
246 +connections to the registry. Values should be in PEM format (Windows calls
247 +it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string
248 +"\n". For example:
249 +
250 +```ini
251 +ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
252 +```
253 +
254 +Set to `null` to only allow "known" registrars, or to a specific CA cert to
255 +trust only that specific signing authority.
256 +
257 +Multiple CAs can be trusted by specifying an array of certificates:
258 +
259 +```ini
260 +ca[]="..."
261 +ca[]="..."
262 +```
263 +
264 +See also the `strict-ssl` config.
265 +
266 +#### `cache`
267 +
268 +* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm`
269 +* Type: Path
270 +
271 +The location of npm's cache directory. See [`npm
272 +cache`](/cli/v7/commands/npm-cache)
273 +
274 +#### `cafile`
275 +
276 +* Default: null
277 +* Type: Path
278 +
279 +A path to a file containing one or multiple Certificate Authority signing
280 +certificates. Similar to the `ca` setting, but allows for multiple CA's, as
281 +well as for the CA information to be stored in a file on disk.
282 +
283 +#### `call`
284 +
285 +* Default: ""
286 +* Type: String
287 +
288 +Optional companion option for `npm exec`, `npx` that allows for specifying a
289 +custom command to be run along with the installed packages.
290 +
291 +```bash
292 +npm exec --package yo --package generator-node --call "yo node"
293 +```
294 +
295 +
296 +#### `cert`
297 +
298 +* Default: null
299 +* Type: null or String
300 +
301 +A client certificate to pass when accessing the registry. Values should be
302 +in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with
303 +newlines replaced by the string "\n". For example:
304 +
305 +```ini
306 +cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
307 +```
308 +
309 +It is _not_ the path to a certificate file (and there is no "certfile"
310 +option).
311 +
312 +#### `ci-name`
313 +
314 +* Default: The name of the current CI system, or `null` when not on a known CI
315 + platform.
316 +* Type: null or String
317 +
318 +The name of a continuous integration system. If not set explicitly, npm will
319 +detect the current CI environment using the
320 +[`@npmcli/ci-detect`](http://npm.im/@npmcli/ci-detect) module.
321 +
322 +#### `cidr`
323 +
324 +* Default: null
325 +* Type: null or String (can be set multiple times)
326 +
327 +This is a list of CIDR address to be used when configuring limited access
328 +tokens with the `npm token create` command.
329 +
330 +#### `color`
331 +
332 +* Default: true unless the NO_COLOR environ is set to something other than '0'
333 +* Type: "always" or Boolean
334 +
335 +If false, never shows colors. If `"always"` then always shows colors. If
336 +true, then only prints color codes for tty file descriptors.
337 +
338 +#### `commit-hooks`
339 +
340 +* Default: true
341 +* Type: Boolean
342 +
343 +Run git commit hooks when using the `npm version` command.
344 +
345 +#### `depth`
346 +
347 +* Default: `Infinity` if `--all` is set, otherwise `1`
348 +* Type: null or Number
349 +
350 +The depth to go when recursing packages for `npm ls`.
351 +
352 +If not set, `npm ls` will show only the immediate dependencies of the root
353 +project. If `--all` is set, then npm will show all dependencies by default.
354 +
355 +#### `description`
356 +
357 +* Default: true
358 +* Type: Boolean
359 +
360 +Show the description in `npm search`
361 +
362 +#### `diff`
363 +
364 +* Default:
365 +* Type: String (can be set multiple times)
366 +
367 +Define arguments to compare in `npm diff`.
368 +
369 +#### `diff-dst-prefix`
370 +
371 +* Default: "b/"
372 +* Type: String
373 +
374 +Destination prefix to be used in `npm diff` output.
375 +
376 +#### `diff-ignore-all-space`
377 +
378 +* Default: false
379 +* Type: Boolean
380 +
381 +Ignore whitespace when comparing lines in `npm diff`.
382 +
383 +#### `diff-name-only`
384 +
385 +* Default: false
386 +* Type: Boolean
387 +
388 +Prints only filenames when using `npm diff`.
389 +
390 +#### `diff-no-prefix`
391 +
392 +* Default: false
393 +* Type: Boolean
394 +
395 +Do not show any source or destination prefix in `npm diff` output.
396 +
397 +Note: this causes `npm diff` to ignore the `--diff-src-prefix` and
398 +`--diff-dst-prefix` configs.
399 +
400 +#### `diff-src-prefix`
401 +
402 +* Default: "a/"
403 +* Type: String
404 +
405 +Source prefix to be used in `npm diff` output.
406 +
407 +#### `diff-text`
408 +
409 +* Default: false
410 +* Type: Boolean
411 +
412 +Treat all files as text in `npm diff`.
413 +
414 +#### `diff-unified`
415 +
416 +* Default: 3
417 +* Type: Number
418 +
419 +The number of lines of context to print in `npm diff`.
420 +
421 +#### `dry-run`
422 +
423 +* Default: false
424 +* Type: Boolean
425 +
426 +Indicates that you don't want npm to make any changes and that it should
427 +only report what it would have done. This can be passed into any of the
428 +commands that modify your local installation, eg, `install`, `update`,
429 +`dedupe`, `uninstall`, as well as `pack` and `publish`.
430 +
431 +Note: This is NOT honored by other network related commands, eg `dist-tags`,
432 +`owner`, etc.
433 +
434 +#### `editor`
435 +
436 +* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on
437 + Windows, or 'vim' on Unix systems
438 +* Type: String
439 +
440 +The command to run for `npm edit` and `npm config edit`.
441 +
442 +#### `engine-strict`
443 +
444 +* Default: false
445 +* Type: Boolean
446 +
447 +If set to true, then npm will stubbornly refuse to install (or even consider
448 +installing) any package that claims to not be compatible with the current
449 +Node.js version.
450 +
451 +This can be overridden by setting the `--force` flag.
452 +
453 +#### `fetch-retries`
454 +
455 +* Default: 2
456 +* Type: Number
457 +
458 +The "retries" config for the `retry` module to use when fetching packages
459 +from the registry.
460 +
461 +npm will retry idempotent read requests to the registry in the case of
462 +network failures or 5xx HTTP errors.
463 +
464 +#### `fetch-retry-factor`
465 +
466 +* Default: 10
467 +* Type: Number
468 +
469 +The "factor" config for the `retry` module to use when fetching packages.
470 +
471 +#### `fetch-retry-maxtimeout`
472 +
473 +* Default: 60000 (1 minute)
474 +* Type: Number
475 +
476 +The "maxTimeout" config for the `retry` module to use when fetching
477 +packages.
478 +
479 +#### `fetch-retry-mintimeout`
480 +
481 +* Default: 10000 (10 seconds)
482 +* Type: Number
483 +
484 +The "minTimeout" config for the `retry` module to use when fetching
485 +packages.
486 +
487 +#### `fetch-timeout`
488 +
489 +* Default: 300000 (5 minutes)
490 +* Type: Number
491 +
492 +The maximum amount of time to wait for HTTP requests to complete.
493 +
494 +#### `force`
495 +
496 +* Default: false
497 +* Type: Boolean
498 +
499 +Removes various protections against unfortunate side effects, common
500 +mistakes, unnecessary performance degradation, and malicious input.
501 +
502 +* Allow clobbering non-npm files in global installs.
503 +* Allow the `npm version` command to work on an unclean git repository.
504 +* Allow deleting the cache folder with `npm cache clean`.
505 +* Allow installing packages that have an `engines` declaration requiring a
506 + different version of npm.
507 +* Allow installing packages that have an `engines` declaration requiring a
508 + different version of `node`, even if `--engine-strict` is enabled.
509 +* Allow `npm audit fix` to install modules outside your stated dependency
510 + range (including SemVer-major changes).
511 +* Allow unpublishing all versions of a published package.
512 +* Allow conflicting peerDependencies to be installed in the root project.
513 +
514 +If you don't have a clear idea of what you want to do, it is strongly
515 +recommended that you do not use this option!
516 +
517 +#### `foreground-scripts`
518 +
519 +* Default: false
520 +* Type: Boolean
521 +
522 +Run all build scripts (ie, `preinstall`, `install`, and `postinstall`)
523 +scripts for installed packages in the foreground process, sharing standard
524 +input, output, and error with the main npm process.
525 +
526 +Note that this will generally make installs run slower, and be much noisier,
527 +but can be useful for debugging.
528 +
529 +#### `format-package-lock`
530 +
531 +* Default: true
532 +* Type: Boolean
533 +
534 +Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable
535 +file.
536 +
537 +#### `fund`
538 +
539 +* Default: true
540 +* Type: Boolean
541 +
542 +When "true" displays the message at the end of each `npm install`
543 +acknowledging the number of dependencies looking for funding. See [`npm
544 +fund`](/cli/v7/commands/npm-fund) for details.
545 +
546 +#### `git`
547 +
548 +* Default: "git"
549 +* Type: String
550 +
551 +The command to use for git commands. If git is installed on the computer,
552 +but is not in the `PATH`, then set this to the full path to the git binary.
553 +
554 +#### `git-tag-version`
555 +
556 +* Default: true
557 +* Type: Boolean
558 +
559 +Tag the commit when using the `npm version` command.
560 +
561 +#### `global`
562 +
563 +* Default: false
564 +* Type: Boolean
565 +
566 +Operates in "global" mode, so that packages are installed into the `prefix`
567 +folder instead of the current working directory. See
568 +[folders](/cli/v7/configuring-npm/folders) for more on the differences in behavior.
569 +
570 +* packages are installed into the `{prefix}/lib/node_modules` folder, instead
571 + of the current working directory.
572 +* bin files are linked to `{prefix}/bin`
573 +* man pages are linked to `{prefix}/share/man`
574 +
575 +#### `global-style`
576 +
577 +* Default: false
578 +* Type: Boolean
579 +
580 +Causes npm to install the package into your local `node_modules` folder with
581 +the same layout it uses with the global `node_modules` folder. Only your
582 +direct dependencies will show in `node_modules` and everything they depend
583 +on will be flattened in their `node_modules` folders. This obviously will
584 +eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`
585 +will be preferred.
586 +
587 +#### `globalconfig`
588 +
589 +* Default: The global --prefix setting plus 'etc/npmrc'. For example,
590 + '/usr/local/etc/npmrc'
591 +* Type: Path
592 +
593 +The config file to read for global config options.
594 +
595 +#### `heading`
596 +
597 +* Default: "npm"
598 +* Type: String
599 +
600 +The string that starts all the debugging log output.
601 +
602 +#### `https-proxy`
603 +
604 +* Default: null
605 +* Type: null or URL
606 +
607 +A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or
608 +`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,
609 +proxy settings will be honored by the underlying `make-fetch-happen`
610 +library.
611 +
612 +#### `if-present`
613 +
614 +* Default: false
615 +* Type: Boolean
616 +
617 +If true, npm will not exit with an error code when `run-script` is invoked
618 +for a script that isn't defined in the `scripts` section of `package.json`.
619 +This option can be used when it's desirable to optionally run a script when
620 +it's present and fail if the script fails. This is useful, for example, when
621 +running scripts that may only apply for some builds in an otherwise generic
622 +CI setup.
623 +
624 +#### `ignore-scripts`
625 +
626 +* Default: false
627 +* Type: Boolean
628 +
629 +If true, npm does not run scripts specified in package.json files.
630 +
631 +#### `include`
632 +
633 +* Default:
634 +* Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
635 +
636 +Option that allows for defining which types of dependencies to install.
637 +
638 +This is the inverse of `--omit=<type>`.
639 +
640 +Dependency types specified in `--include` will not be omitted, regardless of
641 +the order in which omit/include are specified on the command-line.
642 +
643 +#### `include-staged`
644 +
645 +* Default: false
646 +* Type: Boolean
647 +
648 +Allow installing "staged" published packages, as defined by [npm RFC PR
649 +#92](https://github.com/npm/rfcs/pull/92).
650 +
651 +This is experimental, and not implemented by the npm public registry.
652 +
653 +#### `init-author-email`
654 +
655 +* Default: ""
656 +* Type: String
657 +
658 +The value `npm init` should use by default for the package author's email.
659 +
660 +#### `init-author-name`
661 +
662 +* Default: ""
663 +* Type: String
664 +
665 +The value `npm init` should use by default for the package author's name.
666 +
667 +#### `init-author-url`
668 +
669 +* Default: ""
670 +* Type: "" or URL
671 +
672 +The value `npm init` should use by default for the package author's
673 +homepage.
674 +
675 +#### `init-license`
676 +
677 +* Default: "ISC"
678 +* Type: String
679 +
680 +The value `npm init` should use by default for the package license.
681 +
682 +#### `init-module`
683 +
684 +* Default: "~/.npm-init.js"
685 +* Type: Path
686 +
687 +A module that will be loaded by the `npm init` command. See the
688 +documentation for the
689 +[init-package-json](https://github.com/npm/init-package-json) module for
690 +more information, or [npm init](/cli/v7/commands/npm-init).
691 +
692 +#### `init-version`
693 +
694 +* Default: "1.0.0"
695 +* Type: SemVer string
696 +
697 +The value that `npm init` should use by default for the package version
698 +number, if not already set in package.json.
699 +
700 +#### `json`
701 +
702 +* Default: false
703 +* Type: Boolean
704 +
705 +Whether or not to output JSON data, rather than the normal output.
706 +
707 +This feature is currently experimental, and the output data structures for
708 +many commands is either not implemented in JSON yet, or subject to change.
709 +Only the output from `npm ls --json` and `npm search --json` are currently
710 +valid.
711 +
712 +#### `key`
713 +
714 +* Default: null
715 +* Type: null or String
716 +
717 +A client key to pass when accessing the registry. Values should be in PEM
718 +format with newlines replaced by the string "\n". For example:
719 +
720 +```ini
721 +key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
722 +```
723 +
724 +It is _not_ the path to a key file (and there is no "keyfile" option).
725 +
726 +#### `legacy-bundling`
727 +
728 +* Default: false
729 +* Type: Boolean
730 +
731 +Causes npm to install the package such that versions of npm prior to 1.4,
732 +such as the one included with node 0.8, can install the package. This
733 +eliminates all automatic deduping. If used with `global-style` this option
734 +will be preferred.
735 +
736 +#### `legacy-peer-deps`
737 +
738 +* Default: false
739 +* Type: Boolean
740 +
741 +Causes npm to completely ignore `peerDependencies` when building a package
742 +tree, as in npm versions 3 through 6.
743 +
744 +If a package cannot be installed because of overly strict `peerDependencies`
745 +that collide, it provides a way to move forward resolving the situation.
746 +
747 +This differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking
748 +`peerDependencies` on disk, but will still design a tree such that
749 +`peerDependencies` _could_ be unpacked in a correct place.
750 +
751 +Use of `legacy-peer-deps` is not recommended, as it will not enforce the
752 +`peerDependencies` contract that meta-dependencies may rely on.
753 +
754 +#### `link`
755 +
756 +* Default: false
757 +* Type: Boolean
758 +
759 +If true, then local installs will link if there is a suitable globally
760 +installed package.
761 +
762 +Note that this means that local installs can cause things to be installed
763 +into the global space at the same time. The link is only done if one of the
764 +two conditions are met:
765 +
766 +* The package is not already installed globally, or
767 +* the globally installed version is identical to the version that is being
768 + installed locally.
769 +
770 +#### `local-address`
771 +
772 +* Default: null
773 +* Type: IP Address
774 +
775 +The IP address of the local interface to use when making connections to the
776 +npm registry. Must be IPv4 in versions of Node prior to 0.12.
777 +
778 +#### `loglevel`
779 +
780 +* Default: "notice"
781 +* Type: "silent", "error", "warn", "notice", "http", "timing", "info",
782 + "verbose", or "silly"
783 +
784 +What level of logs to report. On failure, *all* logs are written to
785 +`npm-debug.log` in the current working directory.
786 +
787 +Any logs of a higher level than the setting are shown. The default is
788 +"notice".
789 +
790 +#### `logs-max`
791 +
792 +* Default: 10
793 +* Type: Number
794 +
795 +The maximum number of log files to store.
796 +
797 +#### `long`
798 +
799 +* Default: false
800 +* Type: Boolean
801 +
802 +Show extended information in `npm ls` and `npm search`.
803 +
804 +#### `maxsockets`
805 +
806 +* Default: 15
807 +* Type: Number
808 +
809 +The maximum number of connections to use per origin (protocol/host/port
810 +combination).
811 +
812 +#### `message`
813 +
814 +* Default: "%s"
815 +* Type: String
816 +
817 +Commit message which is used by `npm version` when creating version commit.
818 +
819 +Any "%s" in the message will be replaced with the version number.
820 +
821 +#### `node-options`
822 +
823 +* Default: null
824 +* Type: null or String
825 +
826 +Options to pass through to Node.js via the `NODE_OPTIONS` environment
827 +variable. This does not impact how npm itself is executed but it does impact
828 +how lifecycle scripts are called.
829 +
830 +#### `node-version`
831 +
832 +* Default: Node.js `process.version` value
833 +* Type: SemVer string
834 +
835 +The node version to use when checking a package's `engines` setting.
836 +
837 +#### `noproxy`
838 +
839 +* Default: The value of the NO_PROXY environment variable
840 +* Type: String (can be set multiple times)
841 +
842 +Domain extensions that should bypass any proxies.
843 +
844 +Also accepts a comma-delimited string.
845 +
846 +#### `npm-version`
847 +
848 +* Default: Output of `npm --version`
849 +* Type: SemVer string
850 +
851 +The npm version to use when checking a package's `engines` setting.
852 +
853 +#### `offline`
854 +
855 +* Default: false
856 +* Type: Boolean
857 +
858 +Force offline mode: no network requests will be done during install. To
859 +allow the CLI to fill in missing cache data, see `--prefer-offline`.
860 +
861 +#### `omit`
862 +
863 +* Default: 'dev' if the NODE_ENV environment variable is set to 'production',
864 + otherwise empty.
865 +* Type: "dev", "optional", or "peer" (can be set multiple times)
866 +
867 +Dependency types to omit from the installation tree on disk.
868 +
869 +Note that these dependencies _are_ still resolved and added to the
870 +`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
871 +physically installed on disk.
872 +
873 +If a package type appears in both the `--include` and `--omit` lists, then
874 +it will be included.
875 +
876 +If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
877 +variable will be set to `'production'` for all lifecycle scripts.
878 +
879 +#### `otp`
880 +
881 +* Default: null
882 +* Type: null or String
883 +
884 +This is a one-time password from a two-factor authenticator. It's needed
885 +when publishing or changing package permissions with `npm access`.
886 +
887 +If not set, and a registry response fails with a challenge for a one-time
888 +password, npm will prompt on the command line for one.
889 +
890 +#### `package`
891 +
892 +* Default:
893 +* Type: String (can be set multiple times)
894 +
895 +The package to install for [`npm exec`](/cli/v7/commands/npm-exec)
896 +
897 +#### `package-lock`
898 +
899 +* Default: true
900 +* Type: Boolean
901 +
902 +If set to false, then ignore `package-lock.json` files when installing. This
903 +will also prevent _writing_ `package-lock.json` if `save` is true.
904 +
905 +When package package-locks are disabled, automatic pruning of extraneous
906 +modules will also be disabled. To remove extraneous modules with
907 +package-locks disabled use `npm prune`.
908 +
909 +#### `package-lock-only`
910 +
911 +* Default: false
912 +* Type: Boolean
913 +
914 +If set to true, it will update only the `package-lock.json`, instead of
915 +checking `node_modules` and downloading dependencies.
916 +
917 +#### `parseable`
918 +
919 +* Default: false
920 +* Type: Boolean
921 +
922 +Output parseable results from commands that write to standard output. For
923 +`npm search`, this will be tab-separated table format.
924 +
925 +#### `prefer-offline`
926 +
927 +* Default: false
928 +* Type: Boolean
929 +
930 +If true, staleness checks for cached data will be bypassed, but missing data
931 +will be requested from the server. To force full offline mode, use
932 +`--offline`.
933 +
934 +#### `prefer-online`
935 +
936 +* Default: false
937 +* Type: Boolean
938 +
939 +If true, staleness checks for cached data will be forced, making the CLI
940 +look for updates immediately even for fresh package data.
941 +
942 +#### `prefix`
943 +
944 +* Default: In global mode, the folder where the node executable is installed.
945 + In local mode, the nearest parent folder containing either a package.json
946 + file or a node_modules folder.
947 +* Type: Path
948 +
949 +The location to install global items. If set on the command line, then it
950 +forces non-global commands to run in the specified folder.
951 +
952 +#### `preid`
953 +
954 +* Default: ""
955 +* Type: String
956 +
957 +The "prerelease identifier" to use as a prefix for the "prerelease" part of
958 +a semver. Like the `rc` in `1.2.0-rc.8`.
959 +
960 +#### `progress`
961 +
962 +* Default: `true` unless running in a known CI system
963 +* Type: Boolean
964 +
965 +When set to `true`, npm will display a progress bar during time intensive
966 +operations, if `process.stderr` is a TTY.
967 +
968 +Set to `false` to suppress the progress bar.
969 +
970 +#### `proxy`
971 +
972 +* Default: null
973 +* Type: null, false, or URL
974 +
975 +A proxy to use for outgoing http requests. If the `HTTP_PROXY` or
976 +`http_proxy` environment variables are set, proxy settings will be honored
977 +by the underlying `request` library.
978 +
979 +#### `read-only`
980 +
981 +* Default: false
982 +* Type: Boolean
983 +
984 +This is used to mark a token as unable to publish when configuring limited
985 +access tokens with the `npm token create` command.
986 +
987 +#### `rebuild-bundle`
988 +
989 +* Default: true
990 +* Type: Boolean
991 +
992 +Rebuild bundled dependencies after installation.
993 +
994 +#### `registry`
995 +
996 +* Default: "https://registry.npmjs.org/"
997 +* Type: URL
998 +
999 +The base URL of the npm registry.
1000 +
1001 +#### `save`
1002 +
1003 +* Default: true
1004 +* Type: Boolean
1005 +
1006 +Save installed packages to a package.json file as dependencies.
1007 +
1008 +When used with the `npm rm` command, removes the dependency from
1009 +package.json.
1010 +
1011 +#### `save-bundle`
1012 +
1013 +* Default: false
1014 +* Type: Boolean
1015 +
1016 +If a package would be saved at install time by the use of `--save`,
1017 +`--save-dev`, or `--save-optional`, then also put it in the
1018 +`bundleDependencies` list.
1019 +
1020 +Ignore if `--save-peer` is set, since peerDependencies cannot be bundled.
1021 +
1022 +#### `save-dev`
1023 +
1024 +* Default: false
1025 +* Type: Boolean
1026 +
1027 +Save installed packages to a package.json file as `devDependencies`.
1028 +
1029 +#### `save-exact`
1030 +
1031 +* Default: false
1032 +* Type: Boolean
1033 +
1034 +Dependencies saved to package.json will be configured with an exact version
1035 +rather than using npm's default semver range operator.
1036 +
1037 +#### `save-optional`
1038 +
1039 +* Default: false
1040 +* Type: Boolean
1041 +
1042 +Save installed packages to a package.json file as `optionalDependencies`.
1043 +
1044 +#### `save-peer`
1045 +
1046 +* Default: false
1047 +* Type: Boolean
1048 +
1049 +Save installed packages. to a package.json file as `peerDependencies`
1050 +
1051 +#### `save-prefix`
1052 +
1053 +* Default: "^"
1054 +* Type: String
1055 +
1056 +Configure how versions of packages installed to a package.json file via
1057 +`--save` or `--save-dev` get prefixed.
1058 +
1059 +For example if a package has version `1.2.3`, by default its version is set
1060 +to `^1.2.3` which allows minor upgrades for that package, but after `npm
1061 +config set save-prefix='~'` it would be set to `~1.2.3` which only allows
1062 +patch upgrades.
1063 +
1064 +#### `save-prod`
1065 +
1066 +* Default: false
1067 +* Type: Boolean
1068 +
1069 +Save installed packages into `dependencies` specifically. This is useful if
1070 +a package already exists in `devDependencies` or `optionalDependencies`, but
1071 +you want to move it to be a non-optional production dependency.
1072 +
1073 +This is the default behavior if `--save` is true, and neither `--save-dev`
1074 +or `--save-optional` are true.
1075 +
1076 +#### `scope`
1077 +
1078 +* Default: the scope of the current project, if any, or ""
1079 +* Type: String
1080 +
1081 +Associate an operation with a scope for a scoped registry.
1082 +
1083 +Useful when logging in to a private registry for the first time:
1084 +
1085 +```bash
1086 +npm login --scope=@mycorp --registry=https://registry.mycorp.com
1087 +```
1088 +
1089 +This will cause `@mycorp` to be mapped to the registry for future
1090 +installation of packages specified according to the pattern
1091 +`@mycorp/package`.
1092 +
1093 +#### `script-shell`
1094 +
1095 +* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
1096 +* Type: null or String
1097 +
1098 +The shell to use for scripts run with the `npm run` command.
1099 +
1100 +#### `searchexclude`
1101 +
1102 +* Default: ""
1103 +* Type: String
1104 +
1105 +Space-separated options that limit the results from search.
1106 +
1107 +#### `searchlimit`
1108 +
1109 +* Default: 20
1110 +* Type: Number
1111 +
1112 +Number of items to limit search results to. Will not apply at all to legacy
1113 +searches.
1114 +
1115 +#### `searchopts`
1116 +
1117 +* Default: ""
1118 +* Type: String
1119 +
1120 +Space-separated options that are always passed to search.
1121 +
1122 +#### `searchstaleness`
1123 +
1124 +* Default: 900
1125 +* Type: Number
1126 +
1127 +The age of the cache, in seconds, before another registry request is made if
1128 +using legacy search endpoint.
1129 +
1130 +#### `shell`
1131 +
1132 +* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on
1133 + Windows
1134 +* Type: String
1135 +
1136 +The shell to run for the `npm explore` command.
1137 +
1138 +#### `sign-git-commit`
1139 +
1140 +* Default: false
1141 +* Type: Boolean
1142 +
1143 +If set to true, then the `npm version` command will commit the new package
1144 +version using `-S` to add a signature.
1145 +
1146 +Note that git requires you to have set up GPG keys in your git configs for
1147 +this to work properly.
1148 +
1149 +#### `sign-git-tag`
1150 +
1151 +* Default: false
1152 +* Type: Boolean
1153 +
1154 +If set to true, then the `npm version` command will tag the version using
1155 +`-s` to add a signature.
1156 +
1157 +Note that git requires you to have set up GPG keys in your git configs for
1158 +this to work properly.
1159 +
1160 +#### `strict-peer-deps`
1161 +
1162 +* Default: false
1163 +* Type: Boolean
1164 +
1165 +If set to `true`, and `--legacy-peer-deps` is not set, then _any_
1166 +conflicting `peerDependencies` will be treated as an install failure, even
1167 +if npm could reasonably guess the appropriate resolution based on non-peer
1168 +dependency relationships.
1169 +
1170 +By default, conflicting `peerDependencies` deep in the dependency graph will
1171 +be resolved using the nearest non-peer dependency specification, even if
1172 +doing so will result in some packages receiving a peer dependency outside
1173 +the range set in their package's `peerDependencies` object.
1174 +
1175 +When such and override is performed, a warning is printed, explaining the
1176 +conflict and the packages involved. If `--strict-peer-deps` is set, then
1177 +this warning is treated as a failure.
1178 +
1179 +#### `strict-ssl`
1180 +
1181 +* Default: true
1182 +* Type: Boolean
1183 +
1184 +Whether or not to do SSL key validation when making requests to the registry
1185 +via https.
1186 +
1187 +See also the `ca` config.
1188 +
1189 +#### `tag`
1190 +
1191 +* Default: "latest"
1192 +* Type: String
1193 +
1194 +If you ask npm to install a package and don't tell it a specific version,
1195 +then it will install the specified tag.
1196 +
1197 +Also the tag that is added to the package@version specified by the `npm tag`
1198 +command, if no explicit tag is given.
1199 +
1200 +#### `tag-version-prefix`
1201 +
1202 +* Default: "v"
1203 +* Type: String
1204 +
1205 +If set, alters the prefix used when tagging a new version when performing a
1206 +version increment using `npm-version`. To remove the prefix altogether, set
1207 +it to the empty string: `""`.
1208 +
1209 +Because other tools may rely on the convention that npm version tags look
1210 +like `v1.0.0`, _only use this property if it is absolutely necessary_. In
1211 +particular, use care when overriding this setting for public packages.
1212 +
1213 +#### `timing`
1214 +
1215 +* Default: false
1216 +* Type: Boolean
1217 +
1218 +If true, writes an `npm-debug` log to `_logs` and timing information to
1219 +`_timing.json`, both in your cache, even if the command completes
1220 +successfully. `_timing.json` is a newline delimited list of JSON objects.
1221 +
1222 +You can quickly view it with this [json](https://npm.im/json) command line:
1223 +`npm exec -- json -g < ~/.npm/_timing.json`.
1224 +
1225 +#### `umask`
1226 +
1227 +* Default: 0
1228 +* Type: Octal numeric string in range 0000..0777 (0..511)
1229 +
1230 +The "umask" value to use when setting the file creation mode on files and
1231 +folders.
1232 +
1233 +Folders and executables are given a mode which is `0o777` masked against
1234 +this value. Other files are given a mode which is `0o666` masked against
1235 +this value.
1236 +
1237 +Note that the underlying system will _also_ apply its own umask value to
1238 +files and folders that are created, and npm does not circumvent this, but
1239 +rather adds the `--umask` config to it.
1240 +
1241 +Thus, the effective default umask value on most POSIX systems is 0o22,
1242 +meaning that folders and executables are created with a mode of 0o755 and
1243 +other files are created with a mode of 0o644.
1244 +
1245 +#### `unicode`
1246 +
1247 +* Default: false on windows, true on mac/unix systems with a unicode locale,
1248 + as defined by the LC_ALL, LC_CTYPE, or LANG environment variables.
1249 +* Type: Boolean
1250 +
1251 +When set to true, npm uses unicode characters in the tree output. When
1252 +false, it uses ascii characters instead of unicode glyphs.
1253 +
1254 +#### `update-notifier`
1255 +
1256 +* Default: true
1257 +* Type: Boolean
1258 +
1259 +Set to false to suppress the update notification when using an older version
1260 +of npm than the latest.
1261 +
1262 +#### `usage`
1263 +
1264 +* Default: false
1265 +* Type: Boolean
1266 +
1267 +Show short usage output about the command specified.
1268 +
1269 +#### `user-agent`
1270 +
1271 +* Default: "npm/{npm-version} node/{node-version} {platform} {arch} {ci}"
1272 +* Type: String
1273 +
1274 +Sets the User-Agent request header. The following fields are replaced with
1275 +their actual counterparts:
1276 +
1277 +* `{npm-version}` - The npm version in use
1278 +* `{node-version}` - The Node.js version in use
1279 +* `{platform}` - The value of `process.platform`
1280 +* `{arch}` - The value of `process.arch`
1281 +* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or
1282 + an empty string if `ci-name` is empty.
1283 +
1284 +#### `userconfig`
1285 +
1286 +* Default: "~/.npmrc"
1287 +* Type: Path
1288 +
1289 +The location of user-level configuration settings.
1290 +
1291 +This may be overridden by the `npm_config_userconfig` environment variable
1292 +or the `--userconfig` command line option, but may _not_ be overridden by
1293 +settings in the `globalconfig` file.
1294 +
1295 +#### `version`
1296 +
1297 +* Default: false
1298 +* Type: Boolean
1299 +
1300 +If true, output the npm version and exit successfully.
1301 +
1302 +Only relevant when specified explicitly on the command line.
1303 +
1304 +#### `versions`
1305 +
1306 +* Default: false
1307 +* Type: Boolean
1308 +
1309 +If true, output the npm version as well as node's `process.versions` map and
1310 +the version in the current working directory's `package.json` file if one
1311 +exists, and exit successfully.
1312 +
1313 +Only relevant when specified explicitly on the command line.
1314 +
1315 +#### `viewer`
1316 +
1317 +* Default: "man" on Posix, "browser" on Windows
1318 +* Type: String
1319 +
1320 +The program to use to view help content.
1321 +
1322 +Set to `"browser"` to view html help content in the default web browser.
1323 +
1324 +#### `which`
1325 +
1326 +* Default: null
1327 +* Type: null or Number
1328 +
1329 +If there are multiple funding sources, which 1-indexed source URL to open.
1330 +
1331 +#### `workspace`
1332 +
1333 +* Default:
1334 +* Type: String (can be set multiple times)
1335 +
1336 +Enable running a command in the context of the configured workspaces of the
1337 +current project while filtering by running only the workspaces defined by
1338 +this configuration option.
1339 +
1340 +Valid values for the `workspace` config are either: - Workspace names - Path
1341 +to a workspace directory - Path to a parent workspace directory (will result
1342 +to selecting all of the nested workspaces)
1343 +
1344 +This value is not exported to the environment for child processes.
1345 +
1346 +#### `workspaces`
1347 +
1348 +* Default: false
1349 +* Type: Boolean
1350 +
1351 +Enable running a command in the context of **all** the configured
1352 +workspaces.
1353 +
1354 +This value is not exported to the environment for child processes.
1355 +
1356 +#### `yes`
1357 +
1358 +* Default: null
1359 +* Type: null or Boolean
1360 +
1361 +Automatically answer "yes" to any prompts that npm might print on the
1362 +command line.
1363 +
1364 +#### `also`
1365 +
1366 +* Default: null
1367 +* Type: null, "dev", or "development"
1368 +* DEPRECATED: Please use --include=dev instead.
1369 +
1370 +When set to `dev` or `development`, this is an alias for `--include=dev`.
1371 +
1372 +#### `auth-type`
1373 +
1374 +* Default: "legacy"
1375 +* Type: "legacy", "sso", "saml", or "oauth"
1376 +* DEPRECATED: This method of SSO/SAML/OAuth is deprecated and will be removed
1377 + in a future version of npm in favor of web-based login.
1378 +
1379 +What authentication strategy to use with `adduser`/`login`.
1380 +
1381 +#### `cache-max`
1382 +
1383 +* Default: Infinity
1384 +* Type: Number
1385 +* DEPRECATED: This option has been deprecated in favor of `--prefer-online`
1386 +
1387 +`--cache-max=0` is an alias for `--prefer-online`
1388 +
1389 +#### `cache-min`
1390 +
1391 +* Default: 0
1392 +* Type: Number
1393 +* DEPRECATED: This option has been deprecated in favor of `--prefer-offline`.
1394 +
1395 +`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.
1396 +
1397 +#### `dev`
1398 +
1399 +* Default: false
1400 +* Type: Boolean
1401 +* DEPRECATED: Please use --include=dev instead.
1402 +
1403 +Alias for `--include=dev`.
1404 +
1405 +#### `init.author.email`
1406 +
1407 +* Default: ""
1408 +* Type: String
1409 +* DEPRECATED: Use `--init-author-email` instead.
1410 +
1411 +Alias for `--init-author-email`
1412 +
1413 +#### `init.author.name`
1414 +
1415 +* Default: ""
1416 +* Type: String
1417 +* DEPRECATED: Use `--init-author-name` instead.
1418 +
1419 +Alias for `--init-author-name`
1420 +
1421 +#### `init.author.url`
1422 +
1423 +* Default: ""
1424 +* Type: "" or URL
1425 +* DEPRECATED: Use `--init-author-url` instead.
1426 +
1427 +Alias for `--init-author-url`
1428 +
1429 +#### `init.license`
1430 +
1431 +* Default: "ISC"
1432 +* Type: String
1433 +* DEPRECATED: Use `--init-license` instead.
1434 +
1435 +Alias for `--init-license`
1436 +
1437 +#### `init.module`
1438 +
1439 +* Default: "~/.npm-init.js"
1440 +* Type: Path
1441 +* DEPRECATED: Use `--init-module` instead.
1442 +
1443 +Alias for `--init-module`
1444 +
1445 +#### `init.version`
1446 +
1447 +* Default: "1.0.0"
1448 +* Type: SemVer string
1449 +* DEPRECATED: Use `--init-version` instead.
1450 +
1451 +Alias for `--init-version`
1452 +
1453 +#### `only`
1454 +
1455 +* Default: null
1456 +* Type: null, "prod", or "production"
1457 +* DEPRECATED: Use `--omit=dev` to omit dev dependencies from the install.
1458 +
1459 +When set to `prod` or `production`, this is an alias for `--omit=dev`.
1460 +
1461 +#### `optional`
1462 +
1463 +* Default: null
1464 +* Type: null or Boolean
1465 +* DEPRECATED: Use `--omit=optional` to exclude optional dependencies, or
1466 + `--include=optional` to include them.
1467 +
1468 +Default value does install optional deps unless otherwise omitted.
1469 +
1470 +Alias for --include=optional or --omit=optional
1471 +
1472 +#### `production`
1473 +
1474 +* Default: null
1475 +* Type: null or Boolean
1476 +* DEPRECATED: Use `--omit=dev` instead.
1477 +
1478 +Alias for `--omit=dev`
1479 +
1480 +#### `shrinkwrap`
1481 +
1482 +* Default: true
1483 +* Type: Boolean
1484 +* DEPRECATED: Use the --package-lock setting instead.
1485 +
1486 +Alias for --package-lock
1487 +
1488 +#### `sso-poll-frequency`
1489 +
1490 +* Default: 500
1491 +* Type: Number
1492 +* DEPRECATED: The --auth-type method of SSO/SAML/OAuth will be removed in a
1493 + future version of npm in favor of web-based login.
1494 +
1495 +When used with SSO-enabled `auth-type`s, configures how regularly the
1496 +registry should be polled while the user is completing authentication.
1497 +
1498 +#### `sso-type`
1499 +
1500 +* Default: "oauth"
1501 +* Type: null, "oauth", or "saml"
1502 +* DEPRECATED: The --auth-type method of SSO/SAML/OAuth will be removed in a
1503 + future version of npm in favor of web-based login.
1504 +
1505 +If `--auth-type=sso`, the type of SSO type to use.
1506 +
1507 +#### `tmp`
1508 +
1509 +* Default: The value returned by the Node.js `os.tmpdir()` method
1510 + <https://nodejs.org/api/os.html#os_os_tmpdir>
1511 +* Type: Path
1512 +* DEPRECATED: This setting is no longer used. npm stores temporary files in a
1513 + special location in the cache, and they are managed by
1514 + [`cacache`](http://npm.im/cacache).
1515 +
1516 +Historically, the location where temporary files were stored. No longer
1517 +relevant.
1518 +
1519 +<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
1520 +
1521 +### See also
1522 +
1523 +* [npm config](/cli/v7/commands/npm-config)
1524 +* [npmrc](/cli/v7/configuring-npm/npmrc)
1525 +* [npm scripts](/cli/v7/using-npm/scripts)
1526 +* [npm folders](/cli/v7/configuring-npm/folders)
1527 +* [npm](/cli/v7/commands/npm)
content/cli/v7/using-npm/developers.md new
+251
@@ -0,0 +1,251 @@
1 +---
2 +title: developers
3 +section: 7
4 +description: Developer Guide
5 +redirect_from:
6 + - /using-npm/developers
7 + - /using-npm/developers.html
8 + - /misc/developers
9 + - /misc/developers.html
10 +github_repo: npm/cli
11 +github_branch: latest
12 +github_path: docs/content/using-npm/developers.md
13 +---
14 +
15 +### Description
16 +
17 +So, you've decided to use npm to develop (and maybe publish/deploy)
18 +your project.
19 +
20 +Fantastic!
21 +
22 +There are a few things that you need to do above the simple steps
23 +that your users will do to install your program.
24 +
25 +### About These Documents
26 +
27 +These are man pages. If you install npm, you should be able to
28 +then do `man npm-thing` to get the documentation on a particular
29 +topic, or `npm help thing` to see the same information.
30 +
31 +### What is a Package
32 +
33 +A package is:
34 +
35 +* a) a folder containing a program described by a package.json file
36 +* b) a gzipped tarball containing (a)
37 +* c) a url that resolves to (b)
38 +* d) a `<name>@<version>` that is published on the registry with (c)
39 +* e) a `<name>@<tag>` that points to (d)
40 +* f) a `<name>` that has a "latest" tag satisfying (e)
41 +* g) a `git` url that, when cloned, results in (a).
42 +
43 +Even if you never publish your package, you can still get a lot of
44 +benefits of using npm if you just want to write a node program (a), and
45 +perhaps if you also want to be able to easily install it elsewhere
46 +after packing it up into a tarball (b).
47 +
48 +Git urls can be of the form:
49 +
50 +```bash
51 +git://github.com/user/project.git#commit-ish
52 +git+ssh://user@hostname:project.git#commit-ish
53 +git+http://user@hostname/project/blah.git#commit-ish
54 +git+https://user@hostname/project/blah.git#commit-ish
55 +```
56 +
57 +The `commit-ish` can be any tag, sha, or branch which can be supplied as
58 +an argument to `git checkout`. The default is whatever the repository uses
59 +as its default branch.
60 +
61 +### The package.json File
62 +
63 +You need to have a `package.json` file in the root of your project to do
64 +much of anything with npm. That is basically the whole interface.
65 +
66 +See [`package.json`](/cli/v7/configuring-npm/package-json) for details about what
67 +goes in that file. At the very least, you need:
68 +
69 +* name: This should be a string that identifies your project. Please do
70 + not use the name to specify that it runs on node, or is in JavaScript.
71 + You can use the "engines" field to explicitly state the versions of node
72 + (or whatever else) that your program requires, and it's pretty well
73 + assumed that it's JavaScript.
74 +
75 + It does not necessarily need to match your github repository name.
76 +
77 + So, `node-foo` and `bar-js` are bad names. `foo` or `bar` are better.
78 +
79 +* version: A semver-compatible version.
80 +
81 +* engines: Specify the versions of node (or whatever else) that your
82 + program runs on. The node API changes a lot, and there may be bugs or
83 + new functionality that you depend on. Be explicit.
84 +
85 +* author: Take some credit.
86 +
87 +* scripts: If you have a special compilation or installation script, then
88 + you should put it in the `scripts` object. You should definitely have at
89 + least a basic smoke-test command as the "scripts.test" field. See
90 + [scripts](/cli/v7/using-npm/scripts).
91 +
92 +* main: If you have a single module that serves as the entry point to your
93 + program (like what the "foo" package gives you at require("foo")), then
94 + you need to specify that in the "main" field.
95 +
96 +* directories: This is an object mapping names to folders. The best ones
97 + to include are "lib" and "doc", but if you use "man" to specify a folder
98 + full of man pages, they'll get installed just like these ones.
99 +
100 +You can use `npm init` in the root of your package in order to get you
101 +started with a pretty basic package.json file. See [`npm
102 +init`](/cli/v7/commands/npm-init) for more info.
103 +
104 +### Keeping files *out* of your Package
105 +
106 +Use a `.npmignore` file to keep stuff out of your package. If there's no
107 +`.npmignore` file, but there *is* a `.gitignore` file, then npm will ignore
108 +the stuff matched by the `.gitignore` file. If you *want* to include
109 +something that is excluded by your `.gitignore` file, you can create an
110 +empty `.npmignore` file to override it. Like `git`, `npm` looks for
111 +`.npmignore` and `.gitignore` files in all subdirectories of your package,
112 +not only the root directory.
113 +
114 +`.npmignore` files follow the [same pattern
115 +rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring)
116 +as `.gitignore` files:
117 +
118 +* Blank lines or lines starting with `#` are ignored.
119 +* Standard glob patterns work.
120 +* You can end patterns with a forward slash `/` to specify a directory.
121 +* You can negate a pattern by starting it with an exclamation point `!`.
122 +
123 +By default, the following paths and files are ignored, so there's no
124 +need to add them to `.npmignore` explicitly:
125 +
126 +* `.*.swp`
127 +* `._*`
128 +* `.DS_Store`
129 +* `.git`
130 +* `.hg`
131 +* `.npmrc`
132 +* `.lock-wscript`
133 +* `.svn`
134 +* `.wafpickle-*`
135 +* `config.gypi`
136 +* `CVS`
137 +* `npm-debug.log`
138 +
139 +Additionally, everything in `node_modules` is ignored, except for
140 +bundled dependencies. npm automatically handles this for you, so don't
141 +bother adding `node_modules` to `.npmignore`.
142 +
143 +The following paths and files are never ignored, so adding them to
144 +`.npmignore` is pointless:
145 +
146 +* `package.json`
147 +* `README` (and its variants)
148 +* `CHANGELOG` (and its variants)
149 +* `LICENSE` / `LICENCE`
150 +
151 +If, given the structure of your project, you find `.npmignore` to be a
152 +maintenance headache, you might instead try populating the `files`
153 +property of `package.json`, which is an array of file or directory names
154 +that should be included in your package. Sometimes manually picking
155 +which items to allow is easier to manage than building a block list.
156 +
157 +#### Testing whether your `.npmignore` or `files` config works
158 +
159 +If you want to double check that your package will include only the files
160 +you intend it to when published, you can run the `npm pack` command locally
161 +which will generate a tarball in the working directory, the same way it
162 +does for publishing.
163 +
164 +### Link Packages
165 +
166 +`npm link` is designed to install a development package and see the
167 +changes in real time without having to keep re-installing it. (You do
168 +need to either re-link or `npm rebuild -g` to update compiled packages,
169 +of course.)
170 +
171 +More info at [`npm link`](/cli/v7/commands/npm-link).
172 +
173 +### Before Publishing: Make Sure Your Package Installs and Works
174 +
175 +**This is important.**
176 +
177 +If you can not install it locally, you'll have
178 +problems trying to publish it. Or, worse yet, you'll be able to
179 +publish it, but you'll be publishing a broken or pointless package.
180 +So don't do that.
181 +
182 +In the root of your package, do this:
183 +
184 +```bash
185 +npm install . -g
186 +```
187 +
188 +That'll show you that it's working. If you'd rather just create a symlink
189 +package that points to your working directory, then do this:
190 +
191 +```bash
192 +npm link
193 +```
194 +
195 +Use `npm ls -g` to see if it's there.
196 +
197 +To test a local install, go into some other folder, and then do:
198 +
199 +```bash
200 +cd ../some-other-folder
201 +npm install ../my-package
202 +```
203 +
204 +to install it locally into the node_modules folder in that other place.
205 +
206 +Then go into the node-repl, and try using require("my-thing") to
207 +bring in your module's main module.
208 +
209 +### Create a User Account
210 +
211 +Create a user with the adduser command. It works like this:
212 +
213 +```bash
214 +npm adduser
215 +```
216 +
217 +and then follow the prompts.
218 +
219 +This is documented better in [npm adduser](/cli/v7/commands/npm-adduser).
220 +
221 +### Publish your Package
222 +
223 +This part's easy. In the root of your folder, do this:
224 +
225 +```bash
226 +npm publish
227 +```
228 +
229 +You can give publish a url to a tarball, or a filename of a tarball,
230 +or a path to a folder.
231 +
232 +Note that pretty much **everything in that folder will be exposed**
233 +by default. So, if you have secret stuff in there, use a
234 +`.npmignore` file to list out the globs to ignore, or publish
235 +from a fresh checkout.
236 +
237 +### Brag about it
238 +
239 +Send emails, write blogs, blab in IRC.
240 +
241 +Tell the world how easy it is to install your program!
242 +
243 +### See also
244 +
245 +* [npm](/cli/v7/commands/npm)
246 +* [npm init](/cli/v7/commands/npm-init)
247 +* [package.json](/cli/v7/configuring-npm/package-json)
248 +* [npm scripts](/cli/v7/using-npm/scripts)
249 +* [npm publish](/cli/v7/commands/npm-publish)
250 +* [npm adduser](/cli/v7/commands/npm-adduser)
251 +* [npm registry](/cli/v7/using-npm/registry)
content/cli/v7/using-npm/disputes.md new
+136
@@ -0,0 +1,136 @@
1 +---
2 +title: disputes
3 +section: 7
4 +description: Handling Module Name Disputes
5 +github_repo: npm/cli
6 +github_branch: latest
7 +github_path: docs/content/using-npm/disputes.md
8 +---
9 +
10 +This document describes the steps that you should take to resolve module name
11 +disputes with other npm publishers. It also describes special steps you should
12 +take about names you think infringe your trademarks.
13 +
14 +This document is a clarification of the acceptable behavior outlined in the
15 +[npm Code of Conduct](https://www.npmjs.com/policies/conduct), and nothing in
16 +this document should be interpreted to contradict any aspect of the npm Code of
17 +Conduct.
18 +
19 +### TL;DR
20 +
21 +1. Get the author email with `npm owner ls <pkgname>`
22 +2. Email the author, CC <support@npmjs.com>
23 +3. After a few weeks, if there's no resolution, we'll sort it out.
24 +
25 +Don't squat on package names. Publish code or move out of the way.
26 +
27 +### Description
28 +
29 +There sometimes arise cases where a user publishes a module, and then later,
30 +some other user wants to use that name. Here are some common ways that happens
31 +(each of these is based on actual events.)
32 +
33 +1. Alice writes a JavaScript module `foo`, which is not node-specific. Alice
34 + doesn't use node at all. Yusuf wants to use `foo` in node, so he wraps it in
35 + an npm module. Some time later, Alice starts using node, and wants to take
36 + over management of her program.
37 +2. Yusuf writes an npm module `foo`, and publishes it. Perhaps much later, Alice
38 + finds a bug in `foo`, and fixes it. She sends a pull request to Yusuf, but
39 + Yusuf doesn't have the time to deal with it, because he has a new job and a
40 + new baby and is focused on his new Erlang project, and kind of not involved
41 + with node any more. Alice would like to publish a new `foo`, but can't,
42 + because the name is taken.
43 +3. Yusuf writes a 10-line flow-control library, and calls it `foo`, and
44 + publishes it to the npm registry. Being a simple little thing, it never
45 + really has to be updated. Alice works for Foo Inc, the makers of the
46 + critically acclaimed and widely-marketed `foo` JavaScript toolkit framework.
47 + They publish it to npm as `foojs`, but people are routinely confused when
48 + `npm install foo` is some different thing.
49 +4. Yusuf writes a parser for the widely-known `foo` file format, because he
50 + needs it for work. Then, he gets a new job, and never updates the prototype.
51 + Later on, Alice writes a much more complete `foo` parser, but can't publish,
52 + because Yusuf's `foo` is in the way.
53 +
54 +1. `npm owner ls foo`. This will tell Alice the email address of the owner
55 + (Yusuf).
56 +2. Alice emails Yusuf, explaining the situation **as respectfully as possible**,
57 + and what she would like to do with the module name. She adds the npm support
58 + staff <support@npmjs.com> to the CC list of the email. Mention in the email
59 + that Yusuf can run npm owner `add alice foo` to add Alice as an owner of the
60 + foo package.
61 +3. After a reasonable amount of time, if Yusuf has not responded, or if Yusuf
62 + and Alice can't come to any sort of resolution, email support
63 + <support@npmjs.com> and we'll sort it out. ("Reasonable" is usually at least
64 + 4 weeks.)
65 +
66 +### Reasoning
67 +
68 +In almost every case so far, the parties involved have been able to reach an
69 +amicable resolution without any major intervention. Most people really do want
70 +to be reasonable, and are probably not even aware that they're in your way.
71 +
72 +Module ecosystems are most vibrant and powerful when they are as self-directed
73 +as possible. If an admin one day deletes something you had worked on, then that
74 +is going to make most people quite upset, regardless of the justification. When
75 +humans solve their problems by talking to other humans with respect, everyone
76 +has the chance to end up feeling good about the interaction.
77 +
78 +### Exceptions
79 +
80 +Some things are not allowed, and will be removed without discussion if they are
81 +brought to the attention of the npm registry admins, including but not limited
82 +to:
83 +
84 +1. Malware (that is, a package designed to exploit or harm the machine on which
85 + it is installed).
86 +2. Violations of copyright or licenses (for example, cloning an MIT-licensed
87 + program, and then removing or changing the copyright and license statement).
88 +3. Illegal content.
89 +4. "Squatting" on a package name that you plan to use, but aren't actually
90 + using. Sorry, I don't care how great the name is, or how perfect a fit it is
91 + for the thing that someday might happen. If someone wants to use it today,
92 + and you're just taking up space with an empty tarball, you're going to be
93 + evicted.
94 +5. Putting empty packages in the registry. Packages must have SOME
95 + functionality. It can be silly, but it can't be nothing. (See also:
96 + squatting.)
97 +6. Doing weird things with the registry, like using it as your own personal
98 + application database or otherwise putting non-packagey things into it.
99 +7. Other things forbidden by the npm
100 + [Code of Conduct](https://www.npmjs.com/policies/conduct) such as hateful
101 + language, pornographic content, or harassment.
102 +
103 +If you see bad behavior like this, please report it to <abuse@npmjs.com> right
104 +away. **You are never expected to resolve abusive behavior on your own. We are
105 +here to help.**
106 +
107 +### Trademarks
108 +
109 +If you think another npm publisher is infringing your trademark, such as by
110 +using a confusingly similar package name, email <abuse@npmjs.com> with a link to
111 +the package or user account on [https://www.npmjs.com/](https://www.npmjs.com/).
112 +Attach a copy of your trademark registration certificate.
113 +
114 +If we see that the package's publisher is intentionally misleading others by
115 +misusing your registered mark without permission, we will transfer the package
116 +name to you. Otherwise, we will contact the package publisher and ask them to
117 +clear up any confusion with changes to their package's `README` file or
118 +metadata.
119 +
120 +### Changes
121 +
122 +This is a living document and may be updated from time to time. Please refer to
123 +the [git history for this document](https://github.com/npm/cli/commits/latest/doc/misc/npm-disputes.md)
124 +to view the changes.
125 +
126 +### License
127 +
128 +Copyright (C) npm, Inc., All rights reserved
129 +
130 +This document may be reused under a Creative Commons Attribution-ShareAlike
131 +License.
132 +
133 +### See also
134 +
135 +* [npm registry](/cli/v7/using-npm/registry)
136 +* [npm owner](/cli/v7/commands/npm-owner)
content/cli/v7/using-npm/index.mdx new
+13
@@ -0,0 +1,13 @@
1 +---
2 +redirect_from:
3 + - using-npm
4 + - /cli/using-npm
5 + - cli-documentation/misc
6 + - cli-documentation/using-npm
7 + - /misc/index.html
8 +github_repo: npm/cli
9 +github_branch: latest
10 +github_path: docs/content/using-npm/index.mdx
11 +title: Using npm
12 +---
13 +<Index depth="1" />
\ No newline at end of file
content/cli/v7/using-npm/orgs.md new
+101
@@ -0,0 +1,101 @@
1 +---
2 +title: orgs
3 +section: 7
4 +description: Working with Teams & Orgs
5 +redirect_from:
6 + - /using-npm/orgs
7 + - /using-npm/orgs.html
8 + - /misc/orgs
9 + - /misc/orgs.html
10 +github_repo: npm/cli
11 +github_branch: latest
12 +github_path: docs/content/using-npm/orgs.md
13 +---
14 +
15 +### Description
16 +
17 +There are three levels of org users:
18 +
19 +1. Super admin, controls billing & adding people to the org.
20 +2. Team admin, manages team membership & package access.
21 +3. Developer, works on packages they are given access to.
22 +
23 +The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a `developers` team that all users are automatically added to.
24 +
25 +The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.
26 +
27 +The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.
28 +
29 +There are two main commands:
30 +
31 +1. `npm team` see [npm team](/cli/v7/commands/npm-team) for more details
32 +2. `npm access` see [npm access](/cli/v7/commands/npm-access) for more details
33 +
34 +### Team Admins create teams
35 +
36 +* Check who you’ve added to your org:
37 +
38 +```bash
39 +npm team ls <org>:developers
40 +```
41 +
42 +* Each org is automatically given a `developers` team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the `access` command.
43 +
44 +* Create a new team:
45 +
46 +```bash
47 +npm team create <org:team>
48 +```
49 +
50 +* Add members to that team:
51 +
52 +```bash
53 +npm team add <org:team> <user>
54 +```
55 +
56 +### Publish a package and adjust package access
57 +
58 +* In package directory, run
59 +
60 +```bash
61 +npm init --scope=<org>
62 +```
63 +to scope it for your org & publish as usual
64 +
65 +* Grant access:
66 +
67 +```bash
68 +npm access grant <read-only|read-write> <org:team> [<package>]
69 +```
70 +
71 +* Revoke access:
72 +
73 +```bash
74 +npm access revoke <org:team> [<package>]
75 +```
76 +
77 +### Monitor your package access
78 +
79 +* See what org packages a team member can access:
80 +
81 +```bash
82 +npm access ls-packages <org> <user>
83 +```
84 +
85 +* See packages available to a specific team:
86 +
87 +```bash
88 +npm access ls-packages <org:team>
89 +```
90 +
91 +* Check which teams are collaborating on a package:
92 +
93 +```bash
94 +npm access ls-collaborators <pkg>
95 +```
96 +
97 +### See also
98 +
99 +* [npm team](/cli/v7/commands/npm-team)
100 +* [npm access](/cli/v7/commands/npm-access)
101 +* [npm scope](/cli/v7/using-npm/scope)
content/cli/v7/using-npm/registry.md new
+82
@@ -0,0 +1,82 @@
1 +---
2 +title: registry
3 +section: 7
4 +description: The JavaScript Package Registry
5 +redirect_from:
6 + - /using-npm/registry
7 + - /using-npm/registry.html
8 + - /misc/registry
9 + - /misc/registry.html
10 +github_repo: npm/cli
11 +github_branch: latest
12 +github_path: docs/content/using-npm/registry.md
13 +---
14 +
15 +### Description
16 +
17 +To resolve packages by name and version, npm talks to a registry website
18 +that implements the CommonJS Package Registry specification for reading
19 +package info.
20 +
21 +npm is configured to use the **npm public registry** at
22 +<https://registry.npmjs.org> by default. Use of the npm public registry is
23 +subject to terms of use available at <https://www.npmjs.com/policies/terms>.
24 +
25 +You can configure npm to use any compatible registry you like, and even run
26 +your own registry. Use of someone else's registry may be governed by their
27 +terms of use.
28 +
29 +npm's package registry implementation supports several
30 +write APIs as well, to allow for publishing packages and managing user
31 +account information.
32 +
33 +The npm public registry is powered by a CouchDB database,
34 +of which there is a public mirror at <https://skimdb.npmjs.com/registry>.
35 +
36 +The registry URL used is determined by the scope of the package (see
37 +[`scope`](/cli/v7/using-npm/scope). If no scope is specified, the default registry is used, which is
38 +supplied by the `registry` config parameter. See [`npm config`](/cli/v7/commands/npm-config),
39 +[`npmrc`](/cli/v7/configuring-npm/npmrc), and [`config`](/cli/v7/using-npm/config) for more on managing npm's configuration.
40 +
41 +### Does npm send any information about me back to the registry?
42 +
43 +Yes.
44 +
45 +When making requests of the registry npm adds two headers with information
46 +about your environment:
47 +
48 +* `Npm-Scope` – If your project is scoped, this header will contain its
49 + scope. In the future npm hopes to build registry features that use this
50 + information to allow you to customize your experience for your
51 + organization.
52 +* `Npm-In-CI` – Set to "true" if npm believes this install is running in a
53 + continuous integration environment, "false" otherwise. This is detected by
54 + looking for the following environment variables: `CI`, `TDDIUM`,
55 + `JENKINS_URL`, `bamboo.buildKey`. If you'd like to learn more you may find
56 + the [original PR](https://github.com/npm/npm-registry-client/pull/129)
57 + interesting.
58 + This is used to gather better metrics on how npm is used by humans, versus
59 + build farms.
60 +
61 +The npm registry does not try to correlate the information in these headers
62 +with any authenticated accounts that may be used in the same requests.
63 +
64 +### How can I prevent my package from being published in the official registry?
65 +
66 +Set `"private": true` in your `package.json` to prevent it from being
67 +published at all, or
68 +`"publishConfig":{"registry":"http://my-internal-registry.local"}`
69 +to force it to be published only to your internal/private registry.
70 +
71 +See [`package.json`](/cli/v7/configuring-npm/package-json) for more info on what goes in the package.json file.
72 +
73 +### Where can I find my own, & other's, published packages?
74 +
75 +<https://www.npmjs.com/>
76 +
77 +### See also
78 +
79 +* [npm config](/cli/v7/commands/npm-config)
80 +* [config](/cli/v7/using-npm/config)
81 +* [npmrc](/cli/v7/configuring-npm/npmrc)
82 +* [npm developers](/cli/v7/using-npm/developers)
content/cli/v7/using-npm/removal.md new
+74
@@ -0,0 +1,74 @@
1 +---
2 +title: removal
3 +section: 7
4 +description: Cleaning the Slate
5 +redirect_from:
6 + - /using-npm/removal
7 + - /using-npm/removal.html
8 + - /misc/removal
9 + - /misc/removal.html
10 + - /misc/removing-npm
11 + - /misc/removing-npm.html
12 +github_repo: npm/cli
13 +github_branch: latest
14 +github_path: docs/content/using-npm/removal.md
15 +---
16 +
17 +### Synopsis
18 +
19 +So sad to see you go.
20 +
21 +```bash
22 +sudo npm uninstall npm -g
23 +```
24 +
25 +Or, if that fails, get the npm source code, and do:
26 +
27 +```bash
28 +sudo make uninstall
29 +```
30 +
31 +### More Severe Uninstalling
32 +
33 +Usually, the above instructions are sufficient. That will remove
34 +npm, but leave behind anything you've installed.
35 +
36 +If that doesn't work, or if you require more drastic measures,
37 +continue reading.
38 +
39 +Note that this is only necessary for globally-installed packages. Local
40 +installs are completely contained within a project's `node_modules`
41 +folder. Delete that folder, and everything is gone less a package's
42 +install script is particularly ill-behaved).
43 +
44 +This assumes that you installed node and npm in the default place. If
45 +you configured node with a different `--prefix`, or installed npm with a
46 +different prefix setting, then adjust the paths accordingly, replacing
47 +`/usr/local` with your install prefix.
48 +
49 +To remove everything npm-related manually:
50 +
51 +```bash
52 +rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
53 +```
54 +
55 +If you installed things *with* npm, then your best bet is to uninstall
56 +them with npm first, and then install them again once you have a
57 +proper install. This can help find any symlinks that are lying
58 +around:
59 +
60 +```bash
61 +ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
62 +```
63 +
64 +Prior to version 0.3, npm used shim files for executables and node
65 +modules. To track those down, you can do the following:
66 +
67 +```bash
68 +find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
69 +```
70 +
71 +### See also
72 +
73 +* [npm uninstall](/cli/v7/commands/npm-uninstall)
74 +* [npm prune](/cli/v7/commands/npm-prune)
content/cli/v7/using-npm/scope.md new
+137
@@ -0,0 +1,137 @@
1 +---
2 +title: scope
3 +section: 7
4 +description: Scoped packages
5 +redirect_from:
6 + - /using-npm/scope
7 + - /using-npm/scope.html
8 + - /misc/scope
9 + - /misc/scope.html
10 + - /using-npm/npm-scope
11 +github_repo: npm/cli
12 +github_branch: latest
13 +github_path: docs/content/using-npm/scope.md
14 +---
15 +
16 +### Description
17 +
18 +All npm packages have a name. Some package names also have a scope. A scope
19 +follows the usual rules for package names (URL-safe characters, no leading dots
20 +or underscores). When used in package names, scopes are preceded by an `@` symbol
21 +and followed by a slash, e.g.
22 +
23 +```bash
24 +@somescope/somepackagename
25 +```
26 +
27 +Scopes are a way of grouping related packages together, and also affect a few
28 +things about the way npm treats the package.
29 +
30 +Each npm user/organization has their own scope, and only you can add packages
31 +in your scope. This means you don't have to worry about someone taking your
32 +package name ahead of you. Thus it is also a good way to signal official packages
33 +for organizations.
34 +
35 +Scoped packages can be published and installed as of `npm@2` and are supported
36 +by the primary npm registry. Unscoped packages can depend on scoped packages and
37 +vice versa. The npm client is backwards-compatible with unscoped registries,
38 +so it can be used to work with scoped and unscoped registries at the same time.
39 +
40 +### Installing scoped packages
41 +
42 +Scoped packages are installed to a sub-folder of the regular installation
43 +folder, e.g. if your other packages are installed in `node_modules/packagename`,
44 +scoped modules will be installed in `node_modules/@myorg/packagename`. The scope
45 +folder (`@myorg`) is simply the name of the scope preceded by an `@` symbol, and can
46 +contain any number of scoped packages.
47 +
48 +A scoped package is installed by referencing it by name, preceded by an
49 +`@` symbol, in `npm install`:
50 +
51 +```bash
52 +npm install @myorg/mypackage
53 +```
54 +
55 +Or in `package.json`:
56 +
57 +```json
58 +"dependencies": {
59 + "@myorg/mypackage": "^1.3.0"
60 +}
61 +```
62 +
63 +Note that if the `@` symbol is omitted, in either case, npm will instead attempt to
64 +install from GitHub; see [`npm install`](/cli/v7/commands/npm-install).
65 +
66 +### Requiring scoped packages
67 +
68 +Because scoped packages are installed into a scope folder, you have to
69 +include the name of the scope when requiring them in your code, e.g.
70 +
71 +```javascript
72 +require('@myorg/mypackage')
73 +```
74 +
75 +There is nothing special about the way Node treats scope folders. This
76 +simply requires the `mypackage` module in the folder named `@myorg`.
77 +
78 +### Publishing scoped packages
79 +
80 +Scoped packages can be published from the CLI as of `npm@2` and can be
81 +published to any registry that supports them, including the primary npm
82 +registry.
83 +
84 +(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry
85 +**does** support scoped packages.)
86 +
87 +If you wish, you may associate a scope with a registry; see below.
88 +
89 +#### Publishing public scoped packages to the primary npm registry
90 +
91 +To publish a public scoped package, you must specify `--access public` with
92 +the initial publication. This will publish the package and set access
93 +to `public` as if you had run `npm access public` after publishing.
94 +
95 +#### Publishing private scoped packages to the npm registry
96 +
97 +To publish a private scoped package to the npm registry, you must have
98 +an [npm Private Modules](https://docs.npmjs.com/private-modules/intro)
99 +account.
100 +
101 +You can then publish the module with `npm publish` or `npm publish
102 +--access restricted`, and it will be present in the npm registry, with
103 +restricted access. You can then change the access permissions, if
104 +desired, with `npm access` or on the npmjs.com website.
105 +
106 +### Associating a scope with a registry
107 +
108 +Scopes can be associated with a separate registry. This allows you to
109 +seamlessly use a mix of packages from the primary npm registry and one or more
110 +private registries, such as npm Enterprise.
111 +
112 +You can associate a scope with a registry at login, e.g.
113 +
114 +```bash
115 +npm login --registry=http://reg.example.com --scope=@myco
116 +```
117 +
118 +Scopes have a many-to-one relationship with registries: one registry can
119 +host multiple scopes, but a scope only ever points to one registry.
120 +
121 +You can also associate a scope with a registry using `npm config`:
122 +
123 +```bash
124 +npm config set @myco:registry http://reg.example.com
125 +```
126 +
127 +Once a scope is associated with a registry, any `npm install` for a package
128 +with that scope will request packages from that registry instead. Any
129 +`npm publish` for a package name that contains the scope will be published to
130 +that registry instead.
131 +
132 +### See also
133 +
134 +* [npm install](/cli/v7/commands/npm-install)
135 +* [npm publish](/cli/v7/commands/npm-publish)
136 +* [npm access](/cli/v7/commands/npm-access)
137 +* [npm registry](/cli/v7/using-npm/registry)
content/cli/v7/using-npm/scripts.md new
+399
@@ -0,0 +1,399 @@
1 +---
2 +title: scripts
3 +section: 7
4 +description: How npm handles the "scripts" field
5 +redirect_from:
6 + - /using-npm/scripts
7 + - /using-npm/scripts.html
8 + - /misc/scripts
9 + - /misc/scripts.html
10 +github_repo: npm/cli
11 +github_branch: latest
12 +github_path: docs/content/using-npm/scripts.md
13 +---
14 +
15 +### Description
16 +
17 +The `"scripts"` property of your `package.json` file supports a number
18 +of built-in scripts and their preset life cycle events as well as
19 +arbitrary scripts. These all can be executed by running
20 +`npm run-script <stage>` or `npm run <stage>` for short. *Pre* and *post*
21 +commands with matching names will be run for those as well (e.g. `premyscript`,
22 +`myscript`, `postmyscript`). Scripts from dependencies can be run with
23 +`npm explore <pkg> -- npm run <stage>`.
24 +
25 +### Pre & Post Scripts
26 +
27 +To create "pre" or "post" scripts for any scripts defined in the
28 +`"scripts"` section of the `package.json`, simply create another script
29 +*with a matching name* and add "pre" or "post" to the beginning of them.
30 +
31 +```json
32 +{
33 + "scripts": {
34 + "precompress": "{{ executes BEFORE the `compress` script }}",
35 + "compress": "{{ run command to compress files }}",
36 + "postcompress": "{{ executes AFTER `compress` script }}"
37 + }
38 +}
39 +```
40 +
41 +In this example `npm run compress` would execute these scripts as
42 +described.
43 +
44 +### Life Cycle Scripts
45 +
46 +There are some special life cycle scripts that happen only in certain
47 +situations. These scripts happen in addition to the `pre<event>`, `post<event>`, and
48 +`<event>` scripts.
49 +
50 +* `prepare`, `prepublish`, `prepublishOnly`, `prepack`, `postpack`
51 +
52 +**prepare** (since `npm@4.0.0`)
53 +* Runs any time before the package is packed, i.e. during `npm publish`
54 + and `npm pack`
55 +* Runs BEFORE the package is packed
56 +* Runs BEFORE the package is published
57 +* Runs on local `npm install` without any arguments
58 +* Run AFTER `prepublish`, but BEFORE `prepublishOnly`
59 +
60 +* NOTE: If a package being installed through git contains a `prepare`
61 + script, its `dependencies` and `devDependencies` will be installed, and
62 + the prepare script will be run, before the package is packaged and
63 + installed.
64 +
65 +* As of `npm@7` these scripts run in the background
66 +
67 +**prepublish** (DEPRECATED)
68 +* Does not run during `npm publish`, but does run during `npm ci`
69 + and `npm install`. See below for more info.
70 +
71 +**prepublishOnly**
72 +* Runs BEFORE the package is prepared and packed, ONLY on `npm publish`.
73 +
74 +**prepack**
75 +* Runs BEFORE a tarball is packed (on "`npm pack`", "`npm publish`", and when installing a git dependencies).
76 +* NOTE: "`npm run pack`" is NOT the same as "`npm pack`". "`npm run pack`" is an arbitrary user defined script name, where as, "`npm pack`" is a CLI defined command.
77 +
78 +**postpack**
79 +* Runs AFTER the tarball has been generated but before it is moved to its final destination (if at all, publish does not save the tarball locally)
80 +
81 +#### Prepare and Prepublish
82 +
83 +**Deprecation Note: prepublish**
84 +
85 +Since `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074). As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape).
86 +
87 +See <https://github.com/npm/npm/issues/10074> for a much lengthier justification, with further reading, for this change.
88 +
89 +**Use Cases**
90 +
91 +If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a `prepublish` script. This includes tasks such as:
92 +
93 +* Compiling CoffeeScript source code into JavaScript.
94 +* Creating minified versions of JavaScript source code.
95 +* Fetching remote resources that your package will use.
96 +
97 +The advantage of doing these things at `prepublish` time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that:
98 +
99 +* You can depend on `coffee-script` as a `devDependency`, and thus
100 + your users don't need to have it installed.
101 +* You don't need to include minifiers in your package, reducing
102 + the size for your users.
103 +* You don't need to rely on your users having `curl` or `wget` or
104 + other system tools on the target machines.
105 +
106 +### Life Cycle Operation Order
107 +
108 +#### [`npm cache add`](/cli/v7/commands/npm-cache)
109 +
110 +* `prepare`
111 +
112 +#### [`npm ci`](/cli/v7/commands/npm-ci)
113 +
114 +* `preinstall`
115 +* `install`
116 +* `postinstall`
117 +* `prepublish`
118 +* `preprepare`
119 +* `prepare`
120 +* `postprepare`
121 +
122 + These all run after the actual installation of modules into
123 + `node_modules`, in order, with no internal actions happening in between
124 +
125 +#### [`npm diff`](/cli/v7/commands/npm-diff)
126 +
127 +* `prepare`
128 +
129 +#### [`npm env`](/cli/v7/commands/npm-env)
130 +
131 +* `env` (You can override the default behavior of `npm env` by defining
132 + a custom `env` entry in your `scripts` object)
133 +
134 +#### [`npm install`](/cli/v7/commands/npm-install)
135 +
136 +These also run when you run `npm install -g <pkg-name>`
137 +
138 +* `preinstall`
139 +* `install`
140 +* `postinstall`
141 +* `prepublish`
142 +* `preprepare`
143 +* `prepare`
144 +* `postprepare`
145 +
146 +If there is a `binding.gyp` file in the root of your package and you
147 +haven't defined your own `install` or `preinstall` scripts, npm will
148 +default the `install` command to compile using node-gyp via `node-gyp
149 +rebuild`
150 +
151 +These are run from the scripts of `<pkg-name>`
152 +
153 +#### [`npm pack`](/cli/v7/commands/npm-pack)
154 +
155 +* `prepack`
156 +* `prepare`
157 +* `postpack`
158 +
159 +#### [`npm publish`](/cli/v7/commands/npm-publish)
160 +
161 +* `prepublishOnly`
162 +* `prepack`
163 +* `prepare`
164 +* `postpack`
165 +* `publish`
166 +* `postpublish`
167 +
168 +`prepare` will not run during `--dry-run`
169 +
170 +#### [`npm rebuild`](/cli/v7/commands/npm-rebuild)
171 +
172 +* `preinstall`
173 +* `install`
174 +* `postinstall`
175 +* `prepare`
176 +
177 +`prepare` is only run if the current directory is a symlink (e.g. with
178 +linked packages)
179 +
180 +#### [`npm restart`](/cli/v7/commands/npm-restart)
181 +
182 +If there is a `restart` script defined, these events are run, otherwise
183 +`stop` and `start` are both run if present, including their `pre` and
184 +`post` iterations)
185 +
186 +* `prerestart`
187 +* `restart`
188 +* `postrestart`
189 +
190 +#### [`npm run <user defined>`](/cli/v7/commands/npm-run)
191 +
192 +* `pre<user-defined>`
193 +* `<user-defined>`
194 +* `post<user-defined>`
195 +
196 +#### [`npm start`](/cli/v7/commands/npm-start)
197 +
198 +* `prestart`
199 +* `start`
200 +* `poststart`
201 +
202 +If there is a `server.js` file in the root of your package, then npm
203 +will default the `start` command to `node server.js`. `prestart` and
204 +`poststart` will still run in this case.
205 +
206 +#### [`npm stop`](/cli/v7/commands/npm-stop)
207 +
208 +* `prestop`
209 +* `stop`
210 +* `poststop`
211 +
212 +#### [`npm test`](/cli/v7/commands/npm-test)
213 +
214 +* `pretest`
215 +* `test`
216 +* `posttest`
217 +
218 +
219 +### User
220 +
221 +When npm is run as root, scripts are always run with the effective uid
222 +and gid of the working directory owner.
223 +
224 +### Environment
225 +
226 +Package scripts run in an environment where many pieces of information
227 +are made available regarding the setup of npm and the current state of
228 +the process.
229 +
230 +#### path
231 +
232 +If you depend on modules that define executable scripts, like test
233 +suites, then those executables will be added to the `PATH` for
234 +executing the scripts. So, if your package.json has this:
235 +
236 +```json
237 +{
238 + "name" : "foo",
239 + "dependencies" : {
240 + "bar" : "0.1.x"
241 + },
242 + "scripts": {
243 + "start" : "bar ./test"
244 + }
245 +}
246 +```
247 +
248 +then you could run `npm start` to execute the `bar` script, which is
249 +exported into the `node_modules/.bin` directory on `npm install`.
250 +
251 +#### package.json vars
252 +
253 +The package.json fields are tacked onto the `npm_package_` prefix. So,
254 +for instance, if you had `{"name":"foo", "version":"1.2.5"}` in your
255 +package.json file, then your package scripts would have the
256 +`npm_package_name` environment variable set to "foo", and the
257 +`npm_package_version` set to "1.2.5". You can access these variables
258 +in your code with `process.env.npm_package_name` and
259 +`process.env.npm_package_version`, and so on for other fields.
260 +
261 +#### configuration
262 +
263 +Configuration parameters are put in the environment with the
264 +`npm_config_` prefix. For instance, you can view the effective `root`
265 +config by checking the `npm_config_root` environment variable.
266 +
267 +#### Special: package.json "config" object
268 +
269 +The package.json "config" keys are overwritten in the environment if
270 +there is a config param of `<name>[@<version>]:<key>`. For example,
271 +if the package.json has this:
272 +
273 +```json
274 +{
275 + "name" : "foo",
276 + "config" : {
277 + "port" : "8080"
278 + },
279 + "scripts" : {
280 + "start" : "node server.js"
281 + }
282 +}
283 +```
284 +
285 +and the server.js is this:
286 +
287 +```javascript
288 +http.createServer(...).listen(process.env.npm_package_config_port)
289 +```
290 +
291 +then the user could change the behavior by doing:
292 +
293 +```bash
294 + npm config set foo:port 80
295 + ```
296 +
297 +#### current lifecycle event
298 +
299 +Lastly, the `npm_lifecycle_event` environment variable is set to
300 +whichever stage of the cycle is being executed. So, you could have a
301 +single script used for different parts of the process which switches
302 +based on what's currently happening.
303 +
304 +Objects are flattened following this format, so if you had
305 +`{"scripts":{"install":"foo.js"}}` in your package.json, then you'd
306 +see this in the script:
307 +
308 +```bash
309 +process.env.npm_package_scripts_install === "foo.js"
310 +```
311 +
312 +### Examples
313 +
314 +For example, if your package.json contains this:
315 +
316 +```json
317 +{
318 + "scripts" : {
319 + "install" : "scripts/install.js",
320 + "postinstall" : "scripts/postinstall.js",
321 + "uninstall" : "scripts/uninstall.js"
322 + }
323 +}
324 +```
325 +
326 +then `scripts/install.js` will be called for the install
327 +and post-install stages of the lifecycle, and `scripts/uninstall.js`
328 +will be called when the package is uninstalled. Since
329 +`scripts/install.js` is running for two different phases, it would
330 +be wise in this case to look at the `npm_lifecycle_event` environment
331 +variable.
332 +
333 +If you want to run a make command, you can do so. This works just
334 +fine:
335 +
336 +```json
337 +{
338 + "scripts" : {
339 + "preinstall" : "./configure",
340 + "install" : "make && make install",
341 + "test" : "make test"
342 + }
343 +}
344 +```
345 +
346 +### Exiting
347 +
348 +Scripts are run by passing the line as a script argument to `sh`.
349 +
350 +If the script exits with a code other than 0, then this will abort the
351 +process.
352 +
353 +Note that these script files don't have to be nodejs or even
354 +javascript programs. They just have to be some kind of executable
355 +file.
356 +
357 +### Hook Scripts
358 +
359 +If you want to run a specific script at a specific lifecycle event for
360 +ALL packages, then you can use a hook script.
361 +
362 +Place an executable file at `node_modules/.hooks/{eventname}`, and
363 +it'll get run for all packages when they are going through that point
364 +in the package lifecycle for any packages installed in that root.
365 +
366 +Hook scripts are run exactly the same way as package.json scripts.
367 +That is, they are in a separate child process, with the env described
368 +above.
369 +
370 +### Best Practices
371 +
372 +* Don't exit with a non-zero error code unless you *really* mean it.
373 + Except for uninstall scripts, this will cause the npm action to
374 + fail, and potentially be rolled back. If the failure is minor or
375 + only will prevent some optional features, then it's better to just
376 + print a warning and exit successfully.
377 +* Try not to use scripts to do what npm can do for you. Read through
378 + [`package.json`](/cli/v7/configuring-npm/package-json) to see all the things that you can specify and enable
379 + by simply describing your package appropriately. In general, this
380 + will lead to a more robust and consistent state.
381 +* Inspect the env to determine where to put things. For instance, if
382 + the `npm_config_binroot` environment variable is set to `/home/user/bin`, then
383 + don't try to install executables into `/usr/local/bin`. The user
384 + probably set it up that way for a reason.
385 +* Don't prefix your script commands with "sudo". If root permissions
386 + are required for some reason, then it'll fail with that error, and
387 + the user will sudo the npm command in question.
388 +* Don't use `install`. Use a `.gyp` file for compilation, and `prepublish`
389 + for anything else. You should almost never have to explicitly set a
390 + preinstall or install script. If you are doing this, please consider if
391 + there is another option. The only valid use of `install` or `preinstall`
392 + scripts is for compilation which must be done on the target architecture.
393 +
394 +### See Also
395 +
396 +* [npm run-script](/cli/v7/commands/npm-run-script)
397 +* [package.json](/cli/v7/configuring-npm/package-json)
398 +* [npm developers](/cli/v7/using-npm/developers)
399 +* [npm install](/cli/v7/commands/npm-install)
content/cli/v7/using-npm/semver.md new
+418
@@ -0,0 +1,418 @@
1 +---
2 +title: semver
3 +section: 7
4 +description: The semantic versioner for npm
5 +github_repo: npm/cli
6 +github_branch: latest
7 +github_path: docs/content/using-npm/semver.md
8 +---
9 +
10 +## Install
11 +
12 +```bash
13 +npm install --save semver
14 +````
15 +
16 +## Usage
17 +
18 +As a node module:
19 +
20 +```js
21 +const semver = require('semver')
22 +
23 +semver.valid('1.2.3') // '1.2.3'
24 +semver.valid('a.b.c') // null
25 +semver.clean(' =v1.2.3 ') // '1.2.3'
26 +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
27 +semver.gt('1.2.3', '9.8.7') // false
28 +semver.lt('1.2.3', '9.8.7') // true
29 +semver.minVersion('>=1.0.0') // '1.0.0'
30 +semver.valid(semver.coerce('v2')) // '2.0.0'
31 +semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
32 +```
33 +
34 +As a command-line utility:
35 +
36 +```
37 +$ semver -h
38 +
39 +A JavaScript implementation of the https://semver.org/ specification
40 +Copyright Isaac Z. Schlueter
41 +
42 +Usage: semver [options] <version> [<version> [...]]
43 +Prints valid versions sorted by SemVer precedence
44 +
45 +Options:
46 +-r --range <range>
47 + Print versions that match the specified range.
48 +
49 +-i --increment [<level>]
50 + Increment a version by the specified level. Level can
51 + be one of: major, minor, patch, premajor, preminor,
52 + prepatch, or prerelease. Default level is 'patch'.
53 + Only one version may be specified.
54 +
55 +--preid <identifier>
56 + Identifier to be used to prefix premajor, preminor,
57 + prepatch or prerelease version increments.
58 +
59 +-l --loose
60 + Interpret versions and ranges loosely
61 +
62 +-p --include-prerelease
63 + Always include prerelease versions in range matching
64 +
65 +-c --coerce
66 + Coerce a string into SemVer if possible
67 + (does not imply --loose)
68 +
69 +Program exits successfully if any valid version satisfies
70 +all supplied ranges, and prints all satisfying versions.
71 +
72 +If no satisfying versions are found, then exits failure.
73 +
74 +Versions are printed in ascending order, so supplying
75 +multiple versions to the utility will just sort them.
76 +```
77 +
78 +## Versions
79 +
80 +A "version" is described by the `v2.0.0` specification found at
81 +<https://semver.org/>.
82 +
83 +A leading `"="` or `"v"` character is stripped off and ignored.
84 +
85 +## Ranges
86 +
87 +A `version range` is a set of `comparators` which specify versions
88 +that satisfy the range.
89 +
90 +A `comparator` is composed of an `operator` and a `version`. The set
91 +of primitive `operators` is:
92 +
93 +* `<` Less than
94 +* `<=` Less than or equal to
95 +* `>` Greater than
96 +* `>=` Greater than or equal to
97 +* `=` Equal. If no operator is specified, then equality is assumed,
98 + so this operator is optional, but MAY be included.
99 +
100 +For example, the comparator `>=1.2.7` would match the versions
101 +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
102 +or `1.1.0`.
103 +
104 +Comparators can be joined by whitespace to form a `comparator set`,
105 +which is satisfied by the **intersection** of all of the comparators
106 +it includes.
107 +
108 +A range is composed of one or more comparator sets, joined by `||`. A
109 +version matches a range if and only if every comparator in at least
110 +one of the `||`-separated comparator sets is satisfied by the version.
111 +
112 +For example, the range `>=1.2.7 <1.3.0` would match the versions
113 +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
114 +or `1.1.0`.
115 +
116 +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
117 +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
118 +
119 +### Prerelease Tags
120 +
121 +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
122 +it will only be allowed to satisfy comparator sets if at least one
123 +comparator with the same `[major, minor, patch]` tuple also has a
124 +prerelease tag.
125 +
126 +For example, the range `>1.2.3-alpha.3` would be allowed to match the
127 +version `1.2.3-alpha.7`, but it would *not* be satisfied by
128 +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
129 +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
130 +range only accepts prerelease tags on the `1.2.3` version. The
131 +version `3.4.5` *would* satisfy the range, because it does not have a
132 +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
133 +
134 +The purpose for this behavior is twofold. First, prerelease versions
135 +frequently are updated very quickly, and contain many breaking changes
136 +that are (by the author's design) not yet fit for public consumption.
137 +Therefore, by default, they are excluded from range matching
138 +semantics.
139 +
140 +Second, a user who has opted into using a prerelease version has
141 +clearly indicated the intent to use *that specific* set of
142 +alpha/beta/rc versions. By including a prerelease tag in the range,
143 +the user is indicating that they are aware of the risk. However, it
144 +is still not appropriate to assume that they have opted into taking a
145 +similar risk on the *next* set of prerelease versions.
146 +
147 +Note that this behavior can be suppressed (treating all prerelease
148 +versions as if they were normal versions, for the purpose of range
149 +matching) by setting the `includePrerelease` flag on the options
150 +object to any
151 +[functions](https://github.com/npm/node-semver#functions) that do
152 +range matching.
153 +
154 +#### Prerelease Identifiers
155 +
156 +The method `.inc` takes an additional `identifier` string argument that
157 +will append the value of the string as a prerelease identifier:
158 +
159 +```javascript
160 +semver.inc('1.2.3', 'prerelease', 'beta')
161 +// '1.2.4-beta.0'
162 +```
163 +
164 +command-line example:
165 +
166 +```bash
167 +$ semver 1.2.3 -i prerelease --preid beta
168 +1.2.4-beta.0
169 +```
170 +
171 +Which then can be used to increment further:
172 +
173 +```bash
174 +$ semver 1.2.4-beta.0 -i prerelease
175 +1.2.4-beta.1
176 +```
177 +
178 +### Advanced Range Syntax
179 +
180 +Advanced range syntax desugars to primitive comparators in
181 +deterministic ways.
182 +
183 +Advanced ranges may be combined in the same way as primitive
184 +comparators using white space or `||`.
185 +
186 +#### Hyphen Ranges `X.Y.Z - A.B.C`
187 +
188 +Specifies an inclusive set.
189 +
190 +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
191 +
192 +If a partial version is provided as the first version in the inclusive
193 +range, then the missing pieces are replaced with zeroes.
194 +
195 +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
196 +
197 +If a partial version is provided as the second version in the
198 +inclusive range, then all versions that start with the supplied parts
199 +of the tuple are accepted, but nothing that would be greater than the
200 +provided tuple parts.
201 +
202 +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
203 +* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
204 +
205 +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
206 +
207 +Any of `X`, `x`, or `*` may be used to "stand in" for one of the
208 +numeric values in the `[major, minor, patch]` tuple.
209 +
210 +* `*` := `>=0.0.0` (Any version satisfies)
211 +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
212 +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
213 +
214 +A partial version range is treated as an X-Range, so the special
215 +character is in fact optional.
216 +
217 +* `""` (empty string) := `*` := `>=0.0.0`
218 +* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
219 +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
220 +
221 +#### Tilde Ranges `~1.2.3` `~1.2` `~1`
222 +
223 +Allows patch-level changes if a minor version is specified on the
224 +comparator. Allows minor-level changes if not.
225 +
226 +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
227 +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
228 +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
229 +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
230 +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
231 +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
232 +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
233 + the `1.2.3` version will be allowed, if they are greater than or
234 + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
235 + `1.2.4-beta.2` would not, because it is a prerelease of a
236 + different `[major, minor, patch]` tuple.
237 +
238 +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
239 +
240 +Allows changes that do not modify the left-most non-zero digit in the
241 +`[major, minor, patch]` tuple. In other words, this allows patch and
242 +minor updates for versions `1.0.0` and above, patch updates for
243 +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
244 +
245 +Many authors treat a `0.x` version as if the `x` were the major
246 +"breaking-change" indicator.
247 +
248 +Caret ranges are ideal when an author may make breaking changes
249 +between `0.2.4` and `0.3.0` releases, which is a common practice.
250 +However, it presumes that there will *not* be breaking changes between
251 +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
252 +additive (but non-breaking), according to commonly observed practices.
253 +
254 +* `^1.2.3` := `>=1.2.3 <2.0.0`
255 +* `^0.2.3` := `>=0.2.3 <0.3.0`
256 +* `^0.0.3` := `>=0.0.3 <0.0.4`
257 +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
258 + the `1.2.3` version will be allowed, if they are greater than or
259 + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
260 + `1.2.4-beta.2` would not, because it is a prerelease of a
261 + different `[major, minor, patch]` tuple.
262 +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
263 + `0.0.3` version *only* will be allowed, if they are greater than or
264 + equal to `beta`. So, `0.0.3-pr.2` would be allowed.
265 +
266 +When parsing caret ranges, a missing `patch` value desugars to the
267 +number `0`, but will allow flexibility within that value, even if the
268 +major and minor versions are both `0`.
269 +
270 +* `^1.2.x` := `>=1.2.0 <2.0.0`
271 +* `^0.0.x` := `>=0.0.0 <0.1.0`
272 +* `^0.0` := `>=0.0.0 <0.1.0`
273 +
274 +A missing `minor` and `patch` values will desugar to zero, but also
275 +allow flexibility within those values, even if the major version is
276 +zero.
277 +
278 +* `^1.x` := `>=1.0.0 <2.0.0`
279 +* `^0.x` := `>=0.0.0 <1.0.0`
280 +
281 +### Range Grammar
282 +
283 +Putting all this together, here is a Backus-Naur grammar for ranges,
284 +for the benefit of parser authors:
285 +
286 +```bnf
287 +range-set ::= range ( logical-or range ) *
288 +logical-or ::= ( ' ' ) * '||' ( ' ' ) *
289 +range ::= hyphen | simple ( ' ' simple ) * | ''
290 +hyphen ::= partial ' - ' partial
291 +simple ::= primitive | partial | tilde | caret
292 +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
293 +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
294 +xr ::= 'x' | 'X' | '*' | nr
295 +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
296 +tilde ::= '~' partial
297 +caret ::= '^' partial
298 +qualifier ::= ( '-' pre )? ( '+' build )?
299 +pre ::= parts
300 +build ::= parts
301 +parts ::= part ( '.' part ) *
302 +part ::= nr | [-0-9A-Za-z]+
303 +```
304 +
305 +## Functions
306 +
307 +All methods and classes take a final `options` object argument. All
308 +options in this object are `false` by default. The options supported
309 +are:
310 +
311 +- `loose` Be more forgiving about not-quite-valid semver strings.
312 + (Any resulting output will always be 100% strict compliant, of
313 + course.) For backwards compatibility reasons, if the `options`
314 + argument is a boolean value instead of an object, it is interpreted
315 + to be the `loose` param.
316 +- `includePrerelease` Set to suppress the [default
317 + behavior](https://github.com/npm/node-semver#prerelease-tags) of
318 + excluding prerelease tagged versions from ranges unless they are
319 + explicitly opted into.
320 +
321 +Strict-mode Comparators and Ranges will be strict about the SemVer
322 +strings that they parse.
323 +
324 +* `valid(v)`: Return the parsed version, or null if it's not valid.
325 +* `inc(v, release)`: Return the version incremented by the release
326 + type (`major`, `premajor`, `minor`, `preminor`, `patch`,
327 + `prepatch`, or `prerelease`), or null if it's not valid
328 + * `premajor` in one call will bump the version up to the next major
329 + version and down to a prerelease of that major version.
330 + `preminor`, and `prepatch` work the same way.
331 + * If called from a non-prerelease version, the `prerelease` will work the
332 + same as `prepatch`. It increments the patch version, then makes a
333 + prerelease. If the input version is already a prerelease it simply
334 + increments it.
335 +* `prerelease(v)`: Returns an array of prerelease components, or null
336 + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
337 +* `major(v)`: Return the major version number.
338 +* `minor(v)`: Return the minor version number.
339 +* `patch(v)`: Return the patch version number.
340 +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
341 + or comparators intersect.
342 +* `parse(v)`: Attempt to parse a string as a semantic version, returning either
343 + a `SemVer` object or `null`.
344 +
345 +### Comparison
346 +
347 +* `gt(v1, v2)`: `v1 > v2`
348 +* `gte(v1, v2)`: `v1 >= v2`
349 +* `lt(v1, v2)`: `v1 < v2`
350 +* `lte(v1, v2)`: `v1 <= v2`
351 +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
352 + even if they're not the exact same string. You already know how to
353 + compare strings.
354 +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
355 +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
356 + the corresponding function above. `"==="` and `"!=="` do simple
357 + string comparison, but are included for completeness. Throws if an
358 + invalid comparison string is provided.
359 +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
360 + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
361 +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
362 + in descending order when passed to `Array.sort()`.
363 +* `diff(v1, v2)`: Returns difference between two versions by the release type
364 + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
365 + or null if the versions are the same.
366 +
367 +### Comparators
368 +
369 +* `intersects(comparator)`: Return true if the comparators intersect
370 +
371 +### Ranges
372 +
373 +* `validRange(range)`: Return the valid range or null if it's not valid
374 +* `satisfies(version, range)`: Return true if the version satisfies the
375 + range.
376 +* `maxSatisfying(versions, range)`: Return the highest version in the list
377 + that satisfies the range, or `null` if none of them do.
378 +* `minSatisfying(versions, range)`: Return the lowest version in the list
379 + that satisfies the range, or `null` if none of them do.
380 +* `minVersion(range)`: Return the lowest version that can possibly match
381 + the given range.
382 +* `gtr(version, range)`: Return `true` if version is greater than all the
383 + versions possible in the range.
384 +* `ltr(version, range)`: Return `true` if version is less than all the
385 + versions possible in the range.
386 +* `outside(version, range, hilo)`: Return true if the version is outside
387 + the bounds of the range in either the high or low direction. The
388 + `hilo` argument must be either the string `'>'` or `'<'`. (This is
389 + the function called by `gtr` and `ltr`.)
390 +* `intersects(range)`: Return true if any of the ranges comparators intersect
391 +
392 +Note that, since ranges may be non-contiguous, a version might not be
393 +greater than a range, less than a range, *or* satisfy a range! For
394 +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
395 +until `2.0.0`, so the version `1.2.10` would not be greater than the
396 +range (because `2.0.1` satisfies, which is higher), nor less than the
397 +range (since `1.2.8` satisfies, which is lower), and it also does not
398 +satisfy the range.
399 +
400 +If you want to know if a version satisfies or does not satisfy a
401 +range, use the `satisfies(version, range)` function.
402 +
403 +### Coercion
404 +
405 +* `coerce(version)`: Coerces a string to semver if possible
406 +
407 +This aims to provide a very forgiving translation of a non-semver string to
408 +semver. It looks for the first digit in a string, and consumes all
409 +remaining characters which satisfy at least a partial semver (e.g., `1`,
410 +`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
411 +versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
412 +surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
413 +`3.4.0`). Only text which lacks digits will fail coercion (`version one`
414 +is not valid). The maximum length for any semver component considered for
415 +coercion is 16 characters; longer components will be ignored
416 +(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
417 +semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
418 +components are invalid (`9999999999999999.4.7.4` is likely invalid).
content/cli/v7/using-npm/workspaces.md new
+149
@@ -0,0 +1,149 @@
1 +---
2 +title: workspaces
3 +section: 7
4 +description: Working with workspaces
5 +redirect_from:
6 + - /using-npm/workspaces
7 + - /using-npm/workspaces.html
8 + - /misc/workspaces
9 + - /misc/workspaces.html
10 +github_repo: npm/cli
11 +github_branch: latest
12 +github_path: docs/content/using-npm/workspaces.md
13 +---
14 +
15 +### Description
16 +
17 +**Workspaces** is a generic term that refers to the set of features in the
18 +npm cli that provides support to managing multiple packages from your local
19 +files system from within a singular top-level, root package.
20 +
21 +This set of features makes up for a much more streamlined workflow handling
22 +linked packages from the local file system. Automating the linking process
23 +as part of `npm install` and avoiding manually having to use `npm link` in
24 +order to add references to packages that should be symlinked into the current
25 +`node_modules` folder.
26 +
27 +We also refer to these packages being auto-symlinked during `npm install` as a
28 +single **workspace**, meaning it's a nested package within the current local
29 +file system that is explicitly defined in the [`package.json`](/cli/v7/configuring-npm/package-json#workspaces)
30 +`workspaces` configuration.
31 +
32 +### Installing workspaces
33 +
34 +Workspaces are usually defined via the `workspaces` property of the
35 +[`package.json`](/cli/v7/configuring-npm/package-json#workspaces) file, e.g:
36 +
37 +```json
38 +{
39 + "name": "my-workspaces-powered-project",
40 + "workspaces": [
41 + "workspace-a"
42 + ]
43 +}
44 +```
45 +
46 +Given the above `package.json` example living at a current working
47 +directory `.` that contains a folder named `workspace-a` that disposes
48 +of a `package.json` inside it, defining a nodejs package, e.g:
49 +
50 +```
51 +.
52 ++-- package.json
53 +`-- workspace-a
54 + `-- package.json
55 +```
56 +
57 +The expected result once running `npm install` in this current working
58 +directory `.` is that the folder `workspace-a` will get symlinked to the
59 +`node_modules` folder of the current working dir.
60 +
61 +Below is a post `npm install` example, given that same previous example
62 +structure of files and folders:
63 +
64 +```
65 +.
66 ++-- node_modules
67 +| `-- workspace-a -> ../workspace-a
68 ++-- package-lock.json
69 ++-- package.json
70 +`-- workspace-a
71 + `-- package.json
72 +```
73 +
74 +### Using workspaces
75 +
76 +Given the [specifities of how Node.js handles module resolution](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html#modules_all_together) it's possible to consume any defined workspace
77 +by it's declared `package.json` `name`. Continuing from the example defined
78 +above, let's also create a Node.js script that will require the `workspace-a`
79 +example module, e.g:
80 +
81 +```
82 +// ./workspace-a/index.js
83 +module.exports = 'a'
84 +
85 +// ./lib/index.js
86 +const moduleA = require('workspace-a')
87 +console.log(moduleA) // -> a
88 +```
89 +
90 +When running it with:
91 +
92 +`node lib/index.js`
93 +
94 +This demonstrates how the nature of `node_modules` resolution allows for
95 +**workspaces** to enable a portable workflow for requiring each **workspace**
96 +in such a way that is also easy to [publish](/cli/v7/commands/npm-publish) these
97 +nested workspaces to be consumed elsewhere.
98 +
99 +### Running commands in the context of workspaces
100 +
101 +You can use the `workspace` configuration option to run commands in the context
102 +of a configured workspace.
103 +
104 +Following is a quick example on how to use the `npm run` command in the context
105 +of nested workspaces. For a project containing multiple workspaces, e.g:
106 +
107 +```
108 +.
109 ++-- package.json
110 +`-- packages
111 + +-- a
112 + | `-- package.json
113 + `-- b
114 + `-- package.json
115 +```
116 +
117 +By running a command using the `workspace` option, it's possible to run the
118 +given command in the context of that specific workspace. e.g:
119 +
120 +```
121 +npm run test --workspace=a
122 +```
123 +
124 +This will run the `test` script defined within the
125 +`./packages/a/package.json` file.
126 +
127 +Please note that you can also specify this argument multiple times in the
128 +command-line in order to target multiple workspaces, e.g:
129 +
130 +```
131 +npm run test --workspace=a --workspace=b
132 +```
133 +
134 +It's also possible to use the `workspaces` (plural) configuration option to
135 +enable the same behavior but running that command in the context of **all**
136 +configured workspaces. e.g:
137 +
138 +```
139 +npm run test --workspaces
140 +```
141 +
142 +Will run the `test` script in both `./packages/a` and `./packages/b`.
143 +
144 +### See also
145 +
146 +* [npm install](/cli/v7/commands/npm-install)
147 +* [npm publish](/cli/v7/commands/npm-publish)
148 +* [npm run-script](/cli/v7/commands/npm-run-script)
149 +
content/enterprise/billing-and-seat-management/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Billing and seat management
3 +---
4 +
5 +<Index />
content/enterprise/billing-and-seat-management/purchasing-or-removing-seats.mdx new
+10
@@ -0,0 +1,10 @@
1 +---
2 +title: Purchasing or removing seats
3 +---
4 +
5 +As an npm Enterprise billing manager, you can purchase additional seats for your instance, or remove seats you no longer need. If you remove seats, the credit card on file will not be charged for them starting with the next billing cycle.
6 +
7 +To purchase or remove seats for your instance, contact your npm account manager or our [Sales team][sales-contact-form].
8 +
9 +
10 +[sales-contact-form]: https://www.npmjs.com/npm/contact-sales
content/enterprise/billing-and-seat-management/updating-billing-information.mdx new
+8
@@ -0,0 +1,8 @@
1 +---
2 +title: Updating billing information
3 +---
4 +
5 +As an npm Enterprise billing manager, you can update the payment method for your Enterprise instance by contacting your npm account manager or our [Sales team][sales-contact-form].
6 +
7 +
8 +[sales-contact-form]: https://www.npmjs.com/npm/contact-sales
content/enterprise/index.mdx new
+11
@@ -0,0 +1,11 @@
1 +---
2 +title: npm Enterprise
3 +---
4 +
5 +<Note>
6 +
7 +**Note:** npm Enterprise will be retired on June 30, 2021. For more information, please visit our [FAQ about npm Enterprise plans](/sunsetting-npm-enterprise).
8 +
9 +</Note>
10 +
11 +<Index />
content/enterprise/migration/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Migration
3 +---
4 +
5 +<Index />
content/enterprise/migration/migrating-from-an-existing-enterprise-instance.mdx new
+11
@@ -0,0 +1,11 @@
1 +---
2 +title: Migrating from an existing npm Enterprise instance
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<>{shared['enterprise-migration-requirements'].text}</>
7 +
8 +To migrate from a legacy npm Enterprise installation, use npm's [pneumatic-tubes][pneumatic-tubes] and follow the steps under "[Importing from Legacy npm Enterprise][pneumatic-tubes-legacy]".
9 +
10 +[pneumatic-tubes]: https://www.npmjs.com/package/pneumatic-tubes
11 +[pneumatic-tubes-legacy]: https://www.npmjs.com/package/pneumatic-tubes#importing-from-legacy-npm-enterprise
content/enterprise/migration/migrating-from-an-organization-on-the-public-registry.mdx new
+15
@@ -0,0 +1,15 @@
1 +---
2 +title: Migrating from an organization on the public registry
3 +redirect_from:
4 + - /migrating-from-an-org-on-the-public-registry
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +<>{shared['enterprise-migration-requirements'].text}</>
9 +
10 +To migrate from an organization on the [public registry][pub-reg], use npm's [pneumatic-tubes][pneumatic-tubes] and follow the steps under "[Importing from npm orgs][pneumatic-tubes-orgs]".
11 +
12 +
13 +[pneumatic-tubes]: https://www.npmjs.com/package/pneumatic-tubes
14 +[pneumatic-tubes-orgs]: https://www.npmjs.com/package/pneumatic-tubes#importing-from-npm-orgs
15 +[pub-reg]: https://docs.npmjs.com/misc/registry.html
content/enterprise/setup-and-configuration/configuring-an-authentication-provider.mdx new
+52
@@ -0,0 +1,52 @@
1 +---
2 +title: Configuring an authentication provider
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<Note>
7 +<><strong>Note:</strong> To avoid being locked out of your instance, you must connect your npm Enterprise admin account to your SSO account immediately after configuring an authentication provider. If you are locked out of your instance, {shared['contact-enterprise-support'].text}.</>
8 +</Note>
9 +
10 +As an Enterprise admin, you can configure your instance to use single sign-on (SSO) authentication through any external authentication provider that implements [OpenID Connect Core][oid-connect-core] and [OpenID Connect Discovery][oid-connect-discovery], such as [Auth0][auth0], [Azure Active Directory][azure], [Okta][okta], and [Google][google].
11 +
12 +1. Log in to your Enterprise instance using your temporary username and password.
13 +
14 +2. <>{shared['enterprise-admin-panel'].text}</>
15 +
16 + <>{shared['enterprise-admin-panel'].image}</>
17 +
18 +3. Click "settings".
19 +
20 + <>{shared['enterprise-admin-panel-settings'].image}</>
21 +
22 +4. On the Settings page, click "Configure Single Sign-On".
23 +
24 + <Screenshot src="/enterprise/setup-and-configuration/sso-configure.png" alt="Screenshot of the single sign-on configuration form" />
25 +
26 +5. On the Single Sign-On configuration page, enter your SSO application settings:
27 +
28 + * Domain: enter the base domain, without the `https://` prefix
29 + * Client ID
30 + * Client Secret
31 +
32 + <Screenshot src="/enterprise/setup-and-configuration/sso-settings-form.png" alt="Screenshot of the single sign-on settings form" />
33 +
34 +6. Click **Save**.
35 +
36 + <Screenshot src="/enterprise/setup-and-configuration/sso-save.png" alt="Screenshot of the single sign-on settings save button" />
37 +
38 +7. On your SSO provider application website, enter your npm Enterprise instance callback URL: `www.<company-name>.npme.io/sso/callback`.
39 +
40 +8. To connect your npm Enterprise admin account to your SSO account, visit `https://<company-name>.npme.io/login/via/1`.
41 +
42 +## Removing users from your authentication provider
43 +
44 +When you remove a user from your authentication provider, we also recommend [deactivating][deactivate-users] them in your instance.
45 +
46 +[OID-connect-core]: http://openid.net/specs/openid-connect-core-1_0.html
47 +[OID-connect-discovery]: http://openid.net/specs/openid-connect-discovery-1_0.html
48 +[auth0]: https://auth0.com/docs
49 +[azure]: https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-single-sign-on-portal
50 +[okta]: https://developer.okta.com/documentation/
51 +[google]: https://developers.google.com/identity/protocols/OpenIDConnect
52 +[deactivate-users]: viewing-deactivating-and-reactivating-users#deactivating-users
content/enterprise/setup-and-configuration/defining-security-policy.mdx new
+53
@@ -0,0 +1,53 @@
1 +---
2 +title: Defining a security policy
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +As an Enterprise admin, you can prevent the download of insecure packages. For example, this is useful for keeping vulnerable dependencies out of your applications. At the moment, you can choose from three different security policies:
7 +
8 +* Allow all packages.
9 +* Block packages with critical vulnerabilities.
10 +* Block all vulnerable packages.
11 +
12 +<Note>
13 +
14 +**Note:** Packages are only blocked if they are not locally cached. Whenever you change policy, we recommend clearing your global cache (`npm cache clear --force`) and doing a clean install of your project (`npm clean-install`).
15 +
16 +</Note>
17 +
18 +All packages are allowed by default. To change your security policy:
19 +
20 +1. Log in to your Enterprise instance using your temporary username and password.
21 +
22 +2. <>{shared['enterprise-admin-panel'].text}</>
23 +
24 + <>{shared['enterprise-admin-panel'].image}</>
25 +
26 +3. Click "settings".
27 +
28 + <>{shared['enterprise-admin-panel-settings'].image}</>
29 +
30 +4. On the Settings page, under Security Policy, choose a policy.
31 +
32 + <>{shared['enterprise-choose-security-policy'].image}</>
33 +
34 +5. Optionally provide a custom message for the install logs whenever a package is blocked.
35 +
36 + <>{shared['enterprise-custom-blocking-message'].image}</>
37 +
38 +6. If present, check the "I acknowledge that this policy may cause my builds to break" box.
39 +
40 + <Screenshot src="/enterprise/setup-and-configuration/acknowledge-blocking.png" alt="Screenshot showing an acknowledgement of broken builds" />
41 +
42 +7. Click "Apply Policy".
43 +
44 +If `npm install` attempts to download a package that violates the policy, developers will see an error similar to the following.
45 +
46 +```
47 +$ npm i lodash@1.0.0
48 +npm notice Could not download lodash 1.0.0 due to policy violations. Use `npm audit fix` to upgrade this dependency.
49 +npm ERR! code E403
50 +npm ERR! 403 Forbidden - GET https://registry.npmjs.com/lodash/-/lodash-1.0.0.tgz
51 +```
52 +
53 +To fix this error, use `npm audit fix` to upgrade dependencies to versions that don't violate policy.
content/enterprise/setup-and-configuration/getting-started-with-npm-enterprise.mdx new
+25
@@ -0,0 +1,25 @@
1 +---
2 +title: Getting started with npm Enterprise
3 +---
4 +
5 +As an npm Enterprise admin, once you have created a temporary username and password from the signup link for your new instance, you should:
6 +
7 +1. Log in to your npm Enterprise instance.
8 +2. [Configure SSO authentication][auth-config]
9 +3. Link your account to your SSO provider.
10 +4. [Create one or more organizations][create-orgs].
11 +5. Tell users to log in to the instance with their SSO credentials.
12 +6. [Add users to organizations and teams][add-org-users].
13 +7. Have users follow the steps in the "[Getting started][getting-started]" and "[Packages and modules][pkg-module]" documentation to [download Node.js and npm][download-npm], [configure their npm client][config-client], and [publish][publish-pkg] and [install][install-pkg] packages.
14 +
15 +
16 +[getting-started]: /getting-started
17 +[pkg-module]: /packages-and-modules
18 +[download-npm]: /downloading-and-installing-node-js-and-npm
19 +[config-client]: /configuring-your-registry-settings-as-an-npm-enterprise-user
20 +[publish-pkg]: /packages-and-modules/contributing-packages-to-the-registry
21 +[install-pkg]: /packages-and-modules/getting-packages-from-the-registry
22 +[admin-user]: /about-the-enterprise-admin-user
23 +[auth-config]: /configuring-an-authentication-provider
24 +[create-orgs]: /creating-an-org
25 +[add-org-users]: /adding-members-to-your-org
content/enterprise/setup-and-configuration/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Setup and configuration
3 +---
4 +
5 +<Index />
content/enterprise/sunset/index.mdx new
+6
@@ -0,0 +1,6 @@
1 +---
2 +title: Sunset
3 +redirect_from: [ /enterprise/end-of-life ]
4 +---
5 +
6 +<Index />
content/enterprise/sunset/sunsetting-npm-enterprise.mdx new
+18
@@ -0,0 +1,18 @@
1 +---
2 +title: Sunsetting npm Enterprise
3 +---
4 +
5 +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.
6 +
7 +## Evaluating and migrating to GitHub Packages
8 +
9 +* **How do I trial or migrate to GitHub Packages?**
10 + 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.
11 +
12 +* **My source code is not on GitHub. How can I trial GitHub Packages?**
13 + The combined npm and GitHub team has reached out to customers to work on detailed transition plans, including free trials for GitHub Enterprise Cloud. However, if you still need assistance, please [contact the GitHub team](https://enterprise.github.com/contact).
14 +
15 +* **Where do I turn for customer support during this time?**
16 + Please visit [npm support](https://www.npmjs.com/support) for assistance with your npm Enterprise plan.
17 +
18 +For further assistance or to answer any questions not covered here (including those regarding billing and payments specific to your account), please reach out your GitHub and npm contacts, or contact [the GitHub sales team](https://enterprise.github.com/contact).
content/enterprise/user-management/about-the-enterprise-admin-user.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: About the Enterprise admin user
3 +---
4 +
5 +The Enterprise admin user has the most far-reaching permissions on the Enterprise instance and can manage instance settings, organizations, users, and packages. For a full list of Enterprise admin permissions, see "[npm Enterprise roles and permissions][ent-roles]".
6 +
7 +[ent-roles]: npm-enterprise-roles-and-permissions
content/enterprise/user-management/creating-and-managing-organizations-and-teams.mdx new
+19
@@ -0,0 +1,19 @@
1 +---
2 +title: Creating and managing organizations and teams
3 +redirect_from:
4 + - /creating-and-managing-orgs-and-teams
5 +---
6 +
7 +To create and manage organizations and teams, see our [organizations documentation][orgs]:
8 +
9 +* [Creating and managing organizations][create-org]
10 +* [Managing organization members][members]
11 +* [Managing teams][teams]
12 +* [Managing organization packages][pkgs]
13 +
14 +
15 +[orgs]: organizations
16 +[create-org]: organizations/creating-and-managing-organizations
17 +[members]: organizations/managing-organization-members
18 +[teams]: organizations/managing-teams
19 +[pkgs]: organizations/managing-organization-packages
content/enterprise/user-management/demoting-an-admin-to-a-non-admin-user.mdx new
+15
@@ -0,0 +1,15 @@
1 +---
2 +title: Demoting an admin to a non-admin user
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<Note>
7 +
8 +**Note:** Demoting an admin does not deactivate them. To deactivate a user, follow the steps in "[Viewing, deactivating, and reactivating users](viewing-deactivating-and-reactivating-users#deactivating-users)
9 +
10 +</Note>
11 +
12 +If an admin on your npm Enterprise instance no longer needs to take admin actions on the instance (e.g. configuring SSO, activating and deactivating users, or inviting users to the instance), as an Enterprise instance admin, you can demote the admin to a non-admin user.
13 +
14 +1. If you haven't already, add the user to your instance, either by having them sign in with your SSO provider, or by inviting them to create a username and password on the instance.
15 +2. <>Have an Enterprise admin {shared['contact-enterprise-support'].text} with the name of the admin to be demoted to a non-admin user.</>
content/enterprise/user-management/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: User management
3 +---
4 +
5 +How to manage users on your npm Enterprise instance.
6 +
7 +<Index />
content/enterprise/user-management/managing-user-security.mdx new
+18
@@ -0,0 +1,18 @@
1 +---
2 +title: Managing user security
3 +---
4 +
5 +To keep your npm Enterprise instance secure, as an Enterprise instance admin, you should:
6 +
7 +* Limit the number of additional Enterprise admins on your instance.
8 +* [Deactivate users][deactivate-users] who no longer need access to your npm Enterprise instance (such as users who have left the company) as quickly as possible.
9 +
10 +Users of your npm Enterprise instance should:
11 +
12 +* [Enable 2FA][2FA] on their Enterprise instance accounts.
13 +* Use [read-only tokens][read-only-tokens] to delegate access to private packages to other tools in their workflow.
14 +
15 +
16 +[deactivate-users]: viewing-deactivating-and-reactivating-users
17 +[2FA]: configuring-two-factor-authentication
18 +[read-only-tokens]: about-authentication-tokens
content/enterprise/user-management/npm-enterprise-roles-and-permissions.mdx new
+22
@@ -0,0 +1,22 @@
1 +---
2 +title: npm Enterprise roles and permissions
3 +---
4 +
5 +| Action | Billing manager | Admin user | End user |
6 +|:-------|:---------------:|:----------:|:--------:|
7 +| Update payment method and billing info (via npm account manager) | X | | |
8 +| Purchase additional seats (via npm account manager) | X | | |
9 +| View all users of the instance | | X | |
10 +| Activate users on the instance | | X | |
11 +| Deactivate users on the instance | | X | |
12 +| Configure an authentication provider | | X | |
13 +| View, publish, and install packages from the instance registry | | X | X |
14 +| Create organizations | | X | X |
15 +| Add/remove users to/from organizations and instance | | X<sup>1</sup> | |
16 +| Add/remove users to/from organizations who are already initialized on the instance | | X<sup>1</sup> | X<sup>1</sup> |
17 +| Create, delete, and manage teams | | X<sup>2</sup> | X<sup>2</sup> |
18 +| Add/remove packages to/from organization teams | | X<sup>2</sup> | X<sup>2</sup> |
19 +| Create and publish packages in the organization scope | | X | X |
20 +
21 +<sup>1</sup> User must be an organization owner.<br/>
22 +<sup>2</sup> User must be an organization owner or team admin.<br/>
content/enterprise/user-management/permanently-deleting-a-user.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Permanently deleting a user
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<>As an npm Enterprise admin, you can {shared['contact-enterprise-support'].text} to completely remove a user from your Enterprise instance if they will never need to access the instance again.</>
7 +
8 +<Note>
9 +
10 +**Note:** When permanently deleting a user, you will work with npm support to make sure any organizations and packages they own are transferred to other users on your Enterprise instance.
11 +
12 +</Note>
content/enterprise/user-management/promoting-a-non-admin-user-to-admin.mdx new
+15
@@ -0,0 +1,15 @@
1 +---
2 +title: Promoting a non-admin user to admin
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<Note>
7 +
8 +**Note:** To keep your Enterprise instance secure, we recommend limiting the number of Enterprise admins on your instance.
9 +
10 +</Note>
11 +
12 +If you need multiple users in your Enterprise instance to be able to take admin actions (e.g. configure SSO, activate and deactivate users, or invite users to the instance), you can promote a non-admin user to admin.
13 +
14 +1. If you haven't already, add the user to your instance, either by having them sign in with your SSO provider, or by inviting them to create a username and password on the instance.
15 +2. <>Have an Enterprise admin {shared['contact-enterprise-support'].text} with the name of the user to be promoted to admin.</>
content/enterprise/user-management/viewing-deactivating-and-reactivating-users.mdx new
+56
@@ -0,0 +1,56 @@
1 +---
2 +title: Viewing, deactivating, and reactivating users
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +As an Enterprise admin, you can view active and inactive users, deactivate users who no longer need access to your npm Enterprise instance (such as users who have left your company), and reactivate inactive users.
7 +
8 +## Viewing users
9 +
10 +As an npm Enterprise admin, you can see a list of all the current users of your instance, including non-admin end users and other instance admins.
11 +
12 +1. <>{shared['enterprise-instance-login'].text}</>
13 +
14 +2. <>{shared['enterprise-admin-panel'].text}</>
15 +
16 + <>{shared['enterprise-admin-panel'].image}</>
17 +
18 +3. To view a complete list of users, click the "Manage users" tab.
19 +
20 + <Screenshot src="/enterprise/user-management/manage-users.png" alt="Screenshot of the manage users button" />
21 +
22 +## Deactivating users
23 +
24 +As an npm Enterprise admin, you can deactivate users who no longer need access to your npm Enterprise instance -- for example, users who have left the company or whose responsibilities have changed.
25 +
26 +Deactivating a user will invalidate their login tokens, but will not delete organizations or packages they owned. A deactivated user will remain visible in the "Manage users" panel and can be reactivated by an admin user.
27 +
28 +1. <>{shared['enterprise-instance-login'].text}</>
29 +
30 +2. <>{shared['enterprise-admin-panel'].text}</>
31 +
32 + <>{shared['enterprise-admin-panel'].image}</>
33 +
34 +3. Locate the user name of the user you want to deactivate, then next to their name, click "deactivate".
35 +
36 + <Screenshot src="/enterprise/user-management/deactivate-user.png" alt="Screenshot of the deactivate user button" />
37 +
38 +## Reactivating inactive users
39 +
40 +<Note>
41 +
42 +**Note:** When you reactivate a user, they will need to re-enable [two-factor authentication](https://docs.npmjs.com/configuring-two-factor-authentication) on their npm Enterprise instance account.
43 +
44 +</Note>
45 +
46 +As an npm Enterprise admin, you can reactivate an inactive user of your instance to allow them to log in again.
47 +
48 +1. <>{shared['enterprise-instance-login'].text}</>
49 +
50 +2. <>{shared['enterprise-admin-panel'].text}</>
51 +
52 + <>{shared['enterprise-admin-panel'].image}</>
53 +
54 +3. Locate the user name of the user you want to reactivate, then next to their name, click "activate".
55 +
56 + <Screenshot src="/enterprise/user-management/activate-user.png" alt="Screenshot of the activate user button" />
content/getting-started/configuring-your-local-environment/about-npm-versions.mdx new
+43
@@ -0,0 +1,43 @@
1 +---
2 +title: About npm CLI versions
3 +slug: /about-npm-versions
4 +---
5 +
6 +The npm command line interface (CLI) is released on a regular cadence. We recommend installing the release that supports your workflow:
7 +
8 +- [latest release](#the-latest-release-of-npm): the most recent stable version.
9 +- [next release](#the-next-release-of-npm): the version in current development.
10 +
11 +## The `latest` release of npm
12 +
13 +The `latest` release of npm is the most recent stable version. When you install Node.js, npm is automatically installed. However, npm is released more frequently than Node.js, so to install the latest stable version of npm, on the command line, run:
14 +
15 +```
16 +npm install npm@latest -g
17 +```
18 +
19 +## The `next` release of npm
20 +
21 +<Note>
22 +
23 +The `next` release of npm may contain features that do not match the features ultimately released in the `latest` stable version of npm.
24 +
25 +More.
26 +
27 +</Note>
28 +
29 +The `next` release of npm is the version undergoing current development; it has the latest changes and newest set of features.
30 +
31 +The `next` release of npm is the most recent unreleased version of npm that is eventually released as the `latest` version. You may want to update your npm client to the `next` release to test your packages against it before `latest` is released.
32 +
33 +To update to the `next` release of npm, on the command line, run:
34 +
35 +```
36 +npm install npm@next -g
37 +```
38 +
39 +<Note>
40 +
41 +Depending on the development cycle, `npm install npm@next -g` may reinstall the `latest` release of npm.
42 +
43 +</Note>
content/getting-started/configuring-your-local-environment/configuring-your-registry-settings-as-an-npm-enterprise-user.mdx new
+88
@@ -0,0 +1,88 @@
1 +---
2 +title: Configuring your registry settings as an npm Enterprise user
3 +---
4 +
5 +<div class="note">
6 +
7 +<span class="bold">Note:</span> npm Enterprise requires npm 4.4.x or greater. To download the latest version of npm, on the command line, run <code class="highlighter-rouge">
8 +[sudo] npm install npm -g</code>
9 +
10 +</div>
11 +
12 +You can configure your npm client to publish to and install from your private npm Enterprise registry by:
13 +
14 +* Setting your company's npm Enterprise registry as your default registry (recommended)
15 +* Using npmrc to managing multiple profiles for different registries
16 +* Configuring scopes to point to different registries
17 +
18 +## Setting your company's npm Enterprise registry as your default registry
19 +
20 +The easiest way to publish to and install from your company's npm Enterprise registry is to set it as your default registry.
21 +
22 +On the command line, run the following command, replacing "your-registry" with the name of your company's npm Enterprise registry:
23 +
24 +```
25 +npm config set registry https://registry.your-registry.npme.io/
26 +```
27 +
28 +## Using npmrc to managing multiple profiles for different registries
29 +
30 +If you need to publish and install packages to and from different registries -- for example, an npm Enterprise registry for work-related code, and the npmjs.com public registry for open source projects -- you can create and manage a separate npm user profile for each registry using the [npmrc](https://www.npmjs.com/package/npmrc) tool.
31 +
32 +### Overview
33 +
34 +- [Install npmrc](#install-npmrc)
35 +- [Create an npm Enterprise profile](#create-an-npm-enterprise-profile)
36 +- [Create a profile for the public npm registry](#create-a-profile-for-the-public-npm-registry)
37 +- [Switch profiles with npmrc](#switch-profiles-with-npmrc)
38 +
39 +### Install npmrc
40 +
41 +To install npmrc, on the command line, run
42 +
43 +```
44 +npm i npmrc -g
45 +```
46 +
47 +### Create an npm Enterprise profile
48 +
49 +After installing npmrc, you can create a profile to access your company's Enterprise registry.
50 +
51 +1. To create an npm Enterprise profile, on the command line, run `npmrc -c name-of-profile`. For example, to create a profile called "work", run the following command:
52 + ```
53 + npmrc -c work
54 + ```
55 +2. To set an npm Enterprise registry for the profile, run the following command, replacing your-company-registry with the name of your company's npm Enterprise registry:
56 + ```
57 + npm config set registry https://registry.your-company-registry.npme.io/
58 + ```
59 +
60 +### Create a profile for the public npm registry
61 +
62 +After you have created your npm Enterprise profile, you can create a second profile for a different registry, such as the [public npm registry](https://registry.npmjs.com).
63 +
64 +1. To create a profile for the public registry, on the command line, run `npmrc -c name-of-profile`. For example, to create a profile called "open-source", run `npmrc -c open-source`.
65 +2. To set the public registry for your open source profile, run the following command:
66 + ```
67 + npm config set registry https://registry.npmjs.org/
68 + ```
69 +
70 +### Switch profiles with npmrc
71 +
72 +To switch profiles, on the command line, run the following command,
73 +replacing `profile-name` with the name of your profile:
74 +
75 +```
76 + npmrc profile-name
77 +```
78 +
79 +## Configuring scopes to point to different registries
80 +
81 +You can also map different scopes to different npm registries. For example, to use the scope `@company-scope` from your npm Enterprise registry, while continuing to install public packages from the public npm registry, run the following command, replacing `@company-scope` with the scope, and `company-registry` with the name of your company's npm Enterprise registry:
82 +
83 +```
84 + npm login --scope=@company-scope --registry=https://registry.company-registry.npme.io/
85 +```
86 +
87 +
88 +[download-install]: downloading-and-installing-node-js-and-npm
content/getting-started/configuring-your-local-environment/downloading-and-installing-node-js-and-npm.mdx new
+75
@@ -0,0 +1,75 @@
1 +---
2 +title: Downloading and installing Node.js and npm
3 +redirect_from: [ /getting-started/installing-node ]
4 +---
5 +
6 +To publish and install packages to and from the public npm registry or your company's npm Enterprise registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. **We strongly recommend using a Node version manager like [nvm](https://github.com/nvm-sh/nvm) to install Node.js and npm.** We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.
7 +
8 +<Note>
9 +
10 +**Note:** npm Enterprise requires npm 4.4.x or greater. To download the latest version of npm, on the command line, run the following command:
11 +
12 +```
13 +npm install -g npm
14 +```
15 +
16 +</Note>
17 +
18 +## Overview
19 +
20 +- [Checking your version of npm and Node.js](#checking-your-version-of-npm-and-node-js)
21 +- [Using a Node version manager to install Node.js and npm](#using-a-node-version-manager-to-install-node-js-and-npm)
22 +- [Using a Node installer to install Node.js and npm](#using-a-node-installer-to-install-node-js-and-npm)
23 +
24 +## Checking your version of npm and Node.js
25 +
26 +To see if you already have Node.js and npm installed and check the installed version, run the following commands:
27 +
28 +```
29 +node -v
30 +npm -v
31 +```
32 +
33 +## Using a Node version manager to install Node.js and npm
34 +
35 +Node version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions.
36 +
37 +### OSX or Linux Node version managers
38 +
39 +* [nvm](https://github.com/creationix/nvm)
40 +* [n](https://github.com/tj/n)
41 +
42 +### Windows Node version managers
43 +
44 +* [nodist](https://github.com/marcelklehr/nodist)
45 +* [nvm-windows](https://github.com/coreybutler/nvm-windows)
46 +
47 +## Using a Node installer to install Node.js and npm
48 +
49 +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.
50 +
51 +* [Node.js installer](https://nodejs.org/en/download/)
52 +* [NodeSource installer](https://github.com/nodesource/distributions)
53 +
54 +If you use Linux, we recommend that you use a NodeSource installer.
55 +
56 +### OS X or Windows Node installers
57 +
58 +If you're using OS X or Windows, use one of the installers from the [Node.js download page](https://nodejs.org/en/download/). Be sure to install the version labeled **LTS**. Other versions have not yet been tested with npm.
59 +
60 +### Linux or other operating systems Node installers
61 +
62 +If you're using Linux or another operating system, use one of the following installers:
63 +
64 +- [NodeSource installer](https://github.com/nodesource/distributions) (recommended)
65 +- One of the installers on the [Node.js download page](https://nodejs.org/en/download/)
66 +
67 +Or see [this page](https://nodejs.org/en/download/package-manager/) to install npm for Linux in the way many Linux developers prefer.
68 +
69 +
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 +
74 +
75 +[pkg-mgr]: https://nodejs.org/en/download/package-manager/
content/getting-started/configuring-your-local-environment/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Configuring your local environment
3 +---
4 +
5 +<Index />
content/getting-started/configuring-your-local-environment/logging-in-to-an-npm-enterprise-registry-from-the-command-line.mdx new
+41
@@ -0,0 +1,41 @@
1 +---
2 +title: Logging in to an npm Enterprise registry from the command line
3 +---
4 +
5 +The steps for logging in to your company's npm Enterprise registry will depend how you [configured your npm registry settings][ent-reg-config].
6 +
7 +- [Logging in with your default registry set to your company's npm Enterprise registry](#logging-in-with-your-default-registry-set-to-your-company-s-npm-enterprise-registry)
8 +- [Logging in with npmrc](#logging-in-with-npmrc)
9 +- [Logging in with a scope configured to point to an npm Enterprise registry](#logging-in-with-a-scope-configured-to-point-to-an-npm-enterprise-registry)
10 +
11 +## Logging in with your default registry set to your company's npm Enterprise registry
12 +
13 +1. On the command line, type the following command:
14 + ```
15 + npm login
16 + ```
17 +2. When prompted, provide your SSO credentials.
18 +
19 +## Logging in with npmrc
20 +
21 +1. On the command line, switch to your npm Enterprise profile:
22 + ```
23 + npmrc work
24 + ```
25 +2. Run the following command:
26 + ```
27 + npm login
28 + ```
29 +3. When prompted, provide your SSO credentials.
30 +
31 +## Logging in with a scope configured to point to an npm Enterprise registry
32 +
33 +1. On the command line, type the following command:
34 + ```
35 + npm login --registry=https://registry.company-name.npme.io
36 + ```
37 +2. When prompted, provide your SSO credentials.
38 +
39 +
40 +[ent-reg-config]: configuring-your-registry-settings-as-an-npm-enterprise-user
41 +[2fa]: about-two-factor-authentication
content/getting-started/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Getting started
3 +---
4 +
5 +<Index />
content/getting-started/managing-your-npm-user-account/changing-your-npm-username.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: Changing your npm username
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<>To change your npm username, {shared['contact-support'].text}</>.
7 +
content/getting-started/managing-your-npm-user-account/deleting-your-npm-user-account.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: Deleting your npm user account
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<>To delete your npm user account, {shared['contact-support'].text}</>.
7 +
content/getting-started/managing-your-npm-user-account/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Managing your npm user account
3 +---
4 +
5 +<Index />
content/getting-started/managing-your-npm-user-account/managing-your-profile-settings.mdx new
+100
@@ -0,0 +1,100 @@
1 +---
2 +title: Managing your profile settings
3 +redirect_from:
4 + - /getting-started/modifying_your_profile_from_command_line
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +You can manage settings for your user account profile from the web or command line.
9 +
10 +## Managing user account profile settings from the web
11 +
12 +From the web, you can change the following user profile settings:
13 +
14 +* Avatar
15 +* Password
16 +* Full name
17 +* GitHub user name
18 +* Twitter user name
19 +* Email address added to package metadata
20 +* Two-factor authentication status
21 +
22 +1. <>{shared['user-login'].text}</>
23 +
24 + <>{shared['user-login'].image}</>
25 +
26 +2. <>{shared['profile-settings'].text}</>
27 +
28 + <>{shared['profile-settings'].image}</>
29 +
30 +## Managing user account profile settings from the command line
31 +
32 +<Note>
33 +
34 +**Note:** Your npm client must be version 5.5.1 or higher to change your account settings from the CLI. To update to the latest version of npm, on the command line, run `npm install npm@latest -g`
35 +
36 +</Note>
37 +
38 +### Viewing user account profile settings from the command line
39 +
40 +To view your user profile settings from the CLI, on the command line, run the following command:
41 +
42 +```
43 +npm profile get
44 +```
45 +
46 +<Screenshot src="/getting-started/managing-your-npm-user-account/profile-settings-cli.png" alt="Screenshot of command-line interface profile settings table" />
47 +
48 +### Updating user account profile settings from the command line
49 +
50 +From the CLI, you can change the following properties for your user account:
51 +
52 +* `email`
53 +* `two-factor auth`
54 +* `fullname`
55 +* `homepage`
56 +* `freenode`
57 +* `twitter`
58 +* `github`
59 +* `password`
60 +
61 +1. On the command line, type the following command, replacing `property` with the name of the property, and `value` with the new value:
62 +
63 + ```
64 + npm profile set <prop> <value>
65 + ```
66 +
67 +2. When prompted, provide your current password.
68 +
69 +3. If you have enabled two-factor authentication on your account, when prompted, enter a one-time password.
70 +
71 +For more details, see the `profile` [command line documentation](https://docs.npmjs.com/cli/profile).
72 +
73 +#### Setting a password from the command line
74 +
75 +1. On the command line, type the following command:
76 +
77 + ```
78 + npm profile set password
79 + ```
80 +
81 +2. When prompted, provide your current password.
82 +
83 +3. When prompted, type a new password.
84 +
85 +<Note>
86 +
87 +To protect your account, when you reset your password from the command line, it must:
88 +
89 +* be longer than 10 characters
90 +* not contain part of your username
91 +* not be on [this list of common passwords](https://www.npmjs.com/signup/common-passwords)
92 +* not be in the "[Have I Been Pwned](https://haveibeenpwned.com/)" breach database
93 +
94 +</Note>
95 +
96 +#### Configuring two-factor authentication from the command line
97 +
98 +Enabling two-factor authentication on your account helps protect against unauthorized access to your account and packages.
99 +
100 +To enable, configure, and disable two-factor authentication from the command line, see "[Configuring two-factor authentication](/configuring-two-factor-authentication#configuring-2fa-from-the-command-line)".
content/getting-started/paying-for-your-npm-user-account/downgrading-to-a-free-user-account-plan.mdx new
+28
@@ -0,0 +1,28 @@
1 +---
2 +title: Downgrading to a free user account plan
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<Note>
7 +
8 +**Note:** This article only applies to users of the public npm registry.
9 +
10 +</Note>
11 +
12 +If you have a paid user account, but no longer need private packages, you can downgrade your paid organization to a free organization. When you downgrade from a paid to a free organization, you 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.
13 +
14 +1. <>{shared['user-login'].text}</>
15 +
16 + <>{shared['user-login'].image}</>
17 +
18 +2. <>{shared['billing-info'].text}</>
19 +
20 + <>{shared['billing-info'].image}</>
21 +
22 +3. <>{shared['billing-downgrade-selection'].text}</>
23 +
24 + <>{shared['billing-downgrade-selection'].image}</>
25 +
26 +4. <>{shared['billing-downgrade-confirm'].text}</>
27 +
28 + <>{shared['billing-downgrade-confirm'].image}</>
content/getting-started/paying-for-your-npm-user-account/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Paying for your npm user account
3 +---
4 +
5 +<Index />
content/getting-started/paying-for-your-npm-user-account/updating-user-account-billing-settings.mdx new
+87
@@ -0,0 +1,87 @@
1 +---
2 +title: Updating user account billing settings
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<Note>
7 +
8 +**Note:** This article only applies to users of the public npm registry.
9 +
10 +</Note>
11 +
12 +You can update the credit card used to pay for your paid user account plan. Updating your credit card will not change your billing cycle date, and the new credit card will be charged on the next billing cycle.
13 +
14 +<><strong>Note:</strong> If the credit card used to pay for your paid user account plan expires, or we are otherwise are unable to charge your card, you have a grace period of {shared['grace-period'].text} to update the card.</>
15 +
16 +## Updating credit card information
17 +
18 +1. <>{shared['user-login'].text}</>
19 +
20 + <>{shared['user-login'].image}</>
21 +
22 +2. <>{shared['billing-info'].text}</>
23 +
24 + <>{shared['billing-info'].image}</>
25 +
26 +3. <>{shared['payment-info'].text}</>
27 +
28 + <>{shared['payment-info'].image}</>
29 +
30 +4. <>{shared['billing-form'].text}</>
31 +
32 + <>{shared['billing-form'].image}</>
33 +
34 +5. <>{shared['payment-info-button'].text}</>
35 +
36 + <>{shared['payment-info-button'].image}</>
37 +
38 +6. <>{shared['billing-creditcard-form'].text}</>
39 +
40 + <>{shared['billing-creditcard-form'].image}</>
41 +
42 +7. <>{shared['payment-remember-me'].text}</>
43 +
44 + <>{shared['payment-remember-me'].image}</>
45 +
46 +8. <>{shared['billing-update-card'].text}</>
47 +
48 + <>{shared['billing-update-card'].image}</>
49 +
50 +## Updating billing receipt email and extra receipt information
51 +
52 +You can update the email address used for receipts, and add extra information to the receipt for your paid user account plan, such as your business name, VAT identification number, or address of record. Updated billing information will appear on all receipts immediately.
53 +
54 +<Note>
55 +
56 +**Note:** The billing email is used for receipts only and is not required to match the email address of the person whose card is used to pay for the paid user account plan.
57 +
58 +</Note>
59 +
60 +1. <>{shared['user-login'].text}</>
61 +
62 + <>{shared['user-login'].image}</>
63 +
64 +2. <>{shared['billing-info'].text}</>
65 +
66 + <>{shared['billing-info'].image}</>
67 +
68 +3. <>{shared['billing-history'].text}</>
69 +
70 + <>{shared['billing-history'].image}</>
71 +
72 +4. <>{shared['billing-receipt-settings'].text}</>
73 +
74 + <>{shared['billing-receipt-settings'].image}</>
75 +
76 +5. <>{shared['billing-extra-info'].text}</>
77 +
78 + <>{shared['billing-extra-info'].image}</>
79 +
80 +6. <>{shared['billing-extra-receipt-email'].text}</>
81 +
82 + <>{shared['billing-extra-receipt-email'].image}</>
83 +
84 +7. <>{shared['billing-extra-save'].text}</>
85 +
86 + <>{shared['billing-extra-save'].image}</>
87 +
content/getting-started/paying-for-your-npm-user-account/upgrading-to-a-paid-user-account-plan.mdx new
+51
@@ -0,0 +1,51 @@
1 +---
2 +title: Upgrading to a paid user account plan
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<Note>
7 +
8 +**Note:** This article only applies to users of the public npm registry.
9 +
10 +</Note>
11 +
12 +If you need to install and publish private packages, you can upgrade to a paid user account plan. Our paid user account plan costs $7 per month. For more information, see the "npm account" column on our [pricing page](https://www.npmjs.com/pricing).
13 +
14 +Your paid plan and billing cycle will start when you submit your credit card information, and you will be charged for the first month immediately.
15 +
16 +1. <>{shared['user-login'].text}</>
17 +
18 + <>{shared['user-login'].image}</>
19 +
20 +2. <>{shared['billing-info'].text}</>
21 +
22 + <>{shared['billing-info'].image}</>
23 +
24 +3. Under "change plan", click **Upgrade Plan ($7/User)**.
25 +
26 + <Screenshot src="/getting-started/paying-for-your-npm-user-account/change-plan.png" alt="Screenshot of the change payment plan button" />
27 +
28 +4. Under "Want to upgrade?", click **Enable Private Publishing for $7/mo**.
29 +
30 + <Screenshot src="/getting-started/paying-for-your-npm-user-account/enable-private-publishing.png" alt="Screenshot showing the enable private publishing button" />
31 +
32 +5. <>{shared['billing-form'].text}</>
33 +
34 + <>{shared['billing-form'].image}</>
35 +
36 +6. <>{shared['payment-info-button'].text}</>
37 +
38 + <>{shared['payment-info-button'].image}</>
39 +
40 +7. <>{shared['billing-creditcard-form'].text}</>
41 +
42 + <Screenshot src="/getting-started/paying-for-your-npm-user-account/billing-upgrade-form.png" alt="Screenshot of the payment form" />
43 +
44 +8. <>{shared['payment-remember-me'].text}</>
45 +
46 + <>{shared['payment-remember-me'].image}</>
47 +
48 +9. Click **Pay $7.00**.
49 +
50 + <Screenshot src="/getting-started/paying-for-your-npm-user-account/billing-upgrade-button.png" alt="Screenshot of the payment confirmation button" />
51 +
content/getting-started/paying-for-your-npm-user-account/viewing-downloading-and-emailing-receipts-for-your-user-account.mdx new
+80
@@ -0,0 +1,80 @@
1 +---
2 +title: Viewing, downloading, and emailing receipts for your npm user account
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +<Note>
7 +
8 +**Note:** This article only applies to users of the public npm registry.
9 +
10 +</Note>
11 +
12 +You can view, download, and email receipts for the complete billing history of your npm user account.
13 +
14 +## Viewing receipts
15 +
16 +1. <>{shared['user-login'].text}</>
17 +
18 + <>{shared['user-login'].image}</>
19 +
20 +2. <>{shared['billing-info'].text}</>
21 +
22 + <>{shared['billing-info'].image}</>
23 +
24 +3. <>{shared['billing-history'].text}</>
25 +
26 + <>{shared['billing-history'].image}</>
27 +
28 +4. <>{shared['billing-view'].text}</>
29 +
30 + <>{shared['billing-view'].image}</>
31 +
32 +## Downloading receipts
33 +
34 +1. <>{shared['user-login'].text}</>
35 +
36 + <>{shared['user-login'].image}</>
37 +
38 +2. <>{shared['billing-info'].text}</>
39 +
40 + <>{shared['billing-info'].image}</>
41 +
42 +3. <>{shared['billing-history'].text}</>
43 +
44 + <>{shared['billing-history'].image}</>
45 +
46 +4. <>{shared['billing-download'].text}</>
47 +
48 + <>{shared['billing-download'].image}</>
49 +
50 +5. <>{shared['billing-download-checked'].text}</>
51 +
52 + <>{shared['billing-download-checked'].image}</>
53 +
54 +## Emailing receipts
55 +
56 +1. <>{shared['user-login'].text}</>
57 +
58 + <>{shared['user-login'].image}</>
59 +
60 +2. <>{shared['billing-info'].text}</>
61 +
62 + <>{shared['billing-info'].image}</>
63 +
64 +3. <>{shared['billing-history'].text}</>
65 +
66 + <>{shared['billing-history'].image}</>
67 +
68 +4. <>{shared['billing-email'].text}</>
69 +
70 + <>{shared['billing-email'].image}</>
71 +
72 +5. <>{shared['billing-email-checked'].text}</>
73 +
74 + <>{shared['billing-email-checked'].image}</>
75 +
76 +6. <>{shared['billing-email-receipt'].text}</>
77 +
78 + <>{shared['billing-email-receipt'].image}</>
79 +
80 +7. Click **Send**.
content/getting-started/setting-up-your-npm-user-account/about-two-factor-authentication.mdx new
+64
@@ -0,0 +1,64 @@
1 +---
2 +title: About two-factor authentication
3 +redirect_from: [ /getting-started/using-two-factor-authentication ]
4 +---
5 +
6 +Two-factor authentication (2FA) protects against unauthorized access to your account by confirming your identity using:
7 +
8 +* something you know (such as your username and password)
9 +* something you have (such as a phone or tablet)
10 +
11 +When you enable 2FA, we will prompt you for a unique one-time password when you perform certain actions on your account or on packages to which you have write access, depending on your 2FA configuration.
12 +
13 +<Note>
14 +
15 +**Note:** Two-factor authentication provides the best possible security for your account against attackers. We strongly recommend enabling 2FA on your account as soon as possible after you sign up.
16 +
17 +</Note>
18 +
19 +## Two-factor authentication modes on npm
20 +
21 +Two-factor authentication on npm can be enabled for authorization only, or authorization and writes.
22 +
23 +### Authorization only
24 +
25 +If you enable 2FA for authorization only, we will request a one-time password for certain authorized actions.
26 +
27 +| Action | CLI command |
28 +| :------------------------------------------------ | :--------------------------------- |
29 +| Log in to npm | `npm login` |
30 +| Change profile settings (including your password) | `npm profile set` |
31 +| Change 2FA modes for your user account | `npm profile enable-2fa auth-only` |
32 +| Disable 2FA for your user account | `npm profile disable-2fa` |
33 +
34 +### Authorization and writes
35 +
36 +If you enable 2FA for authorization and writes, we will request a one-time password for certain authorized actions, as well as write actions.
37 +
38 +| Action | CLI command |
39 +| :------------------------------------------------ | :----------------------------------------------- |
40 +| Log in to npm | [`npm login`][login] |
41 +| Change profile settings (including your password) | [`npm profile set`][profile-set] |
42 +| Change 2FA modes for your user account | [`npm profile enable-2fa auth-and-writes`][2fa-enable] |
43 +| Disable 2FA for your user account | [`npm profile disable-2fa`][2fa-disable] |
44 +| Create tokens | [`npm token create`][token-create] |
45 +| Revoke tokens | [`npm token revoke`][token-revoke] |
46 +| Publish packages | [`npm publish`][publish] |
47 +| Unpublish packages | [`npm unpublish`][unpublish] |
48 +| Deprecate packages | [`npm deprecate`][deprecate] |
49 +| Change package visibility | [`npm access public/restricted`][access] |
50 +| Change user and team package access | [`npm access grant/revoke`][access] |
51 +| [Change package 2FA requirements][pkg-2fa] | N/A |
52 +
53 +
54 +[login]: https://docs.npmjs.com/cli/adduser
55 +[profile-set]: https://docs.npmjs.com/cli/profile
56 +[2fa-enable]: https://docs.npmjs.com/cli/profile
57 +[2fa-disable]: https://docs.npmjs.com/cli/profile
58 +[token-create]: https://docs.npmjs.com/cli/token
59 +[token-revoke]: https://docs.npmjs.com/cli/token
60 +[publish]: https://docs.npmjs.com/cli/publish
61 +[unpublish]: https://docs.npmjs.com/cli/unpublish
62 +[deprecate]: https://docs.npmjs.com/cli/deprecate
63 +[access]: https://docs.npmjs.com/cli/access
64 +[pkg-2fa]: requiring-2fa-for-package-publishing-and-settings-modification
content/getting-started/setting-up-your-npm-user-account/configuring-two-factor-authentication.mdx new
+139
@@ -0,0 +1,139 @@
1 +---
2 +title: Configuring two-factor authentication
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +You can enable two-factor authentication (2FA) on your npm user account to protect against unauthorized access to your account and packages.
7 +
8 +## Prerequisites
9 +
10 +Before you enable 2FA on your npm user account, you must:
11 +
12 +* Update your npm client to version 5.5.1 or higher.
13 +* Install an authenticator application that can generate one-time passwords (such as [Authy](https://authy.com/download/) or [Google Authenticator](https://support.google.com/accounts/answer/1066447)) on a mobile device or second computer that will always be available when you work in your npm account.
14 +
15 +<Note>
16 +
17 +**Note:** npm does not accept SMS (text-to-phone) as a 2FA method.
18 +
19 +</Note>
20 +
21 +## Configuring 2FA on the web
22 +
23 +### Enabling 2FA on the web
24 +
25 +1. <>{shared['user-login'].text}</>
26 +
27 + <>{shared['user-login'].image}</>
28 +
29 +2. <>{shared['profile-settings'].text}</>
30 +
31 + <>{shared['profile-settings'].image}</>
32 +
33 +3. On the profile settings page, under "Two-Factor Authentication", click **Enable 2FA**.
34 +
35 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-enable.png" alt="Screenshot showing Enable 2FA button" />
36 +
37 +4. On the 2FA settings page, select the mode you would like to enable. For more information, see "[Two-factor authentication modes on npm](about-two-factor-authentication#two-factor-authentication-modes-on-npm)".
38 +
39 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-auth-pub-select.png" alt="Screenshot showing 2FA types" />
40 +
41 +5. Click **Submit**.
42 +
43 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-auth-pub-submit.png" alt="Screenshot showing 2FA submit button" />
44 +
45 +6. Open your authenticator application on your phone, and, on the two-step verification page, scan the QR code with your phone.
46 +
47 +7. Enter the code generated by the app, then click **Verify**.
48 +
49 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-verify.png" alt="Screenshot showing 2FA verification" />
50 +
51 +8. On the recovery code page, copy the recovery codes to your computer or other safe location that is not your second factor device. We recommend using a password manager to save your recovery codes. **If you are unable to access your phone, you will need to enter a recovery code when prompted for a one-time password.**
52 +
53 +9. Click **Go back to settings**.
54 +
55 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/go-back-to-settings.png" alt="Screenshot showing the Go back to settings button" />
56 +
57 +### Removing 2FA on the web
58 +
59 +If you have 2FA enabled, you can remove it from your profile settings page.
60 +
61 +1. <>{shared['user-login'].text}</>
62 +
63 + <>{shared['user-login'].image}</>
64 +
65 +2. <>{shared['profile-settings'].text}</>
66 +
67 + <>{shared['profile-settings'].image}</>
68 +
69 +3. On the profile settings page, under "Two-Factor Authentication", click **Modify 2FA**.
70 +
71 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-modify.png" alt="Screenshot showing Modify 2FA button" />
72 +
73 +4. On the 2FA settings page, under "What should we protect?", select "Disable".
74 +
75 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-disable.png" alt="Screenshot showing Disable 2FA button" />
76 +
77 +5. Click **Submit**.
78 +
79 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/2fa-disable-submit.png" alt="Screenshot showing Disable 2FA submit button" />
80 +
81 +## Configuring 2FA from the command line
82 +
83 +### Enabling 2FA from the command line
84 +
85 +<Note>
86 +
87 +**Note:** Settings you configure on the command line will also apply to your profile settings on the npm website.
88 +
89 +</Note>
90 +
91 +1. On the command line, type the [`npm profile`](/cli/profile) command along with the option for the 2FA mode you want to enable:
92 + * To enable 2FA for authorization and writes, type:<br/>
93 + `npm profile enable-2fa auth-and-writes`
94 + * To enable 2FA for authorization only, type:<br/>
95 + `npm profile enable-2fa auth-only`
96 +
97 +2. To add npm to your authenticator application, using the device with the app, you can either:
98 + * scan the QR code displayed on the command line.
99 + * type the number displayed below the QR code.
100 +
101 +3. When prompted to add an OTP code from your authenticator, on the command line, enter a one-time password generated by your authenticator app.
102 +
103 +### Sending a one-time password from the command line
104 +
105 +If you have enabled 2FA auth-and-writes, you will need to send the OTP 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:
106 +
107 +```
108 +npm publish [<tarball>|<folder>][--tag <tag>] --otp=123456
109 +npm owner add <user > --otp=123456
110 +npm owner rm <user> --otp=123456
111 +npm dist-tags add <pkg>@<version> [<tag>] --otp=123456
112 +npm access edit [<package>) --otp=123456
113 +npm unpublish [<@scope>/]<pkg>[@<version>] --otp=123456
114 +```
115 +
116 +### Removing 2FA from the command line
117 +
118 +1. On the command line, type the following command:
119 +
120 + ```
121 + npm profile disable-2fa
122 + ```
123 +
124 +2. When prompted, enter your npm password:
125 +
126 + <Prompt>npm password:</Prompt>
127 +
128 +3. When prompted for a one-time password, enter a password from your authenticator app:
129 +
130 + <Prompt>Enter one-time password from your authenticator: <PromptReply>123456</PromptReply></Prompt>
131 +
132 +## Resolving OTP errors
133 +
134 +If you are entering what seems to be a valid OTP but you see an error, be sure that you are using the correct authenticator account. If you have multiple authenticator accounts, using an OTP from the wrong account will cause an error.
135 +
136 +If you see an error when you enter a valid OTP, check that you are using the correct authenticator account.
137 +
138 +Also, when you reset two-factor authentication after it has been disabled, the authenticator might create a second account with the same name. Please see the authenticator documentation to delete the old account.
139 +
content/getting-started/setting-up-your-npm-user-account/creating-a-new-npm-user-account.mdx new
+61
@@ -0,0 +1,61 @@
1 +---
2 +title: Creating a new user account on the public registry
3 +---
4 +
5 +If you do not already have an npm user account, you can create an account in order to share and download Javascript packages on the public registry.
6 +
7 +<Note>
8 +
9 +**Note:** If you are using an npm Enterprise registry, you must log in with your SSO credentials instead of creating an account. For more information, contact your company's Enterprise admin.
10 +
11 +</Note>
12 +
13 +## Creating an account on the website
14 +
15 +1. Go to the [npm signup page](https://www.npmjs.com/signup)
16 +
17 +2. In the user signup form, type in the fields:
18 + - **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.
19 + - **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.
20 + - **Password**: Your password must meet [our password guidelines](creating-a-strong-password).
21 +
22 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/signup-form.png" alt="Screenshot of the signup form" />
23 +
24 +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.
25 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/privacy-policy.png" alt="Screenshot of the privacy policy" />
26 +
27 +4. Click **Create An Account**.
28 + <Screenshot src="/getting-started/setting-up-your-npm-user-account/create-account-button.png" alt="Screenshot of the create account button" />
29 +
30 +<Note>
31 +
32 +**Note:** After signing up for an npm account, you will receive an account verification email. You must verify your email address in order to publish packages to the registry.
33 +
34 +</Note>
35 +
36 +## Testing your new account with npm login
37 +
38 +Use the <a href="https://docs.npmjs.com/cli/adduser">`npm login`</a> command to test logging in to your new account.
39 +
40 +<Note>
41 +
42 +**Note:** If you misspell your existing account username when you log in with the `npm login` command, you will create a new account with the misspelled name. For help with accidentally-created accounts, <a href="https://www.npmjs.com/support">contact npm Support</a>.
43 +
44 +</Note>
45 +
46 +1. On the command line, type the following command:
47 +
48 + ```
49 + npm login
50 + ```
51 +
52 +2. When prompted, enter your username, password, and email address.
53 +3. If you have [two-factor authentication](about-two-factor-authentication) enabled, when prompted, enter a one-time password.
54 +4. To test that you have successfully logged in, type:
55 +
56 + ```
57 + npm whoami
58 + ```
59 +
60 + Your npm username should be displayed.
61 +
content/getting-started/setting-up-your-npm-user-account/creating-a-strong-password.mdx new
+23
@@ -0,0 +1,23 @@
1 +---
2 +title: Creating a strong password
3 +---
4 +
5 +Secure your npm account with a strong and unique password using a password manager.
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 +* is not a [commonly used password](https://www.npmjs.com/signup/common-passwords)
12 +* has not been compromised and known to the [Have I Been Pwned](https://haveibeenpwned.com/) breach database
13 +
14 +To keep your account secure, we recommend you follow these best practices:
15 +
16 +* Use a password manager, such as [LastPass](https://lastpass.com/) or [1Password](https://1password.com/), to generate a password more than 16 characters.
17 +* 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.
18 +* Configure two-factor authentication for your account. For more information, see "About two-factor authentication."
19 +* 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)".
20 +
21 +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.
22 +
23 +npm only inspects the password at the time you type it, and never stores the password you entered in plaintext. For more information, see [HaveIBeenPwned](https://haveibeenpwned.com/).
content/getting-started/setting-up-your-npm-user-account/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Setting up your npm user account
3 +---
4 +
5 +<Index />
content/getting-started/setting-up-your-npm-user-account/recovering-your-2fa-enabled-account.mdx new
+40
@@ -0,0 +1,40 @@
1 +---
2 +title: Recovering your 2FA-enabled account
3 +---
4 +
5 +When you have two-factor access enabled on your account, and you lose the ability to provide the one-time password, you may be able to recover your account.
6 +
7 +### Misplaced second factor device
8 +
9 +If you have misplaced the device that provided second-factor authentication, you can use the recovery codes generated when you enabled 2FA to access your account.
10 +
11 +1. Locate the recovery codes generated when you enabled 2FA on your account.
12 +2. If you are logged out, on the command line, log in using your npm username and npm password.
13 +
14 + ```
15 + npm login
16 + ```
17 +
18 +3. When prompted for an OTP, enter a recovery code.
19 +4. Once you are logged in, type `npm profile disable-2fa` and enter your npm password if prompted.
20 +5. Enter an unused recovery code when you see this prompt:
21 +
22 + <Prompt>Enter one-time password from your authenticator:</Prompt>
23 +
24 +5. npm will confirm that two-factor authentication has been disabled.
25 +6. type `npm profile enable-2fa` to re-enable 2FA, assign a different device to your account, and generate new recovery codes.
26 +
27 +<Note>
28 +
29 +**Note:** Using the recovery codes to re-enable 2FA may create a second authenticator account with the same npm account name.
30 +
31 +To delete the old authenticator account, follow the steps for the authenticator.
32 +
33 +</Note>
34 +
35 +### Misplaced recovery codes
36 +
37 +If you have misplaced both the device that provided second-factor authentication and your recovery codes, we may be unable to help you recover your account. If you have any questions, please [contact npm Support][contact-support].
38 +
39 +
40 +[contact-support]: https://www.npmjs.com/support
content/getting-started/troubleshooting/common-errors.mdx new
+217
@@ -0,0 +1,217 @@
1 +---
2 +title: Common errors
3 +redirect_from:
4 + - /troubleshooting/if-your-npm-is-broken
5 + - /troubleshooting/try-clearing-the-npm-cache
6 + - /troubleshooting/common-errors
7 +---
8 +
9 +## Errors
10 +
11 +- [Broken npm installation](#broken-npm-installation)
12 +- [Random errors](#random-errors)
13 +- [No compatible version found](#no-compatible-version-found)
14 +- [Permissions errors](#permissions-errors)
15 +- [`Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm'` on Windows 7](#error-enoent-stat-cusersuserappdataroamingnpm-on-windows-7)
16 +- [No space](#no-space)
17 +- [No git](#no-git)
18 +- [Running a Vagrant box on Windows fails due to path length issues](#running-a-vagrant-box-on-windows-fails-due-to-path-length-issues)
19 +- [npm only uses `git:` and `ssh+git:` URLs for GitHub repos, breaking proxies](#npm-only-uses-git-and-sshgit-urls-for-github-repos-breaking-proxies)
20 +- [SSL error](#ssl-error)
21 +- [SSL-intercepting proxy](#ssl-intercepting-proxy)
22 +- [Not found / Server error](#not-found--server-error)
23 +- [Invalid JSON](#invalid-json)
24 +- [Many `ENOENT` / `ENOTEMPTY` errors in output](#many-enoent--enotempty-errors-in-output)
25 +- [`cb() never called!` when using shrinkwrapped dependencies](#cb-never-called-when-using-shrinkwrapped-dependencies)
26 +- [npm login errors](#npm-login-errors)
27 +- [`npm` hangs on Windows at `addRemoteTarball`](#npm-hangs-on-windows-at-addremotetarball)
28 +- [npm not running the latest version on a Windows machine](#npm-not-running-the-latest-version-on-a-windows-machine)
29 +
30 +## Broken npm installation
31 +
32 +If your npm is broken:
33 +
34 +- On Mac or Linux, [reinstall npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
35 +- Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see [this note about installing the latest stable version](try-the-latest-stable-version-of-npm#upgrading-on-windows)).
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.
41 +
42 +## No compatible version found
43 +
44 +You have an outdated npm. [Please update to the latest stable npm](try-the-latest-stable-version-of-npm).
45 +
46 +## Permissions errors
47 +
48 +Please see the discussions in "[Downloading and installing Node.js and npm](downloading-and-installing-node-js-and-npm)" and "[Resolving EACCES permissions errors when installing packages globally](resolving-eacces-permissions-errors-when-installing-packages-globally)" for ways to avoid and resolve permissions errors.
49 +
50 +## `Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm'` on Windows 7
51 +
52 +The error `Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm'` on Windows 7 is a consequence of [joyent/node#8141](https://github.com/joyent/node/issues/8141), and is an issue with the Node installer for Windows. The workaround is to ensure that `C:\Users\<user>\AppData\Roaming\npm` exists and is writable with your normal user account.
53 +
54 +## No space
55 +
56 +```
57 +npm ERR! Error: ENOSPC, write
58 +```
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.
65 +
66 +## No git
67 +
68 +```
69 +npm ERR! not found: git
70 +ENOGIT
71 +```
72 +
73 +You need to [install git](http://git-scm.com/book/en/Getting-Started-Installing-Git). Or, you may need to add your git information to your npm profile. You can do this from the command line or the website. For more information, see "[Managing your profile settings](managing-your-profile-settings)".
74 +
75 +## Running a Vagrant box on Windows fails due to path length issues
76 +
77 +**[@drmyersii](https://github.com/drmyersii)** went through what sounds like a lot of painful trial and error to come up with a working solution involving Windows long paths and some custom Vagrant configuration:
78 +
79 +> [This is the commit that I implemented it in](https://github.com/renobit/vagrant-node-env/commit/bdf15f2f301e2b1660b839875e34f172ea8be227), but I'll go ahead and post the main snippet of code here:
80 +>
81 +> ```ruby
82 +> config.vm.provider "virtualbox" do |v|
83 +> v.customize ["sharedfolder", "add", :id, "--name", "www", "--hostpath", (("//?/" + File.dirname(__FILE__) + "/www").gsub("/","\\"))]
84 +> end
85 +>
86 +> config.vm.provision :shell, inline: "mkdir /home/vagrant/www"
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.
91 +
92 +## npm only uses `git:` and `ssh+git:` URLs for GitHub repos, breaking proxies
93 +
94 +**[@LaurentGoderre](https://github.com/LaurentGoderre)** fixed this with [some Git trickery](https://github.com/npm/npm/issues/5257#issuecomment-60441477):
95 +
96 +> I fixed this issue for several of my colleagues by running the following two commands:
97 +>
98 +> ```
99 +> git config --global url."https://github.com/".insteadOf git@github.com:
100 +> git config --global url."https://".insteadOf git://
101 +> ```
102 +>
103 +> One thing we noticed is that the `.gitconfig` used is not always the one expected so if you are on a machine that modified the home path to a shared drive, you need to ensure that your `.gitconfig` is the same on both your shared drive and in `c:\users\[your user]\`
104 +
105 +## SSL Error
106 +
107 +```
108 +npm ERR! Error: 7684:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:787:
109 +```
110 +
111 +You are trying to talk SSL to an unencrypted endpoint. More often than not, this is due to a [proxy](/misc/config#proxy) [configuration](/misc/config#https-proxy) [error](/misc/config#cafile) (see also [this helpful, if dated, guide](http://jjasonclark.com/how-to-setup-node-behind-web-proxy)). In this case, you do **not** want to disable `strict-ssl` – you may need to set up a CA / CA file for use with your proxy, but it's much better to take the time to figure that out than disabling SSL protection.
112 +
113 +```
114 +npm ERR! Error: SSL Error: CERT_UNTRUSTED
115 +```
116 +
117 +```
118 +npm ERR! Error: SSL Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
119 +```
120 +
121 +This problem will happen if you're running Node 0.6. Please upgrade to node 0.8 or above. [See this post for details](http://blog.npmjs.org/post/71267056460/fastly-manta-loggly-and-couchdb-attachments).
122 +
123 +You could also try these workarounds: `npm config set ca ""` or `npm config set strict-ssl false`
124 +
125 +```
126 +npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
127 +```
128 +
129 +[npm no longer supports its self-signed certificates](http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more)
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=""`
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)
138 +
139 +## SSL-intercepting proxy
140 +
141 +Unsolved. See https://github.com/npm/npm/issues/9282
142 +
143 +## Not found / Server error
144 +
145 +```
146 +npm http 404 https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.0.tgz
147 +npm ERR! fetch failed https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.0.tgz
148 +npm ERR! Error: 404 Not Found
149 +```
150 +
151 +```
152 +npm http 500 https://registry.npmjs.org/phonegap
153 +```
154 +
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.
157 +
158 +## Invalid JSON
159 +
160 +```
161 +Error: Invalid JSON
162 +```
163 +
164 +```
165 +npm ERR! SyntaxError: Unexpected token <
166 +```
167 +
168 +```
169 +npm ERR! registry error parsing json
170 +```
171 +
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`).
178 +
179 +## Many `ENOENT` / `ENOTEMPTY` errors in output
180 +
181 +npm is written to use resources efficiently on install, and part of this is that it tries to do as many things concurrently as is practical. Sometimes this results in race conditions and other synchronization issues. As of npm 2.0.0, a very large number of these issues were addressed. If you see `ENOENT lstat`, `ENOENT chmod`, `ENOTEMPTY unlink`, or something similar in your log output, try updating npm to the latest version. If the problem persists, look at [npm/npm#6043](https://github.com/npm/npm/issues/6043) and see if somebody has already discussed your issue.
182 +
183 +## `cb() never called!` when using shrinkwrapped dependencies
184 +
185 +Take a look at [issue #5920](https://github.com/npm/npm/issues/5920). ~~We're working on fixing this one, but it's a fairly subtle race condition and it's taking us a little time. You might try moving your `npm-shrinkwrap.json` file out of the way until we have this fixed.~~ This has been fixed in versions of npm newer than `npm@2.1.5`, so update to `npm@latest`.
186 +
187 +## `npm login` errors
188 +
189 +Sometimes `npm login` fails for no obvious reason. The first thing to do is to log in at <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`.
191 +
192 +If that's not the problem, or if you are seeing the message `"may not mix password_sha and pbkdf2"`, then
193 +
194 +1. Log in at https://npmjs.com/
195 +2. Change password at https://npmjs.com/password – you can even "change" it to the same password
196 +3. Clear login-related fields from `~/.npmrc` – e.g., by running `sed -ie '/registry.npmjs.org/d' ~/.npmrc`
197 +4. `npm login`
198 +
199 +and it generally seems to work.
200 +
201 +See <https://github.com/npm/npm/issues/6641#issuecomment-72984009> for the history of this issue.
202 +
203 +## `npm` hangs on Windows at `addRemoteTarball`
204 +
205 +Check if you have two temp directories set in your `.npmrc`:
206 +
207 +```
208 +> npm config ls -l
209 +```
210 +
211 +Look for lines defining the `tmp` config variable. If you find more than one, remove all but one of them.
212 +
213 +See <https://github.com/npm/npm/issues/7590> for more about this unusual problem.
214 +
215 +## npm not running the latest version on a Windows machine
216 +
217 +See the section about Windows [here](try-the-latest-stable-version-of-npm).
content/getting-started/troubleshooting/generating-and-locating-npm-debug.log-files.mdx new
+32
@@ -0,0 +1,32 @@
1 +---
2 +title: Generating and locating npm-debug.log files
3 +redirect_from:
4 + - /generating-and-locating-npm-debug-log-files
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +When a package fails to install or publish, the npm CLI will generate an `npm-debug.log` file. This log file can help you (and [npm Support][support]) figure out what went wrong.
9 +
10 +If you need to generate a `npm-debug.log` file, you can run one of these commands.
11 +
12 +For installing packages:
13 +
14 +```
15 +npm install --timing
16 +```
17 +
18 +For publishing packages:
19 +
20 +```
21 +npm publish --timing
22 +```
23 +
24 +You can find the `npm-debug.log` file in your `.npm` directory. To find your `.npm` directory, use `npm config get cache`.
25 +
26 +If you use a CI environment, your logs are likely located elsewhere. For example, in Travis CI, you can find them in the `/home/travis/build` directory.
27 +
28 +<Note>
29 +<><strong>npm Enterprise users:</strong> If you need to {shared['contact-enterprise-support'].text}, we recommend attaching the entire contents of the `npm-debug.log` file or copying the contents into the body of the message, so that we can more easily diagnose the problem.</>
30 +</Note>
31 +
32 +[support]: https://www.npmjs.com/support
content/getting-started/troubleshooting/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Troubleshooting
3 +---
4 +
5 +<Index />
content/getting-started/troubleshooting/try-the-latest-stable-version-of-node.mdx new
+41
@@ -0,0 +1,41 @@
1 +---
2 +title: Try the latest stable version of node
3 +redirect_from:
4 + - /troubleshooting/try-the-latest-stable-version-of-node
5 +---
6 +
7 +If you're experiencing issues while using a version of node which is unsupported or unstable (odd numbered versions e.g. 0.7.x, 0.9.x, 0.11.x), it's very possible your issue will be fixed by simply using the [LTS](https://github.com/nodejs/LTS) version of node.
8 +
9 +## See what version of node you're running:
10 +
11 +```
12 +node -v
13 +```
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.
18 +
19 +### Updating node on Windows
20 +
21 +Install the latest msi from <https://nodejs.org/en/download>
22 +
23 +### Updating node on OSX
24 +
25 +Install the latest package from <https://nodejs.org/en/download>
26 +
27 +or if you are using [homebrew](http://brew.sh/)
28 +
29 +```
30 +brew install node
31 +```
32 +
33 +### An easy way to stay up-to-date
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)
content/getting-started/troubleshooting/try-the-latest-stable-version-of-npm.mdx new
+99
@@ -0,0 +1,99 @@
1 +---
2 +title: Try the latest stable version of npm
3 +redirect_from:
4 + - /troubleshooting/try-the-latest-stable-version-of-npm
5 +---
6 +
7 +## See what version of npm you're running
8 +
9 +```
10 +npm -v
11 +```
12 +
13 +## Upgrading on `*nix` (OSX, Linux, etc.)
14 +
15 +_(You may need to prefix these commands with `sudo`, especially on Linux, or OS X if you installed Node using its default installer.)_
16 +
17 +You can upgrade to the latest version of npm using:
18 +
19 +```
20 +npm install -g npm@latest
21 +```
22 +
23 +Or upgrade to the most recent release:
24 +```
25 +npm install -g npm@next
26 +```
27 +
28 +## Upgrading on Windows
29 +_Microsoft wrote a small command line tool to automate the steps below. [You can go and download it here](https://github.com/felixrieseberg/npm-windows-upgrade) - or stick with the manual path outlined below._
30 +
31 +___
32 +
33 +By default, npm is installed alongside node in
34 +
35 +`C:\Program Files (x86)\nodejs`
36 +
37 +npm's globally installed packages (including, potentially, npm itself) are stored separately in a user-specific directory (which is currently
38 +
39 + `C:\Users\<username>\AppData\Roaming\npm`).
40 +
41 + Because the installer puts
42 +
43 + `C:\Program Files (x86)\nodejs`
44 +
45 + before
46 +
47 + `C:\Users\<username>\AppData\Roaming\npm`
48 +
49 + 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>`.
50 +
51 + To get around this, you can do **one** of the following:
52 +
53 +* 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`.
54 +Remember that you'll need to restart `cmd.exe` (and potentially restart Windows) when you make changes to `PATH` or how npm is installed.
55 +
56 +* Option 2: remove both of
57 + * `%ProgramFiles%\nodejs\npm`
58 + * `%ProgramFiles%\nodejs\npm.cmd`
59 +
60 +* Option 3: Navigate to `%ProgramFiles%\nodejs\node_modules\npm` and copy the `npmrc`file to another folder or the desktop.
61 +Then open `cmd.exe` and run the following commands:
62 +```bash
63 +cd %ProgramFiles%\nodejs
64 +npm install npm@latest
65 +```
66 +
67 +If you installed npm with the node.js installer, after doing one of the previous steps, do the following.
68 +
69 +* Option 1 or 2
70 + * 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.
71 +
72 +* Option 3
73 + * Copy the npmrc file back into `%ProgramFiles%\nodejs\node_modules\npm`
74 +
75 +*(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`.)*
76 +
77 +### A brief note on the built-in Windows configuration
78 +
79 +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.
80 +
81 +```
82 +npm config get prefix -g
83 +```
84 +
85 +If it isn't set to `<X>:\Users\<user>\AppData\Roaming\npm`, you can run the below command to correct it:
86 +
87 +```
88 +npm config set prefix "${APPDATA}/npm" -g
89 +```
90 +
91 +Incidentally, if you would prefer that packages not be installed to your roaming profile (because you have a quota on your shared network, or it makes logging in or out from a domain sluggish), you can put it in your local app data instead:
92 +
93 +```
94 +npm config set prefix "${LOCALAPPDATA}/npm" -g
95 +```
96 +
97 +...as well as copying `%APPDATA%\npm` to `%LOCALAPPDATA%\npm` (and updating your `%PATH%`, of course).
98 +
99 +Everyone who works on npm knows that this process is complicated and fraught, and we're working on making it simpler. Stay tuned.
content/index.mdx new
+9
@@ -0,0 +1,9 @@
1 +---
2 +title: npm Documentation
3 +---
4 +import {HeroLayout} from 'gatsby-theme-doctornpm'
5 +import {Index} from 'gatsby-theme-doctornpm'
6 +export default HeroLayout
7 +
8 +<Index depth='1' />
9 +
content/integrations/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Integrations
3 +---
4 +
5 +<Index />
content/integrations/integrating-npm-with-external-services/about-access-tokens.mdx new
+30
@@ -0,0 +1,30 @@
1 +---
2 +title: About access tokens
3 +redirect_from:
4 + - /getting-started/working_with_tokens
5 + - /about-authentication-tokens
6 +---
7 +
8 +<Note>
9 +
10 +**Note:** You must be using npm version 5.5.1 or greater to use access tokens.
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.
15 +
16 +The npm CLI automatically generates an access token for you when you run `npm login`. You can also create an access token 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), like 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.
17 +
18 +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.
19 +
20 +npm token commands let you:
21 +
22 +* View tokens for easier tracking and management
23 +* Create new tokens, specifying read-only or full-permission
24 +* Limit access according to IP address ranges (CIDR)
25 +* Delete/revoke tokens
26 +
27 +For more information on creating and viewing access tokens on the web and CLI, see "[Creating and viewing access tokens][create-token]".
28 +
29 +[create-token]: creating-and-viewing-access-tokens
30 +
content/integrations/integrating-npm-with-external-services/creating-and-viewing-access-tokens.mdx new
+94
@@ -0,0 +1,94 @@
1 +---
2 +title: Creating and viewing access tokens
3 +redirect_from: [ /creating-and-viewing-authentication-tokens ]
4 +---
5 +
6 +You can [create](#creating-access-tokens) and [view](#viewing-access-tokens) access tokens from the website and command line interface (CLI).
7 +
8 +## Creating access tokens
9 +
10 +### Creating tokens on the website
11 +
12 +1. In the upper right corner of the page, click your profile picture, then click **Access Tokens**.
13 +
14 + <Screenshot src="/integrations/integrating-npm-with-external-services/tokens-profile.png" alt="Screenshot of the account menu with the tokens link selected" />
15 +
16 +2. Click **Create New Token**.
17 +
18 + <Screenshot src="/integrations/integrating-npm-with-external-services/create-token.png" alt="Screenshot of the create new token button" />
19 +
20 +3. Select the type of access token:
21 +
22 + - **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.
23 +
24 + - **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. This is recommended for automation workflows where you are publishing new packages.
25 +
26 + - **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.
27 +
28 + <Screenshot src="/integrations/integrating-npm-with-external-services/token-level-select.png" alt="Screenshot of the access level selection" />
29 +
30 +4. Click **Generate Token**.
31 +
32 +5. Copy the token from the top of page.
33 +
34 +### Creating tokens with the CLI
35 +
36 +You can create tokens with read-only permissions or read and publish permissions with the CLI; you cannot currently create automation tokens.
37 +
38 +- **Read-only:** Tokens that allow installation and distribution only, but no publishing or other rights associated with your account.
39 +- **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.
40 +
41 +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.
42 +
43 +1. To create a new token, on the command line, run:
44 + * `npm token create` for a read and publish token
45 + * `npm token create --read-only` for a read-only token
46 + * `npm token create --cidr=[list]` for a CIDR-restricted read and publish token. For example, `npm token create --cidr=192.0.2.0/24`
47 + * `npm token create --read-only --cidr=[list]` for a CIDR-restricted read-only token
48 +2. When prompted, enter your password.
49 +3. If you have enabled [two-factor authentication][tfa], when prompted, enter a one-time password.
50 +4. Copy the token from the **token** field in the command output.
51 +
52 +#### CIDR-restricted token errors
53 +
54 +If the CIDR string you enter is invalid or in an inappropriate format, you will get an error similar to the one below:
55 +
56 +```
57 +npm ERR! CIDR whitelist contains invalid CIDR entry: X.X.X.X./YY,Z.Z.. . .
58 +```
59 +
60 +Make sure you are using a valid IPv4 range and try creating the token again.
61 +
62 +## Viewing access tokens
63 +
64 +<Note>
65 +
66 +**Note:** Full tokens are never displayed, only the first and last four characters will be shown. You can only view a full token immediately after creation.
67 +
68 +</Note>
69 +
70 +### Viewing tokens on the website
71 +
72 +To view all tokens associated with your account, in the upper right corner of the page, click your profile picture, then click **Access Tokens**.
73 +
74 +<Screenshot src="/integrations/integrating-npm-with-external-services/tokens-profile.png" alt="Screenshot of the account menu with the tokens link selected" />
75 +
76 +### Viewing tokens on the CLI
77 +
78 +To view all tokens associated with your account, on the command line, run the following command:
79 +
80 +```
81 +npm token list
82 +```
83 +
84 +#### Token attributes
85 +
86 +- **id:** Use the token ID to refer to the token in commands.
87 +- **token:** The first digits of the actual token.
88 +- **create:** Date the token was created.
89 +- **readonly:** If yes, indicates a read-only token. If no, indicates a token with both read and publish permissions.
90 +- **CIDR whitelist:** Restricts token use by IP address.
91 +
92 +
93 +[tfa]: about-two-factor-authentication
94 +[cidr-wiki]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
content/integrations/integrating-npm-with-external-services/docker-and-private-modules.mdx new
+86
@@ -0,0 +1,86 @@
1 +---
2 +title: Docker and private modules
3 +redirect_from:
4 + - /private-modules/docker-and-private-modules
5 +---
6 +
7 +To install private npm packages in a Docker container, you will need to use Docker's build-time variables.
8 +
9 +## Background: runtime variables
10 +
11 +You cannot install private npm packages in a Docker container using only runtime variables. Consider the following Dockerfile:
12 +
13 +```
14 +FROM risingstack/alpine:3.3-v4.3.1-3.0.1
15 +
16 +COPY package.json package.json
17 +RUN npm install
18 +
19 +# Add your source files
20 +COPY . .
21 +CMD npm start
22 +```
23 +
24 +Which will use the RisingStack [Alpine Node.JS Docker image](https://hub.docker.com/r/risingstack/alpine/), copy the `package.json` into our container, installs dependencies, copies the source files and runs the start command as specified in the `package.json`.
25 +
26 +In order to install private packages, you may think that we could just add a line before we run `npm install`, using the [ENV parameter](https://docs.docker.com/engine/reference/builder/#env):
27 +
28 +```
29 +ENV NPM_TOKEN=00000000-0000-0000-0000-000000000000
30 +```
31 +
32 +However, this doesn't work as you would expect, because you want the npm install to occur when you run `docker build`, and in this instance, `ENV` variables aren't used, they are set for runtime only.
33 +
34 +Instead of run-time variables, you must use a different way of passing environment variables to Docker, available since Docker 1.9: the [ARG parameter](https://docs.docker.com/engine/reference/builder/#arg).
35 +
36 +## Create and check in a project-specific .npmrc file
37 +
38 +A complete example that will allow you to use `--build-arg` to pass in your NPM_TOKEN requires adding a `.npmrc` file to the project.
39 +
40 +Use a project-specific `.npmrc` file with a variable for your token to securely authenticate your Docker image with npm.
41 +
42 +1. In the root directory of your project, create a custom <a href="https://docs.npmjs.com/cli-documentation/files/npmrc">`.npmrc`</a> file with the following contents:
43 +
44 + ```
45 + //registry.npmjs.org/:_authToken=${NPM_TOKEN}
46 + ```
47 +
48 + **Note:** that you are specifying a literal value of `${NPM_TOKEN}`. The npm cli will replace this value with the contents of the `NPM_TOKEN` environment variable. Do **not** put a token in this file.
49 +
50 +2. Check in the `.npmrc` file.
51 +
52 +## Update the Dockerfile
53 +
54 +The Dockerfile that takes advantage of this has a few more lines in it than the earlier example that allows us to use the `.npmrc` file and the `ARG` parameter:
55 +
56 +```
57 +FROM risingstack/alpine:3.3-v4.3.1-3.0.1
58 +
59 +ARG NPM_TOKEN
60 +COPY .npmrc .npmrc
61 +COPY package.json package.json
62 +RUN npm install
63 +RUN rm -f .npmrc
64 +
65 +# Add your source files
66 +COPY . .
67 +CMD npm start
68 +```
69 +
70 +This adds the expected `ARG NPM_TOKEN`, but also copies the `.npmrc` file, and removes it when `npm install` completes.
71 +
72 +## Build the Docker image
73 +
74 +To build the image using the above Dockerfile and the npm authentication token, you can run the following command. Note the `.` at the end to give `docker build` the current directory as an argument.
75 +
76 +```
77 +docker build --build-arg NPM_TOKEN=${NPM_TOKEN} .
78 +```
79 +
80 +This will build the Docker image with the current `NPM_TOKEN` environment variable, so you can run `npm install` inside your container as the current logged-in user.
81 +
82 +<Note>
83 +
84 +**Note:** Even if you delete the `.npmrc` file, it will be kept in the commit history. To clean your secrets entirely, make sure to squash them.
85 +
86 +</Note>
content/integrations/integrating-npm-with-external-services/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Integrating npm with external services
3 +---
4 +
5 +<Index />
content/integrations/integrating-npm-with-external-services/revoking-access-tokens.mdx new
+40
@@ -0,0 +1,40 @@
1 +---
2 +title: Revoking access tokens
3 +redirect_from: [ /revoking-authentication-tokens ]
4 +---
5 +
6 +To keep your account and packages secure, we strongly recommend revoking (deleting) tokens you no longer need or that have been compromised. You can revoke any token you have created.
7 +
8 +<Note>
9 +
10 +**Note:** While access tokens are not derived from your password, changing your password will invalidate all of your tokens. You can also invalidate a single token by logging out on a machine that is logged in with that token. We recommend revoking rather than invalidating tokens.
11 +
12 +</Note>
13 +
14 +1. To see a list of your tokens, on the command line, run:
15 +
16 + ```
17 + npm token list
18 + ```
19 +
20 +2. In the tokens table, find and copy the ID of the token you want to delete.
21 +
22 +3. On the command line, run the following command, replacing `123456` with the ID of the token you want to delete:
23 +
24 + ```
25 + npm token delete 123456
26 + ```
27 +
28 + npm will report `Removed 1 token`
29 +
30 +4. To confirm that the token has been removed, run:
31 +
32 + ```
33 + npm token list
34 + ```
35 +
36 +<Note>
37 +
38 +**Note:** You must use the token ID to delete a token, not the truncated version of the token. In some cases, there may be a delay of up to an hour before a token is successfully revoked.
39 +
40 +</Note>
content/integrations/integrating-npm-with-external-services/using-private-packages-in-a-ci-cd-workflow.mdx new
+90
@@ -0,0 +1,90 @@
1 +---
2 +title: Using private packages in a CI/CD workflow
3 +redirect_from:
4 + - /private-modules/ci-server-config
5 +---
6 +
7 +You can use access tokens to test private npm packages with continuous integration (CI) systems, or deploy them using continuous deployment (CD) systems.
8 +
9 +## Create a new access token
10 +
11 +Create a new access token that will be used only to access npm packages from a CI/CD server.
12 +
13 +### Continuous integration
14 +
15 +By default, `npm token create` will generate a token with both read and write permissions. When generating a token for use in a continuous integration environment, we recommend creating a read-only token:
16 +
17 +```
18 +npm token create --read-only
19 +```
20 +
21 +For more information on creating access tokens, including CIDR-whitelisted tokens, see "[Creating an access token][create-token]".
22 +
23 +### Continuous deployment
24 +
25 +Since continuous deployment environments usually involve the creation of a deploy artifact, you may wish to create an [automation token](create-token#creating-tokens-on-the-website) on the website. This will allow you to publish even if you have two-factor authentication enabled on your account.
26 +
27 +### Interactive workflows
28 +
29 +If your workflow produces a package, but you publish it manually after validation, then you will want to create a token with read and write permissions, which are granted with the standard token creation command:
30 +
31 +```
32 +npm token create
33 +```
34 +
35 +### CIDR whitelists
36 +
37 +For increased security, you may use a CIDR-whitelisted token that can only be used from a certain IP address range. You can use a CIDR whitelist with a read and publish token or a read-only token:
38 +
39 +```
40 +npm token create --cidr=[list]
41 +npm token create --read-only --cidr=[list]
42 +```
43 +
44 +Example:
45 +
46 +```
47 +npm token create --cidr=192.0.2.0/24
48 +```
49 +
50 +For more information, see "[Creating and viewing authentication tokens](creating-and-viewing-access-tokens)".
51 +
52 +## Set the token as an environment variable on the CI/CD server
53 +
54 +Set your token as an environment variable, or a secret, in your CI/CD server.
55 +
56 +For example, in GitHub Actions, you would [add your token as a secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets). Then you can make the secret available to workflows.
57 +
58 +If you named the secret `NPM_TOKEN`, then you would want to create an environment variable named `NPM_TOKEN` from that secret.
59 +
60 +```
61 +steps:
62 + - run: |
63 + npm install
64 + - env:
65 + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
66 +```
67 +
68 +Consult your CI/CD server's documentation for more details.
69 +
70 +## Create and check in a project-specific .npmrc file
71 +
72 +Use a project-specific `.npmrc` file with a variable for your token to securely authenticate your CI/CD server with npm.
73 +
74 +1. In the root directory of your project, create a custom `.npmrc` file with the following contents:
75 +
76 + ```
77 + //registry.npmjs.org/:_authToken=${NPM_TOKEN}
78 + ```
79 +
80 + **Note:** that you are specifying a literal value of `${NPM_TOKEN}`. The npm cli will replace this value with the contents of the `NPM_TOKEN` environment variable. Do **not** put a token in this file.
81 +
82 +2. Check in the `.npmrc` file.
83 +
84 +## Securing your token
85 +
86 +Your token may have permission to read private packages, publish new packages on your behalf, or change user or package settings. Protect your token.
87 +
88 +Do not add your token to version control or store it insecurely. Store it in a package manager, your cloud provider's secure storage, or your CI/CD provider's secure storage.
89 +
90 +[create-token]: creating-and-viewing-access-tokens
content/organizations/creating-and-managing-organizations/converting-your-user-account-to-an-organization.mdx new
+44
@@ -0,0 +1,44 @@
1 +---
2 +title: Converting your user account to an organization
3 +redirect_from:
4 + - /converting-your-user-account-to-an-org
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +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:
9 +
10 +- Create a new organization with the name of your user account.
11 +- Prompt you to create a new npm user account. We recommend choosing a variation of your old user name so collaborators will recognize you. For example, if your old username was "wombat", your new username might be "wombat-new".
12 +- Make your your new npm user account an owner of your new organization.
13 +- Add your new npm user account to a team called "Developers" in your new organization.
14 +- Transfer packages owned by your user account to your new organization.
15 +- Transfer your existing organization and team memberships and contributor access settings to your new user account.
16 +
17 +**Note:** Once your old user account has been converted to an organization, you will no longer be able to sign in to npm with your old user account.
18 +
19 +1. <>{shared['user-login'].text}</>
20 +
21 + <>{shared['user-login'].image}</>
22 +
23 +2. <>{shared['organization-create'].text}</>
24 +
25 + <>{shared['organization-create'].image}</>
26 +
27 +3. Below the account creation form, click **Convert**.
28 +
29 + <Screenshot src="/organizations/creating-and-managing-organizations/convert-from-user.png" alt="Screenshot showing the convert dialog" />
30 +
31 +4. Review the account conversion steps and click **Continue**.
32 +
33 + <Screenshot src="/organizations/creating-and-managing-organizations/convert-confirmation.png" alt="Screenshot showing the convert confirmation dialog" />
34 +
35 +5. On the new user account creation page, in the "Username" field, type the name of your new user account, then click **Submit**.
36 +
37 + <Screenshot src="/organizations/creating-and-managing-organizations/convert-new-username.png" alt="Screenshot showing the convert username dialog" />
38 +
39 +6. On the plan selection page, select either the "Unlimited private packages" paid plan or the "Unlimited public packages" free plan, then click **Buy** or **Create**.
40 +
41 + <>{shared['billing-organization-plans'].image}</>
42 +
43 +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 new
+41
@@ -0,0 +1,41 @@
1 +---
2 +title: Creating an organization
3 +redirect_from:
4 + - /orgs/creating-an-org
5 + - /creating-an-org
6 +---
7 +import shared from '../../../src/shared.js'
8 +
9 +Any npm user can create an organization to manage contributor access to packages governed by the organization.
10 +
11 +<Note>
12 +
13 +**Note:** You need an npm user account to create an organization. To create a user account, visit the [account signup page][acct-signup]".
14 +
15 +</Note>
16 +
17 +1. <>{shared['user-login'].text}</>
18 +
19 + <>{shared['user-login'].image}</>
20 +
21 +1. <>{shared['organization-create'].text}</>
22 +
23 + <>{shared['organization-create'].image}</>
24 +
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 +
27 + <Screenshot src="/organizations/creating-and-managing-organizations/create-name.png" alt="Screenshot showing the new organization name field" />
28 +
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 +
31 + <>{shared['billing-organization-plans'].image}</>
32 +
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, then click **Invite**.
34 +
35 + <Screenshot src="/organizations/creating-and-managing-organizations/create-invite.png" alt="Screenshot showing the invitation options for a new organization" />
36 +
37 +6. Click **Continue**.
38 +
39 + <Screenshot src="/organizations/creating-and-managing-organizations/create-confirm.png" alt="Screenshot showing the new organization confirmation" />
40 +
41 +[acct-signup]: https://www.npmjs.com/signup
content/organizations/creating-and-managing-organizations/deleting-an-organization.mdx new
+17
@@ -0,0 +1,17 @@
1 +---
2 +title: Deleting an organization
3 +redirect_from:
4 + - /deleting-an-org
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +Organizations cannot be deleted from the website or command line interface.
9 +
10 +## Deleting an organization on the public registry
11 +
12 +<>To delete an organization on the public registry, the organization owner should {shared['contact-support'].text}.</>
13 +
14 +## Deleting an organization in npm Enterprise
15 +
16 +<>To delete an organization in npm Enterprise, the npm Enterprise admin should {shared['contact-enterprise-support'].text}.</>
17 +
content/organizations/creating-and-managing-organizations/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: Creating and managing organizations
3 +redirect_from:
4 + - /orgs/creating-and-managing-orgs
5 +---
6 +
7 +<Index />
content/organizations/creating-and-managing-organizations/renaming-an-organization.mdx new
+23
@@ -0,0 +1,23 @@
1 +---
2 +title: Renaming an organization
3 +redirect_from:
4 + - /renaming-an-org
5 +---
6 +
7 +Organizations cannot be renamed from the website or command line interface.
8 +
9 +To rename an organization, as an organization owner, you must manually migrate your existing organization members, teams, and packages to a new organization, then [contact npm Support][contact-support] to have the outdated packages unpublished and the previous organization deleted.
10 +
11 +1. [Create a new organization][org-create] with the name you want. If your old organization is on a paid plan, you must choose a paid plan for the new organization.
12 +2. [Add the members][add-org-members] of your old organization to your new organization.
13 +3. In your new organization, [create teams][create-teams] to match teams in your old organization.
14 +4. Republish packages to the new organization by updating the package scope in its `package.json` file to match the new organizationanization name and running `npm publish`.
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 +
19 +[contact-support]: https://www.npmjs.com/support
20 +[org-create]: creating-an-organization
21 +[add-org-members]: adding-members-to-your-organization
22 +[create-teams]: creating-teams
23 +[pkg-access]: managing-team-access-to-packages
content/organizations/index.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: Organizations
3 +redirect_from:
4 + - /getting-started/working-with-orgs
5 + - /orgs
6 +---
7 +import {Link} from '@primer/components'
8 +import shared from '../../src/shared.js'
9 +
10 +<>Organizations allow teams of contributors to read, write, and public and private packages. Organizations are free when they publish public packages. When organizations publish private packages, an npm Teams subscription is required. For more information on npm Teams pricing, see our <Link href="https://www.npmjs.com/pricing">products page</Link>.</>
11 +
12 +<Index />
content/organizations/managing-organization-members/accepting-or-rejecting-an-organization-invitation.mdx new
+21
@@ -0,0 +1,21 @@
1 +---
2 +title: Accepting or rejecting an organization invitation
3 +redirect_from:
4 + - /accepting-or-rejecting-an-org-invitation
5 +---
6 +
7 +## Accepting an organization invitation
8 +
9 +If you receive an invitation to an organization, you have to accept the invitation over email to be added to the organization.
10 +
11 +You have the option to use a different email address than the one that received the invitation to join the organization.
12 +
13 +1. Click the verification link in the organization invitation email.
14 +
15 +2. You will be prompted to log into your npm user account. If you don't have an npm user account, you can sign up for one.
16 +
17 + <Screenshot src="/organizations/managing-organization-members/accept-invitation.png" alt="Accept organization invitation" />
18 +
19 +## Rejecting an organization invitation
20 +
21 +If you are invited to an organization that you do not want to join, you can let the invitation expire. Organization invitations expire after one week.
content/organizations/managing-organization-members/adding-members-to-your-organization.mdx new
+86
@@ -0,0 +1,86 @@
1 +---
2 +title: Adding members to your organization
3 +redirect_from:
4 + - /adding-members-to-your-org
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +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.
9 +
10 +<Note>
11 +
12 +**npm Enterprise users:** Make sure new users have been added to your enterprise instance before inviting them to an organization within the instance.
13 +
14 +</Note>
15 +
16 +When you add a member to your organization, they are sent an email inviting them to the organization.
17 +
18 +Once the new member [accepts the invitation][accept-invitation], they are:
19 +
20 +- assigned the role of "[member][member-perms]"
21 +- added to the ["developers" team][developers-team]
22 +
23 +If you have a [paid organization][paid-org], as part of an npm Teams plan, you will be billed $7 per month for each new member.
24 +
25 +## Inviting members to your organization
26 +
27 +1. <>{shared['user-login'].text}</>
28 +
29 + <>{shared['user-login'].image}</>
30 +
31 +2. <>{shared['profile-settings'].text}</>
32 +
33 + <>{shared['profile-settings'].image}</>
34 +
35 +3. <>{shared['organization-selection'].text}</>
36 +
37 + <>{shared['organization-selection'].image}</>
38 +
39 +4. <>{shared['organization-members-tab'].text}</>
40 +
41 + <>{shared['organization-members-tab'].image}</>
42 +
43 +5. Click the **Invite Members** button.
44 +
45 + <Screenshot src="/organizations/managing-organization-members/invite-members-button.png" alt="Screenshot of the invite members button" />
46 +
47 +6. In the "Username or email" field, type the username or email address of the person you wish to invite.
48 +
49 + <Screenshot src="/organizations/managing-organization-members/username-or-email-field.png" alt="Screenshot of the username or email field" />
50 +
51 +7. Click **Invite**.
52 +
53 + <Screenshot src="/organizations/managing-organization-members/invite-button.png" alt="Screenshot of the invite button" />
54 +
55 +## Revoking an organization invitation
56 +
57 +As an organization owner, if you've made a mistake in inviting someone to your organization, you can revoke the organization invitation.
58 +
59 +1. <>{shared['user-login'].text}</>
60 +
61 + <>{shared['user-login'].image}</>
62 +
63 +2. <>{shared['profile-settings'].text}</>
64 +
65 + <>{shared['profile-settings'].image}</>
66 +
67 +3. <>{shared['organization-selection'].text}</>
68 +
69 + <>{shared['organization-selection'].image}</>
70 +
71 +4. <>{shared['organization-members-tab'].text}</>
72 +
73 + <>{shared['organization-members-tab'].image}</>
74 +
75 +5. Click the **Invite Members** button.
76 +
77 + <Screenshot src="/organizations/managing-organization-members/invite-members-button.png" alt="Screenshot of the invite members button" />
78 +
79 +6. Under the "Invitations" field, click the **X** next to the name of the user invitation you would like to revoke.
80 +
81 + <Screenshot src="/organizations/managing-organization-members/revoke-invitation.png" alt="Screenshot of the revoke invitation button" />
82 +
83 +[accept-invitation]: accepting-or-rejecting-an-org-invitation
84 +[member-perms]: org-roles-and-permissions
85 +[developers-team]: about-developers-team
86 +[paid-org]: upgrading-to-a-paid-org-plan
content/organizations/managing-organization-members/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: Managing organization members
3 +redirect_from:
4 + - /orgs/managing-org-members
5 +---
6 +
7 +<Index />
content/organizations/managing-organization-members/managing-organization-permissions.mdx new
+31
@@ -0,0 +1,31 @@
1 +---
2 +title: Managing organization permissions
3 +redirect_from:
4 + - /managing-org-permissions
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +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.
9 +
10 +1. <>{shared['user-login'].text}</>
11 +
12 + <>{shared['user-login'].image}</>
13 +
14 +2. <>{shared['profile-settings'].text}</>
15 +
16 + <>{shared['profile-settings'].image}</>
17 +
18 +3. <>{shared['organization-selection'].text}</>
19 +
20 + <>{shared['organization-selection'].image}</>
21 +
22 +4. <>{shared['organization-members-tab'].text}</>
23 +
24 + <>{shared['organization-members-tab'].image}</>
25 +
26 +5. In the list of organization members, find the member whose role you want to change.
27 +
28 +6. In the member row, to select the new role of the organization member, click **member**, **admin**, or **owner**.
29 +
30 + <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 new
+33
@@ -0,0 +1,33 @@
1 +---
2 +title: Organization roles and permissions
3 +redirect_from:
4 + - /org-roles-and-permissions
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +There are three roles in an organization:
9 +
10 +- **Owner:** Users who manage organization members and billing.
11 +- **Admin:** Users who manage team membership and package access.
12 +- **Member:** Users who create and publish packages in the organization scope.
13 +
14 +<><strong>On the public registry, you cannot remove the last owner from an organization.</strong> To delete an organization, {shared['contact-support'].text}.</>
15 +
16 +<Note>
17 +<><strong>npm Enterprise users:</strong> If you are using npm Enterprise, deactivating the only owner of an organization will cause that organization to be ownerless. If you have deactivated the last owner of an organization on an npm Enterprise instance, {shared['contact-enterprise-support'].text}.</>
18 +</Note>
19 +
20 +| Action | **Owner** | **Admin** | **Member** |
21 +|:------------------------------------------------------|:---------:|:---------:|:----------:|
22 +| Manage organization billing | X | | |
23 +| Add members to the organization | X | | |
24 +| Remove members from the organization | X | | |
25 +| Rename an organization | X | | |
26 +| Delete an organization | X | | |
27 +| Change any organization member's role | X | | |
28 +| Create teams | X | X | |
29 +| Delete teams | X | X | |
30 +| Add any member to any team | X | X | |
31 +| Remove any member from any team | X | X | |
32 +| Manage team package access | X | X | |
33 +| Create and publish packages in the organization scope | X | X | X |
content/organizations/managing-organization-members/removing-members-from-your-organization.mdx new
+38
@@ -0,0 +1,38 @@
1 +---
2 +title: Removing members from your organization
3 +redirect_from:
4 + - /removing-members-from-your-org
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +As an organization owner, you can remove members from your organization if they are longer collaborating on packages owned or governed by your organization.
9 +
10 +If you remove a member from an npm Teams subscription (a paid organization), then they will lose access to your organization's private packages, and the credit card on file for your organization will not be charged for them on the next billing cycle.
11 +
12 +<Note>
13 +
14 +**Note:** Members are not notified when you remove them from your organization.
15 +
16 +</Note>
17 +
18 +1. <>{shared['user-login'].text}</>
19 +
20 + <>{shared['user-login'].image}</>
21 +
22 +2. <>{shared['profile-settings'].text}</>
23 +
24 + <>{shared['profile-settings'].image}</>
25 +
26 +3. <>{shared['organization-selection'].text}</>
27 +
28 + <>{shared['organization-selection'].image}</>
29 +
30 +4. <>{shared['organization-members-tab'].text}</>
31 +
32 + <>{shared['organization-members-tab'].image}</>
33 +
34 +5. In the list of organization members, find the member you want to remove.
35 +
36 +6. At the end of the member row, click **X**.
37 +
38 + <Screenshot src="/organizations/managing-organization-members/remove-member.png" alt="Screenshot of the remove member dialog" />
content/organizations/managing-organization-packages/about-organization-scopes-and-packages.mdx new
+22
@@ -0,0 +1,22 @@
1 +---
2 +title: About organization scopes and packages
3 +redirect_from:
4 + - /about-org-scopes-and-packages
5 +---
6 +
7 +Every organization is granted an organization scope, a unique namespace for packages owned by the organization that matches the organization name. For example, an organization named "wombat" would have the scope `@wombat`.
8 +
9 +You can use scopes to:
10 +
11 +- Maintain a fork of a package: `@wombat/request`.
12 +- Avoid name disputes with popular names: `@wombat/web`.
13 +- Easily find packages in the same namespace
14 +
15 +Packages in a scope must follow the same [naming guidelines][name-guidelines] as unscoped packages.
16 +
17 +## Managing unscoped packages
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 +
22 +[name-guidelines]: /files/package.json#name
content/organizations/managing-organization-packages/configuring-your-npm-client-with-your-organization-settings.mdx new
+88
@@ -0,0 +1,88 @@
1 +---
2 +title: Configuring your npm client with your organization settings
3 +redirect_from:
4 + - /configuring-your-npm-client-with-your-org-settings
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +As an organization member, you can configure your npm client to:
9 +
10 +- make a single package or all new packages you create locally use your organization's scope
11 +- make a single package or all new packages you create locally have default public visibility
12 +
13 +Before configuring your npm client, you must [install npm][install-npm].
14 +
15 +## Configuring your npm client to use your organization's scope
16 +
17 +If you will be publishing packages with your organization's scope often, you can add your organization's scope to your global `.npmrc` configuration file.
18 +
19 +### Setting your organization scope for all new packages
20 +
21 +<Note>
22 +
23 +**Note:** Setting the organization scope using the steps below will only set the scope for new packages; for existing packages, you will need to update the `name` field in `package.json`.
24 +
25 +</Note>
26 +
27 +On the command line, run the following command, replacing &lt;org-name&gt; with the name of your organization:
28 +
29 +```
30 +npm config set scope <org-name> --global
31 +```
32 +
33 +For packages you do not want to publish with your organization's scope, you must manually edit the package's `package.json` to remove the organization scope from the `name` field.
34 +
35 +### Setting your organization scope for a single package
36 +
37 +1. On the command line, navigate to the package directory.
38 +
39 + ```
40 + cd /path/to/package
41 + ```
42 +
43 +2. Run the following command, replacing &lt;org-name&gt; with the name of your organization:
44 +
45 + ```
46 + npm config set scope <org-name>
47 + ```
48 +
49 +## Changing default package visibility to public
50 +
51 +By default, publishing a scoped package with `npm publish` will publish the package as private. If you are a member of an organization on the free organization plan, or are on the paid organization plan but want to publish a scoped package as public, you must pass the `--access public` flag:
52 +
53 +```
54 +npm publish --access public
55 +```
56 +
57 +### Setting package visibility to public for a single package
58 +
59 +You can set a single package to pass `--access public ` to every `npm publish` command that you issue for that package.
60 +
61 +1. On the command line, navigate to the package directory.
62 +
63 + ```
64 + cd /path/to/package
65 +
66 +2. Run the following command:
67 +
68 + ```
69 + npm config set access public
70 + ```
71 +
72 +### Setting package visibility to public for all packages
73 +
74 +You can set all packages to pass `--access public ` to every `npm publish` command that you issue for that package.
75 +
76 +<Note>
77 +
78 +**Warning:** Setting packages access to `public` in your global `.npmrc` will affect all packages you create, including packages in your personal account scope, as well as packages scoped to your organization.
79 +
80 +</Note>
81 +
82 +On the command line, run the following command:
83 +
84 +```
85 +npm config set access public --global
86 +```
87 +
88 +[install-npm]: downloading-and-installing-node-js-and-npm
content/organizations/managing-organization-packages/creating-and-publishing-an-organization-scoped-package.mdx new
+52
@@ -0,0 +1,52 @@
1 +---
2 +title: Creating and publishing an organization scoped package
3 +redirect_from:
4 + - /creating-and-publishing-an-org-scoped-package
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +As an organization member, you can create and publish public and private packages within the organization's scope.
9 +
10 +## Creating an organization scoped package
11 +
12 +1. On the command line, make a directory with the name of the package you would like to create.
13 +
14 + ```
15 + mkdir /path/to/package/directory
16 + ```
17 +
18 +2. Navigate to the newly-created package directory.
19 +
20 +3. To create an organization scoped package, on the command line, run:
21 +
22 + ```
23 + npm init --scope=<your_org_name>
24 + ```
25 +
26 +4. To verify the package is using your organization scope, in a text editor, open the package's `package.json` file and check that the name is `@your_org_name/<pkg_name>`, replacing `your_org_name` with the name of your organization.
27 +
28 +## Publishing a private organization scoped package
29 +
30 +By default, `npm publish` will publish a scoped package as private.
31 +
32 +By default, any scoped package is published as private. However, if you have an organization that does not have the Private Packages feature, `npm publish` will fail unless you pass the `access` flag.
33 +
34 +1. On the command line, navigate to the package directory.
35 +
36 +2. Run `npm publish`.
37 +
38 +Private packages will say `private` below the package name on the npm website.
39 +
40 +<>{shared['organization-package-private'].image}</>
41 +
42 +## Publishing a public organization scoped package
43 +
44 +To publish an organization scoped package as public, use `npm publish --access public`.
45 +
46 +1. On the command line, navigate to the package directory.
47 +
48 +2. Run `npm publish --access public`.
49 +
50 +Public packages will say `public` below the package name on the npm website.
51 +
52 +<>{shared['organization-package-public'].image}</>
content/organizations/managing-organization-packages/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: Managing organization packages
3 +redirect_from:
4 + - /orgs/managing-org-packages
5 +---
6 +
7 +<Index />
content/organizations/managing-teams/about-developers-team.mdx new
+31
@@ -0,0 +1,31 @@
1 +---
2 +title: About the developers team
3 +---
4 +
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
10 +
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 informations, see "[Managing team access to organization packages][pkg-access]".
15 +
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.
18 +
19 +<Note>
20 +
21 +**Note:** The **developers** team can no longer be removed from an organization for the following reasons:
22 +
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.
25 +
26 +</Note>
27 +
28 +[pkg-access]: managing-team-access-to-org-packages
29 +[create-team]: creating-teams
30 +[`maintainers` field]: /files/package.json#people-fields-author-contributors
31 +[`package.json`]: /files/package.json
content/organizations/managing-teams/adding-organization-members-to-teams.mdx new
+63
@@ -0,0 +1,63 @@
1 +---
2 +title: Adding organization members to teams
3 +redirect_from:
4 + - /adding-org-members-to-teams
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +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.
9 +
10 +<Note>
11 +
12 +**Note:** An npm user must be a member of your organization before you can add them to a team. To add a member to your organization, see "[Adding members to your organization][add-organization-members]".
13 +
14 +</Note>
15 +
16 +1. <>{shared['user-login'].text}</>
17 +
18 + <>{shared['user-login'].image}</>
19 +
20 +2. <>{shared['profile-settings'].text}</>
21 +
22 + <>{shared['profile-settings'].image}</>
23 +
24 +3. <>{shared['organization-selection'].text}</>
25 +
26 + <>{shared['organization-selection'].image}</>
27 +
28 +4. <>{shared['organization-teams-tab'].text}</>
29 +
30 + <>{shared['organization-teams-tab'].image}</>
31 +
32 +5. Beside the team you want to add members to, click **Members**.
33 +
34 + <Screenshot src="/organizations/managing-teams/team-members.png" alt="Screenshot of the team members button" />
35 +
36 +6. In the "Username" field, type the npm username of the organization member you would like to add to your team.
37 +
38 + <Screenshot src="/organizations/managing-teams/team-member-select.png" alt="Screenshot of the team member selection" />
39 +
40 +7. Click **+ Add User**.
41 +
42 + <Screenshot src="/organizations/managing-teams/team-member-add-button.png" alt="Screenshot of the team member add button" />
43 +
44 +<Note>
45 +
46 +**Note:** organization members are not notified when they are added to a team. We recommend telling the organization member you have added them to a team.
47 +
48 +</Note>
49 +
50 +## Managing teams from the CLI
51 +
52 +If you would like to manage the membership of your team from
53 +the command line interface (CLI), you can use:
54 +
55 +```
56 +npm team
57 +```
58 +
59 +For more information, see the [CLI documentation on teams][team-cli].
60 +
61 +
62 +[add-organization-members]: adding-members-to-your-organization
63 +[team-cli]: /cli/team
content/organizations/managing-teams/creating-teams.mdx new
+42
@@ -0,0 +1,42 @@
1 +---
2 +title: Creating teams
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +As an organization owner or team admin, you can create teams to manage access to sets of packages governed by your organization.
7 +
8 +<Note>
9 +
10 +**Note:** Team names cannot be changed. To "rename" a team, you must delete the team and recreate it.
11 +
12 +</Note>
13 +
14 +1. <>{shared['user-login'].text}</>
15 +
16 + <>{shared['user-login'].image}</>
17 +
18 +2. <>{shared['profile-settings'].text}</>
19 +
20 + <>{shared['profile-settings'].image}</>
21 +
22 +3. <>{shared['organization-selection'].text}</>
23 +
24 + <>{shared['organization-selection'].image}</>
25 +
26 +4. <>{shared['organization-teams-tab'].text}</>
27 +
28 + <>{shared['organization-teams-tab'].image}</>
29 +
30 +5. In the "Name" and "Description" fields, type a team name and helpful description. Team names must be lower case and cannot contain spaces or punctuation.
31 +
32 + <Screenshot src="/organizations/managing-teams/team-name-description.png" alt="Screenshot of team name and description" />
33 +
34 +6. Click **Make it so**.
35 +
36 + <Screenshot src="/organizations/managing-teams/team-creation-confirmation.png" alt="Screenshot of the team creation confirmation button" />
37 +
38 +<Note>
39 +
40 +**Note:** New teams do not have members or package access by default. Once you create a team, add packages and members from the "Teams" tab.
41 +
42 +</Note>
content/organizations/managing-teams/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: Managing teams
3 +redirect_from:
4 + - /orgs/managing-teams
5 +---
6 +
7 +<Index />
content/organizations/managing-teams/managing-team-access-to-organization-packages.mdx new
+134
@@ -0,0 +1,134 @@
1 +---
2 +title: Managing team access to organization packages
3 +redirect_from:
4 + - /managing-team-access-to-org-packages
5 + - /managing-team-access-to-packages
6 +---
7 +import shared from '../../../src/shared.js'
8 +
9 +As an organization owner or team admin, you can add or remove package access to or from teams in your organization.
10 +
11 +## Adding package access to a team
12 +
13 +### Adding package access to a team on the web
14 +
15 +1. <>{shared['user-login'].text}</>
16 +
17 + <>{shared['user-login'].image}</>
18 +
19 +2. <>{shared['profile-settings'].text}</>
20 +
21 + <>{shared['profile-settings'].image}</>
22 +
23 +3. <>{shared['organization-selection'].text}</>
24 +
25 + <>{shared['organization-selection'].image}</>
26 +
27 +4. <>{shared['organization-teams-tab'].text}</>
28 +
29 + <>{shared['organization-teams-tab'].image}</>
30 +
31 +5. Beside the team to which you want to add package access, click **Packages**.
32 +
33 + <Screenshot src="/organizations/managing-teams/team-packages-button.png" alt="Screenshot of the packages button" />
34 +
35 +6. On the "Add Packages" page, in the "Package" field, type the name of the package and select from the dropdown menu.
36 +
37 + <Screenshot src="/organizations/managing-teams/team-package-select.png" alt="Screenshot of the package selection" />
38 +
39 +7. Click **+ Add Existing Package**.
40 +
41 + <Screenshot src="/organizations/managing-teams/team-package-add-existing-button.png" alt="Screenshot of the add package button" />
42 +
43 +8. Beside the package name, click **read** or **read/write** to set the team permissions for the package.
44 +
45 + <Screenshot src="/organizations/managing-teams/team-package-permissions.png" alt="Screenshot of the team package permission option" />
46 +
47 +### Adding package access to a team using the CLI
48 +
49 +As an organization owner or team admin, you can use the the CLI `access` command to add package access to a team on
50 +the command line:
51 +
52 +```
53 +npm access grant <read-only|read-write> <org:team> [<package>]
54 +```
55 +
56 +For more information, see "[npm-access][access-cli]".
57 +
58 +## Removing package access from a team
59 +
60 +### Removing package access from a team on the web
61 +
62 +1. <>{shared['user-login'].text}</>
63 +
64 + <>{shared['user-login'].image}</>
65 +
66 +2. <>{shared['profile-settings'].text}</>
67 +
68 + <>{shared['profile-settings'].image}</>
69 +
70 +3. <>{shared['organization-selection'].text}</>
71 +
72 + <>{shared['organization-selection'].image}</>
73 +
74 +4. <>{shared['organization-teams-tab'].text}</>
75 +
76 + <>{shared['organization-teams-tab'].image}</>
77 +
78 +5. Beside the team from which you want to remove package access, click **Packages**.
79 +
80 + <Screenshot src="/organizations/managing-teams/team-packages-button.png" alt="Screenshot of the packages button" />
81 +
82 +6. Beside the name of the package from which you want to remove access, click **x**.
83 +
84 + <Screenshot src="/organizations/managing-teams/team-package-remove-button.png" alt="Screenshot of the remove package button" />
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 the CLI `access` command to revoke package access from a team on
89 +the command line:
90 +
91 +```
92 +npm access revoke <org:team> [<package>]
93 +```
94 +For more information, see "[npm-access][access-cli]".
95 +
96 +## Changing package access for a team
97 +
98 +### Changing package access for a team on the web
99 +
100 +1. <>{shared['user-login'].text}</>
101 +
102 + <>{shared['user-login'].image}</>
103 +
104 +2. <>{shared['profile-settings'].text}</>
105 +
106 + <>{shared['profile-settings'].image}</>
107 +
108 +3. <>{shared['organization-selection'].text}</>
109 +
110 + <>{shared['organization-selection'].image}</>
111 +
112 +4. <>{shared['organization-teams-tab'].text}</>
113 +
114 + <>{shared['organization-teams-tab'].image}</>
115 +
116 +5. Beside the team from which you want to remove package access, click **Packages**.
117 +
118 + <Screenshot src="/organizations/managing-teams/team-packages-button.png" alt="Screenshot of the packages button" />
119 +
120 +6. Beside the package name, click **read** or **read/write** to set the team permissions for the package.
121 +
122 + <Screenshot src="/organizations/managing-teams/team-package-change-permissions.png" alt="Screenshot of the change package permission option" />
123 +
124 +### Changing package access for a team from the CLI
125 +
126 +As an organization owner or team admin, you can change package access for a team from the command line:
127 +
128 +```
129 +npm access
130 +```
131 +For more information, see the [`npm-access` CLI documentation][access-cli].
132 +
133 +
134 +[access-cli]: /cli/access
content/organizations/managing-teams/removing-organization-members-from-teams.mdx new
+38
@@ -0,0 +1,38 @@
1 +---
2 +title: Removing organization members from teams
3 +redirect_from:
4 + - /removing-org-members-from-teams
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +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.
9 +
10 +1. <>{shared['user-login'].text}</>
11 +
12 + <>{shared['user-login'].image}</>
13 +
14 +2. <>{shared['profile-settings'].text}</>
15 +
16 + <>{shared['profile-settings'].image}</>
17 +
18 +3. <>{shared['organization-selection'].text}</>
19 +
20 + <>{shared['organization-selection'].image}</>
21 +
22 +4. <>{shared['organization-teams-tab'].text}</>
23 +
24 + <>{shared['organization-teams-tab'].image}</>
25 +
26 +5. In the list of team members, find the member you want to remove.
27 +
28 +6. In the member row, to remove the member from the team, click **X**.
29 +
30 + <Screenshot src="/organizations/managing-teams/team-member-remove-button.png" alt="Screenshot of the team member remove button" />
31 +
32 +<Note>
33 +
34 +**Note: Removing a member from a team, even if it is the only team they are a member of, will not remove them from the organization.** To remove a member from the organization, see "[Removing members from your organization][removing-organization-members]".
35 +
36 +</Note>
37 +
38 +[removing-organization-members]: removing-members-from-your-organization
content/organizations/managing-teams/removing-teams.mdx new
+36
@@ -0,0 +1,36 @@
1 +---
2 +title: Removing teams
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +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.
7 +
8 +<Note>
9 +<><strong>Note:</strong> if you remove all teams referencing a particular package, it will be orphaned and you will lose access to it. If this happens, {shared['contact-support'].text}.</>
10 +</Note>
11 +
12 +1. <>{shared['user-login'].text}</>
13 +
14 + <>{shared['user-login'].image}</>
15 +
16 +2. <>{shared['profile-settings'].text}</>
17 +
18 + <>{shared['profile-settings'].image}</>
19 +
20 +3. <>{shared['organization-selection'].text}</>
21 +
22 + <>{shared['organization-selection'].image}</>
23 +
24 +4. <>{shared['organization-teams-tab'].text}</>
25 +
26 + <>{shared['organization-teams-tab'].image}</>
27 +
28 +5. Beside the name of the team you want to remove, click **X**.
29 +
30 + <Screenshot src="/organizations/managing-teams/team-remove.png" alt="Screenshot of the remove team button" />
31 +
32 +<Note>
33 +
34 +**Note:** You cannot remove the developers team, [learn more about the developers team](/about-developers-team).
35 +
36 +</Note>
content/organizations/paying-for-your-organization/downgrading-to-a-free-organization-plan.mdx new
+43
@@ -0,0 +1,43 @@
1 +---
2 +title: Downgrading to a free organization plan
3 +redirect_from:
4 + - /downgrading-to-a-free-org-plan
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +<Note>
9 +
10 +**Note:** This article only applies to users of the public npm registry.
11 +
12 +</Note>
13 +
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 +
16 +**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]".
17 +
18 +1. <>{shared['user-login'].text}</>
19 +
20 + <>{shared['user-login'].image}</>
21 +
22 +2. <>{shared['profile-settings'].text}</>
23 +
24 + <>{shared['profile-settings'].image}</>
25 +
26 +3. In the left sidebar, click the name of the organization you want to downgrade.
27 +
28 + <>{shared['organization-selection'].image}</>
29 +
30 +4. <>{shared['organization-billing-tab'].text}</>
31 +
32 + <>{shared['organization-billing-tab'].image}</>
33 +
34 +5. <>{shared['billing-downgrade-selection'].text}</>
35 +
36 + <>{shared['billing-downgrade-selection'].image}</>
37 +
38 +6. <>{shared['billing-downgrade-confirm'].text}</>
39 +
40 + <>{shared['billing-downgrade-confirm'].image}</>
41 +
42 +
43 +[remove-members]: removing-members-from-your-org
content/organizations/paying-for-your-organization/index.mdx new
+7
@@ -0,0 +1,7 @@
1 +---
2 +title: Paying for your organization
3 +redirect_from:
4 + - /orgs/paying-for-your-org
5 +---
6 +
7 +<Index />
content/organizations/paying-for-your-organization/updating-organization-billing-settings.mdx new
+104
@@ -0,0 +1,104 @@
1 +---
2 +title: Updating organization billing settings
3 +redirect_from:
4 + - /updating-org-billing-settings
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +<Note>
9 +
10 +**Note:** This article only applies to users of the public npm registry.
11 +
12 +</Note>
13 +
14 +As an owner of an npm Teams subscription, a paid organization plan, you can update the credit card used to pay for your plan. Updating your credit card will not change your billing cycle date, and the new credit card will be charged on the next billing cycle.
15 +
16 +<Note>
17 +<><strong>Note:</strong> If the credit card used to pay for your npm Teams subscription or your paid organization plan expires, or we are otherwise are unable to charge your card, you have a grace period of {shared['grace-period'].text} to update the card.</>
18 +</Note>
19 +
20 +## Updating credit card information
21 +
22 +1. <>{shared['user-login'].text}</>
23 +
24 + <>{shared['user-login'].image}</>
25 +
26 +2. <>{shared['profile-settings'].text}</>
27 +
28 + <>{shared['profile-settings'].image}</>
29 +
30 +3. In the left sidebar, click the name of the organization whose credit card information you want to change.
31 +
32 + <>{shared['organization-selection'].image}</>
33 +
34 +4. <>{shared['organization-billing-tab'].text}</>
35 +
36 + <>{shared['organization-billing-tab'].image}</>
37 +
38 +5. <>{shared['payment-info'].text}</>
39 +
40 + <>{shared['payment-info'].image}</>
41 +
42 +6. <>{shared['billing-form'].text}</>
43 +
44 + <>{shared['billing-form'].image}</>
45 +
46 +7. <>{shared['payment-info-button'].text}</>
47 +
48 + <>{shared['payment-info-button'].image}</>
49 +
50 +8. <>{shared['billing-creditcard-form'].text}</>
51 +
52 + <>{shared['billing-creditcard-form'].image}</>
53 +
54 +9. <>{shared['payment-remember-me'].text}</>
55 +
56 + <>{shared['payment-remember-me'].image}</>
57 +
58 +10. <>{shared['billing-update-card'].text}</>
59 +
60 + <>{shared['billing-update-card'].image}</>
61 +
62 +## Updating billing receipt email and extra receipt information
63 +
64 +As an organization owner, you can update the email address used for receipts, and add extra information to the receipt for your paid organization plan, such as your business name, VAT identification number, or address of record. Updated billing information will appear on all receipts immediately.
65 +
66 +<Note>
67 +
68 +**Note:** The billing email is used for receipts only and is not required to match the email address of the person whose card is used to pay for the organization.
69 +
70 +</Note>
71 +
72 +1. <>{shared['user-login'].text}</>
73 +
74 + <>{shared['user-login'].image}</>
75 +
76 +2. <>{shared['profile-settings'].text}</>
77 +
78 + <>{shared['profile-settings'].image}</>
79 +
80 +3. In the left sidebar, click the name of the organization whose billing receipt information you want to change.
81 +
82 + <>{shared['organization-selection'].image}</>
83 +
84 +4. <>{shared['organization-billing-tab'].text}</>
85 +
86 +5. <>{shared['billing-history'].text}</>
87 +
88 + <>{shared['billing-history'].image}</>
89 +
90 +6. <>{shared['billing-receipt-settings'].text}</>
91 +
92 + <>{shared['billing-receipt-settings'].image}</>
93 +
94 +7. <>{shared['billing-extra-info'].text}</>
95 +
96 + <>{shared['billing-extra-info'].image}</>
97 +
98 +8. <>{shared['billing-extra-receipt-email'].text}</>
99 +
100 + <>{shared['billing-extra-receipt-email'].image}</>
101 +
102 +9. <>{shared['billing-extra-save'].text}</>
103 +
104 + <>{shared['billing-extra-save'].image}</>
content/organizations/paying-for-your-organization/upgrading-to-a-paid-organization-plan.mdx new
+62
@@ -0,0 +1,62 @@
1 +---
2 +title: Upgrading to a paid organization plan
3 +redirect_from:
4 + - /upgrading-to-a-paid-org-plan
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +<Note>
9 +
10 +**Note:** This article only applies to users of the public npm registry.
11 +
12 +</Note>
13 +
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 +
16 +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**
17 +
18 +Newly added members to an organization are always billed during the next billing cycle. For more information, see "[Adding members to your organization][add-members]".
19 +
20 +**Note:** Your paid plan and billing cycle will start when you submit your credit card information, and you will be charged for the first month immediately.
21 +
22 +1. <>{shared['user-login'].text}</>
23 +
24 + <>{shared['user-login'].image}</>
25 +
26 +2. <>{shared['profile-settings'].text}</>
27 +
28 + <>{shared['profile-settings'].image}</>
29 +
30 +3. In the left sidebar, click the name of the organization you want to upgrade.
31 +
32 + <>{shared['organization-selection'].image}</>
33 +
34 +4. <>{shared['organization-billing-tab'].text}</>
35 +
36 + <>{shared['organization-billing-tab'].image}</>
37 +
38 +5. Under "change plan", click **Upgrade Plan ($7/User)**.
39 +
40 +6. Under "Want to upgrade?", click **Enable Private Publishing for $7/mo**.
41 +
42 +7. <>{shared['billing-form'].text}</>
43 +
44 + <>{shared['billing-form'].image}</>
45 +
46 +8. <>{shared['payment-info-button'].text}</>
47 +
48 + <>{shared['payment-info-button'].image}</>
49 +
50 +9. <>{shared['billing-creditcard-form'].text}</>
51 +
52 + <>{shared['billing-creditcard-form'].image}</>
53 +
54 +10. <>{shared['payment-remember-me'].text}</>
55 +
56 + <>{shared['payment-remember-me'].image}</>
57 +
58 +10. Click **Pay** for the monthly amount. The monthly amount will be the number of members in your organization multiplied by $7.
59 +
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 new
+108
@@ -0,0 +1,108 @@
1 +---
2 +title: Viewing, downloading, and emailing receipts for your organization
3 +redirect_from:
4 + - /viewing-downloading-and-emailing-receipts-for-your-org
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +<Note>
9 +
10 +**Note:** This article only applies to users of the public npm registry.
11 +
12 +</Note>
13 +
14 +As an organization owner, you can view, download, and email receipts for the complete billing history of your organization.
15 +
16 +## Viewing receipts
17 +
18 +1. <>{shared['user-login'].text}</>
19 +
20 + <>{shared['user-login'].image}</>
21 +
22 +2. <>{shared['profile-settings'].text}</>
23 +
24 + <>{shared['profile-settings'].image}</>
25 +
26 +3. In the left sidebar, click the name of the organization whose billing receipts you want to view.
27 +
28 + <>{shared['organization-selection'].image}</>
29 +
30 +4. <>{shared['organization-billing-tab'].text}</>
31 +
32 + <>{shared['organization-billing-tab'].image}</>
33 +
34 +5. <>{shared['billing-history'].text}</>
35 +
36 + <>{shared['billing-history'].image}</>
37 +
38 +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.
39 +
40 +6. <>{shared['billing-view'].text}</>
41 +
42 + <>{shared['billing-view'].image}</>
43 +
44 +## Downloading receipts
45 +
46 +1. <>{shared['user-login'].text}</>
47 +
48 + <>{shared['user-login'].image}</>
49 +
50 +2. <>{shared['profile-settings'].text}</>
51 +
52 + <>{shared['profile-settings'].image}</>
53 +
54 +3. In the left sidebar, click the name of the organization whose billing receipts you want to download.
55 +
56 + <>{shared['organization-selection'].image}</>
57 +
58 +4. <>{shared['organization-billing-tab'].text}</>
59 +
60 + <>{shared['organization-billing-tab'].image}</>
61 +
62 +5. <>{shared['billing-history'].text}</>
63 +
64 + <>{shared['billing-history'].image}</>
65 +
66 +6. <>{shared['billing-download'].text}</>
67 +
68 + <>{shared['billing-download'].image}</>
69 +
70 +7. <>{shared['billing-download-checked'].text}</>
71 +
72 + <>{shared['billing-download-checked'].image}</>
73 +
74 +## Emailing receipts
75 +
76 +1. <>{shared['user-login'].text}</>
77 +
78 + <>{shared['user-login'].image}</>
79 +
80 +2. <>{shared['profile-settings'].text}</>
81 +
82 + <>{shared['profile-settings'].image}</>
83 +
84 +3. In the left sidebar, click the name of the organization whose billing receipts you want to email.
85 +
86 + <>{shared['organization-selection'].image}</>
87 +
88 +4. <>{shared['organization-billing-tab'].text}</>
89 +
90 + <>{shared['organization-billing-tab'].image}</>
91 +
92 +5. <>{shared['billing-history'].text}</>
93 +
94 + <>{shared['billing-history'].image}</>
95 +
96 +6. <>{shared['billing-email'].text}</>
97 +
98 + <>{shared['billing-email'].image}</>
99 +
100 +7. <>{shared['billing-email-checked'].text}</>
101 +
102 + <>{shared['billing-email-checked'].image}</>
103 +
104 +8. <>{shared['billing-email-receipt'].text}</>
105 +
106 + <>{shared['billing-email-receipt'].image}</>
107 +
108 +9. Click **Send**.
content/packages-and-modules/contributing-packages-to-the-registry/about-package-readme-files.mdx new
+37
@@ -0,0 +1,37 @@
1 +---
2 +title: About package README files
3 +---
4 +
5 +To help others find your packages on npm and have a good experience using your code in their projects, we recommend including a README file in your package directory. Your README file may include directions for installing, configuring, and using the code in your package, as well as any other information a user may find helpful. The README file will be shown on the package page.
6 +
7 +An npm package README file must be in the root-level directory of the package.
8 +
9 +## Creating and adding a README.md file to a package
10 +
11 +1. In a text editor, in your package root directory, create a file called `README.md`.
12 +2. In the `README.md` file, add useful information about your package.
13 +3. Save the `README.md` file.
14 +
15 +<Note>
16 +
17 +**Note:** The file extension `.md` indicates a Markdown file. For more information about Markdown, see the GitHub Guide "<a href="https://guides.github.com/features/mastering-markdown/#what">Mastering Markdown</a>".
18 +
19 +</Note>
20 +
21 +## Updating an existing package README file
22 +
23 +The README file will only be updated on the package page when you publish a new version of your package. To update your README file:
24 +
25 +1. In a text editor, update the contents of the `README.md` file.
26 +
27 +2. Save the `README.md` file.
28 +
29 +3. On the command line, in the package root directory, run the following commands:
30 +
31 + ```
32 + npm version patch
33 + npm publish
34 + ```
35 +
36 +
37 +[markdown-link]: https://guides.github.com/features/mastering-markdown/#what
content/packages-and-modules/contributing-packages-to-the-registry/about-semantic-versioning.mdx new
+56
@@ -0,0 +1,56 @@
1 +---
2 +title: About semantic versioning
3 +redirect_from:
4 + - /getting-started/semantic-versioning/
5 +---
6 +
7 +To keep the JavaScript ecosystem healthy, reliable, and secure, every time you make significant updates to an npm package you own, we recommend publishing a new version of the package with an updated version number in the [`package.json` file][pkg-json] that follows the [semantic versioning spec][semver-org]. Following the semantic versioning spec helps other developers who depend on your code understand the extent of changes in a given version, and adjust their own code if necessary.
8 +
9 +<div class="note">
10 +
11 +<span class="bold">Note:</span> If you introduce a change that breaks a package dependency, we strongly recommend incrementing the version <span class="bold">major number</span>; see below for details.
12 +
13 +</div>
14 +
15 +## Incrementing semantic versions in published packages
16 +
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 +|-------------|-------|------|----------------|
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 |
24 +| Changes that break backward compatibility | Major release | Increment the first digit and reset middle and last digits to zero | 2.0.0 |
25 +
26 +## Using semantic versioning to specify update types your package can accept
27 +
28 +You can specify which update types your package can accept from dependencies in your package's `package.json` file.
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`
35 +
36 +For more information on semantic versioning syntax, see the [npm semver calculator][semver-calc].
37 +
38 +### Example
39 +
40 +```json
41 +
42 +"dependencies": {
43 + "my_dep": "^1.0.0",
44 + "another_dep": "~2.2.0"
45 +},
46 +```
47 +
48 +## Resources
49 +
50 +<iframe src="https://www.youtube.com/embed/kK4Meix58R4" frameborder="0" allowfullscreen></iframe>
51 +
52 +
53 +[semver-calc]: https://semver.npmjs.com/
54 +[pkg-json]: creating-a-package-json-file
55 +[semver-org]: http://semver.org/
56 +[semver-video]: https://www.youtube.com/embed/kK4Meix58R4
content/packages-and-modules/contributing-packages-to-the-registry/adding-dist-tags-to-packages.mdx new
+65
@@ -0,0 +1,65 @@
1 +---
2 +title: Adding dist-tags to packages
3 +redirect_from:
4 + - /getting-started/using-tags/
5 +---
6 +
7 +Distribution tags (dist-tags) are human-readable labels that you can use to organize and label different versions of packages you publish. dist-tags supplement [semantic versioning][semver]. In addition to being more human-readable than semantic version numbering, tags allow publishers to distribute their packages more effectively.
8 +
9 +For more information, see the [`dist-tag` CLI documentation][dist-tag].
10 +
11 +<Note>
12 +
13 +**Note:** Since dist-tags share a namespace with semantic versions, avoid dist-tags that conflict with existing version numbers. We recommend avoiding dist-tags that start with a number or the letter "v".
14 +
15 +</Note>
16 +
17 +## Publishing a package with a dist-tag
18 +
19 +By default, running `npm publish` will tag your package with the `latest` dist-tag. To use another dist-tag, use the `--tag` flag when publishing.
20 +
21 +1. On the command line, navigate to the root directory of your package.
22 +
23 + ```
24 + cd /path/to/package
25 + ```
26 +
27 +2. Run the following command, replacing `<tag>` with the tag you want to use:
28 +
29 + ```
30 + npm publish --tag <tag>
31 + ```
32 +
33 +### Example
34 +
35 +To publish a package with the "beta" dist-tag, on the command line, run the following command in the root directory of your package:
36 +
37 +```
38 +npm publish --tag beta
39 +```
40 +
41 +## Adding a dist-tag to a specific version of your package
42 +
43 +1. On the command line, navigate to the root directory of your package.
44 +
45 + ```
46 + cd /path/to/package
47 + ```
48 +
49 +2. Run the following command, replacing `<package_name>` with the name of your package, `<version>` with your package version number, and `<tag>` with the distribution tag:
50 +
51 + ```
52 + npm dist-tag add <package-name>@<version> [<tag>]
53 + ```
54 +
55 +### Example
56 +
57 +To add the "stable" tag to the 1.4.0 version of the "example-package" package, you would run the following command:
58 +
59 +```
60 +npm dist-tag add example-package@1.4.0 stable
61 +```
62 +
63 +
64 +[semver]: about-semantic-versioning
65 +[dist-tag]: /cli/dist-tag
content/packages-and-modules/contributing-packages-to-the-registry/creating-a-package-json-file.mdx new
+165
@@ -0,0 +1,165 @@
1 +---
2 +title: Creating a package.json file
3 +redirect_from:
4 + - /about-package-json-and-package-lock-json-files
5 + - /getting-started/using-a-package.json
6 +---
7 +
8 +You can add a `package.json` file to your package to make it easy for others to manage and install. Packages published to the registry must contain a `package.json` file.
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
17 +
18 +<Note>
19 +
20 +**Note:** To make your package easier to find on the npm website, we recommend including a custom `description` in your `package.json` file.
21 +
22 +</Note>
23 +
24 +## `package.json` fields
25 +
26 +### Required `name` and `version` fields
27 +
28 +A `package.json` file must contain `"name"` and `"version"` fields.
29 +
30 +The `"name"` field contains your package's name, and must be lowercase and one word, and may contain hyphens and underscores.
31 +
32 +The `"version"` field must be in the form `x.x.x` and follow the [semantic versioning guidelines][semver].
33 +
34 +### Author field
35 +
36 +If you want to include package author information in `"author"` field, use the following format (email and website are both optional):
37 +
38 +```
39 +Your Name <email@example.com> (http://example.com)
40 +```
41 +
42 +### Example
43 +
44 +```
45 +{
46 + "name": "my-awesome-package",
47 + "version": "1.0.0"
48 +}
49 +```
50 +
51 +## Creating a new `package.json` file
52 +
53 +You can create a `package.json` file by running a CLI questionnaire or creating a default `package.json` file.
54 +
55 +### Running a CLI questionnaire
56 +
57 +To create a `package.json` file with values that you supply, use the `npm init` command.
58 +
59 +1. On the command line, navigate to the root directory of your package.
60 +
61 + ```
62 + cd /path/to/package
63 + ```
64 +
65 +2. Run the following command:
66 +
67 + ```
68 + npm init
69 + ```
70 +
71 +3. Answer the questions in the command line questionnaire.
72 +
73 +#### Customizing the `package.json` questionnaire
74 +
75 +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.
76 +
77 +
78 +1. In your home directory, create a file called `.npm-init.js`.
79 +
80 +2. To add custom questions, using a text editor, add questions with the `prompt` function:
81 +
82 + ```
83 + module.exports = prompt("what's your favorite flavor of ice cream, buddy?", "I LIKE THEM ALL");
84 + ```
85 +
86 +3. To add custom fields, using a text editor, add desired fields to the `.npm-init.js` file:
87 +
88 + ```
89 + module.exports = {
90 + customField: 'Example custom field',
91 + otherCustomField: 'This example field is really cool'
92 + }
93 + ```
94 +
95 +To learn more about creating advanced `npm init` customizations, see the [init-package-json][init-pkg-json] GitHub repository.
96 +
97 +### Creating a default `package.json` file
98 +
99 +To create a default `package.json` using information extracted from the current directory, use the `npm init` command with the `--yes`
100 +or `-y` flag. For a list of default values, see "[Default values extracted from the current directory](#default-values-extracted-from-the-current-directory)".
101 +
102 +1. On the command line, navigate to the root directory of your package.
103 +
104 + ```
105 + cd /path/to/package
106 + ```
107 +
108 +2. Run the following command:
109 +
110 + ```
111 + npm init --yes
112 + ```
113 +
114 +#### Example
115 +
116 +```
117 +> npm init --yes
118 +Wrote to /home/monatheoctocat/my_package/package.json:
119 +
120 +{
121 + "name": "my_package",
122 + "description": "",
123 + "version": "1.0.0",
124 + "scripts": {
125 + "test": "echo \"Error: no test specified\" && exit 1"
126 + },
127 + "repository": {
128 + "type": "git",
129 + "url": "https://github.com/monatheoctocat/my_package.git"
130 + },
131 + "keywords": [],
132 + "author": "",
133 + "license": "ISC",
134 + "bugs": {
135 + "url": "https://github.com/monatheoctocat/my_package/issues"
136 + },
137 + "homepage": "https://github.com/monatheoctocat/my_package"
138 +}
139 +```
140 +
141 +#### Default values extracted from the current directory
142 +
143 + - `name`: the current directory name
144 + - `version`: always `1.0.0`
145 + - `description`: info from the README, or an empty string `""`
146 + - `scripts`: by default creates an empty `test` script
147 + - `keywords`: empty
148 + - `author`: empty
149 + - `license`: [`ISC`][isc-license]
150 + - `bugs`: information from the current directory, if present
151 + - `homepage`: information from the current directory, if present
152 +
153 +### Setting config options for the init command
154 +
155 +You can set default config options for the init command. For example, to set the default author email, author name, and license, on the command line, run the following commands:
156 +
157 +```
158 +> npm set init.author.email "example-user@example.com"
159 +> npm set init.author.name "example_user"
160 +> npm set init.license "MIT"
161 +```
162 +
163 +[semver]: about-semantic-versioning
164 +[init-pkg-json]: https://github.com/npm/init-package-json
165 +[isc-license]: https://opensource.org/licenses/ISC
content/packages-and-modules/contributing-packages-to-the-registry/creating-and-publishing-private-packages.mdx new
+110
@@ -0,0 +1,110 @@
1 +---
2 +title: Creating and publishing private packages
3 +redirect_from:
4 + - /private-modules/intro
5 +---
6 +import shared from '../../../src/shared.js'
7 +
8 +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.
9 +
10 +For more information on scopes and private packages, see "[About scopes][scopes]" and "[About private packages][private-pkgs]".
11 +
12 +<Note>
13 +
14 +**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.
15 +
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>.
18 +
19 +</Note>
20 +
21 +## Creating a private package
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 + ```
28 +
29 +2. On the command line, create a directory for your package:
30 +
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 + ```
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 + ```
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:
51 + ```
52 + npm init --scope=@my-org
53 + ```
54 +
55 + * For a user-scoped package, replace `my-username` with your username:
56 + ```
57 + npm init --scope=@my-username
58 + ```
59 +
60 +6. 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]".
61 +
62 +7. Create a [README file][readme-file] that explains what your package code is and how to use it.
63 +
64 +8. In your preferred text editor, write the code for your package.
65 +
66 +## Reviewing package contents for sensitive or unnecessary information
67 +
68 +Publishing sensitive information to the registry can harm your users, compromise your development infrastructure, be expensive to fix, and put you at risk of legal action. **We strongly recommend removing sensitive information, such as private keys, passwords, [personally identifiable information][pii] (PII), and credit card data before publishing your package to the registry.** Even if your package is private, sensitive information can be exposed if the package is made public or downloaded to a computer that can be accessed by more users than intended.
69 +
70 +For less sensitive information, such as testing data, use a `.npmignore` or `.gitignore` file to prevent publishing to the registry. For more information, see [this article][developers].
71 +
72 +## Testing your package
73 +
74 +To reduce the chances of publishing bugs, we recommend testing your package before publishing it to the npm registry. To test your package, run `npm install` with the full path to your package directory:
75 +
76 +```
77 +npm install my-package
78 +```
79 +
80 +## Publishing private packages
81 +
82 +By default, scoped packages are published with private visibility.
83 +
84 +1. On the command line, navigate to the root directory of your package.
85 +
86 + ```
87 + cd /path/to/package
88 + ```
89 +
90 +2. To publish your private package to the npm registry, run:
91 +
92 + ```
93 + npm publish
94 + ```
95 +
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 +
98 + <>{shared['organization-package-private'].image}</>
99 +
100 +For more information on the `publish` command, see the [CLI documentation][cli-publish].
101 +
102 +[scopes]: about-scopes
103 +[private-pkgs]: about-private-packages
104 +[user-signup]: https://www.npmjs.com/signup
105 +[create-org]: https://www.npmjs.com/signup?next=/org/create
106 +[pkg-name]: package-name-guidelines
107 +[readme-file]: about-package-readme-files
108 +[developers]: /misc/developers#keeping-files-out-of-your-package
109 +[cli-publish]: /cli/publish
110 +[reg-config]: configuring-your-registry-settings-as-an-npm-enterprise-user#using-npmrc-to-manage-multiple-profiles-for-different-registries
content/packages-and-modules/contributing-packages-to-the-registry/creating-and-publishing-scoped-public-packages.mdx new
+106
@@ -0,0 +1,106 @@
1 +---
2 +title: Creating and publishing scoped public packages
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +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.
7 +
8 +For more information on scopes, see "[About scopes][scopes]".
9 +
10 +<Note>
11 +
12 +**Note:** Before you can publish user-scoped npm packages, you must <a href="https://www.npmjs.com/signup">sign up</a> for an npm user account.
13 +
14 +Additionally, to publish organization-scoped packages, you must <a href="https://www.npmjs.com/signup">create an npm user account</a>, then <a href="https://www.npmjs.com/signup?next=/org/create">create an npm organization</a>.
15 +
16 +</Note>
17 +
18 +## Creating a scoped public package
19 +
20 +1. If you are using npmrc to [manage accounts on multiple registries][reg-config], on the command line, switch to the appropriate profile:
21 +
22 + ```
23 + npmrc <profile-name>
24 + ```
25 +
26 +2. On the command line, create a directory for your package:
27 +
28 + ```
29 + mkdir my-test-package
30 + ```
31 +
32 +3. Navigate to the root directory of your package:
33 +
34 + ```
35 + cd my-test-package
36 + ```
37 +
38 +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:
39 +
40 + ```
41 + git init
42 + git remote add origin git://git-remote-url
43 + ```
44 +
45 +5. In the package root directory, run the `npm init` command and pass the scope to the `scope` flag:
46 +
47 + * For an organization-scoped package, replace `my-org` with the name of your organization:
48 + ```
49 + npm init --scope=@my-org
50 + ```
51 +
52 + * For a user-scoped package, replace `my-username` with your username:
53 + ```
54 + npm init --scope=@my-username
55 + ```
56 +
57 +6. 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]".
58 +7. Create a [README file][readme-file] that explains what your package code is and how to use it.
59 +8. In your preferred text editor, write the code for your package.
60 +
61 +## Reviewing package contents for sensitive or unnecessary information
62 +
63 +Publishing sensitive information to the registry can harm your users, compromise your development infrastructure, be expensive to fix, and put you at risk of legal action. **We strongly recommend removing sensitive information, such as private keys, passwords, [personally identifiable information][pii] (PII), and credit card data before publishing your package to the registry.**
64 +
65 +For less sensitive information, such as testing data, use a `.npmignore` or `.gitignore` file to prevent publishing to the registry. For more information, see [this article][developers].
66 +
67 +## Testing your package
68 +
69 +To reduce the chances of publishing bugs, we recommend testing your package before publishing it to the npm registry. To test your package, run `npm install` with the full path to your package directory:
70 +
71 +```
72 +npm install my-package
73 +```
74 +
75 +## Publishing scoped public packages
76 +
77 +By default, scoped packages are published with private visibility. To publish a scoped package with public visibility, use `npm publish --access public`.
78 +
79 +1. On the command line, navigate to the root directory of your package.
80 +
81 + ```
82 + cd /path/to/package
83 + ```
84 +
85 +2. To publish your scoped public package to the npm registry, run:
86 +
87 + ```
88 + npm publish --access public
89 + ```
90 +
91 +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.
92 +
93 + <>{shared['organization-package-public'].image}</>
94 +
95 +For more information on the `publish` command, see the [CLI documentation][cli-publish].
96 +
97 +
98 +[scopes]: about-scopes
99 +[user-signup]: https://www.npmjs.com/signup
100 +[create-org]: https://www.npmjs.com/signup?next=/org/create
101 +[reg-config]: configuring-your-registry-settings-as-an-npm-enterprise-user
102 +[pkg-name]: package-name-guidelines
103 +[readme-file]: about-package-readme-files
104 +[developers]: /misc/developers#keeping-files-out-of-your-package
105 +[cli-publish]: /cli/publish
106 +[pii]: https://en.wikipedia.org/wiki/Personally_identifiable_information
content/packages-and-modules/contributing-packages-to-the-registry/creating-and-publishing-unscoped-public-packages.mdx new
+91
@@ -0,0 +1,91 @@
1 +---
2 +title: Creating and publishing unscoped public packages
3 +---
4 +
5 +<Note>
6 +
7 +**Note:** You can only publish unscoped packages to the npm public registry. You cannot publish unscoped packages to an npm Enterprise registry.
8 +
9 +</Note>
10 +
11 +As an npm user, you can create unscoped packages to use in your own projects and publish them to the npm public registry for others to use in theirs. Unscoped packages are always public and are referred to by the package name only:
12 +
13 +```
14 +package-name
15 +```
16 +
17 +For more information on package scope, access, and visibility, see "[Package scope, access level, and visibility][pkg-viz]".
18 +
19 +<Note>
20 +
21 +**Note:** Before you can publish public unscoped npm packages, you must <a href="https://www.npmjs.com/signup">sign up</a> for an npm user account.
22 +
23 +</Note>
24 +
25 +## Creating an unscoped public package
26 +
27 +1. On the command line, create a directory for your package:
28 +
29 + ```
30 + mkdir my-test-package
31 + ```
32 +
33 +2. Navigate to the root directory of your package:
34 +
35 + ```
36 + cd my-test-package
37 + ```
38 +
39 +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:
40 +
41 + ```
42 + git init
43 + git remote add origin git://git-remote-url
44 + ```
45 +
46 +4. In the package root directory, run the `npm init` command.
47 +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]".
48 +6. Create a [README file][readme-file] that explains what your package code is and how to use it.
49 +7. In your preferred text editor, write the code for your package.
50 +
51 +## Reviewing package contents for sensitive or unnecessary information
52 +
53 +Publishing sensitive information to the registry can harm your users, compromise your development infrastructure, be expensive to fix, and put you at risk of legal action. **We strongly recommend removing sensitive information, such as private keys, passwords, [personally identifiable information][pii] (PII), and credit card data before publishing your package to the registry.**
54 +
55 +For less sensitive information, such as testing data, use a `.npmignore` or `.gitignore` file to prevent publishing to the registry. For more information, see [this article][developers].
56 +
57 +## Testing your package
58 +
59 +To reduce the chances of publishing bugs, we recommend testing your package before publishing it to the npm registry. To test your package, run `npm install` with the full path to your package directory:
60 +
61 +```
62 +npm install my-package
63 +```
64 +
65 +## Publishing unscoped public packages
66 +
67 +1. On the command line, navigate to the root directory of your package.
68 +
69 + ```
70 + cd /path/to/package
71 + ```
72 +
73 +2. To publish your public package to the npm registry, run:
74 +
75 + ```
76 + npm publish
77 + ```
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 +
84 +[pkg-viz]: package-scope-access-level-and-visibility
85 +[user-signup]: https://www.npmjs.com/signup
86 +[create-org]: https://www.npmjs.com/signup?next=/org/create
87 +[pkg-name]: package-name-guidelines
88 +[readme-file]: about-package-readme-files
89 +[developers]: /misc/developers#keeping-files-out-of-your-package
90 +[cli-publish]: /cli/publish
91 +[pii]: https://en.wikipedia.org/wiki/Personally_identifiable_information
content/packages-and-modules/contributing-packages-to-the-registry/creating-node-js-modules.mdx new
+78
@@ -0,0 +1,78 @@
1 +---
2 +title: Creating Node.js modules
3 +redirect_from:
4 + - /getting-started/creating-node-modules
5 +---
6 +
7 +Node.js modules are a type of [package][about-pkgs] that can be published to npm.
8 +
9 +## Overview
10 +
11 +1. [Create a `package.json` file](#create-a-package-json-file)
12 +2. [Create the file that will be loaded when your module is required by another application](#create-the-file-that-will-be-loaded-when-your-module-is-required-by-another-application)
13 +3. [Test your module](#test-your-module)
14 +
15 +## Create a `package.json` file
16 +
17 +1. To create a `package.json` file, on the command line, in the root directory of your Node.js module, run `npm init`:
18 + - For [scoped modules][scoped-pkg], run `npm init --scope=@scope-name`
19 + - For [unscoped modules][unscoped-pkg], run `npm init`
20 +2. Provide responses for the required fields (`name` and `version`), as well as the `main` field:
21 + - `name`: The name of your module.
22 + - `version`: The initial module version. We recommend following [semantic versioning guidelines][semver] and starting with `1.0.0`.
23 +
24 +For more information on `package.json` files, see "[Creating a package.json file][creating-pkg-json]".
25 +
26 +## Create the file that will be loaded when your module is required by another application
27 +
28 +
29 +In the file, add a function as a property of the `exports` object. This will make the function available to other code:
30 +
31 +```
32 +exports.printMsg = function() {
33 + console.log("This is a message from the demo package");
34 +}
35 +```
36 +
37 +## Test your module
38 +
39 +1. Publish your package to npm:
40 +
41 + - For [private packages][priv-pkg-pub] and [unscoped packages][unscoped-pkg-pub], use `npm publish`.
42 + - For [scoped public packages][scoped-pkg-pub], use `npm publish --access public`
43 +
44 +2. On the command line, create a new test directory outside of your project directory.
45 +
46 + ```
47 + mkdir test-directory
48 + ```
49 +
50 +3. Switch to the new directory:
51 +
52 + ```
53 + cd /path/to/test-directory
54 + ```
55 +
56 +4. In the test directory, install your module:
57 +
58 + ```
59 + npm install <your-module-name>
60 + ```
61 +
62 +5. In the test directory, create a `test.js` file which requires your module and calls your module as a method.
63 +
64 +6. On the command line, run `node test.js`. The message sent to the console.log should appear.
65 +
66 +## Resources
67 +
68 +<iframe src="https://www.youtube.com/embed/3I78ELjTzlQ" frameborder="0" allowfullscreen></iframe>
69 +
70 +
71 +[about-pkgs]: about-packages-and-modules
72 +[scoped-pkg]: about-scopes
73 +[unscoped-pkg]: creating-and-publishing-unscoped-public-packages
74 +[semver]: about-semantic-versioning
75 +[creating-pkg-json]: creating-a-package-json-file
76 +[priv-pkg-pub]: creating-and-publishing-private-packages#publishing-private-packages
77 +[unscoped-pkg-pub]: creating-and-publishing-unscoped-public-packages#publishing-unscoped-public-packages
78 +[scoped-pkg-pub]: creating-and-publishing-scoped-public-packages#publishing-scoped-public-packages
content/packages-and-modules/contributing-packages-to-the-registry/index.mdx new
+6
@@ -0,0 +1,6 @@
1 +---
2 +title: Contributing packages to the registry
3 +redirect_from: [ /getting-started/publishing-npm-packages ]
4 +---
5 +
6 +<Index />
content/packages-and-modules/contributing-packages-to-the-registry/package-name-guidelines.mdx new
+20
@@ -0,0 +1,20 @@
1 +---
2 +title: Package name guidelines
3 +---
4 +
5 +When choosing a name for your package, choose a name that
6 +
7 +- is unique
8 +- is descriptive
9 +- meets [npm policy guidelines][policies]. For example, do not give your package an offensive name, and do not use someone else's trademarked name or violate the [npm trademark policy][npm-trademark].
10 +
11 +Additionally, when choosing a name for an [**unscoped** package][create-unscoped], also choose a name that
12 +
13 +- is not already owned by someone else
14 +- is not spelled in a similar way to another package name
15 +- will not confuse others about authorship
16 +
17 +
18 +[policies]: https://www.npmjs.com/policies
19 +[npm-trademark]: https://www.npmjs.com/policies/trademark#the-npm-trademark-policy
20 +[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 new
+63
@@ -0,0 +1,63 @@
1 +---
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].
7 +
8 +- `"dependencies"`: Packages required by your application in production.
9 +- `"devDependencies"`: Packages that are only needed for local development and testing.
10 +
11 +## Adding dependencies to a `package.json` file
12 +
13 +You can add dependencies to a `package.json` file from the command line or by manually editing the `package.json` file.
14 +
15 +### Adding dependencies to a `package.json` file from the command line
16 +
17 +To add dependencies and devDependencies to a `package.json` file from the command line, you can install them in the root directory of your package using the `--save-prod` flag for dependencies (the default behavior of `npm install`) or the `--save-dev` flag for devDependencies.
18 +
19 +To add an entry to the `"dependencies"` attribute of a `package.json` file, on the command line, run the following command:
20 +
21 +```
22 +npm install <package-name> [--save-prod]
23 +```
24 +
25 +To add an entry to the `"devDependencies"` attribute of a `package.json` file, on the command line, run the following command:
26 +
27 +```
28 +npm install <package-name> --save-dev
29 +```
30 +
31 +### Manually editing the `package.json` file
32 +
33 +To add dependencies to a `package.json` file, in a text editor, add an attribute called `"dependencies"` that references the name and [semantic version][semver] of each dependency:
34 +
35 +```
36 +{
37 + "name": "my_package",
38 + "version": "1.0.0",
39 + "dependencies": {
40 + "my_dep": "^1.0.0",
41 + "another_dep": "~2.2.0"
42 + }
43 +}
44 +```
45 +
46 +To add devDependencies to a `package.json` file, in a text editor, add an attribute called `"devDependencies"` that references the name and [semantic version][semver] of each devDependency:
47 +
48 +```
49 +"name": "my_package",
50 +"version": "1.0.0",
51 +"dependencies": {
52 + "my_dep": "^1.0.0",
53 + "another_dep": "~2.2.0"
54 +},
55 +"devDependencies" : {
56 + "my_test_framework": "^3.1.0".
57 + "another_dev_dep": "1.0.0 - 1.2.0"
58 +}
59 +```
60 +
61 +[pkg-json]: creating-a-packge-json-file
62 +[semver]: about-semantic-versioning
63 +[semver-calc]: https://semver.npmjs.com/
content/packages-and-modules/getting-packages-from-the-registry/downloading-and-installing-packages-globally.mdx new
+25
@@ -0,0 +1,25 @@
1 +---
2 +title: Downloading and installing packages globally
3 +redirect_from:
4 + - /getting-started/installing-npm-packages-globally
5 +---
6 +
7 +<Note>
8 +
9 +**Tip:** If you are using npm 5.2 or higher, we recommend using `npx` to run packages globally.
10 +
11 +</Note>
12 +
13 +[Installing][cli-install] a package globally allows you to use the code in the package as a set of tools on your local computer.
14 +
15 +To download and install packages globally, on the command line, run the following command:
16 +
17 +```
18 +npm install -g <package_name>
19 +```
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 +
24 +[cli-install]: /cli/install
25 +[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 new
+76
@@ -0,0 +1,76 @@
1 +---
2 +title: Downloading and installing packages locally
3 +redirect_from:
4 + - /downloading-and-installing-packages
5 + - /getting-started/installing-npm-packages-locally
6 +---
7 +
8 +You can [install][cli-install] a package locally if you want to depend on the package from your own module, using something like Node.js `require`. This is `npm install`'s default behavior.
9 +
10 +## Installing an unscoped package
11 +
12 +Unscoped packages are always public, which means they can be searched for, downloaded, and installed by anyone. To install a public package, on the command line, run
13 +
14 +```
15 +npm install <package_name>
16 +```
17 +
18 +This will create the `node_modules` directory in your current directory (if one doesn't exist yet) and will download the package to that directory.
19 +
20 +<Note>
21 +
22 +**Note:** If there is no `package.json` file in the local directory, the latest version of the package is installed.
23 +
24 +If there is a `package.json` file, npm installs the latest version that satisfies the [semver rule](about-semantic-versioning) declared in `package.json`.
25 +
26 +</Note>
27 +
28 +## Installed a scoped public package
29 +
30 +[Scoped public packages][scoped-public-pkg] can be downloaded and installed by anyone, as long as the scope name is referenced during installation:
31 +
32 +```
33 +npm install @scope/package-name
34 +```
35 +
36 +## Installing a private package
37 +
38 +[Private packages][private-pkg] can only be downloaded and installed by those who have been granted read access to the package. Since private packages are always scoped, you must reference the scope name during installation:
39 +
40 +```
41 +npm install @scope/private-package-name
42 +```
43 +
44 +## Testing package installation
45 +
46 +To confirm that `npm install` worked correctly, in your module directory, check that a `node_modules` directory exists and that it contains a directory for the package(s) you installed:
47 +
48 +```
49 +ls node_modules
50 +```
51 +
52 +## Installed package version
53 +
54 +If there is a `package.json` file in the directory in which `npm install` is run, npm instalsx the latest version of the package that satisfies the [semantic versioning rule][semver] declared in `package.json`.
55 +
56 +If there is no `package.json` file, the latest version of the package is installed.
57 +
58 +## Installing a package with dist-tags
59 +
60 +Like `npm publish`, `npm install <package_name>` will use the `latest` tag by default.
61 +
62 +To override this behavior, use `npm install <package_name>@<tag>`. For example, to install the `example-package` at the version tagged with `beta`, you would run the following command:
63 +
64 +```
65 +npm install example-package@beta
66 +```
67 +
68 +## Resources
69 +
70 +<iframe src="https://www.youtube.com/embed/JDSfqFFbNYQ" frameborder="0" allowfullscreen></iframe>
71 +
72 +
73 +[scoped-public-pkg]: about-scopes
74 +[private-pkg]: about-private-packages
75 +[cli-install]: /cli-documentation/install
76 +[semver]: about-semantic-versioning
content/packages-and-modules/getting-packages-from-the-registry/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Getting packages from the registry
3 +---
4 +
5 +<Index />
content/packages-and-modules/getting-packages-from-the-registry/resolving-eacces-permissions-errors-when-installing-packages-globally.mdx new
+78
@@ -0,0 +1,78 @@
1 +---
2 +title: Resolving EACCES permissions errors when installing packages globally
3 +redirect_from:
4 + - /getting-started/fixing-npm-permissions
5 +---
6 +
7 +If you see an `EACCES` error when you try to [install a package globally][global-install], you can either:
8 +
9 +- Reinstall npm with a node version manager (recommended),
10 +
11 + **or**
12 +
13 +- Manually change npm's default directory
14 +
15 +## Reinstall npm with a node version manager
16 +
17 +This is the best way to avoid permissions issues. To reinstall npm with a node version manager, follow the steps in "[Downloading and installing Node.js and npm][install-npm]". You do not need to remove your current version of npm or Node.js before installing a node version manager.
18 +
19 +## Manually change npm's default directory
20 +
21 +<Note>
22 +
23 +**Note:** This section does not apply to Microsoft Windows.
24 +
25 +</Note>
26 +
27 +To minimize the chance of permissions errors, you can configure npm to use a different directory. In this example, you will create and use hidden directory in your home directory.
28 +
29 +1. Back up your computer.
30 +
31 +2. On the command line, in your home directory, create a directory for global installations:
32 +
33 + ```
34 + mkdir ~/.npm-global
35 + ```
36 +
37 +3. Configure npm to use the new directory path:
38 +
39 + ```
40 + npm config set prefix '~/.npm-global'
41 + ```
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 + ```
48 +
49 +5. On the command line, update your system variables:
50 +
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 + ```
60 +
61 +Instead of steps 2-4, you can use the corresponding ENV variable (e.g. if you don't want to modify `~/.profile`):
62 +
63 +```
64 +NPM_CONFIG_PREFIX=~/.npm-global
65 +```
66 +
67 +<Note>
68 +
69 +**npx: an alternative to running global commands**
70 +
71 +If you are using npm version 5.2 or greater, you may want to consider [npx](https://www.npmjs.com/package/npx) as an alternative way to run global commands, especially if you only need a command occasionally. For more information, see [this article about npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b).
72 +
73 +</Note>
74 +
75 +[global-install]: downloading-and-installing-packages-globally
76 +[install-npm]: downloading-and-installing-node-js-and-npm
77 +[npx]: https://www.npmjs.com/package/npx
78 +[npx-article]: https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b
content/packages-and-modules/getting-packages-from-the-registry/searching-for-and-choosing-packages-to-download.mdx new
+38
@@ -0,0 +1,38 @@
1 +---
2 +title: Searching for and choosing packages to download
3 +redirect_from:
4 + - /getting-started/searching-for-packages
5 +---
6 +
7 +You can use the npm search bar to find packages to use in your projects. npm search uses npms and the npms analyzer; for more information on both, see https://npms.io/about.
8 +
9 +## Searching for a package
10 +
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 + <Screenshot src="/packages-and-modules/getting-packages-from-the-registry/search-qr-results.png" alt="Screenshot of the search text box and search results" />
15 +
16 +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".
17 +
18 +3. In the package search results list, click the name of the package.
19 +
20 +## Package search rank criteria
21 +
22 +Often, there are dozens or even hundreds of packages with similar names and/or similar purposes. To help you decide the best ones to explore, each package has been ranked according to four criteria using the npms analyzer:
23 +
24 +### Popularity
25 +
26 +Popularity indicates how many times the package has been downloaded. This is a strong indicator of packages that others have found to be useful.
27 +
28 +### Quality
29 +
30 +Quality includes considerations such as the presence of a README file, stability, tests, up-to-date dependencies, custom website, and code complexity.
31 +
32 +### Maintenance
33 +
34 +Maintenance ranks packages according to the attention they are given by developers. More frequently maintained packages are more likely to work well with the current or upcoming versions of the npm CLI, for example.
35 +
36 +### Optimal
37 +
38 +Optimal combines the other three criteria (popularity, quality, maintenance) into one score in a meaningful way.
content/packages-and-modules/getting-packages-from-the-registry/uninstalling-packages-and-dependencies.mdx new
+109
@@ -0,0 +1,109 @@
1 +---
2 +title: Uninstalling packages and dependencies
3 +redirect_from:
4 + - /getting-started/uninstalling-local-packages
5 + - /getting-started/uninstalling-global-packages
6 +---
7 +
8 +If you no longer need to use a package in your code, we recommend uninstalling it and removing it from your project's dependencies.
9 +
10 +## Uninstalling local packages
11 +
12 +### Removing a local package from your node_modules directory
13 +
14 +To remove a package from your node_modules directory, on the command line, use the [`uninstall` command][cli-uninstall]. Include the scope if the package is scoped.
15 +
16 +#### Unscoped package
17 +
18 +```
19 +npm uninstall <package_name>
20 +
21 +```
22 +
23 +#### Scoped package
24 +
25 +```
26 +npm uninstall <@scope/package_name>
27 +```
28 +
29 +### Example
30 +
31 +```
32 +npm uninstall lodash
33 +```
34 +
35 +### Removing a local package from the `package.json` dependencies
36 +
37 +To remove a package from the dependencies in `package.json`, use the `--save` flag. Include the scope if the package is scoped.
38 +
39 +#### Unscoped package
40 +
41 +```
42 +npm uninstall --save <package_name>
43 +```
44 +
45 +#### Scoped package
46 +
47 +```
48 +npm uninstall --save <@scope/package_name>
49 +```
50 +
51 +#### Example
52 +
53 +```
54 +npm uninstall --save lodash
55 +```
56 +
57 +<Note>
58 +
59 +**Note:** If you installed a package as a "devDependency" (i.e. with `--save-dev`), use `--save-dev` to uninstall it:
60 +
61 +```
62 +npm uninstall --save-dev package_name
63 +```
64 +
65 +</Note>
66 +
67 +### Confirming local package uninstallation
68 +
69 +To confirm that `npm uninstall` worked correctly, check that the `node_modules` directory no longer contains a directory for the uninstalled package(s).
70 +
71 +- Unix system (such as OSX): `ls node_modules`
72 +- Windows systems: `dir node_modules`
73 +
74 +## Uninstalling global packages
75 +
76 +To uninstall an unscoped global package, on the command line, use the `uninstall` command with the `-g` flag. Include the scope if the package is scoped.
77 +
78 +### Unscoped package
79 +
80 +```
81 +npm uninstall -g <package_name>
82 +```
83 +
84 +### Scoped package
85 +
86 +```
87 +npm uninstall -g <@scope/package_name>
88 +```
89 +
90 +### Example
91 +
92 +For example, to uninstall a package called `jshint`, run:
93 +
94 +```
95 +npm uninstall -g jshint
96 +```
97 +
98 +## Resources
99 +
100 +### Uninstalling local packages
101 +
102 +<iframe src="https://www.youtube.com/embed/Z-BpYj6cSoQ" frameborder="0" allowfullscreen></iframe>
103 +
104 +### Uninstalling global packages
105 +
106 +<iframe src="https://www.youtube.com/embed/XbvjZxUZJGg" frameborder="0" allowfullscreen></iframe>
107 +
108 +
109 +[cli-uninstall]: /cli/uninstall
content/packages-and-modules/getting-packages-from-the-registry/updating-packages-downloaded-from-the-registry.mdx new
+81
@@ -0,0 +1,81 @@
1 +---
2 +title: Updating packages downloaded from the registry
3 +redirect_from:
4 + - /getting-started/updating-local-packages
5 + - /getting-started/updating-global-packages
6 +---
7 +
8 +Updating local and global packages you downloaded from the registry helps keep your code and tools stable, usable, and secure.
9 +
10 +## Updating local packages
11 +
12 +We recommend regularly updating the local packages your project depends on to improve your code as improvements to its dependencies are made.
13 +
14 +1. Navigate to the root directory of your project and ensure it contains a `package.json` file:
15 +
16 + ```
17 + cd /path/to/project
18 + ```
19 +
20 +2. In your project root directory, run the [`update` command][npm-update]:
21 +
22 + ```
23 + npm update
24 + ```
25 +
26 +3. To test the update, run the [`outdated` command][npm-outdated]. There should not be any output.
27 +
28 + ```
29 + npm outdated
30 + ```
31 +
32 +## Updating globally-installed packages
33 +
34 +<Note>
35 +
36 +**Note:** If you are using npm version 2.6.0 or less, run [this script](https://gist.github.com/othiym23/4ac31155da23962afd0e) to update all outdated global packages.
37 +
38 +However, please consider upgrading to the latest version of npm:
39 +
40 +```
41 +npm install npm@latest -g
42 +```
43 +
44 +</Note>
45 +
46 +### Determining which global packages need updating
47 +
48 +To see which global packages need to be updated, on the command line, run:
49 +
50 +```
51 +npm outdated -g --depth=0
52 +```
53 +
54 +### Updating a single global package
55 +
56 +To update a single global package, on the command line, run:
57 +
58 +```
59 +npm update -g <package_name>
60 +```
61 +
62 +### Updating all globally-installed packages
63 +
64 +To update all global packages, on the command line, run:
65 +
66 +```
67 +npm update -g
68 +```
69 +
70 +## Resources
71 +
72 +<iframe src="https://www.youtube.com/embed/HRudtPGcOt4" frameborder="0" allowfullscreen></iframe>
73 +
74 +### CLI commands
75 +
76 +- [npm-update](/cli/update)
77 +- [npm-outdated](/cli/outdated)
78 +
79 +
80 +[npm-update]: /cli/update
81 +[npm-outdated]: /cli/outdated
content/packages-and-modules/getting-packages-from-the-registry/using-deprecated-packages.mdx new
+11
@@ -0,0 +1,11 @@
1 +---
2 +title: Using deprecated packages
3 +---
4 +
5 +If you install a package, and it prints a deprecation message, we recommend following the instructions, if possible.
6 +
7 +That might mean updating to a new version, or updating your package dependencies.
8 +
9 +<Screenshot src="/packages-and-modules/getting-packages-from-the-registry/package-deprecated.png" alt="Screenshot of a deprecated package showing that it is no longer supported" />
10 +
11 +A deprecation message doesn't always mean the package or version is unusable; it may mean the package is unmaintained and will no longer be updated by the publisher.
content/packages-and-modules/getting-packages-from-the-registry/using-npm-packages-in-your-projects.mdx new
+74
@@ -0,0 +1,74 @@
1 +---
2 +title: Using npm packages in your projects
3 +---
4 +
5 +Once you have [installed a package][install-pkg] in `node_modules`, you can use it in your code.
6 +
7 +## Using unscoped packages in your projects
8 +
9 +### Node.js module
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 +
14 +```javascript
15 +var lodash = require('lodash');
16 +
17 +var output = lodash.without([1, 2, 3], 1);
18 +console.log(output);
19 +```
20 +
21 +
22 +### package.json file
23 +
24 +In `package.json`, list the package under dependencies. You can optionally include a [semantic version][semver].
25 +
26 +```json
27 +{
28 + "dependencies": {
29 + "@package_name": "^1.0.0"
30 + }
31 +}
32 +```
33 +
34 +## Using scoped packages in your projects
35 +
36 +To use a scoped package, simply include the scope wherever you use the package name.
37 +
38 +### Node.js module
39 +
40 +
41 +```js
42 +var projectName = require("@scope/package-name")
43 +```
44 +
45 +### package.json file
46 +
47 +In `package.json`:
48 +
49 +```json
50 +{
51 + "dependencies": {
52 + "@scope/package_name": "^1.0.0"
53 + }
54 +}
55 +```
56 +
57 +## Resolving "Cannot find module" errors
58 +
59 +If you have not properly installed a package, you will receive an error when you try to use it in your code. For example, if you reference the `lodash` package without installing it, you would see the following error:
60 +
61 +```
62 +module.js:340
63 + throw err;
64 + ^
65 +Error: Cannot find module 'lodash'
66 +```
67 +
68 +
69 +- For scoped packages, run `npm install <@scope/package_name>`
70 +- For unscoped packages, run `npm install <package_name>`
71 +
72 +
73 +[install-pkg]: downloading-and-installing-packages
74 +[semver]: about-semantic-versioning
content/packages-and-modules/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Packages and modules
3 +---
4 +
5 +<Index />
content/packages-and-modules/introduction-to-packages-and-modules/about-packages-and-modules.mdx new
+69
@@ -0,0 +1,69 @@
1 +---
2 +title: About packages and modules
3 +redirect_from:
4 + - /getting-started/packages
5 +---
6 +
7 +The npm registry contains packages, many of which are also Node modules, or contain Node modules. Read on to understand how they differ and how they interact.
8 +
9 +## About packages
10 +
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 +- "[About scopes][about-scopes]"
15 +- "[About private packages][private-pkgs]"
16 +- "[Package scope, access level, and visibility][pkg-viz]"
17 +
18 +### About package formats
19 +
20 +A package is any of the following:
21 +
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).
29 +
30 +### npm package git URL formats
31 +
32 +Git URLs used for npm packages can be formatted in the following ways:
33 +
34 +- `git://github.com/user/project.git#commit-ish`
35 +- `git+ssh://user@hostname:project.git#commit-ish`
36 +- `git+http://user@hostname/project/blah.git#commit-ish`
37 +- `git+https://user@hostname/project/blah.git#commit-ish`
38 +
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 `master`.
41 +
42 +## About modules
43 +
44 +A **module** is any file or directory in the `node_modules` directory that can be loaded by the Node.js `require()` function.
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.
50 +
51 +<div class="note">
52 +
53 +<span class="bold">Note:</span>
54 +Since modules are not required to have a <code class="highlighter-rouge">package.json</code> file, not all modules are packages. Only modules that have a <code class="highlighter-rouge">package.json</code> file are also packages.
55 +
56 +</div>
57 +
58 +In the context of a Node program, the `module` is also the thing that
59 +was loaded *from* a file. For example, in the following program:
60 +
61 + var req = require('request')
62 +
63 +we might say that "The variable `req` refers to the `request` module".
64 +
65 +
66 +[about-scopes]: about-scopes
67 +[private-pkgs]: about-private-packages
68 +[pkg-json]: creating-a-package-json-file
69 +[pkg-viz]: package-scope-access-level-and-visibility
content/packages-and-modules/introduction-to-packages-and-modules/about-private-packages.mdx new
+37
@@ -0,0 +1,37 @@
1 +---
2 +title: About private packages
3 +---
4 +
5 +<div class="note">
6 +
7 +To use private packages, you must
8 +
9 +<ul>
10 +<li> be using npm version 2.7.0 or greater. To upgrade, on the command line, run <code class="highlighter-rouge">npm install npm@latest -g</code></li>
11 +<li>have a <a href="https://www.npmjs.com/pricing">paid user or organization account</a></li>
12 +</ul>
13 +
14 +</div>
15 +
16 +With npm private packages, you can use the npm registry to host code that is only visible to you and chosen collaborators, allowing you to manage and use private code alongside public code in your projects.
17 +
18 +Private packages always have a scope, and scoped packages are private by default.
19 +
20 +* **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]".
21 +* **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]".
22 +
23 +## Next steps
24 +
25 +- "[Creating and publishing private packages][create-priv-pkg]"
26 +- "[Using npm packages in your projects][use-pkg]"
27 +
28 +## Resources
29 +
30 +<iframe src="https://www.youtube.com/embed/O6JoXGnHK_Y" frameborder="0" allowfullscreen></iframe>
31 +
32 +[paid-acct]: https://www.npmjs.com/pricing
33 +[user-pkg-add]: adding-collaborators-to-private-packages-owned-by-a-user-account
34 +[team-pkg-add]: managing-team-access-to-organization-packages
35 +[create-priv-pkg]: creating-and-publishing-private-packages
36 +[install-pkgs]: installing-packages-and-dependencies#installing-private-packages
37 +[use-pkg]: using-npm-packages-in-your-projects
content/packages-and-modules/introduction-to-packages-and-modules/about-public-packages.mdx new
+21
@@ -0,0 +1,21 @@
1 +---
2 +title: About public packages
3 +---
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`
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 +
18 +
19 +[create-scoped-pkg]: creating-and-publishing-scoped-public-packages
20 +[create-unscoped-pkg]: creating-and-publishing-unscoped-public-packages
21 +[use-pkg]: using-npm-packages-in-your-projects
content/packages-and-modules/introduction-to-packages-and-modules/about-scopes.mdx new
+44
@@ -0,0 +1,44 @@
1 +---
2 +title: About scopes
3 +redirect_from:
4 + - /getting-started/scoped-packages
5 +---
6 +
7 +<div class="note">
8 +
9 +<span class="bold">Note:</span> You must be using npm version 2 or greater to use scopes. To upgrade to the latest version of npm, on the command line, run <code class="highlighter-rouge">npm install npm@latest -g</code>
10 +
11 +</div>
12 +
13 +When you sign up for an npm user account or create an organization, you are granted a scope that matches your user or organization name. You can use this scope as a namespace for related packages.
14 +
15 +A scope allows you to create a package with the same name as a package created by another user or organization without conflict.
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:**
20 +```
21 +@npm/package-name
22 +```
23 +* **"npmcorp" scope:**
24 +```
25 +@npmcorp/package-name
26 +```
27 +
28 +To create and publish public scoped packages, see "[Creating and publishing scoped public packages][create-public-pkg]".
29 +
30 +To create and publish private scoped packages, see "[Creating and publishing private packages][create-private-pkg]".
31 +
32 +## Scopes and package visibility
33 +
34 +- Unscoped packages are always public.
35 +- [Private packages][about-priv-pkg] are always scoped.
36 +- Scoped packages are private by default; you must pass a command-line flag when publishing to make them public.
37 +
38 +For more information on package scope and visibility, see "[Package scope, access level, and visibility][pkg-viz]".
39 +
40 +
41 +[create-public-pkg]: creating-and-publishing-scoped-public-packages
42 +[create-private-pkg]: creating-and-publishing-private-packages
43 +[about-priv-pkg]: about-private-packages
44 +[pkg-viz]: package-scope-access-level-and-visibility
content/packages-and-modules/introduction-to-packages-and-modules/about-the-public-npm-registry.mdx new
+12
@@ -0,0 +1,12 @@
1 +---
2 +title: About the public npm registry
3 +---
4 +
5 +The public npm registry is a database of JavaScript packages, each comprised of software and metadata. Open source developers and developers at companies use the npm registry to contribute packages to the entire community or members of their organizations, and download packages to use in their own projects.
6 +
7 +To get started with the registry, [sign up for an npm account][signup] and check out the "[Getting started][getting-started]" and [CLI][cli] documentation.
8 +
9 +[public-website]: https://npmjs.com
10 +[cli]: /cli-documentation
11 +[signup]: https://www.npmjs.com/signup
12 +[getting-started]: /getting-started
content/packages-and-modules/introduction-to-packages-and-modules/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Introduction to packages and modules
3 +---
4 +
5 +<Index />
content/packages-and-modules/introduction-to-packages-and-modules/package-scope-access-level-and-visibility.mdx new
+49
@@ -0,0 +1,49 @@
1 +---
2 +title: npm package scope, access level, and visibility
3 +---
4 +
5 +Visibility of npm packages depends on the scope (namespace) in which the package is contained, and the access level (private or public) set for the package.
6 +
7 +<div class="note">
8 +
9 +<span class="bold">Note:</span> To create organization-scoped packages, you must first create an organization. For more information, see "<a href="https://docs.npmjs.com/organizations/creating-an-organization">Creating an organization</a>".
10 +
11 +</div>
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 |
21 +| Unscoped | Public | Everyone | The package owner and users who have been granted read and write access to the package |
22 +
23 +<div class="note">
24 +
25 +<span class="bold">Note:</span> Only user accounts can create and manage unscoped packages. Organizations can only manage scoped packages.
26 +
27 +</div>
28 +
29 +## npm Enterprise
30 +
31 +<div class="note">
32 +
33 +The following table applies to customers who purchased <a href="https://docs.npmjs.com/enterprise">npm Enterprise</a> after July 26, 2018.
34 +
35 +</div>
36 +
37 +| Scope | Access level | Can view and download | Can write (publish) |
38 +|--------------|--------------|-----------------------------------------------------------------------------|---|
39 +| Org | Private | Logged-in members of the Enterprise registry who belong to a team in the Org with read access to the package | Logged-in members of the Enterprise registry who belong to a team in the Org with read and write access to the package |
40 +| Org | Public | All logged-in members of the Enterprise registry | Logged-in members of the Enterprise registry who belong to a team in the Org with read and write access to the package |
41 +| User | Private | The package owner and logged-in members of the Enterprise registry who have been granted read access to the package | The package owner and logged-in members of the Enterprise registry who have been granted read and write access to the package |
42 +| User | Public | All logged-in members of the Enterprise registry | The package owner and logged-in members of the Enterprise registry who have been granted read and write access to the package |
43 +| Unscoped | Public | All users of the Enterprise registry | None (see note below) |
44 +
45 +<div class="note">
46 +
47 +<span class="bold">Note:</span> The unscoped namespace on npm Enterprise is reserved for unscoped packages in the public npm registry. To prevent npm Enterprise users from accidentally publishing proprietary code to the public npm registry, where it would be visible to anyone on the internet, we do not allow publishing unscoped packages to npm Enterprise.
48 +
49 +</div>
content/packages-and-modules/securing-your-code/about-audit-reports.mdx new
+48
@@ -0,0 +1,48 @@
1 +---
2 +title: About audit reports
3 +---
4 +
5 +# About audit reports
6 +
7 +Audit reports contain tables of information about security vulnerabilities in your project's dependencies to help you fix the vulnerability or troubleshoot further.
8 +
9 +<Screenshot src="/packages-and-modules/securing-your-code/audit-report-results.png" alt="Screenshot showing command-line audit report results" />
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)
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 |
31 +
32 +#### Description
33 +The description of the vulnerability. For example, "Denial of service".
34 +
35 +#### Package
36 +The name of the package that contains the vulnerability.
37 +
38 +#### Patched in
39 +The semantic version range that describes which versions contain a fix for the vulnerability.
40 +
41 +#### Dependency of
42 +The module that the package with the vulnerability depends on.
43 +
44 +#### Path
45 +The path to the code that contains the vulnerability.
46 +
47 +#### More info
48 +A link to the security report.
content/packages-and-modules/securing-your-code/about-pgp-signatures-for-packages-in-the-public-registry.mdx new
+36
@@ -0,0 +1,36 @@
1 +---
2 +title: About package PGP signatures
3 +---
4 +
5 +To increase confidence in the npm public registry, we add our [PGP][pgp-wiki] signature to package metadata and publicize our public PGP key on [Keybase][keybase]. Our Keybase account is "[npmregistry][npmregistry]" and our public PGP key can be found at https://keybase.io/npmregistry/pgp_keys.asc
6 +
7 +You can use the package PGP signature and our public PGP key to verify that the same entity who published the key (npm) also signed the package you downloaded from the npm public registry. For more information, see "[Verifying the PGP signature of a package from the npm public registry][verify-pgp]".
8 +
9 +## Tools we use
10 +
11 +### openpgpjs
12 +
13 +To generate PGP signatures, we use [openpgpjs][openpgpjs-repo], a pure JavaScript implementation of OpenPGP. To learn more about openpgpjs, see https://openpgpjs.org/.
14 +
15 +### Keybase
16 +
17 +We use Keybase to publicize our PGP key and give you confidence that the npm registry you install from is the same registry that signs packages.
18 +
19 +Keybase offers two advantages over the core OpenPGP experience that move us to recommend it to you:
20 +
21 +- The Keybase application and CLI provide an excellent user experience for PGP, which can be intimidating for newcomers.
22 +- Keybase manages and displays social proofs that the entity that controls a specific PGP key also controls accounts on social media and other places. These proofs help you determine whether you can trust an account.
23 +
24 +We’ve established proofs on Keybase that we control [@npmjs][npmjs-twitter] on Twitter, the domain [npmjs.com][npmjs-com], and the domain [npmjs.org][npmjs-org]. Verifying these proofs won’t tell you who owns those domains, but it does establish that the same entity controls them and the PGP key advertised on Keybase.
25 +
26 +If you install Keybase and create an account, you can follow npmregistry yourself and obtain a local copy of the registry’s public key. For more information, and to verify the PGP signature of a specific package version from the npm public registry, see "[Verifying the PGP signature for a package from the npm public registry][verify-pgp]".
27 +
28 +
29 +[keybase]: https://keybase.io
30 +[pgp-wiki]: https://en.wikipedia.org/wiki/Pretty_Good_Privacy
31 +[npmregistry]: https://keybase.io/npmregistry
32 +[openpgpjs-repo]: https://github.com/openpgpjs/openpgpjs
33 +[npmjs-twitter]: https://twitter.com/npmjs
34 +[npmjs-com]: https://npmjs.com
35 +[npmjs-org]: https://npmjs.org
36 +[verify-pgp]: verifying-the-pgp-signature-for-a-package-from-the-npm-public-registry
content/packages-and-modules/securing-your-code/auditing-package-dependencies-for-security-vulnerabilities.mdx new
+125
@@ -0,0 +1,125 @@
1 +---
2 +title: Auditing package dependencies for security vulnerabilities
3 +redirect_from:
4 + - /getting-started/running-a-security-audit/
5 +---
6 +
7 +## About security audits
8 +
9 +A security audit is an assessment of package dependencies for security vulnerabilities. Security audits help you protect your package's users by enabling you to find and fix known vulnerabilities in dependencies that could cause data loss, service outages, unauthorized access to sensitive information, or other issues.
10 +
11 +## Running a security audit with `npm audit`
12 +
13 +<Note>
14 +
15 +**Note:** The `npm audit` command is available in npm@6. To upgrade, run `npm install npm@latest -g`.
16 +
17 +</Note>
18 +
19 +The <a href="https://docs.npmjs.com/cli/audit">`npm audit` command</a> submits a description of the dependencies configured in your package to your default registry and asks for a report of known vulnerabilities. `npm audit` checks direct dependencies, devDependencies, bundledDependencies, and optionalDependencies, but does not check peerDependencies.
20 +
21 +`npm audit` automatically runs when you install a package with `npm install`. You can also run `npm audit` manually on your [locally installed packages](downloading-and-installing-packages-locally) to conduct a security audit of the package and produce a report of dependency vulnerabilities and, if available, suggested patches.
22 +
23 +1. On the command line, navigate to your package directory by typing `cd path/to/your-package-name` and pressing **Enter**.
24 +2. Ensure your package contains `package.json` and `package-lock.json` files.
25 +3. Type `npm audit` and press **Enter**.
26 +4. Review the audit report and run recommended commands or investigate further if needed.
27 +
28 +### Resolving `EAUDITNOPJSON` and `EAUDITNOLOCK` errors
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`.
34 +
35 +## Reviewing and acting on the security audit report
36 +
37 +Running `npm audit` will produce a report of security vulnerabilities with the affected package name, vulnerability severity and description, path, and other information, and, if available, commands to apply patches to resolve vulnerabilities. For more information on the fields in the audit report, see "[About audit reports](about-audit-reports)"
38 +
39 +### Security vulnerabilities found with suggested updates
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)".)
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 +
48 +#### SEMVER warnings
49 +
50 +If the recommended action is a potential breaking change (semantic version major change), it will be followed by a `SEMVER WARNING` that says "SEMVER WARNING: Recommended action is a potentially breaking change". If the package with the vulnerability has changed its API, you may need to make additional changes to your package's code.
51 +
52 +### Security vulnerabilities found requiring manual review
53 +
54 +If security vulnerabilities are found, but no patches are available, the audit report will provide information about the vulnerability so you can investigate further.
55 +
56 +<Screenshot src="/packages-and-modules/securing-your-code/audit-manual-review.png" alt="Screenshot of command-line audit results requiring a manual review" />
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)
64 +
65 +#### Check for mitigating factors
66 +
67 +Review the security advisory in the "More info" field for mitigating factors that may allow you to continue using the package with the vulnerability in limited cases. For example, the vulnerability may only exist when the code is used on specific operating systems, or when a specific function is called.
68 +
69 +#### Update dependent packages if a fix exists
70 +
71 +If a fix exists but packages that depend on the package with the vulnerability have not been updated to include the fixed version, you may want to open a pull or merge request on the dependent package repository to use the fixed version.
72 +
73 +1. To find the package that must be updated, check the "Path" field for the location of the package with the vulnerability, then check for the package that depends on it. For example, if the path to the vulnerability is `@package-name > dependent-package > package-with-vulnerability`, you will need to update `dependent-package`.
74 +2. On the [npm public registry](https://npmjs.com), find the dependent package and navigate to its repository. For more information on finding packages, see "[Searching for and choosing packages to download](searching-for-and-choosing-packages-to-download)".
75 +3. In the dependent package repository, open a pull or merge request to update the version of the vulnerable package to a version with a fix.
76 +4. Once the pull or merge request is merged and the package has been updated in the [npm public registry](https://npmjs.com), update your copy of the package with `npm update`.
77 +
78 +#### Fix the vulnerability
79 +
80 +If a fix does not exist, you may want to suggest changes that address the vulnerability to the package maintainer in a pull or merge request on the package repository.
81 +
82 +1. Check the "Path" field for the location of the vulnerability.
83 +2. On the [npm public registry](https://npmjs.com), find the package with the vulnerability. For more information on finding packages, see "[Searching for and choosing packages to download](searching-for-and-choosing-packages-to-download)".
84 +3. In the package repository, open a pull or merge request to make the fix on the package repository.
85 +4. Once the fix is merged and the package has been updated in the npm public registry, update your copy of the package that depends on the package with the fix.
86 +
87 +#### Open an issue in the package or dependent package issue tracker
88 +
89 +If you do not want to fix the vulnerability or update the dependent package yourself, open an issue in the package or dependent package issue tracker.
90 +
91 +1. On the [npm public registry](https://npmjs.com), find the package with the vulnerability or the dependent package that needs an update. For more information on finding packages, see "[Searching for and choosing packages to download](searching-for-and-choosing-packages-to-download)".
92 +2. In the package or dependent package issue tracker, open an issue and include information from the audit report, including the vulnerability report from the "More info" field.
93 +
94 +### No security vulnerabilities found
95 +
96 +If no security vulnerabilities are found, this means that packages with known vulnerabilities were not found in your package dependency tree. Since the advisory database can be updated at any time, we recommend regularly running `npm audit` manually, or adding `npm audit` to your continuous integration process.
97 +
98 +<Screenshot src="/packages-and-modules/securing-your-code/audit-no-vulnerabilities.png" alt="Screenshot showing audit report with no vulnerabilities" />
99 +
100 +## Turning off `npm audit` on package installation
101 +
102 +### Installing a single package
103 +
104 +To turn off `npm audit` when installing a single package, use the `--no-audit` flag:
105 +
106 +```
107 +npm install example-package-name --no-audit
108 +```
109 +
110 +For more information, see the [`npm-install` command][cli-install].
111 +
112 +### Installing all packages
113 +
114 +To turn off `npm audit` when installing all packages, set the `audit` setting to `false` in your user and global npmrc config files:
115 +
116 +```
117 +npm set audit false
118 +```
119 +
120 +For more information, see the [`npm-config` management command][cli-config] and the [`npm-config` audit setting][cli-config-audit].
121 +
122 +
123 +[cli-install]: /cli/install
124 +[cli-config]: /cli/config
125 +[cli-config-audit]: /cli/config#audit
content/packages-and-modules/securing-your-code/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Securing your code
3 +---
4 +
5 +<Index />
content/packages-and-modules/securing-your-code/reporting-malware-in-an-npm-package.mdx new
+35
@@ -0,0 +1,35 @@
1 +---
2 +title: Reporting malware in an npm package
3 +redirect_from:
4 + - /reporting-a-vulnerability-in-an-npm-package
5 +---
6 +
7 +If you find malware in an npm package (either yours or someone else's), you can report it to the npm Security team to help keep the Javascript ecosystem safe.
8 +
9 +<Note>
10 +
11 +**Note:** Vulnerabilities in npm packages should be reported directly to the package maintainers. We strongly advise doing this privately. You can find contact information about package maintainers with `npm owner ls <package-name>`. If the source code is hosted on GitHub please refer to the repository's [Security Policy](https://docs.github.com/en/free-pro-team@latest/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository#about-security-policies).
12 +
13 +</Note>
14 +
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 +1. Confirm validity of the report.
19 +2. Remove the package from the registry.
20 +3. Publish a security placeholder for the package.
21 +4. Publish a security advisory alerting the community.
22 +
23 +As part of our process we determine whether the user account who uploaded the package should be banned. We also cooperate with 3rd parties when applicable.
24 +
25 +## Reporting malware
26 +
27 +1. Gather information about the malware.
28 +2. On the package page, click **Report malware**.
29 +3. On the malware report page, provide information about yourself and the malware:
30 + - **Name:** Your name.
31 + - **Email address:** An email address the npm Security team can use to contact you.
32 + - **Package name:** The name of the package that contains the malware.
33 + - **Package version:** The version of the package that contains the malware. Include all affected versions.
34 + - **Description of the malware:** A brief description of the malware and its effects. Include references, commits, and/or code examples that would help our researchers confirm the report.
35 +4. Click **Send Report**.
content/packages-and-modules/securing-your-code/requiring-2fa-for-package-publishing-and-settings-modification.mdx new
+38
@@ -0,0 +1,38 @@
1 +---
2 +title: Requiring 2FA for package publishing and settings modification
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +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 a one-time password in addition to their login token when they publish the package. For more information, see "[Configuring two-factor authentication][config-2fa]".
7 +
8 +You may also choose to allow publishing with either two-factor authentication _or_ with [automation tokens][creating-tokens]. This lets you configure automation tokens in a CI/CD workflow, but requires two-factor authentication from interactive publishes.
9 +
10 +## Configuring two-factor authentication
11 +
12 +1. <>{shared['user-login'].text}</>
13 +
14 + <>{shared['user-login'].image}</>
15 +
16 +2. Navigate to the package on which you want to require a second factor to publish or modify settings.
17 +
18 +3. Click **Settings**.
19 +
20 + <Screenshot src="/packages-and-modules/securing-your-code/2fa-package-admin.png" alt="Screenshot showing the admin tab on a package page" />
21 +
22 +4. Under "Publishing access", select the requirements to publish a package.
23 + 1. **Two-factor authentication is not required**
24 + 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.
25 +
26 + 2. **Require two-factor authentication or automation tokens**
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 a one-time passcode when they perform the publish. However, maintainers may also create an [automation token][creating-tokens] and use that to publish. A one-time passcode is _not_ required when using an automation token, making it useful for continuous integration and continuous deployment workflows.
28 +
29 + 3. **Two-factor authentication only**
30 + 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 a one-time passcode when they perform the publish.
31 +
32 + <Screenshot src="/packages-and-modules/securing-your-code/2fa-package-require.png" alt="Screenshot showing the require two-factor option for a package" />
33 +
34 +5. Click **Update Package Settings**.
35 +
36 + <Screenshot src="/packages-and-modules/securing-your-code/2fa-package-update.png" alt="Screenshot showing the update package settings button" />
37 +
38 +[config-2fa]: configuring-two-factor-authentication
content/packages-and-modules/securing-your-code/verifying-the-pgp-signature-for-a-package-from-the-npm-public-registry.mdx new
+68
@@ -0,0 +1,68 @@
1 +---
2 +title: Verifying the PGP signature of a package from the npm public registry
3 +---
4 +
5 +To ensure the integrity of a package version you download from the npm public registry, you can manually verify the [PGP signature][about-pgp-sig] of the package.
6 +
7 +<Note>
8 +
9 +**Note:** Since fully verifying signatures on Keybase requires rechecking proofs (which requires network activity) and is therefore expensive, we recommend only verifying signatures if it is absolutely necessary -- for example, when verifying a deploy artifact, or when initially storing a package in your cache.
10 +
11 +</Note>
12 +
13 +## Prerequisites
14 +
15 +1. Install Keybase from https://keybase.io/download
16 +2. Create a Keybase account on https://keybase.io
17 +3. Follow "[npmregistry][npmregistry]" on Keybase.
18 +4. Download a local copy of the npm public registry's [public PGP key][npm-key].
19 +
20 +## Verifying npm signatures for the public registry
21 +
22 +<Note>
23 +
24 +**Note:** The following steps use version 1.4.3 of the `light-cycle` package as an example.
25 +
26 +</Note>
27 +
28 +1. On the command line, fetch the signature for the package version you want and save it in a file:
29 +
30 + ```
31 + $ http GET https://registry.npmjs.org/light-cycle | json "versions['1.4.3'].dist.npm-signature" > sig-to-check
32 + ```
33 +
34 +2. Get the integrity field for that version (example below includes response):
35 +
36 + ```
37 + $ http GET https://registry.npmjs.org/light-cycle | json "versions['1.4.3'].dist.integrity"
38 + ```
39 +
40 + Example response:
41 +
42 + ```
43 + sha512-sFcuivsDZ99fY0TbvuRC6CDXB8r/ylafjJAMnbSF0y4EMM1/1DtQo40G2WKz1rBbyiz4SLAc3Wa6yZyC4XSGOQ==
44 + ```
45 +
46 +3. Construct the string that ties the unique package name and version to the integrity string (example below includes response):
47 +
48 + ```
49 + $ keybase pgp verify --signed-by npmregistry -d sig-to-check -m 'light-cycle@1.4.3:sha512-sFcuivsDZ99fY0TbvuRC6CDXB8r/ylafjJAMnbSF0y4EMM1/1DtQo40G2WKz1rBbyiz4SLAc3Wa6yZyC4XSGOQ=='
50 + ```
51 +
52 + Example response:
53 +
54 + ```
55 + ▶ INFO Identifying npmregistry
56 + ✔ <tracked> public key fingerprint: 0963 1802 8A2B 58C8 4929 D8E1 3D4D 5B12 0276 566A
57 + You last followed npmregistry on 2018-04-10 21:21:57 PDT
58 + ✔ <tracked> admin of DNS zone npmjs.com: found TXT entry keybase-site-verification=iK3pjpRBkv-CIJ4PHtWL4TTcFXMpPiwPynatKl3oWO4
59 + ✔ <tracked> "npmjs" on twitter: https://twitter.com/npmjs/status/981288548845240320 [cached 2018-04-12 13:18:31 PDT; but got a retryable error (API network error: Get https://twitter.com/npmjs/status/981288548845240320: net/http: request canceled (Client.Timeout exceeded while awaiting headers) (code=170)) this time around]
60 + ✔ <tracked> admin of DNS zone npmjs.org: found TXT entry keybase-site-verification=Ls8jN55i6KesjiX91Ck79bUZ17eA-iohmw2jJFM16xc
61 + Signature verified. Signed by npmregistry 7 minutes ago (2018-04-13 15:00:37 -0700 PDT).
62 + PGP Fingerprint: 096318028a2b58c84929d8e13d4d5b120276566a.
63 + ```
64 +
65 +[about-pgp-sig]: about-pgp-signatures-for-packages-in-the-public-registry
66 +[keybase]: https://keybase.io
67 +[npmregistry]: https://keybase.io/npmregistry
68 +[npm-key]: https://keybase.io/npmregistry/pgp_keys.asc
content/packages-and-modules/updating-and-managing-your-published-packages/adding-collaborators-to-private-packages-owned-by-a-user-account.mdx new
+33
@@ -0,0 +1,33 @@
1 +---
2 +title: Adding collaborators to private packages owned by a user account
3 +---
4 +
5 +As an npm user with a paid user account, you can another npm user with a paid account as a collaborator on a private package you own.
6 +
7 +<Note>
8 +
9 +**Note:** The user you want to add as a collaborator on your private package must have a paid user account. To sign up for a paid account, they can visit `https://https://www.npmjs.com/settings/username/billing`, replacing `username` with their npm username.
10 +
11 +</Note>
12 +
13 +## Granting access to a private user package on the web
14 +
15 +1. On the [npm website][npmjs-com], go to the package to which you want to add a collaborator: `https://www.npmjs.com/package/<your-package-name>`
16 +2. On the package page, under "Collaborators", click **+**.
17 +3. Enter the npm username of the collaborator.
18 +4. Click **Submit**.
19 +
20 +## Granting private package access from the command line interface
21 +
22 +To add a collaborator to a package on the command line, run the following command, replacing `<user>` with the npm username of your collaborator, and `<your-package-name>` with the name of the private package:
23 +
24 +```
25 +npm owner add <user> <your-package-name>
26 +```
27 +
28 +## Granting access to private organization packages
29 +
30 +To grant an npm user access to private organization packages, you must have an organization owner add them to your organization, then add them to a team that has access to the private package. For more information, see "[Adding members to your organization][add-org-members]".
31 +
32 +[npmjs-com]: https://npmjs.com
33 +[add-org-members]: adding-members-to-your-organization
content/packages-and-modules/updating-and-managing-your-published-packages/changing-package-visibility.mdx new
+73
@@ -0,0 +1,73 @@
1 +---
2 +title: Changing package visibility
3 +---
4 +
5 +You can change the visibility of a scoped package from the website or command line.
6 +
7 +You must be the owner of the user account or organization that owns the package in order to change package visibility.
8 +
9 +For more information about package visibility, see "[Package scope, access level, and visibility][pkg-viz]".
10 +
11 +<Note>
12 +
13 +**Note:** You cannot change the visibility of an unscoped package. Only scoped packages with a paid subscription may be private.
14 +
15 +</Note>
16 +
17 +## Making a public package private
18 +
19 +<Note>
20 +
21 +**Note:** Making a package private requires a paid user account or organization. To sign up for a paid user or organization, go to `https://www.npmjs.com/settings/account-name/billing`, replacing `account-name` with the name of your npm user account or organization.
22 +
23 +</Note>
24 +
25 +If you want to restrict access and visibility for a public package you own, you can make the package private. When you make a package private, it will be removed from the website within a few minutes of the change.
26 +
27 +### Using the website
28 +
29 +1. On the [npm website][npmjs-com], go to the package page.
30 +2. On the package page, click **Admin**.
31 +3. Under "Package Access", select "Is Package Private?"
32 +4. Click **Update package settings**.
33 +
34 +### Using the command line
35 +
36 +To make a public package private on the command line, run the following command, replacing `<package-name>` with the name of your package:
37 +
38 +```
39 +npm access restricted <package-name>
40 +```
41 +
42 +For more information, see the <a href="https://docs.npmjs.com/cli-documentation/access">`npm access`</a> documentation.
43 +
44 +## Making a private package public
45 +
46 +<div class="note">
47 +
48 +<span class="bold">Note:</span> When you make a private package public, the package will be visible to and downloadable by all npm users.
49 +
50 +</div>
51 +
52 +### Using the website
53 +
54 +1. On the npm website, go to the package page.
55 +2. On the package page, click **Admin**.
56 +3. Under "Package Access", deselect "Is Package Private?"
57 +4. Click **Update package settings**.
58 +
59 +### Using the command line
60 +
61 +To make a private package public on the command line, run the following command, replacing `<package-name>` with the name of your package:
62 +
63 +```
64 +npm access public <package-name>
65 +```
66 +
67 +For more information, see the [`npm access` CLI documentation][access-cli].
68 +
69 +
70 +[contact-support]: https://www.npmjs.com/support
71 +[pkg-viz]: package-scope-access-level-and-visibility
72 +[npmjs-com]: https://npmjs.com
73 +[access-cli]: /cli/access
content/packages-and-modules/updating-and-managing-your-published-packages/deprecating-and-undeprecating-packages-or-package-versions.mdx new
+80
@@ -0,0 +1,80 @@
1 +---
2 +title: Deprecating and undeprecating packages or package versions
3 +---
4 +
5 +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.
6 +
7 +A deprecation warning or message can say anything. You may wish to include a message encouraging users to update to a specific version, or an alternate, supported package.
8 +
9 +<Note>
10 +
11 +**Note:** We strongly recommend deprecating packages or package versions instead of <a href="/unpublishing-packages-from-the-registry">unpublishing</a> them, because unpublishing removes a package from the registry entirely, meaning anyone who relied on it will no longer be able to use it, with no warning.
12 +
13 +</Note>
14 +
15 +## Deprecating an entire package or a single version of a package
16 +
17 +### Deprecating an entire package
18 +
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 +
23 +To deprecate an entire package, run the following command, replacing `<package-name>` with the name of your package, and `"<message>"` with your deprecation message:
24 +
25 +```
26 +npm deprecate <package-name> "<message>"
27 +```
28 +
29 +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).
30 +
31 +### Deprecating a single version of a package
32 +
33 +When you deprecate a version fo a package, a red message will be displayed on that version's package page, similar to deprecating an entire package.
34 +
35 +<Screenshot src="/packages-and-modules/updating-and-managing-your-published-packages/deprecate-version.png" alt="Screenshot of package deprecation for a particular version" />
36 +
37 +To deprecate a package version, run the following command, replacing `<package-name>` with the name of your package, `<version>` with your version number, and `"<message>"` with your deprecation message:
38 +
39 +```
40 +npm deprecate <package-name>@<version> "<message>"
41 +```
42 +
43 +The CLI will also accept version ranges for `<version>`.
44 +
45 +If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).
46 +
47 +## Undeprecating a package or version
48 +
49 +To undeprecate a package, replace `"<message>"` with `""` (an empty string) in one of the above commands.
50 +
51 +For example, to undeprecate a package version, run the following command, replacing `<package-name>` with the name of your package, and `<version>` with your version number:
52 +
53 +```
54 +npm deprecate <package-name>@<version> ""
55 +```
56 +
57 +If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).
58 +
59 +## Transferring a deprecated package to npm
60 +
61 +If you are no longer maintaining a package, but other users depend on it, and you'd like to remove it from your user profile, you can transfer it to the [`@npm`][npm-account] user account, which is owned by the npm registry.
62 +
63 +<Note>
64 +
65 +**Note:** Once you transfer a package to the npm account, you will no longer be able to update it.
66 +
67 +</Note>
68 +
69 +To transfer a package to the npm user account, run the following two commands in order, replacing `<user>` with your npm user name, and `<package-name>` with the package you want to transfer:
70 +
71 +```
72 +npm owner add npm <package-name>
73 +npm owner rm <user> <package-name>
74 +```
75 +
76 +If you have two-factor auth, add a one-time password to the command, `--otp=123456` (where *123456* is the code from your authenticator).
77 +
78 +[deprecate-cli]: /cli/deprecate
79 +[two-factor-auth]: about-two-factor-authentication
80 +[npm-account]: https://www.npmjs.com/~npm
content/packages-and-modules/updating-and-managing-your-published-packages/index.mdx new
+5
@@ -0,0 +1,5 @@
1 +---
2 +title: Updating and managing your published packages
3 +---
4 +
5 +<Index />
content/packages-and-modules/updating-and-managing-your-published-packages/transferring-a-package-from-a-user-account-to-another-user-account.mdx new
+49
@@ -0,0 +1,49 @@
1 +---
2 +title: Transferring a package from a user account to another user account
3 +---
4 +
5 +As a package owner or maintainer, you can transfer ownership of a package you no longer wish to maintain to another trusted npm user on either the npm website or the command line.
6 +
7 +For more information on how npm support handles package name disputes between users, you can refer to npm's [package name dispute policy][dispute-policy].
8 +
9 +<Note>
10 +
11 +**Note:** If your package is scoped and private, the new package owner must also have a [paid user account](https://www.npmjs.com/pricing). It is possible to transfer ownership of user-scoped packages, however we don't recommend it because it can create some ownership confusion.
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:
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>`.
21 +
22 +2. On the package Admin tab, under "Maintainers", enter the npm username of the new maintainer.
23 +
24 + <Screenshot src="/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-invite.png" alt="Screenshot showing text field to invite maintainers" />
25 +
26 +3. Click "Invite."
27 +
28 +4. To remove yourself as a maintainer, under the maintainers list, click the "x" next to your username.
29 +
30 + <Screenshot src="/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-list.png" alt="Screenshot showing maintainer list" />
31 +
32 +## Transferring a package from a user account to another user account on the command line
33 +
34 +To transfer a package to another npm user using the CLI, run the [`npm owner add`][npm-owner] and `rm` commands in order, replacing `<their-username>` with the other user's npm username, `<your-username>` with your npm username, and `<package-name>` with the package you want to transfer:
35 +
36 +```
37 +npm owner add <their-username> <package-name>
38 +npm owner rm <your-username> <package-name>
39 +```
40 +
41 +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).
42 +
43 +```
44 +npm owner add <their-username> <package-name> --otp=123456
45 +npm owner rm <your-username> <package-name> --otp=123456
46 +```
47 +
48 +[dispute-policy]: https://www.npmjs.com/policies/disputes
49 +[npm-owner]: cli/owner
content/packages-and-modules/updating-and-managing-your-published-packages/unpublishing-packages-from-the-registry.mdx new
+69
@@ -0,0 +1,69 @@
1 +---
2 +title: Unpublishing packages from the registry
3 +---
4 +import shared from '../../../src/shared.js'
5 +
6 +## How to unpublish
7 +
8 +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][unpublish-cli] within 72 hours of the initial publish. Beyond 72 hours,so you can still unpublish your package if [it meets certain criteria](https://www.npmjs.com/policies/unpublish).
9 +
10 +<Note>
11 +
12 +**Note:** Removing all the collaborators or teams from the package will not unpublish it.
13 +
14 +</Note>
15 +
16 +### Unpublishing a single version of a package
17 +
18 +To unpublish a single version of a package, run the following command, replacing `<package-name>` with the name of your package, and `<version>` with your version number:
19 +
20 +```
21 +npm unpublish <package-name>@<version>
22 +```
23 +
24 +### Unpublishing an entire package
25 +
26 +To unpublish an entire package, run the following command, replacing `<package-name>` with the name of your package:
27 +
28 +```
29 +npm unpublish <package-name> -f
30 +```
31 +
32 +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).
33 +
34 +<>If you need help unpublishing your package, please {shared['contact-support'].text}. If you are an Enterprise customer, please {shared['contact-enterprise-support'].text}</>.
35 +
36 +<Note>
37 +
38 +**Note:** If you unpublish an entire package, you may not publish any new versions of that package until 24 hours have passed.
39 +
40 +</Note>
41 +
42 +## When to unpublish
43 +
44 +Unpublishing a package permanently removes the package from the registry so it is no longer available for other users to install. Once a package is unpublished, republishing under the same name is blocked for 24 hours. If you've unpublished a package by mistake, we'd recommend publishing again under a different name, or for unpublished versions, bumping the version number and publishing again.
45 +
46 +You might want to unpublish a package because you:
47 +
48 +* Published something accidentally.
49 +* Wanted to test npm.
50 +* Published content you [didn't intend to be public][oh-no].
51 +* Want to rename a package. (The only way to rename a package is to re-publish it under a new name)
52 +
53 +<Note>
54 +
55 +**Note:** `package-name@version` is unique, and cannot be reused by unpublishing and re-publishing it. We recommend publishing a minor version update instead.
56 +
57 +</Note>
58 +
59 +## When to deprecate
60 +
61 +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]".
62 +
63 +
64 +[unpublish-cli]: cli/unpublish
65 +[oh-no]: https://blog.npmjs.org/post/101934969510/oh-no-i-accidentally-published-private-data-to
66 +[deprecate-cli]: cli/deprecate
67 +[deprecate-package]: deprecating-and-undeprecating-packages-or-package-versions
68 +[unpublish-policy]: https://www.npmjs.com/policies/unpublish
69 +[two-factor-auth]: about-two-factor-authentication
content/packages-and-modules/updating-and-managing-your-published-packages/updating-your-published-package-version-number.mdx new
+27
@@ -0,0 +1,27 @@
1 +---
2 +title: Updating your published package version number
3 +---
4 +
5 +When you make significant changes to a published package, we recommend updating the version number to communicate the extent of the changes to others who rely on your code.
6 +
7 +<Note>
8 +
9 +**Note:** If you have linked a git repository to a package, updating the package version number will also add a tag with the updated release number to the linked git repository.
10 +
11 +</Note>
12 +
13 +1. To change the version number in `package.json`, on the command line, in the package root directory, run the following command, replacing `<update_type>` with one of the [semantic versioning][semver] release types (patch, major, or minor):
14 +
15 + ```
16 + npm version <update_type>
17 + ```
18 +
19 +2. Run `npm publish`.
20 +
21 +3. Go to your package page (`https://npmjs.com/package/<package>`) to check that the package version has been updated.
22 +
23 +For more information on `npm version`, see the [CLI documentation][cli-version].
24 +
25 +
26 +[semver]: about-semantic-versioning
27 +[cli-version]: /cli/version
gatsby-config.js new
+24
@@ -0,0 +1,24 @@
1 +module.exports = {
2 + siteMetadata: {
3 + title: 'npm Docs',
4 + shortName: 'npm',
5 + description: 'Documentation for the npm registry, website, and command-line interface',
6 + imageUrl: 'https://user-images.githubusercontent.com/29712634/81721690-e2fb5d80-9445-11ea-8602-4b2294c964f3.png',
7 + },
8 + plugins: [
9 + {
10 + resolve: 'gatsby-theme-doctornpm',
11 + options: {
12 + icon: './src/images/npm-favicon.png',
13 + editOnGitHub: false,
14 + showContributors: false,
15 + repo: {
16 + url: 'https://github.com/npm/documentation',
17 + defaultBranch: 'main',
18 + }
19 + },
20 + },
21 + 'gatsby-plugin-meta-redirect'
22 + ],
23 + pathPrefix: process.env.PATH_PREFIX || ''
24 +}
gatsby-node.js new
+24
@@ -0,0 +1,24 @@
1 +exports.onCreateNode = ({node, actions, getNode}) => {
2 + const {createNodeField} = actions;
3 +
4 + if (node.internal.type === "Mdx") {
5 + const file = getNode(node.parent);
6 +
7 + // cli paths are unchanged
8 + if (file.relativeDirectory.startsWith('cli/')) {
9 + return;
10 + }
11 +
12 + // directory index paths are unchanged
13 + if (file.name === 'index') {
14 + return;
15 + }
16 +
17 + // otherwise, omit the directory path and use the filename as the slug
18 + createNodeField({
19 + name: 'slug',
20 + node,
21 + value: file.name
22 + })
23 + }
24 +}
package-lock.json new
+54599
@@ -0,0 +1,54599 @@
1 +{
2 + "name": "npm-documentation",
3 + "version": "0.1.0",
4 + "lockfileVersion": 2,
5 + "requires": true,
6 + "packages": {
7 + "": {
8 + "name": "npm-documentation",
9 + "version": "0.1.0",
10 + "dependencies": {
11 + "gatsby": "^2.32.7",
12 + "gatsby-plugin-meta-redirect": "^1.1.1",
13 + "gatsby-theme-doctornpm": "^1.7.0",
14 + "react": "^16.14.0",
15 + "react-dom": "^16.14.0"
16 + }
17 + },
18 + "node_modules/@ardatan/aggregate-error": {
19 + "version": "0.0.6",
20 + "resolved": "https://registry.npmjs.org/@ardatan/aggregate-error/-/aggregate-error-0.0.6.tgz",
21 + "integrity": "sha512-vyrkEHG1jrukmzTPtyWB4NLPauUw5bQeg4uhn8f+1SSynmrOcyvlb1GKQjjgoBzElLdfXCRYX8UnBlhklOHYRQ==",
22 + "dependencies": {
23 + "tslib": "~2.0.1"
24 + },
25 + "engines": {
26 + "node": ">=8"
27 + }
28 + },
29 + "node_modules/@ardatan/aggregate-error/node_modules/tslib": {
30 + "version": "2.0.3",
31 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
32 + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
33 + },
34 + "node_modules/@babel/code-frame": {
35 + "version": "7.12.13",
36 + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz",
37 + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==",
38 + "dependencies": {
39 + "@babel/highlight": "^7.12.13"
40 + }
41 + },
42 + "node_modules/@babel/compat-data": {
43 + "version": "7.13.12",
44 + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz",
45 + "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ=="
46 + },
47 + "node_modules/@babel/core": {
48 + "version": "7.12.17",
49 + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.17.tgz",
50 + "integrity": "sha512-V3CuX1aBywbJvV2yzJScRxeiiw0v2KZZYYE3giywxzFJL13RiyPjaaDwhDnxmgFTTS7FgvM2ijr4QmKNIu0AtQ==",
51 + "dependencies": {
52 + "@babel/code-frame": "^7.12.13",
53 + "@babel/generator": "^7.12.17",
54 + "@babel/helper-module-transforms": "^7.12.17",
55 + "@babel/helpers": "^7.12.17",
56 + "@babel/parser": "^7.12.17",
57 + "@babel/template": "^7.12.13",
58 + "@babel/traverse": "^7.12.17",
59 + "@babel/types": "^7.12.17",
60 + "convert-source-map": "^1.7.0",
61 + "debug": "^4.1.0",
62 + "gensync": "^1.0.0-beta.1",
63 + "json5": "^2.1.2",
64 + "lodash": "^4.17.19",
65 + "semver": "^5.4.1",
66 + "source-map": "^0.5.0"
67 + },
68 + "engines": {
69 + "node": ">=6.9.0"
70 + },
71 + "funding": {
72 + "type": "opencollective",
73 + "url": "https://opencollective.com/babel"
74 + }
75 + },
76 + "node_modules/@babel/core/node_modules/debug": {
77 + "version": "4.3.1",
78 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
79 + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
80 + "dependencies": {
81 + "ms": "2.1.2"
82 + },
83 + "engines": {
84 + "node": ">=6.0"
85 + },
86 + "peerDependenciesMeta": {
87 + "supports-color": {
88 + "optional": true
89 + }
90 + }
91 + },
92 + "node_modules/@babel/core/node_modules/ms": {
93 + "version": "2.1.2",
94 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
95 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
96 + },
97 + "node_modules/@babel/core/node_modules/semver": {
98 + "version": "5.7.1",
99 + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
100 + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
101 + "bin": {
102 + "semver": "bin/semver"
103 + }
104 + },
105 + "node_modules/@babel/core/node_modules/source-map": {
106 + "version": "0.5.7",
107 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
108 + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
109 + "engines": {
110 + "node": ">=0.10.0"
111 + }
112 + },
113 + "node_modules/@babel/generator": {
114 + "version": "7.13.9",
115 + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz",
116 + "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==",
117 + "dependencies": {
118 + "@babel/types": "^7.13.0",
119 + "jsesc": "^2.5.1",
120 + "source-map": "^0.5.0"
121 + }
122 + },
123 + "node_modules/@babel/generator/node_modules/source-map": {
124 + "version": "0.5.7",
125 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
126 + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
127 + "engines": {
128 + "node": ">=0.10.0"
129 + }
130 + },
131 + "node_modules/@babel/helper-annotate-as-pure": {
132 + "version": "7.12.13",
133 + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz",
134 + "integrity": "sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==",
135 + "dependencies": {
136 + "@babel/types": "^7.12.13"
137 + }
138 + },
139 + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": {
140 + "version": "7.12.13",
141 + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz",
142 + "integrity": "sha512-CZOv9tGphhDRlVjVkAgm8Nhklm9RzSmWpX2my+t7Ua/KT616pEzXsQCjinzvkRvHWJ9itO4f296efroX23XCMA==",
143 + "dependencies": {
144 + "@babel/helper-explode-assignable-expression": "^7.12.13",
145 + "@babel/types": "^7.12.13"
146 + }
147 + },
148 + "node_modules/@babel/helper-compilation-targets": {
149 + "version": "7.13.13",
150 + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz",
151 + "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==",
152 + "dependencies": {
153 + "@babel/compat-data": "^7.13.12",
154 + "@babel/helper-validator-option": "^7.12.17",
155 + "browserslist": "^4.14.5",
156 + "semver": "^6.3.0"
157 + },
158 + "peerDependencies": {
159 + "@babel/core": "^7.0.0"
160 + }
161 + },
162 + "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
163 + "version": "6.3.0",
164 + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
165 + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
166 + "bin": {
167 + "semver": "bin/semver.js"
168 + }
169 + },
170 + "node_modules/@babel/helper-create-class-features-plugin": {
171 + "version": "7.13.11",
172 + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz",
173 + "integrity": "sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw==",
174 + "dependencies": {
175 + "@babel/helper-function-name": "^7.12.13",
176 + "@babel/helper-member-expression-to-functions": "^7.13.0",
177 + "@babel/helper-optimise-call-expression": "^7.12.13",
178 + "@babel/helper-replace-supers": "^7.13.0",
179 + "@babel/helper-split-export-declaration": "^7.12.13"
180 + },
181 + "peerDependencies": {
182 + "@babel/core": "^7.0.0"
183 + }
184 + },
185 + "node_modules/@babel/helper-create-regexp-features-plugin": {
186 + "version": "7.12.17",
187 + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz",
188 + "integrity": "sha512-p2VGmBu9oefLZ2nQpgnEnG0ZlRPvL8gAGvPUMQwUdaE8k49rOMuZpOwdQoy5qJf6K8jL3bcAMhVUlHAjIgJHUg==",
189 + "dependencies": {
190 + "@babel/helper-annotate-as-pure": "^7.12.13",
191 + "regexpu-core": "^4.7.1"
192 + },
193 + "peerDependencies": {
194 + "@babel/core": "^7.0.0"
195 + }
196 + },
197 + "node_modules/@babel/helper-define-polyfill-provider": {
198 + "version": "0.1.5",
199 + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz",
200 + "integrity": "sha512-nXuzCSwlJ/WKr8qxzW816gwyT6VZgiJG17zR40fou70yfAcqjoNyTLl/DQ+FExw5Hx5KNqshmN8Ldl/r2N7cTg==",
201 + "dependencies": {
202 + "@babel/helper-compilation-targets": "^7.13.0",
203 + "@babel/helper-module-imports": "^7.12.13",
204 + "@babel/helper-plugin-utils": "^7.13.0",
205 + "@babel/traverse": "^7.13.0",
206 + "debug": "^4.1.1",
207 + "lodash.debounce": "^4.0.8",
208 + "resolve": "^1.14.2",
209 + "semver": "^6.1.2"
210 + },
211 + "peerDependencies": {
212 + "@babel/core": "^7.4.0-0"
213 + }
214 + },
215 + "node_modules/@babel/helper-define-polyfill-provider/node_modules/debug": {
216 + "version": "4.3.1",
217 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
218 + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
219 + "dependencies": {
220 + "ms": "2.1.2"
221 + },
222 + "engines": {
223 + "node": ">=6.0"
224 + },
225 + "peerDependenciesMeta": {
226 + "supports-color": {
227 + "optional": true
228 + }
229 + }
230 + },
231 + "node_modules/@babel/helper-define-polyfill-provider/node_modules/ms": {
232 + "version": "2.1.2",
233 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
234 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
235 + },
236 + "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": {
237 + "version": "6.3.0",
238 + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
239 + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
240 + "bin": {
241 + "semver": "bin/semver.js"
242 + }
243 + },
244 + "node_modules/@babel/helper-explode-assignable-expression": {
245 + "version": "7.12.13",
246 + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.13.tgz",
247 + "integrity": "sha512-5loeRNvMo9mx1dA/d6yNi+YiKziJZFylZnCo1nmFF4qPU4yJ14abhWESuSMQSlQxWdxdOFzxXjk/PpfudTtYyw==",
248 + "dependencies": {
249 + "@babel/types": "^7.12.13"
250 + }
251 + },
252 + "node_modules/@babel/helper-function-name": {
253 + "version": "7.12.13",
254 + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz",
255 + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==",
256 + "dependencies": {
257 + "@babel/helper-get-function-arity": "^7.12.13",
258 + "@babel/template": "^7.12.13",
259 + "@babel/types": "^7.12.13"
260 + }
261 + },
262 + "node_modules/@babel/helper-get-function-arity": {
263 + "version": "7.12.13",
264 + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz",
265 + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==",
266 + "dependencies": {
267 + "@babel/types": "^7.12.13"
268 + }
269 + },
270 + "node_modules/@babel/helper-hoist-variables": {
271 + "version": "7.12.13",
272 + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.12.13.tgz",
273 + "integrity": "sha512-KSC5XSj5HreRhYQtZ3cnSnQwDzgnbdUDEFsxkN0m6Q3WrCRt72xrnZ8+h+pX7YxM7hr87zIO3a/v5p/H3TrnVw==",
274 + "dependencies": {
275 + "@babel/types": "^7.12.13"
276 + }
277 + },
278 + "node_modules/@babel/helper-member-expression-to-functions": {
279 + "version": "7.13.12",
280 + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz",
281 + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==",
282 + "dependencies": {
283 + "@babel/types": "^7.13.12"
284 + }
285 + },
286 + "node_modules/@babel/helper-module-imports": {
287 + "version": "7.12.13",
288 + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz",
289 + "integrity": "sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==",
290 + "dependencies": {
291 + "@babel/types": "^7.12.13"
292 + }
293 + },
294 + "node_modules/@babel/helper-module-transforms": {
295 + "version": "7.12.17",
296 + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.17.tgz",
297 + "integrity": "sha512-sFL+p6zOCQMm9vilo06M4VHuTxUAwa6IxgL56Tq1DVtA0ziAGTH1ThmJq7xwPqdQlgAbKX3fb0oZNbtRIyA5KQ==",
298 + "dependencies": {
299 + "@babel/helper-module-imports": "^7.12.13",
300 + "@babel/helper-replace-supers": "^7.12.13",
301 + "@babel/helper-simple-access": "^7.12.13",
302 + "@babel/helper-split-export-declaration": "^7.12.13",
303 + "@babel/helper-validator-identifier": "^7.12.11",
304 + "@babel/template": "^7.12.13",
305 + "@babel/traverse": "^7.12.17",
306 + "@babel/types": "^7.12.17",
307 + "lodash": "^4.17.19"
308 + }
309 + },
310 + "node_modules/@babel/helper-optimise-call-expression": {
311 + "version": "7.12.13",
312 + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz",
313 + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==",
314 + "dependencies": {
315 + "@babel/types": "^7.12.13"
316 + }
317 + },
318 + "node_modules/@babel/helper-plugin-utils": {
319 + "version": "7.13.0",
320 + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz",
321 + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ=="
322 + },
323 + "node_modules/@babel/helper-remap-async-to-generator": {
324 + "version": "7.12.13",
325 + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.13.tgz",
326 + "integrity": "sha512-Qa6PU9vNcj1NZacZZI1Mvwt+gXDH6CTfgAkSjeRMLE8HxtDK76+YDId6NQR+z7Rgd5arhD2cIbS74r0SxD6PDA==",
327 + "dependencies": {
328 + "@babel/helper-annotate-as-pure": "^7.12.13",
329 + "@babel/helper-wrap-function": "^7.12.13",
330 + "@babel/types": "^7.12.13"
331 + }
332 + },
333 + "node_modules/@babel/helper-replace-supers": {
334 + "version": "7.13.12",
335 + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz",
336 + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==",
337 + "dependencies": {
338 + "@babel/helper-member-expression-to-functions": "^7.13.12",
339 + "@babel/helper-optimise-call-expression": "^7.12.13",
340 + "@babel/traverse": "^7.13.0",
341 + "@babel/types": "^7.13.12"
342 + }
343 + },
344 + "node_modules/@babel/helper-simple-access": {
345 + "version": "7.12.13",
346 + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz",
347 + "integrity": "sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA==",
348 + "dependencies": {
349 + "@babel/types": "^7.12.13"
350 + }
351 + },
352 + "node_modules/@babel/helper-skip-transparent-expression-wrappers": {
353 + "version": "7.12.1",
354 + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz",
355 + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==",
356 + "dependencies": {
357 + "@babel/types": "^7.12.1"
358 + }
359 + },
360 + "node_modules/@babel/helper-split-export-declaration": {
361 + "version": "7.12.13",
362 + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz",
363 + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==",
364 + "dependencies": {
365 + "@babel/types": "^7.12.13"
366 + }
367 + },
368 + "node_modules/@babel/helper-validator-identifier": {
369 + "version": "7.12.11",
370 + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
371 + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
372 + },
373 + "node_modules/@babel/helper-validator-option": {
374 + "version": "7.12.17",
375 + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz",
376 + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw=="
377 + },
378 + "node_modules/@babel/helper-wrap-function": {
379 + "version": "7.12.13",
380 + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.13.tgz",
381 + "integrity": "sha512-t0aZFEmBJ1LojdtJnhOaQEVejnzYhyjWHSsNSNo8vOYRbAJNh6r6GQF7pd36SqG7OKGbn+AewVQ/0IfYfIuGdw==",
382 + "dependencies": {
383 + "@babel/helper-function-name": "^7.12.13",
384 + "@babel/template": "^7.12.13",
385 + "@babel/traverse": "^7.12.13",
386 + "@babel/types": "^7.12.13"
387 + }
388 + },
389 + "node_modules/@babel/helpers": {
390 + "version": "7.12.17",
391 + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.17.tgz",
392 + "integrity": "sha512-tEpjqSBGt/SFEsFikKds1sLNChKKGGR17flIgQKXH4fG6m9gTgl3gnOC1giHNyaBCSKuTfxaSzHi7UnvqiVKxg==",
393 + "dependencies": {
394 + "@babel/template": "^7.12.13",
395 + "@babel/traverse": "^7.12.17",
396 + "@babel/types": "^7.12.17"
397 + }
398 + },
399 + "node_modules/@babel/highlight": {
400 + "version": "7.12.13",
401 + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz",
402 + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==",
403 + "dependencies": {
404 + "@babel/helper-validator-identifier": "^7.12.11",
405 + "chalk": "^2.0.0",
406 + "js-tokens": "^4.0.0"
407 + }
408 + },
409 + "node_modules/@babel/highlight/node_modules/ansi-styles": {
410 + "version": "3.2.1",
411 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
412 + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
413 + "dependencies": {
414 + "color-convert": "^1.9.0"
415 + },
416 + "engines": {
417 + "node": ">=4"
418 + }
419 + },
420 + "node_modules/@babel/highlight/node_modules/chalk": {
421 + "version": "2.4.2",
422 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
423 + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
424 + "dependencies": {
425 + "ansi-styles": "^3.2.1",
426 + "escape-string-regexp": "^1.0.5",
427 + "supports-color": "^5.3.0"
428 + },
429 + "engines": {
430 + "node": ">=4"
431 + }
432 + },
433 + "node_modules/@babel/highlight/node_modules/color-convert": {
434 + "version": "1.9.3",
435 + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
436 + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
437 + "dependencies": {
438 + "color-name": "1.1.3"
439 + }
440 + },
441 + "node_modules/@babel/highlight/node_modules/color-name": {
442 + "version": "1.1.3",
443 + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
444 + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
445 + },
446 + "node_modules/@babel/highlight/node_modules/escape-string-regexp": {
447 + "version": "1.0.5",
448 + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
449 + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
450 + "engines": {
451 + "node": ">=0.8.0"
452 + }
453 + },
454 + "node_modules/@babel/highlight/node_modules/has-flag": {
455 + "version": "3.0.0",
456 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
457 + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
458 + "engines": {
459 + "node": ">=4"
460 + }
461 + },
462 + "node_modules/@babel/highlight/node_modules/supports-color": {
463 + "version": "5.5.0",
464 + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
465 + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
466 + "dependencies": {
467 + "has-flag": "^3.0.0"
468 + },
469 + "engines": {
470 + "node": ">=4"
471 + }
472 + },
473 + "node_modules/@babel/parser": {
474 + "version": "7.13.13",
475 + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz",
476 + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==",
477 + "bin": {
478 + "parser": "bin/babel-parser.js"
479 + },
480 + "engines": {
481 + "node": ">=6.0.0"
482 + }
483 + },
484 + "node_modules/@babel/plugin-proposal-async-generator-functions": {
485 + "version": "7.12.13",
486 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.13.tgz",
487 + "integrity": "sha512-1KH46Hx4WqP77f978+5Ye/VUbuwQld2hph70yaw2hXS2v7ER2f3nlpNMu909HO2rbvP0NKLlMVDPh9KXklVMhA==",
488 + "dependencies": {
489 + "@babel/helper-plugin-utils": "^7.12.13",
490 + "@babel/helper-remap-async-to-generator": "^7.12.13",
491 + "@babel/plugin-syntax-async-generators": "^7.8.0"
492 + },
493 + "peerDependencies": {
494 + "@babel/core": "^7.0.0-0"
495 + }
496 + },
497 + "node_modules/@babel/plugin-proposal-class-properties": {
498 + "version": "7.12.13",
499 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.13.tgz",
500 + "integrity": "sha512-8SCJ0Ddrpwv4T7Gwb33EmW1V9PY5lggTO+A8WjyIwxrSHDUyBw4MtF96ifn1n8H806YlxbVCoKXbbmzD6RD+cA==",
501 + "dependencies": {
502 + "@babel/helper-create-class-features-plugin": "^7.12.13",
503 + "@babel/helper-plugin-utils": "^7.12.13"
504 + },
505 + "peerDependencies": {
506 + "@babel/core": "^7.0.0-0"
507 + }
508 + },
509 + "node_modules/@babel/plugin-proposal-dynamic-import": {
510 + "version": "7.12.17",
511 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.17.tgz",
512 + "integrity": "sha512-ZNGoFZqrnuy9H2izB2jLlnNDAfVPlGl5NhFEiFe4D84ix9GQGygF+CWMGHKuE+bpyS/AOuDQCnkiRNqW2IzS1Q==",
513 + "dependencies": {
514 + "@babel/helper-plugin-utils": "^7.12.13",
515 + "@babel/plugin-syntax-dynamic-import": "^7.8.0"
516 + },
517 + "peerDependencies": {
518 + "@babel/core": "^7.0.0-0"
519 + }
520 + },
521 + "node_modules/@babel/plugin-proposal-export-namespace-from": {
522 + "version": "7.12.13",
523 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz",
524 + "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==",
525 + "dependencies": {
526 + "@babel/helper-plugin-utils": "^7.12.13",
527 + "@babel/plugin-syntax-export-namespace-from": "^7.8.3"
528 + },
529 + "peerDependencies": {
530 + "@babel/core": "^7.0.0-0"
531 + }
532 + },
533 + "node_modules/@babel/plugin-proposal-json-strings": {
534 + "version": "7.12.13",
535 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.13.tgz",
536 + "integrity": "sha512-v9eEi4GiORDg8x+Dmi5r8ibOe0VXoKDeNPYcTTxdGN4eOWikrJfDJCJrr1l5gKGvsNyGJbrfMftC2dTL6oz7pg==",
537 + "dependencies": {
538 + "@babel/helper-plugin-utils": "^7.12.13",
539 + "@babel/plugin-syntax-json-strings": "^7.8.0"
540 + },
541 + "peerDependencies": {
542 + "@babel/core": "^7.0.0-0"
543 + }
544 + },
545 + "node_modules/@babel/plugin-proposal-logical-assignment-operators": {
546 + "version": "7.12.13",
547 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.13.tgz",
548 + "integrity": "sha512-fqmiD3Lz7jVdK6kabeSr1PZlWSUVqSitmHEe3Z00dtGTKieWnX9beafvavc32kjORa5Bai4QNHgFDwWJP+WtSQ==",
549 + "dependencies": {
550 + "@babel/helper-plugin-utils": "^7.12.13",
551 + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
552 + },
553 + "peerDependencies": {
554 + "@babel/core": "^7.0.0-0"
555 + }
556 + },
557 + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": {
558 + "version": "7.12.13",
559 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.13.tgz",
560 + "integrity": "sha512-Qoxpy+OxhDBI5kRqliJFAl4uWXk3Bn24WeFstPH0iLymFehSAUR8MHpqU7njyXv/qbo7oN6yTy5bfCmXdKpo1Q==",
561 + "dependencies": {
562 + "@babel/helper-plugin-utils": "^7.12.13",
563 + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0"
564 + },
565 + "peerDependencies": {
566 + "@babel/core": "^7.0.0-0"
567 + }
568 + },
569 + "node_modules/@babel/plugin-proposal-numeric-separator": {
570 + "version": "7.12.13",
571 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz",
572 + "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==",
573 + "dependencies": {
574 + "@babel/helper-plugin-utils": "^7.12.13",
575 + "@babel/plugin-syntax-numeric-separator": "^7.10.4"
576 + },
577 + "peerDependencies": {
578 + "@babel/core": "^7.0.0-0"
579 + }
580 + },
581 + "node_modules/@babel/plugin-proposal-object-rest-spread": {
582 + "version": "7.12.13",
583 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.13.tgz",
584 + "integrity": "sha512-WvA1okB/0OS/N3Ldb3sziSrXg6sRphsBgqiccfcQq7woEn5wQLNX82Oc4PlaFcdwcWHuQXAtb8ftbS8Fbsg/sg==",
585 + "dependencies": {
586 + "@babel/helper-plugin-utils": "^7.12.13",
587 + "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
588 + "@babel/plugin-transform-parameters": "^7.12.13"
589 + },
590 + "peerDependencies": {
591 + "@babel/core": "^7.0.0-0"
592 + }
593 + },
594 + "node_modules/@babel/plugin-proposal-optional-catch-binding": {
595 + "version": "7.12.13",
596 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.13.tgz",
597 + "integrity": "sha512-9+MIm6msl9sHWg58NvqpNpLtuFbmpFYk37x8kgnGzAHvX35E1FyAwSUt5hIkSoWJFSAH+iwU8bJ4fcD1zKXOzg==",
598 + "dependencies": {
599 + "@babel/helper-plugin-utils": "^7.12.13",
600 + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0"
601 + },
602 + "peerDependencies": {
603 + "@babel/core": "^7.0.0-0"
604 + }
605 + },
606 + "node_modules/@babel/plugin-proposal-optional-chaining": {
607 + "version": "7.12.17",
608 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.17.tgz",
609 + "integrity": "sha512-TvxwI80pWftrGPKHNfkvX/HnoeSTR7gC4ezWnAL39PuktYUe6r8kEpOLTYnkBTsaoeazXm2jHJ22EQ81sdgfcA==",
610 + "dependencies": {
611 + "@babel/helper-plugin-utils": "^7.12.13",
612 + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1",
613 + "@babel/plugin-syntax-optional-chaining": "^7.8.0"
614 + },
615 + "peerDependencies": {
616 + "@babel/core": "^7.0.0-0"
617 + }
618 + },
619 + "node_modules/@babel/plugin-proposal-private-methods": {
620 + "version": "7.12.13",
621 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.13.tgz",
622 + "integrity": "sha512-sV0V57uUwpauixvR7s2o75LmwJI6JECwm5oPUY5beZB1nBl2i37hc7CJGqB5G+58fur5Y6ugvl3LRONk5x34rg==",
623 + "dependencies": {
624 + "@babel/helper-create-class-features-plugin": "^7.12.13",
625 + "@babel/helper-plugin-utils": "^7.12.13"
626 + },
627 + "peerDependencies": {
628 + "@babel/core": "^7.0.0-0"
629 + }
630 + },
631 + "node_modules/@babel/plugin-proposal-unicode-property-regex": {
632 + "version": "7.12.13",
633 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz",
634 + "integrity": "sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==",
635 + "dependencies": {
636 + "@babel/helper-create-regexp-features-plugin": "^7.12.13",
637 + "@babel/helper-plugin-utils": "^7.12.13"
638 + },
639 + "engines": {
640 + "node": ">=4"
641 + },
642 + "peerDependencies": {
643 + "@babel/core": "^7.0.0-0"
644 + }
645 + },
646 + "node_modules/@babel/plugin-syntax-async-generators": {
647 + "version": "7.8.4",
648 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
649 + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
650 + "dependencies": {
651 + "@babel/helper-plugin-utils": "^7.8.0"
652 + },
653 + "peerDependencies": {
654 + "@babel/core": "^7.0.0-0"
655 + }
656 + },
657 + "node_modules/@babel/plugin-syntax-class-properties": {
658 + "version": "7.12.13",
659 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
660 + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
661 + "dependencies": {
662 + "@babel/helper-plugin-utils": "^7.12.13"
663 + },
664 + "peerDependencies": {
665 + "@babel/core": "^7.0.0-0"
666 + }
667 + },
668 + "node_modules/@babel/plugin-syntax-dynamic-import": {
669 + "version": "7.8.3",
670 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
671 + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
672 + "dependencies": {
673 + "@babel/helper-plugin-utils": "^7.8.0"
674 + },
675 + "peerDependencies": {
676 + "@babel/core": "^7.0.0-0"
677 + }
678 + },
679 + "node_modules/@babel/plugin-syntax-export-namespace-from": {
680 + "version": "7.8.3",
681 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz",
682 + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==",
683 + "dependencies": {
684 + "@babel/helper-plugin-utils": "^7.8.3"
685 + },
686 + "peerDependencies": {
687 + "@babel/core": "^7.0.0-0"
688 + }
689 + },
690 + "node_modules/@babel/plugin-syntax-json-strings": {
691 + "version": "7.8.3",
692 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
693 + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
694 + "dependencies": {
695 + "@babel/helper-plugin-utils": "^7.8.0"
696 + },
697 + "peerDependencies": {
698 + "@babel/core": "^7.0.0-0"
699 + }
700 + },
701 + "node_modules/@babel/plugin-syntax-jsx": {
702 + "version": "7.12.13",
703 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz",
704 + "integrity": "sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g==",
705 + "dependencies": {
706 + "@babel/helper-plugin-utils": "^7.12.13"
707 + },
708 + "peerDependencies": {
709 + "@babel/core": "^7.0.0-0"
710 + }
711 + },
712 + "node_modules/@babel/plugin-syntax-logical-assignment-operators": {
713 + "version": "7.10.4",
714 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
715 + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
716 + "dependencies": {
717 + "@babel/helper-plugin-utils": "^7.10.4"
718 + },
719 + "peerDependencies": {
720 + "@babel/core": "^7.0.0-0"
721 + }
722 + },
723 + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
724 + "version": "7.8.3",
725 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
726 + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
727 + "dependencies": {
728 + "@babel/helper-plugin-utils": "^7.8.0"
729 + },
730 + "peerDependencies": {
731 + "@babel/core": "^7.0.0-0"
732 + }
733 + },
734 + "node_modules/@babel/plugin-syntax-numeric-separator": {
735 + "version": "7.10.4",
736 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
737 + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
738 + "dependencies": {
739 + "@babel/helper-plugin-utils": "^7.10.4"
740 + },
741 + "peerDependencies": {
742 + "@babel/core": "^7.0.0-0"
743 + }
744 + },
745 + "node_modules/@babel/plugin-syntax-object-rest-spread": {
746 + "version": "7.8.3",
747 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
748 + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
749 + "dependencies": {
750 + "@babel/helper-plugin-utils": "^7.8.0"
751 + },
752 + "peerDependencies": {
753 + "@babel/core": "^7.0.0-0"
754 + }
755 + },
756 + "node_modules/@babel/plugin-syntax-optional-catch-binding": {
757 + "version": "7.8.3",
758 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
759 + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
760 + "dependencies": {
761 + "@babel/helper-plugin-utils": "^7.8.0"
762 + },
763 + "peerDependencies": {
764 + "@babel/core": "^7.0.0-0"
765 + }
766 + },
767 + "node_modules/@babel/plugin-syntax-optional-chaining": {
768 + "version": "7.8.3",
769 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
770 + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
771 + "dependencies": {
772 + "@babel/helper-plugin-utils": "^7.8.0"
773 + },
774 + "peerDependencies": {
775 + "@babel/core": "^7.0.0-0"
776 + }
777 + },
778 + "node_modules/@babel/plugin-syntax-top-level-await": {
779 + "version": "7.12.13",
780 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz",
781 + "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==",
782 + "dependencies": {
783 + "@babel/helper-plugin-utils": "^7.12.13"
784 + },
785 + "peerDependencies": {
786 + "@babel/core": "^7.0.0-0"
787 + }
788 + },
789 + "node_modules/@babel/plugin-syntax-typescript": {
790 + "version": "7.12.13",
791 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz",
792 + "integrity": "sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w==",
793 + "dependencies": {
794 + "@babel/helper-plugin-utils": "^7.12.13"
795 + },
796 + "peerDependencies": {
797 + "@babel/core": "^7.0.0-0"
798 + }
799 + },
800 + "node_modules/@babel/plugin-transform-arrow-functions": {
801 + "version": "7.12.13",
802 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.13.tgz",
803 + "integrity": "sha512-tBtuN6qtCTd+iHzVZVOMNp+L04iIJBpqkdY42tWbmjIT5wvR2kx7gxMBsyhQtFzHwBbyGi9h8J8r9HgnOpQHxg==",
804 + "dependencies": {
805 + "@babel/helper-plugin-utils": "^7.12.13"
806 + },
807 + "peerDependencies": {
808 + "@babel/core": "^7.0.0-0"
809 + }
810 + },
811 + "node_modules/@babel/plugin-transform-async-to-generator": {
812 + "version": "7.12.13",
813 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.13.tgz",
814 + "integrity": "sha512-psM9QHcHaDr+HZpRuJcE1PXESuGWSCcbiGFFhhwfzdbTxaGDVzuVtdNYliAwcRo3GFg0Bc8MmI+AvIGYIJG04A==",
815 + "dependencies": {
816 + "@babel/helper-module-imports": "^7.12.13",
817 + "@babel/helper-plugin-utils": "^7.12.13",
818 + "@babel/helper-remap-async-to-generator": "^7.12.13"
819 + },
820 + "peerDependencies": {
821 + "@babel/core": "^7.0.0-0"
822 + }
823 + },
824 + "node_modules/@babel/plugin-transform-block-scoped-functions": {
825 + "version": "7.12.13",
826 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz",
827 + "integrity": "sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg==",
828 + "dependencies": {
829 + "@babel/helper-plugin-utils": "^7.12.13"
830 + },
831 + "peerDependencies": {
832 + "@babel/core": "^7.0.0-0"
833 + }
834 + },
835 + "node_modules/@babel/plugin-transform-block-scoping": {
836 + "version": "7.12.13",
837 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz",
838 + "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==",
839 + "dependencies": {
840 + "@babel/helper-plugin-utils": "^7.12.13"
841 + },
842 + "peerDependencies": {
843 + "@babel/core": "^7.0.0-0"
844 + }
845 + },
846 + "node_modules/@babel/plugin-transform-classes": {
847 + "version": "7.12.13",
848 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.13.tgz",
849 + "integrity": "sha512-cqZlMlhCC1rVnxE5ZGMtIb896ijL90xppMiuWXcwcOAuFczynpd3KYemb91XFFPi3wJSe/OcrX9lXoowatkkxA==",
850 + "dependencies": {
851 + "@babel/helper-annotate-as-pure": "^7.12.13",
852 + "@babel/helper-function-name": "^7.12.13",
853 + "@babel/helper-optimise-call-expression": "^7.12.13",
854 + "@babel/helper-plugin-utils": "^7.12.13",
855 + "@babel/helper-replace-supers": "^7.12.13",
856 + "@babel/helper-split-export-declaration": "^7.12.13",
857 + "globals": "^11.1.0"
858 + },
859 + "peerDependencies": {
860 + "@babel/core": "^7.0.0-0"
861 + }
862 + },
863 + "node_modules/@babel/plugin-transform-computed-properties": {
864 + "version": "7.12.13",
865 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.13.tgz",
866 + "integrity": "sha512-dDfuROUPGK1mTtLKyDPUavmj2b6kFu82SmgpztBFEO974KMjJT+Ytj3/oWsTUMBmgPcp9J5Pc1SlcAYRpJ2hRA==",
867 + "dependencies": {
868 + "@babel/helper-plugin-utils": "^7.12.13"
869 + },
870 + "peerDependencies": {
871 + "@babel/core": "^7.0.0-0"
872 + }
873 + },
874 + "node_modules/@babel/plugin-transform-destructuring": {
875 + "version": "7.12.13",
876 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.13.tgz",
877 + "integrity": "sha512-Dn83KykIFzjhA3FDPA1z4N+yfF3btDGhjnJwxIj0T43tP0flCujnU8fKgEkf0C1biIpSv9NZegPBQ1J6jYkwvQ==",
878 + "dependencies": {
879 + "@babel/helper-plugin-utils": "^7.12.13"
880 + },
881 + "peerDependencies": {
882 + "@babel/core": "^7.0.0-0"
883 + }
884 + },
885 + "node_modules/@babel/plugin-transform-dotall-regex": {
886 + "version": "7.12.13",
887 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.13.tgz",
888 + "integrity": "sha512-foDrozE65ZFdUC2OfgeOCrEPTxdB3yjqxpXh8CH+ipd9CHd4s/iq81kcUpyH8ACGNEPdFqbtzfgzbT/ZGlbDeQ==",
889 + "dependencies": {
890 + "@babel/helper-create-regexp-features-plugin": "^7.12.13",
891 + "@babel/helper-plugin-utils": "^7.12.13"
892 + },
893 + "peerDependencies": {
894 + "@babel/core": "^7.0.0-0"
895 + }
896 + },
897 + "node_modules/@babel/plugin-transform-duplicate-keys": {
898 + "version": "7.12.13",
899 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.13.tgz",
900 + "integrity": "sha512-NfADJiiHdhLBW3pulJlJI2NB0t4cci4WTZ8FtdIuNc2+8pslXdPtRRAEWqUY+m9kNOk2eRYbTAOipAxlrOcwwQ==",
901 + "dependencies": {
902 + "@babel/helper-plugin-utils": "^7.12.13"
903 + },
904 + "peerDependencies": {
905 + "@babel/core": "^7.0.0-0"
906 + }
907 + },
908 + "node_modules/@babel/plugin-transform-exponentiation-operator": {
909 + "version": "7.12.13",
910 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.13.tgz",
911 + "integrity": "sha512-fbUelkM1apvqez/yYx1/oICVnGo2KM5s63mhGylrmXUxK/IAXSIf87QIxVfZldWf4QsOafY6vV3bX8aMHSvNrA==",
912 + "dependencies": {
913 + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13",
914 + "@babel/helper-plugin-utils": "^7.12.13"
915 + },
916 + "peerDependencies": {
917 + "@babel/core": "^7.0.0-0"
918 + }
919 + },
920 + "node_modules/@babel/plugin-transform-for-of": {
921 + "version": "7.12.13",
922 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.13.tgz",
923 + "integrity": "sha512-xCbdgSzXYmHGyVX3+BsQjcd4hv4vA/FDy7Kc8eOpzKmBBPEOTurt0w5fCRQaGl+GSBORKgJdstQ1rHl4jbNseQ==",
924 + "dependencies": {
925 + "@babel/helper-plugin-utils": "^7.12.13"
926 + },
927 + "peerDependencies": {
928 + "@babel/core": "^7.0.0-0"
929 + }
930 + },
931 + "node_modules/@babel/plugin-transform-function-name": {
932 + "version": "7.12.13",
933 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz",
934 + "integrity": "sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ==",
935 + "dependencies": {
936 + "@babel/helper-function-name": "^7.12.13",
937 + "@babel/helper-plugin-utils": "^7.12.13"
938 + },
939 + "peerDependencies": {
940 + "@babel/core": "^7.0.0-0"
941 + }
942 + },
943 + "node_modules/@babel/plugin-transform-literals": {
944 + "version": "7.12.13",
945 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz",
946 + "integrity": "sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ==",
947 + "dependencies": {
948 + "@babel/helper-plugin-utils": "^7.12.13"
949 + },
950 + "peerDependencies": {
951 + "@babel/core": "^7.0.0-0"
952 + }
953 + },
954 + "node_modules/@babel/plugin-transform-member-expression-literals": {
955 + "version": "7.12.13",
956 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz",
957 + "integrity": "sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg==",
958 + "dependencies": {
959 + "@babel/helper-plugin-utils": "^7.12.13"
960 + },
961 + "peerDependencies": {
962 + "@babel/core": "^7.0.0-0"
963 + }
964 + },
965 + "node_modules/@babel/plugin-transform-modules-amd": {
966 + "version": "7.12.13",
967 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.13.tgz",
968 + "integrity": "sha512-JHLOU0o81m5UqG0Ulz/fPC68/v+UTuGTWaZBUwpEk1fYQ1D9LfKV6MPn4ttJKqRo5Lm460fkzjLTL4EHvCprvA==",
969 + "dependencies": {
970 + "@babel/helper-module-transforms": "^7.12.13",
971 + "@babel/helper-plugin-utils": "^7.12.13",
972 + "babel-plugin-dynamic-import-node": "^2.3.3"
973 + },
974 + "peerDependencies": {
975 + "@babel/core": "^7.0.0-0"
976 + }
977 + },
978 + "node_modules/@babel/plugin-transform-modules-commonjs": {
979 + "version": "7.12.13",
980 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.13.tgz",
981 + "integrity": "sha512-OGQoeVXVi1259HjuoDnsQMlMkT9UkZT9TpXAsqWplS/M0N1g3TJAn/ByOCeQu7mfjc5WpSsRU+jV1Hd89ts0kQ==",
982 + "dependencies": {
983 + "@babel/helper-module-transforms": "^7.12.13",
984 + "@babel/helper-plugin-utils": "^7.12.13",
985 + "@babel/helper-simple-access": "^7.12.13",
986 + "babel-plugin-dynamic-import-node": "^2.3.3"
987 + },
988 + "peerDependencies": {
989 + "@babel/core": "^7.0.0-0"
990 + }
991 + },
992 + "node_modules/@babel/plugin-transform-modules-systemjs": {
993 + "version": "7.12.13",
994 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.13.tgz",
995 + "integrity": "sha512-aHfVjhZ8QekaNF/5aNdStCGzwTbU7SI5hUybBKlMzqIMC7w7Ho8hx5a4R/DkTHfRfLwHGGxSpFt9BfxKCoXKoA==",
996 + "dependencies": {
997 + "@babel/helper-hoist-variables": "^7.12.13",
998 + "@babel/helper-module-transforms": "^7.12.13",
999 + "@babel/helper-plugin-utils": "^7.12.13",
1000 + "@babel/helper-validator-identifier": "^7.12.11",
1001 + "babel-plugin-dynamic-import-node": "^2.3.3"
1002 + },
1003 + "peerDependencies": {
1004 + "@babel/core": "^7.0.0-0"
1005 + }
1006 + },
1007 + "node_modules/@babel/plugin-transform-modules-umd": {
1008 + "version": "7.12.13",
1009 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.13.tgz",
1010 + "integrity": "sha512-BgZndyABRML4z6ibpi7Z98m4EVLFI9tVsZDADC14AElFaNHHBcJIovflJ6wtCqFxwy2YJ1tJhGRsr0yLPKoN+w==",
1011 + "dependencies": {
1012 + "@babel/helper-module-transforms": "^7.12.13",
1013 + "@babel/helper-plugin-utils": "^7.12.13"
1014 + },
1015 + "peerDependencies": {
1016 + "@babel/core": "^7.0.0-0"
1017 + }
1018 + },
1019 + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
1020 + "version": "7.12.13",
1021 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.13.tgz",
1022 + "integrity": "sha512-Xsm8P2hr5hAxyYblrfACXpQKdQbx4m2df9/ZZSQ8MAhsadw06+jW7s9zsSw6he+mJZXRlVMyEnVktJo4zjk1WA==",
1023 + "dependencies": {
1024 + "@babel/helper-create-regexp-features-plugin": "^7.12.13"
1025 + },
1026 + "peerDependencies": {
1027 + "@babel/core": "^7.0.0"
1028 + }
1029 + },
1030 + "node_modules/@babel/plugin-transform-new-target": {
1031 + "version": "7.12.13",
1032 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.13.tgz",
1033 + "integrity": "sha512-/KY2hbLxrG5GTQ9zzZSc3xWiOy379pIETEhbtzwZcw9rvuaVV4Fqy7BYGYOWZnaoXIQYbbJ0ziXLa/sKcGCYEQ==",
1034 + "dependencies": {
1035 + "@babel/helper-plugin-utils": "^7.12.13"
1036 + },
1037 + "peerDependencies": {
1038 + "@babel/core": "^7.0.0-0"
1039 + }
1040 + },
1041 + "node_modules/@babel/plugin-transform-object-super": {
1042 + "version": "7.12.13",
1043 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz",
1044 + "integrity": "sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ==",
1045 + "dependencies": {
1046 + "@babel/helper-plugin-utils": "^7.12.13",
1047 + "@babel/helper-replace-supers": "^7.12.13"
1048 + },
1049 + "peerDependencies": {
1050 + "@babel/core": "^7.0.0-0"
1051 + }
1052 + },
1053 + "node_modules/@babel/plugin-transform-parameters": {
1054 + "version": "7.12.13",
1055 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.13.tgz",
1056 + "integrity": "sha512-e7QqwZalNiBRHCpJg/P8s/VJeSRYgmtWySs1JwvfwPqhBbiWfOcHDKdeAi6oAyIimoKWBlwc8oTgbZHdhCoVZA==",
1057 + "dependencies": {
1058 + "@babel/helper-plugin-utils": "^7.12.13"
1059 + },
1060 + "peerDependencies": {
1061 + "@babel/core": "^7.0.0-0"
1062 + }
1063 + },
1064 + "node_modules/@babel/plugin-transform-property-literals": {
1065 + "version": "7.12.13",
1066 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz",
1067 + "integrity": "sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A==",
1068 + "dependencies": {
1069 + "@babel/helper-plugin-utils": "^7.12.13"
1070 + },
1071 + "peerDependencies": {
1072 + "@babel/core": "^7.0.0-0"
1073 + }
1074 + },
1075 + "node_modules/@babel/plugin-transform-react-display-name": {
1076 + "version": "7.12.13",
1077 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.13.tgz",
1078 + "integrity": "sha512-MprESJzI9O5VnJZrL7gg1MpdqmiFcUv41Jc7SahxYsNP2kDkFqClxxTZq+1Qv4AFCamm+GXMRDQINNn+qrxmiA==",
1079 + "dependencies": {
1080 + "@babel/helper-plugin-utils": "^7.12.13"
1081 + },
1082 + "peerDependencies": {
1083 + "@babel/core": "^7.0.0-0"
1084 + }
1085 + },
1086 + "node_modules/@babel/plugin-transform-react-jsx": {
1087 + "version": "7.12.17",
1088 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.17.tgz",
1089 + "integrity": "sha512-mwaVNcXV+l6qJOuRhpdTEj8sT/Z0owAVWf9QujTZ0d2ye9X/K+MTOTSizcgKOj18PGnTc/7g1I4+cIUjsKhBcw==",
1090 + "dependencies": {
1091 + "@babel/helper-annotate-as-pure": "^7.12.13",
1092 + "@babel/helper-module-imports": "^7.12.13",
1093 + "@babel/helper-plugin-utils": "^7.12.13",
1094 + "@babel/plugin-syntax-jsx": "^7.12.13",
1095 + "@babel/types": "^7.12.17"
1096 + },
1097 + "peerDependencies": {
1098 + "@babel/core": "^7.0.0-0"
1099 + }
1100 + },
1101 + "node_modules/@babel/plugin-transform-react-jsx-development": {
1102 + "version": "7.12.17",
1103 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.17.tgz",
1104 + "integrity": "sha512-BPjYV86SVuOaudFhsJR1zjgxxOhJDt6JHNoD48DxWEIxUCAMjV1ys6DYw4SDYZh0b1QsS2vfIA9t/ZsQGsDOUQ==",
1105 + "dependencies": {
1106 + "@babel/plugin-transform-react-jsx": "^7.12.17"
1107 + },
1108 + "peerDependencies": {
1109 + "@babel/core": "^7.0.0-0"
1110 + }
1111 + },
1112 + "node_modules/@babel/plugin-transform-react-pure-annotations": {
1113 + "version": "7.12.1",
1114 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz",
1115 + "integrity": "sha512-RqeaHiwZtphSIUZ5I85PEH19LOSzxfuEazoY7/pWASCAIBuATQzpSVD+eT6MebeeZT2F4eSL0u4vw6n4Nm0Mjg==",
1116 + "dependencies": {
1117 + "@babel/helper-annotate-as-pure": "^7.10.4",
1118 + "@babel/helper-plugin-utils": "^7.10.4"
1119 + },
1120 + "peerDependencies": {
1121 + "@babel/core": "^7.0.0-0"
1122 + }
1123 + },
1124 + "node_modules/@babel/plugin-transform-regenerator": {
1125 + "version": "7.12.13",
1126 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz",
1127 + "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==",
1128 + "dependencies": {
1129 + "regenerator-transform": "^0.14.2"
1130 + },
1131 + "peerDependencies": {
1132 + "@babel/core": "^7.0.0-0"
1133 + }
1134 + },
1135 + "node_modules/@babel/plugin-transform-reserved-words": {
1136 + "version": "7.12.13",
1137 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.13.tgz",
1138 + "integrity": "sha512-xhUPzDXxZN1QfiOy/I5tyye+TRz6lA7z6xaT4CLOjPRMVg1ldRf0LHw0TDBpYL4vG78556WuHdyO9oi5UmzZBg==",
1139 + "dependencies": {
1140 + "@babel/helper-plugin-utils": "^7.12.13"
1141 + },
1142 + "peerDependencies": {
1143 + "@babel/core": "^7.0.0-0"
1144 + }
1145 + },
1146 + "node_modules/@babel/plugin-transform-runtime": {
1147 + "version": "7.13.10",
1148 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz",
1149 + "integrity": "sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA==",
1150 + "dependencies": {
1151 + "@babel/helper-module-imports": "^7.12.13",
1152 + "@babel/helper-plugin-utils": "^7.13.0",
1153 + "babel-plugin-polyfill-corejs2": "^0.1.4",
1154 + "babel-plugin-polyfill-corejs3": "^0.1.3",
1155 + "babel-plugin-polyfill-regenerator": "^0.1.2",
1156 + "semver": "^6.3.0"
1157 + },
1158 + "peerDependencies": {
1159 + "@babel/core": "^7.0.0-0"
1160 + }
1161 + },
1162 + "node_modules/@babel/plugin-transform-runtime/node_modules/semver": {
1163 + "version": "6.3.0",
1164 + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1165 + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
1166 + "bin": {
1167 + "semver": "bin/semver.js"
1168 + }
1169 + },
1170 + "node_modules/@babel/plugin-transform-shorthand-properties": {
1171 + "version": "7.12.13",
1172 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz",
1173 + "integrity": "sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw==",
1174 + "dependencies": {
1175 + "@babel/helper-plugin-utils": "^7.12.13"
1176 + },
1177 + "peerDependencies": {
1178 + "@babel/core": "^7.0.0-0"
1179 + }
1180 + },
1181 + "node_modules/@babel/plugin-transform-spread": {
1182 + "version": "7.12.13",
1183 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.13.tgz",
1184 + "integrity": "sha512-dUCrqPIowjqk5pXsx1zPftSq4sT0aCeZVAxhdgs3AMgyaDmoUT0G+5h3Dzja27t76aUEIJWlFgPJqJ/d4dbTtg==",
1185 + "dependencies": {
1186 + "@babel/helper-plugin-utils": "^7.12.13",
1187 + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1"
1188 + },
1189 + "peerDependencies": {
1190 + "@babel/core": "^7.0.0-0"
1191 + }
1192 + },
1193 + "node_modules/@babel/plugin-transform-sticky-regex": {
1194 + "version": "7.12.13",
1195 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.13.tgz",
1196 + "integrity": "sha512-Jc3JSaaWT8+fr7GRvQP02fKDsYk4K/lYwWq38r/UGfaxo89ajud321NH28KRQ7xy1Ybc0VUE5Pz8psjNNDUglg==",
1197 + "dependencies": {
1198 + "@babel/helper-plugin-utils": "^7.12.13"
1199 + },
1200 + "peerDependencies": {
1201 + "@babel/core": "^7.0.0-0"
1202 + }
1203 + },
1204 + "node_modules/@babel/plugin-transform-template-literals": {
1205 + "version": "7.12.13",
1206 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.13.tgz",
1207 + "integrity": "sha512-arIKlWYUgmNsF28EyfmiQHJLJFlAJNYkuQO10jL46ggjBpeb2re1P9K9YGxNJB45BqTbaslVysXDYm/g3sN/Qg==",
1208 + "dependencies": {
1209 + "@babel/helper-plugin-utils": "^7.12.13"
1210 + },
1211 + "peerDependencies": {
1212 + "@babel/core": "^7.0.0-0"
1213 + }
1214 + },
1215 + "node_modules/@babel/plugin-transform-typeof-symbol": {
1216 + "version": "7.12.13",
1217 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.13.tgz",
1218 + "integrity": "sha512-eKv/LmUJpMnu4npgfvs3LiHhJua5fo/CysENxa45YCQXZwKnGCQKAg87bvoqSW1fFT+HA32l03Qxsm8ouTY3ZQ==",
1219 + "dependencies": {
1220 + "@babel/helper-plugin-utils": "^7.12.13"
1221 + },
1222 + "peerDependencies": {
1223 + "@babel/core": "^7.0.0-0"
1224 + }
1225 + },
1226 + "node_modules/@babel/plugin-transform-typescript": {
1227 + "version": "7.13.0",
1228 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.13.0.tgz",
1229 + "integrity": "sha512-elQEwluzaU8R8dbVuW2Q2Y8Nznf7hnjM7+DSCd14Lo5fF63C9qNLbwZYbmZrtV9/ySpSUpkRpQXvJb6xyu4hCQ==",
1230 + "dependencies": {
1231 + "@babel/helper-create-class-features-plugin": "^7.13.0",
1232 + "@babel/helper-plugin-utils": "^7.13.0",
1233 + "@babel/plugin-syntax-typescript": "^7.12.13"
1234 + },
1235 + "peerDependencies": {
1236 + "@babel/core": "^7.0.0-0"
1237 + }
1238 + },
1239 + "node_modules/@babel/plugin-transform-unicode-escapes": {
1240 + "version": "7.12.13",
1241 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz",
1242 + "integrity": "sha512-0bHEkdwJ/sN/ikBHfSmOXPypN/beiGqjo+o4/5K+vxEFNPRPdImhviPakMKG4x96l85emoa0Z6cDflsdBusZbw==",
1243 + "dependencies": {
1244 + "@babel/helper-plugin-utils": "^7.12.13"
1245 + },
1246 + "peerDependencies": {
1247 + "@babel/core": "^7.0.0-0"
1248 + }
1249 + },
1250 + "node_modules/@babel/plugin-transform-unicode-regex": {
1251 + "version": "7.12.13",
1252 + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.13.tgz",
1253 + "integrity": "sha512-mDRzSNY7/zopwisPZ5kM9XKCfhchqIYwAKRERtEnhYscZB79VRekuRSoYbN0+KVe3y8+q1h6A4svXtP7N+UoCA==",
1254 + "dependencies": {
1255 + "@babel/helper-create-regexp-features-plugin": "^7.12.13",
1256 + "@babel/helper-plugin-utils": "^7.12.13"
1257 + },
1258 + "peerDependencies": {
1259 + "@babel/core": "^7.0.0-0"
1260 + }
1261 + },
1262 + "node_modules/@babel/preset-env": {
1263 + "version": "7.12.17",
1264 + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.17.tgz",
1265 + "integrity": "sha512-9PMijx8zFbCwTHrd2P4PJR5nWGH3zWebx2OcpTjqQrHhCiL2ssSR2Sc9ko2BsI2VmVBfoaQmPrlMTCui4LmXQg==",
1266 + "dependencies": {
1267 + "@babel/compat-data": "^7.12.13",
1268 + "@babel/helper-compilation-targets": "^7.12.17",
1269 + "@babel/helper-module-imports": "^7.12.13",
1270 + "@babel/helper-plugin-utils": "^7.12.13",
1271 + "@babel/helper-validator-option": "^7.12.17",
1272 + "@babel/plugin-proposal-async-generator-functions": "^7.12.13",
1273 + "@babel/plugin-proposal-class-properties": "^7.12.13",
1274 + "@babel/plugin-proposal-dynamic-import": "^7.12.17",
1275 + "@babel/plugin-proposal-export-namespace-from": "^7.12.13",
1276 + "@babel/plugin-proposal-json-strings": "^7.12.13",
1277 + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.13",
1278 + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13",
1279 + "@babel/plugin-proposal-numeric-separator": "^7.12.13",
1280 + "@babel/plugin-proposal-object-rest-spread": "^7.12.13",
1281 + "@babel/plugin-proposal-optional-catch-binding": "^7.12.13",
1282 + "@babel/plugin-proposal-optional-chaining": "^7.12.17",
1283 + "@babel/plugin-proposal-private-methods": "^7.12.13",
1284 + "@babel/plugin-proposal-unicode-property-regex": "^7.12.13",
1285 + "@babel/plugin-syntax-async-generators": "^7.8.0",
1286 + "@babel/plugin-syntax-class-properties": "^7.12.13",
1287 + "@babel/plugin-syntax-dynamic-import": "^7.8.0",
1288 + "@babel/plugin-syntax-export-namespace-from": "^7.8.3",
1289 + "@babel/plugin-syntax-json-strings": "^7.8.0",
1290 + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
1291 + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0",
1292 + "@babel/plugin-syntax-numeric-separator": "^7.10.4",
1293 + "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
1294 + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0",
1295 + "@babel/plugin-syntax-optional-chaining": "^7.8.0",
1296 + "@babel/plugin-syntax-top-level-await": "^7.12.13",
1297 + "@babel/plugin-transform-arrow-functions": "^7.12.13",
1298 + "@babel/plugin-transform-async-to-generator": "^7.12.13",
1299 + "@babel/plugin-transform-block-scoped-functions": "^7.12.13",
1300 + "@babel/plugin-transform-block-scoping": "^7.12.13",
1301 + "@babel/plugin-transform-classes": "^7.12.13",
1302 + "@babel/plugin-transform-computed-properties": "^7.12.13",
1303 + "@babel/plugin-transform-destructuring": "^7.12.13",
1304 + "@babel/plugin-transform-dotall-regex": "^7.12.13",
1305 + "@babel/plugin-transform-duplicate-keys": "^7.12.13",
1306 + "@babel/plugin-transform-exponentiation-operator": "^7.12.13",
1307 + "@babel/plugin-transform-for-of": "^7.12.13",
1308 + "@babel/plugin-transform-function-name": "^7.12.13",
1309 + "@babel/plugin-transform-literals": "^7.12.13",
1310 + "@babel/plugin-transform-member-expression-literals": "^7.12.13",
1311 + "@babel/plugin-transform-modules-amd": "^7.12.13",
1312 + "@babel/plugin-transform-modules-commonjs": "^7.12.13",
1313 + "@babel/plugin-transform-modules-systemjs": "^7.12.13",
1314 + "@babel/plugin-transform-modules-umd": "^7.12.13",
1315 + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13",
1316 + "@babel/plugin-transform-new-target": "^7.12.13",
1317 + "@babel/plugin-transform-object-super": "^7.12.13",
1318 + "@babel/plugin-transform-parameters": "^7.12.13",
1319 + "@babel/plugin-transform-property-literals": "^7.12.13",
1320 + "@babel/plugin-transform-regenerator": "^7.12.13",
1321 + "@babel/plugin-transform-reserved-words": "^7.12.13",
1322 + "@babel/plugin-transform-shorthand-properties": "^7.12.13",
1323 + "@babel/plugin-transform-spread": "^7.12.13",
1324 + "@babel/plugin-transform-sticky-regex": "^7.12.13",
1325 + "@babel/plugin-transform-template-literals": "^7.12.13",
1326 + "@babel/plugin-transform-typeof-symbol": "^7.12.13",
1327 + "@babel/plugin-transform-unicode-escapes": "^7.12.13",
1328 + "@babel/plugin-transform-unicode-regex": "^7.12.13",
1329 + "@babel/preset-modules": "^0.1.3",
1330 + "@babel/types": "^7.12.17",
1331 + "core-js-compat": "^3.8.0",
1332 + "semver": "^5.5.0"
1333 + },
1334 + "peerDependencies": {
1335 + "@babel/core": "^7.0.0-0"
1336 + }
1337 + },
1338 + "node_modules/@babel/preset-env/node_modules/semver": {
1339 + "version": "5.7.1",
1340 + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
1341 + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
1342 + "bin": {
1343 + "semver": "bin/semver"
1344 + }
1345 + },
1346 + "node_modules/@babel/preset-modules": {
1347 + "version": "0.1.4",
1348 + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz",
1349 + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==",
1350 + "dependencies": {
1351 + "@babel/helper-plugin-utils": "^7.0.0",
1352 + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
1353 + "@babel/plugin-transform-dotall-regex": "^7.4.4",
1354 + "@babel/types": "^7.4.4",
1355 + "esutils": "^2.0.2"
1356 + },
1357 + "peerDependencies": {
1358 + "@babel/core": "^7.0.0-0"
1359 + }
1360 + },
1361 + "node_modules/@babel/preset-react": {
1362 + "version": "7.12.13",
1363 + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.12.13.tgz",
1364 + "integrity": "sha512-TYM0V9z6Abb6dj1K7i5NrEhA13oS5ujUYQYDfqIBXYHOc2c2VkFgc+q9kyssIyUfy4/hEwqrgSlJ/Qgv8zJLsA==",
1365 + "dependencies": {
1366 + "@babel/helper-plugin-utils": "^7.12.13",
1367 + "@babel/plugin-transform-react-display-name": "^7.12.13",
1368 + "@babel/plugin-transform-react-jsx": "^7.12.13",
1369 + "@babel/plugin-transform-react-jsx-development": "^7.12.12",
1370 + "@babel/plugin-transform-react-pure-annotations": "^7.12.1"
1371 + },
1372 + "peerDependencies": {
1373 + "@babel/core": "^7.0.0-0"
1374 + }
1375 + },
1376 + "node_modules/@babel/preset-typescript": {
1377 + "version": "7.13.0",
1378 + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.13.0.tgz",
1379 + "integrity": "sha512-LXJwxrHy0N3f6gIJlYbLta1D9BDtHpQeqwzM0LIfjDlr6UE/D5Mc7W4iDiQzaE+ks0sTjT26ArcHWnJVt0QiHw==",
1380 + "dependencies": {
1381 + "@babel/helper-plugin-utils": "^7.13.0",
1382 + "@babel/helper-validator-option": "^7.12.17",
1383 + "@babel/plugin-transform-typescript": "^7.13.0"
1384 + },
1385 + "peerDependencies": {
1386 + "@babel/core": "^7.0.0-0"
1387 + }
1388 + },
1389 + "node_modules/@babel/runtime": {
1390 + "version": "7.12.18",
1391 + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.18.tgz",
1392 + "integrity": "sha512-BogPQ7ciE6SYAUPtlm9tWbgI9+2AgqSam6QivMgXgAT+fKbgppaj4ZX15MHeLC1PVF5sNk70huBu20XxWOs8Cg==",
1393 + "dependencies": {
1394 + "regenerator-runtime": "^0.13.4"
1395 + }
1396 + },
1397 + "node_modules/@babel/runtime-corejs3": {
1398 + "version": "7.12.18",
1399 + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.18.tgz",
1400 + "integrity": "sha512-ngR7yhNTjDxxe1VYmhqQqqXZWujGb6g0IoA4qeG6MxNGRnIw2Zo8ImY8HfaQ7l3T6GklWhdNfyhWk0C0iocdVA==",
1401 + "dependencies": {
1402 + "core-js-pure": "^3.0.0",
1403 + "regenerator-runtime": "^0.13.4"
1404 + }
1405 + },
1406 + "node_modules/@babel/standalone": {
1407 + "version": "7.13.14",
1408 + "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.13.14.tgz",
1409 + "integrity": "sha512-ZhIZaufaCVMuGt9yLlNTO/ORtI6xNKIHK0D/uEdVUYmS8xROOPgDPZtYesmXBA+xlArlCj5s94g4Nz4g0m0ytA=="
1410 + },
1411 + "node_modules/@babel/template": {
1412 + "version": "7.12.13",
1413 + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz",
1414 + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==",
1415 + "dependencies": {
1416 + "@babel/code-frame": "^7.12.13",
1417 + "@babel/parser": "^7.12.13",
1418 + "@babel/types": "^7.12.13"
1419 + }
1420 + },
1421 + "node_modules/@babel/traverse": {
1422 + "version": "7.13.13",
1423 + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz",
1424 + "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==",
1425 + "dependencies": {
1426 + "@babel/code-frame": "^7.12.13",
1427 + "@babel/generator": "^7.13.9",
1428 + "@babel/helper-function-name": "^7.12.13",
1429 + "@babel/helper-split-export-declaration": "^7.12.13",
1430 + "@babel/parser": "^7.13.13",
1431 + "@babel/types": "^7.13.13",
1432 + "debug": "^4.1.0",
1433 + "globals": "^11.1.0"
1434 + }
1435 + },
1436 + "node_modules/@babel/traverse/node_modules/debug": {
1437 + "version": "4.3.1",
1438 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
1439 + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
1440 + "dependencies": {
1441 + "ms": "2.1.2"
1442 + },
1443 + "engines": {
1444 + "node": ">=6.0"
1445 + },
1446 + "peerDependenciesMeta": {
1447 + "supports-color": {
1448 + "optional": true
1449 + }
1450 + }
1451 + },
1452 + "node_modules/@babel/traverse/node_modules/ms": {
1453 + "version": "2.1.2",
1454 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
1455 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
1456 + },
1457 + "node_modules/@babel/types": {
1458 + "version": "7.13.14",
1459 + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz",
1460 + "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==",
1461 + "dependencies": {
1462 + "@babel/helper-validator-identifier": "^7.12.11",
1463 + "lodash": "^4.17.19",
1464 + "to-fast-properties": "^2.0.0"
1465 + }
1466 + },
1467 + "node_modules/@base2/pretty-print-object": {
1468 + "version": "1.0.0",
1469 + "resolved": "https://registry.npmjs.org/@base2/pretty-print-object/-/pretty-print-object-1.0.0.tgz",
1470 + "integrity": "sha512-4Th98KlMHr5+JkxfcoDT//6vY8vM+iSPrLNpHhRyLx2CFYi8e2RfqPLdpbnpo0Q5lQC5hNB79yes07zb02fvCw=="
1471 + },
1472 + "node_modules/@cnakazawa/watch": {
1473 + "version": "1.0.4",
1474 + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz",
1475 + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==",
1476 + "dependencies": {
1477 + "exec-sh": "^0.3.2",
1478 + "minimist": "^1.2.0"
1479 + },
1480 + "bin": {
1481 + "watch": "cli.js"
1482 + },
1483 + "engines": {
1484 + "node": ">=0.1.95"
1485 + }
1486 + },
1487 + "node_modules/@emotion/is-prop-valid": {
1488 + "version": "0.8.8",
1489 + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",
1490 + "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",
1491 + "dependencies": {
1492 + "@emotion/memoize": "0.7.4"
1493 + }
1494 + },
1495 + "node_modules/@emotion/memoize": {
1496 + "version": "0.7.4",
1497 + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",
1498 + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="
1499 + },
1500 + "node_modules/@emotion/unitless": {
1501 + "version": "0.7.5",
1502 + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
1503 + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
1504 + },
1505 + "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader": {
1506 + "version": "3.0.2",
1507 + "resolved": "https://registry.npmjs.org/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz",
1508 + "integrity": "sha512-QRVtqJuS1mcT56oHpVegkKBlgtWjXw/gHNWO3eL9oyB5Sc7HBoc2OLG/nYpVfT/Jejvo3NUrD0Udk7XgoyDKkA==",
1509 + "dependencies": {
1510 + "lodash.get": "^4",
1511 + "make-error": "^1",
1512 + "ts-node": "^9",
1513 + "tslib": "^2"
1514 + },
1515 + "engines": {
1516 + "node": ">=10.0.0"
1517 + },
1518 + "peerDependencies": {
1519 + "cosmiconfig": ">=6"
1520 + }
1521 + },
1522 + "node_modules/@endemolshinegroup/cosmiconfig-typescript-loader/node_modules/tslib": {
1523 + "version": "2.1.0",
1524 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1525 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1526 + },
1527 + "node_modules/@graphql-tools/batch-execute": {
1528 + "version": "7.0.0",
1529 + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-7.0.0.tgz",
1530 + "integrity": "sha512-+ywPfK6N2Ddna6oOa5Qb1Mv7EA8LOwRNOAPP9dL37FEhksJM9pYqPSceUcqMqg7S9b0+Cgr78s408rgvurV3/Q==",
1531 + "dependencies": {
1532 + "@graphql-tools/utils": "^7.0.0",
1533 + "dataloader": "2.0.0",
1534 + "is-promise": "4.0.0",
1535 + "tslib": "~2.0.1"
1536 + },
1537 + "peerDependencies": {
1538 + "graphql": "^14.0.0 || ^15.0.0"
1539 + }
1540 + },
1541 + "node_modules/@graphql-tools/batch-execute/node_modules/dataloader": {
1542 + "version": "2.0.0",
1543 + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.0.0.tgz",
1544 + "integrity": "sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ=="
1545 + },
1546 + "node_modules/@graphql-tools/batch-execute/node_modules/tslib": {
1547 + "version": "2.0.3",
1548 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
1549 + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
1550 + },
1551 + "node_modules/@graphql-tools/delegate": {
1552 + "version": "7.0.10",
1553 + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-7.0.10.tgz",
1554 + "integrity": "sha512-6Di9ia5ohoDvrHuhj2cak1nJGhIefJmUsd3WKZcJ2nu2yZAFawWMxGvQImqv3N7iyaWKiVhrrK8Roi/JrYhdKg==",
1555 + "dependencies": {
1556 + "@ardatan/aggregate-error": "0.0.6",
1557 + "@graphql-tools/batch-execute": "^7.0.0",
1558 + "@graphql-tools/schema": "^7.0.0",
1559 + "@graphql-tools/utils": "^7.1.6",
1560 + "dataloader": "2.0.0",
1561 + "is-promise": "4.0.0",
1562 + "tslib": "~2.1.0"
1563 + },
1564 + "peerDependencies": {
1565 + "graphql": "^14.0.0 || ^15.0.0"
1566 + }
1567 + },
1568 + "node_modules/@graphql-tools/delegate/node_modules/dataloader": {
1569 + "version": "2.0.0",
1570 + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.0.0.tgz",
1571 + "integrity": "sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ=="
1572 + },
1573 + "node_modules/@graphql-tools/delegate/node_modules/tslib": {
1574 + "version": "2.1.0",
1575 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1576 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1577 + },
1578 + "node_modules/@graphql-tools/graphql-file-loader": {
1579 + "version": "6.2.7",
1580 + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-6.2.7.tgz",
1581 + "integrity": "sha512-5k2SNz0W87tDcymhEMZMkd6/vs6QawDyjQXWtqkuLTBF3vxjxPD1I4dwHoxgWPIjjANhXybvulD7E+St/7s9TQ==",
1582 + "dependencies": {
1583 + "@graphql-tools/import": "^6.2.6",
1584 + "@graphql-tools/utils": "^7.0.0",
1585 + "tslib": "~2.1.0"
1586 + },
1587 + "peerDependencies": {
1588 + "graphql": "^14.0.0 || ^15.0.0"
1589 + }
1590 + },
1591 + "node_modules/@graphql-tools/graphql-file-loader/node_modules/tslib": {
1592 + "version": "2.1.0",
1593 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1594 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1595 + },
1596 + "node_modules/@graphql-tools/import": {
1597 + "version": "6.2.6",
1598 + "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-6.2.6.tgz",
1599 + "integrity": "sha512-/0H/bDjNK1MnKonk8fMbB7wIYU6QLCwbQOHtSHbFJ4j2qki5CqfAxpF+fGX6KovDtkdigcgRMvSKKi14oiuHPA==",
1600 + "dependencies": {
1601 + "resolve-from": "5.0.0",
1602 + "tslib": "~2.1.0"
1603 + },
1604 + "peerDependencies": {
1605 + "graphql": "^14.0.0 || ^15.0.0"
1606 + }
1607 + },
1608 + "node_modules/@graphql-tools/import/node_modules/tslib": {
1609 + "version": "2.1.0",
1610 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1611 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1612 + },
1613 + "node_modules/@graphql-tools/json-file-loader": {
1614 + "version": "6.2.6",
1615 + "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-6.2.6.tgz",
1616 + "integrity": "sha512-CnfwBSY5926zyb6fkDBHnlTblHnHI4hoBALFYXnrg0Ev4yWU8B04DZl/pBRUc459VNgO2x8/mxGIZj2hPJG1EA==",
1617 + "dependencies": {
1618 + "@graphql-tools/utils": "^7.0.0",
1619 + "tslib": "~2.0.1"
1620 + },
1621 + "peerDependencies": {
1622 + "graphql": "^14.0.0 || ^15.0.0"
1623 + }
1624 + },
1625 + "node_modules/@graphql-tools/json-file-loader/node_modules/tslib": {
1626 + "version": "2.0.3",
1627 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
1628 + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
1629 + },
1630 + "node_modules/@graphql-tools/load": {
1631 + "version": "6.2.7",
1632 + "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-6.2.7.tgz",
1633 + "integrity": "sha512-b1qWjki1y/QvGtoqW3x8bcwget7xmMfLGsvGFWOB6m38tDbzVT3GlJViAC0nGPDks9OCoJzAdi5IYEkBaqH5GQ==",
1634 + "dependencies": {
1635 + "@graphql-tools/merge": "^6.2.9",
1636 + "@graphql-tools/utils": "^7.5.0",
1637 + "globby": "11.0.2",
1638 + "import-from": "3.0.0",
1639 + "is-glob": "4.0.1",
1640 + "p-limit": "3.1.0",
1641 + "tslib": "~2.1.0",
1642 + "unixify": "1.0.0",
1643 + "valid-url": "1.0.9"
1644 + },
1645 + "peerDependencies": {
1646 + "graphql": "^14.0.0 || ^15.0.0"
1647 + }
1648 + },
1649 + "node_modules/@graphql-tools/load/node_modules/globby": {
1650 + "version": "11.0.2",
1651 + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz",
1652 + "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==",
1653 + "dependencies": {
1654 + "array-union": "^2.1.0",
1655 + "dir-glob": "^3.0.1",
1656 + "fast-glob": "^3.1.1",
1657 + "ignore": "^5.1.4",
1658 + "merge2": "^1.3.0",
1659 + "slash": "^3.0.0"
1660 + },
1661 + "engines": {
1662 + "node": ">=10"
1663 + },
1664 + "funding": {
1665 + "url": "https://github.com/sponsors/sindresorhus"
1666 + }
1667 + },
1668 + "node_modules/@graphql-tools/load/node_modules/ignore": {
1669 + "version": "5.1.8",
1670 + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
1671 + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==",
1672 + "engines": {
1673 + "node": ">= 4"
1674 + }
1675 + },
1676 + "node_modules/@graphql-tools/load/node_modules/tslib": {
1677 + "version": "2.1.0",
1678 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1679 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1680 + },
1681 + "node_modules/@graphql-tools/merge": {
1682 + "version": "6.2.9",
1683 + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-6.2.9.tgz",
1684 + "integrity": "sha512-4PPB2rOEjnN91CVltOIVdBOOTEsC+2sHzOVngSoqtgZxvLwcRKwivy3sBuL3WyucBonzpXlV97Q418njslYa/w==",
1685 + "dependencies": {
1686 + "@graphql-tools/schema": "^7.0.0",
1687 + "@graphql-tools/utils": "^7.5.0",
1688 + "tslib": "~2.1.0"
1689 + },
1690 + "peerDependencies": {
1691 + "graphql": "^14.0.0 || ^15.0.0"
1692 + }
1693 + },
1694 + "node_modules/@graphql-tools/merge/node_modules/tslib": {
1695 + "version": "2.1.0",
1696 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1697 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1698 + },
1699 + "node_modules/@graphql-tools/schema": {
1700 + "version": "7.1.3",
1701 + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-7.1.3.tgz",
1702 + "integrity": "sha512-ZY76hmcJlF1iyg3Im0sQ3ASRkiShjgv102vLTVcH22lEGJeCaCyyS/GF1eUHom418S60bS8Th6+autRUxfBiBg==",
1703 + "dependencies": {
1704 + "@graphql-tools/utils": "^7.1.2",
1705 + "tslib": "~2.1.0"
1706 + },
1707 + "peerDependencies": {
1708 + "graphql": "^14.0.0 || ^15.0.0"
1709 + }
1710 + },
1711 + "node_modules/@graphql-tools/schema/node_modules/tslib": {
1712 + "version": "2.1.0",
1713 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1714 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1715 + },
1716 + "node_modules/@graphql-tools/url-loader": {
1717 + "version": "6.8.1",
1718 + "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-6.8.1.tgz",
1719 + "integrity": "sha512-iE/y9IAu0cZYL7o9IIDdGm5WjxacN25nGgVqjZINYlisW/wyuBxng7DMJBAp6yM6gkxkCpMno1ljA/52MXzVPQ==",
1720 + "dependencies": {
1721 + "@graphql-tools/delegate": "^7.0.1",
1722 + "@graphql-tools/utils": "^7.1.5",
1723 + "@graphql-tools/wrap": "^7.0.4",
1724 + "@types/websocket": "1.0.1",
1725 + "cross-fetch": "3.0.6",
1726 + "eventsource": "1.0.7",
1727 + "extract-files": "9.0.0",
1728 + "form-data": "4.0.0",
1729 + "graphql-upload": "^11.0.0",
1730 + "graphql-ws": "4.1.5",
1731 + "is-promise": "4.0.0",
1732 + "isomorphic-ws": "4.0.1",
1733 + "sse-z": "0.3.0",
1734 + "sync-fetch": "0.3.0",
1735 + "tslib": "~2.1.0",
1736 + "valid-url": "1.0.9",
1737 + "ws": "7.4.3"
1738 + },
1739 + "peerDependencies": {
1740 + "graphql": "^14.0.0 || ^15.0.0"
1741 + }
1742 + },
1743 + "node_modules/@graphql-tools/url-loader/node_modules/form-data": {
1744 + "version": "4.0.0",
1745 + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
1746 + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
1747 + "dependencies": {
1748 + "asynckit": "^0.4.0",
1749 + "combined-stream": "^1.0.8",
1750 + "mime-types": "^2.1.12"
1751 + },
1752 + "engines": {
1753 + "node": ">= 6"
1754 + }
1755 + },
1756 + "node_modules/@graphql-tools/url-loader/node_modules/tslib": {
1757 + "version": "2.1.0",
1758 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1759 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1760 + },
1761 + "node_modules/@graphql-tools/utils": {
1762 + "version": "7.5.0",
1763 + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-7.5.0.tgz",
1764 + "integrity": "sha512-8f//RSqHmKRdg9A3GHlZdxzlVfF/938ZD9edXLW7EriSABg1BXu3veru9W02VqORypArb2S/Tyeyvsk2gForqA==",
1765 + "dependencies": {
1766 + "@ardatan/aggregate-error": "0.0.6",
1767 + "camel-case": "4.1.2",
1768 + "tslib": "~2.1.0"
1769 + },
1770 + "peerDependencies": {
1771 + "graphql": "^14.0.0 || ^15.0.0"
1772 + }
1773 + },
1774 + "node_modules/@graphql-tools/utils/node_modules/tslib": {
1775 + "version": "2.1.0",
1776 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
1777 + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
1778 + },
1779 + "node_modules/@graphql-tools/wrap": {
1780 + "version": "7.0.5",
1781 + "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-7.0.5.tgz",
1782 + "integrity": "sha512-KCWBXsDfvG46GNUawRltJL4j9BMGoOG7oo3WEyCQP+SByWXiTe5cBF45SLDVQgdjljGNZhZ4Lq/7avIkF7/zDQ==",
1783 + "dependencies": {
1784 + "@graphql-tools/delegate": "^7.0.7",
1785 + "@graphql-tools/schema": "^7.1.2",
1786 + "@graphql-tools/utils": "^7.2.1",
1787 + "is-promise": "4.0.0",
1788 + "tslib": "~2.0.1"
1789 + },
1790 + "peerDependencies": {
1791 + "graphql": "^14.0.0 || ^15.0.0"
1792 + }
1793 + },
1794 + "node_modules/@graphql-tools/wrap/node_modules/tslib": {
1795 + "version": "2.0.3",
1796 + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
1797 + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
1798 + },
1799 + "node_modules/@hapi/address": {
1800 + "version": "2.1.4",
1801 + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
1802 + "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==",
1803 + "deprecated": "Moved to 'npm install @sideway/address'"
1804 + },
1805 + "node_modules/@hapi/bourne": {
1806 + "version": "1.3.2",
1807 + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz",
1808 + "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==",
1809 + "deprecated": "This version has been deprecated and is no longer supported or maintained"
1810 + },
1811 + "node_modules/@hapi/hoek": {
1812 + "version": "8.5.1",
1813 + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz",
1814 + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==",
1815 + "deprecated": "This version has been deprecated and is no longer supported or maintained"
1816 + },
1817 + "node_modules/@hapi/joi": {
1818 + "version": "15.1.1",
1819 + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz",
1820 + "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==",
1821 + "deprecated": "Switch to 'npm install joi'",
1822 + "dependencies": {
1823 + "@hapi/address": "2.x.x",
1824 + "@hapi/bourne": "1.x.x",
1825 + "@hapi/hoek": "8.x.x",
1826 + "@hapi/topo": "3.x.x"
1827 + }
1828 + },
1829 + "node_modules/@hapi/topo": {
1830 + "version": "3.1.6",
1831 + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz",
1832 + "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==",
1833 + "deprecated": "This version has been deprecated and is no longer supported or maintained",
1834 + "dependencies": {
1835 + "@hapi/hoek": "^8.3.0"
1836 + }
1837 + },
1838 + "node_modules/@hutson/parse-repository-url": {
1839 + "version": "3.0.2",
1840 + "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz",
1841 + "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==",
1842 + "engines": {
1843 + "node": ">=6.9.0"
1844 + }
1845 + },
1846 + "node_modules/@iarna/toml": {
1847 + "version": "2.2.5",
1848 + "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
1849 + "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="
1850 + },
1851 + "node_modules/@jest/console": {
1852 + "version": "24.9.0",
1853 + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz",
1854 + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==",
1855 + "dependencies": {
1856 + "@jest/source-map": "^24.9.0",
1857 + "chalk": "^2.0.1",
1858 + "slash": "^2.0.0"
1859 + },
1860 + "engines": {
1861 + "node": ">= 6"
1862 + }
1863 + },
1864 + "node_modules/@jest/console/node_modules/ansi-styles": {
1865 + "version": "3.2.1",
1866 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
1867 + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
1868 + "dependencies": {
1869 + "color-convert": "^1.9.0"
1870 + },
1871 + "engines": {
1872 + "node": ">=4"
1873 + }
1874 + },
1875 + "node_modules/@jest/console/node_modules/chalk": {
1876 + "version": "2.4.2",
1877 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
1878 + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
1879 + "dependencies": {
1880 + "ansi-styles": "^3.2.1",
1881 + "escape-string-regexp": "^1.0.5",
1882 + "supports-color": "^5.3.0"
1883 + },
1884 + "engines": {
1885 + "node": ">=4"
1886 + }
1887 + },
1888 + "node_modules/@jest/console/node_modules/color-convert": {
1889 + "version": "1.9.3",
1890 + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
1891 + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
1892 + "dependencies": {
1893 + "color-name": "1.1.3"
1894 + }
1895 + },
1896 + "node_modules/@jest/console/node_modules/color-name": {
1897 + "version": "1.1.3",
1898 + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
1899 + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
1900 + },
1901 + "node_modules/@jest/console/node_modules/escape-string-regexp": {
1902 + "version": "1.0.5",
1903 + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
1904 + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
1905 + "engines": {
1906 + "node": ">=0.8.0"
1907 + }
1908 + },
1909 + "node_modules/@jest/console/node_modules/has-flag": {
1910 + "version": "3.0.0",
1911 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
1912 + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
1913 + "engines": {
1914 + "node": ">=4"
1915 + }
1916 + },
1917 + "node_modules/@jest/console/node_modules/slash": {
1918 + "version": "2.0.0",
1919 + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
1920 + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
1921 + "engines": {
1922 + "node": ">=6"
1923 + }
1924 + },
1925 + "node_modules/@jest/console/node_modules/supports-color": {
1926 + "version": "5.5.0",
1927 + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1928 + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
1929 + "dependencies": {
1930 + "has-flag": "^3.0.0"
1931 + },
1932 + "engines": {
1933 + "node": ">=4"
1934 + }
1935 + },
1936 + "node_modules/@jest/core": {
1937 + "version": "24.9.0",
1938 + "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz",
1939 + "integrity": "sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==",
1940 + "dependencies": {
1941 + "@jest/console": "^24.7.1",
1942 + "@jest/reporters": "^24.9.0",
1943 + "@jest/test-result": "^24.9.0",
1944 + "@jest/transform": "^24.9.0",
1945 + "@jest/types": "^24.9.0",
1946 + "ansi-escapes": "^3.0.0",
1947 + "chalk": "^2.0.1",
1948 + "exit": "^0.1.2",
1949 + "graceful-fs": "^4.1.15",
1950 + "jest-changed-files": "^24.9.0",
1951 + "jest-config": "^24.9.0",
1952 + "jest-haste-map": "^24.9.0",
1953 + "jest-message-util": "^24.9.0",
1954 + "jest-regex-util": "^24.3.0",
1955 + "jest-resolve": "^24.9.0",
1956 + "jest-resolve-dependencies": "^24.9.0",
1957 + "jest-runner": "^24.9.0",
1958 + "jest-runtime": "^24.9.0",
1959 + "jest-snapshot": "^24.9.0",
1960 + "jest-util": "^24.9.0",
1961 + "jest-validate": "^24.9.0",
1962 + "jest-watcher": "^24.9.0",
1963 + "micromatch": "^3.1.10",
1964 + "p-each-series": "^1.0.0",
1965 + "realpath-native": "^1.1.0",
1966 + "rimraf": "^2.5.4",
1967 + "slash": "^2.0.0",
1968 + "strip-ansi": "^5.0.0"
1969 + },
1970 + "engines": {
1971 + "node": ">= 6"
1972 + }
1973 + },
1974 + "node_modules/@jest/core/node_modules/ansi-escapes": {
1975 + "version": "3.2.0",
1976 + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
1977 + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
1978 + "engines": {
1979 + "node": ">=4"
1980 + }
1981 + },
1982 + "node_modules/@jest/core/node_modules/ansi-styles": {
1983 + "version": "3.2.1",
1984 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
1985 + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
1986 + "dependencies": {
1987 + "color-convert": "^1.9.0"
1988 + },
1989 + "engines": {
1990 + "node": ">=4"
1991 + }
1992 + },
1993 + "node_modules/@jest/core/node_modules/braces": {
1994 + "version": "2.3.2",
1995 + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
1996 + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
1997 + "dependencies": {
1998 + "arr-flatten": "^1.1.0",
1999 + "array-unique": "^0.3.2",
2000 + "extend-shallow": "^2.0.1",
2001 + "fill-range": "^4.0.0",
2002 + "isobject": "^3.0.1",
2003 + "repeat-element": "^1.1.2",
2004 + "snapdragon": "^0.8.1",
2005 + "snapdragon-node": "^2.0.1",
2006 + "split-string": "^3.0.2",
2007 + "to-regex": "^3.0.1"
2008 + },
2009 + "engines": {
2010 + "node": ">=0.10.0"
2011 + }
2012 + },
2013 + "node_modules/@jest/core/node_modules/chalk": {
2014 + "version": "2.4.2",
2015 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
2016 + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
2017 + "dependencies": {
2018 + "ansi-styles": "^3.2.1",
2019 + "escape-string-regexp": "^1.0.5",
2020 + "supports-color": "^5.3.0"
2021 + },
2022 + "engines": {
2023 + "node": ">=4"
2024 + }
2025 + },
2026 + "node_modules/@jest/core/node_modules/color-convert": {
2027 + "version": "1.9.3",
2028 + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
2029 + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
2030 + "dependencies": {
2031 + "color-name": "1.1.3"
2032 + }
2033 + },
2034 + "node_modules/@jest/core/node_modules/color-name": {
2035 + "version": "1.1.3",
2036 + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
2037 + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
2038 + },
2039 + "node_modules/@jest/core/node_modules/escape-string-regexp": {
2040 + "version": "1.0.5",
2041 + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
2042 + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
2043 + "engines": {
2044 + "node": ">=0.8.0"
2045 + }
2046 + },
2047 + "node_modules/@jest/core/node_modules/fill-range": {
2048 + "version": "4.0.0",
2049 + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
2050 + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
2051 + "dependencies": {
2052 + "extend-shallow": "^2.0.1",
2053 + "is-number": "^3.0.0",
2054 + "repeat-string": "^1.6.1",
2055 + "to-regex-range": "^2.1.0"
2056 + },
2057 + "engines": {
2058 + "node": ">=0.10.0"
2059 + }
2060 + },
2061 + "node_modules/@jest/core/node_modules/has-flag": {
2062 + "version": "3.0.0",
2063 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
2064 + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
2065 + "engines": {
2066 + "node": ">=4"
2067 + }
2068 + },
2069 + "node_modules/@jest/core/node_modules/is-buffer": {
2070 + "version": "1.1.6",
2071 + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
2072 + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
2073 + },
2074 + "node_modules/@jest/core/node_modules/is-extendable": {
2075 + "version": "1.0.1",
2076 + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
2077 + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
2078 + "dependencies": {
2079 + "is-plain-object": "^2.0.4"
2080 + },
2081 + "engines": {
2082 + "node": ">=0.10.0"
2083 + }
2084 + },
2085 + "node_modules/@jest/core/node_modules/is-number": {
2086 + "version": "3.0.0",
2087 + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
2088 + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
2089 + "dependencies": {
2090 + "kind-of": "^3.0.2"
2091 + },
2092 + "engines": {
2093 + "node": ">=0.10.0"
2094 + }
2095 + },
2096 + "node_modules/@jest/core/node_modules/is-number/node_modules/kind-of": {
2097 + "version": "3.2.2",
2098 + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2099 + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2100 + "dependencies": {
2101 + "is-buffer": "^1.1.5"
2102 + },
2103 + "engines": {
2104 + "node": ">=0.10.0"
2105 + }
2106 + },
2107 + "node_modules/@jest/core/node_modules/is-plain-object": {
2108 + "version": "2.0.4",
2109 + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
2110 + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
2111 + "dependencies": {
2112 + "isobject": "^3.0.1"
2113 + },
2114 + "engines": {
2115 + "node": ">=0.10.0"
2116 + }
2117 + },
2118 + "node_modules/@jest/core/node_modules/isobject": {
2119 + "version": "3.0.1",
2120 + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
2121 + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
2122 + "engines": {
2123 + "node": ">=0.10.0"
2124 + }
2125 + },
2126 + "node_modules/@jest/core/node_modules/micromatch": {
2127 + "version": "3.1.10",
2128 + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
2129 + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
2130 + "dependencies": {
2131 + "arr-diff": "^4.0.0",
2132 + "array-unique": "^0.3.2",
2133 + "braces": "^2.3.1",
2134 + "define-property": "^2.0.2",
2135 + "extend-shallow": "^3.0.2",
2136 + "extglob": "^2.0.4",
2137 + "fragment-cache": "^0.2.1",
2138 + "kind-of": "^6.0.2",
2139 + "nanomatch": "^1.2.9",
2140 + "object.pick": "^1.3.0",
2141 + "regex-not": "^1.0.0",
2142 + "snapdragon": "^0.8.1",
2143 + "to-regex": "^3.0.2"
2144 + },
2145 + "engines": {
2146 + "node": ">=0.10.0"
2147 + }
2148 + },
2149 + "node_modules/@jest/core/node_modules/micromatch/node_modules/extend-shallow": {
2150 + "version": "3.0.2",
2151 + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
2152 + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
2153 + "dependencies": {
2154 + "assign-symbols": "^1.0.0",
2155 + "is-extendable": "^1.0.1"
2156 + },
2157 + "engines": {
2158 + "node": ">=0.10.0"
2159 + }
2160 + },
2161 + "node_modules/@jest/core/node_modules/rimraf": {
2162 + "version": "2.7.1",
2163 + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
2164 + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
2165 + "dependencies": {
2166 + "glob": "^7.1.3"
2167 + },
2168 + "bin": {
2169 + "rimraf": "bin.js"
2170 + }
2171 + },
2172 + "node_modules/@jest/core/node_modules/slash": {
2173 + "version": "2.0.0",
2174 + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
2175 + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
2176 + "engines": {
2177 + "node": ">=6"
2178 + }
2179 + },
2180 + "node_modules/@jest/core/node_modules/supports-color": {
2181 + "version": "5.5.0",
2182 + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
2183 + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
2184 + "dependencies": {
2185 + "has-flag": "^3.0.0"
2186 + },
2187 + "engines": {
2188 + "node": ">=4"
2189 + }
2190 + },
2191 + "node_modules/@jest/core/node_modules/to-regex-range": {
2192 + "version": "2.1.1",
2193 + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
2194 + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
2195 + "dependencies": {
2196 + "is-number": "^3.0.0",
2197 + "repeat-string": "^1.6.1"
2198 + },
2199 + "engines": {
2200 + "node": ">=0.10.0"
2201 + }
2202 + },
2203 + "node_modules/@jest/environment": {
2204 + "version": "24.9.0",
2205 + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz",
2206 + "integrity": "sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==",
2207 + "dependencies": {
2208 + "@jest/fake-timers": "^24.9.0",
2209 + "@jest/transform": "^24.9.0",
2210 + "@jest/types": "^24.9.0",
2211 + "jest-mock": "^24.9.0"
2212 + },
2213 + "engines": {
2214 + "node": ">= 6"
2215 + }
2216 + },
2217 + "node_modules/@jest/fake-timers": {
2218 + "version": "24.9.0",
2219 + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz",
2220 + "integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==",
2221 + "dependencies": {
2222 + "@jest/types": "^24.9.0",
2223 + "jest-message-util": "^24.9.0",
2224 + "jest-mock": "^24.9.0"
2225 + },
2226 + "engines": {
2227 + "node": ">= 6"
2228 + }
2229 + },
2230 + "node_modules/@jest/reporters": {
2231 + "version": "24.9.0",
2232 + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz",
2233 + "integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==",
2234 + "dependencies": {
2235 + "@jest/environment": "^24.9.0",
2236 + "@jest/test-result": "^24.9.0",
2237 + "@jest/transform": "^24.9.0",
2238 + "@jest/types": "^24.9.0",
2239 + "chalk": "^2.0.1",
2240 + "exit": "^0.1.2",
2241 + "glob": "^7.1.2",
2242 + "istanbul-lib-coverage": "^2.0.2",
2243 + "istanbul-lib-instrument": "^3.0.1",
2244 + "istanbul-lib-report": "^2.0.4",
2245 + "istanbul-lib-source-maps": "^3.0.1",
2246 + "istanbul-reports": "^2.2.6",
2247 + "jest-haste-map": "^24.9.0",
2248 + "jest-resolve": "^24.9.0",
2249 + "jest-runtime": "^24.9.0",
2250 + "jest-util": "^24.9.0",
2251 + "jest-worker": "^24.6.0",
2252 + "node-notifier": "^5.4.2",
2253 + "slash": "^2.0.0",
2254 + "source-map": "^0.6.0",
2255 + "string-length": "^2.0.0"
2256 + },
2257 + "engines": {
2258 + "node": ">= 6"
2259 + }
2260 + },
2261 + "node_modules/@jest/reporters/node_modules/ansi-styles": {
2262 + "version": "3.2.1",
2263 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
2264 + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
2265 + "dependencies": {
2266 + "color-convert": "^1.9.0"
2267 + },
2268 + "engines": {
2269 + "node": ">=4"
2270 + }
2271 + },
2272 + "node_modules/@jest/reporters/node_modules/chalk": {
2273 + "version": "2.4.2",
2274 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
2275 + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
2276 + "dependencies": {
2277 + "ansi-styles": "^3.2.1",
2278 + "escape-string-regexp": "^1.0.5",
2279 + "supports-color": "^5.3.0"
2280 + },
2281 + "engines": {
2282 + "node": ">=4"
2283 + }
2284 + },
2285 + "node_modules/@jest/reporters/node_modules/color-convert": {
2286 + "version": "1.9.3",
2287 + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
2288 + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
2289 + "dependencies": {
2290 + "color-name": "1.1.3"
2291 + }
2292 + },
2293 + "node_modules/@jest/reporters/node_modules/color-name": {
2294 + "version": "1.1.3",
2295 + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
2296 + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
2297 + },
2298 + "node_modules/@jest/reporters/node_modules/escape-string-regexp": {
2299 + "version": "1.0.5",
2300 + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
2301 + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
2302 + "engines": {
2303 + "node": ">=0.8.0"
2304 + }
2305 + },
2306 + "node_modules/@jest/reporters/node_modules/has-flag": {
2307 + "version": "3.0.0",
2308 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
2309 + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
2310 + "engines": {
2311 + "node": ">=4"
2312 + }
2313 + },
2314 + "node_modules/@jest/reporters/node_modules/slash": {
2315 + "version": "2.0.0",
2316 + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
2317 + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
2318 + "engines": {
2319 + "node": ">=6"
2320 + }
2321 + },
2322 + "node_modules/@jest/reporters/node_modules/source-map": {
2323 + "version": "0.6.1",
2324 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
2325 + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
2326 + "engines": {
2327 + "node": ">=0.10.0"
2328 + }
2329 + },
2330 + "node_modules/@jest/reporters/node_modules/supports-color": {
2331 + "version": "5.5.0",
2332 + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
2333 + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
2334 + "dependencies": {
2335 + "has-flag": "^3.0.0"
2336 + },
2337 + "engines": {
2338 + "node": ">=4"
2339 + }
2340 + },
2341 + "node_modules/@jest/source-map": {
2342 + "version": "24.9.0",
2343 + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz",
2344 + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==",
2345 + "dependencies": {
2346 + "callsites": "^3.0.0",
2347 + "graceful-fs": "^4.1.15",
2348 + "source-map": "^0.6.0"
2349 + },
2350 + "engines": {
2351 + "node": ">= 6"
2352 + }
2353 + },
2354 + "node_modules/@jest/source-map/node_modules/source-map": {
2355 + "version": "0.6.1",
2356 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
2357 + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
2358 + "engines": {
2359 + "node": ">=0.10.0"
2360 + }
2361 + },
2362 + "node_modules/@jest/test-result": {
2363 + "version": "24.9.0",
2364 + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz",
2365 + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==",
2366 + "dependencies": {
2367 + "@jest/console": "^24.9.0",
2368 + "@jest/types": "^24.9.0",
2369 + "@types/istanbul-lib-coverage": "^2.0.0"
2370 + },
2371 + "engines": {
2372 + "node": ">= 6"
2373 + }
2374 + },
2375 + "node_modules/@jest/test-sequencer": {
2376 + "version": "24.9.0",
2377 + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz",
2378 + "integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==",
2379 + "dependencies": {
2380 + "@jest/test-result": "^24.9.0",
2381 + "jest-haste-map": "^24.9.0",
2382 + "jest-runner": "^24.9.0",
2383 + "jest-runtime": "^24.9.0"
2384 + },
2385 + "engines": {
2386 + "node": ">= 6"
2387 + }
2388 + },
2389 + "node_modules/@jest/transform": {
2390 + "version": "24.9.0",
2391 + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz",
2392 + "integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==",
2393 + "dependencies": {
2394 + "@babel/core": "^7.1.0",
2395 + "@jest/types": "^24.9.0",
2396 + "babel-plugin-istanbul": "^5.1.0",
2397 + "chalk": "^2.0.1",
2398 + "convert-source-map": "^1.4.0",
2399 + "fast-json-stable-stringify": "^2.0.0",
2400 + "graceful-fs": "^4.1.15",
2401 + "jest-haste-map": "^24.9.0",
2402 + "jest-regex-util": "^24.9.0",
2403 + "jest-util": "^24.9.0",
2404 + "micromatch": "^3.1.10",
2405 + "pirates": "^4.0.1",
2406 + "realpath-native": "^1.1.0",
2407 + "slash": "^2.0.0",
2408 + "source-map": "^0.6.1",
2409 + "write-file-atomic": "2.4.1"
2410 + },
2411 + "engines": {
2412 + "node": ">= 6"
2413 + }
2414 + },
2415 + "node_modules/@jest/transform/node_modules/ansi-styles": {
2416 + "version": "3.2.1",
2417 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
2418 + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
2419 + "dependencies": {
2420 + "color-convert": "^1.9.0"
2421 + },
2422 + "engines": {
2423 + "node": ">=4"
2424 + }
2425 + },
2426 + "node_modules/@jest/transform/node_modules/braces": {
2427 + "version": "2.3.2",
2428 + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
2429 + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
2430 + "dependencies": {
2431 + "arr-flatten": "^1.1.0",
2432 + "array-unique": "^0.3.2",
2433 + "extend-shallow": "^2.0.1",
2434 + "fill-range": "^4.0.0",
2435 + "isobject": "^3.0.1",
2436 + "repeat-element": "^1.1.2",
2437 + "snapdragon": "^0.8.1",
2438 + "snapdragon-node": "^2.0.1",
2439 + "split-string": "^3.0.2",
2440 + "to-regex": "^3.0.1"
2441 + },
2442 + "engines": {
2443 + "node": ">=0.10.0"
2444 + }
2445 + },
2446 + "node_modules/@jest/transform/node_modules/chalk": {
2447 + "version": "2.4.2",
2448 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
2449 + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
2450 + "dependencies": {
2451 + "ansi-styles": "^3.2.1",
2452 + "escape-string-regexp": "^1.0.5",
2453 + "supports-color": "^5.3.0"
2454 + },
2455 + "engines": {
2456 + "node": ">=4"
2457 + }
2458 + },
2459 + "node_modules/@jest/transform/node_modules/color-convert": {
2460 + "version": "1.9.3",
2461 + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
2462 + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
2463 + "dependencies": {
2464 + "color-name": "1.1.3"
2465 + }
2466 + },
2467 + "node_modules/@jest/transform/node_modules/color-name": {
2468 + "version": "1.1.3",
2469 + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
2470 + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
2471 + },
2472 + "node_modules/@jest/transform/node_modules/escape-string-regexp": {
2473 + "version": "1.0.5",
2474 + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
2475 + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
2476 + "engines": {
2477 + "node": ">=0.8.0"
2478 + }
2479 + },
2480 + "node_modules/@jest/transform/node_modules/fill-range": {
2481 + "version": "4.0.0",
2482 + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
2483 + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
2484 + "dependencies": {
2485 + "extend-shallow": "^2.0.1",
2486 + "is-number": "^3.0.0",
2487 + "repeat-string": "^1.6.1",
2488 + "to-regex-range": "^2.1.0"
2489 + },
2490 + "engines": {
2491 + "node": ">=0.10.0"
2492 + }
2493 + },
2494 + "node_modules/@jest/transform/node_modules/has-flag": {
2495 + "version": "3.0.0",
2496 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
2497 + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
2498 + "engines": {
2499 + "node": ">=4"
2500 + }
2501 + },
2502 + "node_modules/@jest/transform/node_modules/is-buffer": {
2503 + "version": "1.1.6",
2504 + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
2505 + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
2506 + },
2507 + "node_modules/@jest/transform/node_modules/is-extendable": {
2508 + "version": "1.0.1",
2509 + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
2510 + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
2511 + "dependencies": {
2512 + "is-plain-object": "^2.0.4"
2513 + },
2514 + "engines": {
2515 + "node": ">=0.10.0"
2516 + }
2517 + },
2518 + "node_modules/@jest/transform/node_modules/is-number": {
2519 + "version": "3.0.0",
2520 + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
2521 + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
2522 + "dependencies": {
2523 + "kind-of": "^3.0.2"
2524 + },
2525 + "engines": {
2526 + "node": ">=0.10.0"
2527 + }
2528 + },
2529 + "node_modules/@jest/transform/node_modules/is-number/node_modules/kind-of": {
2530 + "version": "3.2.2",
2531 + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2532 + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2533 + "dependencies": {
2534 + "is-buffer": "^1.1.5"
2535 + },
2536 + "engines": {
2537 + "node": ">=0.10.0"
2538 + }
2539 + },
2540 + "node_modules/@jest/transform/node_modules/is-plain-object": {
2541 + "version": "2.0.4",
2542 + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
2543 + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
2544 + "dependencies": {
2545 + "isobject": "^3.0.1"
2546 + },
2547 + "engines": {
2548 + "node": ">=0.10.0"
2549 + }
2550 + },
2551 + "node_modules/@jest/transform/node_modules/isobject": {
2552 + "version": "3.0.1",
2553 + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
2554 + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
2555 + "engines": {
2556 + "node": ">=0.10.0"
2557 + }
2558 + },
2559 + "node_modules/@jest/transform/node_modules/micromatch": {
2560 + "version": "3.1.10",
2561 + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
2562 + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
2563 + "dependencies": {
2564 + "arr-diff": "^4.0.0",
2565 + "array-unique": "^0.3.2",
2566 + "braces": "^2.3.1",
2567 + "define-property": "^2.0.2",
2568 + "extend-shallow": "^3.0.2",
2569 + "extglob": "^2.0.4",
2570 + "fragment-cache": "^0.2.1",
2571 + "kind-of": "^6.0.2",
2572 + "nanomatch": "^1.2.9",
2573 + "object.pick": "^1.3.0",
2574 + "regex-not": "^1.0.0",
2575 + "snapdragon": "^0.8.1",
2576 + "to-regex": "^3.0.2"
2577 + },
2578 + "engines": {
2579 + "node": ">=0.10.0"
2580 + }
2581 + },
2582 + "node_modules/@jest/transform/node_modules/micromatch/node_modules/extend-shallow": {
2583 + "version": "3.0.2",
2584 + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
2585 + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
2586 + "dependencies": {
2587 + "assign-symbols": "^1.0.0",
2588 + "is-extendable": "^1.0.1"
2589 + },
2590 + "engines": {
2591 + "node": ">=0.10.0"
2592 + }
2593 + },
2594 + "node_modules/@jest/transform/node_modules/slash": {
2595 + "version": "2.0.0",
2596 + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
2597 + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
2598 + "engines": {
2599 + "node": ">=6"
2600 + }
2601 + },
2602 + "node_modules/@jest/transform/node_modules/source-map": {
2603 + "version": "0.6.1",
2604 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
2605 + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
2606 + "engines": {
2607 + "node": ">=0.10.0"
2608 + }
2609 + },
2610 + "node_modules/@jest/transform/node_modules/supports-color": {
2611 + "version": "5.5.0",
2612 + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
2613 + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
2614 + "dependencies": {
2615 + "has-flag": "^3.0.0"
2616 + },
2617 + "engines": {
2618 + "node": ">=4"
2619 + }
2620 + },
2621 + "node_modules/@jest/transform/node_modules/to-regex-range": {
2622 + "version": "2.1.1",
2623 + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
2624 + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
2625 + "dependencies": {
2626 + "is-number": "^3.0.0",
2627 + "repeat-string": "^1.6.1"
2628 + },
2629 + "engines": {
2630 + "node": ">=0.10.0"
2631 + }
2632 + },
2633 + "node_modules/@jest/transform/node_modules/write-file-atomic": {
2634 + "version": "2.4.1",
2635 + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz",
2636 + "integrity": "sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg==",
2637 + "dependencies": {
2638 + "graceful-fs": "^4.1.11",
2639 + "imurmurhash": "^0.1.4",
2640 + "signal-exit": "^3.0.2"
2641 + }
2642 + },
2643 + "node_modules/@jest/types": {
2644 + "version": "24.9.0",
2645 + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz",
2646 + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==",
2647 + "dependencies": {
2648 + "@types/istanbul-lib-coverage": "^2.0.0",
2649 + "@types/istanbul-reports": "^1.1.1",
2650 + "@types/yargs": "^13.0.0"
2651 + },
2652 + "engines": {
2653 + "node": ">= 6"
2654 + }
2655 + },
2656 + "node_modules/@mdx-js/mdx": {
2657 + "version": "1.6.22",
2658 + "resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz",
2659 + "integrity": "sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA==",
2660 + "dependencies": {
2661 + "@babel/core": "7.12.9",
2662 + "@babel/plugin-syntax-jsx": "7.12.1",
2663 + "@babel/plugin-syntax-object-rest-spread": "7.8.3",
2664 + "@mdx-js/util": "1.6.22",
2665 + "babel-plugin-apply-mdx-type-prop": "1.6.22",
2666 + "babel-plugin-extract-import-names": "1.6.22",
2667 + "camelcase-css": "2.0.1",
2668 + "detab": "2.0.4",
2669 + "hast-util-raw": "6.0.1",
2670 + "lodash.uniq": "4.5.0",
2671 + "mdast-util-to-hast": "10.0.1",
2672 + "remark-footnotes": "2.0.0",
2673 + "remark-mdx": "1.6.22",
2674 + "remark-parse": "8.0.3",
2675 + "remark-squeeze-paragraphs": "4.0.0",
2676 + "style-to-object": "0.3.0",
2677 + "unified": "9.2.0",
2678 + "unist-builder": "2.0.3",
2679 + "unist-util-visit": "2.0.3"
2680 + },
2681 + "funding": {
2682 + "type": "opencollective",
2683 + "url": "https://opencollective.com/unified"
2684 + }
2685 + },
2686 + "node_modules/@mdx-js/mdx/node_modules/@babel/core": {
2687 + "version": "7.12.9",
2688 + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz",
2689 + "integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==",
2690 + "dependencies": {
2691 + "@babel/code-frame": "^7.10.4",
2692 + "@babel/generator": "^7.12.5",
2693 + "@babel/helper-module-transforms": "^7.12.1",
2694 + "@babel/helpers": "^7.12.5",
2695 + "@babel/parser": "^7.12.7",
2696 + "@babel/template": "^7.12.7",
2697 + "@babel/traverse": "^7.12.9",
2698 + "@babel/types": "^7.12.7",
2699 + "convert-source-map": "^1.7.0",
2700 + "debug": "^4.1.0",
2701 + "gensync": "^1.0.0-beta.1",
2702 + "json5": "^2.1.2",
2703 + "lodash": "^4.17.19",
2704 + "resolve": "^1.3.2",
2705 + "semver": "^5.4.1",
2706 + "source-map": "^0.5.0"
2707 + },
2708 + "engines": {
2709 + "node": ">=6.9.0"
2710 + },
2711 + "funding": {
2712 + "type": "opencollective",
2713 + "url": "https://opencollective.com/babel"
2714 + }
2715 + },
2716 + "node_modules/@mdx-js/mdx/node_modules/@babel/helper-plugin-utils": {
2717 + "version": "7.10.4",
2718 + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
2719 + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg=="
2720 + },
2721 + "node_modules/@mdx-js/mdx/node_modules/@babel/plugin-proposal-object-rest-spread": {
2722 + "version": "7.12.1",
2723 + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz",
2724 + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==",
2725 + "dependencies": {
2726 + "@babel/helper-plugin-utils": "^7.10.4",
2727 + "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
2728 + "@babel/plugin-transform-parameters": "^7.12.1"
2729 + },
2730 + "peerDependencies": {
2731 + "@babel/core": "^7.0.0-0"
2732 + }
2733 + },
2734 + "node_modules/@mdx-js/mdx/node_modules/@babel/plugin-syntax-jsx": {
2735 + "version": "7.12.1",
2736 + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz",
2737 + "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==",
2738 + "dependencies": {
2739 + "@babel/helper-plugin-utils": "^7.10.4"
2740 + },
2741 + "peerDependencies": {
2742 + "@babel/core": "^7.0.0-0"
2743 + }
2744 + },
2745 + "node_modules/@mdx-js/mdx/node_modules/debug": {
2746 + "version": "4.3.1",
2747 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
2748 + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
2749 + "dependencies": {
2750 + "ms": "2.1.2"
2751 + },
2752 + "engines": {
2753 + "node": ">=6.0"
2754 + },
2755 + "peerDependenciesMeta": {
2756 + "supports-color": {
2757 + "optional": true
2758 + }
2759 + }
2760 + },
2761 + "node_modules/@mdx-js/mdx/node_modules/is-plain-obj": {
2762 + "version": "2.1.0",
2763 + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
2764 + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
2765 + "engines": {
2766 + "node": ">=8"
2767 + }
2768 + },
2769 + "node_modules/@mdx-js/mdx/node_modules/ms": {
2770 + "version": "2.1.2",
2771 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
2772 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
2773 + },
2774 + "node_modules/@mdx-js/mdx/node_modules/remark-mdx": {
2775 + "version": "1.6.22",
2776 + "resolved": "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.22.tgz",
2777 + "integrity": "sha512-phMHBJgeV76uyFkH4rvzCftLfKCr2RZuF+/gmVcaKrpsihyzmhXjA0BEMDaPTXG5y8qZOKPVo83NAOX01LPnOQ==",
2778 + "dependencies": {
2779 + "@babel/core": "7.12.9",
2780 + "@babel/helper-plugin-utils": "7.10.4",
2781 + "@babel/plugin-proposal-object-rest-spread": "7.12.1",
2782 + "@babel/plugin-syntax-jsx": "7.12.1",
2783 + "@mdx-js/util": "1.6.22",
2784 + "is-alphabetical": "1.0.4",
2785 + "remark-parse": "8.0.3",
2786 + "unified": "9.2.0"
2787 + },
2788 + "funding": {
2789 + "type": "opencollective",
2790 + "url": "https://opencollective.com/unified"
2791 + }
2792 + },
2793 + "node_modules/@mdx-js/mdx/node_modules/remark-parse": {
2794 + "version": "8.0.3",
2795 + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz",
2796 + "integrity": "sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==",
2797 + "dependencies": {
2798 + "ccount": "^1.0.0",
2799 + "collapse-white-space": "^1.0.2",
2800 + "is-alphabetical": "^1.0.0",
2801 + "is-decimal": "^1.0.0",
2802 + "is-whitespace-character": "^1.0.0",
2803 + "is-word-character": "^1.0.0",
2804 + "markdown-escapes": "^1.0.0",
2805 + "parse-entities": "^2.0.0",
2806 + "repeat-string": "^1.5.4",
2807 + "state-toggle": "^1.0.0",
2808 + "trim": "0.0.1",
2809 + "trim-trailing-lines": "^1.0.0",
2810 + "unherit": "^1.0.4",
2811 + "unist-util-remove-position": "^2.0.0",
2812 + "vfile-location": "^3.0.0",
2813 + "xtend": "^4.0.1"
2814 + },
2815 + "funding": {
2816 + "type": "opencollective",
2817 + "url": "https://opencollective.com/unified"
2818 + }
2819 + },
2820 + "node_modules/@mdx-js/mdx/node_modules/semver": {
2821 + "version": "5.7.1",
2822 + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
2823 + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
2824 + "bin": {
2825 + "semver": "bin/semver"
2826 + }
2827 + },
2828 + "node_modules/@mdx-js/mdx/node_modules/source-map": {
2829 + "version": "0.5.7",
2830 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
2831 + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
2832 + "engines": {
2833 + "node": ">=0.10.0"
2834 + }
2835 + },
2836 + "node_modules/@mdx-js/mdx/node_modules/unified": {
2837 + "version": "9.2.0",
2838 + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz",
2839 + "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==",
2840 + "dependencies": {
2841 + "bail": "^1.0.0",
2842 + "extend": "^3.0.0",
2843 + "is-buffer": "^2.0.0",
2844 + "is-plain-obj": "^2.0.0",
2845 + "trough": "^1.0.0",
2846 + "vfile": "^4.0.0"
2847 + },
2848 + "funding": {
2849 + "type": "opencollective",
2850 + "url": "https://opencollective.com/unified"
2851 + }
2852 + },
2853 + "node_modules/@mdx-js/mdx/node_modules/unist-util-remove-position": {
2854 + "version": "2.0.1",
2855 + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz",
2856 + "integrity": "sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==",
2857 + "dependencies": {
2858 + "unist-util-visit": "^2.0.0"
2859 + },
2860 + "funding": {
2861 + "type": "opencollective",
2862 + "url": "https://opencollective.com/unified"
2863 + }
2864 + },
2865 + "node_modules/@mdx-js/react": {
2866 + "version": "1.6.22",
2867 + "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
2868 + "integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
2869 + "funding": {
2870 + "type": "opencollective",
2871 + "url": "https://opencollective.com/unified"
2872 + },
2873 + "peerDependencies": {
2874 + "react": "^16.13.1 || ^17.0.0"
2875 + }
2876 + },
2877 + "node_modules/@mdx-js/util": {
2878 + "version": "1.6.22",
2879 + "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz",
2880 + "integrity": "sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==",
2881 + "funding": {
2882 + "type": "opencollective",
2883 + "url": "https://opencollective.com/unified"
2884 + }
2885 + },
2886 + "node_modules/@mikaelkristiansson/domready": {
2887 + "version": "1.0.11",
2888 + "resolved": "https://registry.npmjs.org/@mikaelkristiansson/domready/-/domready-1.0.11.tgz",
2889 + "integrity": "sha512-nEBLOa0JgtqahmPrnJZ18epLiFBzxhdKgo4uhN3TaBFRmM30pEVrS9FAEV4tg92d8PTdU+dYQx2lnpPyFMgMcg=="
2890 + },
2891 + "node_modules/@nodelib/fs.scandir": {
2892 + "version": "2.1.4",
2893 + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
2894 + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==",
2895 + "dependencies": {
2896 + "@nodelib/fs.stat": "2.0.4",
2897 + "run-parallel": "^1.1.9"
2898 + },
2899 + "engines": {
2900 + "node": ">= 8"
2901 + }
2902 + },
2903 + "node_modules/@nodelib/fs.stat": {
2904 + "version": "2.0.4",
2905 + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz",
2906 + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==",
2907 + "engines": {
2908 + "node": ">= 8"
2909 + }
2910 + },
2911 + "node_modules/@nodelib/fs.walk": {
2912 + "version": "1.2.6",
2913 + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz",
2914 + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==",
2915 + "dependencies": {
2916 + "@nodelib/fs.scandir": "2.1.4",
2917 + "fastq": "^1.6.0"
2918 + },
2919 + "engines": {
2920 + "node": ">= 8"
2921 + }
2922 + },
2923 + "node_modules/@pieh/friendly-errors-webpack-plugin": {
2924 + "version": "1.7.0-chalk-2",
2925 + "resolved": "https://registry.npmjs.org/@pieh/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.0-chalk-2.tgz",
2926 + "integrity": "sha512-65+vYGuDkHBCWWjqzzR/Ck318+d6yTI00EqII9qe3aPD1J3Olhvw0X38uM5moQb1PK/ksDXwSoPGt/5QhCiotw==",
2927 + "dependencies": {
2928 + "chalk": "^2.4.2",
2929 + "error-stack-parser": "^2.0.0",
2930 + "string-width": "^2.0.0",
2931 + "strip-ansi": "^3"
2932 + },
2933 + "peerDependencies": {
2934 + "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
2935 + }
2936 + },
2937 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/ansi-regex": {
2938 + "version": "2.1.1",
2939 + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
2940 + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
2941 + "engines": {
2942 + "node": ">=0.10.0"
2943 + }
2944 + },
2945 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/ansi-styles": {
2946 + "version": "3.2.1",
2947 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
2948 + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
2949 + "dependencies": {
2950 + "color-convert": "^1.9.0"
2951 + },
2952 + "engines": {
2953 + "node": ">=4"
2954 + }
2955 + },
2956 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/chalk": {
2957 + "version": "2.4.2",
2958 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
2959 + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
2960 + "dependencies": {
2961 + "ansi-styles": "^3.2.1",
2962 + "escape-string-regexp": "^1.0.5",
2963 + "supports-color": "^5.3.0"
2964 + },
2965 + "engines": {
2966 + "node": ">=4"
2967 + }
2968 + },
2969 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/color-convert": {
2970 + "version": "1.9.3",
2971 + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
2972 + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
2973 + "dependencies": {
2974 + "color-name": "1.1.3"
2975 + }
2976 + },
2977 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/color-name": {
2978 + "version": "1.1.3",
2979 + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
2980 + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
2981 + },
2982 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/escape-string-regexp": {
2983 + "version": "1.0.5",
2984 + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
2985 + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
2986 + "engines": {
2987 + "node": ">=0.8.0"
2988 + }
2989 + },
2990 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/has-flag": {
2991 + "version": "3.0.0",
2992 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
2993 + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
2994 + "engines": {
2995 + "node": ">=4"
2996 + }
2997 + },
2998 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/strip-ansi": {
2999 + "version": "3.0.1",
3000 + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
3001 + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
3002 + "dependencies": {
3003 + "ansi-regex": "^2.0.0"
3004 + },
3005 + "engines": {
3006 + "node": ">=0.10.0"
3007 + }
3008 + },
3009 + "node_modules/@pieh/friendly-errors-webpack-plugin/node_modules/supports-color": {
3010 + "version": "5.5.0",
3011 + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
3012 + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
3013 + "dependencies": {
3014 + "has-flag": "^3.0.0"
3015 + },
3016 + "engines": {
3017 + "node": ">=4"
3018 + }
3019 + },
3020 + "node_modules/@pmmmwh/react-refresh-webpack-plugin": {
3021 + "version": "0.4.3",
3022 + "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.3.tgz",
3023 + "integrity": "sha512-br5Qwvh8D2OQqSXpd1g/xqXKnK0r+Jz6qVKBbWmpUcrbGOxUrf39V5oZ1876084CGn18uMdR5uvPqBv9UqtBjQ==",
3024 + "dependencies": {
3025 + "ansi-html": "^0.0.7",
3026 + "error-stack-parser": "^2.0.6",
3027 + "html-entities": "^1.2.1",
3028 + "native-url": "^0.2.6",
3029 + "schema-utils": "^2.6.5",
3030 + "source-map": "^0.7.3"
3031 + },
3032 + "engines": {
3033 + "node": ">= 10.x"
3034 + },
3035 + "peerDependencies": {
3036 + "@types/webpack": "4.x",
3037 + "react-refresh": ">=0.8.3 <0.10.0",
3038 + "sockjs-client": "^1.4.0",
3039 + "type-fest": "^0.13.1",
3040 + "webpack": ">=4.43.0 <6.0.0",
3041 + "webpack-dev-server": "3.x",
3042 + "webpack-hot-middleware": "2.x",
3043 + "webpack-plugin-serve": "0.x || 1.x"
3044 + },
3045 + "peerDependenciesMeta": {
3046 + "@types/webpack": {
3047 + "optional": true
3048 + },
3049 + "sockjs-client": {
3050 + "optional": true
3051 + },
3052 + "type-fest": {
3053 + "optional": true
3054 + },
3055 + "webpack-dev-server": {
3056 + "optional": true
3057 + },
3058 + "webpack-hot-middleware": {
3059 + "optional": true
3060 + },
3061 + "webpack-plugin-serve": {
3062 + "optional": true
3063 + }
3064 + }
3065 + },
3066 + "node_modules/@popmotion/easing": {
3067 + "version": "1.0.2",
3068 + "resolved": "https://registry.npmjs.org/@popmotion/easing/-/easing-1.0.2.tgz",
3069 + "integrity": "sha512-IkdW0TNmRnWTeWI7aGQIVDbKXPWHVEYdGgd5ZR4SH/Ty/61p63jCjrPxX1XrR7IGkl08bjhJROStD7j+RKgoIw=="
3070 + },
3071 + "node_modules/@popmotion/popcorn": {
3072 + "version": "0.4.4",
3073 + "resolved": "https://registry.npmjs.org/@popmotion/popcorn/-/popcorn-0.4.4.tgz",
3074 + "integrity": "sha512-jYO/8319fKoNLMlY4ZJPiPu8Ea8occYwRZhxpaNn/kZsK4QG2E7XFlXZMJBsTWDw7I1i0uaqyC4zn1nwEezLzg==",
3075 + "dependencies": {
3076 + "@popmotion/easing": "^1.0.1",
3077 + "framesync": "^4.0.1",
3078 + "hey-listen": "^1.0.8",
3079 + "style-value-types": "^3.1.7",
3080 + "tslib": "^1.10.0"
3081 + }
3082 + },
3083 + "node_modules/@primer/components": {
3084 + "version": "20.3.0",
3085 + "resolved": "https://registry.npmjs.org/@primer/components/-/components-20.3.0.tgz",
3086 + "integrity": "sha512-r5ibCW5Q4w9VpS8dE6JX+YMGzGtos4Oi2K11Mh1XfZYw8YOdpznJh7Tn8VfnZWwVsoRnUogsJKhiubDxIwvHXw==",
3087 + "dependencies": {
3088 + "@babel/helpers": "7.9.2",
3089 + "@babel/runtime": "7.9.2",
3090 + "@primer/octicons-react": "^10.0.0",
3091 + "@primer/primitives": "3.0.0",
3092 + "@reach/dialog": "0.3.0",
3093 + "@styled-system/css": "5.1.5",
3094 + "@styled-system/prop-types": "5.1.2",
3095 + "@styled-system/props": "5.1.4",
3096 + "@styled-system/theme-get": "5.1.2",
3097 + "@testing-library/react": "9.4.0",
3098 + "@types/styled-components": "^4.4.0",
3099 + "@types/styled-system": "5.1.2",
3100 + "babel-plugin-macros": "2.8.0",
3101 + "babel-polyfill": "6.26.0",
3102 + "classnames": "^2.2.5",
3103 + "details-element-polyfill": "2.4.0",
3104 + "jest-axe": "3.2.0",
3105 + "polished": "3.5.2",
3106 + "react": "^16.10.2",
3107 + "react-is": "16.10.2",
3108 + "styled-system": "5.1.2"
3109 + },
3110 + "peerDependencies": {
3111 + "react": "^16.8.0",
3112 + "react-dom": "^16.8.0",
3113 + "styled-components": "4.x || 5.x"
3114 + }
3115 + },
3116 + "node_modules/@primer/components/node_modules/@babel/helpers": {
3117 + "version": "7.9.2",
3118 + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz",
3119 + "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==",
3120 + "dependencies": {
3121 + "@babel/template": "^7.8.3",
3122 + "@babel/traverse": "^7.9.0",
3123 + "@babel/types": "^7.9.0"
3124 + }
3125 + },
3126 + "node_modules/@primer/components/node_modules/@babel/runtime": {
3127 + "version": "7.9.2",
3128 + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz",
3129 + "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==",
3130 + "dependencies": {
3131 + "regenerator-runtime": "^0.13.4"
3132 + }
3133 + },
3134 + "node_modules/@primer/components/node_modules/@testing-library/react": {
3135 + "version": "9.4.0",
3136 + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-9.4.0.tgz",
3137 + "integrity": "sha512-XdhDWkI4GktUPsz0AYyeQ8M9qS/JFie06kcSnUVcpgOwFjAu9vhwR83qBl+lw9yZWkbECjL8Hd+n5hH6C0oWqg==",
3138 + "dependencies": {
3139 + "@babel/runtime": "^7.7.6",
3140 + "@testing-library/dom": "^6.11.0",
3141 + "@types/testing-library__react": "^9.1.2"
3142 + },
3143 + "engines": {
3144 + "node": ">=8"
3145 + },
3146 + "peerDependencies": {
3147 + "react": "*",
3148 + "react-dom": "*"
3149 + }
3150 + },
3151 + "node_modules/@primer/components/node_modules/styled-system": {
3152 + "version": "5.1.2",
3153 + "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.2.tgz",
3154 + "integrity": "sha512-gbiohoqYYtvg9Q6nA3EagQSouHI9ylmcKUHHaUvCQrPpnPeJlUJAvj9vfyDgsJjw/oBogggfojF1X9EShfPffg==",
3155 + "dependencies": {
3156 + "@styled-system/background": "^5.1.2",
3157 + "@styled-system/border": "^5.1.2",
3158 + "@styled-system/color": "^5.1.2",
3159 + "@styled-system/core": "^5.1.2",
3160 + "@styled-system/flexbox": "^5.1.2",
3161 + "@styled-system/grid": "^5.1.2",
3162 + "@styled-system/layout": "^5.1.2",
3163 + "@styled-system/position": "^5.1.2",
3164 + "@styled-system/shadow": "^5.1.2",
3165 + "@styled-system/space": "^5.1.2",
3166 + "@styled-system/typography": "^5.1.2",
3167 + "@styled-system/variant": "^5.1.2",
3168 + "object-assign": "^4.1.1"
3169 + }
3170 + },
3171 + "node_modules/@primer/octicons-react": {
3172 + "version": "10.1.0",
3173 + "resolved": "https://registry.npmjs.org/@primer/octicons-react/-/octicons-react-10.1.0.tgz",
3174 + "integrity": "sha512-WjIaetTaf4x66xxaG/gxwsWRL2JYG33n8CfeR/L134YcX2zl9TPps9crLzI2f3rxjOdKZgVFBoUh94Cim4Fflw==",
3175 + "engines": {
3176 + "node": ">=8"
3177 + },
3178 + "peerDependencies": {
3179 + "react": ">=15"
3180 + }
3181 + },
3182 + "node_modules/@primer/primitives": {
3183 + "version": "3.0.0",
3184 + "resolved": "https://registry.npmjs.org/@primer/primitives/-/primitives-3.0.0.tgz",
3185 + "integrity": "sha512-ISXB43vcA+kg5pmGtGo3lPlHmY5Mg9nLhliePJu3Y5aP7g28TO+9cC99gL240pZHYsO0aVyU26WZwUXn6UIqJQ=="
3186 + },
3187 + "node_modules/@reach/component-component": {
3188 + "version": "0.3.0",
3189 + "resolved": "https://registry.npmjs.org/@reach/component-component/-/component-component-0.3.0.tgz",
3190 + "integrity": "sha512-E93eOotshNv8dnXtOA/f7fMqGUJFTakBG1zEqmBo6BeLJhgP9t9wQrnkiyoU4HL/ou5LYfou8G4P3wQXbDoFFg==",
3191 + "dependencies": {
3192 + "prop-types": "^15.7.2"
3193 + },
3194 + "peerDependencies": {
3195 + "react": "^16.4.0",
3196 + "react-dom": "^16.4.0"
3197 + }
3198 + },
3199 + "node_modules/@reach/dialog": {
3200 + "version": "0.3.0",
3201 + "resolved": "https://registry.npmjs.org/@reach/dialog/-/dialog-0.3.0.tgz",
3202 + "integrity": "sha512-m994HoNlpwJSPBkTi3IVTJpKQ+Gbc5yOa7RawSYPBuScpxeigFEYpE1CCIz/KhS6hVf4St+iymohWBCGjO34RQ==",
3203 + "dependencies": {
3204 + "@reach/component-component": "^0.3.0",
3205 + "@reach/portal": "^0.3.0",
3206 + "@reach/utils": "^0.3.0",
3207 + "prop-types": "^15.7.2",
3208 + "react-focus-lock": "^2.1.0",
3209 + "react-remove-scroll": "^2.0.4"
3210 + },
3211 + "peerDependencies": {
3212 + "react": "^16.8.0",
3213 + "react-dom": "^16.8.0"
3214 + }
3215 + },
3216 + "node_modules/@reach/portal": {
3217 + "version": "0.3.0",
3218 + "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.3.0.tgz",
3219 + "integrity": "sha512-et9AeykzUaCuGnkzViQRxe4FjQQp4PPm1nMZqizX4KnsVwvi66PpKCE7hC3Gsh2036lGl0xtqmuRW+dTVSjb2A==",
3220 + "dependencies": {
3221 + "@reach/component-component": "^0.3.0"
3222 + },
3223 + "peerDependencies": {
3224 + "react": "^16.8.0",
3225 + "react-dom": "^16.8.0"
3226 + }
3227 + },
3228 + "node_modules/@reach/router": {
3229 + "version": "1.3.4",
3230 + "resolved": "https://registry.npmjs.org/@reach/router/-/router-1.3.4.tgz",
3231 + "integrity": "sha512-+mtn9wjlB9NN2CNnnC/BRYtwdKBfSyyasPYraNAyvaV1occr/5NnB4CVzjEZipNHwYebQwcndGUmpFzxAUoqSA==",
3232 + "dependencies": {
3233 + "create-react-context": "0.3.0",
3234 + "invariant": "^2.2.3",
3235 + "prop-types": "^15.6.1",
3236 + "react-lifecycles-compat": "^3.0.4"
3237 + },
3238 + "peerDependencies": {
3239 + "react": "15.x || 16.x || 16.4.0-alpha.0911da3",
3240 + "react-dom": "15.x || 16.x || 16.4.0-alpha.0911da3"
3241 + }
3242 + },
3243 + "node_modules/@reach/utils": {
3244 + "version": "0.3.0",
3245 + "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.3.0.tgz",
3246 + "integrity": "sha512-dQA1acyNpwqy5ia5yt1lNjaAhm9rrzSurFtlJPoz7ARVPMV1yZ0yfmNotMwwgVbE5q1HnONqszK7oagH86m7Qw==",
3247 + "peerDependencies": {
3248 + "react": "^16.8.0",
3249 + "react-dom": "^16.8.0"
3250 + }
3251 + },
3252 + "node_modules/@sheerun/mutationobserver-shim": {
3253 + "version": "0.3.3",
3254 + "resolved": "https://registry.npmjs.org/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz",
3255 + "integrity": "sha512-DetpxZw1fzPD5xUBrIAoplLChO2VB8DlL5Gg+I1IR9b2wPqYIca2WSUxL5g1vLeR4MsQq1NeWriXAVffV+U1Fw=="
3256 + },
3257 + "node_modules/@sideway/address": {
3258 + "version": "4.1.1",
3259 + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.1.tgz",
3260 + "integrity": "sha512-+I5aaQr3m0OAmMr7RQ3fR9zx55sejEYR2BFJaxL+zT3VM2611X0SHvPWIbAUBZVTn/YzYKbV8gJ2oT/QELknfQ==",
3261 + "dependencies": {
3262 + "@hapi/hoek": "^9.0.0"
3263 + }
3264 + },
3265 + "node_modules/@sideway/address/node_modules/@hapi/hoek": {
3266 + "version": "9.1.1",
3267 + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.1.1.tgz",
3268 + "integrity": "sha512-CAEbWH7OIur6jEOzaai83jq3FmKmv4PmX1JYfs9IrYcGEVI/lyL1EXJGCj7eFVJ0bg5QR8LMxBlEtA+xKiLpFw=="
3269 + },
3270 + "node_modules/@sideway/formula": {
3271 + "version": "3.0.0",
3272 + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz",
3273 + "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg=="
3274 + },
3275 + "node_modules/@sideway/pinpoint": {
3276 + "version": "2.0.0",
3277 + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz",
3278 + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ=="
3279 + },
3280 + "node_modules/@sindresorhus/is": {
3281 + "version": "0.7.0",
3282 + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz",
3283 + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==",
3284 + "engines": {
3285 + "node": ">=4"
3286 + }
3287 + },
3288 + "node_modules/@sindresorhus/slugify": {
3289 + "version": "1.1.0",
3290 + "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-1.1.0.tgz",
3291 + "integrity": "sha512-ujZRbmmizX26yS/HnB3P9QNlNa4+UvHh+rIse3RbOXLp8yl6n1TxB4t7NHggtVgS8QmmOtzXo48kCxZGACpkPw==",
3292 + "dependencies": {
3293 + "@sindresorhus/transliterate": "^0.1.1",
3294 + "escape-string-regexp": "^4.0.0"
3295 + },
3296 + "engines": {
3297 + "node": ">=10"
3298 + },
3299 + "funding": {
3300 + "url": "https://github.com/sponsors/sindresorhus"
3301 + }
3302 + },
3303 + "node_modules/@sindresorhus/transliterate": {
3304 + "version": "0.1.1",
3305 + "resolved": "https://registry.npmjs.org/@sindresorhus/transliterate/-/transliterate-0.1.1.tgz",
3306 + "integrity": "sha512-QSdIQ5keUFAZ3KLbfbsntW39ox0Ym8183RqTwBq/ZEFoN3NQAtGV+qWaNdzKpIDHgj9J2CQ2iNDRVU11Zyr7MQ==",
3307 + "dependencies": {
3308 + "escape-string-regexp": "^2.0.0",
3309 + "lodash.deburr": "^4.1.0"
3310 + },
3311 + "engines": {
3312 + "node": ">=10"
3313 + },
3314 + "funding": {
3315 + "url": "https://github.com/sponsors/sindresorhus"
3316 + }
3317 + },
3318 + "node_modules/@sindresorhus/transliterate/node_modules/escape-string-regexp": {
3319 + "version": "2.0.0",
3320 + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
3321 + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
3322 + "engines": {
3323 + "node": ">=8"
3324 + }
3325 + },
3326 + "node_modules/@styled-system/background": {
3327 + "version": "5.1.2",
3328 + "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz",
3329 + "integrity": "sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==",
3330 + "dependencies": {
3331 + "@styled-system/core": "^5.1.2"
3332 + }
3333 + },
3334 + "node_modules/@styled-system/border": {
3335 + "version": "5.1.5",
3336 + "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.5.tgz",
3337 + "integrity": "sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==",
3338 + "dependencies": {
3339 + "@styled-system/core": "^5.1.2"
3340 + }
3341 + },
3342 + "node_modules/@styled-system/color": {
3343 + "version": "5.1.2",
3344 + "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.2.tgz",
3345 + "integrity": "sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==",
3346 + "dependencies": {
3347 + "@styled-system/core": "^5.1.2"
3348 + }
3349 + },
3350 + "node_modules/@styled-system/core": {
3351 + "version": "5.1.2",
3352 + "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.2.tgz",
3353 + "integrity": "sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==",
3354 + "dependencies": {
3355 + "object-assign": "^4.1.1"
3356 + }
3357 + },
3358 + "node_modules/@styled-system/css": {
3359 + "version": "5.1.5",
3360 + "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.1.5.tgz",
3361 + "integrity": "sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A=="
3362 + },
3363 + "node_modules/@styled-system/flexbox": {
3364 + "version": "5.1.2",
3365 + "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.2.tgz",
3366 + "integrity": "sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==",
3367 + "dependencies": {
3368 + "@styled-system/core": "^5.1.2"
3369 + }
3370 + },
3371 + "node_modules/@styled-system/grid": {
3372 + "version": "5.1.2",
3373 + "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.2.tgz",
3374 + "integrity": "sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==",
3375 + "dependencies": {
3376 + "@styled-system/core": "^5.1.2"
3377 + }
3378 + },
3379 + "node_modules/@styled-system/layout": {
3380 + "version": "5.1.2",
3381 + "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.2.tgz",
3382 + "integrity": "sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==",
3383 + "dependencies": {
3384 + "@styled-system/core": "^5.1.2"
3385 + }
3386 + },
3387 + "node_modules/@styled-system/position": {
3388 + "version": "5.1.2",
3389 + "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.2.tgz",
3390 + "integrity": "sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==",
3391 + "dependencies": {
3392 + "@styled-system/core": "^5.1.2"
3393 + }
3394 + },
3395 + "node_modules/@styled-system/prop-types": {
3396 + "version": "5.1.2",
3397 + "resolved": "https://registry.npmjs.org/@styled-system/prop-types/-/prop-types-5.1.2.tgz",
3398 + "integrity": "sha512-q2hnuZrOjZdCRYvSoMF5VIDRfpqPHDSgqajoMH0iy7BszPAkZZcIC7L4PzJTIcGSBrB9OJTBitWo9s7N60tgtA==",
3399 + "dependencies": {
3400 + "prop-types": "^15.7.2"
3401 + },
3402 + "peerDependencies": {
3403 + "styled-system": "^5.0.0-8"
3404 + }
3405 + },
3406 + "node_modules/@styled-system/props": {
3407 + "version": "5.1.4",
3408 + "resolved": "https://registry.npmjs.org/@styled-system/props/-/props-5.1.4.tgz",
3409 + "integrity": "sha512-ysQJ6YFhWbnbMaG11RSqXPbOePUl6vEPkcSz1WiySSu4vvh7OQl5UPdkSnYS1E35kSkomSpO5drbFtWRrA+o7Q==",
3410 + "dependencies": {
3411 + "styled-system": "^5.1.4"
3412 + }
3413 + },
3414 + "node_modules/@styled-system/shadow": {
3415 + "version": "5.1.2",
3416 + "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.2.tgz",
3417 + "integrity": "sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==",
3418 + "dependencies": {
3419 + "@styled-system/core": "^5.1.2"
3420 + }
3421 + },
3422 + "node_modules/@styled-system/space": {
3423 + "version": "5.1.2",
3424 + "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.2.tgz",
3425 + "integrity": "sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==",
3426 + "dependencies": {
3427 + "@styled-system/core": "^5.1.2"
3428 + }
3429 + },
3430 + "node_modules/@styled-system/theme-get": {
3431 + "version": "5.1.2",
3432 + "resolved": "https://registry.npmjs.org/@styled-system/theme-get/-/theme-get-5.1.2.tgz",
3433 + "integrity": "sha512-afAYdRqrKfNIbVgmn/2Qet1HabxmpRnzhFwttbGr6F/mJ4RDS/Cmn+KHwHvNXangQsWw/5TfjpWV+rgcqqIcJQ==",
3434 + "dependencies": {
3435 + "@styled-system/core": "^5.1.2"
3436 + }
3437 + },
3438 + "node_modules/@styled-system/typography": {
3439 + "version": "5.1.2",
3440 + "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.2.tgz",
3441 + "integrity": "sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==",
3442 + "dependencies": {
3443 + "@styled-system/core": "^5.1.2"
3444 + }
3445 + },
3446 + "node_modules/@styled-system/variant": {
3447 + "version": "5.1.5",
3448 + "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.5.tgz",
3449 + "integrity": "sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==",
3450 + "dependencies": {
3451 + "@styled-system/core": "^5.1.2",
3452 + "@styled-system/css": "^5.1.5"
3453 + }
3454 + },
3455 + "node_modules/@szmarczak/http-timer": {
3456 + "version": "1.1.2",
3457 + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
3458 + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
3459 + "dependencies": {
3460 + "defer-to-connect": "^1.0.1"
3461 + },
3462 + "engines": {
3463 + "node": ">=6"
3464 + }
3465 + },
3466 + "node_modules/@testing-library/dom": {
3467 + "version": "6.16.0",
3468 + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-6.16.0.tgz",
3469 + "integrity": "sha512-lBD88ssxqEfz0wFL6MeUyyWZfV/2cjEZZV3YRpb2IoJRej/4f1jB0TzqIOznTpfR1r34CNesrubxwIlAQ8zgPA==",
3470 + "dependencies": {
3471 + "@babel/runtime": "^7.8.4",
3472 + "@sheerun/mutationobserver-shim": "^0.3.2",
3473 + "@types/testing-library__dom": "^6.12.1",
3474 + "aria-query": "^4.0.2",
3475 + "dom-accessibility-api": "^0.3.0",
3476 + "pretty-format": "^25.1.0",
3477 + "wait-for-expect": "^3.0.2"
3478 + },
3479 + "engines": {
3480 + "node": ">=8"
3481 + }
3482 + },
3483 + "node_modules/@testing-library/dom/node_modules/@jest/types": {
3484 + "version": "25.5.0",
3485 + "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.5.0.tgz",
3486 + "integrity": "sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw==",
3487 + "dependencies": {
3488 + "@types/istanbul-lib-coverage": "^2.0.0",
3489 + "@types/istanbul-reports": "^1.1.1",
3490 + "@types/yargs": "^15.0.0",
3491 + "chalk": "^3.0.0"
3492 + },
3493 + "engines": {
3494 + "node": ">= 8.3"
3495 + }
3496 + },
3497 + "node_modules/@testing-library/dom/node_modules/@types/yargs": {
3498 + "version": "15.0.13",
3499 + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz",
3500 + "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==",
3501 + "dependencies": {
3502 + "@types/yargs-parser": "*"
3503 + }
3504 + },
3505 + "node_modules/@testing-library/dom/node_modules/ansi-regex": {
3506 + "version": "5.0.0",
3507 + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
3508 + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
3509 + "engines": {
3510 + "node": ">=8"
3511 + }
3512 + },
3513 + "node_modules/@testing-library/dom/node_modules/chalk": {
3514 + "version": "3.0.0",
3515 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
3516 + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
3517 + "dependencies": {
3518 + "ansi-styles": "^4.1.0",
3519 + "supports-color": "^7.1.0"
3520 + },
3521 + "engines": {
3522 + "node": ">=8"
3523 + }
3524 + },
3525 + "node_modules/@testing-library/dom/node_modules/pretty-format": {
3526 + "version": "25.5.0",
3527 + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.5.0.tgz",
3528 + "integrity": "sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ==",
3529 + "dependencies": {
3530 + "@jest/types": "^25.5.0",
3531 + "ansi-regex": "^5.0.0",
3532 + "ansi-styles": "^4.0.0",
3533 + "react-is": "^16.12.0"
3534 + },
3535 + "engines": {
3536 + "node": ">= 8.3"
3537 + }
3538 + },
3539 + "node_modules/@testing-library/dom/node_modules/react-is": {
3540 + "version": "16.13.1",
3541 + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
3542 + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
3543 + },
3544 + "node_modules/@testing-library/jest-dom": {
3545 + "version": "4.2.4",
3546 + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-4.2.4.tgz",
3547 + "integrity": "sha512-j31Bn0rQo12fhCWOUWy9fl7wtqkp7In/YP2p5ZFyRuiiB9Qs3g+hS4gAmDWONbAHcRmVooNJ5eOHQDCOmUFXHg==",
3548 + "dependencies": {
3549 + "@babel/runtime": "^7.5.1",
3550 + "chalk": "^2.4.1",
3551 + "css": "^2.2.3",
3552 + "css.escape": "^1.5.1",
3553 + "jest-diff": "^24.0.0",
3554 + "jest-matcher-utils": "^24.0.0",
3555 + "lodash": "^4.17.11",
3556 + "pretty-format": "^24.0.0",
3557 + "redent": "^3.0.0"
3558 + },
3559 + "engines": {
3560 + "node": ">=8",
3561 + "npm": ">=6"
3562 + }
3563 + },
3564 + "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": {
3565 + "version": "3.2.1",
3566 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
3567 + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
3568 + "dependencies": {
3569 + "color-convert": "^1.9.0"
3570 + },
3571 + "engines": {
3572 + "node": ">=4"
3573 + }
3574 + },
3575 + "node_modules/@testing-library/jest-dom/node_modules/chalk": {
3576 + "version": "2.4.2",
3577 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
3578 + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
3579 + "dependencies": {
3580 + "ansi-styles": "^3.2.1",
3581 + "escape-string-regexp": "^1.0.5",
3582 + "supports-color": "^5.3.0"
3583 + },
3584 + "engines": {
3585 + "node": ">=4"
3586 + }
3587 + },
3588 + "node_modules/@testing-library/jest-dom/node_modules/color-convert": {
3589 + "version": "1.9.3",
3590 + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
3591 + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
3592 + "dependencies": {
3593 + "color-name": "1.1.3"
3594 + }
3595 + },
3596 + "node_modules/@testing-library/jest-dom/node_modules/color-name": {
3597 + "version": "1.1.3",
3598 + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
3599 + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
3600 + },
3601 + "node_modules/@testing-library/jest-dom/node_modules/diff-sequences": {
3602 + "version": "24.9.0",
3603 + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz",
3604 + "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==",
3605 + "engines": {
3606 + "node": ">= 6"
3607 + }
3608 + },
3609 + "node_modules/@testing-library/jest-dom/node_modules/escape-string-regexp": {
3610 + "version": "1.0.5",
3611 + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
3612 + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
3613 + "engines": {
3614 + "node": ">=0.8.0"
3615 + }
3616 + },
3617 + "node_modules/@testing-library/jest-dom/node_modules/has-flag": {
3618 + "version": "3.0.0",
3619 + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
3620 + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
3621 + "engines": {
3622 + "node": ">=4"
3623 + }
3624 + },
3625 + "node_modules/@testing-library/jest-dom/node_modules/jest-diff": {
3626 + "version": "24.9.0",
3627 + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz",
3628 + "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==",
3629 + "dependencies": {
3630 + "chalk": "^2.0.1",
3631 + "diff-sequences": "^24.9.0",
3632 + "jest-get-type": "^24.9.0",
3633 + "pretty-format": "^24.9.0"
3634 + },
3635 + "engines": {
3636 + "node": ">= 6"
3637 + }
3638 + },
3639 + "node_modules/@testing-library/jest-dom/node_modules/supports-color": {
3640 + "version": "5.5.0",
3641 + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
3642 + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
3643 + "dependencies": {
3644 + "has-flag": "^3.0.0"
3645 + },
3646 + "engines": {
3647 + "node": ">=4"
3648 + }
3649 + },
3650 + "node_modules/@testing-library/react": {
3651 + "version": "9.5.0",
3652 + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-9.5.0.tgz",
3653 + "integrity": "sha512-di1b+D0p+rfeboHO5W7gTVeZDIK5+maEgstrZbWZSSvxDyfDRkkyBE1AJR5Psd6doNldluXlCWqXriUfqu/9Qg==",
3654 + "dependencies": {
3655 + "@babel/runtime": "^7.8.4",
3656 + "@testing-library/dom": "^6.15.0",
3657 + "@types/testing-library__react": "^9.1.2"
3658 + },
3659 + "engines": {
3660 + "node": ">=8"
3661 + },
3662 + "peerDependencies": {
3663 + "react": "*",
3664 + "react-dom": "*"
3665 + }
3666 + },
3667 + "node_modules/@tokenizer/token": {
3668 + "version": "0.1.1",
3669 + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz",
3670 + "integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w=="
3671 + },
3672 + "node_modules/@turist/fetch": {
3673 + "version": "7.1.7",
3674 + "resolved": "https://registry.npmjs.org/@turist/fetch/-/fetch-7.1.7.tgz",
3675 + "integrity": "sha512-XP20kvfyMNlWdPVQXyuzA40LoCHbbJptikt7W+TlZ5sS+NNjk70xjXCtHBLEudp7li3JldXEFSIUzpW1a0WEhA==",
3676 + "dependencies": {
3677 + "@types/node-fetch": "2"
3678 + },
3679 + "peerDependencies": {
3680 + "node-fetch": "2"
3681 + }
3682 + },
3683 + "node_modules/@turist/time": {
3684 + "version": "0.0.1",
3685 + "resolved": "https://registry.npmjs.org/@turist/time/-/time-0.0.1.tgz",
3686 + "integrity": "sha512-M2BiThcbxMxSKX8W4z5u9jKZn6datnM3+FpEU+eYw0//l31E2xhqi7vTAuJ/Sf0P3yhp66SDJgPu3bRRpvrdQQ=="
3687 + },
3688 + "node_modules/@types/babel__core": {
3689 + "version": "7.1.12",
3690 + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz",
3691 + "integrity": "sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ==",
3692 + "dependencies": {
3693 + "@babel/parser": "^7.1.0",
3694 + "@babel/types": "^7.0.0",
3695 + "@types/babel__generator": "*",
3696 + "@types/babel__template": "*",
3697 + "@types/babel__traverse": "*"
3698 + }
3699 + },
3700 + "node_modules/@types/babel__generator": {
3701 + "version": "7.6.2",
3702 + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz",
3703 + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==",
3704 + "dependencies": {
3705 + "@babel/types": "^7.0.0"
3706 + }
3707 + },
3708 + "node_modules/@types/babel__template": {
3709 + "version": "7.4.0",
3710 + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz",
3711 + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==",
3712 + "dependencies": {
3713 + "@babel/parser": "^7.1.0",
3714 + "@babel/types": "^7.0.0"
3715 + }
3716 + },
3717 + "node_modules/@types/babel__traverse": {
3718 + "version": "7.11.0",
3719 + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.0.tgz",
3720 + "integrity": "sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==",
3721 + "dependencies": {
3722 + "@babel/types": "^7.3.0"
3723 + }
3724 + },
3725 + "node_modules/@types/common-tags": {
3726 + "version": "1.8.0",
3727 + "resolved": "https://registry.npmjs.org/@types/common-tags/-/common-tags-1.8.0.tgz",
3728 + "integrity": "sha512-htRqZr5qn8EzMelhX/Xmx142z218lLyGaeZ3YR8jlze4TATRU9huKKvuBmAJEW4LCC4pnY1N6JAm6p85fMHjhg=="
3729 + },
3730 + "node_modules/@types/component-emitter": {
3731 + "version": "1.2.10",
3732 + "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.10.tgz",
3733 + "integrity": "sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg=="
3734 + },
3735 + "node_modules/@types/configstore": {
3736 + "version": "2.1.1",
3737 + "resolved": "https://registry.npmjs.org/@types/configstore/-/configstore-2.1.1.tgz",
3738 + "integrity": "sha1-zR6FU2M60xhcPy8jns/10mQ+krY="
3739 + },
3740 + "node_modules/@types/cookie": {
3741 + "version": "0.4.0",
3742 + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.0.tgz",
3743 + "integrity": "sha512-y7mImlc/rNkvCRmg8gC3/lj87S7pTUIJ6QGjwHR9WQJcFs+ZMTOaoPrkdFA/YdbuqVEmEbb5RdhVxMkAcgOnpg=="
3744 + },
3745 + "node_modules/@types/cors": {
3746 + "version": "2.8.10",
3747 + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.10.tgz",
3748 + "integrity": "sha512-C7srjHiVG3Ey1nR6d511dtDkCEjxuN9W1HWAEjGq8kpcwmNM6JJkpC0xvabM7BXTG2wDq8Eu33iH9aQKa7IvLQ=="
3749 + },
3750 + "node_modules/@types/debug": {
3751 + "version": "0.0.30",
3752 + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-0.0.30.tgz",
3753 + "integrity": "sha512-orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ=="
3754 + },
3755 + "node_modules/@types/domhandler": {
3756 + "version": "2.4.1",
3757 + "resolved": "https://registry.npmjs.org/@types/domhandler/-/domhandler-2.4.1.tgz",
3758 + "integrity": "sha512-cfBw6q6tT5sa1gSPFSRKzF/xxYrrmeiut7E0TxNBObiLSBTuFEHibcfEe3waQPEDbqBsq+ql/TOniw65EyDFMA=="
3759 + },
3760 + "node_modules/@types/eslint-visitor-keys": {
3761 + "version": "1.0.0",
3762 + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
3763 + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag=="
3764 + },
3765 + "node_modules/@types/events": {
3766 + "version": "3.0.0",
3767 + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
3768 + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g=="
3769 + },
3770 + "node_modules/@types/get-port": {
3771 + "version": "3.2.0",
3772 + "resolved": "https://registry.npmjs.org/@types/get-port/-/get-port-3.2.0.tgz",
3773 + "integrity": "sha512-TiNg8R1kjDde5Pub9F9vCwZA/BNW9HeXP5b9j7Qucqncy/McfPZ6xze/EyBdXS5FhMIGN6Fx3vg75l5KHy3V1Q=="
3774 + },
3775 + "node_modules/@types/glob": {
3776 + "version": "5.0.36",
3777 + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.36.tgz",
3778 + "integrity": "sha512-KEzSKuP2+3oOjYYjujue6Z3Yqis5HKA1BsIC+jZ1v3lrRNdsqyNNtX0rQf6LSuI4DJJ2z5UV//zBZCcvM0xikg==",
3779 + "dependencies": {
3780 + "@types/events": "*",
3781 + "@types/minimatch": "*",
3782 + "@types/node": "*"
3783 + }
3784 + },
3785 + "node_modules/@types/hast": {
3786 + "version": "2.3.1",
3787 + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.1.tgz",
3788 + "integrity": "sha512-viwwrB+6xGzw+G1eWpF9geV3fnsDgXqHG+cqgiHrvQfDUW5hzhCyV7Sy3UJxhfRFBsgky2SSW33qi/YrIkjX5Q==",
3789 + "dependencies": {
3790 + "@types/unist": "*"
3791 + }
3792 + },
3793 + "node_modules/@types/hoist-non-react-statics": {
3794 + "version": "3.3.1",
3795 + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
3796 + "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
3797 + "dependencies": {
3798 + "@types/react": "*",
3799 + "hoist-non-react-statics": "^3.3.0"
3800 + }
3801 + },
3802 + "node_modules/@types/http-proxy": {
3803 + "version": "1.17.5",
3804 + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.5.tgz",
3805 + "integrity": "sha512-GNkDE7bTv6Sf8JbV2GksknKOsk7OznNYHSdrtvPJXO0qJ9odZig6IZKUi5RFGi6d1bf6dgIAe4uXi3DBc7069Q==",
3806 + "dependencies": {
3807 + "@types/node": "*"
3808 + }
3809 + },
3810 + "node_modules/@types/istanbul-lib-coverage": {
3811 + "version": "2.0.3",
3812 + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
3813 + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw=="
3814 + },
3815 + "node_modules/@types/istanbul-lib-report": {
3816 + "version": "3.0.0",
3817 + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
3818 + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==",
3819 + "dependencies": {
3820 + "@types/istanbul-lib-coverage": "*"
3821 + }
3822 + },
3823 + "node_modules/@types/istanbul-reports": {
3824 + "version": "1.1.2",
3825 + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz",
3826 + "integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==",
3827 + "dependencies": {
3828 + "@types/istanbul-lib-coverage": "*",
3829 + "@types/istanbul-lib-report": "*"
3830 + }
3831 + },
3832 + "node_modules/@types/json-schema": {
3833 + "version": "7.0.7",
3834 + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
3835 + "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA=="
3836 + },
3837 + "node_modules/@types/json5": {
3838 + "version": "0.0.29",
3839 + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
3840 + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4="
3841 + },
3842 + "node_modules/@types/lodash": {
3843 + "version": "4.14.168",
3844 + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz",
3845 + "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q=="
3846 + },
3847 + "node_modules/@types/mdast": {
3848 + "version": "3.0.3",
3849 + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz",
3850 + "integrity": "sha512-SXPBMnFVQg1s00dlMCc/jCdvPqdE4mXaMMCeRlxLDmTAEoegHT53xKtkDnzDTOcmMHUfcjyf36/YYZ6SxRdnsw==",
3851 + "dependencies": {
3852 + "@types/unist": "*"
3853 + }
3854 + },
3855 + "node_modules/@types/minimatch": {
3856 + "version": "3.0.3",
3857 + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
3858 + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
3859 + },
3860 + "node_modules/@types/minimist": {
3861 + "version": "1.2.1",
3862 + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz",
3863 + "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg=="
3864 + },
3865 + "node_modules/@types/mkdirp": {
3866 + "version": "0.5.2",
3867 + "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.5.2.tgz",
3868 + "integrity": "sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==",
3869 + "dependencies": {
3870 + "@types/node": "*"
3871 + }
3872 + },
3873 + "node_modules/@types/node": {
3874 + "version": "14.14.31",
3875 + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz",
3876 + "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g=="
3877 + },
3878 + "node_modules/@types/node-fetch": {
3879 + "version": "2.5.8",
3880 + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.8.tgz",
3881 + "integrity": "sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw==",
3882 + "dependencies": {
3883 + "@types/node": "*",
3884 + "form-data": "^3.0.0"
3885 + }
3886 + },
3887 + "node_modules/@types/normalize-package-data": {
3888 + "version": "2.4.0",
3889 + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
3890 + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA=="
3891 + },
3892 + "node_modules/@types/parse-json": {
3893 + "version": "4.0.0",
3894 + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
3895 + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="
3896 + },
3897 + "node_modules/@types/parse5": {
3898 + "version": "5.0.3",
3899 + "resolved": "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz",
3900 + "integrity": "sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw=="
3901 + },
3902 + "node_modules/@types/prop-types": {
3903 + "version": "15.7.3",
3904 + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",
3905 + "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="
3906 + },
3907 + "node_modules/@types/q": {
3908 + "version": "1.5.4",
3909 + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz",
3910 + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug=="
3911 + },
3912 + "node_modules/@types/reach__router": {
3913 + "version": "1.3.7",
3914 + "resolved": "https://registry.npmjs.org/@types/reach__router/-/reach__router-1.3.7.tgz",
3915 + "integrity": "sha512-cyBEb8Ef3SJNH5NYEIDGPoMMmYUxROatuxbICusVRQIqZUB85UCt6R2Ok60tKS/TABJsJYaHyNTW3kqbpxlMjg==",
3916 + "dependencies": {
3917 + "@types/react": "*"
3918 + }
3919 + },
3920 + "node_modules/@types/react": {
3921 + "version": "17.0.2",
3922 + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz",
3923 + "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==",
3924 + "dependencies": {
3925 + "@types/prop-types": "*",
3926 + "csstype": "^3.0.2"
3927 + }
3928 + },
3929 + "node_modules/@types/react-dom": {
3930 + "version": "17.0.1",
3931 + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.1.tgz",
3932 + "integrity": "sha512-yIVyopxQb8IDZ7SOHeTovurFq+fXiPICa+GV3gp0Xedsl+MwQlMLKmvrnEjFbQxjliH5YVAEWFh975eVNmKj7Q==",
3933 + "dependencies": {
3934 + "@types/react": "*"
3935 + }
3936 + },
3937 + "node_modules/@types/react-native": {
3938 + "version": "0.63.50",
3939 + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.63.50.tgz",
3940 + "integrity": "sha512-jWxsHDG/AHEaOrqqcI0Cth0WdPsgyaJ1nel5pS0uCzpt2RjwtkvEUAfu39paPr4i+9oUUgbJq3vkVXaj7n8RdQ==",
3941 + "dependencies": {
3942 + "@types/react": "*"
3943 + }
3944 + },
3945 + "node_modules/@types/readable-stream": {
3946 + "version": "2.3.9",
3947 + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.9.tgz",
3948 + "integrity": "sha512-sqsgQqFT7HmQz/V5jH1O0fvQQnXAJO46Gg9LRO/JPfjmVmGUlcx831TZZO3Y3HtWhIkzf3kTsNT0Z0kzIhIvZw==",
3949 + "dependencies": {
3950 + "@types/node": "*",
3951 + "safe-buffer": "*"
3952 + }
3953 + },
3954 + "node_modules/@types/rimraf": {
3955 + "version": "2.0.4",
3956 + "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.4.tgz",
3957 + "integrity": "sha512-8gBudvllD2A/c0CcEX/BivIDorHFt5UI5m46TsNj8DjWCCTTZT74kEe4g+QsY7P/B9WdO98d82zZgXO/RQzu2Q==",
3958 + "dependencies": {
3959 + "@types/glob": "*",
3960 + "@types/node": "*"
3961 + }
3962 + },
3963 + "node_modules/@types/stack-utils": {
3964 + "version": "1.0.1",
3965 + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
3966 + "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw=="
3967 + },
3968 + "node_modules/@types/styled-components": {
3969 + "version": "4.4.3",
3970 + "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-4.4.3.tgz",
3971 + "integrity": "sha512-U0udeNOZBfUkJycmGJwmzun0FBt11rZy08weVQmE2xfUNAbX8AGOEWxWna2d+qAUKxKgMlcG+TZT0+K2FfDcnQ==",
3972 + "dependencies": {
3973 + "@types/hoist-non-react-statics": "*",
3974 + "@types/react": "*",
3975 + "@types/react-native": "*",
3976 + "csstype": "^2.2.0"
3977 + }
3978 + },
3979 + "node_modules/@types/styled-components/node_modules/csstype": {
3980 + "version": "2.6.15",
3981 + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.15.tgz",
3982 + "integrity": "sha512-FNeiVKudquehtR3t9TRRnsHL+lJhuHF5Zn9dt01jpojlurLEPDhhEtUkWmAUJ7/fOLaLG4dCDEnUsR0N1rZSsg=="
3983 + },
3984 + "node_modules/@types/styled-system": {
3985 + "version": "5.1.2",
3986 + "resolved": "https://registry.npmjs.org/@types/styled-system/-/styled-system-5.1.2.tgz",
3987 + "integrity": "sha512-Byh33qthYnI6+qS0TRr4vqd+N/ax6ic1NFE6ZA16xuVr/EvYvSB8+diEP1lTSE7sP/MTdQpl+KaONREnyalDUA==",
3988 + "dependencies": {
3989 + "csstype": "^2.6.4"
3990 + }
3991 + },
3992 + "node_modules/@types/styled-system/node_modules/csstype": {
3993 + "version": "2.6.15",
3994 + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.15.tgz",
3995 + "integrity": "sha512-FNeiVKudquehtR3t9TRRnsHL+lJhuHF5Zn9dt01jpojlurLEPDhhEtUkWmAUJ7/fOLaLG4dCDEnUsR0N1rZSsg=="
3996 + },
3997 + "node_modules/@types/testing-library__dom": {
3998 + "version": "6.14.0",
3999 + "resolved": "https://registry.npmjs.org/@types/testing-library__dom/-/testing-library__dom-6.14.0.tgz",
4000 + "integrity": "sha512-sMl7OSv0AvMOqn1UJ6j1unPMIHRXen0Ita1ujnMX912rrOcawe4f7wu0Zt9GIQhBhJvH2BaibqFgQ3lP+Pj2hA==",
4001 + "dependencies": {
4002 + "pretty-format": "^24.3.0"
4003 + }
4004 + },
4005 + "node_modules/@types/testing-library__react": {
4006 + "version": "9.1.3",
4007 + "resolved": "https://registry.npmjs.org/@types/testing-library__react/-/testing-library__react-9.1.3.tgz",
4008 + "integrity": "sha512-iCdNPKU3IsYwRK9JieSYAiX0+aYDXOGAmrC/3/M7AqqSDKnWWVv07X+Zk1uFSL7cMTUYzv4lQRfohucEocn5/w==",
4009 + "dependencies": {
4010 + "@types/react-dom": "*",
4011 + "@types/testing-library__dom": "*",
4012 + "pretty-format": "^25.1.0"
4013 + }
4014 + },
4015 + "node_modules/@types/testing-library__react/node_modules/@jest/types": {
4016 + "version": "25.5.0",
4017 + "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.5.0.tgz",
4018 + "integrity": "sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw==",
4019 + "dependencies": {
4020 + "@types/istanbul-lib-coverage": "^2.0.0",
4021 + "@types/istanbul-reports": "^1.1.1",
4022 + "@types/yargs": "^15.0.0",
4023 + "chalk": "^3.0.0"
4024 + },
4025 + "engines": {
4026 + "node": ">= 8.3"
4027 + }
4028 + },
4029 + "node_modules/@types/testing-library__react/node_modules/@types/yargs": {
4030 + "version": "15.0.13",
4031 + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz",
4032 + "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==",
4033 + "dependencies": {
4034 + "@types/yargs-parser": "*"
4035 + }
4036 + },
4037 + "node_modules/@types/testing-library__react/node_modules/ansi-regex": {
4038 + "version": "5.0.0",
4039 + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
4040 + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
4041 + "engines": {
4042 + "node": ">=8"
4043 + }
4044 + },
4045 + "node_modules/@types/testing-library__react/node_modules/chalk": {
4046 + "version": "3.0.0",
4047 + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
4048 + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
4049 + "dependencies": {
4050 + "ansi-styles": "^4.1.0",
4051 + "supports-color": "^7.1.0"
4052 + },
4053 + "engines": {
4054 + "node": ">=8"
4055 + }
4056 + },
4057 + "node_modules/@types/testing-library__react/node_modules/pretty-format": {
4058 + "version": "25.5.0",
4059 + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.5.0.tgz",
4060 + "integrity": "sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ==",
4061 + "dependencies": {
4062 + "@jest/types": "^25.5.0",
4063 + "ansi-regex": "^5.0.0",
4064 + "ansi-styles": "^4.0.0",
4065 + "react-is": "^16.12.0"
4066 + },
4067 + "engines": {
4068 + "node": ">= 8.3"
4069 + }
4070 + },
4071 + "node_modules/@types/testing-library__react/node_modules/react-is": {
4072 + "version": "16.13.1",
4073 + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
4074 + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
4075 + },
4076 + "node_modules/@types/tmp": {
4077 + "version": "0.0.33",
4078 + "resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.0.33.tgz",
4079 + "integrity": "sha1-EHPEvIJHVK49EM+riKsCN7qWTk0="
4080 + },
4081 + "node_modules/@types/unist": {
4082 + "version": "2.0.3",
4083 + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",
4084 + "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ=="
4085 + },
4086 + "node_modules/@types/vfile": {
4087 + "version": "3.0.2",
4088 + "resolved": "https://registry.npmjs.org/@types/vfile/-/vfile-3.0.2.tgz",
4089 + "integrity": "sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw==",
4090 + "dependencies": {
4091 + "@types/node": "*",
4092 + "@types/unist": "*",
4093 + "@types/vfile-message": "*"
4094 + }
4095 + },
4096 + "node_modules/@types/vfile-message": {
4097 + "version": "2.0.0",
4098 + "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-2.0.0.tgz",
4099 + "integrity": "sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==",
4100 + "deprecated": "This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.",
4101 + "dependencies": {
4102 + "vfile-message": "*"
4103 + }
4104 + },
4105 + "node_modules/@types/websocket": {
4106 + "version": "1.0.1",
4107 + "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.1.tgz",
4108 + "integrity": "sha512-f5WLMpezwVxCLm1xQe/kdPpQIOmL0TXYx2O15VYfYzc7hTIdxiOoOvez+McSIw3b7z/1zGovew9YSL7+h4h7/Q==",
4109 + "dependencies": {
4110 + "@types/node": "*"
4111 + }
4112 + },
4113 + "node_modules/@types/yargs": {
4114 + "version": "13.0.11",
4115 + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz",
4116 + "integrity": "sha512-NRqD6T4gktUrDi1o1wLH3EKC1o2caCr7/wR87ODcbVITQF106OM3sFN92ysZ++wqelOd1CTzatnOBRDYYG6wGQ==",
4117 + "dependencies": {
4118 + "@types/yargs-parser": "*"
4119 + }
4120 + },
4121 + "node_modules/@types/yargs-parser": {
4122 + "version": "20.2.0",
4123 + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz",
4124 + "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA=="
4125 + },
4126 + "node_modules/@types/yoga-layout": {
4127 + "version": "1.9.2",
4128 + "resolved": "https://registry.npmjs.org/@types/yoga-layout/-/yoga-layout-1.9.2.tgz",
4129 + "integrity": "sha512-S9q47ByT2pPvD65IvrWp7qppVMpk9WGMbVq9wbWZOHg6tnXSD4vyhao6nOSBwwfDdV2p3Kx9evA9vI+XWTfDvw=="
4130 + },
4131 + "node_modules/@typescript-eslint/eslint-plugin": {
4132 + "version": "2.34.0",
4133 + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz",
4134 + "integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==",
4135 + "dependencies": {
4136 + "@typescript-eslint/experimental-utils": "2.34.0",
4137 + "functional-red-black-tree": "^1.0.1",
4138 + "regexpp": "^3.0.0",
4139 + "tsutils": "^3.17.1"
4140 + },
4141 + "engines": {
4142 + "node": "^8.10.0 || ^10.13.0 || >=11.10.1"
4143 + },
4144 + "funding": {
4145 + "type": "opencollective",
4146 + "url": "https://opencollective.com/typescript-eslint"
4147 + },
4148 + "peerDependencies": {
4149 + "@typescript-eslint/parser": "^2.0.0",
4150 + "eslint": "^5.0.0 || ^6.0.0"
4151 + },
4152 + "peerDependenciesMeta": {
4153 + "typescript": {
4154 + "optional": true
4155 + }
4156 + }
4157 + },
4158 + "node_modules/@typescript-eslint/experimental-utils": {
4159 + "version": "2.34.0",
4160 + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz",
4161 + "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==",
4162 + "dependencies": {
4163 + "@types/json-schema": "^7.0.3",
4164 + "@typescript-eslint/typescript-estree": "2.34.0",
4165 + "eslint-scope": "^5.0.0",
4166 + "eslint-utils": "^2.0.0"
4167 + },
4168 + "engines": {
4169 + "node": "^8.10.0 || ^10.13.0 || >=11.10.1"
4170 + },
4171 + "funding": {
4172 + "type": "opencollective",
4173 + "url": "https://opencollective.com/typescript-eslint"
4174 + },
4175 + "peerDependencies": {
4176 + "eslint": "*"
4177 + }
4178 + },
4179 + "node_modules/@typescript-eslint/parser": {
4180 + "version": "2.34.0",
4181 + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.34.0.tgz",
4182 + "integrity": "sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA==",
4183 + "dependencies": {
4184 + "@types/eslint-visitor-keys": "^1.0.0",
4185 + "@typescript-eslint/experimental-utils": "2.34.0",
4186 + "@typescript-eslint/typescript-estree": "2.34.0",
4187 + "eslint-visitor-keys": "^1.1.0"
4188 + },
4189 + "engines": {
4190 + "node": "^8.10.0 || ^10.13.0 || >=11.10.1"
4191 + },
4192 + "funding": {
4193 + "type": "opencollective",
4194 + "url": "https://opencollective.com/typescript-eslint"
4195 + },
4196 + "peerDependencies": {
4197 + "eslint": "^5.0.0 || ^6.0.0"
4198 + },
4199 + "peerDependenciesMeta": {
4200 + "typescript": {
4201 + "optional": true
4202 + }
4203 + }
4204 + },
4205 + "node_modules/@typescript-eslint/typescript-estree": {
4206 + "version": "2.34.0",
4207 + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz",
4208 + "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==",
4209 + "dependencies": {
4210 + "debug": "^4.1.1",
4211 + "eslint-visitor-keys": "^1.1.0",
4212 + "glob": "^7.1.6",
4213 + "is-glob": "^4.0.1",
4214 + "lodash": "^4.17.15",
4215 + "semver": "^7.3.2",
4216 + "tsutils": "^3.17.1"
4217 + },
4218 + "engines": {
4219 + "node": "^8.10.0 || ^10.13.0 || >=11.10.1"
4220 + },
4221 + "funding": {
4222 + "type": "opencollective",
4223 + "url": "https://opencollective.com/typescript-eslint"
4224 + },
4225 + "peerDependenciesMeta": {
4226 + "typescript": {
4227 + "optional": true
4228 + }
4229 + }
4230 + },
4231 + "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": {
4232 + "version": "4.3.1",
4233 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
4234 + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
4235 + "dependencies": {
4236 + "ms": "2.1.2"
4237 + },
4238 + "engines": {
4239 + "node": ">=6.0"
4240 + },
4241 + "peerDependenciesMeta": {
4242 + "supports-color": {
4243 + "optional": true
4244 + }
4245 + }
4246 + },
4247 + "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": {
4248 + "version": "2.1.2",
4249 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
4250 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
4251 + },
4252 + "node_modules/@webassemblyjs/ast": {
4253 + "version": "1.9.0",
4254 + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz",
4255 + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==",
4256 + "dependencies": {
4257 + "@webassemblyjs/helper-module-context": "1.9.0",
4258 + "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
4259 + "@webassemblyjs/wast-parser": "1.9.0"
4260 + }
4261 + },
4262 + "node_modules/@webassemblyjs/floating-point-hex-parser": {
4263 + "version": "1.9.0",
4264 + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz",
4265 + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA=="
4266 + },
4267 + "node_modules/@webassemblyjs/helper-api-error": {
4268 + "version": "1.9.0",
4269 + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz",
4270 + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw=="
4271 + },
4272 + "node_modules/@webassemblyjs/helper-buffer": {
4273 + "version": "1.9.0",
4274 + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz",
4275 + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA=="
4276 + },
4277 + "node_modules/@webassemblyjs/helper-code-frame": {
4278 + "version": "1.9.0",
4279 + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz",
4280 + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==",
4281 + "dependencies": {
4282 + "@webassemblyjs/wast-printer": "1.9.0"
4283 + }
4284 + },
4285 + "node_modules/@webassemblyjs/helper-fsm": {
4286 + "version": "1.9.0",
4287 + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz",
4288 + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw=="
4289 + },
4290 + "node_modules/@webassemblyjs/helper-module-context": {
4291 + "version": "1.9.0",
4292 + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz",
4293 + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==",
4294 + "dependencies": {
4295 + "@webassemblyjs/ast": "1.9.0"
4296 + }
4297 + },
4298 + "node_modules/@webassemblyjs/helper-wasm-bytecode": {
4299 + "version": "1.9.0",
4300 + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz",
4301 + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw=="
4302 + },
4303 + "node_modules/@webassemblyjs/helper-wasm-section": {
4304 + "version": "1.9.0",
4305 + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz",
4306 + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==",
4307 + "dependencies": {
4308 + "@webassemblyjs/ast": "1.9.0",
4309 + "@webassemblyjs/helper-buffer": "1.9.0",
4310 + "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
4311 + "@webassemblyjs/wasm-gen": "1.9.0"
4312 + }
4313 + },
4314 + "node_modules/@webassemblyjs/ieee754": {
4315 + "version": "1.9.0",
4316 + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz",
4317 + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==",
4318 + "dependencies": {
4319 + "@xtuc/ieee754": "^1.2.0"
4320 + }
4321 + },
4322 + "node_modules/@webassemblyjs/leb128": {
4323 + "version": "1.9.0",
4324 + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz",
4325 + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==",
4326 + "dependencies": {
4327 + "@xtuc/long": "4.2.2"
4328 + }
4329 + },
4330 + "node_modules/@webassemblyjs/utf8": {
4331 + "version": "1.9.0",
4332 + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz",
4333 + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w=="
4334 + },
4335 + "node_modules/@webassemblyjs/wasm-edit": {
4336 + "version": "1.9.0",
4337 + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz",
4338 + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==",
4339 + "dependencies": {
4340 + "@webassemblyjs/ast": "1.9.0",
4341 + "@webassemblyjs/helper-buffer": "1.9.0",
4342 + "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
4343 + "@webassemblyjs/helper-wasm-section": "1.9.0",
4344 + "@webassemblyjs/wasm-gen": "1.9.0",
4345 + "@webassemblyjs/wasm-opt": "1.9.0",
4346 + "@webassemblyjs/wasm-parser": "1.9.0",
4347 + "@webassemblyjs/wast-printer": "1.9.0"
4348 + }
4349 + },
4350 + "node_modules/@webassemblyjs/wasm-gen": {
4351 + "version": "1.9.0",
4352 + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz",
4353 + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==",
4354 + "dependencies": {
4355 + "@webassemblyjs/ast": "1.9.0",
4356 + "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
4357 + "@webassemblyjs/ieee754": "1.9.0",
4358 + "@webassemblyjs/leb128": "1.9.0",
4359 + "@webassemblyjs/utf8": "1.9.0"
4360 + }
4361 + },
4362 + "node_modules/@webassemblyjs/wasm-opt": {
4363 + "version": "1.9.0",
4364 + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz",
4365 + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==",
4366 + "dependencies": {
4367 + "@webassemblyjs/ast": "1.9.0",
4368 + "@webassemblyjs/helper-buffer": "1.9.0",
4369 + "@webassemblyjs/wasm-gen": "1.9.0",
4370 + "@webassemblyjs/wasm-parser": "1.9.0"
4371 + }
4372 + },
4373 + "node_modules/@webassemblyjs/wasm-parser": {
4374 + "version": "1.9.0",
4375 + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz",
4376 + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==",
4377 + "dependencies": {
4378 + "@webassemblyjs/ast": "1.9.0",
4379 + "@webassemblyjs/helper-api-error": "1.9.0",
4380 + "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
4381 + "@webassemblyjs/ieee754": "1.9.0",
4382 + "@webassemblyjs/leb128": "1.9.0",
4383 + "@webassemblyjs/utf8": "1.9.0"
4384 + }
4385 + },
4386 + "node_modules/@webassemblyjs/wast-parser": {
4387 + "version": "1.9.0",
4388 + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz",
4389 + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==",
4390 + "dependencies": {
4391 + "@webassemblyjs/ast": "1.9.0",
4392 + "@webassemblyjs/floating-point-hex-parser": "1.9.0",
4393 + "@webassemblyjs/helper-api-error": "1.9.0",
4394 + "@webassemblyjs/helper-code-frame": "1.9.0",
4395 + "@webassemblyjs/helper-fsm": "1.9.0",
4396 + "@xtuc/long": "4.2.2"
4397 + }
4398 + },
4399 + "node_modules/@webassemblyjs/wast-printer": {
4400 + "version": "1.9.0",
4401 + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz",
4402 + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==",
4403 + "dependencies": {
4404 + "@webassemblyjs/ast": "1.9.0",
4405 + "@webassemblyjs/wast-parser": "1.9.0",
4406 + "@xtuc/long": "4.2.2"
4407 + }
4408 + },
4409 + "node_modules/@xtuc/ieee754": {
4410 + "version": "1.2.0",
4411 + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
4412 + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA=="
4413 + },
4414 + "node_modules/@xtuc/long": {
4415 + "version": "4.2.2",
4416 + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
4417 + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
4418 + },
4419 + "node_modules/abab": {
4420 + "version": "2.0.5",
4421 + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz",
4422 + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q=="
4423 + },
4424 + "node_modules/accepts": {
4425 + "version": "1.3.7",
4426 + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
4427 + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
4428 + "dependencies": {
4429 + "mime-types": "~2.1.24",
4430 + "negotiator": "0.6.2"
4431 + },
4432 + "engines": {
4433 + "node": ">= 0.6"
4434 + }
4435 + },
4436 + "node_modules/acorn": {
4437 + "version": "7.4.1",
4438 + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
4439 + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
4440 + "bin": {
4441 + "acorn": "bin/acorn"
4442 + },
4443 + "engines": {
4444 + "node": ">=0.4.0"
4445 + }
4446 + },
4447 + "node_modules/acorn-globals": {
4448 + "version": "4.3.4",
4449 + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz",
4450 + "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==",
4451 + "dependencies": {
4452 + "acorn": "^6.0.1",
4453 + "acorn-walk": "^6.0.1"
4454 + }
4455 + },
4456 + "node_modules/acorn-globals/node_modules/acorn": {
4457 + "version": "6.4.2",
4458 + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz",
4459 + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==",
4460 + "bin": {
4461 + "acorn": "bin/acorn"
4462 + },
4463 + "engines": {
4464 + "node": ">=0.4.0"
4465 + }
4466 + },
4467 + "node_modules/acorn-jsx": {
4468 + "version": "5.3.1",
4469 + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz",
4470 + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==",
4471 + "peerDependencies": {
4472 + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
4473 + }
4474 + },
4475 + "node_modules/acorn-walk": {
4476 + "version": "6.2.0",
4477 + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz",
4478 + "integrity": "sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==",
4479 + "engines": {
4480 + "node": ">=0.4.0"
4481 + }
4482 + },
4483 + "node_modules/address": {
4484 + "version": "1.1.2",
4485 + "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz",
4486 + "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==",
4487 + "engines": {
4488 + "node": ">= 0.12.0"
4489 + }
4490 + },
4491 + "node_modules/aggregate-error": {
4492 + "version": "3.1.0",
4493 + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
4494 + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
4495 + "dependencies": {
4496 + "clean-stack": "^2.0.0",
4497 + "indent-string": "^4.0.0"
4498 + },
4499 + "engines": {
4500 + "node": ">=8"
4501 + }
4502 + },
4503 + "node_modules/ajv": {
4504 + "version": "6.12.6",
4505 + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
4506 + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
4507 + "dependencies": {
4508 + "fast-deep-equal": "^3.1.1",
4509 + "fast-json-stable-stringify": "^2.0.0",
4510 + "json-schema-traverse": "^0.4.1",
4511 + "uri-js": "^4.2.2"
4512 + },
4513 + "funding": {
4514 + "type": "github",
4515 + "url": "https://github.com/sponsors/epoberezkin"
4516 + }
4517 + },
4518 + "node_modules/ajv-errors": {
4519 + "version": "1.0.1",
4520 + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
4521 + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
4522 + "peerDependencies": {
4523 + "ajv": ">=5.0.0"
4524 + }
4525 + },
4526 + "node_modules/ajv-keywords": {
4527 + "version": "3.5.2",
4528 + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
4529 + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
4530 + "peerDependencies": {
4531 + "ajv": "^6.9.1"
4532 + }
4533 + },
4534 + "node_modules/alphanum-sort": {
4535 + "version": "1.0.2",
4536 + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz",
4537 + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM="
4538 + },
4539 + "node_modules/anser": {
4540 + "version": "2.0.1",
4541 + "resolved": "https://registry.npmjs.org/anser/-/anser-2.0.1.tgz",
4542 + "integrity": "sha512-4g5Np4CVD3c5c/36Mj0jllEA5bQcuXF0dqakZcuHGeubBzw93EAhwRuQCzgFm4/ZwvyBMzFdtn9BcihOjnxIdQ=="
4543 + },
4544 + "node_modules/ansi-align": {
4545 + "version": "3.0.0",
4546 + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz",
4547 + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==",
4548 + "dependencies": {
4549 + "string-width": "^3.0.0"
4550 + }
4551 + },
4552 + "node_modules/ansi-align/node_modules/emoji-regex": {
4553 + "version": "7.0.3",
4554 + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
4555 + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
4556 + },
4557 + "node_modules/ansi-align/node_modules/string-width": {
4558 + "version": "3.1.0",
4559 + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
4560 + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
4561 + "dependencies": {
4562 + "emoji-regex": "^7.0.1",
4563 + "is-fullwidth-code-point": "^2.0.0",
4564 + "strip-ansi": "^5.1.0"
4565 + },
4566 + "engines": {
4567 + "node": ">=6"
4568 + }
4569 + },
4570 + "node_modules/ansi-colors": {
4571 + "version": "3.2.4",
4572 + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz",
4573 + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==",
4574 + "engines": {
4575 + "node": ">=6"
4576 + }
4577 + },
4578 + "node_modules/ansi-escapes": {
4579 + "version": "4.3.1",
4580 + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
4581 + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
4582 + "dependencies": {
4583 + "type-fest": "^0.11.0"
4584 + },
4585 + "engines": {
4586 + "node": ">=8"
4587 + },
4588 + "funding": {
4589 + "url": "https://github.com/sponsors/sindresorhus"
4590 + }
4591 + },
4592 + "node_modules/ansi-escapes/node_modules/type-fest": {
4593 + "version": "0.11.0",
4594 + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
4595 + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
4596 + "engines": {
4597 + "node": ">=8"
4598 + },
4599 + "funding": {
4600 + "url": "https://github.com/sponsors/sindresorhus"
4601 + }
4602 + },
4603 + "node_modules/ansi-html": {
4604 + "version": "0.0.7",
4605 + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
4606 + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=",
4607 + "engines": [
4608 + "node >= 0.8.0"
4609 + ],
4610 + "bin": {
4611 + "ansi-html": "bin/ansi-html"
4612 + }
4613 + },
4614 + "node_modules/ansi-regex": {
4615 + "version": "4.1.0",
4616 + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
4617 + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
4618 + "engines": {
4619 + "node": ">=6"
4620 + }
4621 + },
4622 + "node_modules/ansi-styles": {
4623 + "version": "4.3.0",
4624 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
4625 + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
4626 + "dependencies": {
4627 + "color-convert": "^2.0.1"
4628 + },
4629 + "engines": {
4630 + "node": ">=8"
4631 + },
4632 + "funding": {
4633 + "url": "https://github.com/chalk/ansi-styles?sponsor=1"
4634 + }
4635 + },
4636 + "node_modules/anymatch": {
4637 + "version": "3.1.1",
4638 + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
4639 + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
4640 + "dependencies": {
4641 + "normalize-path": "^3.0.0",
4642 + "picomatch": "^2.0.4"
4643 + },
4644 + "engines": {
4645 + "node": ">= 8"
4646 + }
4647 + },
4648 + "node_modules/application-config-path": {
4649 + "version": "0.1.0",
4650 + "resolved": "https://registry.npmjs.org/application-config-path/-/application-config-path-0.1.0.tgz",
4651 + "integrity": "sha1-GTxfCoZUGkxm+6Hi3DhYM2LqXo8="
4652 + },
4653 + "node_modules/aproba": {
4654 + "version": "1.2.0",
4655 + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
4656 + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
4657 + },
4658 + "node_modules/arch": {
4659 + "version": "2.2.0",
4660 + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz",
4661 + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==",
4662 + "funding": [
4663 + {
4664 + "type": "github",
4665 + "url": "https://github.com/sponsors/feross"
4666 + },
4667 + {
4668 + "type": "patreon",
4669 + "url": "https://www.patreon.com/feross"
4670 + },
4671 + {
4672 + "type": "consulting",
4673 + "url": "https://feross.org/support"
4674 + }
4675 + ]
4676 + },
4677 + "node_modules/are-we-there-yet": {
4678 + "version": "1.1.5",
4679 + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
4680 + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
4681 + "dependencies": {
4682 + "delegates": "^1.0.0",
4683 + "readable-stream": "^2.0.6"
4684 + }
4685 + },
4686 + "node_modules/are-we-there-yet/node_modules/isarray": {
4687 + "version": "1.0.0",
4688 + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
4689 + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
4690 + },
4691 + "node_modules/are-we-there-yet/node_modules/readable-stream": {
4692 + "version": "2.3.7",
4693 + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
4694 + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
4695 + "dependencies": {
4696 + "core-util-is": "~1.0.0",
4697 + "inherits": "~2.0.3",
4698 + "isarray": "~1.0.0",
4699 + "process-nextick-args": "~2.0.0",
4700 + "safe-buffer": "~5.1.1",
4701 + "string_decoder": "~1.1.1",
4702 + "util-deprecate": "~1.0.1"
4703 + }
4704 + },
4705 + "node_modules/are-we-there-yet/node_modules/string_decoder": {
4706 + "version": "1.1.1",
4707 + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
4708 + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
4709 + "dependencies": {
4710 + "safe-buffer": "~5.1.0"
4711 + }
4712 + },
4713 + "node_modules/arg": {
4714 + "version": "4.1.3",
4715 + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
4716 + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA=="
4717 + },
4718 + "node_modules/argparse": {
4719 + "version": "1.0.10",
4720 + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
4721 + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
4722 + "dependencies": {
4723 + "sprintf-js": "~1.0.2"
4724 + }
4725 + },
4726 + "node_modules/aria-hidden": {
4727 + "version": "1.1.2",
4728 + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.1.2.tgz",
4729 + "integrity": "sha512-WAMH9q3vRimVqP+B0q2eDvx7IPDoY17A2fWwj5atTA/zTYJCNcS6HJ5YErZ5FO3PUHhrV0y0yR1NA0dRNm913A==",
4730 + "dependencies": {
4731 + "tslib": "^1.0.0"
4732 + },
4733 + "engines": {
4734 + "node": ">=8.5.0"
4735 + }
4736 + },
4737 + "node_modules/aria-query": {
4738 + "version": "4.2.2",
4739 + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz",
4740 + "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==",
4741 + "dependencies": {
4742 + "@babel/runtime": "^7.10.2",
4743 + "@babel/runtime-corejs3": "^7.10.2"
4744 + },
4745 + "engines": {
4746 + "node": ">=6.0"
4747 + }
4748 + },
4749 + "node_modules/arr-diff": {
4750 + "version": "4.0.0",
4751 + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
4752 + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
4753 + "engines": {
4754 + "node": ">=0.10.0"
4755 + }
4756 + },
4757 + "node_modules/arr-flatten": {
4758 + "version": "1.1.0",
4759 + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
4760 + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
4761 + "engines": {
4762 + "node": ">=0.10.0"
4763 + }
4764 + },
4765 + "node_modules/arr-union": {
4766 + "version": "3.1.0",
4767 + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
4768 + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
4769 + "engines": {
4770 + "node": ">=0.10.0"
4771 + }
4772 + },
4773 + "node_modules/array-equal": {
4774 + "version": "1.0.0",
4775 + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
4776 + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM="
4777 + },
4778 + "node_modules/array-filter": {
4779 + "version": "0.0.1",
4780 + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz",
4781 + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw="
4782 + },
4783 + "node_modules/array-flatten": {
4784 + "version": "1.1.1",
4785 + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
4786 + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
4787 + },
4788 + "node_modules/array-includes": {
4789 + "version": "3.1.3",
4790 + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz",
4791 + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==",
4792 + "dependencies": {
4793 + "call-bind": "^1.0.2",
4794 + "define-properties": "^1.1.3",
4795 + "es-abstract": "^1.18.0-next.2",
4796 + "get-intrinsic": "^1.1.1",
4797 + "is-string": "^1.0.5"
4798 + },
4799 + "engines": {
4800 + "node": ">= 0.4"
4801 + },
4802 + "funding": {
4803 + "url": "https://github.com/sponsors/ljharb"
4804 + }
4805 + },
4806 + "node_modules/array-iterate": {
4807 + "version": "1.1.4",
4808 + "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-1.1.4.tgz",
4809 + "integrity": "sha512-sNRaPGh9nnmdC8Zf+pT3UqP8rnWj5Hf9wiFGsX3wUQ2yVSIhO2ShFwCoceIPpB41QF6i2OEmrHmCo36xronCVA==",
4810 + "funding": {
4811 + "type": "github",
4812 + "url": "https://github.com/sponsors/wooorm"
4813 + }
4814 + },
4815 + "node_modules/array-map": {
4816 + "version": "0.0.0",
4817 + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz",
4818 + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI="
4819 + },
4820 + "node_modules/array-reduce": {
4821 + "version": "0.0.0",
4822 + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz",
4823 + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys="
4824 + },
4825 + "node_modules/array-union": {
4826 + "version": "2.1.0",
4827 + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
4828 + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
4829 + "engines": {
4830 + "node": ">=8"
4831 + }
4832 + },
4833 + "node_modules/array-uniq": {
4834 + "version": "1.0.3",
4835 + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
4836 + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
4837 + "engines": {
4838 + "node": ">=0.10.0"
4839 + }
4840 + },
4841 + "node_modules/array-unique": {
4842 + "version": "0.3.2",
4843 + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
4844 + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
4845 + "engines": {
4846 + "node": ">=0.10.0"
4847 + }
4848 + },
4849 + "node_modules/array.prototype.flat": {
4850 + "version": "1.2.4",
4851 + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz",
4852 + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==",
4853 + "dependencies": {
4854 + "call-bind": "^1.0.0",
4855 + "define-properties": "^1.1.3",
4856 + "es-abstract": "^1.18.0-next.1"
4857 + },
4858 + "engines": {
4859 + "node": ">= 0.4"
4860 + },
4861 + "funding": {
4862 + "url": "https://github.com/sponsors/ljharb"
4863 + }
4864 + },
4865 + "node_modules/array.prototype.flatmap": {
4866 + "version": "1.2.4",
4867 + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz",
4868 + "integrity": "sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q==",
4869 + "dependencies": {
4870 + "call-bind": "^1.0.0",
4871 + "define-properties": "^1.1.3",
4872 + "es-abstract": "^1.18.0-next.1",
4873 + "function-bind": "^1.1.1"
4874 + },
4875 + "engines": {
4876 + "node": ">= 0.4"
4877 + },
4878 + "funding": {
4879 + "url": "https://github.com/sponsors/ljharb"
4880 + }
4881 + },
4882 + "node_modules/arrify": {
4883 + "version": "1.0.1",
4884 + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
4885 + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
4886 + "engines": {
4887 + "node": ">=0.10.0"
4888 + }
4889 + },
4890 + "node_modules/asn1": {
4891 + "version": "0.2.4",
4892 + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
4893 + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
4894 + "dependencies": {
4895 + "safer-buffer": "~2.1.0"
4896 + }
4897 + },
4898 + "node_modules/asn1.js": {
4899 + "version": "5.4.1",
4900 + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
4901 + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
4902 + "dependencies": {
4903 + "bn.js": "^4.0.0",
4904 + "inherits": "^2.0.1",
4905 + "minimalistic-assert": "^1.0.0",
4906 + "safer-buffer": "^2.1.0"
4907 + }
4908 + },
4909 + "node_modules/asn1.js/node_modules/bn.js": {
4910 + "version": "4.11.9",
4911 + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
4912 + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw=="
4913 + },
4914 + "node_modules/assert": {
4915 + "version": "1.5.0",
4916 + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
4917 + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==",
4918 + "dependencies": {
4919 + "object-assign": "^4.1.1",
4920 + "util": "0.10.3"
4921 + }
4922 + },
4923 + "node_modules/assert-plus": {
4924 + "version": "1.0.0",
4925 + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
4926 + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
4927 + "engines": {
4928 + "node": ">=0.8"
4929 + }
4930 + },
4931 + "node_modules/assert/node_modules/inherits": {
4932 + "version": "2.0.1",
4933 + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
4934 + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE="
4935 + },
4936 + "node_modules/assert/node_modules/util": {
4937 + "version": "0.10.3",
4938 + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
4939 + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
4940 + "dependencies": {
4941 + "inherits": "2.0.1"
4942 + }
4943 + },
4944 + "node_modules/assign-symbols": {
4945 + "version": "1.0.0",
4946 + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
4947 + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
4948 + "engines": {
4949 + "node": ">=0.10.0"
4950 + }
4951 + },
4952 + "node_modules/ast-types-flow": {
4953 + "version": "0.0.7",
4954 + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz",
4955 + "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0="
4956 + },
4957 + "node_modules/astral-regex": {
4958 + "version": "1.0.0",
4959 + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
4960 + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
4961 + "engines": {
4962 + "node": ">=4"
4963 + }
4964 + },
4965 + "node_modules/async": {
4966 + "version": "1.5.2",
4967 + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
4968 + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
4969 + },
4970 + "node_modules/async-cache": {
4971 + "version": "1.1.0",
4972 + "resolved": "https://registry.npmjs.org/async-cache/-/async-cache-1.1.0.tgz",
4973 + "integrity": "sha1-SppaidBl7F2OUlS9nulrp2xTK1o=",
4974 + "dependencies": {
4975 + "lru-cache": "^4.0.0"
4976 + }
4977 + },
4978 + "node_modules/async-each": {
4979 + "version": "1.0.3",
4980 + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
4981 + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ=="
4982 + },
4983 + "node_modules/async-limiter": {
4984 + "version": "1.0.1",
4985 + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
4986 + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
4987 + },
4988 + "node_modules/async-retry-ng": {
4989 + "version": "2.0.1",
4990 + "resolved": "https://registry.npmjs.org/async-retry-ng/-/async-retry-ng-2.0.1.tgz",
4991 + "integrity": "sha512-iitlc2murdQ3/A5Re3CcplQBEf7vOmFrFQ6RFn3+/+zZUyIHYkZnnEziMSa6YIb2Bs2EJEPZWReTxjHqvQbDbw=="
4992 + },
4993 + "node_modules/asynckit": {
4994 + "version": "0.4.0",
4995 + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
4996 + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
4997 + },
4998 + "node_modules/atob": {
4999 + "version": "2.1.2",

This file is too large to show in full.

package.json new
+20
@@ -0,0 +1,20 @@
1 +{
2 + "name": "npm-documentation",
3 + "repository": "npm/documentation",
4 + "version": "0.1.0",
5 + "scripts": {
6 + "develop": "gatsby develop",
7 + "build": "gatsby build",
8 + "build-prefix-paths": "gatsby build --prefix-paths",
9 + "now-build": "npm run build",
10 + "serve": "gatsby serve",
11 + "serve-prefix-paths": "gatsby serve --prefix-paths"
12 + },
13 + "dependencies": {
14 + "gatsby": "^2.32.7",
15 + "gatsby-plugin-meta-redirect": "^1.1.1",
16 + "gatsby-theme-doctornpm": "^1.7.0",
17 + "react": "^16.14.0",
18 + "react-dom": "^16.14.0"
19 + }
20 +}
src/gatsby-theme-doctornpm/header-nav.yml new
+6
@@ -0,0 +1,6 @@
1 +- title: npmjs.com
2 + url: https://npmjs.com/
3 +- title: Status
4 + url: https://status.npmjs.com/
5 +- title: Support
6 + url: https://npmjs.com/support/
src/gatsby-theme-doctornpm/nav.yml new
+793
@@ -0,0 +1,793 @@
1 +# This file is automatically generated. Do not edit.
2 +# For registry content, edit `src/nav-base.yml in this repository.
3 +# For CLI content, edit `docs/nav.yml` in https://github.com/npm/cli.
4 +
5 +- title: About npm
6 + url: /about-npm
7 +- title: Getting started
8 + url: /getting-started
9 + children:
10 + - title: Setting up your npm user account
11 + shortName: Setting up your account
12 + url: /getting-started/setting-up-your-npm-user-account
13 + children:
14 + - title: Creating a new user account on the public registry
15 + url: /creating-a-new-npm-user-account
16 + - title: Creating a strong password
17 + url: /creating-a-strong-password
18 + - title: About two-factor authentication
19 + url: /about-two-factor-authentication
20 + - title: Configuring two-factor authentication
21 + url: /configuring-two-factor-authentication
22 + - title: Recovering your 2FA-enabled account
23 + url: /recovering-your-2fa-enabled-account
24 + - title: Managing your npm user account
25 + shortName: Managing your account
26 + url: /getting-started/managing-your-npm-user-account
27 + children:
28 + - title: Managing your profile settings
29 + url: /managing-your-profile-settings
30 + - title: Changing your npm username
31 + url: /changing-your-npm-username
32 + - title: Deleting your npm user account
33 + url: /deleting-your-npm-user-account
34 + - title: Paying for your npm user account
35 + shortName: Paying for your account
36 + url: /getting-started/paying-for-your-npm-user-account
37 + children:
38 + - title: Upgrading to a paid user account plan
39 + url: /upgrading-to-a-paid-user-account-plan
40 + - title: Viewing, downloading, and emailing receipts for your npm user account
41 + url: /viewing-downloading-and-emailing-receipts-for-your-user-account
42 + - title: Updating user account billing settings
43 + url: /updating-user-account-billing-settings
44 + - title: Downgrading to a free user account plan
45 + url: /downgrading-to-a-free-user-account-plan
46 + - title: Configuring your local environment
47 + shortName: Configuring
48 + url: /getting-started/configuring-your-local-environment
49 + children:
50 + - title: About npm CLI versions
51 + url: /about-npm-versions
52 + - title: Downloading and installing Node.js and npm
53 + url: /downloading-and-installing-node-js-and-npm
54 + - title: Configuring your registry settings as an npm Enterprise user
55 + url: /configuring-your-registry-settings-as-an-npm-enterprise-user
56 + - title: Logging in to an npm Enterprise registry from the command line
57 + url: /logging-in-to-an-npm-enterprise-registry-from-the-command-line
58 + - title: Troubleshooting
59 + url: /getting-started/troubleshooting
60 + children:
61 + - title: Generating and locating npm-debug.log files
62 + url: /generating-and-locating-npm-debug.log-files
63 + - title: Common errors
64 + url: /common-errors
65 + - title: Try the latest stable version of node
66 + url: /try-the-latest-stable-version-of-node
67 + - title: Try the latest stable version of npm
68 + url: /try-the-latest-stable-version-of-npm
69 +- title: Packages and modules
70 + url: /packages-and-modules
71 + children:
72 + - title: Introduction to packages and modules
73 + shortName: Introduction
74 + url: /packages-and-modules/introduction-to-packages-and-modules
75 + children:
76 + - title: About the public npm registry
77 + url: /about-the-public-npm-registry
78 + - title: About packages and modules
79 + url: /about-packages-and-modules
80 + - title: About scopes
81 + url: /about-scopes
82 + - title: About public packages
83 + url: /about-public-packages
84 + - title: About private packages
85 + url: /about-private-packages
86 + - title: npm package scope, access level, and visibility
87 + url: /package-scope-access-level-and-visibility
88 + - title: Contributing packages to the registry
89 + shortName: Contributing
90 + url: /packages-and-modules/contributing-packages-to-the-registry
91 + children:
92 + - title: Creating a package.json file
93 + url: /creating-a-package-json-file
94 + - title: Creating Node.js modules
95 + url: /creating-node-js-modules
96 + - title: About package README files
97 + url: /about-package-readme-files
98 + - title: Creating and publishing unscoped public packages
99 + url: /creating-and-publishing-unscoped-public-packages
100 + - title: Creating and publishing scoped public packages
101 + url: /creating-and-publishing-scoped-public-packages
102 + - title: Creating and publishing private packages
103 + url: /creating-and-publishing-private-packages
104 + - title: Package name guidelines
105 + url: /package-name-guidelines
106 + - title: Specifying dependencies and devDependencies in a package.json file
107 + url: /specifying-dependencies-and-devdependencies-in-a-package-json-file
108 + - title: About semantic versioning
109 + url: /about-semantic-versioning
110 + - title: Adding dist-tags to packages
111 + url: /adding-dist-tags-to-packages
112 + - title: Updating and managing your published packages
113 + shortName: Updating and managing
114 + url: /packages-and-modules/updating-and-managing-your-published-packages
115 + children:
116 + - title: Changing package visibility
117 + url: /changing-package-visibility
118 + - title: Adding collaborators to private packages owned by a user account
119 + url: /adding-collaborators-to-private-packages-owned-by-a-user-account
120 + - title: Updating your published package version number
121 + url: /updating-your-published-package-version-number
122 + - title: Deprecating and undeprecating packages or package versions
123 + url: /deprecating-and-undeprecating-packages-or-package-versions
124 + - title: Transferring a package from a user account to another user account
125 + url: /transferring-a-package-from-a-user-account-to-another-user-account
126 + - title: Unpublishing packages from the registry
127 + url: /unpublishing-packages-from-the-registry
128 + - title: Getting packages from the registry
129 + shortName: Getting packages
130 + url: /packages-and-modules/getting-packages-from-the-registry
131 + children:
132 + - title: Searching for and choosing packages to download
133 + url: /searching-for-and-choosing-packages-to-download
134 + - title: Downloading and installing packages locally
135 + url: /downloading-and-installing-packages-locally
136 + - title: Downloading and installing packages globally
137 + url: /downloading-and-installing-packages-globally
138 + - title: Resolving EACCES permissions errors when installing packages globally
139 + url: /resolving-eacces-permissions-errors-when-installing-packages-globally
140 + - title: Updating packages downloaded from the registry
141 + url: /updating-packages-downloaded-from-the-registry
142 + - title: Using npm packages in your projects
143 + url: /using-npm-packages-in-your-projects
144 + - title: Using deprecated packages
145 + url: /using-deprecated-packages
146 + - title: Uninstalling packages and dependencies
147 + url: /uninstalling-packages-and-dependencies
148 + - title: Securing your code
149 + url: /packages-and-modules/securing-your-code
150 + children:
151 + - title: About audit reports
152 + url: /about-audit-reports
153 + - title: Auditing package dependencies for security vulnerabilities
154 + url: /auditing-package-dependencies-for-security-vulnerabilities
155 + - title: About package PGP signatures
156 + url: /about-pgp-signatures-for-packages-in-the-public-registry
157 + - title: Verifying the PGP signature of a package from the npm public registry
158 + url: /verifying-the-pgp-signature-for-a-package-from-the-npm-public-registry
159 + - title: Requiring 2FA for package publishing and settings modification
160 + url: /requiring-2fa-for-package-publishing-and-settings-modification
161 + - title: Reporting malware in an npm package
162 + url: /reporting-malware-in-an-npm-package
163 +- title: Integrations
164 + url: /integrations
165 + children:
166 + - title: Integrating npm with external services
167 + shortName: Integrating with external services
168 + url: /integrations/integrating-npm-with-external-services
169 + children:
170 + - title: About access tokens
171 + url: /about-access-tokens
172 + - title: Creating and viewing access tokens
173 + url: /creating-and-viewing-access-tokens
174 + - title: Revoking access tokens
175 + url: /revoking-access-tokens
176 + - title: Using private packages in a CI/CD workflow
177 + url: /using-private-packages-in-a-ci-cd-workflow
178 + - title: Docker and private modules
179 + url: /docker-and-private-modules
180 +- title: Organizations
181 + url: /organizations
182 + children:
183 + - title: Creating and managing organizations
184 + shortName: Creating
185 + url: /organizations/creating-and-managing-organizations
186 + children:
187 + - title: Creating an organization
188 + url: /creating-an-organization
189 + - title: Converting your user account to an organization
190 + url: /converting-your-user-account-to-an-organization
191 + - title: Renaming an organization
192 + url: /renaming-an-organization
193 + - title: Deleting an organization
194 + url: /deleting-an-organization
195 + - title: Paying for your organization
196 + shortName: Paying
197 + url: /organizations/paying-for-your-organization
198 + children:
199 + - title: Upgrading to a paid organization plan
200 + url: /upgrading-to-a-paid-organization-plan
201 + - title: Viewing, downloading, and emailing receipts for your organization
202 + url: /viewing-downloading-and-emailing-receipts-for-your-organization
203 + - title: Updating organization billing settings
204 + url: /updating-organization-billing-settings
205 + - title: Downgrading to a free organization plan
206 + url: /downgrading-to-a-free-organization-plan
207 + - title: Managing organization members
208 + shortName: Managing members
209 + url: /organizations/managing-organization-members
210 + children:
211 + - title: Adding members to your organization
212 + url: /adding-members-to-your-organization
213 + - title: Accepting or rejecting an organization invitation
214 + url: /accepting-or-rejecting-an-organization-invitation
215 + - title: Organization roles and permissions
216 + url: /organization-roles-and-permissions
217 + - title: Managing organization permissions
218 + url: /managing-organization-permissions
219 + - title: Removing members from your organization
220 + url: /removing-members-from-your-organization
221 + - title: Managing teams
222 + url: /organizations/managing-teams
223 + children:
224 + - title: About the developers team
225 + url: /about-developers-team
226 + - title: Creating teams
227 + url: /creating-teams
228 + - title: Adding organization members to teams
229 + url: /adding-organization-members-to-teams
230 + - title: Removing organization members from teams
231 + url: /removing-organization-members-from-teams
232 + - title: Managing team access to organization packages
233 + url: /managing-team-access-to-organization-packages
234 + - title: Removing teams
235 + url: /removing-teams
236 + - title: Managing organization packages
237 + shortName: Managing packages
238 + url: /organizations/managing-organization-packages
239 + children:
240 + - title: About organization scopes and packages
241 + url: /about-organization-scopes-and-packages
242 + - title: Configuring your npm client with your organization settings
243 + url: /configuring-your-npm-client-with-your-organization-settings
244 + - title: Creating and publishing an organization scoped package
245 + url: /creating-and-publishing-an-organization-scoped-package
246 +- title: npm Enterprise
247 + url: /enterprise
248 + children:
249 + - title: Setup and configuration
250 + url: /enterprise/setup-and-configuration
251 + children:
252 + - title: Getting started with npm Enterprise
253 + url: /getting-started-with-npm-enterprise
254 + - title: Configuring an authentication provider
255 + url: /configuring-an-authentication-provider
256 + - title: Defining a security policy
257 + url: /defining-security-policy
258 + - title: Billing and seat management
259 + shortName: Billing
260 + url: /enterprise/billing-and-seat-management
261 + children:
262 + - title: Purchasing or removing seats
263 + url: /purchasing-or-removing-seats
264 + - title: Updating billing information
265 + url: /updating-billing-information
266 + - title: User management
267 + url: /enterprise/user-management
268 + children:
269 + - title: About the Enterprise admin user
270 + url: /about-the-enterprise-admin-user
271 + - title: Promoting a non-admin user to admin
272 + url: /promoting-a-non-admin-user-to-admin
273 + - title: Demoting an admin to a non-admin user
274 + url: /demoting-an-admin-to-a-non-admin-user
275 + - title: Managing user security
276 + url: /managing-user-security
277 + - title: Viewing, deactivating, and reactivating users
278 + url: /viewing-deactivating-and-reactivating-users
279 + - title: Creating and managing organization and teams
280 + url: /creating-and-managing-organizations-and-teams
281 + - title: Permanently deleting a user
282 + url: /permanently-deleting-a-user
283 + - title: npm Enterprise roles and permissions
284 + url: /npm-enterprise-roles-and-permissions
285 + - title: Migration
286 + url: /enterprise/migration
287 + children:
288 + - title: Migrating from an existing npm Enterprise instance
289 + url: /migrating-from-an-existing-enterprise-instance
290 + - title: Migrating from an organization on the public registry
291 + url: /migrating-from-an-organization-on-the-public-registry
292 + - title: Sunset
293 + url: /enterprise/sunset
294 + children:
295 + - title: Sunsetting npm Enterprise
296 + url: /sunsetting-npm-enterprise
297 +- title: npm CLI
298 + shortName: CLI
299 + url: /cli
300 + variants:
301 + - title: Version 6.x (Legacy release)
302 + shortName: v6
303 + url: /cli/v6
304 + default: false
305 + children:
306 + - title: CLI Commands
307 + shortName: Commands
308 + url: /cli/v6/commands
309 + children:
310 + - title: npm
311 + url: /cli/v6/commands/npm
312 + description: JavaScript package manager
313 + - title: npm access
314 + url: /cli/v6/commands/npm-access
315 + description: Set access level on published packages
316 + - title: npm adduser
317 + url: /cli/v6/commands/npm-adduser
318 + description: Add a registry user account
319 + - title: npm audit
320 + url: /cli/v6/commands/npm-audit
321 + description: Run a security audit
322 + - title: npm bin
323 + url: /cli/v6/commands/npm-bin
324 + description: Display npm bin folder
325 + - title: npm bugs
326 + url: /cli/v6/commands/npm-bugs
327 + description: Bugs for a package in a web browser maybe
328 + - title: npm build
329 + url: /cli/v6/commands/npm-build
330 + description: Build a package
331 + - title: npm bundle
332 + url: /cli/v6/commands/npm-bundle
333 + description: Removed
334 + - title: npm cache
335 + url: /cli/v6/commands/npm-cache
336 + description: Manipulates packages cache
337 + - title: npm ci
338 + url: /cli/v6/commands/npm-ci
339 + description: Install a project with a clean slate
340 + - title: npm completion
341 + url: /cli/v6/commands/npm-completion
342 + description: Tab completion for npm
343 + - title: npm config
344 + url: /cli/v6/commands/npm-config
345 + description: Manage the npm configuration files
346 + - title: npm dedupe
347 + url: /cli/v6/commands/npm-dedupe
348 + description: Reduce duplication
349 + - title: npm deprecate
350 + url: /cli/v6/commands/npm-deprecate
351 + description: Deprecate a version of a package
352 + - title: npm dist-tag
353 + url: /cli/v6/commands/npm-dist-tag
354 + description: Modify package distribution tags
355 + - title: npm docs
356 + url: /cli/v6/commands/npm-docs
357 + description: Docs for a package in a web browser maybe
358 + - title: npm doctor
359 + url: /cli/v6/commands/npm-doctor
360 + description: Check your environments
361 + - title: npm edit
362 + url: /cli/v6/commands/npm-edit
363 + description: Edit an installed package
364 + - title: npm explore
365 + url: /cli/v6/commands/npm-explore
366 + description: Browse an installed package
367 + - title: npm fund
368 + url: /cli/v6/commands/npm-fund
369 + description: Retrieve funding information
370 + - title: npm help
371 + url: /cli/v6/commands/npm-help
372 + description: Search npm help documentation
373 + - title: npm help-search
374 + url: /cli/v6/commands/npm-help-search
375 + description: Get help on npm
376 + - title: npm hook
377 + url: /cli/v6/commands/npm-hook
378 + description: Manage registry hooks
379 + - title: npm init
380 + url: /cli/v6/commands/npm-init
381 + description: Create a package.json file
382 + - title: npm install
383 + url: /cli/v6/commands/npm-install
384 + description: Install a package
385 + - title: npm install-ci-test
386 + url: /cli/v6/commands/npm-install-ci-test
387 + description: Install a project with a clean slate and run tests
388 + - title: npm install-test
389 + url: /cli/v6/commands/npm-install-test
390 + description: Install package(s) and run tests
391 + - title: npm link
392 + url: /cli/v6/commands/npm-link
393 + description: Symlink a package folder
394 + - title: npm logout
395 + url: /cli/v6/commands/npm-logout
396 + description: Log out of the registry
397 + - title: npm ls
398 + url: /cli/v6/commands/npm-ls
399 + description: List installed packages
400 + - title: npm org
401 + url: /cli/v6/commands/npm-org
402 + description: Manage orgs
403 + - title: npm outdated
404 + url: /cli/v6/commands/npm-outdated
405 + description: Check for outdated packages
406 + - title: npm owner
407 + url: /cli/v6/commands/npm-owner
408 + description: Manage package owners
409 + - title: npm pack
410 + url: /cli/v6/commands/npm-pack
411 + description: Create a tarball from a package
412 + - title: npm ping
413 + url: /cli/v6/commands/npm-ping
414 + description: Ping npm registry
415 + - title: npm prefix
416 + url: /cli/v6/commands/npm-prefix
417 + description: Display prefix
418 + - title: npm profile
419 + url: /cli/v6/commands/npm-profile
420 + description: Change settings on your registry profile
421 + - title: npm prune
422 + url: /cli/v6/commands/npm-prune
423 + description: Remove extraneous packages
424 + - title: npm publish
425 + url: /cli/v6/commands/npm-publish
426 + description: Publish a package
427 + - title: npm rebuild
428 + url: /cli/v6/commands/npm-rebuild
429 + description: Rebuild a package
430 + - title: npm repo
431 + url: /cli/v6/commands/npm-repo
432 + description: Open package repository page in the browser
433 + - title: npm restart
434 + url: /cli/v6/commands/npm-restart
435 + description: Restart a package
436 + - title: npm root
437 + url: /cli/v6/commands/npm-root
438 + description: Display npm root
439 + - title: npm run-script
440 + url: /cli/v6/commands/npm-run-script
441 + description: Run arbitrary package scripts
442 + - title: npm search
443 + url: /cli/v6/commands/npm-search
444 + description: Search for packages
445 + - title: npm shrinkwrap
446 + url: /cli/v6/commands/npm-shrinkwrap
447 + description: Lock down dependency versions for publication
448 + - title: npm star
449 + url: /cli/v6/commands/npm-star
450 + description: Mark your favorite packages
451 + - title: npm stars
452 + url: /cli/v6/commands/npm-stars
453 + description: View packages marked as favorites
454 + - title: npm start
455 + url: /cli/v6/commands/npm-start
456 + description: Start a package
457 + - title: npm stop
458 + url: /cli/v6/commands/npm-stop
459 + description: Stop a package
460 + - title: npm team
461 + url: /cli/v6/commands/npm-team
462 + description: Manage organization teams and team memberships
463 + - title: npm test
464 + url: /cli/v6/commands/npm-test
465 + description: Test a package
466 + - title: npm token
467 + url: /cli/v6/commands/npm-token
468 + description: Manage your authentication tokens
469 + - title: npm uninstall
470 + url: /cli/v6/commands/npm-uninstall
471 + description: Remove a package
472 + - title: npm unpublish
473 + url: /cli/v6/commands/npm-unpublish
474 + description: Remove a package from the registry
475 + - title: npm update
476 + url: /cli/v6/commands/npm-update
477 + description: Update a package
478 + - title: npm version
479 + url: /cli/v6/commands/npm-version
480 + description: Bump a package version
481 + - title: npm view
482 + url: /cli/v6/commands/npm-view
483 + description: View registry info
484 + - title: npm whoami
485 + url: /cli/v6/commands/npm-whoami
486 + description: Display npm username
487 + - title: Configuring npm
488 + shortName: Configuring
489 + url: /cli/v6/configuring-npm
490 + children:
491 + - title: Install
492 + url: /cli/v6/configuring-npm/install
493 + description: Download and install node and npm
494 + - title: Folders
495 + url: /cli/v6/configuring-npm/folders
496 + description: Folder structures used by npm
497 + - title: .npmrc
498 + url: /cli/v6/configuring-npm/npmrc
499 + description: The npm config files
500 + - title: package.json
501 + url: /cli/v6/configuring-npm/package-json
502 + description: Specifics of npm's package.json handling
503 + - title: package-locks
504 + url: /cli/v6/configuring-npm/package-locks
505 + description: An explanation of npm lockfiles
506 + - title: package-lock.json
507 + url: /cli/v6/configuring-npm/package-lock-json
508 + description: A manifestation of the manifest
509 + - title: shrinkwrap.json
510 + url: /cli/v6/configuring-npm/shrinkwrap-json
511 + description: A publishable lockfile
512 + - title: Using npm
513 + shortName: Using
514 + url: /cli/v6/using-npm
515 + children:
516 + - title: Registry
517 + url: /cli/v6/using-npm/registry
518 + description: The JavaScript Package Registry
519 + - title: Config
520 + url: /cli/v6/using-npm/config
521 + description: About npm configuration
522 + - title: semver
523 + url: /cli/v6/using-npm/semver
524 + description: The semantic versioner for npm
525 + - title: Scope
526 + url: /cli/v6/using-npm/scope
527 + description: Scoped packages
528 + - title: Scripts
529 + url: /cli/v6/using-npm/scripts
530 + description: How npm handles the "scripts" field
531 + - title: Organizations
532 + url: /cli/v6/using-npm/orgs
533 + description: Working with teams & organizations
534 + - title: Disputes
535 + url: /cli/v6/using-npm/disputes
536 + description: Handling module name disputes
537 + - title: Developers
538 + url: /cli/v6/using-npm/developers
539 + description: Developer guide
540 + - title: Removal
541 + url: /cli/v6/using-npm/removal
542 + description: Cleaning the slate
543 + - title: Version 7.x (Current release)
544 + shortName: v7
545 + url: /cli/v7
546 + default: true
547 + children:
548 + - title: CLI Commands
549 + shortName: Commands
550 + url: /cli/v7/commands
551 + children:
552 + - title: npm
553 + url: /cli/v7/commands/npm
554 + description: JavaScript package manager
555 + - title: npm access
556 + url: /cli/v7/commands/npm-access
557 + description: Set access level on published packages
558 + - title: npm adduser
559 + url: /cli/v7/commands/npm-adduser
560 + description: Add a registry user account
561 + - title: npm audit
562 + url: /cli/v7/commands/npm-audit
563 + description: Run a security audit
564 + - title: npm bin
565 + url: /cli/v7/commands/npm-bin
566 + description: Display npm bin folder
567 + - title: npm bugs
568 + url: /cli/v7/commands/npm-bugs
569 + description: Bugs for a package in a web browser maybe
570 + - title: npm cache
571 + url: /cli/v7/commands/npm-cache
572 + description: Manipulates packages cache
573 + - title: npm ci
574 + url: /cli/v7/commands/npm-ci
575 + description: Install a project with a clean slate
576 + - title: npm completion
577 + url: /cli/v7/commands/npm-completion
578 + description: Tab completion for npm
579 + - title: npm config
580 + url: /cli/v7/commands/npm-config
581 + description: Manage the npm configuration files
582 + - title: npm dedupe
583 + url: /cli/v7/commands/npm-dedupe
584 + description: Reduce duplication
585 + - title: npm deprecate
586 + url: /cli/v7/commands/npm-deprecate
587 + description: Deprecate a version of a package
588 + - title: npm diff
589 + url: /cli/v7/commands/npm-diff
590 + description: The registry diff command
591 + - title: npm dist-tag
592 + url: /cli/v7/commands/npm-dist-tag
593 + description: Modify package distribution tags
594 + - title: npm docs
595 + url: /cli/v7/commands/npm-docs
596 + description: Docs for a package in a web browser maybe
597 + - title: npm doctor
598 + url: /cli/v7/commands/npm-doctor
599 + description: Check your environments
600 + - title: npm edit
601 + url: /cli/v7/commands/npm-edit
602 + description: Edit an installed package
603 + - title: npm exec
604 + url: /cli/v7/commands/npm-exec
605 + description: Run a command from an npm package
606 + - title: npm explain
607 + url: /cli/v7/commands/npm-explain
608 + description: Explain installed packages
609 + - title: npm explore
610 + url: /cli/v7/commands/npm-explore
611 + description: Browse an installed package
612 + - title: npm find-dupes
613 + url: /cli/v7/commands/npm-find-dupes
614 + description: Find duplication in the package tree
615 + - title: npm fund
616 + url: /cli/v7/commands/npm-fund
617 + description: Retrieve funding information
618 + - title: npm help
619 + url: /cli/v7/commands/npm-help
620 + description: Search npm help documentation
621 + - title: npm help-search
622 + url: /cli/v7/commands/npm-help-search
623 + description: Get help on npm
624 + - title: npm hook
625 + url: /cli/v7/commands/npm-hook
626 + description: Manage registry hooks
627 + - title: npm init
628 + url: /cli/v7/commands/npm-init
629 + description: Create a package.json file
630 + - title: npm install
631 + url: /cli/v7/commands/npm-install
632 + description: Install a package
633 + - title: npm install-ci-test
634 + url: /cli/v7/commands/npm-install-ci-test
635 + description: Install a project with a clean slate and run tests
636 + - title: npm install-test
637 + url: /cli/v7/commands/npm-install-test
638 + description: Install package(s) and run tests
639 + - title: npm link
640 + url: /cli/v7/commands/npm-link
641 + description: Symlink a package folder
642 + - title: npm logout
643 + url: /cli/v7/commands/npm-logout
644 + description: Log out of the registry
645 + - title: npm ls
646 + url: /cli/v7/commands/npm-ls
647 + description: List installed packages
648 + - title: npm org
649 + url: /cli/v7/commands/npm-org
650 + description: Manage orgs
651 + - title: npm outdated
652 + url: /cli/v7/commands/npm-outdated
653 + description: Check for outdated packages
654 + - title: npm owner
655 + url: /cli/v7/commands/npm-owner
656 + description: Manage package owners
657 + - title: npm pack
658 + url: /cli/v7/commands/npm-pack
659 + description: Create a tarball from a package
660 + - title: npm ping
661 + url: /cli/v7/commands/npm-ping
662 + description: Ping npm registry
663 + - title: npm prefix
664 + url: /cli/v7/commands/npm-prefix
665 + description: Display prefix
666 + - title: npm profile
667 + url: /cli/v7/commands/npm-profile
668 + description: Change settings on your registry profile
669 + - title: npm prune
670 + url: /cli/v7/commands/npm-prune
671 + description: Remove extraneous packages
672 + - title: npm publish
673 + url: /cli/v7/commands/npm-publish
674 + description: Publish a package
675 + - title: npm rebuild
676 + url: /cli/v7/commands/npm-rebuild
677 + description: Rebuild a package
678 + - title: npm repo
679 + url: /cli/v7/commands/npm-repo
680 + description: Open package repository page in the browser
681 + - title: npm restart
682 + url: /cli/v7/commands/npm-restart
683 + description: Restart a package
684 + - title: npm root
685 + url: /cli/v7/commands/npm-root
686 + description: Display npm root
687 + - title: npm run-script
688 + url: /cli/v7/commands/npm-run-script
689 + description: Run arbitrary package scripts
690 + - title: npm search
691 + url: /cli/v7/commands/npm-search
692 + description: Search for packages
693 + - title: npm set-script
694 + url: /cli/v7/commands/npm-set-script
695 + description: Set tasks in the scripts section of package.json
696 + - title: npm shrinkwrap
697 + url: /cli/v7/commands/npm-shrinkwrap
698 + description: Lock down dependency versions for publication
699 + - title: npm star
700 + url: /cli/v7/commands/npm-star
701 + description: Mark your favorite packages
702 + - title: npm stars
703 + url: /cli/v7/commands/npm-stars
704 + description: View packages marked as favorites
705 + - title: npm start
706 + url: /cli/v7/commands/npm-start
707 + description: Start a package
708 + - title: npm stop
709 + url: /cli/v7/commands/npm-stop
710 + description: Stop a package
711 + - title: npm team
712 + url: /cli/v7/commands/npm-team
713 + description: Manage organization teams and team memberships
714 + - title: npm test
715 + url: /cli/v7/commands/npm-test
716 + description: Test a package
717 + - title: npm token
718 + url: /cli/v7/commands/npm-token
719 + description: Manage your authentication tokens
720 + - title: npm uninstall
721 + url: /cli/v7/commands/npm-uninstall
722 + description: Remove a package
723 + - title: npm unpublish
724 + url: /cli/v7/commands/npm-unpublish
725 + description: Remove a package from the registry
726 + - title: npm unstar
727 + url: /cli/v7/commands/npm-unstar
728 + description: Remove an item from your favorite packages
729 + - title: npm update
730 + url: /cli/v7/commands/npm-update
731 + description: Update a package
732 + - title: npm version
733 + url: /cli/v7/commands/npm-version
734 + description: Bump a package version
735 + - title: npm view
736 + url: /cli/v7/commands/npm-view
737 + description: View registry info
738 + - title: npm whoami
739 + url: /cli/v7/commands/npm-whoami
740 + description: Display npm username
741 + - title: npx
742 + url: /cli/v7/commands/npx
743 + description: Run a command from an npm package
744 + - title: Configuring npm
745 + shortName: Configuring
746 + url: /cli/v7/configuring-npm
747 + children:
748 + - title: Install
749 + url: /cli/v7/configuring-npm/install
750 + description: Download and install node and npm
751 + - title: Folders
752 + url: /cli/v7/configuring-npm/folders
753 + description: Folder structures used by npm
754 + - title: .npmrc
755 + url: /cli/v7/configuring-npm/npmrc
756 + description: The npm config files
757 + - title: npm-shrinkwrap.json
758 + url: /cli/v7/configuring-npm/npm-shrinkwrap-json
759 + description: A publishable lockfile
760 + - title: package.json
761 + url: /cli/v7/configuring-npm/package-json
762 + description: Specifics of npm's package.json handling
763 + - title: package-lock.json
764 + url: /cli/v7/configuring-npm/package-lock-json
765 + description: A manifestation of the manifest
766 + - title: Using npm
767 + shortName: Using
768 + url: /cli/v7/using-npm
769 + children:
770 + - title: Registry
771 + url: /cli/v7/using-npm/registry
772 + description: The JavaScript Package Registry
773 + - title: Config
774 + url: /cli/v7/using-npm/config
775 + description: About npm configuration
776 + - title: Scope
777 + url: /cli/v7/using-npm/scope
778 + description: Scoped packages
779 + - title: Scripts
780 + url: /cli/v7/using-npm/scripts
781 + description: How npm handles the "scripts" field
782 + - title: Workspaces
783 + url: /cli/v7/using-npm/workspaces
784 + description: Working with workspaces
785 + - title: Organizations
786 + url: /cli/v7/using-npm/orgs
787 + description: Working with teams & organizations
788 + - title: Developers
789 + url: /cli/v7/using-npm/developers
790 + description: Developer guide
791 + - title: Removal
792 + url: /cli/v7/using-npm/removal
793 + description: Cleaning the slate
src/images/npm-favicon.png
Binary files /dev/null and b/src/images/npm-favicon.png differ
src/images/npm.png
Binary files /dev/null and b/src/images/npm.png differ
src/nav-base.yml new
+297
@@ -0,0 +1,297 @@
1 +- title: About npm
2 + url: /about-npm
3 +
4 +- title: Getting started
5 + url: /getting-started
6 + children:
7 + - title: Setting up your npm user account
8 + shortName: Setting up your account
9 + url: /getting-started/setting-up-your-npm-user-account
10 + children:
11 + - title: Creating a new user account on the public registry
12 + url: /creating-a-new-npm-user-account
13 + - title: Creating a strong password
14 + url: /creating-a-strong-password
15 + - title: About two-factor authentication
16 + url: /about-two-factor-authentication
17 + - title: Configuring two-factor authentication
18 + url: /configuring-two-factor-authentication
19 + - title: Recovering your 2FA-enabled account
20 + url: /recovering-your-2fa-enabled-account
21 + - title: Managing your npm user account
22 + shortName: Managing your account
23 + url: /getting-started/managing-your-npm-user-account
24 + children:
25 + - title: Managing your profile settings
26 + url: /managing-your-profile-settings
27 + - title: Changing your npm username
28 + url: /changing-your-npm-username
29 + - title: Deleting your npm user account
30 + url: /deleting-your-npm-user-account
31 + - title: Paying for your npm user account
32 + shortName: Paying for your account
33 + url: /getting-started/paying-for-your-npm-user-account
34 + children:
35 + - title: Upgrading to a paid user account plan
36 + url: /upgrading-to-a-paid-user-account-plan
37 + - title: Viewing, downloading, and emailing receipts for your npm user account
38 + url: /viewing-downloading-and-emailing-receipts-for-your-user-account
39 + - title: Updating user account billing settings
40 + url: /updating-user-account-billing-settings
41 + - title: Downgrading to a free user account plan
42 + url: /downgrading-to-a-free-user-account-plan
43 + - title: Configuring your local environment
44 + shortName: Configuring
45 + url: /getting-started/configuring-your-local-environment
46 + children:
47 + - title: About npm CLI versions
48 + url: /about-npm-versions
49 + - title: Downloading and installing Node.js and npm
50 + url: /downloading-and-installing-node-js-and-npm
51 + - title: Configuring your registry settings as an npm Enterprise user
52 + url: /configuring-your-registry-settings-as-an-npm-enterprise-user
53 + - title: Logging in to an npm Enterprise registry from the command line
54 + url: /logging-in-to-an-npm-enterprise-registry-from-the-command-line
55 + - title: Troubleshooting
56 + url: /getting-started/troubleshooting
57 + children:
58 + - title: Generating and locating npm-debug.log files
59 + url: /generating-and-locating-npm-debug.log-files
60 + - title: Common errors
61 + url: /common-errors
62 + - title: Try the latest stable version of node
63 + url: /try-the-latest-stable-version-of-node
64 + - title: Try the latest stable version of npm
65 + url: /try-the-latest-stable-version-of-npm
66 +
67 +- title: Packages and modules
68 + url: /packages-and-modules
69 + children:
70 + - title: Introduction to packages and modules
71 + shortName: Introduction
72 + url: /packages-and-modules/introduction-to-packages-and-modules
73 + children:
74 + - title: About the public npm registry
75 + url: /about-the-public-npm-registry
76 + - title: About packages and modules
77 + url: /about-packages-and-modules
78 + - title: About scopes
79 + url: /about-scopes
80 + - title: About public packages
81 + url: /about-public-packages
82 + - title: About private packages
83 + url: /about-private-packages
84 + - title: npm package scope, access level, and visibility
85 + url: /package-scope-access-level-and-visibility
86 + - title: Contributing packages to the registry
87 + shortName: Contributing
88 + url: /packages-and-modules/contributing-packages-to-the-registry
89 + children:
90 + - title: Creating a package.json file
91 + url: /creating-a-package-json-file
92 + - title: Creating Node.js modules
93 + url: /creating-node-js-modules
94 + - title: About package README files
95 + url: /about-package-readme-files
96 + - title: Creating and publishing unscoped public packages
97 + url: /creating-and-publishing-unscoped-public-packages
98 + - title: Creating and publishing scoped public packages
99 + url: /creating-and-publishing-scoped-public-packages
100 + - title: Creating and publishing private packages
101 + url: /creating-and-publishing-private-packages
102 + - title: Package name guidelines
103 + url: /package-name-guidelines
104 + - title: Specifying dependencies and devDependencies in a package.json file
105 + url: /specifying-dependencies-and-devdependencies-in-a-package-json-file
106 + - title: About semantic versioning
107 + url: /about-semantic-versioning
108 + - title: Adding dist-tags to packages
109 + url: /adding-dist-tags-to-packages
110 + - title: Updating and managing your published packages
111 + shortName: Updating and managing
112 + url: /packages-and-modules/updating-and-managing-your-published-packages
113 + children:
114 + - title: Changing package visibility
115 + url: /changing-package-visibility
116 + - title: Adding collaborators to private packages owned by a user account
117 + url: /adding-collaborators-to-private-packages-owned-by-a-user-account
118 + - title: Updating your published package version number
119 + url: /updating-your-published-package-version-number
120 + - title: Deprecating and undeprecating packages or package versions
121 + url: /deprecating-and-undeprecating-packages-or-package-versions
122 + - title: Transferring a package from a user account to another user account
123 + url: /transferring-a-package-from-a-user-account-to-another-user-account
124 + - title: Unpublishing packages from the registry
125 + url: /unpublishing-packages-from-the-registry
126 + - title: Getting packages from the registry
127 + shortName: Getting packages
128 + url: /packages-and-modules/getting-packages-from-the-registry
129 + children:
130 + - title: Searching for and choosing packages to download
131 + url: /searching-for-and-choosing-packages-to-download
132 + - title: Downloading and installing packages locally
133 + url: /downloading-and-installing-packages-locally
134 + - title: Downloading and installing packages globally
135 + url: /downloading-and-installing-packages-globally
136 + - title: Resolving EACCES permissions errors when installing packages globally
137 + url: /resolving-eacces-permissions-errors-when-installing-packages-globally
138 + - title: Updating packages downloaded from the registry
139 + url: /updating-packages-downloaded-from-the-registry
140 + - title: Using npm packages in your projects
141 + url: /using-npm-packages-in-your-projects
142 + - title: Using deprecated packages
143 + url: /using-deprecated-packages
144 + - title: Uninstalling packages and dependencies
145 + url: /uninstalling-packages-and-dependencies
146 + - title: Securing your code
147 + url: /packages-and-modules/securing-your-code
148 + children:
149 + - title: About audit reports
150 + url: /about-audit-reports
151 + - title: Auditing package dependencies for security vulnerabilities
152 + url: /auditing-package-dependencies-for-security-vulnerabilities
153 + - title: About package PGP signatures
154 + url: /about-pgp-signatures-for-packages-in-the-public-registry
155 + - title: Verifying the PGP signature of a package from the npm public registry
156 + url: /verifying-the-pgp-signature-for-a-package-from-the-npm-public-registry
157 + - title: Requiring 2FA for package publishing and settings modification
158 + url: /requiring-2fa-for-package-publishing-and-settings-modification
159 + - title: Reporting malware in an npm package
160 + url: /reporting-malware-in-an-npm-package
161 +
162 +- title: Integrations
163 + url: /integrations
164 + children:
165 + - title: Integrating npm with external services
166 + shortName: Integrating with external services
167 + url: /integrations/integrating-npm-with-external-services
168 + children:
169 + - title: About access tokens
170 + url: /about-access-tokens
171 + - title: Creating and viewing access tokens
172 + url: /creating-and-viewing-access-tokens
173 + - title: Revoking access tokens
174 + url: /revoking-access-tokens
175 + - title: Using private packages in a CI/CD workflow
176 + url: /using-private-packages-in-a-ci-cd-workflow
177 + - title: Docker and private modules
178 + url: /docker-and-private-modules
179 +
180 +- title: Organizations
181 + url: /organizations
182 + children:
183 + - title: Creating and managing organizations
184 + shortName: Creating
185 + url: /organizations/creating-and-managing-organizations
186 + children:
187 + - title: Creating an organization
188 + url: /creating-an-organization
189 + - title: Converting your user account to an organization
190 + url: /converting-your-user-account-to-an-organization
191 + - title: Renaming an organization
192 + url: /renaming-an-organization
193 + - title: Deleting an organization
194 + url: /deleting-an-organization
195 + - title: Paying for your organization
196 + shortName: Paying
197 + url: /organizations/paying-for-your-organization
198 + children:
199 + - title: Upgrading to a paid organization plan
200 + url: /upgrading-to-a-paid-organization-plan
201 + - title: Viewing, downloading, and emailing receipts for your organization
202 + url: /viewing-downloading-and-emailing-receipts-for-your-organization
203 + - title: Updating organization billing settings
204 + url: /updating-organization-billing-settings
205 + - title: Downgrading to a free organization plan
206 + url: /downgrading-to-a-free-organization-plan
207 + - title: Managing organization members
208 + shortName: Managing members
209 + url: /organizations/managing-organization-members
210 + children:
211 + - title: Adding members to your organization
212 + url: /adding-members-to-your-organization
213 + - title: Accepting or rejecting an organization invitation
214 + url: /accepting-or-rejecting-an-organization-invitation
215 + - title: Organization roles and permissions
216 + url: /organization-roles-and-permissions
217 + - title: Managing organization permissions
218 + url: /managing-organization-permissions
219 + - title: Removing members from your organization
220 + url: /removing-members-from-your-organization
221 + - title: Managing teams
222 + url: /organizations/managing-teams
223 + children:
224 + - title: About the developers team
225 + url: /about-developers-team
226 + - title: Creating teams
227 + url: /creating-teams
228 + - title: Adding organization members to teams
229 + url: /adding-organization-members-to-teams
230 + - title: Removing organization members from teams
231 + url: /removing-organization-members-from-teams
232 + - title: Managing team access to organization packages
233 + url: /managing-team-access-to-organization-packages
234 + - title: Removing teams
235 + url: /removing-teams
236 + - title: Managing organization packages
237 + shortName: Managing packages
238 + url: /organizations/managing-organization-packages
239 + children:
240 + - title: About organization scopes and packages
241 + url: /about-organization-scopes-and-packages
242 + - title: Configuring your npm client with your organization settings
243 + url: /configuring-your-npm-client-with-your-organization-settings
244 + - title: Creating and publishing an organization scoped package
245 + url: /creating-and-publishing-an-organization-scoped-package
246 +
247 +- title: npm Enterprise
248 + url: /enterprise
249 + children:
250 + - title: Setup and configuration
251 + url: /enterprise/setup-and-configuration
252 + children:
253 + - title: Getting started with npm Enterprise
254 + url: /getting-started-with-npm-enterprise
255 + - title: Configuring an authentication provider
256 + url: /configuring-an-authentication-provider
257 + - title: Defining a security policy
258 + url: /defining-security-policy
259 + - title: Billing and seat management
260 + shortName: Billing
261 + url: /enterprise/billing-and-seat-management
262 + children:
263 + - title: Purchasing or removing seats
264 + url: /purchasing-or-removing-seats
265 + - title: Updating billing information
266 + url: /updating-billing-information
267 + - title: User management
268 + url: /enterprise/user-management
269 + children:
270 + - title: About the Enterprise admin user
271 + url: /about-the-enterprise-admin-user
272 + - title: Promoting a non-admin user to admin
273 + url: /promoting-a-non-admin-user-to-admin
274 + - title: Demoting an admin to a non-admin user
275 + url: /demoting-an-admin-to-a-non-admin-user
276 + - title: Managing user security
277 + url: /managing-user-security
278 + - title: Viewing, deactivating, and reactivating users
279 + url: /viewing-deactivating-and-reactivating-users
280 + - title: Creating and managing organization and teams
281 + url: /creating-and-managing-organizations-and-teams
282 + - title: Permanently deleting a user
283 + url: /permanently-deleting-a-user
284 + - title: npm Enterprise roles and permissions
285 + url: /npm-enterprise-roles-and-permissions
286 + - title: Migration
287 + url: /enterprise/migration
288 + children:
289 + - title: Migrating from an existing npm Enterprise instance
290 + url: /migrating-from-an-existing-enterprise-instance
291 + - title: Migrating from an organization on the public registry
292 + url: /migrating-from-an-organization-on-the-public-registry
293 + - title: Sunset
294 + url: /enterprise/sunset
295 + children:
296 + - title: Sunsetting npm Enterprise
297 + url: /sunsetting-npm-enterprise
src/shared.js new
+183
@@ -0,0 +1,183 @@
1 +import React from 'react';
2 +import {Link} from '@primer/components';
3 +import {Note, Screenshot} from 'gatsby-theme-doctornpm';
4 +
5 +const shared = {
6 + /* User login */
7 + 'user-login': {
8 + 'text': (<><Link href="https://www.npmjs.com/login">Log in</Link> to npm with your user account.</>),
9 + 'image': (<Screenshot src="/shared/user-login.png" alt="Screenshot of npm login dialog" />)
10 + },
11 + 'contact-support': {
12 + 'text': (<Link href="https://www.npmjs.com/support">contact npm Support</Link>),
13 + },
14 + 'contact-enterprise-support': {
15 + 'text': (<Link href="mailto:enterprise@npmjs.com">contact Enterprise Support</Link>),
16 + },
17 + 'profile-settings': {
18 + 'text': (<>In the upper right corner of the page, click your profile picture, then click <strong>Profile Settings</strong>.</>),
19 + 'image': (<Screenshot src="/shared/profile-settings.png" alt="Screenshot of profile settings selection in user menu" />)
20 + },
21 +
22 + /* Billing */
23 + 'billing-creditcard-form': {
24 + 'text': (<>
25 + In the credit card information dialog box, enter your credit card information:
26 +
27 + <ul>
28 + <li>Card number</li>
29 + <li>MM / YY: the month and year of the card expiration date</li>
30 + <li>CVC: the three-digit code on the credit card</li>
31 + </ul>
32 + </>
33 + ),
34 + 'image': (<Screenshot src="/shared/billing-creditcard-form.png" alt="Screenshot of the credit card form" />),
35 + },
36 + 'billing-downgrade-selection': {
37 + 'text': (<>Under "change plan", click <strong>Downgrade Plan</strong>.</>),
38 + 'image': (<Screenshot src="/shared/billing-downgrade-selection.png" alt="Screenshot of the downgrade plan button" />),
39 + },
40 + 'billing-downgrade-confirm': {
41 + 'text': (<>Under "Are you sure?", click <strong>Downgrade to a free account</strong>.</>),
42 + 'image': (<Screenshot src="/shared/billing-downgrade-confirm.png" alt="Screenshot of the downgrade plan confirmation" />),
43 + },
44 + 'billing-download': {
45 + 'text': (<>To download a single receipt, find the row of the receipt you want to download, then click the PDF icon on the right side of the row.</>),
46 + 'image': (<Screenshot src="/shared/billing-download-icon.png" alt="Screenshot of the download receipt icon" />),
47 + },
48 + 'billing-download-checked': {
49 + 'text': (<>To download multiple receipts, first select the receipts that you wish to download by selecting the box next to the date. To select all receipts, select the checkbox next to the "Date" header. Then click <strong>Download Checked</strong>.</>),
50 + 'image': (<Screenshot src="/shared/billing-download-checked.png" alt="Screenshot of the the download checked option" />),
51 + },
52 + 'billing-email': {
53 + 'text': (<>To email a single receipt, find the row of the receipt you want to download, then, on the right side of the row, click the email icon.</>),
54 + 'image': (<Screenshot src="/shared/billing-email-icon.png" alt="Screenshot of the email receipt icon" />),
55 + },
56 + 'billing-email-checked': {
57 + 'text': (<>To email multiple receipts, first select the receipts that you wish to download by selecting the box next to the date. To select all receipts, select the checkbox next to the "Date" header. Then click <strong>Email Checked</strong>.</>),
58 + 'image': (<Screenshot src="/shared/billing-email-checked.png" alt="Screenshot of the email checked receipt icon" />),
59 + },
60 + 'billing-email-receipt': {
61 + 'text': (<>In the Email Receipt dialog box, fill in the "From", "To", and "Message" fields.</>),
62 + 'image': (<Screenshot src="/shared/billing-email-receipt.png" alt="Screenshot of the email receipt dialog" />),
63 + },
64 + 'billing-extra-info': {
65 + 'text': (<>To add a business name, VAT number, address of record, or other information to your receipts, in the "Extra Billing Information" text box, type the information.</>),
66 + 'image': (<Screenshot src="/shared/billing-extra-info.png" alt="Screenshot of the extra billing info dialog" />),
67 + },
68 + 'billing-extra-receipt-email': {
69 + 'text': (<>To update the email address used for receipts, beside "Send my receipts", select the checkbox and type the email address that should receive billing receipts.</>),
70 + 'image': (<Screenshot src="/shared/billing-extra-receipt-email.png" alt="Screenshot of billing receipt email settings" />)
71 + },
72 + 'billing-extra-save': {
73 + 'text': (<>Click <strong>Save</strong>.</>),
74 + 'image': (<Screenshot src="/shared/billing-extra-save.png" alt="Screenshot of billing extra info save button" />),
75 + },
76 + 'billing-form': {
77 + 'text': (<>
78 + In the billing information dialog box, enter your billing information:
79 +
80 + <ul>
81 + <li>Email: the email address used for the billing contact</li>
82 + <li>Name: the name on the credit card used to pay</li>
83 + <li>Street, City, ZIP Code, Country: the billing address associated with the credit card</li>
84 + </ul>
85 + </>
86 + ),
87 + 'image': (<Screenshot src="/shared/billing-form.png" alt="Screenshot of billing form" />),
88 + },
89 + 'billing-history': {
90 + 'text': (<>On the Billing Information page, under "monthly bill", select <strong>View Billing History</strong>.</>),
91 + 'image': (<Screenshot src="/shared/billing-history.png" alt="Screenshot of billing history selection in user menu" />)
92 + },
93 + 'billing-info': {
94 + 'text': (<>In the upper right corner of the page, click your profile picture, then select <strong>Billing Info</strong>.</>),
95 + 'image': (<Screenshot src="/shared/billing-info.png" alt="Screenshot of billing info selection in user menu" />)
96 + },
97 + 'billing-receipt-settings': {
98 + 'text': (<>At the bottom of the Billing History dialog box, click "Receipt Settings".</>),
99 + 'image': (<Screenshot src="/shared/billing-receipt-settings.png" alt="Screenshot of billing receipt settings" />)
100 + },
101 + 'billing-update-card': {
102 + 'text': (<>Click <strong>Update Card</strong>.</>),
103 + 'image': (<Screenshot src="/shared/billing-update-card.png" alt="Screenshot of update credit card confirmation button" />),
104 + },
105 + 'billing-view': {
106 + 'text': (<>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.</>),
107 + 'image': (<Screenshot src="/shared/billing-view-icon.png" alt="Screenshot of the view receipt icon" />),
108 + },
109 + 'grace-period': {
110 + 'text': 'nine days',
111 + },
112 + 'payment-info-button': {
113 + 'text': (<>Click <strong>Payment Info</strong>.</>),
114 + 'image': (<Screenshot src="/shared/payment-info-button.png" alt="Screenshot of payment information button" />),
115 + },
116 + 'payment-remember-me': {
117 + 'text': (<>To save your credit card information for other payments on npm, select "Remember me".</>),
118 + 'image': (<Screenshot src="/shared/payment-remember-me.png" alt="Screenshot of payment remember me button" />),
119 + },
120 + 'payment-info': {
121 + 'text': (<>Under "monthly bill", click <strong>Edit Payment Info</strong>.</>),
122 + 'image': (<Screenshot src="/shared/payment-info.png" alt="Screenshot of edit payment info link" />),
123 + },
124 + 'billing-price-teams': {
125 + 'text': (<>$7 per member per month</>),
126 + },
127 + 'billing-organization-plans': {
128 + 'image': (<Screenshot src="/shared/billing-plan-selection.png" alt="Screenshot showing the billing plan selection dialog" />),
129 + },
130 +
131 + /* Package management */
132 + 'organization-package-public': {
133 + 'image': (<Screenshot src="/shared/organization-package-public.png" alt="Screenshot of a public npm Teams package" />),
134 + },
135 + 'organization-package-private': {
136 + 'image': (<Screenshot src="/shared/organization-package-private.png" alt="Screenshot of a private npm Teams package" />),
137 + },
138 +
139 + /* Organizations */
140 + 'organization-create': {
141 + 'text': (<>In the upper right corner of the page, click your profile picture, then click <strong>Create an Organization</strong>.</>),
142 + 'image': (<Screenshot src="/shared/organization-create.png" alt="Screenshot of the create an organization dropdown menu" />),
143 + },
144 + 'organization-selection': {
145 + 'text': (<>In the left sidebar, click the name of your organization.</>),
146 + 'image': (<Screenshot src="/shared/organization-selection.png" alt="Screenshot of a selected organization" />),
147 + },
148 + 'organization-billing-tab': {
149 + 'text': (<>On the organization settings page, click <strong>Billing</strong>.</>),
150 + 'image': (<Screenshot src="/shared/organization-billing-tab.png" alt="Screenshot of the organization billing tab" />),
151 + },
152 + 'organization-members-tab': {
153 + 'text': (<>On the organization settings page, click <strong>Members</strong>.</>),
154 + 'image': (<Screenshot src="/shared/organization-members-tab.png" alt="Screenshot of the organization members tab" />),
155 + },
156 + 'organization-teams-tab': {
157 + 'text': (<>On the organization settings page, click <strong>Teams</strong>.</>),
158 + 'image': (<Screenshot src="/shared/organization-teams-tab.png" alt="Screenshot of the organization teams tab" />),
159 + },
160 +
161 + /* Enterprise */
162 + 'enterprise-admin-panel': {
163 + 'text': (<>In the upper right corner of the page, click your profile picture, then click <strong>Site Administration</strong>.</>),
164 + 'image': (<Screenshot src="/shared/enterprise-admin-panel.png" alt="Screenshot of the admin panel" />),
165 + },
166 + 'enterprise-admin-panel-settings': {
167 + 'image': (<Screenshot src="/shared/enterprise-admin-panel-settings.png" alt="Screenshot of the admin panel settings button" />),
168 + },
169 + 'enterprise-choose-security-policy': {
170 + 'image': (<Screenshot src="/shared/enterprise-choose-security-policy.png" alt="Screenshot of the choose security policy" />),
171 + },
172 + 'enterprise-custom-blocking-message': {
173 + 'image': (<Screenshot src="/shared/enterprise-custom-blocking-message.png" alt="Screenshot of the custom blocking message option" />),
174 + },
175 + 'enterprise-instance-login': {
176 + 'text': (<>Log in to your Enterprise instance.</>),
177 + },
178 + 'enterprise-migration-requirements': {
179 + 'text': (<Note><><strong>Note:</strong> Using <code><a href="https://www.npmjs.com/package/pneumatic-tubes">pneumatic-tubes</a></code> for migration requires <ul><li>Node 8+</li><li>npm 5+ (to install or upgrade, run <code>npm install npm@latest -g</code>)</li></ul></></Note>),
180 + },
181 +};
182 +
183 +export default shared;
static/enterprise/setup-and-configuration/acknowledge-blocking.png
Binary files /dev/null and b/static/enterprise/setup-and-configuration/acknowledge-blocking.png differ
static/enterprise/setup-and-configuration/sso-configure.png
Binary files /dev/null and b/static/enterprise/setup-and-configuration/sso-configure.png differ
static/enterprise/setup-and-configuration/sso-save.png
Binary files /dev/null and b/static/enterprise/setup-and-configuration/sso-save.png differ
static/enterprise/setup-and-configuration/sso-settings-form.png
Binary files /dev/null and b/static/enterprise/setup-and-configuration/sso-settings-form.png differ
static/enterprise/user-management/activate-user.png
Binary files /dev/null and b/static/enterprise/user-management/activate-user.png differ
static/enterprise/user-management/deactivate-user.png
Binary files /dev/null and b/static/enterprise/user-management/deactivate-user.png differ
static/enterprise/user-management/manage-users.png
Binary files /dev/null and b/static/enterprise/user-management/manage-users.png differ
static/getting-started/managing-your-npm-user-account/profile-settings-cli.png
Binary files /dev/null and b/static/getting-started/managing-your-npm-user-account/profile-settings-cli.png differ
static/getting-started/paying-for-your-npm-user-account/billing-upgrade-button.png
Binary files /dev/null and b/static/getting-started/paying-for-your-npm-user-account/billing-upgrade-button.png differ
static/getting-started/paying-for-your-npm-user-account/billing-upgrade-form.png
Binary files /dev/null and b/static/getting-started/paying-for-your-npm-user-account/billing-upgrade-form.png differ
static/getting-started/paying-for-your-npm-user-account/change-plan.png
Binary files /dev/null and b/static/getting-started/paying-for-your-npm-user-account/change-plan.png differ
static/getting-started/paying-for-your-npm-user-account/enable-private-publishing.png
Binary files /dev/null and b/static/getting-started/paying-for-your-npm-user-account/enable-private-publishing.png differ
static/getting-started/setting-up-your-npm-user-account/2fa-auth-pub-select.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/2fa-auth-pub-select.png differ
static/getting-started/setting-up-your-npm-user-account/2fa-auth-pub-submit.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/2fa-auth-pub-submit.png differ
static/getting-started/setting-up-your-npm-user-account/2fa-disable-submit.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/2fa-disable-submit.png differ
static/getting-started/setting-up-your-npm-user-account/2fa-disable.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/2fa-disable.png differ
static/getting-started/setting-up-your-npm-user-account/2fa-enable.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/2fa-enable.png differ
static/getting-started/setting-up-your-npm-user-account/2fa-modify.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/2fa-modify.png differ
static/getting-started/setting-up-your-npm-user-account/2fa-verify.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/2fa-verify.png differ
static/getting-started/setting-up-your-npm-user-account/create-account-button.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/create-account-button.png differ
static/getting-started/setting-up-your-npm-user-account/go-back-to-settings.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/go-back-to-settings.png differ
static/getting-started/setting-up-your-npm-user-account/privacy-policy.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/privacy-policy.png differ
static/getting-started/setting-up-your-npm-user-account/signup-form.png
Binary files /dev/null and b/static/getting-started/setting-up-your-npm-user-account/signup-form.png differ
static/integrations/integrating-npm-with-external-services/create-token.png
Binary files /dev/null and b/static/integrations/integrating-npm-with-external-services/create-token.png differ
static/integrations/integrating-npm-with-external-services/token-level-select.png
Binary files /dev/null and b/static/integrations/integrating-npm-with-external-services/token-level-select.png differ
static/integrations/integrating-npm-with-external-services/tokens-profile.png
Binary files /dev/null and b/static/integrations/integrating-npm-with-external-services/tokens-profile.png differ
static/organizations/creating-and-managing-organizations/convert-confirmation.png
Binary files /dev/null and b/static/organizations/creating-and-managing-organizations/convert-confirmation.png differ
static/organizations/creating-and-managing-organizations/convert-from-user.png
Binary files /dev/null and b/static/organizations/creating-and-managing-organizations/convert-from-user.png differ
static/organizations/creating-and-managing-organizations/convert-new-username.png
Binary files /dev/null and b/static/organizations/creating-and-managing-organizations/convert-new-username.png differ
static/organizations/creating-and-managing-organizations/create-confirm.png
Binary files /dev/null and b/static/organizations/creating-and-managing-organizations/create-confirm.png differ
static/organizations/creating-and-managing-organizations/create-invite.png
Binary files /dev/null and b/static/organizations/creating-and-managing-organizations/create-invite.png differ
static/organizations/creating-and-managing-organizations/create-name.png
Binary files /dev/null and b/static/organizations/creating-and-managing-organizations/create-name.png differ
static/organizations/managing-organization-members/accept-invitation.png
Binary files /dev/null and b/static/organizations/managing-organization-members/accept-invitation.png differ
static/organizations/managing-organization-members/change-member-role.png
Binary files /dev/null and b/static/organizations/managing-organization-members/change-member-role.png differ
static/organizations/managing-organization-members/invite-button.png
Binary files /dev/null and b/static/organizations/managing-organization-members/invite-button.png differ
static/organizations/managing-organization-members/invite-members-button.png
Binary files /dev/null and b/static/organizations/managing-organization-members/invite-members-button.png differ
static/organizations/managing-organization-members/remove-member.png
Binary files /dev/null and b/static/organizations/managing-organization-members/remove-member.png differ
static/organizations/managing-organization-members/revoke-invitation.png
Binary files /dev/null and b/static/organizations/managing-organization-members/revoke-invitation.png differ
static/organizations/managing-organization-members/username-or-email-field.png
Binary files /dev/null and b/static/organizations/managing-organization-members/username-or-email-field.png differ
static/organizations/managing-teams/team-creation-confirmation.png
Binary files /dev/null and b/static/organizations/managing-teams/team-creation-confirmation.png differ
static/organizations/managing-teams/team-member-add-button.png
Binary files /dev/null and b/static/organizations/managing-teams/team-member-add-button.png differ
static/organizations/managing-teams/team-member-remove-button.png
Binary files /dev/null and b/static/organizations/managing-teams/team-member-remove-button.png differ
static/organizations/managing-teams/team-member-select.png
Binary files /dev/null and b/static/organizations/managing-teams/team-member-select.png differ
static/organizations/managing-teams/team-members.png
Binary files /dev/null and b/static/organizations/managing-teams/team-members.png differ
static/organizations/managing-teams/team-name-description.png
Binary files /dev/null and b/static/organizations/managing-teams/team-name-description.png differ
static/organizations/managing-teams/team-package-add-existing-button.png
Binary files /dev/null and b/static/organizations/managing-teams/team-package-add-existing-button.png differ
static/organizations/managing-teams/team-package-change-permissions.png
Binary files /dev/null and b/static/organizations/managing-teams/team-package-change-permissions.png differ
static/organizations/managing-teams/team-package-permissions.png
Binary files /dev/null and b/static/organizations/managing-teams/team-package-permissions.png differ
static/organizations/managing-teams/team-package-remove-button.png
Binary files /dev/null and b/static/organizations/managing-teams/team-package-remove-button.png differ
static/organizations/managing-teams/team-package-select.png
Binary files /dev/null and b/static/organizations/managing-teams/team-package-select.png differ
static/organizations/managing-teams/team-packages-button.png
Binary files /dev/null and b/static/organizations/managing-teams/team-packages-button.png differ
static/organizations/managing-teams/team-remove.png
Binary files /dev/null and b/static/organizations/managing-teams/team-remove.png differ
static/packages-and-modules/getting-packages-from-the-registry/package-deprecated.png
Binary files /dev/null and b/static/packages-and-modules/getting-packages-from-the-registry/package-deprecated.png differ
static/packages-and-modules/getting-packages-from-the-registry/search-qr-results.png
Binary files /dev/null and b/static/packages-and-modules/getting-packages-from-the-registry/search-qr-results.png differ
static/packages-and-modules/getting-packages-from-the-registry/search-qr.png
Binary files /dev/null and b/static/packages-and-modules/getting-packages-from-the-registry/search-qr.png differ
static/packages-and-modules/securing-your-code/2fa-package-admin.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/2fa-package-admin.png differ
static/packages-and-modules/securing-your-code/2fa-package-disable.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/2fa-package-disable.png differ
static/packages-and-modules/securing-your-code/2fa-package-require.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/2fa-package-require.png differ
static/packages-and-modules/securing-your-code/2fa-package-turnoff.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/2fa-package-turnoff.png differ
static/packages-and-modules/securing-your-code/2fa-package-update.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/2fa-package-update.png differ
static/packages-and-modules/securing-your-code/audit-manual-review.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/audit-manual-review.png differ
static/packages-and-modules/securing-your-code/audit-no-vulnerabilities.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/audit-no-vulnerabilities.png differ
static/packages-and-modules/securing-your-code/audit-report-results.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/audit-report-results.png differ
static/packages-and-modules/securing-your-code/audit-report-suggested-fixes.png
Binary files /dev/null and b/static/packages-and-modules/securing-your-code/audit-report-suggested-fixes.png differ
static/packages-and-modules/updating-and-managing-your-published-packages/deprecate-package.png
Binary files /dev/null and b/static/packages-and-modules/updating-and-managing-your-published-packages/deprecate-package.png differ
static/packages-and-modules/updating-and-managing-your-published-packages/deprecate-version.png
Binary files /dev/null and b/static/packages-and-modules/updating-and-managing-your-published-packages/deprecate-version.png differ
static/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-invite.png
Binary files /dev/null and b/static/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-invite.png differ
static/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-list.png
Binary files /dev/null and b/static/packages-and-modules/updating-and-managing-your-published-packages/package-maintainer-list.png differ
static/shared/billing-creditcard-form.png
Binary files /dev/null and b/static/shared/billing-creditcard-form.png differ
static/shared/billing-downgrade-confirm.png
Binary files /dev/null and b/static/shared/billing-downgrade-confirm.png differ
static/shared/billing-downgrade-selection.png
Binary files /dev/null and b/static/shared/billing-downgrade-selection.png differ
static/shared/billing-download-checked.png
Binary files /dev/null and b/static/shared/billing-download-checked.png differ
static/shared/billing-download-icon.png
Binary files /dev/null and b/static/shared/billing-download-icon.png differ
static/shared/billing-email-checked.png
Binary files /dev/null and b/static/shared/billing-email-checked.png differ
static/shared/billing-email-icon.png
Binary files /dev/null and b/static/shared/billing-email-icon.png differ
static/shared/billing-email-receipt.png
Binary files /dev/null and b/static/shared/billing-email-receipt.png differ
static/shared/billing-extra-info.png
Binary files /dev/null and b/static/shared/billing-extra-info.png differ
static/shared/billing-extra-receipt-email.png
Binary files /dev/null and b/static/shared/billing-extra-receipt-email.png differ
static/shared/billing-extra-save.png
Binary files /dev/null and b/static/shared/billing-extra-save.png differ
static/shared/billing-form.png
Binary files /dev/null and b/static/shared/billing-form.png differ
static/shared/billing-history.png
Binary files /dev/null and b/static/shared/billing-history.png differ
static/shared/billing-info.png
Binary files /dev/null and b/static/shared/billing-info.png differ
static/shared/billing-plan-selection.png
Binary files /dev/null and b/static/shared/billing-plan-selection.png differ
static/shared/billing-receipt-settings.png
Binary files /dev/null and b/static/shared/billing-receipt-settings.png differ
static/shared/billing-update-card.png
Binary files /dev/null and b/static/shared/billing-update-card.png differ
static/shared/billing-view-icon.png
Binary files /dev/null and b/static/shared/billing-view-icon.png differ
static/shared/enterprise-activate-user.png
Binary files /dev/null and b/static/shared/enterprise-activate-user.png differ
static/shared/enterprise-admin-panel-settings.png
Binary files /dev/null and b/static/shared/enterprise-admin-panel-settings.png differ
static/shared/enterprise-admin-panel.png
Binary files /dev/null and b/static/shared/enterprise-admin-panel.png differ
static/shared/enterprise-admin-profile-menu.png
Binary files /dev/null and b/static/shared/enterprise-admin-profile-menu.png differ
static/shared/enterprise-choose-security-policy.png
Binary files /dev/null and b/static/shared/enterprise-choose-security-policy.png differ
static/shared/enterprise-custom-blocking-message
Binary files /dev/null and b/static/shared/enterprise-custom-blocking-message differ
static/shared/enterprise-custom-blocking-message.png
Binary files /dev/null and b/static/shared/enterprise-custom-blocking-message.png differ
static/shared/enterprise-deactivate-user-button.png
Binary files /dev/null and b/static/shared/enterprise-deactivate-user-button.png differ
static/shared/enterprise-manage-users-button.png
Binary files /dev/null and b/static/shared/enterprise-manage-users-button.png differ
static/shared/enterprise-sso-configure.png
Binary files /dev/null and b/static/shared/enterprise-sso-configure.png differ
static/shared/enterprise-sso-save-button.png
Binary files /dev/null and b/static/shared/enterprise-sso-save-button.png differ
static/shared/enterprise-sso-settings-form.png
Binary files /dev/null and b/static/shared/enterprise-sso-settings-form.png differ
static/shared/organization-billing-tab.png
Binary files /dev/null and b/static/shared/organization-billing-tab.png differ
static/shared/organization-create.png
Binary files /dev/null and b/static/shared/organization-create.png differ
static/shared/organization-members-tab.png
Binary files /dev/null and b/static/shared/organization-members-tab.png differ
static/shared/organization-package-private.png
Binary files /dev/null and b/static/shared/organization-package-private.png differ
static/shared/organization-package-public.png
Binary files /dev/null and b/static/shared/organization-package-public.png differ
static/shared/organization-selection.png
Binary files /dev/null and b/static/shared/organization-selection.png differ
static/shared/organization-teams-tab.png
Binary files /dev/null and b/static/shared/organization-teams-tab.png differ
static/shared/payment-info-button.png
Binary files /dev/null and b/static/shared/payment-info-button.png differ
static/shared/payment-info.png
Binary files /dev/null and b/static/shared/payment-info.png differ
static/shared/payment-remember-me.png
Binary files /dev/null and b/static/shared/payment-remember-me.png differ
static/shared/profile-settings.png
Binary files /dev/null and b/static/shared/profile-settings.png differ
static/shared/user-login.png
Binary files /dev/null and b/static/shared/user-login.png differ