helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: 2.1.13

Final LTS release of 2.1

Changed files:
filename: Cargo.lock
patch: @@ -1259,7 +1259,7 @@ dependencies = [
 
 [[package]]
 name = "deno"
-version = "2.1.12"
+version = "2.1.13"
 dependencies = [
  "anstream",
  "async-trait",
@@ -2704,7 +2704,7 @@ dependencies = [
 
 [[package]]
 name = "denort"
-version = "2.1.12"
+version = "2.1.13"
 dependencies = [
  "async-trait",
  "bincode",

filename: Releases.md
patch: @@ -6,6 +6,11 @@ https://github.com/denoland/deno/releases
 We also have one-line install commands at:
 https://github.com/denoland/deno_install
 
+### 2.1.13 / 2025.05.13
+
+- fix: handling of contradictory global permission flags (#29213)
+- fix: make --allow-env stronger that --deny-env (#29079)
+
 ### 2.1.12 / 2025.04.11
 
 The 2.1.11 release had an incorrect version number when doing `deno -v`.

filename: cli/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "deno"
-version = "2.1.12"
+version = "2.1.13"
 authors.workspace = true
 default-run = "deno"
 edition.workspace = true

filename: cli/lib/version.txt
patch: @@ -1 +1 @@
-2.1.12
\ No newline at end of file
+2.1.13
\ No newline at end of file

filename: cli/rt/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "denort"
-version = "2.1.12"
+version = "2.1.13"
 authors.workspace = true
 default-run = "denort"
 edition.workspace = true
Repository: nodejs/node
Pull request: doc: mark the callback argument of crypto.generatePrime as mandatory

The current documentation lists the `callback` argument of `crypto.generatePrime` as optional (it's surrounded by square brackets), but this is incorrect - calling the function without a callback will result in an error:

```
> crypto.generatePrime(3)
Uncaught:
TypeError [ERR_INVALID_ARG_TYPE]: The "callback" argument must be of type function. Received undefined
    at Object.generatePrime (node:internal/crypto/random:476:3) {
  code: 'ERR_INVALID_ARG_TYPE'
}
```

For the record, the correct way to generate a prime synchronously, without a callback, is to use the `generatePrimeSync` API.

This PR fixes the documentation and marks the callback argument as mandatory. The `options` (second) argument, is indeed optional, and is marked as such.

Fixes: https://github.com/nodejs/node/issues/58298

<!--
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: doc/api/crypto.md
patch: @@ -3900,7 +3900,7 @@ console.log(key.export().toString('hex'));  // e89..........41e
 The size of a generated HMAC key should not exceed the block size of the
 underlying hash function. See [`crypto.createHmac()`][] for more information.
 
-### `crypto.generatePrime(size[, options[, callback]])`
+### `crypto.generatePrime(size[, options], callback)`
 
 <!-- YAML
 added: v15.8.0
Repository: vercel/next.js
Pull request: Update Rspack development test manifest

This auto-generated PR updates the development integration test manifest used when testing Rspack.

Changed files:
filename: test/rspack-dev-tests-manifest.json
patch: @@ -2748,6 +2748,7 @@
   "test/development/app-dir/segment-explorer/segment-explorer.test.ts": {
     "passed": [
       "segment-explorer should cleanup on soft navigation",
+      "segment-explorer should display boundary selector when a segment has only boundary files",
       "segment-explorer should display parallel routes default page when present",
       "segment-explorer should handle show file segments in order",
       "segment-explorer should handle special built-in not-found segments",
@@ -6473,10 +6474,10 @@
   "test/e2e/app-dir/error-on-next-codemod-comment/error-on-next-codemod-comment.test.ts": {
     "passed": [
       "app-dir - error-on-next-codemod-comment should disappear the error when you replace with bypass comment",
-      "app-dir - error-on-next-codemod-comment should disappear the error when you rre the codemod comment",
       "app-dir - error-on-next-codemod-comment should error with inline comment as well"
     ],
     "failed": [
+      "app-dir - error-on-next-codemod-comment should disappear the error when you rre the codemod comment",
       "app-dir - error-on-next-codemod-comment should error with swc if you have codemod comments left"
     ],
     "pending": [],
@@ -8772,6 +8773,26 @@
     "flakey": [],
     "runtimeError": false
   },
+  "test/e2e/app-dir/router-disable-smooth-scroll/router-disable-smooth-scroll.legacy.test.ts": {
+    "passed": [
+      "router smooth scroll optimization (legacy with data attribute) should not warn when data attribute is present even in legacy mode",
+      "router smooth scroll optimization (legacy) should work with smooth scroll CSS and warn in development"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
+  "test/e2e/app-dir/router-disable-smooth-scroll/router-disable-smooth-scroll.optimized.test.ts": {
+    "passed": [
+      "router smooth scroll optimization (optimized early exit) should exit early when CSS smooth scroll detected but no data attribute",
+      "router smooth scroll optimization (optimized) should work with smooth scroll CSS and data attribute without warning"
+    ],
+    "failed": [],
+    "pending": [],
+    "flakey": [],
+    "runtimeError": false
+  },
   "test/e2e/app-dir/router-stuck-dynamic-static-segment/router-stuck-dynamic-static-segment.test.ts": {
     "passed": [
       "router-stuck-dynamic-static-segment should allow navigation between dynamic parameter and static parameter of the same value"
Repository: denoland/deno
Pull request: fix(upgrade): skip version comparison when upgrading

In Deno 2.3.0, the version was accidentally released as `2.4.0`. This was fixed in 2.3.1. Now anyone who upgraded to 2.3.0 can't run `deno upgrade` to upgrade to 2.3.1 because of this upgrade behaviour. It would be better to just always go to the latest remote specified version when someone runs `deno upgrade`.

This also fixes a bug outlined in https://github.com/denoland/deno/issues/29016

Closes https://github.com/denoland/deno/issues/29016

Changed files:
filename: cli/tools/upgrade.rs
patch: @@ -754,46 +754,22 @@ async fn find_latest_version_to_upgrade(
     }
   };
 
-  let (maybe_newer_latest_version, current_version) = match release_channel {
-    ReleaseChannel::Canary => {
-      let current_version = version::DENO_VERSION_INFO.git_hash;
-      let current_is_most_recent =
-        current_version == latest_version_found.version_or_hash;
-
-      if !force && current_is_most_recent {
-        (None, current_version)
-      } else {
-        (Some(latest_version_found), current_version)
-      }
-    }
+  let current_version = match release_channel {
+    ReleaseChannel::Canary => version::DENO_VERSION_INFO.git_hash,
     ReleaseChannel::Stable | ReleaseChannel::Lts | ReleaseChannel::Rc => {
-      let current_version = version::DENO_VERSION_INFO.deno;
-
-      // If the current binary is not the same channel, we can skip
-      // computation if we're on a newer release - we're not.
-      if version::DENO_VERSION_INFO.release_channel != release_channel {
-        (Some(latest_version_found), current_version)
-      } else {
-        let current = Version::parse_standard(current_version)?;
-        let latest =
-          Version::parse_standard(&latest_version_found.version_or_hash)?;
-        let current_is_most_recent = current >= latest;
-
-        if !force && current_is_most_recent {
-          (None, current_version)
-        } else {
-          (Some(latest_version_found), current_version)
-        }
-      }
+      version::DENO_VERSION_INFO.deno
     }
   };
+  let should_upgrade = force
+    || current_version != latest_version_found.version_or_hash
+    || version::DENO_VERSION_INFO.release_channel != release_channel;
 
   log::info!("");
-  if let Some(newer_latest_version) = maybe_newer_latest_version.as_ref() {
+  if should_upgrade {
     log::info!(
       "Found latest {} version {}",
-      newer_latest_version.release_channel.name(),
-      color_print::cformat!("<g>{}</>", newer_latest_version.display())
+      latest_version_found.release_channel.name(),
+      color_print::cformat!("<g>{}</>", latest_version_found.display())
     );
   } else {
     log::info!(
@@ -803,7 +779,7 @@ async fn find_latest_version_to_upgrade(
   }
   log::info!("");
 
-  Ok(maybe_newer_latest_version)
+  Ok(should_upgrade.then_some(latest_version_found))
 }
 
 #[derive(Debug, Clone, PartialEq)]
Repository: denoland/deno
Pull request: fix(ext/node): TLS server unref

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

Changed files:
filename: ext/node/polyfills/_tls_wrap.ts
patch: @@ -281,13 +281,28 @@ export function Server(options: any, listener: any) {
 export class ServerImpl extends EventEmitter {
   listener?: Deno.TlsListener;
   #closed = false;
+  #unrefed = false;
   constructor(public options: any, listener: any) {
     super();
     if (listener) {
       this.on("secureConnection", listener);
     }
   }
 
+  unref() {
+    this.#unrefed = true;
+    if (this.listener) {
+      this.listener.unref();
+    }
+  }
+
+  ref() {
+    this.#unrefed = false;
+    if (this.listener) {
+      this.listener.ref();
+    }
+  }
+
   listen(port: any, callback: any): this {
     const key = this.options.key?.toString();
     const cert = this.options.cert?.toString();
@@ -302,6 +317,11 @@ export class ServerImpl extends EventEmitter {
   }
 
   async #listen(listener: Deno.TlsListener) {
+    if (this.#unrefed) {
+      listener.unref();
+      return;
+    }
+
     while (!this.#closed) {
       try {
         // Creates TCP handle and socket directly from Deno.TlsConn.

filename: tests/unit_node/tls_test.ts
patch: @@ -8,7 +8,7 @@ import {
   assertThrows,
 } from "@std/assert";
 import { delay } from "@std/async/delay";
-import { fromFileUrl, join } from "@std/path";
+import { dirname, fromFileUrl, join } from "@std/path";
 import * as tls from "node:tls";
 import * as net from "node:net";
 import * as stream from "node:stream";
@@ -270,3 +270,37 @@ Deno.test("tls connect upgrade tcp", async () => {
   await promise;
   socket.destroy();
 });
+
+Deno.test({
+  name: "[node/tls] tls.Server.unref() works",
+  ignore: Deno.build.os === "windows",
+}, async () => {
+  const { stdout, stderr } = await new Deno.Command(Deno.execPath(), {
+    args: [
+      "eval",
+      `
+        import * as tls from "node:tls";
+        
+        const key = Deno.readTextFileSync("${
+        join(tlsTestdataDir, "localhost.key")
+      }");
+        const cert = Deno.readTextFileSync("${
+        join(tlsTestdataDir, "localhost.crt")
+      }");
+        
+        const server = tls.createServer({ key, cert }, (socket) => {
+          socket.end("hello\\n");
+        });
+
+        server.unref();
+        server.listen(0, () => {});
+      `,
+    ],
+    cwd: dirname(fromFileUrl(import.meta.url)),
+  }).output();
+
+  if (stderr.length > 0) {
+    throw new Error(`stderr: ${new TextDecoder().decode(stderr)}`);
+  }
+  assertEquals(new TextDecoder().decode(stdout), "");
+});
Repository: ggml-org/llama.cpp
Pull request: context : remove redundant explicit casting to the same type

The function 'output_reserve' return type is 'uint32_t', so need to add explicit casting.

*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-context.cpp
patch: @@ -181,7 +181,7 @@ llama_context::llama_context(
         // graph outputs buffer
         {
             // resized during inference when a batch uses more outputs
-            if ((uint32_t) output_reserve(params.n_seq_max) < params.n_seq_max) {
+            if (output_reserve(params.n_seq_max) < params.n_seq_max) {
                 throw std::runtime_error("failed to reserve initial output buffer");
             }
Repository: nodejs/node
Pull request: doc: remove comma delimiter mention on permissions doc

Fixes: https://github.com/nodejs/node/issues/58287

Changed files:
filename: doc/api/permissions.md
patch: @@ -108,8 +108,8 @@ The valid arguments for both flags are:
 
 * `*` - To allow all `FileSystemRead` or `FileSystemWrite` operations,
   respectively.
-* Paths delimited by comma (`,`) to allow only matching `FileSystemRead` or
-  `FileSystemWrite` operations, respectively.
+* Relative paths to the current working directory.
+* Absolute paths.
 
 Example:
Repository: electron/electron
Pull request: fix: correct electron gin embedder indices

Backport of #45389

See that PR for details.


Notes: Fixed invalid memory access in pdf viewer which lead to random crashes.


Changed files:
filename: patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch
patch: @@ -43,15 +43,15 @@ diff --git a/gin/public/gin_embedders.h b/gin/public/gin_embedders.h
 index 8d7c5631fd8f1499c67384286f0e3c4037673b32..99b2e2f63be8a46c5546dd53bc9b05e8c54e857c 100644
 --- a/gin/public/gin_embedders.h
 +++ b/gin/public/gin_embedders.h
-@@ -18,6 +18,8 @@ namespace gin {
- enum GinEmbedder : uint16_t {
-   kEmbedderNativeGin,
+@@ -20,6 +20,8 @@ enum GinEmbedder : uint16_t {
    kEmbedderBlink,
-+  kEmbedderElectron,
-+  kEmbedderBlinkTag,
    kEmbedderPDFium,
    kEmbedderFuchsia,
++  kEmbedderElectron,
++  kEmbedderBlinkTag,
  };
+ 
+ }  // namespace gin
 diff --git a/third_party/blink/renderer/platform/bindings/script_state.cc b/third_party/blink/renderer/platform/bindings/script_state.cc
 index e4a27a24c83dd1a478b2ada8b6c8220076790791..c76dc818f38a62fff63852dbecbc85e304ac731d 100644
 --- a/third_party/blink/renderer/platform/bindings/script_state.cc
@@ -112,14 +112,13 @@ index b3cc8d819b06108386aed9465cab4f27a28b675f..a1757901e52360a9c2ec3c573adb20d0
    static constexpr int kV8ContextPerContextDataIndex =
        static_cast<int>(gin::kPerContextDataStartIndex) +
        static_cast<int>(gin::kEmbedderBlink);
-@@ -271,6 +278,11 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected<ScriptState> {
+@@ -271,6 +278,10 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected<ScriptState> {
    // internals.idl.
    String last_compiled_script_file_name_;
    bool last_compiled_script_used_code_cache_ = false;
 +
 +  static constexpr int kV8ContextPerContextDataTagIndex =
 +      static_cast<int>(gin::kPerContextDataStartIndex) +
-+      static_cast<int>(gin::kEmbedderBlink) +
 +      static_cast<int>(gin::kEmbedderBlinkTag);
  };
Repository: facebook/react
Pull request: Convert validateDOMNesting to createRoot

ezpz

Changed files:
filename: packages/react-dom/src/__tests__/validateDOMNesting-test.js
patch: @@ -11,6 +11,7 @@
 
 const React = require('react');
 const ReactDOM = require('react-dom');
+const ReactDOMClient = require('react-dom/client');
 
 function expectWarnings(tags, warnings = [], withoutStack = 0) {
   tags = [...tags];
@@ -28,8 +29,13 @@ function expectWarnings(tags, warnings = [], withoutStack = 0) {
     element = <Tag>{element}</Tag>;
   }
 
+  const root = ReactDOMClient.createRoot(container);
   if (warnings.length) {
-    expect(() => ReactDOM.render(element, container)).toErrorDev(warnings, {
+    expect(() => {
+      ReactDOM.flushSync(() => {
+        root.render(element);
+      });
+    }).toErrorDev(warnings, {
       withoutStack,
     });
   }
Repository: vercel/next.js
Pull request: Update help link for inlined use server in client components

Partially Closes: https://linear.app/vercel/issue/DOC-4854/server-actions-v14-and-v13-links



Changed files:
filename: crates/next-custom-transforms/src/transforms/server_actions.rs
patch: @@ -3073,7 +3073,7 @@ fn emit_error(error_kind: ServerActionsErrorKind) {
                     It is not allowed to define inline "use server" annotated Server Actions in Client Components.
                     To use Server Actions in a Client Component, you can either export them from a separate file with "use server" at the top, or pass them down through props from a Server Component.
 
-                    Read more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components
+                    Read more: https://nextjs.org/docs/app/api-reference/directives/use-server#using-server-functions-in-a-client-component
                 "#
             },
         ),

filename: crates/next-custom-transforms/tests/errors/server-actions/client-graph/1/output.stderr
patch: @@ -1,7 +1,7 @@
   x It is not allowed to define inline "use server" annotated Server Actions in Client Components.
   | To use Server Actions in a Client Component, you can either export them from a separate file with "use server" at the top, or pass them down through props from a Server Component.
   | 
-  | Read more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components
+  | Read more: https://nextjs.org/docs/app/api-reference/directives/use-server#using-server-functions-in-a-client-component
   | 
    ,-[input.js:5:1]
  4 |   async function fn() {
Repository: nodejs/node
Pull request: test: reduce iteration count in test-child-process-stdout-flush-exit

This commit was added by @addaleax to fix the CI in https://github.com/nodejs/node/pull/58124, opening it as a separate PR as the automation keeps removing it from the other PR. This should be landed manually so the commit authorship is credited to Anna and not myself.
<!--
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-child-process-stdout-flush-exit.js
patch: @@ -25,9 +25,14 @@ const assert = require('assert');
 
 // If child process output to console and exit
 // The console.log statements here are part of the test.
+// Note: This test verifies specific behavior that is *not* guaranteed
+// by Node.js's API contract. See https://nodejs.org/api/process.html#processexitcode.
+// We are still generally interested in knowing when this test breaks,
+// since applications may rely on the implicit behavior of stdout having
+// a buffer size up to which they can write data synchronously.
 if (process.argv[2] === 'child') {
   console.log('hello');
-  for (let i = 0; i < 200; i++) {
+  for (let i = 0; i < 100; i++) {
     console.log('filler');
   }
   console.log('goodbye');
Repository: denoland/deno
Pull request: fix(ext/node): add AES CTR to supported ciphers list

Fix https://github.com/denoland/deno/issues/29047

Changed files:
filename: ext/node/polyfills/internal/crypto/util.ts
patch: @@ -77,6 +77,9 @@ const supportedCiphers = [
   "aes256",
   "aes-128-gcm",
   "aes-256-gcm",
+  "aes-128-ctr",
+  "aes-192-ctr",
+  "aes-256-ctr",
 ];
 
 export function getCiphers(): string[] {

filename: tests/unit_node/crypto/crypto_cipher_test.ts
patch: @@ -384,6 +384,7 @@ Deno.test({
   name: "getCiphers",
   fn() {
     assertEquals(crypto.getCiphers().includes("aes-128-cbc"), true);
+    assertEquals(crypto.getCiphers().includes("aes-256-ctr"), true);
 
     const getZeroKey = (cipher: string) => zeros(+cipher.match(/\d+/)![0] / 8);
     const getZeroIv = (cipher: string) => {