-
Notifications
You must be signed in to change notification settings - Fork 26.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into 08-16-include_proper_instrumentation_entry
- Loading branch information
Showing
216 changed files
with
11,503 additions
and
6,817 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
19.0.0-rc-49496d49-20240814 | ||
19.0.0-rc-1eaccd82-20240816 |
2 changes: 1 addition & 1 deletion
2
.github/actions/next-repo-actions/dist/triage-issues-with-ai/index.js
Large diffs are not rendered by default.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
.github/actions/next-repo-actions/lib/triage_guidelines.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
crates/next-core/src/next_shared/transforms/next_edge_node_api_assert.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
use anyhow::Result; | ||
use async_trait::async_trait; | ||
use next_custom_transforms::transforms::warn_for_edge_runtime::warn_for_edge_runtime; | ||
use swc_core::{ | ||
common::SyntaxContext, | ||
ecma::{ast::*, utils::ExprCtx, visit::VisitWith}, | ||
}; | ||
use turbo_tasks::Vc; | ||
use turbopack::module_options::{ModuleRule, ModuleRuleEffect}; | ||
use turbopack_ecmascript::{CustomTransformer, EcmascriptInputTransform, TransformContext}; | ||
|
||
use super::module_rule_match_js_no_url; | ||
|
||
pub fn next_edge_node_api_assert(enable_mdx_rs: bool, should_error: bool) -> ModuleRule { | ||
let transformer = | ||
EcmascriptInputTransform::Plugin(Vc::cell( | ||
Box::new(NextEdgeNodeApiAssert { should_error }) as _, | ||
)); | ||
ModuleRule::new( | ||
module_rule_match_js_no_url(enable_mdx_rs), | ||
vec![ModuleRuleEffect::ExtendEcmascriptTransforms { | ||
prepend: Vc::cell(vec![]), | ||
append: Vc::cell(vec![transformer]), | ||
}], | ||
) | ||
} | ||
|
||
#[derive(Debug)] | ||
struct NextEdgeNodeApiAssert { | ||
should_error: bool, | ||
} | ||
|
||
#[async_trait] | ||
impl CustomTransformer for NextEdgeNodeApiAssert { | ||
#[tracing::instrument(level = tracing::Level::TRACE, name = "next_edge_node_api_assert", skip_all)] | ||
async fn transform(&self, program: &mut Program, ctx: &TransformContext<'_>) -> Result<()> { | ||
let mut visitor = warn_for_edge_runtime( | ||
ctx.source_map.clone(), | ||
ExprCtx { | ||
is_unresolved_ref_safe: false, | ||
unresolved_ctxt: SyntaxContext::empty().apply_mark(ctx.unresolved_mark), | ||
}, | ||
self.should_error, | ||
); | ||
program.visit_with(&mut visitor); | ||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.