Skip to content

Commit d79c016

Browse files
committed
feat: replace --legacy-bundling with --install-strategy=nested
BREAKING CHANGE: removed --legacy-bundling config
1 parent 6d82835 commit d79c016

File tree

14 files changed

+55
-104
lines changed

14 files changed

+55
-104
lines changed

lib/commands/dedupe.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class Dedupe extends ArboristWorkspaceCmd {
99
static name = 'dedupe'
1010
static params = [
1111
'install-strategy',
12-
'legacy-bundling',
1312
'strict-peer-deps',
1413
'package-lock',
1514
'omit',

lib/commands/find-dupes.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ class FindDupes extends ArboristWorkspaceCmd {
66
static name = 'find-dupes'
77
static params = [
88
'install-strategy',
9-
'legacy-bundling',
109
'strict-peer-deps',
1110
'package-lock',
1211
'omit',

lib/commands/install.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class Install extends ArboristWorkspaceCmd {
2121
'save-exact',
2222
'global',
2323
'install-strategy',
24-
'legacy-bundling',
2524
'omit',
2625
'strict-peer-deps',
2726
'package-lock',

lib/commands/link.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class Link extends ArboristWorkspaceCmd {
2323
'save-exact',
2424
'global',
2525
'install-strategy',
26-
'legacy-bundling',
2726
'strict-peer-deps',
2827
'package-lock',
2928
'omit',

lib/commands/update.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class Update extends ArboristWorkspaceCmd {
1515
'save',
1616
'global',
1717
'install-strategy',
18-
'legacy-bundling',
1918
'omit',
2019
'strict-peer-deps',
2120
'package-lock',

lib/utils/config/definitions.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,18 +1108,6 @@ define('key', {
11081108
flatten,
11091109
})
11101110

1111-
define('legacy-bundling', {
1112-
default: false,
1113-
type: Boolean,
1114-
description: `
1115-
Causes npm to install the package such that versions of npm prior to 1.4,
1116-
such as the one included with node 0.8, can install the package. This
1117-
eliminates all automatic deduping. If used with \`global-style\` this
1118-
option will be preferred.
1119-
`,
1120-
flatten,
1121-
})
1122-
11231111
define('legacy-peer-deps', {
11241112
default: false,
11251113
type: Boolean,

smoke-tests/tap-snapshots/test/index.js.test.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ npm ERR! npm ci
5656
npm ERR!
5757
npm ERR! Options:
5858
npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
59-
npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
59+
npm ERR! [-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>]
6060
npm ERR! [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
6161
npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
6262
npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]

tap-snapshots/test/lib/commands/config.js.test.cjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna
6060
"git": "git",
6161
"git-tag-version": true,
6262
"global": false,
63-
"global-style": false,
6463
"globalconfig": "{GLOBALPREFIX}/npmrc",
6564
"heading": "npm",
6665
"https-proxy": null,
@@ -82,8 +81,8 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna
8281
"init.module": "{HOME}/.npm-init.js",
8382
"init.version": "1.0.0",
8483
"install-links": true,
84+
"install-strategy": "hoisted",
8585
"key": null,
86-
"legacy-bundling": false,
8786
"legacy-peer-deps": false,
8887
"link": false,
8988
"local-address": null,
@@ -212,7 +211,6 @@ fund = true
212211
git = "git"
213212
git-tag-version = true
214213
global = false
215-
global-style = false
216214
globalconfig = "{GLOBALPREFIX}/npmrc"
217215
heading = "npm"
218216
https-proxy = null
@@ -234,9 +232,9 @@ init.license = "ISC"
234232
init.module = "{HOME}/.npm-init.js"
235233
init.version = "1.0.0"
236234
install-links = true
235+
install-strategy = "hoisted"
237236
json = false
238237
key = null
239-
legacy-bundling = false
240238
legacy-peer-deps = false
241239
link = false
242240
local-address = null

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

Lines changed: 36 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,18 +1034,6 @@ folder instead of the current working directory. See
10341034
* bin files are linked to \`{prefix}/bin\`
10351035
* man pages are linked to \`{prefix}/share/man\`
10361036
1037-
#### \`global-style\`
1038-
1039-
* Default: false
1040-
* Type: Boolean
1041-
1042-
Causes npm to install the package into your local \`node_modules\` folder with
1043-
the same layout it uses with the global \`node_modules\` folder. Only your
1044-
direct dependencies will show in \`node_modules\` and everything they depend
1045-
on will be flattened in their \`node_modules\` folders. This obviously will
1046-
eliminate some deduping. If used with \`legacy-bundling\`, \`legacy-bundling\`
1047-
will be preferred.
1048-
10491037
#### \`globalconfig\`
10501038
10511039
* Default: The global --prefix setting plus 'etc/npmrc'. For example,
@@ -1188,6 +1176,18 @@ When set file: protocol dependencies will be packed and installed as regular
11881176
dependencies instead of creating a symlink. This option has no effect on
11891177
workspaces.
11901178
1179+
#### \`install-strategy\`
1180+
1181+
* Default: "hoisted"
1182+
* Type: "hoisted", "nested", or "shallow"
1183+
1184+
Sets the strategy for installing packages in node_modules. hoisted
1185+
(default): Install non-duplicated in top-level, and duplicated as necessary
1186+
within directory structure. nested: (formerly --legacy-bundling) install in
1187+
place, no hoisting. shallow (formerly --global-style) only install direct
1188+
deps at top-level. linked: (coming soon) install in node_modules/.store,
1189+
link in place, unhoisted.
1190+
11911191
#### \`json\`
11921192
11931193
* Default: false
@@ -1215,16 +1215,6 @@ key="-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----"
12151215
It is _not_ the path to a key file, though you can set a registry-scoped
12161216
"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem".
12171217
1218-
#### \`legacy-bundling\`
1219-
1220-
* Default: false
1221-
* Type: Boolean
1222-
1223-
Causes npm to install the package such that versions of npm prior to 1.4,
1224-
such as the one included with node 0.8, can install the package. This
1225-
eliminates all automatic deduping. If used with \`global-style\` this option
1226-
will be preferred.
1227-
12281218
#### \`legacy-peer-deps\`
12291219
12301220
* Default: false
@@ -1483,8 +1473,8 @@ look for updates immediately even for fresh package data.
14831473
#### \`prefix\`
14841474
14851475
* Default: In global mode, the folder where the node executable is installed.
1486-
In local mode, the nearest parent folder containing either a package.json
1487-
file or a node_modules folder.
1476+
Otherwise, the nearest parent folder containing either a package.json file
1477+
or a node_modules folder.
14881478
* Type: Path
14891479
14901480
The location to install global items. If set on the command line, then it
@@ -2139,7 +2129,6 @@ Array [
21392129
"git",
21402130
"git-tag-version",
21412131
"global",
2142-
"global-style",
21432132
"globalconfig",
21442133
"heading",
21452134
"https-proxy",
@@ -2161,9 +2150,9 @@ Array [
21612150
"init.module",
21622151
"init.version",
21632152
"install-links",
2153+
"install-strategy",
21642154
"json",
21652155
"key",
2166-
"legacy-bundling",
21672156
"legacy-peer-deps",
21682157
"link",
21692158
"local-address",
@@ -2290,7 +2279,6 @@ Array [
22902279
"git",
22912280
"git-tag-version",
22922281
"global",
2293-
"global-style",
22942282
"globalconfig",
22952283
"heading",
22962284
"https-proxy",
@@ -2300,9 +2288,9 @@ Array [
23002288
"include-staged",
23012289
"include-workspace-root",
23022290
"install-links",
2291+
"install-strategy",
23032292
"json",
23042293
"key",
2305-
"legacy-bundling",
23062294
"legacy-peer-deps",
23072295
"local-address",
23082296
"location",
@@ -2589,7 +2577,7 @@ npm ci
25892577
25902578
Options:
25912579
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
2592-
[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
2580+
[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>]
25932581
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
25942582
[--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
25952583
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
@@ -2609,8 +2597,7 @@ aliases: clean-install, ic, install-clean, isntall-clean
26092597
#### \`save\`
26102598
#### \`save-exact\`
26112599
#### \`global\`
2612-
#### \`global-style\`
2613-
#### \`legacy-bundling\`
2600+
#### \`install-strategy\`
26142601
#### \`omit\`
26152602
#### \`strict-peer-deps\`
26162603
#### \`package-lock\`
@@ -2685,9 +2672,9 @@ Usage:
26852672
npm dedupe
26862673
26872674
Options:
2688-
[--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock]
2689-
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
2690-
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
2675+
[--install-strategy <hoisted|nested|shallow>] [--strict-peer-deps]
2676+
[--no-package-lock] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
2677+
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
26912678
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
26922679
[-ws|--workspaces] [--include-workspace-root] [--no-install-links]
26932680
@@ -2701,8 +2688,7 @@ npm dedupe
27012688
alias: ddp
27022689
\`\`\`
27032690
2704-
#### \`global-style\`
2705-
#### \`legacy-bundling\`
2691+
#### \`install-strategy\`
27062692
#### \`strict-peer-deps\`
27072693
#### \`package-lock\`
27082694
#### \`omit\`
@@ -2946,9 +2932,9 @@ Usage:
29462932
npm find-dupes
29472933
29482934
Options:
2949-
[--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock]
2950-
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
2951-
[--no-audit] [--no-bin-links] [--no-fund]
2935+
[--install-strategy <hoisted|nested|shallow>] [--strict-peer-deps]
2936+
[--no-package-lock] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
2937+
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund]
29522938
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
29532939
[-ws|--workspaces] [--include-workspace-root] [--no-install-links]
29542940
@@ -2958,8 +2944,7 @@ Run "npm help find-dupes" for more info
29582944
npm find-dupes
29592945
\`\`\`
29602946
2961-
#### \`global-style\`
2962-
#### \`legacy-bundling\`
2947+
#### \`install-strategy\`
29632948
#### \`strict-peer-deps\`
29642949
#### \`package-lock\`
29652950
#### \`omit\`
@@ -3117,7 +3102,7 @@ npm install [<package-spec> ...]
31173102
31183103
Options:
31193104
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
3120-
[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
3105+
[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>]
31213106
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
31223107
[--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
31233108
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
@@ -3137,8 +3122,7 @@ aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
31373122
#### \`save\`
31383123
#### \`save-exact\`
31393124
#### \`global\`
3140-
#### \`global-style\`
3141-
#### \`legacy-bundling\`
3125+
#### \`install-strategy\`
31423126
#### \`omit\`
31433127
#### \`strict-peer-deps\`
31443128
#### \`package-lock\`
@@ -3162,7 +3146,7 @@ npm install-ci-test
31623146
31633147
Options:
31643148
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
3165-
[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
3149+
[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>]
31663150
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
31673151
[--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
31683152
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
@@ -3182,8 +3166,7 @@ alias: cit
31823166
#### \`save\`
31833167
#### \`save-exact\`
31843168
#### \`global\`
3185-
#### \`global-style\`
3186-
#### \`legacy-bundling\`
3169+
#### \`install-strategy\`
31873170
#### \`omit\`
31883171
#### \`strict-peer-deps\`
31893172
#### \`package-lock\`
@@ -3207,7 +3190,7 @@ npm install-test [<package-spec> ...]
32073190
32083191
Options:
32093192
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
3210-
[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
3193+
[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>]
32113194
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
32123195
[--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
32133196
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
@@ -3227,8 +3210,7 @@ alias: it
32273210
#### \`save\`
32283211
#### \`save-exact\`
32293212
#### \`global\`
3230-
#### \`global-style\`
3231-
#### \`legacy-bundling\`
3213+
#### \`install-strategy\`
32323214
#### \`omit\`
32333215
#### \`strict-peer-deps\`
32343216
#### \`package-lock\`
@@ -3252,7 +3234,7 @@ npm link [<package-spec>]
32523234
32533235
Options:
32543236
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
3255-
[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling]
3237+
[-E|--save-exact] [-g|--global] [--install-strategy <hoisted|nested|shallow>]
32563238
[--strict-peer-deps] [--no-package-lock]
32573239
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]] [--ignore-scripts]
32583240
[--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
@@ -3272,8 +3254,7 @@ alias: ln
32723254
#### \`save\`
32733255
#### \`save-exact\`
32743256
#### \`global\`
3275-
#### \`global-style\`
3276-
#### \`legacy-bundling\`
3257+
#### \`install-strategy\`
32773258
#### \`strict-peer-deps\`
32783259
#### \`package-lock\`
32793260
#### \`omit\`
@@ -4124,7 +4105,7 @@ npm update [<pkg>...]
41244105
41254106
Options:
41264107
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
4127-
[-g|--global] [--global-style] [--legacy-bundling]
4108+
[-g|--global] [--install-strategy <hoisted|nested|shallow>]
41284109
[--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
41294110
[--strict-peer-deps] [--no-package-lock] [--foreground-scripts]
41304111
[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run]
@@ -4143,8 +4124,7 @@ aliases: up, upgrade, udpate
41434124
41444125
#### \`save\`
41454126
#### \`global\`
4146-
#### \`global-style\`
4147-
#### \`legacy-bundling\`
4127+
#### \`install-strategy\`
41484128
#### \`omit\`
41494129
#### \`strict-peer-deps\`
41504130
#### \`package-lock\`

0 commit comments

Comments
 (0)