diff --git a/lib/commands/install.js b/lib/commands/install.js index 75f0e2f175b61..f6486fe4b880d 100644 --- a/lib/commands/install.js +++ b/lib/commands/install.js @@ -34,6 +34,7 @@ class Install extends ArboristWorkspaceCmd { 'bin-links', 'fund', 'dry-run', + 'cpu', ...super.params, ] diff --git a/tap-snapshots/test/lib/commands/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index a7c71e72de74b..1a129351f0f1a 100644 --- a/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -33,6 +33,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "cidr": null, "color": true, "commit-hooks": true, + "cpu": null, "depth": null, "description": true, "dev": false, @@ -187,6 +188,7 @@ cert = null cidr = null color = true commit-hooks = true +cpu = null depth = null description = true dev = false diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index 2c8f8124235b6..45901acd9a71e 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -392,6 +392,16 @@ Run git commit hooks when using the \`npm version\` command. +#### \`cpu\` + +* Default: null +* Type: null or String + +Override CPU architecture of native modules to install. Acceptable values +are same as \`cpu\` field of package.json, which comes from \`process.arch\`. + + + #### \`depth\` * Default: \`Infinity\` if \`--all\` is set, otherwise \`1\` @@ -2006,6 +2016,7 @@ Array [ "cidr", "color", "commit-hooks", + "cpu", "depth", "description", "dev", @@ -2159,6 +2170,7 @@ Array [ "cidr", "color", "commit-hooks", + "cpu", "depth", "description", "dev", @@ -2313,6 +2325,7 @@ Object { "cidr": null, "color": false, "commitHooks": true, + "cpu": null, "defaultTag": "latest", "depth": null, "diff": Array [], @@ -3170,7 +3183,7 @@ Options: [--global-style] [--omit [--omit ...]] [--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] -[--no-fund] [--dry-run] +[--no-fund] [--dry-run] [--cpu ] [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] [--include-workspace-root] [--install-links] @@ -3201,6 +3214,7 @@ aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall #### \`bin-links\` #### \`fund\` #### \`dry-run\` +#### \`cpu\` #### \`workspace\` #### \`workspaces\` #### \`include-workspace-root\` @@ -3261,7 +3275,7 @@ Options: [--global-style] [--omit [--omit ...]] [--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] -[--no-fund] [--dry-run] +[--no-fund] [--dry-run] [--cpu ] [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] [--include-workspace-root] [--install-links] @@ -3292,6 +3306,7 @@ alias: it #### \`bin-links\` #### \`fund\` #### \`dry-run\` +#### \`cpu\` #### \`workspace\` #### \`workspaces\` #### \`include-workspace-root\` diff --git a/workspaces/config/lib/definitions/definitions.js b/workspaces/config/lib/definitions/definitions.js index 7f0edc7167a42..cf92f0265bc30 100644 --- a/workspaces/config/lib/definitions/definitions.js +++ b/workspaces/config/lib/definitions/definitions.js @@ -472,6 +472,17 @@ define('commit-hooks', { flatten, }) +define('cpu', { + default: null, + type: [null, String], + description: ` + Override CPU architecture of native modules to install. + Acceptable values are same as \`cpu\` field of package.json, + which comes from \`process.arch\`. + `, + flatten, +}) + define('depth', { default: null, defaultDescription: ` diff --git a/workspaces/config/tap-snapshots/test/type-description.js.test.cjs b/workspaces/config/tap-snapshots/test/type-description.js.test.cjs index 8c93f851f94b5..150031b5dcfb6 100644 --- a/workspaces/config/tap-snapshots/test/type-description.js.test.cjs +++ b/workspaces/config/tap-snapshots/test/type-description.js.test.cjs @@ -91,6 +91,10 @@ Object { "commit-hooks": Array [ "boolean value (true or false)", ], + "cpu": Array [ + null, + Function String(), + ], "depth": Array [ null, "numeric value",