From d79c016216256cf5834630e33ba3f7de2ec5c907 Mon Sep 17 00:00:00 2001 From: Nathan Fritz Date: Tue, 18 Oct 2022 01:18:40 -0700 Subject: [PATCH] feat: replace --legacy-bundling with --install-strategy=nested BREAKING CHANGE: removed --legacy-bundling config --- lib/commands/dedupe.js | 1 - lib/commands/find-dupes.js | 1 - lib/commands/install.js | 1 - lib/commands/link.js | 1 - lib/commands/update.js | 1 - lib/utils/config/definitions.js | 12 --- .../tap-snapshots/test/index.js.test.cjs | 2 +- .../test/lib/commands/config.js.test.cjs | 6 +- tap-snapshots/test/lib/docs.js.test.cjs | 92 ++++++++----------- .../arborist/lib/arborist/build-ideal-tree.js | 4 - workspaces/arborist/lib/place-dep.js | 7 +- .../test/arborist/build-ideal-tree.js | 4 +- workspaces/arborist/test/arborist/reify.js | 22 ++--- workspaces/arborist/test/place-dep.js | 5 +- 14 files changed, 55 insertions(+), 104 deletions(-) diff --git a/lib/commands/dedupe.js b/lib/commands/dedupe.js index 25239c59c3df9..40974eea16b94 100644 --- a/lib/commands/dedupe.js +++ b/lib/commands/dedupe.js @@ -9,7 +9,6 @@ class Dedupe extends ArboristWorkspaceCmd { static name = 'dedupe' static params = [ 'install-strategy', - 'legacy-bundling', 'strict-peer-deps', 'package-lock', 'omit', diff --git a/lib/commands/find-dupes.js b/lib/commands/find-dupes.js index 388385f08ba94..dad8be86ad07e 100644 --- a/lib/commands/find-dupes.js +++ b/lib/commands/find-dupes.js @@ -6,7 +6,6 @@ class FindDupes extends ArboristWorkspaceCmd { static name = 'find-dupes' static params = [ 'install-strategy', - 'legacy-bundling', 'strict-peer-deps', 'package-lock', 'omit', diff --git a/lib/commands/install.js b/lib/commands/install.js index 6918bf6ccbedf..41e23f8638061 100644 --- a/lib/commands/install.js +++ b/lib/commands/install.js @@ -21,7 +21,6 @@ class Install extends ArboristWorkspaceCmd { 'save-exact', 'global', 'install-strategy', - 'legacy-bundling', 'omit', 'strict-peer-deps', 'package-lock', diff --git a/lib/commands/link.js b/lib/commands/link.js index 053215a889c75..df08b87c6c937 100644 --- a/lib/commands/link.js +++ b/lib/commands/link.js @@ -23,7 +23,6 @@ class Link extends ArboristWorkspaceCmd { 'save-exact', 'global', 'install-strategy', - 'legacy-bundling', 'strict-peer-deps', 'package-lock', 'omit', diff --git a/lib/commands/update.js b/lib/commands/update.js index 9e1fa2a36c345..818f1f18cfb62 100644 --- a/lib/commands/update.js +++ b/lib/commands/update.js @@ -15,7 +15,6 @@ class Update extends ArboristWorkspaceCmd { 'save', 'global', 'install-strategy', - 'legacy-bundling', 'omit', 'strict-peer-deps', 'package-lock', diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index afab37e612f4d..ebc4092a5f6e8 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -1108,18 +1108,6 @@ define('key', { flatten, }) -define('legacy-bundling', { - default: false, - type: Boolean, - description: ` - Causes npm to install the package such that versions of npm prior to 1.4, - such as the one included with node 0.8, can install the package. This - eliminates all automatic deduping. If used with \`global-style\` this - option will be preferred. - `, - flatten, -}) - define('legacy-peer-deps', { default: false, type: Boolean, diff --git a/smoke-tests/tap-snapshots/test/index.js.test.cjs b/smoke-tests/tap-snapshots/test/index.js.test.cjs index 5a08980433547..e4b8fa53f14e0 100644 --- a/smoke-tests/tap-snapshots/test/index.js.test.cjs +++ b/smoke-tests/tap-snapshots/test/index.js.test.cjs @@ -56,7 +56,7 @@ npm ERR! npm ci npm ERR! npm ERR! Options: npm ERR! [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -npm ERR! [-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] +npm ERR! [-E|--save-exact] [-g|--global] [--install-strategy ] npm ERR! [--omit [--omit ...]] npm ERR! [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] npm ERR! [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] diff --git a/tap-snapshots/test/lib/commands/config.js.test.cjs b/tap-snapshots/test/lib/commands/config.js.test.cjs index 9f7b31d7a94b9..83e137b1b6a76 100644 --- a/tap-snapshots/test/lib/commands/config.js.test.cjs +++ b/tap-snapshots/test/lib/commands/config.js.test.cjs @@ -60,7 +60,6 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "git": "git", "git-tag-version": true, "global": false, - "global-style": false, "globalconfig": "{GLOBALPREFIX}/npmrc", "heading": "npm", "https-proxy": null, @@ -82,8 +81,8 @@ exports[`test/lib/commands/config.js TAP config list --json > output matches sna "init.module": "{HOME}/.npm-init.js", "init.version": "1.0.0", "install-links": true, + "install-strategy": "hoisted", "key": null, - "legacy-bundling": false, "legacy-peer-deps": false, "link": false, "local-address": null, @@ -212,7 +211,6 @@ fund = true git = "git" git-tag-version = true global = false -global-style = false globalconfig = "{GLOBALPREFIX}/npmrc" heading = "npm" https-proxy = null @@ -234,9 +232,9 @@ init.license = "ISC" init.module = "{HOME}/.npm-init.js" init.version = "1.0.0" install-links = true +install-strategy = "hoisted" json = false key = null -legacy-bundling = false legacy-peer-deps = false link = false local-address = null diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index 81be4ec21dd49..e846449169c02 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -1034,18 +1034,6 @@ folder instead of the current working directory. See * bin files are linked to \`{prefix}/bin\` * man pages are linked to \`{prefix}/share/man\` -#### \`global-style\` - -* Default: false -* Type: Boolean - -Causes npm to install the package into your local \`node_modules\` folder with -the same layout it uses with the global \`node_modules\` folder. Only your -direct dependencies will show in \`node_modules\` and everything they depend -on will be flattened in their \`node_modules\` folders. This obviously will -eliminate some deduping. If used with \`legacy-bundling\`, \`legacy-bundling\` -will be preferred. - #### \`globalconfig\` * 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 dependencies instead of creating a symlink. This option has no effect on workspaces. +#### \`install-strategy\` + +* Default: "hoisted" +* Type: "hoisted", "nested", or "shallow" + +Sets the strategy for installing packages in node_modules. hoisted +(default): Install non-duplicated in top-level, and duplicated as necessary +within directory structure. nested: (formerly --legacy-bundling) install in +place, no hoisting. shallow (formerly --global-style) only install direct +deps at top-level. linked: (coming soon) install in node_modules/.store, +link in place, unhoisted. + #### \`json\` * Default: false @@ -1215,16 +1215,6 @@ key="-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----" It is _not_ the path to a key file, though you can set a registry-scoped "keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". -#### \`legacy-bundling\` - -* Default: false -* Type: Boolean - -Causes npm to install the package such that versions of npm prior to 1.4, -such as the one included with node 0.8, can install the package. This -eliminates all automatic deduping. If used with \`global-style\` this option -will be preferred. - #### \`legacy-peer-deps\` * Default: false @@ -1483,8 +1473,8 @@ look for updates immediately even for fresh package data. #### \`prefix\` * Default: In global mode, the folder where the node executable is installed. - In local mode, the nearest parent folder containing either a package.json - file or a node_modules folder. + Otherwise, the nearest parent folder containing either a package.json file + or a node_modules folder. * Type: Path The location to install global items. If set on the command line, then it @@ -2139,7 +2129,6 @@ Array [ "git", "git-tag-version", "global", - "global-style", "globalconfig", "heading", "https-proxy", @@ -2161,9 +2150,9 @@ Array [ "init.module", "init.version", "install-links", + "install-strategy", "json", "key", - "legacy-bundling", "legacy-peer-deps", "link", "local-address", @@ -2290,7 +2279,6 @@ Array [ "git", "git-tag-version", "global", - "global-style", "globalconfig", "heading", "https-proxy", @@ -2300,9 +2288,9 @@ Array [ "include-staged", "include-workspace-root", "install-links", + "install-strategy", "json", "key", - "legacy-bundling", "legacy-peer-deps", "local-address", "location", @@ -2589,7 +2577,7 @@ npm ci Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] +[-E|--save-exact] [-g|--global] [--install-strategy ] [--omit [--omit ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] @@ -2609,8 +2597,7 @@ aliases: clean-install, ic, install-clean, isntall-clean #### \`save\` #### \`save-exact\` #### \`global\` -#### \`global-style\` -#### \`legacy-bundling\` +#### \`install-strategy\` #### \`omit\` #### \`strict-peer-deps\` #### \`package-lock\` @@ -2685,9 +2672,9 @@ Usage: npm dedupe Options: -[--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock] -[--omit [--omit ...]] [--ignore-scripts] -[--no-audit] [--no-bin-links] [--no-fund] [--dry-run] +[--install-strategy ] [--strict-peer-deps] +[--no-package-lock] [--omit [--omit ...]] +[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] [--include-workspace-root] [--no-install-links] @@ -2701,8 +2688,7 @@ npm dedupe alias: ddp \`\`\` -#### \`global-style\` -#### \`legacy-bundling\` +#### \`install-strategy\` #### \`strict-peer-deps\` #### \`package-lock\` #### \`omit\` @@ -2946,9 +2932,9 @@ Usage: npm find-dupes Options: -[--global-style] [--legacy-bundling] [--strict-peer-deps] [--no-package-lock] -[--omit [--omit ...]] [--ignore-scripts] -[--no-audit] [--no-bin-links] [--no-fund] +[--install-strategy ] [--strict-peer-deps] +[--no-package-lock] [--omit [--omit ...]] +[--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] [--include-workspace-root] [--no-install-links] @@ -2958,8 +2944,7 @@ Run "npm help find-dupes" for more info npm find-dupes \`\`\` -#### \`global-style\` -#### \`legacy-bundling\` +#### \`install-strategy\` #### \`strict-peer-deps\` #### \`package-lock\` #### \`omit\` @@ -3117,7 +3102,7 @@ npm install [ ...] Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] +[-E|--save-exact] [-g|--global] [--install-strategy ] [--omit [--omit ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--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 #### \`save\` #### \`save-exact\` #### \`global\` -#### \`global-style\` -#### \`legacy-bundling\` +#### \`install-strategy\` #### \`omit\` #### \`strict-peer-deps\` #### \`package-lock\` @@ -3162,7 +3146,7 @@ npm install-ci-test Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] +[-E|--save-exact] [-g|--global] [--install-strategy ] [--omit [--omit ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] @@ -3182,8 +3166,7 @@ alias: cit #### \`save\` #### \`save-exact\` #### \`global\` -#### \`global-style\` -#### \`legacy-bundling\` +#### \`install-strategy\` #### \`omit\` #### \`strict-peer-deps\` #### \`package-lock\` @@ -3207,7 +3190,7 @@ npm install-test [ ...] Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] +[-E|--save-exact] [-g|--global] [--install-strategy ] [--omit [--omit ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] @@ -3227,8 +3210,7 @@ alias: it #### \`save\` #### \`save-exact\` #### \`global\` -#### \`global-style\` -#### \`legacy-bundling\` +#### \`install-strategy\` #### \`omit\` #### \`strict-peer-deps\` #### \`package-lock\` @@ -3252,7 +3234,7 @@ npm link [] Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--global-style] [--legacy-bundling] +[-E|--save-exact] [-g|--global] [--install-strategy ] [--strict-peer-deps] [--no-package-lock] [--omit [--omit ...]] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] @@ -3272,8 +3254,7 @@ alias: ln #### \`save\` #### \`save-exact\` #### \`global\` -#### \`global-style\` -#### \`legacy-bundling\` +#### \`install-strategy\` #### \`strict-peer-deps\` #### \`package-lock\` #### \`omit\` @@ -4124,7 +4105,7 @@ npm update [...] Options: [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-g|--global] [--global-style] [--legacy-bundling] +[-g|--global] [--install-strategy ] [--omit [--omit ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links] [--no-fund] [--dry-run] @@ -4143,8 +4124,7 @@ aliases: up, upgrade, udpate #### \`save\` #### \`global\` -#### \`global-style\` -#### \`legacy-bundling\` +#### \`install-strategy\` #### \`omit\` #### \`strict-peer-deps\` #### \`package-lock\` diff --git a/workspaces/arborist/lib/arborist/build-ideal-tree.js b/workspaces/arborist/lib/arborist/build-ideal-tree.js index 210c02a5fa11d..fd4f6789ec763 100644 --- a/workspaces/arborist/lib/arborist/build-ideal-tree.js +++ b/workspaces/arborist/lib/arborist/build-ideal-tree.js @@ -48,7 +48,6 @@ const _flagsSuspect = Symbol.for('flagsSuspect') const _workspaces = Symbol.for('workspaces') const _prune = Symbol('prune') const _preferDedupe = Symbol('preferDedupe') -const _legacyBundling = Symbol('legacyBundling') const _parseSettings = Symbol('parseSettings') const _initTree = Symbol('initTree') const _applyUserRequests = Symbol('applyUserRequests') @@ -143,7 +142,6 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_explicitRequests] = new Set() this[_preferDedupe] = false - this[_legacyBundling] = false this[_depsSeen] = new Set() this[_depsQueue] = [] this[_currentDep] = null @@ -252,7 +250,6 @@ module.exports = cls => class IdealTreeBuilder extends cls { this[_complete] = !!options.complete this[_preferDedupe] = !!options.preferDedupe - this[_legacyBundling] = !!options.legacyBundling // validates list of update names, they must // be dep names only, no semver ranges are supported @@ -952,7 +949,6 @@ This is a one-time fix-up, please be patient... auditReport: this.auditReport, force: this[_force], preferDedupe: this[_preferDedupe], - legacyBundling: this[_legacyBundling], strictPeerDeps: this[_strictPeerDeps], installLinks: this.installLinks, legacyPeerDeps: this.legacyPeerDeps, diff --git a/workspaces/arborist/lib/place-dep.js b/workspaces/arborist/lib/place-dep.js index 98ab770c370f0..2e37e35f6014b 100644 --- a/workspaces/arborist/lib/place-dep.js +++ b/workspaces/arborist/lib/place-dep.js @@ -43,7 +43,6 @@ class PlaceDep { explicitRequest, updateNames, auditReport, - legacyBundling, strictPeerDeps, installLinks, legacyPeerDeps, @@ -55,7 +54,6 @@ class PlaceDep { explicitRequest, updateNames, auditReport, - legacyBundling, strictPeerDeps, installLinks, installStrategy, @@ -78,7 +76,6 @@ class PlaceDep { edge, dep, preferDedupe, - legacyBundling, explicitRequest, updateNames, installStrategy, @@ -170,7 +167,7 @@ class PlaceDep { // nest packages like npm v1 and v2 // very disk-inefficient - if (legacyBundling) { + if (installStrategy === 'nested') { break } @@ -463,7 +460,7 @@ class PlaceDep { // prune all the nodes in a branch of the tree that can be safely removed // This is only the most basic duplication detection; it finds if there // is another satisfying node further up the tree, and if so, dedupes. - // Even in legacyBundling mode, we do this amount of deduplication. + // Even in installStategy is nested, we do this amount of deduplication. pruneDedupable (node, descend = true) { if (node.canDedupe(this.preferDedupe)) { // gather up all deps that have no valid edges in from outside diff --git a/workspaces/arborist/test/arborist/build-ideal-tree.js b/workspaces/arborist/test/arborist/build-ideal-tree.js index 99edc83e9e008..10a291065dfc2 100644 --- a/workspaces/arborist/test/arborist/build-ideal-tree.js +++ b/workspaces/arborist/test/arborist/build-ideal-tree.js @@ -364,7 +364,7 @@ t.test('dedupe example - deduped because preferDedupe=true', t => { t.test('dedupe example - nested because legacyBundling=true', t => { const path = resolve(fixtures, 'dedupe-tests') return t.resolveMatchSnapshot(printIdeal(path, { - legacyBundling: true, + installStrategy: 'nested', preferDedupe: true, })) }) @@ -2154,7 +2154,7 @@ t.test('properly assign fsParent when paths have .. in them', async t => { } }) -t.only('update global', async t => { +t.test('update global', async t => { // global root // ├─┬ @isaacs/testing-dev-optional-flags@1.0.0 // │ ├── own-or@1.0.0 diff --git a/workspaces/arborist/test/arborist/reify.js b/workspaces/arborist/test/arborist/reify.js index bae6280d57c5a..7fa32a250a389 100644 --- a/workspaces/arborist/test/arborist/reify.js +++ b/workspaces/arborist/test/arborist/reify.js @@ -509,7 +509,7 @@ t.test('update a child of a node with bundled deps', t => { const path = fixture(t, 'testing-bundledeps-legacy-bundling') return t.resolveMatchSnapshot(printReified(path, { update: ['@isaacs/testing-bundledeps-c'], - legacyBundling: true, + installStrategy: 'nested', })) }) @@ -598,7 +598,7 @@ t.test('warn on reifying deprecated dependency', t => { t.test('rollbacks', { buffered: false }, t => { t.test('fail retiring shallow nodes', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const expect = new Error('rename fail') const kRenamePath = Symbol.for('renamePath') const renamePath = a[kRenamePath] @@ -625,7 +625,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail retiring nodes because rimraf fails after eexist', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const eexist = new Error('rename fail') eexist.code = 'EEXIST' const kRenamePath = Symbol.for('renamePath') @@ -662,7 +662,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail retiring node, but then rimraf fixes it', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const eexist = new Error('rename fail') eexist.code = 'EEXIST' const kRenamePath = Symbol.for('renamePath') @@ -689,7 +689,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail creating sparse tree', t => { t.teardown(() => failMkdir = null) const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kCreateST = Symbol.for('createSparseTree') const createSparseTree = a[kCreateST] a[kCreateST] = () => { @@ -714,7 +714,7 @@ t.test('rollbacks', { buffered: false }, t => { failMkdir = null failRimraf = null const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kCreateST = Symbol.for('createSparseTree') const kRetireShallowNodes = Symbol.for('retireShallowNodes') @@ -762,7 +762,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail loading shrinkwraps and updating trees', t => { const path = fixture(t, 'shrinkwrapped-dep-no-lock-empty') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kLoadSW = Symbol.for('loadShrinkwrapsAndUpdateTrees') const loadShrinkwrapsAndUpdateTrees = a[kLoadSW] a[kLoadSW] = seen => { @@ -788,7 +788,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail loading bundles and updating trees', t => { const path = fixture(t, 'two-bundled-deps') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kLoadBundles = Symbol.for('loadBundlesAndUpdateTrees') const loadBundlesAndUpdateTrees = a[kLoadBundles] a[kLoadBundles] = (depth, bundlesByDepth) => { @@ -806,7 +806,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail unpacking new modules', t => { const path = fixture(t, 'two-bundled-deps') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kUnpack = Symbol.for('unpackNewModules') const unpackNewModules = a[kUnpack] a[kUnpack] = () => { @@ -824,7 +824,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail moving back retired unchanged', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kMoveback = Symbol.for('moveBackRetiredUnchanged') const moveBackRetiredUnchanged = a[kMoveback] @@ -852,7 +852,7 @@ t.test('rollbacks', { buffered: false }, t => { t.test('fail removing retired and deleted nodes', t => { const path = fixture(t, 'testing-bundledeps-3') - const a = newArb({ path, legacyBundling: true }) + const a = newArb({ path, installStrategy: 'nested' }) const kRemove = Symbol.for('removeTrash') const removeRetiredAndDeletedNodes = a[kRemove] a[kRemove] = () => { diff --git a/workspaces/arborist/test/place-dep.js b/workspaces/arborist/test/place-dep.js index cf222825e9d16..292a2c8e23907 100644 --- a/workspaces/arborist/test/place-dep.js +++ b/workspaces/arborist/test/place-dep.js @@ -39,8 +39,6 @@ t.test('placement tests', t => { updateNames = [], // an audit report, telling us which nodes are vulnerable auditReport = null, - // --legacy-bundling set? - legacyBundling = false, // --strict-peer-deps set? strictPeerDeps = false, // --legacy-peer-deps set? @@ -80,7 +78,6 @@ t.test('placement tests', t => { explicitRequest, updateNames, auditReport, - legacyBundling, strictPeerDeps, legacyPeerDeps, installStrategy, @@ -271,7 +268,7 @@ t.test('placement tests', t => { }), dep: new Node({ pkg: { name: 'bar', version: '1.0.0' } }), nodeLoc: 'node_modules/foo', - legacyBundling: true, + installStrategy: 'nested', test: (t, tree) => { const foobar = tree.children.get('foo').resolve('bar') t.equal(foobar.location, 'node_modules/foo/node_modules/bar')