helloadhavan/github_issues huggingface dataset:
Repository: nodejs/node
Pull request: doc: add esm examples to `node:string_decoder`

This PR adds the ESM counterparts of the CJS examples for [the String decoder documentation](https://nodejs.org/api/string_decoder.html).

I've tested every single example and they all work/behave as expected.

Best regards!

Changed files:
filename: doc/api/string_decoder.md
patch: @@ -10,13 +10,29 @@ The `node:string_decoder` module provides an API for decoding `Buffer` objects
 into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
 characters. It can be accessed using:
 
-```js
+```mjs
+import { StringDecoder } from 'node:string_decoder';
+```
+
+```cjs
 const { StringDecoder } = require('node:string_decoder');
 ```
 
 The following example shows the basic use of the `StringDecoder` class.
 
-```js
+```mjs
+import { StringDecoder } from 'node:string_decoder';
+import { Buffer } from 'node:buffer';
+const decoder = new StringDecoder('utf8');
+
+const cent = Buffer.from([0xC2, 0xA2]);
+console.log(decoder.write(cent)); // Prints: ¢
+
+const euro = Buffer.from([0xE2, 0x82, 0xAC]);
+console.log(decoder.write(euro)); // Prints: €
+```
+
+```cjs
 const { StringDecoder } = require('node:string_decoder');
 const decoder = new StringDecoder('utf8');
 
@@ -35,7 +51,17 @@ next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
 In the following example, the three UTF-8 encoded bytes of the European Euro
 symbol (`€`) are written over three separate operations:
 
-```js
+```mjs
+import { StringDecoder } from 'node:string_decoder';
+import { Buffer } from 'node:buffer';
+const decoder = new StringDecoder('utf8');
+
+decoder.write(Buffer.from([0xE2]));
+decoder.write(Buffer.from([0x82]));
+console.log(decoder.end(Buffer.from([0xAC]))); // Prints: €
+```
+
+```cjs
 const { StringDecoder } = require('node:string_decoder');
 const decoder = new StringDecoder('utf8');
Repository: denoland/deno
Pull request: fix: empty `process.platform` with `__runtime_js_sources`

We use the `target` property of the snapshot options to derive `process.platform` and `process.arch` from. This value had an incorrect format when compiled with `__runtime_js_sources` enabled. This PR fixes that so that `process.platform` holds the proper value.

Fixes https://github.com/denoland/deno/issues/23164

Changed files:
filename: runtime/ops/bootstrap.rs
patch: @@ -42,11 +42,20 @@ pub struct SnapshotOptions {
 
 impl Default for SnapshotOptions {
   fn default() -> Self {
+    let arch = std::env::consts::ARCH;
+    let platform = std::env::consts::OS;
+    let target = match platform {
+      "macos" => format!("{}-apple-darwin", arch),
+      "linux" => format!("{}-unknown-linux-gnu", arch),
+      "windows" => format!("{}-pc-windows-msvc", arch),
+      rest => format!("{}-{}", arch, rest),
+    };
+
     Self {
       deno_version: "dev".to_owned(),
       ts_version: "n/a".to_owned(),
       v8_version: deno_core::v8_version(),
-      target: std::env::consts::ARCH.to_owned(),
+      target,
     }
   }
 }
Repository: huggingface/transformers
Pull request: Fix device_map check for ggml files

# What does this PR do?
Fixing the device_map check for ggml files when device_map is not a dict


Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -4329,7 +4329,11 @@ def from_pretrained(
                 "You cannot combine Quantization and loading a model from a GGUF file, try again by making sure you did not passed a `quantization_config` or that you did not load a quantized model from the Hub."
             )
 
-        if gguf_file and device_map is not None and "disk" in device_map.values():
+        if (
+            gguf_file
+            and device_map is not None
+            and ((isinstance(device_map, dict) and "disk" in device_map.values()) or "disk" in device_map)
+        ):
             raise RuntimeError(
                 "One or more modules is configured to be mapped to disk. Disk offload is not supported for models "
                 "loaded from GGUF files."
Repository: facebook/react
Pull request: Fixed ReactSharedInternals export in UMD bundle

Resolves #22113

Prior to this PR, the `react` UMD bundle contained two `ReactSharedInternals` objects. The first `ReactSharedInternals` object came from here:
https://github.com/facebook/react/blob/bd255700d73ed5fa88f9e32fa4b43623679adf0c/packages/react/src/ReactSharedInternals.js#L15-L26

The second `ReactSharedInternals` object (`ReactSharedInternals$1` in the bundle) came from here:
https://github.com/facebook/react/blob/bd255700d73ed5fa88f9e32fa4b43623679adf0c/packages/react/src/forks/ReactSharedInternals.umd.js#L15-L28

The second one is the one that ended up being shared via `__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`. It had a `Scheduler` key but not a `ReactCurrentActQueue` key. The fix was to make sure both keys got added to the UMD override.

## Testing
Re-built the bundle:
```sh
node scripts/rollup/build.js --type=UMD_DEV -- react/index,react-dom/index
```

Then inspected the output at:
```
build/node_modules/react/umd/react.development.js
build/node_modules/react-dom/umd/react-dom.development.js
```

Also dropped both into a small repro app:
```html
<!DOCTYPE html>
<html>
  <head>
    <script src="https://unpkg.com/react@alpha/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom@alpha/umd/react-dom.development.js"></script>
  </head>
  <body>
    <script type="text/javascript">
      const container = document.createElement('div');

      document.body.appendChild(container);

      const root = ReactDOM.createRoot(container);
      root.render(React.createElement('div', null, 'Testing...'));
    </script>
  </body>
</html>
```

Changed files:
filename: packages/react/src/forks/ReactSharedInternals.umd.js
patch: @@ -8,6 +8,7 @@
 import assign from 'object-assign';
 import * as Scheduler from 'scheduler';
 import ReactCurrentDispatcher from '../ReactCurrentDispatcher';
+import ReactCurrentActQueue from '../ReactCurrentActQueue';
 import ReactCurrentOwner from '../ReactCurrentOwner';
 import ReactDebugCurrentFrame from '../ReactDebugCurrentFrame';
 import ReactCurrentBatchConfig from '../ReactCurrentBatchConfig';
@@ -28,6 +29,7 @@ const ReactSharedInternals = {
 };
 
 if (__DEV__) {
+  ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
   ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
 }
Repository: facebook/react
Pull request: Show a soft error when a text string or number is supplied as a child…

# Summary
Currently, React Native throws an invariant violation error when a text string or number is supplied as a child to non text wrappers like . This is undesirable because core library components should be fault-tolerant and degrade gracefully (with soft errors, if relevant). This change is only for the new React Native architecture.

There is a change I am making on the native side so that it doesn't hit an assertion / crash.

# Test Plan
Modified the tests to account for the change.

Ran yarn test successfully.
Ran yarn test --prod successfully.
Ran yarn prettier successfully.
Ran yarn linc successfully.
Ran yarn flow fabric successfully.

Changed files:
filename: packages/react-native-renderer/src/ReactFabricHostConfig.js
patch: @@ -22,8 +22,6 @@ import type {
 import {mountSafeCallback_NOT_REALLY_SAFE} from './NativeMethodsMixinUtils';
 import {create, diff} from './ReactNativeAttributePayload';
 
-import invariant from 'shared/invariant';
-
 import {dispatchEvent} from './ReactFabricEventEmitter';
 
 import {
@@ -264,10 +262,11 @@ export function createTextInstance(
   hostContext: HostContext,
   internalInstanceHandle: Object,
 ): TextInstance {
-  invariant(
-    hostContext.isInAParentText,
-    'Text strings must be rendered within a <Text> component.',
-  );
+  if (__DEV__) {
+    if (!hostContext.isInAParentText) {
+      console.error('Text strings must be rendered within a <Text> component.');
+    }
+  }
 
   const tag = nextReactTag;
   nextReactTag += 2;

filename: packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js
patch: @@ -524,7 +524,7 @@ describe('ReactFabric', () => {
     });
   });
 
-  it('should throw for text not inside of a <Text> ancestor', () => {
+  it('should console error for text not inside of a <Text> ancestor', () => {
     const ScrollView = createReactNativeComponentClass('RCTScrollView', () => ({
       validAttributes: {},
       uiViewClassName: 'RCTScrollView',
@@ -542,7 +542,7 @@ describe('ReactFabric', () => {
       act(() => {
         ReactFabric.render(<View>this should warn</View>, 11);
       });
-    }).toThrow('Text strings must be rendered within a <Text> component.');
+    }).toErrorDev(['Text strings must be rendered within a <Text> component.']);
 
     expect(() => {
       act(() => {
@@ -553,7 +553,7 @@ describe('ReactFabric', () => {
           11,
         );
       });
-    }).toThrow('Text strings must be rendered within a <Text> component.');
+    }).toErrorDev(['Text strings must be rendered within a <Text> component.']);
   });
 
   it('should not throw for text inside of an indirect <Text> ancestor', () => {
Repository: nodejs/node
Pull request: doc: fix history info for `URL.prototype.toJSON`

Fixes: https://github.com/nodejs/node/issues/55806
Refs: https://github.com/nodejs/node/pull/11236
Refs: https://github.com/nodejs/node/pull/17365

<!--
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/url.md
patch: @@ -600,6 +600,12 @@ value returned is equivalent to that of [`url.href`][] and [`url.toJSON()`][].
 
 #### `url.toJSON()`
 
+<!-- YAML
+added:
+  - v7.7.0
+  - v6.13.0
+-->
+
 * Returns: {string}
 
 The `toJSON()` method on the `URL` object returns the serialized URL. The
Repository: denoland/deno
Pull request: fix(ext/node): support `throwIfNoEntry` option in `fs.lstatSync`

We didn't support the `throwIfNoEntry` option for Node's `fs.lstatSync` method. Note that the async variant doesn't have this option.

Fixes https://github.com/denoland/deno/issues/23996

Changed files:
filename: ext/node/polyfills/_fs/_fs_lstat.ts
patch: @@ -3,6 +3,7 @@
 // TODO(petamoriken): enable prefer-primordials for node polyfills
 // deno-lint-ignore-file prefer-primordials
 
+import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts";
 import {
   BigIntStats,
   CFISBIS,
@@ -56,16 +57,31 @@ export const lstatPromise = promisify(lstat) as (
 export function lstatSync(path: string | URL): Stats;
 export function lstatSync(
   path: string | URL,
-  options: { bigint: false },
+  options: { bigint: false; throwIfNoEntry?: boolean },
 ): Stats;
 export function lstatSync(
   path: string | URL,
-  options: { bigint: true },
+  options: { bigint: true; throwIfNoEntry?: boolean },
 ): BigIntStats;
 export function lstatSync(
   path: string | URL,
   options?: statOptions,
 ): Stats | BigIntStats {
-  const origin = Deno.lstatSync(path);
-  return CFISBIS(origin, options?.bigint || false);
+  try {
+    const origin = Deno.lstatSync(path);
+    return CFISBIS(origin, options?.bigint || false);
+  } catch (err) {
+    if (
+      options?.throwIfNoEntry === false &&
+      err instanceof Deno.errors.NotFound
+    ) {
+      return;
+    }
+
+    if (err instanceof Error) {
+      throw denoErrorToNodeError(err, { syscall: "stat" });
+    } else {
+      throw err;
+    }
+  }
 }

filename: tests/unit_node/fs_test.ts
patch: @@ -7,6 +7,7 @@ import {
   constants,
   createWriteStream,
   existsSync,
+  lstatSync,
   mkdtempSync,
   promises,
   readFileSync,
@@ -156,3 +157,11 @@ Deno.test("[node/fs createWriteStream", async () => {
     await Deno.remove(tempDir, { recursive: true });
   }
 });
+
+Deno.test(
+  "[node/fs lstatSync] supports throwIfNoEntry option",
+  () => {
+    const result = lstatSync("non-existing-path", { throwIfNoEntry: false });
+    assertEquals(result, undefined);
+  },
+);
Repository: vercel/next.js
Pull request: doc: useLinkStatus doc follow-up

`use client` file should not define server components

Changed files:
filename: docs/01-app/04-api-reference/04-functions/use-link-status.mdx
patch: @@ -12,7 +12,7 @@ import { useLinkStatus } from 'next/navigation'
 
 export default function LoadingIndicator() {
   const { pending } = useLinkStatus()
-  return pending ? <div>Loading...</div> : null
+  return pending ? <span>⌛</span> : null
 }
 ```
 
@@ -23,7 +23,7 @@ import { useLinkStatus } from 'next/navigation'
 
 export default function LoadingIndicator() {
   const { pending } = useLinkStatus()
-  return pending ? <div>Loading...</div> : null
+  return pending ? <span>⌛</span> : null
 }
 ```
 
@@ -89,17 +89,33 @@ In this example, navigating between categories updates the query string (e.g. ?c
 
 You can use the `useLinkStatus` hook to render a lightweight loading indicator next to the active link and provide immediate feedback to the user while the data is being fetched.
 
-```tsx filename="app/page.tsx" switcher
+```tsx filename="app/components/loading-indicator.tsx" switcher
 'use client'
 
-import { useSearchParams, useLinkStatus } from 'next/navigation'
-import Link from 'next/link'
-import { Suspense } from 'react'
+import { useLinkStatus } from 'next/navigation'
+
+export default function LoadingIndicator() {
+  const { pending } = useLinkStatus()
+  return pending ? <span>⌛</span> : null
+}
+```
+
+```jsx filename="app/components/loading-indicator.js" switcher
+'use client'
+
+import { useLinkStatus } from 'next/navigation'
 
-function LoadingIndicator() {
+export default function LoadingIndicator() {
   const { pending } = useLinkStatus()
   return pending ? <span>⌛</span> : null
 }
+```
+
+```tsx filename="app/page.tsx" switcher
+import { useSearchParams } from 'next/navigation'
+import Link from 'next/link'
+import { Suspense } from 'react'
+import LoadingIndicator from './loading-indicator'
 
 function MenuBar() {
   return (
@@ -148,16 +164,10 @@ export default async function ProductCategories({
 ```
 
 ```jsx filename="app/page.js" switcher
-'use client'
-
-import { useSearchParams, useLinkStatus } from 'next/navigation'
+import { useSearchParams } from 'next/navigation'
 import Link from 'next/link'
 import { Suspense } from 'react'
-
-function LoadingIndicator() {
-  const { pending } = useLinkStatus()
-  return pending ? <span>⌛</span> : null
-}
+import LoadingIndicator from './loading-indicator'
 
 function MenuBar() {
   return (
Repository: ggml-org/llama.cpp
Pull request: media : add SVG logo [no ci]

ref https://github.com/ggml-org/llama.cpp/issues/105#issuecomment-2757331432

Changed files:
filename: media/llama1-logo.svg
patch: @@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1500 500">
+  <!-- Generator: Adobe Illustrator 29.3.1, SVG Export Plug-In . SVG Version: 2.1.0 Build 151)  -->
+  <defs>
+    <style>
+      .st0 {
+        fill: #ff8236;
+      }
+
+      .st1 {
+        fill: #fff;
+      }
+
+      .st2 {
+        fill: #1b1f20;
+      }
+    </style>
+  </defs>
+  <rect class="st2" width="1500" height="500" rx="16" ry="16"/>
+  <g>
+    <path class="st1" d="M749.4,353.8l5.4-204.1,20.4-.8,45.1,98.8,42.5-99h19l6.5,205h-38l-2-98-24.9,61.4c-1,1.3-8,1.3-9-1l-25.6-61.4-1.5,99h-38Z"/>
+    <path class="st1" d="M727.5,240.1c-10.8-27.1-53.1-24.5-75.3-14.7l3.1,28.4c9.2-1.9,30-8,37.5-1,.9.9,3.5,5.7,3.5,6.5v16.5c-31.8-17.2-54.5,6.1-54.4,38.5,0,36.5,28.4,57.3,56.4,27.5v12h32v-104.5c0-.5-2.4-8-2.8-9.2ZM696.4,327.8c-8.4,1.7-15.4,2.9-19.2-6.3-5.8-14,.6-37.9,19.2-27.2v33.5Z"/>
+    <path class="st1" d="M899.4,353.8l47.6-205.1h30.3c0,.1,47,205.1,47,205.1h-38l-7.9-33.6h-34.1l-7.9,33.6h-37ZM951.4,285.8h20l-10.5-56-9.5,56Z"/>
+    <polygon class="st1" points="490.4 148.8 490.4 317.3 491.9 318.8 534.4 318.8 534.4 353.8 451.4 353.8 451.4 150.3 452.9 148.8 490.4 148.8"/>
+    <polygon class="st1" points="589.4 148.8 589.4 318.8 633.4 318.8 633.4 353.8 550.4 353.8 550.4 148.8 589.4 148.8"/>
+    <g>
+      <path class="st0" d="M1163.3,226.8l-13.5,24c-17.8-13.7-44.2-15.7-62-1-28.7,23.7-26.7,78.5,18,78.8,12.5,0,23.1-5.9,34.5-9.8l6,23.9c-10.1,4.7-20.4,9.5-31.5,11-101.2,13.8-95.4-132.3-3.9-139.9,19.2-1.6,36.1,3.4,52.5,13Z"/>
+      <path class="st0" d="M1093.4,203.8c-15.4,4.6-29.7,13.1-40.5,25-2-24.2,3.4-73.1,30.3-82.7,4-1.4,17.7-4.9,17.3,2.2s-9.9,19.3-12.2,25.9c-4,11.6-.3,19.6,5.2,29.7Z"/>
+      <polygon class="st0" points="1131.4 258.8 1131.4 276.8 1147.4 276.8 1147.4 290.8 1131.4 290.8 1131.4 307.8 1116.4 307.8 1116.4 290.8 1099.4 290.8 1099.4 276.8 1114.9 276.8 1116.4 275.3 1116.4 258.8 1131.4 258.8"/>
+      <polygon class="st0" points="1186.4 258.8 1186.4 275.3 1187.9 276.8 1203.4 276.8 1203.4 290.8 1186.4 290.8 1186.4 307.8 1171.4 307.8 1171.4 290.8 1155.4 290.8 1155.4 276.8 1171.4 276.8 1171.4 258.8 1186.4 258.8"/>
+      <path class="st0" d="M1142.3,156.9c2,3-9.3,15.9-11.1,19.2-5.2,9.8-1.7,15.4,2.2,24.7-11.3-1.7-21.8-.3-33,1,2.5-21.5,14.6-52.8,41.9-44.9Z"/>
+    </g>
+  </g>
+</svg>
\ No newline at end of file
Repository: nodejs/node
Pull request: doc: add preveen-stack to triagers

I have been contributing nodejs ecosystem over the last few years 

- contributions to help issues:

  - through preveen-stack handle:
    - https://github.com/nodejs/help/issues?q=is%3Aissue+commenter%3Apreveen-stack

  - through wide4head handle:
    - https://github.com/nodejs/help/issues?q=is%3Aissue+commenter%3Awide4head

  - contributions to nodejs/help:
    - https://github.com/nodejs/help/pulls?q=is%3Apr+author%3Apreveen-stack

- contributions to core:
  - https://github.com/nodejs/node/issues?q=is%3Aissue+commenter%3Apreveen-stack
  - https://github.com/nodejs/node/pulls?q=is%3Apr+author%3Awide4head

I would like to get more involved and am looking forward to becoming a contributor

I have read through nodejs [code of conduct](https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md) and promise to adhere to the same 🙏🏽

<!--
Before submitting a pull request, please read
https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md.

Commit message formatting guidelines:
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.

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: @@ -713,6 +713,8 @@ maintaining the Node.js project.
   **Xuguang Mei** <<meixuguang@gmail.com>> (he/him)
 * [Mesteery](https://github.com/Mesteery) -
   **Mestery** <<mestery@protonmail.com>> (he/him)
+* [preveen-stack](https://github.com/preveen-stack) -
+  **Preveen Padmanabhan** <<wide4head@gmail.com>> (he/him)
 * [PoojaDurgad](https://github.com/PoojaDurgad) -
   **Pooja Durgad** <<Pooja.D.P@ibm.com>>
 * [RaisinTen](https://github.com/RaisinTen) -
Repository: huggingface/transformers
Pull request: Fix removing "cpu" from frozenset in bitsandbytes.py to allow better ROCm support.

Related to https://github.com/bitsandbytes-foundation/bitsandbytes/issues/1573 and https://github.com/huggingface/transformers/issues/36949 , this resolves a bug in the biteandbytes integration, allowing ROCm/HIP support in bitsandbytes.

# What does this PR do?

Aims to fix a bug in the bitsandbytes integration on line 499 which used `frozenset.discard()`, which is not a existent function from frozenset.  This should better allow ROCm/HIP support.

Fixes #36949

## Who can review?

@SunMarc @MekkCyber

Changed files:
filename: src/transformers/integrations/bitsandbytes.py
patch: @@ -496,7 +496,9 @@ def _validate_bnb_multi_backend_availability(raise_exception):
                 "You have Intel IPEX installed but if you're intending to use it for CPU, it might not have the right version. Be sure to double check that your PyTorch and IPEX installs are compatible."
             )
 
-        available_devices.discard("cpu")  # Only Intel CPU is supported by BNB at the moment
+        available_devices = frozenset(
+            [device for device in available_devices if device != "cpu"]
+        )  # Only Intel CPU is supported by BNB at the moment
 
     if not available_devices.intersection(bnb_supported_devices):
         if raise_exception: