As a stepping stone to ESM support, this should probably work:
pnpm skuba node <my-file.mts>
Error: Transform failed with 1 error:
repo/myfile.ts:3:0: ERROR: Top-level await is currently not supported with the "cjs" output format
at failureErrorWithLog (repo/node_modules/tsx/node_modules/esbuild/lib/main.js:1476:15)
at repo/node_modules/tsx/node_modules/esbuild/lib/main.js:755:50
at responseCallbacks.<computed> (repo/node_modules/tsx/node_modules/esbuild/lib/main.js:622:9)
at handleIncomingPacket (repo/node_modules/tsx/node_modules/esbuild/lib/main.js:677:12)
Meanwhile, running tsx directly is fine (for the same file)
As far as I can tell this is because we're using the wrapper, added back in https://github.com/seek-oss/skuba/pull/341. Not sure the best way to tackle; can we effectively just call tsx {args}?
As a stepping stone to ESM support, this should probably work:
Meanwhile, running
tsx
directly is fine (for the same file)