Skip to content

refactor(cli): use shared module-loader for codemod and template-doc loading#3278

Merged
ejhammond merged 1 commit into
xds-unprefix-integrationfrom
astryx/dedupe-jiti-loaders
Jun 30, 2026
Merged

refactor(cli): use shared module-loader for codemod and template-doc loading#3278
ejhammond merged 1 commit into
xds-unprefix-integrationfrom
astryx/dedupe-jiti-loaders

Conversation

@ejhammond

Copy link
Copy Markdown
Contributor

Follow-on to the module-loader extraction. Routes the two remaining config-adjacent jiti/import call sites through the shared module-loader.mjs helper instead of duplicating the .ts-via-jiti / .mjs-via-dynamic-import logic:

  • codemods/integration-discovery.mjs — integration codemod module loading now calls importUserModule.
  • api/template.mjs — integration template-doc loading now calls importUserModule (keeping the default ?? doc unwrap).

build-theme.mjs is intentionally left as-is: it constructs jiti with custom options (moduleCache: false, jsx: true) and uses the { default: true } import shortcut, so it doesn't fit the shared helper without widening its API.

No behavior change. After this, createJiti/jitiInstance exist only in module-loader.mjs (and the distinct build-theme.mjs case).

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jun 30, 2026 3:22pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 30, 2026
github-actions Bot added a commit that referenced this pull request Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@ejhammond ejhammond merged commit cd551d5 into xds-unprefix-integration Jun 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant