helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [tests] assertLog before act in ReactDOMServerSelectiveHydration

Fixes tests blocking https://github.com/facebook/react/pull/28737

Changed files:
filename: packages/react-dom/src/__tests__/ReactDOMServerSelectiveHydration-test.internal.js
patch: @@ -1114,14 +1114,16 @@ describe('ReactDOMServerSelectiveHydration', () => {
       // Outer was hydrated earlier
       OuterTestUtils.assertLog([]);
 
+      // First Inner Mouse Enter fires then Outer Mouse Enter
+      assertLog(['Inner Mouse Enter', 'Outer Mouse Enter']);
+
       await act(() => {
         Scheduler.unstable_flushAllWithoutAsserting();
         OuterScheduler.unstable_flushAllWithoutAsserting();
         InnerScheduler.unstable_flushAllWithoutAsserting();
       });
 
-      // First Inner Mouse Enter fires then Outer Mouse Enter
-      assertLog(['Inner Mouse Enter', 'Outer Mouse Enter']);
+      assertLog([]);
     });
   });
Repository: ollama/ollama
Pull request: server: print version on start


Changed files:
filename: server/routes.go
patch: @@ -26,6 +26,7 @@ import (
 
 	"github.com/jmorganca/ollama/api"
 	"github.com/jmorganca/ollama/llm"
+	"github.com/jmorganca/ollama/version"
 )
 
 var mode string = gin.DebugMode
@@ -588,7 +589,7 @@ func Serve(ln net.Listener, allowOrigins []string) error {
 		r.Handle(method, "/api/tags", ListModelsHandler)
 	}
 
-	log.Printf("Listening on %s", ln.Addr())
+	log.Printf("Listening on %s (version %s)", ln.Addr(), version.Version)
 	s := &http.Server{
 		Handler: r,
 	}
Repository: electron/electron
Pull request: revert: allow NSMenuItems to be disabled

Reverting this PR due to some regressions with the menu items - will investigate separately and raise a new PR once regressions are resolved

Closes https://github.com/electron/electron/issues/46501
Closes https://github.com/electron/electron/issues/46485

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [x] relevant API documentation, tutorials, and examples are updated and follow the [documentation style guide](https://github.com/electron/electron/blob/main/docs/development/style-guide.md)
- [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: Reverts a change that greyed out disabled menu items on macOS (https://github.com/electron/electron/pull/46307)

Changed files:
filename: shell/browser/ui/cocoa/electron_menu_controller.mm
patch: @@ -320,10 +320,6 @@ - (NSMenuItem*)makeMenuItemForIndex:(NSInteger)index
   NSMenuItem* item = [[NSMenuItem alloc] initWithTitle:label
                                                 action:@selector(itemSelected:)
                                          keyEquivalent:@""];
-  if (model->IsEnabledAt(index))
-    [item setEnabled:YES];
-  else
-    [item setEnabled:NO];
 
   // If the menu item has an icon, set it.
   ui::ImageModel icon = model->GetIconAt(index);
@@ -353,6 +349,11 @@ - (NSMenuItem*)makeMenuItemForIndex:(NSInteger)index
     [item setSubmenu:[self createShareMenuForItem:sharing_item]];
   } else if (type == electron::ElectronMenuModel::TYPE_SUBMENU &&
              model->IsVisibleAt(index)) {
+    // We need to specifically check that the submenu top-level item has been
+    // enabled as it's not validated by validateUserInterfaceItem
+    if (!model->IsEnabledAt(index))
+      [item setEnabled:NO];
+
     // Recursively build a submenu from the sub-model at this index.
     [item setTarget:nil];
     [item setAction:nil];
@@ -492,10 +493,8 @@ - (void)performShare:(NSMenuItem*)sender {
 }
 
 - (NSMenu*)menu {
-  if (menu_) {
-    [menu_ setAutoenablesItems:NO];
+  if (menu_)
     return menu_;
-  }
 
   if (model_ && model_->sharing_item()) {
     NSMenu* menu = [self createShareMenuForItem:*model_->sharing_item()];
@@ -505,8 +504,6 @@ - (NSMenu*)menu {
     if (model_)
       [self populateWithModel:model_.get()];
   }
-
-  [menu_ setAutoenablesItems:NO];
   [menu_ setDelegate:self];
   return menu_;
 }
Repository: nodejs/node
Pull request: fs: fix fs.promises.mkdir to also report ENOSPC correctly

Continuation of https://github.com/nodejs/node/pull/42811 which fixes https://github.com/nodejs/node/issues/42808 for the async case

Happy to try to write a test but left as is for now seeing as the previous PR also didn't: https://github.com/nodejs/node/pull/42811#pullrequestreview-948610220

Changed files:
filename: src/node_file.cc
patch: @@ -1813,6 +1813,7 @@ int MKDirpAsync(uv_loop_t* loop,
           break;
         }
         case UV_EACCES:
+        case UV_ENOSPC:
         case UV_ENOTDIR:
         case UV_EPERM: {
           req_wrap->continuation_data()->Done(err);
Repository: denoland/deno
Pull request: fix(node): reduce chance of module not found error due to missing copy package

* https://github.com/denoland/deno_npm/pull/115

Changed files:
filename: Cargo.lock
patch: @@ -2557,9 +2557,9 @@ dependencies = [
 
 [[package]]
 name = "deno_npm"
-version = "0.38.0"
+version = "0.38.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c11034223675352ee51fd2c564600b1bc4a0bd04de2b54fe91df505c73dbb042"
+checksum = "80af8018f8ba59cb1b2da276e55b3765c5ac66181dc59c4bd724aa19cfbb3134"
 dependencies = [
  "async-trait",
  "capacity_builder",

filename: Cargo.toml
patch: @@ -72,7 +72,7 @@ deno_lint = "=0.80.0"
 deno_lockfile = "=0.31.2"
 deno_media_type = { version = "=0.2.9", features = ["module_specifier"] }
 deno_native_certs = "0.3.0"
-deno_npm = "=0.38.0"
+deno_npm = "=0.38.1"
 deno_path_util = "=0.6.1"
 deno_semver = "=0.9.0"
 deno_task_shell = "=0.26.0"
Repository: vercel/next.js
Pull request: fix: add path normalization to getRelativePath for Windows

See https://github.com/vercel/next.js/pull/82761#pullrequestreview-3130058419

Changed files:
filename: packages/next/src/server/lib/router-utils/route-types-utils.ts
patch: @@ -20,6 +20,7 @@ import {
   UNDERSCORE_GLOBAL_ERROR_ROUTE,
   UNDERSCORE_NOT_FOUND_ROUTE,
 } from '../../../shared/lib/entry-constants'
+import { normalizePathSep } from '../../../shared/lib/page-path/normalize-path-sep'
 
 interface RouteInfo {
   path: string
@@ -170,10 +171,12 @@ export async function createRouteTypesManifest({
   const getRelativePath = (filePath: string) => {
     if (validatorFilePath) {
       // For validator generation, calculate path relative to validator directory
-      return path.relative(path.dirname(validatorFilePath), filePath)
+      return normalizePathSep(
+        path.relative(path.dirname(validatorFilePath), filePath)
+      )
     }
     // For other uses, calculate path relative to project directory
-    return path.relative(dir, filePath)
+    return normalizePathSep(path.relative(dir, filePath))
   }
 
   const manifest: RouteTypesManifest = {
Repository: electron/electron
Pull request: perf: avoid redundant virtual method call in `NativeWindowViews::SetEnabledInternal()`

Backport of #46508

See that PR for details.


Notes: none.

Changed files:
filename: shell/browser/native_window_views.cc
patch: @@ -623,11 +623,8 @@ bool NativeWindowViews::ShouldBeEnabled() const {
 }
 
 void NativeWindowViews::SetEnabledInternal(bool enable) {
-  if (enable && IsEnabled()) {
+  if (enable == IsEnabled())
     return;
-  } else if (!enable && !IsEnabled()) {
-    return;
-  }
 
 #if BUILDFLAG(IS_WIN)
   ::EnableWindow(GetAcceleratedWidget(), enable);
Repository: ggml-org/llama.cpp
Pull request: cuda : fix argsort with 64k+ rows

The non-CUB `ARGSORT` would fail with 64k+ rows (`-ub 8192` with expert group selection) due to storing `nrows` in the 16-bit `y`-dimension.

Changed files:
filename: ggml/src/ggml-cuda/argsort.cu
patch: @@ -87,7 +87,7 @@ template<ggml_sort_order order>
 static __global__ void k_argsort_f32_i32(const float * x, int * dst, const int ncols, int ncols_pad) {
     // bitonic sort
     int col = threadIdx.x;
-    int row = blockIdx.y;
+    int row = blockIdx.x;
 
     if (col >= ncols_pad) {
         return;
@@ -151,7 +151,7 @@ static void argsort_f32_i32_cuda_bitonic(const float *   x,
     const int ncols_pad = next_power_of_2(ncols);
 
     const dim3 block_dims(ncols_pad, 1, 1);
-    const dim3 block_nums(1, nrows, 1);
+    const dim3 block_nums(nrows, 1, 1);
     const size_t shared_mem = ncols_pad * sizeof(int);
 
     // FIXME: this limit could be raised by ~2-4x on Ampere or newer

filename: tests/test-backend-ops.cpp
patch: @@ -7111,7 +7111,8 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
         test_cases.emplace_back(new test_argsort(GGML_TYPE_F32, {16, 10, 10, 10}, order));
         test_cases.emplace_back(new test_argsort(GGML_TYPE_F32, {60, 10, 10, 10}, order)); // qwen
         test_cases.emplace_back(new test_argsort(GGML_TYPE_F32, {1024, 1, 1, 1}, order));
-        test_cases.emplace_back(new test_argsort(GGML_TYPE_F32, {16384, 1, 1, 1}, order)); // bailingmoe2 (group selection)
+        test_cases.emplace_back(new test_argsort(GGML_TYPE_F32, {16384, 1, 1, 1}, order)); // many backends only handle up to 1024
+        test_cases.emplace_back(new test_argsort(GGML_TYPE_F32, {2, 8, 8192, 1}, order)); // bailingmoe2 (group selection)
     }
 
     for (ggml_scale_mode mode : {GGML_SCALE_MODE_NEAREST, GGML_SCALE_MODE_BILINEAR}) {
Repository: facebook/react
Pull request: [tests] assertLog before act in ReactCompositeComponentState

Fixes tests blocking https://github.com/facebook/react/pull/28737

Changed files:
filename: packages/react-dom/src/__tests__/ReactCompositeComponentState-test.js
patch: @@ -152,21 +152,6 @@ describe('ReactCompositeComponent-state', () => {
       root.render(<TestComponent />);
     });
 
-    await act(() => {
-      root.render(<TestComponent nextColor="green" />);
-    });
-
-    await act(() => {
-      testComponentInstance.setFavoriteColor('blue');
-    });
-    await act(() => {
-      testComponentInstance.forceUpdate(
-        testComponentInstance.peekAtCallback('forceUpdate'),
-      );
-    });
-
-    root.unmount();
-
     assertLog([
       // there is no state when getInitialState() is called
       'getInitialState undefined',
@@ -198,6 +183,13 @@ describe('ReactCompositeComponent-state', () => {
       'componentDidUpdate-prevState orange',
       'setState-yellow yellow',
       'commit yellow',
+    ]);
+
+    await act(() => {
+      root.render(<TestComponent nextColor="green" />);
+    });
+
+    assertLog([
       'componentWillReceiveProps-start yellow',
       // setState({color:'green'}) only enqueues a pending state.
       'componentWillReceiveProps-end yellow',
@@ -216,6 +208,13 @@ describe('ReactCompositeComponent-state', () => {
       'componentDidUpdate-prevState yellow',
       'setState-receiveProps green',
       'commit green',
+    ]);
+
+    await act(() => {
+      testComponentInstance.setFavoriteColor('blue');
+    });
+
+    assertLog([
       // setFavoriteColor('blue')
       'shouldComponentUpdate-currentState green',
       'shouldComponentUpdate-nextState blue',
@@ -226,6 +225,13 @@ describe('ReactCompositeComponent-state', () => {
       'componentDidUpdate-prevState green',
       'setFavoriteColor blue',
       'commit blue',
+    ]);
+    await act(() => {
+      testComponentInstance.forceUpdate(
+        testComponentInstance.peekAtCallback('forceUpdate'),
+      );
+    });
+    assertLog([
       // forceUpdate()
       'componentWillUpdate-currentState blue',
       'componentWillUpdate-nextState blue',
@@ -234,7 +240,12 @@ describe('ReactCompositeComponent-state', () => {
       'componentDidUpdate-prevState blue',
       'forceUpdate blue',
       'commit blue',
-      // unmountComponent()
+    ]);
+
+    root.unmount();
+
+    assertLog([
+      // unmount()
       // state is available within `componentWillUnmount()`
       'componentWillUnmount blue',
     ]);
@@ -375,13 +386,13 @@ describe('ReactCompositeComponent-state', () => {
     await act(() => {
       root.render(<Parent />);
     });
+
+    assertLog(['parent render one', 'child render one']);
     await act(() => {
       root.render(<Parent />);
     });
 
     assertLog([
-      'parent render one',
-      'child render one',
       'parent render one',
       'child componentWillReceiveProps one',
       'child componentWillReceiveProps done one',
Repository: huggingface/transformers
Pull request: Fix UnboundLocalError in WER metric computation

## Summary
Fixes a variable naming conflict in the `compute_metrics` function example in the ASR documentation that causes an `UnboundLocalError`.

## Problem
The original code had a naming conflict where `wer` was used both as:
1. The loaded evaluate metric (`wer = evaluate.load("wer")`)
2. The variable to store the computed result (`wer = wer.compute(...)`)

This caused Python to treat `wer` as a local variable throughout the function, leading to an `UnboundLocalError` when trying to access it before assignment.

## Solution
- Renamed the global metric variable from `wer` to `wer_metric` 
- Stored the result in `wer_score`

## Changes
- `docs/source/en/tasks/asr.md`: Fixed variable naming in compute_metrics example

## Testing
- [ ] Code runs without UnboundLocalError
- [ ] WER metric computation works correctly
- [ ] Documentation builds successfully

## Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update


Changed files:
filename: docs/source/en/tasks/asr.md
patch: @@ -219,9 +219,9 @@ Then create a function that passes your predictions and labels to [`~evaluate.Ev
 ...     pred_str = processor.batch_decode(pred_ids)
 ...     label_str = processor.batch_decode(pred.label_ids, group_tokens=False)
 
-...     wer = wer.compute(predictions=pred_str, references=label_str)
+...     wer_score = wer.compute(predictions=pred_str, references=label_str)
 
-...     return {"wer": wer}
+...     return {"wer": wer_score}
 ```
 
 Your `compute_metrics` function is ready to go now, and you'll return to it when you setup your training.
Repository: ollama/ollama
Pull request: check update response


Changed files:
filename: app/src/index.ts
patch: @@ -168,17 +168,26 @@ async function isNewReleaseAvailable() {
   try {
     const response = await fetch('https://ollama.ai/api/update')
 
+    if (!response.ok) {
+      return false
+    }
+
     if (response.status === 204) {
       return false
     }
 
     const data = await response.json()
 
-    if (currentReleaseURL === data.url) {
+    const url = data?.url
+    if (!url) {
+      return false
+    }
+
+    if (url === currentReleaseURL) {
       return false
     }
 
-    currentReleaseURL = data.url
+    currentReleaseURL = url
     return true
   } catch (error) {
     logger.error(`update check failed - ${error}`)
Repository: nodejs/node
Pull request: doc: add islandryu to collaborators

Fixes: https://github.com/nodejs/node/issues/58559

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: README.md
patch: @@ -355,6 +355,8 @@ For information about the governance of the Node.js project, see
   **Harshitha K P** <<harshitha014@gmail.com>> (she/her)
 * [himself65](https://github.com/himself65) -
   **Zeyu "Alex" Yang** <<himself65@outlook.com>> (he/him)
+* [islandryu](https://github.com/islandryu) -
+  **Ryuhei Shima** <<shimaryuhei@gmail.com>> (he/him)
 * [jakecastelli](https://github.com/jakecastelli) -
   **Jake Yuesong Li** <<jake.yuesong@gmail.com>> (he/him)
 * [JakobJingleheimer](https://github.com/JakobJingleheimer) -
Repository: denoland/deno
Pull request: fix(permissions): point to correct config file in error message in workspace containing permissions at root

Closes https://github.com/denoland/deno/issues/30739

Changed files:
filename: cli/args/mod.rs
patch: @@ -1065,27 +1065,21 @@ impl CliOptions {
         let set_config_permission_name = match &self.flags.subcommand {
           DenoSubcommand::Bench(_) => dir
             .to_bench_permissions_config()?
-            .is_some()
-            .then_some("Bench"),
+            .map(|permissions| ("Bench", &permissions.base)),
           DenoSubcommand::Compile(_) => dir
             .to_compile_permissions_config()?
-            .is_some()
-            .then_some("Compile"),
+            .map(|permissions| ("Compile", &permissions.base)),
           DenoSubcommand::Test(_) => dir
             .to_test_permissions_config()?
-            .is_some()
-            .then_some("Test"),
+            .map(|permissions| ("Test", &permissions.base)),
           _ => None,
         };
-        if let Some(name) = set_config_permission_name {
+        if let Some((name, config_file_url)) = set_config_permission_name {
           // prevent people from wasting time wondering why benches/tests are failing
           bail!(
-            "{} permissions were found in the config file. Did you mean to run with `-P` or a permission flag?{}",
+            "{} permissions were found in the config file. Did you mean to run with `-P` or a permission flag?\n    at {}",
             name,
-            dir
-              .maybe_deno_json()
-              .map(|d| format!("\n    at {}", d.specifier))
-              .unwrap_or_default()
+            config_file_url
           );
         }
       }

filename: tests/specs/test/config_permissions/workspace/__test__.jsonc
patch: @@ -1,4 +1,25 @@
 {
-  "args": "test -P",
-  "output": "test.out"
+  "tests": {
+    "flag": {
+      "args": "test -P",
+      "output": "test.out"
+    },
+    "no_flag": {
+      "args": "test",
+      "exitCode": 1,
+      "output": "missing_flag.out"
+    },
+    "no_flag_sub_dir_permissions": {
+      "args": "test",
+      "cwd": "./a",
+      "exitCode": 1,
+      "output": "missing_flag_a.out"
+    },
+    "no_flag_sub_dir_no_permissions": {
+      "args": "test",
+      "cwd": "./b",
+      "exitCode": 1,
+      "output": "missing_flag.out"
+    }
+  }
 }

filename: tests/specs/test/config_permissions/workspace/missing_flag.out
patch: @@ -0,0 +1,2 @@
+error: Test permissions were found in the config file. Did you mean to run with `-P` or a permission flag?
+    at file:///[WILDLINE]/workspace/deno.json

filename: tests/specs/test/config_permissions/workspace/missing_flag_a.out
patch: @@ -0,0 +1,2 @@
+error: Test permissions were found in the config file. Did you mean to run with `-P` or a permission flag?
+    at file:///[WILDLINE]/workspace/a/deno.json
Repository: denoland/deno
Pull request: fix(ext/node): validate fs.read on empty buffer

Towards #29972

Allows https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-read-empty-buffer.js test to pass. 

Changed files:
filename: ext/node/polyfills/_fs/_fs_read.ts
patch: @@ -4,7 +4,10 @@
 // deno-lint-ignore-file prefer-primordials
 
 import { Buffer } from "node:buffer";
-import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts";
+import {
+  ERR_INVALID_ARG_TYPE,
+  ERR_INVALID_ARG_VALUE,
+} from "ext:deno_node/internal/errors.ts";
 import * as io from "ext:deno_io/12_io.js";
 import { ReadOptions } from "ext:deno_node/_fs/_fs_common.ts";
 import {
@@ -20,6 +23,7 @@ import { isArrayBufferView } from "ext:deno_node/internal/util/types.ts";
 import { op_fs_seek_async, op_fs_seek_sync } from "ext:core/ops";
 import { primordials } from "ext:core/mod.js";
 import { customPromisifyArgs } from "ext:deno_node/internal/util.mjs";
+import * as process from "node:process";
 
 const { ObjectDefineProperty } = primordials;
 
@@ -110,6 +114,20 @@ export function read(
     position = opt.position ?? null;
   }
 
+  if (length === 0) {
+    return process.nextTick(function tick() {
+      cb(null, 0, buffer);
+    });
+  }
+
+  if (buffer.byteLength === 0) {
+    throw new ERR_INVALID_ARG_VALUE(
+      "buffer",
+      buffer,
+      "is empty and cannot be written",
+    );
+  }
+
   if (position == null) {
     position = -1;
   }
@@ -196,6 +214,18 @@ export function readSync(
     position = opt.position ?? null;
   }
 
+  if (length === 0) {
+    return 0;
+  }
+
+  if (buffer.byteLength === 0) {
+    throw new ERR_INVALID_ARG_VALUE(
+      "buffer",
+      buffer,
+      "is empty and cannot be written",
+    );
+  }
+
   if (position == null) {
     position = -1;
   }

filename: ext/node/polyfills/internal/fs/handle.ts
patch: @@ -20,6 +20,7 @@ import {
   CreateReadStreamOptions,
   CreateWriteStreamOptions,
 } from "node:fs/promises";
+import { SymbolAsyncDispose } from "ext:deno_web/00_infra.js";
 const {
   Error,
   ObjectAssign,
@@ -199,6 +200,10 @@ export class FileHandle extends EventEmitter {
   createWriteStream(options?: CreateWriteStreamOptions): WriteStream {
     return new WriteStream(undefined, { ...options, fd: this.fd });
   }
+
+  [SymbolAsyncDispose]() {
+    return this.close();
+  }
 }
 
 function assertNotClosed(handle: FileHandle, syscall: string) {

filename: tests/node_compat/config.toml
patch: @@ -451,6 +451,7 @@
 "parallel/test-fs-promises-exists.js" = {}
 "parallel/test-fs-promises-readfile-empty.js" = {}
 "parallel/test-fs-promisified.js" = {}
+"parallel/test-fs-read-empty-buffer.js" = {}
 "parallel/test-fs-read-file-sync-hostname.js" = {}
 "parallel/test-fs-read-stream-autoClose.js" = {}
 "parallel/test-fs-read-stream-double-close.js" = {}