tutuca 0.9.113 → 0.9.114

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tutuca",
3
- "version": "0.9.113",
3
+ "version": "0.9.114",
4
4
  "type": "module",
5
5
  "description": "SPA framework with immutable state and virtual DOM; dependency-free browser bundle",
6
6
  "main": "./dist/tutuca.js",
@@ -24,27 +24,28 @@
24
24
  },
25
25
  "scripts": {
26
26
  "clean": "rm -rf dist skill",
27
- "dist": "bun scripts/dist.js",
28
- "dist-ext": "bun scripts/dist-ext.js",
29
- "dist-immutable": "bun scripts/dist-immutable.js",
30
- "dist-all": "bun run dist-immutable && bun run dist && bun run dist-ext && bun run smoke",
27
+ "dist": "node scripts/dist.js",
28
+ "dist-ext": "node scripts/dist-ext.js",
29
+ "dist-immutable": "node scripts/dist-immutable.js",
30
+ "dist-all": "npm run dist-immutable && npm run dist && npm run dist-ext && npm run smoke",
31
31
  "smoke": "node scripts/smoke.js",
32
- "release": "bun run dist-all && bun run sync-docs-storybook && bun run build-skill && (npm publish --access public; bun run clean-skill)",
33
- "release-dry": "bun run dist-all && bun run sync-docs-storybook && bun run build-skill && (npm publish --dry-run; bun run clean-skill)",
34
- "sync-docs-storybook": "bun scripts/sync-docs-storybook.js",
35
- "build-skill": "bun scripts/build-skill.js",
32
+ "release": "npm run dist-all && npm run sync-docs-storybook && npm run build-skill && (npm publish --access public; npm run clean-skill)",
33
+ "release-dry": "npm run dist-all && npm run sync-docs-storybook && npm run build-skill && (npm publish --dry-run; npm run clean-skill)",
34
+ "sync-docs-storybook": "node scripts/sync-docs-storybook.js",
35
+ "build-skill": "node scripts/build-skill.js",
36
36
  "clean-skill": "rm -rf skill",
37
- "test": "bun run dist && bun run dist-ext && bun test test/*.test.js",
38
- "test-watch": "bun test --watch test/*.test.js",
39
- "format": "bunx @biomejs/biome format --write",
40
- "lint": "bunx @biomejs/biome lint",
41
- "lint-fix": "bunx @biomejs/biome lint --write",
42
- "fix": "bunx @biomejs/biome check --write",
43
- "tutuca": "bun tools/tutuca.js",
44
- "storybook": "bun scripts/serve-storybook.js",
45
- "storybook:examples": "bun scripts/storybook-examples.js",
46
- "stresstest": "bun scripts/stresstest.js",
47
- "smoke-test": "bun tools/tutuca.js lint ./test/todo.js && bun tools/tutuca.js render ./test/todo.js && bun tools/tutuca.js test ./test/todo.js && bun tools/tutuca.js lint ./test/json.js && bun tools/tutuca.js render ./test/json.js"
37
+ "pretest": "npm run dist && npm run dist-ext",
38
+ "test": "vitest run",
39
+ "test-watch": "vitest",
40
+ "format": "biome format --write",
41
+ "lint": "biome lint",
42
+ "lint-fix": "biome lint --write",
43
+ "fix": "biome check --write",
44
+ "tutuca": "node tools/tutuca.js",
45
+ "storybook": "node scripts/serve-storybook.js",
46
+ "storybook:examples": "node scripts/storybook-examples.js",
47
+ "stresstest": "node scripts/stresstest.js",
48
+ "smoke-test": "node tools/tutuca.js lint ./test/todo.js && node tools/tutuca.js render ./test/todo.js && node tools/tutuca.js test ./test/todo.js && node tools/tutuca.js lint ./test/json.js && node tools/tutuca.js render ./test/json.js"
48
49
  },
49
50
  "sideEffects": [
50
51
  "./deps/chai.js"
@@ -92,7 +93,9 @@
92
93
  "devDependencies": {
93
94
  "@biomejs/biome": "^2.5.1",
94
95
  "chai": "^6.2.2",
96
+ "esbuild": "^0.28.1",
95
97
  "fast-check": "^4.8.0",
96
- "htmlparser2": "^12.0.0"
98
+ "htmlparser2": "^12.0.0",
99
+ "vitest": "^4.1.10"
97
100
  }
98
101
  }
@@ -20,7 +20,7 @@ npm i -g tutuca
20
20
  tutuca <command> <module-path> [name] [flags]
21
21
 
22
22
  # from a checkout of this repo
23
- bun tools/tutuca.js <command> <module-path> [name] [flags]
23
+ node tools/tutuca.js <command> <module-path> [name] [flags]
24
24
  ```
25
25
 
26
26
  The command comes **first**, the module path second, an optional component
@@ -30,7 +30,8 @@ export function getTests({ describe, test, expect }) {
30
30
  (`expect.objectContaining`, `toHaveBeenCalled…`, `toMatchSnapshot`) are
31
31
  **not** available — tutuca has no mocking layer.
32
32
  - `test` and `describe` are **Tutuca's own** subset of the common
33
- Mocha/Bun-style API, injected by `tutuca test` — not Bun's built-ins.
33
+ Mocha/Jest-style API, injected by `tutuca test` — they are not imported
34
+ from a test runner, so don't reach for one's extras.
34
35
  Available calls: `describe(title, fn)`, `describe(Component, fn)`,
35
36
  `describe(title, { component }, fn)`, and `test(title, fn)`. There is
36
37
  no `before` / `after` / `beforeEach` / `it` / skip-flag — don't reach
@@ -183,9 +184,9 @@ const r = collectIterBindings(MyComp, c, c.items, {
183
184
  `MyComp.make({ field: ... })` so handlers that read `this.field` see
184
185
  the value you want.
185
186
  - The redirect uses Node's `module.register`, which is how the `tutuca`
186
- bin runs. Under a Bun-driven CLI it degrades to the no-op stub — if you
187
- see `collectIterBindings` return `[]`, import it from `tutuca/dev`
188
- explicitly.
187
+ bin runs. On a runtime without loader-hook support it degrades to the
188
+ no-op stub — if you see `collectIterBindings` return `[]`, import it
189
+ from `tutuca/dev` explicitly.
189
190
 
190
191
  Example:
191
192