fix(app-router): match dynamic request analysis parity#2253
fix(app-router): match dynamic request analysis parity#2253james-elicx wants to merge 11 commits into
Conversation
|
/bigbonk review for issues |
commit: |
|
| } | ||
|
|
||
| function dynamicRequireReplacement(): string { | ||
| return `(() => { const error = new Error(${JSON.stringify(DYNAMIC_REQUEST_ERROR)}); error.code = "MODULE_NOT_FOUND"; throw error; })()`; |
| } | ||
|
|
||
| function dynamicImportReplacement(): string { | ||
| return `Promise.resolve().then(() => { const error = new Error(${JSON.stringify(DYNAMIC_REQUEST_ERROR)}); error.code = "MODULE_NOT_FOUND"; throw error; })`; |
Review: dynamic request analysis parity (PR #2253)Solid, well-tested implementation. The scope tracking, constant-folding, ignore-directive parsing, and webpack/turbopack-style runtime stubs all look correct, and the fixture faithfully ports the Next.js v16.2.6 Performance: no cheap content guard before full AST parse (
|
|
Review posted to PR #2253. Summary of findings: Overall: Correct, well-tested implementation. Scope tracking, constant-folding, ignore-directive parsing, and the webpack/turbopack-style runtime stubs are all sound. The fixture faithfully ports the Next.js v16.2.6 Findings:
Only the performance guard is worth addressing before merge; the rest are nits. |
|
/bigbonk review for issues |
|
/bigbonk review for issues |
Review: dynamic request analysis parity (PR #2253)Reviewed the full diff ( CodeQL alerts (218/219/220) are stale — already fixed at HEADAll three GitHub Advanced Security alerts ran against commit
The latest commit Performance: no cheap content guard before the full AST parse (
|
|
Review posted to PR #2253. Summary of what I found: Findings1. CodeQL alerts (218/219/220) are stale — already fixed at HEAD. 2. Performance (the one I'd address before merge) — 3. Minor — 4. Minor — redundant extension matching between the Verdict: correctness/parity are solid, 21/21 tests pass locally, |
|
/bigbonk review for issues |
1 similar comment
|
/bigbonk review for issues |
Review: dynamic request analysis parity (PR #2253)Reviewed the full diff at HEAD Previously-flagged items are resolved at HEAD
Minor (non-blocking):
|
|
Review posted to PR #2253. SummaryI reviewed the full diff at HEAD Previously-flagged items already resolved at HEAD:
Minor / non-blocking:
Verified fine: No blocking issues. The two high-priority items from earlier reviews (ReDoS regex and perf guard) are both addressed at HEAD. |
Performance benchmarksCompared 0 improved · 2 regressed · 4 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
Summary
require()andimport()expressionsNext.js parity
Targets the dynamic-request failures in the latest Next.js deploy-suite report, while matching pinned Next.js/Turbopack v16.2.6 behavior.
Validation
tests/dynamic-requests-build.test.ts: 21/21 passed with one workervp checkvp run vinext#buildFull suites are deferred to CI.