Skip to content

fix(pnpmfile): strip usocket from dbus-next.dependencies too#2363

Merged
TalZaccai merged 2 commits into
mainfrom
talzacc/strip-usocket-from-dbus-next
May 19, 2026
Merged

fix(pnpmfile): strip usocket from dbus-next.dependencies too#2363
TalZaccai merged 2 commits into
mainfrom
talzacc/strip-usocket-from-dbus-next

Conversation

@TalZaccai
Copy link
Copy Markdown
Contributor

Problem

Recent dependabot PRs (#2360, #2361) and the daily dependabot remediation workflow have been failing the Install dependencies step on Windows with:

uwrap.cc(2,10): error C1083: Cannot open include file: ''sys/ioctl.h'': No such file or directory

This is usocket@0.3.0 (a native Unix-domain-socket module) trying to compile via node-gyp. POSIX-only headers ⇒ Windows build fails.

Root cause

dbus-next@0.10.2''s package.json lists usocket in both:

"dependencies":         { "usocket": "^0.3.0" },
"optionalDependencies": { "usocket": "^0.3.0" }

The existing hook in ts/.pnpmfile.cjs only stripped from optionalDependencies. main''s lockfile happens to be usocket-free, but any fresh resolution (e.g. dependabot regenerating pnpm-lock.yaml when bumping an unrelated package) picks usocket back up via the regular dependencies entry and Windows installs fail.

Fix

Strip usocket from both dependencies and optionalDependencies in the readPackage hook. dbus-next degrades gracefully to Node''s built-in net module without it (see comment in the hook).

Verification

dbus-next@0.10.2 lists usocket in both `dependencies` and `optionalDependencies`. The existing hook only stripped it from optionalDependencies, so any fresh pnpm resolution (e.g. dependabot regenerating the lockfile when bumping an unrelated package) picked usocket back up via dependencies, breaking the Install step on Windows with:

  uwrap.cc(2,10): error C1083: Cannot open include file: 'sys/ioctl.h'

Also strip from dependencies so the resolution stays clean across pnpm versions and fresh installs. dbus-next degrades gracefully to Node's built-in net module without usocket.

Lockfile diff is just the pnpmfile checksum — the resolution graph itself was already usocket-free on main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Hardens the existing pnpm readPackage hook so that usocket is stripped from dbus-next's regular dependencies in addition to optionalDependencies, preventing Windows install failures when the lockfile is regenerated.

Changes:

  • Extend the dbus-next hook in ts/.pnpmfile.cjs to delete usocket from both dependencies and optionalDependencies.
  • Update the explanatory comment to document the dual-listing in dbus-next@0.10.2 and the Windows failure mode.
  • Refresh pnpmfileChecksum in ts/pnpm-lock.yaml to reflect the new hook contents.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
ts/.pnpmfile.cjs Strip usocket from both dependencies and optionalDependencies of dbus-next; updated comment.
ts/pnpm-lock.yaml Updated pnpmfile checksum after hook change.
Files not reviewed (1)
  • ts/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TalZaccai TalZaccai temporarily deployed to development-fork May 19, 2026 17:51 — with GitHub Actions Inactive
@TalZaccai TalZaccai added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 5388db9 May 19, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants