Skip to content

feat: export parse as public library surface - #4

Merged
Mearman merged 1 commit into
mainfrom
feat/parse-export
Sep 10, 2026
Merged

feat: export parse as public library surface#4
Mearman merged 1 commit into
mainfrom
feat/parse-export

Conversation

@Mearman

@Mearman Mearman commented Sep 10, 2026

Copy link
Copy Markdown
Member

emitModule/mergeRules only consume an already-parsed AST; nothing in the package's public exports could produce one. A consumer running cddl.js's own generation pipeline directly (parse a .cddl file, then emitModule() the result) rather than shelling out to src/cli.ts had no way to parse a .cddl file at all -- needed by wire-mesh's ts/packages/core, which generates its own committed schema file via a local script rather than invoking the CLI as a subprocess.

Wraps the vendored parser's parse() as a real function (typed unknown at this boundary, matching emitModule/mergeRules's existing unknown-typed input) rather than a bare re-export, since the project's barrel-policy lint rule flags re-export-only files.

emitModule/mergeRules only consume an already-parsed AST; nothing in the package's public exports could produce one. A consumer running cddl.js's own generation pipeline directly, rather than shelling out to src/cli.ts, had no way to parse a .cddl file at all. Wraps the vendored parser's parse() (typed unknown at this boundary, matching emitModule/mergeRules's existing unknown-typed input, rather than leaking the vendored AST's own type shapes into the public contract).

_build now depends on _vendor:build in turbo.json, since src/parse.ts's bundle needs vendor/cddl/dist/index.js to exist -- previously nothing in the build entry touched vendor/, so the dependency had never been needed. Also drops _build's stale reference to the removed src/index.ts barrel file.
@Mearman
Mearman marked this pull request as ready for review September 10, 2026 08:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-10T09:02:40.622819Z ec6e261 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 09bc9b5 into main Sep 10, 2026
1 check passed
@Mearman
Mearman deleted the feat/parse-export branch September 10, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant