helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Update some READMEs

Just minor tweaks. 

Changed files:
filename: packages/react-dom/README.md
patch: @@ -13,38 +13,48 @@ npm install react react-dom
 ### In the browser
 
 ```js
-var React = require('react');
-var ReactDOM = require('react-dom');
+import { createRoot } from 'react-dom';
 
-function MyComponent() {
+function App() {
   return <div>Hello World</div>;
 }
 
-ReactDOM.render(<MyComponent />, node);
+const root = createRoot(document.getElementById('root'));
+root.render(<App />);
 ```
 
 ### On the server
 
 ```js
-var React = require('react');
-var ReactDOMServer = require('react-dom/server');
+import { renderToPipeableStream } from 'react-dom/server';
 
-function MyComponent() {
+function App() {
   return <div>Hello World</div>;
 }
 
-ReactDOMServer.renderToString(<MyComponent />);
+function handleRequest(res) {
+  // ... in your server handler ...
+  const stream = renderToPipeableStream(<App />, {
+    onShellReady() {
+      res.statusCode = 200;
+      res.setHeader('Content-type', 'text/html');
+      stream.pipe(res);
+    },
+    // ...
+  });
+}
 ```
 
 ## API
 
 ### `react-dom`
 
-- `findDOMNode`
-- `render`
-- `unmountComponentAtNode`
+See https://reactjs.org/docs/react-dom.html
+
+### `react-dom/client`
+
+See https://reactjs.org/docs/react-dom-client.html
 
 ### `react-dom/server`
 
-- `renderToString`
-- `renderToStaticMarkup`
+See https://reactjs.org/docs/react-dom-server.html

filename: packages/react/README.md
patch: @@ -6,8 +6,32 @@ The `react` package contains only the functionality necessary to define React co
 
 **Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the [production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) when deploying your application.
 
-## Example Usage
+## Usage
 
 ```js
-var React = require('react');
+import { useState } from 'react';
+import { createRoot } from 'react-dom';
+
+function Counter() {
+  const [count, setCount] = useState(0);
+  return (
+    <>
+      <h1>{count}</h1>
+      <button onClick={() => setCount(count + 1)}>
+        Increment
+      </button>
+    </>
+  );
+}
+
+const root = createRoot(document.getElementById('root'));
+root.render(<App />);
 ```
+
+## Documentation
+
+See https://reactjs.org/
+
+## API
+
+See https://reactjs.org/docs/react-api.html

filename: packages/use-sync-external-store/README.md
patch: @@ -1,5 +1,5 @@
 # use-sync-external-store
 
-Backwards compatible shim for React's `useSyncExternalStore`. Works with any React that supports hooks.
+Backwards-compatible shim for [`React.useSyncExternalStore`](https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore). Works with any React that supports Hooks.
 
-Until `useSyncExternalStore` is documented, refer to https://github.com/reactwg/react-18/discussions/86
+See also https://github.com/reactwg/react-18/discussions/86.
Repository: vercel/next.js
Pull request: Update flakey app-action test

This skips an assertion that is inherently flakey when in a distributed environment. 

x-ref: https://github.com/vercel/next.js/actions/runs/14805065791/job/41572809628

Changed files:
filename: test/e2e/app-dir/actions/app-action.test.ts
patch: @@ -1531,8 +1531,11 @@ describe('app-dir action handling', () => {
           .elementByCss('#thankyounext')
           .text()
 
-        // Should be the same number
-        expect(thankYouNext).toEqual(newThankYouNext)
+        // Should be the same number although in serverless
+        // it might be eventually consistent
+        if (!isNextDeploy) {
+          expect(thankYouNext).toEqual(newThankYouNext)
+        }
 
         await browser.elementByCss('#back').click()
Repository: denoland/deno
Pull request: fix(fmt): fix incorrect quotes in components

Unlike in dprint, `single_quote` option is shared between all formatters, so we shouldn't change this option when formatting attributes in components. This PR fixes this.

This problem doesn't affect formatting HTML.

Changed files:
filename: cli/tools/fmt.rs
patch: @@ -403,15 +403,6 @@ pub fn format_html(
           let mut typescript_config =
             get_resolved_typescript_config(fmt_options);
           typescript_config.line_width = hints.print_width as u32;
-          if hints.attr {
-            typescript_config.quote_style = if let Some(true) =
-              fmt_options.single_quote
-            {
-              dprint_plugin_typescript::configuration::QuoteStyle::AlwaysDouble
-            } else {
-              dprint_plugin_typescript::configuration::QuoteStyle::AlwaysSingle
-            };
-          }
           dprint_plugin_typescript::format_text(
             &path,
             text.to_string(),
Repository: ggml-org/llama.cpp
Pull request: readme : clarify the list of dependencies and their license

I think adding this is a good practice to:
- Embrace projects that we're depending on
- Useful in case there are bug reports or vulnerability from upstream
- Keep track of the list of licenses to be included


Changed files:
filename: README.md
patch: @@ -572,4 +572,11 @@ automatically. For example:
 $ echo "source ~/.llama-completion.bash" >> ~/.bashrc
 ```
 
-## References
+## Dependencies
+
+- [yhirose/cpp-httplib](https://github.com/yhirose/cpp-httplib) - Single-header HTTP server, used by `llama-server` - MIT license
+- [stb-image](https://github.com/nothings/stb) - Single-header image format decoder, used by multimodal subsystem - Public domain
+- [nlohmann/json](https://github.com/nlohmann/json) - Single-header JSON library, used by various tools/examples - MIT License
+- [minja](https://github.com/google/minja) - Minimal Jinja parser in C++, used by various tools/examples - MIT License
+- [linenoise.cpp](./tools/run/linenoise.cpp/linenoise.cpp) - C++ library that provides readline-like line editing capabilities, used by `llama-run` - BSD 2-Clause License
+- [curl](https://curl.se/) - Client-side URL transfer library, used by various tools/examples - [CURL License](https://curl.se/docs/copyright.html)
Repository: facebook/react
Pull request: Rename Controls to PipeableStream

This type isn't exported so it's technically not public.

This object mimics a ReadableStream signature but it's a subset of it.

Currently this is safe to destructure and call each function without the `this`. That's what the tests do. But I'm not sure that's even guaranteed. It should probably be treated as a class with a prototype in docs/examples.


Changed files:
filename: packages/react-dom/src/server/ReactDOMFizzServerNode.js
patch: @@ -46,7 +46,7 @@ type Options = {|
   onError?: (error: mixed) => void,
 |};
 
-type Controls = {|
+type PipeableStream = {|
   // Cancel any pending I/O and put anything remaining into
   // client rendered mode.
   abort(): void,
@@ -76,7 +76,7 @@ function createRequestImpl(children: ReactNodeList, options: void | Options) {
 function renderToPipeableStream(
   children: ReactNodeList,
   options?: Options,
-): Controls {
+): PipeableStream {
   const request = createRequestImpl(children, options);
   let hasStartedFlowing = false;
   startWork(request);

filename: packages/react-server-dom-webpack/src/ReactFlightDOMServerNode.js
patch: @@ -26,7 +26,7 @@ type Options = {
   onError?: (error: mixed) => void,
 };
 
-type Controls = {|
+type PipeableStream = {|
   pipe<T: Writable>(destination: T): T,
 |};
 
@@ -35,7 +35,7 @@ function renderToPipeableStream(
   webpackMap: BundlerConfig,
   options?: Options,
   context?: Array<[string, ServerContextJSONValue]>,
-): Controls {
+): PipeableStream {
   const request = createRequest(
     model,
     webpackMap,
Repository: nodejs/node
Pull request: deps: update amaro to 0.2.1

This is an automated update of amaro to 0.2.1.

Changed files:
filename: deps/amaro/dist/package.json
patch: @@ -4,7 +4,7 @@
     "강동윤 <kdy1997.dev@gmail.com>"
   ],
   "description": "wasm module for swc",
-  "version": "1.7.40",
+  "version": "1.10.3",
   "license": "Apache-2.0",
   "repository": {
     "type": "git",

filename: deps/amaro/package.json
patch: @@ -1,6 +1,6 @@
 {
 	"name": "amaro",
-	"version": "0.2.0",
+	"version": "0.2.1",
 	"description": "Node.js TypeScript wrapper",
 	"license": "MIT",
 	"type": "commonjs",
@@ -22,6 +22,7 @@
 		"prepack": "npm run build",
 		"postpack": "npm run clean",
 		"build": "node esbuild.config.mjs",
+		"build:wasm": "node tools/build-wasm.js",
 		"typecheck": "tsc --noEmit",
 		"test": "node --test --experimental-test-snapshots \"**/*.test.js\"",
 		"test:regenerate": "node --test --experimental-test-snapshots --test-update-snapshots \"**/*.test.js\""

filename: src/amaro_version.h
patch: @@ -2,5 +2,5 @@
 // Refer to tools/dep_updaters/update-amaro.sh
 #ifndef SRC_AMARO_VERSION_H_
 #define SRC_AMARO_VERSION_H_
-#define AMARO_VERSION "0.2.0"
+#define AMARO_VERSION "0.2.1"
 #endif  // SRC_AMARO_VERSION_H_
Repository: denoland/deno
Pull request: fix(ext/node): throw when loading `cpu-features` module

It crashes because of NAN usage, we want to trigger the fallback case in ssh2 by throwing an error.

Fixes https://github.com/denoland/deno/issues/25236


Changed files:
filename: ext/node/polyfills/01_require.js
patch: @@ -1121,6 +1121,9 @@ Module._extensions[".json"] = function (module, filename) {
 
 // Native extension for .node
 Module._extensions[".node"] = function (module, filename) {
+  if (filename.endsWith("cpufeatures.node")) {
+    throw new Error("Using cpu-features module is currently not supported");
+  }
   module.exports = op_napi_open(
     filename,
     globalThis,
Repository: electron/electron
Pull request: fix: don't use deprecate-soon class v8::String::Value

#### Description of Change

Upstream marked v8::String::Value as `V8_DEPRECATE_SOON` last month, so let's stop using it.

The replacement code mostly does the same as v8::String::Value()''s implementation; but since our test only cares about the length and not the contents, we also get a nice little perf win of not needing to allocate a char array and not needing to call Local::String::Write().

- [Upstream V8_DEPRECATE_SOON change](https://chromium-review.googlesource.com/c/v8/v8/+/5667299)
- Upstream's [v8::String::Value() impl](https://chromium.googlesource.com/v8/v8/+/20226b740bfa1a1e46dff80363232dfd3da50de8/src/api/api.cc#10883)
- History on why we used it in #19792: [1](https://github.com/electron/electron/pull/19792/commits/80c1a9739d191d2e393e56e2b254fb72bf6859e9), [2](https://github.com/electron/electron/pull/19792/commits/f49ed30f7205d7295ab035c6f1b3702cf7e3217c)

CC @codebytere and @deepak1556 who coded / reviewed 19792

#### Checklist

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: none.

Changed files:
filename: shell/common/gin_converters/file_path_converter.h
patch: @@ -23,9 +23,8 @@ struct Converter<base::FilePath> {
     if (val->IsNull())
       return true;
 
-    v8::String::Value str(isolate, val);
-    if (str.length() == 0) {
-      *out = base::FilePath();
+    if (val->IsString() && v8::Local<v8::String>::Cast(val)->Length() == 0) {
+      *out = {};
       return true;
     }
Repository: electron/electron
Pull request: build: improve logging on http errors during release process (again, but more)

Ok, turns out this is a 302

Notes: none

Changed files:
filename: script/release/release.js
patch: @@ -401,7 +401,7 @@ async function verifyDraftGitHubReleaseAssets (release) {
       throwHttpErrors: false
     });
 
-    if (response.statusCode !== 200) {
+    if (response.statusCode !== 302 && response.statusCode !== 301) {
       console.error('Failed to HEAD github asset: ' + url);
       throw new Error('Unexpected status HEAD\'ing github asset: ' + response.statusCode);
     }
Repository: denoland/deno
Pull request: fix: replace `npm install` hint with `deno install` hint

Needed for https://github.com/denoland/deno/pull/25213.

With Deno 2, we should suggest using `deno install` instead of `npm install`.

Changed files:
filename: cli/npm/byonm.rs
patch: @@ -307,14 +307,9 @@ impl CliNpmResolver for ByonmCliNpmResolver {
       concat!(
         "Could not find \"{}\" in a node_modules folder. ",
         "Deno expects the node_modules/ directory to be up to date. ",
-        "Did you forget to run `{}`?"
+        "Did you forget to run `deno install`?"
       ),
       alias,
-      if *crate::args::DENO_FUTURE {
-        "deno install"
-      } else {
-        "npm install"
-      }
     );
   }
 

filename: cli/resolver.rs
patch: @@ -146,7 +146,7 @@ impl CliNodeResolver {
                         concat!(
                         "Could not resolve \"{}\", but found it in a package.json. ",
                         "Deno expects the node_modules/ directory to be up to date. ",
-                        "Did you forget to run `npm install`?"
+                        "Did you forget to run `deno install`?"
                       ),
                         specifier
                       ));

filename: tests/integration/npm_tests.rs
patch: @@ -2404,7 +2404,7 @@ fn byonm_package_specifier_not_installed_and_invalid_subpath() {
   // no npm install has been run, so this should give an informative error
   let output = test_context.new_command().args("run main.ts").run();
   output.assert_matches_text(
-    r#"error: Could not resolve "chalk", but found it in a package.json. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`?
+    r#"error: Could not resolve "chalk", but found it in a package.json. Deno expects the node_modules/ directory to be up to date. Did you forget to run `deno install`?
     at file:///[WILDCARD]/main.ts:1:19
 "#,
   );

filename: tests/specs/npm/byonm/not_installed.out
patch: @@ -1,2 +1,2 @@
-error: Could not find "chalk" in a node_modules folder. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`?
+error: Could not find "chalk" in a node_modules folder. Deno expects the node_modules/ directory to be up to date. Did you forget to run `deno install`?
     at file:///[WILDCARD]/not_installed.ts:1:19
Repository: electron/electron
Pull request: build: improve logging on http errors during release process (again)

Oops

Notes: none

Changed files:
filename: script/release/get-asset.js
patch: @@ -26,9 +26,9 @@ async function getAssetContents (repo, assetId) {
     throwHttpErrors: false
   });
 
-  if (response.status !== 302 && response.status !== 301) {
+  if (response.statusCode !== 302 && response.statusCode !== 301) {
     console.error('Failed to HEAD github asset contents for redirect: ' + url);
-    throw new Error('Unexpected status HEAD\'ing github asset: ' + response.status);
+    throw new Error('Unexpected status HEAD\'ing github asset for redirect: ' + response.statusCode);
   }
 
   if (!response.headers.location) {
@@ -40,14 +40,9 @@ async function getAssetContents (repo, assetId) {
     throwHttpErrors: false
   });
 
-  if (fileResponse.status !== 200) {
-    fileResponse.error(`Failed to download github asset contents: ${url} (via: ${response.headers.location})`);
-    throw new Error('Unexpected status fetching github asset: ' + fileResponse.status);
-  }
-
   if (fileResponse.statusCode !== 200) {
     console.error(fileResponse.headers, `${fileResponse.body}`.slice(0, 300));
-    throw new Error(`cannot download asset[${assetId}] from ${response.headers.location}, got status: ${fileResponse.status}`);
+    throw new Error(`cannot download asset[${assetId}] from ${response.headers.location}, got status: ${fileResponse.statusCode}`);
   }
 
   return fileResponse.body;

filename: script/release/release.js
patch: @@ -401,9 +401,9 @@ async function verifyDraftGitHubReleaseAssets (release) {
       throwHttpErrors: false
     });
 
-    if (response.status !== 200) {
+    if (response.statusCode !== 200) {
       console.error('Failed to HEAD github asset: ' + url);
-      throw new Error('Unexpected status HEAD\'ing github asset: ' + response.status);
+      throw new Error('Unexpected status HEAD\'ing github asset: ' + response.statusCode);
     }
 
     return { url: response.headers.location, file: asset.name };
@@ -420,10 +420,10 @@ async function getShaSumMappingFromUrl (shaSumFileUrl, fileNamePrefix) {
     throwHttpErrors: false
   });
 
-  if (response.status !== 200) {
+  if (response.statusCode !== 200) {
     console.error('Failed to fetch SHASUM mapping: ' + shaSumFileUrl);
     console.error('Bad SHASUM mapping response: ' + response.body.trim());
-    throw new Error('Unexpected status fetching SHASUM mapping: ' + response.status);
+    throw new Error('Unexpected status fetching SHASUM mapping: ' + response.statusCode);
   }
 
   const raw = response.body;
Repository: huggingface/transformers
Pull request: Make sure torch_is_available before using torch.distributed

# What does this PR do?
Fixes https://github.com/huggingface/transformers/issues/37680


Changed files:
filename: src/transformers/pipelines/base.py
patch: @@ -997,7 +997,7 @@ def __init__(
         else:
             self.device = device if device is not None else -1
 
-        if torch.distributed.is_initialized():
+        if is_torch_available() and torch.distributed.is_initialized():
             self.device = self.model.device
         logger.warning(f"Device set to use {self.device}")
Repository: vercel/next.js
Pull request: Turbopack: reduce max coverage for compaction

### What?

Compact earlier to limit the number of accessed files.

Closes PACK-4499

Changed files:
filename: turbopack/crates/turbo-tasks-backend/src/database/turbo.rs
patch: @@ -13,7 +13,7 @@ use crate::database::{
     write_batch::{BaseWriteBatch, ConcurrentWriteBatch, WriteBatch, WriteBuffer},
 };
 
-const COMPACT_MAX_COVERAGE: f32 = 20.0;
+const COMPACT_MAX_COVERAGE: f32 = 10.0;
 const COMPACT_MAX_MERGE_SEQUENCE: usize = 8;
 
 pub struct TurboKeyValueDatabase {
Repository: huggingface/transformers
Pull request: [tests] fix `test_nemotron_8b_generation_sdpa`

## What does this PR do?
Not sure whether the model got updated, but `test_nemotron_8b_generation_sdpa` fails on CUDA. This PR fixes this by adding `max_new_tokens` to make it pass. Otherwise, you will get the following error:

```bash
    def test_nemotron_8b_generation_sdpa(self):
        text = ["What is the largest planet in solar system?"]
        EXPECTED_TEXT = [
            "What is the largest planet in solar system?\nAnswer: Jupiter\n\nWhat is the answer",
        ]
        model_id = "thhaus/nemotron3-8b"
        model = NemotronForCausalLM.from_pretrained(
            model_id, torch_dtype=torch.float16, device_map="auto", attn_implementation="sdpa"
        )
        tokenizer = AutoTokenizer.from_pretrained(model_id)
        inputs = tokenizer(text, return_tensors="pt").to(torch_device)
    
        output = model.generate(**inputs, do_sample=False)
        output_text = tokenizer.batch_decode(output, skip_special_tokens=True)
>       self.assertEqual(EXPECTED_TEXT, output_text)
E       AssertionError: Lists differ: ['Wha[46 chars]er: Jupiter\n\nWhat is the answer'] != ['Wha[46 chars]er: Jupiter\n\nWhat is the answer: What is the name of the 19']
E       
E       First differing element 0:
E       'What[44 chars]wer: Jupiter\n\nWhat is the answer'
E       'What[44 chars]wer: Jupiter\n\nWhat is the answer: What is the name of the 19'
E       
E         ['What is the largest planet in solar system?\n'
E          'Answer: Jupiter\n'
E          '\n'
E       -  'What is the answer']
E       +  'What is the answer: What is the name of the 19']

tests/models/nemotron/test_modeling_nemotron.py:200: AssertionError
```


Changed files:
filename: tests/models/nemotron/test_modeling_nemotron.py
patch: @@ -195,7 +195,7 @@ def test_nemotron_8b_generation_sdpa(self):
         tokenizer = AutoTokenizer.from_pretrained(model_id)
         inputs = tokenizer(text, return_tensors="pt").to(torch_device)
 
-        output = model.generate(**inputs, do_sample=False)
+        output = model.generate(**inputs, do_sample=False, max_new_tokens=10)
         output_text = tokenizer.batch_decode(output, skip_special_tokens=True)
         self.assertEqual(EXPECTED_TEXT, output_text)
Repository: vercel/next.js
Pull request: Turbopack: commit compaction only when there are updates

### What?

An empty compaction should not commit

Closes PACK-4478

Changed files:
filename: turbopack/crates/turbo-persistence/src/db.rs
patch: @@ -571,12 +571,14 @@ impl TurboPersistence {
             )?;
         }
 
-        self.commit(
-            new_sst_files,
-            Vec::new(),
-            indicies_to_delete,
-            *sequence_number.get_mut(),
-        )?;
+        if !new_sst_files.is_empty() {
+            self.commit(
+                new_sst_files,
+                Vec::new(),
+                indicies_to_delete,
+                *sequence_number.get_mut(),
+            )?;
+        }
 
         self.active_write_operation.store(false, Ordering::Release);
 
@@ -592,9 +594,9 @@ impl TurboPersistence {
         indicies_to_delete: &mut Vec<usize>,
         max_coverage: f32,
         max_merge_sequence: usize,
-    ) -> Result<bool> {
+    ) -> Result<()> {
         if static_sorted_files.is_empty() {
-            return Ok(false);
+            return Ok(());
         }
 
         struct SstWithRange {
@@ -869,7 +871,7 @@ impl TurboPersistence {
             indicies_to_delete.append(&mut inner_indicies_to_delete);
         }
 
-        Ok(true)
+        Ok(())
     }
 
     /// Get a value from the database. Returns None if the key is not found. The returned value