diff options
author | nlf <quitlahok@gmail.com> | 2022-04-14 20:04:57 +0300 |
---|---|---|
committer | Luke Karrys <luke@lukekarrys.com> | 2022-04-20 02:22:20 +0300 |
commit | bedd8a1f5844b5b379af5a756baa70821d78c610 (patch) | |
tree | 33185ece3496da178aecc3d0647ef4e24a870bbe /tap-snapshots | |
parent | a4adf256b4fc268fc64cfd5e66526b4685716e79 (diff) |
feat: add install-links config definition
Diffstat (limited to 'tap-snapshots')
6 files changed, 50 insertions, 56 deletions
diff --git a/tap-snapshots/test/lib/commands/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index 56ef71f3e..c6f07dd32 100644 --- a/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -81,6 +81,7 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "init.license": "ISC", "init.module": "{HOME}/.npm-init.js", "init.version": "1.0.0", + "install-links": false, "key": null, "legacy-bundling": false, "legacy-peer-deps": false, @@ -234,6 +235,7 @@ init.author.url = "" init.license = "ISC" init.module = "{HOME}/.npm-init.js" init.version = "1.0.0" +install-links = false json = false key = null legacy-bundling = false diff --git a/tap-snapshots/test/lib/commands/ls.js.test.cjs b/tap-snapshots/test/lib/commands/ls.js.test.cjs index e98898aef..a10d37ab9 100644 --- a/tap-snapshots/test/lib/commands/ls.js.test.cjs +++ b/tap-snapshots/test/lib/commands/ls.js.test.cjs @@ -114,23 +114,6 @@ test-npm-ls@1.0.0 ` -exports[`test/lib/commands/ls.js TAP ls --only=development > should output tree containing only development deps 1`] = ` -test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---only-development -\`-- dev-dep@1.0.0 - \`-- foo@1.0.0 - \`-- dog@1.0.0 - -` - -exports[`test/lib/commands/ls.js TAP ls --only=prod > should output tree containing only prod deps 1`] = ` -test-npm-ls@1.0.0 {CWD}/tap-testdir-ls-ls---only-prod -+-- chai@1.0.0 -+-- optional-dep@1.0.0 -\`-- prod-dep@1.0.0 - \`-- dog@2.0.0 - -` - exports[`test/lib/commands/ls.js TAP ls --parseable --depth=0 > should output tree containing only top-level dependencies 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---depth-0 {CWD}/tap-testdir-ls-ls---parseable---depth-0/node_modules/chai @@ -204,21 +187,6 @@ exports[`test/lib/commands/ls.js TAP ls --parseable --long with extraneous deps {CWD}/tap-testdir-ls-ls---parseable---long-with-extraneous-deps/node_modules/dog:dog@1.0.0 ` -exports[`test/lib/commands/ls.js TAP ls --parseable --only=development > should output tree containing only development deps 1`] = ` -{CWD}/tap-testdir-ls-ls---parseable---only-development -{CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/dev-dep -{CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/foo -{CWD}/tap-testdir-ls-ls---parseable---only-development/node_modules/dog -` - -exports[`test/lib/commands/ls.js TAP ls --parseable --only=prod > should output tree containing only prod deps 1`] = ` -{CWD}/tap-testdir-ls-ls---parseable---only-prod -{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/chai -{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/optional-dep -{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/prod-dep -{CWD}/tap-testdir-ls-ls---parseable---only-prod/node_modules/prod-dep/node_modules/dog -` - exports[`test/lib/commands/ls.js TAP ls --parseable --production > should output tree containing production deps 1`] = ` {CWD}/tap-testdir-ls-ls---parseable---production {CWD}/tap-testdir-ls-ls---parseable---production/node_modules/chai diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs index cd8b0592c..37349cbe0 100644 --- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs +++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs @@ -51,7 +51,7 @@ Options: [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--foreground-scripts] [--ignore-scripts] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] +[-ws|--workspaces] [--include-workspace-root] [--install-links] Run "npm help audit" for more info ` @@ -164,7 +164,7 @@ Options: [--omit <dev|optional|peer> [--omit <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] +[-ws|--workspaces] [--include-workspace-root] [--install-links] alias: ddp @@ -314,7 +314,7 @@ Options: [--omit <dev|optional|peer> [--omit <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] +[-ws|--workspaces] [--include-workspace-root] [--install-links] Run "npm help find-dupes" for more info ` @@ -423,7 +423,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] +[-ws|--workspaces] [--include-workspace-root] [--install-links] aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall @@ -467,7 +467,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] +[-ws|--workspaces] [--include-workspace-root] [--install-links] alias: it @@ -488,7 +488,7 @@ Options: [--omit <dev|optional|peer> [--omit <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] +[-ws|--workspaces] [--include-workspace-root] [--install-links] alias: ln @@ -506,7 +506,7 @@ Options: [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] +[-ws|--workspaces] [--include-workspace-root] [--install-links] alias: la @@ -550,7 +550,7 @@ Options: [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] +[-ws|--workspaces] [--include-workspace-root] [--install-links] alias: list @@ -683,7 +683,7 @@ Options: [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--dry-run] [--json] [--foreground-scripts] [--ignore-scripts] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] +[-ws|--workspaces] [--include-workspace-root] [--install-links] Run "npm help prune" for more info ` @@ -711,7 +711,7 @@ npm rebuild [[<@scope>/]<name>[@<version>] ...] Options: [-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] +[-ws|--workspaces] [--include-workspace-root] [--install-links] alias: rb @@ -921,7 +921,7 @@ npm uninstall [<@scope>/]<pkg>... Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] -[-ws|--workspaces] [--include-workspace-root] +[-ws|--workspaces] [--include-workspace-root] [--install-links] aliases: unlink, remove, rm, r, un @@ -967,7 +967,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] +[-ws|--workspaces] [--include-workspace-root] [--install-links] aliases: up, upgrade, udpate diff --git a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs index 91f0d7828..b190d7eb1 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -76,6 +76,7 @@ Array [ "init.license", "init.module", "init.version", + "install-links", "json", "key", "legacy-bundling", @@ -973,6 +974,17 @@ exports[`test/lib/utils/config/definitions.js TAP > config description for init. Alias for \`--init-version\` ` +exports[`test/lib/utils/config/definitions.js TAP > config description for install-links 1`] = ` +#### \`install-links\` + +* Default: false +* Type: Boolean + +When set file: protocol dependencies that exist outside of the project root +will be packed and installed as regular dependencies instead of creating a +symlink. This option has no effect on workspaces. +` + exports[`test/lib/utils/config/definitions.js TAP > config description for json 1`] = ` #### \`json\` diff --git a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs index 7b13c34da..a97b35d3a 100644 --- a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs @@ -765,6 +765,18 @@ number, if not already set in package.json. <!-- automatically generated, do not edit manually --> <!-- see lib/utils/config/definitions.js --> +#### \`install-links\` + +* Default: false +* Type: Boolean + +When set file: protocol dependencies that exist outside of the project root +will be packed and installed as regular dependencies instead of creating a +symlink. This option has no effect on workspaces. + +<!-- automatically generated, do not edit manually --> +<!-- see lib/utils/config/definitions.js --> + #### \`json\` * Default: false diff --git a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs index fef4cc65e..eb71ced8d 100644 --- a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs +++ b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs @@ -206,7 +206,7 @@ All commands: [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--foreground-scripts] [--ignore-scripts] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] + [-ws|--workspaces] [--include-workspace-root] [--install-links] Run "npm help audit" for more info @@ -296,7 +296,7 @@ All commands: [--omit <dev|optional|peer> [--omit <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] + [-ws|--workspaces] [--include-workspace-root] [--install-links] alias: ddp @@ -426,7 +426,7 @@ All commands: [--omit <dev|optional|peer> [--omit <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] + [-ws|--workspaces] [--include-workspace-root] [--install-links] Run "npm help find-dupes" for more info @@ -511,7 +511,7 @@ All commands: [--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] + [-ws|--workspaces] [--include-workspace-root] [--install-links] aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall @@ -551,7 +551,7 @@ All commands: [--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] + [-ws|--workspaces] [--include-workspace-root] [--install-links] alias: it @@ -570,7 +570,7 @@ All commands: [--omit <dev|optional|peer> [--omit <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] + [-ws|--workspaces] [--include-workspace-root] [--install-links] alias: ln @@ -586,7 +586,7 @@ All commands: [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] + [-ws|--workspaces] [--include-workspace-root] [--install-links] alias: la @@ -624,7 +624,7 @@ All commands: [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] + [-ws|--workspaces] [--include-workspace-root] [--install-links] alias: list @@ -739,7 +739,7 @@ All commands: [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--dry-run] [--json] [--foreground-scripts] [--ignore-scripts] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] + [-ws|--workspaces] [--include-workspace-root] [--install-links] Run "npm help prune" for more info @@ -763,7 +763,7 @@ All commands: Options: [-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] + [-ws|--workspaces] [--include-workspace-root] [--install-links] alias: rb @@ -941,7 +941,7 @@ All commands: Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] - [-ws|--workspaces] [--include-workspace-root] + [-ws|--workspaces] [--include-workspace-root] [--install-links] aliases: unlink, remove, rm, r, un @@ -981,7 +981,7 @@ All commands: [--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] + [-ws|--workspaces] [--include-workspace-root] [--install-links] aliases: up, upgrade, udpate |