helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Fix enableTransitionTracing flag

Move `enableTransitionTracing` to `dynamicFeatureFlags` so it runs when you run `yarn test`

Changed files:
filename: packages/react-noop-renderer/src/createReactNoop.js
patch: @@ -806,6 +806,7 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {
           false,
           '',
           onRecoverableError,
+          null,
         );
         roots.set(rootID, root);
       }
@@ -859,6 +860,7 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {
         false,
         '',
         onRecoverableError,
+        null,
       );
       return {
         _Scheduler: Scheduler,

filename: packages/react-reconciler/src/ReactFiber.new.js
patch: @@ -734,6 +734,9 @@ export function createFiberFromLegacyHidden(
   const fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode);
   fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
   fiber.lanes = lanes;
+  // Adding a stateNode for legacy hidden because it's currently using
+  // the offscreen implementation, which depends on a state node
+  fiber.stateNode = {};
   return fiber;
 }
 

filename: packages/react-reconciler/src/ReactFiber.old.js
patch: @@ -734,6 +734,9 @@ export function createFiberFromLegacyHidden(
   const fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode);
   fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
   fiber.lanes = lanes;
+  // Adding a stateNode for legacy hidden because it's currently using
+  // the offscreen implementation, which depends on a state node
+  fiber.stateNode = {};
   return fiber;
 }
 

filename: packages/react/index.classic.fb.js
patch: @@ -34,6 +34,7 @@ export {
   startTransition,
   startTransition as unstable_startTransition, // TODO: Remove once call sights updated to startTransition
   unstable_Cache,
+  unstable_TracingMarker,
   unstable_DebugTracingMode,
   unstable_LegacyHidden,
   unstable_Offscreen,

filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -33,6 +33,7 @@ export const {
   enableSyncDefaultUpdates,
   enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay,
   enableClientRenderFallbackOnTextMismatch,
+  enableTransitionTracing,
 } = dynamicFeatureFlags;
 
 // On WWW, __EXPERIMENTAL__ is used for a new modern build.
@@ -106,8 +107,6 @@ export const enableUseMutableSource = true;
 
 export const enableCustomElementPropertySupport = __EXPERIMENTAL__;
 
-export const enableTransitionTracing = false;
-
 export const enableSymbolFallbackForWWW = true;
 // Flow magic to verify the exports of this file match the original version.
 // eslint-disable-next-line no-unused-vars
Repository: ggml-org/llama.cpp
Pull request: tests : remove json.hpp from a test

Not used.

Changed files:
filename: tests/test-chat-parser.cpp
patch: @@ -7,16 +7,13 @@
 //
 #include <exception>
 #include <iostream>
-#include <json.hpp>
 #include <string>
 
 #include "chat-parser.h"
 #include "common.h"
 #include "log.h"
 #include "regex-partial.h"
 
-using json = nlohmann::ordered_json;
-
 template <class T>
 static void assert_equals(const T & expected, const T & actual) {
     if (expected != actual) {
Repository: huggingface/transformers
Pull request: [CSM] tiny fix on generation

# What does this PR do?

Nit fix when `output_audio=True`.

Changed files:
filename: src/transformers/models/csm/generation_csm.py
patch: @@ -476,7 +476,7 @@ def generate(
                     if eos_idxs.numel() != 0:
                         cutoff_idx = eos_idxs.min()
                     else:
-                        cutoff_idx = audio_codes_batch.shape[1]
+                        cutoff_idx = audio_codes_batch.shape[0]
 
                     audio_codes_batch = audio_codes_batch[:cutoff_idx]
                     codec_decode_output = self.codec_model.decode(audio_codes_batch.transpose(0, 1).unsqueeze(0))
Repository: denoland/deno
Pull request: fix(ext/node): attach console stream properties

`kBindStreamsLazy` should be called with `process` during init, but it never was.

Changed files:
filename: ext/node/polyfills/01_require.js
patch: @@ -128,6 +128,7 @@ import internalTestBinding from "ext:deno_node/internal/test/binding.ts";
 import internalTimers from "ext:deno_node/internal/timers.mjs";
 import internalUtil from "ext:deno_node/internal/util.mjs";
 import internalUtilInspect from "ext:deno_node/internal/util/inspect.mjs";
+import internalConsole from "ext:deno_node/internal/console/constructor.mjs";
 import net from "node:net";
 import os from "node:os";
 import pathPosix from "node:path/posix";
@@ -198,6 +199,7 @@ function setupBuiltinModules() {
     http2,
     https,
     inspector,
+    "internal/console/constructor": internalConsole,
     "internal/child_process": internalCp,
     "internal/crypto/certificate": internalCryptoCertificate,
     "internal/crypto/cipher": internalCryptoCipher,

filename: ext/node/polyfills/02_init.js
patch: @@ -82,3 +82,8 @@ nodeGlobals.setImmediate = nativeModuleExports["timers"].setImmediate;
 nodeGlobals.setInterval = nativeModuleExports["timers"].setInterval;
 nodeGlobals.setTimeout = nativeModuleExports["timers"].setTimeout;
 nodeGlobals.performance = nativeModuleExports["perf_hooks"].performance;
+
+nativeModuleExports["internal/console/constructor"].bindStreamsLazy(
+  nativeModuleExports["console"],
+  nativeModuleExports["process"],
+);

filename: ext/node/polyfills/internal/console/constructor.mjs
patch: @@ -667,10 +667,15 @@ Console.prototype.dirxml = Console.prototype.log;
 Console.prototype.error = Console.prototype.warn;
 Console.prototype.groupCollapsed = Console.prototype.group;
 
+export function bindStreamsLazy(console, object) {
+  Console.prototype[kBindStreamsLazy].call(console, object);
+}
+
 export { Console, formatTime, kBindProperties, kBindStreamsLazy };
 export default {
   Console,
   kBindStreamsLazy,
   kBindProperties,
   formatTime,
+  bindStreamsLazy,
 };
Repository: ggml-org/llama.cpp
Pull request: convert : workaround for AutoConfig dummy labels

Fixes `jina-reranker-v1-tiny` conversion.

Changed files:
filename: convert_hf_to_gguf.py
patch: @@ -3690,14 +3690,20 @@ def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
         self.vocab_size = None
 
+        if cls_out_labels := self.hparams.get("id2label"):
+            if len(cls_out_labels) == 2 and cls_out_labels[0] == "LABEL_0":
+                # Remove dummy labels added by AutoConfig
+                cls_out_labels = None
+        self.cls_out_labels = cls_out_labels
+
     def set_gguf_parameters(self):
         super().set_gguf_parameters()
         self.gguf_writer.add_causal_attention(False)
         self._try_set_pooling_type()
 
-        if cls_out_labels := self.hparams.get("id2label"):
+        if self.cls_out_labels:
             key_name = gguf.Keys.Classifier.OUTPUT_LABELS.format(arch = gguf.MODEL_ARCH_NAMES[self.model_arch])
-            self.gguf_writer.add_array(key_name, [v for k, v in sorted(cls_out_labels.items())])
+            self.gguf_writer.add_array(key_name, [v for k, v in sorted(self.cls_out_labels.items())])
 
     def set_vocab(self):
         tokens, toktypes, tokpre = self.get_vocab_base()
@@ -3749,7 +3755,7 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
         if name.startswith("cls.seq_relationship"):
             return []
 
-        if self.hparams.get("id2label"):
+        if self.cls_out_labels:
             # For BertForSequenceClassification (direct projection layer)
             if name == "classifier.weight":
                 name = "classifier.out_proj.weight"
Repository: nodejs/node
Pull request: doc: mention prepare --security

Forgot to include this for security releases

Changed files:
filename: doc/contributing/releases.md
patch: @@ -308,6 +308,22 @@ branch.
 git checkout -b v1.2.3-proposal upstream/v1.x-staging
 ```
 
+You can also run:
+
+```bash
+git node release -S --prepare --security --filterLabel vX.x
+```
+
+Example:
+
+```bash
+git checkout v20.x
+git node release -S --prepare --security --filterLabel v20.x
+```
+
+to automate the remaining steps until step 6 or you can perform it manually
+following the below steps.
+
 <details>
 <summary>Security release</summary>
Repository: electron/electron
Pull request: test: ensure `sender-pid` hint is set in Linux notifications

Backport of #43928

See that PR for details.


Notes: Ensured that the `sender-id` hint is set when creating desktop notifications on DBus.

Changed files:
filename: BUILD.gn
patch: @@ -75,6 +75,7 @@ if (is_linux) {
       "notify_notification_set_timeout",
       "notify_notification_set_urgency",
       "notify_notification_set_hint_string",
+      "notify_notification_set_hint",
       "notify_notification_show",
       "notify_notification_close",
     ]

filename: shell/browser/notifications/linux/libnotify_notification.cc
patch: @@ -10,6 +10,7 @@
 #include "base/files/file_enumerator.h"
 #include "base/functional/bind.h"
 #include "base/logging.h"
+#include "base/process/process_handle.h"
 #include "base/strings/utf_string_conversions.h"
 #include "shell/browser/notifications/notification_delegate.h"
 #include "shell/browser/ui/gtk_util.h"
@@ -145,6 +146,10 @@ void LibnotifyNotification::Show(const NotificationOptions& options) {
         notification_, "desktop-entry", desktop_id.c_str());
   }
 
+  libnotify_loader_.notify_notification_set_hint(
+      notification_, "sender-pid",
+      g_variant_new_int64(base::GetCurrentProcId()));
+
   GError* error = nullptr;
   libnotify_loader_.notify_notification_show(notification_, &error);
   if (error) {

filename: spec/api-notification-dbus-spec.ts
patch: @@ -118,6 +118,7 @@ ifdescribe(!skip)('Notification module (dbus)', () => {
         hints: {
           append: 'true',
           'desktop-entry': appName,
+          'sender-pid': process.pid,
           urgency: 1
         }
       });
Repository: facebook/react
Pull request: Update reference-react.md

*Before* submitting a pull request, please make sure the following is done...

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests!
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes (`npm test`).
5. Make sure your code lints (`npm run lint`) - we've done our best to make sure these rules match our internal linting guidelines.
6. If you haven't already, complete the [CLA](https://code.facebook.com/cla).



Changed files:
filename: docs/docs/reference-react.md
patch: @@ -221,7 +221,7 @@ Like [`React.Children.map()`](#react.children.map) but does not return an array.
 #### `React.Children.count`
 
 ```javascript
-Children.count(children)
+React.Children.count(children)
 ```
 
 Returns the total number of components in `children`, equal to the number of times that a callback passed to `map` or `forEach` would be invoked.
Repository: huggingface/transformers
Pull request: remove duplicate code

@amyeroberts, @qubvel pls help review.




Changed files:
filename: src/transformers/models/video_llava/processing_video_llava.py
patch: @@ -177,11 +177,6 @@ def __call__(
                 height, width = get_image_size(one_video[0])
                 num_frames = one_video.shape[0]  # frame dim is always after batch dim
 
-            num_image_tokens = (height // self.patch_size) * (
-                width // self.patch_size
-            ) + self.num_additional_image_tokens
-            num_video_tokens = num_image_tokens * num_frames
-
             num_image_tokens = (height // self.patch_size) * (
                 width // self.patch_size
             ) + self.num_additional_image_tokens
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in ext/node/polyfills/wasi.ts

Contributing toward #24236 

- Removed referencing TODO comment.
- Add Error primordial.

More coming; working my way up in comfort with the codebase and contribution flow :)


Changed files:
filename: ext/node/polyfills/wasi.ts
patch: @@ -1,7 +1,8 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
+import { primordials } from "ext:core/mod.js";
+
+const { Error } = primordials;
 
 class Context {
   constructor() {
Repository: nodejs/node
Pull request: crypto: add missing return value check

Add return value check for call to SSL_CTX_add_client_CA to be consistent with other places it is called

Fixed unused warning in one of the static analysis tools we use at Red Hat even though it is not being reported by coverity in the configuration we run.

<!--
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/crypto/crypto_context.cc
patch: @@ -1164,7 +1164,7 @@ void SecureContext::LoadPKCS12(const FunctionCallbackInfo<Value>& args) {
     X509* ca = sk_X509_value(extra_certs.get(), i);
 
     X509_STORE_add_cert(sc->GetCertStoreOwnedByThisSecureContext(), ca);
-    SSL_CTX_add_client_CA(sc->ctx_.get(), ca);
+    CHECK_EQ(1, SSL_CTX_add_client_CA(sc->ctx_.get(), ca));
   }
   ret = true;
Repository: denoland/deno
Pull request: feat(flags): support user provided args in repl subcommand

closes https://github.com/denoland/deno/issues/11547

Changed files:
filename: cli/args/flags.rs
patch: @@ -2703,6 +2703,13 @@ fn repl_subcommand() -> Command {
                        <p(245)>[default: $DENO_DIR/deno_history.txt]</>"))
     )
     .arg(env_file_arg())
+    .arg(
+      Arg::new("args")
+        .num_args(0..)
+        .action(ArgAction::Append)
+        .value_name("ARGS")
+        .last(true)
+    )
 }
 
 fn run_args(command: Command, top_level: bool) -> Command {
@@ -4711,6 +4718,10 @@ fn repl_parse(
     })
     .transpose()?;
 
+  if let Some(args) = matches.remove_many::<String>("args") {
+    flags.argv.extend(args);
+  }
+
   handle_repl_flags(
     flags,
     ReplFlags {
@@ -10721,6 +10732,25 @@ mod tests {
     );
   }
 
+  #[test]
+  fn repl_user_args() {
+    let r = flags_from_vec(svec!["deno", "repl", "foo"]);
+    assert!(r.is_err());
+    let r = flags_from_vec(svec!["deno", "repl", "--", "foo"]);
+    assert_eq!(
+      r.unwrap(),
+      Flags {
+        subcommand: DenoSubcommand::Repl(ReplFlags {
+          eval_files: None,
+          eval: None,
+          is_default_command: false,
+        }),
+        argv: svec!["foo"],
+        ..Flags::default()
+      }
+    );
+  }
+
   #[test]
   fn bare_with_flag_no_file() {
     let r = flags_from_vec(svec!["deno", "--no-config"]);
Repository: facebook/react
Pull request: [sizebot] Add link to diff view

Updates the sizebot output so that the file names link to a diff view of the corresponding build artifact.

Example diff view: https://react-builds.vercel.app/commits/955cad9bcc6d755b2a672f8038fe9754e0fe5108/files/oss-stable-semver/react-dom/cjs/react-dom.production.min.js?compare=c3d7a7e3d72937443ef75b7e29335c98ad0f1424

The diff view itself is rendered by a Next.js app that I built as a side project and is hosted at https://react-builds.vercel.app. If we find this useful enough I could move the app to a React-owned repo but since this isn't a critical feature it might be OK to leave it separate for now, so we don't need to commit to supporting it indefinitely.

Changed files:
filename: dangerfile.js
patch: @@ -84,9 +84,10 @@ const header = `
   | Name | +/- | Base | Current | +/- gzip | Base gzip | Current gzip |
   | ---- | --- | ---- | ------- | -------- | --------- | ------------ |`;
 
-function row(result) {
+function row(result, baseSha, headSha) {
+  const diffViewUrl = `https://react-builds.vercel.app/commits/${headSha}/files/${result.path}?compare=${baseSha}`;
   // prettier-ignore
-  return `| ${result.path} | **${change(result.change)}** | ${kbs(result.baseSize)} | ${kbs(result.headSize)} | ${change(result.changeGzip)} | ${kbs(result.baseSizeGzip)} | ${kbs(result.headSizeGzip)}`;
+  return `| [${result.path}](${diffViewUrl}) | **${change(result.change)}** | ${kbs(result.baseSize)} | ${kbs(result.headSize)} | ${change(result.changeGzip)} | ${kbs(result.baseSizeGzip)} | ${kbs(result.headSizeGzip)}`;
 }
 
 (async function() {
@@ -196,7 +197,7 @@ function row(result) {
           artifactPath
       );
     }
-    criticalResults.push(row(result));
+    criticalResults.push(row(result, baseSha, headSha));
   }
 
   let significantResults = [];
@@ -212,7 +213,7 @@ function row(result) {
       // Skip critical artifacts. We added those earlier, in a fixed order.
       !CRITICAL_ARTIFACT_PATHS.has(result.path)
     ) {
-      criticalResults.push(row(result));
+      criticalResults.push(row(result, baseSha, headSha));
     }
 
     // Do the same for results that exceed the significant threshold. These
@@ -224,7 +225,7 @@ function row(result) {
       result.change === Infinity ||
       result.change === -1
     ) {
-      significantResults.push(row(result));
+      significantResults.push(row(result, baseSha, headSha));
     }
   }
Repository: nodejs/node
Pull request: tools: fix permissions in `lint-release-proposal` workflow

The token needs permission to read PR content in order to lint the release proposal commit – mostly relevant for private forks.
<!--
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: .github/workflows/lint-release-proposal.yml
patch: @@ -19,6 +19,8 @@ permissions:
 jobs:
   lint-release-commit:
     runs-on: ubuntu-latest
+    permissions:
+      pull-requests: read
     steps:
       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683  # v4.2.2
         with:
Repository: vercel/next.js
Pull request: [link] Avoid inlining of `LinkProps` in emitted declarations

`tsc` might decide that `LinkProps` should be inlined which would break libraries depending on `next` since that effectively pins the dependency to a patch version.

Workaround is explained here: https://github.com/microsoft/TypeScript/issues/37151#issuecomment-756232934

I can't come up with a minimal repro but verified it manually in an internal package. This would've avoided https://github.com/vercel/microfrontends/pull/171

We should probably lint against types that could be interfaces. But really, https://github.com/microsoft/TypeScript/issues/57779 should be fixed. Inlining types from libraries should be configurable. Most dependencies are not pinned to patch versions but majors.

Changed files:
filename: packages/next/src/client/link.tsx
patch: @@ -119,8 +119,11 @@ type InternalLinkProps = {
 
 // `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type
 // isn't generated yet. It will be replaced when the webpack plugin runs.
+// WARNING: This should be an interface to prevent TypeScript from inlining it
+// in declarations of libraries dependending on Next.js.
+// Not trivial to reproduce so only convert to an interface when needed.
 // eslint-disable-next-line @typescript-eslint/no-unused-vars
-export type LinkProps<RouteInferType = any> = InternalLinkProps
+export interface LinkProps<RouteInferType = any> extends InternalLinkProps {}
 type LinkPropsRequired = RequiredKeys<LinkProps>
 type LinkPropsOptional = OptionalKeys<InternalLinkProps>
Repository: ggml-org/llama.cpp
Pull request: gguf/utility: return full content on size < 0

`response.content[:-1]` truncates the last byte which can break `model_index.json` reading for `--remote` converts

Changed files:
filename: gguf-py/gguf/utility.py
patch: @@ -231,7 +231,7 @@ def get_data_by_range(cls, url: str, start: int, size: int = -1) -> bytes:
         response.raise_for_status()
 
         # Get raw byte data
-        return response.content[:size]
+        return response.content[slice(size if size > -1 else None)]
 
     @classmethod
     def check_file_exist(cls, url: str) -> bool: