Skip to content

Commit 0220186

Browse files
committed
add cpu option
1 parent b674c42 commit 0220186

File tree

5 files changed

+35
-2
lines changed

5 files changed

+35
-2
lines changed

lib/commands/install.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class Install extends ArboristWorkspaceCmd {
3434
'bin-links',
3535
'fund',
3636
'dry-run',
37+
'cpu',
3738
...super.params,
3839
]
3940

tap-snapshots/test/lib/commands/config.js.test.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna
3333
"cidr": null,
3434
"color": true,
3535
"commit-hooks": true,
36+
"cpu": null,
3637
"depth": null,
3738
"description": true,
3839
"dev": false,
@@ -187,6 +188,7 @@ cert = null
187188
cidr = null
188189
color = true
189190
commit-hooks = true
191+
cpu = null
190192
depth = null
191193
description = true
192194
dev = false

tap-snapshots/test/lib/docs.js.test.cjs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,16 @@ Run git commit hooks when using the \`npm version\` command.
392392
393393
394394
395+
#### \`cpu\`
396+
397+
* Default: null
398+
* Type: null or String
399+
400+
Override CPU architecture of native modules to install. Acceptable values
401+
are same as \`cpu\` field of package.json, which comes from \`process.arch\`.
402+
403+
404+
395405
#### \`depth\`
396406
397407
* Default: \`Infinity\` if \`--all\` is set, otherwise \`1\`
@@ -2006,6 +2016,7 @@ Array [
20062016
"cidr",
20072017
"color",
20082018
"commit-hooks",
2019+
"cpu",
20092020
"depth",
20102021
"description",
20112022
"dev",
@@ -2159,6 +2170,7 @@ Array [
21592170
"cidr",
21602171
"color",
21612172
"commit-hooks",
2173+
"cpu",
21622174
"depth",
21632175
"description",
21642176
"dev",
@@ -2313,6 +2325,7 @@ Object {
23132325
"cidr": null,
23142326
"color": false,
23152327
"commitHooks": true,
2328+
"cpu": null,
23162329
"defaultTag": "latest",
23172330
"depth": null,
23182331
"diff": Array [],
@@ -3170,7 +3183,7 @@ Options:
31703183
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
31713184
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
31723185
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
3173-
[--no-fund] [--dry-run]
3186+
[--no-fund] [--dry-run] [--cpu <cpu>]
31743187
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
31753188
[-ws|--workspaces] [--include-workspace-root] [--install-links]
31763189
@@ -3201,6 +3214,7 @@ aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
32013214
#### \`bin-links\`
32023215
#### \`fund\`
32033216
#### \`dry-run\`
3217+
#### \`cpu\`
32043218
#### \`workspace\`
32053219
#### \`workspaces\`
32063220
#### \`include-workspace-root\`
@@ -3261,7 +3275,7 @@ Options:
32613275
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
32623276
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
32633277
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
3264-
[--no-fund] [--dry-run]
3278+
[--no-fund] [--dry-run] [--cpu <cpu>]
32653279
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
32663280
[-ws|--workspaces] [--include-workspace-root] [--install-links]
32673281
@@ -3292,6 +3306,7 @@ alias: it
32923306
#### \`bin-links\`
32933307
#### \`fund\`
32943308
#### \`dry-run\`
3309+
#### \`cpu\`
32953310
#### \`workspace\`
32963311
#### \`workspaces\`
32973312
#### \`include-workspace-root\`

workspaces/config/lib/definitions/definitions.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,17 @@ define('commit-hooks', {
472472
flatten,
473473
})
474474

475+
define('cpu', {
476+
default: null,
477+
type: [null, String],
478+
description: `
479+
Override CPU architecture of native modules to install.
480+
Acceptable values are same as \`cpu\` field of package.json,
481+
which comes from \`process.arch\`.
482+
`,
483+
flatten,
484+
})
485+
475486
define('depth', {
476487
default: null,
477488
defaultDescription: `

workspaces/config/tap-snapshots/test/type-description.js.test.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ Object {
9191
"commit-hooks": Array [
9292
"boolean value (true or false)",
9393
],
94+
"cpu": Array [
95+
null,
96+
Function String(),
97+
],
9498
"depth": Array [
9599
null,
96100
"numeric value",

0 commit comments

Comments
 (0)