helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [Flight] Update test to reset modules instead of using private state

The tricky part is that we use the `flight-modules` file to simulate a module system in tests to require client components.

So the trick is to restore that module after resetting between server and client.

Changed files:
filename: packages/react-client/src/__tests__/ReactFlight-test.js
patch: @@ -18,7 +18,6 @@ let ReactNoopFlightClient;
 let ErrorBoundary;
 let NoErrorExpected;
 let Scheduler;
-let ContextRegistry;
 
 describe('ReactFlight', () => {
   beforeEach(() => {
@@ -30,9 +29,6 @@ describe('ReactFlight', () => {
     ReactNoopFlightClient = require('react-noop-renderer/flight-client');
     act = require('jest-react').act;
     Scheduler = require('scheduler');
-    const ReactSharedInternals =
-      React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-    ContextRegistry = ReactSharedInternals.ContextRegistry;
 
     ErrorBoundary = class extends React.Component {
       state = {hasError: false, error: null};
@@ -429,8 +425,6 @@ describe('ReactFlight', () => {
 
       const transport = ReactNoopFlightServer.render(<Foo />);
       act(() => {
-        ServerContext._currentRenderer = null;
-        ServerContext._currentRenderer2 = null;
         ReactNoop.render(ReactNoopFlightClient.read(transport));
       });
 
@@ -631,14 +625,26 @@ describe('ReactFlight', () => {
       const transport = ReactNoopFlightServer.render(<ServerApp />);
 
       expect(ClientContext).toBe(undefined);
+
+      // Reset all modules, except flight-modules which keeps the registry of client components
+      const flightModules = require('react-noop-renderer/flight-modules');
+      jest.resetModules();
+      jest.mock('react-noop-renderer/flight-modules', () => flightModules);
+
+      React = require('react');
+      ReactNoop = require('react-noop-renderer');
+      ReactNoopFlightServer = require('react-noop-renderer/flight-server');
+      ReactNoopFlightClient = require('react-noop-renderer/flight-client');
+      act = require('jest-react').act;
+      Scheduler = require('scheduler');
+
       act(() => {
-        delete ContextRegistry.ServerContext;
-        ServerContext._currentRenderer = null;
-        ServerContext._currentRenderer2 = null;
         const serverModel = ReactNoopFlightClient.read(transport);
         ReactNoop.render(<ClientApp serverModel={serverModel} />);
       });
 
+      expect(ClientContext).not.toBe(ServerContext);
+
       expect(ReactNoop).toMatchRenderedOutput(
         <>
           <article>
Repository: denoland/deno
Pull request: feat: Deprecate --lock-write flag

This commit deprecates `--lock-write` flag by removing it from
the help output and printing a warning message when it's used.

Users should use `--frozen=false` instead which was added
in https://github.com/denoland/deno/pull/24355.

Towards https://github.com/denoland/deno/issues/24167.

Changed files:
filename: cli/args/flags.rs
patch: @@ -546,6 +546,7 @@ pub struct Flags {
   pub inspect_wait: Option<SocketAddr>,
   pub inspect: Option<SocketAddr>,
   pub location: Option<Url>,
+  // TODO(bartlomieju): deprecated, to be removed in Deno 2.
   pub lock_write: bool,
   pub lock: Option<String>,
   pub log_level: Option<Level>,
@@ -3623,12 +3624,14 @@ If value is not provided, defaults to \"deno.lock\" in the current working direc
     .value_hint(ValueHint::FilePath)
 }
 
+// TODO(bartlomieju): deprecated, to be removed in Deno 2.
 fn lock_write_arg() -> Arg {
   Arg::new("lock-write")
     .action(ArgAction::SetTrue)
     .long("lock-write")
     .help("Force overwriting the lock file.")
     .conflicts_with("no-lock")
+    .hide(true)
 }
 
 fn no_lock_arg() -> Arg {
@@ -4747,6 +4750,7 @@ fn check_arg_parse(flags: &mut Flags, matches: &mut ArgMatches) {
 fn lock_args_parse(flags: &mut Flags, matches: &mut ArgMatches) {
   lock_arg_parse(flags, matches);
   no_lock_arg_parse(flags, matches);
+  // TODO(bartlomieju): deprecated, to be removed in Deno 2.
   if matches.get_flag("lock-write") {
     flags.lock_write = true;
   }

filename: cli/args/lockfile.rs
patch: @@ -130,6 +130,10 @@ impl CliLockfile {
     };
 
     let lockfile = if flags.lock_write {
+      log::warn!(
+        "{} \"--lock-write\" flag is deprecated and will be removed in Deno 2.",
+        crate::colors::yellow("Warning")
+      );
       CliLockfile::new(
         Lockfile::new_empty(filename, true),
         flags.frozen_lockfile,

filename: tests/testdata/lockfile/no_dts/main.cache.out
patch: @@ -1,2 +1,3 @@
+Warning "--lock-write" flag is deprecated and will be removed in Deno 2.
 Download http://localhost:4545/lockfile/no_dts/mod.js
 Download http://localhost:4545/lockfile/no_dts/mod.d.ts
Repository: facebook/react
Pull request: Fizz: Prevent `UnhandledPromiseRejectionWarning` if `renderToReadableStream` throws

## Summary

I noticed a `UnhandledPromiseRejectionWarning` when running tests (e.g. https://app.circleci.com/pipelines/github/facebook/react/24649/workflows/5b1b67a2-eb4b-4e7e-9dd8-d531328eff6e/jobs/448950/parallel-runs/16).
It seems to me that `stream.allReady` is not accessible when the shell errors (i.e. `renderToReadableStream` throws) which means `stream.allReady` will be left rejected and unhandled.

## How did you test this change?

- [x] `yarn test ReactDOMFizzServerBrowser` logs no `UnhandledPromiseRejectionWarning`
- [x] `ReactDOMFizzServerBrowser` logs no `UnhandledPromiseRejectionWarning` in CI: https://app.circleci.com/pipelines/github/facebook/react/24655/workflows/ad4851cf-0530-4a69-8c36-e7a9bcaf7daa/jobs/449075/parallel-runs/14
- [x] CI

## Follow-up?

- [ ] fail tests if rejected promises are not handled?

Changed files:
filename: packages/react-dom/src/server/ReactDOMFizzServerBrowser.js
patch: @@ -67,6 +67,10 @@ function renderToReadableStream(
       resolve(stream);
     }
     function onShellError(error: mixed) {
+      // If the shell errors the caller of `renderToReadableStream` won't have access to `allReady`.
+      // However, `allReady` will be rejected by `onFatalError` as well.
+      // So we need to catch the duplicate, uncatchable fatal error in `allReady` to prevent a `UnhandledPromiseRejection`.
+      allReady.catch(() => {});
       reject(error);
     }
     const request = createRequest(
Repository: nodejs/node
Pull request: tools: fix nghttp3 updater script

Refs: https://github.com/nodejs/node/pull/51321#issuecomment-2105986987
<!--
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: tools/dep_updaters/update-nghttp3.sh
patch: @@ -42,16 +42,17 @@ cleanup () {
 trap cleanup INT TERM EXIT
 
 NGHTTP3_REF="v$NEW_VERSION"
-NGHTTP3_ZIP="nghttp3-$NEW_VERSION"
+ARCHIVE_BASENAME="nghttp3-${NEW_VERSION}"
 
 cd "$WORKSPACE"
 
 echo "Fetching nghttp3 source archive..."
-curl -sL -o "$NGHTTP3_ZIP.zip" "https://github.com/ngtcp2/nghttp3/archive/refs/tags/$NGHTTP3_REF.zip"
-log_and_verify_sha256sum "nghttp3" "$NGHTTP3_ZIP.zip"
-unzip "$NGHTTP3_ZIP.zip"
-rm "$NGHTTP3_ZIP.zip"
-mv "$NGHTTP3_ZIP" nghttp3
+curl -sL -o "$ARCHIVE_BASENAME.tar.xz" "https://github.com/ngtcp2/nghttp3/releases/download/${NGHTTP3_REF}/${ARCHIVE_BASENAME}.tar.xz"
+SHA256="$(curl -sL "https://github.com/ngtcp2/nghttp3/releases/download/${NGHTTP3_REF}/checksums.txt" | grep 'tar.xz$')"
+log_and_verify_sha256sum "nghttp3" "$ARCHIVE_BASENAME.tar.xz" "$SHA256"
+tar -xJf "$ARCHIVE_BASENAME.tar.xz"
+rm "$ARCHIVE_BASENAME.tar.xz"
+mv "$ARCHIVE_BASENAME" nghttp3
 
 cd nghttp3
Repository: electron/electron
Pull request: fix: restore Chromium default `Content-Disposition` header parsing

Backport of #43611

See that PR for details.


Notes: Restored Chromium default `Content-Disposition` header parsing.

Changed files:
filename: shell/browser/api/electron_api_web_request.cc
patch: @@ -21,7 +21,6 @@
 #include "gin/dictionary.h"
 #include "gin/handle.h"
 #include "gin/object_template_builder.h"
-#include "net/http/http_content_disposition.h"
 #include "shell/browser/api/electron_api_session.h"
 #include "shell/browser/api/electron_api_web_contents.h"
 #include "shell/browser/api/electron_api_web_frame_main.h"
@@ -100,22 +99,6 @@ v8::Local<v8::Value> HttpResponseHeadersToV8(
     std::string key;
     std::string value;
     while (headers->EnumerateHeaderLines(&iter, &key, &value)) {
-      // Note that Web servers not developed with nodejs allow non-utf8
-      // characters in content-disposition's filename field. Use Chromium's
-      // HttpContentDisposition class to decode the correct encoding instead of
-      // arbitrarily converting it to UTF8. It should also be noted that if the
-      // encoding is not specified, HttpContentDisposition will transcode
-      // according to the system's encoding.
-      if (base::EqualsCaseInsensitiveASCII("Content-Disposition", key) &&
-          !value.empty()) {
-        net::HttpContentDisposition header(value, std::string());
-        std::string decodedFilename =
-            header.is_attachment() ? " attachment" : " inline";
-        // The filename must be encased in double quotes for serialization
-        // to happen correctly.
-        std::string filename = "\"" + header.filename() + "\"";
-        value = decodedFilename + "; filename=" + filename;
-      }
       response_headers.EnsureList(key)->Append(value);
     }
   }

filename: spec/api-web-request-spec.ts
patch: @@ -474,7 +474,7 @@ describe('webRequest module', () => {
 
     it('does not change content-disposition header by default', async () => {
       ses.webRequest.onHeadersReceived((details, callback) => {
-        expect(details.responseHeaders!['content-disposition']).to.deep.equal([' attachment; filename="aa中aa.txt"']);
+        expect(details.responseHeaders!['content-disposition']).to.deep.equal(['attachment; filename=aa中aa.txt']);
         callback({});
       });
       const { data, headers } = await ajax(defaultURL + 'contentDisposition');
Repository: denoland/deno
Pull request: fix(ext/node): don't throw when calling PerformanceObserver.observe

Towards #25034


Changed files:
filename: ext/node/polyfills/perf_hooks.ts
patch: @@ -10,11 +10,12 @@ import {
 } from "ext:deno_web/15_performance.js";
 
 class PerformanceObserver {
+  static supportedEntryTypes: string[] = [];
   observe() {
-    notImplemented("PerformanceObserver.observe");
+    // todo(lucacasonato): actually implement this
   }
   disconnect() {
-    notImplemented("PerformanceObserver.disconnect");
+    // todo(lucacasonato): actually implement this
   }
 }
Repository: ggml-org/llama.cpp
Pull request: readme: Fix typo in InternVL model name

Two InternVL model names were mispelled.

#### Old (don't exist)

* https://huggingface.co/ggml-org/InternVL2_5-2B-GGUF
* https://huggingface.co/ggml-org/InternVL3-4B-Instruct-GGUF

#### New (do exist)

* https://huggingface.co/ggml-org/InternVL2_5-4B-GGUF
* https://huggingface.co/ggml-org/InternVL3-8B-Instruct-GGUF

Changed files:
filename: docs/multimodal.md
patch: @@ -69,9 +69,9 @@ NOTE: some models may require large context window, for example: `-c 8192`
 
 # InternVL 2.5 and 3
 (tool_name) -hf ggml-org/InternVL2_5-1B-GGUF
-(tool_name) -hf ggml-org/InternVL2_5-2B-GGUF
+(tool_name) -hf ggml-org/InternVL2_5-4B-GGUF
 (tool_name) -hf ggml-org/InternVL3-1B-Instruct-GGUF
 (tool_name) -hf ggml-org/InternVL3-2B-Instruct-GGUF
-(tool_name) -hf ggml-org/InternVL3-4B-Instruct-GGUF
+(tool_name) -hf ggml-org/InternVL3-8B-Instruct-GGUF
 (tool_name) -hf ggml-org/InternVL3-14B-Instruct-GGUF
 ```
Repository: ggml-org/llama.cpp
Pull request: ci: `free_disk_space` flag enabled for intel variant

close #13052

Intel Docker Build only

before cleanup: 20G
after cleanup: 44G
after all built and pushed: 24G

https://github.com/Thammachart/llama.cpp/actions/runs/14945093573/job/41987371245


Changed files:
filename: .github/workflows/docker.yml
patch: @@ -42,8 +42,7 @@ jobs:
           - { tag: "cpu", dockerfile: ".devops/cpu.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false }
           - { tag: "cuda", dockerfile: ".devops/cuda.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false }
           - { tag: "musa", dockerfile: ".devops/musa.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: true }
-          # Note: the intel images are failing due to an out of disk space error
-          # - { tag: "intel", dockerfile: ".devops/intel.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false }
+          - { tag: "intel", dockerfile: ".devops/intel.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: true }
           - { tag: "vulkan", dockerfile: ".devops/vulkan.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false }
           # Note: the rocm images are failing due to a compiler error and are disabled until this is fixed to allow the workflow to complete
           #- {tag: "rocm", dockerfile: ".devops/rocm.Dockerfile", platforms: "linux/amd64,linux/arm64", full: true, light: true, server: true, free_disk_space: true }
Repository: facebook/react
Pull request: [Fizz] Export debug function for FB

<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

Exporting a debug function to figure out why the stream never finishes during an edge case.
<!--
 Explain the **motivation** for making this change. What existing problem does the pull request solve?
-->

## How did you test this change?

<!--
  Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
  How exactly did you verify that your PR solves the issue you wanted to solve?
  If you leave this empty, your PR will very likely be closed.
-->


Changed files:
filename: packages/react-server-dom-relay/src/ReactDOMServerFB.js
patch: @@ -92,4 +92,17 @@ function hasFinished(stream: Stream): boolean {
   return stream.destination.done;
 }
 
-export {renderToStream, renderNextChunk, hasFinished, abortStream};
+function debug(stream: Stream): any {
+  // convert to any to silence flow errors from opaque type
+  const request = (stream.request: any);
+  return {
+    pendingRootTasks: request.pendingRootTasks,
+    clientRenderedBoundaries: request.clientRenderedBoundaries.length,
+    completedBoundaries: request.completedBoundaries.length,
+    partialBoundaries: request.partialBoundaries.length,
+    allPendingTasks: request.allPendingTasks,
+    pingedTasks: request.pingedTasks.length,
+  };
+}
+
+export {renderToStream, renderNextChunk, hasFinished, abortStream, debug};
Repository: denoland/deno
Pull request: fix(tls): print a warning if a system certificate can't be loaded

This commit changes how system certificates are loaded on startup.

Instead of hard erroring if a certificate can't be decoded, we are now
printing a warning and bumping a hex representation of the certificate
and continue execution.

Ref https://github.com/denoland/deno/issues/24137

Changed files:
filename: cli/args/mod.rs
patch: @@ -640,8 +640,6 @@ pub enum RootCertStoreLoadError {
   UnknownStore(String),
   #[error("Unable to add pem file to certificate store: {0}")]
   FailedAddPemFile(String),
-  #[error("Unable to add system certificate to certificate store: {0}")]
-  FailedAddSystemCert(String),
   #[error("Failed opening CA file: {0}")]
   CaFileOpenError(String),
 }
@@ -675,11 +673,19 @@ pub fn get_root_cert_store(
       "system" => {
         let roots = load_native_certs().expect("could not load platform certs");
         for root in roots {
-          root_cert_store
-            .add(rustls::pki_types::CertificateDer::from(root.0))
-            .map_err(|e| {
-              RootCertStoreLoadError::FailedAddSystemCert(e.to_string())
-            })?;
+          if let Err(err) = root_cert_store
+            .add(rustls::pki_types::CertificateDer::from(root.0.clone()))
+          {
+            log::error!(
+              "{}",
+              colors::yellow(&format!(
+                "Unable to add system certificate to certificate store: {:?}",
+                err
+              ))
+            );
+            let hex_encoded_root = faster_hex::hex_string(&root.0);
+            log::error!("{}", colors::gray(&hex_encoded_root));
+          }
         }
       }
       _ => {
Repository: nodejs/node
Pull request: util: fix Latin1 decoding to return string output

returned a string instead of a buffer

Fixes: https://github.com/nodejs/node/issues/56219

Changed files:
filename: src/encoding_binding.cc
patch: @@ -286,9 +286,11 @@ void BindingData::DecodeLatin1(const FunctionCallbackInfo<Value>& args) {
         env->isolate(), "The encoded data was not valid for encoding latin1");
   }
 
-  Local<Object> buffer_result =
-      node::Buffer::Copy(env, result.c_str(), written).ToLocalChecked();
-  args.GetReturnValue().Set(buffer_result);
+  Local<String> output =
+      String::NewFromUtf8(
+          env->isolate(), result.c_str(), v8::NewStringType::kNormal, written)
+          .ToLocalChecked();
+  args.GetReturnValue().Set(output);
 }
 
 }  // namespace encoding_binding

filename: test/cctest/test_encoding_binding.cc
patch: @@ -26,7 +26,7 @@ bool RunDecodeLatin1(Environment* env,
     return false;
   }
 
-  *result = try_catch.Exception();
+  *result = args[0];
   return true;
 }
 
@@ -151,5 +151,26 @@ TEST_F(EncodingBindingTest, DecodeLatin1_BOMPresent) {
   EXPECT_STREQ(*utf8_result, "Áéó");
 }
 
+TEST_F(EncodingBindingTest, DecodeLatin1_ReturnsString) {
+  Environment* env = CreateEnvironment();
+  Isolate* isolate = env->isolate();
+  HandleScope handle_scope(isolate);
+
+  const uint8_t latin1_data[] = {0xC1, 0xE9, 0xF3};
+  Local<ArrayBuffer> ab = ArrayBuffer::New(isolate, sizeof(latin1_data));
+  memcpy(ab->GetBackingStore()->Data(), latin1_data, sizeof(latin1_data));
+
+  Local<Uint8Array> array = Uint8Array::New(ab, 0, sizeof(latin1_data));
+  Local<Value> args[] = {array};
+
+  Local<Value> result;
+  ASSERT_TRUE(RunDecodeLatin1(env, args, false, false, &result));
+
+  ASSERT_TRUE(result->IsString());
+
+  String::Utf8Value utf8_result(isolate, result);
+  EXPECT_STREQ(*utf8_result, "Áéó");
+}
+
 }  // namespace encoding_binding
 }  // namespace node

filename: test/parallel/test-util-text-decoder.js
patch: @@ -0,0 +1,17 @@
+'use strict';
+
+const common = require('../common');
+
+const test = require('node:test');
+const assert = require('node:assert');
+
+test('TextDecoder correctly decodes windows-1252 encoded data', { skip: !common.hasIntl }, () => {
+  const latin1Bytes = new Uint8Array([0xc1, 0xe9, 0xf3]);
+
+  const expectedString = 'Áéó';
+
+  const decoder = new TextDecoder('windows-1252');
+  const decodedString = decoder.decode(latin1Bytes);
+
+  assert.strictEqual(decodedString, expectedString);
+});
Repository: ggml-org/llama.cpp
Pull request: llguidance : init tokenizer slices

Followup to #13413 which broke build due to un-inited `slices`.

Not sure if default or disabled (empty array) is preferable...

Changed files:
filename: common/llguidance.cpp
patch: @@ -189,6 +189,7 @@ static LlgTokenizer * llama_sampler_llg_new_tokenizer(const llama_vocab * vocab)
         /* .tokenize_fn                        = */ llama_sampler_llg_tokenize_fn,
         /* .use_approximate_greedy_tokenize_fn = */ false,
         /* .tokenize_user_data                 = */ vocab,
+        /* .slices                             = */ nullptr,
     };
 
     char           error_buffer[1024];