helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: fix: setImmediate[util.promisify.custom] access fails in edge runtime

Follow up to #88346. Looks like the change there crashes in edge because `globalThis.setImmediate` isn't defined, so we check before accessing.

Changed files:
filename: packages/next/src/server/node-environment-extensions/fast-set-immediate.external.ts
patch: @@ -23,8 +23,12 @@ const originalSetImmediate = globalThis.setImmediate
 const originalClearImmediate = globalThis.clearImmediate
 const originalNextTick = process.nextTick
 const originalSetImmediatePromisify: (typeof setImmediate)['__promisify__'] =
-  // @ts-expect-error: the types for `promisify.custom` are strange
-  originalSetImmediate[promisify.custom]
+  typeof originalSetImmediate === 'function'
+    ? // @ts-expect-error: the types for `promisify.custom` are strange
+      originalSetImmediate[promisify.custom]
+    : // if setImmediate is not defined, we must be in the edge runtime,
+      // and won't ever enable the patch, so this can be a dummy value
+      undefined!
 
 export { originalSetImmediate as unpatchedSetImmediate }
Repository: huggingface/transformers
Pull request: Fix failing `Pix2StructIntegrationTest`

# What does this PR do?

Fixes this failing [Pix2StructIntegrationTest](https://github.com/huggingface/transformers/actions/runs/20706072009/job/59437072135#step:14:1929).

<img width="1336" height="178" alt="image" src="https://github.com/user-attachments/assets/796b73c0-1406-400b-8f01-1a7b8af65978" />



## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?
@vasqu

Changed files:
filename: tests/models/pix2struct/test_modeling_pix2struct.py
patch: @@ -683,9 +683,7 @@ def test_batched_inference_image_captioning(self):
         processor = Pix2StructProcessor.from_pretrained("google/pix2struct-textcaps-base")
         image_1 = prepare_img()
 
-        second_url = (
-            "https://www.connollycove.com/wp-content/uploads/2019/06/temple-bar-dublin-world-famous-irish-pub.jpg"
-        )
+        second_url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/temple-bar-dublin-world-famous-irish-pub.jpg"
         image_2 = Image.open(requests.get(second_url, stream=True).raw)
 
         # image only
Repository: nodejs/node
Pull request: test: asserts that import.meta.resolve invokes sync loader hooks

Add a test case asserting that `import.meta.resolve` invokes sync loader hooks.

Changed files:
filename: test/es-module/test-esm-import-meta-resolve-hooks.mjs
patch: @@ -0,0 +1,21 @@
+// Flags: --experimental-import-meta-resolve
+import '../common/index.mjs';
+import assert from 'node:assert';
+import { registerHooks } from 'node:module';
+
+// Asserts that import.meta.resolve invokes loader hooks registered via `registerHooks`.
+
+registerHooks({
+  resolve(specifier, context, defaultResolve) {
+    if (specifier === 'custom:hooked') {
+      return {
+        shortCircuit: true,
+        url: new URL('./test-esm-import-meta.mjs', import.meta.url).href,
+      };
+    }
+    return defaultResolve(specifier, context);
+  },
+});
+
+assert.strictEqual(import.meta.resolve('custom:hooked'),
+                   new URL('./test-esm-import-meta.mjs', import.meta.url).href);
Repository: ggml-org/llama.cpp
Pull request: compare-llama-bench: check remotes as well

When running comparisons between `upstream/master` (or any remote branch), `compare-llama-bench.py` fails because it can't the remote branch through the commit hash. This PR adds checking remote branches for matches

Changed files:
filename: scripts/compare-llama-bench.py
patch: @@ -293,6 +293,10 @@ def get_commit_hexsha8(self, name: str) -> Optional[str]:
         for t in self.repo.tags:
             if t.name == name:
                 return t.commit.hexsha[:self.build_len]
+        for remote in self.repo.remotes:
+            for ref in remote.refs:
+                if ref.name == name or ref.remote_head == name:
+                    return ref.commit.hexsha[:self.build_len]
         for c in self.repo.iter_commits("--all"):
             if c.hexsha[:self.build_len] == name[:self.build_len]:
                 return c.hexsha[:self.build_len]
Repository: vuejs/vue
Pull request: fix(types): fix `renderError` type (#8635)

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)

- [x] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [x] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [x] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**


Changed files:
filename: types/options.d.ts
patch: @@ -70,7 +70,7 @@ export interface ComponentOptions<
   template?: string;
   // hack is for funcitonal component type inference, should not used in user code
   render?(createElement: CreateElement, hack: RenderContext<Props>): VNode;
-  renderError?: (h: () => VNode, err: Error) => VNode;
+  renderError?(createElement: CreateElement, err: Error): VNode;
   staticRenderFns?: ((createElement: CreateElement) => VNode)[];
 
   beforeCreate?(this: V): void;

filename: types/test/options-test.ts
patch: @@ -202,6 +202,9 @@ Vue.component('component', {
       [createElement("div", "message")]
     ]);
   },
+  renderError(createElement, err) {
+    return createElement('pre', { style: { color: 'red' }}, err.stack)
+  },
   staticRenderFns: [],
 
   beforeCreate() {
Repository: electron/electron
Pull request: ci: detect patch needs update error with problem matcher

Backport of #49405

See that PR for details.


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: .github/actions/checkout/action.yml
patch: @@ -143,11 +143,12 @@ runs:
           echo "No changes to patches detected"
         fi
       fi
-  - name: Remove patch conflict problem matcher
+  - name: Remove patch conflict problem matchers
     shell: bash
     run: |
       echo "::remove-matcher owner=merge-conflict::"
       echo "::remove-matcher owner=patch-conflict::"
+      echo "::remove-matcher owner=patch-needs-update::"
   - name: Upload patches stats
     if: ${{ inputs.target-platform == 'linux' && github.ref == 'refs/heads/main' }}
     shell: bash

filename: .github/problem-matchers/patch-conflict.json
patch: @@ -19,6 +19,16 @@
           "line": 3
         }
       ]
+    },
+    {
+      "owner": "patch-needs-update",
+      "pattern": [
+        {
+          "regexp": "^((patches\/.*): needs update)$",
+          "message": 1,
+          "file": 2
+        }
+      ]
     }
   ]
 }
Repository: facebook/react
Pull request: fix typo in compiler validation filename

## Summary

While investigating the root cause of #33208, I noticed a clear typo for one of the validation files.

## How did you test this change?

Inside `/react/compiler/packages/babel-plugin-react-compiler` I ran the test script successfully:

<img width="415" alt="Screenshot at May 22 16-43-06" src="https://github.com/user-attachments/assets/3fe8c5e1-37ce-4a31-b35e-7e323e57cd9d" />


Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/Validation/index.ts
patch: @@ -9,7 +9,7 @@ export {validateContextVariableLValues} from './ValidateContextVariableLValues';
 export {validateHooksUsage} from './ValidateHooksUsage';
 export {validateMemoizedEffectDependencies} from './ValidateMemoizedEffectDependencies';
 export {validateNoCapitalizedCalls} from './ValidateNoCapitalizedCalls';
-export {validateNoRefAccessInRender} from './ValidateNoRefAccesInRender';
+export {validateNoRefAccessInRender} from './ValidateNoRefAccessInRender';
 export {validateNoSetStateInRender} from './ValidateNoSetStateInRender';
 export {validatePreservedManualMemoization} from './ValidatePreservedManualMemoization';
 export {validateUseMemo} from './ValidateUseMemo';
Repository: ollama/ollama
Pull request: ml: update Context.Forward interface

- update `Context.Forward` to accept multiple tensors to match `Context.Compute` signature
- update `Context.Forward` to return Context such that it can be chained with `Context.Compute`

Changed files:
filename: kvcache/causal_test.go
patch: @@ -342,7 +342,7 @@ func (c *testContext) FromIntSlice(s []int32, shape ...int) (ml.Tensor, error) {
 	return out, nil
 }
 
-func (c *testContext) Forward(ml.Tensor) {}
+func (c *testContext) Forward(...ml.Tensor) ml.Context { return c }
 
 func (c *testContext) Compute(...ml.Tensor) {}
Repository: ollama/ollama
Pull request: server/internal/registry: implement CloseNotify and Flush (for now)

This fixes panics introduced in 2412adf42b8380748ac79476e273f5b337c3b977 when Gin ungracefully assumes that the http.ResponseWriter implements http.CloseNotifier and http.Flusher, which our new statusCodeRecorder does not. This is a temporary fix until we can pour the rest of the Gin out.

Changed files:
filename: server/internal/registry/server.go
patch: @@ -72,6 +72,26 @@ func (r *statusCodeRecorder) WriteHeader(status int) {
 	r.ResponseWriter.WriteHeader(status)
 }
 
+var (
+	_ http.ResponseWriter = (*statusCodeRecorder)(nil)
+	_ http.CloseNotifier  = (*statusCodeRecorder)(nil)
+	_ http.Flusher        = (*statusCodeRecorder)(nil)
+)
+
+// CloseNotify implements the http.CloseNotifier interface, for Gin. Remove with Gin.
+//
+// It panics if the underlying ResponseWriter is not a CloseNotifier.
+func (r *statusCodeRecorder) CloseNotify() <-chan bool {
+	return r.ResponseWriter.(http.CloseNotifier).CloseNotify()
+}
+
+// Flush implements the http.Flusher interface, for Gin. Remove with Gin.
+//
+// It panics if the underlying ResponseWriter is not a Flusher.
+func (r *statusCodeRecorder) Flush() {
+	r.ResponseWriter.(http.Flusher).Flush()
+}
+
 func (r *statusCodeRecorder) status() int {
 	return cmp.Or(r._status, 200)
 }
Repository: huggingface/transformers
Pull request: Grouped beam search from config params

# What does this PR do?

Ensures that we can fallback to hub-based group generation from generation args, even if the custom generate is not passed. And, I updated the version in deprecation cycle. I don't think we will break it for v5 yet


```python

from transformers import BartForConditionalGeneration, GenerationConfig
import torch

model_id = "hf-internal-testing/tiny-random-bart"
model = BartForConditionalGeneration.from_pretrained(model_id)
gen_config = GenerationConfig(
    num_beams=4,
    do_sample=False,
    max_new_tokens=10,
    min_new_tokens=10,
    num_beam_groups=2,
    diversity_penalty=0.0001,
    use_cache=True,
)

input_ids = torch.tensor([[model.config.bos_token_id]])
out = model.generate(input_ids, generation_config=gen_config, trust_remote_code=True)

```

Changed files:
filename: src/transformers/generation/utils.py
patch: @@ -2471,9 +2471,11 @@ def generate(
         generation_config, model_kwargs = self._prepare_generation_config(generation_config, **kwargs)
 
         generation_mode = generation_config.get_generation_mode(assistant_model)
+        deprecated_mode_repo = self._get_deprecated_gen_repo(generation_mode, trust_remote_code, custom_generate)
+
         if isinstance(custom_generate, Callable):
             decoding_method = custom_generate
-        else:
+        elif deprecated_mode_repo is None:
             # type() required to access the unbound class-level method
             decoding_method = getattr(type(self), GENERATION_MODES_MAPPING[generation_mode])
 
@@ -2484,7 +2486,7 @@ def generate(
         # NOTE: This must come after initializing generation_config, since we need it to determine if this is a deprecated mode.
         # It must also be before any preparation steps, since Hub repos expect to be loaded before preparation steps.
         # TODO joao, manuel: remove this in v4.62.0
-        if deprecated_mode_repo := self._get_deprecated_gen_repo(generation_mode, trust_remote_code, custom_generate):
+        if deprecated_mode_repo is not None:
             return GenerationMixin.generate(
                 self,
                 inputs=inputs,
Repository: nodejs/node
Pull request: url: add fast path to getPathFromURL decoder

branch:

```sh
node % ./node benchmark/run.js --filter whatwg-url-to-and-from-path url
url/whatwg-url-to-and-from-path.js
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null" method="fileURLToPath": 3,853,044.868707496
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null?key=param&bool" method="fileURLToPath": 3,490,012.0935340663
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null?key=param&bool#hash" method="fileURLToPath": 3,167,181.914377771
```

main:

```sh
node % ./node benchmark/run.js --filter whatwg-url-to-and-from-path url
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null" method="fileURLToPath": 2,034,421.4266934511
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null?key=param&bool" method="fileURLToPath": 2,062,544.6025270298
url/whatwg-url-to-and-from-path.js n=5000000 input="file:///dev/null?key=param&bool#hash" method="fileURLToPath": 2,022,311.8969784945
```

The majority of file paths won't need decoding, so this PR avoids calling `decodeURIComponent` when the path is pure ASCII with no encodings

Changed files:
filename: lib/internal/url.js
patch: @@ -1463,7 +1463,10 @@ function getPathFromURLWin32(url) {
     }
   }
   pathname = SideEffectFreeRegExpPrototypeSymbolReplace(FORWARD_SLASH, pathname, '\\');
-  pathname = decodeURIComponent(pathname);
+  // Fast-path: if there is no percent-encoding, avoid decodeURIComponent.
+  if (StringPrototypeIncludes(pathname, '%')) {
+    pathname = decodeURIComponent(pathname);
+  }
   if (hostname !== '') {
     // If hostname is set, then we have a UNC path
     // Pass the hostname through domainToUnicode just in case
@@ -1569,7 +1572,8 @@ function getPathFromURLPosix(url) {
       }
     }
   }
-  return decodeURIComponent(pathname);
+  // Fast-path: if there is no percent-encoding, avoid decodeURIComponent.
+  return StringPrototypeIncludes(pathname, '%') ? decodeURIComponent(pathname) : pathname;
 }
 
 function getPathBufferFromURLPosix(url) {
Repository: ollama/ollama
Pull request: go.mod: Use full version for go 1.24.0

Otherwise on Linux I get:
go: download go1.24 for linux/amd64: toolchain not available

Changed files:
filename: go.mod
patch: @@ -1,6 +1,6 @@
 module github.com/ollama/ollama
 
-go 1.24
+go 1.24.0
 
 require (
 	github.com/containerd/console v1.0.3
Repository: facebook/react
Pull request: [react-dom] Enforce small gap between completed navigation and default Transition indicator

We delay the default Transition indicator by 100ms to reduce jank in case we're dealing with a fast Transition. However, this delay was previously interrupted if a navigation completed before the default Transition indicator is shown.

Instead of interrupting, we leave a small async gap to make it clear there are two separate actions.

This also prevents a crash in Chrome (https://issues.chromium.org/u/1/issues/419746417).

## Test plan
- [x] "Provoke Chrome crash" in Flight fixture no longer crashes the page

Changed files:
filename: fixtures/flight/src/App.js
patch: @@ -12,6 +12,7 @@ import Button from './Button.js';
 import Form from './Form.js';
 import {Dynamic} from './Dynamic.js';
 import {Client} from './Client.js';
+import {Navigate} from './Navigate.js';
 
 import {Note} from './cjs/Note.js';
 
@@ -89,6 +90,7 @@ export default async function App({prerender}) {
           <Note />
           <Foo>{dedupedChild}</Foo>
           <Bar>{Promise.resolve([dedupedChild])}</Bar>
+          <Navigate />
         </Container>
       </body>
     </html>

filename: fixtures/flight/src/Navigate.js
patch: @@ -0,0 +1,40 @@
+'use client';
+
+import * as React from 'react';
+import Container from './Container.js';
+
+export function Navigate() {
+  /** Repro for https://issues.chromium.org/u/1/issues/419746417 */
+  function provokeChromeCrash() {
+    React.startTransition(async () => {
+      console.log('Default transition triggered');
+
+      await new Promise(resolve => {
+        setTimeout(
+          () => {
+            history.pushState(
+              {},
+              '',
+              `?chrome-crash-419746417=${performance.now()}`
+            );
+          },
+          // This needs to happen before React's default transition indicator
+          // is displayed but after it's scheduled.
+          100 + -50
+        );
+
+        setTimeout(() => {
+          console.log('Default transition completed');
+          resolve();
+        }, 1000);
+      });
+    });
+  }
+
+  return (
+    <Container>
+      <h2>Navigation fixture</h2>
+      <button onClick={provokeChromeCrash}>Provoke Chrome Crash (fixed)</button>
+    </Container>
+  );
+}

filename: packages/react-dom/src/client/ReactDOMDefaultTransitionIndicator.js
patch: @@ -38,7 +38,8 @@ export function defaultOnDefaultTransitionIndicator(): void | (() => void) {
     if (!isCancelled) {
       // Some other navigation completed but we should still be running.
       // Start another fake one to keep the loading indicator going.
-      startFakeNavigation();
+      // There needs to be an async gap to work around https://issues.chromium.org/u/1/issues/419746417.
+      setTimeout(startFakeNavigation, 20);
     }
   }
 
@@ -70,7 +71,7 @@ export function defaultOnDefaultTransitionIndicator(): void | (() => void) {
     }
   }
 
-  // Delay the start a bit in case this is a fast navigation.
+  // Delay the start a bit in case this is a fast Transition.
   setTimeout(startFakeNavigation, 100);
 
   return function () {
Repository: vuejs/vue
Pull request: fix #8865: skip mixins and extends if child is already merged

**What kind of change does this PR introduce?** (check at least one)

- [x] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [x] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [x] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**
fixes #8865

Changed files:
filename: src/core/util/options.js
patch: @@ -378,15 +378,22 @@ export function mergeOptions (
   normalizeProps(child, vm)
   normalizeInject(child, vm)
   normalizeDirectives(child)
-  const extendsFrom = child.extends
-  if (extendsFrom) {
-    parent = mergeOptions(parent, extendsFrom, vm)
-  }
-  if (child.mixins) {
-    for (let i = 0, l = child.mixins.length; i < l; i++) {
-      parent = mergeOptions(parent, child.mixins[i], vm)
+  
+  // Apply extends and mixins on the child options,
+  // but only if it is a raw options object that isn't
+  // the result of another mergeOptions call.
+  // Only merged options has the _base property.
+  if (!child._base) {
+    if (child.extends) {
+      parent = mergeOptions(parent, child.extends, vm)
+    }
+    if (child.mixins) {
+      for (let i = 0, l = child.mixins.length; i < l; i++) {
+        parent = mergeOptions(parent, child.mixins[i], vm)
+      }
     }
   }
+
   const options = {}
   let key
   for (key in parent) {

filename: test/unit/features/global-api/extend.spec.js
patch: @@ -71,6 +71,25 @@ describe('Global API: extend', () => {
     expect(calls).toEqual([1, 2, 3])
   })
 
+  it('should not merge nested mixins created with Vue.extend', () => {
+    const A = Vue.extend({
+      created: () => {}
+    })
+    const B = Vue.extend({
+      mixins: [A],
+      created: () => {}
+    })
+    const C = Vue.extend({
+      extends: B,
+      created: () => {}
+    })
+    const D = Vue.extend({
+      mixins: [C],
+      created: () => {}
+    })
+    expect(D.options.created.length).toBe(4)
+  })
+
   it('should merge methods', () => {
     const A = Vue.extend({
       methods: {