Skip to content

Commit

Permalink
chore: tests for config warnings/changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Jan 30, 2025
1 parent 5e35fde commit ed85b01
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 43 deletions.
2 changes: 1 addition & 1 deletion smoke-tests/tap-snapshots/test/index.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error [--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
Expand Down
12 changes: 6 additions & 6 deletions tap-snapshots/test/lib/commands/install.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ verbose stack Error: The developer of this package has specified the following t
verbose stack Invalid engine "runtime"
verbose stack Invalid name "nondescript" does not match "node" for "runtime"
verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9)
error code EBADDEVENGINES
error EBADDEVENGINES The developer of this package has specified the following through devEngines
error EBADDEVENGINES Invalid engine "runtime"
Expand Down Expand Up @@ -200,8 +200,8 @@ verbose stack Error: The developer of this package has specified the following t
verbose stack Invalid engine "runtime"
verbose stack Invalid name "nondescript" does not match "node" for "runtime"
verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9)
error code EBADDEVENGINES
error EBADDEVENGINES The developer of this package has specified the following through devEngines
error EBADDEVENGINES Invalid engine "runtime"
Expand All @@ -226,8 +226,8 @@ verbose stack Error: The developer of this package has specified the following t
verbose stack Invalid engine "runtime"
verbose stack Invalid name "nondescript" does not match "node" for "runtime"
verbose stack at Install.checkDevEngines ({CWD}/lib/base-cmd.js:181:27)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:251:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:207:9)
verbose stack at MockNpm.#exec ({CWD}/lib/npm.js:252:7)
verbose stack at MockNpm.exec ({CWD}/lib/npm.js:208:9)
error code EBADDEVENGINES
error EBADDEVENGINES The developer of this package has specified the following through devEngines
error EBADDEVENGINES Invalid engine "runtime"
Expand Down
64 changes: 31 additions & 33 deletions tap-snapshots/test/lib/docs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2547,7 +2547,6 @@ exports[`test/lib/docs.js TAP shorthands > docs 1`] = `
* \`--help\`: \`--usage\`
* \`-v\`: \`--version\`
* \`-w\`: \`--workspace\`
* \`--ws\`: \`--workspaces\`
* \`-y\`: \`--yes\`
`

Expand Down Expand Up @@ -2624,7 +2623,7 @@ Options:
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
[--foreground-scripts] [--ignore-scripts]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
Run "npm help audit" for more info
Expand Down Expand Up @@ -2657,7 +2656,7 @@ npm bugs [<pkgname> [<pkgname> ...]]
Options:
[--no-browser|--browser <browser>] [--registry <registry>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
[--workspaces] [--include-workspace-root]
alias: issues
Expand Down Expand Up @@ -2715,7 +2714,7 @@ Options:
[--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
[--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
aliases: clean-install, ic, install-clean, isntall-clean
Expand Down Expand Up @@ -2814,7 +2813,7 @@ Options:
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
alias: ddp
Expand Down Expand Up @@ -2878,7 +2877,7 @@ Options:
[--diff-src-prefix <path>] [--diff-dst-prefix <path>] [--diff-text] [-g|--global]
[--tag <tag>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
[--workspaces] [--include-workspace-root]
Run "npm help diff" for more info
Expand Down Expand Up @@ -2911,7 +2910,7 @@ npm dist-tag ls [<package-spec>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
[--workspaces] [--include-workspace-root]
alias: dist-tags
Expand Down Expand Up @@ -2939,7 +2938,7 @@ npm docs [<pkgname> [<pkgname> ...]]
Options:
[--no-browser|--browser <browser>] [--registry <registry>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
[--workspaces] [--include-workspace-root]
alias: home
Expand Down Expand Up @@ -3010,7 +3009,7 @@ npm exec --package=foo -c '<cmd> [args...]'
Options:
[--package <package-spec> [--package <package-spec> ...]] [-c|--call <call>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
[--workspaces] [--include-workspace-root]
alias: x
Expand Down Expand Up @@ -3088,7 +3087,7 @@ Options:
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
Run "npm help find-dupes" for more info
Expand Down Expand Up @@ -3213,7 +3212,7 @@ Options:
[--init-module <module>] [--init-version <version>] [-y|--yes] [-f|--force]
[--scope <@scope>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root]
[--workspaces] [--no-workspaces-update] [--include-workspace-root]
aliases: create, innit
Expand Down Expand Up @@ -3256,7 +3255,7 @@ Options:
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
[--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>] [--libc <libc>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
Expand Down Expand Up @@ -3308,7 +3307,7 @@ Options:
[--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
[--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
aliases: cit, clean-install-test, sit
Expand Down Expand Up @@ -3354,7 +3353,7 @@ Options:
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
[--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>] [--libc <libc>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
alias: it
Expand Down Expand Up @@ -3408,7 +3407,7 @@ Options:
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
alias: ln
Expand Down Expand Up @@ -3453,7 +3452,7 @@ Options:
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
[--link] [--package-lock-only] [--unicode]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
alias: la
Expand Down Expand Up @@ -3537,7 +3536,7 @@ Options:
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
[--link] [--package-lock-only] [--unicode]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
alias: list
Expand Down Expand Up @@ -3653,7 +3652,7 @@ npm owner ls <package-spec>
Options:
[--registry <registry>] [--otp <otp>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
[--workspaces]
alias: author
Expand Down Expand Up @@ -3682,7 +3681,7 @@ npm pack <package-spec>
Options:
[--dry-run] [--json] [--pack-destination <pack-destination>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--ignore-scripts]
[--workspaces] [--include-workspace-root] [--ignore-scripts]
Run "npm help pack" for more info
Expand Down Expand Up @@ -3733,7 +3732,7 @@ npm pkg fix
Options:
[-f|--force] [--json]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
[--workspaces]
Run "npm help pkg" for more info
Expand Down Expand Up @@ -3812,7 +3811,7 @@ Options:
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
[--dry-run] [--json] [--foreground-scripts] [--ignore-scripts]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
Run "npm help prune" for more info
Expand Down Expand Up @@ -3841,8 +3840,7 @@ npm publish <package-spec>
Options:
[--tag <tag>] [--access <restricted|public>] [--dry-run] [--otp <otp>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
[--provenance|--provenance-file <file>]
[--workspaces] [--include-workspace-root] [--provenance|--provenance-file <file>]
Run "npm help publish" for more info
Expand Down Expand Up @@ -3870,7 +3868,7 @@ npm query <selector>
Options:
[-g|--global]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--package-lock-only]
[--workspaces] [--include-workspace-root] [--package-lock-only]
[--expect-results|--expect-result-count <count>]
Run "npm help query" for more info
Expand All @@ -3897,7 +3895,7 @@ npm rebuild [<package-spec>] ...]
Options:
[-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
alias: rb
Expand Down Expand Up @@ -3928,7 +3926,7 @@ npm repo [<pkgname> [<pkgname> ...]]
Options:
[--no-browser|--browser <browser>] [--registry <registry>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
[--workspaces] [--include-workspace-root]
Run "npm help repo" for more info
Expand Down Expand Up @@ -3990,7 +3988,7 @@ npm run-script <command> [-- <args>]
Options:
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
[--workspaces] [--include-workspace-root] [--if-present] [--ignore-scripts]
[--foreground-scripts] [--script-shell <script-shell>]
aliases: run, rum, urn
Expand Down Expand Up @@ -4023,7 +4021,7 @@ Options:
[--package-lock-only] [--sbom-format <cyclonedx|spdx>]
[--sbom-type <library|application|framework>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
[--workspaces]
Run "npm help sbom" for more info
Expand Down Expand Up @@ -4308,7 +4306,7 @@ Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
[-g|--global]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
aliases: unlink, remove, rm, r, un
Expand Down Expand Up @@ -4337,7 +4335,7 @@ npm unpublish [<package-spec>]
Options:
[--dry-run] [-f|--force]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces]
[--workspaces]
Run "npm help unpublish" for more info
Expand Down Expand Up @@ -4388,7 +4386,7 @@ Options:
[--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root] [--install-links]
[--workspaces] [--include-workspace-root] [--install-links]
aliases: up, upgrade, udpate
Expand Down Expand Up @@ -4431,7 +4429,7 @@ Options:
[--allow-same-version] [--no-commit-hooks] [--no-git-tag-version] [--json]
[--preid prerelease-id] [--sign-git-tag]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--no-workspaces-update] [--include-workspace-root]
[--workspaces] [--no-workspaces-update] [--include-workspace-root]
alias: verison
Expand Down Expand Up @@ -4463,7 +4461,7 @@ npm view [<package-spec>] [<field>[.subfield]...]
Options:
[--json] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
[-ws|--workspaces] [--include-workspace-root]
[--workspaces] [--include-workspace-root]
aliases: info, show, v
Expand Down
Loading

0 comments on commit ed85b01

Please sign in to comment.