Unverified Commit 35f93e3b authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

fix(dev-overlay): align codeframe to formatIssue (#63624)

Closes PACK-2825
parent c2e3d9ac
...@@ -14,7 +14,7 @@ use turbopack_binding::{ ...@@ -14,7 +14,7 @@ use turbopack_binding::{
free_var_references, free_var_references,
}, },
ecmascript::chunk::EcmascriptChunkingContext, ecmascript::chunk::EcmascriptChunkingContext,
node::{debug::should_debug, execution_context::ExecutionContext}, node::execution_context::ExecutionContext,
turbopack::resolve_options_context::ResolveOptionsContext, turbopack::resolve_options_context::ResolveOptionsContext,
}, },
}; };
...@@ -169,7 +169,6 @@ pub async fn get_edge_chunking_context_with_client_assets( ...@@ -169,7 +169,6 @@ pub async fn get_edge_chunking_context_with_client_assets(
next_mode.runtime_type(), next_mode.runtime_type(),
) )
.asset_base_path(asset_prefix) .asset_base_path(asset_prefix)
.reference_chunk_source_maps(should_debug("edge"))
.minify_type(next_mode.minify_type()) .minify_type(next_mode.minify_type())
.build(), .build(),
)) ))
...@@ -199,7 +198,6 @@ pub async fn get_edge_chunking_context( ...@@ -199,7 +198,6 @@ pub async fn get_edge_chunking_context(
// implementation in the edge sandbox. It will respond with the // implementation in the edge sandbox. It will respond with the
// asset from the output directory. // asset from the output directory.
.asset_base_path(Vc::cell(Some("blob:server/edge/".to_string()))) .asset_base_path(Vc::cell(Some("blob:server/edge/".to_string())))
.reference_chunk_source_maps(should_debug("edge"))
.minify_type(next_mode.minify_type()) .minify_type(next_mode.minify_type())
.build(), .build(),
)) ))
......
...@@ -86,12 +86,10 @@ describe('Edge runtime code with imports', () => { ...@@ -86,12 +86,10 @@ describe('Edge runtime code with imports', () => {
context.app = await launchApp(context.appDir, context.appPort, appOption) context.app = await launchApp(context.appDir, context.appPort, appOption)
const res = await fetchViaHTTP(context.appPort, url) const res = await fetchViaHTTP(context.appPort, url)
expect(res.status).toBe(500) expect(res.status).toBe(500)
const text = await res.text()
await check(async () => { await check(async () => {
expectUnsupportedModuleDevError( expectUnsupportedModuleDevError(moduleName, importStatement, text)
moduleName,
importStatement,
await res.text()
)
return 'success' return 'success'
}, 'success') }, 'success')
}) })
...@@ -156,12 +154,9 @@ describe('Edge runtime code with imports', () => { ...@@ -156,12 +154,9 @@ describe('Edge runtime code with imports', () => {
const res = await fetchViaHTTP(context.appPort, url) const res = await fetchViaHTTP(context.appPort, url)
expect(res.status).toBe(500) expect(res.status).toBe(500)
const text = await res.text()
await check(async () => { await check(async () => {
expectModuleNotFoundDevError( expectModuleNotFoundDevError(moduleName, importStatement, text)
moduleName,
importStatement,
await res.text()
)
return 'success' return 'success'
}, 'success') }, 'success')
}) })
...@@ -224,12 +219,10 @@ describe('Edge runtime code with imports', () => { ...@@ -224,12 +219,10 @@ describe('Edge runtime code with imports', () => {
context.app = await launchApp(context.appDir, context.appPort, appOption) context.app = await launchApp(context.appDir, context.appPort, appOption)
const res = await fetchViaHTTP(context.appPort, url) const res = await fetchViaHTTP(context.appPort, url)
expect(res.status).toBe(500) expect(res.status).toBe(500)
const text = await res.text()
await check(async () => { await check(async () => {
expectModuleNotFoundDevError( expectModuleNotFoundDevError(moduleName, importStatement, text)
moduleName,
importStatement,
await res.text()
)
return 'success' return 'success'
}, 'success') }, 'success')
}) })
......
...@@ -9573,12 +9573,12 @@ ...@@ -9573,12 +9573,12 @@
"Edge runtime code with imports Edge API importing unused node.js module does not throw in dev at runtime", "Edge runtime code with imports Edge API importing unused node.js module does not throw in dev at runtime",
"Edge runtime code with imports Edge API statically importing node.js module throws unsupported module error in dev at runtime and highlights the faulty line", "Edge runtime code with imports Edge API statically importing node.js module throws unsupported module error in dev at runtime and highlights the faulty line",
"Edge runtime code with imports Middleware importing unused node.js module does not throw in dev at runtime", "Edge runtime code with imports Middleware importing unused node.js module does not throw in dev at runtime",
"Edge runtime code with imports Middleware statically importing node.js module throws unsupported module error in dev at runtime and highlights the faulty line" "Edge runtime code with imports Middleware statically importing node.js module throws unsupported module error in dev at runtime and highlights the faulty line",
"Edge runtime code with imports Edge API dynamically importing 3rd party module throws not-found module error in dev at runtime and highlights the faulty line",
"Edge runtime code with imports Middleware dynamically importing 3rd party module throws not-found module error in dev at runtime and highlights the faulty line"
], ],
"failed": [ "failed": [
"Edge runtime code with imports Edge API dynamically importing 3rd party module throws not-found module error in dev at runtime and highlights the faulty line",
"Edge runtime code with imports Edge API importing unused 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", "Edge runtime code with imports Edge API importing unused 3rd party module throws not-found module error in dev at runtime and highlights the faulty line",
"Edge runtime code with imports Middleware dynamically importing 3rd party module throws not-found module error in dev at runtime and highlights the faulty line",
"Edge runtime code with imports Middleware importing unused 3rd party module throws not-found module error in dev at runtime and highlights the faulty line" "Edge runtime code with imports Middleware importing unused 3rd party module throws not-found module error in dev at runtime and highlights the faulty line"
], ],
"pending": [ "pending": [
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment