@tscircuit/eval 0.0.268 → 0.0.270
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blob-url.js +1 -1
- package/dist/eval/index.js +3 -2
- package/dist/lib/index.js +3 -2
- package/dist/webworker/entrypoint.js +302 -302
- package/lib/runner/setupDefaultEntrypointIfNeeded.ts +2 -1
- package/package.json +4 -4
- package/tests/example5-event-recording.test.tsx +2 -1
- package/tests/group-wrapper.test.tsx +18 -0
|
@@ -51,7 +51,8 @@ export const setupDefaultEntrypointIfNeeded = (opts: {
|
|
|
51
51
|
const hasTsciImport =
|
|
52
52
|
mainComponentCode.includes("@tsci/") ||
|
|
53
53
|
mainComponentCode.includes('from "@tsci')
|
|
54
|
-
const
|
|
54
|
+
const hasGroup = mainComponentCode.includes("<group")
|
|
55
|
+
const shouldWrapInBoard = !hasExplicitBoard && !hasTsciImport && !hasGroup
|
|
55
56
|
|
|
56
57
|
opts.fsMap[opts.entrypoint] = `
|
|
57
58
|
import * as UserComponents from "./${opts.mainComponentPath}";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/eval",
|
|
3
3
|
"main": "dist/lib/index.js",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.270",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "bun run build:lib && bun run build:webworker && bun run build:blob-url && bun run build:runner && bun run build:worker-wrapper",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@biomejs/biome": "^1.8.3",
|
|
54
54
|
"@playwright/test": "^1.50.1",
|
|
55
55
|
"@tscircuit/capacity-autorouter": "^0.0.100",
|
|
56
|
-
"@tscircuit/core": "^0.0.
|
|
56
|
+
"@tscircuit/core": "^0.0.593",
|
|
57
57
|
"@tscircuit/math-utils": "^0.0.18",
|
|
58
58
|
"@tscircuit/parts-engine": "^0.0.8",
|
|
59
59
|
"@types/babel__standalone": "^7.1.9",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"jscad-fiber": "^0.0.82",
|
|
66
66
|
"react": "^19.1.0",
|
|
67
67
|
"schematic-symbols": "^0.0.180",
|
|
68
|
-
"tsup": "^8.
|
|
68
|
+
"tsup": "^8.2.4",
|
|
69
69
|
"@tscircuit/checks": "^0.0.56",
|
|
70
|
-
"@tscircuit/circuit-json-util": "^0.0.
|
|
70
|
+
"@tscircuit/circuit-json-util": "^0.0.59",
|
|
71
71
|
"@tscircuit/footprinter": "^0.0.204",
|
|
72
72
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
73
73
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { test, expect } from "bun:test"
|
|
2
2
|
import { createCircuitWebWorker } from "lib/index"
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// Skipped for flakiness, re-enable when flakiness is solved
|
|
5
|
+
test.skip("example5-event-recording", async () => {
|
|
5
6
|
const circuitWebWorker = await createCircuitWebWorker({
|
|
6
7
|
webWorkerUrl: new URL("../webworker/entrypoint.ts", import.meta.url),
|
|
7
8
|
})
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { test, expect } from "bun:test"
|
|
2
|
+
import { runTscircuitCode } from "lib/runner"
|
|
3
|
+
|
|
4
|
+
test("group is not wrapped in board", async () => {
|
|
5
|
+
const circuitJson = await runTscircuitCode(`
|
|
6
|
+
export default () => (
|
|
7
|
+
<group name="G2">
|
|
8
|
+
<resistor name="R1" footprint="0402" resistance="10k" />
|
|
9
|
+
<capacitor name="C1" capacitance="10uF" footprint="0603" />
|
|
10
|
+
</group>
|
|
11
|
+
)
|
|
12
|
+
`)
|
|
13
|
+
|
|
14
|
+
const sourceGroups = circuitJson.filter((el) => el.type === "source_group")
|
|
15
|
+
|
|
16
|
+
expect(sourceGroups.length).toBe(1)
|
|
17
|
+
expect(sourceGroups[0].name).toBe("G2")
|
|
18
|
+
})
|