Skip to content

Try: Strict, isolated installs on npm 12 with manifest repairs - #82849

Draft
manzoorwanijk wants to merge 3 commits into
trunkfrom
try/npm-12-isolated-strict-install
Draft

manzoorwanijk wants to merge 3 commits into
trunkfrom
try/npm-12-isolated-strict-install

Conversation

@manzoorwanijk

@manzoorwanijk manzoorwanijk commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

What?

See #82328.

Throwaway PR stacking npm 12 and manifest repairs on the isolated, strict install already in trunk, so CI exercises them together. The npm 12 slice lands separately through #82732, and the rest follows as its own PR.

Why?

To find what breaks before splitting it up.

How?

  • npm 12, squashed from update/npm-12: engines bump, icons built from the root postinstall, npmrc settings v12 makes redundant dropped.
  • Manifests with wrong peer ranges, undeclared React types or pins below a fix are repaired in .npm-extension.mjs, each next to its upstream issue or advisory.
  • Each repair is conditional: once upstream ships the fix, the install fails naming the entry to delete.
  • The root overrides move there too, apart from the jsdom pin and the eslint entries the peer repairs already cover.
  • @types/react and @types/react-dom leave the root; every workspace that uses them declares them.

Testing Instructions

  1. npm install --global npm@12
  2. Remove every node_modules, then npm ci.
  3. npm run typecheck && npm run build && npm run test:unit

Testing Instructions for Keyboard

None.

Use of AI Tools

Built with Claude Code; reviewed by the author.

@github-actions github-actions Bot added [Package] Compose /packages/compose [Tool] Dependency Extraction Webpack Plugin /packages/dependency-extraction-webpack-plugin [Package] UI /packages/ui [Package] wp-build /packages/wp-build labels Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

📦 Bundle size

Size Change: +4.2 kB (+0.05%)

Total Size: 8.98 MB

📦 View Changed
Filename Size Change
build/modules/route/index.min.js 29.4 kB +4.17 kB (+16.57%) ⚠️
build/scripts/block-editor/index.min.js 604 kB +24 B (0%)

36d13f8 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 94f2b09 trunk % Change
timeToFirstByte 55.9 ms +21.38% -1.97% 57.35 ms +18.83% -3.14% -2.53%
largestContentfulPaint 96 ms +4.17% -4.17% 100 ms +4% -4% -4%
lcpMinusTtfb 35.75 ms +8.53% -4.62% 36.6 ms +15.71% -4.92% -2.32%
wpBeforeTemplate 29.63 ms +20.79% -2.46% 31.09 ms +23.29% -4.54% -4.7%
wpTemplate 22.37 ms +5.14% -2.46% 23.03 ms +6.08% -5.86% -2.87%
wpTotal 51.88 ms +20.91% -1.97% 53.46 ms +17.45% -3.46% -2.96%
wpMemoryUsage 7.64 MB +0% -0% 7.61 MB +0% -0% 0.46%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 94f2b09 trunk % Change
timeToFirstByte 47.5 ms +6.53% -3.37% 47.55 ms +5.89% -0.84% -0.11%
largestContentfulPaint 100 ms +4% -0% 104 ms +0% -3.85% -3.85%
lcpMinusTtfb 53.85 ms +3.25% -2.51% 54.65 ms +2.56% -3.29% -1.46%
wpBeforeTemplate 26.6 ms +8.72% -0.71% 26.74 ms +10.02% -1.87% -0.52%
wpTemplate 17.45 ms +1.66% -7.45% 17.47 ms +0.86% -1.55% -0.11%
wpTotal 44.3 ms +7.07% -3.63% 44.27 ms +6.55% -0.97% 0.07%
wpMemoryUsage 6.33 MB +0% -0% 6.30 MB +0% -0% 0.57%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 94f2b09 trunk % Change
mediaProcessingJpeg 404.77 ms +0.96% -0.73% 405.01 ms +0.67% -0.57% -0.06%
mediaProcessingAvif 6066.29 ms +0.08% -0.07% 6131.15 ms +0.25% -0.14% -1.06%
mediaProcessingJpegToAvif 4199.68 ms +0.27% -0.05% 4225.93 ms +0.08% -0.04% -0.62%

media-upload

Metric 94f2b09 trunk % Change
jpegUploadProcessing 1972.95 ms +1.03% -0.92% 1956.41 ms +0.22% -0.84% 0.85%
pngUploadProcessing 199.37 ms +6.34% -5.23% 183.83 ms +20.64% -3.13% 8.45%
largeJpegUploadProcessing 1935.48 ms +1.69% -0.15% 1962.77 ms +2.41% -1.16% -1.39%
multipleImageUploadProcessing 2045.25 ms +0.51% -0.57% 2066.8 ms +0.95% -0.97% -1.04%

post-editor

Metric 94f2b09 trunk % Change
serverResponse 250.72 ms +12.09% -5.7% 261.28 ms +4.68% -5.88% -4.04%
firstPaint 291.62 ms +14.54% -42.05% 205.47 ms +63.98% -15.67% 41.93%
domContentLoaded 755.7 ms +4.29% -7.21% 743.97 ms +5.89% -2.94% 1.58%
loaded 756.55 ms +4.27% -7.22% 744.99 ms +5.87% -2.98% 1.55%
firstContentfulPaint 340.06 ms +6.34% -4.39% 349.33 ms +1.25% -4.15% -2.65%
firstBlock 2309.34 ms +6.58% -4.34% 2332.14 ms +4.18% -4.5% -0.98%
type 13.99 ms +7.58% -6.65% 14.56 ms +1.17% -5.7% -3.91%
typeWithoutInspector 14.81 ms +5% -7.16% 14.04 ms +3.35% -2.07% 5.48%
typeWithTopToolbar 17.4 ms +1.44% -2.64% 16.12 ms +4.59% -3.16% 7.94%
typeContainer 6.61 ms +14.98% -3.48% 6.6 ms +6.36% -7.27% 0.15%
focus 85.01 ms +4.08% -3.49% 72.11 ms +7.1% -3.7% 17.89%
firstFocus 159.72 ms +0% -0% 158.37 ms +0% -0% 0.85%
selectAll 359.05 ms +3.23% -2.68% 330.82 ms +0.86% -2.65% 8.53%
listViewOpen 53.05 ms +6.54% -10.8% 45.25 ms +7.82% -5.46% 17.24%
inserterOpen 28.78 ms +0.97% -2.61% 27.98 ms +9.94% -2.5% 2.86%
inserterHover 9.69 ms +2.79% -3.2% 8.67 ms +6.11% -7.96% 11.76%
inserterSearch 6.98 ms +4.01% -9.03% 7.09 ms +127.5% -12.69% -1.55%
loadPatterns 455.43 ms +2.75% -5.85% 440.99 ms +4.45% -3.86% 3.27%
wpTotal 243.27 ms +12.53% -5.77% 254.02 ms +4.72% -5.93% -4.23%
wpMemoryUsage 14.66 MB +0% -0% 14.63 MB +0% -0% 0.26%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 94f2b09 trunk % Change
serverResponse 517.08 ms +3.41% -7.44% 506.39 ms +1.31% -3.11% 2.11%
firstPaint 247.48 ms +7.78% -9.02% 279.29 ms +19.78% -18.43% -11.39%
domContentLoaded 1269.41 ms +1.68% -1.03% 1312.73 ms +0.98% -0.56% -3.3%
loaded 1270.4 ms +1.71% -1.03% 1313.91 ms +0.99% -0.57% -3.31%
firstContentfulPaint 509.53 ms +1.96% -1.43% 544.69 ms +2.48% -4.34% -6.46%
firstBlock 4930.39 ms +0.66% -0.18% 4942.93 ms +0.91% -1.1% -0.25%
type 18.59 ms +1.78% -3.39% 18 ms +5% -4.06% 3.28%
navigate 120.55 ms +10.3% -2.99% 126.29 ms +10.95% -6.87% -4.55%
loadPatterns 1235.81 ms +4.69% -3.28% 1285.74 ms +5.63% -2.77% -3.88%
loadPages 1040.68 ms +1.7% -2.92% 1048.65 ms +0.61% -2.78% -0.76%
wpTotal 506.57 ms +3.72% -7.44% 496.32 ms +1.37% -3.08% 2.07%
wpMemoryUsage 12.70 MB +0% -0% 12.66 MB +0% -0% 0.29%
wpDbQueries 44 +2.27% -0% 44 +2.27% -0% 0%

36d13f8 Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

Regression: updating a specific option will only change its value and will not corrupt others in /test/e2e/specs/editor/various/core-settings.spec.js, passed after 1 failed attempt.
Error: expect(received).toStrictEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Array [
    "rewrite_rules",
-   "SERIALIZED DATA",
+   "",
  ]
    at forEach (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:46:26)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:43:35
drags a multi-selection from anywhere inside it in /test/e2e/specs/editor/various/draggable-blocks.spec.js, passed after 2 failed attempts.
TypeError: Cannot read properties of null (reading 'y')
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:824:57
    at dragSelectionBelowLanding (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:823:3)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:844:3
TypeError: Cannot read properties of null (reading 'y')
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:824:57
    at dragSelectionBelowLanding (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:823:3)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:844:3
refuses the drop and uploads nothing in /test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js, passed after 1 failed attempt.
Error: expect(received).toHaveLength(expected)

Expected length: 0
Received length: 1
Received array:  [{"_links": {"about": [{"href": "http://localhost:8889/wp-json/wp/v2/types/attachment"}], "author": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/users/1"}], "collection": [{"href": "http://localhost:8889/wp-json/wp/v2/media"}], "curies": [{"href": "https://api.w.org/{rel}", "name": "wp", "templated": true}], "replies": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/comments?post=223"}], "self": [{"href": "http://localhost:8889/wp-json/wp/v2/media/223", "targetHints": {"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]}}], "wp:attached-to": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/posts/222", "id": 222, "post_type": "post"}]}, "alt_text": "", "author": 1, "caption": {"rendered": ""}, "class_list": ["post-223", "attachment", "type-attachment", "status-inherit", "hentry", "entry"], "comment_status": "open", "date": "2026-10-20T12:37:33", "date_gmt": "2026-10-20T12:37:33", "description": {"rendered": "<p class=\"attachment\"><a href='http://localhost:8889/wp-content/uploads/2026/10/3d0ee7e3-abda-4eaf-93b0-2e99881b519b.png'><img loading=\"lazy\" decoding=\"async\" width=\"10\" height=\"10\" src=\"http://localhost:8889/wp-content/uploads/2026/10/3d0ee7e3-abda-4eaf-93b0-2e99881b519b.png\" class=\"attachment-medium size-medium\" alt=\"\" style=\"width:100%;height:100%;max-width:10px;\" /></a></p>
"}, "featured_media": 0, "filename": "3d0ee7e3-abda-4eaf-93b0-2e99881b519b.png", "filesize": 80, "guid": {"rendered": "http://localhost:8889/wp-content/uploads/2026/10/3d0ee7e3-abda-4eaf-93b0-2e99881b519b.png"}, "id": 223, "link": "http://localhost:8889/?attachment_id=223", "media_details": {"file": "2026/10/3d0ee7e3-abda-4eaf-93b0-2e99881b519b.png", "filesize": 80, "height": 10, "image_meta": {"alt": "", "aperture": "0", "camera": "", "caption": "", "copyright": "", "created_timestamp": "0", "credit": "", "focal_length": "0", "iso": "0", "keywords": [], "orientation": "0", "shutter_speed": "0", "title": ""}, "sizes": {}, "width": 10}, "media_type": "image", "meta": [], "mime_type": "image/png", "modified": "2026-10-20T12:37:33", "modified_gmt": "2026-10-20T12:37:33", "ping_status": "closed", "post": 222, "slug": "3d0ee7e3-abda-4eaf-93b0-2e99881b519b", "source_url": "http://localhost:8889/wp-content/uploads/2026/10/3d0ee7e3-abda-4eaf-93b0-2e99881b519b.png", "status": "inherit", "template": "", "title": {"rendered": "3d0ee7e3-abda-4eaf-93b0-2e99881b519b"}, "type": "attachment"}]
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js:71:45

36d13f8 Run

@manzoorwanijk
manzoorwanijk requested a balanced review from Copilot September 14, 2026 17:23
@manzoorwanijk manzoorwanijk added the [Type] Code Quality Issues or PRs that relate to code quality label Sep 14, 2026
@manzoorwanijk
manzoorwanijk removed the request for review from Copilot September 14, 2026 17:24
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch 3 times, most recently from fd59fde to fbf2588 Compare September 17, 2026 11:48
@github-actions github-actions Bot added the [Tool] Env /packages/env label Sep 17, 2026
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch 3 times, most recently from 48d39ed to 015225a Compare September 18, 2026 08:29
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch from 015225a to f202999 Compare September 25, 2026 06:45
@github-actions github-actions Bot removed the [Package] wp-build /packages/wp-build label Sep 25, 2026
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch 2 times, most recently from 60017a1 to b445dc0 Compare October 1, 2026 11:34
@github-actions github-actions Bot removed the [Tool] Dependency Extraction Webpack Plugin /packages/dependency-extraction-webpack-plugin label Oct 1, 2026
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch from b445dc0 to 896b859 Compare October 2, 2026 03:45
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch from 896b859 to ea8f5a5 Compare October 2, 2026 06:46
@github-actions github-actions Bot removed the [Tool] Env /packages/env label Oct 2, 2026
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch from ea8f5a5 to 8847b40 Compare October 2, 2026 08:55
@github-actions github-actions Bot removed [Package] Compose /packages/compose [Package] UI /packages/ui labels Oct 2, 2026
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch 2 times, most recently from 115fa78 to 2c5f760 Compare October 5, 2026 04:41
@manzoorwanijk manzoorwanijk changed the title Try: Strict, isolated installs on npm 12 Try: Strict, isolated installs on npm 12 with manifest repairs Oct 5, 2026
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch 5 times, most recently from 9f60ea0 to 9dd3fd9 Compare October 7, 2026 04:56
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch from 9dd3fd9 to ca29778 Compare October 14, 2026 13:16
Bump engines.npm and devEngines.packageManager to npm v12, now that the
supply chain policy the major requires has landed in #82689. Drop the
npmrc settings v12 makes redundant with it: git and remote specs are
refused by default, and the lockfile already records its own version.

Generate the icons library from the root postinstall. v12 holds workspace
lifecycle scripts to allowScripts under install-strategy=linked and skips
an unlisted one with no error (npm/cli#9982),
so the approval was fragile. Root lifecycle scripts are outside the
policy, so building from postinstall drops the entry entirely.

Closes #82328.
Under install-strategy=linked a package only resolves what it declares,
so packages whose types or peer ranges are wrong now fail the install.
Repair their manifests at the root, each linked to its upstream issue.

Fold the version overrides in as well, so each repair sits next to the
reason for it: the js-yaml and pacote releases lerna pins below their
advisories, the uuid release sockjs no longer publishes for, and the
@y/y alias @y/websocket-server needs to share one Yjs implementation.
The eslint overrides go with them, since the peer repairs above already
cover those plugins, and the jsdom pin matched what test/unit asks for.
Under install-strategy=linked the root copy hid every workspace and
dependency that uses React types without declaring them.

- Routes and the welcome widget declare @types/react; compose and ui
  declare @types/react-dom for their tests.
- @wordpress/route peers on react-dom, which @tanstack/react-router
  requires.
- .npm-extension.mjs adds an optional @types/react peer to third-party
  packages whose declarations import React types without declaring them.
@manzoorwanijk
manzoorwanijk force-pushed the try/npm-12-isolated-strict-install branch from ca29778 to 36d13f8 Compare October 20, 2026 12:21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant