diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index cd13237f34dd3..e6a7231861ba0 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -910,7 +910,7 @@ number, if not already set in package.json. #### `install-links` -* Default: false +* Default: true * Type: Boolean When set file: protocol dependencies that exist outside of the project root diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index a132c8456b0fa..a76484b5228f5 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -1083,7 +1083,7 @@ define('init.version', { }) define('install-links', { - default: false, + default: true, type: Boolean, description: ` When set file: protocol dependencies that exist outside of the project root diff --git a/tap-snapshots/test/lib/commands/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index 5c3f86415dfff..6ed14ae5b2546 100644 --- a/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -81,7 +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, + "install-links": true, "key": null, "legacy-bundling": false, "legacy-peer-deps": false, @@ -237,7 +237,7 @@ init.author.url = "" init.license = "ISC" init.module = "{HOME}/.npm-init.js" init.version = "1.0.0" -install-links = false +install-links = true json = false key = null legacy-bundling = false 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 eac037f4b2708..1f157e2493531 100644 --- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs +++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs @@ -52,7 +52,7 @@ Options: [--omit [--omit ...]] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] Run "npm help audit" for more info ` @@ -122,7 +122,7 @@ Options: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] aliases: clean-install, ic, install-clean, isntall-clean @@ -168,7 +168,7 @@ Options: [--omit [--omit ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: ddp @@ -317,7 +317,7 @@ Options: [--omit [--omit ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] Run "npm help find-dupes" for more info ` @@ -416,7 +416,7 @@ Options: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall @@ -436,7 +436,7 @@ Options: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: cit @@ -456,7 +456,7 @@ Options: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: it @@ -476,7 +476,7 @@ Options: [--omit [--omit ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: ln @@ -494,7 +494,7 @@ Options: [--omit [--omit ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: la @@ -539,7 +539,7 @@ Options: [--omit [--omit ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: list @@ -674,7 +674,7 @@ Options: [--omit [--omit ...]] [--dry-run] [--json] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] Run "npm help prune" for more info ` @@ -716,7 +716,7 @@ npm rebuild [] ...] Options: [-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: rb @@ -926,7 +926,7 @@ npm uninstall [<@scope>/]... Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] aliases: unlink, remove, rm, r, un @@ -972,7 +972,7 @@ Options: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] -[-ws|--workspaces] [--include-workspace-root] [--install-links] +[-ws|--workspaces] [--include-workspace-root] [--no-install-links] aliases: up, upgrade, udpate diff --git a/tap-snapshots/test/lib/npm.js.test.cjs b/tap-snapshots/test/lib/npm.js.test.cjs index 094792afd5620..a966afe09d9d9 100644 --- a/tap-snapshots/test/lib/npm.js.test.cjs +++ b/tap-snapshots/test/lib/npm.js.test.cjs @@ -207,7 +207,7 @@ All commands: [--omit [--omit ...]] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] Run "npm help audit" for more info @@ -260,7 +260,7 @@ All commands: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] aliases: clean-install, ic, install-clean, isntall-clean @@ -300,7 +300,7 @@ All commands: [--omit [--omit ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: ddp @@ -429,7 +429,7 @@ All commands: [--omit [--omit ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] Run "npm help find-dupes" for more info @@ -504,7 +504,7 @@ All commands: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall @@ -522,7 +522,7 @@ All commands: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: cit @@ -540,7 +540,7 @@ All commands: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: it @@ -558,7 +558,7 @@ All commands: [--omit [--omit ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: ln @@ -574,7 +574,7 @@ All commands: [--omit [--omit ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: la @@ -613,7 +613,7 @@ All commands: [--omit [--omit ...]] [--link] [--package-lock-only] [--unicode] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: list @@ -730,7 +730,7 @@ All commands: [--omit [--omit ...]] [--dry-run] [--json] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] Run "npm help prune" for more info @@ -766,7 +766,7 @@ All commands: Options: [-g|--global] [--no-bin-links] [--foreground-scripts] [--ignore-scripts] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] alias: rb @@ -944,7 +944,7 @@ All commands: Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-install-links] aliases: unlink, remove, rm, r, un @@ -984,7 +984,7 @@ All commands: [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] - [-ws|--workspaces] [--include-workspace-root] [--install-links] + [-ws|--workspaces] [--include-workspace-root] [--no-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 024ad345a5d32..6eac545b2ce2d 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -983,7 +983,7 @@ Alias for \`--init-version\` exports[`test/lib/utils/config/definitions.js TAP > config description for install-links 1`] = ` #### \`install-links\` -* Default: false +* Default: true * Type: Boolean When set file: protocol dependencies that exist outside of the project root 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 a03d22e5e6305..46910d1282e03 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 @@ -783,7 +783,7 @@ number, if not already set in package.json. #### \`install-links\` -* Default: false +* Default: true * Type: Boolean When set file: protocol dependencies that exist outside of the project root