helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Flow upgrade to 0.190

Simple version bump.

Changed files:
filename: package.json
patch: @@ -63,7 +63,7 @@
     "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
     "fbjs-scripts": "1.2.0",
     "filesize": "^6.0.1",
-    "flow-bin": "^0.188.0",
+    "flow-bin": "^0.190.0",
     "glob": "^7.1.6",
     "glob-stream": "^6.1.0",
     "google-closure-compiler": "^20200517.0.0",

filename: packages/react-dom-bindings/src/client/ReactDOMComponent.js
patch: @@ -91,7 +91,9 @@ const CHILDREN = 'children';
 const STYLE = 'style';
 const HTML = '__html';
 
-let warnedUnknownTags;
+let warnedUnknownTags: {
+  [key: string]: boolean,
+};
 
 let validatePropertiesInDevelopment;
 let warnForPropDifference;

filename: scripts/flow/config/flowconfig
patch: @@ -43,9 +43,10 @@ untyped-type-import=error
 %CI_MAX_WORKERS%
 exact_by_default=true
 munge_underscores=false
+enforce_local_inference_annotations=false
 
 # Substituted by createFlowConfig.js:
 %REACT_RENDERER_FLOW_OPTIONS%
 
 [version]
-^0.188.0
+^0.190.0

filename: yarn.lock
patch: @@ -7912,10 +7912,10 @@ flatted@^2.0.0:
   resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
   integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
 
-flow-bin@^0.188.0:
-  version "0.188.1"
-  resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.188.1.tgz#1043ec955eec8cd402ec9fb4c49054bf14368c06"
-  integrity sha512-tQehbFoeXKz/MZqEClBB2ezuT1HHKoBlv6t8mAoUdFk1PaFhqcEmjx+1Bn0xygykrqHy0FY6C3z+AGleOnFbdQ==
+flow-bin@^0.190.0:
+  version "0.190.0"
+  resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.190.0.tgz#cfc50e1474facf8150232a6c498fe66a6bb75969"
+  integrity sha512-Qo3bvN3cmGFXsq63ZxcHFZXQDvgx84fCuq8cXuKk5xbvuebBGwMqS+ku/rH+gEkciRrcTYrXqoSzb9b6ShcoJg==
 
 fluent-syntax@0.13.0:
   version "0.13.0"
Repository: denoland/deno
Pull request: fix(install): don't attempt to cache specifiers that point to directories

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

Changed files:
filename: cli/tools/registry/pm/cache_deps.rs
patch: @@ -75,6 +75,13 @@ pub async fn cache_top_level_deps(
           if entry.key.ends_with('/') && specifier.as_str().ends_with('/') {
             continue;
           }
+          if specifier.scheme() == "file" {
+            if let Ok(path) = specifier.to_file_path() {
+              if !path.is_file() {
+                continue;
+              }
+            }
+          }
           roots.push(specifier.clone());
         }
       }

filename: tests/specs/install/import_map_with_dir/__test__.jsonc
patch: @@ -0,0 +1,9 @@
+{
+  "tempDir": true,
+  "steps": [
+    {
+      "args": "install",
+      "output": ""
+    }
+  ]
+}

filename: tests/specs/install/import_map_with_dir/deno.json
patch: @@ -0,0 +1,5 @@
+{
+  "imports": {
+    "@assets": "./src/assets/"
+  }
+}
Repository: electron/electron
Pull request: build: remove dead code in prepare release script

Backport of #44256

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: script/release/prepare-release.ts
patch: @@ -205,17 +205,6 @@ async function tagRelease (version: string) {
   }
 }
 
-// function to determine if there have been commits to main since the last release
-async function changesToRelease () {
-  const lastCommitWasRelease =
-    /^Bump v[0-9]+.[0-9]+.[0-9]+(-beta.[0-9]+)?(-alpha.[0-9]+)?(-nightly.[0-9]+)?$/g;
-  const lastCommit = await GitProcess.exec(
-    ['log', '-n', '1', "--pretty=format:'%s'"],
-    ELECTRON_DIR
-  );
-  return !lastCommitWasRelease.test(lastCommit.stdout);
-}
-
 export async function printNextVersion (options: PrepareReleaseOptions) {
   const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
   console.log(newVersion);
@@ -225,17 +214,9 @@ export async function prepareRelease (options: PrepareReleaseOptions) {
   const currentBranch =
     options.targetBranch || (await getCurrentBranch(ELECTRON_DIR));
 
-  const changes = await changesToRelease();
-  if (changes) {
-    const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
-    console.log(`${pass} Starting release of ${newVersion}`);
-    await createRelease(options, currentBranch);
-    await pushRelease(currentBranch);
-    await runReleaseBuilds(currentBranch, newVersion);
-  } else {
-    console.log(
-      'There are no new changes to this branch since the last release, aborting release.'
-    );
-    process.exit(1);
-  }
+  const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
+  console.log(`${pass} Starting release of ${newVersion}`);
+  await createRelease(options, currentBranch);
+  await pushRelease(currentBranch);
+  await runReleaseBuilds(currentBranch, newVersion);
 }
Repository: huggingface/transformers
Pull request: [tf/flax] handle `forced_decoder_ids` deletion

# What does this PR do?

#38232 (follow-through of the deprecation of `forced_decoder_ids`) killed TF/FLAX generation, this PR fixes it :)

failures from the daily CI are now passing, e.g.
```
CUDA_VISIBLE_DEVICES="" py.test tests/models/bart/test_modeling_tf_bart.py::TFBartModelTest::test_pipeline_text2text_generation_fp16
```

Changed files:
filename: src/transformers/generation/flax_utils.py
patch: @@ -531,13 +531,16 @@ def _get_logits_processor(
                 if (input_ids_seq_length > 1 or generation_config.forced_bos_token_id is None)
                 else begin_index + 1
             )
-            if generation_config.forced_decoder_ids is not None and len(generation_config.forced_decoder_ids) > 0:
+            if (
+                getattr(generation_config, "forced_decoder_ids", None) is not None
+                and len(generation_config.forced_decoder_ids) > 0
+            ):
                 # generation starts after the last token that is forced
                 begin_index += generation_config.forced_decoder_ids[-1][0]
             processors.append(
                 FlaxSuppressTokensAtBeginLogitsProcessor(generation_config.begin_suppress_tokens, begin_index)
             )
-        if generation_config.forced_decoder_ids is not None:
+        if getattr(generation_config, "forced_decoder_ids", None) is not None:
             forced_decoder_ids = [
                 [input_ids_seq_length + i[0] - 1, i[1]] for i in generation_config.forced_decoder_ids
             ]

filename: src/transformers/generation/tf_utils.py
patch: @@ -1490,14 +1490,14 @@ def _get_logits_processor(
                 if (input_ids_seq_length > 1 or generation_config.forced_bos_token_id is None)
                 else begin_index + 1
             )
-            if generation_config.forced_decoder_ids is not None:
+            if getattr(generation_config, "forced_decoder_ids", None) is not None:
                 begin_index += generation_config.forced_decoder_ids[-1][
                     0
                 ]  # generation starts after the last token that is forced
             processors.append(
                 TFSuppressTokensAtBeginLogitsProcessor(generation_config.begin_suppress_tokens, begin_index)
             )
-        if generation_config.forced_decoder_ids is not None:
+        if getattr(generation_config, "forced_decoder_ids", None) is not None:
             processors.append(TFForceTokensLogitsProcessor(generation_config.forced_decoder_ids))
 
         processors = self._merge_criteria_processor_list(processors, logits_processor)
Repository: denoland/deno
Pull request: fix(net): don't try to set nodelay on upgrade streams

Fixes https://github.com/denoland/deno/issues/26341.

We try to call `op_set_nodelay` on an `UpgradeStream`, which doesn't support that operation. When contructing a `TcpConn`,  just store whether or not it's backed by a proper tcp stream.

Changed files:
filename: ext/http/00_serve.ts
patch: @@ -76,7 +76,11 @@ import {
   ReadableStreamPrototype,
   resourceForReadableStream,
 } from "ext:deno_web/06_streams.js";
-import { listen, listenOptionApiName, TcpConn } from "ext:deno_net/01_net.js";
+import {
+  listen,
+  listenOptionApiName,
+  UpgradedConn,
+} from "ext:deno_net/01_net.js";
 import { hasTlsKeyPairOptions, listenTls } from "ext:deno_net/02_tls.js";
 import { SymbolAsyncDispose } from "ext:deno_web/00_infra.js";
 
@@ -189,7 +193,7 @@ class InnerRequest {
 
       const upgradeRid = op_http_upgrade_raw(external);
 
-      const conn = new TcpConn(
+      const conn = new UpgradedConn(
         upgradeRid,
         underlyingConn?.remoteAddr,
         underlyingConn?.localAddr,

filename: ext/net/01_net.js
patch: @@ -194,6 +194,20 @@ class Conn {
   }
 }
 
+class UpgradedConn extends Conn {
+  #rid = 0;
+
+  constructor(rid, remoteAddr, localAddr) {
+    super(rid, remoteAddr, localAddr);
+    ObjectDefineProperty(this, internalRidSymbol, {
+      __proto__: null,
+      enumerable: false,
+      value: rid,
+    });
+    this.#rid = rid;
+  }
+}
+
 class TcpConn extends Conn {
   #rid = 0;
 
@@ -601,5 +615,6 @@ export {
   resolveDns,
   TcpConn,
   UnixConn,
+  UpgradedConn,
   validatePort,
 };

filename: ext/node/polyfills/http.ts
patch: @@ -67,7 +67,7 @@ import { headersEntries } from "ext:deno_fetch/20_headers.js";
 import { timerId } from "ext:deno_web/03_abort_signal.js";
 import { clearTimeout as webClearTimeout } from "ext:deno_web/02_timers.js";
 import { resourceForReadableStream } from "ext:deno_web/06_streams.js";
-import { TcpConn } from "ext:deno_net/01_net.js";
+import { UpgradedConn } from "ext:deno_net/01_net.js";
 import { STATUS_CODES } from "node:_http_server";
 import { methods as METHODS } from "node:_http_common";
 
@@ -517,7 +517,7 @@ class ClientRequest extends OutgoingMessage {
           );
           assert(typeof res.remoteAddrIp !== "undefined");
           assert(typeof res.remoteAddrIp !== "undefined");
-          const conn = new TcpConn(
+          const conn = new UpgradedConn(
             upgradeRid,
             {
               transport: "tcp",

filename: ext/node/polyfills/internal_binding/tcp_wrap.ts
patch: @@ -300,7 +300,9 @@ export class TCP extends ConnectionWrap {
    * @return An error status code.
    */
   setNoDelay(noDelay: boolean): number {
-    this[kStreamBaseField].setNoDelay(noDelay);
+    if ("setNoDelay" in this[kStreamBaseField]) {
+      this[kStreamBaseField].setNoDelay(noDelay);
+    }
     return 0;
   }
Repository: ggml-org/llama.cpp
Pull request: run : avoid double tokenization

Adopted `common_tokenize` heuristic for `llama-run` to avoid double tokenization.

_Previously, for `run/run.cpp`, `llama-run` (length probing)_:
* For callers of llama_tokenize, the `llama_token *tokens` is initialize a zero sized buffer (`std::vector<llama_token> tokens for prompt_tokens` for `llama-run`)
	1. `llama_tokenize` is called the first time, where `n_tokens_max` will be set `0` (meaning that no actual result copying for `llama_vocab::impl::tokenize` will happen), only the intended size for the returning `res` will be returned, but note here the tokenization of that input is already computed once.
	2. The `prompt_tokens` (`result`) `resize()` based on the negative length generated (or rather, probed) by the first call of `llama_tokenize`
	3. Then we called `llama_tokenize` again, this time with the resized `prompt_tokens` (as `llama_token *tokens` or the `res`), we called `llama_vocab::impl::tokenize` again with the same `prompt`, but this time with the token actually saved in `*tokens`.


Changed files:
filename: tools/run/run.cpp
patch: @@ -9,6 +9,9 @@
 #include <nlohmann/json.hpp>
 
 #if defined(_WIN32)
+#    ifndef NOMINMAX
+#        define NOMINMAX
+#    endif
 #    include <windows.h>
 #    include <io.h>
 #else
@@ -940,16 +943,29 @@ static int apply_chat_template(const struct common_chat_templates * tmpls, Llama
 static int tokenize_prompt(const llama_vocab * vocab, const std::string & prompt,
                            std::vector<llama_token> & prompt_tokens, const LlamaData & llama_data) {
     const bool is_first = llama_memory_seq_pos_max(llama_get_memory(llama_data.context.get()), 0) == -1;
-
-    const int n_prompt_tokens = -llama_tokenize(vocab, prompt.c_str(), prompt.size(), NULL, 0, is_first, true);
-    prompt_tokens.resize(n_prompt_tokens);
-    if (llama_tokenize(vocab, prompt.c_str(), prompt.size(), prompt_tokens.data(), prompt_tokens.size(), is_first,
-                       true) < 0) {
-        printe("failed to tokenize the prompt\n");
+    int n_tokens = prompt.size() + 2 * is_first;
+    prompt_tokens.resize(n_tokens);
+    n_tokens = llama_tokenize(vocab, prompt.c_str(), prompt.size(),
+                              prompt_tokens.data(), prompt_tokens.size(),
+                              is_first, /*parse_special =*/true);
+    if (n_tokens == std::numeric_limits<int32_t>::min()) {
+        printe("tokenization failed: input too large\n");
         return -1;
     }
-
-    return n_prompt_tokens;
+    if (n_tokens < 0) {
+        prompt_tokens.resize(-n_tokens);
+        int check = llama_tokenize(vocab, prompt.c_str(), prompt.size(),
+                                   prompt_tokens.data(), prompt_tokens.size(),
+                                   is_first, /*parse_special =*/true);
+        if (check != -n_tokens) {
+            printe("failed to tokenize the prompt (size mismatch)\n");
+            return -1;
+        }
+        n_tokens = check;
+    } else {
+        prompt_tokens.resize(n_tokens);
+    }
+    return n_tokens;
 }
 
 // Check if we have enough space in the context to evaluate this batch
Repository: facebook/react
Pull request: Add Jest entry file for external-server-runtime

Follow-up to #25482.

This file is created during build, but we need an entry point for local development, too.

Changed files:
filename: packages/react-dom/unstable_server-external-runtime.js
patch: @@ -0,0 +1,10 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @flow
+ */
+
+export * from 'react-dom/src/server/ReactDOMServerExternalRuntime';
Repository: vercel/next.js
Pull request: Ensure scripts are included in root tsconfig

Validated in https://github.com/vercel/next.js/actions/runs/15232503826/job/42842061880?pr=79600

x-ref: https://github.com/vercel/next.js/pull/79599

Changed files:
filename: scripts/build-native.ts
patch: @@ -17,6 +17,7 @@ export default async function buildNative(
     // Without a shell, `pnpm run build-native` returns a 0 exit code on SIGINT?
     shell: true,
     env: {
+      NODE_ENV: process.env.NODE_ENV,
       CARGO_TERM_COLOR: 'always',
       TTY: '1',
     },

filename: tsconfig.json
patch: @@ -27,6 +27,11 @@
     "test/**/*.util.ts",
     "test/e2e/app-dir/use-cache-custom-handler/*.js",
     "test/lib/**/*.ts",
+    "scripts/*.js",
+    "scripts/*.cjs",
+    "scripts/*.mjs",
+    "scripts/*.ts",
     "turbo/**/*.ts"
-  ]
+  ],
+  "exclude": ["scripts/minimal-server.js"]
 }
Repository: electron/electron
Pull request: build: remove dead code in prepare release script

#### 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
-->

We haven't used bump commits since Oct 2022 so `changesToRelease` always returns `true`. Sudowoodo will check if there's anything to release.

#### 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: script/release/prepare-release.ts
patch: @@ -205,17 +205,6 @@ async function tagRelease (version: string) {
   }
 }
 
-// function to determine if there have been commits to main since the last release
-async function changesToRelease () {
-  const lastCommitWasRelease =
-    /^Bump v[0-9]+.[0-9]+.[0-9]+(-beta.[0-9]+)?(-alpha.[0-9]+)?(-nightly.[0-9]+)?$/g;
-  const lastCommit = await GitProcess.exec(
-    ['log', '-n', '1', "--pretty=format:'%s'"],
-    ELECTRON_DIR
-  );
-  return !lastCommitWasRelease.test(lastCommit.stdout);
-}
-
 export async function printNextVersion (options: PrepareReleaseOptions) {
   const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
   console.log(newVersion);
@@ -225,17 +214,9 @@ export async function prepareRelease (options: PrepareReleaseOptions) {
   const currentBranch =
     options.targetBranch || (await getCurrentBranch(ELECTRON_DIR));
 
-  const changes = await changesToRelease();
-  if (changes) {
-    const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
-    console.log(`${pass} Starting release of ${newVersion}`);
-    await createRelease(options, currentBranch);
-    await pushRelease(currentBranch);
-    await runReleaseBuilds(currentBranch, newVersion);
-  } else {
-    console.log(
-      'There are no new changes to this branch since the last release, aborting release.'
-    );
-    process.exit(1);
-  }
+  const newVersion = await getNewVersion(options, DryRunMode.DRY_RUN);
+  console.log(`${pass} Starting release of ${newVersion}`);
+  await createRelease(options, currentBranch);
+  await pushRelease(currentBranch);
+  await runReleaseBuilds(currentBranch, newVersion);
 }
Repository: denoland/deno
Pull request: fix(node/fs): copyFile with `COPYFILE_EXCL` should not throw if the destination doesn't exist

Fixes #26313.

We were checking for the NotFound error, but still calling the callback with the error / throwing.

Changed files:
filename: ext/node/polyfills/_fs/_fs_copy.ts
patch: @@ -53,8 +53,9 @@ export function copyFile(
     }, (e) => {
       if (e instanceof Deno.errors.NotFound) {
         Deno.copyFile(srcStr, destStr).then(() => cb(null), cb);
+      } else {
+        cb(e);
       }
-      cb(e);
     });
   } else {
     Deno.copyFile(srcStr, destStr).then(() => cb(null), cb);
@@ -83,8 +84,9 @@ export function copyFileSync(
     } catch (e) {
       if (e instanceof Deno.errors.NotFound) {
         Deno.copyFileSync(srcStr, destStr);
+      } else {
+        throw e;
       }
-      throw e;
     }
   } else {
     Deno.copyFileSync(srcStr, destStr);

filename: tests/unit_node/fs_test.ts
patch: @@ -1,11 +1,13 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
 
-import { assert, assertEquals, assertThrows } from "@std/assert";
+/// <reference lib="deno.ns" />
+import { assert, assertEquals, assertRejects, assertThrows } from "@std/assert";
 import { join } from "node:path";
 import { tmpdir } from "node:os";
 import {
   closeSync,
   constants,
+  copyFileSync,
   createWriteStream,
   existsSync,
   lstatSync,
@@ -20,6 +22,7 @@ import {
 } from "node:fs";
 import {
   constants as fsPromiseConstants,
+  copyFile,
   cp,
   FileHandle,
   open,
@@ -212,3 +215,19 @@ Deno.test("[node/fs] readSync works", () => {
   assertEquals(bytesRead, 12);
   closeSync(fd!);
 });
+
+Deno.test("[node/fs] copyFile COPYFILE_EXCL works", async () => {
+  const dir = mkdtempSync(join(tmpdir(), "foo-"));
+  const src = join(dir, "src.txt");
+  const dest = join(dir, "dest.txt");
+  await writeFile(src, "");
+  await copyFile(src, dest, fsPromiseConstants.COPYFILE_EXCL);
+  assert(existsSync(dest));
+  assertRejects(() => copyFile(src, dest, fsPromiseConstants.COPYFILE_EXCL));
+  const dest2 = join(dir, "dest2.txt");
+  copyFileSync(src, dest2, fsPromiseConstants.COPYFILE_EXCL);
+  assert(existsSync(dest2));
+  assertThrows(() =>
+    copyFileSync(src, dest2, fsPromiseConstants.COPYFILE_EXCL)
+  );
+});
Repository: ggml-org/llama.cpp
Pull request: examples : fix is_first logic for tokenization

I accidentally broke this logic in #13194. The `llama_memory_seq_pos_max()` now returns `-1` instead of `0` when the sequence is not present in the memory. 

Changed files:
filename: examples/simple-chat/simple-chat.cpp
patch: @@ -98,7 +98,7 @@ int main(int argc, char ** argv) {
     auto generate = [&](const std::string & prompt) {
         std::string response;
 
-        const bool is_first = llama_memory_seq_pos_max(llama_get_memory(ctx), 0) == 0;
+        const bool is_first = llama_memory_seq_pos_max(llama_get_memory(ctx), 0) == -1;
 
         // tokenize the prompt
         const int n_prompt_tokens = -llama_tokenize(vocab, prompt.c_str(), prompt.size(), NULL, 0, is_first, true);

filename: tools/run/run.cpp
patch: @@ -939,7 +939,7 @@ static int apply_chat_template(const struct common_chat_templates * tmpls, Llama
 // Function to tokenize the prompt
 static int tokenize_prompt(const llama_vocab * vocab, const std::string & prompt,
                            std::vector<llama_token> & prompt_tokens, const LlamaData & llama_data) {
-    const bool is_first = llama_memory_seq_pos_max(llama_get_memory(llama_data.context.get()), 0) == 0;
+    const bool is_first = llama_memory_seq_pos_max(llama_get_memory(llama_data.context.get()), 0) == -1;
 
     const int n_prompt_tokens = -llama_tokenize(vocab, prompt.c_str(), prompt.size(), NULL, 0, is_first, true);
     prompt_tokens.resize(n_prompt_tokens);
Repository: denoland/deno
Pull request: feat(permissions): expose PromptResponse

follow-up for #26327


Changed files:
filename: runtime/permissions/lib.rs
patch: @@ -35,13 +35,13 @@ use std::sync::Arc;
 
 pub mod prompter;
 use prompter::permission_prompt;
-use prompter::PromptResponse;
 use prompter::PERMISSION_EMOJI;
 
 pub use prompter::set_prompt_callbacks;
 pub use prompter::set_prompter;
 pub use prompter::PermissionPrompter;
 pub use prompter::PromptCallback;
+pub use prompter::PromptResponse;
 
 /// Fast exit from permission check routines if this permission
 /// is in the "fully-granted" state.