Skip to content

chore(deps): refresh lockfile (build failed)#149

Closed
github-actions[bot] wants to merge 1 commit into
masterfrom
chore/refresh-lockfile-20260511
Closed

chore(deps): refresh lockfile (build failed)#149
github-actions[bot] wants to merge 1 commit into
masterfrom
chore/refresh-lockfile-20260511

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Lockfile Refresh

The daily lockfile regeneration found updated transitive dependencies, but build failed.

Please review the changes and fix any issues before merging.

This PR was created automatically by the refresh-lockfile workflow.

oorabona added a commit that referenced this pull request May 14, 2026
…pat with @types/node 25.7.0) (#155)

* fix(stream): tolerate @types/node Transformer.cancel availability

@types/node 25.7.0 added `cancel?: TransformerCancelCallback` to the
`Transformer` interface in stream/web.d.ts. On the older 25.6.0 that
ships with the committed pnpm-lock.yaml the property is absent, so
`@ts-expect-error` was suppressing a real error. On the daily
refresh-lockfile workflow's regenerated lockfile (which picks 25.7.0
within the catalog `^25.5.0` range) the directive becomes unused and
trips TS2578, blocking the workflow's build step and causing 9 stale
"chore(deps): refresh lockfile (build failed)" PRs (#143-#145, #149-#152).

Switch to `@ts-ignore`:

- Old typings (cancel absent): suppresses the assignment error (same
  behavior as before).
- New typings (cancel present): no-op, no warning. Forward-compatible
  with future @types/node releases.

Reproduction:
  pnpm add -D -E @types/node@25.7.0 && pnpm build  # passes
  pnpm add -D -E @types/node@25.6.0 && pnpm build  # passes

* fix(stream): apply @ts-expect-error@ts-ignore swap (forgotten in prior commit)

Prior commit 50eea34 updated the rationale comments but left the directives
unchanged, so @types/node 25.7.0 would still trip TS2578.

- src/wasm/stream.ts L72, L132: directive @ts-expect-error@ts-ignore
- comments: replaced nonsensical "@ts-expect-error (not @ts-expect-error)"
  self-comparison with "@ts-ignore (not @ts-expect-error)"

* fix(stream): shield @ts-ignore directives from biome noTsIgnore auto-rewrite

Rounds 1 and 2 silently regressed because Biome's recommended
`suspicious/noTsIgnore` rule, run via `biome check --write` from the
nano-staged pre-commit hook, auto-rewrites `@ts-ignore` back to
`@ts-expect-error`. Net result: the directive swap never reached HEAD
even though local edits applied correctly.

Adds `// biome-ignore lint/suspicious/noTsIgnore: ...` pragma above each
`// @ts-ignore` directive so the hook leaves them untouched. The
`@ts-ignore` choice is deliberate — `@ts-expect-error` would fire TS2578
the moment `@types/node` 25.7.0 (which adds `Transformer.cancel`) lands
in the lockfile, exactly the breakage the daily Refresh Lockfile workflow
keeps surfacing.

Verified: `pnpm type-check` clean (current lockfile), `biome check
src/wasm/stream.ts` clean (via rtk proxy to bypass RTK rewrite).

* fix(stream): drop @ts-expect-error in favor of intersection-cast (forward-compat)

`@types/node@25.7.0` added `cancel?: TransformerCancelCallback` to the
`Transformer` interface in `node:stream/web`. The previous `@ts-expect-error`
directives suppressing the missing-`cancel` error on older typings would
become "unused" (TS2578) on 25.7.0+, which is exactly what the daily
`Refresh Lockfile` workflow has been opening "build failed" PRs about
since 2026-05-06.

Switching the directive to `@ts-ignore` is not viable: the pre-commit hook
runs `biome check --write`, and Biome v2's `lint/suspicious/noTsIgnore`
safe-fix rewrites `@ts-ignore` back to `@ts-expect-error` as a text
replace — even inside `biome-ignore` suppression pragmas. Verified
empirically.

Instead, cast the inline `Transformer` literal as `Transformer<Uint8Array,
Uint8Array> & { cancel?: (reason: unknown) => void | PromiseLike<void> }`.
The intersection adds `cancel?:` on `@types/node@25.6.0` (where it's
absent) and is structurally compatible on 25.7.0+ (where it's present).
Zero `@ts-ignore`/`@ts-expect-error`/`biome-ignore` directives in the
file. The `cancel` signature matches the Streams spec (`reason: unknown
=> void | PromiseLike<void>`), so the call contract stays visible.

Adds `test/wasm/stream-directive-hygiene.test.ts` as a deterministic
regression detector: if a future change re-introduces either directive
in `src/wasm/stream.ts`, the test fails on every PR — not just on the
next lockfile refresh.

Verified locally against both `@types/node@25.6.0` (lockfile) and
`@types/node@25.7.0`: `tsc --noEmit` clean both ways, biome check clean
(with and without `--write`), new test passes.
@oorabona

Copy link
Copy Markdown
Owner

Superseded by #155 (intersection cast forward-compat with @types/node 25.7.0) — daily Refresh Lockfile workflow now operates nominally (verified via manual run 25876069363 + direct lockfile commit 73fcd3c).

@oorabona oorabona closed this May 14, 2026
@oorabona oorabona deleted the chore/refresh-lockfile-20260511 branch May 14, 2026 17:56
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.

1 participant