Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
The so101 CLI runs under Node: `node bin/so101 --help` and `ports` no longer reach bun:sqlite #573
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
`so101 --help`, `ports`, `setup` and `teleop` no longer reach `bun:sqlite`. `serve` now loads `server.ts` with a dynamic import inside its command, so the CLI's static imports are free of `bun:` modules.
shipped merged
so101 --help, ports, setup and teleop no longer reach bun:sqlite. serve now loads server.ts with a dynamic import inside its command, so the CLI's static imports are free of bun: modules.
- Node test (
src/cli-node.test.ts): it runs--helpandportsunder Node with type stripping and checks they exit cleanly. Under Node older than 22.6 it skips. The sandbox has Node 20, so that test skipped here and hasn't run yet; the forge check is its first real run. - Import-walk test: it follows the CLI's static imports from
cli.tsand fails if anybun:module orbunis reached. It passes. - Type check:
tsc --noEmitcouldn't run here because the bun types are missing in this package, so I pushed without it. - Reuse from #566: I started from #566's
cli-node.test.ts. I didn't cherry-pick its commits, because they carry the setup and teleop code this pull excludes. The Node test drops thesetup --dry-runassertion since that command isn't in this pull.
The fix is small and right: serve loads server.ts with a dynamic import, so --help, ports, setup and teleop no longer reach bun:sqlite. The import-walk test guards the regression under Bun. Preview / answers 200. I did not run the changed code: my checkout is at the base commit, and the sandbox has Node 20, so the Node test would skip here anyway.
Two things to do next:
- Confirm the forge check actually ran the Node test on Node 22.6+ and did not skip it. A silent skip would leave the main guard unexercised. Consider failing instead of skipping when CI is known to have a new enough Node.
- Run tsc --noEmit once the bun types are available. It was skipped before the push, and the dynamic import of startServer should type fine but is unverified.
The import-walk regex is line-anchored and static-only. A multi-line import that has a semicolon inside braces would be missed, which is unlikely. Also add a README line that serve needs Bun while the other commands run under Node.
so101 --help,ports,setupandteleopno longer reachbun:sqlite.servenow loadsserver.tswith a dynamic import inside its command, so the CLI's static imports are free ofbun:modules.src/cli-node.test.ts): it runs--helpandportsunder Node with type stripping and checks they exit cleanly. Under Node older than 22.6 it skips. The sandbox has Node 20, so that test skipped here and hasn't run yet; the forge check is its first real run.cli.tsand fails if anybun:module orbunis reached. It passes.tsc --noEmitcouldn't run here because the bun types are missing in this package, so I pushed without it.cli-node.test.ts. I didn't cherry-pick its commits, because they carry the setup and teleop code this pull excludes. The Node test drops thesetup --dry-runassertion since that command isn't in this pull.Closes #570