helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: just a spelling mistake.

just a spelling mistake




Changed files:
filename: packages/react-reconciler/src/ReactChildFiber.js
patch: @@ -58,7 +58,7 @@ import {isCompatibleFamilyForHotReloading} from './ReactFiberHotReloading';
 import {getIsHydrating} from './ReactFiberHydrationContext';
 import {pushTreeFork} from './ReactFiberTreeContext';
 import {createThenableState, trackUsedThenable} from './ReactFiberThenable';
-import {readContextDuringReconcilation} from './ReactFiberNewContext';
+import {readContextDuringReconciliation} from './ReactFiberNewContext';
 
 // This tracks the thenables that are unwrapped during reconcilation.
 let thenableState: ThenableState | null = null;
@@ -746,7 +746,7 @@ function createChildReconciler(
         const context: ReactContext<mixed> = (newChild: any);
         return createChild(
           returnFiber,
-          readContextDuringReconcilation(returnFiber, context, lanes),
+          readContextDuringReconciliation(returnFiber, context, lanes),
           lanes,
           debugInfo,
         );
@@ -873,7 +873,7 @@ function createChildReconciler(
         return updateSlot(
           returnFiber,
           oldFiber,
-          readContextDuringReconcilation(returnFiber, context, lanes),
+          readContextDuringReconciliation(returnFiber, context, lanes),
           lanes,
           debugInfo,
         );
@@ -994,7 +994,7 @@ function createChildReconciler(
           existingChildren,
           returnFiber,
           newIdx,
-          readContextDuringReconcilation(returnFiber, context, lanes),
+          readContextDuringReconciliation(returnFiber, context, lanes),
           lanes,
           debugInfo,
         );
@@ -1710,7 +1710,7 @@ function createChildReconciler(
         return reconcileChildFibersImpl(
           returnFiber,
           currentFirstChild,
-          readContextDuringReconcilation(returnFiber, context, lanes),
+          readContextDuringReconciliation(returnFiber, context, lanes),
           lanes,
           debugInfo,
         );

filename: packages/react-reconciler/src/ReactFiberNewContext.js
patch: @@ -715,7 +715,7 @@ export function readContext<T>(context: ReactContext<T>): T {
   return readContextForConsumer(currentlyRenderingFiber, context);
 }
 
-export function readContextDuringReconcilation<T>(
+export function readContextDuringReconciliation<T>(
   consumer: Fiber,
   context: ReactContext<T>,
   renderLanes: Lanes,
Repository: vercel/next.js
Pull request: [Deprecation Warnings]: add unstable_rootParams deprecation warning

`unstable_rootParams()` is deprecated in favor of importing specific params from `next/root-params`. This also requires enabling the experimental feature in nextConfig via `experimental.rootParams`. 

Changed files:
filename: packages/next/src/server/request/root-params.ts
patch: @@ -21,11 +21,18 @@ import {
   wellKnownProperties,
 } from '../../shared/lib/utils/reflect-utils'
 import { actionAsyncStorage } from '../app-render/action-async-storage.external'
+import { warnOnce } from '../../build/output/log'
 
 interface CacheLifetime {}
 const CachedParams = new WeakMap<CacheLifetime, Promise<Params>>()
 
+/**
+ * @deprecated import specific root params from `next/root-params` instead.
+ */
 export async function unstable_rootParams(): Promise<Params> {
+  warnOnce(
+    '`unstable_rootParams()` is deprecated and will be removed in an upcoming major release. Import specific root params from `next/root-params` instead.'
+  )
   const workStore = workAsyncStorage.getStore()
   if (!workStore) {
     throw new InvariantError('Missing workStore in unstable_rootParams')
Repository: denoland/deno
Pull request: fix(ext/node): avoid panic when `crypto.randomInt` has no arguments

Closes https://github.com/denoland/deno/issues/30313

Changed:
- Check that both `min` and `max` are safe integers before proceeding with the random integer calculation, to guard against a lack of arguments or an undefined first argument to the `randomInt` call.

I'm not sure why non-`number` values were prevented from being checked with `NumberIsSafeInteger` or why a generic `Error` was used instead of a `TypeError` — I assume there may have been reasons and so may have missed something here. But it did seem the simplest way to avoid the panic.


Changed files:
filename: ext/node/polyfills/internal/crypto/_randomInt.ts
patch: @@ -2,6 +2,7 @@
 
 import { op_node_random_int } from "ext:core/ops";
 import { primordials } from "ext:core/mod.js";
+import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts";
 const {
   Error,
   MathCeil,
@@ -39,11 +40,12 @@ export default function randomInt(
     min = 0;
   }
 
-  if (
-    !NumberIsSafeInteger(min) ||
-    typeof max === "number" && !NumberIsSafeInteger(max)
-  ) {
-    throw new Error("max or min is not a Safe Number");
+  if (!NumberIsSafeInteger(min)) {
+    throw new ERR_INVALID_ARG_TYPE("min", "a safe integer", min);
+  }
+
+  if (!NumberIsSafeInteger(max)) {
+    throw new ERR_INVALID_ARG_TYPE("max", "a safe integer", max);
   }
 
   if (max - min > MathPow(2, 48)) {

filename: tests/unit_node/internal/_randomInt_test.ts
patch: @@ -4,6 +4,10 @@ import { assert, assertThrows } from "@std/assert";
 
 const between = (x: number, min: number, max: number) => x >= min && x < max;
 
+Deno.test("[node/crypto.randomInt] No Params", () => {
+  assertThrows(() => randomInt(undefined as unknown as number));
+});
+
 Deno.test("[node/crypto.randomInt] One Param: Max", () => {
   assert(between(randomInt(55), 0, 55));
 });
Repository: ggml-org/llama.cpp
Pull request: CUDA + openCL: fix bug in accessing rms_norm->src while doing fusion

Fixes https://github.com/ggml-org/ggml/issues/1365

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -2876,7 +2876,7 @@ static bool ggml_cuda_can_fuse(const struct ggml_cgraph * cgraph, int node_idx,
         }
 
         //if rms norm is the B operand, then we don't handle broadcast
-        if (rms_norm == mul->src[1] && !ggml_are_same_shape(mul->src[0], rms_norm->src[1])) {
+        if (rms_norm == mul->src[1] && !ggml_are_same_shape(mul->src[0], rms_norm)) {
             return false;
         }
 

filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -2686,7 +2686,7 @@ static bool ggml_opencl_can_fuse(const struct ggml_cgraph * cgraph, int node_idx
 
         // if rms_norm is the B operand, then we don't handle broadcast
         if (rms_norm == mul->src[1] &&
-            !ggml_are_same_shape(mul->src[0], rms_norm->src[1])) {
+            !ggml_are_same_shape(mul->src[0], rms_norm)) {
             return false;
         }
Repository: vercel/next.js
Pull request: Turbopack: set `window.next.turbopack` instead

Closes PACK-5239

https://vercel.slack.com/archives/C04RPSD7EPM/p1753968554253779

Changed files:
filename: packages/next/src/client/app-next-turbopack.ts
patch: @@ -1,7 +1,7 @@
 import { appBootstrap } from './app-bootstrap'
 import { isRecoverableError } from './react-client-callbacks/on-recoverable-error'
 
-window.next.version += '-turbo'
+window.next.turbopack = true
 ;(self as any).__webpack_hash__ = ''
 
 // eslint-disable-next-line @next/internal/typechecked-require

filename: packages/next/src/client/next-dev-turbopack.ts
patch: @@ -8,7 +8,8 @@ import { connect } from '@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-cl
 import type { TurbopackMsgToBrowser } from '../server/dev/hot-reloader-types'
 
 window.next = {
-  version: `${version}-turbo`,
+  version,
+  turbopack: true,
   // router is initialized later so it has to be live-binded
   get router() {
     return router

filename: packages/next/src/client/next-turbopack.ts
patch: @@ -9,7 +9,8 @@ import { initialize, version, router, emitter, hydrate } from './'
 import { displayContent } from './dev/fouc'
 
 window.next = {
-  version: `${version}-turbo`,
+  version,
+  turbopack: true,
   // router is initialized later so it has to be live-binded
   get router() {
     return router

filename: test/production/pages-dir/production/test/index.test.ts
patch: @@ -1156,9 +1156,15 @@ describe('Production Usage', () => {
       const version = await browser.eval('window.next.version')
       expect(version).toBeTruthy()
       expect(version).toBe(
-        (await next.readJSON('node_modules/next/package.json')).version +
-          (process.env.IS_TURBOPACK_TEST ? '-turbo' : '')
+        (await next.readJSON('node_modules/next/package.json')).version
       )
+
+      const turbopack = await browser.eval('window.next.turbopack')
+      if (process.env.IS_TURBOPACK_TEST) {
+        expect(turbopack).toBeTrue()
+      } else {
+        expect(turbopack).toBeFalsy()
+      }
     } finally {
       if (browser) {
         await browser.close()
Repository: facebook/react
Pull request: Revert "Land enableClientRenderFallbackOnTextMismatch for www"

We're looking to run further experiments on this.

Reverts facebook/react#28538

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.www-dynamic.js
patch: @@ -29,6 +29,7 @@ export const enableUseDeferredValueInitialArg = __VARIANT__;
 export const enableRenderableContext = __VARIANT__;
 export const useModernStrictMode = __VARIANT__;
 export const enableRefAsProp = __VARIANT__;
+export const enableClientRenderFallbackOnTextMismatch = __VARIANT__;
 export const enableRetryLaneExpiration = __VARIANT__;
 export const retryLaneExpirationMs = 5000;
 export const syncLaneExpirationMs = 250;

filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -37,6 +37,7 @@ export const {
   enableRenderableContext,
   useModernStrictMode,
   enableRefAsProp,
+  enableClientRenderFallbackOnTextMismatch,
 } = dynamicFeatureFlags;
 
 // On WWW, __EXPERIMENTAL__ is used for a new modern build.
@@ -47,7 +48,7 @@ export const enableProfilerTimer = __PROFILE__;
 export const enableProfilerCommitHooks = __PROFILE__;
 export const enableProfilerNestedUpdatePhase = __PROFILE__;
 export const enableUpdaterTracking = __PROFILE__;
-export const enableClientRenderFallbackOnTextMismatch = true;
+
 export const enableSuspenseAvoidThisFallback = true;
 export const enableSuspenseAvoidThisFallbackFizz = false;
Repository: denoland/deno
Pull request: feat(ext/kv): allow specifying default path and path prefix

The `Deno.openKv()` API now checks these env vars:

- `DENO_KV_DEFAULT_PATH` - if set, when no database path is specified, use the provided path.
- `DENO_KV_PATH_PREFIX` - if set, prepend this to the provided database path - e.g. if `DENO_KV_PATH_PREFIX=https://example.com/db/`, `Deno.openKv("default")` will open the database at `https://example.com/db/default`.

Changed files:
filename: ext/kv/dynamic.rs
patch: @@ -61,8 +61,22 @@ impl DatabaseHandler for MultiBackendDbHandler {
   async fn open(
     &self,
     state: Rc<RefCell<OpState>>,
-    path: Option<String>,
+    mut path: Option<String>,
   ) -> Result<Self::DB, JsErrorBox> {
+    if path.is_none() {
+      if let Ok(x) = std::env::var("DENO_KV_DEFAULT_PATH") {
+        if !x.is_empty() {
+          path = Some(x);
+        }
+      }
+    }
+
+    if let Some(path) = &mut path {
+      if let Ok(prefix) = std::env::var("DENO_KV_PATH_PREFIX") {
+        *path = format!("{}{}", prefix, path);
+      }
+    }
+
     for (prefixes, handler) in &self.backends {
       for &prefix in *prefixes {
         if prefix.is_empty() {
Repository: ollama/ollama
Pull request: ggml: fix off by one error

remove used Unknown FileType

Changed files:
filename: llm/ggml.go
patch: @@ -29,15 +29,14 @@ const (
 	FileTypeQ4_0
 	FileTypeQ4_1
 	FileTypeQ4_1_F16
-	FileTypeQ8_0 = iota + 3
+	FileTypeQ8_0 = iota + 2
 	FileTypeQ5_0
 	FileTypeQ5_1
 	FileTypeQ2_K
 	FileTypeQ3_K
 	FileTypeQ4_K
 	FileTypeQ5_K
 	FileTypeQ6_K
-	FileTypeUnknown = -1
 )
 
 type GGML struct {
Repository: nodejs/node
Pull request: doc: fix deprecation type for `DEP0148`

[DEP0148](https://nodejs.org/api/deprecations.html#DEP0148) is EOL since v17.0.0 but description says `Runtime`. Let's fix this.

Refs: https://github.com/nodejs/node/pull/40121

Changed files:
filename: doc/api/deprecations.md
patch: @@ -3064,11 +3064,11 @@ changes:
     description: Documentation-only deprecation.
 -->
 
-Type: Runtime
+Type: End-of-Life
 
 Using a trailing `"/"` to define subpath folder mappings in the
-[subpath exports][] or [subpath imports][] fields is deprecated. Use
-[subpath patterns][] instead.
+[subpath exports][] or [subpath imports][] fields is no longer supported.
+Use [subpath patterns][] instead.
 
 ### DEP0149: `http.IncomingMessage#connection`
Repository: ollama/ollama
Pull request: Document num_gqa parameter

It is required to be adjusted for some models, see https://github.com/jmorganca/ollama/issues/320 for more context

Changed files:
filename: docs/modelfile.md
patch: @@ -105,6 +105,7 @@ PARAMETER <parameter> <parametervalue>
 | mirostat_eta   | Influences how quickly the algorithm responds to feedback from the generated text. A lower learning rate will result in slower adjustments, while a higher learning rate will make the algorithm more responsive. (Default: 0.1)                        | float      | mirostat_eta 0.1     |
 | mirostat_tau   | Controls the balance between coherence and diversity of the output. A lower value will result in more focused and coherent text. (Default: 5.0)                                                                                                         | float      | mirostat_tau 5.0     |
 | num_ctx        | Sets the size of the context window used to generate the next token. (Default: 2048)                                                                                                                                                                    | int        | num_ctx 4096         |
+| num_gqa        | The number of GQA groups in the transformer layer. Required for some models, for example it is 8 for llama2:70b                                                                                                                                         | int        | num_gqa 1            |
 | num_gpu        | The number of GPUs to use. On macOS it defaults to 1 to enable metal support, 0 to disable.                                                                                                                                                             | int        | num_gpu 1            |
 | num_thread     | Sets the number of threads to use during computation. By default, Ollama will detect this for optimal performance. It is recommended to set this value to the number of physical CPU cores your system has (as opposed to the logical number of cores). | int        | num_thread 8         |
 | repeat_last_n  | Sets how far back for the model to look back to prevent repetition. (Default: 64, 0 = disabled, -1 = num_ctx)                                                                                                                                           | int        | repeat_last_n 64     |
Repository: facebook/react
Pull request: Remove renderSubtreeIntoContainer_DO_NOT_USE

Once D54648741 lands internally, we no longer need this shim. 

NOTE: There is still some work left to remove the `unstable_renderSubtreeIntoContainer` export.

Changed files:
filename: scripts/rollup/shims/facebook-www/renderSubtreeIntoContainer_DO_NOT_USE.js
patch: @@ -1,12 +0,0 @@
-/**
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-const ReactDOM = require('ReactDOM');
-
-module.exports = ReactDOM.unstable_renderSubtreeIntoContainer;
Repository: nodejs/node
Pull request: src: fix kill signal 0 on Windows

The [previous changes to this file](https://github.com/nodejs/node/pull/55514) missed the special case of `process.kill(0)`, thus breaking it on Windows. This PR fixes that.

Refs: https://github.com/nodejs/node/pull/55514
Refs: https://github.com/nodejs/node/issues/42923
Fixes: https://github.com/nodejs/node/issues/57669

Changed files:
filename: src/process_wrap.cc
patch: @@ -385,7 +385,7 @@ class ProcessWrap : public HandleWrap {
     }
 #ifdef _WIN32
     if (signal != SIGKILL && signal != SIGTERM && signal != SIGINT &&
-        signal != SIGQUIT) {
+        signal != SIGQUIT && signal != 0) {
       signal = SIGKILL;
     }
 #endif

filename: test/parallel/test-child-process-kill.js
patch: @@ -58,3 +58,23 @@ if (common.isWindows) {
   });
   process.kill('SIGHUP');
 }
+
+// Test that the process is not killed when sending a 0 signal.
+// This is a no-op signal that is used to check if the process is alive.
+const code = `const interval = setInterval(() => {}, 1000);
+process.stdin.on('data', () => { clearInterval(interval); });
+process.stdout.write('x');`;
+
+const checkProcess = spawn(process.execPath, ['-e', code]);
+
+checkProcess.on('exit', (code, signal) => {
+  assert.strictEqual(code, 0);
+  assert.strictEqual(signal, null);
+});
+
+checkProcess.stdout.on('data', common.mustCall((chunk) => {
+  assert.strictEqual(chunk.toString(), 'x');
+  checkProcess.kill(0);
+  checkProcess.stdin.write('x');
+  checkProcess.stdin.end();
+}));
Repository: ollama/ollama
Pull request: s/parmeter/parameter/


Changed files:
filename: api/types.go
patch: @@ -225,43 +225,43 @@ func (opts *Options) FromMap(m map[string]interface{}) error {
 						// when JSON unmarshals numbers, it uses float64, not int
 						field.SetInt(int64(t))
 					default:
-						log.Printf("could not convert model parmeter %v to int, skipped", key)
+						log.Printf("could not convert model parameter %v to int, skipped", key)
 					}
 				case reflect.Bool:
 					val, ok := val.(bool)
 					if !ok {
-						log.Printf("could not convert model parmeter %v to bool, skipped", key)
+						log.Printf("could not convert model parameter %v to bool, skipped", key)
 						continue
 					}
 					field.SetBool(val)
 				case reflect.Float32:
 					// JSON unmarshals to float64
 					val, ok := val.(float64)
 					if !ok {
-						log.Printf("could not convert model parmeter %v to float32, skipped", key)
+						log.Printf("could not convert model parameter %v to float32, skipped", key)
 						continue
 					}
 					field.SetFloat(val)
 				case reflect.String:
 					val, ok := val.(string)
 					if !ok {
-						log.Printf("could not convert model parmeter %v to string, skipped", key)
+						log.Printf("could not convert model parameter %v to string, skipped", key)
 						continue
 					}
 					field.SetString(val)
 				case reflect.Slice:
 					// JSON unmarshals to []interface{}, not []string
 					val, ok := val.([]interface{})
 					if !ok {
-						log.Printf("could not convert model parmeter %v to slice, skipped", key)
+						log.Printf("could not convert model parameter %v to slice, skipped", key)
 						continue
 					}
 					// convert []interface{} to []string
 					slice := make([]string, len(val))
 					for i, item := range val {
 						str, ok := item.(string)
 						if !ok {
-							log.Printf("could not convert model parmeter %v to slice of strings, skipped", key)
+							log.Printf("could not convert model parameter %v to slice of strings, skipped", key)
 							continue
 						}
 						slice[i] = str
Repository: denoland/deno
Pull request: fix(ext/node): use custom allocator for brotli

Fixes https://github.com/denoland/deno/issues/30259

Changed files:
filename: ext/node/ops/zlib/alloc.rs
patch: @@ -62,3 +62,49 @@ pub extern "C" fn zfree(_ptr: *mut c_void, address: *mut c_void) {
     alloc::dealloc(ptr as *mut u8, layout)
   }
 }
+
+pub extern "C" fn brotli_alloc(
+  _opaque: *mut brotli::ffi::broccoli::c_void,
+  size: usize,
+) -> *mut brotli::ffi::broccoli::c_void {
+  // Allocate space for a `usize` header to store the allocation size
+  let total_size = match size
+    .checked_add(std::mem::size_of::<usize>())
+    .map(|size| align_up(size, ALIGN))
+  {
+    Some(i) => i,
+    None => return ptr::null_mut(),
+  };
+
+  let layout = match Layout::from_size_align(total_size, ALIGN) {
+    Ok(layout) => layout,
+    Err(_) => return ptr::null_mut(),
+  };
+
+  // SAFETY: `layout` has non-zero size
+  unsafe {
+    let ptr = alloc::alloc(layout) as *mut usize;
+    if ptr.is_null() {
+      return ptr as *mut brotli::ffi::broccoli::c_void;
+    }
+    *ptr = total_size;
+    ptr.add(1) as *mut brotli::ffi::broccoli::c_void
+  }
+}
+
+pub extern "C" fn brotli_free(
+  _opaque: *mut brotli::ffi::broccoli::c_void,
+  address: *mut brotli::ffi::broccoli::c_void,
+) {
+  if address.is_null() {
+    return;
+  }
+
+  // SAFETY: Move back one pointer to read the size we stored in `brotli_alloc`
+  unsafe {
+    let ptr = (address as *mut usize).offset(-1);
+    let size = *ptr;
+    let layout = Layout::from_size_align_unchecked(size, ALIGN);
+    alloc::dealloc(ptr as *mut u8, layout)
+  }
+}

filename: ext/node/ops/zlib/mod.rs
patch: @@ -19,6 +19,8 @@ mod stream;
 use mode::Flush;
 use mode::Mode;
 
+use self::alloc::brotli_alloc;
+use self::alloc::brotli_free;
 use self::stream::StreamWrapper;
 
 #[inline]
@@ -593,8 +595,8 @@ impl BrotliEncoder {
     // SAFETY: creates new brotli encoder instance. `params` is a valid slice of u32 values.
     let inst = unsafe {
       let state = ffi::compressor::BrotliEncoderCreateInstance(
-        None,
-        None,
+        Some(brotli_alloc),
+        Some(brotli_free),
         std::ptr::null_mut(),
       );
       for (i, &value) in params.iter().enumerate() {
@@ -791,8 +793,8 @@ impl BrotliDecoder {
     // SAFETY: creates new brotli decoder instance. `params` is a valid slice of u32 values.
     let inst = unsafe {
       let state = ffi::decompressor::ffi::BrotliDecoderCreateInstance(
-        None,
-        None,
+        Some(brotli_alloc),
+        Some(brotli_free),
         std::ptr::null_mut(),
       );
       for (i, &value) in params.iter().enumerate() {