Skip to content

fix: pin encoding on readdirSync for Node 25 type compatibility#18

Closed
mechtar-ru wants to merge 1 commit intoNickCirv:mainfrom
mechtar-ru:fix-ts-encoding
Closed

fix: pin encoding on readdirSync for Node 25 type compatibility#18
mechtar-ru wants to merge 1 commit intoNickCirv:mainfrom
mechtar-ru:fix-ts-encoding

Conversation

@mechtar-ru
Copy link
Copy Markdown

Summary

Add encoding: "utf-8" to readdirSync calls in ast-miner.ts and real-world.ts to fix TypeScript errors in Node 25:

error TS2322: Type "Dirent<string>[]" is not assignable to type "Dirent<NonSharedBuffer>[]".
error TS2339: Property "startsWith" does not exist on type "NonSharedBuffer".

Changes

  • src/miners/ast-miner.ts:615 — add encoding: "utf-8" to readdirSync
  • bench/real-world.ts:93 — same fix

Same pattern as skills-miner.ts:226-229.

Tests

All 17 ast-miner tests pass.

…ility

Add encoding: 'utf-8' to readdirSync calls to fix TypeScript errors in Node 25:
- Type 'Dirent<string>[]' not assignable to type 'Dirent<NonSharedBuffer>[]'
- Property 'startsWith' does not exist on type 'NonSharedBuffer'

Same pattern as skills-miner.ts:226-229
@mechtar-ru
Copy link
Copy Markdown
Author

Closing duplicate - fix already merged in PR #6

@mechtar-ru mechtar-ru closed this Apr 25, 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.

1 participant