Skip to content

Return the new offset from File.seek - #7076

Merged
tim-smart merged 2 commits into
mainfrom
agent/codex-engineer/f38705e6
Aug 5, 2026
Merged

Return the new offset from File.seek#7076
tim-smart merged 2 commits into
mainfrom
agent/codex-engineer/f38705e6

Conversation

@tim-smart

Copy link
Copy Markdown
Contributor

Summary

  • change File.seek to return the new offset as a branded Size
  • keep the Node/Bun and Deno implementations aligned with the public contract
  • update the File example implementation for the new return type

Node and Bun use the shared Node file-system implementation. The browser package does not provide a file-system implementation.

Validation

  • pnpm check
  • pnpm lint
  • pnpm vitest run --project @effect/platform-node-shared (106 tests)
  • deno task test --run --project @effect/platform-deno (197 passed, 11 skipped)
  • pnpm doctest packages/effect/src/FileSystem.ts (16 tests)

Closes EFF-475

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8ec9170

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
effect Major
@effect/platform-node-shared Major
@effect/platform-deno Major
@effect/opentelemetry Major
@effect/platform-browser Major
@effect/platform-bun Major
@effect/platform-node Major
@effect/vitest Major
@effect/ai-anthropic Major
@effect/ai-openai-compat Major
@effect/ai-openai Major
@effect/ai-openrouter Major
@effect/atom-react Major
@effect/atom-solid Major
@effect/atom-vue Major
@effect/sql-clickhouse Major
@effect/sql-d1 Major
@effect/sql-libsql Major
@effect/sql-mssql Major
@effect/sql-mysql2 Major
@effect/sql-pg Major
@effect/sql-pglite Major
@effect/sql-sqlite-bun Major
@effect/sql-sqlite-do Major
@effect/sql-sqlite-node Major
@effect/sql-sqlite-react-native Major
@effect/sql-sqlite-wasm Major
@effect/doctest Major
@effect/openapi-generator Major
@effect/docgen Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tim-smart
tim-smart enabled auto-merge (squash) August 5, 2026 22:29

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

This PR changes the public FileSystem.File.seek contract so it returns the new cursor offset as a branded Size, aligning the type signature with what the Node/Bun shared and Deno implementations were already computing.

  • packages/effect/src/FileSystem.ts: updated File.seek return type from Effect.Effect<void> to Effect.Effect<Size> and updated the example implementation.
  • packages/platform-node-shared/src/NodeFileSystem.ts: FileImpl.seek now returns FileSystem.Size(this.position).
  • packages/platform-deno/src/DenoFileSystem.ts: FileImpl.seek now returns FileSystem.Size(this.position).
  • .changeset/fresh-files-seek.md: added minor changeset entries for effect, @effect/platform-node-shared, and @effect/platform-deno.

Validation run: pnpm check, pnpm lint, pnpm --filter @effect/platform-node-shared test --run, and pnpm doctest --run packages/effect/src/FileSystem.ts all pass.

Pullfrog  | ⚠️ this action is pinned to a commit SHA, which freezes the cleanup step — switch to @v0 or keep the SHA fresh with Dependabot | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) | 𝕏

@tim-smart
tim-smart merged commit 0f721d4 into main Aug 5, 2026
18 of 19 checks passed
@tim-smart
tim-smart deleted the agent/codex-engineer/f38705e6 branch August 5, 2026 22:56
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
basic.ts 7.06 KB 7.06 KB 0.00 KB (0.00%)
batching.ts 9.86 KB 9.86 KB 0.00 KB (0.00%)
brand.ts 6.34 KB 6.34 KB 0.00 KB (0.00%)
cache.ts 10.71 KB 10.71 KB 0.00 KB (0.00%)
config.ts 20.73 KB 20.73 KB 0.00 KB (0.00%)
differ.ts 20.31 KB 20.31 KB 0.00 KB (0.00%)
http-client.ts 21.53 KB 21.53 KB 0.00 KB (0.00%)
logger.ts 10.84 KB 10.84 KB 0.00 KB (0.00%)
metric.ts 8.98 KB 8.98 KB 0.00 KB (0.00%)
optic.ts 7.18 KB 7.18 KB 0.00 KB (0.00%)
pubsub.ts 14.99 KB 14.99 KB 0.00 KB (0.00%)
queue.ts 11.66 KB 11.66 KB 0.00 KB (0.00%)
schedule.ts 10.83 KB 10.83 KB 0.00 KB (0.00%)
schema-class.ts 19.27 KB 19.27 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 29.09 KB 29.09 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 25.40 KB 25.40 KB 0.00 KB (0.00%)
schema-string-transformation.ts 13.42 KB 13.42 KB 0.00 KB (0.00%)
schema-string.ts 10.95 KB 10.95 KB 0.00 KB (0.00%)
schema-template-literal.ts 15.21 KB 15.21 KB 0.00 KB (0.00%)
schema-toArbitraryLazy.ts 22.02 KB 22.02 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 24.45 KB 24.45 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 19.28 KB 19.28 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 19.11 KB 19.11 KB 0.00 KB (0.00%)
schema-toFormatter.ts 18.97 KB 18.97 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 22.69 KB 22.69 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 19.60 KB 19.60 KB 0.00 KB (0.00%)
schema.ts 18.52 KB 18.52 KB 0.00 KB (0.00%)
stm.ts 12.63 KB 12.63 KB 0.00 KB (0.00%)
stream.ts 9.80 KB 9.80 KB 0.00 KB (0.00%)

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