Release camelCase contract surface for 0.12.0 - #2
Merged
Conversation
The exports map now declares a `require` condition alongside `import`, both pointing at the same ES module. CommonJS consumers were failing at resolution rather than loading — `import` is not a condition `require()` matches — so no second build is needed, the tarball is unchanged in size, and there is no dual-package hazard. Refs #1. docs.json moves to schema 2.0.0, so a consumer holding only the payload can find the surface that serves it: - `package` states the runtime facts an agent previously had to infer (type, engines, root export is metadata-only, algorithms are subpath-only) and names the machine surface: /llms.txt, /version.json, /reference/payload.json, and the per-domain and per-topic route patterns. Every route was requested against the live site before being written down. - `archetypes` is new — the five input shapes as data, with derived counts, the canonical input type, a minimal payload that executes, and the validator to run at the boundary. - `domains[].slug` is new, so a domain's URL no longer has to be rediscovered by finding one of its topics and splitting the path. - per-topic `languages` becomes `catalogLanguages`, read from the catalog's implementations/ directories instead of hard-coded. The package ships TypeScript alone and now says so once, as `package.languages`. The generator also refuses to emit a payload whose own structure is inconsistent, and takes --strict-contracts to refuse one where a topic has no api: block at all. CHANGELOG.md records the 0.12.0 migration: 23 snake_case entry points renamed to camelCase, and 110 sibling re-exports removed across 28 subpaths. Both tables are generated by diffing the published 0.11.0 payload, and the file now ships inside the tarball. CI gains the contract-coverage gate and a CommonJS smoke test of the packed tarball alongside the existing ESM one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Everything for the 0.12.0 release, in two commits.
No algorithms were added or removed: 324 topics before, 324 after. What changes
is the surface in front of them.
Breaking
bollinger_bands→bollingerBands,true_range→trueRange,double_top→doubleTop, …)..../momentum/rsinolonger re-exports
williamsR,connorsRsi,stochasticRsiorultimateOscillator— a subpath is one function, and the symbol did notdisappear, it stopped being in more than one place.
languagesis nowcatalogLanguages.Both code-level tables are in
CHANGELOG.md, generated by diffing the published0.11.0 payload rather than hand-typed.
Added
exportsmap nowdeclares a
requirecondition alongsideimport, both pointing at the sameES module. CommonJS consumers were failing at resolution, not loading —
importis not a conditionrequire()matches — so there is no second build,the tarball is the size it was, and a dual-package hazard is impossible.
Refs Support for CommonJS / dual module exports #1.
packagenow states theruntime facts an agent previously had to infer (
type,engines, root exportis metadata-only, algorithms are subpath-only) and names the machine surface:
/llms.txt,/version.json,/reference/payload.json, and the per-domain andper-topic route patterns. Every route was requested against the live site
before being written down.
archetypes, the five input shapes as data — derived counts, the canonicalTypeScript input type, a minimal payload that executes, and the validator to
run at the boundary. The machine half of
/guides/archetypes/.domains[].slug, so a domain's URL is no longer rediscovered by findingone of its topics and splitting its path.
CHANGELOG.md, which also ships inside the tarball.Improved
apicontractGuardrails
gen-docs.mjstakes--strict-contractsand refuses to emit when a topic hasno
api:block; CI additionally asserts coverage over the committed payload,so it runs on every pull request whether or not the catalog checkout is
available. Coverage that nothing enforced is how a complete 271/271 quietly
became 280/324.
a domain spanning two path roots, or an archetype with no description.
as well as ESM, against a clean consumer install.
Validation
npm run verify— 493/493 tests.docs.jsonbyte-identical on re-run;gen-docs.mjs --check --strict-contractspasses.
CommonJS.
caught real errors in the published guide's snippets, which are corrected in
the payload.
Known issue, unrelated to this branch
npm run synccurrently fails: the catalog has grown a family of ten topicsthat share one
calculate()dispatcher, and sync refuses to emit until each hasits own entry point. Nothing in this branch depends on resolving that — the
registry is unchanged at 324 topics, and
docs.jsonregenerates from it — butthe exports map could not be produced by re-running sync. It was rewritten in
place instead and then checked against what the updated generator produces for
the same 324 paths, so the next successful sync is a no-op on
package.json.