Skip to content

Add FileSystem.lstat support - #6428

Draft
coyaSONG wants to merge 1 commit into
Effect-TS:mainfrom
coyaSONG:agent/add-filesystem-lstat
Draft

Add FileSystem.lstat support#6428
coyaSONG wants to merge 1 commit into
Effect-TS:mainfrom
coyaSONG:agent/add-filesystem-lstat

Conversation

@coyaSONG

Copy link
Copy Markdown
Contributor

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Add FileSystem.lstat so callers can inspect a path without following symbolic links. The shared Node-compatible implementation delegates to node:fs.lstat, reuses the existing File.Info conversion, and is available to both the Node and Bun platform layers.

FileSystem.stat follows a symbolic link and reports information about its target, so Effect callers currently have to leave the portable FileSystem service to distinguish a link from a file or directory. The regression creates a file and symbolic link, verifies that stat reports the target as a file, and verifies that lstat reports the link as SymbolicLink.

The change also adds the corresponding no-op test implementation and a patch changeset for effect and @effect/platform-node-shared.

OpenAI Codex assisted with the implementation and command execution. No human review is claimed.

Validation:

  • Red-first corepack pnpm test packages/platform-node-shared/test/NodeFileSystem.test.ts failed only because fs.lstat was absent; the final focused suite passes 10/10.
  • corepack pnpm lint-fix
  • corepack pnpm check
  • git diff --check

Related

@github-project-automation github-project-automation Bot moved this to Discussion Ongoing in PR Backlog Jul 16, 2026
@IMax153 IMax153 added the 4.0 label Jul 16, 2026
@tim-smart tim-smart added the enhancement New feature or request label Jul 23, 2026 — with ChatGPT Codex Connector
@github-actions

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 6.58 KB 6.63 KB -0.05 KB (-0.74%)
batching.ts 9.18 KB 9.42 KB -0.24 KB (-2.56%)
brand.ts 6.14 KB 6.31 KB -0.17 KB (-2.69%)
cache.ts 9.83 KB 10.12 KB -0.29 KB (-2.88%)
config.ts 18.79 KB 20.04 KB -1.25 KB (-6.25%)
differ.ts 17.01 KB 19.93 KB -2.92 KB (-14.64%)
http-client.ts 20.49 KB 20.97 KB -0.48 KB (-2.28%)
logger.ts 10.17 KB 10.28 KB -0.11 KB (-1.08%)
metric.ts 8.42 KB 8.55 KB -0.13 KB (-1.54%)
optic.ts 7.35 KB 7.33 KB +0.03 KB (+0.34%)
pubsub.ts 14.00 KB 14.26 KB -0.26 KB (-1.80%)
queue.ts 11.01 KB 11.09 KB -0.08 KB (-0.72%)
schedule.ts 10.21 KB 10.27 KB -0.06 KB (-0.57%)
schema-class.ts 17.85 KB 18.86 KB -1.01 KB (-5.38%)
schema-fromJsonSchemaDocument.ts 4.06 KB 28.67 KB -24.61 KB (-85.83%)
schema-representation-roundtrip.ts 27.23 KB 24.99 KB +2.25 KB (+9.00%)
schema-string-transformation.ts 12.52 KB 12.95 KB -0.43 KB (-3.29%)
schema-string.ts 10.19 KB 10.65 KB -0.46 KB (-4.29%)
schema-template-literal.ts 14.18 KB 14.85 KB -0.67 KB (-4.54%)
schema-toArbitraryLazy.ts 20.64 KB 21.66 KB -1.01 KB (-4.69%)
schema-toCodeDocument.ts 21.22 KB 24.08 KB -2.86 KB (-11.86%)
schema-toCodecJson.ts 17.82 KB 18.91 KB -1.08 KB (-5.74%)
schema-toEquivalence.ts 17.70 KB 18.73 KB -1.02 KB (-5.46%)
schema-toFormatter.ts 17.55 KB 18.59 KB -1.04 KB (-5.59%)
schema-toJsonSchemaDocument.ts 20.11 KB 22.33 KB -2.22 KB (-9.93%)
schema-toRepresentation.ts 18.08 KB 19.25 KB -1.17 KB (-6.06%)
schema.ts 17.13 KB 18.12 KB -0.99 KB (-5.47%)
stm.ts 11.93 KB 12.05 KB -0.12 KB (-1.00%)
stream.ts 9.20 KB 9.37 KB -0.16 KB (-1.73%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0 enhancement New feature or request

Projects

Status: Discussion Ongoing

Development

Successfully merging this pull request may close these issues.

Add FileSystem.lstat for symlink aware path inspection (node:fs/promises.lstat,)

3 participants