Skip to content

Commit

Permalink
add os option
Browse files Browse the repository at this point in the history
  • Loading branch information
yukukotani committed Sep 1, 2023
1 parent 0220186 commit 12b892f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/commands/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Install extends ArboristWorkspaceCmd {
'fund',
'dry-run',
'cpu',
'os',
...super.params,
]

Expand Down
2 changes: 2 additions & 0 deletions tap-snapshots/test/lib/commands/config.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna
"color": true,
"commit-hooks": true,
"cpu": null,
"os": null,
"depth": null,
"description": true,
"dev": false,
Expand Down Expand Up @@ -260,6 +261,7 @@ omit = []
omit-lockfile-registry-resolved = false
only = null
optional = null
os = null
otp = null
pack-destination = "."
package = []
Expand Down
19 changes: 17 additions & 2 deletions tap-snapshots/test/lib/docs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,16 @@ time.
#### \`os\`
* Default: null
* Type: null or String
Override OS of native modules to install. Acceptable values are same as \`os\`
field of package.json, which comes from \`process.platform\`.
#### \`otp\`
* Default: null
Expand Down Expand Up @@ -2017,6 +2027,7 @@ Array [
"color",
"commit-hooks",
"cpu",
"os",
"depth",
"description",
"dev",
Expand Down Expand Up @@ -2171,6 +2182,7 @@ Array [
"color",
"commit-hooks",
"cpu",
"os",
"depth",
"description",
"dev",
Expand Down Expand Up @@ -2374,6 +2386,7 @@ Object {
"offline": false,
"omit": Array [],
"omitLockfileRegistryResolved": false,
"os": null,
"otp": null,
"package": Array [],
"packageLock": true,
Expand Down Expand Up @@ -3183,7 +3196,7 @@ Options:
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
[--no-fund] [--dry-run] [--cpu <cpu>]
[--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
Expand Down Expand Up @@ -3215,6 +3228,7 @@ aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
#### \`fund\`
#### \`dry-run\`
#### \`cpu\`
#### \`os\`
#### \`workspace\`
#### \`workspaces\`
#### \`include-workspace-root\`
Expand Down Expand Up @@ -3275,7 +3289,7 @@ Options:
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
[--no-fund] [--dry-run] [--cpu <cpu>]
[--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
Expand Down Expand Up @@ -3307,6 +3321,7 @@ alias: it
#### \`fund\`
#### \`dry-run\`
#### \`cpu\`
#### \`os\`
#### \`workspace\`
#### \`workspaces\`
#### \`include-workspace-root\`
Expand Down
11 changes: 11 additions & 0 deletions workspaces/config/lib/definitions/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,17 @@ define('cpu', {
flatten,
})

define('os', {
default: null,
type: [null, String],
description: `
Override OS of native modules to install.
Acceptable values are same as \`os\` field of package.json,
which comes from \`process.platform\`.
`,
flatten,
})

define('depth', {
default: null,
defaultDescription: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ Object {
null,
"boolean value (true or false)",
],
"os": Array [
null,
Function String(),
],
"otp": Array [
null,
Function String(),
Expand Down

0 comments on commit 12b892f

Please sign in to comment.