Skip to content

fix: parse preserved createRequire arguments#14813

Draft
JSerFeng wants to merge 3 commits into
mainfrom
codex/defer-create-require-argument-walk
Draft

fix: parse preserved createRequire arguments#14813
JSerFeng wants to merge 3 commits into
mainfrom
codex/defer-create-require-argument-walk

Conversation

@JSerFeng

@JSerFeng JSerFeng commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Defer walking createRequire(import.meta.url) arguments until the created require keep/strip state is known.
  • Let regular parser plugins process the argument when the call is preserved, so options such as parser.importMeta remain authoritative.
  • Escape generated import.meta.url string literals without changing the existing single-quoted output style.
  • Extend ESM output coverage for default import-meta handling, parser.importMeta: false, requireResolve: false, and resource paths containing quotes.

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 22c3d69 to chore: update Rsdoctor diff action version (#14812) by yifancong

🙈 Size remains the same at 66.60MB

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 551.8 KB 0 0
react-10k 5.6 MB 1.3 MB 0 0
react-1k 823.1 KB 217.0 KB 0 0
react-5k 2.7 MB 663.8 KB 0 0
ui-components 4.9 MB 1.4 MB 0 0

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 2.47%

⚡ 1 improved benchmark
✅ 42 untouched benchmarks
⏩ 47 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation rust@create_named_chunk_ids 2.9 ms 2.9 ms +2.47%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing codex/defer-create-require-argument-walk (22c3d69) with main (58d8d6b)

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions

Copy link
Copy Markdown
Contributor

⏳ Triggered ecosystem CI: Open

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

📝 Rspack Ecosystem CI: Open

suite result
rsbuild ✅ success
rslib ✅ success
rsbuild-rsc-plugin ✅ success
rsdoctor ✅ success
lynx-stack ✅ success
rstest ✅ success
devserver ✅ success
plugin ✅ success
examples ✅ success
rspress ✅ success
modernjs ❌ failure

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