diff --git a/.github/workflows/bun-library-consumption.yml b/.github/workflows/bun-library-consumption.yml new file mode 100644 index 000000000..08d28f974 --- /dev/null +++ b/.github/workflows/bun-library-consumption.yml @@ -0,0 +1,62 @@ +name: Bun Library Consumption Test + +on: + pull_request: + +jobs: + # This library consumption smoke test + # tests direct API use case + # rather than standalone or iframe consumption + library-consumption: + runs-on: ubuntu-latest + if: "${{ github.event_name != 'pull_request' || github.event.pull_request.title != 'chore: bump version' }}" + timeout-minutes: 10 + + steps: + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Build package + run: bun run build + + - name: Pack package + run: bun pm pack + + - name: Test library consumption in blank Vite app + run: | + cd /tmp + bun create vite test-app --template react-ts --no-install --no-interactive + cd test-app + bun install + bun add ${{ github.workspace }}/tscircuit-runframe-*.tgz + + cat > src/App.tsx <<'EOF' + import { RunFrame } from "@tscircuit/runframe/runner" + import { CircuitJsonPreview } from "@tscircuit/runframe/preview" + + function App() { + return ( +
+ )" }} + entrypoint="main.tsx" + /> + +
+ ) + } + + export default App + EOF + + bun run build + bunx tsc --noEmit diff --git a/bun.lock b/bun.lock index 74912f82e..0a2c06824 100644 --- a/bun.lock +++ b/bun.lock @@ -5,7 +5,7 @@ "": { "name": "@tscircuit/runframe", "dependencies": { - "@tscircuit/eval": "^0.0.1082", + "@tscircuit/eval": "^0.0.1085", "@tscircuit/solver-utils": "^0.0.7", }, "devDependencies": { @@ -558,7 +558,7 @@ "@tscircuit/create-snippet-url": ["@tscircuit/create-snippet-url@0.0.9", "", { "dependencies": { "fflate": "^0.8.2" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-CI+PDOy28Q9pycIyjx0vLpnh6wuyocYPMAJqhr/uAbOBBdY3sz3zTWHvdy7giqTGo0+v5x0nhN6o60RT82grZA=="], - "@tscircuit/eval": ["@tscircuit/eval@0.0.1082", "", { "peerDependencies": { "@tscircuit/core": "*", "circuit-json": "*", "typescript": "^5.0.0", "zod": "3" } }, "sha512-9pTKIbXy0w7rLevZrvQaK1ZJHA4zhDBuxzu/Bc10kLN9/wGZegrl4rg9rlbgQhuPswfaoKen3pTvro4LlpBkLQ=="], + "@tscircuit/eval": ["@tscircuit/eval@0.0.1085", "", { "peerDependencies": { "@tscircuit/core": "*", "circuit-json": "*", "typescript": "^5.0.0", "zod": "3" } }, "sha512-ym3QtSNxS3Hu9ydmqZb0JgUERC3OhMuZV9Ohgw2gvF6ZaatsuD+pHXt8Ovc+rpz5FlrG29sTVVQINpfboqF9/Q=="], "@tscircuit/fake-snippets": ["@tscircuit/fake-snippets@0.0.163", "", {}, "sha512-E/ZvC5CRfgG/Q6776ovR4oZuLgXbSxpvffminIwpTE1axg+vrNdOz2RzGBHbZCIcDUhs4etmB85kAizuiNJSBw=="], diff --git a/package.json b/package.json index a5eebf80f..1b3ab4b41 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@tscircuit/runframe", "main": "dist/preview.js", "type": "module", - "version": "0.0.2300", + "version": "0.0.2303", "exports": { ".": "./dist/preview.js", "./preview": "./dist/preview.js", @@ -76,7 +76,6 @@ "comlink": "^4.4.2", "concurrently": "^9.1.2", "cssnano": "^7.0.6", - "debug": "^4.4.0", "easyeda": "^0.0.275", "fflate": "^0.8.2", "fuse.js": "^7.1.0", @@ -114,7 +113,8 @@ "yargs": "^17.7.2" }, "dependencies": { - "@tscircuit/eval": "^0.0.1082", - "@tscircuit/solver-utils": "^0.0.7" + "@tscircuit/eval": "^0.0.1085", + "@tscircuit/solver-utils": "^0.0.7", + "debug": "^4.4.0" } }