chore(deps): refresh lockfile (build failed)#149
Closed
github-actions[bot] wants to merge 1 commit into
Closed
Conversation
3 tasks
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.
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.