Skip to content

fix(deps): bump the minorandpatch group with 9 updates - #1861

Closed
tada5hi wants to merge 2 commits into
masterfrom
chore/deps-minorandpatch-1858
Closed

tada5hi wants to merge 2 commits into
masterfrom
chore/deps-minorandpatch-1858

Conversation

@tada5hi

@tada5hi tada5hi commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Supersedes #1858, whose build fails. Same 9 dependency updates, plus the code changes needed to keep the pipeline green.

Package From To
@types/node 26.3.0 26.4.0
lint-staged 17.3.0 17.4.1
nx 23.1.1 23.1.2
vue 3.5.41 3.5.42
zod 4.4.3 4.5.1
tar-stream 3.2.0 3.2.1
@vue/test-utils 2.4.11 2.5.0
happy-dom 20.11.6 20.11.13
vue-router 5.2.0 5.3.0

Why #1858 failed

Nine tsc errors across three files, in server-storage and server-core-worker. All of them trace to one bump:

tar-stream 3.2.1 is a types-only release. npm diff --diff=tar-stream@3.2.0 --diff=tar-stream@3.2.1 reports exactly two changed files — package.json and a brand-new index.d.ts. The runtime is byte-identical (verified independently: diff -r excluding *.d.ts/package.json between the two installed copies reports no differences).

What changed is resolution. 3.2.1 declares exports["."].types, which unconditionally shadows @types/tar-stream@3.1.4. The DefinitelyTyped package modelled tar-stream on node:stream; the bundled types model it on streamx. So Pack, Extract and the entry sink are suddenly structurally unrelated to the node stream types that dockerode and node:stream/promises expect — even though the objects were already streamx before the bump and satisfy both contracts at runtime.

The DT package was an approximation that upstream has now superseded, so this is a real improvement in type fidelity, not a regression to work around.

The fix

Adapt the call sites; drop @types/tar-stream from both apps, where it is now dead. It stays in the tree transitively via @types/tar-fs, so nothing else moves — the lockfile delta is exactly the two stale devDependency edges.

  • Headers → Header. The plural name no longer exists upstream. It was load-bearing: it types four members of the exported DockerContainerPackOptions.
  • entry.end() → entry.end(undefined). streamx types the argument as required; its WritableState.end explicitly no-ops on both undefined and null (else if (data !== undefined && data !== null) this.push(data)), and never consults arguments.length. This was the one place a types-only fix could have corrupted a tar entry by pushing a stray chunk, so it was checked against the source rather than assumed.
  • Five as unknown as bridges at the node↔streamx crossings. Each was checked against what the consumer actually calls, not just against what makes tsc quiet:
    • putArchive: docker-modem calls only .on('error') and .pipe(req) on the archive — never isPaused/unpipe/wrap, the three members NodeJS.ReadableStream declares and streamx lacks.
    • pipeline(source, entry) and readable.pipe(extract): node duck-types its peer through write/end/'drain', and streamx's write returns a real boolean and emits drain, so backpressure survives the bridge. This matters in bucket/stream.ts, where the await is what backpressures the MinIO read behind a slow HTTP consumer.
    • The single-step as NodeJS.WritableStream does not compile (TS2352) — streamx's runtime-agnostic EventEmitter declares listeners() differently from @types/node — so the double assertion is compiler-forced rather than stylistic.

The assertions erase to nothing. Transpiling old vs. new with both tsc and @swc/core gives byte-identical output for bucket/stream.ts, and exactly one delta in each of the other two files: entry.end() → entry.end(undefined).

A second break site CI cannot see

apps/server-storage/test/unit/bucket-file.spec.ts:102 carries the identical error on the extract side. Every tsconfig.build.json is include: ['src/**/*.ts'], so build:types never looks at it and the suite still passes (vitest transpiles via SWC and the runtime is unchanged) — but tsc --noEmit -p apps/server-storage/tsconfig.json, the pre-push check .agents/conventions.md prescribes for test-touching changes, does fail. Fixed here so the bump is adapted in one place.

Verification

Run locally against this branch:

Gate Result
npm run build 26/26 projects
npm run test 18 projects, 510 tests, all passing — real Authup + PostgreSQL via testcontainers
npm run lint 0 errors (15 pre-existing warnings, untouched files)
tsc -p apps/server-{storage,core-worker}/tsconfig.json only pre-existing errors remain, confirmed against a baseline run on master with the old dependency tree

npm ci is not a gate for the @types/tar-stream removal, contrary to what it looks like: npm only validates that manifest edges are satisfied by the lock, not that the lock has no extras, so a stale edge would have landed silently. The lockfile is synced with a plain npm install (never --package-lock-only, which strips the non-host-platform optional entries).

Worth knowing about the other eight bumps

Nothing else needed a code change, but one behavioural change is worth flagging because it is silent:

zod 4.5.0 changed .min()/.max()/.length() on strings from counting UTF-16 code units to counting Unicode code points. .max() only loosens, but .min() strictly tightens for astral-plane input: z.string().min(3) accepted "😀😀" (4 code units, 2 code points) under 4.4.3 and rejects it under 4.5.1. This reaches every free-form string field without a charset guard — node.name, registry and analysis fields among them. It is upstream behaving more correctly, not a regression, and no test asserts on it, but a user who could previously name something with two emoji now cannot.

Also non-events, each checked against real usage rather than release notes alone: @vue/test-utils 2.5.0's breaking change is dropping class components (none here, and stub matching — which the client-vue harness depends on for VCIcon) is byte-unchanged; vue-router 5.3.0's codegen fixes are all inert for this route tree; @types/node 26.4.0 did not change the stream typings at all, so the pipeline error was 100% attributable to tar-stream.

Follow-up, not in scope here

analysis-builder/handlers/execute/module.ts sizes the Dockerfile tar entry with content.length (UTF-16 code units) while writing UTF-8 bytes. Sink._final rejects when written !== header.size, so a single non-ASCII character in an analysis entrypoint path fails the image build with an opaque Size mismatch. It predates this PR and is left alone; tar-stream's buffer overload is both shorter and correct.

@types/node 26.4.0, lint-staged 17.4.1, nx 23.1.2, vue 3.5.42, zod 4.5.1, tar-stream 3.2.1, @vue/test-utils 2.5.0, happy-dom 20.11.13, vue-router 5.3.0
…dled types

tar-stream 3.2.1 is a types-only release: `npm diff` against 3.2.0 shows
exactly two changed files, package.json and a new index.d.ts. It declares
`exports["."].types`, which shadows @types/tar-stream@3.1.4 — and the
bundled types model tar-stream on `streamx` rather than node:stream.

The runtime objects were already streamx before the bump, so every stream
hop here is behaviourally unchanged; only the declarations moved. Adapt
the call sites and drop @types/tar-stream, which is now dead in both apps
(it stays in the tree transitively via @types/tar-fs).

- `Headers` -> `Header` (the plural name no longer exists upstream)
- `entry.end()` -> `entry.end(undefined)`; streamx types the argument as
  required, and its WritableState.end no-ops on undefined and null
- node<->streamx crossings assert at the boundary: docker-modem only calls
  .on('error') and .pipe(req) on the archive, and node's pipe/pipeline
  duck-type their peer through write/end/'drain'

Also fixes the same break in test/unit/bucket-file.spec.ts, which CI's
build:types cannot see (every tsconfig.build.json is `include: src/**`).
Copilot AI lite review requested due to automatic review settings September 1, 2026 11:09
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: f65806d9-b3c2-4603-b53e-b14f0ba90084

📥 Commits

Reviewing files that changed from the base of the PR and between 0be5ce6 and 2cc6f9a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (17)
  • apps/client-ui/package.json
  • apps/server-core-worker/package.json
  • apps/server-core-worker/src/adapters/docker/container-pack.ts
  • apps/server-core-worker/src/app/components/analysis-builder/handlers/execute/module.ts
  • apps/server-core/package.json
  • apps/server-messenger/package.json
  • apps/server-storage/package.json
  • apps/server-storage/src/adapters/http/controllers/bucket/stream.ts
  • apps/server-storage/test/unit/bucket-file.spec.ts
  • apps/server-telemetry/package.json
  • docs/package.json
  • package.json
  • packages/client-vue/package.json
  • packages/core-kit/package.json
  • packages/messenger-kit/package.json
  • packages/storage-kit/package.json
  • packages/telemetry-kit/package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates a set of minor/patch dependencies across the Hub monorepo and applies the minimal TypeScript-level adaptations required to keep builds and type-checking green after tar-stream@3.2.1 started shipping its own (streamx-based) type declarations.

Changes:

  • Bump 9 dependencies (@types/node, lint-staged, nx, vue, zod, tar-stream, @vue/test-utils, happy-dom, vue-router) across workspaces and sync package-lock.json.
  • Adapt tar-stream call sites to the new exported Header type and streamx-vs-node stream typing differences (targeted unknown as NodeJS.*Stream bridges, and end(undefined) where required by types).
  • Remove direct @types/tar-stream devDependencies from apps/server-storage and apps/server-core-worker, and fix a unit test type-check break in apps/server-storage.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Bumps root dev tooling deps (@types/node, lint-staged, nx).
package-lock.json Lockfile updates for all 9 bumps; removes stale @types/tar-stream edges and updates resolved versions/integrities.
apps/server-core/package.json Bumps zod runtime dependency.
apps/server-messenger/package.json Bumps zod runtime dependency.
apps/server-telemetry/package.json Bumps zod runtime dependency.
apps/server-storage/package.json Bumps tar-stream + zod, drops @types/tar-stream.
apps/server-core-worker/package.json Bumps tar-stream + zod, drops @types/tar-stream.
apps/client-ui/package.json Bumps vue and zod.
docs/package.json Bumps vue for the VitePress docs workspace.
packages/core-kit/package.json Bumps zod dependency.
packages/storage-kit/package.json Bumps zod dependency.
packages/telemetry-kit/package.json Bumps zod dependency.
packages/messenger-kit/package.json Bumps zod dependency.
packages/client-vue/package.json Bumps vue, vue-router, zod, @types/node, @vue/test-utils, happy-dom (deps + devDeps where applicable).
apps/server-storage/src/adapters/http/controllers/bucket/stream.ts Bridges streamx-typed tar entry sink to node:stream/promises pipeline() via a double assertion.
apps/server-storage/test/unit/bucket-file.spec.ts Bridges streamx-typed tar extract sink to node’s pipe() in the unit test (type-check fix).
apps/server-core-worker/src/adapters/docker/container-pack.ts Updates Headers→Header, and bridges pack/extract streamx types at dockerode and node piping boundaries; updates end(undefined).
apps/server-core-worker/src/app/components/analysis-builder/handlers/execute/module.ts Updates end(undefined) and bridges pack into dockerode.buildImage() call chain.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tada5hi

tada5hi commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Superseded — closing as fully redundant.

All 8 non-tar-stream bumps in this group (@types/node, lint-staged, nx, vue, zod, @vue/test-utils, happy-dom, vue-router) are already on master via #1862. tar-stream 3.2.0 → 3.2.1 was the only remaining unique change here, and #1862 deliberately declined that one: it's a types-only release (npm diff shows only package.json + a new index.d.ts, byte-identical runtime) whose bundled types model the package on streamx instead of node:stream, forcing several as unknown as casts — some of them unsound (claiming a streamx stream has isPaused/unpipe/wrap, which it doesn't).

I resolved this branch's merge conflicts against current master to confirm: combining master's #1862 (decline the bump) with #1875 (container-pack directory-mode functionality, merged since this PR opened) yields a tree that is byte-for-byte identical to origin/master. There is nothing left for this PR to contribute.

@tada5hi tada5hi closed this Sep 9, 2026
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