diff --git a/deps/npm/README.md b/deps/npm/README.md index 822cdecc292948..46846fa0087b50 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -4,7 +4,11 @@ ### Requirements -* [**Node.js** `v10`](https://nodejs.org/en/download/) or higher must be installed to run this program +One of the following versions of [Node.js](https://nodejs.org/en/download/) must be installed to run **`npm`**: + +* `12.x.x` >= `12.13.0` +* `14.x.x` >= `14.15.0` +* `16.0.0` or higher ### Installation diff --git a/deps/npm/docs/content/commands/npm-audit.md b/deps/npm/docs/content/commands/npm-audit.md index 9fa8c0fcc6f8c3..58c614d793db29 100644 --- a/deps/npm/docs/content/commands/npm-audit.md +++ b/deps/npm/docs/content/commands/npm-audit.md @@ -313,8 +313,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -327,17 +327,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-dedupe.md b/deps/npm/docs/content/commands/npm-dedupe.md index dcb2a98fe9fd11..377e17d814a6f6 100644 --- a/deps/npm/docs/content/commands/npm-dedupe.md +++ b/deps/npm/docs/content/commands/npm-dedupe.md @@ -247,8 +247,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -261,17 +261,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-diff.md b/deps/npm/docs/content/commands/npm-diff.md index cf0bbec15f46f8..8d05df779f3ca5 100644 --- a/deps/npm/docs/content/commands/npm-diff.md +++ b/deps/npm/docs/content/commands/npm-diff.md @@ -286,8 +286,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -300,17 +300,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ## See Also diff --git a/deps/npm/docs/content/commands/npm-dist-tag.md b/deps/npm/docs/content/commands/npm-dist-tag.md index 4ad68ff56d067c..a4e0243aac87b3 100644 --- a/deps/npm/docs/content/commands/npm-dist-tag.md +++ b/deps/npm/docs/content/commands/npm-dist-tag.md @@ -106,8 +106,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -120,17 +120,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-docs.md b/deps/npm/docs/content/commands/npm-docs.md index 9f1387daef8edd..970d17aa829c6e 100644 --- a/deps/npm/docs/content/commands/npm-docs.md +++ b/deps/npm/docs/content/commands/npm-docs.md @@ -63,8 +63,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -77,17 +77,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-exec.md b/deps/npm/docs/content/commands/npm-exec.md index 82908d65e01d37..db23536628e476 100644 --- a/deps/npm/docs/content/commands/npm-exec.md +++ b/deps/npm/docs/content/commands/npm-exec.md @@ -164,8 +164,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -178,17 +178,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### Examples diff --git a/deps/npm/docs/content/commands/npm-explain.md b/deps/npm/docs/content/commands/npm-explain.md index 4a8af2f70003ee..5f05cac0f906b0 100644 --- a/deps/npm/docs/content/commands/npm-explain.md +++ b/deps/npm/docs/content/commands/npm-explain.md @@ -85,8 +85,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a diff --git a/deps/npm/docs/content/commands/npm-find-dupes.md b/deps/npm/docs/content/commands/npm-find-dupes.md index e9dbac6d181489..f7dc84f9c5306d 100644 --- a/deps/npm/docs/content/commands/npm-find-dupes.md +++ b/deps/npm/docs/content/commands/npm-find-dupes.md @@ -174,8 +174,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -188,17 +188,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-fund.md b/deps/npm/docs/content/commands/npm-fund.md index 83c0b13d8cbb41..606b0a188c5549 100644 --- a/deps/npm/docs/content/commands/npm-fund.md +++ b/deps/npm/docs/content/commands/npm-fund.md @@ -122,8 +122,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a diff --git a/deps/npm/docs/content/commands/npm-init.md b/deps/npm/docs/content/commands/npm-init.md index 7355c75884b8f3..a608061a96d8dc 100644 --- a/deps/npm/docs/content/commands/npm-init.md +++ b/deps/npm/docs/content/commands/npm-init.md @@ -200,8 +200,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -214,17 +214,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-install-test.md b/deps/npm/docs/content/commands/npm-install-test.md index c2f9ab3d2f46ca..c464e5bd0b8c64 100644 --- a/deps/npm/docs/content/commands/npm-install-test.md +++ b/deps/npm/docs/content/commands/npm-install-test.md @@ -241,8 +241,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -255,17 +255,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-install.md b/deps/npm/docs/content/commands/npm-install.md index de73787181a501..a103845d1a6758 100644 --- a/deps/npm/docs/content/commands/npm-install.md +++ b/deps/npm/docs/content/commands/npm-install.md @@ -625,8 +625,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -639,17 +639,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### Algorithm diff --git a/deps/npm/docs/content/commands/npm-link.md b/deps/npm/docs/content/commands/npm-link.md index 5811a8b23b9a56..d4ef41ae964628 100644 --- a/deps/npm/docs/content/commands/npm-link.md +++ b/deps/npm/docs/content/commands/npm-link.md @@ -325,8 +325,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -339,17 +339,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 528140bee95a9a..3b33f0a3605e08 100644 --- a/deps/npm/docs/content/commands/npm-ls.md +++ b/deps/npm/docs/content/commands/npm-ls.md @@ -227,8 +227,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -241,17 +241,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-outdated.md b/deps/npm/docs/content/commands/npm-outdated.md index 8eb5528c3d0f43..1b58a6afda64bb 100644 --- a/deps/npm/docs/content/commands/npm-outdated.md +++ b/deps/npm/docs/content/commands/npm-outdated.md @@ -167,8 +167,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a diff --git a/deps/npm/docs/content/commands/npm-pack.md b/deps/npm/docs/content/commands/npm-pack.md index dda30512db8e32..53945986837b94 100644 --- a/deps/npm/docs/content/commands/npm-pack.md +++ b/deps/npm/docs/content/commands/npm-pack.md @@ -69,8 +69,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -83,17 +83,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### Description diff --git a/deps/npm/docs/content/commands/npm-pkg.md b/deps/npm/docs/content/commands/npm-pkg.md index bf6a2df5da6bce..beee9c1c4e78a9 100644 --- a/deps/npm/docs/content/commands/npm-pkg.md +++ b/deps/npm/docs/content/commands/npm-pkg.md @@ -223,8 +223,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -237,12 +237,20 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. diff --git a/deps/npm/docs/content/commands/npm-prune.md b/deps/npm/docs/content/commands/npm-prune.md index 7bd7ad13113230..658ab2610e0ed9 100644 --- a/deps/npm/docs/content/commands/npm-prune.md +++ b/deps/npm/docs/content/commands/npm-prune.md @@ -103,8 +103,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -117,17 +117,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-publish.md b/deps/npm/docs/content/commands/npm-publish.md index 946109de404c2c..6958b1066de7fd 100644 --- a/deps/npm/docs/content/commands/npm-publish.md +++ b/deps/npm/docs/content/commands/npm-publish.md @@ -188,8 +188,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -202,17 +202,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-rebuild.md b/deps/npm/docs/content/commands/npm-rebuild.md index 19684796f8f532..75e71c60e6810a 100644 --- a/deps/npm/docs/content/commands/npm-rebuild.md +++ b/deps/npm/docs/content/commands/npm-rebuild.md @@ -89,8 +89,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -103,17 +103,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-repo.md b/deps/npm/docs/content/commands/npm-repo.md index c3c509e0b4b98b..cd47fde47127ee 100644 --- a/deps/npm/docs/content/commands/npm-repo.md +++ b/deps/npm/docs/content/commands/npm-repo.md @@ -50,8 +50,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -64,17 +64,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-run-script.md b/deps/npm/docs/content/commands/npm-run-script.md index e436bc27f9d2ae..6dd602d03e00ad 100644 --- a/deps/npm/docs/content/commands/npm-run-script.md +++ b/deps/npm/docs/content/commands/npm-run-script.md @@ -152,8 +152,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -166,17 +166,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + #### `if-present` * Default: false diff --git a/deps/npm/docs/content/commands/npm-set-script.md b/deps/npm/docs/content/commands/npm-set-script.md index e39b7a18c09f4e..869ceede045ae3 100644 --- a/deps/npm/docs/content/commands/npm-set-script.md +++ b/deps/npm/docs/content/commands/npm-set-script.md @@ -44,8 +44,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -58,17 +58,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-uninstall.md b/deps/npm/docs/content/commands/npm-uninstall.md index c04e1a7fd417b1..824d0d8760e0be 100644 --- a/deps/npm/docs/content/commands/npm-uninstall.md +++ b/deps/npm/docs/content/commands/npm-uninstall.md @@ -85,8 +85,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -99,17 +99,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-unpublish.md b/deps/npm/docs/content/commands/npm-unpublish.md index 1678bb305dc3da..13589a03ee69fa 100644 --- a/deps/npm/docs/content/commands/npm-unpublish.md +++ b/deps/npm/docs/content/commands/npm-unpublish.md @@ -107,8 +107,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -121,12 +121,20 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. diff --git a/deps/npm/docs/content/commands/npm-update.md b/deps/npm/docs/content/commands/npm-update.md index 57b9b91f9783e8..ad02118e4687f1 100644 --- a/deps/npm/docs/content/commands/npm-update.md +++ b/deps/npm/docs/content/commands/npm-update.md @@ -341,8 +341,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -355,17 +355,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### See Also diff --git a/deps/npm/docs/content/commands/npm-version.md b/deps/npm/docs/content/commands/npm-version.md index a02bf5bb99ba2e..91ab0dee042ecc 100644 --- a/deps/npm/docs/content/commands/npm-version.md +++ b/deps/npm/docs/content/commands/npm-version.md @@ -103,8 +103,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -117,17 +117,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### Description diff --git a/deps/npm/docs/content/commands/npm-view.md b/deps/npm/docs/content/commands/npm-view.md index af354deb88abab..9a1793f13fa564 100644 --- a/deps/npm/docs/content/commands/npm-view.md +++ b/deps/npm/docs/content/commands/npm-view.md @@ -127,8 +127,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -141,17 +141,39 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + ### Output diff --git a/deps/npm/docs/content/using-npm/config.md b/deps/npm/docs/content/using-npm/config.md index 10e8ca9b9dcff1..ddabe01d7d8d4c 100644 --- a/deps/npm/docs/content/using-npm/config.md +++ b/deps/npm/docs/content/using-npm/config.md @@ -806,6 +806,20 @@ This is experimental, and not implemented by the npm public registry. +#### `include-workspace-root` + +* Default: false +* Type: Boolean + +Include the workspace root when workspaces are enabled for a command. + +When false, specifying individual workspaces via the `workspace` config, or +all workspaces via the `workspaces` flag, will cause npm to operate only on +the specified workspaces, and not on the root project. + + + + #### `init-author-email` * Default: "" @@ -969,6 +983,31 @@ When passed to `npm config` this refers to which config file to use. +#### `lockfile-version` + +* Default: Version 2 if no lockfile or current lockfile version less than or + equal to 2, otherwise maintain current lockfile version +* Type: null, 1, 2, or 3 + +Set the lockfile format version to be used in package-lock.json and +npm-shrinkwrap-json files. Possible options are: + +1: The lockfile version used by npm versions 5 and 6. Lacks some data that +is used during the install, resulting in slower and possibly less +deterministic installs. Prevents lockfile churn when interoperating with +older npm versions. + +2: The default lockfile version used by npm version 7. Includes both the +version 1 lockfile data and version 3 lockfile data, for maximum determinism +and interoperability, at the expense of more bytes on disk. + +3: Only the new lockfile information introduced in npm version 7. Smaller on +disk than lockfile version 2, but not interoperable with older npm versions. +Ideal if all users are on npm version 7 and higher. + + + + #### `loglevel` * Default: "notice" @@ -1744,8 +1783,8 @@ Valid values for the `workspace` config are either: * Workspace names * Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) +* Path to a parent workspace directory (will result in selecting all + workspaces within that folder) When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a @@ -1758,12 +1797,20 @@ This value is not exported to the environment for child processes. #### `workspaces` -* Default: false -* Type: Boolean +* Default: null +* Type: null or Boolean -Enable running a command in the context of **all** the configured +Set to true to run the command in the context of **all** configured workspaces. +Explicitly setting this to false will cause commands like `install` to +ignore workspaces altogether. When not set explicitly: + +- Commands that operate on the `node_modules` tree (install, update, etc.) +will link workspaces into the `node_modules` folder. - Commands that do +other things (test, exec, publish, etc.) will operate on the root project, +_unless_ one or more workspaces are specified in the `workspace` config. + This value is not exported to the environment for child processes. diff --git a/deps/npm/docs/content/using-npm/workspaces.md b/deps/npm/docs/content/using-npm/workspaces.md index baf84f543f017a..fc299072253937 100644 --- a/deps/npm/docs/content/using-npm/workspaces.md +++ b/deps/npm/docs/content/using-npm/workspaces.md @@ -109,7 +109,7 @@ respect the provided `workspace` configuration. ### Using workspaces Given the [specifities of how Node.js handles module resolution](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html#modules_all_together) it's possible to consume any defined workspace -by it's declared `package.json` `name`. Continuing from the example defined +by its declared `package.json` `name`. Continuing from the example defined above, let's also create a Node.js script that will require the `workspace-a` example module, e.g: diff --git a/deps/npm/docs/output/commands/npm-audit.html b/deps/npm/docs/output/commands/npm-audit.html index 37bc32edd9237c..570638420f6600 100644 --- a/deps/npm/docs/output/commands/npm-audit.html +++ b/deps/npm/docs/output/commands/npm-audit.html @@ -141,7 +141,7 @@
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -385,14 +385,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -345,14 +345,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -379,14 +379,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -235,14 +235,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -201,14 +201,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -278,14 +278,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
Run the version of tap
in the local dependencies, with the provided
diff --git a/deps/npm/docs/output/commands/npm-explain.html b/deps/npm/docs/output/commands/npm-explain.html
index a62c45d323e185..8032ccf3a961a8 100644
--- a/deps/npm/docs/output/commands/npm-explain.html
+++ b/deps/npm/docs/output/commands/npm-explain.html
@@ -210,8 +210,8 @@
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
diff --git a/deps/npm/docs/output/commands/npm-find-dupes.html b/deps/npm/docs/output/commands/npm-find-dupes.html
index 00f77f3d74fd18..ef4953c8995f76 100644
--- a/deps/npm/docs/output/commands/npm-find-dupes.html
+++ b/deps/npm/docs/output/commands/npm-find-dupes.html
@@ -141,7 +141,7 @@
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -291,14 +291,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
diff --git a/deps/npm/docs/output/commands/npm-init.html b/deps/npm/docs/output/commands/npm-init.html
index b9733a3b529c4f..b6cc14c8c65ad5 100644
--- a/deps/npm/docs/output/commands/npm-init.html
+++ b/deps/npm/docs/output/commands/npm-init.html
@@ -141,7 +141,7 @@
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -305,14 +305,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -349,14 +349,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -671,14 +671,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
Given a package{dep}
structure: A{B,C}, B{C}, C{D}
,
diff --git a/deps/npm/docs/output/commands/npm-link.html b/deps/npm/docs/output/commands/npm-link.html
index ca480e8d856673..cff52fc7fe01e4 100644
--- a/deps/npm/docs/output/commands/npm-link.html
+++ b/deps/npm/docs/output/commands/npm-link.html
@@ -141,7 +141,7 @@
workspace
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -405,14 +405,33 @@
workspace
workspaces
Enable running a command in the context of all the configured +
Set to true to run the command in the context of all configured workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.This value is not exported to the environment for child processes.
+include-workspace-root
Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
npm ls promzard
in npm’s source tree will show:
-npm@8.0.0 /path/to/npm
+npm@8.1.0 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
@@ -320,8 +320,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -331,14 +331,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-outdated.html b/deps/npm/docs/output/commands/npm-outdated.html
index 8b129712698aed..a7edb858c4751b 100644
--- a/deps/npm/docs/output/commands/npm-outdated.html
+++ b/deps/npm/docs/output/commands/npm-outdated.html
@@ -285,8 +285,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
diff --git a/deps/npm/docs/output/commands/npm-pack.html b/deps/npm/docs/output/commands/npm-pack.html
index 0852c0becb6bd8..a5a3bf31167a6d 100644
--- a/deps/npm/docs/output/commands/npm-pack.html
+++ b/deps/npm/docs/output/commands/npm-pack.html
@@ -141,7 +141,7 @@
npm-pack
Table of contents
-
+
Synopsis
@@ -197,8 +197,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -208,14 +208,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
Description
For anything that’s installable (that is, a package folder, tarball,
diff --git a/deps/npm/docs/output/commands/npm-pkg.html b/deps/npm/docs/output/commands/npm-pkg.html
index 3adab8936dc864..5de2e71927747b 100644
--- a/deps/npm/docs/output/commands/npm-pkg.html
+++ b/deps/npm/docs/output/commands/npm-pkg.html
@@ -307,8 +307,8 @@
workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -318,11 +318,19 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
diff --git a/deps/npm/docs/output/commands/npm-prune.html b/deps/npm/docs/output/commands/npm-prune.html
index cef16bf889ea7c..0f7ee019d59272 100644
--- a/deps/npm/docs/output/commands/npm-prune.html
+++ b/deps/npm/docs/output/commands/npm-prune.html
@@ -141,7 +141,7 @@ npm-prune
Table of contents
-
+
Synopsis
@@ -221,8 +221,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -232,14 +232,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-publish.html b/deps/npm/docs/output/commands/npm-publish.html
index e46684630ce9e6..e757b367192c8b 100644
--- a/deps/npm/docs/output/commands/npm-publish.html
+++ b/deps/npm/docs/output/commands/npm-publish.html
@@ -141,7 +141,7 @@ npm-publish
Table of contents
-
+
Synopsis
@@ -315,8 +315,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -326,14 +326,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-rebuild.html b/deps/npm/docs/output/commands/npm-rebuild.html
index b446218c19f307..571256e0a75bd6 100644
--- a/deps/npm/docs/output/commands/npm-rebuild.html
+++ b/deps/npm/docs/output/commands/npm-rebuild.html
@@ -141,7 +141,7 @@ npm-rebuild
Table of contents
-
+
Synopsis
@@ -214,8 +214,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -225,14 +225,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-repo.html b/deps/npm/docs/output/commands/npm-repo.html
index 84d63dbbfeda4e..2d623c5ce1e6ce 100644
--- a/deps/npm/docs/output/commands/npm-repo.html
+++ b/deps/npm/docs/output/commands/npm-repo.html
@@ -141,7 +141,7 @@ npm-repo
Table of contents
-
+
Synopsis
@@ -179,8 +179,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -190,14 +190,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-run-script.html b/deps/npm/docs/output/commands/npm-run-script.html
index d99ea0ec01495b..e8e862b7684225 100644
--- a/deps/npm/docs/output/commands/npm-run-script.html
+++ b/deps/npm/docs/output/commands/npm-run-script.html
@@ -141,7 +141,7 @@ npm-run-script
Table of contents
-
+
Synopsis
@@ -249,8 +249,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -260,14 +260,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
if-present
- Default: false
diff --git a/deps/npm/docs/output/commands/npm-set-script.html b/deps/npm/docs/output/commands/npm-set-script.html
index a0bf20fd178114..b877ec0baf2a0c 100644
--- a/deps/npm/docs/output/commands/npm-set-script.html
+++ b/deps/npm/docs/output/commands/npm-set-script.html
@@ -141,7 +141,7 @@ npm-set-script
Table of contents
-
+
Synopsis
@@ -176,8 +176,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -187,14 +187,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-uninstall.html b/deps/npm/docs/output/commands/npm-uninstall.html
index be2c7b53c752af..725b13cf7659b5 100644
--- a/deps/npm/docs/output/commands/npm-uninstall.html
+++ b/deps/npm/docs/output/commands/npm-uninstall.html
@@ -141,7 +141,7 @@ npm-uninstall
Table of contents
-
+
Synopsis
@@ -202,8 +202,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -213,14 +213,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-unpublish.html b/deps/npm/docs/output/commands/npm-unpublish.html
index 80748d9867dcd8..fab757362e7701 100644
--- a/deps/npm/docs/output/commands/npm-unpublish.html
+++ b/deps/npm/docs/output/commands/npm-unpublish.html
@@ -223,8 +223,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -234,11 +234,19 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
diff --git a/deps/npm/docs/output/commands/npm-update.html b/deps/npm/docs/output/commands/npm-update.html
index b24f88128177e6..8f832e8bb5006b 100644
--- a/deps/npm/docs/output/commands/npm-update.html
+++ b/deps/npm/docs/output/commands/npm-update.html
@@ -141,7 +141,7 @@ npm-update
Table of contents
-
+- Synopsis
- Description
- Example
- Caret Dependencies
- Tilde Dependencies
- Caret Dependencies below 1.0.0
- Subdependencies
- Updating Globally-Installed Packages
- Configuration
global
global-style
legacy-bundling
strict-peer-deps
package-lock
omit
ignore-scripts
audit
bin-links
fund
dry-run
workspace
workspaces
include-workspace-root
- See Also
Synopsis
@@ -403,8 +403,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -414,14 +414,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
See Also
diff --git a/deps/npm/docs/output/commands/npm-version.html b/deps/npm/docs/output/commands/npm-version.html
index 8afab365cc7cd0..016a4bb9deceb9 100644
--- a/deps/npm/docs/output/commands/npm-version.html
+++ b/deps/npm/docs/output/commands/npm-version.html
@@ -141,7 +141,7 @@ npm-version
Table of contents
-
+
Synopsis
@@ -225,8 +225,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -236,14 +236,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
Description
Run this in a package directory to bump the version and write the new data
diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html
index 25dd5e6b97d8ed..e82ff4b6274493 100644
--- a/deps/npm/docs/output/commands/npm-view.html
+++ b/deps/npm/docs/output/commands/npm-view.html
@@ -141,7 +141,7 @@
npm-view
Table of contents
-
+
Synopsis
@@ -227,8 +227,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -238,14 +238,33 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
Output
If only a single string field for a single version is output, then it
diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
index 9e94824898839c..82ed8a80baa777 100644
--- a/deps/npm/docs/output/commands/npm.html
+++ b/deps/npm/docs/output/commands/npm.html
@@ -148,7 +148,7 @@
Table of contents
npm <command> [args]
Version
-8.0.0
+8.1.0
Description
npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
diff --git a/deps/npm/docs/output/using-npm/config.html b/deps/npm/docs/output/using-npm/config.html
index eb8a7712e5c58f..1f67ec7939bd36 100644
--- a/deps/npm/docs/output/using-npm/config.html
+++ b/deps/npm/docs/output/using-npm/config.html
@@ -141,7 +141,7 @@
config
Table of contents
-- Description
- Shorthands and Other CLI Niceties
- Config Settings
_auth
access
all
allow-same-version
audit
audit-level
before
bin-links
browser
ca
cache
cafile
call
cert
ci-name
cidr
color
commit-hooks
depth
description
diff
diff-dst-prefix
diff-ignore-all-space
diff-name-only
diff-no-prefix
diff-src-prefix
diff-text
diff-unified
dry-run
editor
engine-strict
fetch-retries
fetch-retry-factor
fetch-retry-maxtimeout
fetch-retry-mintimeout
fetch-timeout
force
foreground-scripts
format-package-lock
fund
git
git-tag-version
global
global-style
globalconfig
heading
https-proxy
if-present
ignore-scripts
include
include-staged
init-author-email
init-author-name
init-author-url
init-license
init-module
init-version
json
key
legacy-bundling
legacy-peer-deps
link
local-address
location
loglevel
logs-max
long
maxsockets
message
node-options
node-version
noproxy
npm-version
offline
omit
otp
pack-destination
package
package-lock
package-lock-only
parseable
prefer-offline
prefer-online
prefix
preid
progress
proxy
read-only
rebuild-bundle
registry
save
save-bundle
save-dev
save-exact
save-optional
save-peer
save-prefix
save-prod
scope
script-shell
searchexclude
searchlimit
searchopts
searchstaleness
shell
sign-git-commit
sign-git-tag
strict-peer-deps
strict-ssl
tag
tag-version-prefix
timing
umask
unicode
update-notifier
usage
user-agent
userconfig
version
versions
viewer
which
workspace
workspaces
yes
also
auth-type
cache-max
cache-min
dev
init.author.email
init.author.name
init.author.url
init.license
init.module
init.version
only
optional
production
shrinkwrap
sso-poll-frequency
sso-type
tmp
- See also
+- Description
- Shorthands and Other CLI Niceties
- Config Settings
_auth
access
all
allow-same-version
audit
audit-level
before
bin-links
browser
ca
cache
cafile
call
cert
ci-name
cidr
color
commit-hooks
depth
description
diff
diff-dst-prefix
diff-ignore-all-space
diff-name-only
diff-no-prefix
diff-src-prefix
diff-text
diff-unified
dry-run
editor
engine-strict
fetch-retries
fetch-retry-factor
fetch-retry-maxtimeout
fetch-retry-mintimeout
fetch-timeout
force
foreground-scripts
format-package-lock
fund
git
git-tag-version
global
global-style
globalconfig
heading
https-proxy
if-present
ignore-scripts
include
include-staged
include-workspace-root
init-author-email
init-author-name
init-author-url
init-license
init-module
init-version
json
key
legacy-bundling
legacy-peer-deps
link
local-address
location
lockfile-version
loglevel
logs-max
long
maxsockets
message
node-options
node-version
noproxy
npm-version
offline
omit
otp
pack-destination
package
package-lock
package-lock-only
parseable
prefer-offline
prefer-online
prefix
preid
progress
proxy
read-only
rebuild-bundle
registry
save
save-bundle
save-dev
save-exact
save-optional
save-peer
save-prefix
save-prod
scope
script-shell
searchexclude
searchlimit
searchopts
searchstaleness
shell
sign-git-commit
sign-git-tag
strict-peer-deps
strict-ssl
tag
tag-version-prefix
timing
umask
unicode
update-notifier
usage
user-agent
userconfig
version
versions
viewer
which
workspace
workspaces
yes
also
auth-type
cache-max
cache-min
dev
init.author.email
init.author.name
init.author.url
init.license
init.module
init.version
only
optional
production
shrinkwrap
sso-poll-frequency
sso-type
tmp
- See also
Description
@@ -793,6 +793,17 @@ include-staged
This is experimental, and not implemented by the npm public registry.
+include-workspace-root
+
+- Default: false
+- Type: Boolean
+
+Include the workspace root when workspaces are enabled for a command.
+When false, specifying individual workspaces via the workspace
config, or
+all workspaces via the workspaces
flag, will cause npm to operate only on
+the specified workspaces, and not on the root project.
+
+
init-author-email
- Default: “”
@@ -924,6 +935,26 @@ location
When passed to npm config
this refers to which config file to use.
+lockfile-version
+
+- Default: Version 2 if no lockfile or current lockfile version less than or
+equal to 2, otherwise maintain current lockfile version
+- Type: null, 1, 2, or 3
+
+Set the lockfile format version to be used in package-lock.json and
+npm-shrinkwrap-json files. Possible options are:
+1: The lockfile version used by npm versions 5 and 6. Lacks some data that
+is used during the install, resulting in slower and possibly less
+deterministic installs. Prevents lockfile churn when interoperating with
+older npm versions.
+2: The default lockfile version used by npm version 7. Includes both the
+version 1 lockfile data and version 3 lockfile data, for maximum determinism
+and interoperability, at the expense of more bytes on disk.
+3: Only the new lockfile information introduced in npm version 7. Smaller on
+disk than lockfile version 2, but not interoperable with older npm versions.
+Ideal if all users are on npm version 7 and higher.
+
+
loglevel
- Default: “notice”
@@ -1541,8 +1572,8 @@ workspace
- Workspace names
- Path to a workspace directory
-- Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+- Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
When set for the npm init
command, this may be set to the folder of a
workspace which does not yet exist, to create the folder and set it up as a
@@ -1552,11 +1583,19 @@
workspace
workspaces
-- Default: false
-- Type: Boolean
+- Default: null
+- Type: null or Boolean
-Enable running a command in the context of all the configured
+
Set to true to run the command in the context of all configured
workspaces.
+Explicitly setting this to false will cause commands like install
to
+ignore workspaces altogether. When not set explicitly:
+
+- Commands that operate on the
node_modules
tree (install, update, etc.)
+will link workspaces into the node_modules
folder. - Commands that do
+other things (test, exec, publish, etc.) will operate on the root project,
+unless one or more workspaces are specified in the workspace
config.
+
This value is not exported to the environment for child processes.
diff --git a/deps/npm/docs/output/using-npm/workspaces.html b/deps/npm/docs/output/using-npm/workspaces.html
index 8efacb2260f0e9..530c9c2fdf6e10 100644
--- a/deps/npm/docs/output/using-npm/workspaces.html
+++ b/deps/npm/docs/output/using-npm/workspaces.html
@@ -219,7 +219,7 @@ Adding dependencies to a workspace
respect the provided workspace
configuration.
Using workspaces
Given the specifities of how Node.js handles module resolution it’s possible to consume any defined workspace
-by it’s declared package.json
name
. Continuing from the example defined
+by its declared package.json
name
. Continuing from the example defined
above, let’s also create a Node.js script that will require the workspace-a
example module, e.g:
// ./workspace-a/index.js
diff --git a/deps/npm/index.js b/deps/npm/index.js
new file mode 100644
index 00000000000000..5447643e04b66b
--- /dev/null
+++ b/deps/npm/index.js
@@ -0,0 +1,5 @@
+if (require.main === module) {
+ require('./lib/cli.js')(process)
+} else {
+ throw new Error('The programmatic API was removed in npm v8.0.0')
+}
diff --git a/deps/npm/lib/base-command.js b/deps/npm/lib/base-command.js
index 870c69acc492d7..c5bd3fd94f960c 100644
--- a/deps/npm/lib/base-command.js
+++ b/deps/npm/lib/base-command.js
@@ -7,8 +7,6 @@ class BaseCommand {
constructor (npm) {
this.wrapWidth = 80
this.npm = npm
- this.workspaces = null
- this.workspacePaths = null
}
get name () {
@@ -75,7 +73,13 @@ class BaseCommand {
}
async setWorkspaces (filters) {
- const ws = await getWorkspaces(filters, { path: this.npm.localPrefix })
+ if (this.isArboristCmd)
+ this.includeWorkspaceRoot = false
+
+ const ws = await getWorkspaces(filters, {
+ path: this.npm.localPrefix,
+ includeWorkspaceRoot: this.includeWorkspaceRoot,
+ })
this.workspaces = ws
this.workspaceNames = [...ws.keys()]
this.workspacePaths = [...ws.values()]
diff --git a/deps/npm/lib/diff.js b/deps/npm/lib/diff.js
index 01658c4664d05b..b1a32705c0644a 100644
--- a/deps/npm/lib/diff.js
+++ b/deps/npm/lib/diff.js
@@ -43,6 +43,7 @@ class Diff extends BaseCommand {
'tag',
'workspace',
'workspaces',
+ 'include-workspace-root',
]
}
diff --git a/deps/npm/lib/dist-tag.js b/deps/npm/lib/dist-tag.js
index e32dcf61fff80f..be44f39ff25333 100644
--- a/deps/npm/lib/dist-tag.js
+++ b/deps/npm/lib/dist-tag.js
@@ -14,7 +14,7 @@ class DistTag extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['workspace', 'workspaces']
+ return ['workspace', 'workspaces', 'include-workspace-root']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/deps/npm/lib/docs.js b/deps/npm/lib/docs.js
index 69a19c35c3a138..51f8be38821792 100644
--- a/deps/npm/lib/docs.js
+++ b/deps/npm/lib/docs.js
@@ -17,7 +17,13 @@ class Docs extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['browser', 'registry', 'workspace', 'workspaces']
+ return [
+ 'browser',
+ 'registry',
+ 'workspace',
+ 'workspaces',
+ 'include-workspace-root',
+ ]
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/deps/npm/lib/exec.js b/deps/npm/lib/exec.js
index 8c64c2f2405813..d11947483e26ef 100644
--- a/deps/npm/lib/exec.js
+++ b/deps/npm/lib/exec.js
@@ -35,7 +35,13 @@ class Exec extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['package', 'call', 'workspace', 'workspaces']
+ return [
+ 'package',
+ 'call',
+ 'workspace',
+ 'workspaces',
+ 'include-workspace-root',
+ ]
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/deps/npm/lib/explain.js b/deps/npm/lib/explain.js
index 7d785d7bfcf44c..fc7f57891b986f 100644
--- a/deps/npm/lib/explain.js
+++ b/deps/npm/lib/explain.js
@@ -46,8 +46,15 @@ class Explain extends ArboristWorkspaceCmd {
const arb = new Arborist({ path: this.npm.prefix, ...this.npm.flatOptions })
const tree = await arb.loadActual()
- if (this.workspaceNames && this.workspaceNames.length)
+ if (this.npm.flatOptions.workspacesEnabled
+ && this.workspaceNames
+ && this.workspaceNames.length
+ )
this.filterSet = arb.workspaceDependencySet(tree, this.workspaceNames)
+ else if (!this.npm.flatOptions.workspacesEnabled) {
+ this.filterSet =
+ arb.excludeWorkspacesDependencySet(tree)
+ }
const nodes = new Set()
for (const arg of args) {
diff --git a/deps/npm/lib/fund.js b/deps/npm/lib/fund.js
index 1e0fa1ecb9d73a..97139f5bba09c9 100644
--- a/deps/npm/lib/fund.js
+++ b/deps/npm/lib/fund.js
@@ -92,6 +92,7 @@ class Fund extends ArboristWorkspaceCmd {
return
}
+ // TODO: add !workspacesEnabled option handling to libnpmfund
const fundingInfo = getFundingInfo(tree, {
...this.flatOptions,
log: this.npm.log,
diff --git a/deps/npm/lib/init.js b/deps/npm/lib/init.js
index e4bd20b7210e81..e654793ecca0ec 100644
--- a/deps/npm/lib/init.js
+++ b/deps/npm/lib/init.js
@@ -19,7 +19,7 @@ class Init extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['yes', 'force', 'workspace', 'workspaces']
+ return ['yes', 'force', 'workspace', 'workspaces', 'include-workspace-root']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
@@ -54,6 +54,10 @@ class Init extends BaseCommand {
}
async initWorkspaces (args, filters) {
+ // if the root package is uninitiated, take care of it first
+ if (this.npm.flatOptions.includeWorkspaceRoot)
+ await this.init(args)
+
// reads package.json for the top-level folder first, by doing this we
// ensure the command throw if no package.json is found before trying
// to create a workspace package.json file or its folders
diff --git a/deps/npm/lib/link.js b/deps/npm/lib/link.js
index febd908718be30..2437eb12ed7d6e 100644
--- a/deps/npm/lib/link.js
+++ b/deps/npm/lib/link.js
@@ -185,6 +185,7 @@ class Link extends ArboristWorkspaceCmd {
// atm but should be simple once we have a mocked registry again
if (arg.name !== node.name /* istanbul ignore next */ || (
arg.version &&
+ /* istanbul ignore next */
!semver.satisfies(node.version, arg.version)
)) {
foundNodes.push(node)
diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js
index 495b6348a03601..46cfb2462d327a 100644
--- a/deps/npm/lib/ls.js
+++ b/deps/npm/lib/ls.js
@@ -82,6 +82,7 @@ class LS extends ArboristWorkspaceCmd {
const production = this.npm.config.get('production')
const unicode = this.npm.config.get('unicode')
const packageLockOnly = this.npm.config.get('package-lock-only')
+ const workspacesEnabled = this.npm.flatOptions.workspacesEnabled
const path = global ? resolve(this.npm.globalDir, '..') : this.npm.prefix
@@ -100,12 +101,18 @@ class LS extends ArboristWorkspaceCmd {
if (this.workspaceNames && this.workspaceNames.length)
wsNodes = arb.workspaceNodes(tree, this.workspaceNames)
const filterBySelectedWorkspaces = edge => {
+ if (!workspacesEnabled
+ && edge.from.isProjectRoot
+ && edge.to.isWorkspace
+ )
+ return false
+
if (!wsNodes || !wsNodes.length)
return true
if (edge.from.isProjectRoot) {
return edge.to &&
- edge.to.isWorkspace &
+ edge.to.isWorkspace &&
wsNodes.includes(edge.to.target)
}
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 1a7b06a34f791e..63c5ede8a53edc 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -137,7 +137,19 @@ const npm = module.exports = new class extends EventEmitter {
const workspacesEnabled = this.config.get('workspaces')
const workspacesFilters = this.config.get('workspace')
+ if (workspacesEnabled === false && workspacesFilters.length > 0)
+ return cb(new Error('Can not use --no-workspaces and --workspace at the same time'))
+
const filterByWorkspaces = workspacesEnabled || workspacesFilters.length > 0
+ // normally this would go in the constructor, but our tests don't
+ // actually use a real npm object so this.npm.config isn't always
+ // populated. this is the compromise until we can make that a reality
+ // and then move this into the constructor.
+ impl.workspaces = this.config.get('workspaces')
+ impl.workspacePaths = null
+ // normally this would be evaluated in base-command#setWorkspaces, see
+ // above for explanation
+ impl.includeWorkspaceRoot = this.config.get('include-workspace-root')
if (this.config.get('usage')) {
this.output(impl.usage)
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index b3b630421c4882..ab46b453608014 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -62,7 +62,14 @@ class Outdated extends ArboristWorkspaceCmd {
if (this.workspaceNames && this.workspaceNames.length) {
this.filterSet =
- arb.workspaceDependencySet(this.tree, this.workspaceNames)
+ arb.workspaceDependencySet(
+ this.tree,
+ this.workspaceNames,
+ this.npm.flatOptions.includeWorkspaceRoot
+ )
+ } else if (!this.npm.flatOptions.workspacesEnabled) {
+ this.filterSet =
+ arb.excludeWorkspacesDependencySet(this.tree)
}
if (args.length !== 0) {
diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js
index 8fc89db1a0b2bf..848f8afd5ea872 100644
--- a/deps/npm/lib/pack.js
+++ b/deps/npm/lib/pack.js
@@ -30,6 +30,7 @@ class Pack extends BaseCommand {
'pack-destination',
'workspace',
'workspaces',
+ 'include-workspace-root',
]
}
diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js
index 9c747eb5068f0c..32e70129f2c031 100644
--- a/deps/npm/lib/publish.js
+++ b/deps/npm/lib/publish.js
@@ -36,7 +36,15 @@ class Publish extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['tag', 'access', 'dry-run', 'otp', 'workspace', 'workspaces']
+ return [
+ 'tag',
+ 'access',
+ 'dry-run',
+ 'otp',
+ 'workspace',
+ 'workspaces',
+ 'include-workspace-root',
+ ]
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/deps/npm/lib/repo.js b/deps/npm/lib/repo.js
index e0172d01f63d13..bf1d1e7ff886d1 100644
--- a/deps/npm/lib/repo.js
+++ b/deps/npm/lib/repo.js
@@ -19,7 +19,7 @@ class Repo extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['browser', 'workspace', 'workspaces']
+ return ['browser', 'workspace', 'workspaces', 'include-workspace-root']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
@@ -48,7 +48,13 @@ class Repo extends BaseCommand {
}
async get (pkg) {
- const opts = { ...this.npm.flatOptions, fullMetadata: true }
+ // XXX It is very odd that `where` is how pacote knows to look anywhere
+ // other than the cwd.
+ const opts = {
+ ...this.npm.flatOptions,
+ where: this.npm.localPrefix,
+ fullMetadata: true,
+ }
const mani = await pacote.manifest(pkg, opts)
const r = mani.repository
diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js
index 1daaeb9900de11..de847ff28b3b5e 100644
--- a/deps/npm/lib/run-script.js
+++ b/deps/npm/lib/run-script.js
@@ -38,6 +38,7 @@ class RunScript extends BaseCommand {
return [
'workspace',
'workspaces',
+ 'include-workspace-root',
'if-present',
'ignore-scripts',
'script-shell',
diff --git a/deps/npm/lib/set-script.js b/deps/npm/lib/set-script.js
index 24e4d8f20f6663..185c4cc901d2eb 100644
--- a/deps/npm/lib/set-script.js
+++ b/deps/npm/lib/set-script.js
@@ -12,7 +12,7 @@ class SetScript extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
- return ['workspace', 'workspaces']
+ return ['workspace', 'workspaces', 'include-workspace-root']
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
diff --git a/deps/npm/lib/utils/completion/installed-deep.js b/deps/npm/lib/utils/completion/installed-deep.js
index 590955a1ee5208..62686f9b2d3c9e 100644
--- a/deps/npm/lib/utils/completion/installed-deep.js
+++ b/deps/npm/lib/utils/completion/installed-deep.js
@@ -7,6 +7,7 @@ const installedDeep = async (npm) => {
depth,
global,
prefix,
+ workspacesEnabled,
} = npm.flatOptions
const getValues = (tree) =>
@@ -19,14 +20,18 @@ const installedDeep = async (npm) => {
.sort((a, b) => (a.depth - b.depth) || localeCompare(a.name, b.name))
const res = new Set()
- const gArb = new Arborist({ global: true, path: resolve(npm.globalDir, '..') })
+ const gArb = new Arborist({
+ global: true,
+ path: resolve(npm.globalDir, '..'),
+ workspacesEnabled,
+ })
const gTree = await gArb.loadActual({ global: true })
for (const node of getValues(gTree))
res.add(global ? node.name : [node.name, '-g'])
if (!global) {
- const arb = new Arborist({ global: false, path: prefix })
+ const arb = new Arborist({ global: false, path: prefix, workspacesEnabled })
const tree = await arb.loadActual()
for (const node of getValues(tree))
res.add(node.name)
diff --git a/deps/npm/lib/utils/config/definitions.js b/deps/npm/lib/utils/config/definitions.js
index 009f60a7bce61d..c9806b3c2890f8 100644
--- a/deps/npm/lib/utils/config/definitions.js
+++ b/deps/npm/lib/utils/config/definitions.js
@@ -918,6 +918,19 @@ define('include-staged', {
flatten,
})
+define('include-workspace-root', {
+ default: false,
+ type: Boolean,
+ description: `
+ Include the workspace root when workspaces are enabled for a command.
+
+ When false, specifying individual workspaces via the \`workspace\` config,
+ or all workspaces via the \`workspaces\` flag, will cause npm to operate only
+ on the specified workspaces, and not on the root project.
+ `,
+ flatten,
+})
+
define('init-author-email', {
default: '',
type: String,
@@ -1142,6 +1155,33 @@ define('location', {
},
})
+define('lockfile-version', {
+ default: null,
+ type: [null, 1, 2, 3],
+ defaultDescription: `
+ Version 2 if no lockfile or current lockfile version less than or equal to
+ 2, otherwise maintain current lockfile version
+ `,
+ description: `
+ Set the lockfile format version to be used in package-lock.json and
+ npm-shrinkwrap-json files. Possible options are:
+
+ 1: The lockfile version used by npm versions 5 and 6. Lacks some data that
+ is used during the install, resulting in slower and possibly less
+ deterministic installs. Prevents lockfile churn when interoperating with
+ older npm versions.
+
+ 2: The default lockfile version used by npm version 7. Includes both the
+ version 1 lockfile data and version 3 lockfile data, for maximum
+ determinism and interoperability, at the expense of more bytes on disk.
+
+ 3: Only the new lockfile information introduced in npm version 7. Smaller
+ on disk than lockfile version 2, but not interoperable with older npm
+ versions. Ideal if all users are on npm version 7 and higher.
+ `,
+ flatten,
+})
+
define('loglevel', {
default: 'notice',
type: [
@@ -2137,8 +2177,8 @@ define('workspace', {
* Workspace names
* Path to a workspace directory
- * Path to a parent workspace directory (will result to selecting all of the
- nested workspaces)
+ * Path to a parent workspace directory (will result in selecting all
+ workspaces within that folder)
When set for the \`npm init\` command, this may be set to the folder of
a workspace which does not yet exist, to create the folder and set it
@@ -2150,16 +2190,34 @@ define('workspace', {
})
define('workspaces', {
- default: false,
- type: Boolean,
+ default: null,
+ type: [null, Boolean],
short: 'ws',
envExport: false,
description: `
- Enable running a command in the context of **all** the configured
+ Set to true to run the command in the context of **all** configured
workspaces.
+
+ Explicitly setting this to false will cause commands like \`install\` to
+ ignore workspaces altogether.
+ When not set explicitly:
+
+ - Commands that operate on the \`node_modules\` tree (install, update,
+ etc.) will link workspaces into the \`node_modules\` folder.
+ - Commands that do other things (test, exec, publish, etc.) will operate
+ on the root project, _unless_ one or more workspaces are specified in
+ the \`workspace\` config.
`,
flatten: (key, obj, flatOptions) => {
definitions['user-agent'].flatten('user-agent', obj, flatOptions)
+
+ // TODO: this is a derived value, and should be reworked when we have a
+ // pattern for derived value
+
+ // workspacesEnabled is true whether workspaces is null or true
+ // commands contextually work with workspaces or not regardless of
+ // configuration, so we need an option specifically to disable workspaces
+ flatOptions.workspacesEnabled = obj[key] !== false
},
})
diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js
index f3680fe8b7a019..917a647474b959 100644
--- a/deps/npm/lib/version.js
+++ b/deps/npm/lib/version.js
@@ -26,6 +26,7 @@ class Version extends BaseCommand {
'sign-git-tag',
'workspace',
'workspaces',
+ 'include-workspace-root',
]
}
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js
index 0124bfb7d35433..46b1b5edfea7aa 100644
--- a/deps/npm/lib/view.js
+++ b/deps/npm/lib/view.js
@@ -31,6 +31,7 @@ class View extends BaseCommand {
'json',
'workspace',
'workspaces',
+ 'include-workspace-root',
]
}
diff --git a/deps/npm/lib/workspaces/arborist-cmd.js b/deps/npm/lib/workspaces/arborist-cmd.js
index cb6b66b8cb2572..a75b351be4759b 100644
--- a/deps/npm/lib/workspaces/arborist-cmd.js
+++ b/deps/npm/lib/workspaces/arborist-cmd.js
@@ -4,16 +4,21 @@
const BaseCommand = require('../base-command.js')
class ArboristCmd extends BaseCommand {
+ get isArboristCmd () {
+ return true
+ }
+
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get params () {
return [
'workspace',
'workspaces',
+ 'include-workspace-root',
]
}
execWorkspaces (args, filters, cb) {
- this.setWorkspaces(filters)
+ this.setWorkspaces(filters, true)
.then(() => {
this.exec(args, cb)
})
diff --git a/deps/npm/lib/workspaces/get-workspaces.js b/deps/npm/lib/workspaces/get-workspaces.js
index 91b0074556ae79..3eb8e4865b706f 100644
--- a/deps/npm/lib/workspaces/get-workspaces.js
+++ b/deps/npm/lib/workspaces/get-workspaces.js
@@ -5,11 +5,16 @@ const rpj = require('read-package-json-fast')
// Returns an Map of paths to workspaces indexed by workspace name
// { foo => '/path/to/foo' }
-const getWorkspaces = async (filters, { path }) => {
+const getWorkspaces = async (filters, { path, includeWorkspaceRoot }) => {
// TODO we need a better error to be bubbled up here if this rpj call fails
const pkg = await rpj(resolve(path, 'package.json'))
const workspaces = await mapWorkspaces({ cwd: path, pkg })
- const res = filters.length ? new Map() : workspaces
+ let res = new Map()
+ if (includeWorkspaceRoot)
+ res.set(pkg.name, path)
+
+ if (!filters.length)
+ res = new Map([...res, ...workspaces])
for (const filterArg of filters) {
for (const [workspaceName, workspacePath] of workspaces.entries()) {
diff --git a/deps/npm/man/man1/npm-audit.1 b/deps/npm/man/man1/npm-audit.1
index 92548895cadc48..50199ed00f9c6b 100644
--- a/deps/npm/man/man1/npm-audit.1
+++ b/deps/npm/man/man1/npm-audit.1
@@ -365,8 +365,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -381,19 +381,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1
index 64f39e8f82db4d..647d079b2ed013 100644
--- a/deps/npm/man/man1/npm-dedupe.1
+++ b/deps/npm/man/man1/npm-dedupe.1
@@ -286,8 +286,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -302,19 +302,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-diff.1 b/deps/npm/man/man1/npm-diff.1
index 702ee528421e0e..a03ef8012893bd 100644
--- a/deps/npm/man/man1/npm-diff.1
+++ b/deps/npm/man/man1/npm-diff.1
@@ -322,8 +322,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -338,19 +338,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SH See Also
.RS 0
diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1
index abe0d5d614cc3b..f6c62ad17ecafc 100644
--- a/deps/npm/man/man1/npm-dist-tag.1
+++ b/deps/npm/man/man1/npm-dist-tag.1
@@ -114,8 +114,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -130,19 +130,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index 06d20798690af7..48c01c74cd825c 100644
--- a/deps/npm/man/man1/npm-docs.1
+++ b/deps/npm/man/man1/npm-docs.1
@@ -72,8 +72,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -88,19 +88,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-exec.1 b/deps/npm/man/man1/npm-exec.1
index 5573a2e2fc423e..1a5b5e3ab761d1 100644
--- a/deps/npm/man/man1/npm-exec.1
+++ b/deps/npm/man/man1/npm-exec.1
@@ -188,8 +188,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -204,19 +204,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS Examples
diff --git a/deps/npm/man/man1/npm-explain.1 b/deps/npm/man/man1/npm-explain.1
index 128abc1e1949c9..7be793018f489e 100644
--- a/deps/npm/man/man1/npm-explain.1
+++ b/deps/npm/man/man1/npm-explain.1
@@ -99,8 +99,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
diff --git a/deps/npm/man/man1/npm-find-dupes.1 b/deps/npm/man/man1/npm-find-dupes.1
index eea7ccd436f69b..ccba76e2c85d89 100644
--- a/deps/npm/man/man1/npm-find-dupes.1
+++ b/deps/npm/man/man1/npm-find-dupes.1
@@ -204,8 +204,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -220,19 +220,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-fund.1 b/deps/npm/man/man1/npm-fund.1
index 5e59791e1f28d3..9743e3eef7a42c 100644
--- a/deps/npm/man/man1/npm-fund.1
+++ b/deps/npm/man/man1/npm-fund.1
@@ -138,8 +138,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1
index 34170fd71d0ef2..ce2e8d410d08b4 100644
--- a/deps/npm/man/man1/npm-init.1
+++ b/deps/npm/man/man1/npm-init.1
@@ -245,8 +245,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -261,19 +261,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1
index aee2079af8f6d7..91e1fc1684e808 100644
--- a/deps/npm/man/man1/npm-install-test.1
+++ b/deps/npm/man/man1/npm-install-test.1
@@ -288,8 +288,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -304,19 +304,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1
index 2a6cb91ce6c37e..f803da89b21e43 100644
--- a/deps/npm/man/man1/npm-install.1
+++ b/deps/npm/man/man1/npm-install.1
@@ -690,8 +690,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -706,19 +706,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS Algorithm
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 26b8d41e180787..8e1086b044581d 100644
--- a/deps/npm/man/man1/npm-link.1
+++ b/deps/npm/man/man1/npm-link.1
@@ -378,8 +378,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -394,19 +394,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index db15b74fba8753..cfc8442a35e9e8 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@8\.0\.0 /path/to/npm
+npm@8\.1\.0 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
@@ -269,8 +269,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -285,19 +285,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1
index ea19a17c72d224..f6e285f9880e30 100644
--- a/deps/npm/man/man1/npm-outdated.1
+++ b/deps/npm/man/man1/npm-outdated.1
@@ -213,8 +213,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1
index 3b02e5e4f96406..3dadbd98442dd5 100644
--- a/deps/npm/man/man1/npm-pack.1
+++ b/deps/npm/man/man1/npm-pack.1
@@ -85,8 +85,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -101,19 +101,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS Description
diff --git a/deps/npm/man/man1/npm-pkg.1 b/deps/npm/man/man1/npm-pkg.1
index 483cfaf117c5de..aab33b40a29c56 100644
--- a/deps/npm/man/man1/npm-pkg.1
+++ b/deps/npm/man/man1/npm-pkg.1
@@ -261,8 +261,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -277,15 +277,26 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1
index 10e2553a529dab..f37deae4f55290 100644
--- a/deps/npm/man/man1/npm-prune.1
+++ b/deps/npm/man/man1/npm-prune.1
@@ -118,8 +118,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -134,19 +134,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1
index e45982a25ed44d..1ba1f74b9ff7da 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -206,8 +206,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -222,19 +222,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index 0af36bde8a62b5..d5365fea4c74de 100644
--- a/deps/npm/man/man1/npm-rebuild.1
+++ b/deps/npm/man/man1/npm-rebuild.1
@@ -106,8 +106,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -122,19 +122,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1
index 237c81aec1fb8f..50c9ee88cc7582 100644
--- a/deps/npm/man/man1/npm-repo.1
+++ b/deps/npm/man/man1/npm-repo.1
@@ -56,8 +56,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -72,19 +72,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1
index 7d5826897c826b..2700d8f5a7d825 100644
--- a/deps/npm/man/man1/npm-run-script.1
+++ b/deps/npm/man/man1/npm-run-script.1
@@ -169,8 +169,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -185,19 +185,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS \fBif\-present\fP
.RS 0
.IP \(bu 2
diff --git a/deps/npm/man/man1/npm-set-script.1 b/deps/npm/man/man1/npm-set-script.1
index 3c49de1cf4026c..74a1f3ca13a167 100644
--- a/deps/npm/man/man1/npm-set-script.1
+++ b/deps/npm/man/man1/npm-set-script.1
@@ -53,8 +53,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -69,19 +69,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1
index 2355ba85938444..d9062bad3708e7 100644
--- a/deps/npm/man/man1/npm-uninstall.1
+++ b/deps/npm/man/man1/npm-uninstall.1
@@ -94,8 +94,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -110,19 +110,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1
index 09c7c6dfc073a5..cb397bc66c2bee 100644
--- a/deps/npm/man/man1/npm-unpublish.1
+++ b/deps/npm/man/man1/npm-unpublish.1
@@ -127,8 +127,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -143,15 +143,26 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1
index 61672425168cd2..19e2c7f0a82281 100644
--- a/deps/npm/man/man1/npm-update.1
+++ b/deps/npm/man/man1/npm-update.1
@@ -388,8 +388,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -404,19 +404,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS See Also
diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1
index 1134f60188c374..1caf6a227d7f0c 100644
--- a/deps/npm/man/man1/npm-version.1
+++ b/deps/npm/man/man1/npm-version.1
@@ -128,8 +128,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -144,19 +144,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS Description
diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1
index 84c39fdc5383e4..4114ab30f0b4bd 100644
--- a/deps/npm/man/man1/npm-view.1
+++ b/deps/npm/man/man1/npm-view.1
@@ -156,8 +156,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -172,19 +172,47 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS Output
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index bff58d214d696d..22519a226bb5e8 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -10,7 +10,7 @@ npm [args]
.RE
.SS Version
.P
-8\.0\.0
+8\.1\.0
.SS Description
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man7/config.7 b/deps/npm/man/man7/config.7
index 0fcc3612f65ec7..1cd82ea02b5a49 100644
--- a/deps/npm/man/man7/config.7
+++ b/deps/npm/man/man7/config.7
@@ -1024,6 +1024,23 @@ This is experimental, and not implemented by the npm public registry\.
+.SS \fBinclude\-workspace\-root\fP
+.RS 0
+.IP \(bu 2
+Default: false
+.IP \(bu 2
+Type: Boolean
+
+.RE
+.P
+Include the workspace root when workspaces are enabled for a command\.
+.P
+When false, specifying individual workspaces via the \fBworkspace\fP config, or
+all workspaces via the \fBworkspaces\fP flag, will cause npm to operate only on
+the specified workspaces, and not on the root project\.
+
+
+
.SS \fBinit\-author\-email\fP
.RS 0
.IP \(bu 2
@@ -1231,6 +1248,34 @@ When passed to \fBnpm config\fP this refers to which config file to use\.
+.SS \fBlockfile\-version\fP
+.RS 0
+.IP \(bu 2
+Default: Version 2 if no lockfile or current lockfile version less than or
+equal to 2, otherwise maintain current lockfile version
+.IP \(bu 2
+Type: null, 1, 2, or 3
+
+.RE
+.P
+Set the lockfile format version to be used in package\-lock\.json and
+npm\-shrinkwrap\-json files\. Possible options are:
+.P
+1: The lockfile version used by npm versions 5 and 6\. Lacks some data that
+is used during the install, resulting in slower and possibly less
+deterministic installs\. Prevents lockfile churn when interoperating with
+older npm versions\.
+.P
+2: The default lockfile version used by npm version 7\. Includes both the
+version 1 lockfile data and version 3 lockfile data, for maximum determinism
+and interoperability, at the expense of more bytes on disk\.
+.P
+3: Only the new lockfile information introduced in npm version 7\. Smaller on
+disk than lockfile version 2, but not interoperable with older npm versions\.
+Ideal if all users are on npm version 7 and higher\.
+
+
+
.SS \fBloglevel\fP
.RS 0
.IP \(bu 2
@@ -2198,8 +2243,8 @@ Workspace names
.IP \(bu 2
Path to a workspace directory
.IP \(bu 2
-Path to a parent workspace directory (will result to selecting all of the
-nested workspaces)
+Path to a parent workspace directory (will result in selecting all
+workspaces within that folder)
.RE
.P
@@ -2214,15 +2259,26 @@ This value is not exported to the environment for child processes\.
.SS \fBworkspaces\fP
.RS 0
.IP \(bu 2
-Default: false
+Default: null
.IP \(bu 2
-Type: Boolean
+Type: null or Boolean
.RE
.P
-Enable running a command in the context of \fBall\fR the configured
+Set to true to run the command in the context of \fBall\fR configured
workspaces\.
.P
+Explicitly setting this to false will cause commands like \fBinstall\fP to
+ignore workspaces altogether\. When not set explicitly:
+.RS 0
+.IP \(bu 2
+Commands that operate on the \fBnode_modules\fP tree (install, update, etc\.)
+will link workspaces into the \fBnode_modules\fP folder\. \- Commands that do
+other things (test, exec, publish, etc\.) will operate on the root project,
+\fIunless\fR one or more workspaces are specified in the \fBworkspace\fP config\.
+
+.RE
+.P
This value is not exported to the environment for child processes\.
diff --git a/deps/npm/man/man7/workspaces.7 b/deps/npm/man/man7/workspaces.7
index 860aa080032af1..82c4ee9f585e95 100644
--- a/deps/npm/man/man7/workspaces.7
+++ b/deps/npm/man/man7/workspaces.7
@@ -114,7 +114,7 @@ respect the provided \fBworkspace\fP configuration\.
.SS Using workspaces
.P
Given the specifities of how Node\.js handles module resolution \fIhttps://nodejs\.org/dist/latest\-v14\.x/docs/api/modules\.html#modules_all_together\fR it's possible to consume any defined workspace
-by it's declared \fBpackage\.json\fP \fBname\fP\|\. Continuing from the example defined
+by its declared \fBpackage\.json\fP \fBname\fP\|\. Continuing from the example defined
above, let's also create a Node\.js script that will require the \fBworkspace\-a\fP
example module, e\.g:
.P
diff --git a/deps/npm/node_modules/@npmcli/arborist/bin/shrinkwrap.js b/deps/npm/node_modules/@npmcli/arborist/bin/shrinkwrap.js
index ee5ec24557947c..b40416b7b9e1f3 100644
--- a/deps/npm/node_modules/@npmcli/arborist/bin/shrinkwrap.js
+++ b/deps/npm/node_modules/@npmcli/arborist/bin/shrinkwrap.js
@@ -5,7 +5,7 @@ require('./lib/timers.js')
const { quiet } = options
Shrinkwrap.load(options)
- .then(s => quiet || console.log(JSON.stringify(s.data, 0, 2)))
+ .then(s => quiet || console.log(JSON.stringify(s.commit(), 0, 2)))
.catch(er => {
console.error('shrinkwrap load failure', er)
process.exit(1)
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js
index 3e6a9838f8f409..4071deac5a7804 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js
@@ -26,6 +26,7 @@ const debug = require('../debug.js')
const fromPath = require('../from-path.js')
const calcDepFlags = require('../calc-dep-flags.js')
const Shrinkwrap = require('../shrinkwrap.js')
+const { defaultLockfileVersion } = Shrinkwrap
const Node = require('../node.js')
const Link = require('../link.js')
const addRmPkgDeps = require('../add-rm-pkg-deps.js')
@@ -307,8 +308,10 @@ module.exports = cls => class IdealTreeBuilder extends cls {
// reconstructing it anyway.
.then(root => this[_global] ? root
: !this[_usePackageLock] || this[_updateAll]
- ? Shrinkwrap.reset({ path: this.path })
- .then(meta => Object.assign(root, {meta}))
+ ? Shrinkwrap.reset({
+ path: this.path,
+ lockfileVersion: this.options.lockfileVersion,
+ }).then(meta => Object.assign(root, {meta}))
: this.loadVirtual({ root }))
// if we don't have a lockfile to go from, then start with the
@@ -326,6 +329,9 @@ module.exports = cls => class IdealTreeBuilder extends cls {
// dep flags before assuming that any mutations were reflected.
if (tree.children.size) {
root.meta.loadedFromDisk = true
+ // set these so that we don't try to ancient lockfile reload it
+ root.meta.originalLockfileVersion = defaultLockfileVersion
+ root.meta.lockfileVersion = defaultLockfileVersion
}
}
return root
@@ -345,7 +351,10 @@ module.exports = cls => class IdealTreeBuilder extends cls {
// this is a gross kludge to handle the fact that we don't save
// metadata on the root node in global installs, because the "root"
// node is something like /usr/local/lib.
- const meta = new Shrinkwrap({ path: this.path })
+ const meta = new Shrinkwrap({
+ path: this.path,
+ lockfileVersion: this.options.lockfileVersion,
+ })
meta.reset()
root.meta = meta
return root
@@ -696,14 +705,18 @@ module.exports = cls => class IdealTreeBuilder extends cls {
// least it's just a one-time hit.
process.emit('time', 'idealTree:inflate')
+ // don't warn if we're not gonna actually write it back anyway.
const heading = ancient ? 'ancient lockfile' : 'old lockfile'
- this.log.warn(heading,
- `
+ if (ancient || !this.options.lockfileVersion ||
+ this.options.lockfileVersion >= defaultLockfileVersion) {
+ this.log.warn(heading,
+ `
The ${meta.type} file was created with an old version of npm,
so supplemental metadata must be fetched from the registry.
This is a one-time fix-up, please be patient...
`)
+ }
this.addTracker('idealTree:inflate')
const queue = []
@@ -748,7 +761,7 @@ This is a one-time fix-up, please be patient...
// yes, yes, this isn't the "original" version, but now that it's been
// upgraded, we need to make sure we don't do the work to upgrade it
// again, since it's now as new as can be.
- meta.originalLockfileVersion = 2
+ meta.originalLockfileVersion = defaultLockfileVersion
this.finishTracker('idealTree:inflate')
process.emit('timeEnd', 'idealTree:inflate')
}
@@ -880,7 +893,7 @@ This is a one-time fix-up, please be patient...
const tasks = []
const peerSource = this[_peerSetSource].get(node) || node
for (const edge of this[_problemEdges](node)) {
- if (edge.overridden) {
+ if (edge.peerConflicted) {
continue
}
@@ -967,8 +980,8 @@ This is a one-time fix-up, please be patient...
if (edgeIn === edge) {
continue
}
- const { from, valid, overridden } = edgeIn
- if (!overridden && !valid && !this[_depsSeen].has(from)) {
+ const { from, valid, peerConflicted } = edgeIn
+ if (!peerConflicted && !valid && !this[_depsSeen].has(from)) {
this.addTracker('idealTree', from.name, from.location)
this[_depsQueue].push(edgeIn.from)
}
@@ -984,8 +997,8 @@ This is a one-time fix-up, please be patient...
continue
}
- const { valid, overridden } = edgeIn
- if (!valid && !overridden) {
+ const { valid, peerConflicted } = edgeIn
+ if (!valid && !peerConflicted) {
// if it's already been visited, we have to re-visit
// otherwise, just enqueue normally.
this[_depsSeen].delete(edgeIn.from)
@@ -1301,7 +1314,7 @@ This is a one-time fix-up, please be patient...
// that will be installed by default anyway, and we'll fail when
// we get to the point where we need to, if we need to.
if (conflictOK || !required.has(dep)) {
- edge.overridden = true
+ edge.peerConflicted = true
continue
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
index ccfa7cad9c04dd..21d4ec5a36cf8d 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/index.js
@@ -44,9 +44,25 @@ const mixins = [
require('./reify.js'),
]
+const _workspacesEnabled = Symbol.for('workspacesEnabled')
const Base = mixins.reduce((a, b) => b(a), require('events'))
const getWorkspaceNodes = require('../get-workspace-nodes.js')
+// if it's 1, 2, or 3, set it explicitly that.
+// if undefined or null, set it null
+// otherwise, throw.
+const lockfileVersion = lfv => {
+ if (lfv === 1 || lfv === 2 || lfv === 3) {
+ return lfv
+ }
+
+ if (lfv === undefined || lfv === null) {
+ return null
+ }
+
+ throw new TypeError('Invalid lockfileVersion config: ' + lfv)
+}
+
class Arborist extends Base {
constructor (options = {}) {
process.emit('time', 'arborist:ctor')
@@ -59,7 +75,11 @@ class Arborist extends Base {
packumentCache: options.packumentCache || new Map(),
log: options.log || procLog,
workspacesEnabled: options.workspacesEnabled !== false,
+ lockfileVersion: lockfileVersion(options.lockfileVersion),
}
+
+ this[_workspacesEnabled] = this.options.workspacesEnabled
+
if (options.saveType && !saveTypeMap.get(options.saveType)) {
throw new Error(`Invalid saveType ${options.saveType}`)
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js
index 68e58af7d98582..5d8fea85399a4b 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js
@@ -137,11 +137,9 @@ module.exports = cls => class ActualLoader extends cls {
real: await realpath(this.path, this[_rpcache], this[_stcache]),
})
- // XXX only rely on this if the hidden lockfile is the newest thing?
- // need some kind of heuristic, like if the package.json or sw have
- // been touched more recently, then ignore it? This is a hazard if
- // user switches back and forth between Arborist and another way of
- // mutating the node_modules folder.
+ // Note: hidden lockfile will be rejected if it's not the latest thing
+ // in the folder, or if any of the entries in the hidden lockfile are
+ // missing.
const meta = await Shrinkwrap.load({
path: this[_actualTree].path,
hiddenLockfile: true,
@@ -152,6 +150,7 @@ module.exports = cls => class ActualLoader extends cls {
} else {
const meta = await Shrinkwrap.load({
path: this[_actualTree].path,
+ lockfileVersion: this.options.lockfileVersion,
})
this[_actualTree].meta = meta
return this[_loadActualActually]({ root, ignoreMissing })
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js
index f1960116737e8e..ed0e47daf58ab6 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js
@@ -54,7 +54,10 @@ module.exports = cls => class VirtualLoader extends cls {
return treeCheck(this.virtualTree)
}
- const s = await Shrinkwrap.load({ path: this.path })
+ const s = await Shrinkwrap.load({
+ path: this.path,
+ lockfileVersion: this.options.lockfileVersion,
+ })
if (!s.loadedFromDisk && !options.root) {
const er = new Error('loadVirtual requires existing shrinkwrap file')
throw Object.assign(er, { code: 'ENOLOCK' })
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/pruner.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/pruner.js
index 3e9d4f1bf66b0f..494114dfa56c56 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/pruner.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/pruner.js
@@ -1,4 +1,6 @@
const _idealTreePrune = Symbol.for('idealTreePrune')
+const _workspacesEnabled = Symbol.for('workspacesEnabled')
+const _addNodeToTrashList = Symbol.for('addNodeToTrashList')
module.exports = cls => class Pruner extends cls {
async prune (options = {}) {
@@ -10,6 +12,19 @@ module.exports = cls => class Pruner extends cls {
this[_idealTreePrune]()
+ if (!this[_workspacesEnabled]) {
+ const excludeNodes = this.excludeWorkspacesDependencySet(this.idealTree)
+ for (const node of this.idealTree.inventory.values()) {
+ if (
+ node.parent !== null
+ && !node.isProjectRoot
+ && !excludeNodes.has(node)
+ ) {
+ this[_addNodeToTrashList](node)
+ }
+ }
+ }
+
return this.reify(options)
}
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
index 6fa5c00116fc22..4f3fc1b9c3ba15 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js
@@ -35,6 +35,7 @@ const _checkBins = Symbol.for('checkBins')
const _queues = Symbol('queues')
const _scriptShell = Symbol('scriptShell')
const _includeWorkspaceRoot = Symbol.for('includeWorkspaceRoot')
+const _workspacesEnabled = Symbol.for('workspacesEnabled')
const _force = Symbol.for('force')
@@ -77,8 +78,14 @@ module.exports = cls => class Builder extends cls {
// the actual tree on disk.
if (!nodes) {
const tree = await this.loadActual()
- if (this[_workspaces] && this[_workspaces].length) {
- const filterSet = this.workspaceDependencySet(
+ let filterSet
+ if (!this[_workspacesEnabled]) {
+ filterSet = this.excludeWorkspacesDependencySet(tree)
+ nodes = tree.inventory.filter(node =>
+ filterSet.has(node) || node.isProjectRoot
+ )
+ } else if (this[_workspaces] && this[_workspaces].length) {
+ filterSet = this.workspaceDependencySet(
tree,
this[_workspaces],
this[_includeWorkspaceRoot]
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
index a279d8956f2432..658ece7a93618f 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js
@@ -40,8 +40,9 @@ const _savePrefix = Symbol('savePrefix')
const _retireShallowNodes = Symbol.for('retireShallowNodes')
const _getBundlesByDepth = Symbol('getBundlesByDepth')
const _registryResolved = Symbol('registryResolved')
-const _addNodeToTrashList = Symbol('addNodeToTrashList')
+const _addNodeToTrashList = Symbol.for('addNodeToTrashList')
const _workspaces = Symbol.for('workspaces')
+const _workspacesEnabled = Symbol.for('workspacesEnabled')
// shared by rebuild mixin
const _trashList = Symbol.for('trashList')
@@ -314,6 +315,10 @@ module.exports = cls => class Reifier extends cls {
// to just invalidate the parts that changed, but avoid walking the
// whole tree again.
+ const includeWorkspaces = this[_workspacesEnabled]
+ const includeRootDeps = !this[_workspacesEnabled]
+ || this[_includeWorkspaceRoot] && this[_workspaces].length > 0
+
const filterNodes = []
if (this[_global] && this.explicitRequests.size) {
const idealTree = this.idealTree.target
@@ -331,17 +336,21 @@ module.exports = cls => class Reifier extends cls {
}
}
} else {
- for (const ws of this[_workspaces]) {
- const ideal = this.idealTree.children.get(ws)
- if (ideal) {
- filterNodes.push(ideal)
- }
- const actual = this.actualTree.children.get(ws)
- if (actual) {
- filterNodes.push(actual)
+ if (includeWorkspaces) {
+ // add all ws nodes to filterNodes
+ for (const ws of this[_workspaces]) {
+ const ideal = this.idealTree.children.get(ws)
+ if (ideal) {
+ filterNodes.push(ideal)
+ }
+ const actual = this.actualTree.children.get(ws)
+ if (actual) {
+ filterNodes.push(actual)
+ }
}
}
- if (this[_includeWorkspaceRoot] && (this[_workspaces].length > 0)) {
+ if (includeRootDeps) {
+ // add all non-workspace nodes to filterNodes
for (const tree of [this.idealTree, this.actualTree]) {
for (const {type, to} of tree.edgesOut.values()) {
if (type !== 'workspace' && to) {
@@ -451,10 +460,12 @@ module.exports = cls => class Reifier extends cls {
const filter = node =>
node.top.isProjectRoot &&
- (node.peer && this[_omitPeer] ||
+ (
+ node.peer && this[_omitPeer] ||
node.dev && this[_omitDev] ||
node.optional && this[_omitOptional] ||
- node.devOptional && this[_omitOptional] && this[_omitDev])
+ node.devOptional && this[_omitOptional] && this[_omitDev]
+ )
for (const node of this.idealTree.inventory.filter(filter)) {
this[_addNodeToTrashList](node)
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/edge.js b/deps/npm/node_modules/@npmcli/arborist/lib/edge.js
index 777ecc44a7c00e..1881001ef143e1 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/edge.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/edge.js
@@ -37,7 +37,7 @@ const printableEdge = (edge) => {
...(edgeFrom != null ? { from: edgeFrom } : {}),
...(edgeTo ? { to: edgeTo } : {}),
...(edge.error ? { error: edge.error } : {}),
- ...(edge.overridden ? { overridden: true } : {}),
+ ...(edge.peerConflicted ? { peerConflicted: true } : {}),
})
}
@@ -78,7 +78,7 @@ class Edge {
}
this[_setFrom](from)
this[_error] = this[_loadError]()
- this.overridden = false
+ this.peerConflicted = false
}
satisfiedBy (node) {
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/peer-entry-sets.js b/deps/npm/node_modules/@npmcli/arborist/lib/peer-entry-sets.js
index 2c4322ee678ca5..a2da8c8cb6fcd3 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/peer-entry-sets.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/peer-entry-sets.js
@@ -29,7 +29,7 @@ const peerEntrySets = node => {
for (const peer of unionSet) {
for (const edge of peer.edgesIn) {
// if not valid, it doesn't matter anyway. either it's been previously
- // overridden, or it's the thing we're interested in replacing.
+ // peerConflicted, or it's the thing we're interested in replacing.
if (!edge.valid) {
continue
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/place-dep.js b/deps/npm/node_modules/@npmcli/arborist/lib/place-dep.js
index 6edd94a38e749c..1fe930876a86dc 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/place-dep.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/place-dep.js
@@ -247,7 +247,7 @@ class PlaceDep {
// if we're placing in the tree with --force, we can get here even though
// it's a conflict. Treat it as a KEEP, but warn and move on.
if (placementType === KEEP) {
- // this was an overridden peer dep
+ // this was a peerConflicted peer dep
if (edge.peer && !edge.valid) {
this.warnPeerConflict()
}
@@ -305,7 +305,7 @@ class PlaceDep {
this.placed.parent = target
}
- // if it's an overridden peer dep, warn about it
+ // if it's a peerConflicted peer dep, warn about it
if (edge.peer && !this.placed.satisfies(edge)) {
this.warnPeerConflict()
}
@@ -339,7 +339,7 @@ class PlaceDep {
// otherwise they'd be gone and the peer set would change throughout
// this loop.
for (const peerEdge of this.placed.edgesOut.values()) {
- if (peerEdge.valid || !peerEdge.peer || peerEdge.overridden) {
+ if (peerEdge.valid || !peerEdge.peer || peerEdge.peerConflicted) {
continue
}
@@ -353,7 +353,7 @@ class PlaceDep {
continue
}
- // overridden peerEdge, just accept what's there already
+ // peerConflicted peerEdge, just accept what's there already
if (!peer.satisfies(peerEdge)) {
continue
}
@@ -398,7 +398,7 @@ class PlaceDep {
if (this.placed.satisfies(edge) ||
!edge.peer ||
edge.from.parent !== target ||
- edge.overridden) {
+ edge.peerConflicted) {
// not a peer dep, not invalid, or not from this level, so it's fine
// to just let it re-evaluate as a problemEdge later, or let it be
// satisfied by the new dep being placed.
@@ -406,14 +406,14 @@ class PlaceDep {
}
for (const entryEdge of peerEntrySets(edge.from).keys()) {
// either this one needs to be pruned and re-evaluated, or marked
- // as overridden and warned about. If the entryEdge comes in from
+ // as peerConflicted and warned about. If the entryEdge comes in from
// the root, then we have to leave it alone, and in that case, it
// will have already warned or crashed by getting to this point.
const entryNode = entryEdge.to
const deepestTarget = deepestNestingTarget(entryNode)
if (deepestTarget !== target && !entryEdge.from.isRoot) {
prunePeerSets.push(...gatherDepSet([entryNode], e => {
- return e.to !== entryNode && !e.overridden
+ return e.to !== entryNode && !e.peerConflicted
}))
} else {
this.warnPeerConflict(edge, this.dep)
@@ -532,7 +532,7 @@ class PlaceDep {
warnPeerConflict (edge, dep) {
edge = edge || this.edge
dep = dep || this.dep
- edge.overridden = true
+ edge.peerConflicted = true
const expl = this.explainPeerConflict(edge, dep)
log.warn('ERESOLVE', 'overriding peer dependency', expl)
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/printable.js b/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
index 74925d96d25879..ba2a25b195aee7 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/printable.js
@@ -130,8 +130,8 @@ class Edge {
if (edge.error) {
this.error = edge.error
}
- if (edge.overridden) {
- this.overridden = edge.overridden
+ if (edge.peerConflicted) {
+ this.peerConflicted = edge.peerConflicted
}
}
}
@@ -149,7 +149,7 @@ class EdgeOut extends Edge {
}${
this.error ? ' ' + this.error : ''
}${
- this.overridden ? ' overridden' : ''
+ this.peerConflicted ? ' peerConflicted' : ''
} }`
}
}
@@ -165,7 +165,7 @@ class EdgeIn extends Edge {
return `{ ${this.from || '""'} ${this.type} ${this.name}@${this.spec}${
this.error ? ' ' + this.error : ''
}${
- this.overridden ? ' overridden' : ''
+ this.peerConflicted ? ' peerConflicted' : ''
} }`
}
}
diff --git a/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js b/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
index ed28130249ea04..93e1cb1a45ca23 100644
--- a/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
+++ b/deps/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js
@@ -10,7 +10,7 @@
// definitely not before npm v8.
const localeCompare = require('@isaacs/string-locale-compare')('en')
-const lockfileVersion = 2
+const defaultLockfileVersion = 2
// for comparing nodes to yarn.lock entries
const mismatch = (a, b) => a && b && a !== b
@@ -226,6 +226,10 @@ const _filenameSet = Symbol('_filenameSet')
const _maybeRead = Symbol('_maybeRead')
const _maybeStat = Symbol('_maybeStat')
class Shrinkwrap {
+ static get defaultLockfileVersion () {
+ return defaultLockfileVersion
+ }
+
static load (options) {
return new Shrinkwrap(options).load()
}
@@ -316,8 +320,12 @@ class Shrinkwrap {
shrinkwrapOnly = false,
hiddenLockfile = false,
log = procLog,
+ lockfileVersion,
} = options
+ this.lockfileVersion = hiddenLockfile ? 3
+ : lockfileVersion ? parseInt(lockfileVersion, 10)
+ : null
this.log = log
this[_awaitingUpdate] = new Map()
this.tree = null
@@ -372,9 +380,9 @@ class Shrinkwrap {
reset () {
this.tree = null
this[_awaitingUpdate] = new Map()
- this.originalLockfileVersion = lockfileVersion
+ this.originalLockfileVersion = this.lockfileVersion
this.data = {
- lockfileVersion,
+ lockfileVersion: this.lockfileVersion || defaultLockfileVersion,
requires: true,
packages: {},
dependencies: {},
@@ -460,14 +468,23 @@ class Shrinkwrap {
this.ancientLockfile = false
return {}
}).then(lock => {
+ const lockfileVersion = this.lockfileVersion ? this.lockfileVersion
+ : Math.max(lock.lockfileVersion || 0, defaultLockfileVersion)
this.data = {
...lock,
- lockfileVersion,
+ lockfileVersion: lockfileVersion,
requires: true,
packages: lock.packages || {},
- ...(this.hiddenLockfile ? {} : {dependencies: lock.dependencies || {}}),
+ dependencies: lock.dependencies || {},
}
+
this.originalLockfileVersion = lock.lockfileVersion
+ // use default if it wasn't explicitly set, and the current file is
+ // less than our default. otherwise, keep whatever is in the file,
+ // unless we had an explicit setting already.
+ if (!this.lockfileVersion) {
+ this.lockfileVersion = this.data.lockfileVersion = lockfileVersion
+ }
this.ancientLockfile = this.loadedFromDisk &&
!(lock.lockfileVersion >= 2) && !lock.requires
@@ -878,15 +895,32 @@ class Shrinkwrap {
}
}
+ // if we haven't set it by now, use the default
+ if (!this.lockfileVersion) {
+ this.lockfileVersion = defaultLockfileVersion
+ }
+ this.data.lockfileVersion = this.lockfileVersion
+
// hidden lockfiles don't include legacy metadata or a root entry
if (this.hiddenLockfile) {
delete this.data.packages['']
delete this.data.dependencies
- } else if (this.tree) {
+ } else if (this.tree && this.lockfileVersion <= 3) {
this[_buildLegacyLockfile](this.tree, this.data)
}
- return this.data
+ // lf version 1 = dependencies only
+ // lf version 2 = dependencies and packages
+ // lf version 3 = packages only
+ if (this.lockfileVersion >= 3) {
+ const { dependencies, ...data } = this.data
+ return data
+ } else if (this.lockfileVersion < 2) {
+ const { packages, ...data } = this.data
+ return data
+ } else {
+ return { ...this.data }
+ }
}
[_buildLegacyLockfile] (node, lock, path = []) {
diff --git a/deps/npm/node_modules/@npmcli/arborist/package.json b/deps/npm/node_modules/@npmcli/arborist/package.json
index b9dbbb70722db5..d131ccf1545faa 100644
--- a/deps/npm/node_modules/@npmcli/arborist/package.json
+++ b/deps/npm/node_modules/@npmcli/arborist/package.json
@@ -1,18 +1,18 @@
{
"name": "@npmcli/arborist",
- "version": "3.0.0",
+ "version": "4.0.1",
"description": "Manage node_modules trees",
"dependencies": {
"@isaacs/string-locale-compare": "^1.0.1",
"@npmcli/installed-package-contents": "^1.0.7",
- "@npmcli/map-workspaces": "^1.0.2",
+ "@npmcli/map-workspaces": "^2.0.0",
"@npmcli/metavuln-calculator": "^2.0.0",
"@npmcli/move-file": "^1.1.0",
"@npmcli/name-from-folder": "^1.0.1",
"@npmcli/node-gyp": "^1.0.1",
"@npmcli/package-json": "^1.0.1",
"@npmcli/run-script": "^2.0.0",
- "bin-links": "^2.2.1",
+ "bin-links": "^2.3.0",
"cacache": "^15.0.3",
"common-ancestor-path": "^1.0.1",
"json-parse-even-better-errors": "^2.3.1",
diff --git a/deps/npm/node_modules/@npmcli/ci-detect/index.js b/deps/npm/node_modules/@npmcli/ci-detect/index.js
index 6a60606ff7bbc4..df9318d658a49a 100644
--- a/deps/npm/node_modules/@npmcli/ci-detect/index.js
+++ b/deps/npm/node_modules/@npmcli/ci-detect/index.js
@@ -24,12 +24,18 @@ module.exports = () =>
: process.env.NOW_GITHUB_DEPLOYMENT ? 'now-github'
: process.env.GITLAB_DEPLOYMENT ? 'now-gitlab'
: process.env.BITBUCKET_DEPLOYMENT ? 'now-bitbucket'
+ : process.env.BITBUCKET_BUILD_NUMBER ? 'bitbucket-pipelines'
: process.env.NOW_BUILDER ? 'now'
+ : process.env.VERCEL_GITHUB_DEPLOYMENT ? 'vercel-github'
+ : process.env.VERCEL_GITLAB_DEPLOYMENT ? 'vercel-gitlab'
+ : process.env.VERCEL_BITBUCKET_DEPLOYMENT ? 'vercel-bitbucket'
+ : process.env.VERCEL_URL ? 'vercel'
: process.env.MAGNUM ? 'magnum'
: process.env.NEVERCODE ? 'nevercode'
: process.env.RENDER ? 'render'
: process.env.SAIL_CI ? 'sail'
: process.env.SHIPPABLE ? 'shippable'
+ : process.env.TEAMCITY_VERSION ? 'teamcity'
// codeship and a few others
: process.env.CI_NAME ? process.env.CI_NAME
// heroku doesn't set envs other than node in a heroku-specific location
diff --git a/deps/npm/node_modules/@npmcli/ci-detect/package.json b/deps/npm/node_modules/@npmcli/ci-detect/package.json
index 89dec0ccc23b31..1c01f7a9f62be1 100644
--- a/deps/npm/node_modules/@npmcli/ci-detect/package.json
+++ b/deps/npm/node_modules/@npmcli/ci-detect/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/ci-detect",
- "version": "1.3.0",
+ "version": "1.4.0",
"description": "Detect what kind of CI environment the program is in",
"author": "Isaac Z. Schlueter (https://izs.me)",
"license": "ISC",
diff --git a/deps/npm/node_modules/@npmcli/map-workspaces/LICENSE b/deps/npm/node_modules/@npmcli/map-workspaces/LICENSE
deleted file mode 100644
index dedcd7d2f9daec..00000000000000
--- a/deps/npm/node_modules/@npmcli/map-workspaces/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) npm Inc.
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/@npmcli/map-workspaces/LICENSE.md b/deps/npm/node_modules/@npmcli/map-workspaces/LICENSE.md
new file mode 100644
index 00000000000000..5fc208ff122e08
--- /dev/null
+++ b/deps/npm/node_modules/@npmcli/map-workspaces/LICENSE.md
@@ -0,0 +1,20 @@
+
+
+ISC License
+
+Copyright npm, Inc.
+
+Permission to use, copy, modify, and/or distribute this
+software for any purpose with or without fee is hereby
+granted, provided that the above copyright notice and this
+permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
+EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
+USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/@npmcli/map-workspaces/index.js b/deps/npm/node_modules/@npmcli/map-workspaces/lib/index.js
similarity index 90%
rename from deps/npm/node_modules/@npmcli/map-workspaces/index.js
rename to deps/npm/node_modules/@npmcli/map-workspaces/lib/index.js
index 7587db717f3625..26e597a2c20f46 100644
--- a/deps/npm/node_modules/@npmcli/map-workspaces/index.js
+++ b/deps/npm/node_modules/@npmcli/map-workspaces/lib/index.js
@@ -35,18 +35,11 @@ function getPatterns (workspaces) {
if (!Array.isArray(workspacesDeclaration)) {
throw getError({
message: 'workspaces config expects an Array',
- code: 'EWORKSPACESCONFIG'
+ code: 'EWORKSPACESCONFIG',
})
}
- return [
- ...appendNegatedPatterns(workspacesDeclaration),
- { pattern: '**/node_modules/**', negate: true }
- ]
-}
-
-function isEmpty (patterns) {
- return patterns.length < 2
+ return appendNegatedPatterns(workspacesDeclaration)
}
function getPackageName (pkg, pathname) {
@@ -80,7 +73,7 @@ async function mapWorkspaces (opts = {}) {
if (!opts || !opts.pkg) {
throw getError({
message: 'mapWorkspaces missing pkg info',
- code: 'EMAPWORKSPACESPKG'
+ code: 'EMAPWORKSPACESPKG',
})
}
@@ -89,7 +82,7 @@ async function mapWorkspaces (opts = {}) {
const results = new Map()
const seen = new Map()
- if (isEmpty(patterns)) {
+ if (!patterns.length) {
return results
}
@@ -97,8 +90,8 @@ async function mapWorkspaces (opts = {}) {
...opts,
ignore: [
...opts.ignore || [],
- ...['**/node_modules/**']
- ]
+ ...['**/node_modules/**'],
+ ],
})
const getPackagePathname = pkgPathmame(opts)
@@ -133,9 +126,9 @@ async function mapWorkspaces (opts = {}) {
'must not have multiple workspaces with the same name',
`package '${name}' has conflicts in the following paths:`,
' ' + seen.get(name),
- ' ' + packagePathname
+ ' ' + packagePathname,
].join('\n'),
- code: 'EDUPLICATEWORKSPACE'
+ code: 'EDUPLICATEWORKSPACE',
})
}
@@ -144,7 +137,6 @@ async function mapWorkspaces (opts = {}) {
}
}
}
-
return reverseResultMap(results)
}
@@ -152,20 +144,19 @@ mapWorkspaces.virtual = function (opts = {}) {
if (!opts || !opts.lockfile) {
throw getError({
message: 'mapWorkspaces.virtual missing lockfile info',
- code: 'EMAPWORKSPACESLOCKFILE'
+ code: 'EMAPWORKSPACESLOCKFILE',
})
}
const { packages = {} } = opts.lockfile
const { workspaces = [] } = packages[''] || {}
- const patterns = getPatterns(workspaces)
-
// uses a pathname-keyed map in order to negate the exact items
const results = new Map()
-
- if (isEmpty(patterns)) {
+ const patterns = getPatterns(workspaces)
+ if (!patterns.length) {
return results
}
+ patterns.push({ pattern: '**/node_modules/**', negate: true })
const getPackagePathname = pkgPathmame(opts)
diff --git a/deps/npm/node_modules/@npmcli/map-workspaces/package.json b/deps/npm/node_modules/@npmcli/map-workspaces/package.json
index 17cc4197e9e2b4..987298c3d93a03 100644
--- a/deps/npm/node_modules/@npmcli/map-workspaces/package.json
+++ b/deps/npm/node_modules/@npmcli/map-workspaces/package.json
@@ -1,11 +1,13 @@
{
"name": "@npmcli/map-workspaces",
- "version": "1.0.4",
+ "version": "2.0.0",
+ "main": "lib/index.js",
"files": [
- "index.js"
+ "bin",
+ "lib"
],
"engines": {
- "node": ">=10"
+ "node": "^12.13.0 || ^14.15.0 || >=16"
},
"description": "Retrieves a name:pathname Map for a given workspaces config",
"repository": "https://github.com/npm/map-workspaces",
@@ -17,23 +19,19 @@
"workspaces",
"map-workspaces"
],
- "author": "npm Inc. ",
- "contributors": [
- {
- "name": "Ruy Adorno",
- "url": "https://ruyadorno.com",
- "twitter": "ruyadorno"
- }
- ],
+ "author": "GitHub Inc.",
"license": "ISC",
"scripts": {
- "lint": "standard",
+ "lint": "eslint '**/*.js'",
"pretest": "npm run lint",
- "test": "tap test*.js",
- "snap": "tap test*.js",
+ "test": "tap",
+ "snap": "tap",
"preversion": "npm test",
"postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags"
+ "prepublishOnly": "git push origin --follow-tags",
+ "postlint": "npm-template-check",
+ "lintfix": "npm run lint -- --fix",
+ "posttest": "npm run lint"
},
"tap": {
"check-coverage": true
@@ -44,14 +42,16 @@
]
},
"devDependencies": {
+ "eslint": "^8.0.0",
"require-inject": "^1.4.4",
- "standard": "^14.3.4",
- "tap": "^14.10.8"
+ "@npmcli/template-oss": "^2.0.0",
+ "tap": "^15.0.10"
},
"dependencies": {
"@npmcli/name-from-folder": "^1.0.1",
"glob": "^7.1.6",
"minimatch": "^3.0.4",
"read-package-json-fast": "^2.0.1"
- }
+ },
+ "templateVersion": "2.0.0"
}
diff --git a/deps/npm/node_modules/bin-links/lib/fix-bin.js b/deps/npm/node_modules/bin-links/lib/fix-bin.js
index a87a4d6945f691..d1f513a2cf93d4 100644
--- a/deps/npm/node_modules/bin-links/lib/fix-bin.js
+++ b/deps/npm/node_modules/bin-links/lib/fix-bin.js
@@ -37,7 +37,7 @@ const dos2Unix = file =>
readFile(file, 'utf8').then(content =>
writeFileAtomic(file, content.replace(/^(#![^\n]+)\r\n/, '$1\n')))
-const fixBin = file => chmod(file, execMode)
+const fixBin = (file, mode = execMode) => chmod(file, mode)
.then(() => isWindowsHashbangFile(file))
.then(isWHB => isWHB ? dos2Unix(file) : null)
diff --git a/deps/npm/node_modules/bin-links/lib/link-gently.js b/deps/npm/node_modules/bin-links/lib/link-gently.js
index db3e65bd8b60fc..6a6e555de7cf52 100644
--- a/deps/npm/node_modules/bin-links/lib/link-gently.js
+++ b/deps/npm/node_modules/bin-links/lib/link-gently.js
@@ -63,7 +63,7 @@ const linkGently = async ({path, to, from, absFrom, force}) => {
})
.then(skipOrClobber => {
if (skipOrClobber === SKIP)
- return true
+ return false
return symlink(from, to, 'file').catch(er => {
if (skipOrClobber === CLOBBER || force)
return rm(to).then(() => symlink(from, to, 'file'))
diff --git a/deps/npm/node_modules/bin-links/package.json b/deps/npm/node_modules/bin-links/package.json
index b126fa16fa46b8..8293d77d1a85af 100644
--- a/deps/npm/node_modules/bin-links/package.json
+++ b/deps/npm/node_modules/bin-links/package.json
@@ -1,6 +1,6 @@
{
"name": "bin-links",
- "version": "2.2.1",
+ "version": "2.3.0",
"description": "JavaScript package binary linker",
"main": "index.js",
"scripts": {
@@ -22,15 +22,16 @@
"license": "ISC",
"dependencies": {
"cmd-shim": "^4.0.1",
- "mkdirp": "^1.0.3",
+ "mkdirp-infer-owner": "^2.0.0",
"npm-normalize-package-bin": "^1.0.0",
"read-cmd-shim": "^2.0.0",
"rimraf": "^3.0.0",
"write-file-atomic": "^3.0.3"
},
"devDependencies": {
+ "mkdirp": "^1.0.3",
"require-inject": "^1.4.4",
- "tap": "^14.10.6"
+ "tap": "^15.0.10"
},
"tap": {
"check-coverage": true,
diff --git a/deps/npm/node_modules/ignore-walk/index.js b/deps/npm/node_modules/ignore-walk/index.js
index c01d57de2a0391..13fc954c54798f 100644
--- a/deps/npm/node_modules/ignore-walk/index.js
+++ b/deps/npm/node_modules/ignore-walk/index.js
@@ -9,9 +9,11 @@ class Walker extends EE {
constructor (opts) {
opts = opts || {}
super(opts)
+ // set to true if this.path is a symlink, whether follow is true or not
+ this.isSymbolicLink = opts.isSymbolicLink
this.path = opts.path || process.cwd()
this.basename = path.basename(this.path)
- this.ignoreFiles = opts.ignoreFiles || [ '.ignore' ]
+ this.ignoreFiles = opts.ignoreFiles || ['.ignore']
this.ignoreRules = {}
this.parent = opts.parent || null
this.includeEmpty = !!opts.includeEmpty
@@ -29,18 +31,19 @@ class Walker extends EE {
emit (ev, data) {
let ret = false
if (!(this.sawError && ev === 'error')) {
- if (ev === 'error')
+ if (ev === 'error') {
this.sawError = true
- else if (ev === 'done' && !this.parent) {
+ } else if (ev === 'done' && !this.parent) {
data = Array.from(data)
.map(e => /^@/.test(e) ? `./${e}` : e).sort(this.sort)
this.result = data
}
- if (ev === 'error' && this.parent)
+ if (ev === 'error' && this.parent) {
ret = this.parent.emit('error', data)
- else
+ } else {
ret = super.emit(ev, data)
+ }
}
return ret
}
@@ -52,25 +55,27 @@ class Walker extends EE {
}
isIgnoreFile (e) {
- return e !== "." &&
- e !== ".." &&
- -1 !== this.ignoreFiles.indexOf(e)
+ return e !== '.' &&
+ e !== '..' &&
+ this.ignoreFiles.indexOf(e) !== -1
}
onReaddir (entries) {
this.entries = entries
if (entries.length === 0) {
- if (this.includeEmpty)
+ if (this.includeEmpty) {
this.result.add(this.path.substr(this.root.length + 1))
+ }
this.emit('done', this.result)
} else {
const hasIg = this.entries.some(e =>
this.isIgnoreFile(e))
- if (hasIg)
+ if (hasIg) {
this.addIgnoreFiles()
- else
+ } else {
this.filterEntries()
+ }
}
}
@@ -80,8 +85,9 @@ class Walker extends EE {
let igCount = newIg.length
const then = _ => {
- if (--igCount === 0)
+ if (--igCount === 0) {
this.filterEntries()
+ }
}
newIg.forEach(e => this.addIgnoreFile(e, then))
@@ -98,7 +104,7 @@ class Walker extends EE {
matchBase: true,
dot: true,
flipNegate: true,
- nocase: true
+ nocase: true,
}
const rules = data.split(/\r?\n/)
.filter(line => !/^#|^$/.test(line.trim()))
@@ -133,55 +139,71 @@ class Walker extends EE {
this.emit('done', this.result)
} else {
const then = _ => {
- if (-- entryCount === 0)
+ if (--entryCount === 0) {
this.emit('done', this.result)
+ }
}
filtered.forEach(filt => {
const entry = filt[0]
const file = filt[1]
const dir = filt[2]
- this.stat(entry, file, dir, then)
+ this.stat({ entry, file, dir }, then)
})
}
}
- onstat (st, entry, file, dir, then) {
+ onstat ({ st, entry, file, dir, isSymbolicLink }, then) {
const abs = this.path + '/' + entry
if (!st.isDirectory()) {
- if (file)
+ if (file) {
this.result.add(abs.substr(this.root.length + 1))
+ }
then()
} else {
// is a directory
- if (dir)
- this.walker(entry, then)
- else
+ if (dir) {
+ this.walker(entry, { isSymbolicLink }, then)
+ } else {
then()
+ }
}
}
- stat (entry, file, dir, then) {
+ stat ({ entry, file, dir }, then) {
const abs = this.path + '/' + entry
- fs[this.follow ? 'stat' : 'lstat'](abs, (er, st) => {
- if (er)
+ fs.lstat(abs, (er, st) => {
+ if (er) {
this.emit('error', er)
- else
- this.onstat(st, entry, file, dir, then)
+ } else {
+ const isSymbolicLink = st.isSymbolicLink()
+ if (this.follow && isSymbolicLink) {
+ fs.stat(abs, (er, st) => {
+ if (er) {
+ this.emit('error', er)
+ } else {
+ this.onstat({ st, entry, file, dir, isSymbolicLink }, then)
+ }
+ })
+ } else {
+ this.onstat({ st, entry, file, dir, isSymbolicLink }, then)
+ }
+ }
})
}
- walkerOpt (entry) {
+ walkerOpt (entry, opts) {
return {
path: this.path + '/' + entry,
parent: this,
ignoreFiles: this.ignoreFiles,
follow: this.follow,
- includeEmpty: this.includeEmpty
+ includeEmpty: this.includeEmpty,
+ ...opts,
}
}
- walker (entry, then) {
- new Walker(this.walkerOpt(entry)).on('done', then).start()
+ walker (entry, opts, then) {
+ new Walker(this.walkerOpt(entry, opts)).on('done', then).start()
}
filterEntry (entry, partial) {
@@ -191,7 +213,7 @@ class Walker extends EE {
// entry = d
// parent /a/b sees c/d
if (this.parent && this.parent.filterEntry) {
- var pt = this.basename + "/" + entry
+ var pt = this.basename + '/' + entry
included = this.parent.filterEntry(pt, partial)
}
@@ -214,8 +236,9 @@ class Walker extends EE {
rule.match('/' + entry, true) ||
rule.match(entry, true)))
- if (match)
+ if (match) {
included = rule.negate
+ }
}
})
}
@@ -226,10 +249,6 @@ class Walker extends EE {
}
class WalkerSync extends Walker {
- constructor (opt) {
- super(opt)
- }
-
start () {
this.onReaddir(fs.readdirSync(this.path))
return this
@@ -240,28 +259,32 @@ class WalkerSync extends Walker {
this.onReadIgnoreFile(file, fs.readFileSync(ig, 'utf8'), then)
}
- stat (entry, file, dir, then) {
+ stat ({ entry, file, dir }, then) {
const abs = this.path + '/' + entry
- const st = fs[this.follow ? 'statSync' : 'lstatSync'](abs)
- this.onstat(st, entry, file, dir, then)
+ let st = fs.lstatSync(abs)
+ const isSymbolicLink = st.isSymbolicLink()
+ if (this.follow && isSymbolicLink) {
+ st = fs.statSync(abs)
+ }
+
+ // console.error('STAT SYNC', {st, entry, file, dir, isSymbolicLink, then})
+ this.onstat({ st, entry, file, dir, isSymbolicLink }, then)
}
- walker (entry, then) {
- new WalkerSync(this.walkerOpt(entry)).start()
+ walker (entry, opts, then) {
+ new WalkerSync(this.walkerOpt(entry, opts)).start()
then()
}
}
-const walk = (options, callback) => {
+const walk = (opts, callback) => {
const p = new Promise((resolve, reject) => {
- new Walker(options).on('done', resolve).on('error', reject).start()
+ new Walker(opts).on('done', resolve).on('error', reject).start()
})
return callback ? p.then(res => callback(null, res), callback) : p
}
-const walkSync = options => {
- return new WalkerSync(options).start().result
-}
+const walkSync = opts => new WalkerSync(opts).start().result
module.exports = walk
walk.sync = walkSync
diff --git a/deps/npm/node_modules/ignore-walk/package.json b/deps/npm/node_modules/ignore-walk/package.json
index 7d48b977e0702c..ec6923d19aae9d 100644
--- a/deps/npm/node_modules/ignore-walk/package.json
+++ b/deps/npm/node_modules/ignore-walk/package.json
@@ -1,9 +1,10 @@
{
"name": "ignore-walk",
- "version": "3.0.4",
+ "version": "4.0.1",
"description": "Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.",
"main": "index.js",
"devDependencies": {
+ "@npmcli/lint": "^1.0.2",
"mkdirp": "^0.5.1",
"mutate-fs": "^1.1.0",
"rimraf": "^2.6.1",
@@ -11,9 +12,15 @@
},
"scripts": {
"test": "tap",
+ "posttest": "npm run lint --",
+ "lint": "npm run npmclilint -- \"*.*js\" \"test/**/*.*js\"",
+ "eslint": "eslint",
+ "lintfix": "npm run lint -- --fix",
"preversion": "npm test",
"postversion": "npm publish",
- "postpublish": "git push origin --all; git push origin --tags"
+ "postpublish": "git push origin --follow-tags",
+ "npmclilint": "npmcli-lint",
+ "postsnap": "npm run lintfix --"
},
"keywords": [
"ignorefile",
@@ -40,5 +47,8 @@
"before": "test/00-setup.js",
"after": "test/zz-cleanup.js",
"jobs": 1
+ },
+ "engines": {
+ "node": ">=10"
}
}
diff --git a/deps/npm/node_modules/libnpmdiff/.eslintrc.json b/deps/npm/node_modules/libnpmdiff/.eslintrc.json
deleted file mode 100644
index 6232a8f82187ff..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/.eslintrc.json
+++ /dev/null
@@ -1,207 +0,0 @@
-{
- "parserOptions": {
- "ecmaVersion": 2018,
- "ecmaFeatures": {},
- "sourceType": "script"
- },
-
- "env": {
- "es6": true,
- "node": true
- },
-
- "plugins": [
- "import",
- "node",
- "promise",
- "standard"
- ],
-
- "globals": {
- "document": "readonly",
- "navigator": "readonly",
- "window": "readonly"
- },
-
- "rules": {
- "accessor-pairs": "error",
- "array-bracket-spacing": ["error", "never"],
- "arrow-spacing": ["error", { "before": true, "after": true }],
- "block-spacing": ["error", "always"],
- "brace-style": ["error", "1tbs", { "allowSingleLine": false }],
- "camelcase": ["error", { "properties": "never" }],
- "comma-dangle": ["error", {
- "arrays": "always-multiline",
- "objects": "always-multiline",
- "imports": "always-multiline",
- "exports": "always-multiline",
- "functions": "never"
- }],
- "comma-spacing": ["error", { "before": false, "after": true }],
- "comma-style": ["error", "last"],
- "computed-property-spacing": ["error", "never"],
- "constructor-super": "error",
- "curly": ["error", "multi-or-nest"],
- "dot-location": ["error", "property"],
- "dot-notation": ["error", { "allowKeywords": true }],
- "eol-last": "error",
- "eqeqeq": ["error", "always", { "null": "ignore" }],
- "func-call-spacing": ["error", "never"],
- "generator-star-spacing": ["error", { "before": true, "after": true }],
- "handle-callback-err": ["error", "^(err|error)$" ],
- "indent": ["error", 2, {
- "SwitchCase": 1,
- "VariableDeclarator": 1,
- "outerIIFEBody": 1,
- "MemberExpression": 1,
- "FunctionDeclaration": { "parameters": 1, "body": 1 },
- "FunctionExpression": { "parameters": 1, "body": 1 },
- "CallExpression": { "arguments": 1 },
- "ArrayExpression": 1,
- "ObjectExpression": 1,
- "ImportDeclaration": 1,
- "flatTernaryExpressions": true,
- "ignoreComments": false,
- "ignoredNodes": ["TemplateLiteral *"]
- }],
- "key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
- "keyword-spacing": ["error", { "before": true, "after": true }],
- "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
- "new-cap": ["error", { "newIsCap": true, "capIsNew": false, "properties": true }],
- "new-parens": "error",
- "no-array-constructor": "error",
- "no-async-promise-executor": "error",
- "no-caller": "error",
- "no-case-declarations": "error",
- "no-class-assign": "error",
- "no-compare-neg-zero": "error",
- "no-cond-assign": "off",
- "no-const-assign": "error",
- "no-constant-condition": ["error", { "checkLoops": false }],
- "no-control-regex": "error",
- "no-debugger": "error",
- "no-delete-var": "error",
- "no-dupe-args": "error",
- "no-dupe-class-members": "error",
- "no-dupe-keys": "error",
- "no-duplicate-case": "error",
- "no-empty-character-class": "error",
- "no-empty-pattern": "error",
- "no-eval": "error",
- "no-ex-assign": "error",
- "no-extend-native": "error",
- "no-extra-bind": "error",
- "no-extra-boolean-cast": "error",
- "no-extra-parens": ["error", "functions"],
- "no-fallthrough": "error",
- "no-floating-decimal": "error",
- "no-func-assign": "error",
- "no-global-assign": "error",
- "no-implied-eval": "error",
- "no-inner-declarations": ["error", "functions"],
- "no-invalid-regexp": "error",
- "no-irregular-whitespace": "error",
- "no-iterator": "error",
- "no-labels": ["error", { "allowLoop": true, "allowSwitch": false }],
- "no-lone-blocks": "error",
- "no-misleading-character-class": "error",
- "no-prototype-builtins": "error",
- "no-useless-catch": "error",
- "no-mixed-operators": "off",
- "no-mixed-spaces-and-tabs": "error",
- "no-multi-spaces": "error",
- "no-multi-str": "error",
- "no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
- "no-negated-in-lhs": "error",
- "no-new": "off",
- "no-new-func": "error",
- "no-new-object": "error",
- "no-new-require": "error",
- "no-new-symbol": "error",
- "no-new-wrappers": "error",
- "no-obj-calls": "error",
- "no-octal": "error",
- "no-octal-escape": "error",
- "no-path-concat": "error",
- "no-proto": "error",
- "no-redeclare": ["error", { "builtinGlobals": false }],
- "no-regex-spaces": "error",
- "no-return-assign": "off",
- "no-self-assign": "off",
- "no-self-compare": "error",
- "no-sequences": "error",
- "no-shadow-restricted-names": "error",
- "no-sparse-arrays": "error",
- "no-tabs": "error",
- "no-template-curly-in-string": "error",
- "no-this-before-super": "error",
- "no-throw-literal": "off",
- "no-trailing-spaces": "error",
- "no-undef": "error",
- "no-undef-init": "error",
- "no-unexpected-multiline": "error",
- "no-unmodified-loop-condition": "error",
- "no-unneeded-ternary": ["error", { "defaultAssignment": false }],
- "no-unreachable": "error",
- "no-unsafe-finally": 0,
- "no-unsafe-negation": "error",
- "no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true, "allowTaggedTemplates": true }],
- "no-unused-vars": ["error", { "vars": "all", "args": "none", "ignoreRestSiblings": true }],
- "no-use-before-define": ["error", { "functions": false, "classes": false, "variables": false }],
- "no-useless-call": "error",
- "no-useless-computed-key": "error",
- "no-useless-constructor": "error",
- "no-useless-escape": "error",
- "no-useless-rename": "error",
- "no-useless-return": "error",
- "no-void": "error",
- "no-whitespace-before-property": "error",
- "no-with": "error",
- "nonblock-statement-body-position": [2, "below"],
- "object-curly-newline": "off",
- "object-curly-spacing": "off",
- "object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }],
- "one-var": ["error", { "initialized": "never" }],
- "operator-linebreak": "off",
- "padded-blocks": ["error", { "blocks": "never", "switches": "never", "classes": "never" }],
- "prefer-const": ["error", {"destructuring": "all"}],
- "prefer-promise-reject-errors": "error",
- "quote-props": ["error", "as-needed"],
- "quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
- "rest-spread-spacing": ["error", "never"],
- "semi": ["error", "never"],
- "semi-spacing": ["error", { "before": false, "after": true }],
- "space-before-blocks": ["error", "always"],
- "space-before-function-paren": ["error", "always"],
- "space-in-parens": ["error", "never"],
- "space-infix-ops": "error",
- "space-unary-ops": ["error", { "words": true, "nonwords": false }],
- "spaced-comment": ["error", "always", {
- "line": { "markers": ["*package", "!", "/", ",", "="] },
- "block": { "balanced": true, "markers": ["*package", "!", ",", ":", "::", "flow-include"], "exceptions": ["*"] }
- }],
- "symbol-description": "error",
- "template-curly-spacing": ["error", "never"],
- "template-tag-spacing": ["error", "never"],
- "unicode-bom": ["error", "never"],
- "use-isnan": "error",
- "valid-typeof": ["error", { "requireStringLiterals": true }],
- "wrap-iife": ["error", "any", { "functionPrototypeMethods": true }],
- "yield-star-spacing": ["error", "both"],
- "yoda": ["error", "never"],
-
- "import/export": "error",
- "import/first": "error",
- "import/no-absolute-path": ["error", { "esmodule": true, "commonjs": true, "amd": false }],
- "import/no-duplicates": "error",
- "import/no-named-default": "error",
- "import/no-webpack-loader-syntax": "error",
-
- "node/no-deprecated-api": "error",
- "node/process-exit-as-throw": "error",
-
- "promise/param-names": "off",
-
- "standard/no-callback-literal": "error"
- }
-}
diff --git a/deps/npm/node_modules/libnpmdiff/.gitignore b/deps/npm/node_modules/libnpmdiff/.gitignore
deleted file mode 100644
index 0aba557bf2857d..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/.gitignore
+++ /dev/null
@@ -1,99 +0,0 @@
-# Logs
-logs
-*.log
-npm-debug.log*
-lerna-debug.log*
-
-# Diagnostic reports (https://nodejs.org/api/report.html)
-report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
-
-# Runtime data
-pids
-*.pid
-*.seed
-*.pid.lock
-
-# Directory for instrumented libs generated by jscoverage/JSCover
-lib-cov
-
-# Coverage directory used by tools like istanbul
-coverage
-*.lcov
-
-# nyc test coverage
-.nyc_output
-
-# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
-.grunt
-
-# Bower dependency directory (https://bower.io/)
-bower_components
-
-# node-waf configuration
-.lock-wscript
-
-# Compiled binary addons (https://nodejs.org/api/addons.html)
-build/Release
-
-# Dependency directories
-node_modules/
-jspm_packages/
-
-# TypeScript v1 declaration files
-typings/
-
-# TypeScript cache
-*.tsbuildinfo
-
-# Optional npm cache directory
-.npm
-
-# Optional eslint cache
-.eslintcache
-
-# Microbundle cache
-.rpt2_cache/
-.rts2_cache_cjs/
-.rts2_cache_es/
-.rts2_cache_umd/
-
-# Optional REPL history
-.node_repl_history
-
-# Output of 'npm pack'
-*.tgz
-
-# Yarn Integrity file
-.yarn-integrity
-
-# dotenv environment variables file
-.env
-.env.test
-
-# parcel-bundler cache (https://parceljs.org/)
-.cache
-
-# next.js build output
-.next
-
-# nuxt.js build output
-.nuxt
-
-# gatsby files
-.cache/
-public
-
-# vuepress build output
-.vuepress/dist
-
-# Serverless directories
-.serverless/
-
-# FuseBox cache
-.fusebox/
-
-# DynamoDB Local files
-.dynamodb/
-
-# Editors
-Session.vim
diff --git a/deps/npm/node_modules/libnpmdiff/CHANGELOG.md b/deps/npm/node_modules/libnpmdiff/CHANGELOG.md
deleted file mode 100644
index a4c3396e117d8a..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/CHANGELOG.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Changelog
-
-## 2.0.3
-
-- fix name of options sent by the npm cli
-
-## 2.0.2
-
-- fix matching basename file filter
-
-## 2.0.1
-
-- fix for tarballs not listing folder names
-
-## 2.0.0
-
-- API rewrite:
- - normalized all options
- - specs to compare are now an array
-- fix context=0
-- added support to filtering by folder names
-
-## 1.0.1
-
-- fixed nameOnly option
-
-## 1.0.0
-
-- Initial release
diff --git a/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs b/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs
deleted file mode 100644
index 865193a0b53130..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/format-diff.js.test.cjs
+++ /dev/null
@@ -1,152 +0,0 @@
-/* IMPORTANT
- * This snapshot file is auto-generated, but designed for humans.
- * It should be checked into source control and tracked carefully.
- * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
- * Make sure to inspect the output below. Do not ignore changes!
- */
-'use strict'
-exports[`test/format-diff.js TAP added file > should output expected added file diff result 1`] = `
-diff --git a/foo.js b/foo.js
-new file mode 100755
-index v1.0.0..v2.0.0
---- a/foo.js
-+++ b/foo.js
-@@ -0,0 +1,2 @@
-+"use strict"
-+module.exports = "foo"
-`
-
-exports[`test/format-diff.js TAP binary file > should output expected bin file diff result 1`] = `
-diff --git a/foo.jpg b/foo.jpg
-index v1.0.0..v2.0.0 100644
---- a/foo.jpg
-+++ b/foo.jpg
-`
-
-exports[`test/format-diff.js TAP changed file mode > should output expected changed file mode diff result 1`] = `
-diff --git a/foo.js b/foo.js
-old mode 100644
-new mode 100755
-index v1.0.0..v2.0.0
---- a/foo.js
-+++ b/foo.js
-`
-
-exports[`test/format-diff.js TAP colored output > should output expected colored diff result 1`] = `
-[33mdiff --git a/foo.js b/foo.js[39m
-[33mindex v1.0.0..v2.0.0 100644[39m
-[33m--- a/foo.js[39m
-[33m+++ b/foo.js[39m
-[35m@@ -1,2 +1,2 @@[39m
- "use strict"
-[31m-module.exports = "foo"[39m
-[32m+module.exports = "foobar"[39m
-`
-
-exports[`test/format-diff.js TAP diff options > should output expected diff result 1`] = `
-diff --git before/foo.js after/foo.js
-index v1.0.0..v2.0.0 100644
---- before/foo.js
-+++ after/foo.js
-@@ -4,4 +4,6 @@
- const c = "c"
-+const d = "d"
- module.exports = () => a+
- b+
--c
-+c+
-+d
-`
-
-exports[`test/format-diff.js TAP diffUnified=0 > should output no context lines in output 1`] = `
-diff --git a/foo.js b/foo.js
-index v1.0.0..v2.0.0 100644
---- a/foo.js
-+++ b/foo.js
-@@ -3,2 +3,3 @@
--const b = "b"
--const c = "c"
-+ const b = "b"
-+ const c = "c"
-+ const d = "d"
-@@ -7,1 +8,2 @@
--c
-+c+
-+d
-`
-
-exports[`test/format-diff.js TAP format multiple files patch > should output expected result for multiple files 1`] = `
-diff --git a/foo.js b/foo.js
-index v1.0.0..v1.1.1 100644
---- a/foo.js
-+++ b/foo.js
-@@ -1,2 +1,2 @@
- "use strict"
--module.exports = "foo"
-+module.exports = "foobar"
-diff --git a/lib/utils.js b/lib/utils.js
-index v1.0.0..v1.1.1 100644
---- a/lib/utils.js
-+++ b/lib/utils.js
-@@ -1,3 +1,4 @@
- "use strict"
- const bar = require("./bar.js")
--module.exports = () => bar
-+module.exports =
-+ () => bar + "util"
-`
-
-exports[`test/format-diff.js TAP format removed file > should output expected removed file diff result 1`] = `
-diff --git a/foo.js b/foo.js
-deleted file mode 100644
-index v1.0.0..v2.0.0
---- a/foo.js
-+++ b/foo.js
-@@ -1,2 +0,0 @@
--"use strict"
--module.exports = "foo"
-/ No newline at end of file
-`
-
-exports[`test/format-diff.js TAP format simple diff > should output expected diff result 1`] = `
-diff --git a/foo.js b/foo.js
-index v1.0.0..v2.0.0 100644
---- a/foo.js
-+++ b/foo.js
-@@ -1,2 +1,2 @@
- "use strict"
--module.exports = "foo"
-+module.exports = "foobar"
-`
-
-exports[`test/format-diff.js TAP noPrefix > should output result with no prefixes 1`] = `
-diff --git foo.js foo.js
-index v1.0.0..v2.0.0 100644
-Index: foo.js
---- foo.js
-+++ foo.js
-@@ -1,2 +1,2 @@
- "use strict"
--module.exports = "foo"
-+module.exports = "foobar"
-`
-
-exports[`test/format-diff.js TAP nothing to diff > should output empty result 1`] = `
-
-`
-
-exports[`test/format-diff.js TAP respect --tag-version-prefix option > should output expected diff result 1`] = `
-diff --git a/foo.js b/foo.js
-index b1.0.0..b2.0.0 100644
---- a/foo.js
-+++ b/foo.js
-@@ -1,2 +1,2 @@
- "use strict"
--module.exports = "foo"
-+module.exports = "foobar"
-`
-
-exports[`test/format-diff.js TAP using --name-only option > should output expected diff result 1`] = `
-foo.js
-lib/utils.js
-`
diff --git a/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/index.js.test.cjs b/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/index.js.test.cjs
deleted file mode 100644
index 21db3deac4d702..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/index.js.test.cjs
+++ /dev/null
@@ -1,115 +0,0 @@
-/* IMPORTANT
- * This snapshot file is auto-generated, but designed for humans.
- * It should be checked into source control and tracked carefully.
- * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
- * Make sure to inspect the output below. Do not ignore changes!
- */
-'use strict'
-exports[`test/index.js TAP compare two diff specs > should output expected diff 1`] = `
-diff --git a/index.js b/index.js
-index v1.0.0..v2.0.0 100644
---- a/index.js
-+++ b/index.js
-@@ -1,2 +1,2 @@
- module.exports =
-- "a1"
-+ "a2"
-diff --git a/package.json b/package.json
-index v1.0.0..v2.0.0 100644
---- a/package.json
-+++ b/package.json
-@@ -1,4 +1,4 @@
- {
- "name": "a",
-- "version": "1.0.0"
-+ "version": "2.0.0"
- }
-`
-
-exports[`test/index.js TAP folder in node_modules nested, absolute path > should output expected diff 1`] = `
-diff --git a/package.json b/package.json
-index v2.0.0..v2.0.1 100644
---- a/package.json
-+++ b/package.json
-@@ -1,6 +1,6 @@
- {
- "name": "b",
-- "version": "2.0.0",
-+ "version": "2.0.1",
- "scripts": {
- "prepare": "node prepare.js"
- }
-diff --git a/prepare.js b/prepare.js
-index v2.0.0..v2.0.1 100644
---- a/prepare.js
-+++ b/prepare.js
-@@ -1,1 +0,0 @@
--throw new Error("ERR")
-/ No newline at end of file
-`
-
-exports[`test/index.js TAP folder in node_modules nested, relative path > should output expected diff 1`] = `
-diff --git a/package.json b/package.json
-index v2.0.0..v2.0.1 100644
---- a/package.json
-+++ b/package.json
-@@ -1,6 +1,6 @@
- {
- "name": "b",
-- "version": "2.0.0",
-+ "version": "2.0.1",
- "scripts": {
- "prepare": "node prepare.js"
- }
-diff --git a/prepare.js b/prepare.js
-index v2.0.0..v2.0.1 100644
---- a/prepare.js
-+++ b/prepare.js
-@@ -1,1 +0,0 @@
--throw new Error("ERR")
-/ No newline at end of file
-`
-
-exports[`test/index.js TAP folder in node_modules top-level, absolute path > should output expected diff 1`] = `
-diff --git a/package.json b/package.json
-index v1.0.0..v1.0.1 100644
---- a/package.json
-+++ b/package.json
-@@ -1,6 +1,6 @@
- {
- "name": "a",
-- "version": "1.0.0",
-+ "version": "1.0.1",
- "scripts": {
- "prepare": "node prepare.js"
- }
-diff --git a/prepare.js b/prepare.js
-index v1.0.0..v1.0.1 100644
---- a/prepare.js
-+++ b/prepare.js
-@@ -1,1 +0,0 @@
--throw new Error("ERR")
-/ No newline at end of file
-`
-
-exports[`test/index.js TAP folder in node_modules top-level, relative path > should output expected diff 1`] = `
-diff --git a/package.json b/package.json
-index v1.0.0..v1.0.1 100644
---- a/package.json
-+++ b/package.json
-@@ -1,6 +1,6 @@
- {
- "name": "a",
-- "version": "1.0.0",
-+ "version": "1.0.1",
- "scripts": {
- "prepare": "node prepare.js"
- }
-diff --git a/prepare.js b/prepare.js
-index v1.0.0..v1.0.1 100644
---- a/prepare.js
-+++ b/prepare.js
-@@ -1,1 +0,0 @@
--throw new Error("ERR")
-/ No newline at end of file
-`
diff --git a/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/untar.js.test.cjs b/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/untar.js.test.cjs
deleted file mode 100644
index b1092feb6ee8c1..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/tap-snapshots/test/untar.js.test.cjs
+++ /dev/null
@@ -1,134 +0,0 @@
-/* IMPORTANT
- * This snapshot file is auto-generated, but designed for humans.
- * It should be checked into source control and tracked carefully.
- * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
- * Make sure to inspect the output below. Do not ignore changes!
- */
-'use strict'
-exports[`test/untar.js TAP filter files > should return list of filenames 1`] = `
-LICENSE
-README.md
-`
-
-exports[`test/untar.js TAP filter files > should return map of filenames with valid contents 1`] = `
-a/LICENSE: true
-a/README.md: true
-`
-
-exports[`test/untar.js TAP filter files by exact filename > should return no filenames 1`] = `
-
-`
-
-exports[`test/untar.js TAP filter files by exact filename > should return no filenames 2`] = `
-
-`
-
-exports[`test/untar.js TAP filter files using glob expressions > should return list of filenames 1`] = `
-lib/index.js
-lib/utils/b.js
-package-lock.json
-test/index.js
-`
-
-exports[`test/untar.js TAP filter files using glob expressions > should return map of filenames with valid contents 1`] = `
-a/lib/index.js: true
-a/lib/utils/b.js: true
-a/package-lock.json: true
-a/test/index.js: true
-`
-
-exports[`test/untar.js TAP match files by end of filename > should return list of filenames 1`] = `
-lib/index.js
-lib/utils/b.js
-test/index.js
-test/utils/b.js
-`
-
-exports[`test/untar.js TAP match files by end of filename > should return map of filenames with valid contents 1`] = `
-a/lib/index.js: true
-a/lib/utils/b.js: true
-a/test/index.js: true
-a/test/utils/b.js: true
-`
-
-exports[`test/untar.js TAP match files by simple folder name > should return list of filenames 1`] = `
-lib/index.js
-lib/utils/b.js
-`
-
-exports[`test/untar.js TAP match files by simple folder name > should return map of filenames with valid contents 1`] = `
-a/lib/index.js: true
-a/lib/utils/b.js: true
-`
-
-exports[`test/untar.js TAP match files by simple folder name variation > should return list of filenames 1`] = `
-test/index.js
-test/utils/b.js
-`
-
-exports[`test/untar.js TAP match files by simple folder name variation > should return map of filenames with valid contents 1`] = `
-a/test/index.js: true
-a/test/utils/b.js: true
-`
-
-exports[`test/untar.js TAP untar package with folders > should have read contents 1`] = `
-module.exports = 'b'
-
-`
-
-exports[`test/untar.js TAP untar package with folders > should return list of filenames 1`] = `
-lib/index.js
-lib/utils/b.js
-package-lock.json
-package.json
-test/index.js
-test/utils/b.js
-`
-
-exports[`test/untar.js TAP untar package with folders > should return map of filenames to its contents 1`] = `
-a/lib/index.js: true
-a/lib/utils/b.js: true
-a/package-lock.json: true
-a/package.json: true
-a/test/index.js: true
-a/test/utils/b.js: true
-`
-
-exports[`test/untar.js TAP untar simple package > should have read contents 1`] = `
-The MIT License (MIT)
-
-Copyright (c) Ruy Adorno (ruyadorno.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-`
-
-exports[`test/untar.js TAP untar simple package > should return list of filenames 1`] = `
-LICENSE
-index.js
-package.json
-README.md
-`
-
-exports[`test/untar.js TAP untar simple package > should return map of filenames to its contents 1`] = `
-a/LICENSE: true
-a/index.js: true
-a/package.json: true
-a/README.md: true
-`
diff --git a/deps/npm/node_modules/libnpmdiff/test/format-diff.js b/deps/npm/node_modules/libnpmdiff/test/format-diff.js
deleted file mode 100644
index f2fc7c77d7f11a..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/test/format-diff.js
+++ /dev/null
@@ -1,483 +0,0 @@
-const t = require('tap')
-
-const formatDiff = require('../lib/format-diff.js')
-
-const normalizeWin = (str) => str
- .replace(/\\+/g, '/')
- .replace(/\r\n/g, '\n')
-
-t.cleanSnapshot = (str) => normalizeWin(str)
-
-t.test('format simple diff', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foobar"\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- }),
- 'should output expected diff result'
- )
- t.end()
-})
-
-t.test('nothing to diff', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '1.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- }),
- 'should output empty result'
- )
- t.end()
-})
-
-t.test('format removed file', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- }),
- 'should output expected removed file diff result'
- )
- t.end()
-})
-
-t.test('changed file mode', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100755',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- }),
- 'should output expected changed file mode diff result'
- )
- t.end()
-})
-
-t.test('added file', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100755',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- }),
- 'should output expected added file diff result'
- )
- t.end()
-})
-
-t.test('binary file', t => {
- const files = new Set([
- 'foo.jpg',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.jpg': {
- content: Buffer.from(''),
- mode: '100644',
- },
- 'b/foo.jpg': {
- content: Buffer.from(''),
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- }),
- 'should output expected bin file diff result'
- )
- t.end()
-})
-
-t.test('nothing to compare', t => {
- const files = new Set([
- 'foo.jpg',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.jpg': {},
- 'b/foo.jpg': {},
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.equal(
- formatDiff({
- files,
- refs,
- versions,
- }),
- '',
- 'should have no output'
- )
- t.end()
-})
-
-t.test('colored output', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foobar"\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- opts: {
- color: true,
- },
- }),
- 'should output expected colored diff result'
- )
- t.end()
-})
-
-t.test('using --name-only option', t => {
- const files = new Set([
- 'foo.js',
- 'lib/bar.js',
- 'lib/utils.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foobar"\n',
- mode: '100644',
- },
- 'a/lib/bar.js': {
- content: '"use strict"\nmodule.exports = "bar"\n',
- mode: '100644',
- },
- 'b/lib/bar.js': {
- content: '"use strict"\nmodule.exports = "bar"\n',
- mode: '100644',
- },
- 'a/lib/utils.js': {
- content: '"use strict"\nconst bar = require("./bar.js")\n'
- + 'module.exports = () => bar\n',
- mode: '100644',
- },
- 'b/lib/utils.js': {
- content: '"use strict"\nconst bar = require("./bar.js")\n'
- + 'module.exports =\n () => bar + "util"\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- opts: {
- diffNameOnly: true,
- },
- }),
- 'should output expected diff result'
- )
- t.end()
-})
-
-t.test('respect --tag-version-prefix option', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foobar"\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- opts: {
- tagVersionPrefix: 'b',
- },
- }),
- 'should output expected diff result'
- )
- t.end()
-})
-
-t.test('diff options', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nconst a = "a"\nconst b = "b"\n'
- + 'const c = "c"\nmodule.exports = () => a+\nb+\nc\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nconst a = "a"\n const b = "b"\n'
- + ' const c = "c"\n const d = "d"\n'
- + 'module.exports = () => a+\nb+\nc+\nd\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- opts: {
- diffUnified: 1,
- diffIgnoreAllSpace: true,
- diffSrcPrefix: 'before/',
- diffDstPrefix: 'after/',
- },
- }),
- 'should output expected diff result'
- )
- t.end()
-})
-
-t.test('diffUnified=0', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nconst a = "a"\nconst b = "b"\n'
- + 'const c = "c"\nmodule.exports = () => a+\nb+\nc\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nconst a = "a"\n const b = "b"\n'
- + ' const c = "c"\n const d = "d"\n'
- + 'module.exports = () => a+\nb+\nc+\nd\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- opts: {
- diffUnified: 0,
- },
- }),
- 'should output no context lines in output'
- )
- t.end()
-})
-
-t.test('noPrefix', t => {
- const files = new Set([
- 'foo.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foobar"\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '2.0.0',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- opts: {
- diffNoPrefix: true,
- },
- }),
- 'should output result with no prefixes'
- )
- t.end()
-})
-
-t.test('format multiple files patch', t => {
- const files = new Set([
- 'foo.js',
- 'lib/bar.js',
- 'lib/utils.js',
- ])
- const refs = new Map(Object.entries({
- 'a/foo.js': {
- content: '"use strict"\nmodule.exports = "foo"\n',
- mode: '100644',
- },
- 'b/foo.js': {
- content: '"use strict"\nmodule.exports = "foobar"\n',
- mode: '100644',
- },
- 'a/lib/bar.js': {
- content: '"use strict"\nmodule.exports = "bar"\n',
- mode: '100644',
- },
- 'b/lib/bar.js': {
- content: '"use strict"\nmodule.exports = "bar"\n',
- mode: '100644',
- },
- 'a/lib/utils.js': {
- content: '"use strict"\nconst bar = require("./bar.js")\n'
- + 'module.exports = () => bar\n',
- mode: '100644',
- },
- 'b/lib/utils.js': {
- content: '"use strict"\nconst bar = require("./bar.js")\n'
- + 'module.exports =\n () => bar + "util"\n',
- mode: '100644',
- },
- }))
- const versions = {
- a: '1.0.0',
- b: '1.1.1',
- }
-
- t.matchSnapshot(
- formatDiff({
- files,
- refs,
- versions,
- }),
- 'should output expected result for multiple files'
- )
- t.end()
-})
diff --git a/deps/npm/node_modules/libnpmdiff/test/index.js b/deps/npm/node_modules/libnpmdiff/test/index.js
deleted file mode 100644
index 88b474c111f156..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/test/index.js
+++ /dev/null
@@ -1,147 +0,0 @@
-const { resolve } = require('path')
-
-const t = require('tap')
-
-const diff = require('../index.js')
-
-const normalizePath = p => p
- .replace(/\\+/g, '/')
- .replace(/\r\n/g, '\n')
-
-t.cleanSnapshot = (str) => normalizePath(str)
- .replace(normalizePath(process.execPath), 'node')
-
-const json = (obj) => `${JSON.stringify(obj, null, 2)}\n`
-
-t.test('compare two diff specs', async t => {
- const path = t.testdir({
- a1: {
- 'package.json': json({
- name: 'a',
- version: '1.0.0',
- }),
- 'index.js': 'module.exports =\n "a1"\n',
- },
- a2: {
- 'package.json': json({
- name: 'a',
- version: '2.0.0',
- }),
- 'index.js': 'module.exports =\n "a2"\n',
- },
- })
-
- const a = `file:${resolve(path, 'a1')}`
- const b = `file:${resolve(path, 'a2')}`
-
- t.resolveMatchSnapshot(diff([a, b], {}), 'should output expected diff')
-})
-
-t.test('using single arg', async t => {
- await t.rejects(
- diff(['abbrev@1.0.3']),
- /libnpmdiff needs two arguments to compare/,
- 'should throw EDIFFARGS error'
- )
-})
-
-t.test('too many args', async t => {
- const args = ['abbrev@1.0.3', 'abbrev@1.0.4', 'abbrev@1.0.5']
- await t.rejects(
- diff(args),
- /libnpmdiff needs two arguments to compare/,
- 'should output diff against cwd files'
- )
-})
-
-t.test('folder in node_modules', async t => {
- const path = t.testdir({
- node_modules: {
- a: {
- 'package.json': json({
- name: 'a',
- version: '1.0.0',
- scripts: {
- prepare: `${process.execPath} prepare.js`,
- },
- }),
- 'prepare.js': 'throw new Error("ERR")',
- node_modules: {
- b: {
- 'package.json': json({
- name: 'b',
- version: '2.0.0',
- scripts: {
- prepare: `${process.execPath} prepare.js`,
- },
- }),
- 'prepare.js': 'throw new Error("ERR")',
- },
- },
- },
- },
- packages: {
- a: {
- 'package.json': json({
- name: 'a',
- version: '1.0.1',
- scripts: {
- prepare: `${process.execPath} prepare.js`,
- },
- }),
- 'prepare.js': '',
- },
- b: {
- 'package.json': json({
- name: 'b',
- version: '2.0.1',
- scripts: {
- prepare: `${process.execPath} prepare.js`,
- },
- }),
- 'prepare.js': '',
- },
- },
- 'package.json': json({
- name: 'my-project',
- version: '1.0.0',
- }),
- })
-
- t.test('top-level, absolute path', async t => {
- t.resolveMatchSnapshot(diff([
- `file:${resolve(path, 'node_modules/a')}`,
- `file:${resolve(path, 'packages/a')}`,
- ], { where: path }), 'should output expected diff')
- })
- t.test('top-level, relative path', async t => {
- const _cwd = process.cwd()
- process.chdir(path)
- t.teardown(() => {
- process.chdir(_cwd)
- })
-
- t.resolveMatchSnapshot(diff([
- 'file:./node_modules/a',
- 'file:./packages/a',
- ], { where: path }), 'should output expected diff')
- })
- t.test('nested, absolute path', async t => {
- t.resolveMatchSnapshot(diff([
- `file:${resolve(path, 'node_modules/a/node_modules/b')}`,
- `file:${resolve(path, 'packages/b')}`,
- ], { where: path}), 'should output expected diff')
- })
- t.test('nested, relative path', async t => {
- const _cwd = process.cwd()
- process.chdir(path)
- t.teardown(() => {
- process.chdir(_cwd)
- })
-
- t.resolveMatchSnapshot(diff([
- 'file:./node_modules/a/node_modules/b',
- 'file:./packages/b',
- ], { where: path }), 'should output expected diff')
- })
-})
diff --git a/deps/npm/node_modules/libnpmdiff/test/should-print-patch.js b/deps/npm/node_modules/libnpmdiff/test/should-print-patch.js
deleted file mode 100644
index 97b15787d3933c..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/test/should-print-patch.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const t = require('tap')
-const shouldPrintPatch = require('../lib/should-print-patch.js')
-
-t.test('valid filenames', t => {
- t.ok(shouldPrintPatch('LICENSE'))
- t.ok(shouldPrintPatch('.gitignore'))
- t.ok(shouldPrintPatch('foo.md'))
- t.ok(shouldPrintPatch('./bar.txt'))
- t.ok(shouldPrintPatch('/a/b/c/bar.html'))
- t.end()
-})
-
-t.test('invalid filenames', t => {
- t.notOk(shouldPrintPatch('foo.exe'))
- t.notOk(shouldPrintPatch('./foo.jpg'))
- t.notOk(shouldPrintPatch('/a/b/c/bar.bin'))
- t.end()
-})
-
-t.test('using --text/-a option', t => {
- const opts = {
- diffText: true,
- }
- t.ok(shouldPrintPatch('foo.exe', opts))
- t.ok(shouldPrintPatch('./foo.jpg', opts))
- t.ok(shouldPrintPatch('/a/b/c/bar.bin', opts))
- t.end()
-})
diff --git a/deps/npm/node_modules/libnpmdiff/test/tarball.js b/deps/npm/node_modules/libnpmdiff/test/tarball.js
deleted file mode 100644
index 3a959be6e53bc0..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/test/tarball.js
+++ /dev/null
@@ -1,96 +0,0 @@
-const { resolve } = require('path')
-
-const t = require('tap')
-const tar = require('tar')
-const pacote = require('pacote')
-pacote.tarball = () => {
- throw new Error('Failed to detect node_modules tarball')
-}
-
-const tarball = require('../lib/tarball.js')
-
-const json = (obj) => `${JSON.stringify(obj, null, 2)}\n`
-
-t.test('returns a tarball from node_modules', t => {
- t.plan(2)
-
- const path = t.testdir({
- node_modules: {
- a: {
- 'package.json': json({
- name: 'a',
- version: '1.0.0',
- bin: { a: 'index.js' },
- }),
- 'index.js': '',
- },
- },
- })
-
- const _cwd = process.cwd()
- process.chdir(path)
- t.teardown(() => {
- process.chdir(_cwd)
- })
-
- tarball({ bin: { a: 'index.js' }, _resolved: resolve(path, 'node_modules/a') }, { where: path })
- .then(res => {
- tar.list({
- filter: path => {
- t.match(
- path,
- /package.json|index.js/,
- 'should return tarball with expected files'
- )
- },
- })
- .on('error', e => {
- throw e
- })
- .end(res)
- })
-})
-
-t.test('node_modules folder within a linked dir', async t => {
- const path = t.testdir({
- node_modules: {
- a: t.fixture('symlink', '../packages/a'),
- },
- packages: {
- a: {
- node_modules: {
- b: {
- 'package.json': json({
- name: 'a',
- version: '1.0.0',
- }),
- },
- },
- },
- },
- })
-
- const link = await tarball({ _resolved: resolve(path, 'node_modules/a/node_modules/b') }, {})
- t.ok(link, 'should retrieve tarball from reading link')
-
- const target = await tarball({ _resolved: resolve(path, 'packages/a/node_modules/b') }, {})
- t.ok(target, 'should retrieve tarball from reading target')
-})
-
-t.test('pkg not in a node_modules folder', async t => {
- const path = t.testdir({
- packages: {
- a: {
- 'package.json': json({
- name: 'a',
- version: '1.0.0',
- }),
- },
- },
- })
-
- t.throws(
- () => tarball({ _resolved: resolve(path, 'packages/a') }, {}),
- 'should call regular pacote.tarball method instead'
- )
-})
diff --git a/deps/npm/node_modules/libnpmdiff/test/untar.js b/deps/npm/node_modules/libnpmdiff/test/untar.js
deleted file mode 100644
index 62be1c6ba9003d..00000000000000
--- a/deps/npm/node_modules/libnpmdiff/test/untar.js
+++ /dev/null
@@ -1,231 +0,0 @@
-const { resolve } = require('path')
-const t = require('tap')
-const pacote = require('pacote')
-const untar = require('../lib/untar.js')
-
-t.test('untar simple package', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/simple-output-2.2.1.tgz'))
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- })
-
- t.matchSnapshot([...files].join('\n'), 'should return list of filenames')
- t.matchSnapshot(
- [...refs.entries()].map(([k, v]) => `${k}: ${!!v}`).join('\n'),
- 'should return map of filenames to its contents'
- )
- t.matchSnapshot(refs.get('a/LICENSE').content, 'should have read contents')
-})
-
-t.test('untar package with folders', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/archive.tgz'))
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- })
-
- t.matchSnapshot([...files].join('\n'), 'should return list of filenames')
- t.matchSnapshot(
- [...refs.entries()].map(([k, v]) => `${k}: ${!!v}`).join('\n'),
- 'should return map of filenames to its contents'
- )
- t.matchSnapshot(
- refs.get('a/lib/utils/b.js').content,
- 'should have read contents'
- )
-})
-
-t.test('filter files', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/simple-output-2.2.1.tgz'))
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- }, {
- diffFiles: [
- './LICENSE',
- 'missing-file',
- 'README.md',
- ],
- })
-
- t.matchSnapshot([...files].join('\n'), 'should return list of filenames')
- t.matchSnapshot(
- [...refs.entries()].map(([k, v]) => `${k}: ${!!v.content}`).join('\n'),
- 'should return map of filenames with valid contents'
- )
-})
-
-t.test('filter files using glob expressions', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/archive.tgz'))
- const cwd = t.testdir({
- lib: {
- 'index.js': '',
- utils: {
- '/b.js': '',
- },
- },
- 'package-lock.json': '',
- 'package.json': '',
- test: {
- '/index.js': '',
- utils: {
- 'b.js': '',
- },
- },
- })
-
- const _cwd = process.cwd()
- process.chdir(cwd)
- t.teardown(() => {
- process.chdir(_cwd)
- })
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- }, {
- diffFiles: [
- './lib/**',
- '*-lock.json',
- 'test\\*', // windows-style sep should be normalized
- ],
- })
-
- t.matchSnapshot([...files].join('\n'), 'should return list of filenames')
- t.matchSnapshot(
- [...refs.entries()].map(([k, v]) => `${k}: ${!!v.content}`).join('\n'),
- 'should return map of filenames with valid contents'
- )
-})
-
-t.test('match files by end of filename', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/archive.tgz'))
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- }, {
- diffFiles: [
- '*.js',
- ],
- })
-
- t.matchSnapshot([...files].join('\n'), 'should return list of filenames')
- t.matchSnapshot(
- [...refs.entries()].map(([k, v]) => `${k}: ${!!v.content}`).join('\n'),
- 'should return map of filenames with valid contents'
- )
-})
-
-t.test('filter files by exact filename', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/archive.tgz'))
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- }, {
- diffFiles: [
- 'index.js',
- ],
- })
-
- t.matchSnapshot([...files].join('\n'), 'should return no filenames')
- t.matchSnapshot(
- [...refs.entries()].map(([k, v]) => `${k}: ${!!v.content}`).join('\n'),
- 'should return no filenames'
- )
-})
-
-t.test('match files by simple folder name', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/archive.tgz'))
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- }, {
- diffFiles: [
- 'lib',
- ],
- })
-
- t.matchSnapshot([...files].join('\n'), 'should return list of filenames')
- t.matchSnapshot(
- [...refs.entries()].map(([k, v]) => `${k}: ${!!v.content}`).join('\n'),
- 'should return map of filenames with valid contents'
- )
-})
-
-t.test('match files by simple folder name variation', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/archive.tgz'))
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- }, {
- diffFiles: [
- './test/',
- ],
- })
-
- t.matchSnapshot([...files].join('\n'), 'should return list of filenames')
- t.matchSnapshot(
- [...refs.entries()].map(([k, v]) => `${k}: ${!!v.content}`).join('\n'),
- 'should return map of filenames with valid contents'
- )
-})
-
-t.test('filter out all files', async t => {
- const item =
- await pacote.tarball(resolve('./test/fixtures/simple-output-2.2.1.tgz'))
-
- const {
- files,
- refs,
- } = await untar({
- item,
- prefix: 'a/',
- }, {
- diffFiles: [
- 'non-matching-pattern',
- ],
- })
-
- t.equal(files.size, 0, 'should have no files')
- t.equal(refs.size, 0, 'should have no refs')
-})
diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json
index 067c39ae744fca..3a03bd6cba03cf 100644
--- a/deps/npm/node_modules/libnpmexec/package.json
+++ b/deps/npm/node_modules/libnpmexec/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmexec",
- "version": "3.0.0",
+ "version": "3.0.1",
"files": [
"lib"
],
@@ -50,7 +50,7 @@
"tap": "^15.0.6"
},
"dependencies": {
- "@npmcli/arborist": "^3.0.0",
+ "@npmcli/arborist": "^4.0.0",
"@npmcli/ci-detect": "^1.3.0",
"@npmcli/run-script": "^2.0.0",
"chalk": "^4.1.0",
diff --git a/deps/npm/node_modules/libnpmfund/package.json b/deps/npm/node_modules/libnpmfund/package.json
index e021d8874d26c6..2bd47419936445 100644
--- a/deps/npm/node_modules/libnpmfund/package.json
+++ b/deps/npm/node_modules/libnpmfund/package.json
@@ -1,6 +1,6 @@
{
"name": "libnpmfund",
- "version": "2.0.0",
+ "version": "2.0.1",
"files": [
"index.js"
],
@@ -52,7 +52,7 @@
"tap": "^15.0.9"
},
"dependencies": {
- "@npmcli/arborist": "^3.0.0"
+ "@npmcli/arborist": "^4.0.0"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
diff --git a/deps/npm/node_modules/npm-packlist/index.js b/deps/npm/node_modules/npm-packlist/index.js
index f498fa008ceca8..76018557cb9c8e 100644
--- a/deps/npm/node_modules/npm-packlist/index.js
+++ b/deps/npm/node_modules/npm-packlist/index.js
@@ -97,13 +97,14 @@ const npmWalker = Class => class Walker extends Class {
// ignore a bunch of things by default at the root level.
// also ignore anything in the main project node_modules hierarchy,
// except bundled dependencies
- if (!this.parent) {
+ if (this.isProject) {
this.bundled = opt.bundled || []
this.bundledScopes = Array.from(new Set(
this.bundled.filter(f => /^@/.test(f))
.map(f => f.split('/')[0])))
const rules = defaultRules.join('\n') + '\n'
- this.packageJsonCache = opt.packageJsonCache || new Map()
+ this.packageJsonCache = this.parent ? this.parent.packageJsonCache
+ : (opt.packageJsonCache || new Map())
super.onReadIgnoreFile(rootBuiltinRules, rules, _ => _)
} else {
this.bundled = []
@@ -112,8 +113,12 @@ const npmWalker = Class => class Walker extends Class {
}
}
+ get isProject () {
+ return !this.parent || this.parent.follow && this.isSymbolicLink
+ }
+
onReaddir (entries) {
- if (!this.parent) {
+ if (this.isProject) {
entries = entries.filter(e =>
e !== '.git' &&
!(e === 'node_modules' && this.bundled.length === 0)
@@ -126,8 +131,9 @@ const npmWalker = Class => class Walker extends Class {
// to be in the state the user wants to include them, and
// a package.json somewhere else might be a template or
// test or something else entirely.
- if (this.parent || !entries.includes('package.json'))
+ if (!this.isProject || !entries.includes('package.json')) {
return super.onReaddir(entries)
+ }
// when the cache has been seeded with the root manifest,
// we must respect that (it may differ from the filesystem)
@@ -137,8 +143,9 @@ const npmWalker = Class => class Walker extends Class {
const pkg = this.packageJsonCache.get(ig)
// fall back to filesystem when seeded manifest is invalid
- if (!pkg || typeof pkg !== 'object')
+ if (!pkg || typeof pkg !== 'object') {
return this.readPackageJson(entries)
+ }
// feels wonky, but this ensures package bin is _always_
// normalized, as well as guarding against invalid JSON
@@ -149,22 +156,26 @@ const npmWalker = Class => class Walker extends Class {
}
onReadPackageJson (entries, er, pkg) {
- if (er)
+ if (er) {
this.emit('error', er)
- else
+ } else {
this.getPackageFiles(entries, pkg)
+ }
}
mustHaveFilesFromPackage (pkg) {
const files = []
- if (pkg.browser)
+ if (pkg.browser) {
files.push('/' + pkg.browser)
- if (pkg.main)
+ }
+ if (pkg.main) {
files.push('/' + pkg.main)
+ }
if (pkg.bin) {
// always an object because normalized already
- for (const key in pkg.bin)
+ for (const key in pkg.bin) {
files.push('/' + pkg.bin[key])
+ }
}
files.push(
'/package.json',
@@ -194,8 +205,9 @@ const npmWalker = Class => class Walker extends Class {
this.packageJsonCache.set(ig, pkg)
// no files list, just return the normal readdir() result
- if (!Array.isArray(pkg.files))
+ if (!Array.isArray(pkg.files)) {
return super.onReaddir(entries)
+ }
pkg.files.push(...this.mustHaveFilesFromPackage(pkg))
@@ -204,13 +216,15 @@ const npmWalker = Class => class Walker extends Class {
// the files list as the effective readdir result, that means it
// looks like we don't have a node_modules folder at all unless we
// include it here.
- if ((pkg.bundleDependencies || pkg.bundledDependencies) && entries.includes('node_modules'))
+ if ((pkg.bundleDependencies || pkg.bundledDependencies) && entries.includes('node_modules')) {
pkg.files.push('node_modules')
+ }
const patterns = Array.from(new Set(pkg.files)).reduce((set, pattern) => {
const excl = pattern.match(/^!+/)
- if (excl)
+ if (excl) {
pattern = pattern.substr(excl[0].length)
+ }
// strip off any / from the start of the pattern. /foo => foo
pattern = pattern.replace(/^\/+/, '')
// an odd number of ! means a negated pattern. !!foo ==> foo
@@ -224,12 +238,14 @@ const npmWalker = Class => class Walker extends Class {
const negates = new Set()
const results = []
const then = (pattern, negate, er, fileList, i) => {
- if (er)
+ if (er) {
return this.emit('error', er)
+ }
results[i] = { negate, fileList }
- if (--n === 0)
+ if (--n === 0) {
processResults(results)
+ }
}
const processResults = results => {
for (const {negate, fileList} of results) {
@@ -268,15 +284,15 @@ const npmWalker = Class => class Walker extends Class {
// get the partial path from the root of the walk
const p = this.path.substr(this.root.length + 1)
const pkgre = /^node_modules\/(@[^/]+\/?[^/]+|[^/]+)(\/.*)?$/
- const isRoot = !this.parent
- const pkg = isRoot && pkgre.test(entry) ?
+ const { isProject } = this
+ const pkg = isProject && pkgre.test(entry) ?
entry.replace(pkgre, '$1') : null
- const rootNM = isRoot && entry === 'node_modules'
- const rootPJ = isRoot && entry === 'package.json'
+ const rootNM = isProject && entry === 'node_modules'
+ const rootPJ = isProject && entry === 'package.json'
return (
// if we're in a bundled package, check with the parent.
- /^node_modules($|\/)/i.test(p) ? this.parent.filterEntry(
+ /^node_modules($|\/)/i.test(p) && !this.isProject ? this.parent.filterEntry(
this.basename + '/' + entry, partial)
// if package is bundled, all files included
@@ -298,11 +314,11 @@ const npmWalker = Class => class Walker extends Class {
: packageMustHavesRE.test(entry) ? true
// npm-shrinkwrap and package.json always included in the root pkg
- : isRoot && (entry === 'npm-shrinkwrap.json' || entry === 'package.json')
+ : isProject && (entry === 'npm-shrinkwrap.json' || entry === 'package.json')
? true
// package-lock never included
- : isRoot && entry === 'package-lock.json' ? false
+ : isProject && entry === 'package-lock.json' ? false
// otherwise, follow ignore-walk's logic
: super.filterEntry(entry, partial)
@@ -310,20 +326,22 @@ const npmWalker = Class => class Walker extends Class {
}
filterEntries () {
- if (this.ignoreRules['.npmignore'])
+ if (this.ignoreRules['.npmignore']) {
this.ignoreRules['.gitignore'] = null
+ }
this.filterEntries = super.filterEntries
super.filterEntries()
}
addIgnoreFile (file, then) {
const ig = path.resolve(this.path, file)
- if (file === 'package.json' && this.parent)
+ if (file === 'package.json' && !this.isProject) {
then()
- else if (this.packageJsonCache.has(ig))
+ } else if (this.packageJsonCache.has(ig)) {
this.onPackageJson(ig, this.packageJsonCache.get(ig), then)
- else
+ } else {
super.addIgnoreFile(file, then)
+ }
}
onPackageJson (ig, pkg, then) {
@@ -347,19 +365,22 @@ const npmWalker = Class => class Walker extends Class {
// override parent stat function to completely skip any filenames
// that will break windows entirely.
// XXX(isaacs) Next major version should make this an error instead.
- stat (entry, file, dir, then) {
- if (nameIsBadForWindows(entry))
+ stat ({ entry, file, dir }, then) {
+ if (nameIsBadForWindows(entry)) {
then()
- else
- super.stat(entry, file, dir, then)
+ } else {
+ super.stat({ entry, file, dir }, then)
+ }
}
- // override parent onstat function to nix all symlinks
- onstat (st, entry, file, dir, then) {
- if (st.isSymbolicLink())
+ // override parent onstat function to nix all symlinks, other than
+ // those coming out of the followed bundled symlink deps
+ onstat ({ st, entry, file, dir, isSymbolicLink }, then) {
+ if (st.isSymbolicLink()) {
then()
- else
- super.onstat(st, entry, file, dir, then)
+ } else {
+ super.onstat({ st, entry, file, dir, isSymbolicLink }, then)
+ }
}
onReadIgnoreFile (file, data, then) {
@@ -371,8 +392,9 @@ const npmWalker = Class => class Walker extends Class {
// ignore package.json files that are not json
then()
}
- } else
+ } else {
super.onReadIgnoreFile(file, data, then)
+ }
}
sort (a, b) {
@@ -390,8 +412,8 @@ class Walker extends npmWalker(IgnoreWalker) {
this.onReadPackageJson(entries, er, pkg))
}
- walker (entry, then) {
- new Walker(this.walkerOpt(entry)).on('done', then).start()
+ walker (entry, opt, then) {
+ new Walker(this.walkerOpt(entry, opt)).on('done', then).start()
}
}
@@ -409,8 +431,8 @@ class WalkerSync extends npmWalker(IgnoreWalkerSync) {
}
}
- walker (entry, then) {
- new WalkerSync(this.walkerOpt(entry)).start()
+ walker (entry, opt, then) {
+ new WalkerSync(this.walkerOpt(entry, opt)).start()
then()
}
}
diff --git a/deps/npm/node_modules/npm-packlist/package.json b/deps/npm/node_modules/npm-packlist/package.json
index 49fa947547b6cc..2fe493a203601c 100644
--- a/deps/npm/node_modules/npm-packlist/package.json
+++ b/deps/npm/node_modules/npm-packlist/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-packlist",
- "version": "2.2.2",
+ "version": "3.0.0",
"description": "Get a list of the files to add from a folder into an npm package",
"directories": {
"test": "test"
@@ -8,7 +8,7 @@
"main": "index.js",
"dependencies": {
"glob": "^7.1.6",
- "ignore-walk": "^3.0.3",
+ "ignore-walk": "^4.0.1",
"npm-bundled": "^1.1.1",
"npm-normalize-package-bin": "^1.0.1"
},
@@ -19,25 +19,22 @@
"index.js"
],
"devDependencies": {
- "eslint": "^7.25.0",
- "eslint-plugin-import": "^2.22.1",
- "eslint-plugin-node": "^11.1.0",
- "eslint-plugin-promise": "^5.1.0",
- "eslint-plugin-standard": "^5.0.0",
+ "@npmcli/lint": "^1.0.2",
"mutate-fs": "^2.1.1",
"tap": "^15.0.6"
},
"scripts": {
"test": "tap",
- "posttest": "npm run lint",
+ "posttest": "npm run lint --",
"snap": "tap",
- "postsnap": "npm run lintfix",
+ "postsnap": "npm run lintfix --",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"eslint": "eslint",
- "lint": "npm run eslint -- index.js bin/index.js \"test/**/*.js\"",
- "lintfix": "npm run lint -- --fix"
+ "lint": "npm run npmclilint -- \"*.*js\" \"test/**/*.*js\"",
+ "lintfix": "npm run lint -- --fix",
+ "npmclilint": "npmcli-lint"
},
"repository": {
"type": "git",
diff --git a/deps/npm/node_modules/pacote/lib/git.js b/deps/npm/node_modules/pacote/lib/git.js
index 18f42547bb3ac9..ab87d494ce4bab 100644
--- a/deps/npm/node_modules/pacote/lib/git.js
+++ b/deps/npm/node_modules/pacote/lib/git.js
@@ -50,7 +50,7 @@ class GitFetcher extends Fetcher {
// use hosted.tarball() when we shell to RemoteFetcher later
this.resolved = this.spec.hosted
? repoUrl(this.spec.hosted, { noCommittish: false })
- : this.spec.fetchSpec + '#' + this.spec.gitCommittish
+ : this.spec.rawSpec
} else
this.resolvedSha = ''
}
diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json
index 17933ad128e3c0..d0fe0a065b414f 100644
--- a/deps/npm/node_modules/pacote/package.json
+++ b/deps/npm/node_modules/pacote/package.json
@@ -1,6 +1,6 @@
{
"name": "pacote",
- "version": "12.0.0",
+ "version": "12.0.2",
"description": "JavaScript package downloader",
"author": "Isaac Z. Schlueter (https://izs.me)",
"bin": {
@@ -44,7 +44,7 @@
"minipass": "^3.1.3",
"mkdirp": "^1.0.3",
"npm-package-arg": "^8.0.1",
- "npm-packlist": "^2.1.4",
+ "npm-packlist": "^3.0.0",
"npm-pick-manifest": "^6.0.0",
"npm-registry-fetch": "^11.0.0",
"promise-retry": "^2.0.1",
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 70590a84e7e13b..6024ad8246218b 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "8.0.0",
+ "version": "8.1.0",
"name": "npm",
"description": "a package manager for JavaScript",
"workspaces": [
@@ -7,6 +7,7 @@
"packages/*"
],
"files": [
+ "index.js",
"bin",
"docs/content/**/*.md",
"docs/output/**/*.html",
@@ -54,10 +55,10 @@
},
"dependencies": {
"@isaacs/string-locale-compare": "^1.1.0",
- "@npmcli/arborist": "^3.0.0",
- "@npmcli/ci-detect": "^1.2.0",
+ "@npmcli/arborist": "^4.0.1",
+ "@npmcli/ci-detect": "^1.4.0",
"@npmcli/config": "^2.3.0",
- "@npmcli/map-workspaces": "^1.0.4",
+ "@npmcli/map-workspaces": "^2.0.0",
"@npmcli/package-json": "^1.0.1",
"@npmcli/run-script": "^2.0.0",
"abbrev": "~1.1.1",
@@ -80,8 +81,8 @@
"json-parse-even-better-errors": "^2.3.1",
"libnpmaccess": "^4.0.2",
"libnpmdiff": "^2.0.4",
- "libnpmexec": "^3.0.0",
- "libnpmfund": "^2.0.0",
+ "libnpmexec": "^3.0.1",
+ "libnpmfund": "^2.0.1",
"libnpmhook": "^6.0.2",
"libnpmorg": "^2.0.2",
"libnpmpack": "^3.0.0",
@@ -106,7 +107,7 @@
"npm-user-validate": "^1.0.1",
"npmlog": "^5.0.1",
"opener": "^1.5.2",
- "pacote": "^12.0.0",
+ "pacote": "^12.0.2",
"parse-conflict-json": "^1.1.1",
"qrcode-terminal": "^0.12.0",
"read": "~1.0.7",
diff --git a/deps/npm/tap-snapshots/test/lib/config.js.test.cjs b/deps/npm/tap-snapshots/test/lib/config.js.test.cjs
index dab7ef55f64e82..e6f9e9280ac387 100644
--- a/deps/npm/tap-snapshots/test/lib/config.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/config.js.test.cjs
@@ -68,6 +68,7 @@ exports[`test/lib/config.js TAP config list --json > output matches snapshot 1`]
"ignore-scripts": false,
"include": [],
"include-staged": false,
+ "include-workspace-root": false,
"init-author-email": "",
"init-author-name": "",
"init-author-url": "",
@@ -86,6 +87,7 @@ exports[`test/lib/config.js TAP config list --json > output matches snapshot 1`]
"link": false,
"local-address": null,
"location": "user",
+ "lockfile-version": null,
"loglevel": "notice",
"logs-max": 10,
"long": false,
@@ -152,7 +154,7 @@ exports[`test/lib/config.js TAP config list --json > output matches snapshot 1`]
"viewer": "{VIEWER}",
"which": null,
"workspace": [],
- "workspaces": false,
+ "workspaces": null,
"yes": null,
"metrics-registry": "https://registry.npmjs.org/"
}
@@ -217,6 +219,7 @@ if-present = false
ignore-scripts = false
include = []
include-staged = false
+include-workspace-root = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
@@ -236,6 +239,7 @@ legacy-peer-deps = false
link = false
local-address = null
location = "user"
+lockfile-version = null
loglevel = "notice"
logs-max = 10
; long = false ; overridden by cli
@@ -303,7 +307,7 @@ versions = false
viewer = "{VIEWER}"
which = null
workspace = []
-workspaces = false
+workspaces = null
yes = null
; "global" config from {GLOBALPREFIX}/npmrc
diff --git a/deps/npm/tap-snapshots/test/lib/dist-tag.js.test.cjs b/deps/npm/tap-snapshots/test/lib/dist-tag.js.test.cjs
index 7eceb0250d926b..d6e101c5079f75 100644
--- a/deps/npm/tap-snapshots/test/lib/dist-tag.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/dist-tag.js.test.cjs
@@ -18,7 +18,7 @@ npm dist-tag ls []
Options:
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: dist-tags
@@ -40,7 +40,7 @@ npm dist-tag ls []
Options:
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: dist-tags
@@ -71,7 +71,7 @@ npm dist-tag ls []
Options:
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: dist-tags
@@ -93,7 +93,7 @@ npm dist-tag ls []
Options:
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: dist-tags
@@ -121,7 +121,7 @@ npm dist-tag ls []
Options:
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: dist-tags
@@ -179,7 +179,7 @@ npm dist-tag ls []
Options:
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: dist-tags
diff --git a/deps/npm/tap-snapshots/test/lib/init.js.test.cjs b/deps/npm/tap-snapshots/test/lib/init.js.test.cjs
index a7b007ac423005..99ca9c7f1d7d7e 100644
--- a/deps/npm/tap-snapshots/test/lib/init.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/init.js.test.cjs
@@ -5,6 +5,10 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
+exports[`test/lib/init.js TAP npm init workspces with root > does not print helper info 1`] = `
+Array []
+`
+
exports[`test/lib/init.js TAP workspaces no args > should print helper info 1`] = `
Array [
Array [
diff --git a/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
index 9f811a0058fd1a..6efecf2089e831 100644
--- a/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
+++ b/deps/npm/tap-snapshots/test/lib/load-all-commands.js.test.cjs
@@ -56,7 +56,7 @@ Options:
[--json] [--package-lock-only]
[--omit [--omit ...]]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
Run "npm help audit" for more info
`
@@ -173,7 +173,7 @@ Options:
[--omit [--omit ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: ddp
@@ -208,7 +208,7 @@ Options:
[--diff-no-prefix] [--diff-src-prefix ] [--diff-dst-prefix ]
[--diff-text] [-g|--global] [--tag ]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
Run "npm help diff" for more info
`
@@ -225,7 +225,7 @@ npm dist-tag ls []
Options:
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: dist-tags
@@ -243,7 +243,7 @@ npm docs [ [ ...]]
Options:
[--no-browser|--browser ] [--registry ]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: home
@@ -293,7 +293,7 @@ Options:
[--package [@] [--package [@] ...]]
[-c|--call ]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: x
@@ -343,7 +343,7 @@ Options:
[--omit [--omit ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
Run "npm help find-dupes" for more info
`
@@ -421,7 +421,7 @@ npm init [<@scope>/] (same as \`npx [<@scope>/]create-\`)
Options:
[-y|--yes] [-f|--force]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
aliases: create, innit
@@ -452,7 +452,7 @@ Options:
[--omit [--omit ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, add
@@ -499,7 +499,7 @@ Options:
[--omit [--omit ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: it
@@ -522,7 +522,7 @@ Options:
[--omit [--omit ...]] [--ignore-scripts]
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: ln
@@ -542,7 +542,7 @@ Options:
[--omit [--omit ...]] [--link]
[--package-lock-only] [--unicode]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: la
@@ -592,7 +592,7 @@ Options:
[--omit [--omit ...]] [--link]
[--package-lock-only] [--unicode]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: list
@@ -661,7 +661,7 @@ npm pack [[<@scope>/]...]
Options:
[--dry-run] [--json] [--pack-destination ]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
Run "npm help pack" for more info
`
@@ -740,7 +740,7 @@ npm prune [[<@scope>/]...]
Options:
[--omit [--omit ...]] [--dry-run]
[--json] [-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
Run "npm help prune" for more info
`
@@ -756,7 +756,7 @@ npm publish []
Options:
[--tag ] [--access ] [--dry-run] [--otp ]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
Run "npm help publish" for more info
`
@@ -772,7 +772,7 @@ npm rebuild [[<@scope>/][@] ...]
Options:
[-g|--global] [--no-bin-links] [--ignore-scripts]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
alias: rb
@@ -790,7 +790,7 @@ npm repo [ [ ...]]
Options:
[--no-browser|--browser ]
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces]
+[-ws|--workspaces] [--include-workspace-root]
Run "npm help repo" for more info
`
@@ -833,7 +833,7 @@ npm run-script [-- ]
Options:
[-w|--workspace [-w|--workspace ...]]
-[-ws|--workspaces] [--if-present] [--ignore-scripts]
+[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
[--script-shell ]
aliases: run, rum, urn
@@ -880,7 +880,7 @@ npm set-script [