Skip to content

Commit 7f66f0a

Browse files
committed
fix: add better hint for before and clean up description
1 parent 280817a commit 7f66f0a

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ config is given, this value will always be set to \`legacy\`.
263263
* Type: null or Date
264264
265265
If passed to \`npm install\`, will rebuild the npm tree such that only
266-
versions that were available **on or before** the \`--before\` time get
267-
installed. If there's no versions available for the current set of direct
268-
dependencies, the command will error.
266+
versions that were available **on or before** the given date are installed.
267+
If there are no versions available for the current set of dependencies, the
268+
command will error.
269269
270270
If the requested version is a \`dist-tag\` and the given tag does not pass the
271271
\`--before\` filter, the most recent version less than or equal to that tag
@@ -3302,7 +3302,7 @@ Options:
33023302
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
33033303
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
33043304
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
3305-
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--before <before>]
3305+
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--before <date>]
33063306
[--no-bin-links] [--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>]
33073307
[--libc <libc>]
33083308
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
@@ -3402,7 +3402,7 @@ Options:
34023402
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
34033403
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
34043404
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
3405-
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--before <before>]
3405+
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--before <date>]
34063406
[--no-bin-links] [--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>]
34073407
[--libc <libc>]
34083408
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
@@ -3680,7 +3680,7 @@ npm outdated [<package-spec> ...]
36803680
Options:
36813681
[-a|--all] [--json] [-l|--long] [-p|--parseable] [-g|--global]
36823682
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
3683-
[--before <before>]
3683+
[--before <date>]
36843684
36853685
Run "npm help outdated" for more info
36863686
@@ -4440,7 +4440,7 @@ Options:
44404440
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
44414441
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
44424442
[--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
4443-
[--ignore-scripts] [--no-audit] [--before <before>] [--no-bin-links] [--no-fund]
4443+
[--ignore-scripts] [--no-audit] [--before <date>] [--no-bin-links] [--no-fund]
44444444
[--dry-run]
44454445
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
44464446
[--workspaces] [--include-workspace-root] [--install-links]

workspaces/config/lib/definitions/definitions.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,13 @@ const definitions = {
230230
}),
231231
before: new Definition('before', {
232232
default: null,
233+
hint: '<date>',
233234
type: [null, Date],
234235
description: `
235236
If passed to \`npm install\`, will rebuild the npm tree such that only
236-
versions that were available **on or before** the \`--before\` time get
237-
installed. If there's no versions available for the current set of
238-
direct dependencies, the command will error.
237+
versions that were available **on or before** the given date are
238+
installed. If there are no versions available for the current set of
239+
dependencies, the command will error.
239240
240241
If the requested version is a \`dist-tag\` and the given tag does not
241242
pass the \`--before\` filter, the most recent version less than or equal

0 commit comments

Comments
 (0)