Skip to content

fix(build): return maps from dependency compatibility transforms - #713

Merged
harlan-zw merged 1 commit into
mainfrom
fix/issue-712
Nov 23, 2026
Merged

harlan-zw merged 1 commit into
mainfrom
fix/issue-712

Conversation

@harlan-github-agent

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Closes #712

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Issue #712 reports [SOURCEMAP_BROKEN] because skilld:dependency-plugin-compat modified source without returning a map. Both rewrite paths now return source maps with original content, preserving mappings around the page export rewrite. The authenticated production build remains the confirmation point for the warning's removal.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

@harlan-github-agent harlan-github-agent Bot added harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. and removed harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. labels Nov 19, 2026
@harlan-github-agent

harlan-github-agent Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-11-23 22:15 UTC.

GitHub merged this pull request.

  • Logged (50/100): An empty OG image plugin module now aborts the build transform. View code Optional follow-up: As an optional follow-up, use an insertion for empty source and keep the existing overwrite for nonempty source.
    • Ask an agent to verify and fix this finding
  • Logged (18/100): The Vite hook allocates source-map editing state for modules it leaves unchanged. View code Optional follow-up: As an optional follow-up, return null for unmatched module IDs before constructing MagicString.
    • Ask an agent to verify and fix this finding

f14ef3e6-6c7a-4cfc-abb6-68fab3217048

Selected findings run after merge and open separate pull requests.

@harlan-github-agent harlan-github-agent Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

Optional follow-ups

Minor (50/100) · An empty OG image plugin module now aborts the build transform.

For either recognized OG image module ID, empty source reaches overwrite(0, 0, wrapper). The pinned MagicString 1.2.3 implementation delegates overwrite to update, which throws when start equals end. The base returned the same valid wrapper regardless of the input source, so an empty input now aborts the transform.

Optional follow-up: As an optional follow-up, use an insertion for empty source and keep the existing overwrite for nonempty source.

View code

Trivial (18/100) · The Vite hook allocates source-map editing state for modules it leaves unchanged.

Nuxt registers this as an unfiltered Vite transform. Each unrelated module now allocates a MagicString instance, a chunk, two maps, and a bit set before returning null. The base performed only the path checks for that case.

Optional follow-up: As an optional follow-up, return null for unmatched module IDs before constructing MagicString.

View code

@harlan-github-agent harlan-github-agent Bot added the harlan-agent-ready The automated Review passed every gate on this head commit. label Nov 19, 2026
: undefined

const transformed = new MagicString(code)
if (ogImageExport) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logged (50/100): An empty OG image plugin module now aborts the build transform.

Proof: For either recognized OG image module ID, empty source reaches overwrite(0, 0, wrapper). The pinned MagicString 1.2.3 implementation delegates overwrite to update, which throws when start equals end. The base returned the same valid wrapper regardless of the input source, so an empty input now aborts the transform.

Optional follow-up: As an optional follow-up, use an insertion for empty source and keep the existing overwrite for nonempty source.

  • Ask an agent to verify and fix this finding

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy.

const ogImageExport = fileName && sourcePath.includes('/nuxt-og-image/dist/runtime/app/plugins/')
? OG_IMAGE_PLUGINS.get(fileName)
: undefined

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logged (18/100): The Vite hook allocates source-map editing state for modules it leaves unchanged.

Proof: Nuxt registers this as an unfiltered Vite transform. Each unrelated module now allocates a MagicString instance, a chunk, two maps, and a bit set before returning null. The base performed only the path checks for that case.

Optional follow-up: As an optional follow-up, return null for unmatched module IDs before constructing MagicString.

  • Ask an agent to verify and fix this finding

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy.

@harlan-github-agent harlan-github-agent Bot added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-ready The automated Review passed every gate on this head commit. labels Nov 23, 2026
@harlan-zw
harlan-zw merged commit a9ad111 into main Nov 23, 2026
8 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Nov 23, 2026
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.

Return source maps from the dependency compatibility transform

1 participant