mirror of https://gitee.com/openkylin/npm.git
Import Upstream version 8.5.1~ds
This commit is contained in:
commit
73846cac3f
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"extends": ["@npmcli"],
|
||||
"overrides": [{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"no-extend-native": "off",
|
||||
"no-global-assign": "off"
|
||||
}
|
||||
}, {
|
||||
"files": ["lib/**"],
|
||||
"rules": {
|
||||
"no-console": "warn"
|
||||
}
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
/node_modules/** linguist-generated=false
|
||||
/package-lock.json linguist-generated=false
|
|
@ -0,0 +1 @@
|
|||
* @npm/cli-team
|
|
@ -0,0 +1,63 @@
|
|||
name: 🐞 Bug v8
|
||||
description: File a bug/issue against v8.x
|
||||
title: "[BUG] <title>"
|
||||
labels: [Bug, Needs Triage, Release 8.x]
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please [search here](https://github.com/npm/cli/issues) to see if an issue already exists for your problem.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: This issue exists in the latest npm version
|
||||
description: Please make sure you have installed the latest npm and verified it is still an issue.
|
||||
options:
|
||||
- label: I am using the latest npm
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Current Behavior
|
||||
description: A clear & concise description of what you're experiencing.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A clear & concise description of what you expected to happen.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Steps to reproduce the behavior.
|
||||
value: |
|
||||
1. In this environment...
|
||||
2. With this config...
|
||||
3. Run '...'
|
||||
4. See error...
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Environment
|
||||
description: |
|
||||
examples:
|
||||
- **`npm -v`**: **npm**: 7.6.3
|
||||
- **`node -v`**: **Node.js**: 13.14.0
|
||||
- **OS Name**: Ubuntu 20.04
|
||||
- **System Model Name**: Macbook Pro
|
||||
- **`npm config ls`**: `; "user" config from ...`
|
||||
value: |
|
||||
- npm:
|
||||
- Node.js:
|
||||
- OS Name:
|
||||
- System Model Name:
|
||||
- npm config:
|
||||
```ini
|
||||
; copy and paste output from `npm config ls` here
|
||||
```
|
||||
validations:
|
||||
required: false
|
|
@ -0,0 +1,23 @@
|
|||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: ❓ Help with issues in older versions of the CLI
|
||||
url: https://github.community/c/software-development/47
|
||||
about: Find/file tickets with the community
|
||||
- name: ⭐️ Feature Request
|
||||
url: https://github.com/npm/feedback
|
||||
about: Add your request or discuss the project w/ the community
|
||||
- name: 📃 RFC
|
||||
url: https://github.com/npm/rfcs
|
||||
about: Create a more formal proposal/idea via our RFC
|
||||
- name: 🚥 Registry Status
|
||||
url: https://status.npmjs.org
|
||||
about: Check the current status of the website/registry
|
||||
- name: 🗂 Documentation
|
||||
url: https://docs.npmjs.com
|
||||
about: Preview our new docs
|
||||
- name: 📫 Support
|
||||
url: https://github.community/
|
||||
about: For general support questions please open a topic over at github.community
|
||||
- name: 🚑 Support Policy
|
||||
url: https://github.com/npm/cli/wiki/Support-Policy
|
||||
about: Information about what version(s) of the CLI we support
|
|
@ -0,0 +1,37 @@
|
|||
name: 📄 CLI Docs Enhancement
|
||||
description: File a potential enhancement for the npm documentation
|
||||
title: "[DOCS] <title>"
|
||||
labels: [Documentation, Needs Triage]
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please [search here](https://github.com/npm/cli/issues) to see if an issue already exists for your problem.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: This is a CLI Docs Enhancement, not another kind of Docs Enhancement.
|
||||
description: These issue templates are only for CLI documentation enhancements. If you are looking to submit another kind of documentation enhancement, please submit it to the [documentation](https://github.com/npm/documentation) repo.
|
||||
options:
|
||||
- label: This is a CLI Docs Enhancement.
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description of Problem
|
||||
description: A clear & concise description of the current state of the docs.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Potential Solution
|
||||
description: A clear & concise description of the potential enhancement, if there is one.
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
attributes:
|
||||
label: Docs URL
|
||||
description: Please provide the URL of the page you'd like to see an enhancement to.
|
||||
validations:
|
||||
required: false
|
|
@ -0,0 +1,37 @@
|
|||
name: 📄 CLI Docs Problem
|
||||
description: File a problem with the npm documentation
|
||||
title: "[DOCS] <title>"
|
||||
labels: [Documentation, Needs Triage]
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please [search here](https://github.com/npm/cli/issues) to see if an issue already exists for your problem.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: This is a CLI Docs Problem, not another kind of Docs Problem.
|
||||
description: These issue templates are only for CLI documentation problems. If you are looking to submit another kind of documentation problem, please submit it to the [documentation](https://github.com/npm/documentation) repo.
|
||||
options:
|
||||
- label: This is a CLI Docs Problem.
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description of Problem
|
||||
description: A clear & concise description of what is wrong with the docs.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Potential Solution
|
||||
description: A clear & concise description of a potential solution or fix to the problem, if there is one.
|
||||
validations:
|
||||
required: false
|
||||
- type: input
|
||||
attributes:
|
||||
label: Affected URL
|
||||
description: Please provide the affected URL.
|
||||
validations:
|
||||
required: false
|
|
@ -0,0 +1,87 @@
|
|||
---
|
||||
name: Benchmark CLI - Comment
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
comment-handler:
|
||||
name: Trigger Benchmarks
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Handle Incoming Comment
|
||||
env:
|
||||
DISPATCH_REPO: "benchmarks"
|
||||
DISPATCH_OWNER: "npm"
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
OWNER: ${{ github.event.repository.owner.login }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
COMMENT_NODE_ID: ${{ github.event.comment.node_id }}
|
||||
COMMENT_ACTIONABLE: ${{ startsWith(github.event.comment.body, 'test this please ✅') }}
|
||||
AUTH_TOKEN: ${{ secrets.NPM_BENCHMARKS_TOKEN }}
|
||||
run: |
|
||||
# Comment Handler
|
||||
|
||||
# Creates an exit early condition if there are errors
|
||||
# Exit early if `jq` is not present
|
||||
set -e
|
||||
jq --version
|
||||
|
||||
# Figure out if comment came from pull-request or issue
|
||||
IS_PR=$(curl -s https://api.github.com/repos/${OWNER}/${REPO}/issues/${ISSUE_NUMBER} | jq -cr '.pull_request.url')
|
||||
|
||||
if [ "${IS_PR}" != "null" ]; then
|
||||
echo "Comment from pull/${ISSUE_NUMBER}."
|
||||
|
||||
# It is a pull-request; check comment body for correct phrase
|
||||
if [ "${COMMENT_ACTIONABLE}" == "true" ]; then
|
||||
# Fetch pull-request information
|
||||
PR_DATA=$(curl -s "${IS_PR}")
|
||||
PR_OWNER=$(echo "${PR_DATA}" | jq '.head.repo.owner.login')
|
||||
PR_REPO=$(echo "${PR_DATA}" | jq '.head.repo.name')
|
||||
|
||||
# dispatch request for benchmarks
|
||||
echo "Dispatching request..."
|
||||
curl \
|
||||
-s \
|
||||
-X POST https://api.github.com/repos/${DISPATCH_OWNER}/${DISPATCH_REPO}/dispatches \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: token ${AUTH_TOKEN}" \
|
||||
-d \
|
||||
'
|
||||
{
|
||||
"event_type": "'"${EVENT_NAME} ${PR_OWNER}/${PR_REPO}#${ISSUE_NUMBER}"'",
|
||||
"client_payload": {
|
||||
"pr_id": "'"${ISSUE_NUMBER}"'",
|
||||
"repo": "'"${PR_REPO}"'",
|
||||
"owner": "'"${PR_OWNER}"'"
|
||||
}
|
||||
}'
|
||||
|
||||
# Create reaction on comment to confirm dispatch was sent
|
||||
curl \
|
||||
-s \
|
||||
-X POST https://api.github.com/graphql \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: token ${AUTH_TOKEN}" \
|
||||
-d \
|
||||
'
|
||||
{
|
||||
"query": "mutation($inputData:AddReactionInput!) { addReaction(input:$inputData) { reaction { content } } }",
|
||||
"variables": {
|
||||
"inputData": {
|
||||
"subjectId": "'"${COMMENT_NODE_ID}"'",
|
||||
"content": "ROCKET"
|
||||
}
|
||||
}
|
||||
}'
|
||||
else
|
||||
echo "Comment not actionable."
|
||||
fi
|
||||
else
|
||||
echo "Comment not from pull-request."
|
||||
fi
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
name: Benchmark Suite
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Trigger Benchmarks
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Handle Incoming Pull-Request
|
||||
env:
|
||||
DISPATCH_REPO: "benchmarks"
|
||||
DISPATCH_OWNER: "npm"
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
PR_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
|
||||
AUTH_TOKEN: ${{ secrets.NPM_BENCHMARKS_TOKEN }}
|
||||
run: |
|
||||
# Dispatch Handler
|
||||
|
||||
dispatch_request () {
|
||||
echo "Dispatching request..."
|
||||
curl \
|
||||
-s \
|
||||
-X POST https://api.github.com/repos/${DISPATCH_OWNER}/${DISPATCH_REPO}/dispatches \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: token ${AUTH_TOKEN}" \
|
||||
-d \
|
||||
'
|
||||
{
|
||||
"event_type": "'"${EVENT_NAME} ${PR_OWNER}/${REPO}#${PR_NUMBER}"'",
|
||||
"client_payload": {
|
||||
"pr_id": "'"${PR_NUMBER}"'",
|
||||
"repo": "'"${REPO}"'",
|
||||
"owner": "'"${PR_OWNER}"'"
|
||||
}
|
||||
}'
|
||||
}
|
||||
|
||||
if [ "${AUTH_TOKEN}" != "" ]; then
|
||||
# Dispatch request for benchmarks
|
||||
dispatch_request
|
||||
else
|
||||
echo "NO AUTH - FORK PULL REQUEST"
|
||||
fi
|
|
@ -0,0 +1,52 @@
|
|||
name: Node CI docs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- docs/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- docs/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run lint -w docs
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
check_docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
- name: Rebuild the docs
|
||||
run: make freshdocs
|
||||
- name: Git should not be dirty
|
||||
run: node scripts/git-dirty.js
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmaccess
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmaccess/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmaccess/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmaccess
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmaccess --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmdiff
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmdiff/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmdiff/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmdiff
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmdiff --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmexec
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmexec/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmexec/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmexec
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmexec --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmfund
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmfund/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmfund/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmfund
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmfund --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmhook
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmhook/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmhook/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmhook
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmhook --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmorg
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmorg/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmorg/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmorg
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmorg --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmpack
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmpack/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmpack/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmpack
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmpack --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmpublish
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmpublish/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmpublish/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmpublish
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmpublish --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmsearch
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmsearch/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmsearch/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmsearch
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmsearch --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmteam
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmteam/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmteam/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmteam
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmteam --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI libnpmversion
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/libnpmversion/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/libnpmversion/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/libnpmversion
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/libnpmversion --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,76 @@
|
|||
name: Node Workspace CI @npmcli/arborist
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- workspaces/arborist/**
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
paths:
|
||||
- workspaces/arborist/**
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest -w workspaces/arborist
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
run: node ./bin/npm-cli.js run -w workspaces/arborist --ignore-scripts test -- -t600 -Rbase -c
|
|
@ -0,0 +1,166 @@
|
|||
name: Node CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
push:
|
||||
branches:
|
||||
- release-next
|
||||
- latest
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Run linting
|
||||
run: node ./bin/npm-cli.js run posttest
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
check_docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
- name: Rebuild the docs
|
||||
run: make freshdocs
|
||||
- name: Git should not be dirty
|
||||
run: node scripts/git-dirty.js
|
||||
|
||||
|
||||
licenses:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
cache: npm
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
- name: Validate licenses
|
||||
run: node ./bin/npm-cli.js run licenses
|
||||
|
||||
smoke-tests:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the smoke tests
|
||||
- name: Run Smoke tests
|
||||
run: node ./bin/npm-cli.js run --ignore-scripts smoke-tests -- --no-check-coverage -t600 -Rbase -c
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: ['12.13.0', 12.x, '14.15.0', 14.x, '16.0.0', 16.x]
|
||||
platform:
|
||||
- os: ubuntu-latest
|
||||
shell: bash
|
||||
- os: macos-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: bash
|
||||
- os: windows-latest
|
||||
shell: powershell
|
||||
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
defaults:
|
||||
run:
|
||||
shell: ${{ matrix.platform.shell }}
|
||||
|
||||
steps:
|
||||
# Checkout the npm/cli repo
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Installs the specific version of Node.js
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: npm
|
||||
|
||||
# Run the installer script
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
node ./bin/npm-cli.js install --ignore-scripts --no-audit
|
||||
node ./bin/npm-cli.js rebuild
|
||||
|
||||
# Run the tests, but not if we're just gonna do coveralls later anyway
|
||||
- name: Run Tap tests
|
||||
if: matrix.platform.os != 'ubuntu-latest' || matrix.node-version != '16.x'
|
||||
run: node ./bin/npm-cli.js run --ignore-scripts test -- -t600 -Rbase -c
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
|
||||
# Run coverage check
|
||||
- name: Run coverage report
|
||||
if: matrix.platform.os == 'ubuntu-latest' && matrix.node-version == '16.x'
|
||||
# turn off --check-coverage until 100%, so CI failure is relevant
|
||||
run: node ./bin/npm-cli.js run check-coverage -- -t600 --no-check-coverage -Rbase -c
|
||||
env:
|
||||
DEPLOY_VERSION: testing
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_OPTIONAL_TOKEN }}
|
||||
|
||||
# - name: Run sudo tests on Linux
|
||||
# if: matrix.os == 'ubuntu-latest'
|
||||
# run: sudo PATH=$PATH $(which node) . test -- --coverage --timeout 600
|
|
@ -0,0 +1,89 @@
|
|||
name: "Create CLI Deps PR"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
npmVersion:
|
||||
description: "6.x.x or latest"
|
||||
required: true
|
||||
default: 'latest'
|
||||
|
||||
|
||||
jobs:
|
||||
create-pull-request:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.NPM_ROBOT_USER_PAT }}
|
||||
NPM_VERSION: ${{ github.event.inputs.npmVersion }}
|
||||
SUPPORT_BRANCH: "v14.x-staging"
|
||||
steps:
|
||||
- name: Update gh cli & install jq parser
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt update
|
||||
sudo apt-get install -y jq
|
||||
sudo apt install gh
|
||||
- name: Checkout npm/node
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: master
|
||||
repository: "npm/node"
|
||||
token: ${{ secrets.NPM_ROBOT_USER_PAT }}
|
||||
- name: Pull (Fast-Forward) upstream
|
||||
id: sync
|
||||
uses: aormsby/Fork-Sync-With-Upstream-action@v2.1
|
||||
with:
|
||||
upstream_repository: nodejs/node
|
||||
upstream_branch: master
|
||||
target_branch: master
|
||||
git_pull_args: --ff-only # optional arg use, defaults to simple 'pull'
|
||||
github_token: ${{ secrets.NPM_ROBOT_USER_PAT }} # optional, for accessing repos that require authentication
|
||||
- name: Run dependency updates and create PR
|
||||
run: |
|
||||
npm_tag=""
|
||||
base_branch=""
|
||||
if [ "$NPM_VERSION" == "latest" ]
|
||||
then
|
||||
npm_tag=`npm view npm@latest version`
|
||||
base_branch="master"
|
||||
else
|
||||
npm_tag="$NPM_VERSION"
|
||||
base_branch="v14.x-staging"
|
||||
fi
|
||||
|
||||
git config user.name "npm team"
|
||||
git config user.email "ops+robot@npmjs.com"
|
||||
git checkout -b "npm-$npm_tag"
|
||||
|
||||
BASE_DIR="$( pwd )"/
|
||||
DEPS_DIR="$BASE_DIR"deps/
|
||||
|
||||
echo "Cloning CLI repo"
|
||||
gh repo clone npm/cli
|
||||
|
||||
echo "Prepping CLI repo for release"
|
||||
cd cli
|
||||
git checkout v"$npm_tag"
|
||||
make
|
||||
make release
|
||||
|
||||
|
||||
echo "Removing old npm"
|
||||
cd "$DEPS_DIR"
|
||||
rm -rf npm/
|
||||
|
||||
echo "Copying new npm"
|
||||
tar zxf "$BASE_DIR"cli/release/npm-"$npm_tag".tgz
|
||||
|
||||
echo "Removing CLI workspace"
|
||||
cd "$BASE_DIR"
|
||||
rm -rf cli
|
||||
|
||||
git add -A deps/npm
|
||||
git commit -m "deps: upgrade npm to $npm_tag"
|
||||
git rebase --whitespace=fix master
|
||||
git push origin "npm-$npm_tag"
|
||||
gh_release_body=`gh release view v"$npm_tag" -R npm/cli --json body | jq -r '.body'`
|
||||
|
||||
gh pr create -R "nodejs/node" -B "$base_branch" -H "npm:npm-$npm_tag" --title "deps: upgrade npm to $npm_tag" --body "$gh_release_body"
|
|
@ -0,0 +1,30 @@
|
|||
*.swp
|
||||
npm-debug.log
|
||||
/.nyc_output
|
||||
/test/output.log
|
||||
/test/*/*/node_modules
|
||||
/test/packages/npm-test-depends-on-spark/which-spark.log
|
||||
/test/packages/test-package/random-data.txt
|
||||
/test/root
|
||||
/node_modules/.bin
|
||||
/docs/output/
|
||||
/docs/node_modules/
|
||||
/man/
|
||||
/npmrc
|
||||
/release/
|
||||
/npm-*.tgz
|
||||
/node_modules/npm-registry-client/test/fixtures
|
||||
/test/fixtures/config/userconfig-with-gc
|
||||
/node_modules/npm-registry-couchapp
|
||||
*.pyc
|
||||
.jshintrc
|
||||
.eslintrc
|
||||
.nyc_output
|
||||
/test/npm_cache*
|
||||
/node_modules/.cache
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
/coverage
|
||||
/*.tgz
|
||||
/.editorconfig
|
||||
.vscode/
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"licenses": {
|
||||
"spdx": [
|
||||
"CC-BY-3.0"
|
||||
],
|
||||
"blueOak": "bronze"
|
||||
},
|
||||
"corrections": true
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
Alex K. Wolfe <alexkwolfe@gmail.com>
|
||||
Andrew Bradley <cspotcode@gmail.com>
|
||||
Andrew Lunny <alunny@gmail.com>
|
||||
Arlo Breault <arlolra@gmail.com>
|
||||
Ashley Williams <ashley@npmjs.com> <ashley666ashley@gmail.com>
|
||||
Ashley Williams <ashley@npmjs.com> <ashley@bocoup.com>
|
||||
Benjamin Coe <bencoe@gmail.com>
|
||||
Benjamin Coe <bencoe@gmail.com> <ben@npmjs.com>
|
||||
Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
|
||||
Cedric Nelson <cedric.nelson@gmail.com>
|
||||
Charlie Robbins <charlie.robbins@gmail.com>
|
||||
Claudia Hernández <cghr1990@gmail.com>
|
||||
Dalmais Maxence <root@ip-10-195-202-5.ec2.internal>
|
||||
Danila Gerasimov <danila.gerasimov@gmail.com>
|
||||
Dave Galbraith <dave@jut.io>
|
||||
David Beitey <david@davidjb.com>
|
||||
David Rousselie <guido.dassori@gmail.com>
|
||||
Domenic Denicola <domenic@domenicdenicola.com>
|
||||
Einar Otto Stangvik <einaros@gmail.com>
|
||||
Emma Ramirez <ramirez.emma.g@gmail.com>
|
||||
Erik Wienhold <git@ewie.name>
|
||||
Evan Lucas <evan@btc.com> <evan.lucas@hattiesburgclinic.com>
|
||||
Evan Lucas <evan@btc.com> <evanlucas@me.com>
|
||||
Faiq Raza <faiqrazarizvi@gmail.com>
|
||||
Forbes Lindesay <forbes@lindesay.co.uk>
|
||||
Forrest L Norvell <ogd@aoaioxxysz.net> <forrest@npmjs.com>
|
||||
Forrest L Norvell <ogd@aoaioxxysz.net> <othiym23@gmail.com>
|
||||
Gabriel Barros <descartavel1@gmail.com>
|
||||
Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)>
|
||||
Gregers Gram Rygg <gregers.gram.rygg@finn.no>
|
||||
Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com>
|
||||
isaacs <i@izs.me> <i@foohack.com>
|
||||
isaacs <i@izs.me> <nope@not.real>
|
||||
isaacs <i@izs.me> <isaacs@npmjs.com>
|
||||
Jake Verbaten <raynos2@gmail.com>
|
||||
James Sanders <jimmyjazz14@gmail.com>
|
||||
James Treworgy <jamietre@gmail.com>
|
||||
Jason Smith <jhs@iriscouch.com>
|
||||
Jed Fox <git@twopointzero.us>
|
||||
Jonas Weber <github@jonasw.de>
|
||||
Joshua Bennett <legodudejb@gmail.com>
|
||||
Joshua Bennett <legodudejb@gmail.com> <legodude17@users.noreply.github.com>
|
||||
Julien Meddah <julien.meddah@deveryware.com>
|
||||
Kat Marchán <kzm@zkat.tech> <kzm@sykosomatic.org>
|
||||
Kevin Lorenz <mail@kevinlorenz.com>
|
||||
Kris Windham <kriswindham@gmail.com>
|
||||
Leonardo Rojas <leonardo.rojas@shopify.com>
|
||||
Lin Clark <lin.w.clark@gmail.com>
|
||||
Luke Arduini <luke.arduini@gmail.com> <luke.arduini@me.com>
|
||||
Maciej Małecki <me@mmalecki.com> <maciej.malecki@notimplemented.org>
|
||||
Martin Ek <mail@ekmartin.com>
|
||||
Max Goodman <c@chromakode.com>
|
||||
Maxim Bogushevich <boga1@mail.ru>
|
||||
Maximilian Antoni <mail@maxantoni.de> <maximilian.antoni@juliusbaer.com>
|
||||
Michael Hayes <michael@hayes.io> <mhayes@newrelic.com>
|
||||
Misha Kaletsky <misha.kaletsky@gmail.com>
|
||||
Nicolas Morel <marsup@gmail.com>
|
||||
Olivier Melcher <olivier.melcher@gmail.com>
|
||||
Ra'Shaun Stovall <rashaunstovall@gmail.com>
|
||||
Rebecca Turner <me@re-becca.org> <rebecca@npmjs.com>
|
||||
Rebecca Turner <me@re-becca.org> <turner@mikomi.org>
|
||||
Ryan Emery <seebees@gmail.com>
|
||||
Sam Mikes <smikes@cubane.com>
|
||||
Sreenivas Alapati <sreenivas9alapati@gmail.com>
|
||||
Stephanie Snopek <stephaniesnopek@gmail.com>
|
||||
Takaya Kobayashi <jigsaw@live.jp>
|
||||
Ted Yavuzkurt <hello@TedY.io> <davidteoman@gmail.com>
|
||||
Thomas Reggi <thomas@reggi.com>
|
||||
Timo Weiß <timoweiss@Timo-MBP.local>
|
||||
Tony <zearin@gonk.net>
|
||||
Trent Mick <trentm@gmail.com> <trent.mick@joyent.com>
|
||||
Visnu Pitiyanuvath <visnupx@gmail.com>
|
||||
Will Elwood <w.elwood08@gmail.com>
|
||||
Wout Mertens <Wout.Mertens@gmail.com>
|
||||
Yeonghoon Park <sola92@gmail.com>
|
||||
Zeke Sikelianos <zeke@sikelianos.com>
|
||||
Zoujie Wzj <zoujie.wzj@alibaba-inc.com>
|
|
@ -0,0 +1,827 @@
|
|||
# Authors sorted by whether or not they're me
|
||||
isaacs <i@izs.me>
|
||||
Steve Steiner <ssteinerX@gmail.com>
|
||||
Mikeal Rogers <mikeal.rogers@gmail.com>
|
||||
Aaron Blohowiak <aaron.blohowiak@gmail.com>
|
||||
Martyn Smith <martyn@dollyfish.net.nz>
|
||||
Charlie Robbins <charlie.robbins@gmail.com>
|
||||
Francisco Treacy <francisco.treacy@gmail.com>
|
||||
Cliffano Subagio <cliffano@gmail.com>
|
||||
Christian Eager <christian.eager@nokia.com>
|
||||
Dav Glass <davglass@gmail.com>
|
||||
Alex K. Wolfe <alexkwolfe@gmail.com>
|
||||
James Sanders <jimmyjazz14@gmail.com>
|
||||
Reid Burke <me@reidburke.com>
|
||||
Arlo Breault <arlolra@gmail.com>
|
||||
Timo Derstappen <teemow@gmail.com>
|
||||
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
|
||||
Ben Noordhuis <info@bnoordhuis.nl>
|
||||
Tor Valamo <tor.valamo@gmail.com>
|
||||
Whyme.Lyu <5longluna@gmail.com>
|
||||
Olivier Melcher <olivier.melcher@gmail.com>
|
||||
Tomaž Muraus <kami@k5-storitve.net>
|
||||
Evan Meagher <evan.meagher@gmail.com>
|
||||
Orlando Vazquez <ovazquez@gmail.com>
|
||||
Kai Chen <kaichenxyz@gmail.com>
|
||||
George Miroshnykov <gmiroshnykov@lohika.com>
|
||||
Geoff Flarity <geoff.flarity@gmail.com>
|
||||
Max Goodman <c@chromakode.com>
|
||||
Pete Kruckenberg <pete@kruckenberg.com>
|
||||
Laurie Harper <laurie@holoweb.net>
|
||||
Chris Wong <chris@chriswongstudio.com>
|
||||
Scott Bronson <brons_github@rinspin.com>
|
||||
Federico Romero <federomero@gmail.com>
|
||||
Visnu Pitiyanuvath <visnupx@gmail.com>
|
||||
Irakli Gozalishvili <rfobic@gmail.com>
|
||||
Mark Cahill <mark@tiemonster.info>
|
||||
Tony <zearin@gonk.net>
|
||||
Iain Sproat <iainsproat@gmail.com>
|
||||
Trent Mick <trentm@gmail.com>
|
||||
Felix Geisendörfer <felix@debuggable.com>
|
||||
Jameson Little <t.jameson.little@gmail.com>
|
||||
Conny Brunnkvist <conny@fuchsia.se>
|
||||
Will Elwood <w.elwood08@gmail.com>
|
||||
Dean Landolt <dean@deanlandolt.com>
|
||||
Oleg Efimov <efimovov@gmail.com>
|
||||
Martin Cooper <mfncooper@gmail.com>
|
||||
Jann Horn <jannhorn@googlemail.com>
|
||||
Andrew Bradley <cspotcode@gmail.com>
|
||||
Maciej Małecki <me@mmalecki.com>
|
||||
Stephen Sugden <glurgle@gmail.com>
|
||||
Michael Budde <mbudde@gmail.com>
|
||||
Jason Smith <jhs@iriscouch.com>
|
||||
Gautham Pai <buzypi@gmail.com>
|
||||
David Trejo <david.daniel.trejo@gmail.com>
|
||||
Paul Vorbach <paul@vorb.de>
|
||||
George Ornbo <george@shapeshed.com>
|
||||
Tim Oxley <secoif@gmail.com>
|
||||
Tyler Green <tyler.green2@gmail.com>
|
||||
Dave Pacheco <dap@joyent.com>
|
||||
Danila Gerasimov <danila.gerasimov@gmail.com>
|
||||
Rod Vagg <rod@vagg.org>
|
||||
Christian Howe <coderarity@gmail.com>
|
||||
Andrew Lunny <alunny@gmail.com>
|
||||
Henrik Hodne <dvyjones@binaryhex.com>
|
||||
Adam Blackburn <regality@gmail.com>
|
||||
Kris Windham <kriswindham@gmail.com>
|
||||
Jens Grunert <jens.grunert@gmail.com>
|
||||
Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
|
||||
Dalmais Maxence <root@ip-10-195-202-5.ec2.internal>
|
||||
Marcus Ekwall <marcus.ekwall@gmail.com>
|
||||
Aaron Stacy <aaron.r.stacy@gmail.com>
|
||||
Phillip Howell <phowell@cothm.org>
|
||||
Domenic Denicola <domenic@domenicdenicola.com>
|
||||
James Halliday <mail@substack.net>
|
||||
Jeremy Cantrell <jmcantrell@gmail.com>
|
||||
Ribettes <patlogan29@gmail.com>
|
||||
Don Park <donpark@docuverse.com>
|
||||
Einar Otto Stangvik <einaros@gmail.com>
|
||||
Kei Son <heyacct@gmail.com>
|
||||
Nicolas Morel <marsup@gmail.com>
|
||||
Mark Dube <markisdee@gmail.com>
|
||||
Nathan Rajlich <nathan@tootallnate.net>
|
||||
Maxim Bogushevich <boga1@mail.ru>
|
||||
Meaglin <Meaglin.wasabi@gmail.com>
|
||||
Ben Evans <ben@bensbit.co.uk>
|
||||
Nathan Zadoks <nathan@nathan7.eu>
|
||||
Brian White <mscdex@mscdex.net>
|
||||
Jed Schmidt <tr@nslator.jp>
|
||||
Ian Livingstone <ianl@cs.dal.ca>
|
||||
Patrick Pfeiffer <patrick@buzzle.at>
|
||||
Paul Miller <paul@paulmillr.com>
|
||||
Ryan Emery <seebees@gmail.com>
|
||||
Carl Lange <carl@flax.ie>
|
||||
Jan Lehnardt <jan@apache.org>
|
||||
Stuart P. Bentley <stuart@testtrack4.com>
|
||||
Johan Sköld <johan@skold.cc>
|
||||
Stuart Knightley <stuart@stuartk.com>
|
||||
Niggler <nirk.niggler@gmail.com>
|
||||
Paolo Fragomeni <paolo@async.ly>
|
||||
Jaakko Manninen <jaakko@rocketpack.fi>
|
||||
Luke Arduini <luke.arduini@gmail.com>
|
||||
Larz Conwell <larz@larz-laptop.(none)>
|
||||
Marcel Klehr <mklehr@gmx.net>
|
||||
Robert Kowalski <rok@kowalski.gd>
|
||||
Forbes Lindesay <forbes@lindesay.co.uk>
|
||||
Vaz Allen <vaz@tryptid.com>
|
||||
Jake Verbaten <raynos2@gmail.com>
|
||||
Schabse Laks <Dev@SLaks.net>
|
||||
Florian Margaine <florian@margaine.com>
|
||||
Johan Nordberg <its@johan-nordberg.com>
|
||||
Ian Babrou <ibobrik@gmail.com>
|
||||
Di Wu <dwu@palantir.com>
|
||||
Mathias Bynens <mathias@qiwi.be>
|
||||
Matt McClure <matt.mcclure@mapmyfitness.com>
|
||||
Matt Lunn <matt@mattlunn.me.uk>
|
||||
Alexey Kreschuk <akrsch@gmail.com>
|
||||
elisee <elisee@sparklin.org>
|
||||
Robert Gieseke <robert.gieseke@gmail.com>
|
||||
François Frisch <francoisfrisch@gmail.com>
|
||||
Trevor Burnham <tburnham@hubspot.com>
|
||||
Alan Shaw <alan@freestyle-developments.co.uk>
|
||||
TJ Holowaychuk <tj@vision-media.ca>
|
||||
Nicholas Kinsey <pyro@feisty.io>
|
||||
Paulo Cesar <pauloc062@gmail.com>
|
||||
Elan Shanker <elan.shanker@gmail.com>
|
||||
Jon Spencer <jon@jonspencer.ca>
|
||||
Jason Diamond <jason@diamond.name>
|
||||
Maximilian Antoni <mail@maxantoni.de>
|
||||
Thom Blake <tblake@brightroll.com>
|
||||
Jess Martin <jessmartin@gmail.com>
|
||||
Spain Train <michael.spainhower@opower.com>
|
||||
Alex Rodionov <p0deje@gmail.com>
|
||||
Matt Colyer <matt@colyer.name>
|
||||
Evan You <yyx990803@gmail.com>
|
||||
bitspill <bitspill+github@bitspill.net>
|
||||
Gabriel Falkenberg <gabriel.falkenberg@gmail.com>
|
||||
Alexej Yaroshevich <alex@qfox.ru>
|
||||
Quim Calpe <quim@kalpe.com>
|
||||
Steve Mason <stevem@brandwatch.com>
|
||||
Wil Moore III <wil.moore@wilmoore.com>
|
||||
Sergey Belov <peimei@ya.ru>
|
||||
Tom Huang <hzlhu.dargon@gmail.com>
|
||||
CamilleM <camille.moulin@alterway.fr>
|
||||
Sébastien Santoro <dereckson@espace-win.org>
|
||||
Evan Lucas <evan@btc.com>
|
||||
Quinn Slack <qslack@qslack.com>
|
||||
Alex Kocharin <alex@kocharin.ru>
|
||||
Daniel Santiago <daniel.santiago@highlevelwebs.com>
|
||||
Denis Gladkikh <outcoldman@gmail.com>
|
||||
Andrew Horton <andrew.j.horton@gmail.com>
|
||||
Zeke Sikelianos <zeke@sikelianos.com>
|
||||
Dylan Greene <dylang@gmail.com>
|
||||
Franck Cuny <franck.cuny@gmail.com>
|
||||
Yeonghoon Park <sola92@gmail.com>
|
||||
Rafael de Oleza <rafa@spotify.com>
|
||||
Mikola Lysenko <mikolalysenko@gmail.com>
|
||||
Yazhong Liu <yorkiefixer@gmail.com>
|
||||
Neil Gentleman <ngentleman@gmail.com>
|
||||
Kris Kowal <kris.kowal@cixar.com>
|
||||
Alex Gorbatchev <alex.gorbatchev@gmail.com>
|
||||
Shawn Wildermuth <shawn@wildermuth.com>
|
||||
Wesley de Souza <wesleywex@gmail.com>
|
||||
yoyoyogi <yogesh.k@gmail.com>
|
||||
J. Tangelder <j.tangelder@gmail.com>
|
||||
Jean Lauliac <jean@lauliac.com>
|
||||
Andrey Kislyuk <kislyuk@gmail.com>
|
||||
Thorsten Lorenz <thlorenz@gmx.de>
|
||||
Julian Gruber <julian@juliangruber.com>
|
||||
Benjamin Coe <bencoe@gmail.com>
|
||||
Alex Ford <Alex.Ford@CodeTunnel.com>
|
||||
Matt Hickford <matt.hickford@gmail.com>
|
||||
Sean McGivern <sean.mcgivern@rightscale.com>
|
||||
C J Silverio <ceejceej@gmail.com>
|
||||
Robin Tweedie <robin@songkick.com>
|
||||
Miroslav Bajtoš <miroslav@strongloop.com>
|
||||
David Glasser <glasser@davidglasser.net>
|
||||
Gianluca Casati <casati_gianluca@yahoo.it>
|
||||
Forrest L Norvell <ogd@aoaioxxysz.net>
|
||||
Karsten Tinnefeld <k.tinnefeld@googlemail.com>
|
||||
Bryan Burgers <bryan@burgers.io>
|
||||
David Beitey <david@davidjb.com>
|
||||
Evan You <yyou@google.com>
|
||||
Zach Pomerantz <zmp@umich.edu>
|
||||
Chris Williams <cwilliams88@gmail.com>
|
||||
sudodoki <smd.deluzion@gmail.com>
|
||||
Mick Thompson <dthompson@gmail.com>
|
||||
Felix Rabe <felix@rabe.io>
|
||||
Michael Hayes <michael@hayes.io>
|
||||
Chris Dickinson <christopher.s.dickinson@gmail.com>
|
||||
Bradley Meck <bradley.meck@gmail.com>
|
||||
GeJ <geraud@gcu.info>
|
||||
Andrew Terris <atterris@gmail.com>
|
||||
Michael Nisi <michael.nisi@gmail.com>
|
||||
fengmk2 <fengmk2@gmail.com>
|
||||
Adam Meadows <adam.meadows@gmail.com>
|
||||
Chulki Lee <chulki.lee@gmail.com>
|
||||
不四 <busi.hyy@taobao.com>
|
||||
dead_horse <dead_horse@qq.com>
|
||||
Kenan Yildirim <kenan@kenany.me>
|
||||
Laurie Voss <git@seldo.com>
|
||||
Rebecca Turner <me@re-becca.org>
|
||||
Hunter Loftis <hunter@hunterloftis.com>
|
||||
Peter Richardson <github@zoomy.net>
|
||||
Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
|
||||
Filip Weiss <me@fiws.net>
|
||||
Timo Weiß <timoweiss@Timo-MBP.local>
|
||||
Christopher Hiller <chiller@badwing.com>
|
||||
Jérémy Lal <kapouer@melix.org>
|
||||
Anders Janmyr <anders@janmyr.com>
|
||||
Chris Meyers <chris.meyers.fsu@gmail.com>
|
||||
Ludwig Magnusson <ludwig@mediatool.com>
|
||||
Wout Mertens <Wout.Mertens@gmail.com>
|
||||
Nick Santos <nick@medium.com>
|
||||
Terin Stock <terinjokes@gmail.com>
|
||||
Faiq Raza <faiqrazarizvi@gmail.com>
|
||||
Thomas Torp <thomas@erupt.no>
|
||||
Sam Mikes <smikes@cubane.com>
|
||||
Mat Tyndall <mat.tyndall@gmail.com>
|
||||
Tauren Mills <tauren@sportzing.com>
|
||||
Ron Martinez <ramartin.net@gmail.com>
|
||||
Kazuhito Hokamura <k.hokamura@gmail.com>
|
||||
Tristan Davies <github@tristan.io>
|
||||
David Volm <david@volminator.com>
|
||||
Lin Clark <lin.w.clark@gmail.com>
|
||||
Ben Page <bpage@dewalch.com>
|
||||
Jeff Jo <jeffjo@squareup.com>
|
||||
martinvd <martinvdpub@gmail.com>
|
||||
Mark J. Titorenko <nospam-github.com@titorenko.net>
|
||||
Oddur Sigurdsson <oddurs@gmail.com>
|
||||
Eric Mill <eric@konklone.com>
|
||||
Gabriel Barros <descartavel1@gmail.com>
|
||||
KevinSheedy <kevinsheedy@gmail.com>
|
||||
Aleksey Smolenchuk <aleksey@uber.com>
|
||||
Ed Morley <emorley@mozilla.com>
|
||||
Blaine Bublitz <blaine@iceddev.com>
|
||||
Andrey Fedorov <anfedorov@gmail.com>
|
||||
Daijiro Wachi <daijiro.wachi@gmail.com>
|
||||
Luc Thevenard <lucthevenard@gmail.com>
|
||||
Aria Stewart <aredridel@nbtsc.org>
|
||||
Charlie Rudolph <charles.w.rudolph@gmail.com>
|
||||
Vladimir Rutsky <rutsky@users.noreply.github.com>
|
||||
Isaac Murchie <isaac@saucelabs.com>
|
||||
Marcin Wosinek <marcin.wosinek@gmail.com>
|
||||
David Marr <davemarr@gmail.com>
|
||||
Bryan English <bryan@bryanenglish.com>
|
||||
Anthony Zotti <amZotti@users.noreply.github.com>
|
||||
Karl Horky <karl.horky@gmail.com>
|
||||
Jordan Harband <ljharb@gmail.com>
|
||||
Guðlaugur Stefán Egilsson <gulli@kolibri.is>
|
||||
Helge Skogly Holm <helge.holm@gmail.com>
|
||||
Peter A. Shevtsov <petr.shevtsov@gmail.com>
|
||||
Alain Kalker <a.c.kalker@gmail.com>
|
||||
Bryant Williams <b.n.williams@gmail.com>
|
||||
Jonas Weber <github@jonasw.de>
|
||||
Tim Whidden <twhid@twhid.com>
|
||||
Andreas <functino@users.noreply.github.com>
|
||||
Karolis Narkevicius <karolis.n@gmail.com>
|
||||
Adrian Lynch <adi_ady_ade@hotmail.com>
|
||||
Richard Littauer <richard.littauer@gmail.com>
|
||||
Oli Evans <oli@zilla.org.uk>
|
||||
Matt Brennan <mattyb1000@gmail.com>
|
||||
Jeff Barczewski <jeff.barczewski@gmail.com>
|
||||
Danny Fritz <dannyfritz@gmail.com>
|
||||
Takaya Kobayashi <jigsaw@live.jp>
|
||||
Ra'Shaun Stovall <rashaunstovall@gmail.com>
|
||||
Julien Meddah <julien.meddah@deveryware.com>
|
||||
Michiel Sikma <michiel@wedemandhtml.com>
|
||||
Jakob Krigovsky <jakob.krigovsky@gmail.com>
|
||||
Charmander <~@charmander.me>
|
||||
Erik Wienhold <git@ewie.name>
|
||||
James Butler <james.butler@sandfox.co.uk>
|
||||
Kevin Kragenbrink <kevin@gaikai.com>
|
||||
Arnaud Rinquin <rinquin.arnaud@gmail.com>
|
||||
Mike MacCana <mike.maccana@gmail.com>
|
||||
Antti Mattila <anttti@fastmail.fm>
|
||||
laiso <laiso@lai.so>
|
||||
Matt Zorn <zornme@gmail.com>
|
||||
Kyle Mitchell <kyle@kemitchell.com>
|
||||
Jeremiah Senkpiel <fishrock123@rocketmail.com>
|
||||
Michael Klein <mischkl@users.noreply.github.com>
|
||||
Simen Bekkhus <sbekkhus91@gmail.com>
|
||||
Victor <victor.shih@gmail.com>
|
||||
thefourtheye <thechargingvolcano@gmail.com>
|
||||
Clay Carpenter <claycarpenter@gmail.com>
|
||||
bangbang93 <bangbang93@163.com>
|
||||
Nick Malaguti <nmalaguti@palantir.com>
|
||||
Cedric Nelson <cedric.nelson@gmail.com>
|
||||
Kat Marchán <kzm@zkat.tech>
|
||||
Andrew <talktome@aboutandrew.co.uk>
|
||||
Eduardo Pinho <enet4mikeenet@gmail.com>
|
||||
Rachel Hutchison <rhutchix@intel.com>
|
||||
Ryan Temple <ryantemple145@gmail.com>
|
||||
Eugene Sharygin <eush77@gmail.com>
|
||||
James Talmage <james@talmage.io>
|
||||
jane arc <jane@uber.com>
|
||||
Joseph Dykstra <josephdykstra@gmail.com>
|
||||
Andrew Crites <ajcrites@gmail.com>
|
||||
Joshua Egan <josh-egan@users.noreply.github.com>
|
||||
Carlos Alberto <euprogramador@gmail.com>
|
||||
Thomas Cort <thomasc@ssimicro.com>
|
||||
Thaddee Tyl <thaddee.tyl@gmail.com>
|
||||
Steve Klabnik <steve@steveklabnik.com>
|
||||
Andrew Murray <radarhere@gmail.com>
|
||||
Stephan Bönnemann <stephan@excellenteasy.com>
|
||||
Kyle M. Tarplee <kyle.tarplee@numerica.us>
|
||||
Derek Peterson <derekpetey@gmail.com>
|
||||
Greg Whiteley <greg.whiteley@atomos.com>
|
||||
murgatroid99 <mlumish@google.com>
|
||||
Marcin Cieslak <saper@saper.info>
|
||||
João Reis <reis@janeasystems.com>
|
||||
Matthew Hasbach <hasbach.git@gmail.com>
|
||||
Jon Hall <jon_hall@outlook.com>
|
||||
Anna Henningsen <sqrt@entless.org>
|
||||
James Treworgy <jamietre@gmail.com>
|
||||
James Hartig <james@levenlabs.com>
|
||||
Stephanie Snopek <stephaniesnopek@gmail.com>
|
||||
Kent C. Dodds <kent@doddsfamily.us>
|
||||
Aaron Krause <aaronjkrause@gmail.com>
|
||||
Daniel K O'Leary <daniel@dko.io>
|
||||
fscherwi <fscherwi@users.noreply.github.com>
|
||||
Thomas Reggi <thomas@reggi.com>
|
||||
Thomas Michael McTiernan <thomasmctiernan@gmail.com>
|
||||
Jason Kurian <JaKXz@users.noreply.github.com>
|
||||
Sebastiaan Deckers <seb@ninja.sg>
|
||||
lady3bean <lady3bean@users.noreply.github.com>
|
||||
Tomi Carr <TaMe3971@users.noreply.github.com>
|
||||
Juan Caicedo <retiredcanadianpoet@gmail.com>
|
||||
Ashley Williams <ashley@npmjs.com>
|
||||
Andrew Marcinkevičius <andrew.web@ifdattic.com>
|
||||
Jorrit Schippers <jorrit@ncode.nl>
|
||||
Alex Lukin <alex.lukin@softgrad.com>
|
||||
Aria Stewart <aredridel@dinhe.net>
|
||||
Tiago Rodrigues <tmcrodrigues@gmail.com>
|
||||
Tim <tim-github@baverstock.org.uk>
|
||||
Nick Williams <WickyNilliams@users.noreply.github.com>
|
||||
Louis Larry <louis.larry@gmail.com>
|
||||
Ben Gotow <bengotow@gmail.com>
|
||||
Jakub Gieryluk <jakub.g.opensource@gmail.com>
|
||||
Kevin Lorenz <mail@kevinlorenz.com>
|
||||
Martin von Gagern <Martin.vGagern@gmx.net>
|
||||
Eymen Gunay <eymen@egunay.com>
|
||||
Martin Ek <mail@ekmartin.com>
|
||||
Rafał Pocztarski <r.pocztarski@gmail.com>
|
||||
Mark Reeder <mreeder@uber.com>
|
||||
Chris Rebert <github@chrisrebert.com>
|
||||
Scott Addie <tobias.addie@gmail.com>
|
||||
Jeff McMahan <jeffrey.lee.mcmahan@gmail.com>
|
||||
Tim Krins <timkrins@gmail.com>
|
||||
Hal Henke <halhenke@gmail.com>
|
||||
Julian Simioni <julian@simioni.org>
|
||||
Jimb Esser <jimb@yahoo-inc.com>
|
||||
Alexis Campailla <alexis@janeasystems.com>
|
||||
Chris Chua <chris.sirhc@gmail.com>
|
||||
Beau Gunderson <beau@beaugunderson.com>
|
||||
Dave Galbraith <dave@jut.io>
|
||||
s100 <shughes1@uk.ibm.com>
|
||||
Sergey Simonchik <sergey.simonchik@jetbrains.com>
|
||||
Vanja Radovanović <elvanja@gmail.com>
|
||||
Jonathan Persson <persson.jonathan@gmail.com>
|
||||
Vedat Mahir YILMAZ <mahir@vedatmahir.com>
|
||||
Samuel Reed <samuel.trace.reed@gmail.com>
|
||||
Rafał Legiędź <rafal.legiedz@gmail.com>
|
||||
Jan Schär <jscissr@gmail.com>
|
||||
Xcat Liu <xcatliu@gmail.com>
|
||||
harryh <Aourin@users.noreply.github.com>
|
||||
Prayag Verma <prayag.verma@gmail.com>
|
||||
Neil Kistner <neil.kistner@gmail.com>
|
||||
Zoujie Wzj <zoujie.wzj@alibaba-inc.com>
|
||||
Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
|
||||
Arturo Coronel <aoitsu3@gmail.com>
|
||||
Hutson Betts <hbetts@factset.com>
|
||||
Lewis Cowper <lewis.cowper@googlemail.com>
|
||||
Adam Byrne <misterbyrne@gmail.com>
|
||||
Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com>
|
||||
Robert Ludwig <rob.ludwig@rideamigos.com>
|
||||
Chris Warren <chris@ixalon.net>
|
||||
Scott Plumlee <scott@plumlee.org>
|
||||
Daniel Pedersen <daniel@scandinav.se>
|
||||
rhgb <kaiserdaemon@gmail.com>
|
||||
doug.wade <doug.wade@redfin.com>
|
||||
Zac <zdoege@gm.slc.edu>
|
||||
GriffinSchneider <griffinschneider@gmail.com>
|
||||
Andres Kalle <mjomble@gmail.com>
|
||||
thefourtheye <thefourtheye@users.noreply.github.com>
|
||||
Yael <yaelz@users.noreply.github.com>
|
||||
Yann Odeyer <yann@odeyer.com>
|
||||
James Monger <jameskmonger@hotmail.co.uk>
|
||||
Thomas Hallock <thomas@1stdibs.com>
|
||||
Paul Irish <paul.irish@gmail.com>
|
||||
Paul O'Leary McCann <polm@dampfkraft.com>
|
||||
Francis Gulotta <wizard@roborooter.com>
|
||||
Felix Rieseberg <felix@felixrieseberg.com>
|
||||
Glen Mailer <glenjamin@gmail.com>
|
||||
Federico Brigante <bfred-it@users.noreply.github.com>
|
||||
Steve Mao <maochenyan@gmail.com>
|
||||
Anna Henningsen <anna@addaleax.net>
|
||||
Rachel Evans <git@rve.org.uk>
|
||||
Sam Minnee <sam@silverstripe.com>
|
||||
Zirak <zirakertan@gmail.com>
|
||||
Daniel Lupu <lupu.daniel.f@gmail.com>
|
||||
Gianluca Casati <fibo@users.noreply.github.com>
|
||||
André Herculano <andresilveirah@gmail.com>
|
||||
Wyatt Preul <wpreul@gmail.com>
|
||||
Myles Borins <mborins@us.ibm.com>
|
||||
Elliot Lee <github.public@intelliot.com>
|
||||
Dmitry Kirilyuk <gk.joker@gmail.com>
|
||||
Aaron Tribou <aaron.tribou@gmail.com>
|
||||
Tapani Moilanen <moilanen.tapani@gmail.com>
|
||||
Han Seoul-Oh <laughinghan@gmail.com>
|
||||
Aleksey Shvayka <shvaikalesh@gmail.com>
|
||||
Emma Ramirez <ramirez.emma.g@gmail.com>
|
||||
Julian Duque <julianduquej@gmail.com>
|
||||
Simon MacDonald <simon.macdonald@gmail.com>
|
||||
Adam Stankiewicz <sheerun@sher.pl>
|
||||
Gregers Gram Rygg <gregers.gram.rygg@finn.no>
|
||||
Peter Dave Hello <hsu@peterdavehello.org>
|
||||
Jordan Klassen <forivall@gmail.com>
|
||||
Jason Palmer <jason@jason-palmer.com>
|
||||
Michael Hart <michael.hart.au@gmail.com>
|
||||
Sasha Koss <koss@nocorp.me>
|
||||
David Emmerson <david.emmerson@gmail.com>
|
||||
Christophe Hurpeau <christophe@hurpeau.com>
|
||||
Daniel Paz-Soldan <daniel.pazsoldan@gmail.com>
|
||||
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
||||
Zach Renner <zarenner@microsoft.com>
|
||||
Christopher Hiller <boneskull@boneskull.com>
|
||||
Joshua Bennett <legodudejb@gmail.com>
|
||||
Andrew Meyer <andrewm.bpi@gmail.com>
|
||||
Michael Jasper <mdjasper@gmail.com>
|
||||
Max <contact@mstoiber.com>
|
||||
Szymon Nowak <szimek@gmail.com>
|
||||
Jason Karns <jason.karns@gmail.com>
|
||||
Lucas Holmquist <lholmqui@redhat.com>
|
||||
Ionică Bizău <bizauionica@gmail.com>
|
||||
Alex Chesters <AlexChesters@users.noreply.github.com>
|
||||
Robert Gay <robert.gay@redfin.com>
|
||||
Steven <stevokk@hotmail.com>
|
||||
Tim Caswell <tim@creationix.com>
|
||||
Anna Henningsen <github@addaleax.net>
|
||||
Kim Røen <kim@kimroen.com>
|
||||
Douglas Wilson <dougwilson@live.com>
|
||||
Mike Engel <mike@mike-engel.com>
|
||||
baderbuddy <baderbuddy@gmail.com>
|
||||
Alex Jordan <alex@strugee.net>
|
||||
Ville Lahdenvuo <tuhoojabotti@gmail.com>
|
||||
Natalie Wolfe <nwolfe@newrelic.com>
|
||||
Andrew Schmadel <aschmadel@learningobjects.com>
|
||||
Jonah Moses <jonahkmoses@gmail.com>
|
||||
Daijirō Wachi <daijiro.wachi@gmail.com>
|
||||
Dmitry Litvinchenko <karaliti@gmail.com>
|
||||
chocolateboy <chocolate@cpan.org>
|
||||
Henry Zhu <hi@henryzoo.com>
|
||||
Nate Goldman <ungoldman@gmail.com>
|
||||
Ted Yavuzkurt <hello@TedY.io>
|
||||
Arseniy Maximov <localhost@kern0.ru>
|
||||
Evgeny Kulikov <beyondcompute@users.noreply.github.com>
|
||||
Сковорода Никита Андреевич <chalkerx@gmail.com>
|
||||
Carol (Nichols || Goulding) <carol.nichols@gmail.com>
|
||||
Jarid Margolin <jaridmargolin@gmail.com>
|
||||
David Cook <divergentdave@gmail.com>
|
||||
Brian Dukes <bdukes@engagesoftware.com>
|
||||
Jed Fox <git@twopointzero.us>
|
||||
Pavlo Liulia <pavloblack@hotmail.com>
|
||||
Ján Dzurek <famousgarkin@outlook.com>
|
||||
Lucas Theisen <ltheisen@mitre.org>
|
||||
Mike Sherov <mike.sherov@gmail.com>
|
||||
薛定谔的猫 <hh_2013@foxmail.com>
|
||||
Paweł Lula <pavloblack@hotmail.com>
|
||||
Jakob Krigovsky <jakob@krigovsky.com>
|
||||
George Rawlinson <george@rawlinson.net.nz>
|
||||
Jack Nagel <jacknagel@users.noreply.github.com>
|
||||
Andreas Kohn <andreas.kohn@gmail.com>
|
||||
Jason Wohlgemuth <jhwohlgemuth@users.noreply.github.com>
|
||||
Ryan Graham <r.m.graham@gmail.com>
|
||||
Hirse <jan.pilzer@gmx.de>
|
||||
Colin Rotherham <work@colinr.com>
|
||||
Aki <hi@akiro.se>
|
||||
Emily Marigold Klassen <forivall@gmail.com>
|
||||
Ramana Venkata <idlike2dream@gmail.com>
|
||||
kierendixon <knitesoulja@hotmail.com>
|
||||
Rácz Tibor Zoltán <racztiborzoltan@gmail.com>
|
||||
Guangcong Luo <guangcongluo@gmail.com>
|
||||
Steven <steven@ceriously.com>
|
||||
Jan Pilzer <jan.pilzer@gmx.de>
|
||||
Leonard Martin <leonard.martin@gmail.com>
|
||||
Teddy Katz <teddy.katz@gmail.com>
|
||||
Simon Legg <leggsimon@gmail.com>
|
||||
Kin Lum <kenneth.kin.lum@gmail.com>
|
||||
David Rousselie <guido.dassori@gmail.com>
|
||||
Jože Mlakar <JozeM@ixtlan-team.si>
|
||||
happylynx <happylynx@users.noreply.github.com>
|
||||
Dominic Watson <intellix@users.noreply.github.com>
|
||||
Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>
|
||||
Brian Beck <exogen@gmail.com>
|
||||
Ramana Venkata <vramana@users.noreply.github.com>
|
||||
Misha Kaletsky <misha.kaletsky@gmail.com>
|
||||
Andrew Schmadel <schmod@users.noreply.github.com>
|
||||
AJ Jordan <alex@strugee.net>
|
||||
Mark Banner <standard8@mozilla.com>
|
||||
Richard Simko <richardsimko@users.noreply.github.com>
|
||||
Sanketh Katta <sankethkatta@gmail.com>
|
||||
Tim Needham <tim.needham@wmfs.net>
|
||||
Leonardo Rojas <leonardo.rojas@shopify.com>
|
||||
Mark Peter Fejes <fejes.mark@gmail.com>
|
||||
Ryan Florence <rpflorence@gmail.com>
|
||||
MichaelQQ <mingsian.tu@vpon.com>
|
||||
Anders D. Johnson <anders.d.johnson.developer@gmail.com>
|
||||
Benjamin Fernandes <lotharsee@gmail.com>
|
||||
Simon Kurtz <simonkurtz@gmail.com>
|
||||
David Goss <david@davidgoss.co.uk>
|
||||
Luis Gustavo Pereira <lgp1985@yahoo.com.br>
|
||||
Amos Wenger <fasterthanlime@users.noreply.github.com>
|
||||
Samuel Marks <samuelmarks@gmail.com>
|
||||
Victor Travieso <victor@grabcad.com>
|
||||
Joshua Chaitin-Pollak <jbcpollak@users.noreply.github.com>
|
||||
Brendan Warkentin <faazshift@gmail.com>
|
||||
Scott Santucci <ScottFreeCode@users.noreply.github.com>
|
||||
Xavier Cambar <xcambar@gmail.com>
|
||||
Vikram <nrvikram19@gmail.com>
|
||||
Igor Nadj <igor.nadj@shinesolutions.com>
|
||||
Tong Li <supertong@users.noreply.github.com>
|
||||
tripu <t@tripu.info>
|
||||
Carsten Brandt <mail@cebe.cc>
|
||||
Marcin Szczepanski <marcin@imagichine.com.au>
|
||||
Josh Clow <josh@textio.com>
|
||||
Jakub Holy <jakubholy@jakubholy.net>
|
||||
Alexandra Ulsh <alexandra.ulsh@gmail.com>
|
||||
Tom MacWright <tmcw@users.noreply.github.com>
|
||||
Felicio Mununga <felicio@users.noreply.github.com>
|
||||
Gabor Szabo <gszabo@users.noreply.github.com>
|
||||
Andreas Müller <mail@devmount.de>
|
||||
Andrew Pitman <apitman@users.noreply.github.com>
|
||||
Jacob Wejendorp <jacob@wejendorp.dk>
|
||||
Alejandro López <a.lopez.sanchez@outlook.es>
|
||||
Victor Belozyorov <hi@vbelozyorov.com>
|
||||
Bradley Farias <bfarias@godaddy.com>
|
||||
Kyle E. Mitchell <kyle@kemitchell.com>
|
||||
Tuan Anh Tran <me@tuananh.org>
|
||||
Nathan Woltman <nwoltman@outlook.com>
|
||||
Kyra <kyranet@users.noreply.github.com>
|
||||
Leаh Neukirchen <chneukirchen@gmail.com>
|
||||
Kyle Spier-Swenson <kyleshome@gmail.com>
|
||||
Joe Bowbeer <joe.bowbeer@gmail.com>
|
||||
Nalin Bhardwaj <6984346+nalinbhardwaj@users.noreply.github.com>
|
||||
Nicolas Garnier <ngarnier@users.noreply.github.com>
|
||||
Vladislav Rassokhin <vladrassokhin@gmail.com>
|
||||
Josh Goldberg <joshuakgoldberg@outlook.com>
|
||||
laggingreflex <laggingreflex@gmail.com>
|
||||
Kristofer Selbekk <selbekk@users.noreply.github.com>
|
||||
Sreenivas Alapati <sreenivas9alapati@gmail.com>
|
||||
Ben Creasy <ben@bencreasy.com>
|
||||
Allan Kimmer Jensen <allankimmerjensen@gmail.com>
|
||||
rinfan <rinfan@users.noreply.github.com>
|
||||
Matt Hoyle <code@deployable.co>
|
||||
Mason Pawsey <mpawsey@csub.edu>
|
||||
Johannes Bader <olydis@users.noreply.github.com>
|
||||
Michael Zabka <zabka.michael@gmail.com>
|
||||
Bruce MacNaughton <bmacnaughton@gmail.com>
|
||||
Christopher Patty <christopher.patty@aggiemail.usu.edu>
|
||||
Max Stoiber <contact@mxstbr.com>
|
||||
Enrico Weigelt <enrico.weigelt@gr13.net>
|
||||
David Hu <davidjhu@gmail.com>
|
||||
Steven R. Loomis <srl295@gmail.com>
|
||||
Julien Deniau <julien.deniau@gmail.com>
|
||||
Prasanna Venkatesh T S <vipranarayan14@gmail.com>
|
||||
Alec Larson <aleclarson@users.noreply.github.com>
|
||||
John-David Dalton <john.david.dalton@gmail.com>
|
||||
Raymond Feng <enjoyjava@gmail.com>
|
||||
Tieme van Veen <tiemevanveen@hotmail.com>
|
||||
Finn Pauls <derfinn@gmail.com>
|
||||
Jeremy Kahn <jeremyckahn@gmail.com>
|
||||
Mertcan Mermerkaya <mertcan@mermerkaya.net>
|
||||
Will Yardley <wyardley@users.noreply.github.com>
|
||||
Matt Travi <github@travi.org>
|
||||
Solomon Victorino <solomonvictorino@gmail.com>
|
||||
Rich Trott <rtrott@gmail.com>
|
||||
Maksym Kobieliev <maximaximums@gmail.com>
|
||||
Thomas Reggi <socialtr@gmail.com>
|
||||
David Gilbertson <gilbertson.david@gmail.com>
|
||||
Rob Lourens <roblourens@gmail.com>
|
||||
Karan Thakkar <karanjthakkar@gmail.com>
|
||||
Howard T. Chiam <hchiam@users.noreply.github.com>
|
||||
Geoffrey Mattie <info@geoffreymattie.com>
|
||||
Luis Lobo Borobia <luislobo@gmail.com>
|
||||
Aaron Tribou <tribou@users.noreply.github.com>
|
||||
刘祺 <gucong@gmail.com>
|
||||
Brad Johnson <bradsk88@gmail.com>
|
||||
Artem Varaksa <aymfst@gmail.com>
|
||||
Mary <Ipadlover8322@gmail.com>
|
||||
Darryl Pogue <dvpdiner2@gmail.com>
|
||||
Rick Schubert <rickschubert@gmx.de>
|
||||
Daniel W <dwilches@gmail.com>
|
||||
XhmikosR <xhmikosr@gmail.com>
|
||||
Martin Kühl <mkhl@users.noreply.github.com>
|
||||
Valentin Ouvrard <valentin210594@gmail.com>
|
||||
Noah Benham <noahbenham@users.noreply.github.com>
|
||||
Brian Olore <brian@olore.net>
|
||||
Mat Warger <mwarger@gmail.com>
|
||||
Federico Rampazzo <frampone@gmail.com>
|
||||
SneakyFish5 <32284796+SneakyFish5@users.noreply.github.com>
|
||||
Nikki Everett <neverett@users.noreply.github.com>
|
||||
Erik Price <github@erikprice.net>
|
||||
Lars Willighagen <lars.willighagen@gmail.com>
|
||||
Kevin Gibbons <bakkot@gmail.com>
|
||||
Maarten Balliauw <maarten@balliauw.be>
|
||||
Mehdy Dara <mdara@eleven-labs.com>
|
||||
Robert Kielty <rob.kielty@gmail.com>
|
||||
Scott Trinh <scottyparade@gmail.com>
|
||||
Hugo <hugovk@users.noreply.github.com>
|
||||
Jacob <jakeincanada@icloud.com>
|
||||
Joe Bottigliero <joe@bottigliero.com>
|
||||
Nikolai Vavilov <vvnicholas@gmail.com>
|
||||
Kelvin Jin <kelvinjin@google.com>
|
||||
乱序 <midare@utakana.de>
|
||||
Audrey Eschright <audrey@npmjs.com>
|
||||
Xu Meng <dmabupt@gmail.com>
|
||||
George <george.taveras1231@gmail.com>
|
||||
Beni von Cheni <benjaminlchen@gmail.com>
|
||||
Frédéric Harper <fharper@npmjs.com>
|
||||
Johannes Würbach <johannes.wuerbach@googlemail.com>
|
||||
ƇʘƁ̆ąƇ́ <anchnk@users.noreply.github.com>
|
||||
Eli Doran <eli@elidoran.com>
|
||||
Tobias Koppers <tobias.koppers@googlemail.com>
|
||||
Grey Baker <greysteil@gmail.com>
|
||||
JT Turner <jtwebman@gmail.com>
|
||||
Audrey Eschright <audrey@lifeofaudrey.com>
|
||||
Alexander Gudulin <alexandr.gudulin@gmail.com>
|
||||
Philipp Hagemeister <phihag@phihag.de>
|
||||
Amadou Sall <ahasall.dev@gmail.com>
|
||||
Chris Manson <mansona@users.noreply.github.com>
|
||||
vlasy <vlasy@users.noreply.github.com>
|
||||
Emilis Dambauskas (Tokenmill) <emilis.dambauskas@tokenmill.lt>
|
||||
George Czabania <george@mish.guru>
|
||||
Jonathan Underwood <junderwood@bitcoinbank.co.jp>
|
||||
Nick Graef <nicholas.a.graef@gmail.com>
|
||||
James George <jamesgeorge998001@gmail.com>
|
||||
John O'Sullivan <j.osullivan42@gmail.com>
|
||||
ossdev <ossdev@puresoftware.com>
|
||||
Raphael Goulais <raphael.goulais@f5c.fr>
|
||||
COURIER, CALEB [AG/1000] <caleb.courier@monsanto.com>
|
||||
CalebCourier <caleb.courier@monsanto.com>
|
||||
Florian Keller <florian.keller@wire.com>
|
||||
Sreeram Jayan <sreeram.jayan@cerner.com>
|
||||
--get <lars.willighagen@gmail.com>
|
||||
raywu0123 <b05901189@ntu.edu.tw>
|
||||
Iván Reinoso García <ireinoso@plainconcepts.com>
|
||||
Roy Marples <roy@marples.name>
|
||||
Robert James Gabriel <robert_gabriel@outlook.com>
|
||||
John Firebaugh <john.firebaugh@gmail.com>
|
||||
Kitten King <hi@kittenking.me>
|
||||
Claudia Hernández <cghr1990@gmail.com>
|
||||
Artem Sapegin <artem@sapegin.ru>
|
||||
Márton Salomváry <salomvary@gmail.com>
|
||||
gall0ws <g4ll0ws@gmail.com>
|
||||
Olivier Chevet <olivr70@outlook.fr>
|
||||
Maël Nison <nison.mael@gmail.com>
|
||||
Sara Ahbabou <ahbabousara@gmail.com>
|
||||
Gareth Jones <Jones258@Gmail.com>
|
||||
Ruy Adorno <ruyadorno@hotmail.com>
|
||||
Michael Perrotte <mike@npmjs.com>
|
||||
Ben Blank <ben.blank+github@gmail.com>
|
||||
Christian Clauss <cclauss@me.com>
|
||||
Nikita Lebedev <bloomber111@gmail.com>
|
||||
Henrik Gemal <henrik@gemal.dk>
|
||||
Philip Harrison <philip@mailharrison.com>
|
||||
Jason Etcovitch <jasonetco@github.com>
|
||||
Darcy Clarke <darcy@darcyclarke.me>
|
||||
orion <oletizi@mac.com>
|
||||
NoDocCat <nodoccat@outlook.com>
|
||||
joan xie <w4ergf@qq.com>
|
||||
Amal Hussein <amal@npmjs.com>
|
||||
Brett Zamir <brettz9@yahoo.com>
|
||||
Menelaos Kotsollaris <mkotsollaris@users.noreply.github.com>
|
||||
Mehdi Hasan Khan <mhasan@omicronlab.com>
|
||||
Craig Loewen <crloewen@microsoft.com>
|
||||
Fighting-Jack <574637316@qq.com>
|
||||
Bakel, Roel van <roel.vanbakel@oce.com>
|
||||
Charlie West-Toebe <38671683+Hoidberg@users.noreply.github.com>
|
||||
Richard Lau <riclau@uk.ibm.com>
|
||||
Felix Yan <felixonmars@archlinux.org>
|
||||
Zhenya Vinogradov <zhenyavinogradov@gmail.com>
|
||||
Rafael Hengles <rhengles@gmail.com>
|
||||
Jan-Philip Gehrcke <jp@opstrace.com>
|
||||
Caleb Sacks <16855387+clabe45@users.noreply.github.com>
|
||||
Kyle Getz <kgetz@arista.com>
|
||||
Sean Healy <s@xib.ca>
|
||||
Netanel Gilad <netanelg@wix.com>
|
||||
Dave Nicolson <david.nicolson@gmail.com>
|
||||
Ajay Narain Mathur <ajaynarainmathur@gmail.com>
|
||||
Vitaliy Markitanov <9357021+vit100@users.noreply.github.com>
|
||||
simon_s <simon_s@afimilk.co.il>
|
||||
John Kennedy <john.kennedy.9147@gmail.com>
|
||||
Bernard Kitchens <bernard@npmjs.com>
|
||||
Jarda Snajdr <jsnajdr@gmail.com>
|
||||
Naix Geng <1308363651@qq.com>
|
||||
Dylan Treisman <dylanzt@gmail.com>
|
||||
mum-never-proud <abhuz@hotmail.com>
|
||||
Pablo Cúbico <pablocuadrado@gmail.com>
|
||||
Peter Fich <peterfich@users.noreply.github.com>
|
||||
Maxwell Gerber <mgerber@berkeley.edu>
|
||||
Sean Poulter <sean.poulter@gmail.com>
|
||||
vanishcode <vanishcode@outlook.com>
|
||||
Timo Sand <timo.sand@iki.fi>
|
||||
Jean-Charles Sisk <jasisk@gmail.com>
|
||||
Martin Packman <martin@zegami.com>
|
||||
Danielle Adams <danielle.adams@heroku.com>
|
||||
Edward Thomson <ethomson@edwardthomson.com>
|
||||
Masafumi Koba <ybiquitous@gmail.com>
|
||||
Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
|
||||
Antonio <antonio.olmo@devo.com>
|
||||
Sandra Tatarevićová <sandra@tatarevicova.cz>
|
||||
Antoine du Hamel <duhamelantoine1995@gmail.com>
|
||||
Assaf Sapir <assapir@github.com>
|
||||
jamesgeorge007 <jamesgeorge998001@gmail.com>
|
||||
Lukas Spieß <lumaxis@github.com>
|
||||
Mickael Jeanroy <mickael.jeanroy@gmail.com>
|
||||
Myles Borins <mylesborins@github.com>
|
||||
Nathan LaFreniere <quitlahok@gmail.com>
|
||||
Lucio Martinez <lucio.martinez@sixt.com>
|
||||
Brian Jenkins <brian@npmjs.com>
|
||||
nlf <quitlahok@gmail.com>
|
||||
zhaoxuxu <zhaoxuxujc@gmail.com>
|
||||
liuye.adam <liuye.adam@bytedance.com>
|
||||
Michaël Zasso <targos@protonmail.com>
|
||||
Gareth Jones <jones258@gmail.com>
|
||||
Jake Champion <me@jakechampion.name>
|
||||
takenspc <taken.spc@gmail.com>
|
||||
iraj <irajtaghlidi@gmail.com>
|
||||
Michele Azzolari <michele@azzolari.it>
|
||||
foxxyz <foxxyz@gmail.com>
|
||||
Dr <dr@dr.run>
|
||||
Jan Tojnar <jtojnar@gmail.com>
|
||||
Jason Attwood <jason_attwood@hotmail.co.uk>
|
||||
Vlad GURDIGA <gurdiga@gmail.com>
|
||||
Sébastien Puech <s.puech@tricentis.com>
|
||||
Jannis Hell <Primajin@users.noreply.github.com>
|
||||
Hollow Man <hollowman@hollowman.ml>
|
||||
kai zhu <kaizhu256@gmail.com>
|
||||
Alex Woollam <alexjhwoollam@gmail.com>
|
||||
Daniel Fischer <daniel@d-fischer.dev>
|
||||
Yash-Singh1 <saiansh2525@gmail.com>
|
||||
Edu93Jer <mailing_93@hotmail.com>
|
||||
Tieg Zaharia <tieg@tidelift.com>
|
||||
Aki <71239005+AkiaCode@users.noreply.github.com>
|
||||
fuhao.xu <fuhao.xu@yitu-inc.com>
|
||||
marsonya <16393876+marsonya@users.noreply.github.com>
|
||||
Jeff Griffiths <jeff@eko-recordings.ca>
|
||||
Michael Garvin <gar+gh@danger.computer>
|
||||
Gar <gar+gh@danger.computer>
|
||||
dr-js <dr@dr.run>
|
||||
Pavan Bellamkonda <31280326+pavanbellamkonda@users.noreply.github.com>
|
||||
Alexander Riccio <test35965@gmail.com>
|
||||
RA80533 <32469082+RA80533@users.noreply.github.com>
|
||||
Ikko Ashimine <eltociear@gmail.com>
|
||||
MrBrain295 <66077254+MrBrain295@users.noreply.github.com>
|
||||
kumavis <aaron@kumavis.me>
|
||||
Christof Lemke <christoflemke@github.com>
|
||||
Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
|
||||
Bjørn Johansen <bjjohans@microsoft.com>
|
||||
Fraqe <f@fraqe.ca>
|
||||
Edward Grech <dwardu@gmail.com>
|
||||
Kenrick <kenrick95@gmail.com>
|
||||
Karthik Sundari <karthik_sundari@comcast.com>
|
||||
Jan Sepke <625043+jansepke@users.noreply.github.com>
|
||||
Augusto Moura <augusto.borgesm@gmail.com>
|
||||
Eric Chow <eric.zjp.chow@gmail.com>
|
||||
kbayrhammer <klaus.bayrhammer@redbull.com>
|
||||
James Chen-Smith <jameschensmith@gmail.com>
|
||||
Yash Singh <saiansh2525@gmail.com>
|
||||
Danielle Church <dani.church@gmail.com>
|
||||
Seth Thomas <seth@emailseth.com>
|
||||
Andreas <andreas@bielk.se>
|
||||
Felipe Santos <felipecassiors@gmail.com>
|
||||
Luigi Pinca <luigipinca@gmail.com>
|
||||
Marco Sirabella <marco@sirabella.org>
|
||||
wangsai <wangsai@bootcss.com>
|
||||
Luke Hefson <luke@github.com>
|
||||
mrmlnc <mrmlnc@yandex-team.ru>
|
||||
Juan Picado <juanpicado19@gmail.com>
|
||||
Kevin Cormier <kcormier@redhat.com>
|
||||
Nariyasu Heseri <heserisiyookang@gmail.com>
|
||||
rethab <rethab@protonmail.ch>
|
||||
Spencer Wilson <5624115+spencerwilson@users.noreply.github.com>
|
||||
Daniel Park <gimli01@github.com>
|
||||
Daniel Park <daniel.park@endevors.io>
|
||||
Luke Karrys <luke@lukekarrys.com>
|
||||
Ivan <ivanaguilar01@live.com.mx>
|
||||
Aluneed <31174087+aluneed@users.noreply.github.com>
|
||||
relrelb <relrelbachar@gmail.com>
|
||||
Cameron Tacklind <cameron@tacklind.com>
|
||||
Demira Dimitrova <demiradimitrova@github.com>
|
||||
AkiJoey <akijoey1010635951@gmail.com>
|
||||
austincho <austin.cho14@gmail.com>
|
||||
Nathan Fritz <fritzy@github.com>
|
||||
tripu <1016538+tripu@users.noreply.github.com>
|
||||
Matsuuu <huhta.matias@gmail.com>
|
||||
Anders Kaseorg <andersk@mit.edu>
|
||||
John Gee <john@ruru.gen.nz>
|
||||
Ayush Rawal <royalrawal.2001@gmail.com>
|
||||
Nate Green <heynategreen@gmail.com>
|
||||
Jacob Yacovelli <jjyacovelli@gmail.com>
|
||||
Caleb ツ Everett <calebev@amazon.com>
|
||||
gfyoung <gfyoung17@gmail.com>
|
||||
Edward Thomson <ethomson@github.com>
|
||||
Behnam Mohammadi <itten@live.com>
|
||||
gfyoung <gfyoung17+GitHub@gmail.com>
|
||||
Luke Karrys <lukekarrys@gmail.com>
|
||||
Pelle Wessman <pelle@kodfabrik.se>
|
||||
Daniel Cobo <danielcobo@users.noreply.github.com>
|
||||
Mansur Ali Koroglu <mansuralikoroglu@gmail.com>
|
||||
Yucel Okcu <yucel.n.okcu@gmail.com>
|
||||
Takuya Fukuju <chalkygames123@gmail.com>
|
||||
Jan T. Sott <jan@motim.co>
|
||||
yotamselementor <83912471+yotamselementor@users.noreply.github.com>
|
||||
Felipe Plets <fsplets@gmail.com>
|
||||
fncolon <fncolon@pm.me>
|
||||
Emin Buğra Saral <eminbugrasaral@me.com>
|
||||
Tierney Cyren <accounts@bnb.im>
|
||||
Guillaume Grossetie <g.grossetie@gmail.com>
|
||||
linkgoron <Linkgoron@users.noreply.github.com>
|
||||
Quentin Barbe <forty@everteam.org>
|
||||
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
||||
Delapouite <delapouite@gmail.com>
|
||||
F. Hinkelmann <franziska.hinkelmann@gmail.com>
|
||||
Tierney Cyren <hello@bnb.im>
|
||||
Mohamed Akram <mohd-akram@users.noreply.github.com>
|
||||
Wassim Chegham <1699357+manekinekko@users.noreply.github.com>
|
|
@ -0,0 +1,594 @@
|
|||
## v8.5.1 (2022-02-17)
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [`54cda9697`](https://github.com/npm/cli/commit/54cda9697b776fae807966097315c7b836623743)
|
||||
[#4410](https://github.com/npm/cli/pull/4410)
|
||||
fix(arborist): do not audit in offline mode
|
||||
([@mohd-akram](https://github.com/mohd-akram))
|
||||
* [`fb13bdaf1`](https://github.com/npm/cli/commit/fb13bdaf12dde3ef5685a77354e51a9cfa579879)
|
||||
[#4403](https://github.com/npm/cli/pull/4403)
|
||||
deps: `@npmcli/ci-detect@2.0.0`
|
||||
* [`702801002`](https://github.com/npm/cli/commit/702801002e99bf02dd4d6d1e447a5ab332d56c79)
|
||||
[#4415](https://github.com/npm/cli/pull/4415)
|
||||
deps: `make-fetch-happen@10.0.3`
|
||||
* [`88bab3540`](https://github.com/npm/cli/commit/88bab354097023c96c49e78d7ee54159f495bf73)
|
||||
[#4416](https://github.com/npm/cli/pull/4416)
|
||||
deps: `gauge@4.0.1`
|
||||
|
||||
### Documentation
|
||||
|
||||
* [`20378c67c`](https://github.com/npm/cli/commit/20378c67cd533db514dd2aec7828c6d119e9d6c7)
|
||||
[#4423](https://github.com/npm/cli/pull/4423)
|
||||
docs: update documentation for ping
|
||||
([@fhinkel](https://github.com/fhinkel))
|
||||
* [`408d2fc15`](https://github.com/npm/cli/commit/408d2fc150185ef66125f7d6bdb1c25edb71bba3)
|
||||
[#4426](https://github.com/npm/cli/pull/4426)
|
||||
docs: update workspaces guide for consistency
|
||||
([@bnb](https://github.com/bnb))
|
||||
* [`9275856eb`](https://github.com/npm/cli/commit/9275856eb75e7c394a3c7617c2b495aba35ee2de)
|
||||
[#4424](https://github.com/npm/cli/pull/4424)
|
||||
docs: update usage example for npm pkg
|
||||
([@manekinekko](https://github.com/manekinekko))
|
||||
* [`20c83fae7`](https://github.com/npm/cli/commit/20c83fae76ff4a051e4f6542a328f1c00cf071bb)
|
||||
[#4428](https://github.com/npm/cli/pull/4428)
|
||||
docs: update docs for npm install <folder>
|
||||
([@manekinekko](https://github.com/manekinekko))
|
||||
|
||||
## v8.5.0 (2022-02-10)
|
||||
|
||||
### Features
|
||||
|
||||
* [`0cc9d4c51`](https://github.com/npm/cli/commit/0cc9d4c51a337af0edd2e20c6fadb26807e5d09f)
|
||||
[#4372](https://github.com/npm/cli/pull/4372)
|
||||
feat(deps): `@npmcli/config@3.0.0 - introduce automatic workspace roots`
|
||||
([@nlf](https://github.com/nlf))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [`fb6e2ddf9`](https://github.com/npm/cli/commit/fb6e2ddf942bacf5ae745d16c2d57f3836dce75a)
|
||||
[#4386](https://github.com/npm/cli/pull/4386)
|
||||
fix(log): pass in logger to more external modules
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`0e231d4a4`](https://github.com/npm/cli/commit/0e231d4a40526608411aca0a6e7cf27c750f2409)
|
||||
[#4389](https://github.com/npm/cli/pull/4389)
|
||||
fix(pack): let libnpmpack take care of file writes
|
||||
([@nlf](https://github.com/nlf))
|
||||
* [`e2f1f7b04`](https://github.com/npm/cli/commit/e2f1f7b045a3ae9840f431cb4266ba046831247b)
|
||||
[#4389](https://github.com/npm/cli/pull/4389)
|
||||
fix(publish): pass dryRun: true to libnpmpack so it doesnt write a tarball
|
||||
([@nlf](https://github.com/nlf))
|
||||
* [`2937b43d4`](https://github.com/npm/cli/commit/2937b43d4629225d83b6c71833df00743209f5ff)
|
||||
[#4389](https://github.com/npm/cli/pull/4389)
|
||||
fix(config): add pack-destination flattener
|
||||
([@nlf](https://github.com/nlf))
|
||||
|
||||
### Documentation
|
||||
|
||||
* [`b836d596f`](https://github.com/npm/cli/commit/b836d596f9d98cd7849882000cad11ad2a0b9a26)
|
||||
[#4384](https://github.com/npm/cli/pull/4384)
|
||||
docs: add cross-references between npx and npm exec
|
||||
([@Delapouite](https://github.com/Delapouite))
|
||||
* [`f3fbeea5a`](https://github.com/npm/cli/commit/f3fbeea5a173902ca7455c6c94a9e677591b0410)
|
||||
[#4388](https://github.com/npm/cli/pull/4388)
|
||||
docs: add --save-bundle to --save usage output
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [`8732f393e`](https://github.com/npm/cli/commit/8732f393ee547e2eada4317613599517c1d8ec0a)
|
||||
deps: `@npmcli/arborist@4.3.1`
|
||||
* [`2ba09cc0d`](https://github.com/npm/cli/commit/2ba09cc0d7d56a064aa67bbb1881d381e6504888)
|
||||
[#4371](https://github.com/npm/cli/pull/4371)
|
||||
fix(arborist): check if a spec is a workspace before fetching a manifest, closes #3637
|
||||
([@nlf](https://github.com/nlf))
|
||||
* [`e631faf7b`](https://github.com/npm/cli/commit/e631faf7b5f414c233d723ee11413264532b37de)
|
||||
[#4387](https://github.com/npm/cli/pull/4387)
|
||||
fix(arborist): save bundleDependencies to package.json when reifying
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`d3a7c15e1`](https://github.com/npm/cli/commit/d3a7c15e1e3d305a0bf781493406dfb1fdbaca35)
|
||||
deps: `libnpmpack@3.1.0`
|
||||
* [`4884821f6`](https://github.com/npm/cli/commit/4884821f637ca1992b494fbdbd94d000e4428a40)
|
||||
[#4389](https://github.com/npm/cli/pull/4389)
|
||||
feat(libnpmpack): write tarball file when dryRun === false
|
||||
([@nlf](https://github.com/nlf))
|
||||
* [`ab926995e`](https://github.com/npm/cli/commit/ab926995e43ccdd048a6e1164b436fea1940f932)
|
||||
[#4393](https://github.com/npm/cli/pull/4393)
|
||||
deps: `npm-registry-fetch@12.0.2`
|
||||
* [`1c0d0699c`](https://github.com/npm/cli/commit/1c0d0699c13e1cb36a69f2ac4acdb78ea205aa3e)
|
||||
[#4394](https://github.com/npm/cli/pull/4394)
|
||||
deps: `npmlog@6.0.1`
|
||||
* changed notice color from blue to cyan for improved readability
|
||||
* [`3c33a5842`](https://github.com/npm/cli/commit/3c33a584213e4f2230f3b912fad2c2f5786906fb)
|
||||
[#4400](https://github.com/npm/cli/pull/4400)
|
||||
deps: `make-fetch-happen@10.0.2`
|
||||
|
||||
## v8.4.1 (2022-02-03)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [`1b9338554`](https://github.com/npm/cli/commit/1b9338554fc006954fae54c25c33e64e26ae997e)
|
||||
[#4359](https://github.com/npm/cli/pull/4359)
|
||||
fix(log): pass in logger to external modules
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`457e0ae61`](https://github.com/npm/cli/commit/457e0ae61bbc55846f5af44afa4066921923490f)
|
||||
[#4363](https://github.com/npm/cli/pull/4363)
|
||||
fix(ci): lock file validation
|
||||
([@ruyadorno](https://github.com/ruyadorno))
|
||||
* [`c0519edc1`](https://github.com/npm/cli/commit/c0519edc16f66370b2153430342247b4ec5cb496)
|
||||
[#4364](https://github.com/npm/cli/pull/4364)
|
||||
fix(ci): should not use package-lock config
|
||||
([@ruyadorno](https://github.com/ruyadorno))
|
||||
* [`ebb428375`](https://github.com/npm/cli/commit/ebb428375cd417c096d5a648df92620dc4215a3d)
|
||||
[#4365](https://github.com/npm/cli/pull/4365)
|
||||
fix(outdated): parse aliased modules
|
||||
([@ruyadorno](https://github.com/ruyadorno))
|
||||
|
||||
### Documentation
|
||||
|
||||
* [`0b0a7cc76`](https://github.com/npm/cli/commit/0b0a7cc767947ea738da50caa832d8a922e20ac6)
|
||||
[#4361](https://github.com/npm/cli/pull/4361)
|
||||
docs: bundleDependencies can be a boolean.
|
||||
([@forty](https://github.com/forty))
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [`3d41447b9`](https://github.com/npm/cli/commit/3d41447b961a72f1ce541fea252d0cd462399c76)
|
||||
[#4353](https://github.com/npm/cli/pull/4353)
|
||||
deps: `wide-align@1.1.5`
|
||||
* [`dc1a0573a`](https://github.com/npm/cli/commit/dc1a0573ace328d985a741af76d03752b1dbf1ff)
|
||||
[#4353](https://github.com/npm/cli/pull/4353)
|
||||
deps: `socks-proxy-agent@6.1.1`
|
||||
* [`adcefef6b`](https://github.com/npm/cli/commit/adcefef6b953e0804f4a2de3a1912321f44c4a7e)
|
||||
[#4353](https://github.com/npm/cli/pull/4353)
|
||||
deps: `spdx-license-ids@3.0.11`
|
||||
* [`d7e2499e0`](https://github.com/npm/cli/commit/d7e2499e073301a62607266d3ab8f9b63d630fb5)
|
||||
[#4353](https://github.com/npm/cli/pull/4353)
|
||||
deps: `debug@4.3.3`
|
||||
* [`f0f307140`](https://github.com/npm/cli/commit/f0f30714002db979a2707d85c65bb92ae0ff76fe)
|
||||
[#4353](https://github.com/npm/cli/pull/4353)
|
||||
deps: `@npmcli/fs@1.1.0`
|
||||
* [`1cb107d33`](https://github.com/npm/cli/commit/1cb107d33d7e1499d92c3405fa0694142bdee8df)
|
||||
[#4353](https://github.com/npm/cli/pull/4353)
|
||||
deps: `is-core-module@2.8.1`
|
||||
* [`e198ac0d1`](https://github.com/npm/cli/commit/e198ac0d1c1e536db57e84af6e7f40089b4c1bfc)
|
||||
[#4354](https://github.com/npm/cli/pull/4354)
|
||||
deps: `cli-table3@0.6.1`
|
||||
* [`5a84e6515`](https://github.com/npm/cli/commit/5a84e6515a0331be20395ce2a6b1e892ecea20f8)
|
||||
[#4355](https://github.com/npm/cli/pull/4355)
|
||||
deps: `graceful-fs@4.2.9`
|
||||
|
||||
## v8.4.0 (2022-01-27)
|
||||
|
||||
### Features
|
||||
|
||||
* [`fbe48a840`](https://github.com/npm/cli/commit/fbe48a84047e0c5de31bdaa84707f0f8fdcef71d)
|
||||
[#4307](https://github.com/npm/cli/pull/4307)
|
||||
feat(arborist): add named updates validation
|
||||
([@ruyadorno](https://github.com/ruyadorno))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [`1f853f8bf`](https://github.com/npm/cli/commit/1f853f8bf7cecd1222703dde676a4b664526141d)
|
||||
[#4306](https://github.com/npm/cli/pull/4306)
|
||||
fix(arborist): load actual tree on named updates
|
||||
([@ruyadorno](https://github.com/ruyadorno))
|
||||
* [`90c384ccc`](https://github.com/npm/cli/commit/90c384ccccac32c80c481a04c438cbcbea82539c)
|
||||
[#4326](https://github.com/npm/cli/pull/4326)
|
||||
fix(logout): require proper auth.js from npm-registry-fetch
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`fabcf431a`](https://github.com/npm/cli/commit/fabcf431a63ecf93b56ae5d9a05ad4e7ef280c2a)
|
||||
[#4327](https://github.com/npm/cli/pull/4327)
|
||||
fix(arborist): correctly load overrides on workspace edges, closes #4205
|
||||
([@nlf](https://github.com/nlf))
|
||||
* [`8c3b143ca`](https://github.com/npm/cli/commit/8c3b143ca20d0da56c0ce2764e288a4c203b9f93)
|
||||
[#4258](https://github.com/npm/cli/pull/4258)
|
||||
fix(arborist): shrinkwrap throws when trying to read a folder without permissions
|
||||
([@Linkgoron](https://github.com/Linkgoron))
|
||||
* [`b51b29c56`](https://github.com/npm/cli/commit/b51b29c563fa97aa4fbf38250d1f04e879a8d961)
|
||||
[#4334](https://github.com/npm/cli/pull/4334)
|
||||
fix(arborist): update save exact
|
||||
([@ruyadorno](https://github.com/ruyadorno))
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [`8558527c7`](https://github.com/npm/cli/commit/8558527c7158b2c1c353f8ab9c31de2a66ab470e)
|
||||
[#4333](https://github.com/npm/cli/pull/4333)
|
||||
deps: `make-fetch-happen@10.0.0`
|
||||
* compress option and accept/content encoding header edge cases
|
||||
* strip cookie header on redirect across hostnames
|
||||
* [`1bfc507f2`](https://github.com/npm/cli/commit/1bfc507f2a5afa02f04d4dea2fc6d151d4fef3ac)
|
||||
[#4326](https://github.com/npm/cli/pull/4326)
|
||||
deps: `npm-registry-fetch@12.0.1`
|
||||
* [`52c9608e7`](https://github.com/npm/cli/commit/52c9608e7bb1cda396b2cef3fc1b48dbaa2b7de3)
|
||||
[#4326](https://github.com/npm/cli/pull/4326)
|
||||
deps: `pacote@12.0.3`
|
||||
* [`2bbeedfeb`](https://github.com/npm/cli/commit/2bbeedfebb3aea082d612deb5e4d9de9e550c529)
|
||||
[#4326](https://github.com/npm/cli/pull/4326)
|
||||
deps: `npm-profile@6.0.0`
|
||||
* [`9652d685b`](https://github.com/npm/cli/commit/9652d685b1e4bd21cec107a611c2e307387623d6)
|
||||
chore(release): `@npmcli/arborist@4.3.0`
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`0ee4927d2`](https://github.com/npm/cli/commit/0ee4927d2e8206dd24fa7eea5e1c10ea649ecc49)
|
||||
chore(release): `libnpmaccess@5.0.1`
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`6c0dc1ffb`](https://github.com/npm/cli/commit/6c0dc1ffb70858be1e9ca9afdb6950e39609a367)
|
||||
chore(release): `libnpmexec@3.0.3`
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`41b8f7b6f`](https://github.com/npm/cli/commit/41b8f7b6ff62f0e738865eb8e98df8650f5467bd)
|
||||
chore(release): `libnpmorg@3.0.1`
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`433e6aafb`](https://github.com/npm/cli/commit/433e6aafbbf56efcf71e991767a6f00afe4aba7c)
|
||||
chore(release): `libnpmpublish@5.0.1`
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`6654b6efe`](https://github.com/npm/cli/commit/6654b6efe02666bdb9864f4608e477ba132fd215)
|
||||
chore(release): `libnpmsearch@4.0.1`
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`3423a9804`](https://github.com/npm/cli/commit/3423a980436492b7f0ee9e002517387a801f4f4a)
|
||||
chore(release): `libnpmteam@3.0.1`
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`fb03e485d`](https://github.com/npm/cli/commit/fb03e485d9b1f09eb1cbcce00ee8e3e5c012097f)
|
||||
chore(release): `libnpmhook@7.0.1`
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
|
||||
## v8.3.2 (2022-01-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [`cfd59b8c8`](https://github.com/npm/cli/commit/cfd59b8c81078f842328b13a23a234150842cd58)
|
||||
[#4223](https://github.com/npm/cli/pull/4223)
|
||||
fix: npm update --save
|
||||
([@ruyadorno](https://github.com/ruyadorno))
|
||||
* [`510f0ecbc`](https://github.com/npm/cli/commit/510f0ecbc9970ed8c8993107cc03cf27b7b996dc)
|
||||
[#4218](https://github.com/npm/cli/pull/4218)
|
||||
fix(arborist): ensure indentation is preserved
|
||||
([@ljharb](https://github.com/ljharb))
|
||||
* [`c99c2151a`](https://github.com/npm/cli/commit/c99c2151a868672c017f64ff0ecb12149a2fb095)
|
||||
[#4230](https://github.com/npm/cli/pull/4230)
|
||||
fix(arborist): prioritize valid workspace nodes
|
||||
([@nlf](https://github.com/nlf))
|
||||
* [`14a3d9500`](https://github.com/npm/cli/commit/14a3d95000f1cba937f3309d198a363ae65cf01f)
|
||||
[#4265](https://github.com/npm/cli/pull/4265)
|
||||
fix: resolve workspace paths from cwd when possible
|
||||
([@nlf](https://github.com/nlf))
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [`2ef9f9847`](https://github.com/npm/cli/commit/2ef9f9847c11fe8c0c0494558fe77c15ac4dbc80)
|
||||
[#4254](https://github.com/npm/cli/pull/4254)
|
||||
deps: `bin-links@3.0.0 write-file-atomic@4.0.0`
|
||||
|
||||
## v8.3.1 (2022-01-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [`2ac540b0c`](https://github.com/npm/cli/commit/2ac540b0ccd016a14676ad891758e8d9e903a12c)
|
||||
fix(unpublish): Show warning on unpublish command when last version (#4191)
|
||||
([@ebsaral](https://github.com/ebsaral))
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [`da80d579d`](https://github.com/npm/cli/commit/da80d579d1f1db61894c54f7b9b3623394882c16)
|
||||
[#4211](https://github.com/npm/cli/pull/4211)
|
||||
deps: `hosted-git-info@4.1.0`
|
||||
* feat: Support Sourcehut
|
||||
* [`5a87d190f`](https://github.com/npm/cli/commit/5a87d190f38af9f2f98084d9b476184dbcaf1429)
|
||||
[#4228](https://github.com/npm/cli/pull/4228)
|
||||
deps: `@npmcli/config@2.4.0`
|
||||
* [`1f0d1370f`](https://github.com/npm/cli/commit/1f0d1370ff6bf2ca978ef0d7d32640314c62204e)
|
||||
chore(release): `@npmcli/arborist@4.2.0`
|
||||
* [`3cfae3840`](https://github.com/npm/cli/commit/3cfae384011a8b291cc82cc02b56bc114557a9e5)
|
||||
[#4181](https://github.com/npm/cli/pull/4181)
|
||||
feat(arborist) add `toJSON`/`toString` methods to get shrinkwrap contents without saving
|
||||
([@ljharb](https://github.com/ljharb))
|
||||
|
||||
### Chores
|
||||
|
||||
* [`d72650457`](https://github.com/npm/cli/commit/d7265045730555c03b3142c004c7438e9577028c)
|
||||
chore: Bring in all libnpm modules + arborist as workspaces (#4166)
|
||||
([@fritzy](https://github.com/fritzy))
|
||||
|
||||
|
||||
## v8.3.0 (2021-12-09)
|
||||
|
||||
### Features
|
||||
|
||||
* [`4b0c29a7c`](https://github.com/npm/cli/commit/4b0c29a7c5860410c7b453bec389c54cb21dbde3)
|
||||
[#4116](https://github.com/npm/cli/issues/4116)
|
||||
feat: `@npmcli/arborist@4.1.0`
|
||||
* introduces overrides
|
||||
([@nlf](https://github.com/nlf))
|
||||
* [`166d9e144`](https://github.com/npm/cli/commit/166d9e144b38087ee5e7d8aaf6ec7d602cf2957c)
|
||||
[npm/statusboard#416](https://github.com/npm/statusboard/issues/416)
|
||||
[#4143](https://github.com/npm/cli/issues/4143)
|
||||
feat: output configured registry during publish
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
* [`71777be17`](https://github.com/npm/cli/commit/71777be17e57179d203cb9162664ecd0c36ca633)
|
||||
[npm/statusboard#417](https://github.com/npm/statusboard/issues/417)
|
||||
[#4146](https://github.com/npm/cli/issues/4146)
|
||||
feat: display `publishConfig` during `config list`
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [`08c663931`](https://github.com/npm/cli/commit/08c663931ec1f56d777ffdb38f94926b9eac13ef)
|
||||
[#4128](https://github.com/npm/cli/issues/4128)
|
||||
[#4134](https://github.com/npm/cli/issues/4134)
|
||||
fix: dont warn on error cleaning individual log files
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
* [`e605b128c`](https://github.com/npm/cli/commit/e605b128c87620aae843cdbd8f35cc614da3f8a2)
|
||||
[#4142](https://github.com/npm/cli/issues/4142)
|
||||
fix: redact all private keys from config output
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
|
||||
### Documentation
|
||||
|
||||
* [`db1885d7f`](https://github.com/npm/cli/commit/db1885d7fec012f018093c76dec5a9c01a0ca2b0)
|
||||
[#4092](https://github.com/npm/cli/issues/4092)
|
||||
chore(docs): document overrides
|
||||
([@nlf](https://github.com/nlf))
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [`e1da1fa4b`](https://github.com/npm/cli/commit/e1da1fa4ba7d95616928d2192b5b9db09b3120bc)
|
||||
[#4141](https://github.com/npm/cli/issues/4141)
|
||||
deps: `@npmcli/arborist@4.1.1`: `parse-conflict-json@2.0.1`
|
||||
* Fixes object property assignment bug in resolving package-locks with
|
||||
conflicts
|
||||
* [`1d8bec566`](https://github.com/npm/cli/commit/1d8bec566cb08ff5ff220f53083323fa8c3fb72e)
|
||||
[#4144](https://github.com/npm/cli/issues/4144)
|
||||
[#3884](https://github.com/npm/cli/issues/3884)
|
||||
deps: `minipass@3.1.6`
|
||||
* fixes some TAR_ENTRY_INVALID and Z_DATA_ERROR errors
|
||||
|
||||
## v8.2.0 (2021-12-02)
|
||||
|
||||
### Features
|
||||
|
||||
* [`6734ba36d`](https://github.com/npm/cli/commit/6734ba36dd6e07a859ab4d6eb4f264d2c0022276)
|
||||
[#4062](https://github.com/npm/cli/issues/4062)
|
||||
feat: streaming debug logfile
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [`5f4040aa0`](https://github.com/npm/cli/commit/5f4040aa0e30a3b74caab64958770c682e4d0031)
|
||||
chore: remove get-project-scope utils
|
||||
([@Yucel Okcu](https://github.com/Yucel Okcu))
|
||||
* [`c5c6d1603`](https://github.com/npm/cli/commit/c5c6d1603b06df4c10b503047aeed34d6e0c36c2)
|
||||
[#4060](https://github.com/npm/cli/issues/4060)
|
||||
fix: add missing scope on flat options
|
||||
([@yuqu](https://github.com/yuqu))
|
||||
* [`47828b766`](https://github.com/npm/cli/commit/47828b766a4a7b50c1245c8f01b99ffbeffd014f)
|
||||
chore: update one-time password prompt
|
||||
([@Darcy Clarke](https://github.com/Darcy Clarke))
|
||||
|
||||
### Documentation
|
||||
|
||||
* [`fc46a7926`](https://github.com/npm/cli/commit/fc46a792621c89354eddc0e1ee2d4f5c26efe5a5)
|
||||
[#4072](https://github.com/npm/cli/issues/4072)
|
||||
docs: fix typo in `save-peer` description
|
||||
([@chalkygames123](https://github.com/chalkygames123))
|
||||
* [`2fbf1576f`](https://github.com/npm/cli/commit/2fbf1576f5427babab2bdf314b1760adc5f9a575)
|
||||
[#4081](https://github.com/npm/cli/issues/4081)
|
||||
docs: Fix typo
|
||||
([@idleberg](https://github.com/idleberg))
|
||||
* [`a8bc95f11`](https://github.com/npm/cli/commit/a8bc95f11c9d21319581d7b09baf9f864bea21ac)
|
||||
[#4089](https://github.com/npm/cli/issues/4089)
|
||||
docs(workspaces): Fix typo
|
||||
([@yotamselementor](https://github.com/yotamselementor))
|
||||
* [`31b098ee2`](https://github.com/npm/cli/commit/31b098ee26ed17facb132278bb3205e80e2a760d)
|
||||
[#4113](https://github.com/npm/cli/issues/4113)
|
||||
docs: add logging docs
|
||||
([@darcyclarke](https://github.com/darcyclarke))
|
||||
* [`cbae0fb71`](https://github.com/npm/cli/commit/cbae0fb71cea55004f7066c0dfc870137b53ee8b)
|
||||
[#4114](https://github.com/npm/cli/issues/4114)
|
||||
docs: update description about where/when debug log is written
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [`037f2cc8c`](https://github.com/npm/cli/commit/037f2cc8c8ed9d9a092475a5a07f2a3a88915633)
|
||||
[#4078](https://github.com/npm/cli/issues/4078)
|
||||
`node-gyp@8.4.1`
|
||||
* [`0e63df612`](https://github.com/npm/cli/commit/0e63df61283a2f7ace991f72e4577c6f23ffc5df)
|
||||
[#4102](https://github.com/npm/cli/issues/4102)
|
||||
`@npmcli/config@2.3.2`:
|
||||
* fix: always load localPrefix
|
||||
|
||||
## v8.1.4 (2021-11-18)
|
||||
|
||||
### BUG FIXES
|
||||
|
||||
* [`7887fb3d7`](https://github.com/npm/cli/commit/7887fb3d7ba7f05abeb49dd92b76d90422cb38ca)
|
||||
[#4025](https://github.com/npm/cli/issues/4025)
|
||||
fix: don't try to open file:/// urls
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`cd6d3a90d`](https://github.com/npm/cli/commit/cd6d3a90d4bbf3793834830b4c77fc8eb0846596)
|
||||
[#4026](https://github.com/npm/cli/issues/4026)
|
||||
fix: explicitly allow `npm help` to open file:/// man pages
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`72ca4a4e3`](https://github.com/npm/cli/commit/72ca4a4e39a1d4de03d6423480aa2ee82b021060)
|
||||
[#4020](https://github.com/npm/cli/issues/4020)
|
||||
[#4032](https://github.com/npm/cli/issues/4032)
|
||||
fix: command completion
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`b78949134`](https://github.com/npm/cli/commit/b789491345aa6fbe345aa3c96fe9f415296ec418)
|
||||
[#4023](https://github.com/npm/cli/issues/4023)
|
||||
fix(install): command completion with single match
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`44bfa3787`](https://github.com/npm/cli/commit/44bfa378723554195fccf8cf4ca2d895ddbd8f8c)
|
||||
[#4065](https://github.com/npm/cli/issues/4065)
|
||||
@npmcli/arborist 4.0.5
|
||||
* fix: accurate filtering of workspaces `--no-workspaces`
|
||||
([@fritzy](https://github.com/fritzy))
|
||||
|
||||
### DEPENDENCIES
|
||||
|
||||
* [`225645420`](https://github.com/npm/cli/commit/225645420cf3d13bc0b0d591f7f7bf21a9c24e47)
|
||||
[#3995](https://github.com/npm/cli/issues/3995)
|
||||
update to latest eslint and linting rules
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`203fedf5b`](https://github.com/npm/cli/commit/203fedf5b1eba78b76ebacbda88f215caabea6ca)
|
||||
[#4016](https://github.com/npm/cli/issues/4016)
|
||||
`eslint@8.0.0`: `@npmcli/eslint-config@2.0.0`
|
||||
* Update to eslint@8 and and `@npmcli/eslint-config@2.0.0`
|
||||
* Remove eslint-plugin-node.
|
||||
Also remove an unused script that was failing linting. We don't use the
|
||||
update-dist-tags script anymore as part of our release process.
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`7b4aa59b6`](https://github.com/npm/cli/commit/7b4aa59b6630831f25d19c0c15a65acaf3a83327)
|
||||
`signal-exit@3.0.6`:, `tap@15.1.2`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`08015859c`](https://github.com/npm/cli/commit/08015859ca0abe47845d2970212cd344cdfc56e6)
|
||||
[#4049](https://github.com/npm/cli/issues/4049)
|
||||
`npmlog@6.0.0`
|
||||
* [`088c11694`](https://github.com/npm/cli/commit/088c11694a9f575e5c0fe10ab9efb55d14019be7)
|
||||
[#4045](https://github.com/npm/cli/issues/4045)
|
||||
`node-gyp@8.4.0`:
|
||||
* feat: support vs2022
|
||||
* feat: build with config.gypi from node headers
|
||||
|
||||
## v8.1.3 (2021-11-04)
|
||||
|
||||
### BUG FIXES
|
||||
|
||||
* [`8ffeb71df`](https://github.com/npm/cli/commit/8ffeb71dfb248b4a76744bd06cd4d6100f17c8ae)
|
||||
[#3959](https://github.com/npm/cli/issues/3959)
|
||||
fix: refactor commands
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`e5bfdaca4`](https://github.com/npm/cli/commit/e5bfdaca455e294109ba026f4d8b5cc80d3dfd20)
|
||||
[#3978](https://github.com/npm/cli/issues/3978)
|
||||
fix: shrinkwrap setting incorrect lockfileVersion
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
* [`32ccd3c27`](https://github.com/npm/cli/commit/32ccd3c2767a14198a1803f04e747ef848f7c938)
|
||||
[#3988](https://github.com/npm/cli/issues/3988)
|
||||
fix: remove usage of unnecessary util.promisify
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
* [`1e9c31c4e`](https://github.com/npm/cli/commit/1e9c31c4e3929483580a0a554d7515095b5418ca)
|
||||
[#3994](https://github.com/npm/cli/issues/3994)
|
||||
fix: npm help on windows
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
* [`22230ef3d`](https://github.com/npm/cli/commit/22230ef3dd590def31c274b3412106b4cfbd212f)
|
||||
[#3987](https://github.com/npm/cli/issues/3987)
|
||||
fix: make prefixed usage errors more consistent
|
||||
([@lukekarrys](https://github.com/lukekarrys))
|
||||
|
||||
### DEPENDENCIES
|
||||
|
||||
* [`ac2fabb86`](https://github.com/npm/cli/commit/ac2fabb8604db0dac852913d61c8415ae7464485)
|
||||
[#3990](https://github.com/npm/cli/issues/3990)
|
||||
`@npmcli/arborist@4.0.4`
|
||||
* fix: don't compare spec for local dep vs existing
|
||||
* fix: stop pruning peerSets when entryEdge is from a workspace
|
||||
* [`a0d35ff20`](https://github.com/npm/cli/commit/a0d35ff20aed6aab8508123eb540bc9c61fb127d)
|
||||
[#3996](https://github.com/npm/cli/issues/3996)
|
||||
`@npmcli/config@2.3.1`:
|
||||
* fix: dont load project configs in global mode
|
||||
|
||||
## v8.1.2 (2021-10-28)
|
||||
|
||||
### BUG FIXES
|
||||
|
||||
* [`cb9f43551`](https://github.com/npm/cli/commit/cb9f43551f46bf27095cd7bd6c1885a441004cd2)
|
||||
[#3949](https://github.com/npm/cli/issues/3949)
|
||||
allow `--lockfile-version` config to be string and coerce to number ([@lukekarrys](https://github.com/lukekarrys))
|
||||
* [`070901d7a`](https://github.com/npm/cli/commit/070901d7a6e3110a04ef41d8fcf14ffbfcce1496)
|
||||
[#3943](https://github.com/npm/cli/issues/3943)
|
||||
fix(publish): clean args before logging
|
||||
([@wraithgar](https://github.com/wraithgar))
|
||||
|
||||
### DEPENDENCIES
|
||||
|
||||
* [`8af94726b`](https://github.com/npm/cli/commit/8af94726b098031c7c0cae7ed50cc4e2e3499181)
|
||||
[#3953](https://github.com/npm/cli/issues/3953)
|
||||
`arborist@4.0.3`
|
||||
* [`38cee94`](https://github.com/npm/arborist/commit/38cee94afa53d578830cc282348a803a8a6eefad)
|
||||
[#340](https://github.com/npm/arborist/pull/340)
|
||||
fix: set lockfileVersion from file during reset
|
||||
* [`d310bd3`](https://github.com/npm/arborist/commit/d310bd3290c3a81e8285ceeb6eda9c9b5aa867d7)
|
||||
[#339](https://github.com/npm/arborist/pull/339)
|
||||
fix: always set originalLockfileVersion when doing shrinkwrap reset
|
||||
|
||||
## v8.1.1 (2021-10-21)
|
||||
|
||||
### DEPENDENCIES
|
||||
|
||||
* [`51fb83ce9`](https://github.com/npm/cli/commit/51fb83ce93fdd7e289da7b2aabc95b0518f0aa31)
|
||||
[#3921](https://github.com/npm/cli/issues/3921)
|
||||
`@npmcli/arborist@4.0.2`:
|
||||
* fix: skip peer conflict check if there is a current node
|
||||
* [`1d07f2187`](https://github.com/npm/cli/commit/1d07f21876994c6d4d69559203cfdac6022536b6)
|
||||
[#3913](https://github.com/npm/cli/issues/3913)
|
||||
`node-gyp@8.3.0`:
|
||||
* feat(gyp): update gyp to v0.10.0
|
||||
|
||||
## v8.1.0 (2021-10-14)
|
||||
|
||||
### FEATURES
|
||||
|
||||
* [`24273a862`](https://github.com/npm/cli/commit/24273a862e54abfd022df9fc4b8c250bfe77817c)
|
||||
[#3890](https://github.com/npm/cli/issues/3890)
|
||||
feat(workspaces): add --include-workspace-root and explicit --no-workspaces
|
||||
([@fritzy](https://github.com/fritzy))
|
||||
* [`d559d6da8`](https://github.com/npm/cli/commit/d559d6da84c2dae960c6b7c89c6012fb31bcfa37)
|
||||
[#3880](https://github.com/npm/cli/issues/3880)
|
||||
feat(config): Add --lockfile-version config option
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### DEPENDENCIES
|
||||
|
||||
* [`ae4bf013d`](https://github.com/npm/cli/commit/ae4bf013d06d84b8600937a28cc7b4c4034f571c)
|
||||
[#3883](https://github.com/npm/cli/issues/3883)
|
||||
`pacote@12.0.2`:
|
||||
* fix: preserve git+ssh url for non-hosted repos
|
||||
* deps: update `npm-packlist@3.0.0`
|
||||
* fix: no longer include ignored bundled link deps
|
||||
* [`fbc5a3d08`](https://github.com/npm/cli/commit/fbc5a3d08231176b9d8a7b9dd3371fb40ba6abc9)
|
||||
[#3889](https://github.com/npm/cli/issues/3889)
|
||||
`@npmcli/ci-detect@1.4.0`
|
||||
* [`b6bc279e5`](https://github.com/npm/cli/commit/b6bc279e55aa65afff09d9258f9df7168a7dbadb)
|
||||
`@npmcli/arborist@4.0.1`
|
||||
* [`0f69d295b`](https://github.com/npm/cli/commit/0f69d295bd5516f496af75ef29e7ae6304fa2ba5)
|
||||
[#3893](https://github.com/npm/cli/issues/3893)
|
||||
`@npmcli/map-workspaces@2.0.0`
|
||||
|
||||
### DOCUMENTATION
|
||||
|
||||
* [`f77932ca1`](https://github.com/npm/cli/commit/f77932ca1eafbece16fc249a7470f760d652bd94)
|
||||
[#3861](https://github.com/npm/cli/issues/3861)
|
||||
fix(docs): Update Node support in README
|
||||
([@gfyoung](https://github.com/gfyoung))
|
||||
* [`a190f422a`](https://github.com/npm/cli/commit/a190f422a2587a0e56afa5032175e57e55123ea2)
|
||||
[#3878](https://github.com/npm/cli/issues/3878)
|
||||
fix(docs): grammar fix
|
||||
([@XhmikosR](https://github.com/XhmikosR))
|
||||
|
||||
## v8.0.0 (2021-10-07)
|
||||
|
||||
The purpose of this release is to drop support for old node versions and
|
||||
to remove support for `require('npm')`. There are no other breaking
|
||||
changes.
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* Drop support for node 10 and 11
|
||||
* Raise support ceiling in node 12 and 14 to LTS (^12.13.0/^14.15.0)
|
||||
* Drop support to `require('npm')`
|
||||
* Update subdependencies that also dropped node10 support
|
||||
|
||||
### DEPENDENCIES
|
||||
|
||||
* The following dependencies were updated to drop node10 support and
|
||||
update to the latest node-gyp
|
||||
* libnpmversion@2.0.1
|
||||
* pacote@12.0.0
|
||||
* libnpmpack@3.0.0
|
||||
* @npmcli/arborist@3.0.0
|
||||
* libnpmfund@2.0.0
|
||||
* libnpmexec@3.0.0
|
||||
* node-gyp@8.2.0
|
||||
* [`8bd85cdae`](https://github.com/npm/cli/commit/8bd85cdae5eead60d5e92d6f1be27e88b480b1cb)
|
||||
[#3813](https://github.com/npm/cli/issues/3813)
|
||||
`cli-columns@4.0.0`
|
|
@ -0,0 +1,66 @@
|
|||
# Contributing
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
All interactions in the **npm** organization on GitHub are considered to be covered by our standard [Code of Conduct](https://docs.npmjs.com/policies/conduct).
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
When submitting a new bug report, please first [search](https://github.com/npm/cli/issues) for an existing or similar report & then use one of our existing [issue templates](https://github.com/npm/cli/issues/new/choose) if you believe you've come across a unique problem. Duplicate issues, or issues that don't use one of our templates may get closed without a response.
|
||||
|
||||
## Development
|
||||
|
||||
**1. Clone this repository...**
|
||||
|
||||
```bash
|
||||
$ git clone git@github.com:npm/cli.git npm
|
||||
```
|
||||
|
||||
**2. Navigate into project & install development-specific dependencies...**
|
||||
|
||||
```bash
|
||||
$ cd ./npm && npm install
|
||||
```
|
||||
|
||||
**3. Write some code &/or add some tests...**
|
||||
|
||||
```bash
|
||||
...
|
||||
```
|
||||
|
||||
**4. Run tests & ensure they pass...**
|
||||
```
|
||||
$ npm run test
|
||||
```
|
||||
|
||||
**5. Open a [Pull Request](https://github.com/npm/cli/pulls) for your work & become the newest contributor to `npm`! 🎉**
|
||||
|
||||
## Test Coverage
|
||||
|
||||
We use [`tap`](https://node-tap.org/) for testing & expect that every new feature or bug fix comes with corresponding tests that validate the solutions. We strive to have as close to, if not exactly, 100% code coverage.
|
||||
|
||||
**You can find out what the current test coverage percentage is by running...**
|
||||
|
||||
```bash
|
||||
$ npm run check-coverage
|
||||
```
|
||||
|
||||
## Performance & Benchmarks
|
||||
|
||||
We've set up an automated [benchmark](https://github.com/npm/benchmarks) integration that will run against all Pull Requests; Posting back a comment with the results of the run.
|
||||
|
||||
**Example:**
|
||||
|
||||
![image](https://user-images.githubusercontent.com/2818462/72312698-e2e57f80-3656-11ea-9fcf-4a8f6b97b0d1.png)
|
||||
|
||||
You can learn more about this tool, including how to run & configure it manually, [here](https://github.com/npm/benchmarks)
|
||||
|
||||
## What _not_ to contribute?
|
||||
|
||||
### Dependencies
|
||||
|
||||
It should be noted that our team does not accept third-party dependency updates/PRs. We have a [release process](https://github.com/npm/cli/wiki/Release-Process) that includes checks to ensure dependencies are staying up-to-date & will ship security patches for CVEs as they occur. If you submit a PR trying to update our dependencies we will close it with or without a reference to these contribution guidelines.
|
||||
|
||||
### Tools/Automation
|
||||
|
||||
Our core team is responsible for the maintenance of the tooling/automation in this project & we ask collaborators to kindly not make changes to these when contributing (ex. `.github/*`, `.eslintrc.json`, `.licensee.json` etc.)
|
|
@ -0,0 +1,235 @@
|
|||
The npm application
|
||||
Copyright (c) npm, Inc. and Contributors
|
||||
Licensed on the terms of The Artistic License 2.0
|
||||
|
||||
Node package dependencies of the npm application
|
||||
Copyright (c) their respective copyright owners
|
||||
Licensed on their respective license terms
|
||||
|
||||
The npm public registry at https://registry.npmjs.org
|
||||
and the npm website at https://www.npmjs.com
|
||||
Operated by npm, Inc.
|
||||
Use governed by terms published on https://www.npmjs.com
|
||||
|
||||
"Node.js"
|
||||
Trademark Joyent, Inc., https://joyent.com
|
||||
Neither npm nor npm, Inc. are affiliated with Joyent, Inc.
|
||||
|
||||
The Node.js application
|
||||
Project of Node Foundation, https://nodejs.org
|
||||
|
||||
The npm Logo
|
||||
Copyright (c) Mathias Pettersson and Brian Hammond
|
||||
|
||||
"Gubblebum Blocky" typeface
|
||||
Copyright (c) Tjarda Koster, https://jelloween.deviantart.com
|
||||
Used with permission
|
||||
|
||||
|
||||
--------
|
||||
|
||||
|
||||
The Artistic License 2.0
|
||||
|
||||
Copyright (c) 2000-2006, The Perl Foundation.
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
This license establishes the terms under which a given free software
|
||||
Package may be copied, modified, distributed, and/or redistributed.
|
||||
The intent is that the Copyright Holder maintains some artistic
|
||||
control over the development of that Package while still keeping the
|
||||
Package available as open source and free software.
|
||||
|
||||
You are always permitted to make arrangements wholly outside of this
|
||||
license directly with the Copyright Holder of a given Package. If the
|
||||
terms of this license do not permit the full use that you propose to
|
||||
make of the Package, you should contact the Copyright Holder and seek
|
||||
a different licensing arrangement.
|
||||
|
||||
Definitions
|
||||
|
||||
"Copyright Holder" means the individual(s) or organization(s)
|
||||
named in the copyright notice for the entire Package.
|
||||
|
||||
"Contributor" means any party that has contributed code or other
|
||||
material to the Package, in accordance with the Copyright Holder's
|
||||
procedures.
|
||||
|
||||
"You" and "your" means any person who would like to copy,
|
||||
distribute, or modify the Package.
|
||||
|
||||
"Package" means the collection of files distributed by the
|
||||
Copyright Holder, and derivatives of that collection and/or of
|
||||
those files. A given Package may consist of either the Standard
|
||||
Version, or a Modified Version.
|
||||
|
||||
"Distribute" means providing a copy of the Package or making it
|
||||
accessible to anyone else, or in the case of a company or
|
||||
organization, to others outside of your company or organization.
|
||||
|
||||
"Distributor Fee" means any fee that you charge for Distributing
|
||||
this Package or providing support for this Package to another
|
||||
party. It does not mean licensing fees.
|
||||
|
||||
"Standard Version" refers to the Package if it has not been
|
||||
modified, or has been modified only in ways explicitly requested
|
||||
by the Copyright Holder.
|
||||
|
||||
"Modified Version" means the Package, if it has been changed, and
|
||||
such changes were not explicitly requested by the Copyright
|
||||
Holder.
|
||||
|
||||
"Original License" means this Artistic License as Distributed with
|
||||
the Standard Version of the Package, in its current version or as
|
||||
it may be modified by The Perl Foundation in the future.
|
||||
|
||||
"Source" form means the source code, documentation source, and
|
||||
configuration files for the Package.
|
||||
|
||||
"Compiled" form means the compiled bytecode, object code, binary,
|
||||
or any other form resulting from mechanical transformation or
|
||||
translation of the Source form.
|
||||
|
||||
|
||||
Permission for Use and Modification Without Distribution
|
||||
|
||||
(1) You are permitted to use the Standard Version and create and use
|
||||
Modified Versions for any purpose without restriction, provided that
|
||||
you do not Distribute the Modified Version.
|
||||
|
||||
|
||||
Permissions for Redistribution of the Standard Version
|
||||
|
||||
(2) You may Distribute verbatim copies of the Source form of the
|
||||
Standard Version of this Package in any medium without restriction,
|
||||
either gratis or for a Distributor Fee, provided that you duplicate
|
||||
all of the original copyright notices and associated disclaimers. At
|
||||
your discretion, such verbatim copies may or may not include a
|
||||
Compiled form of the Package.
|
||||
|
||||
(3) You may apply any bug fixes, portability changes, and other
|
||||
modifications made available from the Copyright Holder. The resulting
|
||||
Package will still be considered the Standard Version, and as such
|
||||
will be subject to the Original License.
|
||||
|
||||
|
||||
Distribution of Modified Versions of the Package as Source
|
||||
|
||||
(4) You may Distribute your Modified Version as Source (either gratis
|
||||
or for a Distributor Fee, and with or without a Compiled form of the
|
||||
Modified Version) provided that you clearly document how it differs
|
||||
from the Standard Version, including, but not limited to, documenting
|
||||
any non-standard features, executables, or modules, and provided that
|
||||
you do at least ONE of the following:
|
||||
|
||||
(a) make the Modified Version available to the Copyright Holder
|
||||
of the Standard Version, under the Original License, so that the
|
||||
Copyright Holder may include your modifications in the Standard
|
||||
Version.
|
||||
|
||||
(b) ensure that installation of your Modified Version does not
|
||||
prevent the user installing or running the Standard Version. In
|
||||
addition, the Modified Version must bear a name that is different
|
||||
from the name of the Standard Version.
|
||||
|
||||
(c) allow anyone who receives a copy of the Modified Version to
|
||||
make the Source form of the Modified Version available to others
|
||||
under
|
||||
|
||||
(i) the Original License or
|
||||
|
||||
(ii) a license that permits the licensee to freely copy,
|
||||
modify and redistribute the Modified Version using the same
|
||||
licensing terms that apply to the copy that the licensee
|
||||
received, and requires that the Source form of the Modified
|
||||
Version, and of any works derived from it, be made freely
|
||||
available in that license fees are prohibited but Distributor
|
||||
Fees are allowed.
|
||||
|
||||
|
||||
Distribution of Compiled Forms of the Standard Version
|
||||
or Modified Versions without the Source
|
||||
|
||||
(5) You may Distribute Compiled forms of the Standard Version without
|
||||
the Source, provided that you include complete instructions on how to
|
||||
get the Source of the Standard Version. Such instructions must be
|
||||
valid at the time of your distribution. If these instructions, at any
|
||||
time while you are carrying out such distribution, become invalid, you
|
||||
must provide new instructions on demand or cease further distribution.
|
||||
If you provide valid instructions or cease distribution within thirty
|
||||
days after you become aware that the instructions are invalid, then
|
||||
you do not forfeit any of your rights under this license.
|
||||
|
||||
(6) You may Distribute a Modified Version in Compiled form without
|
||||
the Source, provided that you comply with Section 4 with respect to
|
||||
the Source of the Modified Version.
|
||||
|
||||
|
||||
Aggregating or Linking the Package
|
||||
|
||||
(7) You may aggregate the Package (either the Standard Version or
|
||||
Modified Version) with other packages and Distribute the resulting
|
||||
aggregation provided that you do not charge a licensing fee for the
|
||||
Package. Distributor Fees are permitted, and licensing fees for other
|
||||
components in the aggregation are permitted. The terms of this license
|
||||
apply to the use and Distribution of the Standard or Modified Versions
|
||||
as included in the aggregation.
|
||||
|
||||
(8) You are permitted to link Modified and Standard Versions with
|
||||
other works, to embed the Package in a larger work of your own, or to
|
||||
build stand-alone binary or bytecode versions of applications that
|
||||
include the Package, and Distribute the result without restriction,
|
||||
provided the result does not expose a direct interface to the Package.
|
||||
|
||||
|
||||
Items That are Not Considered Part of a Modified Version
|
||||
|
||||
(9) Works (including, but not limited to, modules and scripts) that
|
||||
merely extend or make use of the Package, do not, by themselves, cause
|
||||
the Package to be a Modified Version. In addition, such works are not
|
||||
considered parts of the Package itself, and are not subject to the
|
||||
terms of this license.
|
||||
|
||||
|
||||
General Provisions
|
||||
|
||||
(10) Any use, modification, and distribution of the Standard or
|
||||
Modified Versions is governed by this Artistic License. By using,
|
||||
modifying or distributing the Package, you accept this license. Do not
|
||||
use, modify, or distribute the Package, if you do not accept this
|
||||
license.
|
||||
|
||||
(11) If your Modified Version has been derived from a Modified
|
||||
Version made by someone other than you, you are nevertheless required
|
||||
to ensure that your Modified Version complies with the requirements of
|
||||
this license.
|
||||
|
||||
(12) This license does not grant you the right to use any trademark,
|
||||
service mark, tradename, or logo of the Copyright Holder.
|
||||
|
||||
(13) This license includes the non-exclusive, worldwide,
|
||||
free-of-charge patent license to make, have made, use, offer to sell,
|
||||
sell, import and otherwise transfer the Package with respect to any
|
||||
patent claims licensable by the Copyright Holder that are necessarily
|
||||
infringed by the Package. If you institute patent litigation
|
||||
(including a cross-claim or counterclaim) against any party alleging
|
||||
that the Package constitutes direct or contributory patent
|
||||
infringement, then this Artistic License to you shall terminate on the
|
||||
date that such litigation is filed.
|
||||
|
||||
(14) Disclaimer of Warranty:
|
||||
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
|
||||
IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
|
||||
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
|
||||
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
--------
|
|
@ -0,0 +1,123 @@
|
|||
# vim: set softtabstop=2 shiftwidth=2:
|
||||
SHELL = bash
|
||||
|
||||
PUBLISHTAG = $(shell node scripts/publish-tag.js)
|
||||
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
markdowns = $(shell find docs -name '*.md' | grep -v 'index')
|
||||
|
||||
# these docs have the @VERSION@ tag in them, so they have to be rebuilt
|
||||
# whenever the package.json is touched, in case the version changed.
|
||||
version_mandocs = $(shell grep -rl '@VERSION@' docs/content \
|
||||
|sed 's|.md|.1|g' \
|
||||
|sed 's|docs/content/commands/|man/man1/|g' )
|
||||
|
||||
cli_mandocs = $(shell find docs/content/commands -name '*.md' \
|
||||
|sed 's|.md|.1|g' \
|
||||
|sed 's|docs/content/commands/|man/man1/|g' )
|
||||
|
||||
files_mandocs = $(shell find docs/content/configuring-npm -name '*.md' \
|
||||
|sed 's|.md|.5|g' \
|
||||
|sed 's|docs/content/configuring-npm/|man/man5/|g' ) \
|
||||
|
||||
misc_mandocs = $(shell find docs/content/using-npm -name '*.md' \
|
||||
|sed 's|.md|.7|g' \
|
||||
|sed 's|docs/content/using-npm/|man/man7/|g' ) \
|
||||
|
||||
mandocs = $(cli_mandocs) $(files_mandocs) $(misc_mandocs)
|
||||
|
||||
all: docs
|
||||
|
||||
docs: mandocs htmldocs
|
||||
|
||||
# don't regenerate the snapshot if we're generating
|
||||
# snapshots, since presumably we just did that.
|
||||
mandocs: dev-deps $(mandocs)
|
||||
@ ! [ $${npm_lifecycle_event} = "snap" ] && \
|
||||
! [ $${npm_lifecycle_event} = "postsnap" ] && \
|
||||
TAP_SNAPSHOT=1 node test/lib/utils/config/definitions.js || true
|
||||
|
||||
$(version_mandocs): package.json
|
||||
|
||||
htmldocs: dev-deps
|
||||
node bin/npm-cli.js rebuild
|
||||
node bin/npm-cli.js run -w docs build
|
||||
|
||||
clean: docs-clean gitclean
|
||||
|
||||
docsclean: docs-clean
|
||||
|
||||
docs-clean:
|
||||
rm -rf man
|
||||
|
||||
## build-time dependencies for the documentation
|
||||
dev-deps:
|
||||
node bin/npm-cli.js install --no-audit --ignore-scripts
|
||||
|
||||
## targets for man files, these are encouraged to be only built by running `make docs` or `make mandocs`
|
||||
man/man1/%.1: docs/content/commands/%.md scripts/docs-build.js
|
||||
@[ -d man/man1 ] || mkdir -p man/man1
|
||||
node scripts/docs-build.js $< $@
|
||||
|
||||
man/man5/npm-json.5: man/man5/package.json.5
|
||||
cp $< $@
|
||||
|
||||
man/man5/npm-global.5: man/man5/folders.5
|
||||
cp $< $@
|
||||
|
||||
man/man5/%.5: docs/content/configuring-npm/%.md scripts/docs-build.js
|
||||
@[ -d man/man5 ] || mkdir -p man/man5
|
||||
node scripts/docs-build.js $< $@
|
||||
|
||||
man/man7/%.7: docs/content/using-npm/%.md scripts/docs-build.js
|
||||
@[ -d man/man7 ] || mkdir -p man/man7
|
||||
node scripts/docs-build.js $< $@
|
||||
|
||||
# Any time the config definitions description changes, automatically
|
||||
# update the documentation to account for it
|
||||
docs/content/using-npm/config.md: scripts/config-doc.js lib/utils/config/*.js
|
||||
node scripts/config-doc.js
|
||||
|
||||
docs/content/commands/npm-%.md: lib/%.js scripts/config-doc-command.js lib/utils/config/*.js
|
||||
node scripts/config-doc-command.js $@ $<
|
||||
|
||||
freshdocs:
|
||||
touch lib/utils/config/definitions.js
|
||||
touch scripts/config-doc-command.js
|
||||
touch scripts/config-doc.js
|
||||
make docs
|
||||
|
||||
test: dev-deps
|
||||
node bin/npm-cli.js test
|
||||
|
||||
smoke-tests: dev-deps
|
||||
node bin/npm-cli.js run smoke-tests -- --no-check-coverage
|
||||
|
||||
ls-ok:
|
||||
node . ls --production >/dev/null
|
||||
|
||||
gitclean:
|
||||
git clean -fd
|
||||
|
||||
uninstall:
|
||||
node bin/npm-cli.js rm -g -f npm
|
||||
|
||||
link: uninstall
|
||||
node bin/npm-cli.js link -f --ignore-scripts
|
||||
|
||||
prune:
|
||||
node bin/npm-cli.js run resetdeps
|
||||
node bin/npm-cli.js prune --production --no-save --no-audit
|
||||
@[[ "$(shell git status -s)" != "" ]] && echo "ERR: found unpruned files" && exit 1 || echo "git status is clean"
|
||||
|
||||
|
||||
publish: gitclean ls-ok link test smoke-tests docs prune
|
||||
@git push origin :v$(shell node bin/npm-cli.js --no-timing -v) 2>&1 || true
|
||||
git push origin $(BRANCH) &&\
|
||||
git push origin --tags &&\
|
||||
node bin/npm-cli.js publish --tag=$(PUBLISHTAG)
|
||||
|
||||
release: gitclean ls-ok docs prune
|
||||
@bash scripts/release.sh
|
||||
|
||||
.PHONY: all latest install dev link docs clean uninstall test man docs-clean docsclean release ls-ok dev-deps prune freshdocs
|
|
@ -0,0 +1,70 @@
|
|||
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/npm/cli/Node%20CI/latest)](https://github.com/npm/cli/actions?query=workflow%3A%22Node+CI%22+branch%3Alatest) [![Coveralls github branch](https://img.shields.io/coveralls/github/npm/cli/latest)](https://coveralls.io/github/npm/cli?branch=latest)
|
||||
|
||||
# npm - a JavaScript package manager
|
||||
|
||||
### Requirements
|
||||
|
||||
One of the following versions of [Node.js](https://nodejs.org/en/download/) must be installed to run **`npm`**:
|
||||
|
||||
* `12.x.x` >= `12.13.0`
|
||||
* `14.x.x` >= `14.15.0`
|
||||
* `16.0.0` or higher
|
||||
|
||||
### Installation
|
||||
|
||||
**`npm`** comes bundled with [**`node`**](https://nodejs.org/), & most third-party distributions, by default. Officially supported downloads/distributions can be found at: [nodejs.org/en/download](https://nodejs.org/en/download)
|
||||
|
||||
#### Direct Download
|
||||
|
||||
You can download & install **`npm`** directly from [**npmjs**.com](https://npmjs.com/) using our custom `install.sh` script:
|
||||
|
||||
```bash
|
||||
curl -qL https://www.npmjs.com/install.sh | sh
|
||||
```
|
||||
|
||||
#### Node Version Managers
|
||||
|
||||
If you're looking to manage multiple versions of **`node`** &/or **`npm`**, consider using a "Node Version Manager" such as:
|
||||
|
||||
* [**`nvm`**](https://github.com/nvm-sh/nvm)
|
||||
* [**`nvs`**](https://github.com/jasongin/nvs)
|
||||
* [**`nave`**](https://github.com/isaacs/nave)
|
||||
* [**`n`**](https://github.com/tj/n)
|
||||
* [**`volta`**](https://github.com/volta-cli/volta)
|
||||
* [**`nodenv`**](https://github.com/nodenv/nodenv)
|
||||
* [**`asdf-nodejs`**](https://github.com/asdf-vm/asdf-nodejs)
|
||||
* [**`nvm-windows`**](https://github.com/coreybutler/nvm-windows)
|
||||
|
||||
### Usage
|
||||
|
||||
```bash
|
||||
npm <command>
|
||||
```
|
||||
|
||||
### Links & Resources
|
||||
|
||||
* [**Documentation**](https://docs.npmjs.com/) - Official docs & how-tos for all things **npm**
|
||||
* Note: you can also search docs locally with `npm help-search <query>`
|
||||
* [**Bug Tracker**](https://github.com/npm/cli/issues) - Search or submit bugs against the CLI
|
||||
* [**Roadmap**](https://github.com/npm/roadmap) - Track & follow along with our public roadmap
|
||||
* [**Feedback**](https://github.com/npm/feedback) - Contribute ideas & discussion around the npm registry, website & CLI
|
||||
* [**RFCs**](https://github.com/npm/rfcs) - Contribute ideas & specifications for the API/design of the npm CLI
|
||||
* [**Service Status**](https://status.npmjs.org/) - Monitor the current status & see incident reports for the website & registry
|
||||
* [**Project Status**](https://npm.github.io/statusboard/) - See the health of all our maintained OSS projects in one view
|
||||
* [**Events Calendar**](https://calendar.google.com/calendar/u/0/embed?src=npmjs.com_oonluqt8oftrt0vmgrfbg6q6go@group.calendar.google.com) - Keep track of our Open RFC calls, releases, meetups, conferences & more
|
||||
* [**Support**](https://www.npmjs.com/support) - Experiencing problems with the **npm** [website](https://npmjs.com) or [registry](https://registry.npmjs.org)? File a ticket [here](https://www.npmjs.com/support)
|
||||
|
||||
### Acknowledgments
|
||||
|
||||
* `npm` is configured to use the **npm Public Registry** at [https://registry.npmjs.org](https://registry.npmjs.org) by default; Usage of this registry is subject to **Terms of Use** available at [https://npmjs.com/policies/terms](https://npmjs.com/policies/terms)
|
||||
* You can configure `npm` to use any other compatible registry you prefer. You can read more about configuring third-party registries [here](https://docs.npmjs.com/cli/v7/using-npm/registry)
|
||||
|
||||
### FAQ on Branding
|
||||
|
||||
#### Is it "npm" or "NPM" or "Npm"?
|
||||
|
||||
**`npm`** should never be capitalized unless it is being displayed in a location that is customarily all-capitals (ex. titles on `man` pages).
|
||||
|
||||
#### Is "npm" an acronym for "Node Package Manager"?
|
||||
|
||||
Contrary to popular belief, **`npm`** **is not** in fact an acronym for "Node Package Manager"; It is a recursive bacronymic abbreviation for **"npm is not an acronym"** (if the project was named "ninaa", then it would be an acronym). The precursor to **`npm`** was actually a bash utility named **"pm"**, which was the shortform name of **"pkgmakeinst"** - a bash function that installed various things on various platforms. If **`npm`** were to ever have been considered an acronym, it would be as "node pm" or, potentially "new pm".
|
|
@ -0,0 +1 @@
|
|||
Please send vulnerability reports through [hackerone](https://hackerone.com/github).
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env sh
|
||||
if [ "x$npm_config_node_gyp" = "x" ]; then
|
||||
node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
|
||||
else
|
||||
"$npm_config_node_gyp" "$@"
|
||||
fi
|
|
@ -0,0 +1,5 @@
|
|||
if not defined npm_config_node_gyp (
|
||||
node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
|
||||
) else (
|
||||
node "%npm_config_node_gyp%" %*
|
||||
)
|
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/env bash
|
||||
(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix
|
||||
|
||||
basedir=`dirname "$0"`
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
NODE_EXE="$basedir/node.exe"
|
||||
if ! [ -x "$NODE_EXE" ]; then
|
||||
NODE_EXE="$basedir/node"
|
||||
fi
|
||||
if ! [ -x "$NODE_EXE" ]; then
|
||||
NODE_EXE=node
|
||||
fi
|
||||
|
||||
# this path is passed to node.exe, so it needs to match whatever
|
||||
# kind of paths Node.js thinks it's using, typically win32 paths.
|
||||
CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')"
|
||||
NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js"
|
||||
|
||||
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
|
||||
if [ $? -ne 0 ]; then
|
||||
# if this didn't work, then everything else below will fail
|
||||
echo "Could not determine Node.js install directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
|
||||
|
||||
# a path that will fail -f test on any posix bash
|
||||
NPM_WSL_PATH="/.."
|
||||
|
||||
# WSL can run Windows binaries, so we have to give it the win32 path
|
||||
# however, WSL bash tests against posix paths, so we need to construct that
|
||||
# to know if npm is installed globally.
|
||||
if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then
|
||||
NPM_WSL_PATH=`wslpath "$NPM_PREFIX_NPM_CLI_JS"`
|
||||
fi
|
||||
if [ -f "$NPM_PREFIX_NPM_CLI_JS" ] || [ -f "$NPM_WSL_PATH" ]; then
|
||||
NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
|
||||
fi
|
||||
|
||||
"$NODE_EXE" "$NPM_CLI_JS" "$@"
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env node
|
||||
require('../lib/cli.js')(process)
|
|
@ -0,0 +1,19 @@
|
|||
:: Created by npm, please don't edit manually.
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
SET "NODE_EXE=%~dp0\node.exe"
|
||||
IF NOT EXIST "%NODE_EXE%" (
|
||||
SET "NODE_EXE=node"
|
||||
)
|
||||
|
||||
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
|
||||
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
|
||||
SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js"
|
||||
)
|
||||
IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" (
|
||||
SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%"
|
||||
)
|
||||
|
||||
"%NODE_EXE%" "%NPM_CLI_JS%" %*
|
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This is used by the Node.js installer, which expects the cygwin/mingw
|
||||
# shell script to already be present in the npm dependency folder.
|
||||
|
||||
(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix
|
||||
|
||||
basedir=`dirname "$0"`
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
||||
esac
|
||||
|
||||
NODE_EXE="$basedir/node.exe"
|
||||
if ! [ -x "$NODE_EXE" ]; then
|
||||
NODE_EXE=node
|
||||
fi
|
||||
|
||||
# these paths are passed to node.exe, so they need to match whatever
|
||||
# kind of paths Node.js thinks it's using, typically win32 paths.
|
||||
CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')"
|
||||
if [ $? -ne 0 ]; then
|
||||
# if this didn't work, then everything else below will fail
|
||||
echo "Could not determine Node.js install directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js"
|
||||
NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js"
|
||||
NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
|
||||
NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js"
|
||||
|
||||
# a path that will fail -f test on any posix bash
|
||||
NPX_WSL_PATH="/.."
|
||||
|
||||
# WSL can run Windows binaries, so we have to give it the win32 path
|
||||
# however, WSL bash tests against posix paths, so we need to construct that
|
||||
# to know if npm is installed globally.
|
||||
if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then
|
||||
NPX_WSL_PATH=`wslpath "$NPM_PREFIX_NPX_CLI_JS"`
|
||||
fi
|
||||
if [ -f "$NPM_PREFIX_NPX_CLI_JS" ] || [ -f "$NPX_WSL_PATH" ]; then
|
||||
NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS"
|
||||
fi
|
||||
|
||||
"$NODE_EXE" "$NPX_CLI_JS" "$@"
|
|
@ -0,0 +1,128 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const cli = require('../lib/cli.js')
|
||||
|
||||
// run the resulting command as `npm exec ...args`
|
||||
process.argv[1] = require.resolve('./npm-cli.js')
|
||||
process.argv.splice(2, 0, 'exec')
|
||||
|
||||
// TODO: remove the affordances for removed items in npm v9
|
||||
const removedSwitches = new Set([
|
||||
'always-spawn',
|
||||
'ignore-existing',
|
||||
'shell-auto-fallback',
|
||||
])
|
||||
|
||||
const removedOpts = new Set([
|
||||
'npm',
|
||||
'node-arg',
|
||||
'n',
|
||||
])
|
||||
|
||||
const removed = new Set([
|
||||
...removedSwitches,
|
||||
...removedOpts,
|
||||
])
|
||||
|
||||
const { definitions, shorthands } = require('../lib/utils/config/index.js')
|
||||
const npmSwitches = Object.entries(definitions)
|
||||
.filter(([key, { type }]) => type === Boolean ||
|
||||
(Array.isArray(type) && type.includes(Boolean)))
|
||||
.map(([key]) => key)
|
||||
|
||||
// things that don't take a value
|
||||
const switches = new Set([
|
||||
...removedSwitches,
|
||||
...npmSwitches,
|
||||
'no-install',
|
||||
'quiet',
|
||||
'q',
|
||||
'version',
|
||||
'v',
|
||||
'help',
|
||||
'h',
|
||||
])
|
||||
|
||||
// things that do take a value
|
||||
const opts = new Set([
|
||||
...removedOpts,
|
||||
'package',
|
||||
'p',
|
||||
'cache',
|
||||
'userconfig',
|
||||
'call',
|
||||
'c',
|
||||
'shell',
|
||||
'npm',
|
||||
'node-arg',
|
||||
'n',
|
||||
])
|
||||
|
||||
// break out of loop when we find a positional argument or --
|
||||
// If we find a positional arg, we shove -- in front of it, and
|
||||
// let the normal npm cli handle the rest.
|
||||
let i
|
||||
let sawRemovedFlags = false
|
||||
for (i = 3; i < process.argv.length; i++) {
|
||||
const arg = process.argv[i]
|
||||
if (arg === '--') {
|
||||
break
|
||||
} else if (/^-/.test(arg)) {
|
||||
const [key, ...v] = arg.replace(/^-+/, '').split('=')
|
||||
|
||||
switch (key) {
|
||||
case 'p':
|
||||
process.argv[i] = ['--package', ...v].join('=')
|
||||
break
|
||||
|
||||
case 'shell':
|
||||
process.argv[i] = ['--script-shell', ...v].join('=')
|
||||
break
|
||||
|
||||
case 'no-install':
|
||||
process.argv[i] = '--yes=false'
|
||||
break
|
||||
|
||||
default:
|
||||
// resolve shorthands and run again
|
||||
if (shorthands[key] && !removed.has(key)) {
|
||||
const a = [...shorthands[key]]
|
||||
if (v.length) {
|
||||
a.push(v.join('='))
|
||||
}
|
||||
process.argv.splice(i, 1, ...a)
|
||||
i--
|
||||
continue
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
if (removed.has(key)) {
|
||||
console.error(`npx: the --${key} argument has been removed.`)
|
||||
sawRemovedFlags = true
|
||||
process.argv.splice(i, 1)
|
||||
i--
|
||||
}
|
||||
|
||||
if (v.length === 0 && !switches.has(key) &&
|
||||
(opts.has(key) || !/^-/.test(process.argv[i + 1]))) {
|
||||
// value will be next argument, skip over it.
|
||||
if (removed.has(key)) {
|
||||
// also remove the value for the cut key.
|
||||
process.argv.splice(i + 1, 1)
|
||||
} else {
|
||||
i++
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// found a positional arg, put -- in front of it, and we're done
|
||||
process.argv.splice(i, 0, '--')
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (sawRemovedFlags) {
|
||||
console.error('See `npm help exec` for more information')
|
||||
}
|
||||
|
||||
cli(process)
|
|
@ -0,0 +1,20 @@
|
|||
:: Created by npm, please don't edit manually.
|
||||
@ECHO OFF
|
||||
|
||||
SETLOCAL
|
||||
|
||||
SET "NODE_EXE=%~dp0\node.exe"
|
||||
IF NOT EXIST "%NODE_EXE%" (
|
||||
SET "NODE_EXE=node"
|
||||
)
|
||||
|
||||
SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
|
||||
SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js"
|
||||
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
|
||||
SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js"
|
||||
)
|
||||
IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" (
|
||||
SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%"
|
||||
)
|
||||
|
||||
"%NODE_EXE%" "%NPX_CLI_JS%" %*
|
|
@ -0,0 +1,743 @@
|
|||
### v1.4.29 (2015-10-29):
|
||||
|
||||
#### THINGS ARE HAPPENING IN LTS LAND
|
||||
|
||||
In a special one-off release as part of the [strategy to get a version of npm
|
||||
into Node LTS that works with the current
|
||||
registry](https://github.com/nodejs/LTS/issues/37), modify npm to print out
|
||||
this deprecation banner literally every time npm is invoked to do anything:
|
||||
|
||||
```
|
||||
npm WARN deprecated This version of npm lacks support for important features,
|
||||
npm WARN deprecated such as scoped packages, offered by the primary npm
|
||||
npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the
|
||||
npm WARN deprecated latest stable version. To upgrade to npm@2, run:
|
||||
npm WARN deprecated
|
||||
npm WARN deprecated npm -g install npm@latest-2
|
||||
npm WARN deprecated
|
||||
npm WARN deprecated To upgrade to the latest stable version, run:
|
||||
npm WARN deprecated
|
||||
npm WARN deprecated npm -g install npm@latest
|
||||
npm WARN deprecated
|
||||
npm WARN deprecated (Depending on how Node.js was installed on your system, you
|
||||
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
|
||||
npm WARN deprecated on Windows, run them from an Administrator prompt.)
|
||||
npm WARN deprecated
|
||||
npm WARN deprecated If you're running the version of npm bundled with
|
||||
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
|
||||
npm WARN deprecated will be bundled with a version of npm@2, which has some small
|
||||
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
|
||||
npm WARN deprecated semver behavior.
|
||||
```
|
||||
|
||||
The message basically tells the tale: Node 0.10 will finally be getting
|
||||
`npm@2`, so those of you who haven't upgraded your build systems to deal with
|
||||
its (relatively small) breaking changes should do so now.
|
||||
|
||||
Also, this version doesn't even pretend that it can deal with scoped packages,
|
||||
which, given the confusing behavior of older versions of `npm@1.4`, where it
|
||||
would sometimes try to install packages from GitHub, is a distinct improvement.
|
||||
|
||||
There is no good reason for you as an end user to upgrade to this version of
|
||||
npm yourself.
|
||||
|
||||
* [`709e9b4`](https://github.com/npm/npm/commit/709e9b44f5df9817a1c4babfbf26a2329bd265fb)
|
||||
Print 20-line deprecation banner on all command invocations.
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`0c29d09`](https://github.com/npm/npm/commit/0c29d0906608e8e174bd30a7a245e19795326051)
|
||||
Crash out immediately with an exhortation to upgrade on attempts to use
|
||||
scoped packages. ([@othiym23](https://github.com/othiym23))
|
||||
|
||||
### v1.5.0-alpha-4 (2014-07-18):
|
||||
|
||||
* fall back to `_auth` config as default auth when using default registry
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* support for 'init.version' for those who don't want to deal with semver 0.0.x
|
||||
oddities ([@rvagg](https://github.com/rvagg))
|
||||
* [`be06213`](https://github.com/npm/npm/commit/be06213415f2d51a50d2c792b4cd0d3412a9a7b1)
|
||||
remove residual support for `win` log level
|
||||
([@aterris](https://github.com/aterris))
|
||||
|
||||
### v1.5.0-alpha-3 (2014-07-17):
|
||||
|
||||
* [`a3a85dd`](https://github.com/npm/npm/commit/a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6)
|
||||
`--save` scoped packages correctly ([@othiym23](https://github.com/othiym23))
|
||||
* [`18a3385`](https://github.com/npm/npm/commit/18a3385bcf8bfb8312239216afbffb7eec759150)
|
||||
`npm-registry-client@3.0.2` ([@othiym23](https://github.com/othiym23))
|
||||
* [`375988b`](https://github.com/npm/npm/commit/375988b9bf5aa5170f06a790d624d31b1eb32c6d)
|
||||
invalid package names are an early error for optional deps
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* consistently use `node-package-arg` instead of arbitrary package spec
|
||||
splitting ([@othiym23](https://github.com/othiym23))
|
||||
|
||||
### v1.5.0-alpha-2 (2014-07-01):
|
||||
|
||||
* [`54cf625`](https://github.com/npm/npm/commit/54cf62534e3331e3f454e609e44f0b944e819283)
|
||||
fix handling for 301s in `npm-registry-client@3.0.1`
|
||||
([@Raynos](https://github.com/Raynos))
|
||||
* [`e410861`](https://github.com/npm/npm/commit/e410861c69a3799c1874614cb5b87af8124ff98d)
|
||||
don't crash if no username set on `whoami`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406)
|
||||
respect `--json` for output ([@isaacs](https://github.com/isaacs))
|
||||
* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6)
|
||||
outdated: Don't show headings if there's nothing to output
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3)
|
||||
outdated: Default to `latest` rather than `*` for unspecified deps
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.5.0-alpha-1 (2014-07-01):
|
||||
|
||||
* [`eef4884`](https://github.com/npm/npm/commit/eef4884d6487ee029813e60a5f9c54e67925d9fa)
|
||||
use the correct piece of the spec for GitHub shortcuts
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
|
||||
### v1.5.0-alpha-0 (2014-07-01):
|
||||
|
||||
* [`7f55057`](https://github.com/npm/npm/commit/7f55057807cfdd9ceaf6331968e666424f48116c)
|
||||
install scoped packages ([#5239](https://github.com/npm/npm/issues/5239))
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`0df7e16`](https://github.com/npm/npm/commit/0df7e16c0232d8f4d036ebf4ec3563215517caac)
|
||||
publish scoped packages ([#5239](https://github.com/npm/npm/issues/5239))
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`0689ba2`](https://github.com/npm/npm/commit/0689ba249b92b4c6279a26804c96af6f92b3a501)
|
||||
support (and save) --scope=@s config
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`f34878f`](https://github.com/npm/npm/commit/f34878fc4cee29901e4daf7bace94be01e25cad7)
|
||||
scope credentials to registry ([@othiym23](https://github.com/othiym23))
|
||||
* [`0ac7ca2`](https://github.com/npm/npm/commit/0ac7ca233f7a69751fe4386af6c4daa3ee9fc0da)
|
||||
capture and store bearer tokens when sent by registry
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`63c3277`](https://github.com/npm/npm/commit/63c3277f089b2c4417e922826bdc313ac854cad6)
|
||||
only delete files that are created by npm
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`4f54043`](https://github.com/npm/npm/commit/4f540437091d1cbca3915cd20c2da83c2a88bb8e)
|
||||
`npm-package-arg@2.0.0` ([@othiym23](https://github.com/othiym23))
|
||||
* [`9e1460e`](https://github.com/npm/npm/commit/9e1460e6ac9433019758481ec031358f4af4cd44)
|
||||
`read-package-json@1.2.3` ([@othiym23](https://github.com/othiym23))
|
||||
* [`719d8ad`](https://github.com/npm/npm/commit/719d8adb9082401f905ff4207ede494661f8a554)
|
||||
`fs-vacuum@1.2.1` ([@othiym23](https://github.com/othiym23))
|
||||
* [`9ef8fe4`](https://github.com/npm/npm/commit/9ef8fe4d6ead3acb3e88c712000e2d3a9480ebec)
|
||||
`async-some@1.0.0` ([@othiym23](https://github.com/othiym23))
|
||||
* [`a964f65`](https://github.com/npm/npm/commit/a964f65ab662107b62a4ca58535ce817e8cca331)
|
||||
`npmconf@2.0.1` ([@othiym23](https://github.com/othiym23))
|
||||
* [`113765b`](https://github.com/npm/npm/commit/113765bfb7d3801917c1d9f124b8b3d942bec89a)
|
||||
`npm-registry-client@3.0.0` ([@othiym23](https://github.com/othiym23))
|
||||
|
||||
### v1.4.28 (2014-09-12):
|
||||
|
||||
* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14)
|
||||
[#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just
|
||||
before the CLI exits ([@isaacs](https://github.com/isaacs))
|
||||
* [`1eabfd5`](https://github.com/npm/npm/commit/1eabfd5c03f33c2bd28823714ff02059eeee3899)
|
||||
[#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all
|
||||
callbacks have finished before proceeding
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
|
||||
### v1.4.27 (2014-09-04):
|
||||
|
||||
* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e)
|
||||
[#6007](https://github.com/npm/npm/issues/6007) request@2.42.0: properly set
|
||||
headers on proxy requests ([@isaacs](https://github.com/isaacs))
|
||||
* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5)
|
||||
[#6055](https://github.com/npm/npm/issues/6055) npmconf@1.1.8: restore
|
||||
case-insensitivity of environmental config
|
||||
([@iarna](https://github.com/iarna))
|
||||
|
||||
### v1.4.26 (2014-08-28):
|
||||
|
||||
* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d)
|
||||
`github-url-from-git@1.4.0`: add support for git+https and git+ssh
|
||||
([@stefanbuck](https://github.com/stefanbuck))
|
||||
* [`e561758`](https://github.com/npm/npm/commit/e5617587e7d7ab686192391ce55357dbc7fed0a3)
|
||||
`columnify@1.2.1` ([@othiym23](https://github.com/othiym23))
|
||||
* [`0c4fab3`](https://github.com/npm/npm/commit/0c4fab372ee76eab01dda83b6749429a8564902e)
|
||||
`cmd-shim@2.0.0`: upgrade to graceful-fs 3
|
||||
([@ForbesLindesay](https://github.com/ForbesLindesay))
|
||||
* [`2d69e4d`](https://github.com/npm/npm/commit/2d69e4d95777671958b5e08d3b2f5844109d73e4)
|
||||
`github-url-from-username-repo@1.0.0`: accept slashes in branch names
|
||||
([@robertkowalski](https://github.com/robertkowalski))
|
||||
* [`81f9b2b`](https://github.com/npm/npm/commit/81f9b2bac9d34c223ea093281ba3c495f23f10d1)
|
||||
ensure lifecycle spawn errors caught properly
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`bfaab8c`](https://github.com/npm/npm/commit/bfaab8c6e0942382a96b250634ded22454c36b5a)
|
||||
`npm-registry-client@2.0.7`: properly encode % in passwords
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8)
|
||||
doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.25 (2014-08-21):
|
||||
|
||||
* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e)
|
||||
`npm-registry-client@2.0.6`: Print the notification header returned by the
|
||||
registry, and make sure status codes are printed without gratuitous quotes
|
||||
around them.
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* [`a8ed12b`](https://github.com/npm/npm/commit/a8ed12b) `tar@1.0.1`:
|
||||
Add test for removing an extract target immediately after unpacking.
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`70fd11d`](https://github.com/npm/npm/commit/70fd11d)
|
||||
`lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`,
|
||||
and `retries` options. Part 2 of race condition leading to `ENOENT`
|
||||
errors.
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`0072c4d`](https://github.com/npm/npm/commit/0072c4d)
|
||||
`fstream@1.0.2`: Fix a double-finish call which can result in excess
|
||||
FS operations after the `close` event. Part 2 of race condition
|
||||
leading to `ENOENT` errors.
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.24 (2014-08-14):
|
||||
|
||||
* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb)
|
||||
doc: add new changelog ([@othiym23](https://github.com/othiym23))
|
||||
* [`4be76fd`](https://github.com/npm/npm/commit/4be76fd65e895883c337a99f275ccc8c801adda3)
|
||||
doc: update version doc to include `pre-*` increment args
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`e4f2620`](https://github.com/npm/npm/commit/e4f262036080a282ad60e236a9aeebd39fde9fe4)
|
||||
build: add `make tag` to tag current release as `latest`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`ec2596a`](https://github.com/npm/npm/commit/ec2596a7cb626772780b25b0a94a7e547a812bd5)
|
||||
build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs))
|
||||
* [`9ee55f8`](https://github.com/npm/npm/commit/9ee55f892b8b473032a43c59912c5684fd1b39e6)
|
||||
build: add script to output `v1.4-next` publish tag
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`aecb56f`](https://github.com/npm/npm/commit/aecb56f95a84687ea46920a0b98aaa587fee1568)
|
||||
build: remove outdated `docpublish` make target
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`b57a9b7`](https://github.com/npm/npm/commit/b57a9b7ccd13e6b38831ed63595c8ea5763da247)
|
||||
build: remove unpublish step from `make publish`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`2c6acb9`](https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7)
|
||||
install: rename `.gitignore` when unpacking foreign tarballs
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`22f3681`](https://github.com/npm/npm/commit/22f3681923e993a47fc1769ba735bfa3dd138082)
|
||||
cache: detect non-gzipped tar files more reliably
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.23 (2014-07-31):
|
||||
|
||||
* [`8dd11d1`](https://github.com/npm/npm/commit/8dd11d1) update several
|
||||
dependencies to avoid using `semver`s starting with 0.
|
||||
|
||||
### v1.4.22 (2014-07-31):
|
||||
|
||||
* [`d9a9e84`](https://github.com/npm/npm/commit/d9a9e84) `read-package-json@1.2.4`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`86f0340`](https://github.com/npm/npm/commit/86f0340)
|
||||
`github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs))
|
||||
* [`a94136a`](https://github.com/npm/npm/commit/a94136a) `fstream@0.1.29`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`bb82d18`](https://github.com/npm/npm/commit/bb82d18) `glob@4.0.5`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`5b6bcf4`](https://github.com/npm/npm/commit/5b6bcf4) `cmd-shim@1.1.2`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`c2aa8b3`](https://github.com/npm/npm/commit/c2aa8b3) license: Cleaned up
|
||||
legalese with actual lawyer ([@isaacs](https://github.com/isaacs))
|
||||
* [`63fe0ee`](https://github.com/npm/npm/commit/63fe0ee) `init-package-json@1.0.0`
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.21 (2014-07-14):
|
||||
|
||||
* [`88f51aa`](https://github.com/npm/npm/commit/88f51aa27eb9a958d1fa7ec50fee5cfdedd05110)
|
||||
fix handling for 301s in `npm-registry-client@2.0.3`
|
||||
([@Raynos](https://github.com/Raynos))
|
||||
|
||||
### v1.4.20 (2014-07-02):
|
||||
|
||||
* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406)
|
||||
respect `--json` for output ([@isaacs](https://github.com/isaacs))
|
||||
* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6)
|
||||
outdated: Don't show headings if there's nothing to output
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3)
|
||||
outdated: Default to `latest` rather than `*` for unspecified deps
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.19 (2014-07-01):
|
||||
|
||||
* [`f687433`](https://github.com/npm/npm/commit/f687433) relative URLS for
|
||||
working non-root registry URLS ([@othiym23](https://github.com/othiym23))
|
||||
* [`bea190c`](https://github.com/npm/npm/commit/bea190c)
|
||||
[#5591](https://github.com/npm/npm/issues/5591) bump nopt and npmconf
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.18 (2014-06-29):
|
||||
|
||||
* Bump glob dependency from 4.0.2 to 4.0.3. It now uses graceful-fs when
|
||||
available, increasing resilience to [various filesystem
|
||||
errors](https://github.com/isaacs/node-graceful-fs#improvements-over-fs-module).
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.17 (2014-06-27):
|
||||
|
||||
* replace escape codes with ansicolors
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ))
|
||||
* Use core.longpaths on win32 git - fixes
|
||||
[#5525](https://github.com/npm/npm/issues/5525) ([@bmeck](https://github.com/bmeck))
|
||||
* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs))
|
||||
* Consolidate color sniffing in config/log loading process
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* add verbose log when project config file is ignored
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* npmconf: Float patch to remove 'scope' from config defs
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* doc: npm-explore can't handle a version
|
||||
([@robertkowalski](https://github.com/robertkowalski))
|
||||
* Add user-friendly errors for ENOSPC and EROFS.
|
||||
([@voodootikigod](https://github.com/voodootikigod))
|
||||
* bump tar and fstream deps ([@isaacs](https://github.com/isaacs))
|
||||
* Run the npm-registry-couchapp tests along with npm tests
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.2.8000 (2014-06-17):
|
||||
|
||||
* Same as v1.4.16, but with the spinner disabled, and a version number that
|
||||
starts with v1.2.
|
||||
|
||||
### v1.4.16 (2014-06-17):
|
||||
|
||||
* `npm-registry-client@2.0.2` ([@isaacs](https://github.com/isaacs))
|
||||
* `fstream@0.1.27` ([@isaacs](https://github.com/isaacs))
|
||||
* `sha@1.2.4` ([@isaacs](https://github.com/isaacs))
|
||||
* `rimraf@2.2.8` ([@isaacs](https://github.com/isaacs))
|
||||
* `npmlog@1.0.1` ([@isaacs](https://github.com/isaacs))
|
||||
* `npm-registry-client@2.0.1` ([@isaacs](https://github.com/isaacs))
|
||||
* removed redundant dependency ([@othiym23](https://github.com/othiym23))
|
||||
* `npmconf@1.0.5` ([@isaacs](https://github.com/isaacs))
|
||||
* Properly handle errors that can occur in the config-loading process
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.15 (2014-06-10):
|
||||
|
||||
* cache: atomic de-race-ified package.json writing
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* `fstream@0.1.26` ([@isaacs](https://github.com/isaacs))
|
||||
* `graceful-fs@3.0.2` ([@isaacs](https://github.com/isaacs))
|
||||
* `osenv@0.1.0` ([@isaacs](https://github.com/isaacs))
|
||||
* Only spin the spinner when we're fetching stuff
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* Update `osenv@0.1.0` which removes ~/tmp as possible tmp-folder
|
||||
([@robertkowalski](https://github.com/robertkowalski))
|
||||
* `ini@1.2.1` ([@isaacs](https://github.com/isaacs))
|
||||
* `graceful-fs@3` ([@isaacs](https://github.com/isaacs))
|
||||
* Update glob and things depending on glob
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* github-url-from-username-repo and read-package-json updates
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* `editor@0.1.0` ([@isaacs](https://github.com/isaacs))
|
||||
* `columnify@1.1.0` ([@isaacs](https://github.com/isaacs))
|
||||
* bump ansi and associated deps ([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.14 (2014-06-05):
|
||||
|
||||
* char-spinner: update to not bork windows
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.13 (2014-05-23):
|
||||
|
||||
* Fix `npm install` on a tarball.
|
||||
([`ed3abf1`](https://github.com/npm/npm/commit/ed3abf1aa10000f0f687330e976d78d1955557f6),
|
||||
[#5330](https://github.com/npm/npm/issues/5330),
|
||||
[@othiym23](https://github.com/othiym23))
|
||||
* Fix an issue with the spinner on Node 0.8.
|
||||
([`9f00306`](https://github.com/npm/npm/commit/9f003067909440390198c0b8f92560d84da37762),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Re-add `npm.commands.cache.clean` and `npm.commands.cache.read` APIs, and
|
||||
document `npm.commands.cache.*` as npm-cache(3).
|
||||
([`e06799e`](https://github.com/npm/npm/commit/e06799e77e60c1fc51869619083a25e074d368b3),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.12 (2014-05-23):
|
||||
|
||||
* remove normalize-package-data from top level, de-^-ify inflight dep
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* Always sort saved bundleDependencies ([@isaacs](https://github.com/isaacs))
|
||||
* add inflight to bundledDependencies
|
||||
([@othiym23](https://github.com/othiym23))
|
||||
|
||||
### v1.4.11 (2014-05-22):
|
||||
|
||||
* fix `npm ls` labeling issue
|
||||
* `node-gyp@0.13.1`
|
||||
* default repository to https:// instead of git://
|
||||
* addLocalTarball: Remove extraneous unpack
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* Massive cache folder refactor ([@othiym23](https://github.com/othiym23) and
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Busy Spinner, no http noise ([@isaacs](https://github.com/isaacs))
|
||||
* Per-project .npmrc file support ([@isaacs](https://github.com/isaacs))
|
||||
* `npmconf@1.0.0`, Refactor config/uid/prefix loading process
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* Allow once-disallowed characters in passwords
|
||||
([@isaacs](https://github.com/isaacs))
|
||||
* Send npm version as 'version' header ([@isaacs](https://github.com/isaacs))
|
||||
* fix cygwin encoding issue (Karsten Tinnefeld)
|
||||
* Allow non-github repositories with `npm repo`
|
||||
([@evanlucas](https://github.com/evanlucas))
|
||||
* Allow peer deps to be satisfied by grandparent
|
||||
* Stop optional deps moving into deps on `update --save`
|
||||
([@timoxley](https://github.com/timoxley))
|
||||
* Ensure only matching deps update with `update --save*`
|
||||
([@timoxley](https://github.com/timoxley))
|
||||
* Add support for `prerelease`, `preminor`, `prepatch` to `npm version`
|
||||
|
||||
### v1.4.10 (2014-05-05):
|
||||
|
||||
* Don't set referer if already set
|
||||
* fetch: Send referer and npm-session headers
|
||||
* `run-script`: Support `--parseable` and `--json`
|
||||
* list runnable scripts ([@evanlucas](https://github.com/evanlucas))
|
||||
* Use marked instead of ronn for html docs
|
||||
|
||||
### v1.4.9 (2014-05-01):
|
||||
|
||||
* Send referer header (with any potentially private stuff redacted)
|
||||
* Fix critical typo bug in previous npm release
|
||||
|
||||
### v1.4.8 (2014-05-01):
|
||||
|
||||
* Check SHA before using files from cache
|
||||
* adduser: allow change of the saved password
|
||||
* Make `npm install` respect `config.unicode`
|
||||
* Fix lifecycle to pass `Infinity` for config env value
|
||||
* Don't return 0 exit code on invalid command
|
||||
* cache: Handle 404s and other HTTP errors as errors
|
||||
* Resolve ~ in path configs to env.HOME
|
||||
* Include npm version in default user-agent conf
|
||||
* npm init: Use ISC as default license, use save-prefix for deps
|
||||
* Many test and doc fixes
|
||||
|
||||
### v1.4.7 (2014-04-15):
|
||||
|
||||
* Add `--save-prefix` option that can be used to override the default of `^`
|
||||
when using `npm install --save` and its counterparts.
|
||||
([`64eefdf`](https://github.com/npm/npm/commit/64eefdfe26bb27db8dc90e3ab5d27a5ef18a4470),
|
||||
[@thlorenz](https://github.com/thlorenz))
|
||||
* Allow `--silent` to silence the echoing of commands that occurs with `npm
|
||||
run`.
|
||||
([`c95cf08`](https://github.com/npm/npm/commit/c95cf086e5b97dbb48ff95a72517b203a8f29eab),
|
||||
[@Raynos](https://github.com/Raynos))
|
||||
* Some speed improvements to the cache, which should improve install times.
|
||||
([`cb94310`](https://github.com/npm/npm/commit/cb94310a6adb18cb7b881eacb8d67171eda8b744),
|
||||
[`3b0870f`](https://github.com/npm/npm/commit/3b0870fb2f40358b3051abdab6be4319d196b99d),
|
||||
[`120f5a9`](https://github.com/npm/npm/commit/120f5a93437bbbea9249801574a2f33e44e81c33),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Improve ability to retry registry requests when a subset of the registry
|
||||
servers are down.
|
||||
([`4a5257d`](https://github.com/npm/npm/commit/4a5257de3870ac3dafa39667379f19f6dcd6093e),
|
||||
https://github.com/npm/npm-registry-client/commit/7686d02cb0b844626d6a401e58c0755ef3bc8432,
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Fix marking of peer dependencies as extraneous.
|
||||
([`779b164`](https://github.com/npm/npm/commit/779b1649764607b062c031c7e5c972151b4a1754),
|
||||
https://github.com/npm/read-installed/commit/6680ba6ef235b1ca3273a00b70869798ad662ddc,
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Fix npm crashing when doing `npm shrinkwrap` in the presence of a
|
||||
`package.json` with no dependencies.
|
||||
([`a9d9fa5`](https://github.com/npm/npm/commit/a9d9fa5ad3b8c925a589422b7be28d2735f320b0),
|
||||
[@kislyuk](https://github.com/kislyuk))
|
||||
* Fix error when using `npm view` on packages that have no versions or have
|
||||
been unpublished.
|
||||
([`94df2f5`](https://github.com/npm/npm/commit/94df2f56d684b35d1df043660180fc321b743dc8),
|
||||
[@juliangruber](https://github.com/juliangruber);
|
||||
[`2241a09`](https://github.com/npm/npm/commit/2241a09c843669c70633c399ce698cec3add40b3),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.6 (2014-03-19):
|
||||
|
||||
* Fix extraneous package detection to work in more cases.
|
||||
([`f671286`](https://github.com/npm/npm/commit/f671286), npm/read-installed#20,
|
||||
[@LaurentVB](https://github.com/LaurentVB))
|
||||
|
||||
### v1.4.5 (2014-03-18):
|
||||
|
||||
* Sort dependencies in `package.json` when doing `npm install --save` and all
|
||||
its variants.
|
||||
([`6fd6ff7`](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985),
|
||||
[@domenic](https://github.com/domenic))
|
||||
* Add `--save-exact` option, usable alongside `--save` and its variants, which
|
||||
will write the exact version number into `package.json` instead of the
|
||||
appropriate semver-compatibility range.
|
||||
([`17f07df`](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5),
|
||||
[@timoxley](https://github.com/timoxley))
|
||||
* Accept gzipped content from the registry to speed up downloads and save
|
||||
bandwidth.
|
||||
([`a3762de`](https://github.com/npm/npm/commit/a3762de843b842be8fa0ab57cdcd6b164f145942),
|
||||
npm/npm-registry-client#40, [@fengmk2](https://github.com/fengmk2))
|
||||
* Fix `npm ls`'s `--depth` and `--log` options.
|
||||
([`1d29b17`](https://github.com/npm/npm/commit/1d29b17f5193d52a5c4faa412a95313dcf41ed91),
|
||||
npm/read-installed#13, [@zertosh](https://github.com/zertosh))
|
||||
* Fix "Adding a cache directory to the cache will make the world implode" in
|
||||
certain cases.
|
||||
([`9a4b2c4`](https://github.com/npm/npm/commit/9a4b2c4667c2b1e0054e3d5611ab86acb1760834),
|
||||
domenic/path-is-inside#1, [@pmarques](https://github.com/pmarques))
|
||||
* Fix readmes not being uploaded in certain rare cases.
|
||||
([`527b72c`](https://github.com/npm/npm/commit/527b72cca6c55762b51e592c48a9f28cc7e2ff8b),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.4 (2014-02-20):
|
||||
|
||||
* Add `npm t` as an alias for `npm test` (which is itself an alias for `npm run
|
||||
test`, or even `npm run-script test`). We like making running your tests
|
||||
easy. ([`14e650b`](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de), [@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.3 (2014-02-16):
|
||||
|
||||
* Add back `npm prune --production`, which was removed in 1.3.24.
|
||||
([`acc4d02`](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83),
|
||||
[@davglass](https://github.com/davglass))
|
||||
* Default `npm install --save` and its counterparts to use the `^` version
|
||||
specifier, instead of `~`.
|
||||
([`0a3151c`](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc),
|
||||
[@mikolalysenko](https://github.com/mikolalysenko))
|
||||
* Make `npm shrinkwrap` output dependencies in a sorted order, so that diffs
|
||||
between shrinkwrap files should be saner now.
|
||||
([`059b2bf`](https://github.com/npm/npm/commit/059b2bfd06ae775205a37257dca80142596a0113),
|
||||
[@Raynos](https://github.com/Raynos))
|
||||
* Fix `npm dedupe` not correctly respecting dependency constraints.
|
||||
([`86028e9`](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc),
|
||||
[@rafeca](https://github.com/rafeca))
|
||||
* Fix `npm ls` giving spurious warnings when you used `"latest"` as a version
|
||||
specifier.
|
||||
(https://github.com/npm/read-installed/commit/d2956400e0386931c926e0f30c334840e0938f14,
|
||||
[@bajtos](https://github.com/bajtos))
|
||||
* Fixed a bug where using `npm link` on packages without a `name` value could
|
||||
cause npm to delete itself.
|
||||
([`401a642`](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Fixed `npm install ./pkg@1.2.3` to actually install the directory at
|
||||
`pkg@1.2.3`; before it would try to find version `1.2.3` of the package
|
||||
`./pkg` in the npm registry.
|
||||
([`46d8768`](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739),
|
||||
[@rlidwka](https://github.com/rlidwka); see also
|
||||
[`f851b79`](https://github.com/npm/npm/commit/f851b79a71d9a5f5125aa85877c94faaf91bea5f))
|
||||
* Fix `npm outdated` to respect the `color` configuration option.
|
||||
([`d4f6f3f`](https://github.com/npm/npm/commit/d4f6f3ff83bd14fb60d3ac6392cb8eb6b1c55ce1),
|
||||
[@timoxley](https://github.com/timoxley))
|
||||
* Fix `npm outdated --parseable`.
|
||||
([`9575a23`](https://github.com/npm/npm/commit/9575a23f955ce3e75b509c89504ef0bd707c8cf6),
|
||||
[@yhpark](https://github.com/yhpark))
|
||||
* Fix a lockfile-related errors when using certain Git URLs.
|
||||
([`164b97e`](https://github.com/npm/npm/commit/164b97e6089f64e686db7a9a24016f245effc37f),
|
||||
[@nigelzor](https://github.com/nigelzor))
|
||||
|
||||
### v1.4.2 (2014-02-13):
|
||||
|
||||
* Fixed an issue related to mid-publish GET requests made against the registry.
|
||||
(https://github.com/npm/npm-registry-client/commit/acbec48372bc1816c67c9e7cbf814cf50437ff93,
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.1 (2014-02-13):
|
||||
|
||||
* Fix `npm shrinkwrap` forgetting to shrinkwrap dependencies that were also
|
||||
development dependencies.
|
||||
([`9c575c5`](https://github.com/npm/npm/commit/9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd),
|
||||
[@diwu1989](https://github.com/diwu1989))
|
||||
* Fixed publishing of pre-existing packages with uppercase characters in their
|
||||
name.
|
||||
(https://github.com/npm/npm-registry-client/commit/9345d3b6c3d8510dd5c4418f27ee1fce59acebad,
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.4.0 (2014-02-12):
|
||||
|
||||
* Remove `npm publish --force`. See
|
||||
https://github.com/npm/npmjs.org/issues/148.
|
||||
([@isaacs](https://github.com/isaacs),
|
||||
npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a)
|
||||
* Other changes to the registry client related to saved configs and couch
|
||||
logins. ([@isaacs](https://github.com/isaacs);
|
||||
npm/npm-registry-client@25e2b019a1588155e5f87d035c27e79963b75951,
|
||||
npm/npm-registry-client@9e41e9101b68036e0f078398785f618575f3cdde,
|
||||
npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a)
|
||||
* Show an error to the user when doing `npm update` and the `package.json`
|
||||
specifies a version that does not exist.
|
||||
([@evanlucas](https://github.com/evanlucas),
|
||||
[`027a33a`](https://github.com/npm/npm/commit/027a33a5c594124cc1d82ddec5aee2c18bc8dc32))
|
||||
* Fix some issues with cache ownership in certain installation configurations.
|
||||
([@outcoldman](https://github.com/outcoldman),
|
||||
[`a132690`](https://github.com/npm/npm/commit/a132690a2876cda5dcd1e4ca751f21dfcb11cb9e))
|
||||
* Fix issues where GitHub shorthand dependencies `user/repo` were not always
|
||||
treated the same as full Git URLs.
|
||||
([@robertkowalski](https://github.com/robertkowalski),
|
||||
https://github.com/meryn/normalize-package-data/commit/005d0b637aec1895117fcb4e3b49185eebf9e240)
|
||||
|
||||
### v1.3.26 (2014-02-02):
|
||||
|
||||
* Fixes and updates to publishing code
|
||||
([`735427a`](https://github.com/npm/npm/commit/735427a69ba4fe92aafa2d88f202aaa42920a9e2)
|
||||
and
|
||||
[`c0ac832`](https://github.com/npm/npm/commit/c0ac83224d49aa62e55577f8f27d53bbfd640dc5),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Fix `npm bugs` with no arguments.
|
||||
([`b99d465`](https://github.com/npm/npm/commit/b99d465221ac03bca30976cbf4d62ca80ab34091),
|
||||
[@Hoops](https://github.com/Hoops))
|
||||
|
||||
### v1.3.25 (2014-01-25):
|
||||
|
||||
* Remove gubblebum blocky font from documentation headers.
|
||||
([`6940c9a`](https://github.com/npm/npm/commit/6940c9a100160056dc6be8f54a7ad7fa8ceda7e2),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
|
||||
### v1.3.24 (2014-01-19):
|
||||
|
||||
* Make the search output prettier, with nice truncated columns, and a `--long`
|
||||
option to create wrapping columns.
|
||||
([`20439b2`](https://github.com/npm/npm/commit/20439b2) and
|
||||
[`3a6942d`](https://github.com/npm/npm/commit/3a6942d),
|
||||
[@timoxley](https://github.com/timoxley))
|
||||
* Support multiple packagenames in `npm docs`.
|
||||
([`823010b`](https://github.com/npm/npm/commit/823010b),
|
||||
[@timoxley](https://github.com/timoxley))
|
||||
* Fix the `npm adduser` bug regarding "Error: default value must be string or
|
||||
number" again. ([`b9b4248`](https://github.com/npm/npm/commit/b9b4248),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Fix `scripts` entries containing whitespaces on Windows.
|
||||
([`80282ed`](https://github.com/npm/npm/commit/80282ed),
|
||||
[@robertkowalski](https://github.com/robertkowalski))
|
||||
* Fix `npm update` for Git URLs that have credentials in them
|
||||
([`93fc364`](https://github.com/npm/npm/commit/93fc364),
|
||||
[@danielsantiago](https://github.com/danielsantiago))
|
||||
* Fix `npm install` overwriting `npm link`-ed dependencies when they are tagged
|
||||
Git dependencies. ([`af9bbd9`](https://github.com/npm/npm/commit/af9bbd9),
|
||||
[@evanlucas](https://github.com/evanlucas))
|
||||
* Remove `npm prune --production` since it buggily removed some dependencies
|
||||
that were necessary for production; see
|
||||
[#4509](https://github.com/npm/npm/issues/4509). Hopefully it can make its
|
||||
triumphant return, one day.
|
||||
([`1101b6a`](https://github.com/npm/npm/commit/1101b6a),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
|
||||
Dependency updates:
|
||||
* [`909cccf`](https://github.com/npm/npm/commit/909cccf) `read-package-json@1.1.6`
|
||||
* [`a3891b6`](https://github.com/npm/npm/commit/a3891b6) `rimraf@2.2.6`
|
||||
* [`ac6efbc`](https://github.com/npm/npm/commit/ac6efbc) `sha@1.2.3`
|
||||
* [`dd30038`](https://github.com/npm/npm/commit/dd30038) `node-gyp@0.12.2`
|
||||
* [`c8c3ebe`](https://github.com/npm/npm/commit/c8c3ebe) `npm-registry-client@0.3.3`
|
||||
* [`4315286`](https://github.com/npm/npm/commit/4315286) `npmconf@0.1.12`
|
||||
|
||||
### v1.3.23 (2014-01-03):
|
||||
|
||||
* Properly handle installations that contained a certain class of circular
|
||||
dependencies.
|
||||
([`5dc93e8`](https://github.com/npm/npm/commit/5dc93e8c82604c45b6067b1acf1c768e0bfce754),
|
||||
[@substack](https://github.com/substack))
|
||||
|
||||
### v1.3.22 (2013-12-25):
|
||||
|
||||
* Fix a critical bug in `npm adduser` that would manifest in the error message
|
||||
"Error: default value must be string or number."
|
||||
([`fba4bd2`](https://github.com/npm/npm/commit/fba4bd24bc2ab00ccfeda2043aa53af7d75ef7ce),
|
||||
[@isaacs](https://github.com/isaacs))
|
||||
* Allow `npm bugs` in the current directory to open the current package's bugs
|
||||
URL.
|
||||
([`d04cf64`](https://github.com/npm/npm/commit/d04cf6483932c693452f3f778c2fa90f6153a4af),
|
||||
[@evanlucas](https://github.com/evanlucas))
|
||||
* Several fixes to various error messages to include more useful or updated
|
||||
information.
|
||||
([`1e6f2a7`](https://github.com/npm/npm/commit/1e6f2a72ca058335f9f5e7ca22d01e1a8bb0f9f7),
|
||||
[`ff46366`](https://github.com/npm/npm/commit/ff46366bd40ff0ef33c7bac8400bc912c56201d1),
|
||||
[`8b4bb48`](https://github.com/npm/npm/commit/8b4bb4815d80a3612186dc5549d698e7b988eb03);
|
||||
[@rlidwka](https://github.com/rlidwka),
|
||||
[@evanlucas](https://github.com/evanlucas))
|
||||
|
||||
### v1.3.21 (2013-12-17):
|
||||
|
||||
* Fix a critical bug that prevented publishing due to incorrect hash
|
||||
calculation.
|
||||
([`4ca4a2c`](https://github.com/npm/npm-registry-client/commit/4ca4a2c6333144299428be6b572e2691aa59852e),
|
||||
[@dominictarr](https://github.com/dominictarr))
|
||||
|
||||
### v1.3.20 (2013-12-17):
|
||||
|
||||
* Fixes a critical bug in v1.3.19. Thankfully, due to that bug, no one could
|
||||
install npm v1.3.19 :)
|
||||
|
||||
### v1.3.19 (2013-12-16):
|
||||
|
||||
* Adds atomic PUTs for publishing packages, which should result in far fewer
|
||||
requests and less room for replication errors on the server-side.
|
||||
|
||||
### v1.3.18 (2013-12-16):
|
||||
|
||||
* Added an `--ignore-scripts` option, which will prevent `package.json` scripts
|
||||
from being run. Most notably, this will work on `npm install`, so e.g. `npm
|
||||
install --ignore-scripts` will not run preinstall and prepublish scripts.
|
||||
([`d7e67bf`](https://github.com/npm/npm/commit/d7e67bf0d94b085652ec1c87d595afa6f650a8f6),
|
||||
[@sqs](https://github.com/sqs))
|
||||
* Fixed a bug introduced in 1.3.16 that would manifest with certain cache
|
||||
configurations, by causing spurious errors saying "Adding a cache directory
|
||||
to the cache will make the world implode."
|
||||
([`966373f`](https://github.com/npm/npm/commit/966373fad8d741637f9744882bde9f6e94000865),
|
||||
[@domenic](https://github.com/domenic))
|
||||
* Re-fixed the multiple download of URL dependencies, whose fix was reverted in
|
||||
1.3.17.
|
||||
([`a362c3f`](https://github.com/npm/npm/commit/a362c3f1919987419ed8a37c8defa19d2e6697b0),
|
||||
[@spmason](https://github.com/spmason))
|
||||
|
||||
### v1.3.17 (2013-12-11):
|
||||
|
||||
* This release reverts
|
||||
[`644c2ff`](https://github.com/npm/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7),
|
||||
which avoided re-downloading URL and shinkwrap dependencies when doing `npm
|
||||
install`. You can see the in-depth reasoning in
|
||||
[`d8c907e`](https://github.com/npm/npm/commit/d8c907edc2019b75cff0f53467e34e0ffd7e5fba);
|
||||
the problem was, that the patch changed the behavior of `npm install -f` to
|
||||
reinstall all dependencies.
|
||||
* A new version of the no-re-downloading fix has been submitted as
|
||||
[#4303](https://github.com/npm/npm/issues/4303) and will hopefully be
|
||||
included in the next release.
|
||||
|
||||
### v1.3.16 (2013-12-11):
|
||||
|
||||
* Git URL dependencies are now updated on `npm install`, fixing a two-year old
|
||||
bug
|
||||
([`5829ecf`](https://github.com/npm/npm/commit/5829ecf032b392d2133bd351f53d3c644961396b),
|
||||
[@robertkowalski](https://github.com/robertkowalski)). Additional progress on
|
||||
reducing the resulting Git-related I/O is tracked as
|
||||
[#4191](https://github.com/npm/npm/issues/4191), but for now, this will be a
|
||||
big improvement.
|
||||
* Added a `--json` mode to `npm outdated` to give a parseable output.
|
||||
([`0b6c9b7`](https://github.com/npm/npm/commit/0b6c9b7c8c5579f4d7d37a0c24d9b7a12ccbe5fe),
|
||||
[@yyx990803](https://github.com/yyx990803))
|
||||
* Made `npm outdated` much prettier and more useful. It now outputs a
|
||||
color-coded and easy-to-read table.
|
||||
([`fd3017f`](https://github.com/npm/npm/commit/fd3017fc3e9d42acf6394a5285122edb4dc16106),
|
||||
[@quimcalpe](https://github.com/quimcalpe))
|
||||
* Added the `--depth` option to `npm outdated`, so that e.g. you can do `npm
|
||||
outdated --depth=0` to show only top-level outdated dependencies.
|
||||
([`1d184ef`](https://github.com/npm/npm/commit/1d184ef3f4b4bc309d38e9128732e3e6fb46d49c),
|
||||
[@yyx990803](https://github.com/yyx990803))
|
||||
* Added a `--no-git-tag-version` option to `npm version`, for doing the usual
|
||||
job of `npm version` minus the Git tagging. This could be useful if you need
|
||||
to increase the version in other related files before actually adding the
|
||||
tag.
|
||||
([`59ca984`](https://github.com/npm/npm/commit/59ca9841ba4f4b2f11b8e72533f385c77ae9f8bd),
|
||||
[@evanlucas](https://github.com/evanlucas))
|
||||
* Made `npm repo` and `npm docs` work without any arguments, adding them to the
|
||||
list of npm commands that work on the package in the current directory when
|
||||
invoked without arguments.
|
||||
([`bf9048e`](https://github.com/npm/npm/commit/bf9048e2fa16d43fbc4b328d162b0a194ca484e8),
|
||||
[@robertkowalski](https://github.com/robertkowalski);
|
||||
[`07600d0`](https://github.com/npm/npm/commit/07600d006c652507cb04ac0dae9780e35073dd67),
|
||||
[@wilmoore](https://github.com/wilmoore)). There are a few other commands we
|
||||
still want to implement this for; see
|
||||
[#4204](https://github.com/npm/npm/issues/4204).
|
||||
* Pass through the `GIT_SSL_NO_VERIFY` environment variable to Git, if it is
|
||||
set; we currently do this with a few other environment variables, but we
|
||||
missed that one.
|
||||
([`c625de9`](https://github.com/npm/npm/commit/c625de91770df24c189c77d2e4bc821f2265efa8),
|
||||
[@arikon](https://github.com/arikon))
|
||||
* Fixed `npm dedupe` on Windows due to incorrect path separators being used
|
||||
([`7677de4`](https://github.com/npm/npm/commit/7677de4583100bc39407093ecc6bc13715bf8161),
|
||||
[@mcolyer](https://github.com/mcolyer)).
|
||||
* Fixed the `npm help` command when multiple words were searched for; it
|
||||
previously gave a `ReferenceError`.
|
||||
([`6a28dd1`](https://github.com/npm/npm/commit/6a28dd147c6957a93db12b1081c6e0da44fe5e3c),
|
||||
[@dereckson](https://github.com/dereckson))
|
||||
* Stopped re-downloading URL and shrinkwrap dependencies, as demonstrated in
|
||||
[#3463](https://github.com/npm/npm/issues/3463)
|
||||
([`644c2ff`](https://github.com/isaacs/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7),
|
||||
[@spmason](https://github.com/spmason)). You can use the `--force` option to
|
||||
force re-download and installation of all dependencies.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# set configurations that will be "sticky" on this system,
|
||||
# surviving npm self-updates.
|
||||
|
||||
CONFIGS=()
|
||||
i=0
|
||||
|
||||
# get the location of this file.
|
||||
unset CDPATH
|
||||
CONFFILE=$(cd $(dirname "$0"); pwd -P)/npmrc
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
conf="$1"
|
||||
case $conf in
|
||||
--help)
|
||||
echo "./configure --param=value ..."
|
||||
exit 0
|
||||
;;
|
||||
--*)
|
||||
CONFIGS[$i]="${conf:2}"
|
||||
;;
|
||||
*)
|
||||
CONFIGS[$i]="$conf"
|
||||
;;
|
||||
esac
|
||||
let i++
|
||||
shift
|
||||
done
|
||||
|
||||
for c in "${CONFIGS[@]}"; do
|
||||
echo "$c" >> "$CONFFILE"
|
||||
done
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"github_repo": "npm/cli",
|
||||
"github_branch": "latest",
|
||||
"github_path": "docs/content"
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
---
|
||||
title: npm-access
|
||||
section: 1
|
||||
description: Set access level on published packages
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm access public [<package>]
|
||||
npm access restricted [<package>]
|
||||
|
||||
npm access grant <read-only|read-write> <scope:team> [<package>]
|
||||
npm access revoke <scope:team> [<package>]
|
||||
|
||||
npm access 2fa-required [<package>]
|
||||
npm access 2fa-not-required [<package>]
|
||||
|
||||
npm access ls-packages [<user>|<scope>|<scope:team>]
|
||||
npm access ls-collaborators [<package> [<user>]]
|
||||
npm access edit [<package>]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
Used to set access controls on private packages.
|
||||
|
||||
For all of the subcommands, `npm access` will perform actions on the packages
|
||||
in the current working directory if no package name is passed to the
|
||||
subcommand.
|
||||
|
||||
* public / restricted:
|
||||
Set a package to be either publicly accessible or restricted.
|
||||
|
||||
* grant / revoke:
|
||||
Add or remove the ability of users and teams to have read-only or read-write
|
||||
access to a package.
|
||||
|
||||
* 2fa-required / 2fa-not-required:
|
||||
Configure whether a package requires that anyone publishing it have two-factor
|
||||
authentication enabled on their account.
|
||||
|
||||
* ls-packages:
|
||||
Show all of the packages a user or a team is able to access, along with the
|
||||
access level, except for read-only public packages (it won't print the whole
|
||||
registry listing)
|
||||
|
||||
* ls-collaborators:
|
||||
Show all of the access privileges for a package. Will only show permissions
|
||||
for packages to which you have at least read access. If `<user>` is passed in,
|
||||
the list is filtered only to teams _that_ user happens to belong to.
|
||||
|
||||
* edit:
|
||||
Set the access privileges for a package at once using `$EDITOR`.
|
||||
|
||||
### Details
|
||||
|
||||
`npm access` always operates directly on the current registry, configurable
|
||||
from the command line using `--registry=<registry url>`.
|
||||
|
||||
Unscoped packages are *always public*.
|
||||
|
||||
Scoped packages *default to restricted*, but you can either publish them as
|
||||
public using `npm publish --access=public`, or set their access as public using
|
||||
`npm access public` after the initial publish.
|
||||
|
||||
You must have privileges to set the access of a package:
|
||||
|
||||
* You are an owner of an unscoped or scoped package.
|
||||
* You are a member of the team that owns a scope.
|
||||
* You have been given read-write privileges for a package, either as a member
|
||||
of a team or directly as an owner.
|
||||
|
||||
If you have two-factor authentication enabled then you'll be prompted to
|
||||
provide an otp token, or may use the `--otp=...` option to specify it on
|
||||
the command line.
|
||||
|
||||
If your account is not paid, then attempts to publish scoped packages will
|
||||
fail with an HTTP 402 status code (logically enough), unless you use
|
||||
`--access=public`.
|
||||
|
||||
Management of teams and team memberships is done with the `npm team` command.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `otp`
|
||||
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
|
||||
This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with `npm access`.
|
||||
|
||||
If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [`libnpmaccess`](https://npm.im/libnpmaccess)
|
||||
* [npm team](/commands/npm-team)
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npm registry](/using-npm/registry)
|
|
@ -0,0 +1,94 @@
|
|||
---
|
||||
title: npm-adduser
|
||||
section: 1
|
||||
description: Add a registry user account
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm adduser [--registry=url] [--scope=@orgname] [--auth-type=legacy]
|
||||
|
||||
aliases: login, add-user
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Create or verify a user named `<username>` in the specified registry, and
|
||||
save the credentials to the `.npmrc` file. If no registry is specified,
|
||||
the default registry will be used (see [`config`](/using-npm/config)).
|
||||
|
||||
The username, password, and email are read in from prompts.
|
||||
|
||||
To reset your password, go to <https://www.npmjs.com/forgot>
|
||||
|
||||
To change your email address, go to <https://www.npmjs.com/email-edit>
|
||||
|
||||
You may use this command multiple times with the same user account to
|
||||
authorize on a new machine. When authenticating on a new machine,
|
||||
the username, password and email address must all match with
|
||||
your existing record.
|
||||
|
||||
`npm login` is an alias to `adduser` and behaves exactly the same way.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `scope`
|
||||
|
||||
* Default: the scope of the current project, if any, or ""
|
||||
* Type: String
|
||||
|
||||
Associate an operation with a scope for a scoped registry.
|
||||
|
||||
Useful when logging in to or out of a private registry:
|
||||
|
||||
```
|
||||
# log in, linking the scope to the custom registry
|
||||
npm login --scope=@mycorp --registry=https://registry.mycorp.com
|
||||
|
||||
# log out, removing the link and the auth token
|
||||
npm logout --scope=@mycorp
|
||||
```
|
||||
|
||||
This will cause `@mycorp` to be mapped to the registry for future
|
||||
installation of packages specified according to the pattern
|
||||
`@mycorp/package`.
|
||||
|
||||
This will also cause `npm init` to create a scoped package.
|
||||
|
||||
```
|
||||
# accept all defaults, and create a package named "@foo/whatever",
|
||||
# instead of just named "whatever"
|
||||
npm init --scope=@foo --yes
|
||||
```
|
||||
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [npm owner](/commands/npm-owner)
|
||||
* [npm whoami](/commands/npm-whoami)
|
||||
* [npm token](/commands/npm-token)
|
||||
* [npm profile](/commands/npm-profile)
|
|
@ -0,0 +1,368 @@
|
|||
---
|
||||
title: npm-audit
|
||||
section: 1
|
||||
description: Run a security audit
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm audit [--json] [--production] [--audit-level=(low|moderate|high|critical)]
|
||||
npm audit fix [--force|--package-lock-only|--dry-run|--production|--only=(dev|prod)]
|
||||
|
||||
common options: [--production] [--only=(dev|prod)]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
The audit command submits a description of the dependencies configured in
|
||||
your project to your default registry and asks for a report of known
|
||||
vulnerabilities. If any vulnerabilities are found, then the impact and
|
||||
appropriate remediation will be calculated. If the `fix` argument is
|
||||
provided, then remediations will be applied to the package tree.
|
||||
|
||||
The command will exit with a 0 exit code if no vulnerabilities were found.
|
||||
|
||||
Note that some vulnerabilities cannot be fixed automatically and will
|
||||
require manual intervention or review. Also note that since `npm audit
|
||||
fix` runs a full-fledged `npm install` under the hood, all configs that
|
||||
apply to the installer will also apply to `npm install` -- so things like
|
||||
`npm audit fix --package-lock-only` will work as expected.
|
||||
|
||||
By default, the audit command will exit with a non-zero code if any
|
||||
vulnerability is found. It may be useful in CI environments to include the
|
||||
`--audit-level` parameter to specify the minimum vulnerability level that
|
||||
will cause the command to fail. This option does not filter the report
|
||||
output, it simply changes the command's failure threshold.
|
||||
|
||||
### Audit Endpoints
|
||||
|
||||
There are two audit endpoints that npm may use to fetch vulnerability
|
||||
information: the `Bulk Advisory` endpoint and the `Quick Audit` endpoint.
|
||||
|
||||
#### Bulk Advisory Endpoint
|
||||
|
||||
As of version 7, npm uses the much faster `Bulk Advisory` endpoint to
|
||||
optimize the speed of calculating audit results.
|
||||
|
||||
npm will generate a JSON payload with the name and list of versions of each
|
||||
package in the tree, and POST it to the default configured registry at
|
||||
the path `/-/npm/v1/security/advisories/bulk`.
|
||||
|
||||
Any packages in the tree that do not have a `version` field in their
|
||||
package.json file will be ignored. If any `--omit` options are specified
|
||||
(either via the `--omit` config, or one of the shorthands such as
|
||||
`--production`, `--only=dev`, and so on), then packages will be omitted
|
||||
from the submitted payload as appropriate.
|
||||
|
||||
If the registry responds with an error, or with an invalid response, then
|
||||
npm will attempt to load advisory data from the `Quick Audit` endpoint.
|
||||
|
||||
The expected result will contain a set of advisory objects for each
|
||||
dependency that matches the advisory range. Each advisory object contains
|
||||
a `name`, `url`, `id`, `severity`, `vulnerable_versions`, and `title`.
|
||||
|
||||
npm then uses these advisory objects to calculate vulnerabilities and
|
||||
meta-vulnerabilities of the dependencies within the tree.
|
||||
|
||||
#### Quick Audit Endpoint
|
||||
|
||||
If the `Bulk Advisory` endpoint returns an error, or invalid data, npm will
|
||||
attempt to load advisory data from the `Quick Audit` endpoint, which is
|
||||
considerably slower in most cases.
|
||||
|
||||
The full package tree as found in `package-lock.json` is submitted, along
|
||||
with the following pieces of additional metadata:
|
||||
|
||||
* `npm_version`
|
||||
* `node_version`
|
||||
* `platform`
|
||||
* `arch`
|
||||
* `node_env`
|
||||
|
||||
All packages in the tree are submitted to the Quick Audit endpoint.
|
||||
Omitted dependency types are skipped when generating the report.
|
||||
|
||||
#### Scrubbing
|
||||
|
||||
Out of an abundance of caution, npm versions 5 and 6 would "scrub" any
|
||||
packages from the submitted report if their name contained a `/` character,
|
||||
so as to avoid leaking the names of potentially private packages or git
|
||||
URLs.
|
||||
|
||||
However, in practice, this resulted in audits often failing to properly
|
||||
detect meta-vulnerabilities, because the tree would appear to be invalid
|
||||
due to missing dependencies, and prevented the detection of vulnerabilities
|
||||
in package trees that used git dependencies or private modules.
|
||||
|
||||
This scrubbing has been removed from npm as of version 7.
|
||||
|
||||
#### Calculating Meta-Vulnerabilities and Remediations
|
||||
|
||||
npm uses the
|
||||
[`@npmcli/metavuln-calculator`](http://npm.im/@npmcli/metavuln-calculator)
|
||||
module to turn a set of security advisories into a set of "vulnerability"
|
||||
objects. A "meta-vulnerability" is a dependency that is vulnerable by
|
||||
virtue of dependence on vulnerable versions of a vulnerable package.
|
||||
|
||||
For example, if the package `foo` is vulnerable in the range `>=1.0.2
|
||||
<2.0.0`, and the package `bar` depends on `foo@^1.1.0`, then that version
|
||||
of `bar` can only be installed by installing a vulnerable version of `foo`.
|
||||
In this case, `bar` is a "metavulnerability".
|
||||
|
||||
Once metavulnerabilities for a given package are calculated, they are
|
||||
cached in the `~/.npm` folder and only re-evaluated if the advisory range
|
||||
changes, or a new version of the package is published (in which case, the
|
||||
new version is checked for metavulnerable status as well).
|
||||
|
||||
If the chain of metavulnerabilities extends all the way to the root
|
||||
project, and it cannot be updated without changing its dependency ranges,
|
||||
then `npm audit fix` will require the `--force` option to apply the
|
||||
remediation. If remediations do not require changes to the dependency
|
||||
ranges, then all vulnerable packages will be updated to a version that does
|
||||
not have an advisory or metavulnerability posted against it.
|
||||
|
||||
### Exit Code
|
||||
|
||||
The `npm audit` command will exit with a 0 exit code if no vulnerabilities
|
||||
were found. The `npm audit fix` command will exit with 0 exit code if no
|
||||
vulnerabilities are found _or_ if the remediation is able to successfully
|
||||
fix all vulnerabilities.
|
||||
|
||||
If vulnerabilities were found the exit code will depend on the
|
||||
`audit-level` configuration setting.
|
||||
|
||||
### Examples
|
||||
|
||||
Scan your project for vulnerabilities and automatically install any compatible
|
||||
updates to vulnerable dependencies:
|
||||
|
||||
```bash
|
||||
$ npm audit fix
|
||||
```
|
||||
|
||||
Run `audit fix` without modifying `node_modules`, but still updating the
|
||||
pkglock:
|
||||
|
||||
```bash
|
||||
$ npm audit fix --package-lock-only
|
||||
```
|
||||
|
||||
Skip updating `devDependencies`:
|
||||
|
||||
```bash
|
||||
$ npm audit fix --only=prod
|
||||
```
|
||||
|
||||
Have `audit fix` install SemVer-major updates to toplevel dependencies, not
|
||||
just SemVer-compatible ones:
|
||||
|
||||
```bash
|
||||
$ npm audit fix --force
|
||||
```
|
||||
|
||||
Do a dry run to get an idea of what `audit fix` will do, and _also_ output
|
||||
install information in JSON format:
|
||||
|
||||
```bash
|
||||
$ npm audit fix --dry-run --json
|
||||
```
|
||||
|
||||
Scan your project for vulnerabilities and just show the details, without
|
||||
fixing anything:
|
||||
|
||||
```bash
|
||||
$ npm audit
|
||||
```
|
||||
|
||||
Get the detailed audit report in JSON format:
|
||||
|
||||
```bash
|
||||
$ npm audit --json
|
||||
```
|
||||
|
||||
Fail an audit only if the results include a vulnerability with a level of moderate or higher:
|
||||
|
||||
```bash
|
||||
$ npm audit --audit-level=moderate
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `audit-level`
|
||||
|
||||
* Default: null
|
||||
* Type: null, "info", "low", "moderate", "high", "critical", or "none"
|
||||
|
||||
The minimum level of vulnerability for `npm audit` to exit with a non-zero
|
||||
exit code.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `dry-run`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Indicates that you don't want npm to make any changes and that it should
|
||||
only report what it would have done. This can be passed into any of the
|
||||
commands that modify your local installation, eg, `install`, `update`,
|
||||
`dedupe`, `uninstall`, as well as `pack` and `publish`.
|
||||
|
||||
Note: This is NOT honored by other network related commands, eg `dist-tags`,
|
||||
`owner`, etc.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `force`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Removes various protections against unfortunate side effects, common
|
||||
mistakes, unnecessary performance degradation, and malicious input.
|
||||
|
||||
* Allow clobbering non-npm files in global installs.
|
||||
* Allow the `npm version` command to work on an unclean git repository.
|
||||
* Allow deleting the cache folder with `npm cache clean`.
|
||||
* Allow installing packages that have an `engines` declaration requiring a
|
||||
different version of npm.
|
||||
* Allow installing packages that have an `engines` declaration requiring a
|
||||
different version of `node`, even if `--engine-strict` is enabled.
|
||||
* Allow `npm audit fix` to install modules outside your stated dependency
|
||||
range (including SemVer-major changes).
|
||||
* Allow unpublishing all versions of a published package.
|
||||
* Allow conflicting peerDependencies to be installed in the root project.
|
||||
* Implicitly set `--yes` during `npm init`.
|
||||
* Allow clobbering existing values in `npm pkg`
|
||||
|
||||
If you don't have a clear idea of what you want to do, it is strongly
|
||||
recommended that you do not use this option!
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `package-lock-only`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If set to true, the current operation will only use the `package-lock.json`,
|
||||
ignoring `node_modules`.
|
||||
|
||||
For `update` this means only the `package-lock.json` will be updated,
|
||||
instead of checking `node_modules` and downloading dependencies.
|
||||
|
||||
For `list` this means the output will be based on the tree described by the
|
||||
`package-lock.json`, rather than the contents of `node_modules`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `omit`
|
||||
|
||||
* Default: 'dev' if the `NODE_ENV` environment variable is set to
|
||||
'production', otherwise empty.
|
||||
* Type: "dev", "optional", or "peer" (can be set multiple times)
|
||||
|
||||
Dependency types to omit from the installation tree on disk.
|
||||
|
||||
Note that these dependencies _are_ still resolved and added to the
|
||||
`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
|
||||
physically installed on disk.
|
||||
|
||||
If a package type appears in both the `--include` and `--omit` lists, then
|
||||
it will be included.
|
||||
|
||||
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
|
||||
variable will be set to `'production'` for all lifecycle scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm install](/commands/npm-install)
|
||||
* [config](/using-npm/config)
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
title: npm-bin
|
||||
section: 1
|
||||
description: Display npm bin folder
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm bin [-g|--global]
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Print the folder where npm will install executables.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm prefix](/commands/npm-prefix)
|
||||
* [npm root](/commands/npm-root)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
title: npm-bugs
|
||||
section: 1
|
||||
description: Report bugs for a package in a web browser
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm bugs [<pkgname> [<pkgname> ...]]
|
||||
|
||||
aliases: issues
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command tries to guess at the likely location of a package's bug
|
||||
tracker URL or the `mailto` URL of the support email, and then tries to
|
||||
open it using the `--browser` config param. If no package name is provided, it
|
||||
will search for a `package.json` in the current folder and use the `name` property.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `browser`
|
||||
|
||||
* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
|
||||
* Type: null, Boolean, or String
|
||||
|
||||
The browser that is called by npm commands to open websites.
|
||||
|
||||
Set to `false` to suppress browser behavior and instead print urls to
|
||||
terminal.
|
||||
|
||||
Set to `true` to use default system URL opener.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm docs](/commands/npm-docs)
|
||||
* [npm view](/commands/npm-view)
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [package.json](/configuring-npm/package-json)
|
|
@ -0,0 +1,105 @@
|
|||
---
|
||||
title: npm-cache
|
||||
section: 1
|
||||
description: Manipulates packages cache
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm cache add <tarball file>...
|
||||
npm cache add <folder>...
|
||||
npm cache add <tarball url>...
|
||||
npm cache add <name>@<version>...
|
||||
|
||||
npm cache clean
|
||||
aliases: npm cache clear, npm cache rm
|
||||
|
||||
npm cache verify
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Used to add, list, or clean the npm cache folder.
|
||||
|
||||
* add:
|
||||
Add the specified packages to the local cache. This command is primarily
|
||||
intended to be used internally by npm, but it can provide a way to
|
||||
add data to the local installation cache explicitly.
|
||||
|
||||
* clean:
|
||||
Delete all data out of the cache folder. Note that this is typically
|
||||
unnecessary, as npm's cache is self-healing and resistant to data
|
||||
corruption issues.
|
||||
|
||||
* verify:
|
||||
Verify the contents of the cache folder, garbage collecting any unneeded
|
||||
data, and verifying the integrity of the cache index and all cached data.
|
||||
|
||||
### Details
|
||||
|
||||
npm stores cache data in an opaque directory within the configured `cache`,
|
||||
named `_cacache`. This directory is a
|
||||
[`cacache`](http://npm.im/cacache)-based content-addressable cache that
|
||||
stores all http request data as well as other package-related data. This
|
||||
directory is primarily accessed through `pacote`, the library responsible
|
||||
for all package fetching as of npm@5.
|
||||
|
||||
All data that passes through the cache is fully verified for integrity on
|
||||
both insertion and extraction. Cache corruption will either trigger an
|
||||
error, or signal to `pacote` that the data must be refetched, which it will
|
||||
do automatically. For this reason, it should never be necessary to clear
|
||||
the cache for any reason other than reclaiming disk space, thus why `clean`
|
||||
now requires `--force` to run.
|
||||
|
||||
There is currently no method exposed through npm to inspect or directly
|
||||
manage the contents of this cache. In order to access it, `cacache` must be
|
||||
used directly.
|
||||
|
||||
npm will not remove data by itself: the cache will grow as new packages are
|
||||
installed.
|
||||
|
||||
### A note about the cache's design
|
||||
|
||||
The npm cache is strictly a cache: it should not be relied upon as a
|
||||
persistent and reliable data store for package data. npm makes no guarantee
|
||||
that a previously-cached piece of data will be available later, and will
|
||||
automatically delete corrupted contents. The primary guarantee that the
|
||||
cache makes is that, if it does return data, that data will be exactly the
|
||||
data that was inserted.
|
||||
|
||||
To run an offline verification of existing cache contents, use `npm cache
|
||||
verify`.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `cache`
|
||||
|
||||
* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm`
|
||||
* Type: Path
|
||||
|
||||
The location of npm's cache directory. See [`npm
|
||||
cache`](/commands/npm-cache)
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm pack](/commands/npm-pack)
|
||||
* https://npm.im/cacache
|
||||
* https://npm.im/pacote
|
||||
* https://npm.im/@npmcli/arborist
|
||||
* https://npm.im/make-fetch-happen
|
|
@ -0,0 +1,117 @@
|
|||
---
|
||||
title: npm-ci
|
||||
section: 1
|
||||
description: Install a project with a clean slate
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm ci
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command is similar to [`npm install`](/commands/npm-install), except
|
||||
it's meant to be used in automated environments such as test platforms,
|
||||
continuous integration, and deployment -- or any situation where you want
|
||||
to make sure you're doing a clean install of your dependencies.
|
||||
|
||||
`npm ci` will be significantly faster when:
|
||||
|
||||
- There is a `package-lock.json` or `npm-shrinkwrap.json` file.
|
||||
- The `node_modules` folder is missing or empty.
|
||||
|
||||
In short, the main differences between using `npm install` and `npm ci` are:
|
||||
|
||||
* The project **must** have an existing `package-lock.json` or
|
||||
`npm-shrinkwrap.json`.
|
||||
* 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.
|
||||
* `npm ci` can only install entire projects at a time: individual
|
||||
dependencies cannot be added with this command.
|
||||
* If a `node_modules` is already present, it will be automatically removed
|
||||
before `npm ci` begins its install.
|
||||
* It will never write to `package.json` or any of the package-locks:
|
||||
installs are essentially frozen.
|
||||
|
||||
### Example
|
||||
|
||||
Make sure you have a package-lock and an up-to-date install:
|
||||
|
||||
```bash
|
||||
$ cd ./my/npm/project
|
||||
$ npm install
|
||||
added 154 packages in 10s
|
||||
$ ls | grep package-lock
|
||||
```
|
||||
|
||||
Run `npm ci` in that project
|
||||
|
||||
```bash
|
||||
$ npm ci
|
||||
added 154 packages in 5s
|
||||
```
|
||||
|
||||
Configure Travis to build using `npm ci` instead of `npm install`:
|
||||
|
||||
```bash
|
||||
# .travis.yml
|
||||
install:
|
||||
- npm ci
|
||||
# keep the npm cache around to speed up installs
|
||||
cache:
|
||||
directories:
|
||||
- "$HOME/.npm"
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `audit`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" submit audit reports alongside the current npm command to the
|
||||
default registry and all registries configured for scopes. See the
|
||||
documentation for [`npm audit`](/commands/npm-audit) for details on what is
|
||||
submitted.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `script-shell`
|
||||
|
||||
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
|
||||
* Type: null or String
|
||||
|
||||
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
|
||||
init <pkg>` commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm install](/commands/npm-install)
|
||||
* [package-lock.json](/configuring-npm/package-lock-json)
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
title: npm-completion
|
||||
section: 1
|
||||
description: Tab Completion for npm
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
source <(npm completion)
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Enables tab-completion in all npm commands.
|
||||
|
||||
The synopsis above
|
||||
loads the completions into your current shell. Adding it to
|
||||
your ~/.bashrc or ~/.zshrc will make the completions available
|
||||
everywhere:
|
||||
|
||||
```bash
|
||||
npm completion >> ~/.bashrc
|
||||
npm completion >> ~/.zshrc
|
||||
```
|
||||
|
||||
You may of course also pipe the output of `npm completion` to a file
|
||||
such as `/usr/local/etc/bash_completion.d/npm` or
|
||||
`/etc/bash_completion.d/npm` if you have a system that will read
|
||||
that file for you.
|
||||
|
||||
When `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the
|
||||
environment, `npm completion` acts in "plumbing mode", and outputs
|
||||
completions based on the arguments.
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm developers](/using-npm/developers)
|
||||
* [npm](/commands/npm)
|
|
@ -0,0 +1,173 @@
|
|||
---
|
||||
title: npm-config
|
||||
section: 1
|
||||
description: Manage the npm configuration files
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm config set <key>=<value> [<key>=<value> ...]
|
||||
npm config get [<key> [<key> ...]]
|
||||
npm config delete <key> [<key> ...]
|
||||
npm config list [--json]
|
||||
npm config edit
|
||||
npm set <key>=<value> [<key>=<value> ...]
|
||||
npm get [<key> [<key> ...]]
|
||||
|
||||
alias: c
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
npm gets its config settings from the command line, environment
|
||||
variables, `npmrc` files, and in some cases, the `package.json` file.
|
||||
|
||||
See [npmrc](/configuring-npm/npmrc) for more information about the npmrc
|
||||
files.
|
||||
|
||||
See [config(7)](/using-npm/config) for a more thorough explanation of the
|
||||
mechanisms involved, and a full list of config options available.
|
||||
|
||||
The `npm config` command can be used to update and edit the contents
|
||||
of the user and global npmrc files.
|
||||
|
||||
### Sub-commands
|
||||
|
||||
Config supports the following sub-commands:
|
||||
|
||||
#### set
|
||||
|
||||
```bash
|
||||
npm config set key=value [key=value...]
|
||||
npm set key=value [key=value...]
|
||||
```
|
||||
|
||||
Sets each of the config keys to the value provided.
|
||||
|
||||
If value is omitted, then it sets it to an empty string.
|
||||
|
||||
Note: for backwards compatibility, `npm config set key value` is supported
|
||||
as an alias for `npm config set key=value`.
|
||||
|
||||
#### get
|
||||
|
||||
```bash
|
||||
npm config get [key ...]
|
||||
npm get [key ...]
|
||||
```
|
||||
|
||||
Echo the config value(s) to stdout.
|
||||
|
||||
If multiple keys are provided, then the values will be prefixed with the
|
||||
key names.
|
||||
|
||||
If no keys are provided, then this command behaves the same as `npm config
|
||||
list`.
|
||||
|
||||
#### list
|
||||
|
||||
```bash
|
||||
npm config list
|
||||
```
|
||||
|
||||
Show all the config settings. Use `-l` to also show defaults. Use `--json`
|
||||
to show the settings in json format.
|
||||
|
||||
#### delete
|
||||
|
||||
```bash
|
||||
npm config delete key [key ...]
|
||||
```
|
||||
|
||||
Deletes the specified keys from all configuration files.
|
||||
|
||||
#### edit
|
||||
|
||||
```bash
|
||||
npm config edit
|
||||
```
|
||||
|
||||
Opens the config file in an editor. Use the `--global` flag to edit the
|
||||
global config.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `editor`
|
||||
|
||||
* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on
|
||||
Windows, or 'vim' on Unix systems
|
||||
* Type: String
|
||||
|
||||
The command to run for `npm edit` and `npm config edit`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `location`
|
||||
|
||||
* Default: "user" unless `--global` is passed, which will also set this value
|
||||
to "global"
|
||||
* Type: "global", "user", or "project"
|
||||
|
||||
When passed to `npm config` this refers to which config file to use.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `long`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Show extended information in `ls`, `search`, and `help-search`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [package.json](/configuring-npm/package-json)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [npm](/commands/npm)
|
|
@ -0,0 +1,310 @@
|
|||
---
|
||||
title: npm-dedupe
|
||||
section: 1
|
||||
description: Reduce duplication in the package tree
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm dedupe
|
||||
npm ddp
|
||||
|
||||
aliases: ddp
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
Searches the local package tree and attempts to simplify the overall
|
||||
structure by moving dependencies further up the tree, where they can
|
||||
be more effectively shared by multiple dependent packages.
|
||||
|
||||
For example, consider this dependency graph:
|
||||
|
||||
```
|
||||
a
|
||||
+-- b <-- depends on c@1.0.x
|
||||
| `-- c@1.0.3
|
||||
`-- d <-- depends on c@~1.0.9
|
||||
`-- c@1.0.10
|
||||
```
|
||||
|
||||
In this case, `npm dedupe` will transform the tree to:
|
||||
|
||||
```bash
|
||||
a
|
||||
+-- b
|
||||
+-- d
|
||||
`-- c@1.0.10
|
||||
```
|
||||
|
||||
Because of the hierarchical nature of node's module lookup, b and d
|
||||
will both get their dependency met by the single c package at the root
|
||||
level of the tree.
|
||||
|
||||
In some cases, you may have a dependency graph like this:
|
||||
|
||||
```
|
||||
a
|
||||
+-- b <-- depends on c@1.0.x
|
||||
+-- c@1.0.3
|
||||
`-- d <-- depends on c@1.x
|
||||
`-- c@1.9.9
|
||||
```
|
||||
|
||||
During the installation process, the `c@1.0.3` dependency for `b` was
|
||||
placed in the root of the tree. Though `d`'s dependency on `c@1.x` could
|
||||
have been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used,
|
||||
because npm favors updates by default, even when doing so causes
|
||||
duplication.
|
||||
|
||||
Running `npm dedupe` will cause npm to note the duplication and
|
||||
re-evaluate, deleting the nested `c` module, because the one in the root is
|
||||
sufficient.
|
||||
|
||||
To prefer deduplication over novelty during the installation process, run
|
||||
`npm install --prefer-dedupe` or `npm config set prefer-dedupe true`.
|
||||
|
||||
Arguments are ignored. Dedupe always acts on the entire tree.
|
||||
|
||||
Note that this operation transforms the dependency tree, but will never
|
||||
result in new modules being installed.
|
||||
|
||||
Using `npm find-dupes` will run the command in `--dry-run` mode.
|
||||
|
||||
Note that by default `npm dedupe` will not update the semver values of direct
|
||||
dependencies in your project `package.json`, if you want to also update
|
||||
values in `package.json` you can run: `npm dedupe --save` (or add the
|
||||
`save=true` option to a [configuration file](/configuring-npm/npmrc)
|
||||
to make that the default behavior).
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `global-style`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package into your local `node_modules` folder with
|
||||
the same layout it uses with the global `node_modules` folder. Only your
|
||||
direct dependencies will show in `node_modules` and everything they depend
|
||||
on will be flattened in their `node_modules` folders. This obviously will
|
||||
eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `legacy-bundling`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package such that versions of npm prior to 1.4,
|
||||
such as the one included with node 0.8, can install the package. This
|
||||
eliminates all automatic deduping. If used with `global-style` this option
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `strict-peer-deps`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If set to `true`, and `--legacy-peer-deps` is not set, then _any_
|
||||
conflicting `peerDependencies` will be treated as an install failure, even
|
||||
if npm could reasonably guess the appropriate resolution based on non-peer
|
||||
dependency relationships.
|
||||
|
||||
By default, conflicting `peerDependencies` deep in the dependency graph will
|
||||
be resolved using the nearest non-peer dependency specification, even if
|
||||
doing so will result in some packages receiving a peer dependency outside
|
||||
the range set in their package's `peerDependencies` object.
|
||||
|
||||
When such and override is performed, a warning is printed, explaining the
|
||||
conflict and the packages involved. If `--strict-peer-deps` is set, then
|
||||
this warning is treated as a failure.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `package-lock`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
If set to false, then ignore `package-lock.json` files when installing. This
|
||||
will also prevent _writing_ `package-lock.json` if `save` is true.
|
||||
|
||||
When package package-locks are disabled, automatic pruning of extraneous
|
||||
modules will also be disabled. To remove extraneous modules with
|
||||
package-locks disabled use `npm prune`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `omit`
|
||||
|
||||
* Default: 'dev' if the `NODE_ENV` environment variable is set to
|
||||
'production', otherwise empty.
|
||||
* Type: "dev", "optional", or "peer" (can be set multiple times)
|
||||
|
||||
Dependency types to omit from the installation tree on disk.
|
||||
|
||||
Note that these dependencies _are_ still resolved and added to the
|
||||
`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
|
||||
physically installed on disk.
|
||||
|
||||
If a package type appears in both the `--include` and `--omit` lists, then
|
||||
it will be included.
|
||||
|
||||
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
|
||||
variable will be set to `'production'` for all lifecycle scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `audit`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" submit audit reports alongside the current npm command to the
|
||||
default registry and all registries configured for scopes. See the
|
||||
documentation for [`npm audit`](/commands/npm-audit) for details on what is
|
||||
submitted.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `bin-links`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Tells npm to create symlinks (or `.cmd` shims on Windows) for package
|
||||
executables.
|
||||
|
||||
Set to false to have it not do this. This can be used to work around the
|
||||
fact that some file systems don't support symlinks, even on ostensibly Unix
|
||||
systems.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `fund`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" displays the message at the end of each `npm install`
|
||||
acknowledging the number of dependencies looking for funding. See [`npm
|
||||
fund`](/commands/npm-fund) for details.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `dry-run`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Indicates that you don't want npm to make any changes and that it should
|
||||
only report what it would have done. This can be passed into any of the
|
||||
commands that modify your local installation, eg, `install`, `update`,
|
||||
`dedupe`, `uninstall`, as well as `pack` and `publish`.
|
||||
|
||||
Note: This is NOT honored by other network related commands, eg `dist-tags`,
|
||||
`owner`, etc.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm find-dupes](/commands/npm-find-dupes)
|
||||
* [npm ls](/commands/npm-ls)
|
||||
* [npm update](/commands/npm-update)
|
||||
* [npm install](/commands/npm-install)
|
|
@ -0,0 +1,79 @@
|
|||
---
|
||||
title: npm-deprecate
|
||||
section: 1
|
||||
description: Deprecate a version of a package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm deprecate <pkg>[@<version range>] <message>
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
This command will update the npm registry entry for a package, providing a
|
||||
deprecation warning to all who attempt to install it.
|
||||
|
||||
It works on [version ranges](https://semver.npmjs.com/) as well as specific
|
||||
versions, so you can do something like this:
|
||||
|
||||
```bash
|
||||
npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
|
||||
```
|
||||
|
||||
SemVer ranges passed to this command are interpreted such that they *do*
|
||||
include prerelease versions. For example:
|
||||
|
||||
```bash
|
||||
npm deprecate my-thing@1.x "1.x is no longer supported"
|
||||
```
|
||||
|
||||
In this case, a version `my-thing@1.0.0-beta.0` will also be deprecated.
|
||||
|
||||
You must be the package owner to deprecate something. See the `owner` and
|
||||
`adduser` help topics.
|
||||
|
||||
To un-deprecate a package, specify an empty string (`""`) for the `message`
|
||||
argument. Note that you must use double quotes with no space between them to
|
||||
format an empty string.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `otp`
|
||||
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
|
||||
This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with `npm access`.
|
||||
|
||||
If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm owner](/commands/npm-owner)
|
||||
* [npm adduser](/commands/npm-adduser)
|
|
@ -0,0 +1,342 @@
|
|||
---
|
||||
title: npm-diff
|
||||
section: 1
|
||||
description: The registry diff command
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm diff [...<paths>]
|
||||
npm diff --diff=<pkg-name> [...<paths>]
|
||||
npm diff --diff=<version-a> [--diff=<version-b>] [...<paths>]
|
||||
npm diff --diff=<spec-a> [--diff=<spec-b>] [...<paths>]
|
||||
npm diff [--diff-ignore-all-space] [--diff-name-only] [...<paths>]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
Similar to its `git diff` counterpart, this command will print diff patches
|
||||
of files for packages published to the npm registry.
|
||||
|
||||
* `npm diff --diff=<spec-a> --diff=<spec-b>`
|
||||
|
||||
Compares two package versions using their registry specifiers, e.g:
|
||||
`npm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0`. It's also possible to
|
||||
compare across forks of any package,
|
||||
e.g: `npm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0`.
|
||||
|
||||
Any valid spec can be used, so that it's also possible to compare
|
||||
directories or git repositories,
|
||||
e.g: `npm diff --diff=pkg@latest --diff=./packages/pkg`
|
||||
|
||||
Here's an example comparing two different versions of a package named
|
||||
`abbrev` from the registry:
|
||||
|
||||
```bash
|
||||
npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1
|
||||
```
|
||||
|
||||
On success, output looks like:
|
||||
|
||||
```bash
|
||||
diff --git a/package.json b/package.json
|
||||
index v1.1.0..v1.1.1 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "abbrev",
|
||||
- "version": "1.1.0",
|
||||
+ "version": "1.1.1",
|
||||
"description": "Like ruby's abbrev module, but in js",
|
||||
"author": "Isaac Z. Schlueter <i@izs.me>",
|
||||
"main": "abbrev.js",
|
||||
```
|
||||
|
||||
Given the flexible nature of npm specs, you can also target local
|
||||
directories or git repos just like when using `npm install`:
|
||||
|
||||
```bash
|
||||
npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path
|
||||
```
|
||||
|
||||
In the example above we can compare the contents from the package installed
|
||||
from the git repo at `github.com/npm/libnpmdiff` with the contents of the
|
||||
`./local-path` that contains a valid package, such as a modified copy of
|
||||
the original.
|
||||
|
||||
* `npm diff` (in a package directory, no arguments):
|
||||
|
||||
If the package is published to the registry, `npm diff` will fetch the
|
||||
tarball version tagged as `latest` (this value can be configured using the
|
||||
`tag` option) and proceed to compare the contents of files present in that
|
||||
tarball, with the current files in your local file system.
|
||||
|
||||
This workflow provides a handy way for package authors to see what
|
||||
package-tracked files have been changed in comparison with the latest
|
||||
published version of that package.
|
||||
|
||||
* `npm diff --diff=<pkg-name>` (in a package directory):
|
||||
|
||||
When using a single package name (with no version or tag specifier) as an
|
||||
argument, `npm diff` will work in a similar way to
|
||||
[`npm-outdated`](npm-outdated) and reach for the registry to figure out
|
||||
what current published version of the package named `<pkg-name>`
|
||||
will satisfy its dependent declared semver-range. Once that specific
|
||||
version is known `npm diff` will print diff patches comparing the
|
||||
current version of `<pkg-name>` found in the local file system with
|
||||
that specific version returned by the registry.
|
||||
|
||||
Given a package named `abbrev` that is currently installed:
|
||||
|
||||
```bash
|
||||
npm diff --diff=abbrev
|
||||
```
|
||||
|
||||
That will request from the registry its most up to date version and
|
||||
will print a diff output comparing the currently installed version to this
|
||||
newer one if the version numbers are not the same.
|
||||
|
||||
* `npm diff --diff=<spec-a>` (in a package directory):
|
||||
|
||||
Similar to using only a single package name, it's also possible to declare
|
||||
a full registry specifier version if you wish to compare the local version
|
||||
of an installed package with the specific version/tag/semver-range provided
|
||||
in `<spec-a>`.
|
||||
|
||||
An example: assuming `pkg@1.0.0` is installed in the current `node_modules`
|
||||
folder, running:
|
||||
|
||||
```bash
|
||||
npm diff --diff=pkg@2.0.0
|
||||
```
|
||||
|
||||
It will effectively be an alias to
|
||||
`npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0`.
|
||||
|
||||
* `npm diff --diff=<semver-a> [--diff=<semver-b>]` (in a package directory):
|
||||
|
||||
Using `npm diff` along with semver-valid version numbers is a shorthand
|
||||
to compare different versions of the current package.
|
||||
|
||||
It needs to be run from a package directory, such that for a package named
|
||||
`pkg` running `npm diff --diff=1.0.0 --diff=1.0.1` is the same as running
|
||||
`npm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1`.
|
||||
|
||||
If only a single argument `<version-a>` is provided, then the current local
|
||||
file system is going to be compared against that version.
|
||||
|
||||
Here's an example comparing two specific versions (published to the
|
||||
configured registry) of the current project directory:
|
||||
|
||||
```bash
|
||||
npm diff --diff=1.0.0 --diff=1.1.0
|
||||
```
|
||||
|
||||
Note that tag names are not valid `--diff` argument values, if you wish to
|
||||
compare to a published tag, you must use the `pkg@tagname` syntax.
|
||||
|
||||
#### Filtering files
|
||||
|
||||
It's possible to also specify positional arguments using file names or globs
|
||||
pattern matching in order to limit the result of diff patches to only a subset
|
||||
of files for a given package, e.g:
|
||||
|
||||
```bash
|
||||
npm diff --diff=pkg@2 ./lib/ CHANGELOG.md
|
||||
```
|
||||
|
||||
In the example above the diff output is only going to print contents of files
|
||||
located within the folder `./lib/` and changed lines of code within the
|
||||
`CHANGELOG.md` file.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `diff`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Define arguments to compare in `npm diff`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `diff-name-only`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Prints only filenames when using `npm diff`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `diff-unified`
|
||||
|
||||
* Default: 3
|
||||
* Type: Number
|
||||
|
||||
The number of lines of context to print in `npm diff`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `diff-ignore-all-space`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Ignore whitespace when comparing lines in `npm diff`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `diff-no-prefix`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Do not show any source or destination prefix in `npm diff` output.
|
||||
|
||||
Note: this causes `npm diff` to ignore the `--diff-src-prefix` and
|
||||
`--diff-dst-prefix` configs.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `diff-src-prefix`
|
||||
|
||||
* Default: "a/"
|
||||
* Type: String
|
||||
|
||||
Source prefix to be used in `npm diff` output.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `diff-dst-prefix`
|
||||
|
||||
* Default: "b/"
|
||||
* Type: String
|
||||
|
||||
Destination prefix to be used in `npm diff` output.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `diff-text`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Treat all files as text in `npm diff`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `tag`
|
||||
|
||||
* Default: "latest"
|
||||
* Type: String
|
||||
|
||||
If you ask npm to install a package and don't tell it a specific version,
|
||||
then it will install the specified tag.
|
||||
|
||||
Also the tag that is added to the package@version specified by the `npm tag`
|
||||
command, if no explicit tag is given.
|
||||
|
||||
When used by the `npm diff` command, this is the tag used to fetch the
|
||||
tarball that will be compared with the local files by default.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
## See Also
|
||||
|
||||
* [npm outdated](/commands/npm-outdated)
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npm registry](/using-npm/registry)
|
|
@ -0,0 +1,165 @@
|
|||
---
|
||||
title: npm-dist-tag
|
||||
section: 1
|
||||
description: Modify package distribution tags
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm dist-tag add <pkg>@<version> [<tag>]
|
||||
npm dist-tag rm <pkg> <tag>
|
||||
npm dist-tag ls [<pkg>]
|
||||
|
||||
aliases: dist-tags
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
Add, remove, and enumerate distribution tags on a package:
|
||||
|
||||
* add: Tags the specified version of the package with the specified tag, or
|
||||
the `--tag` config if not specified. If you have two-factor
|
||||
authentication on auth-and-writes then you’ll need to include a one-time
|
||||
password on the command line with `--otp <one-time password>`, or at the
|
||||
OTP prompt.
|
||||
|
||||
* rm: Clear a tag that is no longer in use from the package. If you have
|
||||
two-factor authentication on auth-and-writes then you’ll need to include
|
||||
a one-time password on the command line with `--otp <one-time password>`,
|
||||
or at the OTP prompt.
|
||||
|
||||
* ls: Show all of the dist-tags for a package, defaulting to the package in
|
||||
the current prefix. This is the default action if none is specified.
|
||||
|
||||
A tag can be used when installing packages as a reference to a version instead
|
||||
of using a specific version number:
|
||||
|
||||
```bash
|
||||
npm install <name>@<tag>
|
||||
```
|
||||
|
||||
When installing dependencies, a preferred tagged version may be specified:
|
||||
|
||||
```bash
|
||||
npm install --tag <tag>
|
||||
```
|
||||
|
||||
(This also applies to any other commands that resolve and install
|
||||
dependencies, such as `npm dedupe`, `npm update`, and `npm audit fix`.)
|
||||
|
||||
Publishing a package sets the `latest` tag to the published version unless the
|
||||
`--tag` option is used. For example, `npm publish --tag=beta`.
|
||||
|
||||
By default, `npm install <pkg>` (without any `@<version>` or `@<tag>`
|
||||
specifier) installs the `latest` tag.
|
||||
|
||||
### Purpose
|
||||
|
||||
Tags can be used to provide an alias instead of version numbers.
|
||||
|
||||
For example, a project might choose to have multiple streams of development
|
||||
and use a different tag for each stream, e.g., `stable`, `beta`, `dev`,
|
||||
`canary`.
|
||||
|
||||
By default, the `latest` tag is used by npm to identify the current version
|
||||
of a package, and `npm install <pkg>` (without any `@<version>` or `@<tag>`
|
||||
specifier) installs the `latest` tag. Typically, projects only use the
|
||||
`latest` tag for stable release versions, and use other tags for unstable
|
||||
versions such as prereleases.
|
||||
|
||||
The `next` tag is used by some projects to identify the upcoming version.
|
||||
|
||||
Other than `latest`, no tag has any special significance to npm itself.
|
||||
|
||||
### Caveats
|
||||
|
||||
This command used to be known as `npm tag`, which only created new tags,
|
||||
and so had a different syntax.
|
||||
|
||||
Tags must share a namespace with version numbers, because they are
|
||||
specified in the same slot: `npm install <pkg>@<version>` vs
|
||||
`npm install <pkg>@<tag>`.
|
||||
|
||||
Tags that can be interpreted as valid semver ranges will be rejected. For
|
||||
example, `v1.4` cannot be used as a tag, because it is interpreted by
|
||||
semver as `>=1.4.0 <1.5.0`. See <https://github.com/npm/npm/issues/6082>.
|
||||
|
||||
The simplest way to avoid semver problems with tags is to use tags that do
|
||||
not begin with a number or the letter `v`.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm dedupe](/commands/npm-dedupe)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
|
@ -0,0 +1,122 @@
|
|||
---
|
||||
title: npm-docs
|
||||
section: 1
|
||||
description: Open documentation for a package in a web browser
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm docs [<pkgname> [<pkgname> ...]]
|
||||
|
||||
aliases: home
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command tries to guess at the likely location of a package's
|
||||
documentation URL, and then tries to open it using the `--browser` config
|
||||
param. You can pass multiple package names at once. If no package name is
|
||||
provided, it will search for a `package.json` in the current folder and use
|
||||
the `name` property.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `browser`
|
||||
|
||||
* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
|
||||
* Type: null, Boolean, or String
|
||||
|
||||
The browser that is called by npm commands to open websites.
|
||||
|
||||
Set to `false` to suppress browser behavior and instead print urls to
|
||||
terminal.
|
||||
|
||||
Set to `true` to use default system URL opener.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm view](/commands/npm-view)
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [package.json](/configuring-npm/package-json)
|
|
@ -0,0 +1,126 @@
|
|||
---
|
||||
title: npm-doctor
|
||||
section: 1
|
||||
description: Check your npm environment
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm doctor
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
`npm doctor` runs a set of checks to ensure that your npm installation has
|
||||
what it needs to manage your JavaScript packages. npm is mostly a
|
||||
standalone tool, but it does have some basic requirements that must be met:
|
||||
|
||||
+ Node.js and git must be executable by npm.
|
||||
+ The primary npm registry, `registry.npmjs.com`, or another service that
|
||||
uses the registry API, is available.
|
||||
+ The directories that npm uses, `node_modules` (both locally and
|
||||
globally), exist and can be written by the current user.
|
||||
+ The npm cache exists, and the package tarballs within it aren't corrupt.
|
||||
|
||||
Without all of these working properly, npm may not work properly. Many
|
||||
issues are often attributable to things that are outside npm's code base,
|
||||
so `npm doctor` confirms that the npm installation is in a good state.
|
||||
|
||||
Also, in addition to this, there are also very many issue reports due to
|
||||
using old versions of npm. Since npm is constantly improving, running
|
||||
`npm@latest` is better than an old version.
|
||||
|
||||
`npm doctor` verifies the following items in your environment, and if there
|
||||
are any recommended changes, it will display them.
|
||||
|
||||
#### `npm ping`
|
||||
|
||||
By default, npm installs from the primary npm registry,
|
||||
`registry.npmjs.org`. `npm doctor` hits a special ping endpoint within the
|
||||
registry. This can also be checked with `npm ping`. If this check fails,
|
||||
you may be using a proxy that needs to be configured, or may need to talk
|
||||
to your IT staff to get access over HTTPS to `registry.npmjs.org`.
|
||||
|
||||
This check is done against whichever registry you've configured (you can
|
||||
see what that is by running `npm config get registry`), and if you're using
|
||||
a private registry that doesn't support the `/whoami` endpoint supported by
|
||||
the primary registry, this check may fail.
|
||||
|
||||
#### `npm -v`
|
||||
|
||||
While Node.js may come bundled with a particular version of npm, it's the
|
||||
policy of the CLI team that we recommend all users run `npm@latest` if they
|
||||
can. As the CLI is maintained by a small team of contributors, there are
|
||||
only resources for a single line of development, so npm's own long-term
|
||||
support releases typically only receive critical security and regression
|
||||
fixes. The team believes that the latest tested version of npm is almost
|
||||
always likely to be the most functional and defect-free version of npm.
|
||||
|
||||
#### `node -v`
|
||||
|
||||
For most users, in most circumstances, the best version of Node will be the
|
||||
latest long-term support (LTS) release. Those of you who want access to new
|
||||
ECMAscript features or bleeding-edge changes to Node's standard library may
|
||||
be running a newer version, and some may be required to run an older
|
||||
version of Node because of enterprise change control policies. That's OK!
|
||||
But in general, the npm team recommends that most users run Node.js LTS.
|
||||
|
||||
#### `npm config get registry`
|
||||
|
||||
You may be installing from private package registries for your project or
|
||||
company. That's great! Others may be following tutorials or StackOverflow
|
||||
questions in an effort to troubleshoot problems you may be having.
|
||||
Sometimes, this may entail changing the registry you're pointing at. This
|
||||
part of `npm doctor` just lets you, and maybe whoever's helping you with
|
||||
support, know that you're not using the default registry.
|
||||
|
||||
#### `which git`
|
||||
|
||||
While it's documented in the README, it may not be obvious that npm needs
|
||||
Git installed to do many of the things that it does. Also, in some cases
|
||||
– especially on Windows – you may have Git set up in such a way that it's
|
||||
not accessible via your `PATH` so that npm can find it. This check ensures
|
||||
that Git is available.
|
||||
|
||||
#### Permissions checks
|
||||
|
||||
* Your cache must be readable and writable by the user running npm.
|
||||
* Global package binaries must be writable by the user running npm.
|
||||
* Your local `node_modules` path, if you're running `npm doctor` with a
|
||||
project directory, must be readable and writable by the user running npm.
|
||||
|
||||
#### Validate the checksums of cached packages
|
||||
|
||||
When an npm package is published, the publishing process generates a
|
||||
checksum that npm uses at install time to verify that the package didn't
|
||||
get corrupted in transit. `npm doctor` uses these checksums to validate the
|
||||
package tarballs in your local cache (you can see where that cache is
|
||||
located with `npm config get cache`). In the event that there are corrupt
|
||||
packages in your cache, you should probably run `npm cache clean -f` and
|
||||
reset the cache.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm bugs](/commands/npm-bugs)
|
||||
* [npm help](/commands/npm-help)
|
||||
* [npm ping](/commands/npm-ping)
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
title: npm-edit
|
||||
section: 1
|
||||
description: Edit an installed package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm edit <pkg>
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Selects a dependency in the current project and opens the package folder in
|
||||
the default editor (or whatever you've configured as the npm `editor`
|
||||
config -- see [`npm-config`](npm-config).)
|
||||
|
||||
After it has been edited, the package is rebuilt so as to pick up any
|
||||
changes in compiled packages.
|
||||
|
||||
For instance, you can do `npm install connect` to install connect
|
||||
into your package, and then `npm edit connect` to make a few
|
||||
changes to your locally installed copy.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `editor`
|
||||
|
||||
* Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on
|
||||
Windows, or 'vim' on Unix systems
|
||||
* Type: String
|
||||
|
||||
The command to run for `npm edit` and `npm config edit`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm explore](/commands/npm-explore)
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
|
@ -0,0 +1,391 @@
|
|||
---
|
||||
title: npm-exec
|
||||
section: 1
|
||||
description: Run a command from a local or remote npm package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm exec -- <pkg>[@<version>] [args...]
|
||||
npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
|
||||
npm exec -c '<cmd> [args...]'
|
||||
npm exec --package=foo -c '<cmd> [args...]'
|
||||
npm exec [--ws] [-w <workspace-name] [args...]
|
||||
|
||||
npx <pkg>[@<specifier>] [args...]
|
||||
npx -p <pkg>[@<specifier>] <cmd> [args...]
|
||||
npx -c '<cmd> [args...]'
|
||||
npx -p <pkg>[@<specifier>] -c '<cmd> [args...]'
|
||||
Run without --call or positional args to open interactive subshell
|
||||
|
||||
alias: npm x, npx
|
||||
|
||||
common options:
|
||||
--package=<pkg> (may be specified multiple times)
|
||||
-p is a shorthand for --package only when using npx executable
|
||||
-c <cmd> --call=<cmd> (may not be mixed with positional arguments)
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command allows you to run an arbitrary command from an npm package
|
||||
(either one installed locally, or fetched remotely), in a similar context
|
||||
as running it via `npm run`.
|
||||
|
||||
Run without positional arguments or `--call`, this allows you to
|
||||
interactively run commands in the same sort of shell environment that
|
||||
`package.json` scripts are run. Interactive mode is not supported in CI
|
||||
environments when standard input is a TTY, to prevent hangs.
|
||||
|
||||
Whatever packages are specified by the `--package` option will be
|
||||
provided in the `PATH` of the executed command, along with any locally
|
||||
installed package executables. The `--package` option may be
|
||||
specified multiple times, to execute the supplied command in an environment
|
||||
where all specified packages are available.
|
||||
|
||||
If any requested packages are not present in the local project
|
||||
dependencies, then they are installed to a folder in the npm cache, which
|
||||
is added to the `PATH` environment variable in the executed process. A
|
||||
prompt is printed (which can be suppressed by providing either `--yes` or
|
||||
`--no`).
|
||||
|
||||
Package names provided without a specifier will be matched with whatever
|
||||
version exists in the local project. Package names with a specifier will
|
||||
only be considered a match if they have the exact same name and version as
|
||||
the local dependency.
|
||||
|
||||
If no `-c` or `--call` option is provided, then the positional arguments
|
||||
are used to generate the command string. If no `--package` options
|
||||
are provided, then npm will attempt to determine the executable name from
|
||||
the package specifier provided as the first positional argument according
|
||||
to the following heuristic:
|
||||
|
||||
- If the package has a single entry in its `bin` field in `package.json`,
|
||||
or if all entries are aliases of the same command, then that command
|
||||
will be used.
|
||||
- If the package has multiple `bin` entries, and one of them matches the
|
||||
unscoped portion of the `name` field, then that command will be used.
|
||||
- If this does not result in exactly one option (either because there are
|
||||
no bin entries, or none of them match the `name` of the package), then
|
||||
`npm exec` exits with an error.
|
||||
|
||||
To run a binary _other than_ the named binary, specify one or more
|
||||
`--package` options, which will prevent npm from inferring the package from
|
||||
the first command argument.
|
||||
|
||||
### `npx` vs `npm exec`
|
||||
|
||||
When run via the `npx` binary, all flags and options *must* be set prior to
|
||||
any positional arguments. When run via `npm exec`, a double-hyphen `--`
|
||||
flag can be used to suppress npm's parsing of switches and options that
|
||||
should be sent to the executed command.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
$ npx foo@latest bar --package=@npmcli/foo
|
||||
```
|
||||
|
||||
In this case, npm will resolve the `foo` package name, and run the
|
||||
following command:
|
||||
|
||||
```
|
||||
$ foo bar --package=@npmcli/foo
|
||||
```
|
||||
|
||||
Since the `--package` option comes _after_ the positional arguments, it is
|
||||
treated as an argument to the executed command.
|
||||
|
||||
In contrast, due to npm's argument parsing logic, running this command is
|
||||
different:
|
||||
|
||||
```
|
||||
$ npm exec foo@latest bar --package=@npmcli/foo
|
||||
```
|
||||
|
||||
In this case, npm will parse the `--package` option first, resolving the
|
||||
`@npmcli/foo` package. Then, it will execute the following command in that
|
||||
context:
|
||||
|
||||
```
|
||||
$ foo@latest bar
|
||||
```
|
||||
|
||||
The double-hyphen character is recommended to explicitly tell npm to stop
|
||||
parsing command line options and switches. The following command would
|
||||
thus be equivalent to the `npx` command above:
|
||||
|
||||
```
|
||||
$ npm exec -- foo@latest bar --package=@npmcli/foo
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `package`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
The package to install for [`npm exec`](/commands/npm-exec)
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `call`
|
||||
|
||||
* Default: ""
|
||||
* Type: String
|
||||
|
||||
Optional companion option for `npm exec`, `npx` that allows for specifying a
|
||||
custom command to be run along with the installed packages.
|
||||
|
||||
```bash
|
||||
npm exec --package yo --package generator-node --call "yo node"
|
||||
```
|
||||
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### Examples
|
||||
|
||||
Run the version of `tap` in the local dependencies, with the provided
|
||||
arguments:
|
||||
|
||||
```
|
||||
$ npm exec -- tap --bail test/foo.js
|
||||
$ npx tap --bail test/foo.js
|
||||
```
|
||||
|
||||
Run a command _other than_ the command whose name matches the package name
|
||||
by specifying a `--package` option:
|
||||
|
||||
```
|
||||
$ npm exec --package=foo -- bar --bar-argument
|
||||
# ~ or ~
|
||||
$ npx --package=foo bar --bar-argument
|
||||
```
|
||||
|
||||
Run an arbitrary shell script, in the context of the current project:
|
||||
|
||||
```
|
||||
$ npm x -c 'eslint && say "hooray, lint passed"'
|
||||
$ npx -c 'eslint && say "hooray, lint passed"'
|
||||
```
|
||||
|
||||
### Workspaces support
|
||||
|
||||
You may use the `workspace` or `workspaces` configs in order to run an
|
||||
arbitrary command from an npm package (either one installed locally, or fetched
|
||||
remotely) in the context of the specified workspaces.
|
||||
If no positional argument or `--call` option is provided, it will open an
|
||||
interactive subshell in the context of each of these configured workspaces one
|
||||
at a time.
|
||||
|
||||
Given a project with configured workspaces, e.g:
|
||||
|
||||
```
|
||||
.
|
||||
+-- package.json
|
||||
`-- packages
|
||||
+-- a
|
||||
| `-- package.json
|
||||
+-- b
|
||||
| `-- package.json
|
||||
`-- c
|
||||
`-- package.json
|
||||
```
|
||||
|
||||
Assuming the workspace configuration is properly set up at the root level
|
||||
`package.json` file. e.g:
|
||||
|
||||
```
|
||||
{
|
||||
"workspaces": [ "./packages/*" ]
|
||||
}
|
||||
```
|
||||
|
||||
You can execute an arbitrary command from a package in the context of each of
|
||||
the configured workspaces when using the `workspaces` configuration options,
|
||||
in this example we're using **eslint** to lint any js file found within each
|
||||
workspace folder:
|
||||
|
||||
```
|
||||
npm exec --ws -- eslint ./*.js
|
||||
```
|
||||
|
||||
#### Filtering workspaces
|
||||
|
||||
It's also possible to execute a command in a single workspace using the
|
||||
`workspace` config along with a name or directory path:
|
||||
|
||||
```
|
||||
npm exec --workspace=a -- eslint ./*.js
|
||||
```
|
||||
|
||||
The `workspace` config can also be specified multiple times in order to run a
|
||||
specific script in the context of multiple workspaces. When defining values for
|
||||
the `workspace` config in the command line, it also possible to use `-w` as a
|
||||
shorthand, e.g:
|
||||
|
||||
```
|
||||
npm exec -w a -w b -- eslint ./*.js
|
||||
```
|
||||
|
||||
This last command will run the `eslint` command in both `./packages/a` and
|
||||
`./packages/b` folders.
|
||||
|
||||
### Compatibility with Older npx Versions
|
||||
|
||||
The `npx` binary was rewritten in npm v7.0.0, and the standalone `npx`
|
||||
package deprecated at that time. `npx` uses the `npm exec`
|
||||
command instead of a separate argument parser and install process, with
|
||||
some affordances to maintain backwards compatibility with the arguments it
|
||||
accepted in previous versions.
|
||||
|
||||
This resulted in some shifts in its functionality:
|
||||
|
||||
- Any `npm` config value may be provided.
|
||||
- To prevent security and user-experience problems from mistyping package
|
||||
names, `npx` prompts before installing anything. Suppress this
|
||||
prompt with the `-y` or `--yes` option.
|
||||
- The `--no-install` option is deprecated, and will be converted to `--no`.
|
||||
- Shell fallback functionality is removed, as it is not advisable.
|
||||
- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand
|
||||
for `--package` in npx. This is maintained, but only for the `npx`
|
||||
executable.
|
||||
- The `--ignore-existing` option is removed. Locally installed bins are
|
||||
always present in the executed process `PATH`.
|
||||
- The `--npm` option is removed. `npx` will always use the `npm` it ships
|
||||
with.
|
||||
- The `--node-arg` and `-n` options are removed.
|
||||
- The `--always-spawn` option is redundant, and thus removed.
|
||||
- The `--shell` option is replaced with `--script-shell`, but maintained
|
||||
in the `npx` executable for backwards compatibility.
|
||||
|
||||
### A note on caching
|
||||
|
||||
The npm cli utilizes its internal package cache when using the package
|
||||
name specified. You can use the following to change how and when the
|
||||
cli uses this cache. See [`npm cache`](/commands/npm-cache) for more on
|
||||
how the cache works.
|
||||
|
||||
#### prefer-online
|
||||
|
||||
Forces staleness checks for packages, making the cli look for updates
|
||||
immediately even if the package is already in the cache.
|
||||
|
||||
#### prefer-offline
|
||||
|
||||
Bypasses staleness checks for packages. Missing data will still be
|
||||
requested from the server. To force full offline mode, use `offline`.
|
||||
|
||||
#### offline
|
||||
|
||||
Forces full offline mode. Any packages not locally cached will result in
|
||||
an error.
|
||||
|
||||
#### workspace
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result to selecting all of the
|
||||
nested workspaces)
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
#### workspaces
|
||||
|
||||
* Alias: `--ws`
|
||||
* Type: Boolean
|
||||
* Default: `false`
|
||||
|
||||
Run scripts in the context of all configured workspaces for the current
|
||||
project.
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm run-script](/commands/npm-run-script)
|
||||
* [npm scripts](/using-npm/scripts)
|
||||
* [npm test](/commands/npm-test)
|
||||
* [npm start](/commands/npm-start)
|
||||
* [npm restart](/commands/npm-restart)
|
||||
* [npm stop](/commands/npm-stop)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npm workspaces](/using-npm/workspaces)
|
||||
* [npx](/commands/npx)
|
|
@ -0,0 +1,112 @@
|
|||
---
|
||||
title: npm-explain
|
||||
section: 1
|
||||
description: Explain installed packages
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm explain <folder | specifier>
|
||||
|
||||
alias: why
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command will print the chain of dependencies causing a given package
|
||||
to be installed in the current project.
|
||||
|
||||
Positional arguments can be either folders within `node_modules`, or
|
||||
`name@version-range` specifiers, which will select the dependency
|
||||
relationships to explain.
|
||||
|
||||
For example, running `npm explain glob` within npm's source tree will show:
|
||||
|
||||
```bash
|
||||
glob@7.1.6
|
||||
node_modules/glob
|
||||
glob@"^7.1.4" from the root project
|
||||
|
||||
glob@7.1.1 dev
|
||||
node_modules/tacks/node_modules/glob
|
||||
glob@"^7.0.5" from rimraf@2.6.2
|
||||
node_modules/tacks/node_modules/rimraf
|
||||
rimraf@"^2.6.2" from tacks@1.3.0
|
||||
node_modules/tacks
|
||||
dev tacks@"^1.3.0" from the root project
|
||||
```
|
||||
|
||||
To explain just the package residing at a specific folder, pass that as the
|
||||
argument to the command. This can be useful when trying to figure out
|
||||
exactly why a given dependency is being duplicated to satisfy conflicting
|
||||
version requirements within the project.
|
||||
|
||||
```bash
|
||||
$ npm explain node_modules/nyc/node_modules/find-up
|
||||
find-up@3.0.0 dev
|
||||
node_modules/nyc/node_modules/find-up
|
||||
find-up@"^3.0.0" from nyc@14.1.1
|
||||
node_modules/nyc
|
||||
nyc@"^14.1.1" from tap@14.10.8
|
||||
node_modules/tap
|
||||
dev tap@"^14.10.8" from the root project
|
||||
```
|
||||
|
||||
### Configuration
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm ls](/commands/npm-ls)
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm link](/commands/npm-link)
|
||||
* [npm prune](/commands/npm-prune)
|
||||
* [npm outdated](/commands/npm-outdated)
|
||||
* [npm update](/commands/npm-update)
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
title: npm-explore
|
||||
section: 1
|
||||
description: Browse an installed package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm explore <pkg> [ -- <command>]
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Spawn a subshell in the directory of the installed package specified.
|
||||
|
||||
If a command is specified, then it is run in the subshell, which then
|
||||
immediately terminates.
|
||||
|
||||
This is particularly handy in the case of git submodules in the
|
||||
`node_modules` folder:
|
||||
|
||||
```bash
|
||||
npm explore some-dependency -- git pull origin master
|
||||
```
|
||||
|
||||
Note that the package is *not* automatically rebuilt afterwards, so be
|
||||
sure to use `npm rebuild <pkg>` if you make any changes.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `shell`
|
||||
|
||||
* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on
|
||||
Windows
|
||||
* Type: String
|
||||
|
||||
The shell to run for the `npm explore` command.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm edit](/commands/npm-edit)
|
||||
* [npm rebuild](/commands/npm-rebuild)
|
||||
* [npm install](/commands/npm-install)
|
|
@ -0,0 +1,232 @@
|
|||
---
|
||||
title: npm-find-dupes
|
||||
section: 1
|
||||
description: Find duplication in the package tree
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm find-dupes
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
Runs `npm dedupe` in `--dry-run` mode, making npm only output the
|
||||
duplications, without actually changing the package tree.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `global-style`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package into your local `node_modules` folder with
|
||||
the same layout it uses with the global `node_modules` folder. Only your
|
||||
direct dependencies will show in `node_modules` and everything they depend
|
||||
on will be flattened in their `node_modules` folders. This obviously will
|
||||
eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `legacy-bundling`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package such that versions of npm prior to 1.4,
|
||||
such as the one included with node 0.8, can install the package. This
|
||||
eliminates all automatic deduping. If used with `global-style` this option
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `strict-peer-deps`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If set to `true`, and `--legacy-peer-deps` is not set, then _any_
|
||||
conflicting `peerDependencies` will be treated as an install failure, even
|
||||
if npm could reasonably guess the appropriate resolution based on non-peer
|
||||
dependency relationships.
|
||||
|
||||
By default, conflicting `peerDependencies` deep in the dependency graph will
|
||||
be resolved using the nearest non-peer dependency specification, even if
|
||||
doing so will result in some packages receiving a peer dependency outside
|
||||
the range set in their package's `peerDependencies` object.
|
||||
|
||||
When such and override is performed, a warning is printed, explaining the
|
||||
conflict and the packages involved. If `--strict-peer-deps` is set, then
|
||||
this warning is treated as a failure.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `package-lock`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
If set to false, then ignore `package-lock.json` files when installing. This
|
||||
will also prevent _writing_ `package-lock.json` if `save` is true.
|
||||
|
||||
When package package-locks are disabled, automatic pruning of extraneous
|
||||
modules will also be disabled. To remove extraneous modules with
|
||||
package-locks disabled use `npm prune`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `omit`
|
||||
|
||||
* Default: 'dev' if the `NODE_ENV` environment variable is set to
|
||||
'production', otherwise empty.
|
||||
* Type: "dev", "optional", or "peer" (can be set multiple times)
|
||||
|
||||
Dependency types to omit from the installation tree on disk.
|
||||
|
||||
Note that these dependencies _are_ still resolved and added to the
|
||||
`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
|
||||
physically installed on disk.
|
||||
|
||||
If a package type appears in both the `--include` and `--omit` lists, then
|
||||
it will be included.
|
||||
|
||||
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
|
||||
variable will be set to `'production'` for all lifecycle scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `audit`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" submit audit reports alongside the current npm command to the
|
||||
default registry and all registries configured for scopes. See the
|
||||
documentation for [`npm audit`](/commands/npm-audit) for details on what is
|
||||
submitted.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `bin-links`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Tells npm to create symlinks (or `.cmd` shims on Windows) for package
|
||||
executables.
|
||||
|
||||
Set to false to have it not do this. This can be used to work around the
|
||||
fact that some file systems don't support symlinks, even on ostensibly Unix
|
||||
systems.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `fund`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" displays the message at the end of each `npm install`
|
||||
acknowledging the number of dependencies looking for funding. See [`npm
|
||||
fund`](/commands/npm-fund) for details.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm dedupe](/commands/npm-dedupe)
|
||||
* [npm ls](/commands/npm-ls)
|
||||
* [npm update](/commands/npm-update)
|
||||
* [npm install](/commands/npm-install)
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
---
|
||||
title: npm-fund
|
||||
section: 1
|
||||
description: Retrieve funding information
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm fund [<pkg>]
|
||||
npm fund [-w <workspace-name>]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command retrieves information on how to fund the dependencies of a
|
||||
given project. If no package name is provided, it will list all
|
||||
dependencies that are looking for funding in a tree structure, listing the
|
||||
type of funding and the url to visit. If a package name is provided then it
|
||||
tries to open its funding url using the `--browser` config param; if there
|
||||
are multiple funding sources for the package, the user will be instructed
|
||||
to pass the `--which` option to disambiguate.
|
||||
|
||||
The list will avoid duplicated entries and will stack all packages that
|
||||
share the same url as a single entry. Thus, the list does not have the same
|
||||
shape of the output from `npm ls`.
|
||||
|
||||
#### Example
|
||||
|
||||
### Workspaces support
|
||||
|
||||
It's possible to filter the results to only include a single workspace and its
|
||||
dependencies using the `workspace` config option.
|
||||
|
||||
#### Example:
|
||||
|
||||
Here's an example running `npm fund` in a project with a configured
|
||||
workspace `a`:
|
||||
|
||||
```bash
|
||||
$ npm fund
|
||||
test-workspaces-fund@1.0.0
|
||||
+-- https://example.com/a
|
||||
| | `-- a@1.0.0
|
||||
| `-- https://example.com/maintainer
|
||||
| `-- foo@1.0.0
|
||||
+-- https://example.com/npmcli-funding
|
||||
| `-- @npmcli/test-funding
|
||||
`-- https://example.com/org
|
||||
`-- bar@2.0.0
|
||||
```
|
||||
|
||||
And here is an example of the expected result when filtering only by
|
||||
a specific workspace `a` in the same project:
|
||||
|
||||
```bash
|
||||
$ npm fund -w a
|
||||
test-workspaces-fund@1.0.0
|
||||
`-- https://example.com/a
|
||||
| `-- a@1.0.0
|
||||
`-- https://example.com/maintainer
|
||||
`-- foo@2.0.0
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `browser`
|
||||
|
||||
* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
|
||||
* Type: null, Boolean, or String
|
||||
|
||||
The browser that is called by npm commands to open websites.
|
||||
|
||||
Set to `false` to suppress browser behavior and instead print urls to
|
||||
terminal.
|
||||
|
||||
Set to `true` to use default system URL opener.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `unicode`
|
||||
|
||||
* Default: false on windows, true on mac/unix systems with a unicode locale,
|
||||
as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
|
||||
* Type: Boolean
|
||||
|
||||
When set to true, npm uses unicode characters in the tree output. When
|
||||
false, it uses ascii characters instead of unicode glyphs.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `which`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Number
|
||||
|
||||
If there are multiple funding sources, which 1-indexed source URL to open.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
## See Also
|
||||
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm docs](/commands/npm-docs)
|
||||
* [npm ls](/commands/npm-ls)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npm workspaces](/using-npm/workspaces)
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
title: npm-help-search
|
||||
section: 1
|
||||
description: Search npm help documentation
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm help-search <text>
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
This command will search the npm markdown documentation files for the terms
|
||||
provided, and then list the results, sorted by relevance.
|
||||
|
||||
If only one result is found, then it will show that help topic.
|
||||
|
||||
If the argument to `npm help` is not a known help topic, then it will call
|
||||
`help-search`. It is rarely if ever necessary to call this command
|
||||
directly.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `long`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Show extended information in `ls`, `search`, and `help-search`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm](/commands/npm)
|
||||
* [npm help](/commands/npm-help)
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
title: npm-help
|
||||
section: 1
|
||||
description: Get help on npm
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm help <term> [<terms..>]
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
If supplied a topic, then show the appropriate documentation page.
|
||||
|
||||
If the topic does not exist, or if multiple terms are provided, then npm
|
||||
will run the `help-search` command to find a match. Note that, if
|
||||
`help-search` finds a single subject, then it will run `help` on that
|
||||
topic, so unique matches are equivalent to specifying a topic name.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `viewer`
|
||||
|
||||
* Default: "man" on Posix, "browser" on Windows
|
||||
* Type: String
|
||||
|
||||
The program to use to view help content.
|
||||
|
||||
Set to `"browser"` to view html help content in the default web browser.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm](/commands/npm)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [package.json](/configuring-npm/package-json)
|
||||
* [npm help-search](/commands/npm-help-search)
|
|
@ -0,0 +1,119 @@
|
|||
---
|
||||
title: npm-hook
|
||||
section: 1
|
||||
description: Manage registry hooks
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm hook ls [pkg]
|
||||
npm hook add <entity> <url> <secret>
|
||||
npm hook update <id> <url> [secret]
|
||||
npm hook rm <id>
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Allows you to manage [npm
|
||||
hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm),
|
||||
including adding, removing, listing, and updating.
|
||||
|
||||
Hooks allow you to configure URL endpoints that will be notified whenever a
|
||||
change happens to any of the supported entity types. Three different types
|
||||
of entities can be watched by hooks: packages, owners, and scopes.
|
||||
|
||||
To create a package hook, simply reference the package name.
|
||||
|
||||
To create an owner hook, prefix the owner name with `~` (as in,
|
||||
`~youruser`).
|
||||
|
||||
To create a scope hook, prefix the scope name with `@` (as in,
|
||||
`@yourscope`).
|
||||
|
||||
The hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls`
|
||||
for that particular hook.
|
||||
|
||||
The shared secret will be sent along to the URL endpoint so you can verify
|
||||
the request came from your own configured hook.
|
||||
|
||||
### Example
|
||||
|
||||
Add a hook to watch a package for changes:
|
||||
|
||||
```bash
|
||||
$ npm hook add lodash https://example.com/ my-shared-secret
|
||||
```
|
||||
|
||||
Add a hook to watch packages belonging to the user `substack`:
|
||||
|
||||
```bash
|
||||
$ npm hook add ~substack https://example.com/ my-shared-secret
|
||||
```
|
||||
|
||||
Add a hook to watch packages in the scope `@npm`
|
||||
|
||||
```bash
|
||||
$ npm hook add @npm https://example.com/ my-shared-secret
|
||||
```
|
||||
|
||||
List all your active hooks:
|
||||
|
||||
```bash
|
||||
$ npm hook ls
|
||||
```
|
||||
|
||||
List your active hooks for the `lodash` package:
|
||||
|
||||
```bash
|
||||
$ npm hook ls lodash
|
||||
```
|
||||
|
||||
Update an existing hook's url:
|
||||
|
||||
```bash
|
||||
$ npm hook update id-deadbeef https://my-new-website.here/
|
||||
```
|
||||
|
||||
Remove a hook:
|
||||
|
||||
```bash
|
||||
$ npm hook rm id-deadbeef
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `otp`
|
||||
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
|
||||
This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with `npm access`.
|
||||
|
||||
If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm)
|
|
@ -0,0 +1,259 @@
|
|||
---
|
||||
title: npm-init
|
||||
section: 1
|
||||
description: Create a package.json file
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm init [--yes|-y|--scope]
|
||||
npm init <@scope> (same as `npm exec <@scope>/create`)
|
||||
npm init [<@scope>/]<name> (same as `npm exec [<@scope>/]create-<name>`)
|
||||
npm init [-w <dir>] [args...]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
`npm init <initializer>` can be used to set up a new or existing npm
|
||||
package.
|
||||
|
||||
`initializer` in this case is an npm package named `create-<initializer>`,
|
||||
which will be installed by [`npm-exec`](/commands/npm-exec), and then have its
|
||||
main bin executed -- presumably creating or updating `package.json` and
|
||||
running any other initialization-related operations.
|
||||
|
||||
The init command is transformed to a corresponding `npm exec` operation as
|
||||
follows:
|
||||
|
||||
* `npm init foo` -> `npm exec create-foo`
|
||||
* `npm init @usr/foo` -> `npm exec @usr/create-foo`
|
||||
* `npm init @usr` -> `npm exec @usr/create`
|
||||
|
||||
If the initializer is omitted (by just calling `npm init`), init will fall
|
||||
back to legacy init behavior. It will ask you a bunch of questions, and
|
||||
then write a package.json for you. It will attempt to make reasonable
|
||||
guesses based on existing fields, dependencies, and options selected. It is
|
||||
strictly additive, so it will keep any fields and values that were already
|
||||
set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If
|
||||
you pass `--scope`, it will create a scoped package.
|
||||
|
||||
#### Forwarding additional options
|
||||
|
||||
Any additional options will be passed directly to the command, so `npm init
|
||||
foo -- --hello` will map to `npm exec -- create-foo --hello`.
|
||||
|
||||
To better illustrate how options are forwarded, here's a more evolved
|
||||
example showing options passed to both the **npm cli** and a create package,
|
||||
both following commands are equivalent:
|
||||
|
||||
- `npm init foo -y --registry=<url> -- --hello -a`
|
||||
- `npm exec -y --registry=<url> -- create-foo --hello -a`
|
||||
|
||||
### Examples
|
||||
|
||||
Create a new React-based project using
|
||||
[`create-react-app`](https://npm.im/create-react-app):
|
||||
|
||||
```bash
|
||||
$ npm init react-app ./my-react-app
|
||||
```
|
||||
|
||||
Create a new `esm`-compatible package using
|
||||
[`create-esm`](https://npm.im/create-esm):
|
||||
|
||||
```bash
|
||||
$ mkdir my-esm-lib && cd my-esm-lib
|
||||
$ npm init esm --yes
|
||||
```
|
||||
|
||||
Generate a plain old package.json using legacy init:
|
||||
|
||||
```bash
|
||||
$ mkdir my-npm-pkg && cd my-npm-pkg
|
||||
$ git init
|
||||
$ npm init
|
||||
```
|
||||
|
||||
Generate it without having it ask any questions:
|
||||
|
||||
```bash
|
||||
$ npm init -y
|
||||
```
|
||||
|
||||
### Workspaces support
|
||||
|
||||
It's possible to create a new workspace within your project by using the
|
||||
`workspace` config option. When using `npm init -w <dir>` the cli will
|
||||
create the folders and boilerplate expected while also adding a reference
|
||||
to your project `package.json` `"workspaces": []` property in order to make
|
||||
sure that new generated **workspace** is properly set up as such.
|
||||
|
||||
Given a project with no workspaces, e.g:
|
||||
|
||||
```
|
||||
.
|
||||
+-- package.json
|
||||
```
|
||||
|
||||
You may generate a new workspace using the legacy init:
|
||||
|
||||
```bash
|
||||
$ npm init -w packages/a
|
||||
```
|
||||
|
||||
That will generate a new folder and `package.json` file, while also updating
|
||||
your top-level `package.json` to add the reference to this new workspace:
|
||||
|
||||
```
|
||||
.
|
||||
+-- package.json
|
||||
`-- packages
|
||||
`-- a
|
||||
`-- package.json
|
||||
```
|
||||
|
||||
The workspaces init also supports the `npm init <initializer> -w <dir>`
|
||||
syntax, following the same set of rules explained earlier in the initial
|
||||
**Description** section of this page. Similar to the previous example of
|
||||
creating a new React-based project using
|
||||
[`create-react-app`](https://npm.im/create-react-app), the following syntax
|
||||
will make sure to create the new react app as a nested **workspace** within your
|
||||
project and configure your `package.json` to recognize it as such:
|
||||
|
||||
```bash
|
||||
npm init -w packages/my-react-app react-app .
|
||||
```
|
||||
|
||||
This will make sure to generate your react app as expected, one important
|
||||
consideration to have in mind is that `npm exec` is going to be run in the
|
||||
context of the newly created folder for that workspace, and that's the reason
|
||||
why in this example the initializer uses the initializer name followed with a
|
||||
dot to represent the current directory in that context, e.g: `react-app .`:
|
||||
|
||||
```
|
||||
.
|
||||
+-- package.json
|
||||
`-- packages
|
||||
+-- a
|
||||
| `-- package.json
|
||||
`-- my-react-app
|
||||
+-- README
|
||||
+-- package.json
|
||||
`-- ...
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `yes`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Automatically answer "yes" to any prompts that npm might print on the
|
||||
command line.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `force`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Removes various protections against unfortunate side effects, common
|
||||
mistakes, unnecessary performance degradation, and malicious input.
|
||||
|
||||
* Allow clobbering non-npm files in global installs.
|
||||
* Allow the `npm version` command to work on an unclean git repository.
|
||||
* Allow deleting the cache folder with `npm cache clean`.
|
||||
* Allow installing packages that have an `engines` declaration requiring a
|
||||
different version of npm.
|
||||
* Allow installing packages that have an `engines` declaration requiring a
|
||||
different version of `node`, even if `--engine-strict` is enabled.
|
||||
* Allow `npm audit fix` to install modules outside your stated dependency
|
||||
range (including SemVer-major changes).
|
||||
* Allow unpublishing all versions of a published package.
|
||||
* Allow conflicting peerDependencies to be installed in the root project.
|
||||
* Implicitly set `--yes` during `npm init`.
|
||||
* Allow clobbering existing values in `npm pkg`
|
||||
|
||||
If you don't have a clear idea of what you want to do, it is strongly
|
||||
recommended that you do not use this option!
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [init-package-json module](http://npm.im/init-package-json)
|
||||
* [package.json](/configuring-npm/package-json)
|
||||
* [npm version](/commands/npm-version)
|
||||
* [npm scope](/using-npm/scope)
|
||||
* [npm exec](/commands/npm-exec)
|
||||
* [npm workspaces](/using-npm/workspaces)
|
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
title: npm-install-ci-test
|
||||
section: 1
|
||||
description: Install a project with a clean slate and run tests
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm install-ci-test
|
||||
|
||||
alias: npm cit
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command runs `npm ci` followed immediately by `npm test`.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `audit`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" submit audit reports alongside the current npm command to the
|
||||
default registry and all registries configured for scopes. See the
|
||||
documentation for [`npm audit`](/commands/npm-audit) for details on what is
|
||||
submitted.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `script-shell`
|
||||
|
||||
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
|
||||
* Type: null or String
|
||||
|
||||
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
|
||||
init <pkg>` commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm install-test](/commands/npm-install-test)
|
||||
* [npm ci](/commands/npm-ci)
|
||||
* [npm test](/commands/npm-test)
|
|
@ -0,0 +1,297 @@
|
|||
---
|
||||
title: npm-install-test
|
||||
section: 1
|
||||
description: Install package(s) and run tests
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm install-test (with no args, in package dir)
|
||||
npm install-test [<@scope>/]<name>
|
||||
npm install-test [<@scope>/]<name>@<tag>
|
||||
npm install-test [<@scope>/]<name>@<version>
|
||||
npm install-test [<@scope>/]<name>@<version range>
|
||||
npm install-test <tarball file>
|
||||
npm install-test <tarball url>
|
||||
npm install-test <folder>
|
||||
|
||||
alias: npm it
|
||||
common options: [--save|--save-dev|--save-optional] [--save-exact] [--dry-run]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command runs an `npm install` followed immediately by an `npm test`. It
|
||||
takes exactly the same arguments as `npm install`.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `save`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Save installed packages to a package.json file as dependencies.
|
||||
|
||||
When used with the `npm rm` command, removes the dependency from
|
||||
package.json.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `save-exact`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Dependencies saved to package.json will be configured with an exact version
|
||||
rather than using npm's default semver range operator.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global-style`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package into your local `node_modules` folder with
|
||||
the same layout it uses with the global `node_modules` folder. Only your
|
||||
direct dependencies will show in `node_modules` and everything they depend
|
||||
on will be flattened in their `node_modules` folders. This obviously will
|
||||
eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `legacy-bundling`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package such that versions of npm prior to 1.4,
|
||||
such as the one included with node 0.8, can install the package. This
|
||||
eliminates all automatic deduping. If used with `global-style` this option
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `strict-peer-deps`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If set to `true`, and `--legacy-peer-deps` is not set, then _any_
|
||||
conflicting `peerDependencies` will be treated as an install failure, even
|
||||
if npm could reasonably guess the appropriate resolution based on non-peer
|
||||
dependency relationships.
|
||||
|
||||
By default, conflicting `peerDependencies` deep in the dependency graph will
|
||||
be resolved using the nearest non-peer dependency specification, even if
|
||||
doing so will result in some packages receiving a peer dependency outside
|
||||
the range set in their package's `peerDependencies` object.
|
||||
|
||||
When such and override is performed, a warning is printed, explaining the
|
||||
conflict and the packages involved. If `--strict-peer-deps` is set, then
|
||||
this warning is treated as a failure.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `package-lock`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
If set to false, then ignore `package-lock.json` files when installing. This
|
||||
will also prevent _writing_ `package-lock.json` if `save` is true.
|
||||
|
||||
When package package-locks are disabled, automatic pruning of extraneous
|
||||
modules will also be disabled. To remove extraneous modules with
|
||||
package-locks disabled use `npm prune`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `omit`
|
||||
|
||||
* Default: 'dev' if the `NODE_ENV` environment variable is set to
|
||||
'production', otherwise empty.
|
||||
* Type: "dev", "optional", or "peer" (can be set multiple times)
|
||||
|
||||
Dependency types to omit from the installation tree on disk.
|
||||
|
||||
Note that these dependencies _are_ still resolved and added to the
|
||||
`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
|
||||
physically installed on disk.
|
||||
|
||||
If a package type appears in both the `--include` and `--omit` lists, then
|
||||
it will be included.
|
||||
|
||||
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
|
||||
variable will be set to `'production'` for all lifecycle scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `audit`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" submit audit reports alongside the current npm command to the
|
||||
default registry and all registries configured for scopes. See the
|
||||
documentation for [`npm audit`](/commands/npm-audit) for details on what is
|
||||
submitted.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `bin-links`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Tells npm to create symlinks (or `.cmd` shims on Windows) for package
|
||||
executables.
|
||||
|
||||
Set to false to have it not do this. This can be used to work around the
|
||||
fact that some file systems don't support symlinks, even on ostensibly Unix
|
||||
systems.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `fund`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" displays the message at the end of each `npm install`
|
||||
acknowledging the number of dependencies looking for funding. See [`npm
|
||||
fund`](/commands/npm-fund) for details.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `dry-run`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Indicates that you don't want npm to make any changes and that it should
|
||||
only report what it would have done. This can be passed into any of the
|
||||
commands that modify your local installation, eg, `install`, `update`,
|
||||
`dedupe`, `uninstall`, as well as `pack` and `publish`.
|
||||
|
||||
Note: This is NOT honored by other network related commands, eg `dist-tags`,
|
||||
`owner`, etc.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm install-ci-test](/commands/npm-install-ci-test)
|
||||
* [npm test](/commands/npm-test)
|
|
@ -0,0 +1,736 @@
|
|||
---
|
||||
title: npm-install
|
||||
section: 1
|
||||
description: Install a package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm install (with no args, in package dir)
|
||||
npm install [<@scope>/]<name>
|
||||
npm install [<@scope>/]<name>@<tag>
|
||||
npm install [<@scope>/]<name>@<version>
|
||||
npm install [<@scope>/]<name>@<version range>
|
||||
npm install <alias>@npm:<name>
|
||||
npm install <git-host>:<git-user>/<repo-name>
|
||||
npm install <git repo url>
|
||||
npm install <tarball file>
|
||||
npm install <tarball url>
|
||||
npm install <folder>
|
||||
|
||||
aliases: npm i, npm add
|
||||
common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command installs a package and any packages that it depends on. If the
|
||||
package has a package-lock, or an npm shrinkwrap file, or a yarn lock file,
|
||||
the installation of dependencies will be driven by that, respecting the
|
||||
following order of precedence:
|
||||
|
||||
* `npm-shrinkwrap.json`
|
||||
* `package-lock.json`
|
||||
* `yarn.lock`
|
||||
|
||||
See [package-lock.json](/configuring-npm/package-lock-json) and
|
||||
[`npm shrinkwrap`](/commands/npm-shrinkwrap).
|
||||
|
||||
A `package` is:
|
||||
|
||||
* a) a folder containing a program described by a
|
||||
[`package.json`](/configuring-npm/package-json) file
|
||||
* b) a gzipped tarball containing (a)
|
||||
* c) a url that resolves to (b)
|
||||
* d) a `<name>@<version>` that is published on the registry (see
|
||||
[`registry`](/using-npm/registry)) with (c)
|
||||
* e) a `<name>@<tag>` (see [`npm dist-tag`](/commands/npm-dist-tag)) that
|
||||
points to (d)
|
||||
* f) a `<name>` that has a "latest" tag satisfying (e)
|
||||
* g) a `<git remote url>` that resolves to (a)
|
||||
|
||||
Even if you never publish your package, you can still get a lot of benefits
|
||||
of using npm if you just want to write a node program (a), and perhaps if
|
||||
you also want to be able to easily install it elsewhere after packing it up
|
||||
into a tarball (b).
|
||||
|
||||
|
||||
* `npm install` (in a package directory, no arguments):
|
||||
|
||||
Install the dependencies to the local `node_modules` folder.
|
||||
|
||||
In global mode (ie, with `-g` or `--global` appended to the command),
|
||||
it installs the current package context (ie, the current working
|
||||
directory) as a global package.
|
||||
|
||||
By default, `npm install` will install all modules listed as
|
||||
dependencies in [`package.json`](/configuring-npm/package-json).
|
||||
|
||||
With the `--production` flag (or when the `NODE_ENV` environment
|
||||
variable is set to `production`), npm will not install modules listed
|
||||
in `devDependencies`. To install all modules listed in both
|
||||
`dependencies` and `devDependencies` when `NODE_ENV` environment
|
||||
variable is set to `production`, you can use `--production=false`.
|
||||
|
||||
> NOTE: The `--production` flag has no particular meaning when adding a
|
||||
dependency to a project.
|
||||
|
||||
* `npm install <folder>`:
|
||||
|
||||
If `<folder>` sits inside the root of your project, its dependencies will be installed and may
|
||||
be hoisted to the top-level `node_modules` as they would for other
|
||||
types of dependencies. If `<folder>` sits outside the root of your project,
|
||||
*npm will not install the package dependencies* in the directory `<folder>`,
|
||||
but it will create a symlink to `<folder>`.
|
||||
|
||||
> NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use [`npm pack`](/commands/npm-pack) while in the `<folder>` directory, and then install the resulting tarball instead of the `<folder>` using `npm install <tarball file>`
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install ../../other-package
|
||||
npm install ./sub-package
|
||||
```
|
||||
|
||||
* `npm install <tarball file>`:
|
||||
|
||||
Install a package that is sitting on the filesystem. Note: if you just
|
||||
want to link a dev directory into your npm root, you can do this more
|
||||
easily by using [`npm link`](/commands/npm-link).
|
||||
|
||||
Tarball requirements:
|
||||
* The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as the
|
||||
extension.
|
||||
* 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).
|
||||
* The package must contain a `package.json` file with `name` and
|
||||
`version` properties.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install ./package.tgz
|
||||
```
|
||||
|
||||
* `npm install <tarball url>`:
|
||||
|
||||
Fetch the tarball url, and then install it. In order to distinguish between
|
||||
this and other options, the argument must start with "http://" or "https://"
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install https://github.com/indexzero/forever/tarball/v0.5.6
|
||||
```
|
||||
|
||||
* `npm install [<@scope>/]<name>`:
|
||||
|
||||
Do a `<name>@<tag>` install, where `<tag>` is the "tag" config. (See
|
||||
[`config`](/using-npm/config). The config's default value is `latest`.)
|
||||
|
||||
In most cases, this will install the version of the modules tagged as
|
||||
`latest` on the npm registry.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install sax
|
||||
```
|
||||
|
||||
`npm install` saves any specified packages into `dependencies` by default.
|
||||
Additionally, you can control where and how they get saved with some
|
||||
additional flags:
|
||||
|
||||
* `-P, --save-prod`: Package will appear in your `dependencies`. This
|
||||
is the default unless `-D` or `-O` are present.
|
||||
|
||||
* `-D, --save-dev`: Package will appear in your `devDependencies`.
|
||||
|
||||
* `-O, --save-optional`: Package will appear in your
|
||||
`optionalDependencies`.
|
||||
|
||||
* `--no-save`: Prevents saving to `dependencies`.
|
||||
|
||||
When using any of the above options to save dependencies to your
|
||||
package.json, there are two additional, optional flags:
|
||||
|
||||
* `-E, --save-exact`: Saved dependencies will be configured with an
|
||||
exact version rather than using npm's default semver range operator.
|
||||
|
||||
* `-B, --save-bundle`: Saved dependencies will also be added to your
|
||||
`bundleDependencies` list.
|
||||
|
||||
Further, if you have an `npm-shrinkwrap.json` or `package-lock.json`
|
||||
then it will be updated as well.
|
||||
|
||||
`<scope>` is optional. The package will be downloaded from the registry
|
||||
associated with the specified scope. If no registry is associated with
|
||||
the given scope the default registry is assumed. See
|
||||
[`scope`](/using-npm/scope).
|
||||
|
||||
Note: if you do not include the @-symbol on your scope name, npm will
|
||||
interpret this as a GitHub repository instead, see below. Scopes names
|
||||
must also be followed by a slash.
|
||||
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
npm install sax
|
||||
npm install githubname/reponame
|
||||
npm install @myorg/privatepackage
|
||||
npm install node-tap --save-dev
|
||||
npm install dtrace-provider --save-optional
|
||||
npm install readable-stream --save-exact
|
||||
npm install ansi-regex --save-bundle
|
||||
```
|
||||
|
||||
**Note**: If there is a file or folder named `<name>` in the current
|
||||
working directory, then it will try to install that, and only try to
|
||||
fetch the package by name if it is not valid.
|
||||
|
||||
* `npm install <alias>@npm:<name>`:
|
||||
|
||||
Install a package under a custom alias. Allows multiple versions of
|
||||
a same-name package side-by-side, more convenient import names for
|
||||
packages with otherwise long ones, and using git forks replacements
|
||||
or forked npm packages as replacements. Aliasing works only on your
|
||||
project and does not rename packages in transitive dependencies.
|
||||
Aliases should follow the naming conventions stated in
|
||||
[`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules).
|
||||
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
npm install my-react@npm:react
|
||||
npm install jquery2@npm:jquery@2
|
||||
npm install jquery3@npm:jquery@3
|
||||
npm install npa@npm:npm-package-arg
|
||||
```
|
||||
|
||||
* `npm install [<@scope>/]<name>@<tag>`:
|
||||
|
||||
Install the version of the package that is referenced by the specified tag.
|
||||
If the tag does not exist in the registry data for that package, then this
|
||||
will fail.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install sax@latest
|
||||
npm install @myorg/mypackage@latest
|
||||
```
|
||||
|
||||
* `npm install [<@scope>/]<name>@<version>`:
|
||||
|
||||
Install the specified version of the package. This will fail if the
|
||||
version has not been published to the registry.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install sax@0.1.1
|
||||
npm install @myorg/privatepackage@1.5.0
|
||||
```
|
||||
|
||||
* `npm install [<@scope>/]<name>@<version range>`:
|
||||
|
||||
Install a version of the package matching the specified version range.
|
||||
This will follow the same rules for resolving dependencies described in
|
||||
[`package.json`](/configuring-npm/package-json).
|
||||
|
||||
Note that most version ranges must be put in quotes so that your shell
|
||||
will treat it as a single argument.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install sax@">=0.1.0 <0.2.0"
|
||||
npm install @myorg/privatepackage@"16 - 17"
|
||||
```
|
||||
|
||||
* `npm install <git remote url>`:
|
||||
|
||||
Installs the package from the hosted git provider, cloning it with
|
||||
`git`. For a full git remote url, only that URL will be attempted.
|
||||
|
||||
```bash
|
||||
<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
|
||||
```
|
||||
|
||||
`<protocol>` is one of `git`, `git+ssh`, `git+http`, `git+https`, or
|
||||
`git+file`.
|
||||
|
||||
If `#<commit-ish>` is provided, it will be used to clone exactly that
|
||||
commit. If the commit-ish has the format `#semver:<semver>`, `<semver>`
|
||||
can be any valid semver range or exact version, and npm will look for
|
||||
any tags or refs matching that range in the remote repository, much as
|
||||
it would for a registry dependency. If neither `#<commit-ish>` or
|
||||
`#semver:<semver>` is specified, then the default branch of the
|
||||
repository is used.
|
||||
|
||||
If the repository makes use of submodules, those submodules will be
|
||||
cloned as well.
|
||||
|
||||
If the package being installed 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.
|
||||
|
||||
The following git environment variables are recognized by npm and will
|
||||
be added to the environment when running git:
|
||||
|
||||
* `GIT_ASKPASS`
|
||||
* `GIT_EXEC_PATH`
|
||||
* `GIT_PROXY_COMMAND`
|
||||
* `GIT_SSH`
|
||||
* `GIT_SSH_COMMAND`
|
||||
* `GIT_SSL_CAINFO`
|
||||
* `GIT_SSL_NO_VERIFY`
|
||||
|
||||
See the git man page for details.
|
||||
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
npm install git+ssh://git@github.com:npm/cli.git#v1.0.27
|
||||
npm install git+ssh://git@github.com:npm/cli#pull/273
|
||||
npm install git+ssh://git@github.com:npm/cli#semver:^5.0
|
||||
npm install git+https://isaacs@github.com/npm/cli.git
|
||||
npm install git://github.com/npm/cli.git#v1.0.27
|
||||
GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git
|
||||
```
|
||||
|
||||
* `npm install <githubname>/<githubrepo>[#<commit-ish>]`:
|
||||
* `npm install github:<githubname>/<githubrepo>[#<commit-ish>]`:
|
||||
|
||||
Install the package at `https://github.com/githubname/githubrepo` by
|
||||
attempting to clone it using `git`.
|
||||
|
||||
If `#<commit-ish>` is provided, it will be used to clone exactly that
|
||||
commit. If the commit-ish has the format `#semver:<semver>`, `<semver>`
|
||||
can be any valid semver range or exact version, and npm will look for
|
||||
any tags or refs matching that range in the remote repository, much as
|
||||
it would for a registry dependency. If neither `#<commit-ish>` or
|
||||
`#semver:<semver>` is specified, then `master` is used.
|
||||
|
||||
As with regular git dependencies, `dependencies` and `devDependencies`
|
||||
will be installed if the package has a `prepare` script before the
|
||||
package is done installing.
|
||||
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
npm install mygithubuser/myproject
|
||||
npm install github:mygithubuser/myproject
|
||||
```
|
||||
|
||||
* `npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]`:
|
||||
|
||||
Install the package at `https://gist.github.com/gistID` by attempting to
|
||||
clone it using `git`. The GitHub username associated with the gist is
|
||||
optional and will not be saved in `package.json`.
|
||||
|
||||
As with regular git dependencies, `dependencies` and `devDependencies` will
|
||||
be installed if the package has a `prepare` script before the package is
|
||||
done installing.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install gist:101a11beef
|
||||
```
|
||||
|
||||
* `npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]`:
|
||||
|
||||
Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo`
|
||||
by attempting to clone it using `git`.
|
||||
|
||||
If `#<commit-ish>` is provided, it will be used to clone exactly that
|
||||
commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
|
||||
be any valid semver range or exact version, and npm will look for any tags
|
||||
or refs matching that range in the remote repository, much as it would for a
|
||||
registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
|
||||
specified, then `master` is used.
|
||||
|
||||
As with regular git dependencies, `dependencies` and `devDependencies` will
|
||||
be installed if the package has a `prepare` script before the package is
|
||||
done installing.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install bitbucket:mybitbucketuser/myproject
|
||||
```
|
||||
|
||||
* `npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]`:
|
||||
|
||||
Install the package at `https://gitlab.com/gitlabname/gitlabrepo`
|
||||
by attempting to clone it using `git`.
|
||||
|
||||
If `#<commit-ish>` is provided, it will be used to clone exactly that
|
||||
commit. If the commit-ish has the format `#semver:<semver>`, `<semver>` can
|
||||
be any valid semver range or exact version, and npm will look for any tags
|
||||
or refs matching that range in the remote repository, much as it would for a
|
||||
registry dependency. If neither `#<commit-ish>` or `#semver:<semver>` is
|
||||
specified, then `master` is used.
|
||||
|
||||
As with regular git dependencies, `dependencies` and `devDependencies` will
|
||||
be installed if the package has a `prepare` script before the package is
|
||||
done installing.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
npm install gitlab:mygitlabuser/myproject
|
||||
npm install gitlab:myusr/myproj#semver:^5.0
|
||||
```
|
||||
|
||||
You may combine multiple arguments and even multiple types of arguments.
|
||||
For example:
|
||||
|
||||
```bash
|
||||
npm install sax@">=0.1.0 <0.2.0" bench supervisor
|
||||
```
|
||||
|
||||
The `--tag` argument will apply to all of the specified install targets. If
|
||||
a tag with the given name exists, the tagged version is preferred over
|
||||
newer versions.
|
||||
|
||||
The `--dry-run` argument will report in the usual way what the install
|
||||
would have done without actually installing anything.
|
||||
|
||||
The `--package-lock-only` argument will only update the
|
||||
`package-lock.json`, instead of checking `node_modules` and downloading
|
||||
dependencies.
|
||||
|
||||
The `-f` or `--force` argument will force npm to fetch remote resources
|
||||
even if a local copy exists on disk.
|
||||
|
||||
```bash
|
||||
npm install sax --force
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
See the [`config`](/using-npm/config) help doc. Many of the configuration
|
||||
params have some effect on installation, since that's most of what npm
|
||||
does.
|
||||
|
||||
These are some of the most common options related to installation.
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `save`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Save installed packages to a package.json file as dependencies.
|
||||
|
||||
When used with the `npm rm` command, removes the dependency from
|
||||
package.json.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `save-exact`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Dependencies saved to package.json will be configured with an exact version
|
||||
rather than using npm's default semver range operator.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global-style`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package into your local `node_modules` folder with
|
||||
the same layout it uses with the global `node_modules` folder. Only your
|
||||
direct dependencies will show in `node_modules` and everything they depend
|
||||
on will be flattened in their `node_modules` folders. This obviously will
|
||||
eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `legacy-bundling`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package such that versions of npm prior to 1.4,
|
||||
such as the one included with node 0.8, can install the package. This
|
||||
eliminates all automatic deduping. If used with `global-style` this option
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `strict-peer-deps`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If set to `true`, and `--legacy-peer-deps` is not set, then _any_
|
||||
conflicting `peerDependencies` will be treated as an install failure, even
|
||||
if npm could reasonably guess the appropriate resolution based on non-peer
|
||||
dependency relationships.
|
||||
|
||||
By default, conflicting `peerDependencies` deep in the dependency graph will
|
||||
be resolved using the nearest non-peer dependency specification, even if
|
||||
doing so will result in some packages receiving a peer dependency outside
|
||||
the range set in their package's `peerDependencies` object.
|
||||
|
||||
When such and override is performed, a warning is printed, explaining the
|
||||
conflict and the packages involved. If `--strict-peer-deps` is set, then
|
||||
this warning is treated as a failure.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `package-lock`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
If set to false, then ignore `package-lock.json` files when installing. This
|
||||
will also prevent _writing_ `package-lock.json` if `save` is true.
|
||||
|
||||
When package package-locks are disabled, automatic pruning of extraneous
|
||||
modules will also be disabled. To remove extraneous modules with
|
||||
package-locks disabled use `npm prune`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `omit`
|
||||
|
||||
* Default: 'dev' if the `NODE_ENV` environment variable is set to
|
||||
'production', otherwise empty.
|
||||
* Type: "dev", "optional", or "peer" (can be set multiple times)
|
||||
|
||||
Dependency types to omit from the installation tree on disk.
|
||||
|
||||
Note that these dependencies _are_ still resolved and added to the
|
||||
`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
|
||||
physically installed on disk.
|
||||
|
||||
If a package type appears in both the `--include` and `--omit` lists, then
|
||||
it will be included.
|
||||
|
||||
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
|
||||
variable will be set to `'production'` for all lifecycle scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `audit`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" submit audit reports alongside the current npm command to the
|
||||
default registry and all registries configured for scopes. See the
|
||||
documentation for [`npm audit`](/commands/npm-audit) for details on what is
|
||||
submitted.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `bin-links`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Tells npm to create symlinks (or `.cmd` shims on Windows) for package
|
||||
executables.
|
||||
|
||||
Set to false to have it not do this. This can be used to work around the
|
||||
fact that some file systems don't support symlinks, even on ostensibly Unix
|
||||
systems.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `fund`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" displays the message at the end of each `npm install`
|
||||
acknowledging the number of dependencies looking for funding. See [`npm
|
||||
fund`](/commands/npm-fund) for details.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `dry-run`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Indicates that you don't want npm to make any changes and that it should
|
||||
only report what it would have done. This can be passed into any of the
|
||||
commands that modify your local installation, eg, `install`, `update`,
|
||||
`dedupe`, `uninstall`, as well as `pack` and `publish`.
|
||||
|
||||
Note: This is NOT honored by other network related commands, eg `dist-tags`,
|
||||
`owner`, etc.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### Algorithm
|
||||
|
||||
Given a `package{dep}` structure: `A{B,C}, B{C}, C{D}`,
|
||||
the npm install algorithm produces:
|
||||
|
||||
```bash
|
||||
A
|
||||
+-- B
|
||||
+-- C
|
||||
+-- D
|
||||
```
|
||||
|
||||
That is, the dependency from B to C is satisfied by the fact that A already
|
||||
caused C to be installed at a higher level. D is still installed at the top
|
||||
level because nothing conflicts with it.
|
||||
|
||||
For `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces:
|
||||
|
||||
```bash
|
||||
A
|
||||
+-- B
|
||||
+-- C
|
||||
`-- D@2
|
||||
+-- D@1
|
||||
```
|
||||
|
||||
Because B's D@1 will be installed in the top-level, C now has to install
|
||||
D@2 privately for itself. This algorithm is deterministic, but different
|
||||
trees may be produced if two dependencies are requested for installation in
|
||||
a different order.
|
||||
|
||||
See [folders](/configuring-npm/folders) for a more detailed description of
|
||||
the specific folder structures that npm creates.
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm update](/commands/npm-update)
|
||||
* [npm audit](/commands/npm-audit)
|
||||
* [npm fund](/commands/npm-fund)
|
||||
* [npm link](/commands/npm-link)
|
||||
* [npm rebuild](/commands/npm-rebuild)
|
||||
* [npm scripts](/using-npm/scripts)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm dist-tag](/commands/npm-dist-tag)
|
||||
* [npm uninstall](/commands/npm-uninstall)
|
||||
* [npm shrinkwrap](/commands/npm-shrinkwrap)
|
||||
* [package.json](/configuring-npm/package-json)
|
||||
* [workspaces](/using-npm/workspaces)
|
|
@ -0,0 +1,384 @@
|
|||
---
|
||||
title: npm-link
|
||||
section: 1
|
||||
description: Symlink a package folder
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm link (in package dir)
|
||||
npm link [<@scope>/]<pkg>[@<version>]
|
||||
|
||||
alias: npm ln
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This is handy for installing your own stuff, so that you can work on it and
|
||||
test iteratively without having to continually rebuild.
|
||||
|
||||
Package linking is a two-step process.
|
||||
|
||||
First, `npm link` in a package folder will create a symlink in the global
|
||||
folder `{prefix}/lib/node_modules/<package>` that links to the package
|
||||
where the `npm link` command was executed. It will also link any bins in
|
||||
the package to `{prefix}/bin/{name}`. Note that `npm link` uses the global
|
||||
prefix (see `npm prefix -g` for its value).
|
||||
|
||||
Next, in some other location, `npm link package-name` will create a
|
||||
symbolic link from globally-installed `package-name` to `node_modules/` of
|
||||
the current folder.
|
||||
|
||||
Note that `package-name` is taken from `package.json`, _not_ from the
|
||||
directory name.
|
||||
|
||||
The package name can be optionally prefixed with a scope. See
|
||||
[`scope`](/using-npm/scope). The scope must be preceded by an @-symbol and
|
||||
followed by a slash.
|
||||
|
||||
When creating tarballs for `npm publish`, the linked packages are
|
||||
"snapshotted" to their current state by resolving the symbolic links, if
|
||||
they are included in `bundleDependencies`.
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
cd ~/projects/node-redis # go into the package directory
|
||||
npm link # creates global link
|
||||
cd ~/projects/node-bloggy # go into some other package directory.
|
||||
npm link redis # link-install the package
|
||||
```
|
||||
|
||||
Now, any changes to `~/projects/node-redis` will be reflected in
|
||||
`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link
|
||||
should be to the package name, not the directory name for that package.
|
||||
|
||||
You may also shortcut the two steps in one. For example, to do the
|
||||
above use-case in a shorter way:
|
||||
|
||||
```bash
|
||||
cd ~/projects/node-bloggy # go into the dir of your main project
|
||||
npm link ../node-redis # link the dir of your dependency
|
||||
```
|
||||
|
||||
The second line is the equivalent of doing:
|
||||
|
||||
```bash
|
||||
(cd ../node-redis; npm link)
|
||||
npm link redis
|
||||
```
|
||||
|
||||
That is, it first creates a global link, and then links the global
|
||||
installation target into your project's `node_modules` folder.
|
||||
|
||||
Note that in this case, you are referring to the directory name,
|
||||
`node-redis`, rather than the package name `redis`.
|
||||
|
||||
If your linked package is scoped (see [`scope`](/using-npm/scope)) your
|
||||
link command must include that scope, e.g.
|
||||
|
||||
```bash
|
||||
npm link @myorg/privatepackage
|
||||
```
|
||||
|
||||
### Caveat
|
||||
|
||||
Note that package dependencies linked in this way are _not_ saved to
|
||||
`package.json` by default, on the assumption that the intention is to have
|
||||
a link stand in for a regular non-link dependency. Otherwise, for example,
|
||||
if you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace
|
||||
the `^3.0.1` dependency with `file:../path/to/node-redis`, which you
|
||||
probably don't want! Additionally, other users or developers on your
|
||||
project would run into issues if they do not have their folders set up
|
||||
exactly the same as yours.
|
||||
|
||||
If you are adding a _new_ dependency as a link, you should add it to the
|
||||
relevant metadata by running `npm install <dep> --package-lock-only`.
|
||||
|
||||
If you _want_ to save the `file:` reference in your `package.json` and
|
||||
`package-lock.json` files, you can use `npm link <dep> --save` to do so.
|
||||
|
||||
### Workspace Usage
|
||||
|
||||
`npm link <pkg> --workspace <name>` will link the relevant package as a
|
||||
dependency of the specified workspace(s). Note that It may actually be
|
||||
linked into the parent project's `node_modules` folder, if there are no
|
||||
conflicting dependencies.
|
||||
|
||||
`npm link --workspace <name>` will create a global link to the specified
|
||||
workspace(s).
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `save`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Save installed packages to a package.json file as dependencies.
|
||||
|
||||
When used with the `npm rm` command, removes the dependency from
|
||||
package.json.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `save-exact`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Dependencies saved to package.json will be configured with an exact version
|
||||
rather than using npm's default semver range operator.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global-style`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package into your local `node_modules` folder with
|
||||
the same layout it uses with the global `node_modules` folder. Only your
|
||||
direct dependencies will show in `node_modules` and everything they depend
|
||||
on will be flattened in their `node_modules` folders. This obviously will
|
||||
eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling`
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `legacy-bundling`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Causes npm to install the package such that versions of npm prior to 1.4,
|
||||
such as the one included with node 0.8, can install the package. This
|
||||
eliminates all automatic deduping. If used with `global-style` this option
|
||||
will be preferred.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `strict-peer-deps`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If set to `true`, and `--legacy-peer-deps` is not set, then _any_
|
||||
conflicting `peerDependencies` will be treated as an install failure, even
|
||||
if npm could reasonably guess the appropriate resolution based on non-peer
|
||||
dependency relationships.
|
||||
|
||||
By default, conflicting `peerDependencies` deep in the dependency graph will
|
||||
be resolved using the nearest non-peer dependency specification, even if
|
||||
doing so will result in some packages receiving a peer dependency outside
|
||||
the range set in their package's `peerDependencies` object.
|
||||
|
||||
When such and override is performed, a warning is printed, explaining the
|
||||
conflict and the packages involved. If `--strict-peer-deps` is set, then
|
||||
this warning is treated as a failure.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `package-lock`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
If set to false, then ignore `package-lock.json` files when installing. This
|
||||
will also prevent _writing_ `package-lock.json` if `save` is true.
|
||||
|
||||
When package package-locks are disabled, automatic pruning of extraneous
|
||||
modules will also be disabled. To remove extraneous modules with
|
||||
package-locks disabled use `npm prune`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `omit`
|
||||
|
||||
* Default: 'dev' if the `NODE_ENV` environment variable is set to
|
||||
'production', otherwise empty.
|
||||
* Type: "dev", "optional", or "peer" (can be set multiple times)
|
||||
|
||||
Dependency types to omit from the installation tree on disk.
|
||||
|
||||
Note that these dependencies _are_ still resolved and added to the
|
||||
`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
|
||||
physically installed on disk.
|
||||
|
||||
If a package type appears in both the `--include` and `--omit` lists, then
|
||||
it will be included.
|
||||
|
||||
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
|
||||
variable will be set to `'production'` for all lifecycle scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `audit`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" submit audit reports alongside the current npm command to the
|
||||
default registry and all registries configured for scopes. See the
|
||||
documentation for [`npm audit`](/commands/npm-audit) for details on what is
|
||||
submitted.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `bin-links`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Tells npm to create symlinks (or `.cmd` shims on Windows) for package
|
||||
executables.
|
||||
|
||||
Set to false to have it not do this. This can be used to work around the
|
||||
fact that some file systems don't support symlinks, even on ostensibly Unix
|
||||
systems.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `fund`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
When "true" displays the message at the end of each `npm install`
|
||||
acknowledging the number of dependencies looking for funding. See [`npm
|
||||
fund`](/commands/npm-fund) for details.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `dry-run`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Indicates that you don't want npm to make any changes and that it should
|
||||
only report what it would have done. This can be passed into any of the
|
||||
commands that modify your local installation, eg, `install`, `update`,
|
||||
`dedupe`, `uninstall`, as well as `pack` and `publish`.
|
||||
|
||||
Note: This is NOT honored by other network related commands, eg `dist-tags`,
|
||||
`owner`, etc.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm developers](/using-npm/developers)
|
||||
* [package.json](/configuring-npm/package-json)
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
title: npm-logout
|
||||
section: 1
|
||||
description: Log out of the registry
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm logout [--registry=<url>] [--scope=<@scope>]
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
When logged into a registry that supports token-based authentication, tell
|
||||
the server to end this token's session. This will invalidate the token
|
||||
everywhere you're using it, not just for the current environment.
|
||||
|
||||
When logged into a legacy registry that uses username and password
|
||||
authentication, this will clear the credentials in your user configuration.
|
||||
In this case, it will _only_ affect the current environment.
|
||||
|
||||
If `--scope` is provided, this will find the credentials for the registry
|
||||
connected to that scope, if set.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `scope`
|
||||
|
||||
* Default: the scope of the current project, if any, or ""
|
||||
* Type: String
|
||||
|
||||
Associate an operation with a scope for a scoped registry.
|
||||
|
||||
Useful when logging in to or out of a private registry:
|
||||
|
||||
```
|
||||
# log in, linking the scope to the custom registry
|
||||
npm login --scope=@mycorp --registry=https://registry.mycorp.com
|
||||
|
||||
# log out, removing the link and the auth token
|
||||
npm logout --scope=@mycorp
|
||||
```
|
||||
|
||||
This will cause `@mycorp` to be mapped to the registry for future
|
||||
installation of packages specified according to the pattern
|
||||
`@mycorp/package`.
|
||||
|
||||
This will also cause `npm init` to create a scoped package.
|
||||
|
||||
```
|
||||
# accept all defaults, and create a package named "@foo/whatever",
|
||||
# instead of just named "whatever"
|
||||
npm init --scope=@foo --yes
|
||||
```
|
||||
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm adduser](/commands/npm-adduser)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npm whoami](/commands/npm-whoami)
|
|
@ -0,0 +1,290 @@
|
|||
---
|
||||
title: npm-ls
|
||||
section: 1
|
||||
description: List installed packages
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm ls [[<@scope>/]<pkg> ...]
|
||||
|
||||
aliases: list, la, ll
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command will print to stdout all the versions of packages that are
|
||||
installed, as well as their dependencies when `--all` is specified, in a
|
||||
tree structure.
|
||||
|
||||
Note: to get a "bottoms up" view of why a given package is included in the
|
||||
tree at all, use [`npm explain`](/commands/npm-explain).
|
||||
|
||||
Positional arguments are `name@version-range` identifiers, which will limit
|
||||
the results to only the paths to the packages named. Note that nested
|
||||
packages will *also* show the paths to the specified packages. For
|
||||
example, running `npm ls promzard` in npm's source tree will show:
|
||||
|
||||
```bash
|
||||
npm@@VERSION@ /path/to/npm
|
||||
└─┬ init-package-json@0.0.4
|
||||
└── promzard@0.1.5
|
||||
```
|
||||
|
||||
It will print out extraneous, missing, and invalid packages.
|
||||
|
||||
If a project specifies git urls for dependencies these are shown
|
||||
in parentheses after the name@version to make it easier for users to
|
||||
recognize potential forks of a project.
|
||||
|
||||
The tree shown is the logical dependency tree, based on package
|
||||
dependencies, not the physical layout of your `node_modules` folder.
|
||||
|
||||
When run as `ll` or `la`, it shows extended information by default.
|
||||
|
||||
### Note: Design Changes Pending
|
||||
|
||||
The `npm ls` command's output and behavior made a _ton_ of sense when npm
|
||||
created a `node_modules` folder that naively nested every dependency. In
|
||||
such a case, the logical dependency graph and physical tree of packages on
|
||||
disk would be roughly identical.
|
||||
|
||||
With the advent of automatic install-time deduplication of dependencies in
|
||||
npm v3, the `ls` output was modified to display the logical dependency
|
||||
graph as a tree structure, since this was more useful to most users.
|
||||
However, without using `npm ls -l`, it became impossible show _where_ a
|
||||
package was actually installed much of the time!
|
||||
|
||||
With the advent of automatic installation of `peerDependencies` in npm v7,
|
||||
this gets even more curious, as `peerDependencies` are logically
|
||||
"underneath" their dependents in the dependency graph, but are always
|
||||
physically at or above their location on disk.
|
||||
|
||||
Also, in the years since npm got an `ls` command (in version 0.0.2!),
|
||||
dependency graphs have gotten much larger as a general rule. Therefore, in
|
||||
order to avoid dumping an excessive amount of content to the terminal, `npm
|
||||
ls` now only shows the _top_ level dependencies, unless `--all` is
|
||||
provided.
|
||||
|
||||
A thorough re-examination of the use cases, intention, behavior, and output
|
||||
of this command, is currently underway. Expect significant changes to at
|
||||
least the default human-readable `npm ls` output in npm v8.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `all`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
When running `npm outdated` and `npm ls`, setting `--all` will show all
|
||||
outdated or installed packages, rather than only those directly depended
|
||||
upon by the current project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `long`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Show extended information in `ls`, `search`, and `help-search`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `parseable`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Output parseable results from commands that write to standard output. For
|
||||
`npm search`, this will be tab-separated table format.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `depth`
|
||||
|
||||
* Default: `Infinity` if `--all` is set, otherwise `1`
|
||||
* Type: null or Number
|
||||
|
||||
The depth to go when recursing packages for `npm ls`.
|
||||
|
||||
If not set, `npm ls` will show only the immediate dependencies of the root
|
||||
project. If `--all` is set, then npm will show all dependencies by default.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `omit`
|
||||
|
||||
* Default: 'dev' if the `NODE_ENV` environment variable is set to
|
||||
'production', otherwise empty.
|
||||
* Type: "dev", "optional", or "peer" (can be set multiple times)
|
||||
|
||||
Dependency types to omit from the installation tree on disk.
|
||||
|
||||
Note that these dependencies _are_ still resolved and added to the
|
||||
`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
|
||||
physically installed on disk.
|
||||
|
||||
If a package type appears in both the `--include` and `--omit` lists, then
|
||||
it will be included.
|
||||
|
||||
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
|
||||
variable will be set to `'production'` for all lifecycle scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `link`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Used with `npm ls`, limiting output to only those packages that are linked.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `package-lock-only`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If set to true, the current operation will only use the `package-lock.json`,
|
||||
ignoring `node_modules`.
|
||||
|
||||
For `update` this means only the `package-lock.json` will be updated,
|
||||
instead of checking `node_modules` and downloading dependencies.
|
||||
|
||||
For `list` this means the output will be based on the tree described by the
|
||||
`package-lock.json`, rather than the contents of `node_modules`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `unicode`
|
||||
|
||||
* Default: false on windows, true on mac/unix systems with a unicode locale,
|
||||
as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables.
|
||||
* Type: Boolean
|
||||
|
||||
When set to true, npm uses unicode characters in the tree output. When
|
||||
false, it uses ascii characters instead of unicode glyphs.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm explain](/commands/npm-explain)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm explain](/commands/npm-explain)
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm link](/commands/npm-link)
|
||||
* [npm prune](/commands/npm-prune)
|
||||
* [npm outdated](/commands/npm-outdated)
|
||||
* [npm update](/commands/npm-update)
|
|
@ -0,0 +1,121 @@
|
|||
---
|
||||
title: npm-org
|
||||
section: 1
|
||||
description: Manage orgs
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm org set <orgname> <username> [developer | admin | owner]
|
||||
npm org rm <orgname> <username>
|
||||
npm org ls <orgname> [<username>]
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Example
|
||||
|
||||
Add a new developer to an org:
|
||||
|
||||
```bash
|
||||
$ npm org set my-org @mx-smith
|
||||
```
|
||||
|
||||
Add a new admin to an org (or change a developer to an admin):
|
||||
|
||||
```bash
|
||||
$ npm org set my-org @mx-santos admin
|
||||
```
|
||||
|
||||
Remove a user from an org:
|
||||
|
||||
```bash
|
||||
$ npm org rm my-org mx-santos
|
||||
```
|
||||
|
||||
List all users in an org:
|
||||
|
||||
```bash
|
||||
$ npm org ls my-org
|
||||
```
|
||||
|
||||
List all users in JSON format:
|
||||
|
||||
```bash
|
||||
$ npm org ls my-org --json
|
||||
```
|
||||
|
||||
See what role a user has in an org:
|
||||
|
||||
```bash
|
||||
$ npm org ls my-org @mx-santos
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
You can use the `npm org` commands to manage and view users of an
|
||||
organization. It supports adding and removing users, changing their roles,
|
||||
listing them, and finding specific ones and their roles.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `otp`
|
||||
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
|
||||
This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with `npm access`.
|
||||
|
||||
If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `parseable`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Output parseable results from commands that write to standard output. For
|
||||
`npm search`, this will be tab-separated table format.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [using orgs](/using-npm/orgs)
|
||||
* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/)
|
|
@ -0,0 +1,190 @@
|
|||
---
|
||||
title: npm-outdated
|
||||
section: 1
|
||||
description: Check for outdated packages
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm outdated [[<@scope>/]<pkg> ...]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command will check the registry to see if any (or, specific) installed
|
||||
packages are currently outdated.
|
||||
|
||||
By default, only the direct dependencies of the root project and direct
|
||||
dependencies of your configured *workspaces* are shown.
|
||||
Use `--all` to find all outdated meta-dependencies as well.
|
||||
|
||||
In the output:
|
||||
|
||||
* `wanted` is the maximum version of the package that satisfies the semver
|
||||
range specified in `package.json`. If there's no available semver range
|
||||
(i.e. you're running `npm outdated --global`, or the package isn't
|
||||
included in `package.json`), then `wanted` shows the currently-installed
|
||||
version.
|
||||
* `latest` is the version of the package tagged as latest in the registry.
|
||||
Running `npm publish` with no special configuration will publish the
|
||||
package with a dist-tag of `latest`. This may or may not be the maximum
|
||||
version of the package, or the most-recently published version of the
|
||||
package, depending on how the package's developer manages the latest
|
||||
[dist-tag](/commands/npm-dist-tag).
|
||||
* `location` is where in the physical tree the package is located.
|
||||
* `depended by` shows which package depends on the displayed dependency
|
||||
* `package type` (when using `--long` / `-l`) tells you whether this
|
||||
package is a `dependency` or a dev/peer/optional dependency. Packages not
|
||||
included in `package.json` are always marked `dependencies`.
|
||||
* `homepage` (when using `--long` / `-l`) is the `homepage` value contained
|
||||
in the package's packument
|
||||
* Red means there's a newer version matching your semver requirements, so
|
||||
you should update now.
|
||||
* Yellow indicates that there's a newer version _above_ your semver
|
||||
requirements (usually new major, or new 0.x minor) so proceed with
|
||||
caution.
|
||||
|
||||
### An example
|
||||
|
||||
```bash
|
||||
$ npm outdated
|
||||
Package Current Wanted Latest Location Depended by
|
||||
glob 5.0.15 5.0.15 6.0.1 node_modules/glob dependent-package-name
|
||||
nothingness 0.0.3 git git node_modules/nothingness dependent-package-name
|
||||
npm 3.5.1 3.5.2 3.5.1 node_modules/npm dependent-package-name
|
||||
local-dev 0.0.3 linked linked local-dev dependent-package-name
|
||||
once 1.3.2 1.3.3 1.3.3 node_modules/once dependent-package-name
|
||||
```
|
||||
|
||||
With these `dependencies`:
|
||||
```json
|
||||
{
|
||||
"glob": "^5.0.15",
|
||||
"nothingness": "github:othiym23/nothingness#master",
|
||||
"npm": "^3.5.1",
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
```
|
||||
|
||||
A few things to note:
|
||||
|
||||
* `glob` requires `^5`, which prevents npm from installing `glob@6`, which
|
||||
is outside the semver range.
|
||||
* Git dependencies will always be reinstalled, because of how they're
|
||||
specified. The installed committish might satisfy the dependency
|
||||
specifier (if it's something immutable, like a commit SHA), or it might
|
||||
not, so `npm outdated` and `npm update` have to fetch Git repos to check.
|
||||
This is why currently doing a reinstall of a Git dependency always forces
|
||||
a new clone and install.
|
||||
* `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because
|
||||
npm uses dist-tags to manage its `latest` and `next` release channels.
|
||||
`npm update` will install the _newest_ version, but `npm install npm`
|
||||
(with no semver range) will install whatever's tagged as `latest`.
|
||||
* `once` is just plain out of date. Reinstalling `node_modules` from
|
||||
scratch or running `npm update` will bring it up to spec.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `all`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
When running `npm outdated` and `npm ls`, setting `--all` will show all
|
||||
outdated or installed packages, rather than only those directly depended
|
||||
upon by the current project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `long`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Show extended information in `ls`, `search`, and `help-search`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `parseable`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Output parseable results from commands that write to standard output. For
|
||||
`npm search`, this will be tab-separated table format.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm update](/commands/npm-update)
|
||||
* [npm dist-tag](/commands/npm-dist-tag)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm workspaces](/using-npm/workspaces)
|
|
@ -0,0 +1,74 @@
|
|||
---
|
||||
title: npm-owner
|
||||
section: 1
|
||||
description: Manage package owners
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm owner add <user> [<@scope>/]<pkg>
|
||||
npm owner rm <user> [<@scope>/]<pkg>
|
||||
npm owner ls [<@scope>/]<pkg>
|
||||
|
||||
aliases: author
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Manage ownership of published packages.
|
||||
|
||||
* ls: List all the users who have access to modify a package and push new
|
||||
versions. Handy when you need to know who to bug for help.
|
||||
* add: Add a new user as a maintainer of a package. This user is enabled
|
||||
to modify metadata, publish new versions, and add other owners.
|
||||
* rm: Remove a user from the package owner list. This immediately revokes
|
||||
their privileges.
|
||||
|
||||
Note that there is only one level of access. Either you can modify a package,
|
||||
or you can't. Future versions may contain more fine-grained access levels, but
|
||||
that is not implemented at this time.
|
||||
|
||||
If you have two-factor authentication enabled with `auth-and-writes` (see
|
||||
[`npm-profile`](/commands/npm-profile)) then you'll need to include an otp
|
||||
on the command line when changing ownership with `--otp`.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `otp`
|
||||
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
|
||||
This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with `npm access`.
|
||||
|
||||
If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm profile](/commands/npm-profile)
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm adduser](/commands/npm-adduser)
|
|
@ -0,0 +1,140 @@
|
|||
---
|
||||
title: npm-pack
|
||||
section: 1
|
||||
description: Create a tarball from a package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm pack [[<@scope>/]<pkg>...] [--dry-run] [--json]
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `dry-run`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Indicates that you don't want npm to make any changes and that it should
|
||||
only report what it would have done. This can be passed into any of the
|
||||
commands that modify your local installation, eg, `install`, `update`,
|
||||
`dedupe`, `uninstall`, as well as `pack` and `publish`.
|
||||
|
||||
Note: This is NOT honored by other network related commands, eg `dist-tags`,
|
||||
`owner`, etc.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `pack-destination`
|
||||
|
||||
* Default: "."
|
||||
* Type: String
|
||||
|
||||
Directory in which `npm pack` will save tarballs.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### Description
|
||||
|
||||
For anything that's installable (that is, a package folder, tarball,
|
||||
tarball url, git url, name@tag, name@version, name, or scoped name), this
|
||||
command will fetch it to the cache, copy the tarball to the current working
|
||||
directory as `<name>-<version>.tgz`, and then write the filenames out to
|
||||
stdout.
|
||||
|
||||
If the same package is specified multiple times, then the file will be
|
||||
overwritten the second time.
|
||||
|
||||
If no arguments are supplied, then npm packs the current package folder.
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm-packlist package](http://npm.im/npm-packlist)
|
||||
* [npm cache](/commands/npm-cache)
|
||||
* [npm publish](/commands/npm-publish)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
title: npm-ping
|
||||
section: 1
|
||||
description: Ping npm registry
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm ping [--registry <registry>]
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Ping the configured or given npm registry and verify authentication.
|
||||
If it works it will output something like:
|
||||
|
||||
```bash
|
||||
npm notice PING https://registry.npmjs.org/
|
||||
npm notice PONG 255ms
|
||||
```
|
||||
otherwise you will get an error:
|
||||
```bash
|
||||
npm notice PING http://foo.com/
|
||||
npm ERR! code E404
|
||||
npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm doctor](/commands/npm-doctor)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
|
@ -0,0 +1,266 @@
|
|||
---
|
||||
title: npm-pkg
|
||||
section: 1
|
||||
description: Manages your package.json
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm pkg get [<field> [.<subfield> ...]]
|
||||
npm pkg set <field>=<value> [.<subfield>=<value> ...]
|
||||
npm pkg delete <field> [.<subfield> ...]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
A command that automates the management of `package.json` files.
|
||||
`npm pkg` provide 3 different sub commands that allow you to modify or retrieve
|
||||
values for given object keys in your `package.json`.
|
||||
|
||||
The syntax to retrieve and set fields is a dot separated representation of
|
||||
the nested object properties to be found within your `package.json`, it's the
|
||||
same notation used in [`npm view`](/commands/npm-view) to retrieve information
|
||||
from the registry manifest, below you can find more examples on how to use it.
|
||||
|
||||
Returned values are always in **json** format.
|
||||
|
||||
* `npm pkg get <field>`
|
||||
|
||||
Retrieves a value `key`, defined in your `package.json` file.
|
||||
|
||||
For example, in order to retrieve the name of the current package, you
|
||||
can run:
|
||||
|
||||
```bash
|
||||
npm pkg get name
|
||||
```
|
||||
|
||||
It's also possible to retrieve multiple values at once:
|
||||
|
||||
```bash
|
||||
npm pkg get name version
|
||||
```
|
||||
|
||||
You can view child fields by separating them with a period. To retrieve
|
||||
the value of a test `script` value, you would run the following command:
|
||||
|
||||
```bash
|
||||
npm pkg get scripts.test
|
||||
```
|
||||
|
||||
For fields that are arrays, requesting a non-numeric field will return
|
||||
all of the values from the objects in the list. For example, to get all
|
||||
the contributor emails for a package, you would run:
|
||||
|
||||
```bash
|
||||
npm pkg get contributors.email
|
||||
```
|
||||
|
||||
You may also use numeric indices in square braces to specifically select
|
||||
an item in an array field. To just get the email address of the first
|
||||
contributor in the list, you can run:
|
||||
|
||||
```bash
|
||||
npm pkg get contributors[0].email
|
||||
```
|
||||
|
||||
* `npm pkg set <field>=<value>`
|
||||
|
||||
Sets a `value` in your `package.json` based on the `field` value. When
|
||||
saving to your `package.json` file the same set of rules used during
|
||||
`npm install` and other cli commands that touches the `package.json` file
|
||||
are used, making sure to respect the existing indentation and possibly
|
||||
applying some validation prior to saving values to the file.
|
||||
|
||||
The same syntax used to retrieve values from your package can also be used
|
||||
to define new properties or overriding existing ones, below are some
|
||||
examples of how the dot separated syntax can be used to edit your
|
||||
`package.json` file.
|
||||
|
||||
Defining a new bin named `mynewcommand` in your `package.json` that points
|
||||
to a file `cli.js`:
|
||||
|
||||
```bash
|
||||
npm pkg set bin.mynewcommand=cli.js
|
||||
```
|
||||
|
||||
Setting multiple fields at once is also possible:
|
||||
|
||||
```bash
|
||||
npm pkg set description='Awesome package' engines.node='>=10'
|
||||
```
|
||||
|
||||
It's also possible to add to array values, for example to add a new
|
||||
contributor entry:
|
||||
|
||||
```bash
|
||||
npm pkg set contributors[0].name='Foo' contributors[0].email='foo@bar.ca'
|
||||
```
|
||||
|
||||
You may also append items to the end of an array using the special
|
||||
empty bracket notation:
|
||||
|
||||
```bash
|
||||
npm pkg set contributors[].name='Foo' contributors[].name='Bar'
|
||||
```
|
||||
|
||||
It's also possible to parse values as json prior to saving them to your
|
||||
`package.json` file, for example in order to set a `"private": true`
|
||||
property:
|
||||
|
||||
```bash
|
||||
npm pkg set private=true --json
|
||||
```
|
||||
|
||||
It also enables saving values as numbers:
|
||||
|
||||
```bash
|
||||
npm pkg set tap.timeout=60 --json
|
||||
```
|
||||
|
||||
* `npm pkg delete <key>`
|
||||
|
||||
Deletes a `key` from your `package.json`
|
||||
|
||||
The same syntax used to set values from your package can also be used
|
||||
to remove existing ones. For example, in order to remove a script named
|
||||
build:
|
||||
|
||||
```bash
|
||||
npm pkg delete scripts.build
|
||||
```
|
||||
|
||||
### Workspaces support
|
||||
|
||||
You can set/get/delete items across your configured workspaces by using the
|
||||
`workspace` or `workspaces` config options.
|
||||
|
||||
For example, setting a `funding` value across all configured workspaces
|
||||
of a project:
|
||||
|
||||
```bash
|
||||
npm pkg set funding=https://example.com --ws
|
||||
```
|
||||
|
||||
When using `npm pkg get` to retrieve info from your configured workspaces, the
|
||||
returned result will be in a json format in which top level keys are the
|
||||
names of each workspace, the values of these keys will be the result values
|
||||
returned from each of the configured workspaces, e.g:
|
||||
|
||||
```
|
||||
npm pkg get name version --ws
|
||||
{
|
||||
"a": {
|
||||
"name": "a",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"b": {
|
||||
"name": "b",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `force`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Removes various protections against unfortunate side effects, common
|
||||
mistakes, unnecessary performance degradation, and malicious input.
|
||||
|
||||
* Allow clobbering non-npm files in global installs.
|
||||
* Allow the `npm version` command to work on an unclean git repository.
|
||||
* Allow deleting the cache folder with `npm cache clean`.
|
||||
* Allow installing packages that have an `engines` declaration requiring a
|
||||
different version of npm.
|
||||
* Allow installing packages that have an `engines` declaration requiring a
|
||||
different version of `node`, even if `--engine-strict` is enabled.
|
||||
* Allow `npm audit fix` to install modules outside your stated dependency
|
||||
range (including SemVer-major changes).
|
||||
* Allow unpublishing all versions of a published package.
|
||||
* Allow conflicting peerDependencies to be installed in the root project.
|
||||
* Implicitly set `--yes` during `npm init`.
|
||||
* Allow clobbering existing values in `npm pkg`
|
||||
|
||||
If you don't have a clear idea of what you want to do, it is strongly
|
||||
recommended that you do not use this option!
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
## See Also
|
||||
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm init](/commands/npm-init)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npm set-script](/commands/npm-set-script)
|
||||
* [workspaces](/using-npm/workspaces)
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
title: npm-prefix
|
||||
section: 1
|
||||
description: Display prefix
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm prefix [-g]
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Print the local prefix to standard output. This is the closest parent directory
|
||||
to contain a `package.json` file or `node_modules` directory, unless `-g` is
|
||||
also specified.
|
||||
|
||||
If `-g` is specified, this will be the value of the global prefix. See
|
||||
[`npm config`](/commands/npm-config) for more detail.
|
||||
|
||||
### Example
|
||||
|
||||
```bash
|
||||
npm prefix
|
||||
/usr/local/projects/foo
|
||||
```
|
||||
|
||||
```bash
|
||||
npm prefix -g
|
||||
/usr/local
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm root](/commands/npm-root)
|
||||
* [npm bin](/commands/npm-bin)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
|
@ -0,0 +1,141 @@
|
|||
---
|
||||
title: npm-profile
|
||||
section: 1
|
||||
description: Change settings on your registry profile
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm profile get [--json|--parseable] [<property>]
|
||||
npm profile set [--json|--parseable] <property> <value>
|
||||
npm profile set password
|
||||
npm profile enable-2fa [auth-and-writes|auth-only]
|
||||
npm profile disable-2fa
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Change your profile information on the registry. Note that this command
|
||||
depends on the registry implementation, so third-party registries may not
|
||||
support this interface.
|
||||
|
||||
* `npm profile get [<property>]`: Display all of the properties of your
|
||||
profile, or one or more specific properties. It looks like:
|
||||
|
||||
```bash
|
||||
+-----------------+---------------------------+
|
||||
| name | example |
|
||||
+-----------------+---------------------------+
|
||||
| email | me@example.com (verified) |
|
||||
+-----------------+---------------------------+
|
||||
| two factor auth | auth-and-writes |
|
||||
+-----------------+---------------------------+
|
||||
| fullname | Example User |
|
||||
+-----------------+---------------------------+
|
||||
| homepage | |
|
||||
+-----------------+---------------------------+
|
||||
| freenode | |
|
||||
+-----------------+---------------------------+
|
||||
| twitter | |
|
||||
+-----------------+---------------------------+
|
||||
| github | |
|
||||
+-----------------+---------------------------+
|
||||
| created | 2015-02-26T01:38:35.892Z |
|
||||
+-----------------+---------------------------+
|
||||
| updated | 2017-10-02T21:29:45.922Z |
|
||||
+-----------------+---------------------------+
|
||||
```
|
||||
|
||||
* `npm profile set <property> <value>`: Set the value of a profile
|
||||
property. You can set the following properties this way: email, fullname,
|
||||
homepage, freenode, twitter, github
|
||||
|
||||
* `npm profile set password`: Change your password. This is interactive,
|
||||
you'll be prompted for your current password and a new password. You'll
|
||||
also be prompted for an OTP if you have two-factor authentication
|
||||
enabled.
|
||||
|
||||
* `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor
|
||||
authentication. Defaults to `auth-and-writes` mode. Modes are:
|
||||
* `auth-only`: Require an OTP when logging in or making changes to your
|
||||
account's authentication. The OTP will be required on both the website
|
||||
and the command line.
|
||||
* `auth-and-writes`: Requires an OTP at all the times `auth-only` does,
|
||||
and also requires one when publishing a module, setting the `latest`
|
||||
dist-tag, or changing access via `npm access` and `npm owner`.
|
||||
|
||||
* `npm profile disable-2fa`: Disables two-factor authentication.
|
||||
|
||||
### Details
|
||||
|
||||
Some of these commands may not be available on non npmjs.com registries.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `parseable`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Output parseable results from commands that write to standard output. For
|
||||
`npm search`, this will be tab-separated table format.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `otp`
|
||||
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
|
||||
This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with `npm access`.
|
||||
|
||||
If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm adduser](/commands/npm-adduser)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [npm owner](/commands/npm-owner)
|
||||
* [npm whoami](/commands/npm-whoami)
|
||||
* [npm token](/commands/npm-token)
|
|
@ -0,0 +1,159 @@
|
|||
---
|
||||
title: npm-prune
|
||||
section: 1
|
||||
description: Remove extraneous packages
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm prune [[<@scope>/]<pkg>...] [--production] [--dry-run] [--json]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command removes "extraneous" packages. If a package name is provided,
|
||||
then only packages matching one of the supplied names are removed.
|
||||
|
||||
Extraneous packages are those present in the `node_modules` folder that are
|
||||
not listed as any package's dependency list.
|
||||
|
||||
If the `--production` flag is specified or the `NODE_ENV` environment
|
||||
variable is set to `production`, this command will remove the packages
|
||||
specified in your `devDependencies`. Setting `--no-production` will negate
|
||||
`NODE_ENV` being set to `production`.
|
||||
|
||||
If the `--dry-run` flag is used then no changes will actually be made.
|
||||
|
||||
If the `--json` flag is used, then the changes `npm prune` made (or would
|
||||
have made with `--dry-run`) are printed as a JSON object.
|
||||
|
||||
In normal operation, extraneous modules are pruned automatically, so you'll
|
||||
only need this command with the `--production` flag. However, in the real
|
||||
world, operation is not always "normal". When crashes or mistakes happen,
|
||||
this command can help clean up any resulting garbage.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `omit`
|
||||
|
||||
* Default: 'dev' if the `NODE_ENV` environment variable is set to
|
||||
'production', otherwise empty.
|
||||
* Type: "dev", "optional", or "peer" (can be set multiple times)
|
||||
|
||||
Dependency types to omit from the installation tree on disk.
|
||||
|
||||
Note that these dependencies _are_ still resolved and added to the
|
||||
`package-lock.json` or `npm-shrinkwrap.json` file. They are just not
|
||||
physically installed on disk.
|
||||
|
||||
If a package type appears in both the `--include` and `--omit` lists, then
|
||||
it will be included.
|
||||
|
||||
If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment
|
||||
variable will be set to `'production'` for all lifecycle scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `dry-run`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Indicates that you don't want npm to make any changes and that it should
|
||||
only report what it would have done. This can be passed into any of the
|
||||
commands that modify your local installation, eg, `install`, `update`,
|
||||
`dedupe`, `uninstall`, as well as `pack` and `publish`.
|
||||
|
||||
Note: This is NOT honored by other network related commands, eg `dist-tags`,
|
||||
`owner`, etc.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm uninstall](/commands/npm-uninstall)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm ls](/commands/npm-ls)
|
|
@ -0,0 +1,250 @@
|
|||
---
|
||||
title: npm-publish
|
||||
section: 1
|
||||
description: Publish a package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run]
|
||||
|
||||
Publishes '.' if no argument supplied
|
||||
Sets tag 'latest' if no --tag specified
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
Publishes a package to the registry so that it can be installed by name.
|
||||
|
||||
By default npm will publish to the public registry. This can be overridden
|
||||
by specifying a different default registry or using a
|
||||
[`scope`](/using-npm/scope) in the name (see
|
||||
[`package.json`](/configuring-npm/package-json)).
|
||||
|
||||
* `<folder>`: A folder containing a package.json file
|
||||
|
||||
* `<tarball>`: A url or file path to a gzipped tar archive containing a
|
||||
single folder with a package.json file inside.
|
||||
|
||||
* `[--tag <tag>]`: Registers the published package with the given tag, such
|
||||
that `npm install <name>@<tag>` will install this version. By default,
|
||||
`npm publish` updates and `npm install` installs the `latest` tag. See
|
||||
[`npm-dist-tag`](npm-dist-tag) for details about tags.
|
||||
|
||||
* `[--access <public|restricted>]`: Tells the registry whether this package
|
||||
should be published as public or restricted. Only applies to scoped
|
||||
packages, which default to `restricted`. If you don't have a paid
|
||||
account, you must publish with `--access public` to publish scoped
|
||||
packages.
|
||||
|
||||
* `[--otp <otpcode>]`: If you have two-factor authentication enabled in
|
||||
`auth-and-writes` mode then you can provide a code from your
|
||||
authenticator with this. If you don't include this and you're running
|
||||
from a TTY then you'll be prompted.
|
||||
|
||||
* `[--dry-run]`: As of `npm@6`, does everything publish would do except
|
||||
actually publishing to the registry. Reports the details of what would
|
||||
have been published.
|
||||
|
||||
* `[--workspaces]`: Enables workspace context while publishing. All
|
||||
workspace packages will be published.
|
||||
|
||||
* `[--workspace]`: Enables workspaces context and limits results to only
|
||||
those specified by this config item. Only the packages in the
|
||||
workspaces given will be published.
|
||||
|
||||
The publish will fail if the package name and version combination already
|
||||
exists in the specified registry.
|
||||
|
||||
Once a package is published with a given name and version, that specific
|
||||
name and version combination can never be used again, even if it is removed
|
||||
with [`npm unpublish`](/commands/npm-unpublish).
|
||||
|
||||
As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the
|
||||
tarball will be submitted to the registry during publication. Subsequent
|
||||
installs will use the strongest supported algorithm to verify downloads.
|
||||
|
||||
Similar to `--dry-run` see [`npm pack`](/commands/npm-pack), which figures
|
||||
out the files to be included and packs them into a tarball to be uploaded
|
||||
to the registry.
|
||||
|
||||
### Files included in package
|
||||
|
||||
To see what will be included in your package, run `npx npm-packlist`. All
|
||||
files are included by default, with the following exceptions:
|
||||
|
||||
- Certain files that are relevant to package installation and distribution
|
||||
are always included. For example, `package.json`, `README.md`,
|
||||
`LICENSE`, and so on.
|
||||
|
||||
- If there is a "files" list in
|
||||
[`package.json`](/configuring-npm/package-json), then only the files
|
||||
specified will be included. (If directories are specified, then they
|
||||
will be walked recursively and their contents included, subject to the
|
||||
same ignore rules.)
|
||||
|
||||
- If there is a `.gitignore` or `.npmignore` file, then ignored files in
|
||||
that and all child directories will be excluded from the package. If
|
||||
_both_ files exist, then the `.gitignore` is ignored, and only the
|
||||
`.npmignore` is used.
|
||||
|
||||
`.npmignore` files follow the [same pattern
|
||||
rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring)
|
||||
as `.gitignore` files
|
||||
|
||||
- If the file matches certain patterns, then it will _never_ be included,
|
||||
unless explicitly added to the `"files"` list in `package.json`, or
|
||||
un-ignored with a `!` rule in a `.npmignore` or `.gitignore` file.
|
||||
|
||||
- Symbolic links are never included in npm packages.
|
||||
|
||||
|
||||
See [`developers`](/using-npm/developers) for full details on what's
|
||||
included in the published package, as well as details on how the package is
|
||||
built.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `tag`
|
||||
|
||||
* Default: "latest"
|
||||
* Type: String
|
||||
|
||||
If you ask npm to install a package and don't tell it a specific version,
|
||||
then it will install the specified tag.
|
||||
|
||||
Also the tag that is added to the package@version specified by the `npm tag`
|
||||
command, if no explicit tag is given.
|
||||
|
||||
When used by the `npm diff` command, this is the tag used to fetch the
|
||||
tarball that will be compared with the local files by default.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `access`
|
||||
|
||||
* Default: 'restricted' for scoped packages, 'public' for unscoped packages
|
||||
* Type: null, "restricted", or "public"
|
||||
|
||||
When publishing scoped packages, the access level defaults to `restricted`.
|
||||
If you want your scoped package to be publicly viewable (and installable)
|
||||
set `--access=public`. The only valid values for `access` are `public` and
|
||||
`restricted`. Unscoped packages _always_ have an access level of `public`.
|
||||
|
||||
Note: Using the `--access` flag on the `npm publish` command will only set
|
||||
the package access level on the initial publish of the package. Any
|
||||
subsequent `npm publish` commands using the `--access` flag will not have an
|
||||
effect to the access level. To make changes to the access level after the
|
||||
initial publish use `npm access`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `dry-run`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Indicates that you don't want npm to make any changes and that it should
|
||||
only report what it would have done. This can be passed into any of the
|
||||
commands that modify your local installation, eg, `install`, `update`,
|
||||
`dedupe`, `uninstall`, as well as `pack` and `publish`.
|
||||
|
||||
Note: This is NOT honored by other network related commands, eg `dist-tags`,
|
||||
`owner`, etc.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `otp`
|
||||
|
||||
* Default: null
|
||||
* Type: null or String
|
||||
|
||||
This is a one-time password from a two-factor authenticator. It's needed
|
||||
when publishing or changing package permissions with `npm access`.
|
||||
|
||||
If not set, and a registry response fails with a challenge for a one-time
|
||||
password, npm will prompt on the command line for one.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm-packlist package](http://npm.im/npm-packlist)
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm scope](/using-npm/scope)
|
||||
* [npm adduser](/commands/npm-adduser)
|
||||
* [npm owner](/commands/npm-owner)
|
||||
* [npm deprecate](/commands/npm-deprecate)
|
||||
* [npm dist-tag](/commands/npm-dist-tag)
|
||||
* [npm pack](/commands/npm-pack)
|
||||
* [npm profile](/commands/npm-profile)
|
|
@ -0,0 +1,143 @@
|
|||
---
|
||||
title: npm-rebuild
|
||||
section: 1
|
||||
description: Rebuild a package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm rebuild [[<@scope>/]<name>[@<version>] ...]
|
||||
|
||||
alias: rb
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
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. It is also useful when installing with
|
||||
`--ignore-scripts` and `--no-bin-links`, to explicitly choose which
|
||||
packages to build and/or link bins.
|
||||
|
||||
If one or more package names (and optionally version ranges) are provided,
|
||||
then only packages with a name and version matching one of the specifiers
|
||||
will be rebuilt.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `bin-links`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Tells npm to create symlinks (or `.cmd` shims on Windows) for package
|
||||
executables.
|
||||
|
||||
Set to false to have it not do this. This can be used to work around the
|
||||
fact that some file systems don't support symlinks, even on ostensibly Unix
|
||||
systems.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm install](/commands/npm-install)
|
|
@ -0,0 +1,105 @@
|
|||
---
|
||||
title: npm-repo
|
||||
section: 1
|
||||
description: Open package repository page in the browser
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm repo [<pkgname> [<pkgname> ...]]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This command tries to guess at the likely location of a package's
|
||||
repository URL, and then tries to open it using the `--browser` config
|
||||
param. If no package name is provided, it will search for a `package.json`
|
||||
in the current folder and use the `repository` property.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `browser`
|
||||
|
||||
* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
|
||||
* Type: null, Boolean, or String
|
||||
|
||||
The browser that is called by npm commands to open websites.
|
||||
|
||||
Set to `false` to suppress browser behavior and instead print urls to
|
||||
terminal.
|
||||
|
||||
Set to `true` to use default system URL opener.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm docs](/commands/npm-docs)
|
||||
* [npm config](/commands/npm-config)
|
|
@ -0,0 +1,77 @@
|
|||
---
|
||||
title: npm-restart
|
||||
section: 1
|
||||
description: Restart a package
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm restart [-- <args>]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This restarts a project. It is equivalent to running `npm run-script
|
||||
restart`.
|
||||
|
||||
If the current project has a `"restart"` script specified in
|
||||
`package.json`, then the following scripts will be run:
|
||||
|
||||
1. prerestart
|
||||
2. restart
|
||||
3. postrestart
|
||||
|
||||
If it does _not_ have a `"restart"` script specified, but it does have
|
||||
`stop` and/or `start` scripts, then the following scripts will be run:
|
||||
|
||||
1. prerestart
|
||||
2. prestop
|
||||
3. stop
|
||||
4. poststop
|
||||
6. prestart
|
||||
7. start
|
||||
8. poststart
|
||||
9. postrestart
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `script-shell`
|
||||
|
||||
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
|
||||
* Type: null or String
|
||||
|
||||
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
|
||||
init <pkg>` commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm run-script](/commands/npm-run-script)
|
||||
* [npm scripts](/using-npm/scripts)
|
||||
* [npm test](/commands/npm-test)
|
||||
* [npm start](/commands/npm-start)
|
||||
* [npm stop](/commands/npm-stop)
|
||||
* [npm restart](/commands/npm-restart)
|
|
@ -0,0 +1,56 @@
|
|||
---
|
||||
title: npm-root
|
||||
section: 1
|
||||
description: Display npm root
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm root [-g]
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
Print the effective `node_modules` folder to standard out.
|
||||
|
||||
Useful for using npm in shell scripts that do things with the
|
||||
`node_modules` folder. For example:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
global_node_modules="$(npm root --global)"
|
||||
echo "Global packages installed in: ${global_node_modules}"
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `global`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Operates in "global" mode, so that packages are installed into the `prefix`
|
||||
folder instead of the current working directory. See
|
||||
[folders](/configuring-npm/folders) for more on the differences in behavior.
|
||||
|
||||
* packages are installed into the `{prefix}/lib/node_modules` folder, instead
|
||||
of the current working directory.
|
||||
* bin files are linked to `{prefix}/bin`
|
||||
* man pages are linked to `{prefix}/share/man`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm prefix](/commands/npm-prefix)
|
||||
* [npm bin](/commands/npm-bin)
|
||||
* [npm folders](/configuring-npm/folders)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
|
@ -0,0 +1,253 @@
|
|||
---
|
||||
title: npm-run-script
|
||||
section: 1
|
||||
description: Run arbitrary package scripts
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm run-script <command> [--if-present] [--silent] [-- <args>]
|
||||
npm run-script <command> [--workspace=<workspace-name>]
|
||||
npm run-script <command> [--workspaces]
|
||||
|
||||
aliases: run, rum, urn
|
||||
```
|
||||
|
||||
### Description
|
||||
|
||||
This runs an arbitrary command from a package's `"scripts"` object. If no
|
||||
`"command"` is provided, it will list the available scripts.
|
||||
|
||||
`run[-script]` is used by the test, start, restart, and stop commands, but
|
||||
can be called directly, as well. When the scripts in the package are
|
||||
printed out, they're separated into lifecycle (test, start, restart) and
|
||||
directly-run scripts.
|
||||
|
||||
Any positional arguments are passed to the specified script. Use `--` to
|
||||
pass `-`-prefixed flags and options which would otherwise be parsed by npm.
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
npm run test -- --grep="pattern"
|
||||
```
|
||||
|
||||
The arguments will only be passed to the script specified after `npm run`
|
||||
and not to any `pre` or `post` script.
|
||||
|
||||
The `env` script is a special built-in command that can be used to list
|
||||
environment variables that will be available to the script at runtime. If an
|
||||
"env" command is defined in your package, it will take precedence over the
|
||||
built-in.
|
||||
|
||||
In addition to the shell's pre-existing `PATH`, `npm run` adds
|
||||
`node_modules/.bin` to the `PATH` provided to scripts. Any binaries
|
||||
provided by locally-installed dependencies can be used without the
|
||||
`node_modules/.bin` prefix. For example, if there is a `devDependency` on
|
||||
`tap` in your package, you should write:
|
||||
|
||||
```bash
|
||||
"scripts": {"test": "tap test/*.js"}
|
||||
```
|
||||
|
||||
instead of
|
||||
|
||||
```bash
|
||||
"scripts": {"test": "node_modules/.bin/tap test/*.js"}
|
||||
```
|
||||
|
||||
The actual shell your script is run within is platform dependent. By default,
|
||||
on Unix-like systems it is the `/bin/sh` command, on Windows it is
|
||||
`cmd.exe`.
|
||||
The actual shell referred to by `/bin/sh` also depends on the system.
|
||||
You can customize the shell with the `script-shell` configuration.
|
||||
|
||||
Scripts are run from the root of the package folder, regardless of what the
|
||||
current working directory is when `npm run` is called. If you want your
|
||||
script to use different behavior based on what subdirectory you're in, you
|
||||
can use the `INIT_CWD` environment variable, which holds the full path you
|
||||
were in when you ran `npm run`.
|
||||
|
||||
`npm run` sets the `NODE` environment variable to the `node` executable
|
||||
with which `npm` is executed.
|
||||
|
||||
If you try to run a script without having a `node_modules` directory and it
|
||||
fails, you will be given a warning to run `npm install`, just in case you've
|
||||
forgotten.
|
||||
|
||||
### Workspaces support
|
||||
|
||||
You may use the `workspace` or `workspaces` configs in order to run an
|
||||
arbitrary command from a package's `"scripts"` object in the context of the
|
||||
specified workspaces. If no `"command"` is provided, it will list the available
|
||||
scripts for each of these configured workspaces.
|
||||
|
||||
Given a project with configured workspaces, e.g:
|
||||
|
||||
```
|
||||
.
|
||||
+-- package.json
|
||||
`-- packages
|
||||
+-- a
|
||||
| `-- package.json
|
||||
+-- b
|
||||
| `-- package.json
|
||||
`-- c
|
||||
`-- package.json
|
||||
```
|
||||
|
||||
Assuming the workspace configuration is properly set up at the root level
|
||||
`package.json` file. e.g:
|
||||
|
||||
```
|
||||
{
|
||||
"workspaces": [ "./packages/*" ]
|
||||
}
|
||||
```
|
||||
|
||||
And that each of the configured workspaces has a configured `test` script,
|
||||
we can run tests in all of them using the `workspaces` config:
|
||||
|
||||
```
|
||||
npm test --workspaces
|
||||
```
|
||||
|
||||
#### Filtering workspaces
|
||||
|
||||
It's also possible to run a script in a single workspace using the `workspace`
|
||||
config along with a name or directory path:
|
||||
|
||||
```
|
||||
npm test --workspace=a
|
||||
```
|
||||
|
||||
The `workspace` config can also be specified multiple times in order to run a
|
||||
specific script in the context of multiple workspaces. When defining values for
|
||||
the `workspace` config in the command line, it also possible to use `-w` as a
|
||||
shorthand, e.g:
|
||||
|
||||
```
|
||||
npm test -w a -w b
|
||||
```
|
||||
|
||||
This last command will run `test` in both `./packages/a` and `./packages/b`
|
||||
packages.
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `if-present`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm will not exit with an error code when `run-script` is invoked
|
||||
for a script that isn't defined in the `scripts` section of `package.json`.
|
||||
This option can be used when it's desirable to optionally run a script when
|
||||
it's present and fail if the script fails. This is useful, for example, when
|
||||
running scripts that may only apply for some builds in an otherwise generic
|
||||
CI setup.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `ignore-scripts`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, npm does not run scripts specified in package.json files.
|
||||
|
||||
Note that commands explicitly intended to run a particular script, such as
|
||||
`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
|
||||
will still run their intended script if `ignore-scripts` is set, but they
|
||||
will *not* run any pre- or post-scripts.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `script-shell`
|
||||
|
||||
* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
|
||||
* Type: null or String
|
||||
|
||||
The shell to use for scripts run with the `npm exec`, `npm run` and `npm
|
||||
init <pkg>` commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm scripts](/using-npm/scripts)
|
||||
* [npm test](/commands/npm-test)
|
||||
* [npm start](/commands/npm-start)
|
||||
* [npm restart](/commands/npm-restart)
|
||||
* [npm stop](/commands/npm-stop)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npm workspaces](/using-npm/workspaces)
|
|
@ -0,0 +1,175 @@
|
|||
---
|
||||
title: npm-search
|
||||
section: 1
|
||||
description: Search for packages
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
|
||||
```bash
|
||||
npm search [-l|--long] [--json] [--parseable] [--no-description] [search terms ...]
|
||||
|
||||
aliases: s, se, find
|
||||
```
|
||||
|
||||
Note: This command is unaware of workspaces.
|
||||
|
||||
### Description
|
||||
|
||||
Search the registry for packages matching the search terms. `npm search`
|
||||
performs a linear, incremental, lexically-ordered search through package
|
||||
metadata for all files in the registry. If your terminal has color
|
||||
support, it will further highlight the matches in the results. This can
|
||||
be disabled with the config item `color`
|
||||
|
||||
Additionally, using the `--searchopts` and `--searchexclude` options
|
||||
paired with more search terms will include and exclude further patterns.
|
||||
The main difference between `--searchopts` and the standard search terms
|
||||
is that the former does not highlight results in the output and you can
|
||||
use them more fine-grained filtering. Additionally, you can add both of
|
||||
these to your config to change default search filtering behavior.
|
||||
|
||||
Search also allows targeting of maintainers in search results, by prefixing
|
||||
their npm username with `=`.
|
||||
|
||||
If a term starts with `/`, then it's interpreted as a regular expression
|
||||
and supports standard JavaScript RegExp syntax. In this case search will
|
||||
ignore a trailing `/` . (Note you must escape or quote many regular
|
||||
expression characters in most shells.)
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `long`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Show extended information in `ls`, `search`, and `help-search`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `json`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Whether or not to output JSON data, rather than the normal output.
|
||||
|
||||
* In `npm pkg set` it enables parsing set values with JSON.parse() before
|
||||
saving them to your `package.json`.
|
||||
|
||||
Not supported by all npm commands.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `color`
|
||||
|
||||
* Default: true unless the NO_COLOR environ is set to something other than '0'
|
||||
* Type: "always" or Boolean
|
||||
|
||||
If false, never shows colors. If `"always"` then always shows colors. If
|
||||
true, then only prints color codes for tty file descriptors.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `parseable`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Output parseable results from commands that write to standard output. For
|
||||
`npm search`, this will be tab-separated table format.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `description`
|
||||
|
||||
* Default: true
|
||||
* Type: Boolean
|
||||
|
||||
Show the description in `npm search`
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `searchopts`
|
||||
|
||||
* Default: ""
|
||||
* Type: String
|
||||
|
||||
Space-separated options that are always passed to search.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `searchexclude`
|
||||
|
||||
* Default: ""
|
||||
* Type: String
|
||||
|
||||
Space-separated options that limit the results from search.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `registry`
|
||||
|
||||
* Default: "https://registry.npmjs.org/"
|
||||
* Type: URL
|
||||
|
||||
The base URL of the npm registry.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `prefer-online`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, staleness checks for cached data will be forced, making the CLI
|
||||
look for updates immediately even for fresh package data.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `prefer-offline`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
If true, staleness checks for cached data will be bypassed, but missing data
|
||||
will be requested from the server. To force full offline mode, use
|
||||
`--offline`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `offline`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Force offline mode: no network requests will be done during install. To
|
||||
allow the CLI to fill in missing cache data, see `--prefer-offline`.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm registry](/using-npm/registry)
|
||||
* [npm config](/commands/npm-config)
|
||||
* [npmrc](/configuring-npm/npmrc)
|
||||
* [npm view](/commands/npm-view)
|
||||
* [npm cache](/commands/npm-cache)
|
||||
* https://npm.im/npm-registry-fetch
|
|
@ -0,0 +1,101 @@
|
|||
---
|
||||
title: npm-set-script
|
||||
section: 1
|
||||
description: Set tasks in the scripts section of package.json
|
||||
---
|
||||
|
||||
### Synopsis
|
||||
An npm command that lets you create a task in the `scripts` section of the `package.json`.
|
||||
|
||||
```bash
|
||||
npm set-script [<script>] [<command>]
|
||||
```
|
||||
|
||||
|
||||
**Example:**
|
||||
|
||||
* `npm set-script start "http-server ."`
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "my-project",
|
||||
"scripts": {
|
||||
"start": "http-server .",
|
||||
"test": "some existing value"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
#### `workspace`
|
||||
|
||||
* Default:
|
||||
* Type: String (can be set multiple times)
|
||||
|
||||
Enable running a command in the context of the configured workspaces of the
|
||||
current project while filtering by running only the workspaces defined by
|
||||
this configuration option.
|
||||
|
||||
Valid values for the `workspace` config are either:
|
||||
|
||||
* Workspace names
|
||||
* Path to a workspace directory
|
||||
* Path to a parent workspace directory (will result in selecting all
|
||||
workspaces within that folder)
|
||||
|
||||
When set for the `npm init` command, this may be set to the folder of a
|
||||
workspace which does not yet exist, to create the folder and set it up as a
|
||||
brand new workspace within the project.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `workspaces`
|
||||
|
||||
* Default: null
|
||||
* Type: null or Boolean
|
||||
|
||||
Set to true to run the command in the context of **all** configured
|
||||
workspaces.
|
||||
|
||||
Explicitly setting this to false will cause commands like `install` to
|
||||
ignore workspaces altogether. When not set explicitly:
|
||||
|
||||
- Commands that operate on the `node_modules` tree (install, update, etc.)
|
||||
will link workspaces into the `node_modules` folder. - Commands that do
|
||||
other things (test, exec, publish, etc.) will operate on the root project,
|
||||
_unless_ one or more workspaces are specified in the `workspace` config.
|
||||
|
||||
This value is not exported to the environment for child processes.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
#### `include-workspace-root`
|
||||
|
||||
* Default: false
|
||||
* Type: Boolean
|
||||
|
||||
Include the workspace root when workspaces are enabled for a command.
|
||||
|
||||
When false, specifying individual workspaces via the `workspace` config, or
|
||||
all workspaces via the `workspaces` flag, will cause npm to operate only on
|
||||
the specified workspaces, and not on the root project.
|
||||
|
||||
<!-- automatically generated, do not edit manually -->
|
||||
<!-- see lib/utils/config/definitions.js -->
|
||||
|
||||
<!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
|
||||
|
||||
### See Also
|
||||
|
||||
* [npm run-script](/commands/npm-run-script)
|
||||
* [npm install](/commands/npm-install)
|
||||
* [npm test](/commands/npm-test)
|
||||
* [npm start](/commands/npm-start)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue