helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix(check): cache bust when changing nodeModulesDir setting


Changed files:
filename: cli/npm/managed/mod.rs
patch: @@ -604,6 +604,9 @@ impl CliNpmResolver for ManagedCliNpmResolver {
       .collect::<Vec<_>>();
     package_reqs.sort_by(|a, b| a.0.cmp(&b.0)); // determinism
     let mut hasher = FastInsecureHasher::new();
+    // ensure the cache gets busted when turning nodeModulesDir on or off
+    // as this could cause changes in resolution
+    hasher.write_hashable(self.fs_resolver.node_modules_path().is_some());
     for (pkg_req, pkg_nv) in package_reqs {
       hasher.write_hashable(&pkg_req);
       hasher.write_hashable(&pkg_nv);
Repository: electron/electron
Pull request: fix: multiple move() calls on the same unique_ptr

#### Description of Change

Small fix I found while researching something else.

`BroadcastEvent()` takes and consumes a `std::unique_ptr<Event>` argument.  `ElectronExtensionsBrowserClient::BroadcastEventToRenderers()` has a bug in that it passes the same unique ptr to as many event routers as it can find.

#### 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: none.

Changed files:
filename: shell/browser/extensions/electron_extensions_browser_client.cc
patch: @@ -343,13 +343,12 @@ void ElectronExtensionsBrowserClient::BroadcastEventToRenderers(
     return;
   }
 
-  auto event = std::make_unique<extensions::Event>(histogram_value, event_name,
-                                                   args.Clone());
   for (auto const& [key, browser_context] :
        ElectronBrowserContext::browser_context_map()) {
     if (browser_context) {
       extensions::EventRouter::Get(browser_context.get())
-          ->BroadcastEvent(std::move(event));
+          ->BroadcastEvent(std::make_unique<extensions::Event>(
+              histogram_value, event_name, args.Clone()));
     }
   }
 }
Repository: nodejs/node
Pull request: stream: fix eventNames() to not return not defined events

Fix issue https://github.com/nodejs/node/issues/51302
As explained by @Qard, the root cause is that by default, we pre-allocate events here [here](https://github.com/nodejs/node/pull/50428/files)

1. Since those events are initially set to undefined, we should check the value of the listener before returning eventNames().
2. I also believe that we are protected because we are not allowed to set a null or undefined listener.

I did different tests like:
```
const readableStream = createReadable();
readableStream.on('a', () => {});
readableStream.on('error', () => {});
console.log(readableStream.eventNames()); // ['a', 'error']
```
```
const readableStream = createReadable();
readableStream.on('a', () => {});
console.log(readableStream.eventNames()); // ['a']
```

I will add tests as soon as I can

Changed files:
filename: lib/internal/streams/legacy.js
patch: @@ -3,6 +3,7 @@
 const {
   ArrayIsArray,
   ObjectSetPrototypeOf,
+  ReflectOwnKeys,
 } = primordials;
 
 const EE = require('events');
@@ -93,6 +94,16 @@ Stream.prototype.pipe = function(dest, options) {
   return dest;
 };
 
+Stream.prototype.eventNames = function eventNames() {
+  const names = [];
+  for (const key of ReflectOwnKeys(this._events)) {
+    if (typeof this._events[key] === 'function' || (ArrayIsArray(this._events[key]) && this._events[key].length > 0)) {
+      names.push(key);
+    }
+  }
+  return names;
+};
+
 function prependListener(emitter, event, fn) {
   // Sadly this is not cacheable as some libraries bundle their own
   // event emitter implementation with them.

filename: test/parallel/test-stream-event-names.js
patch: @@ -0,0 +1,42 @@
+'use strict';
+
+require('../common');
+const assert = require('assert');
+const { Readable, Writable, Duplex } = require('stream');
+
+{
+  const stream = new Readable();
+  assert.strictEqual(stream.eventNames().length, 0);
+}
+
+{
+  const stream = new Readable();
+  stream.on('foo', () => {});
+  stream.on('data', () => {});
+  stream.on('error', () => {});
+  assert.deepStrictEqual(stream.eventNames(), ['error', 'data', 'foo']);
+}
+
+{
+  const stream = new Writable();
+  assert.strictEqual(stream.eventNames().length, 0);
+}
+
+{
+  const stream = new Writable();
+  stream.on('foo', () => {});
+  stream.on('drain', () => {});
+  stream.on('prefinish', () => {});
+  assert.deepStrictEqual(stream.eventNames(), ['prefinish', 'drain', 'foo']);
+}
+{
+  const stream = new Duplex();
+  assert.strictEqual(stream.eventNames().length, 0);
+}
+
+{
+  const stream = new Duplex();
+  stream.on('foo', () => {});
+  stream.on('finish', () => {});
+  assert.deepStrictEqual(stream.eventNames(), ['finish', 'foo']);
+}
Repository: vercel/next.js
Pull request: Update Turbopack production test manifest

This auto-generated PR updates the production integration test manifest used when testing Turbopack.

Changed files:
filename: test/turbopack-build-tests-manifest.json
patch: @@ -2856,7 +2856,8 @@
       "app-dir - metadata-streaming should render the metadata in the browser",
       "app-dir - metadata-streaming should send streaming response for headless browser bots",
       "app-dir - metadata-streaming should send the blocking response for html limited bots",
-      "app-dir - metadata-streaming should still load viewport meta tags even if metadata is delayed"
+      "app-dir - metadata-streaming should still load viewport meta tags even if metadata is delayed",
+      "app-dir - metadata-streaming should still render metadata if children is not rendered in parallel routes layout"
     ],
     "failed": [],
     "pending": [],
@@ -6517,6 +6518,18 @@
     "flakey": [],
     "runtimeError": false
   },
+  "test/e2e/instrumentation-client-hook/instrumentation-client-hook.test.ts": {
+    "passed": [
+      "Instrumentation Client Hook App Router should execute instrumentation-client from app router before hydration",
+      "Instrumentation Client Hook HMR in development mode skips tests in non-dev mode",
+      "Instrumentation Client Hook Pages Router should execute instrumentation-client from pages router before hydration",
+      "Instrumentation Client Hook With src folder should execute instrumentation-client from with src folder before hydration"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
   "test/e2e/instrumentation-hook-src/instrumentation-hook-src.test.ts": {
     "passed": [
       "instrumentation-hook-rsc instrumentation should not overlap with a instrumentation page",
@@ -17842,14 +17855,14 @@
     "runtimeError": false
   },
   "test/production/build-spinners/index.test.ts": {
-    "passed": [],
-    "failed": [
+    "passed": [
       "build-spinners should handle build spinners correctly app and pages",
       "build-spinners should handle build spinners correctly app dir - (compile workers)",
       "build-spinners should handle build spinners correctly app dir - basic",
       "build-spinners should handle build spinners correctly page dir",
       "build-spinners should handle build spinners correctly page dir (compile workers)"
     ],
+    "failed": [],
     "pending": [],
     "flakey": [],
     "runtimeError": false
Repository: ggml-org/llama.cpp
Pull request: server : (webui) revert hacky solution from #11626

Revert bad UX/UI implementation from #11626

When the LLM is generating a message, we allow user to type next message to the input box, but don't allow sending or queuing it.

This is to match the behavior of other chat apps like chatgpt / claude / deepseek


Changed files:
filename: examples/server/webui/src/main.js
patch: @@ -468,14 +468,9 @@ const mainApp = createApp({
       URL.revokeObjectURL(url);
     },
     async sendMessage() {
-      if (!this.inputMsg) return;
-
-      if (this.isGenerating) {
-        this.stopGeneration();
-        while (this.isGenerating) {
-          await new Promise((resolve) => setTimeout(resolve, 10));
-        }
-      }
+      // prevent sending empty message
+      // also allow typing the message while generating, but does not allow sending it (to match UX/UI behavior of other chat apps)
+      if (!this.inputMsg || this.isGenerating) return;
 
       const currConvId = this.viewingConvId;
Repository: huggingface/transformers
Pull request: fix: argument

Arguments is different in the docs.

https://github.com/huggingface/transformers/blob/752ef3fd4e70869626ec70657a770a85c0ad9219/utils/modular_model_converter.py#L1729


Changed files:
filename: docs/source/en/modular_transformers.md
patch: @@ -24,7 +24,7 @@ A linter "unravels" the modular file into a `modeling.py` file to preserve the s
 Run the command below to automatically generate a `modeling.py` file from a modular file.
 
 ```bash
-python utils/modular_model_converter.py --files-to-parse src/transformers/models/<your_model>/modular_<your_model>.py
+python utils/modular_model_converter.py --files_to_parse src/transformers/models/<your_model>/modular_<your_model>.py
 ```
 
 For example:
Repository: electron/electron
Pull request: fix: multiple move() calls on the same unique_ptr

Backport of #42788

See that PR for details.


Notes: none.

Changed files:
filename: shell/browser/extensions/electron_extensions_browser_client.cc
patch: @@ -343,13 +343,12 @@ void ElectronExtensionsBrowserClient::BroadcastEventToRenderers(
     return;
   }
 
-  auto event = std::make_unique<extensions::Event>(histogram_value, event_name,
-                                                   args.Clone());
   for (auto const& [key, browser_context] :
        ElectronBrowserContext::browser_context_map()) {
     if (browser_context) {
       extensions::EventRouter::Get(browser_context.get())
-          ->BroadcastEvent(std::move(event));
+          ->BroadcastEvent(std::make_unique<extensions::Event>(
+              histogram_value, event_name, args.Clone()));
     }
   }
 }
Repository: facebook/react
Pull request: [Fizz] Allow dangerouslySetInnerHTML in <option>

I didn't think this was valid because if you don't provide a `value` for the option, we don't know whether to select it or not. However it's arguably valid if you do provide the value attribute.

We should probably have a warning if you provide dangerouslySetInnerHTML and don't provide a value attribute though. Both server and client.

Changed files:
filename: packages/react-dom/src/server/ReactDOMServerFormatConfig.js
patch: @@ -691,6 +691,7 @@ function pushStartOption(
   let children = null;
   let value = null;
   let selected = null;
+  let innerHTML = null;
   for (const propKey in props) {
     if (hasOwnProperty.call(props, propKey)) {
       const propValue = props[propKey];
@@ -716,10 +717,8 @@ function pushStartOption(
           }
           break;
         case 'dangerouslySetInnerHTML':
-          invariant(
-            false,
-            '`dangerouslySetInnerHTML` does not work on <option>.',
-          );
+          innerHTML = propValue;
+          break;
         // eslint-disable-next-line-no-fallthrough
         case 'value':
           value = propValue;
@@ -760,6 +759,7 @@ function pushStartOption(
   }
 
   target.push(endOfStartTag);
+  pushInnerHTML(target, innerHTML, children);
   return children;
 }
Repository: electron/electron
Pull request: ci: fix CircleCI config

#### Description of Change

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

Follow-up to #42763 - currently CircleCI workflows aren't running as a result of that change.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd

#### Release Notes

Notes: none <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->


Changed files:
filename: .circleci/config.yml
patch: @@ -31,7 +31,6 @@ jobs:
       - path-filtering/set-parameters:
           base-revision: main
           mapping: |
-            ^((?!docs/).)*$ run-build-mac true
             ^((?!docs/).)*$ run-build-linux true
             docs/.* run-docs-only true
             ^((?!docs/).)*$ run-docs-only false

filename: .circleci/config/base.yml
patch: @@ -188,8 +188,7 @@ step-depot-tools-get: &step-depot-tools-get
                                CipdDependency(parent=self,
                                               name=name,
       EOF
-        git apply --3way gclient.diff
-      fi
+      git apply --3way gclient.diff
       # Ensure depot_tools does not update.
       test -d depot_tools && cd depot_tools
       touch .disable_auto_update
Repository: vercel/next.js
Pull request: Turbopack: fix graph layout segment optimization

The modules in the last layout segment (`server_component_entries`) were visited twice: as part of the last iteration of the for loop (which doesn't propagate its `visited_modules` because it's not a layout), and then again with `rsc_entry`.

We already do the right thing in another place:
https://github.com/vercel/next.js/blob/f42739d114695702922dab4c08d6c8223daafceb/crates/next-api/src/app.rs#L1740-L1748

Before:
![Bildschirmfoto 2025-03-17 um 11 39 41](https://github.com/user-attachments/assets/62adad85-043c-47f4-8c70-a8f5779e34a9)

After:
![Bildschirmfoto 2025-03-17 um 11 43 14](https://github.com/user-attachments/assets/62642bcf-8946-4bcd-ba16-cdd711cac383)


Closes PACK-4165

Changed files:
filename: crates/next-api/src/app.rs
patch: @@ -855,7 +855,13 @@ impl AppProject {
                     graphs.push(graph);
                     let mut visited_modules = VisitedModules::from_graph(graph);
 
-                    for module in server_component_entries.iter() {
+                    // Skip the last server component, which is the page itself, because that one
+                    // won't have it's visited modules added, and will be visited in the next step
+                    // as part of rsc_entry
+                    for module in server_component_entries
+                        .iter()
+                        .take(server_component_entries.len().saturating_sub(1))
+                    {
                         let graph = SingleModuleGraph::new_with_entries_visited_intern(
                             // This should really be ChunkGroupEntry::Shared(module.await?.module),
                             // but that breaks everything for some reason.
Repository: facebook/react
Pull request: Add GitHub API query to bug report template

This may help debug why sometimes the GitHub API search seems to not find a match when it should.

Changed files:
filename: packages/react-devtools-shared/src/devtools/views/ErrorBoundary/ReportNewIssue.js
patch: @@ -9,6 +9,7 @@
 
 import * as React from 'react';
 import Icon from '../Icon';
+import {searchGitHubIssuesURL} from './githubAPI';
 import styles from './shared.css';
 
 function encodeURIWrapper(string: string): string {
@@ -31,6 +32,9 @@ export default function ReportNewIssue({
     return null;
   }
 
+  const gitHubAPISearch =
+    errorMessage !== null ? searchGitHubIssuesURL(errorMessage) : '(none)';
+
   const title = `Error: "${errorMessage || ''}"`;
   const labels = ['Component: Developer Tools', 'Status: Unconfirmed'];
 
@@ -57,10 +61,13 @@ If possible, please describe how to reproduce this bug on the website or app men
 DevTools version: ${process.env.DEVTOOLS_VERSION || ''}
 
 Call stack:
-${callStack || '(not available)'}
+${callStack || '(none)'}
 
 Component stack:
-${componentStack || '(not available)'}
+${componentStack || '(none)'}
+
+GitHub URL search query:
+${gitHubAPISearch}
   `;
 
   bugURL += `/issues/new?labels=${encodeURIWrapper(

filename: packages/react-devtools-shared/src/devtools/views/ErrorBoundary/githubAPI.js
patch: @@ -14,9 +14,7 @@ export type GitHubIssue = {|
 
 const GITHUB_ISSUES_API = 'https://api.github.com/search/issues';
 
-export async function searchGitHubIssues(
-  message: string,
-): Promise<GitHubIssue | null> {
+export function searchGitHubIssuesURL(message: string): string {
   // Remove Fiber IDs from error message (as those will be unique).
   message = message.replace(/"[0-9]+"/g, '');
 
@@ -29,13 +27,19 @@ export async function searchGitHubIssues(
     'repo:facebook/react',
   ];
 
-  const response = await fetch(
+  return (
     GITHUB_ISSUES_API +
-      '?q=' +
-      encodeURIComponent(message) +
-      '%20' +
-      filters.map(encodeURIComponent).join('%20'),
+    '?q=' +
+    encodeURIComponent(message) +
+    '%20' +
+    filters.map(encodeURIComponent).join('%20')
   );
+}
+
+export async function searchGitHubIssues(
+  message: string,
+): Promise<GitHubIssue | null> {
+  const response = await fetch(searchGitHubIssuesURL(message));
   const data = await response.json();
   if (data.items.length > 0) {
     const item = data.items[0];
Repository: nodejs/node
Pull request: lib: runtime deprecate SlowBuffer

SlowBuffer has been doc-deprecated for a while and I couldn't find why we didn't want to proceed with the deprecation cycle on this feature. Therefore, this PR runtime deprecates SlowBuffer.

Changed files:
filename: doc/api/deprecations.md
patch: @@ -695,6 +695,9 @@ Type: End-of-Life
 
 <!-- YAML
 changes:
+  - version: REPLACEME
+    pr-url: https://github.com/nodejs/node/pull/55175
+    description: Runtime deprecation.
   - version: v6.12.0
     pr-url: https://github.com/nodejs/node/pull/10116
     description: A deprecation code has been assigned.
@@ -703,7 +706,7 @@ changes:
     description: Documentation-only deprecation.
 -->
 
-Type: Documentation-only
+Type: Runtime
 
 The [`SlowBuffer`][] class is deprecated. Please use
 [`Buffer.allocUnsafeSlow(size)`][] instead.

filename: lib/buffer.js
patch: @@ -88,6 +88,7 @@ const {
   kIsEncodingSymbol,
   defineLazyProperties,
   encodingsMap,
+  deprecate,
 } = require('internal/util');
 const {
   isAnyArrayBuffer,
@@ -1322,7 +1323,10 @@ function isAscii(input) {
 
 module.exports = {
   Buffer,
-  SlowBuffer,
+  SlowBuffer: deprecate(
+    SlowBuffer,
+    'SlowBuffer() is deprecated. Please use Buffer.allocUnsafeSlow()',
+    'DEP0030'),
   transcode,
   isUtf8,
   isAscii,

filename: test/parallel/test-buffer-slow.js
patch: @@ -1,12 +1,18 @@
 'use strict';
 
-require('../common');
+const common = require('../common');
 const assert = require('assert');
 const buffer = require('buffer');
 const SlowBuffer = buffer.SlowBuffer;
 
 const ones = [1, 1, 1, 1];
 
+common.expectWarning(
+  'DeprecationWarning',
+  'SlowBuffer() is deprecated. Please use Buffer.allocUnsafeSlow()',
+  'DEP0030'
+);
+
 // Should create a Buffer
 let sb = SlowBuffer(4);
 assert(sb instanceof Buffer);
Repository: ggml-org/llama.cpp
Pull request: export-lora : fix tok_embd tensor

Cont https://github.com/ggerganov/llama.cpp/pull/11131

Demo merged model: https://huggingface.co/ngxson/DeepSeek-R1-Distill-Qwen-7B-abliterated-GGUF


Changed files:
filename: examples/export-lora/export-lora.cpp
patch: @@ -345,8 +345,18 @@ struct lora_merge_ctx {
             gf = ggml_new_graph(ctx0);
             struct ggml_tensor * cur = inp_base;
             for (size_t i = 0; i < adapters.size(); ++i) {
-                struct ggml_tensor * a_T = ggml_cont(ctx0, ggml_transpose(ctx0, ggml_cast(ctx0, inp_a[i], GGML_TYPE_F32)));
-                struct ggml_tensor * delta = ggml_mul_mat(ctx0, a_T, ggml_cast(ctx0, inp_b[i], GGML_TYPE_F32));
+                struct ggml_tensor * delta;
+                bool is_tok_embd = string_starts_with(name_base, "token_embd");
+                if (is_tok_embd) {
+                    printf("%s :     detected token embeddings tensor\n", __func__);
+                    delta = ggml_mul_mat(ctx0,
+                        ggml_cast(ctx0, inp_b[i], GGML_TYPE_F32),
+                        ggml_cast(ctx0, inp_a[i], GGML_TYPE_F32));
+                } else {
+                    delta = ggml_mul_mat(ctx0,
+                        ggml_cont(ctx0, ggml_transpose(ctx0, ggml_cast(ctx0, inp_a[i], GGML_TYPE_F32))),
+                        ggml_cast(ctx0, inp_b[i], GGML_TYPE_F32));
+                }
                 // scale
                 const float alpha = adapters[i]->alpha;
                 const float rank  = (float) inp_b[i]->ne[0];
Repository: denoland/deno
Pull request: fix(ext/node): add stub for AsyncResource#asyncId()

Ref https://github.com/denoland/deno/issues/23263


Changed files:
filename: ext/node/polyfills/async_hooks.ts
patch: @@ -10,6 +10,7 @@
 import { core } from "ext:core/mod.js";
 import { op_node_is_promise_rejected } from "ext:core/ops";
 import { validateFunction } from "ext:deno_node/internal/validators.mjs";
+import { newAsyncId } from "ext:deno_node/internal/async_hooks.ts";
 
 function assert(cond: boolean) {
   if (!cond) throw new Error("Assertion failed");
@@ -180,9 +181,16 @@ class AsyncContextFrame {
 export class AsyncResource {
   frame: AsyncContextFrame;
   type: string;
+  #asyncId: number;
+
   constructor(type: string) {
     this.type = type;
     this.frame = AsyncContextFrame.current();
+    this.#asyncId = newAsyncId();
+  }
+
+  asyncId() {
+    return this.#asyncId;
   }
 
   runInAsyncScope(

filename: tests/unit_node/async_hooks_test.ts
patch: @@ -125,3 +125,8 @@ Deno.test(async function bind() {
 
   assertEquals(await deferred.promise, null);
 });
+
+Deno.test(function asyncResourceStub() {
+  const resource = new AsyncResource("dbquery");
+  assert(typeof resource.asyncId() === "number");
+});
Repository: huggingface/transformers
Pull request: [XGLM] tag tests as slow

# What does this PR do?

These two new tests load a non-small model -> test should be slow

Changed files:
filename: tests/models/xglm/test_modeling_tf_xglm.py
patch: @@ -239,6 +239,7 @@ def test_batch_generation(self):
         self.assertListEqual(expected_output_sentence, batch_out_sentence)
         self.assertListEqual(expected_output_sentence, [non_padded_sentence, padded_sentence])
 
+    @slow
     def test_loss_with_padding(self):
         tokenizer = XGLMTokenizer.from_pretrained("facebook/xglm-564M")
         model = TFXGLMForCausalLM.from_pretrained("facebook/xglm-564M")

filename: tests/models/xglm/test_modeling_xglm.py
patch: @@ -449,6 +449,7 @@ def test_batched_nan_fp16(self):
                 torch.isnan(outputs.logits[0]).any().item()
             )  # the first logits could contain NaNs if it fails
 
+    @slow
     def test_loss_with_padding(self):
         tokenizer = XGLMTokenizer.from_pretrained("facebook/xglm-564M")
         model = XGLMForCausalLM.from_pretrained("facebook/xglm-564M")
Repository: ggml-org/llama.cpp
Pull request: llama : expose llama_model_n_head_kv in the API

It's useful to be able to have this from the library layer as it's a key parameter of the model (e.g. to figure out how much KV cache memory is needed).


Changed files:
filename: include/llama.h
patch: @@ -477,6 +477,7 @@ extern "C" {
     LLAMA_API int32_t llama_model_n_embd     (const struct llama_model * model);
     LLAMA_API int32_t llama_model_n_layer    (const struct llama_model * model);
     LLAMA_API int32_t llama_model_n_head     (const struct llama_model * model);
+    LLAMA_API int32_t llama_model_n_head_kv  (const struct llama_model * model);
 
     // Get the model's RoPE frequency scaling factor
     LLAMA_API float llama_model_rope_freq_scale_train(const struct llama_model * model);

filename: src/llama-model.cpp
patch: @@ -3838,6 +3838,10 @@ int32_t llama_model_n_head(const struct llama_model * model) {
     return model->hparams.n_head();
 }
 
+int32_t llama_model_n_head_kv(const struct llama_model * model) {
+    return model->hparams.n_head_kv();
+}
+
 // deprecated
 int32_t llama_n_ctx_train(const struct llama_model * model) {
     return llama_model_n_ctx_train(model);