Skip to content

Commit 86416a6

Browse files
feat: graduate the linked install strategy from experimental to stable (#9674)
Removes the experimental designation from `install-strategy=linked` (isolated mode): drops the install-time warning and the `(experimental)` note in the config docs. `linked` is now a supported, opt-in install strategy. The default stays `hoisted`. ## Why `install-strategy=linked` (RFC-0042) has been experimental since it shipped, warning on every install. It has since been hardened extensively — the discrepancies tracked in #9608, plus ~50 earlier PRs, are resolved — and it now produces hoisted-equivalent results across `install`/`ci`/`ls`/`query`/`explain`/`audit`/`sbom`/`exec`/`run`/`link`/`uninstall`, the supply-chain controls (`allow-scripts`/`allow-remote`/`allow-git`, `--strict-allow-scripts`), and the v12 features (`npm patch`, `packageExtensions`, `.npm-extension`), with a project lockfile identical to hoisted. It has also been exercised against the [Gutenberg monorepo](WordPress/gutenberg#75814), which powers the WordPress Block Editor. The experimental warning no longer reflects its state. ## How - `@npmcli/arborist` (`reify.js`): remove the `The "linked" install strategy is EXPERIMENTAL and may contain bugs.` warning emitted on every linked install. - `@npmcli/config` (`definitions.js`): drop `(experimental)` from the `install-strategy` description for `linked`. - Regenerate the config docs snapshot to match. The `node_modules/.store/` layout remains an internal implementation detail. This does not change the default install strategy. ## References - Hardening tracked in #9608 - RFC-0042 (isolated mode): https://github.com/npm/rfcs/blob/main/accepted/0042-isolated-mode.md
1 parent 968e42f commit 86416a6

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,8 +1189,8 @@ Sets the strategy for installing packages in node_modules. hoisted
11891189
(default): Install non-duplicated in top-level, and duplicated as necessary
11901190
within directory structure. nested: (formerly --legacy-bundling) install in
11911191
place, no hoisting. shallow (formerly --global-style) only install direct
1192-
deps at top-level. linked: (experimental) install in node_modules/.store,
1193-
link in place, unhoisted.
1192+
deps at top-level. linked: install in node_modules/.store, link in place,
1193+
unhoisted.
11941194
11951195
11961196

‎workspaces/arborist/lib/arborist/reify.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ module.exports = cls => class Reifier extends cls {
124124
// swap out the tree with the isolated tree
125125
// this is currently technical debt which will be resolved in a refactor
126126
// of Node/Link trees
127-
log.warn('reify', 'The "linked" install strategy is EXPERIMENTAL and may contain bugs.')
128127
this.idealTree = await this.createIsolatedTree()
129128
isolatedTree = this.idealTree
130129
if (this.actualTree) {

‎workspaces/config/lib/definitions/definitions.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,8 +1277,7 @@ const definitions = {
12771277
necessary within directory structure.
12781278
nested: (formerly --legacy-bundling) install in place, no hoisting.
12791279
shallow (formerly --global-style) only install direct deps at top-level.
1280-
linked: (experimental) install in node_modules/.store, link in place,
1281-
unhoisted.
1280+
linked: install in node_modules/.store, link in place, unhoisted.
12821281
`,
12831282
flatten,
12841283
}),

0 commit comments

Comments
 (0)