You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: sync docs JS output from compiled examples (#1255)
* refactor: make test-examples importable
* fix: restore test examples output
* fix: make temp examples build writable
* fix: handle spaced temp paths in test examples
* feat: warn on stale JS output blocks
* fix: limit JS output sync to example blocks
Restrict CodeTab JS-output pairing to explicit res example fences so plain res snippets are not treated as runnable examples.
Add a focused regression test for the pairing scanner and keep the design and implementation notes with the branch.
* docs: add test examples update mode design
Describe the line-oriented --update workflow for JS Output blocks in CodeTab examples.
Document missing-fence insertion, single-label CodeTab upgrades, and README updates.
* feat: add test examples update mode
Implement --update in scripts/test-examples.mjs so JS Output fences can be refreshed, filled, or inserted for eligible CodeTab examples.
Add integration coverage for stale, empty, and missing JS fences plus single-label and multi-label CodeTab behavior, and document the new command in the README.
* fix: improve test examples compiler handling
Invoke the local ReScript CLI directly instead of shelling through npm for each docs example build.
Format compiler failures as cleaned ReScript errors with markdown file locations and add regression coverage for both behaviors.
* docs: update generated JS output examples
Commit the updated manual MDX files produced by the JS Output sync flow.
This commit includes only the tracked docs example updates and leaves unrelated code and untracked files out.
* docs: explain optimized JS output examples
Clarify where ReScript precomputes pure expressions in the function, let-binding, and primitive-types docs.
Also update the multi-argument function example to bind the computed result so the generated JS output matches the explanation.
* more updates to improve example docs
* fix: emit ESM JS output examples
Configure the temp docs example project to compile with the repo's esmodule package spec and update the sync tests accordingly.
Refresh the generated manual and React MDX JS Output blocks from CommonJS exports to ESM export syntax.
* fix: refresh docs example output workflow
Stop warning on stale JS output during read-only checks and keep --update as the rewrite path.
Refresh generated JS output across the docs and rename colliding example-local types so the example checker passes again.
* remove docs
* docs: add ReScript CodeTab expansion design
* add exports.root
* docs: refine ReScript CodeTab expansion design
* docs: revise ReScript fence checking design
* docs: add default res fence migration plan
* test: capture default res fence behavior
* test: strengthen default res fence tests
* test: tighten nocheck and ts output assertions
* test: align codetab fixtures with new res contract
* test: fix ts output skip assertion
* test: prove nocheck fences are excluded from parse output
* test: relax brittle res fence assertions
* test: prove plain res discovery without preludes
* feat: check plain res fences by default
* fix: handle checked res codetabs
* docs: migrate example fences to checked res
Replace res example fences with plain res across the manual and React docs.
Update the authoring guidance in README.md and AGENTS.md to describe the new default checked fence contract.
* docs: migrate runnable examples to checked res fences
Convert the remaining documentation examples from example-only fences to the new default checked res flow.
Add nocheck and sig markers where examples are intentionally non-runnable, then refresh JS output with the updated checker.
* remove commited plans
* test: cover JSX preserved output codetabs
* feat: add JSX preserved output codetabs
* fix: rename generated example module
Rename the temp example source from _tempFile to Example so derived JS output no longer leaks the temp filename.
Refresh the JSX preserved-output docs that are in scope for the new three-tab ReScript CodeTab flow.
* update gitignore
0 commit comments