opencode/packages/opencode
Dax Raad 3c21735b35 refactor: migrate from Bun.Glob to npm glob package
Replace Bun.Glob usage with a new Glob utility wrapper around the npm 'glob' package.
This moves us off Bun-specific APIs toward standard Node.js compatible solutions.

Changes:
- Add new src/util/glob.ts utility module with scan(), scanSync(), and match()
- Default include option is 'file' (only returns files, not directories)
- Add symlink option (default: false) to control symlink following
- Migrate all 12 files using Bun.Glob to use the new Glob utility
- Add comprehensive tests for the glob utility

Breaking changes:
- Removed support for include: 'dir' option (use include: 'all' and filter manually)
- symlink now defaults to false (was true in most Bun.Glob usages)

Files migrated:
- src/util/log.ts
- src/util/filesystem.ts
- src/tool/truncation.ts
- src/session/instruction.ts
- src/storage/json-migration.ts
- src/storage/storage.ts
- src/project/project.ts
- src/cli/cmd/tui/context/theme.tsx
- src/config/config.ts
- src/tool/registry.ts
- src/skill/skill.ts
- src/file/ignore.ts
2026-02-19 12:34:18 -05:00
..
bin fix: baseline CPU detection (#13371) 2026-02-13 07:50:43 +10:00
migration chore: generate 2026-02-14 04:19:48 +00:00
script sqlite again (#10597) 2026-02-14 04:19:02 +00:00
src refactor: migrate from Bun.Glob to npm glob package 2026-02-19 12:34:18 -05:00
test refactor: migrate from Bun.Glob to npm glob package 2026-02-19 12:34:18 -05:00
.gitignore get rid of models.dev macro 2026-01-24 12:27:13 -05:00
AGENTS.md sqlite again (#10597) 2026-02-14 04:19:02 +00:00
Dockerfile add ARM64 Docker image support (#5483) 2025-12-13 13:01:59 -06:00
README.md sync 2025-05-30 20:48:36 -04:00
bunfig.toml fix(test): move timeout config to CLI flag (#13494) 2026-02-13 10:20:02 -05:00
drizzle.config.ts sqlite again (#10597) 2026-02-14 04:19:02 +00:00
package.json refactor: migrate from Bun.Glob to npm glob package 2026-02-19 12:34:18 -05:00
parsers-config.ts fix(opencode): fix Clojure syntax highlighting (#13453) 2026-02-18 00:18:18 -06:00
sst-env.d.ts zen: update sst version 2026-02-18 13:54:23 -05:00
tsconfig.json try tsgo 2025-10-14 18:30:32 -04:00

README.md

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.