helloadhavan/github_issues huggingface dataset:
Repository: nodejs/node
Pull request: test: do not skip OCB decryption in FIPS mode

I believe that OCB should work in FIPS mode, and only CCM should be skipped here.

<!--
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: test/parallel/test-crypto-authenticated.js
patch: @@ -304,7 +304,7 @@ for (const test of TEST_CASES) {
 }
 
 // Test that create(De|C)ipheriv throws if the mode is CCM or OCB and no
-// authentication tag has been specified.
+// authentication tag length has been specified.
 {
   for (const mode of ['ccm', 'ocb']) {
     assert.throws(() => {
@@ -316,7 +316,7 @@ for (const test of TEST_CASES) {
     });
 
     // CCM decryption is unsupported in FIPS mode.
-    if (!isFipsEnabled) {
+    if (!isFipsEnabled || mode !== 'ccm') {
       assert.throws(() => {
         crypto.createDecipheriv(`aes-256-${mode}`,
                                 'FxLKsqdmv0E9xrQhp0b1ZgI0K7JFZJM8',
Repository: denoland/deno
Pull request: fix(ext/node): return values in node:domain

When using Domain#bind, Domain#intercept, and Domain#run we were invoking the callback but then not actually returning the value returned from that callback.

This makes Gulp work with async functions as tasks.

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->


Changed files:
filename: ext/node/polyfills/domain.ts
patch: @@ -50,7 +50,7 @@ export class Domain extends EventEmitter {
     const self = this;
     return function () {
       try {
-        FunctionPrototypeApply(fn, null, ArrayPrototypeSlice(arguments));
+        return FunctionPrototypeApply(fn, null, ArrayPrototypeSlice(arguments));
       } catch (e) {
         FunctionPrototypeCall(emitError, self, e);
       }
@@ -65,7 +65,11 @@ export class Domain extends EventEmitter {
         FunctionPrototypeCall(emitError, self, e);
       } else {
         try {
-          FunctionPrototypeApply(fn, null, ArrayPrototypeSlice(arguments, 1));
+          return FunctionPrototypeApply(
+            fn,
+            null,
+            ArrayPrototypeSlice(arguments, 1),
+          );
         } catch (e) {
           FunctionPrototypeCall(emitError, self, e);
         }
@@ -75,7 +79,7 @@ export class Domain extends EventEmitter {
 
   run(fn) {
     try {
-      fn();
+      return fn();
     } catch (e) {
       FunctionPrototypeCall(emitError, this, e);
     }
Repository: ggml-org/llama.cpp
Pull request: Fix incomplete chunck handling in the webui

The new (awesome) webui does not parse incoming chunks correctly, because it assumed lines are complete (it split then loop over them even if they are incomplete, which rarely occurs locally but can if you access it over the network).

So I just made the chunk variable persistent to store the last incomplete line for the next read.

Thanks for your hard work!!

Changed files:
filename: tools/server/webui/src/lib/services/chat.ts
patch: @@ -264,12 +264,14 @@ export class ChatService {
 		let lastTimings: ChatMessageTimings | undefined;
 
 		try {
+			let chunk = '';
 			while (true) {
 				const { done, value } = await reader.read();
 				if (done) break;
 
-				const chunk = decoder.decode(value, { stream: true });
+				chunk += decoder.decode(value, { stream: true });
 				const lines = chunk.split('\n');
+				chunk = lines.pop() || ''; // Save incomplete line for next read
 
 				for (const line of lines) {
 					if (line.startsWith('data: ')) {
Repository: vercel/next.js
Pull request: Remove unnecessary await

That function isn't async:
https://github.com/vercel/next.js/blob/0c070a2c7ac48f1c2221d7e9608885bde03d1729/packages/next/src/build/utils.ts#L1824

Closes PACK-5086

Changed files:
filename: packages/next/src/build/turbopack-build/impl.ts
patch: @@ -49,7 +49,7 @@ export async function turbopackBuild(): Promise<{
   const bindings = await loadBindings(config?.experimental?.useWasmBinary)
   const dev = false
 
-  const supportedBrowsers = await getSupportedBrowsers(dir, dev)
+  const supportedBrowsers = getSupportedBrowsers(dir, dev)
 
   const persistentCaching = isPersistentCachingEnabled(config)
   const project = await bindings.turbo.createProject(

filename: packages/next/src/build/webpack-config.ts
patch: @@ -269,7 +269,7 @@ export async function loadProjectInfo({
     dir,
     config
   )
-  const supportedBrowsers = await getSupportedBrowsers(dir, dev)
+  const supportedBrowsers = getSupportedBrowsers(dir, dev)
   return {
     jsConfig,
     jsConfigPath,

filename: packages/next/src/server/dev/hot-reloader-turbopack.ts
patch: @@ -206,7 +206,7 @@ export async function createHotReloaderTurbopack(
     // TODO this need to be set correctly for persistent caching to work
   }
 
-  const supportedBrowsers = await getSupportedBrowsers(projectPath, dev)
+  const supportedBrowsers = getSupportedBrowsers(projectPath, dev)
   const currentNodeJsVersion = process.versions.node
 
   const project = await bindings.turbo.createProject(
Repository: ggml-org/llama.cpp
Pull request: ggml : extend ggml_can_fuse to work with non-sequential nodes

In some cases, we might want to fuse ops that are not sequential in the graph. For example, when there are intermediate view ops in-between the fusable ops.

Sample usage: https://github.com/ggml-org/llama.cpp/pull/16102

Changed files:
filename: ggml/src/ggml-impl.h
patch: @@ -583,27 +583,27 @@ static inline bool ggml_node_has_n_uses(const struct ggml_cgraph * cgraph, int n
     return true;
 }
 
-// Returns true if nodes [i, i+ops.size()) are the sequence of ggml_ops in ops[]
+// Returns true if nodes with indices { node_idxs } are the sequence of ggml_ops in ops[]
 // and are fusable. Nodes are considered fusable according to this function if:
 // - all nodes except the last have only one use and are not views/outputs (see ggml_node_has_N_uses).
 // - all nodes except the last are a src of the following node.
 // - all nodes are the same shape.
 // TODO: Consider allowing GGML_OP_NONE nodes in between
-static inline bool ggml_can_fuse(const struct ggml_cgraph * cgraph, int node_idx, const enum ggml_op * ops, int num_ops) {
-    if (node_idx + num_ops > cgraph->n_nodes) {
-        return false;
-    }
-
+static inline bool ggml_can_fuse_ext(const struct ggml_cgraph * cgraph, const int * node_idxs, const enum ggml_op * ops, int num_ops) {
     for (int i = 0; i < num_ops; ++i) {
-        struct ggml_tensor * node = cgraph->nodes[node_idx + i];
+        if (node_idxs[i] >= cgraph->n_nodes) {
+            return false;
+        }
+
+        struct ggml_tensor * node = cgraph->nodes[node_idxs[i]];
         if (node->op != ops[i]) {
             return false;
         }
-        if (i < num_ops - 1 && !ggml_node_has_n_uses(cgraph, node_idx + i, 1)) {
+        if (i < num_ops - 1 && !ggml_node_has_n_uses(cgraph, node_idxs[i], 1)) {
             return false;
         }
         if (i > 0) {
-            struct ggml_tensor * prev = cgraph->nodes[node_idx + i - 1];
+            struct ggml_tensor * prev = cgraph->nodes[node_idxs[i - 1]];
             if (node->src[0] != prev && node->src[1] != prev) {
                 return false;
             }
@@ -615,6 +615,22 @@ static inline bool ggml_can_fuse(const struct ggml_cgraph * cgraph, int node_idx
     return true;
 }
 
+// same as above, for sequential indices starting at node_idx
+static inline bool ggml_can_fuse(const struct ggml_cgraph * cgraph, int node_idx, const enum ggml_op * ops, int num_ops) {
+    assert(num_ops < 32);
+
+    if (node_idx + num_ops > cgraph->n_nodes) {
+        return false;
+    }
+
+    int idxs[32];
+    for (int i = 0; i < num_ops; ++i) {
+        idxs[i] = node_idx + i;
+    }
+
+    return ggml_can_fuse_ext(cgraph, idxs, ops, num_ops);
+}
+
 #ifdef __cplusplus
 }
 #endif
Repository: electron/electron
Pull request: fix: don't crash Web Workers on unhandled rejections

#### Description of Change

Fix an issue where Web Workers crashed on unhandled rejections. This happened by default because it's how Node.js behaves, but it something we already disabled in the main process and renderer processes because it's not how the web behaves. Align with Web Worker behavior in browsers and prevent utility processes from crashing on any unhandled rejections.

#### 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] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed an issue where Web Workers crashed on unhandled rejections.


Changed files:
filename: shell/renderer/web_worker_observer.cc
patch: @@ -85,6 +85,9 @@ void WebWorkerObserver::WorkerScriptReadyForEvaluation(
     }
   }
 
+  // We do not want to crash Web Workers on unhandled rejections.
+  env->options()->unhandled_rejections = "warn-with-error-code";
+
   // Add Electron extended APIs.
   electron_bindings_->BindTo(env->isolate(), env->process_object());
Repository: denoland/deno
Pull request: fix(ext/node): createInterface doesn't require env permission

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

Changed files:
filename: ext/node/polyfills/_readline.mjs
patch: @@ -24,6 +24,8 @@
 // deno-lint-ignore-file prefer-primordials
 // deno-lint-ignore-file camelcase
 
+import { op_get_env_no_permission_check } from "ext:core/ops";
+
 import {
   clearLine,
   clearScreenDown,
@@ -35,7 +37,6 @@ import promises from "ext:deno_node/readline/promises.ts";
 import { validateAbortSignal } from "ext:deno_node/internal/validators.mjs";
 import { promisify } from "ext:deno_node/internal/util.mjs";
 import { AbortError } from "ext:deno_node/internal/errors.ts";
-import process from "node:process";
 
 import {
   Interface as _Interface,
@@ -102,7 +103,7 @@ function Interface(input, output, completer, terminal) {
     completer,
     terminal,
   );
-  if (process.env.TERM === "dumb") {
+  if (op_get_env_no_permission_check("TERM") === "dumb") {
     this._ttyWrite = _ttyWriteDumb.bind(this);
   }
 }

filename: ext/os/lib.rs
patch: @@ -55,6 +55,7 @@ deno_core::extension!(
     op_exit,
     op_delete_env,
     op_get_env,
+    op_get_env_no_permission_check,
     op_gid,
     op_hostname,
     op_loadavg,
@@ -185,18 +186,7 @@ fn op_env(
   Ok(env::vars().collect())
 }
 
-#[op2(stack_trace)]
-#[string]
-fn op_get_env(
-  state: &mut OpState,
-  #[string] key: String,
-) -> Result<Option<String>, OsError> {
-  let skip_permission_check = NODE_ENV_VAR_ALLOWLIST.contains(key.as_str());
-
-  if !skip_permission_check {
-    state.borrow_mut::<PermissionsContainer>().check_env(&key)?;
-  }
-
+fn get_env_var(key: &str) -> Result<Option<String>, OsError> {
   if key.is_empty() {
     return Err(OsError::EnvEmptyKey);
   }
@@ -212,6 +202,29 @@ fn op_get_env(
   Ok(r)
 }
 
+#[op2]
+#[string]
+fn op_get_env_no_permission_check(
+  #[string] key: &str,
+) -> Result<Option<String>, OsError> {
+  get_env_var(key)
+}
+
+#[op2(stack_trace)]
+#[string]
+fn op_get_env(
+  state: &mut OpState,
+  #[string] key: &str,
+) -> Result<Option<String>, OsError> {
+  let skip_permission_check = NODE_ENV_VAR_ALLOWLIST.contains(key);
+
+  if !skip_permission_check {
+    state.borrow_mut::<PermissionsContainer>().check_env(key)?;
+  }
+
+  get_env_var(key)
+}
+
 #[op2(fast, stack_trace)]
 fn op_delete_env(
   state: &mut OpState,

filename: tests/specs/node/readline_doesnt_require_permissions/__test__.jsonc
patch: @@ -0,0 +1,5 @@
+{
+  // Regression test for https://github.com/denoland/deno/issues/29441
+  "args": "run main.ts",
+  "output": "main.out"
+}

filename: tests/specs/node/readline_doesnt_require_permissions/main.out
patch: @@ -0,0 +1 @@
+[ "l1", "l2", "l3" ]

filename: tests/specs/node/readline_doesnt_require_permissions/main.ts
patch: @@ -0,0 +1,14 @@
+import { Readable } from "node:stream";
+import { createInterface } from "node:readline";
+
+const input = Readable.from(`
+    l1
+    l2
+    l3
+`);
+
+const stream = createInterface({ input });
+
+const lines = await Array.fromAsync(stream, (str) => str.trim());
+
+console.log(lines.filter(Boolean));
Repository: ggml-org/llama.cpp
Pull request: ggml : add ggml_op_is_empty

It is commonly needed, especially in `graph_compute` backend implementations, to filter ops that are "empty", such as view, reshapes, etc. This patch declares a common function in `ggml.h` to be reused.

Changed files:
filename: ggml/src/ggml-impl.h
patch: @@ -73,7 +73,7 @@ static inline int ggml_up(int n, int m) {
     return (n + m - 1) & ~(m - 1);
 }
 
-// TODO: move to ggml.h?
+// TODO: move to ggml.h? (won't be able to inline)
 static bool ggml_are_same_layout(const struct ggml_tensor * a, const struct ggml_tensor * b) {
     if (a->type != b->type) {
         return false;
@@ -89,6 +89,19 @@ static bool ggml_are_same_layout(const struct ggml_tensor * a, const struct ggml
     return true;
 }
 
+static bool ggml_op_is_empty(enum ggml_op op) {
+    switch (op) {
+        case GGML_OP_NONE:
+        case GGML_OP_RESHAPE:
+        case GGML_OP_TRANSPOSE:
+        case GGML_OP_VIEW:
+        case GGML_OP_PERMUTE:
+            return true;
+        default:
+            return false;
+    }
+}
+
 //
 // logging
 //

filename: ggml/src/ggml-metal/ggml-metal-common.cpp
patch: @@ -184,20 +184,6 @@ bool ggml_mem_ranges_check(ggml_mem_ranges_t mrs, const ggml_tensor * tensor) {
     return ggml_mem_ranges_check_dst(mrs, tensor);
 }
 
-// TODO: move to ggml.h?
-static bool is_empty(ggml_op op) {
-    switch (op) {
-        case GGML_OP_NONE:
-        case GGML_OP_RESHAPE:
-        case GGML_OP_TRANSPOSE:
-        case GGML_OP_VIEW:
-        case GGML_OP_PERMUTE:
-            return true;
-        default:
-            return false;
-    }
-}
-
 struct node_info {
     ggml_tensor * node;
 
@@ -212,7 +198,7 @@ struct node_info {
     }
 
     bool is_empty() const {
-        return ::is_empty(node->op);
+        return ggml_op_is_empty(node->op);
     }
 
     void add_fused(ggml_tensor * t) {
@@ -289,7 +275,7 @@ static std::vector<int> ggml_metal_graph_optimize_reorder(const std::vector<node
             case GGML_OP_GET_ROWS:
                 return true;
             default:
-                return is_empty(op);
+                return ggml_op_is_empty(op);
         }
     };
Repository: electron/electron
Pull request: fix: don't crash Web Workers on unhandled rejections

Backport of #45992

See that PR for details.


Notes: Fixed an issue where Web Workers crashed on unhandled rejections.


Changed files:
filename: shell/renderer/web_worker_observer.cc
patch: @@ -85,6 +85,9 @@ void WebWorkerObserver::WorkerScriptReadyForEvaluation(
     }
   }
 
+  // We do not want to crash Web Workers on unhandled rejections.
+  env->options()->unhandled_rejections = "warn-with-error-code";
+
   // Add Electron extended APIs.
   electron_bindings_->BindTo(env->isolate(), env->process_object());
Repository: ggml-org/llama.cpp
Pull request: codeowners : update ownership for @ngxson and @allozuar

Update ownership for these parts:
- @ngxson : server, mtmd, chat templates (non-jinja system)
- @allozaur : webui


Changed files:
filename: CODEOWNERS
patch: @@ -2,7 +2,10 @@
 
 /ci/ @ggerganov
 /.devops/*.Dockerfile @ngxson
-/tools/server/ @ngxson
+/tools/server/* @ngxson # no subdir
+/tools/server/webui/ @allozaur
+/tools/mtmd/ @ngxson
+/src/llama-chat.* @ngxson
 /ggml/src/ggml-cuda/fattn* @JohannesGaessler
 /ggml/src/ggml-cuda/mmq.* @JohannesGaessler
 /ggml/src/ggml-cuda/mmvq.* @JohannesGaessler
Repository: denoland/deno
Pull request: fix(ext/node): ignore some Node.js specific flags

Unavailability of these flags cause many errors in node compat test (See https://node-test-viewer.deno.dev/results/2025-05-26/linux.errors.txt ). This unblocks those failures

Changed files:
filename: ext/node/polyfills/internal/child_process.ts
patch: @@ -1220,6 +1220,10 @@ function toDenoArgs(args: string[]): string[] {
     if (flagInfo === undefined) {
       if (arg === "--no-warnings") {
         denoArgs.push("--quiet");
+      } else if (arg === "--expose-internals") {
+        // internals are always exposed in Deno.
+      } else if (arg === "--permission") {
+        // ignore --permission flag
       } else {
         // Not a known flag that expects a value. Just copy it to the output.
         denoArgs.push(arg);
Repository: nodejs/node
Pull request: doc: fix c++ addon hello world sample

Fixes #56173
Refs: #56173

This PR updates the sample provided at https://nodejs.org/api/addons.html#hello-world so it builds successfully with `node-gyp` [1]. 

[1]: https://v8docs.nodesource.com/node-4.8/d2/db3/classv8_1_1_string.html

Changed files:
filename: doc/api/addons.md
patch: @@ -72,14 +72,15 @@ namespace demo {
 using v8::FunctionCallbackInfo;
 using v8::Isolate;
 using v8::Local;
+using v8::NewStringType;
 using v8::Object;
 using v8::String;
 using v8::Value;
 
 void Method(const FunctionCallbackInfo<Value>& args) {
   Isolate* isolate = args.GetIsolate();
   args.GetReturnValue().Set(String::NewFromUtf8(
-      isolate, "world").ToLocalChecked());
+      isolate, "world", NewStringType::kNormal).ToLocalChecked());
 }
 
 void Initialize(Local<Object> exports) {
Repository: facebook/react
Pull request: fix(eslint-plugin-react-hooks): accepting `as` expressions as deps array

## Summary

This PR closes #25844
The original issue talks about `as const`, but seems like it fails for any `as X` expressions since it adds another nesting level to the AST.

EDIT: Also closes #20162

## How did you test this change?

Added unit tests

Changed files:
filename: packages/eslint-plugin-react-hooks/__tests__/ESLintRuleExhaustiveDeps-test.js
patch: @@ -7747,6 +7747,24 @@ const testsTypescript = {
         }
       `,
     },
+    {
+      code: normalizeIndent`
+        function App(props) {
+          React.useEffect(() => {
+            console.log(props.test);
+          }, [props.test] as const);
+        }
+      `,
+    },
+    {
+      code: normalizeIndent`
+        function App(props) {
+          React.useEffect(() => {
+            console.log(props.test);
+          }, [props.test] as any);
+        }
+      `,
+    },
   ],
   invalid: [
     {

filename: packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
patch: @@ -618,7 +618,12 @@ export default {
 
       const declaredDependencies = [];
       const externalDependencies = new Set();
-      if (declaredDependenciesNode.type !== 'ArrayExpression') {
+      const isArrayExpression =
+        declaredDependenciesNode.type === 'ArrayExpression';
+      const isTSAsArrayExpression =
+        declaredDependenciesNode.type === 'TSAsExpression' &&
+        declaredDependenciesNode.expression.type === 'ArrayExpression';
+      if (!isArrayExpression && !isTSAsArrayExpression) {
         // If the declared dependencies are not an array expression then we
         // can't verify that the user provided the correct dependencies. Tell
         // the user this in an error.
@@ -631,7 +636,11 @@ export default {
             'dependencies.',
         });
       } else {
-        declaredDependenciesNode.elements.forEach(declaredDependencyNode => {
+        const arrayExpression = isTSAsArrayExpression
+          ? declaredDependenciesNode.expression
+          : declaredDependenciesNode;
+
+        arrayExpression.elements.forEach(declaredDependencyNode => {
           // Skip elided elements.
           if (declaredDependencyNode === null) {
             return;