diff --git a/.eslintrc.js b/.eslintrc.js index 31b95fcf131..5645cd25674 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,21 +1,27 @@ -/* This file is automatically added by @npmcli/template-oss. Do not edit. */ - -'use strict' - -const { readdirSync: readdir } = require('fs') - -const localConfigs = readdir(__dirname) - .filter((file) => file.startsWith('.eslintrc.local.')) - .map((file) => `./${file}`) - module.exports = { root: true, - ignorePatterns: [ - 'cli/**', - 'theme/**', - ], + ignorePatterns: ['cli/', '.cache/', 'public/'], extends: [ - '@npmcli', - ...localConfigs, + 'react-app', + // 'react-app/jest', + 'eslint:recommended', + 'plugin:react/recommended', + 'plugin:github/react', + 'plugin:primer-react/recommended', + 'plugin:react-hooks/recommended', + 'plugin:import/recommended', + 'prettier', + ], + rules: { + 'react/prop-types': 'off', + 'primer-react/no-system-props': ['error', {includeUtilityComponents: true}], + }, + overrides: [ + { + files: ['src/shared.js'], + rules: { + 'react/no-unescaped-entities': 'off', + }, + }, ], } diff --git a/.eslintrc.local.js b/.eslintrc.local.js deleted file mode 100644 index 3d2a12f6eeb..00000000000 --- a/.eslintrc.local.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = { - extends: [ - 'plugin:github/react', - 'plugin:primer-react/recommended', - ], - overrides: [{ - files: ['src/**'], - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - sourceType: 'module', - }, - env: { - commonjs: true, - es2022: true, - browser: true, - node: false, - }, - rules: { - 'max-len': 'off', - 'import/no-extraneous-dependencies': 'off', - 'no-unused-vars': 'off', - }, - }], -} diff --git a/.github/workflows/ci-theme.yml b/.github/workflows/ci-theme.yml deleted file mode 100644 index 93d23570bbc..00000000000 --- a/.github/workflows/ci-theme.yml +++ /dev/null @@ -1,175 +0,0 @@ -# This file is automatically added by @npmcli/template-oss. Do not edit. - -name: CI - theme - -on: - workflow_dispatch: - pull_request: - paths: - - theme/** - push: - branches: - - main - paths: - - theme/** - schedule: - # "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1 - - cron: "0 9 * * 1" - -jobs: - lint: - name: Lint - if: github.repository_owner == 'npm' - runs-on: ubuntu-latest - defaults: - run: - shell: bash - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Git User - run: | - git config --global user.email "npm-cli+bot@github.com" - git config --global user.name "npm CLI robot" - - name: Setup Node - uses: actions/setup-node@v3 - id: node - with: - node-version: 18.x - check-latest: contains('18.x', '.x') - cache: npm - - # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows - - name: Update Windows npm - if: | - matrix.platform.os == 'windows-latest' && ( - startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.') - ) - run: | - curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz - tar xf npm-7.5.4.tgz - cd package - node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz - cd .. - rmdir /s /q package - - # Start on Node 10 because we dont test on anything lower - - name: Install npm@7 on Node 10 - shell: bash - if: startsWith(steps.node.outputs.node-version, 'v10.') - id: npm-7 - run: | - npm i --prefer-online --no-fund --no-audit -g npm@7 - echo "updated=true" >> "$GITHUB_OUTPUT" - - - name: Install npm@8 on Node 12 - shell: bash - if: startsWith(steps.node.outputs.node-version, 'v12.') - id: npm-8 - run: | - npm i --prefer-online --no-fund --no-audit -g npm@8 - echo "updated=true" >> "$GITHUB_OUTPUT" - - - name: Install npm@9 on Node 14/16/18.0 - shell: bash - if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.') - id: npm-9 - run: | - npm i --prefer-online --no-fund --no-audit -g npm@9 - echo "updated=true" >> "$GITHUB_OUTPUT" - - - name: Install npm@latest on Node - if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }} - run: npm i --prefer-online --no-fund --no-audit -g npm@latest - - - name: npm Version - run: npm -v - - name: Install Dependencies - run: npm i --no-audit --no-fund - - name: Lint - run: npm run lint --ignore-scripts -w theme - - name: Post Lint - run: npm run postlint --ignore-scripts -w theme - - test: - name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} - if: github.repository_owner == 'npm' - strategy: - fail-fast: false - matrix: - platform: - - name: Linux - os: ubuntu-latest - shell: bash - node-version: - - 18.x - runs-on: ${{ matrix.platform.os }} - defaults: - run: - shell: ${{ matrix.platform.shell }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Git User - run: | - git config --global user.email "npm-cli+bot@github.com" - git config --global user.name "npm CLI robot" - - name: Setup Node - uses: actions/setup-node@v3 - id: node - with: - node-version: ${{ matrix.node-version }} - check-latest: contains(matrix.node-version, '.x') - cache: npm - - # node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows - - name: Update Windows npm - if: | - matrix.platform.os == 'windows-latest' && ( - startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.') - ) - run: | - curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz - tar xf npm-7.5.4.tgz - cd package - node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz - cd .. - rmdir /s /q package - - # Start on Node 10 because we dont test on anything lower - - name: Install npm@7 on Node 10 - shell: bash - if: startsWith(steps.node.outputs.node-version, 'v10.') - id: npm-7 - run: | - npm i --prefer-online --no-fund --no-audit -g npm@7 - echo "updated=true" >> "$GITHUB_OUTPUT" - - - name: Install npm@8 on Node 12 - shell: bash - if: startsWith(steps.node.outputs.node-version, 'v12.') - id: npm-8 - run: | - npm i --prefer-online --no-fund --no-audit -g npm@8 - echo "updated=true" >> "$GITHUB_OUTPUT" - - - name: Install npm@9 on Node 14/16/18.0 - shell: bash - if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.') - id: npm-9 - run: | - npm i --prefer-online --no-fund --no-audit -g npm@9 - echo "updated=true" >> "$GITHUB_OUTPUT" - - - name: Install npm@latest on Node - if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }} - run: npm i --prefer-online --no-fund --no-audit -g npm@latest - - - name: npm Version - run: npm -v - - name: Install Dependencies - run: npm i --no-audit --no-fund - - name: Add Problem Matcher - run: echo "::add-matcher::.github/matchers/tap.json" - - name: Test - run: npm test --ignore-scripts -w theme diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0816f4ccf94..849612835f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,13 +7,11 @@ on: pull_request: paths-ignore: - cli/** - - theme/** push: branches: - main paths-ignore: - cli/** - - theme/** schedule: # "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1 - cron: "0 9 * * 1" diff --git a/.gitignore b/.gitignore index aa927ae0804..5b2679dce33 100644 --- a/.gitignore +++ b/.gitignore @@ -12,9 +12,10 @@ !/.gitignore !/.npmrc !/.nvmrc +!/.prettierignore +!/.prettierrc.js !/.release-please-manifest.json !/.reuse/ -!/*.md !/bin/ !/CHANGELOG* !/CODE_OF_CONDUCT.md @@ -23,6 +24,7 @@ !/CONTRIBUTING.md !/docs/ !/gatsby-*.js +!/jest*.js !/lib/ !/LICENSE* !/map.js @@ -32,9 +34,8 @@ !/release-please-config.json !/scripts/ !/SECURITY.md -!/src/ +!/src !/static/ !/tap-snapshots/ !/test/ !/cli/ -!/theme/ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..bc11f8d622a --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +**/template-oss/*.json +**/template-oss/*.yml +content/ +cli/ +.github/ +package-lock.json +SECURITY.md +.reuse/ diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 00000000000..6debca1c437 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,6 @@ +const config = require('@github/prettier-config') + +module.exports = { + ...config, + proseWrap: 'never', +} diff --git a/.reuse/dep5 b/.reuse/dep5 index 375d6563094..7f82b3864f3 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -7,6 +7,6 @@ Files: content/* static/* Copyright: 2020 GitHub License: CC-BY-4.0 -Files: scripts/* cli/* theme/* src/* .github/* *.md *.js *.json .npmrc .gitignore .nvmrc +Files: scripts/* cli/* theme/* src/* .github/* *.md *.js *.json .* Copyright: 2020 GitHub License: MIT diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index e38a947239a..057b269445a 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -10,20 +10,20 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall community +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, without their explicit permission -* Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +- The use of sexualized language or imagery, and sexual attention or advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission +- Contacting individual members, contributors, or leaders privately, outside designated community mechanisms, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -65,7 +65,7 @@ Community leaders will follow these Community Impact Guidelines in determining t ### 4. Permanent Ban -**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. @@ -78,4 +78,3 @@ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcem [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at . Translations are available at . - diff --git a/CONTENT-MODEL.md b/CONTENT-MODEL.md index cd4c1334faa..165eb7e1b61 100644 --- a/CONTENT-MODEL.md +++ b/CONTENT-MODEL.md @@ -1,32 +1,38 @@ # Content model + ## Introduction -This content model explains the goals of content in the npm docs, and what to include when you're writing or updating an article. We use a model to ensure that our content consistently, clearly, and comprehensively communicates what people need to achieve their goals with npm. -Following a content model creates consistency that helps users and maintainers of the docs. + +This content model explains the goals of content in the npm docs, and what to include when you're writing or updating an article. We use a model to ensure that our content consistently, clearly, and comprehensively communicates what people need to achieve their goals with npm. Following a content model creates consistency that helps users and maintainers of the docs. For style questions, default to https://github.com/github/docs-internal/blob/main/contributing/content-style-guide.md ## Content structure + Docs are grouped by topic. -* Top-level doc set (Example: https://docs.npmjs.com/packages-and-modules) - * Categories (Example: https://docs.npmjs.com/packages-and-modules/introduction-to-packages-and-modules) - * Articles (Example: https://docs.npmjs.com/about-packages-and-modules) + +- Top-level doc set (Example: https://docs.npmjs.com/packages-and-modules) + - Categories (Example: https://docs.npmjs.com/packages-and-modules/introduction-to-packages-and-modules) + - Articles (Example: https://docs.npmjs.com/about-packages-and-modules) ### Categories + Categories are organized around a feature or a discrete set of tasks. Use titles that are task-based and describe the purpose or goal of the category. ### Articles + Articles are the basic unit of content for the docs. Use titles that are clear, descriptive, and specific, with the same terminology as the product itself. All articles follow the same content order. #### Content order + Introduce content from the broadest applicability to the most specific, following this order: -* Conceptual content -* Procedural content for enabling a feature or setting -* Procedural content on using a feature -* Procedural content on managing a feature or setting -* Procedural content on disabling a feature or setting -* Procedural content on destructive actions (e.g. deletion) -* Troubleshooting information +- Conceptual content +- Procedural content for enabling a feature or setting +- Procedural content on using a feature +- Procedural content on managing a feature or setting +- Procedural content on disabling a feature or setting +- Procedural content on destructive actions (e.g. deletion) +- Troubleshooting information Articles answer, “What is it? Why do it?” and then “How does someone do it?” @@ -34,57 +40,64 @@ Articles answer, “What is it? Why do it?” and then “How does someone do it **Conceptual** -Conceptual content helps people understand a feature or topic by providing a clear, high-level overview, explanation of how the feature or topic can help them on their journey, and context like use cases or examples. Conceptual content is clear enough for a novice audience but also includes relevant information for advanced users. People most often use conceptual content when they're learning. -If people need certain permissions to do a task described in the article, include a permissions statement describing who can do the task in the conceptual information. +Conceptual content helps people understand a feature or topic by providing a clear, high-level overview, explanation of how the feature or topic can help them on their journey, and context like use cases or examples. Conceptual content is clear enough for a novice audience but also includes relevant information for advanced users. People most often use conceptual content when they're learning. If people need certain permissions to do a task described in the article, include a permissions statement describing who can do the task in the conceptual information. How to write conceptual content -* If people need specific permissions to do what is described in the article, list those required permissions -* Describe in plain language what the feature, setting, or topic is -* Describe its purpose and why it’s useful to the reader -* Share use cases or examples -* If relevant, describe how the feature or topic works -* Highlight any details the reader needs to know to use the feature -* Include next steps for getting started with the feature (whether through further reading links or content within the article itself) + +- If people need specific permissions to do what is described in the article, list those required permissions +- Describe in plain language what the feature, setting, or topic is +- Describe its purpose and why it’s useful to the reader +- Share use cases or examples +- If relevant, describe how the feature or topic works +- Highlight any details the reader needs to know to use the feature +- Include next steps for getting started with the feature (whether through further reading links or content within the article itself) **Procedural** Procedural content helps people complete a task from start to finish while they're using npm. Procedural content gives context on how the task fits into someone's larger journey. If a procedure has prerequisites, include them before the procedural content. How to write procedural content -* Group multiple related procedures into a single article unless there's a reason not to -* Use ordered lists for procedural steps -* If a step is optional, indicate that first -* Tell readers the expected outcome of any procedures -* Include troubleshooting tips as frequently as possible + +- Group multiple related procedures into a single article unless there's a reason not to +- Use ordered lists for procedural steps +- If a step is optional, indicate that first +- Tell readers the expected outcome of any procedures +- Include troubleshooting tips as frequently as possible How to write prerequisites -* Put the prerequisites immediately before the procedure that they are relevant to. If the prerequisites are relevant to all the procedures in an article, put them after the conceptual content and before the first procedure -* You can use a list, a sentence, or a paragraph to explain prerequisites -* You can also use a separate prerequisites section when: - * The prerequisite information is very important and should not be missed - * There is more than one prerequisite + +- Put the prerequisites immediately before the procedure that they are relevant to. If the prerequisites are relevant to all the procedures in an article, put them after the conceptual content and before the first procedure +- You can use a list, a sentence, or a paragraph to explain prerequisites +- You can also use a separate prerequisites section when: + - The prerequisite information is very important and should not be missed + - There is more than one prerequisite #### Contents of an article -* Title -* Conceptual content -* Prerequisites (if applicable) -* Procedural content -* Troubleshooting (if applicable) + +- Title +- Conceptual content +- Prerequisites (if applicable) +- Procedural content +- Troubleshooting (if applicable) ## User and job stories + When planning content, you can create user and job stories to define acceptance criteria that help determine if an article is helping users accomplish their goals. ### User stories + Create user stories to better understand each audience when a feature affects more than one audience. As a [person in a particular role], I want to [perform an action or find something out], so that I can [achieve my goal of...]. ### Job stories + Job stories are narrow, granular, and useful for targeted actions or specific tasks that a single audience wants to achieve. When [there's a particular situation], I want to [perform an action or find something out], so that I can [achieve my goal of...]. ### Acceptance criteria + Acceptance criteria explain the specific ways we'll know when a user or job story is considered complete. To define acceptance criteria, identify what an article has to offer someone for them to complete their desired task and feel satisfied. ## Article template diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index af98f7f9167..fb45e500446 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,67 +1,59 @@ # Contributing to the npm Documentation -This is the documentation for -[https://docs.npmjs.com/](https://docs.npmjs.com/). Do you want to -contribute a change? Great! +This is the documentation for [https://docs.npmjs.com/](https://docs.npmjs.com/). Do you want to contribute a change? Great! ### Table of Contents -* [Quick start](#quick-start) -* [Running locally](#running-locally) -* [Updating content](#updating-content) -* [Navigation](#navigation) -* [CLI](#cli) -* [Deploying changes](#deploying-changes) -* [Theme](#theme) +- [Quick start](#quick-start) +- [Running locally](#running-locally) +- [Updating content](#updating-content) +- [Navigation](#navigation) +- [CLI](#cli) +- [Deploying changes](#deploying-changes) ## Quick start -1. `npm install` to download Gatsby, our theme, and the dependencies +1. `npm install` to download Gatsby and all the dependencies 2. `npm run develop`: starts the test server at `http://localhost:8000`. -3. Update the content - it's MDX, which is like Markdown - in the `content` - directory. -4. Review your content at `http://localhost:8000`. (Gatsby watches the - filesystem and will reload your content changes immediately.) -5. Once you're happy, commit it and open a pull request at - https://github.com/npm/documentation. +3. Update the content - it's MDX, which is like Markdown - in the `content` directory. +4. Review your content at `http://localhost:8000`. (Gatsby watches the filesystem and will reload your content changes immediately.) +5. Once you're happy, commit it and open a pull request at https://github.com/npm/documentation. 6. A CI workflow run will publish your PR to a GitHub Preview Page. -7. Once the content is reviewed, merge the pull request. That will - [deploy the site](https://github.com/npm/documentation/actions/workflows/publish.yml). +7. Once the content is reviewed, merge the pull request. That will [deploy the site](https://github.com/npm/documentation/actions/workflows/publish.yml). ## Running locally -First, `npm install` the dependencies. This will install Gatsby, et al. +First, `npm install` the dependencies. This will install Gatsby, et al. -Next, `npm run develop` to start the test server to view your changes. -The Gatsby server will be started on port 8000. You can navigate to -`http://localhost:8000` to view the site live. +Next, `npm run develop` to start the test server to view your changes. The Gatsby server will be started on port 8000. You can navigate to `http://localhost:8000` to view the site live. -In order to cut down on the time it takes `npm run develop` to complete, you can -use the environment variable `GATSBY_PARTIAL_CONTENT` to only build some pages. -For example, if the only pages you need to test locally are in `/cli/v10/commands`, -then you can run the site locally with `GATSBY_PARTIAL_CONTENT=cli/v10/commands npm run develop`. +In order to cut down on the time it takes `npm run develop` to complete, you can use the environment variables `GATSBY_CONTENT_ALLOW` and `GATSBY_CONTENT_IGNORE` to only build some pages. + +For example, if the only pages you need to test locally are in `/cli/v10/commands`, then you can run the the following to build the `cli/v10/commands` pages: + +```sh +GATSBY_CONTENT_ALLOW=cli/v10/commands npm run develop +``` + +The `content/cli` directory has the most pages so it tends to be most helpful to ignore older CLI versions unless you need to explicitly test those pages: + +```sh +GATSBY_CONTENT_IGNORE=cli/v6,cli/v7,cli/v8,cli/v9 npm run develop +``` **For best results use Node 18 and npm 9+** -**Gatsby will watch your filesystem looking for updates.** Any content -changes you make should be reflected in the site immediately. +**Gatsby will watch your filesystem looking for updates.** Any content changes you make should be reflected in the site immediately. ## Updating content ### Documentation content -The documentation content lives in the `content` directory, and is -Markdown. (Actually, [MDX](https://mdxjs.com/), a sort of reactive -Markdown.) +The documentation content lives in the `content` directory, and is Markdown. (Actually, [MDX](https://mdxjs.com/), a sort of reactive Markdown.) ### Static content (images) -Static content lives in the `static` directory. Since most of the -static content is screenshots, you can use the `Screenshot` component -to reference them, which is an extension of the `Img` component that -is configured for the docs site. For example, an image living as -`static/organizations/managing-teams/team-members.png` would be -referenced as: +Static content lives in the `static` directory. Since most of the static content is screenshots, you can use the `Screenshot` component to reference them, which is an extension of the `Img` component that is configured for the docs site. For example, an image living as `static/organizations/managing-teams/team-members.png` would be referenced as: ``` @@ -71,13 +63,9 @@ referenced as: ### "Shared" content -There are various places where we want to share content between -pages, to prevent copy-pasta. For example, we display a screenshot -of the user login dialog repeatedly. Therefore this shared content -is defined in `src/shared.js`, and includes a literal MDX snippet. +There are various places where we want to share content between pages, to prevent copy-pasta. For example, we display a screenshot of the user login dialog repeatedly. Therefore this shared content is defined in `src/shared.js`, and includes a literal MDX snippet. -For example, `user-login` is defined with `text` and `image` -properties: +For example, `user-login` is defined with `text` and `image` properties: ```js 'user-login': { @@ -88,10 +76,7 @@ m login dialog" />) }, ``` -Since MDX is reactive, you can import the shared data at the top of the -file, just beneath your frontmatter. It uses the special path `~/shared.js` -so it can be imported the same way from any nested file without needing to -figure out the appropriate relative path: +Since MDX is reactive, you can import the shared data at the top of the file, just beneath your frontmatter. It uses the special path `~/shared.js` so it can be imported the same way from any nested file without needing to figure out the appropriate relative path: ``` --- @@ -108,31 +93,19 @@ To login, <>{shared['user-login'].text} ### URLs -Note that for backward compatibility reasons, the on-disk paths -are not precisely identical to the URLs for the documentation. -To keep URLs expressive but still short, intermediate directories -are removed from a page's URL. +Note that for backward compatibility reasons, the on-disk paths are not precisely identical to the URLs for the documentation. To keep URLs expressive but still short, intermediate directories are removed from a page's URL. -You can see this navigating through the documentation hierarchy: -if you visit the "Packages and modules" page, you'll navigate to -`https://docs.npmjs.com/packages-and-modules`. +You can see this navigating through the documentation hierarchy: if you visit the "Packages and modules" page, you'll navigate to `https://docs.npmjs.com/packages-and-modules`. -There's then a folder beneath that, "Contributing packages to the -registry", which is (sensibly) at -`https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry`. +There's then a folder beneath that, "Contributing packages to the registry", which is (sensibly) at `https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry`. -You might (understandably) expect the page "Creating Node.js modules" -to be URL-wise beneath `contributing-packages-to-the-registry`, but -unfortunately, you would be wrong. To keep URLs short, the intermediate -folder paths are removed from pages, so "Creating Node.js modules" becomes -`https://docs.npmjs.com/creating-node-js-modules`. +You might (understandably) expect the page "Creating Node.js modules" to be URL-wise beneath `contributing-packages-to-the-registry`, but unfortunately, you would be wrong. To keep URLs short, the intermediate folder paths are removed from pages, so "Creating Node.js modules" becomes `https://docs.npmjs.com/creating-node-js-modules`. -If you have only a URL and want to find where it lives on disk, you can -consult the left-hand navigation on the site. +If you have only a URL and want to find where it lives on disk, you can consult the left-hand navigation on the site. Screen Shot 2021-03-02 at 10 06 19 -You can also use `find` from within the `content` directory. For example: +You can also use `find` from within the `content` directory. For example: ``` find . -iname creating-node-js-modules\* -print @@ -140,91 +113,48 @@ find . -iname creating-node-js-modules\* -print ### Frontmatter -The content pages should include -[frontmatter](https://jekyllrb.com/docs/front-matter/). +The content pages should include [frontmatter](https://jekyllrb.com/docs/front-matter/). -* `title`: the page's title (string); required -* `redirect_from`: any URLs on the site that will be redirected to this page (array of strings) +- `title`: the page's title (string); required +- `redirect_from`: any URLs on the site that will be redirected to this page (array of strings) ## Navigation -The site's navigation (on the left-hand sidebar of the site) is controlled -by `src/theme/nav.yml`. If you add or remove a page from the site, you'll -also want to add or remove it from the navigation configuration. +The site's navigation (on the left-hand sidebar of the site) is controlled by `content/nav.yml`. If you add or remove a page from the site, you'll also want to add or remove it from the navigation configuration. ## CLI -The documentation for the [npm cli](https://github.com/npm/cli) is not -modified in this repository. Instead, the canonical location for it -is in the [npm/cli](https://github.com/npm/cli) repository. Modifications -to those files are automatically included here for completeness. +The documentation for the [npm cli](https://github.com/npm/cli) is not modified in this repository. Instead, the canonical location for it is in the [npm/cli](https://github.com/npm/cli) repository. Modifications to those files are automatically included here for completeness. **Pull requests to CLI documentation in this repository will be closed.** ### Updating CLI Content -Since the CLI documentation content lives in the [npm/cli -repo](https://github.com/npm/cli), there is a [GitHub Actions -workflow](https://github.com/npm/documentation/actions/workflows/update-cli.yml) -that pulls documentation updates from the CLI into this repository. -This is done nightly. +Since the CLI documentation content lives in the [npm/cli repo](https://github.com/npm/cli), there is a [GitHub Actions workflow](https://github.com/npm/documentation/actions/workflows/update-cli.yml) that pulls documentation updates from the CLI into this repository. This is done nightly. -This process can, of course, be done manually. This may be useful for -editing its behavior or debugging, and it *should* be done when you're -adding a new major version to the site. +This process can, of course, be done manually. This may be useful for editing its behavior or debugging, and it _should_ be done when you're adding a new major version to the site. 1. Review the configuration - The `cli/releases.json` configures how the CLI documentation is - included. It is an array of documentation versions, each having - the following configuration: - - * `id`: A short identifier for the documentation version, eg - `v6` or `v7`. This corresponds to a directory containing a - version of the CLI repository (using a submodule). This will also - be used as the output folder in the content. - * `branch`: The branch name for the version. This will be used to - fetch the latest version of the documentation from GitHub. - * `spec`: The registry spec for the version. This will be used - to fetch the latest version in that range from the registry. - * `resolved`: This should not be edited manually. This is a reference - to the last fetched version of the content for this release. If - a future fetch is done and this field matches what is returned - from the registry, then no updates will be made. To force an update - (which can be useful when making changes to the `bin/build.js` script) - it can be run with the argument `--force`. + The `cli/releases.json` configures how the CLI documentation is included. It is an array of documentation versions, each having the following configuration: + + - `id`: A short identifier for the documentation version, eg `v6` or `v7`. This corresponds to a directory containing a version of the CLI repository (using a submodule). This will also be used as the output folder in the content. + - `branch`: The branch name for the version. This will be used to fetch the latest version of the documentation from GitHub. + - `spec`: The registry spec for the version. This will be used to fetch the latest version in that range from the registry. + - `resolved`: This should not be edited manually. This is a reference to the last fetched version of the content for this release. If a future fetch is done and this field matches what is returned from the registry, then no updates will be made. To force an update (which can be useful when making changes to the `bin/build.js` script) it can be run with the argument `--force`. 2. Fetch and import the latest content for each CLI release - Run `npm run build -w cli` to download the latest version for each release - and import its content into the `content` directory. This will take the - content in each submodule's `docs/content` directory, perform any necessary - translations (like adding historical redirects) and putting it in this repository's - `content` directory. In addition, it will take the `docs/nav.yml` and include it - in this repository's navigation. + Run `npm run build -w cli` to download the latest version for each release and import its content into the `content` directory. This will take the content in each submodule's `docs/content` directory, perform any necessary translations (like adding historical redirects) and putting it in this repository's `content` directory. In addition, it will take the `docs/nav.yml` and include it in this repository's navigation. ## Reviewing changes -When a pull request is opened or updated the -[GitHub Actions workflow](https://github.com/npm/documentation/actions/workflows/publish.yml) -will deploy a preview to the [`github-pages` environment](https://github.com/npm/documentation/deployments/activity_log?environment=github-pages). -The URL will be reported to the pull request and the status can be checked by looking at the -workflows for the [`pull_request_target` event](https://github.com/npm/documentation/actions/workflows/publish.yml?query=event%3Apull_request_target). +When a pull request is opened or updated the [GitHub Actions workflow](https://github.com/npm/documentation/actions/workflows/publish.yml) will deploy a preview to the [`github-pages` environment](https://github.com/npm/documentation/deployments/activity_log?environment=github-pages). The URL will be reported to the pull request and the status can be checked by looking at the workflows for the [`pull_request_target` event](https://github.com/npm/documentation/actions/workflows/publish.yml?query=event%3Apull_request_target). ## Deploying changes -The docs site (https://docs.npmjs.com/) is published from a -[GitHub Actions workflow](https://github.com/npm/documentation/actions/workflows/publish.yml) -on any push into the main branch. That means that the workflow for -updating the site is: +The docs site (https://docs.npmjs.com/) is published from a [GitHub Actions workflow](https://github.com/npm/documentation/actions/workflows/publish.yml) on any push into the main branch. That means that the workflow for updating the site is: 1. Make your changes locally, review them, commit them. 2. Open a pull request for review 3. Merge that pull request -On step three, your changes will be published live! 🎉 - -## Theme - -The Gatsby theme used here is located in the [`theme/`](./theme) directory. It is a variation of -[doctocat](https://github.com/primer/doctocat) with some theme changes -for npm's design language and additional components to support multiple -versions of the CLI documentation. +On step three, your changes will be published live! 🎉 diff --git a/README.md b/README.md index bdd21df3afc..b049181164c 100644 --- a/README.md +++ b/README.md @@ -2,36 +2,22 @@ [![Publish](https://github.com/npm/documentation/actions/workflows/publish.yml/badge.svg)](https://github.com/npm/documentation/actions/workflows/publish.yml) -This is the documentation for -[https://docs.npmjs.com/](https://docs.npmjs.com/). +This is the documentation for [https://docs.npmjs.com/](https://docs.npmjs.com/). -[This repository](https://github.com/npm/documentation) contains the -content for our documentation site, and the GitHub Actions workflows -that generate the site itself. +[This repository](https://github.com/npm/documentation) contains the content for our documentation site, and the GitHub Actions workflows that generate the site itself. ## Quick start 1. `npm install` to download gatsby, our theme, and the dependencies 2. `npm run develop`: starts the test server at `http://localhost:8000`. -3. Update the content - it's Mdx, which is like markdown - in the `content` - directory. -4. Review your content at `http://localhost:8000`. (Gatsby watches the - filesystem and will reload your content changes immediately.) -5. Once you're happy, commit it and open a pull request at - https://github.com/npm/documentation. +3. Update the content - it's Mdx, which is like markdown - in the `content` directory. +4. Review your content at `http://localhost:8000`. (Gatsby watches the filesystem and will reload your content changes immediately.) +5. Once you're happy, commit it and open a pull request at https://github.com/npm/documentation. 6. A CI workflow run will publish your PR to a GitHub Preview Page. -7. Once the content is reviewed, merge the pull request. That will - [deploy the site](https://github.com/npm/documentation/actions/workflows/publish.yml). +7. Once the content is reviewed, merge the pull request. That will [deploy the site](https://github.com/npm/documentation/actions/workflows/publish.yml). Do you want to know more? Check out our [contributing guide](CONTRIBUTING.md). -## Theme - -The gatsby theme used here is located in the [`theme/`](./theme) directory. It is a variation of -[doctocat](https://github.com/primer/doctocat) with some theme changes -for npm's design language and additional components to support multiple -versions of the CLI documentation. - ## License The npm product documentation in the content, and static folders are licensed under a [CC-BY 4.0 license](LICENSE). diff --git a/cli/bin/build.js b/cli/bin/build.js index b055ad41ec4..0a664a1197d 100644 --- a/cli/bin/build.js +++ b/cli/bin/build.js @@ -10,7 +10,7 @@ const checkOnly = process.argv.includes('--check-only') const ROOT = resolve(__dirname, '../..') const contentPath = join(ROOT, 'content/cli') -const navPath = join(ROOT, 'src/theme/nav.yml') +const navPath = join(ROOT, 'content/nav.yml') const checkContent = () => { const status = spawnSync('git', ['status', '--porcelain', contentPath], { encoding: 'utf-8' }) diff --git a/cli/lib/extract.js b/cli/lib/extract.js index 85802f55b55..c49cf222dcb 100644 --- a/cli/lib/extract.js +++ b/cli/lib/extract.js @@ -63,10 +63,15 @@ const writeChangelog = async ({ release, nav, cwd, srcPath, contentPath }) => { const title = 'Changelog' const changelog = await gh.getFile({ ref: release.branch, path: srcPath }) + // mdx needs > and < escaped + const escaped = changelog.toString() + .replace(/([^\\])>/g, '$1\\>') + .replace(/([^\\])` escaped - Transform.sync(changelog.toString().replace(/([^\\])>/g, '$1\\>'), { + Transform.sync(escaped, { release, path: contentPath, frontmatter: { diff --git a/cli/lib/transform.js b/cli/lib/transform.js index 1b8ea22d7c9..a3def94d151 100644 --- a/cli/lib/transform.js +++ b/cli/lib/transform.js @@ -112,6 +112,15 @@ const transform = (data, { release, path, frontmatter }) => { /\[([^\]]+)\]\(\/((?:commands|configuring-npm|using-npm)\/[^)]+)\)/g, (_, p1, p2) => `[${p1}](${release.url}/${p2})` ) + // remove html comments which are not mdx compatible + .replace(/^$\n/gm, '') + // replace markdown autolinks with full markdown links, also for mdx + .replace(/<(http)(.*?)\\?>/g, '[$1$2]($1$2)') + // a few specific replacements that cause problems for mdx + .replace(/^$/gm, '[i@izs.me](mailto:i@izs.me)') + .replace(/<2\.0\.0/g, '\\<2.0.0') + .replace(/(:\n\n)(\s{4}"funding": {)/g, '$1```\n$2') + .replace(/^(\s{4}]$)(\n\n)/gm, '$1\n```$2') return `---\n${yaml.stringify(attributes).trim()}\n---\n\n${body}` } diff --git a/cli/package.json b/cli/package.json index 3776f76194c..872b4b5a3be 100644 --- a/cli/package.json +++ b/cli/package.json @@ -33,10 +33,6 @@ "tap": "^16.3.9" }, "author": "GitHub Inc.", - "files": [ - "bin/", - "lib/" - ], "engines": { "node": ">=18.0.0" }, @@ -45,6 +41,10 @@ "version": "4.19.0", "content": "./scripts/template-oss" }, + "files": [ + "bin/", + "lib/" + ], "tap": { "nyc-arg": [ "--exclude", diff --git a/cli/test/index.js b/cli/test/index.js index 200e71cc96c..996186aaeeb 100644 --- a/cli/test/index.js +++ b/cli/test/index.js @@ -9,8 +9,7 @@ const navPath = resolve( __dirname, '..', '..', - 'src', - 'theme', + 'content', 'nav.yml' ) diff --git a/content/404.mdx b/content/404.mdx new file mode 100644 index 00000000000..16fd418bd16 --- /dev/null +++ b/content/404.mdx @@ -0,0 +1,6 @@ +--- +title: Page Not Found +edit_on_github: false +--- + + diff --git a/content/cli/v10/commands/npm-audit.md b/content/cli/v10/commands/npm-audit.md index e6d62c9280f..8ece170f816 100644 --- a/content/cli/v10/commands/npm-audit.md +++ b/content/cli/v10/commands/npm-audit.md @@ -193,7 +193,7 @@ 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 +\<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". diff --git a/content/cli/v10/commands/npm-dist-tag.md b/content/cli/v10/commands/npm-dist-tag.md index dbf0da3301a..f8a5c42eed2 100644 --- a/content/cli/v10/commands/npm-dist-tag.md +++ b/content/cli/v10/commands/npm-dist-tag.md @@ -114,7 +114,7 @@ specified in the same slot: `npm install @` vs 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 . +semver as `>=1.4.0 <1.5.0`. See [https://github.com/npm/npm/issues/6082](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`. diff --git a/content/cli/v10/commands/npm-login.md b/content/cli/v10/commands/npm-login.md index 9b906073849..1b0f2ddafc4 100644 --- a/content/cli/v10/commands/npm-login.md +++ b/content/cli/v10/commands/npm-login.md @@ -52,9 +52,9 @@ used (see [`config`](/cli/v10/using-npm/config)). When using `legacy` for your `auth-type`, the username and password, are read in from prompts. -To reset your password, go to +To reset your password, go to [https://www.npmjs.com/forgot](https://www.npmjs.com/forgot) -To change your email address, go to +To change your email address, go to [https://www.npmjs.com/email-edit](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, diff --git a/content/cli/v10/commands/npm.md b/content/cli/v10/commands/npm.md index 86f74368b91..4cf1dedfc4b 100644 --- a/content/cli/v10/commands/npm.md +++ b/content/cli/v10/commands/npm.md @@ -167,7 +167,7 @@ check the issues list. ### Bugs When you find issues, please report them: - +[https://github.com/npm/cli/issues](https://github.com/npm/cli/issues) Please be sure to follow the template and bug reporting guidelines. @@ -175,11 +175,11 @@ Please be sure to follow the template and bug reporting guidelines. Discuss new feature ideas on our discussion forum: -* +* [https://github.com/npm/feedback](https://github.com/npm/feedback) Or suggest formal RFC proposals: -* +* [https://github.com/npm/rfcs](https://github.com/npm/rfcs) ### See Also diff --git a/content/cli/v10/configuring-npm/package-json.md b/content/cli/v10/configuring-npm/package-json.md index b82df49d882..e39c6be93f1 100644 --- a/content/cli/v10/configuring-npm/package-json.md +++ b/content/cli/v10/configuring-npm/package-json.md @@ -68,7 +68,7 @@ Some tips: should be something short, but also reasonably descriptive. * You may want to check the npm registry to see if there's something by that name already, before you get too attached to it. - + [https://www.npmjs.com/](https://www.npmjs.com/) A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See [`scope`](/cli/v10/using-npm/scope) for more detail. diff --git a/content/cli/v10/using-npm/changelog.md b/content/cli/v10/using-npm/changelog.md index 78cea1ef2fa..bc5d3032dfd 100644 --- a/content/cli/v10/using-npm/changelog.md +++ b/content/cli/v10/using-npm/changelog.md @@ -15,8 +15,6 @@ redirect_from: - /using-npm/changelog --- -# Changelog - ## [10.2.0](https://github.com/npm/cli/compare/v10.1.0...v10.2.0) (2023-10-02) ### Features @@ -107,7 +105,7 @@ redirect_from: ### ⚠️ BREAKING CHANGES -* support for node <=16.13 has been removed +* support for node \<=16.13 has been removed * support for node 14 has been removed * support for node 14 has been removed * support for node 14 has been removed diff --git a/content/cli/v10/using-npm/registry.md b/content/cli/v10/using-npm/registry.md index 3927275ac8a..841405706f5 100644 --- a/content/cli/v10/using-npm/registry.md +++ b/content/cli/v10/using-npm/registry.md @@ -24,8 +24,8 @@ that implements the CommonJS Package Registry specification for reading package info. npm is configured to use the **npm public registry** at - by default. Use of the npm public registry is -subject to terms of use available at . +[https://registry.npmjs.org](https://registry.npmjs.org) by default. Use of the npm public registry is +subject to terms of use available at [https://docs.npmjs.com/policies/terms](https://docs.npmjs.com/policies/terms). You can configure npm to use any compatible registry you like, and even run your own registry. Use of someone else's registry may be governed by their @@ -36,7 +36,7 @@ write APIs as well, to allow for publishing packages and managing user account information. The npm public registry is powered by a CouchDB database, -of which there is a public mirror at . +of which there is a public mirror at [https://skimdb.npmjs.com/registry](https://skimdb.npmjs.com/registry). The registry URL used is determined by the scope of the package (see [`scope`](/cli/v10/using-npm/scope). If no scope is specified, the default registry is @@ -89,7 +89,7 @@ See [`package.json`](/cli/v10/configuring-npm/package-json) for more info on wha ### Where can I find my (and others') published packages? - +[https://www.npmjs.com/](https://www.npmjs.com/) ### See also diff --git a/content/cli/v10/using-npm/scripts.md b/content/cli/v10/using-npm/scripts.md index 5010af02dcd..25a43f4313f 100644 --- a/content/cli/v10/using-npm/scripts.md +++ b/content/cli/v10/using-npm/scripts.md @@ -92,7 +92,7 @@ situations. These scripts happen in addition to the `pre`, `post`, Since `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074). As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape). -See for a much lengthier justification, with further reading, for this change. +See [https://github.com/npm/npm/issues/10074](https://github.com/npm/npm/issues/10074) for a much lengthier justification, with further reading, for this change. **Use Cases** diff --git a/content/cli/v6/commands/npm-adduser.md b/content/cli/v6/commands/npm-adduser.md index e8613cc8b98..1630be66836 100644 --- a/content/cli/v6/commands/npm-adduser.md +++ b/content/cli/v6/commands/npm-adduser.md @@ -35,9 +35,9 @@ the default registry will be used (see [`config`](/cli/v6/using-npm/config)). The username, password, and email are read in from prompts. -To reset your password, go to +To reset your password, go to [https://www.npmjs.com/forgot](https://www.npmjs.com/forgot) -To change your email address, go to +To change your email address, go to [https://www.npmjs.com/email-edit](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, diff --git a/content/cli/v6/commands/npm-dist-tag.md b/content/cli/v6/commands/npm-dist-tag.md index c5dafb77c4d..5eeb6c9ede4 100644 --- a/content/cli/v6/commands/npm-dist-tag.md +++ b/content/cli/v6/commands/npm-dist-tag.md @@ -95,7 +95,7 @@ the same slot: `npm install @` vs `npm install @`. 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 . +`>=1.4.0 <1.5.0`. See [https://github.com/npm/npm/issues/6082](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`. diff --git a/content/cli/v6/commands/npm-init.md b/content/cli/v6/commands/npm-init.md index f0fbc164b13..37215129224 100644 --- a/content/cli/v6/commands/npm-init.md +++ b/content/cli/v6/commands/npm-init.md @@ -79,7 +79,7 @@ will create a scoped package. ### See Also -* +* [https://github.com/isaacs/init-package-json](https://github.com/isaacs/init-package-json) * [package.json](/cli/v6/configuring-npm/package-json) * [npm version](/cli/v6/commands/npm-version) * [npm scope](/cli/v6/using-npm/scope) diff --git a/content/cli/v6/commands/npm.md b/content/cli/v6/commands/npm.md index f0b5f878120..a7e436ecdbd 100644 --- a/content/cli/v6/commands/npm.md +++ b/content/cli/v6/commands/npm.md @@ -151,7 +151,7 @@ the contributing guidelines and check the issues list. When you find issues, please report them: * web: - + [https://npm.community/c/bugs](https://npm.community/c/bugs) Be sure to follow the template and bug reporting guidelines. You can also ask for help in the [support forum](https://npm.community/c/support) if you're @@ -163,7 +163,7 @@ reproduction to report. [Isaac Z. Schlueter](http://blog.izs.me/) :: [isaacs](https://github.com/isaacs/) :: [@izs](https://twitter.com/izs) :: - +[i@izs.me](mailto:i@izs.me) ### See Also * [npm help](/cli/v6/commands/npm-help) diff --git a/content/cli/v6/configuring-npm/package-json.md b/content/cli/v6/configuring-npm/package-json.md index 723fb3bb068..ee066d5c9c0 100644 --- a/content/cli/v6/configuring-npm/package-json.md +++ b/content/cli/v6/configuring-npm/package-json.md @@ -51,7 +51,7 @@ Some tips: * The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive. * You may want to check the npm registry to see if there's something by that name - already, before you get too attached to it. + already, before you get too attached to it. [https://www.npmjs.com/](https://www.npmjs.com/) A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See [`scope`](/cli/v6/using-npm/scope) for more detail. @@ -207,6 +207,7 @@ You can specify an object containing an URL that provides up-to-date information about ways to help fund development of your package, or a string URL, or an array of these: +``` "funding": { "type" : "individual", "url" : "http://example.com/donate" @@ -230,6 +231,7 @@ a string URL, or an array of these: "url" : "https://www.patreon.com/my-account" } ] +``` Users can use the `npm fund` subcommand to list the `funding` URLs of all diff --git a/content/cli/v6/using-npm/changelog.md b/content/cli/v6/using-npm/changelog.md index 7473751d38e..b154bd74875 100644 --- a/content/cli/v6/using-npm/changelog.md +++ b/content/cli/v6/using-npm/changelog.md @@ -2236,7 +2236,7 @@ from installing `npm@next`. ([@travi](https://github.com/travi)) * [`d2ad776f6`](https://github.com/npm/npm/commit/d2ad776f6dcd92ae3937465736dcbca171131343) [#20879](https://github.com/npm/npm/pull/20879) - When `npm run-script ` fails due to a typo or missing script, npm will + When `npm run-script \` fails due to a typo or missing script, npm will now do a "did you mean?..." for scripts that do exist. ([@watilde](https://github.com/watilde)) @@ -2477,7 +2477,7 @@ Give it a whirl and tell us what you think! See `npm help audit` for full docs! detail on the footer about what actions you can take! ([@zkat](https://github.com/zkat)) -### NEW FEATURE: GIT DEPS AND `npm init `! +### NEW FEATURE: GIT DEPS AND `npm init \`! Another exciting change that came with `npm@6` was the new `npm init` command that allows for community-authored generators. That means you can, for example, @@ -2496,7 +2496,7 @@ repository to maintain your organizational scaffolding tools or whatnot. ✨ * [`483e01180`](https://github.com/npm/npm/commit/483e011803af82e63085ef41b7acce5b22aa791c) [#20403](https://github.com/npm/npm/pull/20403) - Add support for hosted git packages to `npm init `. + Add support for hosted git packages to `npm init \`. ([@jdalton](https://github.com/jdalton)) ### BUGFIXES diff --git a/content/cli/v6/using-npm/registry.md b/content/cli/v6/using-npm/registry.md index 59ab30a4806..a86db839d1d 100644 --- a/content/cli/v6/using-npm/registry.md +++ b/content/cli/v6/using-npm/registry.md @@ -18,8 +18,8 @@ that implements the CommonJS Package Registry specification for reading package info. npm is configured to use npm, Inc.'s public registry at - by default. Use of the npm public registry is -subject to terms of use available at . +[https://registry.npmjs.org](https://registry.npmjs.org) by default. Use of the npm public registry is +subject to terms of use available at [https://www.npmjs.com/policies/terms](https://www.npmjs.com/policies/terms). You can configure npm to use any compatible registry you like, and even run your own registry. Use of someone else's registry may be governed by their @@ -31,8 +31,8 @@ account information. The npm public registry is powered by a CouchDB database, of which there is a public mirror at -. The code for the couchapp is -available at . +[https://skimdb.npmjs.com/registry](https://skimdb.npmjs.com/registry). The code for the couchapp is +available at [https://github.com/npm/npm-registry-couchapp](https://github.com/npm/npm-registry-couchapp). The registry URL used is determined by the scope of the package (see [`scope`](/cli/v6/using-npm/scope). If no scope is specified, the default registry is used, which is @@ -99,7 +99,7 @@ effectively implement the entire CouchDB API anyway. ### Is there a website or something to see package docs and such? -Yes, head over to +Yes, head over to [https://www.npmjs.com/](https://www.npmjs.com/) ### See also diff --git a/content/cli/v6/using-npm/scripts.md b/content/cli/v6/using-npm/scripts.md index a5c49831334..6cbf0cf930c 100644 --- a/content/cli/v6/using-npm/scripts.md +++ b/content/cli/v6/using-npm/scripts.md @@ -60,7 +60,7 @@ There are some special life cycle scripts that happen only in certain situations Since `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074). As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape). -See for a much lengthier justification, with further reading, for this change. +See [https://github.com/npm/npm/issues/10074](https://github.com/npm/npm/issues/10074) for a much lengthier justification, with further reading, for this change. **Use Cases** diff --git a/content/cli/v6/using-npm/semver.md b/content/cli/v6/using-npm/semver.md index ab020beac31..c1a7d2a05e8 100644 --- a/content/cli/v6/using-npm/semver.md +++ b/content/cli/v6/using-npm/semver.md @@ -82,7 +82,7 @@ multiple versions to the utility will just sort them. ## Versions A "version" is described by the `v2.0.0` specification found at -. +[https://semver.org/](https://semver.org/). A leading `"="` or `"v"` character is stripped off and ignored. @@ -117,7 +117,7 @@ For example, the range `>=1.2.7 <1.3.0` would match the versions `1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, or `1.1.0`. -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +The range `1.2.7 || >=1.2.9 \<2.0.0` would match the versions `1.2.7`, `1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. ### Prerelease Tags @@ -212,14 +212,14 @@ Any of `X`, `x`, or `*` may be used to "stand in" for one of the numeric values in the `[major, minor, patch]` tuple. * `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.x` := `>=1.0.0 \<2.0.0` (Matching major version) * `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) A partial version range is treated as an X-Range, so the special character is in fact optional. * `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1` := `1.x.x` := `>=1.0.0 \<2.0.0` * `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` #### Tilde Ranges `~1.2.3` `~1.2` `~1` @@ -229,7 +229,7 @@ comparator. Allows minor-level changes if not. * `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` * `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 \<2.0.0` (Same as `1.x`) * `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` * `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) * `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) @@ -255,10 +255,10 @@ However, it presumes that there will *not* be breaking changes between `0.2.4` and `0.2.5`. It allows for changes that are presumed to be additive (but non-breaking), according to commonly observed practices. -* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^1.2.3` := `>=1.2.3 \<2.0.0` * `^0.2.3` := `>=0.2.3 <0.3.0` * `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 \<2.0.0` Note that prereleases in the `1.2.3` version will be allowed, if they are greater than or equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but `1.2.4-beta.2` would not, because it is a prerelease of a @@ -271,7 +271,7 @@ When parsing caret ranges, a missing `patch` value desugars to the number `0`, but will allow flexibility within that value, even if the major and minor versions are both `0`. -* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^1.2.x` := `>=1.2.0 \<2.0.0` * `^0.0.x` := `>=0.0.0 <0.1.0` * `^0.0` := `>=0.0.0 <0.1.0` @@ -279,7 +279,7 @@ A missing `minor` and `patch` values will desugar to zero, but also allow flexibility within those values, even if the major version is zero. -* `^1.x` := `>=1.0.0 <2.0.0` +* `^1.x` := `>=1.0.0 \<2.0.0` * `^0.x` := `>=0.0.0 <1.0.0` ### Range Grammar diff --git a/content/cli/v7/commands/npm-access.md b/content/cli/v7/commands/npm-access.md index 1f4363214c6..2aeea4bfc1a 100644 --- a/content/cli/v7/commands/npm-access.md +++ b/content/cli/v7/commands/npm-access.md @@ -98,9 +98,6 @@ Management of teams and team memberships is done with the `npm team` command. ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -108,8 +105,6 @@ Management of teams and team memberships is done with the `npm team` command. The base URL of the npm registry. - - #### `otp` @@ -122,10 +117,7 @@ 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. - - - ### See Also diff --git a/content/cli/v7/commands/npm-adduser.md b/content/cli/v7/commands/npm-adduser.md index 2cee8263f4e..426f993bac1 100644 --- a/content/cli/v7/commands/npm-adduser.md +++ b/content/cli/v7/commands/npm-adduser.md @@ -37,9 +37,9 @@ the default registry will be used (see [`config`](/cli/v7/using-npm/config)). The username, password, and email are read in from prompts. -To reset your password, go to +To reset your password, go to [https://www.npmjs.com/forgot](https://www.npmjs.com/forgot) -To change your email address, go to +To change your email address, go to [https://www.npmjs.com/email-edit](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, @@ -50,9 +50,6 @@ your existing record. ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -60,8 +57,6 @@ your existing record. The base URL of the npm registry. - - #### `scope` @@ -93,10 +88,7 @@ npm init --scope=@foo --yes ``` - - - ### See Also diff --git a/content/cli/v7/commands/npm-audit.md b/content/cli/v7/commands/npm-audit.md index dbf8464e377..59e1e769b57 100644 --- a/content/cli/v7/commands/npm-audit.md +++ b/content/cli/v7/commands/npm-audit.md @@ -121,7 +121,7 @@ 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 +\<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". @@ -204,9 +204,6 @@ $ npm audit --audit-level=moderate ### Configuration - - - #### `audit-level` * Default: null @@ -215,8 +212,6 @@ $ npm audit --audit-level=moderate The minimum level of vulnerability for `npm audit` to exit with a non-zero exit code. - - #### `dry-run` @@ -231,8 +226,6 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. - - #### `force` @@ -259,8 +252,6 @@ mistakes, unnecessary performance degradation, and malicious input. 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! - - #### `json` @@ -274,8 +265,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `package-lock-only` @@ -291,8 +280,6 @@ 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`. - - #### `omit` @@ -312,8 +299,6 @@ 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. - - #### `workspace` @@ -337,8 +322,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -350,10 +333,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-bin.md b/content/cli/v7/commands/npm-bin.md index 73dbfd3fb74..d6cdfcc0514 100644 --- a/content/cli/v7/commands/npm-bin.md +++ b/content/cli/v7/commands/npm-bin.md @@ -33,9 +33,6 @@ Print the folder where npm will install executables. ### Configuration - - - #### `global` * Default: false @@ -50,10 +47,7 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - - ### See Also diff --git a/content/cli/v7/commands/npm-bugs.md b/content/cli/v7/commands/npm-bugs.md index 45ff700c115..a7a688cd5de 100644 --- a/content/cli/v7/commands/npm-bugs.md +++ b/content/cli/v7/commands/npm-bugs.md @@ -36,9 +36,6 @@ will search for a `package.json` in the current folder and use the `name` proper ### Configuration - - - #### `browser` * Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` @@ -51,8 +48,6 @@ terminal. Set to `true` to use default system URL opener. - - #### `registry` @@ -61,10 +56,7 @@ Set to `true` to use default system URL opener. The base URL of the npm registry. - - - ### See Also diff --git a/content/cli/v7/commands/npm-cache.md b/content/cli/v7/commands/npm-cache.md index d4989923acd..607ececfed5 100644 --- a/content/cli/v7/commands/npm-cache.md +++ b/content/cli/v7/commands/npm-cache.md @@ -90,9 +90,6 @@ verify`. ### Configuration - - - #### `cache` * Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm` @@ -101,10 +98,7 @@ verify`. The location of npm's cache directory. See [`npm cache`](/cli/v7/commands/npm-cache) - - - ### See Also diff --git a/content/cli/v7/commands/npm-ci.md b/content/cli/v7/commands/npm-ci.md index 7552925f05d..8c7edefd40c 100644 --- a/content/cli/v7/commands/npm-ci.md +++ b/content/cli/v7/commands/npm-ci.md @@ -82,9 +82,6 @@ cache: ### Configuration - - - #### `audit` * Default: true @@ -95,8 +92,6 @@ default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted. - - #### `ignore-scripts` @@ -110,8 +105,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `script-shell` @@ -121,10 +114,7 @@ will *not* run any pre- or post-scripts. The shell to use for scripts run with the `npm exec`, `npm run` and `npm init ` commands. - - - ### See Also diff --git a/content/cli/v7/commands/npm-config.md b/content/cli/v7/commands/npm-config.md index ca94df3cd99..5d9f6fbdcf2 100644 --- a/content/cli/v7/commands/npm-config.md +++ b/content/cli/v7/commands/npm-config.md @@ -110,9 +110,6 @@ global config. ### Configuration - - - #### `json` * Default: false @@ -125,8 +122,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `global` @@ -142,8 +137,6 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - #### `editor` @@ -153,8 +146,6 @@ folder instead of the current working directory. See The command to run for `npm edit` and `npm config edit`. - - #### `location` @@ -164,8 +155,6 @@ The command to run for `npm edit` and `npm config edit`. When passed to `npm config` this refers to which config file to use. - - #### `long` @@ -174,10 +163,7 @@ When passed to `npm config` this refers to which config file to use. Show extended information in `ls`, `search`, and `help-search`. - - - ### See Also diff --git a/content/cli/v7/commands/npm-dedupe.md b/content/cli/v7/commands/npm-dedupe.md index c86c2c80a72..16c9bb3ce35 100644 --- a/content/cli/v7/commands/npm-dedupe.md +++ b/content/cli/v7/commands/npm-dedupe.md @@ -89,9 +89,6 @@ Using `npm find-dupes` will run the command in `--dry-run` mode. ### Configuration - - - #### `global-style` * Default: false @@ -104,8 +101,6 @@ 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. - - #### `legacy-bundling` @@ -117,8 +112,6 @@ 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. - - #### `strict-peer-deps` @@ -139,8 +132,6 @@ 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. - - #### `package-lock` @@ -154,8 +145,6 @@ 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`. - - #### `omit` @@ -175,8 +164,6 @@ 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. - - #### `ignore-scripts` @@ -190,8 +177,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `audit` @@ -203,8 +188,6 @@ default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted. - - #### `bin-links` @@ -218,8 +201,6 @@ 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. - - #### `fund` @@ -230,8 +211,6 @@ When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details. - - #### `dry-run` @@ -246,8 +225,6 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. - - #### `workspace` @@ -271,8 +248,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -284,10 +259,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-deprecate.md b/content/cli/v7/commands/npm-deprecate.md index a5aab74c64f..ad9c8f66058 100644 --- a/content/cli/v7/commands/npm-deprecate.md +++ b/content/cli/v7/commands/npm-deprecate.md @@ -57,9 +57,6 @@ format an empty string. ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -67,8 +64,6 @@ format an empty string. The base URL of the npm registry. - - #### `otp` @@ -81,10 +76,7 @@ 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. - - - ### See Also diff --git a/content/cli/v7/commands/npm-diff.md b/content/cli/v7/commands/npm-diff.md index b168dd3bd65..8c19bbf8931 100644 --- a/content/cli/v7/commands/npm-diff.md +++ b/content/cli/v7/commands/npm-diff.md @@ -168,9 +168,6 @@ located within the folder `./lib/` and changed lines of code within the ### Configuration - - - #### `diff` * Default: @@ -178,8 +175,6 @@ located within the folder `./lib/` and changed lines of code within the Define arguments to compare in `npm diff`. - - #### `diff-name-only` @@ -188,8 +183,6 @@ Define arguments to compare in `npm diff`. Prints only filenames when using `npm diff`. - - #### `diff-unified` @@ -198,8 +191,6 @@ Prints only filenames when using `npm diff`. The number of lines of context to print in `npm diff`. - - #### `diff-ignore-all-space` @@ -208,8 +199,6 @@ The number of lines of context to print in `npm diff`. Ignore whitespace when comparing lines in `npm diff`. - - #### `diff-no-prefix` @@ -221,8 +210,6 @@ 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. - - #### `diff-src-prefix` @@ -231,8 +218,6 @@ Note: this causes `npm diff` to ignore the `--diff-src-prefix` and Source prefix to be used in `npm diff` output. - - #### `diff-dst-prefix` @@ -241,8 +226,6 @@ Source prefix to be used in `npm diff` output. Destination prefix to be used in `npm diff` output. - - #### `diff-text` @@ -251,8 +234,6 @@ Destination prefix to be used in `npm diff` output. Treat all files as text in `npm diff`. - - #### `global` @@ -268,8 +249,6 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - #### `tag` @@ -285,8 +264,6 @@ 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. - - #### `workspace` @@ -310,8 +287,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -323,10 +298,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ## See Also * [npm outdated](/cli/v7/commands/npm-outdated) diff --git a/content/cli/v7/commands/npm-dist-tag.md b/content/cli/v7/commands/npm-dist-tag.md index 7a0a1873580..fe1cfd2ef46 100644 --- a/content/cli/v7/commands/npm-dist-tag.md +++ b/content/cli/v7/commands/npm-dist-tag.md @@ -98,16 +98,13 @@ specified in the same slot: `npm install @` vs 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 . +semver as `>=1.4.0 <1.5.0`. See [https://github.com/npm/npm/issues/6082](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 - - - #### `workspace` * Default: @@ -130,8 +127,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -143,10 +138,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-docs.md b/content/cli/v7/commands/npm-docs.md index 3ff0bbcc264..2f06ae1d7c3 100644 --- a/content/cli/v7/commands/npm-docs.md +++ b/content/cli/v7/commands/npm-docs.md @@ -37,9 +37,6 @@ the `name` property. ### Configuration - - - #### `browser` * Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` @@ -52,8 +49,6 @@ terminal. Set to `true` to use default system URL opener. - - #### `registry` @@ -62,8 +57,6 @@ Set to `true` to use default system URL opener. The base URL of the npm registry. - - #### `workspace` @@ -87,8 +80,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -100,10 +91,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-doctor.md b/content/cli/v7/commands/npm-doctor.md index 8ac550c8eef..b37d44efdc9 100644 --- a/content/cli/v7/commands/npm-doctor.md +++ b/content/cli/v7/commands/npm-doctor.md @@ -119,9 +119,6 @@ reset the cache. ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -129,10 +126,7 @@ reset the cache. The base URL of the npm registry. - - - ### See Also diff --git a/content/cli/v7/commands/npm-edit.md b/content/cli/v7/commands/npm-edit.md index 75ce87cd8bd..8ac0faa9e46 100644 --- a/content/cli/v7/commands/npm-edit.md +++ b/content/cli/v7/commands/npm-edit.md @@ -42,9 +42,6 @@ changes to your locally installed copy. ### Configuration - - - #### `editor` * Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on @@ -53,10 +50,7 @@ changes to your locally installed copy. The command to run for `npm edit` and `npm config edit`. - - - ### See Also diff --git a/content/cli/v7/commands/npm-exec.md b/content/cli/v7/commands/npm-exec.md index 0e81ee7fe08..f895925df2b 100644 --- a/content/cli/v7/commands/npm-exec.md +++ b/content/cli/v7/commands/npm-exec.md @@ -137,9 +137,6 @@ $ npm exec -- foo@latest bar --package=@npmcli/foo ### Configuration - - - #### `package` * Default: @@ -147,8 +144,6 @@ $ npm exec -- foo@latest bar --package=@npmcli/foo The package to install for [`npm exec`](/cli/v7/commands/npm-exec) - - #### `call` @@ -163,8 +158,6 @@ npm exec --package yo --package generator-node --call "yo node" ``` - - #### `workspace` @@ -188,8 +181,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -201,10 +192,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### Examples diff --git a/content/cli/v7/commands/npm-explain.md b/content/cli/v7/commands/npm-explain.md index 7bc9884d6d9..1a4487b4dbd 100644 --- a/content/cli/v7/commands/npm-explain.md +++ b/content/cli/v7/commands/npm-explain.md @@ -69,9 +69,6 @@ node_modules/nyc/node_modules/find-up ``` ### Configuration - - - #### `json` * Default: false @@ -84,8 +81,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `workspace` @@ -109,10 +104,7 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-explore.md b/content/cli/v7/commands/npm-explore.md index 374c8f9f24e..25a61419e73 100644 --- a/content/cli/v7/commands/npm-explore.md +++ b/content/cli/v7/commands/npm-explore.md @@ -46,9 +46,6 @@ sure to use `npm rebuild ` if you make any changes. ### Configuration - - - #### `shell` * Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on @@ -57,10 +54,7 @@ sure to use `npm rebuild ` if you make any changes. The shell to run for the `npm explore` command. - - - ### See Also diff --git a/content/cli/v7/commands/npm-find-dupes.md b/content/cli/v7/commands/npm-find-dupes.md index c3e140a9c2b..1abc37cf8f6 100644 --- a/content/cli/v7/commands/npm-find-dupes.md +++ b/content/cli/v7/commands/npm-find-dupes.md @@ -32,9 +32,6 @@ duplications, without actually changing the package tree. ### Configuration - - - #### `global-style` * Default: false @@ -47,8 +44,6 @@ 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. - - #### `legacy-bundling` @@ -60,8 +55,6 @@ 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. - - #### `strict-peer-deps` @@ -82,8 +75,6 @@ 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. - - #### `package-lock` @@ -97,8 +88,6 @@ 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`. - - #### `omit` @@ -118,8 +107,6 @@ 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. - - #### `ignore-scripts` @@ -133,8 +120,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `audit` @@ -146,8 +131,6 @@ default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted. - - #### `bin-links` @@ -161,8 +144,6 @@ 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. - - #### `fund` @@ -173,8 +154,6 @@ When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details. - - #### `workspace` @@ -198,8 +177,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -211,10 +188,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-fund.md b/content/cli/v7/commands/npm-fund.md index 965ff5d025f..d82acf6f3a4 100644 --- a/content/cli/v7/commands/npm-fund.md +++ b/content/cli/v7/commands/npm-fund.md @@ -79,9 +79,6 @@ test-workspaces-fund@1.0.0 ### Configuration - - - #### `json` * Default: false @@ -94,8 +91,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `browser` @@ -109,8 +104,6 @@ terminal. Set to `true` to use default system URL opener. - - #### `unicode` @@ -121,8 +114,6 @@ Set to `true` to use default system URL opener. When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. - - #### `workspace` @@ -146,8 +137,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `which` @@ -156,10 +145,7 @@ This value is not exported to the environment for child processes. If there are multiple funding sources, which 1-indexed source URL to open. - - - ## See Also diff --git a/content/cli/v7/commands/npm-help-search.md b/content/cli/v7/commands/npm-help-search.md index 339395417a1..3831e764d85 100644 --- a/content/cli/v7/commands/npm-help-search.md +++ b/content/cli/v7/commands/npm-help-search.md @@ -40,9 +40,6 @@ directly. ### Configuration - - - #### `long` * Default: false @@ -50,10 +47,7 @@ directly. Show extended information in `ls`, `search`, and `help-search`. - - - ### See Also diff --git a/content/cli/v7/commands/npm-help.md b/content/cli/v7/commands/npm-help.md index fa7e7b3e2ef..86ab10ec04d 100644 --- a/content/cli/v7/commands/npm-help.md +++ b/content/cli/v7/commands/npm-help.md @@ -38,9 +38,6 @@ topic, so unique matches are equivalent to specifying a topic name. ### Configuration - - - #### `viewer` * Default: "man" on Posix, "browser" on Windows @@ -50,10 +47,7 @@ The program to use to view help content. Set to `"browser"` to view html help content in the default web browser. - - - ### See Also diff --git a/content/cli/v7/commands/npm-hook.md b/content/cli/v7/commands/npm-hook.md index 16098e62f08..d3fcd16224c 100644 --- a/content/cli/v7/commands/npm-hook.md +++ b/content/cli/v7/commands/npm-hook.md @@ -100,9 +100,6 @@ $ npm hook rm id-deadbeef ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -110,8 +107,6 @@ $ npm hook rm id-deadbeef The base URL of the npm registry. - - #### `otp` @@ -124,10 +119,7 @@ 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. - - - ### See Also diff --git a/content/cli/v7/commands/npm-init.md b/content/cli/v7/commands/npm-init.md index fb9be260bd2..083cdee9ec0 100644 --- a/content/cli/v7/commands/npm-init.md +++ b/content/cli/v7/commands/npm-init.md @@ -160,9 +160,6 @@ dot to represent the current directory in that context, e.g: `react-app .`: ### Configuration - - - #### `yes` * Default: null @@ -171,8 +168,6 @@ dot to represent the current directory in that context, e.g: `react-app .`: Automatically answer "yes" to any prompts that npm might print on the command line. - - #### `force` @@ -199,8 +194,6 @@ mistakes, unnecessary performance degradation, and malicious input. 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! - - #### `workspace` @@ -224,8 +217,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -237,10 +228,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-install-ci-test.md b/content/cli/v7/commands/npm-install-ci-test.md index 7f0a680a996..2926ad5f1ad 100644 --- a/content/cli/v7/commands/npm-install-ci-test.md +++ b/content/cli/v7/commands/npm-install-ci-test.md @@ -33,9 +33,6 @@ This command runs `npm ci` followed immediately by `npm test`. ### Configuration - - - #### `audit` * Default: true @@ -46,8 +43,6 @@ default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted. - - #### `ignore-scripts` @@ -61,8 +56,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `script-shell` @@ -72,10 +65,7 @@ will *not* run any pre- or post-scripts. The shell to use for scripts run with the `npm exec`, `npm run` and `npm init ` commands. - - - ### See Also diff --git a/content/cli/v7/commands/npm-install-test.md b/content/cli/v7/commands/npm-install-test.md index 81747145e0e..3d632509598 100644 --- a/content/cli/v7/commands/npm-install-test.md +++ b/content/cli/v7/commands/npm-install-test.md @@ -42,9 +42,6 @@ takes exactly the same arguments as `npm install`. ### Configuration - - - #### `save` * Default: true @@ -55,8 +52,6 @@ Save installed packages to a package.json file as dependencies. When used with the `npm rm` command, removes the dependency from package.json. - - #### `save-exact` @@ -66,8 +61,6 @@ package.json. Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. - - #### `global` @@ -83,8 +76,6 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - #### `global-style` @@ -98,8 +89,6 @@ 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. - - #### `legacy-bundling` @@ -111,8 +100,6 @@ 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. - - #### `strict-peer-deps` @@ -133,8 +120,6 @@ 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. - - #### `package-lock` @@ -148,8 +133,6 @@ 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`. - - #### `omit` @@ -169,8 +152,6 @@ 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. - - #### `ignore-scripts` @@ -184,8 +165,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `audit` @@ -197,8 +176,6 @@ default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted. - - #### `bin-links` @@ -212,8 +189,6 @@ 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. - - #### `fund` @@ -224,8 +199,6 @@ When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details. - - #### `dry-run` @@ -240,8 +213,6 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. - - #### `workspace` @@ -265,8 +236,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -278,10 +247,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-install.md b/content/cli/v7/commands/npm-install.md index 90da34cdd54..950598cc7df 100644 --- a/content/cli/v7/commands/npm-install.md +++ b/content/cli/v7/commands/npm-install.md @@ -426,9 +426,6 @@ does. These are some of the most common options related to installation. - - - #### `save` * Default: true @@ -439,8 +436,6 @@ Save installed packages to a package.json file as dependencies. When used with the `npm rm` command, removes the dependency from package.json. - - #### `save-exact` @@ -450,8 +445,6 @@ package.json. Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. - - #### `global` @@ -467,8 +460,6 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - #### `global-style` @@ -482,8 +473,6 @@ 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. - - #### `legacy-bundling` @@ -495,8 +484,6 @@ 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. - - #### `strict-peer-deps` @@ -517,8 +504,6 @@ 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. - - #### `package-lock` @@ -532,8 +517,6 @@ 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`. - - #### `omit` @@ -553,8 +536,6 @@ 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. - - #### `ignore-scripts` @@ -568,8 +549,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `audit` @@ -581,8 +560,6 @@ default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted. - - #### `bin-links` @@ -596,8 +573,6 @@ 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. - - #### `fund` @@ -608,8 +583,6 @@ When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details. - - #### `dry-run` @@ -624,8 +597,6 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. - - #### `workspace` @@ -649,8 +620,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -662,10 +631,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### Algorithm diff --git a/content/cli/v7/commands/npm-link.md b/content/cli/v7/commands/npm-link.md index 0a6c2ba9250..1cd1f1a0d54 100644 --- a/content/cli/v7/commands/npm-link.md +++ b/content/cli/v7/commands/npm-link.md @@ -126,9 +126,6 @@ workspace(s). ### Configuration - - - #### `save` * Default: true @@ -139,8 +136,6 @@ Save installed packages to a package.json file as dependencies. When used with the `npm rm` command, removes the dependency from package.json. - - #### `save-exact` @@ -150,8 +145,6 @@ package.json. Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. - - #### `global` @@ -167,8 +160,6 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - #### `global-style` @@ -182,8 +173,6 @@ 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. - - #### `legacy-bundling` @@ -195,8 +184,6 @@ 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. - - #### `strict-peer-deps` @@ -217,8 +204,6 @@ 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. - - #### `package-lock` @@ -232,8 +217,6 @@ 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`. - - #### `omit` @@ -253,8 +236,6 @@ 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. - - #### `ignore-scripts` @@ -268,8 +249,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `audit` @@ -281,8 +260,6 @@ default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted. - - #### `bin-links` @@ -296,8 +273,6 @@ 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. - - #### `fund` @@ -308,8 +283,6 @@ When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v7/commands/npm-fund) for details. - - #### `dry-run` @@ -324,8 +297,6 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. - - #### `workspace` @@ -349,8 +320,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -362,10 +331,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-logout.md b/content/cli/v7/commands/npm-logout.md index b13898f0a27..76249d33ac4 100644 --- a/content/cli/v7/commands/npm-logout.md +++ b/content/cli/v7/commands/npm-logout.md @@ -42,9 +42,6 @@ connected to that scope, if set. ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -52,8 +49,6 @@ connected to that scope, if set. The base URL of the npm registry. - - #### `scope` @@ -85,10 +80,7 @@ npm init --scope=@foo --yes ``` - - - ### See Also diff --git a/content/cli/v7/commands/npm-ls.md b/content/cli/v7/commands/npm-ls.md index 6c1c6a2a581..3aa69aac194 100644 --- a/content/cli/v7/commands/npm-ls.md +++ b/content/cli/v7/commands/npm-ls.md @@ -88,9 +88,6 @@ least the default human-readable `npm ls` output in npm v8. ### Configuration - - - #### `all` * Default: false @@ -100,8 +97,6 @@ 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. - - #### `json` @@ -115,8 +110,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `long` @@ -125,8 +118,6 @@ Not supported by all npm commands. Show extended information in `ls`, `search`, and `help-search`. - - #### `parseable` @@ -136,8 +127,6 @@ Show extended information in `ls`, `search`, and `help-search`. Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format. - - #### `global` @@ -153,8 +142,6 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - #### `depth` @@ -166,8 +153,6 @@ 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. - - #### `omit` @@ -187,8 +172,6 @@ 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. - - #### `link` @@ -197,8 +180,6 @@ variable will be set to `'production'` for all lifecycle scripts. Used with `npm ls`, limiting output to only those packages that are linked. - - #### `package-lock-only` @@ -214,8 +195,6 @@ 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`. - - #### `unicode` @@ -226,8 +205,6 @@ For `list` this means the output will be based on the tree described by the When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. - - #### `workspace` @@ -251,8 +228,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -264,10 +239,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-org.md b/content/cli/v7/commands/npm-org.md index 98a53a40e00..9f377bef261 100644 --- a/content/cli/v7/commands/npm-org.md +++ b/content/cli/v7/commands/npm-org.md @@ -75,9 +75,6 @@ listing them, and finding specific ones and their roles. ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -85,8 +82,6 @@ listing them, and finding specific ones and their roles. The base URL of the npm registry. - - #### `otp` @@ -99,8 +94,6 @@ 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. - - #### `json` @@ -114,8 +107,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `parseable` @@ -125,10 +116,7 @@ Not supported by all npm commands. Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format. - - - ### See Also diff --git a/content/cli/v7/commands/npm-outdated.md b/content/cli/v7/commands/npm-outdated.md index 60d8dc9dd59..d423379ebc6 100644 --- a/content/cli/v7/commands/npm-outdated.md +++ b/content/cli/v7/commands/npm-outdated.md @@ -101,9 +101,6 @@ A few things to note: ### Configuration - - - #### `all` * Default: false @@ -113,8 +110,6 @@ 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. - - #### `json` @@ -128,8 +123,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `long` @@ -138,8 +131,6 @@ Not supported by all npm commands. Show extended information in `ls`, `search`, and `help-search`. - - #### `parseable` @@ -149,8 +140,6 @@ Show extended information in `ls`, `search`, and `help-search`. Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format. - - #### `global` @@ -166,8 +155,6 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - #### `workspace` @@ -191,10 +178,7 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-owner.md b/content/cli/v7/commands/npm-owner.md index cd53aabacc6..c44be8401a1 100644 --- a/content/cli/v7/commands/npm-owner.md +++ b/content/cli/v7/commands/npm-owner.md @@ -52,9 +52,6 @@ on the command line when changing ownership with `--otp`. ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -62,8 +59,6 @@ on the command line when changing ownership with `--otp`. The base URL of the npm registry. - - #### `otp` @@ -76,10 +71,7 @@ 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. - - - ### See Also diff --git a/content/cli/v7/commands/npm-pack.md b/content/cli/v7/commands/npm-pack.md index b38f06fa86b..72a4f80ec94 100644 --- a/content/cli/v7/commands/npm-pack.md +++ b/content/cli/v7/commands/npm-pack.md @@ -27,9 +27,6 @@ npm pack [[<@scope>/]...] [--dry-run] [--json] ### Configuration - - - #### `dry-run` * Default: false @@ -43,8 +40,6 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. - - #### `json` @@ -58,8 +53,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `pack-destination` @@ -68,8 +61,6 @@ Not supported by all npm commands. Directory in which `npm pack` will save tarballs. - - #### `workspace` @@ -93,8 +84,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -106,10 +95,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### Description diff --git a/content/cli/v7/commands/npm-ping.md b/content/cli/v7/commands/npm-ping.md index 1d7007714cc..57032a1dd00 100644 --- a/content/cli/v7/commands/npm-ping.md +++ b/content/cli/v7/commands/npm-ping.md @@ -42,9 +42,6 @@ Ping error: {*Detail about error} ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -52,10 +49,7 @@ Ping error: {*Detail about error} The base URL of the npm registry. - - - ### See Also diff --git a/content/cli/v7/commands/npm-pkg.md b/content/cli/v7/commands/npm-pkg.md index 5dbda01b8d6..70dbaa57caf 100644 --- a/content/cli/v7/commands/npm-pkg.md +++ b/content/cli/v7/commands/npm-pkg.md @@ -179,9 +179,6 @@ npm pkg get name version --ws ### Configuration - - - #### `force` * Default: false @@ -207,8 +204,6 @@ mistakes, unnecessary performance degradation, and malicious input. 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! - - #### `json` @@ -222,8 +217,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `workspace` @@ -247,8 +240,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -260,10 +251,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ## See Also * [npm install](/cli/v7/commands/npm-install) diff --git a/content/cli/v7/commands/npm-prefix.md b/content/cli/v7/commands/npm-prefix.md index cc030b71d1d..13ce9f187f2 100644 --- a/content/cli/v7/commands/npm-prefix.md +++ b/content/cli/v7/commands/npm-prefix.md @@ -50,9 +50,6 @@ npm prefix -g ### Configuration - - - #### `global` * Default: false @@ -67,10 +64,7 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - - ### See Also diff --git a/content/cli/v7/commands/npm-profile.md b/content/cli/v7/commands/npm-profile.md index d972e61fb4d..1ea6f2d6960 100644 --- a/content/cli/v7/commands/npm-profile.md +++ b/content/cli/v7/commands/npm-profile.md @@ -90,9 +90,6 @@ Some of these commands may not be available on non npmjs.com registries. ### Configuration - - - #### `registry` * Default: "https://registry.npmjs.org/" @@ -100,8 +97,6 @@ Some of these commands may not be available on non npmjs.com registries. The base URL of the npm registry. - - #### `json` @@ -115,8 +110,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `parseable` @@ -126,8 +119,6 @@ Not supported by all npm commands. Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format. - - #### `otp` @@ -140,10 +131,7 @@ 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. - - - ### See Also diff --git a/content/cli/v7/commands/npm-prune.md b/content/cli/v7/commands/npm-prune.md index 1cae993e1d0..211dbed3cdc 100644 --- a/content/cli/v7/commands/npm-prune.md +++ b/content/cli/v7/commands/npm-prune.md @@ -50,9 +50,6 @@ this command can help clean up any resulting garbage. ### Configuration - - - #### `omit` * Default: 'dev' if the `NODE_ENV` environment variable is set to @@ -71,8 +68,6 @@ 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. - - #### `dry-run` @@ -87,8 +82,6 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. - - #### `json` @@ -102,8 +95,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `workspace` @@ -127,8 +118,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -140,10 +129,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-publish.md b/content/cli/v7/commands/npm-publish.md index 104c627e989..6d34b5b0267 100644 --- a/content/cli/v7/commands/npm-publish.md +++ b/content/cli/v7/commands/npm-publish.md @@ -121,9 +121,6 @@ built. ### Configuration - - - #### `tag` * Default: "latest" @@ -138,8 +135,6 @@ 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. - - #### `access` @@ -157,8 +152,6 @@ 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`. - - #### `dry-run` @@ -173,8 +166,6 @@ commands that modify your local installation, eg, `install`, `update`, Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc. - - #### `otp` @@ -187,8 +178,6 @@ 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. - - #### `workspace` @@ -212,8 +201,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -225,10 +212,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-rebuild.md b/content/cli/v7/commands/npm-rebuild.md index 6156b9f62f7..d02e6007fee 100644 --- a/content/cli/v7/commands/npm-rebuild.md +++ b/content/cli/v7/commands/npm-rebuild.md @@ -41,9 +41,6 @@ will be rebuilt. ### Configuration - - - #### `global` * Default: false @@ -58,8 +55,6 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - #### `bin-links` @@ -73,8 +68,6 @@ 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. - - #### `ignore-scripts` @@ -88,8 +81,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `workspace` @@ -113,8 +104,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -126,10 +115,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-repo.md b/content/cli/v7/commands/npm-repo.md index 2eb57e0c3f1..03c9ce46c95 100644 --- a/content/cli/v7/commands/npm-repo.md +++ b/content/cli/v7/commands/npm-repo.md @@ -34,9 +34,6 @@ in the current folder and use the `repository` property. ### Configuration - - - #### `browser` * Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` @@ -49,8 +46,6 @@ terminal. Set to `true` to use default system URL opener. - - #### `workspace` @@ -74,8 +69,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -87,10 +80,7 @@ workspaces. This value is not exported to the environment for child processes. - - - ### See Also diff --git a/content/cli/v7/commands/npm-restart.md b/content/cli/v7/commands/npm-restart.md index 9ae0db82394..77890528333 100644 --- a/content/cli/v7/commands/npm-restart.md +++ b/content/cli/v7/commands/npm-restart.md @@ -51,9 +51,6 @@ If it does _not_ have a `"restart"` script specified, but it does have ### Configuration - - - #### `ignore-scripts` * Default: false @@ -66,8 +63,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `script-shell` @@ -77,10 +72,7 @@ will *not* run any pre- or post-scripts. The shell to use for scripts run with the `npm exec`, `npm run` and `npm init ` commands. - - - ### See Also diff --git a/content/cli/v7/commands/npm-root.md b/content/cli/v7/commands/npm-root.md index a0f4dffd784..b2271f70e59 100644 --- a/content/cli/v7/commands/npm-root.md +++ b/content/cli/v7/commands/npm-root.md @@ -40,9 +40,6 @@ echo "Global packages installed in: ${global_node_modules}" ### Configuration - - - #### `global` * Default: false @@ -57,10 +54,7 @@ folder instead of the current working directory. See * bin files are linked to `{prefix}/bin` * man pages are linked to `{prefix}/share/man` - - - ### See Also diff --git a/content/cli/v7/commands/npm-run-script.md b/content/cli/v7/commands/npm-run-script.md index 35f8182ceaa..db25be26a38 100644 --- a/content/cli/v7/commands/npm-run-script.md +++ b/content/cli/v7/commands/npm-run-script.md @@ -151,9 +151,6 @@ packages. ### Configuration - - - #### `workspace` * Default: @@ -176,8 +173,6 @@ brand new workspace within the project. This value is not exported to the environment for child processes. - - #### `workspaces` @@ -189,8 +184,6 @@ workspaces. This value is not exported to the environment for child processes. - - #### `if-present` @@ -204,8 +197,6 @@ 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. - - #### `ignore-scripts` @@ -219,8 +210,6 @@ Note that commands explicitly intended to run a particular script, such as will still run their intended script if `ignore-scripts` is set, but they will *not* run any pre- or post-scripts. - - #### `script-shell` @@ -230,10 +219,7 @@ will *not* run any pre- or post-scripts. The shell to use for scripts run with the `npm exec`, `npm run` and `npm init ` commands. - - - ### See Also diff --git a/content/cli/v7/commands/npm-search.md b/content/cli/v7/commands/npm-search.md index b8a7fd7e036..863fbe4bcbf 100644 --- a/content/cli/v7/commands/npm-search.md +++ b/content/cli/v7/commands/npm-search.md @@ -54,9 +54,6 @@ expression characters in most shells.) ### Configuration - - - #### `long` * Default: false @@ -64,8 +61,6 @@ expression characters in most shells.) Show extended information in `ls`, `search`, and `help-search`. - - #### `json` @@ -79,8 +74,6 @@ Whether or not to output JSON data, rather than the normal output. Not supported by all npm commands. - - #### `color` @@ -90,8 +83,6 @@ Not supported by all npm commands. If false, never shows colors. If `"always"` then always shows colors. If true, then only prints color codes for tty file descriptors. - - #### `parseable` @@ -101,8 +92,6 @@ true, then only prints color codes for tty file descriptors. Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format. - - #### `description` @@ -111,8 +100,6 @@ Output parseable results from commands that write to standard output. For Show the description in `npm search` - - #### `searchopts` @@ -121,8 +108,6 @@ Show the description in `npm search` Space-separated options that are always passed to search. - - #### `searchexclude` @@ -131,8 +116,6 @@ Space-separated options that are always passed to search. Space-separated options that limit the results from search. - - #### `registry` @@ -141,8 +124,6 @@ Space-separated options that limit the results from search. The base URL of the npm registry. - - #### `prefer-online` @@ -152,8 +133,6 @@ The base URL of the npm registry. If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data. - - #### `prefer-offline` @@ -164,8 +143,6 @@ 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`. - - #### `offline` @@ -175,10 +152,7 @@ will be requested from the server. To force full offline mode, use Force offline mode: no network requests will be done during install. To allow the CLI to fill in missing cache data, see `--prefer-offline`. - - - ### See Also diff --git a/content/cli/v7/commands/npm-set-script.md b/content/cli/v7/commands/npm-set-script.md index 5f40f71ab08..3f1f3ea4c2f 100644 --- a/content/cli/v7/commands/npm-set-script.md +++ b/content/cli/v7/commands/npm-set-script.md @@ -43,9 +43,6 @@ npm set-script [