helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: [backport] fix: update the config.api.responseLimit type (#82852)

`config.api.responseLimit` can also be [set to
`false`](https://github.com/vercel/next.js/issues/82842#issuecomment-3207638164). Because of the limitations of type inference on JS files, we need to set the type to `boolean`.

See
https://github.com/vercel/next.js/issues/82842#issuecomment-3207638164

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to understand the PR)
- When linking to a Slack thread, you might want to share details of the conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Changed files:
filename: packages/next/src/server/lib/router-utils/typegen.ts
patch: @@ -567,7 +567,7 @@ export function generateValidatorFile(
   config?: {
     api?: {
       bodyParser?: boolean | { sizeLimit?: string }
-      responseLimit?: string | number
+      responseLimit?: string | number | boolean
       externalResolver?: boolean
     }
     runtime?: 'edge' | 'experimental-edge' | 'nodejs' | string // necessary unless config is exported as const
Repository: nodejs/node
Pull request: repl: avoid deprecated `require.extensions` in tab completion

This PR replaces the usage of require.extensions in the REPL autocompletion logic with Module._extensions.

require.extensions has been runtime-deprecated under [DEP0039](https://nodejs.org/api/deprecations.html#requireextensions), and its usage triggers a warning in recent Node.js versions. Since require.extensions is just a user-land alias for Module._extensions, we can safely access the same object via Module._extensions without any behavioral change or deprecation warning.

### Changes:
- this.context.require.extensions → Module._extensions in the REPL complete() function
- Adds an inline comment explaining the deprecation and replacement
- No functional behavior change



Fixes: https://github.com/nodejs/node/issues/58641



Changed files:
filename: lib/repl.js
patch: @@ -1359,7 +1359,7 @@ function complete(line, callback) {
     filter = completeOn;
     if (this.allowBlockingCompletions) {
       const subdir = match[2] || '';
-      const extensions = ObjectKeys(this.context.require.extensions);
+      const extensions = ObjectKeys(CJSModule._extensions);
       const indexes = ArrayPrototypeMap(extensions,
                                         (extension) => `index${extension}`);
       ArrayPrototypePush(indexes, 'package.json', 'index');
Repository: facebook/react
Pull request: feat[devtools-fusebox]: support theme option

Support propagating theme from Chrome DevTools frontend, the field is optional.

Next step, which is out of scope of this project and general improvement for React DevTools: teach RDT to listen to theme changes and if the theme preference is set to `auto` in settings, update the theme accordingly with the browser devtools.

Changed files:
filename: packages/react-devtools-fusebox/src/frontend.js
patch: @@ -13,7 +13,10 @@ import Bridge from 'react-devtools-shared/src/bridge';
 import Store from 'react-devtools-shared/src/devtools/store';
 import DevTools from 'react-devtools-shared/src/devtools/views/DevTools';
 
-import type {Wall} from 'react-devtools-shared/src/frontend/types';
+import type {
+  BrowserTheme,
+  Wall,
+} from 'react-devtools-shared/src/frontend/types';
 import type {FrontendBridge} from 'react-devtools-shared/src/bridge';
 
 type Config = {
@@ -42,18 +45,20 @@ export function createStore(bridge: FrontendBridge, config?: Config): Store {
 type InitializationOptions = {
   bridge: FrontendBridge,
   store: Store,
+  theme?: BrowserTheme,
 };
 
 export function initialize(
   contentWindow: Element | Document,
   options: InitializationOptions,
 ): void {
-  const {bridge, store} = options;
+  const {bridge, store, theme = 'light'} = options;
   const root = createRoot(contentWindow);
 
   root.render(
     <DevTools
       bridge={bridge}
+      browserTheme={theme}
       store={store}
       showTabBar={true}
       warnIfLegacyBackendDetected={true}
Repository: vercel/next.js
Pull request: temporarily disable flaky deploy test

Temporarily disabling this to prevent failing test noise while investigating the discrepancy between start/deploy. 

Changed files:
filename: test/e2e/app-dir/actions/app-action.test.ts
patch: @@ -1907,29 +1907,32 @@ describe('app-dir action handling', () => {
   })
 
   describe('action discarding', () => {
-    it('should not trigger a refresh for a server action that gets discarded due to a navigation (without revalidation)', async () => {
-      let browser = await next.browser('/action-discarding')
-      await browser.waitForIdleNetwork()
-      const initialRandomNumber = await browser
-        .elementByCss('#cached-random')
-        .text()
+    // TODO: Investigate flaky behavior when deployed
+    if (!isNextDeploy) {
+      it('should not trigger a refresh for a server action that gets discarded due to a navigation (without revalidation)', async () => {
+        let browser = await next.browser('/action-discarding')
+        await browser.waitForIdleNetwork()
+        const initialRandomNumber = await browser
+          .elementByCss('#cached-random')
+          .text()
 
-      await browser.elementByCss('#slow-action').click()
+        await browser.elementByCss('#slow-action').click()
 
-      // navigate to destination
-      await browser.elementByCss('#navigate-destination').click()
+        // navigate to destination
+        await browser.elementByCss('#navigate-destination').click()
 
-      // wait for the 2s action to finish
-      await waitFor(2000)
+        // wait for the 2s action to finish
+        await waitFor(2000)
 
-      await retry(async () => {
-        const newRandomNumber = await browser
-          .elementByCss('#cached-random')
-          .text()
+        await retry(async () => {
+          const newRandomNumber = await browser
+            .elementByCss('#cached-random')
+            .text()
 
-        expect(newRandomNumber).toBe(initialRandomNumber)
+          expect(newRandomNumber).toBe(initialRandomNumber)
+        })
       })
-    })
+    }
 
     it('should trigger a refresh for a server action that gets discarded due to a navigation (with revalidation)', async () => {
       let browser = await next.browser('/action-discarding')
Repository: ollama/ollama
Pull request: fix: nil pointer dereference

if the token request returns an error, e.g. the token server isn't running, resp is dereferenced and panics

Changed files:
filename: server/auth.go
patch: @@ -106,6 +106,7 @@ func getAuthToken(ctx context.Context, redirData AuthRedirect) (string, error) {
 	resp, err := makeRequest(ctx, "GET", redirectURL, headers, nil, nil)
 	if err != nil {
 		log.Printf("couldn't get token: %q", err)
+		return "", err
 	}
 	defer resp.Body.Close()
Repository: huggingface/transformers
Pull request: flash_paged: s_aux may not exist

Some implementations (i.e.,
https://huggingface.co/kernels-community/vllm-flash-attn3) support an `s_aux` arg for attention sinks, but others
(https://huggingface.co/kernels-community/flash-attn) do not. If s_aux is present in the kwargs, we forward it, otherwise we don't.

The user will still get an error if they use a model like gpt-oss-20b with an implementation that does not support `s_aux`, but models that don't use it won't error out. For example, [this is currently failing](https://github.com/huggingface/transformers/blob/399cd5c04b11ba3f740b4f76e8067326786405cc/examples/pytorch/continuous_batching.py#L16) because we are sending `s_aux: None` in the dict. We get:

```
TypeError: flash_attn_varlen_func() got an unexpected keyword argument 's_aux'
```


Changed files:
filename: src/transformers/integrations/flash_paged.py
patch: @@ -53,7 +53,7 @@ def paged_attention_forward(
     sliding_window = (-1, -1) if not getattr(module, "sliding_window", False) else (module.sliding_window, 0)
     if implementation is not None:
         flash_attn_varlen_func = implementation.flash_attn_varlen_func
-    custom_kwargs = {"s_aux": kwargs.get("s_aux")}
+    custom_kwargs = {"s_aux": kwargs.get("s_aux")} if "s_aux" in kwargs else {}
     attn_output = flash_attn_varlen_func(
         q.transpose(1, 2).squeeze(0).contiguous(),
         k.transpose(1, 2).squeeze(0).contiguous(),
Repository: denoland/deno
Pull request: fix: show --permission-set help only once

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

Changed files:
filename: cli/args/flags.rs
patch: @@ -3916,7 +3916,8 @@ fn permission_args(app: Command, requires: Option<&'static str>) -> Command {
           .num_args(0..=1)
           .require_equals(true)
           .default_missing_value("")
-          .short('P');
+          .short('P')
+          .hide(true);
         if let Some(requires) = requires {
           arg = arg.requires(requires);
         }
Repository: ggml-org/llama.cpp
Pull request: common : allow --system-prompt-file for diffusion-cli

Seems to have been overlooked.

Changed files:
filename: common/arg.cpp
patch: @@ -2030,7 +2030,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
                 params.system_prompt.pop_back();
             }
         }
-    ).set_examples({LLAMA_EXAMPLE_MAIN}));
+    ).set_examples({LLAMA_EXAMPLE_MAIN, LLAMA_EXAMPLE_DIFFUSION}));
     add_opt(common_arg(
         {"--in-file"}, "FNAME",
         "an input file (repeat to specify multiple files)",
Repository: vercel/next.js
Pull request: fix: add '.next/types/**/*.ts' to the pages router TSConfig

See #83010

Previously, typed links only worked in App Router. Now they work in Pages Router too, but we forgot to update the templates.


Changed files:
filename: packages/create-next-app/templates/default-empty/ts/tsconfig.json
patch: @@ -17,6 +17,6 @@
       "@/*": ["./*"]
     }
   },
-  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
+  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
   "exclude": ["node_modules"]
 }

filename: packages/create-next-app/templates/default-tw-empty/ts/tsconfig.json
patch: @@ -17,6 +17,6 @@
       "@/*": ["./*"]
     }
   },
-  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
+  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
   "exclude": ["node_modules"]
 }

filename: packages/create-next-app/templates/default-tw/ts/tsconfig.json
patch: @@ -17,6 +17,6 @@
       "@/*": ["./*"]
     }
   },
-  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
+  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
   "exclude": ["node_modules"]
 }

filename: packages/create-next-app/templates/default/ts/tsconfig.json
patch: @@ -17,6 +17,6 @@
       "@/*": ["./*"]
     }
   },
-  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
+  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
   "exclude": ["node_modules"]
 }
Repository: denoland/deno
Pull request: fix(ext/node): allow ATTACH DATABASE with `--allow-all`

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


Changed files:
filename: ext/node/ops/sqlite/database.rs
patch: @@ -275,13 +275,20 @@ fn open_db(
   allow_extension: bool,
 ) -> Result<rusqlite::Connection, SqliteError> {
   let perms = state.borrow::<PermissionsContainer>();
+  let disable_attach = perms
+    .check_has_all_permissions(Path::new(location))
+    .is_err();
+
   if location == ":memory:" {
     let conn = rusqlite::Connection::open_in_memory()?;
-    assert!(set_db_config(
-      &conn,
-      SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE,
-      false
-    ));
+    if disable_attach {
+      assert!(set_db_config(
+        &conn,
+        SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE,
+        false
+      ));
+      conn.set_limit(Limit::SQLITE_LIMIT_ATTACHED, 0)?;
+    }
 
     if allow_extension {
       perms.check_ffi_all()?;
@@ -293,7 +300,6 @@ fn open_db(
       ));
     }
 
-    conn.set_limit(Limit::SQLITE_LIMIT_ATTACHED, 0)?;
     return Ok(conn);
   }
 
@@ -313,11 +319,14 @@ fn open_db(
       location,
       rusqlite::OpenFlags::SQLITE_OPEN_READ_ONLY,
     )?;
-    assert!(set_db_config(
-      &conn,
-      SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE,
-      false
-    ));
+    if disable_attach {
+      assert!(set_db_config(
+        &conn,
+        SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE,
+        false
+      ));
+      conn.set_limit(Limit::SQLITE_LIMIT_ATTACHED, 0)?;
+    }
 
     if allow_extension {
       perms.check_ffi_all()?;
@@ -329,7 +338,6 @@ fn open_db(
       ));
     }
 
-    conn.set_limit(Limit::SQLITE_LIMIT_ATTACHED, 0)?;
     return Ok(conn);
   }
 
@@ -345,7 +353,9 @@ fn open_db(
     ));
   }
 
-  conn.set_limit(Limit::SQLITE_LIMIT_ATTACHED, 0)?;
+  if disable_attach {
+    conn.set_limit(Limit::SQLITE_LIMIT_ATTACHED, 0)?;
+  }
 
   Ok(conn)
 }

filename: runtime/permissions/lib.rs
patch: @@ -3660,7 +3660,7 @@ impl PermissionsContainer {
   }
 
   #[inline(always)]
-  fn check_has_all_permissions(
+  pub fn check_has_all_permissions(
     &self,
     context_path: &Path,
   ) -> Result<(), PermissionCheckError> {

filename: tests/specs/run/sqlite_attach_perms/__test__.jsonc
patch: @@ -0,0 +1,4 @@
+{
+  "args": "run -A sqlite_attach_perms.js",
+  "output": "sqlite_attach_perms.out"
+}

filename: tests/specs/run/sqlite_attach_perms/sqlite_attach_perms.js
patch: @@ -0,0 +1,7 @@
+import { DatabaseSync } from "node:sqlite";
+
+const db = new DatabaseSync(":memory:");
+db.exec("ATTACH DATABASE ':memory:' AS test");
+db.exec("CREATE TABLE test.foo (id INTEGER PRIMARY KEY)");
+db.close();
+console.log("OK");

filename: tests/specs/run/sqlite_attach_perms/sqlite_attach_perms.out
patch: @@ -0,0 +1 @@
+OK
Repository: ollama/ollama
Pull request: fix: ollama host for hostname

This fixes the client when setting `OLLAMA_HOST` to just the hostname, e.g. `OLLAMA_HOST=myhost`. `OLLAMA_HOST=myhost:11434` currently works as does `OLLAMA_HOST=127.0.0.1` and `OLLAMA_HOST=127.0.0.1:11434`

Changed files:
filename: api/client.go
patch: @@ -52,8 +52,10 @@ func ClientFromEnvironment() (*Client, error) {
 	host, port, err := net.SplitHostPort(hostport)
 	if err != nil {
 		host, port = "127.0.0.1", "11434"
-		if ip := net.ParseIP(strings.Trim(os.Getenv("OLLAMA_HOST"), "[]")); ip != nil {
+		if ip := net.ParseIP(strings.Trim(hostport, "[]")); ip != nil {
 			host = ip.String()
+		} else if hostport != "" {
+			host = hostport
 		}
 	}
Repository: electron/electron
Pull request: perf: improve temporaries in `WebWorkerObserver::WorkerScriptReadyForEvaluation()` (34-x-y backport)

Manually backport #46347 to 34-x-y. See that PR for details.

Notes: none.

Changed files:
filename: shell/renderer/web_worker_observer.cc
patch: @@ -4,10 +4,12 @@
 
 #include "shell/renderer/web_worker_observer.h"
 
+#include <string_view>
 #include <utility>
 
 #include "base/no_destructor.h"
 #include "base/ranges/algorithm.h"
+#include "base/strings/strcat.h"
 #include "base/threading/thread_local.h"
 #include "shell/common/api/electron_bindings.h"
 #include "shell/common/gin_helper/event_emitter_caller.h"
@@ -72,15 +74,14 @@ void WebWorkerObserver::WorkerScriptReadyForEvaluation(
   // is loaded. See corresponding change in node/init.ts.
   v8::Local<v8::Object> global = worker_context->Global();
 
-  std::vector<std::string> keys = {"fetch",   "Response", "FormData",
-                                   "Request", "Headers",  "EventSource"};
-  for (const auto& key : keys) {
+  for (const std::string_view key :
+       {"fetch", "Response", "FormData", "Request", "Headers", "EventSource"}) {
     v8::MaybeLocal<v8::Value> value =
-        global->Get(worker_context, gin::StringToV8(isolate, key.c_str()));
+        global->Get(worker_context, gin::StringToV8(isolate, key));
     if (!value.IsEmpty()) {
-      std::string blink_key = "blink" + key;
+      std::string blink_key = base::StrCat({"blink", key});
       global
-          ->Set(worker_context, gin::StringToV8(isolate, blink_key.c_str()),
+          ->Set(worker_context, gin::StringToV8(isolate, blink_key),
                 value.ToLocalChecked())
           .Check();
     }
Repository: nodejs/node
Pull request: test: correct SIMD support comment

The comment in the test file stated that:
"SIMD is not supported on rhel8-ppc64le"

This is incorrect -- WASM SIMD support is dependent on the available instructions, not the operating system. So it is more correct to say that WASM SIMD is not supported on IBM Power8 architecture.

---

Currently in our CI, it just so happens that all of our `rhel8-ppc64le` machines are IBM Power8, while, for example, the `rhel9-ppc64le` machines were provisioned as IBM Power9, but AFAIK you could be running either RHEL 8/9 on either architecture (or newer).

FTR other (non-IBM) "older architectures" without WASM SIMD support include some Athlon chips (but we don't have any of those in our CI): https://github.com/nodejs/undici/issues/2934#issuecomment-1983774244

<!--
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/es-module/test-esm-wasm.mjs
patch: @@ -70,7 +70,7 @@ describe('ESM: WASM modules', { concurrency: !process.env.TEST_PARALLEL }, () =>
       [
         'import { strictEqual, deepStrictEqual, ok } from "node:assert";',
 
-        // SIMD is not supported on rhel8-ppc64le
+        // WASM SIMD is not supported on older architectures such as IBM Power8
         'let wasmExports;',
         'try {',
         `  wasmExports = await import(${JSON.stringify(fixtures.fileURL('es-modules/globals.wasm'))});`,
Repository: ggml-org/llama.cpp
Pull request: model: add Granite Hybrid nano

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: src/llama-model.cpp
patch: @@ -1898,7 +1898,8 @@ void llama_model::load_hparams(llama_model_loader & ml) {
                 ml.get_key(LLM_KV_ATTENTION_LAYERNORM_RMS_EPS, hparams.f_norm_rms_eps);
 
                 switch (hparams.n_embd) {
-                    case 1536: type = LLM_TYPE_7B_A1B; break;
+                    case 768: type = LLM_TYPE_350M; break;
+                    case 1536: type = (hparams.n_embd == 2048 ? LLM_TYPE_7B_A1B : LLM_TYPE_1B); break;
                     case 2048: case 2560: type = LLM_TYPE_3B; break;
                     case 4096: type = LLM_TYPE_32B; break;
                     default: type = LLM_TYPE_UNKNOWN;