tjs-lang 0.9.0 → 0.9.1
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/CLAUDE.md +7 -1
- package/dist/index.js +111 -107
- package/dist/index.js.map +3 -3
- package/dist/src/lang/emitters/js-wasm.d.ts +2 -0
- package/dist/src/lang/parser-types.d.ts +7 -0
- package/dist/tjs-browser-from-ts.js +1 -1
- package/dist/tjs-browser-from-ts.js.map +1 -1
- package/dist/tjs-browser.js +93 -89
- package/dist/tjs-browser.js.map +3 -3
- package/dist/tjs-eval.js +14 -14
- package/dist/tjs-eval.js.map +2 -2
- package/dist/tjs-from-ts.js +1 -1
- package/dist/tjs-from-ts.js.map +1 -1
- package/dist/tjs-lang.js +94 -90
- package/dist/tjs-lang.js.map +3 -3
- package/dist/tjs-runtime.js +1 -1
- package/dist/tjs-runtime.js.map +1 -1
- package/dist/tjs-vm.js +2 -2
- package/dist/tjs-vm.js.map +2 -2
- package/docs/type-system-north-star.md +100 -0
- package/package.json +1 -1
- package/src/lang/emitters/js-wasm.ts +8 -4
- package/src/lang/emitters/js.ts +36 -11
- package/src/lang/parser-transforms.ts +4 -1
- package/src/lang/parser-types.ts +7 -0
- package/src/lang/parser.ts +9 -1
- package/src/lang/predicate-report.test.ts +24 -0
- package/src/lang/wasm-fallback-warning.test.ts +50 -0
- package/src/lang/wasm-intdiv-lint.test.ts +45 -0
- package/src/lang/wasm-ready.test.ts +94 -0
- package/src/lang/wasm-simd-ops.test.ts +84 -0
- package/src/lang/wasm.ts +61 -2
package/CLAUDE.md
CHANGED
|
@@ -21,6 +21,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
21
21
|
bun run format # ESLint fix + Prettier
|
|
22
22
|
bun run test:fast # Core tests (skips LLM & benchmarks)
|
|
23
23
|
bun run make # Full build (clean, format, grammars, editors, tsc, esbuild)
|
|
24
|
+
# Named `make`, NOT `build`, on purpose: `bun build` is a Bun
|
|
25
|
+
# builtin (the bundler). If a `build` script existed, `bun build`
|
|
26
|
+
# would silently run the builtin instead of the script while
|
|
27
|
+
# `bun run build` ran the script — an ever-present footgun where
|
|
28
|
+
# the two commands diverge. Don't add a `build` script.
|
|
24
29
|
bun run build:editors # Bundle editors/{codemirror,monaco,ace}/*.ts → published *.js
|
|
25
30
|
bun run dev # Development server with file watcher
|
|
26
31
|
bun run start # Build demo + start dev server
|
|
@@ -516,7 +521,8 @@ The CLI (`bun src/cli/tjs.ts run`) does NOT inject the test-block `expect` harne
|
|
|
516
521
|
|
|
517
522
|
### Additional Documentation
|
|
518
523
|
|
|
519
|
-
- `PRINCIPLES.md` — **non-negotiable language invariants**: options-off TJS ⊇ JS, and TJS ⊇ AJS. A richer layer may do _more_ with the same source but must never make subset-legal code _illegal_ (e.g. un-runnable signature tests are inconclusive, not errors). Read before changing parser/transpiler acceptance or signature-test behavior; a subset violation is a bug.
|
|
524
|
+
- `PRINCIPLES.md` — **non-negotiable language invariants**: options-off TJS ⊇ JS, and TJS ⊇ AJS. A richer layer may do _more_ with the same source but must never make subset-legal code _illegal_ (e.g. un-runnable signature tests are inconclusive, not errors). Read before changing parser/transpiler acceptance or signature-test behavior; a subset violation is a bug. Also carries the **type-system north star** (JSON-Schema + `$predicate` as the single source of truth for types — a decision lens).
|
|
525
|
+
- `docs/type-system-north-star.md` — the north-star design note: JSON-Schema + `$predicate` as the canonical type representation; the decision lens ("closer to or further from?"); and the small portable predicate-VM (serialized-AST, cross-language) that unlocks it. Strategic (possibly post-1.0).
|
|
520
526
|
- `llms.txt` — agent-facing navigation index (ships in npm bundle); points to docs and source entry points
|
|
521
527
|
- `guides/footguns.md` — JS footguns TJS fixes (boxed-primitive truthiness, `==` coercion, `typeof null`, uninitialized `let`, etc.). Demo: `examples/js-footguns-fixed.tjs`.
|
|
522
528
|
- `guides/playground-imports.md` — how the playground/dev-server resolves bare imports: TFS service worker, default JSDelivr `/+esm` routing, esm.sh allowlist for peer-dep packages (React), CDN hints (`jsdelivr/`, `esmsh/`, `unpkg/`, `github/`), and full-URL passthrough.
|