Skip to content

build: drop a pile of unused / replaceable dev dependencies - #52744

Merged
MarshallOfSound merged 9 commits into
mainfrom
build/drop-unused-dev-deps
Sep 1, 2026
Merged

MarshallOfSound merged 9 commits into
mainfrom
build/drop-unused-dev-deps

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

Removes or replaces a bunch of dev dependencies, one commit each. Lockfile goes from 1124 to 975 entries. Reasoning for each is in the commit messages.

Removed Replaced with
sinon, check-for-leaks, null-loader, @types/uuid, q, coffeescript, mkdirp nothing, all unused
abstract-socket (+ patch, resolution, packageExtensions, npm rebuild step) 4 line patch to dbus-native to use Node's native abstract sockets
uuid, basic-auth, temp crypto.randomUUID(), parseBasicAuth() in net-helpers, mkdtemp
wrapper-webpack-plugin webpack's BannerPlugin
@primer/octicons the 5 svgs vendored into default_app/octicon/
got, second copy of @electron/fiddle-core fetch, fiddle-core@^2
express small router in spec/lib/http-server-helpers.ts on top of send
@electron/packager resedit directly

Draft until CI has run the darwin / win32 only suites that cover the last two rows.

Notes: none

@socket-security

socket-security Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​types/​send@​1.2.0 ⏵ 1.2.11001007182100
Updatednpm/​plist@​3.1.0 ⏵ 3.1.1100 +1100100 +182100

View full report

@MarshallOfSound
MarshallOfSound force-pushed the build/drop-unused-dev-deps branch 2 times, most recently from c03eaeb to cef175d Compare August 10, 2026 06:24
@socket-security

socket-security Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring alerts on:

View full report

@MarshallOfSound
MarshallOfSound marked this pull request as ready for review August 16, 2026 20:58
@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner August 16, 2026 20:58
@MarshallOfSound

Copy link
Copy Markdown
Member Author

@SocketSecurity ignore-all

@dsanders11 dsanders11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not gonna block on it, but I'd personally prefer a less kitchen sink PR that touches both production builds and test all in one, as it makes it more of a pain to review and increases backport conflicts.

@MarshallOfSound
MarshallOfSound force-pushed the build/drop-unused-dev-deps branch from 3789212 to da9430e Compare August 31, 2026 22:11
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) August 31, 2026 22:11
@MarshallOfSound

Copy link
Copy Markdown
Member Author

@dsanders11 Specifically did this without the intention of backporting, even doing these in smaller PRs backporting is a nightmare 😅 Got some more stuff to cut and might do mass-backports at some point, but for now just fixing main was my objective

…dule

Removes dependencies that nothing in the tree uses any more:

* sinon / @types/sinon: no spec imports them.
* check-for-leaks: only wired to `prepack`, and the root package is
  private and never packed.
* null-loader: the only rule using it matched against an always-empty
  `ignoredModules` list in the webpack config.
* @types/uuid: uuid ships its own types since well before the version
  we depend on.
* q, coffeescript, mkdirp: each backed a single test of third-party
  module behaviour. The `require` app-directory test now uses
  dirty-chai (any module that only lives in spec/node_modules works,
  it is exercising module.paths, not the module), and the mkdirp asar
  test is replaced by a `fs.mkdirSync(..., { recursive: true })` case
  next to the existing mkdirSync test.

Also drops abstract-socket. dbus-native only used it to connect to
`unix:abstract=` bus addresses, and Node.js has supported abstract
sockets natively via a leading NUL byte since 20.8, so dbus-native is
now patched to use net.createConnection instead. That lets us delete
the abstract-socket patch, its resolutions entry, the dependenciesMeta
`built` opt-in, the packageExtensions block in .yarnrc.yml and the
Linux-only `npm rebuild abstract-socket` step in the spec runner.
abstract-socket itself still appears in the lockfile as dbus-native's
optional dependency (patches cannot change resolution), but it is no
longer built or required by anything.

No-Verification-Needed: dependency, test and build-tooling changes only; no product source touched
* uuid -> crypto.randomUUID() across the specs.
* basic-auth -> a small parseBasicAuth() helper in spec/lib/net-helpers,
  used by the two specs that need to read Basic credentials.
* temp -> fs.mkdtempSync in release.ts and in the asar copyFile specs.

Also removes script/doc-only-change.js, whose last caller went away with
the AppVeyor configs.

No-Verification-Needed: spec, release-tooling and manifest changes only; no product source touched
wrapper-webpack-plugin is a webpack 4 era plugin that still hooks the
deprecated optimizeChunkAssets hook. webpack 5's built-in BannerPlugin
can prepend a raw header and (with `footer: true`) append a raw footer,
and instances run in registration order, so the profiling wrapper and
the try/catch wrapper nest exactly as before. The only difference in the
emitted bundles is a newline between each wrapper and the bundle body.

No-Verification-Needed: webpack build config only; emitted bundle diffed against the previous plugin's output (whitespace-only), production output checked for nesting and syntax
The default app uses five icons and an 88 byte stylesheet out of
@primer/octicons, and pulling them out of node_modules was the only
place the GN build reached into node_modules for shipped content. Copy
the files (MIT licensed, notice included alongside) into
default_app/octicon so they are plain static sources like the rest of
the default app, and drop the dependency and the extra copy target. The
files end up at the same paths inside default_app.asar as before.

No-Verification-Needed: vendored files are byte-identical to the octicon files the existing build already ships at the same asar paths
The release scripts were the only direct users of got, and every call
was a plain GET/HEAD/POST that global fetch covers: HEAD requests use
`redirect: 'manual'` in place of `followRedirect: false`, and the
non-2xx handling that previously relied on `throwHttpErrors: false` now
checks `response.status` explicitly. The asset manifest in release.ts is
untouched.

got@11 was also still being kept alive by @electron/fiddle-core@1, which
the root package depended on while .github/workflows already used ^2.
Aligning the root on ^2 removes the second copy of fiddle-core and
@electron/get along with the whole got@11 dependency chain (41 packages).
fiddle-core 2 is ESM-only; the CommonJS spec runner loads it through
require(esm), which is available on the Node 22.21 CI uses and anything
newer than 22.12.

No-Verification-Needed: release tooling, spec runner and manifest changes only; no product source touched
The two autoUpdater specs were the only users of express, and between
them they use `use()`, `get()` with one `:param` route, `res.status()`,
`res.send()`, `res.json()` and `res.download()`. spec/lib/http-server-
helpers.ts provides exactly that surface on top of node:http, with file
responses still going through `send` (what express uses internally) so
HEAD, Range and content-type behaviour towards the updaters is unchanged.
`send` is bumped to the 1.x line express 5 was already using, since 0.x
serves .msix files as application/octet-stream rather than
application/msix.

Removes express, @types/express and 43 transitive packages.

No-Verification-Needed: spec-only change; helper exercised over HTTP for GET/HEAD/Range/json/204/404 routing
The asar integrity spec only used @electron/packager for its resedit
wrapper, and only the branch of that wrapper which embeds the integrity
resource on Windows. Do that directly with resedit (the library the
wrapper is built on), which is a dozen lines, and drop packager along
with the 24 signing/notarizing/downloading packages it brings in.

No-Verification-Needed: spec-only change; resource embedding round-tripped against a real PE locally
The `temp` package was dropped from the root package.json but
api-protocol-spec.ts still required it inline, so every test shard
that loads that file failed at spec-runner startup.

No-Verification-Needed: test-only change
@MarshallOfSound
MarshallOfSound force-pushed the build/drop-unused-dev-deps branch from da9430e to 64bf5c9 Compare September 1, 2026 00:37
@MarshallOfSound
MarshallOfSound merged commit 92d1a91 into main Sep 1, 2026
76 checks passed
@MarshallOfSound
MarshallOfSound deleted the build/drop-unused-dev-deps branch September 1, 2026 02:13
@release-clerk

release-clerk Bot commented Sep 1, 2026

Copy link
Copy Markdown

No Release Notes

@github-actions github-actions Bot added the 46-x-y label Sep 1, 2026
MarshallOfSound pushed a commit that referenced this pull request Sep 1, 2026
A merge race between #52744, which removed the uuid dev-dependency
and converted specs to randomUUID() from node:crypto, and #52597,
which added a tabs.query test using uuid.v4(), left one stray uuid
reference that breaks spec runner compilation (TS2304) on every
test shard. Swap it for randomUUID(), matching #52744's conversion.

Co-authored-by: Claude <[email protected]>
@jkleinsc jkleinsc mentioned this pull request Sep 1, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants