Skip to content

refactor(source-map): extract recording extension - #93

Merged
luojiyin1987 merged 1 commit into
masterfrom
agent/extract-recording-extension
Aug 10, 2026
Merged

refactor(source-map): extract recording extension#93
luojiyin1987 merged 1 commit into
masterfrom
agent/extract-recording-extension

Conversation

@luojiyin1987

Copy link
Copy Markdown
Contributor

What changed

  • Move the micromark recording extension into src/source-map/recording-extension.ts.
  • Move its private protocol types and helper functions with it.
  • Export only recordingExtension from the new module.
  • Limit its state interface to segments and urlSourceSpans.

Why

The recording extension depends on undocumented parser handler contracts.

This module seam isolates that parser-internals risk from source-map orchestration and reconstruction algorithms.

Scope

  • No handler rewrites.
  • No CompileContext changes.
  • No URL or inline-code extraction.
  • No shared SourceSpan type.
  • No parser algorithm changes.
  • No public interface changes.

Verification

  • The moved metadata types and implementation are byte-for-byte identical after export normalization.
  • pnpm run prepublishOnly passed.
  • All 14 test suites passed.
  • All 1,956 tests passed.
  • Type tests, ESLint, build, and package checks passed.
  • pnpm run bench:source-map completed.

This is the final planned source-map extraction. Further extraction is out of scope.

@luojiyin1987
luojiyin1987 marked this pull request as ready for review August 10, 2026 03:45
@luojiyin1987
luojiyin1987 merged commit d8aa262 into master Aug 10, 2026
13 checks passed
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