helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: perf(turbopack): Implement `ShrinkToFit` for `AutoMap`

### What?

Implement `ShrinkToFit` for `AutoMap`, which can be used in a `Vc`

### Why?

For consistency and to reduce max RSS

Closes PACK-4622

Changed files:
filename: Cargo.lock
patch: @@ -577,6 +577,7 @@ dependencies = [
  "hashbrown 0.14.5",
  "rustc-hash 2.1.1",
  "serde",
+ "shrink-to-fit",
  "smallvec",
 ]
 
@@ -6985,6 +6986,7 @@ version = "0.2.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "939a4c696178684fc5fc1426625b882805418bbb56e056d21f9d4946a9d6ff51"
 dependencies = [
+ "hashbrown 0.15.2",
  "indexmap 2.7.1",
  "serde_json",
  "shrink-to-fit-macro",

filename: turbopack/crates/turbo-tasks-auto-hash-map/Cargo.toml
patch: @@ -13,3 +13,4 @@ hashbrown = { workspace = true, features = ["serde"]}
 rustc-hash = { workspace = true }
 serde = { workspace = true, features = ["derive"] }
 smallvec = { workspace = true }
+shrink-to-fit = { workspace = true, features = ["hashbrown"] }
\ No newline at end of file

filename: turbopack/crates/turbo-tasks-auto-hash-map/src/map.rs
patch: @@ -12,6 +12,7 @@ use serde::{
     de::{MapAccess, Visitor},
     ser::SerializeMap,
 };
+use shrink_to_fit::ShrinkToFit;
 use smallvec::SmallVec;
 
 use crate::{MAX_LIST_SIZE, MIN_HASH_SIZE};
@@ -900,6 +901,25 @@ where
     }
 }
 
+impl<K, V, H, const I: usize> ShrinkToFit for AutoMap<K, V, H, I>
+where
+    K: Eq + Hash,
+    V: Eq,
+    H: BuildHasher + Default,
+{
+    fn shrink_to_fit(&mut self) {
+        if self.len() < MIN_HASH_SIZE {
+            self.convert_to_list();
+        }
+
+        match self {
+            AutoMap::List(list) => list.shrink_to_fit(),
+            AutoMap::Map(map) => {
+                hashbrown::HashMap::shrink_to_fit(map);
+            }
+        }
+    }
+}
 #[cfg(test)]
 mod tests {
     use super::*;

filename: turbopack/crates/turbo-tasks-auto-hash-map/src/set.rs
patch: @@ -6,6 +6,7 @@ use std::{
 
 use rustc_hash::FxHasher;
 use serde::{Deserialize, Serialize};
+use shrink_to_fit::ShrinkToFit;
 
 use crate::AutoMap;
 
@@ -240,6 +241,16 @@ where
     }
 }
 
+impl<K, H, const I: usize> ShrinkToFit for AutoSet<K, H, I>
+where
+    K: Eq + Hash,
+    H: BuildHasher + Default,
+{
+    fn shrink_to_fit(&mut self) {
+        self.map.shrink_to_fit();
+    }
+}
+
 #[cfg(test)]
 mod tests {
     use super::*;
Repository: ggml-org/llama.cpp
Pull request: context : fix SWA-related warning for multiple sequences

Do not display the warning for non-SWA models

Changed files:
filename: src/llama-context.cpp
patch: @@ -123,7 +123,7 @@ llama_context::llama_context(
                 __func__, n_ctx_per_seq, hparams.n_ctx_train);
     }
 
-    if (!params.swa_full && cparams.n_seq_max > 1) {
+    if (!params.swa_full && cparams.n_seq_max > 1 && hparams.is_swa_any()) {
         LLAMA_LOG_WARN("%s: requested n_seq_max (%u) > 1, but swa_full is not enabled -- performance may be degraded: %s\n",
                 __func__, cparams.n_seq_max, "https://github.com/ggml-org/llama.cpp/pull/13845#issuecomment-2924800573");
     }
Repository: denoland/deno
Pull request: fix: panic when require(esm)

Upgrades `deno_core`.

Closes https://github.com/denoland/deno/issues/25761
Closes https://github.com/denoland/deno/issues/25738

Changed files:
filename: Cargo.lock
patch: @@ -1405,9 +1405,9 @@ dependencies = [
 
 [[package]]
 name = "deno_core"
-version = "0.310.0"
+version = "0.311.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40269d9035d16ea83335f87eab8014c6e73c5045a1f32a3cfae835b3efdd76b1"
+checksum = "5e09bd55da542fa1fde753aff617c355b5d782e763ab2a19e4371a56d7844cac"
 dependencies = [
  "anyhow",
  "bincode",
@@ -1888,9 +1888,9 @@ dependencies = [
 
 [[package]]
 name = "deno_ops"
-version = "0.186.0"
+version = "0.187.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba0c37f722813b9a9016f9d442e37bce0e30b97111a1690e70bab1057c03651d"
+checksum = "e040fd4def8a67538fe38c9955fd970efc9f44284bd69d44f8992a456afd665d"
 dependencies = [
  "proc-macro-rules",
  "proc-macro2",
@@ -6259,9 +6259,9 @@ dependencies = [
 
 [[package]]
 name = "serde_v8"
-version = "0.219.0"
+version = "0.220.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b4de773ce668166fe0a77291cf90a7740be7997c954103c8125892597c0e98b"
+checksum = "6e7a65d91d79acc82aa229aeb084f4a39bda269069bc1520df40f679495388e4"
 dependencies = [
  "num-bigint",
  "serde",

filename: Cargo.toml
patch: @@ -45,7 +45,7 @@ repository = "https://github.com/denoland/deno"
 
 [workspace.dependencies]
 deno_ast = { version = "=0.42.0", features = ["transpiling"] }
-deno_core = { version = "0.310.0" }
+deno_core = { version = "0.311.0" }
 
 deno_bench_util = { version = "0.162.0", path = "./bench_util" }
 deno_lockfile = "=0.23.1"
Repository: nodejs/node
Pull request: doc: move anatoli to emeritus

<!--
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: README.md
patch: @@ -197,8 +197,6 @@ For information about the governance of the Node.js project, see
 
 #### TSC regular members
 
-* [apapirovski](https://github.com/apapirovski) -
-  **Anatoli Papirovski** <<apapirovski@mac.com>> (he/him)
 * [BethGriggs](https://github.com/BethGriggs) -
   **Beth Griggs** <<bethanyngriggs@gmail.com>> (she/her)
 * [bnoordhuis](https://github.com/bnoordhuis) -
@@ -222,6 +220,8 @@ For information about the governance of the Node.js project, see
 
 * [addaleax](https://github.com/addaleax) -
   **Anna Henningsen** <<anna@addaleax.net>> (she/her)
+* [apapirovski](https://github.com/apapirovski) -
+  **Anatoli Papirovski** <<apapirovski@mac.com>> (he/him)
 * [ChALkeR](https://github.com/ChALkeR) -
   **Сковорода Никита Андреевич** <<chalkerx@gmail.com>> (he/him)
 * [chrisdickinson](https://github.com/chrisdickinson) -
Repository: denoland/deno
Pull request: fix(cli): Default to auto with --node-modules-dir flag

Fixes a regression where we were ignoring `--node-modules-dir` if there was no value passed with it. We should instead default to "auto", to maintain compat with deno 1

Changed files:
filename: cli/args/flags.rs
patch: @@ -3896,6 +3896,7 @@ fn node_modules_dir_arg() -> Arg {
   Arg::new("node-modules-dir")
     .long("node-modules-dir")
     .num_args(0..=1)
+    .default_missing_value("auto")
     .value_parser(clap::builder::ValueParser::new(parse_node_modules_dir_mode))
     .value_name("MODE")
     .require_equals(true)
@@ -8494,7 +8495,7 @@ mod tests {
           watch: None,
           bare: true,
         }),
-        node_modules_dir: None,
+        node_modules_dir: Some(NodeModulesDirMode::Auto),
         code_cache_enabled: true,
         ..Flags::default()
       }
@@ -10815,4 +10816,23 @@ mod tests {
       "error: invalid value 'https://example.com': URLs are not supported, only domains and ips"
     );
   }
+
+  #[test]
+  fn node_modules_dir_default() {
+    let r =
+      flags_from_vec(svec!["deno", "run", "--node-modules-dir", "./foo.ts"]);
+    let flags = r.unwrap();
+    assert_eq!(
+      flags,
+      Flags {
+        subcommand: DenoSubcommand::Run(RunFlags {
+          script: "./foo.ts".into(),
+          ..Default::default()
+        }),
+        node_modules_dir: Some(NodeModulesDirMode::Auto),
+        code_cache_enabled: true,
+        ..Default::default()
+      }
+    )
+  }
 }
Repository: facebook/react
Pull request: Don't use the Flight terminology in public error messages

This error message shouldn't even be possible if you're running a compatible environment because you can't even get to createContext if `react` is properly aliased. Unfortunately, that's not the case in any environment outside the prototype yet.

Changed files:
filename: packages/react-server/src/ReactFlightHooks.js
patch: @@ -26,7 +26,9 @@ export function resetHooksForRequest() {
 function readContext<T>(context: ReactServerContext<T>): T {
   if (__DEV__) {
     if (context.$$typeof !== REACT_SERVER_CONTEXT_TYPE) {
-      console.error('Only ServerContext is supported in Flight');
+      console.error(
+        'Only createServerContext is supported in Server Components.',
+      );
     }
     if (currentCache === null) {
       console.error(
Repository: denoland/deno
Pull request: fix(flags): properly error out for urls

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

Changed files:
filename: cli/args/flags.rs
patch: @@ -5084,12 +5084,12 @@ fn permission_args_parse(
   }
 
   if let Some(net_wl) = matches.remove_many::<String>("allow-net") {
-    let net_allowlist = flags_net::parse(net_wl.collect()).unwrap();
+    let net_allowlist = flags_net::parse(net_wl.collect())?;
     flags.permissions.allow_net = Some(net_allowlist);
   }
 
   if let Some(net_wl) = matches.remove_many::<String>("deny-net") {
-    let net_denylist = flags_net::parse(net_wl.collect()).unwrap();
+    let net_denylist = flags_net::parse(net_wl.collect())?;
     flags.permissions.deny_net = Some(net_denylist);
   }
 
@@ -10801,4 +10801,18 @@ mod tests {
       ["foo,", "bar"]
     );
   }
+
+  #[test]
+  fn net_flag_with_url() {
+    let r = flags_from_vec(svec![
+      "deno",
+      "run",
+      "--allow-net=https://example.com",
+      "script.ts"
+    ]);
+    assert_eq!(
+      r.unwrap_err().to_string(),
+      "error: invalid value 'https://example.com': URLs are not supported, only domains and ips"
+    );
+  }
 }

filename: runtime/permissions/lib.rs
patch: @@ -894,6 +894,10 @@ impl QueryDescriptor for NetDescriptor {
 // TODO(bartlomieju): rewrite to not use `AnyError` but a specific error implementations
 impl NetDescriptor {
   pub fn parse(hostname: &str) -> Result<Self, AnyError> {
+    if hostname.starts_with("http://") || hostname.starts_with("https://") {
+      return Err(uri_error(format!("invalid value '{hostname}': URLs are not supported, only domains and ips")));
+    }
+
     // If this is a IPv6 address enclosed in square brackets, parse it as such.
     if hostname.starts_with('[') {
       if let Some((ip, after)) = hostname.split_once(']') {
Repository: facebook/react
Pull request: [Flight] Minor error handling fixes

I noticed that when we error in progress of a web stream, that becomes an unhandled promise. This handles this using the usual error reporting (which might not actually work to propagate the error neither but it gives us a chance).

I also changed it so we serialize references to errors in the error priority queue. It doesn't make sense to emit references to future values at higher pri than the value that they're referencing. This ensures that we don't emit hard forward references to values that don't yet exist. Which can help simplify the client.

Now we have a guarantee that non-lazy values `$123` always reference backwards and not forwards.

Changed files:
filename: packages/react-client/src/ReactFlightClient.js
patch: @@ -312,6 +312,11 @@ export function parseModelString(
       } else {
         const id = parseInt(value.substring(1), 16);
         const chunk = getChunk(response, id);
+        if (chunk._status === PENDING) {
+          throw new Error(
+            "We didn't expect to see a forward reference. This is a bug in the React Server.",
+          );
+        }
         return readChunk(chunk);
       }
     }

filename: packages/react-server-dom-webpack/src/ReactFlightDOMClient.js
patch: @@ -35,12 +35,18 @@ function startReadingFromStream(
     }
     const buffer: Uint8Array = (value: any);
     processBinaryChunk(response, buffer);
-    return reader.read().then(progress, error);
+    return reader
+      .read()
+      .then(progress)
+      .catch(error);
   }
   function error(e) {
     reportGlobalError(response, e);
   }
-  reader.read().then(progress, error);
+  reader
+    .read()
+    .then(progress)
+    .catch(error);
 }
 
 function createFromReadableStream(

filename: packages/react-server/src/ReactFlightServer.js
patch: @@ -902,7 +902,7 @@ function abortTask(task: Task, request: Request, errorId: number): void {
   // has a single value referencing the error.
   const ref = serializeByValueID(errorId);
   const processedChunk = processReferenceChunk(request, task.id, ref);
-  request.completedJSONChunks.push(processedChunk);
+  request.completedErrorChunks.push(processedChunk);
 }
 
 function flushCompletedChunks(

filename: scripts/error-codes/codes.json
patch: @@ -423,5 +423,6 @@
   "435": "Unexpected Suspense handler tag (%s). This is a bug in React.",
   "436": "Stylesheet resources need a unique representation in the DOM while hydrating and more than one matching DOM Node was found. To fix, ensure you are only rendering one stylesheet link with an href attribute of \"%s\".",
   "437": "the \"precedence\" prop for links to stylesheets expects to receive a string but received something of type \"%s\" instead.",
-  "438": "An unsupported type was passed to use(): %s"
+  "438": "An unsupported type was passed to use(): %s",
+  "439": "We didn't expect to see a forward reference. This is a bug in the React Server."
 }
Repository: vercel/next.js
Pull request: fix(dev-overlay): Ignore right clicks on the indicator draggable

Without this change, right clicking on the indicator starts the drag action, which leads to janky behavior with the native browser context menu.

Only allow dragging with the primary mouse button.

I also tested this in the mobile simulator mode to make sure I didn't break anything there.

Closes PACK-4623

Changed files:
filename: packages/next/src/client/components/react-dev-overlay/ui/components/errors/dev-tools-indicator/draggable.tsx
patch: @@ -186,6 +186,9 @@ export function useDrag(options: UseDragOptions) {
   }
 
   function onPointerDown(e: React.PointerEvent) {
+    if (e.button !== 0) {
+      return // ignore right click
+    }
     origin.current = { x: e.clientX, y: e.clientY }
     state.current = 'press'
     window.addEventListener('pointermove', onPointerMove)
Repository: nodejs/node
Pull request: test: use strict mode in global setters test

test-global-setters.js was added in
https://github.com/nodejs/node/pull/26882 and hasn't been modified since. It appears that it avoids strict mode so that unscoped identifiers are treated as globals, but that's true in strict mode too. (In sloppy mode, an assignment to an undefined identifier will create a global, but that's not what this test does. In strict mode, those assignments will throw an error, which would seem to be what we would want.)

<!--
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-global-setters.js
patch: @@ -1,4 +1,10 @@
-/* eslint-disable strict */
+// When setters and getters were added for global.process and global.Buffer to
+// create a deprecation path for them in ESM, this test was added to make sure
+// the setters and getters behaved as expected.
+// Ref: https://github.com/nodejs/node/pull/26882
+// Ref: https://github.com/nodejs/node/pull/26334
+
+'use strict';
 require('../common');
 const assert = require('assert');
 const _process = require('process');
Repository: facebook/react
Pull request: run prettier

Run prettier.

Changed files:
filename: packages/react-devtools-shared/src/utils.js
patch: @@ -110,8 +110,7 @@ export function getWrappedDisplayName(
 ): string {
   const displayName = (outerType: any).displayName;
   return (
-    displayName ||
-    `${wrapperName}(${getDisplayName(innerType, fallbackName)})`
+    displayName || `${wrapperName}(${getDisplayName(innerType, fallbackName)})`
   );
 }
Repository: facebook/react
Pull request: [react devtools][easy] Fix code highlighting in VSCode

* Minor change that fixes code highlighting in VSCode in a particular file

## Summary

* See above

## How did you test this change?

:eyes:

In particular, before:
<img width="766" alt="Screen Shot 2022-08-30 at 2 10 04 PM" src="https://user-images.githubusercontent.com/4277077/187511667-d2eefdbb-64c0-49bf-9bc7-55607d276d44.png">


And after:

<img width="867" alt="Screen Shot 2022-08-30 at 2 08 33 PM" src="https://user-images.githubusercontent.com/4277077/187511591-ec2f4b89-1a1a-4ba5-a1b7-cb8539ca7ed2.png">

## But this isn't synced with `getWrappedName` in `getComponentNameFromFiber`

* Turns out, it wasn't synced before this commit, too!

Changed files:
filename: packages/react-devtools-shared/src/utils.js
patch: @@ -108,8 +108,9 @@ export function getWrappedDisplayName(
   wrapperName: string,
   fallbackName?: string,
 ): string {
+  const displayName = (outerType: any).displayName;
   return (
-    (outerType: any).displayName ||
+    displayName ||
     `${wrapperName}(${getDisplayName(innerType, fallbackName)})`
   );
 }
Repository: ggml-org/llama.cpp
Pull request: gguf-py : add add_classifier_output_labels method to writer

Add wrapper method that was previously omitted.

Changed files:
filename: convert_hf_to_gguf.py
patch: @@ -3709,8 +3709,7 @@ def set_gguf_parameters(self):
         self._try_set_pooling_type()
 
         if self.cls_out_labels:
-            key_name = gguf.Keys.Classifier.OUTPUT_LABELS.format(arch = gguf.MODEL_ARCH_NAMES[self.model_arch])
-            self.gguf_writer.add_array(key_name, [v for k, v in sorted(self.cls_out_labels.items())])
+            self.gguf_writer.add_classifier_output_labels([v for k, v in sorted(self.cls_out_labels.items())])
 
     def set_vocab(self):
         tokens, toktypes, tokpre = self.get_vocab_base()

filename: gguf-py/gguf/gguf_writer.py
patch: @@ -935,6 +935,9 @@ def add_eot_token_id(self, id: int) -> None:
     def add_eom_token_id(self, id: int) -> None:
         self.add_uint32(Keys.Tokenizer.EOM_ID, id)
 
+    def add_classifier_output_labels(self, labels: Sequence[str]) -> None:
+        self.add_array(Keys.Classifier.OUTPUT_LABELS.format(arch=self.arch), labels)
+
     # for vision models
 
     def add_clip_has_vision_encoder(self, value: bool) -> None:
Repository: facebook/react
Pull request: Fix CI: run `yarn prettier-all`

## Summary

Ran
```bash
yarn prettier-all
```
to fix CI

## How did you test this change?

Wait for CI on this PR.

Changed files:
filename: packages/react-devtools-shared/src/utils.js
patch: @@ -343,7 +343,9 @@ export function saveComponentFilters(
 
 export function getAppendComponentStack(): boolean {
   try {
-    const raw = localStorageGetItem(LOCAL_STORAGE_SHOULD_APPEND_COMPONENT_STACK_KEY);
+    const raw = localStorageGetItem(
+      LOCAL_STORAGE_SHOULD_APPEND_COMPONENT_STACK_KEY,
+    );
     if (raw != null) {
       return JSON.parse(raw);
     }
Repository: denoland/deno
Pull request: test: make specs::test::doc_success less flaky

Missed this line in https://github.com/denoland/deno/pull/25726

Changed files:
filename: tests/specs/test/doc_success/main.out
patch: @@ -15,5 +15,5 @@ running 1 test from ./main.ts$26-31.tsx
 running 1 test from ./main.ts$42-47.ts
 [WILDCARD]/main.ts$42-47.ts ... ok ([WILDCARD]s)
 
-ok | 5 passed | 0 failed ([WILDCARD]ms)
+ok | 5 passed | 0 failed ([WILDCARD]s)
Repository: nodejs/node
Pull request: deps: macro ENODATA is deprecated in libc++

The `ENODATA` macro, which is used by uv's public header`errno.h`, has been deprecated in libc++.

Changed files:
filename: deps/uv/unofficial.gni
patch: @@ -7,6 +7,11 @@
 template("uv_gn_build") {
   config("uv_external_config") {
     include_dirs = [ "include" ]
+    if (is_clang || !is_win) {
+      cflags_cc = [
+        "-Wno-deprecated-pragma",  # for using ENODATA in errno.h
+      ]
+    }
   }
 
   config("uv_internal_config") {