helloadhavan/github_issues huggingface dataset:
Repository: nodejs/node
Pull request: src: add env->cppgc_allocation_handle() convenience method

Reduce some of the boilerplate code needed to access the cppgc::AllocationHandle from the Node.js Environment.



Changed files:
filename: src/README.md
patch: @@ -1193,7 +1193,7 @@ MyWrap* MyWrap::New(Environment* env, v8::Local<v8::Object> object) {
   // pointer with this, as this is not managed by the native memory
   // allocator but by V8.
   return cppgc::MakeGarbageCollected<MyWrap>(
-      env->isolate()->GetCppHeap()->GetAllocationHandle(), env, object);
+      env->cppgc_allocation_handle(), env, object);
 }
 
 // Binding method to be invoked by JavaScript.

filename: src/env-inl.h
patch: @@ -205,6 +205,10 @@ inline v8::Isolate* Environment::isolate() const {
   return isolate_;
 }
 
+inline cppgc::AllocationHandle& Environment::cppgc_allocation_handle() const {
+  return isolate_->GetCppHeap()->GetAllocationHandle();
+}
+
 inline v8::ExternalMemoryAccounter* Environment::external_memory_accounter()
     const {
   return external_memory_accounter_;

filename: src/env.h
patch: @@ -692,6 +692,7 @@ class Environment final : public MemoryRetainer {
   void StartProfilerIdleNotifier();
 
   inline v8::Isolate* isolate() const;
+  inline cppgc::AllocationHandle& cppgc_allocation_handle() const;
   inline v8::ExternalMemoryAccounter* external_memory_accounter() const;
   inline uv_loop_t* event_loop() const;
   void TryLoadAddon(const char* filename,

filename: src/node_contextify.cc
patch: @@ -330,11 +330,7 @@ ContextifyContext* ContextifyContext::New(Local<Context> v8_context,
     }
     DCHECK_NOT_NULL(env->isolate()->GetCppHeap());
     result = cppgc::MakeGarbageCollected<ContextifyContext>(
-        env->isolate()->GetCppHeap()->GetAllocationHandle(),
-        env,
-        wrapper,
-        v8_context,
-        options);
+        env->cppgc_allocation_handle(), env, wrapper, v8_context, options);
   }
 
   Local<Object> wrapper_holder =
@@ -975,7 +971,7 @@ ContextifyScript* ContextifyScript::New(Environment* env,
                                         Local<Object> object) {
   DCHECK_NOT_NULL(env->isolate()->GetCppHeap());
   return cppgc::MakeGarbageCollected<ContextifyScript>(
-      env->isolate()->GetCppHeap()->GetAllocationHandle(), env, object);
+      env->cppgc_allocation_handle(), env, object);
 }
 
 void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
Repository: denoland/deno
Pull request: fix(cli/run): resolve conflict when dir has same name as a task

Fixes: #28878 

This PR fixes an issue where running `deno run <name>` would fail if a directory with the same name exists in the current working directory. This behavior is inconsistent with `deno task`, which correctly handles such cases by resolving the intended task path.

Please refer #28878 for a full description


Changed files:
filename: cli/main.rs
patch: @@ -317,9 +317,7 @@ async fn run_subcommand(
               .await;
             }
             let script_err_msg = script_err.to_string();
-            if script_err_msg.starts_with(MODULE_NOT_FOUND)
-              || script_err_msg.starts_with(UNSUPPORTED_SCHEME)
-            {
+            if should_fallback_on_run_error(script_err_msg.as_str()) {
               if run_flags.bare {
                 let mut cmd = args::clap_root();
                 cmd.build();
@@ -459,6 +457,29 @@ async fn run_subcommand(
   handle.await?
 }
 
+/// Determines whether a error encountered during `deno run`
+/// should trigger fallback behavior, such as attempting to run a Deno task
+/// with the same name.
+///
+/// Checks if the error message indicates a "module not found",
+/// "unsupported scheme", or certain OS-level import failures (such as
+/// "Is a directory" or "Access is denied"); if so, Deno will attempt to
+/// interpret the original argument as a script name or task instead of a
+/// file path.
+///
+/// See: https://github.com/denoland/deno/issues/28878
+fn should_fallback_on_run_error(script_err: &str) -> bool {
+  if script_err.starts_with(MODULE_NOT_FOUND)
+    || script_err.starts_with(UNSUPPORTED_SCHEME)
+  {
+    return true;
+  }
+  let re = lazy_regex::regex!(
+    r"Import 'file:///.+?' failed\.\n\s+0: .+ \(os error \d+\)"
+  );
+  re.is_match(script_err)
+}
+
 #[allow(clippy::print_stderr)]
 fn setup_panic_hook() {
   // This function does two things inside of the panic hook:

filename: tests/specs/run/run_task_when_entry_isdir/__test__.jsonc
patch: @@ -0,0 +1,8 @@
+{
+  "tests": {
+    "fallback_to_backend_task": {
+      "args": "run backend",
+      "output": "run_task_when_entry_isdir.out"
+    }
+  }
+}

filename: tests/specs/run/run_task_when_entry_isdir/backend/mod.ts
patch: @@ -0,0 +1 @@
+console.log("Backend Task Running...");

filename: tests/specs/run/run_task_when_entry_isdir/deno.json
patch: @@ -0,0 +1,5 @@
+{
+  "tasks": {
+    "backend": "deno run -A ./backend/mod.ts"
+  }
+}

filename: tests/specs/run/run_task_when_entry_isdir/run_task_when_entry_isdir.out
patch: @@ -0,0 +1,2 @@
+Task backend deno run -A ./backend/mod.ts
+Backend Task Running...
Repository: ggml-org/llama.cpp
Pull request: ggml-cuda: use passed ops instead of hardcoded ops

`ggml_can_fuse_subgraph` should be using passed down ops rather than hardcoded ones

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -2826,7 +2826,7 @@ static bool ggml_cuda_can_fuse(const struct ggml_cgraph * cgraph, int node_idx,
         ggml_cuda_topk_moe_ops(/*with_norm=*/false, /*delayed_softmax=*/true);
 
     if (ops.size() == topk_moe_ops_with_norm.size() &&
-        ggml_can_fuse_subgraph(cgraph, node_idx, topk_moe_ops_with_norm, { node_idx + 3, node_idx + 8 })) {
+        ggml_can_fuse_subgraph(cgraph, node_idx, ops, { node_idx + 3, node_idx + 8 })) {
         ggml_tensor * softmax = cgraph->nodes[node_idx];
         ggml_tensor * weights = cgraph->nodes[node_idx+8];
 
@@ -2836,7 +2836,7 @@ static bool ggml_cuda_can_fuse(const struct ggml_cgraph * cgraph, int node_idx,
     }
 
     if (ops.size() == topk_moe_ops.size() &&
-        ggml_can_fuse_subgraph(cgraph, node_idx, topk_moe_ops, { node_idx + 3, node_idx + 4 })) {
+        ggml_can_fuse_subgraph(cgraph, node_idx, ops, { node_idx + 3, node_idx + 4 })) {
         ggml_tensor * softmax = cgraph->nodes[node_idx];
         ggml_tensor * weights = cgraph->nodes[node_idx+4];
         if (ggml_cuda_should_use_topk_moe(softmax, weights)) {
@@ -2845,7 +2845,7 @@ static bool ggml_cuda_can_fuse(const struct ggml_cgraph * cgraph, int node_idx,
     }
 
     if (ops.size() == topk_moe_ops_delayed_softmax.size() &&
-        ggml_can_fuse_subgraph(cgraph, node_idx, topk_moe_ops_delayed_softmax, { node_idx + 2, node_idx + 5 })) {
+        ggml_can_fuse_subgraph(cgraph, node_idx, ops, { node_idx + 2, node_idx + 5 })) {
         ggml_tensor * softmax = cgraph->nodes[node_idx + 4];
         ggml_tensor * weights = cgraph->nodes[node_idx + 5];
Repository: facebook/react
Pull request: Clarify RTR native feature flags are fb specific

Make it more clear that these flags aren't used in RN OSS.
- Rename `packages/shared/forks/ReactFeatureFlags.test-renderer.native.js` to `packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js`
- Remove RN OSS build cases consuming the feature flags since there is no RN OSS RTR build.

Changed files:
filename: scripts/rollup/forks.js
patch: @@ -153,10 +153,7 @@ const forks = Object.freeze({
           case RN_FB_DEV:
           case RN_FB_PROD:
           case RN_FB_PROFILING:
-          case RN_OSS_DEV:
-          case RN_OSS_PROD:
-          case RN_OSS_PROFILING:
-            return './packages/shared/forks/ReactFeatureFlags.test-renderer.native.js';
+            return './packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js';
           case FB_WWW_DEV:
           case FB_WWW_PROD:
           case FB_WWW_PROFILING:
Repository: electron/electron
Pull request: fix: ensure maximize is emitted when reduce motion is enabled on macOS (33-x-y)

Backport of #46459

See that PR for details.


Notes: no-notes


Changed files:
filename: shell/browser/ui/cocoa/electron_ns_window_delegate.mm
patch: @@ -221,6 +221,12 @@ - (void)windowDidResize:(NSNotification*)notification {
   [super windowDidResize:notification];
   shell_->NotifyWindowResize();
   shell_->RedrawTrafficLights();
+  // When reduce motion is enabled windowDidResize is only called once after
+  // a resize and windowDidEndLiveResize is not called. So we need to call
+  // handleZoomEnd here as well.
+  if (NSWorkspace.sharedWorkspace.accessibilityDisplayShouldReduceMotion) {
+    [self handleZoomEnd];
+  }
 }
 
 - (void)windowWillMove:(NSNotification*)notification {
@@ -276,9 +282,7 @@ - (BOOL)windowShouldZoom:(NSWindow*)window toFrame:(NSRect)newFrame {
   return YES;
 }
 
-- (void)windowDidEndLiveResize:(NSNotification*)notification {
-  resizingHorizontally_.reset();
-  shell_->NotifyWindowResized();
+- (void)handleZoomEnd {
   if (is_zooming_) {
     if (shell_->IsMaximized())
       shell_->NotifyWindowMaximize();
@@ -288,6 +292,12 @@ - (void)windowDidEndLiveResize:(NSNotification*)notification {
   }
 }
 
+- (void)windowDidEndLiveResize:(NSNotification*)notification {
+  resizingHorizontally_.reset();
+  shell_->NotifyWindowResized();
+  [self handleZoomEnd];
+}
+
 - (void)windowWillEnterFullScreen:(NSNotification*)notification {
   // Store resizable mask so it can be restored after exiting fullscreen.
   is_resizable_ = shell_->HasStyleMask(NSWindowStyleMaskResizable);
Repository: electron/electron
Pull request: fix: ensure maximize is emitted when reduce motion is enabled on macOS

Another quirk of macOS I guess, but a non-animated resize isn't "live" so we handle the single resize event instead specifically when reduce motion is enabled.

This also reverts the graphics change in CI in order to "prove" this fixes it.

Closes #46455

Notes: no-notes

Changed files:
filename: .github/workflows/pipeline-segment-electron-test.yml
patch: @@ -118,12 +118,6 @@ jobs:
     - name: Turn off the unexpectedly quit dialog on macOS
       if: ${{ inputs.target-platform == 'macos' }}
       run: defaults write com.apple.CrashReporter DialogType server
-    - name: Reenable graphics effects on macOS
-      if: ${{ inputs.target-platform == 'macos' }}
-      run: |
-        # These options to reduce graphics effects were enabled upstream in https://github.com/actions/runner-images/pull/11877
-        defaults write com.apple.universalaccess reduceMotion -bool false
-        defaults write com.apple.universalaccess reduceTransparency -bool false
     - name: Checkout Electron
       uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
       with:

filename: shell/browser/ui/cocoa/electron_ns_window_delegate.mm
patch: @@ -221,6 +221,12 @@ - (void)windowDidResize:(NSNotification*)notification {
   [super windowDidResize:notification];
   shell_->NotifyWindowResize();
   shell_->RedrawTrafficLights();
+  // When reduce motion is enabled windowDidResize is only called once after
+  // a resize and windowDidEndLiveResize is not called. So we need to call
+  // handleZoomEnd here as well.
+  if (NSWorkspace.sharedWorkspace.accessibilityDisplayShouldReduceMotion) {
+    [self handleZoomEnd];
+  }
 }
 
 - (void)windowWillMove:(NSNotification*)notification {
@@ -276,9 +282,7 @@ - (BOOL)windowShouldZoom:(NSWindow*)window toFrame:(NSRect)newFrame {
   return YES;
 }
 
-- (void)windowDidEndLiveResize:(NSNotification*)notification {
-  resizingHorizontally_.reset();
-  shell_->NotifyWindowResized();
+- (void)handleZoomEnd {
   if (is_zooming_) {
     if (shell_->IsMaximized())
       shell_->NotifyWindowMaximize();
@@ -288,6 +292,12 @@ - (void)windowDidEndLiveResize:(NSNotification*)notification {
   }
 }
 
+- (void)windowDidEndLiveResize:(NSNotification*)notification {
+  resizingHorizontally_.reset();
+  shell_->NotifyWindowResized();
+  [self handleZoomEnd];
+}
+
 - (void)windowWillEnterFullScreen:(NSNotification*)notification {
   // Store resizable mask so it can be restored after exiting fullscreen.
   is_resizable_ = shell_->HasStyleMask(NSWindowStyleMaskResizable);
Repository: denoland/deno
Pull request: fix(ext/fetch): only uppercase known methods

Closes #30288.

@mitranim Please take a look to see if this is the correct fix.


Changed files:
filename: ext/fetch/23_request.js
patch: @@ -18,17 +18,15 @@ const {
   ObjectPrototypeIsPrototypeOf,
   RegExpPrototypeExec,
   StringPrototypeStartsWith,
+  StringPrototypeToUpperCase,
   Symbol,
   SymbolFor,
   TypeError,
 } = primordials;
 
 import * as webidl from "ext:deno_webidl/00_webidl.js";
 import { createFilteredInspectProxy } from "ext:deno_console/01_console.js";
-import {
-  byteUpperCase,
-  HTTP_TOKEN_CODE_POINT_RE,
-} from "ext:deno_web/00_infra.js";
+import { HTTP_TOKEN_CODE_POINT_RE } from "ext:deno_web/00_infra.js";
 import { URL } from "ext:deno_url/00_url.js";
 import { extractBody, mixinBody } from "ext:deno_fetch/22_body.js";
 import { getLocationHref } from "ext:deno_web/12_location.js";
@@ -213,6 +211,7 @@ function cloneInnerRequest(request, skipBody = false) {
 
 // method => normalized method
 const KNOWN_METHODS = {
+  __proto__: null,
   "DELETE": "DELETE",
   "delete": "DELETE",
   "GET": "GET",
@@ -222,7 +221,6 @@ const KNOWN_METHODS = {
   "OPTIONS": "OPTIONS",
   "options": "OPTIONS",
   "PATCH": "PATCH",
-  "patch": "PATCH",
   "POST": "POST",
   "post": "POST",
   "PUT": "PUT",
@@ -237,13 +235,21 @@ function validateAndNormalizeMethod(m) {
   if (RegExpPrototypeExec(HTTP_TOKEN_CODE_POINT_RE, m) === null) {
     throw new TypeError("Method is not valid");
   }
-  const upperCase = byteUpperCase(m);
-  if (
-    upperCase === "CONNECT" || upperCase === "TRACE" || upperCase === "TRACK"
-  ) {
-    throw new TypeError("Method is forbidden");
+  const upperCase = StringPrototypeToUpperCase(m);
+  switch (upperCase) {
+    case "DELETE":
+    case "GET":
+    case "HEAD":
+    case "OPTIONS":
+    case "POST":
+    case "PUT":
+      return upperCase;
+    case "CONNECT":
+    case "TRACE":
+    case "TRACK":
+      throw new TypeError("Method is forbidden");
   }
-  return upperCase;
+  return m;
 }
 
 class Request {

filename: tests/wpt/runner/expectation.json
patch: @@ -9615,8 +9615,6 @@
         "request-constructor-init-body-override.any.html": true,
         "request-constructor-init-body-override.any.worker.html": true,
         "request-init-001.sub.html": [
-          "Check method init value of patch and associated getter",
-          "Check method init value of patCh and associated getter",
           "Check referrer init value of /relative/ressource and associated getter",
           "Check referrer init value of http://web-platform.test:8000/relative/ressource?query=true#fragment and associated getter",
           "Check referrer init value of http://web-platform.test:8000/ and associated getter",
Repository: ollama/ollama
Pull request: update dockerfile.cuda


Changed files:
filename: Dockerfile
patch: @@ -1,21 +1,28 @@
-FROM golang:alpine
+ARG CUDA_VERSION=12.2.0
 
+FROM nvidia/cuda:$CUDA_VERSION-devel-ubuntu22.04
+
+ARG TARGETARCH
 ARG VERSION=0.0.0
 
 WORKDIR /go/src/github.com/jmorganca/ollama
-RUN apk add --no-cache git build-base cmake
+RUN apt-get update && apt-get install -y git build-essential cmake
+ADD https://dl.google.com/go/go1.21.1.linux-$TARGETARCH.tar.gz /tmp/go1.21.1.tar.gz
+RUN mkdir -p /usr/local && tar xz -C /usr/local </tmp/go1.21.1.tar.gz
 
 COPY . .
-RUN go generate ./... \
-    && go build -ldflags "-linkmode=external -extldflags='-static' -X=github.com/jmorganca/ollama/version.Version=$VERSION -X=github.com/jmorganca/ollama/server.mode=release" .
+ENV GOARCH=$TARGETARCH
+RUN /usr/local/go/bin/go generate ./... \
+    && /usr/local/go/bin/go build -ldflags "-linkmode=external -extldflags='-static' -X=github.com/jmorganca/ollama/version.Version=$VERSION -X=github.com/jmorganca/ollama/server.mode=release" .
 
-FROM alpine
+FROM ubuntu:22.04
 ENV OLLAMA_HOST 0.0.0.0
-RUN apk add --no-cache libstdc++
+
+RUN apt-get update && apt-get install -y ca-certificates
 
 ARG USER=ollama
 ARG GROUP=ollama
-RUN addgroup $GROUP && adduser -D -G $GROUP $USER
+RUN groupadd $GROUP && useradd -m -g $GROUP $USER
 
 COPY --from=0 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
 

filename: Dockerfile.cuda
patch: @@ -1,27 +0,0 @@
-FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
-
-ARG TARGETARCH
-ARG VERSION=0.0.0
-
-WORKDIR /go/src/github.com/jmorganca/ollama
-RUN apt-get update && apt-get install -y git build-essential cmake
-ADD https://dl.google.com/go/go1.21.1.linux-$TARGETARCH.tar.gz /tmp/go1.21.1.tar.gz
-RUN mkdir -p /usr/local && tar xz -C /usr/local </tmp/go1.21.1.tar.gz
-
-COPY . .
-ENV GOARCH=$TARGETARCH
-RUN /usr/local/go/bin/go generate ./... \
-    && /usr/local/go/bin/go build -ldflags "-linkmode=external -extldflags='-static' -X=github.com/jmorganca/ollama/version.Version=$VERSION -X=github.com/jmorganca/ollama/server.mode=release" .
-
-FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04
-ENV OLLAMA_HOST 0.0.0.0
-
-ARG USER=ollama
-ARG GROUP=ollama
-RUN groupadd $GROUP && useradd -m -g $GROUP $USER
-
-COPY --from=0 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
-
-USER $USER:$GROUP
-ENTRYPOINT ["/bin/ollama"]
-CMD ["serve"]
Repository: nodejs/node
Pull request: benchmark: add callback-based `fs.glob` to glob benchmark


Changed files:
filename: benchmark/fs/bench-glob.js
patch: @@ -1,7 +1,11 @@
 'use strict';
 
 const common = require('../common');
-const fs = require('fs');
+const {
+  glob,
+  globSync,
+  promises: { glob: globAsync },
+} = require('fs');
 const path = require('path');
 const assert = require('node:assert');
 
@@ -11,7 +15,7 @@ const configs = {
   n: [1e3],
   dir: ['lib'],
   pattern: ['**/*', '*.js', '**/**.js'],
-  mode: ['async', 'sync'],
+  mode: ['sync', 'promise', 'callback'],
   recursive: ['true', 'false'],
 };
 
@@ -20,15 +24,33 @@ const bench = common.createBenchmark(main, configs);
 async function main(config) {
   const fullPath = path.resolve(benchmarkDirectory, config.dir);
   const { pattern, recursive, mode } = config;
+  const options = { cwd: fullPath, recursive };
+  const callback = (resolve, reject) => {
+    glob(pattern, options, (err, matches) => {
+      if (err) {
+        reject(err);
+      } else {
+        resolve(matches);
+      }
+    });
+  };
 
   let noDead;
   bench.start();
 
   for (let i = 0; i < config.n; i++) {
-    if (mode === 'async') {
-      noDead = await fs.promises.glob(pattern, { cwd: fullPath, recursive });
-    } else {
-      noDead = fs.globSync(pattern, { cwd: fullPath, recursive });
+    switch (mode) {
+      case 'sync':
+        noDead = globSync(pattern, options);
+        break;
+      case 'promise':
+        noDead = await globAsync(pattern, options);
+        break;
+      case 'callback':
+        noDead = await new Promise(callback);
+        break;
+      default:
+        throw new Error(`Unknown mode: ${mode}`);
     }
   }
Repository: electron/electron
Pull request: fix: `NativeWindowViews::GetRestoredState()` can return wrong state when maximized

Backport of #46450

See that PR for details.


Notes: Fixed a bug that could cause some maximized windows on Linux to report an incorrect window state.

Changed files:
filename: shell/browser/native_window_views.cc
patch: @@ -1851,7 +1851,7 @@ ui::mojom::WindowShowState NativeWindowViews::GetRestoredState() {
       return ui::mojom::WindowShowState::kMaximized;
     }
 #else
-    return ui::mojom::WindowShowState::kMinimized;
+    return ui::mojom::WindowShowState::kMaximized;
 #endif
   }
Repository: electron/electron
Pull request: fix: `NativeWindowViews::GetRestoredState()` can return wrong state when maximized

#### Description of Change

Fix a bug where `NativeWindowViews::GetRestoredState()` could return the wrong state for maximized windows on Linux.

Introduced by the af58931 Chromium 131.0.6744.0 roll, specifically [this change](https://github.com/electron/electron/commit/9840662#diff-f9d7ef71aadb519c42f18e9c0170137f634f267d72036ab62c3c9e4548c266e0L1787-L1788). Since this was part of the 131 roll, it needs to be backported to Electron 34 and higher.

#### Checklist

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed a bug that could cause some maximized windows on Linux to report an incorrect window state.

Changed files:
filename: shell/browser/native_window_views.cc
patch: @@ -1839,7 +1839,7 @@ ui::mojom::WindowShowState NativeWindowViews::GetRestoredState() {
       return ui::mojom::WindowShowState::kMaximized;
     }
 #else
-    return ui::mojom::WindowShowState::kMinimized;
+    return ui::mojom::WindowShowState::kMaximized;
 #endif
   }
Repository: vercel/next.js
Pull request: [test] separate metadata font tests

og image test font requires you to run from the project root, like `pnpm next build` inside the project so the `process.cwd()` can be correct. It's a bit inconvenient to test out the larger test fixture in `test/e2e/app-dir/metadata-dynamic-routes` from the monorepo root. Hence I move the font cases into separate test so it won't get blocked with manual test.

Changed files:
filename: test/e2e/app-dir/metadata-dynamic-routes/index.test.ts
patch: @@ -330,16 +330,6 @@ describe('app dir - metadata dynamic routes', () => {
       // should already normalize the parallel routes segment to url
       expect(ogImageUrl).not.toContain('(group)')
     })
-
-    it('should handle custom fonts in both edge and nodejs runtime', async () => {
-      const resOgEdge = await next.fetch('/font/opengraph-image')
-      const resOgNodejs = await next.fetch('/font/opengraph-image2')
-
-      expect(resOgEdge.status).toBe(200)
-      expect(resOgEdge.headers.get('content-type')).toBe('image/png')
-      expect(resOgNodejs.status).toBe(200)
-      expect(resOgNodejs.headers.get('content-type')).toBe('image/png')
-    })
   })
 
   describe('icon image routes', () => {

filename: test/e2e/app-dir/metadata-font/app/layout.tsx
patch: @@ -0,0 +1,11 @@
+export default function RootLayout({
+  children,
+}: {
+  children: React.ReactNode
+}) {
+  return (
+    <html>
+      <body>{children}</body>
+    </html>
+  )
+}

filename: test/e2e/app-dir/metadata-font/metadata-font.test.ts
patch: @@ -0,0 +1,17 @@
+import { nextTestSetup } from 'e2e-utils'
+
+describe('app dir - metadata font', () => {
+  const { next } = nextTestSetup({
+    files: __dirname,
+  })
+
+  it('should handle custom fonts in both edge and nodejs runtime', async () => {
+    const resOgEdge = await next.fetch('/font/opengraph-image')
+    const resOgNodejs = await next.fetch('/font/opengraph-image2')
+
+    expect(resOgEdge.status).toBe(200)
+    expect(resOgEdge.headers.get('content-type')).toBe('image/png')
+    expect(resOgNodejs.status).toBe(200)
+    expect(resOgNodejs.headers.get('content-type')).toBe('image/png')
+  })
+})

filename: test/e2e/app-dir/metadata-font/next.config.js
patch: @@ -0,0 +1,10 @@
+/** @type {import('next').NextConfig} */
+module.exports = {}
+
+// For development: analyze the bundled chunks for stats app
+if (process.env.ANALYZE) {
+  const withBundleAnalyzer = require('@next/bundle-analyzer')({
+    enabled: true,
+  })
+  module.exports = withBundleAnalyzer(module.exports)
+}