Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/next-swc/crates/next-core/src/next_edge/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use turbopack_binding::{
free_var_references,
},
ecmascript::chunk::EcmascriptChunkingContext,
node::{debug::should_debug, execution_context::ExecutionContext},
node::execution_context::ExecutionContext,
turbopack::resolve_options_context::ResolveOptionsContext,
},
};
Expand Down Expand Up @@ -169,7 +169,6 @@ pub async fn get_edge_chunking_context_with_client_assets(
next_mode.runtime_type(),
)
.asset_base_path(asset_prefix)
.reference_chunk_source_maps(should_debug("edge"))
.minify_type(next_mode.minify_type())
.build(),
))
Expand Down Expand Up @@ -199,7 +198,6 @@ pub async fn get_edge_chunking_context(
// implementation in the edge sandbox. It will respond with the
// asset from the output directory.
.asset_base_path(Vc::cell(Some("blob:server/edge/".to_string())))
.reference_chunk_source_maps(should_debug("edge"))
.minify_type(next_mode.minify_type())
.build(),
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ describe('Edge runtime code with imports', () => {
context.app = await launchApp(context.appDir, context.appPort, appOption)
const res = await fetchViaHTTP(context.appPort, url)
expect(res.status).toBe(500)

const text = await res.text()
await check(async () => {
expectUnsupportedModuleDevError(
moduleName,
importStatement,
await res.text()
)
expectUnsupportedModuleDevError(moduleName, importStatement, text)
return 'success'
}, 'success')
})
Expand Down Expand Up @@ -156,12 +154,9 @@ describe('Edge runtime code with imports', () => {
const res = await fetchViaHTTP(context.appPort, url)
expect(res.status).toBe(500)

const text = await res.text()
await check(async () => {
expectModuleNotFoundDevError(
moduleName,
importStatement,
await res.text()
)
expectModuleNotFoundDevError(moduleName, importStatement, text)
return 'success'
}, 'success')
})
Expand Down Expand Up @@ -224,12 +219,10 @@ describe('Edge runtime code with imports', () => {
context.app = await launchApp(context.appDir, context.appPort, appOption)
const res = await fetchViaHTTP(context.appPort, url)
expect(res.status).toBe(500)

const text = await res.text()
await check(async () => {
expectModuleNotFoundDevError(
moduleName,
importStatement,
await res.text()
)
expectModuleNotFoundDevError(moduleName, importStatement, text)
return 'success'
}, 'success')
})
Expand Down
6 changes: 3 additions & 3 deletions test/turbopack-dev-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 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 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": [
"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 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"
],
"pending": [
Expand Down