You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/cli/v10/commands/npm-ls.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Note: to get a "bottoms up" view of why a given package is included in the tree
52
52
Positional arguments are `name@version-range` identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will _also_ show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show:
Copy file name to clipboardExpand all lines: content/cli/v10/commands/npm-prune.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ This command removes "extraneous" packages. If a package name is provided, then
47
47
48
48
Extraneous packages are those present in the `node_modules` folder that are not listed as any package's dependency list.
49
49
50
-
If the `--production` flag is specified or the `NODE_ENV` environment variable is set to `production`, this command will remove the packages specified in your `devDependencies`. Setting `--no-production` will negate `NODE_ENV` being set to `production`.
50
+
If the `--omit=dev` flag is specified or the `NODE_ENV` environment variable is set to `production`, this command will remove the packages specified in your `devDependencies`.
51
51
52
52
If the `--dry-run` flag is used then no changes will actually be made.
Copy file name to clipboardExpand all lines: content/cli/v10/commands/npm-view.mdx
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,12 @@ Field names can be specified after the package descriptor. For example, to show
61
61
npm view ronn@0.3.5 dependencies
62
62
```
63
63
64
+
By default, `npm view` shows data about the current project context (by looking for a `package.json`). To show field data for the current project use a file path (i.e. `.`):
65
+
66
+
```bash
67
+
npm view . dependencies
68
+
```
69
+
64
70
You can view child fields by separating them with a period. To view the git repository URL for the latest version of `npm`, you would run the following command:
-[`f3a7380`](https://github.com/npm/cli/commit/f3a7380a45323dbf6c74015e418de3963fb11a69)[#6973](https://github.com/npm/cli/pull/6973) look in workspace for exec commands (#6973) (@wraithgar)
24
+
-[`d11496b`](https://github.com/npm/cli/commit/d11496b26dfee5957e7e2a1b328f346b2aca9348)[#6977](https://github.com/npm/cli/pull/6977) pkg: properly output in workspace mode (#6977) (@wraithgar)
25
+
-[`0f70088`](https://github.com/npm/cli/commit/0f7008851f1c250405e8dc326f15d535e8fc1eae)[#6969](https://github.com/npm/cli/pull/6969) correctly handle object licenses in SBOM generation (#6969) (@jamietanna)
-[`4613774`](https://github.com/npm/cli/commit/461377426d998ed79400501b09e1ee67c32bee23)[#6994](https://github.com/npm/cli/pull/6994) hoisting newer deps in favor of older ones
Copy file name to clipboardExpand all lines: content/cli/v9/commands/npm-ls.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Note: to get a "bottoms up" view of why a given package is included in the tree
36
36
Positional arguments are `name@version-range` identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will _also_ show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show:
Copy file name to clipboardExpand all lines: content/cli/v9/commands/npm-prune.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ This command removes "extraneous" packages. If a package name is provided, then
31
31
32
32
Extraneous packages are those present in the `node_modules` folder that are not listed as any package's dependency list.
33
33
34
-
If the `--production` flag is specified or the `NODE_ENV` environment variable is set to `production`, this command will remove the packages specified in your `devDependencies`. Setting `--no-production` will negate `NODE_ENV` being set to `production`.
34
+
If the `--omit=dev` flag is specified or the `NODE_ENV` environment variable is set to `production`, this command will remove the packages specified in your `devDependencies`.
35
35
36
36
If the `--dry-run` flag is used then no changes will actually be made.
-[`4c9a5e1`](https://github.com/npm/cli/commit/4c9a5e15cdb7195a0781d765997eab49ef759d36)[#6993](https://github.com/npm/cli/pull/6993) look in workspace for exec commands (#6993) (@wraithgar)
0 commit comments