helloadhavan/github_issues huggingface dataset:
Repository: nodejs/node
Pull request: src: fix `-Wunreachable-code-return` in `node_sea`

As in title - correct the following:

```
../../third_party/electron_node/src/node_sea.cc:641:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
  641 |   return false;
      |          ^~~~~
1 error generated.
```
<!--
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: src/node_sea.cc
patch: @@ -640,8 +640,9 @@ bool MaybeLoadSingleExecutableApplication(Environment* env) {
 
   LoadEnvironment(env, LoadSingleExecutableApplication);
   return true;
-#endif
+#else
   return false;
+#endif
 }
 
 void Initialize(Local<Object> target,
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in `ext/node/polyfills/path/separator.ts`

Towards #24236

Changed files:
filename: ext/node/polyfills/path/separator.ts
patch: @@ -1,9 +1,11 @@
 // Copyright 2018-2025 the Deno authors. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
-
 import { isWindows } from "ext:deno_node/_util/os.ts";
+import { primordials } from "ext:core/mod.js";
+
+const { SafeRegExp } = primordials;
 
 export const SEP = isWindows ? "\\" : "/";
-export const SEP_PATTERN = isWindows ? /[\\/]+/ : /\/+/;
+export const SEP_PATTERN = isWindows
+  ? new SafeRegExp("[\\\\/]+")
+  : new SafeRegExp("\/+");
Repository: ggml-org/llama.cpp
Pull request: fix(trim): prevent assertion failure in trim function

When compiling with **MSVC** in the Debug configuration, during the execution of the `llama_chat_apply_template` function, the `trim` function (located in src/llama-chat.cpp) is called for certain models (e.g., Gemma 3). If **non-ASCII characters** are present in the `const struct llama_chat_message * chat` passed to the `llama_chat_apply_template` function, the assertion within the `isspace` function in the `trim` function will trigger an **Assertion Failed error**. The error message displays the expression: **c >= -1 && c <= 255**.

To resolve this problem, I added `static_cast<unsigned char>` to the `isspace` call, ensuring that negative-valued non-ASCII characters are converted to positive values.

Changed files:
filename: src/llama-chat.cpp
patch: @@ -16,10 +16,10 @@
 static std::string trim(const std::string & str) {
     size_t start = 0;
     size_t end = str.size();
-    while (start < end && isspace(str[start])) {
+    while (start < end && isspace(static_cast<unsigned char>(str[start]))) {
         start += 1;
     }
-    while (end > start && isspace(str[end - 1])) {
+    while (end > start && isspace(static_cast<unsigned char>(str[end - 1]))) {
         end -= 1;
     }
     return str.substr(start, end - start);
Repository: denoland/deno
Pull request: fix(install): regression where Deno not used when postinstall script ran script without file extension

`node scripts/postinstall` was not running with Deno anymore and it previously was.

Closes https://github.com/denoland/deno/issues/28780

Changed files:
filename: cli/task_runner.rs
patch: @@ -7,7 +7,6 @@ use std::path::Path;
 use std::path::PathBuf;
 use std::rc::Rc;
 
-use deno_ast::MediaType;
 use deno_core::anyhow::Context;
 use deno_core::error::AnyError;
 use deno_core::futures::future::LocalBoxFuture;
@@ -273,23 +272,19 @@ impl ShellCommand for NodeCommand {
     &self,
     context: ShellCommandContext,
   ) -> LocalBoxFuture<'static, ExecuteResult> {
-    // run with deno if it's a simple invocation, fall back to node
-    // if there are extra flags
-    let mut args: Vec<OsString> = Vec::with_capacity(context.args.len());
+    // continue to use Node if the first argument is a flag
+    // or there are no arguments provided for some reason
     if context.args.is_empty()
       || ({
         let first_arg = context.args[0].to_string_lossy();
         first_arg.starts_with('-') // has a flag
-        || !matches!(
-          MediaType::from_str(&first_arg),
-          MediaType::Cjs | MediaType::Mjs | MediaType::JavaScript
-        )
       })
     {
       return ExecutableCommand::new("node".to_string(), PathBuf::from("node"))
         .execute(context);
     }
 
+    let mut args: Vec<OsString> = Vec::with_capacity(7 + context.args.len());
     args.extend([
       "run".into(),
       "-A".into(),
@@ -302,7 +297,6 @@ impl ShellCommand for NodeCommand {
     args.extend(context.args);
 
     let mut state = context.state;
-
     state.apply_env_var(
       OsStr::new(USE_PKG_JSON_HIDDEN_ENV_VAR_NAME),
       OsStr::new("1"),
Repository: nodejs/node
Pull request: doc: clarify future Corepack removal in v25+

Follow-up to https://github.com/nodejs/node/pull/57747

This highlights the removal, and gives a call to action for existing users.
This is similar to the documentation for punycode https://nodejs.org/api/punycode.html

Changed files:
filename: doc/api/corepack.md
patch: @@ -12,10 +12,9 @@ added:
 
 > Stability: 1 - Experimental
 
-Documentation for this tool can be found on the [Corepack repository][].
+**Corepack will no longer be distributed starting with Node.js v25.**
 
-Despite Corepack being distributed with default installs of Node.js, the package
-managers managed by Corepack are not part of the Node.js distribution, and
-Corepack itself will no longer be distributed with Node.js 25+.
+Users currently depending on the bundled `corepack` executable from Node.js
+can switch to using the userland-provided [corepack][] module.
 
-[Corepack repository]: https://github.com/nodejs/corepack
+[corepack]: https://github.com/nodejs/corepack
Repository: huggingface/transformers
Pull request: Fixed modeling_auto.py MODEL_FOR_MASK_GENERATION_MAPPING_NAMES variable

# What does this PR do?

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->

<!-- Remove if not applicable -->

Fixes https://github.com/huggingface/transformers/issues/38663# (issue)


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@Rocketknight1 @amyeroberts @qubvel 


Changed files:
filename: src/transformers/models/auto/modeling_auto.py
patch: @@ -1529,11 +1529,6 @@
 MODEL_FOR_MASK_GENERATION_MAPPING_NAMES = OrderedDict(
     [
         ("sam", "SamModel"),
-    ]
-)
-
-MODEL_FOR_MASK_GENERATION_MAPPING_NAMES = OrderedDict(
-    [
         ("sam_hq", "SamHQModel"),
     ]
 )
Repository: facebook/react
Pull request: Avoid replaying SelectiveHydrationException in dev

<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->

## Summary
This is discovered by @acdlite.
In dev we replay errors so debugger will treat them as uncaught errors, but we need to ignore internal exceptions.
<!--
 Explain the **motivation** for making this change. What existing problem does the pull request solve?
-->

## How did you test this change?
manually console.log in some tests, and noticed replay didn't happen.
<!--
  Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
  How exactly did you verify that your PR solves the issue you wanted to solve?
  If you leave this empty, your PR will very likely be closed.
-->


Changed files:
filename: packages/react-reconciler/src/ReactFiberWorkLoop.js
patch: @@ -3771,6 +3771,7 @@ if (__DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
       if (
         didSuspendOrErrorWhileHydratingDEV() ||
         originalError === SuspenseException ||
+        originalError === SelectiveHydrationException ||
         (originalError !== null &&
           typeof originalError === 'object' &&
           typeof originalError.then === 'function')
Repository: nodejs/node
Pull request: src: add DCHECK_EQ for Object::New calls

Add DCHECK_EQ check before other Object::New calls as in https://github.com/nodejs/node/pull/57942

Changed files:
filename: src/node_sqlite.cc
patch: @@ -1996,6 +1996,7 @@ void StatementSync::All(const FunctionCallbackInfo<Value>& args) {
         row_values.emplace_back(val);
       }
 
+      DCHECK_EQ(row_keys.size(), row_values.size());
       Local<Object> row_obj = Object::New(
           isolate, Null(isolate), row_keys.data(), row_values.data(), num_cols);
       rows.emplace_back(row_obj);
@@ -2100,6 +2101,7 @@ void StatementSync::Get(const FunctionCallbackInfo<Value>& args) {
       values.emplace_back(val);
     }
 
+    DCHECK_EQ(keys.size(), values.size());
     Local<Object> result = Object::New(
         isolate, Null(isolate), keys.data(), values.data(), num_cols);
 
@@ -2448,6 +2450,7 @@ void StatementSyncIterator::Next(const FunctionCallbackInfo<Value>& args) {
   if (iter->done_) {
     LocalVector<Value> values(isolate,
                               {Boolean::New(isolate, true), Null(isolate)});
+    DCHECK_EQ(values.size(), keys.size());
     Local<Object> result = Object::New(
         isolate, Null(isolate), keys.data(), values.data(), keys.size());
     args.GetReturnValue().Set(result);
@@ -2461,6 +2464,7 @@ void StatementSyncIterator::Next(const FunctionCallbackInfo<Value>& args) {
     sqlite3_reset(iter->stmt_->statement_);
     LocalVector<Value> values(isolate,
                               {Boolean::New(isolate, true), Null(isolate)});
+    DCHECK_EQ(values.size(), keys.size());
     Local<Object> result = Object::New(
         isolate, Null(isolate), keys.data(), values.data(), keys.size());
     args.GetReturnValue().Set(result);
@@ -2493,11 +2497,13 @@ void StatementSyncIterator::Next(const FunctionCallbackInfo<Value>& args) {
       row_values.emplace_back(val);
     }
 
+    DCHECK_EQ(row_keys.size(), row_values.size());
     row_value = Object::New(
         isolate, Null(isolate), row_keys.data(), row_values.data(), num_cols);
   }
 
   LocalVector<Value> values(isolate, {Boolean::New(isolate, false), row_value});
+  DCHECK_EQ(keys.size(), values.size());
   Local<Object> result = Object::New(
       isolate, Null(isolate), keys.data(), values.data(), keys.size());
   args.GetReturnValue().Set(result);
@@ -2516,6 +2522,8 @@ void StatementSyncIterator::Return(const FunctionCallbackInfo<Value>& args) {
   LocalVector<Name> keys(isolate, {env->done_string(), env->value_string()});
   LocalVector<Value> values(isolate,
                             {Boolean::New(isolate, true), Null(isolate)});
+
+  DCHECK_EQ(keys.size(), values.size());
   Local<Object> result = Object::New(
       isolate, Null(isolate), keys.data(), values.data(), keys.size());
   args.GetReturnValue().Set(result);
Repository: vercel/next.js
Pull request: fix(next-swc): Apply SWC minifier bugfixes

### What?

Update `swc_core` to `v29.4.2` 

### Why?

To apply https://github.com/swc-project/swc/pull/10740 and https://github.com/swc-project/swc/pull/10741

Closes PACK-4969

Changed files:
filename: Cargo.lock
patch: @@ -7131,9 +7131,9 @@ dependencies = [
 
 [[package]]
 name = "swc_core"
-version = "29.4.0"
+version = "29.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "991fb5308ade9fb838316d0f1790bf2df25b0cafa6ac2515450e8003107201ae"
+checksum = "b41f837258f84d0d6d0a1dd8bbd277bbab34de9fa2180b6bc6e838f652b304c9"
 dependencies = [
  "binding_macros",
  "par-core",
@@ -8018,9 +8018,9 @@ dependencies = [
 
 [[package]]
 name = "swc_ecma_usage_analyzer"
-version = "19.0.0"
+version = "19.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c357c7ff7ae2bf50adbe89c04ed94c9b99d34563df69386aba15a05e4560fc9a"
+checksum = "209cc62665a5a6f7cded15c198a27b5aed49f8f4bc2b1c14ebec61c02889b2e6"
 dependencies = [
  "bitflags 2.9.1",
  "indexmap 2.9.0",
@@ -8036,9 +8036,9 @@ dependencies = [
 
 [[package]]
 name = "swc_ecma_utils"
-version = "18.0.1"
+version = "18.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "938751c806f23256256e6839914ab33e4ac6e79a3fa2e717d004469881d2e3df"
+checksum = "f9d4bc1a89ef29769cf3e16c79a79836f21a7a3975fa34a9b748d0a9d3771daf"
 dependencies = [
  "indexmap 2.9.0",
  "num_cpus",

filename: Cargo.toml
patch: @@ -298,7 +298,7 @@ turbopack-trace-utils = { path = "turbopack/crates/turbopack-trace-utils" }
 turbopack-wasm = { path = "turbopack/crates/turbopack-wasm" }
 
 # SWC crates
-swc_core = { version = "29.4.0", features = [
+swc_core = { version = "29.4.2", features = [
   "ecma_loader_lru",
   "ecma_loader_parking_lot",
   "parallel_rayon",
Repository: electron/electron
Pull request: fix: WCO not working with some window configurations

Backport of #45422

See that PR for details.


Notes: Fixed an issue where Windows Control Overlay didn't work with some window configurations.

Changed files:
filename: shell/browser/native_window_views.cc
patch: @@ -701,6 +701,15 @@ void NativeWindowViews::Minimize() {
 }
 
 void NativeWindowViews::Restore() {
+#if BUILDFLAG(IS_WIN)
+  if (IsMaximized() && transparent()) {
+    SetBounds(restore_bounds_, false);
+    NotifyWindowRestore();
+    UpdateThickFrame();
+    return;
+  }
+#endif
+
   widget()->Restore();
 
 #if BUILDFLAG(IS_WIN)

filename: shell/browser/ui/views/win_caption_button_container.cc
patch: @@ -48,27 +48,26 @@ bool HitTestCaptionButton(WinCaptionButton* button, const gfx::Point& point) {
 WinCaptionButtonContainer::WinCaptionButtonContainer(WinFrameView* frame_view)
     : frame_view_(frame_view),
       minimize_button_(AddChildView(CreateCaptionButton(
-          base::BindRepeating(&views::Widget::Minimize,
-                              base::Unretained(frame_view_->frame())),
+          base::BindRepeating(&NativeWindow::Minimize,
+                              base::Unretained(frame_view_->window())),
           frame_view_,
           VIEW_ID_MINIMIZE_BUTTON,
           IDS_APP_ACCNAME_MINIMIZE))),
       maximize_button_(AddChildView(CreateCaptionButton(
-          base::BindRepeating(&views::Widget::Maximize,
-                              base::Unretained(frame_view_->frame())),
+          base::BindRepeating(&NativeWindow::Maximize,
+                              base::Unretained(frame_view_->window())),
           frame_view_,
           VIEW_ID_MAXIMIZE_BUTTON,
           IDS_APP_ACCNAME_MAXIMIZE))),
       restore_button_(AddChildView(CreateCaptionButton(
-          base::BindRepeating(&views::Widget::Restore,
-                              base::Unretained(frame_view_->frame())),
+          base::BindRepeating(&NativeWindow::Restore,
+                              base::Unretained(frame_view_->window())),
           frame_view_,
           VIEW_ID_RESTORE_BUTTON,
           IDS_APP_ACCNAME_RESTORE))),
       close_button_(AddChildView(CreateCaptionButton(
-          base::BindRepeating(&views::Widget::CloseWithReason,
-                              base::Unretained(frame_view_->frame()),
-                              views::Widget::ClosedReason::kCloseButtonClicked),
+          base::BindRepeating(&NativeWindow::Close,
+                              base::Unretained(frame_view_->window())),
           frame_view_,
           VIEW_ID_CLOSE_BUTTON,
           IDS_APP_ACCNAME_CLOSE))) {
@@ -152,7 +151,7 @@ void WinCaptionButtonContainer::UpdateButtons() {
   minimize_button_->SetEnabled(minimizable);
   minimize_button_->SetVisible(minimizable);
 
-  const bool is_maximized = frame_view_->frame()->IsMaximized();
+  const bool is_maximized = frame_view_->window()->IsMaximized();
   const bool maximizable = frame_view_->window()->IsMaximizable();
   restore_button_->SetVisible(is_maximized && maximizable);
   maximize_button_->SetVisible(!is_maximized && maximizable);
Repository: facebook/react
Pull request: Make temporary `NoStrictPassiveEffects` option work with `useModernStrictMode`

## Summary
Since we are enabling `useModernStrictMode` flag internally, to make sure the internal testing of half StrictMode doesn't suddenly break, this PR makes sure it also works with `useModernStrictMode` true.


## Test plan:
Manually set `useModernStrictMode` to true.
`yarn test ReactOffscreenStrictMode-test -r=www-modern --env=development --variant=true`
`yarn test ReactStrictMode-test.internal -r=www-modern --env=development --variant=true`

Changed files:
filename: packages/react-reconciler/src/ReactFiberWorkLoop.js
patch: @@ -90,6 +90,7 @@ import {
   ConcurrentMode,
   StrictLegacyMode,
   StrictEffectsMode,
+  NoStrictPassiveEffectsMode,
 } from './ReactTypeOfMode';
 import {
   HostRoot,
@@ -3538,11 +3539,19 @@ function recursivelyTraverseAndDoubleInvokeEffectsInDEV(
 }
 
 // Unconditionally disconnects and connects passive and layout effects.
-function doubleInvokeEffectsOnFiber(root: FiberRoot, fiber: Fiber) {
+function doubleInvokeEffectsOnFiber(
+  root: FiberRoot,
+  fiber: Fiber,
+  shouldDoubleInvokePassiveEffects: boolean = true,
+) {
   disappearLayoutEffects(fiber);
-  disconnectPassiveEffect(fiber);
+  if (shouldDoubleInvokePassiveEffects) {
+    disconnectPassiveEffect(fiber);
+  }
   reappearLayoutEffects(root, fiber.alternate, fiber, false);
-  reconnectPassiveEffects(root, fiber, NoLanes, null, false);
+  if (shouldDoubleInvokePassiveEffects) {
+    reconnectPassiveEffects(root, fiber, NoLanes, null, false);
+  }
 }
 
 function doubleInvokeEffectsInDEVIfNecessary(
@@ -3559,7 +3568,11 @@ function doubleInvokeEffectsInDEVIfNecessary(
     if (fiber.flags & PlacementDEV) {
       setCurrentDebugFiberInDEV(fiber);
       if (isInStrictMode) {
-        doubleInvokeEffectsOnFiber(root, fiber);
+        doubleInvokeEffectsOnFiber(
+          root,
+          fiber,
+          (fiber.mode & NoStrictPassiveEffectsMode) === NoMode,
+        );
       }
       resetCurrentDebugFiberInDEV();
     } else {
Repository: huggingface/transformers
Pull request: fix: fixed wrong concatenation which made batching results wrong

# What does this PR do?

Fixes #38348


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

@qubvel

Changed files:
filename: src/transformers/models/superglue/modeling_superglue.py
patch: @@ -725,8 +725,8 @@ def _match_image_pair(
         matches0 = torch.where(valid0, indices0, indices0.new_tensor(-1))
         matches1 = torch.where(valid1, indices1, indices1.new_tensor(-1))
 
-        matches = torch.cat([matches0, matches1]).reshape(batch_size, 2, -1)
-        matching_scores = torch.cat([matching_scores0, matching_scores1]).reshape(batch_size, 2, -1)
+        matches = torch.cat([matches0, matches1], dim=1).reshape(batch_size, 2, -1)
+        matching_scores = torch.cat([matching_scores0, matching_scores1], dim=1).reshape(batch_size, 2, -1)
 
         if output_hidden_states:
             all_hidden_states = all_hidden_states + encoded_keypoints[1]