refactor: migrate generate-verified-behaviors to Bun-native APIs; remove stale @deprecated#390
Conversation
…APIs Replace node:fs/promises file I/O with Bun.file().text(), .json(), .exists(), and Bun.write() per AGENTS.md guidance. Retain named imports for readdir/mkdir which have no simpler Bun equivalent. https://claude.ai/code/session_01VXbxD98AzZ8pLfN2JmBeuE
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR removes a deprecated JSDoc comment from utilities and migrates a build script from Node's ChangesCleanup
Bun Filesystem API Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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. Comment |
|
Actionable comments posted: 0 |
There was a problem hiding this comment.
Pull request overview
This PR modernizes the verified-behaviors generation script to use Bun-native file APIs where practical and removes an inaccurate deprecation marker from a public utility that is still in use.
Changes:
- Replaced several
node:fs/promisesfile operations withBun.file()andBun.write(). - Kept
readdir/mkdirimports where there is no simpler Bun-native equivalent. - Removed stale
@deprecated Function is unusedJSDoc fromclonePlainObjectDeep.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tko.io/scripts/generate-verified-behaviors.mjs |
Migrates file reads, existence checks, and writes to Bun-native APIs while preserving directory operations. |
packages/utils/src/object.ts |
Removes incorrect deprecation documentation from an exported, used utility function. |
Summary
tko.io/scripts/generate-verified-behaviors.mjsimportednode:fs/promisesfor all file I/O. Replaced with Bun-nativeBun.file().text(),.json(),.exists(), andBun.write()per the AGENTS.md directive ("prefer native Bun APIs overnode:fs").readdirandmkdirretain named imports — no simpler Bun equivalent for directory listing withwithFileTypes.@deprecated Function is unusedJSDoc fromclonePlainObjectDeepinpackages/utils/src/object.ts. The function is actively used atpackages/utils.parser/src/Parser.ts:822and is part of the public@tko/utilsAPI viaexport * from './object'.Test plan
bun run buildintko.io/— exercises the script as part ofprebuildbunx tsc— verify no type regressions from the JSDoc removalhttps://claude.ai/code/session_01VXbxD98AzZ8pLfN2JmBeuE
Generated by Claude Code
Summary by CodeRabbit