Skip to content

Commit

Permalink
Merge branch 'canary' into perf/lazy-import-telemetry-in-standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored Mar 25, 2024
2 parents f315fa2 + 3ba3eeb commit 01ea276
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export function middleware(request: NextRequest) {
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
block-all-mixed-content;
upgrade-insecure-requests;
`
// Replace newline characters and spaces
Expand Down Expand Up @@ -96,7 +95,6 @@ export function middleware(request) {
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
block-all-mixed-content;
upgrade-insecure-requests;
`
// Replace newline characters and spaces
Expand Down Expand Up @@ -224,7 +222,6 @@ const cspHeader = `
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
block-all-mixed-content;
upgrade-insecure-requests;
`

Expand Down
1 change: 0 additions & 1 deletion examples/with-strict-csp/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export function middleware(request) {
base-uri 'self';
form-action 'self';
frame-ancestors 'none';
block-all-mixed-content;
upgrade-insecure-requests;
`;
// Replace newline characters and spaces
Expand Down
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

0 comments on commit 01ea276

Please sign in to comment.