core: prevent UI imports compiling TSX source

This commit is contained in:
vimtor 2026-06-26 10:24:43 +02:00
commit eeb5b1d8bc
No known key found for this signature in database
4 changed files with 58 additions and 2 deletions

View file

@ -4,6 +4,7 @@ import { Script } from "@opencode-ai/script"
import { $ } from "bun"
import { rm } from "node:fs/promises"
import { fileURLToPath } from "node:url"
import { pack } from "./pack"
process.chdir(fileURLToPath(new URL("..", import.meta.url)))
@ -18,8 +19,7 @@ if ((await $`npm view ${pkg.name}@${pkg.version} version`.nothrow()).exitCode ==
try {
await $`bun run typecheck`
await $`bun run test`
await rm(tarball, { force: true })
await $`bun pm pack`
await pack()
await $`npm publish ${tarball} --access public --tag ${Script.channel}`
} finally {
await rm(tarball, { force: true })