Skip to content

refactor(adapter-vite): auto-sync OPENELEMENT_EXPORT_FILES from deno.json (#282)#370

Merged
SisyphusZheng merged 1 commit into
devfrom
fix/282-export-files-sync
Jul 9, 2026
Merged

refactor(adapter-vite): auto-sync OPENELEMENT_EXPORT_FILES from deno.json (#282)#370
SisyphusZheng merged 1 commit into
devfrom
fix/282-export-files-sync

Conversation

@SisyphusZheng

Copy link
Copy Markdown
Member

What

Resolves #282. Makes `packages/*/deno.json` the single source of truth for the JSR SSG package resolver export map, replacing the hand-maintained copy in `ssg-package-resolver.ts` that had drifted (content's `nav-data` was renamed to `write-json` in its deno.json but never updated in the resolver).

Acceptance

  • Script/build step generates `OPENELEMENT_EXPORT_FILES` from each `packages/*/deno.json` exports → `tools/generate-openelement-export-files.ts` writes `packages/adapter-vite/src/generated-export-files.ts`.
  • Sync runs in CI and fails if the generated output does not match the committed file → `export-files:check` gate (autoflow policy, ci/release tiers).
  • Manual mapping removed → `ssg-package-resolver.ts` now imports the generated file.

Verification

  • `deno task export-files:check`: passed (generated file matches deno.json exports).
  • `deno test packages/adapter-vite/tests/ssg-package-resolver.test.ts`: 14 passed.
  • `deno task arch:check` + `deno task type-safety:check`: passed.
  • `deno fmt --check` + `deno lint`: clean on changed files.

…json (#282)

Make packages/*/deno.json the single source of truth for the JSR SSG
package resolver export map instead of a hand-maintained copy that drifted
(content's nav-data was renamed to write-json in its deno.json but never
updated in the resolver).

- Add tools/generate-openelement-export-files.ts: reads each package deno.json
  exports and writes packages/adapter-vite/src/generated-export-files.ts.
  Supports --check mode (regenerate, format, git diff --quiet) to fail CI
  when the committed generated file is stale.
- ssg-package-resolver.ts imports OPENELEMENT_EXPORT_FILES from the generated
  file and drops the inline const.
- Add deno tasks export-files:generate and export-files:check.
- Register an export-files:check gate in autoflow policy (ci/release tiers).
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying openelement with  Cloudflare Pages  Cloudflare Pages

Latest commit: 460f0ec
Status: ✅  Deploy successful!
Preview URL: https://d9cdc828.lessjs.pages.dev
Branch Preview URL: https://fix-282-export-files-sync.lessjs.pages.dev

View logs

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

@SisyphusZheng SisyphusZheng merged commit 423cb7d into dev Jul 9, 2026
4 of 5 checks passed
@SisyphusZheng SisyphusZheng deleted the fix/282-export-files-sync branch July 9, 2026 08:55
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