mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Use OIDC for CodSpeed (#93059)
https://codspeed.io/docs/integrations/ci/github-actions/configuration#oidc-recommended
This commit is contained in:
@@ -23,6 +23,10 @@ env:
|
||||
TURBO_TEAM: 'vercel'
|
||||
TURBO_CACHE: 'remote:rw'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
benchmark-small-apps:
|
||||
name: Benchmark Rust Crates (small apps)
|
||||
@@ -58,7 +62,6 @@ jobs:
|
||||
with:
|
||||
mode: instrumentation
|
||||
run: cargo codspeed run -p turbopack-cli small_apps
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
||||
benchmark-analyzer:
|
||||
name: Benchmark Rust Crates (analyzer)
|
||||
@@ -94,7 +97,6 @@ jobs:
|
||||
with:
|
||||
mode: instrumentation
|
||||
run: cargo codspeed run -p turbopack-ecmascript references
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
||||
benchmark-large:
|
||||
name: Benchmark Rust Crates (large)
|
||||
@@ -124,4 +126,3 @@ jobs:
|
||||
with:
|
||||
mode: instrumentation
|
||||
run: cargo codspeed run
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
||||
@@ -42,13 +42,13 @@ fn effect_has_side_effect_deps(call: &CallExpr) -> bool {
|
||||
|
||||
// We can't optimize if the effect has a function call as a dependency:
|
||||
// useEffect(() => {}, x())
|
||||
if let box Expr::Call(_) = &call.args[1].expr {
|
||||
if let Expr::Call(_) = &*call.args[1].expr {
|
||||
return true;
|
||||
}
|
||||
|
||||
// As well as:
|
||||
// useEffect(() => {}, [x()])
|
||||
if let box Expr::Array(arr) = &call.args[1].expr {
|
||||
if let Expr::Array(arr) = &*call.args[1].expr {
|
||||
for elem in arr.elems.iter().flatten() {
|
||||
if let ExprOrSpread {
|
||||
expr: box Expr::Call(_),
|
||||
@@ -155,7 +155,7 @@ impl Fold for OptimizeServerReact {
|
||||
}
|
||||
} else if let Some(react_ident) = &self.react_ident
|
||||
&& let Callee::Expr(box Expr::Member(member)) = &call.callee
|
||||
&& let box Expr::Ident(f) = &member.obj
|
||||
&& let Expr::Ident(f) = &*member.obj
|
||||
&& &f.to_id() == react_ident
|
||||
&& let MemberProp::Ident(i) = &member.prop
|
||||
{
|
||||
@@ -190,8 +190,8 @@ impl Fold for OptimizeServerReact {
|
||||
// be sure is not a function (e.g. {} or [] lit).
|
||||
// This is because useState allows a function as the
|
||||
// initialiser.
|
||||
match &call.args[0].expr {
|
||||
box Expr::Lit(_) | box Expr::Object(_) | box Expr::Array(_) => {
|
||||
match &*call.args[0].expr {
|
||||
Expr::Lit(_) | Expr::Object(_) | Expr::Array(_) => {
|
||||
// const [state, setState] = [x, () => {}];
|
||||
return VarDeclarator {
|
||||
definite: false,
|
||||
|
||||
@@ -2870,8 +2870,8 @@ impl<C: Comments> VisitMut for ServerActions<C> {
|
||||
|
||||
if let (
|
||||
AssignTarget::Simple(SimpleAssignTarget::Ident(ident)),
|
||||
box Expr::Arrow(_) | box Expr::Fn(_),
|
||||
) = (&assign_expr.left, &assign_expr.right)
|
||||
Expr::Arrow(_) | Expr::Fn(_),
|
||||
) = (&assign_expr.left, &*assign_expr.right)
|
||||
{
|
||||
self.arrow_or_fn_expr_ident = Some(ident.id.clone());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user