helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Update inaccurate mapChildren comment

The function you provide will only be passed a child and an index. It will not be passed a key. This is confirmed in the source, the Flow types, and the jsdoc comments.

## Summary

I was actually looking for a child map api that would expose keys and noticed this comment. It gave me the wrong impression and took a few minutes to re-affirm my understanding of React.Children and how it works. Removing this inaccuracy to hopefully prevent a similar misunderstanding in the future.

## Test Plan

I ran absolutely no tests. This is a non-jsdoc comment-only change.


Changed files:
filename: packages/react/src/ReactChildren.js
patch: @@ -212,7 +212,7 @@ type MapFunc = (child: ?React$Node) => ?ReactNodeList;
  *
  * See https://reactjs.org/docs/react-api.html#reactchildrenmap
  *
- * The provided mapFunction(child, key, index) will be called for each
+ * The provided mapFunction(child, index) will be called for each
  * leaf child.
  *
  * @param {?*} children Children tree container.
Repository: vercel/next.js
Pull request: Turbopack: add test for reexport cycles

### What?

Add a test case to make sure the compilation doesn't hang on reexport cycles

Closes PACK-4713

Changed files:
filename: turbopack/crates/turbopack-tests/tests/execution/turbopack/cycle/reexport-cycle/input/a.js
patch: @@ -0,0 +1 @@
+export { a } from './b.js'

filename: turbopack/crates/turbopack-tests/tests/execution/turbopack/cycle/reexport-cycle/input/b.js
patch: @@ -0,0 +1 @@
+export { a } from './a.js'

filename: turbopack/crates/turbopack-tests/tests/execution/turbopack/cycle/reexport-cycle/input/index.js
patch: @@ -0,0 +1,13 @@
+// TODO this test has not the expected behavior yet. But it's still here to check if the compilation doesn't crash or hang.
+
+it('should error on reexport cycles', async () => {
+  await import('./a')
+  // TODO this is not working yet. We need to throw an SyntaxError in that case.
+  // await expect(import('./a')).rejects.toThrowError('')
+})
+
+it('should error on self reexport cycle', async () => {
+  await import('./self')
+  // TODO this is not working yet. We need to throw an SyntaxError in that case.
+  // await expect(import('./self')).rejects.toThrowError('')
+})

filename: turbopack/crates/turbopack-tests/tests/execution/turbopack/cycle/reexport-cycle/input/self.js
patch: @@ -0,0 +1 @@
+export { a } from './self.js'
Repository: nodejs/node
Pull request: src: fix accessing empty string

Fix an assertion caused by accessing empty string:

```
(lldb) run -e "process.loadEnvFile('./test/fixtures/dotenv/eof-without-value.env')"
../../third_party/gn/third_party/libc++/src/include/string_view:411: assertion !empty() failed: string_view::front(): string is empty
(lldb) bt
* thread #1, name = 'MainThread', queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007ff81b4dfc52 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007ff81b519f85 libsystem_pthread.dylib`pthread_kill + 262
    frame #2: 0x00007ff81b43ab19 libsystem_c.dylib`abort + 126
    frame #3: 0x0000000101b96cb2 node`std::__Cr::__libcpp_verbose_abort(format=<unavailable>) at verbose_abort.cpp:74:3 [opt]
    frame #4: 0x00000001000fe088 node`node::Dotenv::ParseContent(std::__Cr::basic_string_view<char, std::__Cr::char_traits<char>>) [inlined] std::__Cr::basic_string_view<char, std::__Cr::char_traits<char>>::front(this=<unavailable>) const at string_view:411:12 [opt]
    frame #5: 0x00000001000fe073 node`node::Dotenv::ParseContent(this=0x00007ff7bfefd670, input=<unavailable>) at node_dotenv.cc:159:17 [opt]
    frame #6: 0x00000001000fe4dd node`node::Dotenv::ParsePath(this=0x00007ff7bfefd670, path=<unavailable>) at node_dotenv.cc:296:3 [opt]
    frame #7: 0x000000010018f3e7 node`node::LoadEnvFile(args=0x00007ff7bfefdac8) at node_process_methods.cc:488:18 [opt]
```

Changed files:
filename: src/node_dotenv.cc
patch: @@ -156,7 +156,7 @@ void Dotenv::ParseContent(const std::string_view input) {
     key = trim_spaces(key);
 
     // If the value is not present (e.g. KEY=) set is to an empty string
-    if (content.front() == '\n') {
+    if (content.empty() || content.front() == '\n') {
       store_.insert_or_assign(std::string(key), "");
       continue;
     }
Repository: facebook/react
Pull request: Revert "Hard code enableComponentStacks in www"

Reverts facebook/react#18869. This was causing internal tests to fail in our latest www sync.

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -20,6 +20,7 @@ export const {
   enableTrustedTypesIntegration,
   disableSchedulerTimeoutBasedOnReactExpirationTime,
   warnAboutSpreadingKeyToJSX,
+  enableComponentStackLocations,
   replayFailedUnitOfWorkWithInvokeGuardedCallback,
   enableModernEventSystem,
   enableFilterEmptyStringAttributesDOM,
@@ -68,8 +69,6 @@ export const disableTextareaChildren = __EXPERIMENTAL__;
 
 export const warnUnstableRenderSubtreeIntoContainer = false;
 
-export const enableComponentStackLocations = true;
-
 // Enable forked reconciler. Piggy-backing on the "variant" global so that we
 // don't have to add another test dimension. The build system will compile this
 // to the correct value.
Repository: denoland/deno
Pull request: Revert "fix(ext/node): use primordials in `ext/node/polyfills/https.ts` (#26323)"

…s` (#26323)"

This reverts commit afb33b3c2597c9ec943f71218b236486fbc86e23.

Reverting because it caused a regression - https://github.com/denoland/deno/issues/26612.

Closes https://github.com/denoland/deno/issues/26612.

Changed files:
filename: ext/node/polyfills/https.ts
patch: @@ -1,6 +1,9 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
 // Copyright Joyent and Node contributors. All rights reserved. MIT license.
 
+// TODO(petamoriken): enable prefer-primordials for node polyfills
+// deno-lint-ignore-file prefer-primordials
+
 import { notImplemented } from "ext:deno_node/_utils.ts";
 import { urlToHttpOptions } from "ext:deno_node/internal/url.ts";
 import {
@@ -14,14 +17,6 @@ import { type ServerHandler, ServerImpl as HttpServer } from "node:http";
 import { validateObject } from "ext:deno_node/internal/validators.mjs";
 import { kEmptyObject } from "ext:deno_node/internal/util.mjs";
 import { Buffer } from "node:buffer";
-import { primordials } from "ext:core/mod.js";
-const {
-  ArrayPrototypeShift,
-  ArrayPrototypeUnshift,
-  ArrayIsArray,
-  ObjectPrototypeIsPrototypeOf,
-  ObjectAssign,
-} = primordials;
 
 export class Server extends HttpServer {
   constructor(opts, requestListener?: ServerHandler) {
@@ -34,11 +29,11 @@ export class Server extends HttpServer {
       validateObject(opts, "options");
     }
 
-    if (opts.cert && ArrayIsArray(opts.cert)) {
+    if (opts.cert && Array.isArray(opts.cert)) {
       notImplemented("https.Server.opts.cert array type");
     }
 
-    if (opts.key && ArrayIsArray(opts.key)) {
+    if (opts.key && Array.isArray(opts.key)) {
       notImplemented("https.Server.opts.key array type");
     }
 
@@ -47,12 +42,10 @@ export class Server extends HttpServer {
 
   _additionalServeOptions() {
     return {
-      cert: ObjectPrototypeIsPrototypeOf(Buffer, this._opts.cert)
-        // deno-lint-ignore prefer-primordials
+      cert: this._opts.cert instanceof Buffer
         ? this._opts.cert.toString()
         : this._opts.cert,
-      key: ObjectPrototypeIsPrototypeOf(Buffer, this._opts.key)
-        // deno-lint-ignore prefer-primordials
+      key: this._opts.key instanceof Buffer
         ? this._opts.key.toString()
         : this._opts.key,
     };
@@ -166,18 +159,18 @@ export function request(...args: any[]) {
   let options = {};
 
   if (typeof args[0] === "string") {
-    const urlStr = ArrayPrototypeShift(args);
+    const urlStr = args.shift();
     options = urlToHttpOptions(new URL(urlStr));
-  } else if (ObjectPrototypeIsPrototypeOf(URL, args[0])) {
-    options = urlToHttpOptions(ArrayPrototypeShift(args));
+  } else if (args[0] instanceof URL) {
+    options = urlToHttpOptions(args.shift());
   }
 
   if (args[0] && typeof args[0] !== "function") {
-    ObjectAssign(options, ArrayPrototypeShift(args));
+    Object.assign(options, args.shift());
   }
 
   options._defaultAgent = globalAgent;
-  ArrayPrototypeUnshift(args, options);
+  args.unshift(options);
 
   return new HttpsClientRequest(args[0], args[1]);
 }
Repository: ggml-org/llama.cpp
Pull request: [CANN]:Replace aclrtMemsetSync with InplaceZero operator for zero tensor creation

In performance tests on the Atlas 300V NPU, we observed that the aclrtMemsetSync operation introduced significant latency when creating zero tensors.

To address this, we replaced aclrtMemsetSync with the InplaceZero operator. This change allows zero tensors to be created more efficiently and consistently within the computation graph, avoiding costly synchronization and improving execution performance.

This also helps ensure better integration with graph-level optimizations and memory management.

*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: ggml/src/ggml-cann/aclnn_ops.cpp
patch: @@ -67,6 +67,7 @@
 #include <aclnnop/aclnn_pow.h>
 #include <aclnnop/aclnn_grouped_matmul_v3.h>
 #include <aclnnop/aclnn_fused_infer_attention_score_v2.h>
+#include <aclnnop/aclnn_zero.h>
 #include <float.h>
 
 #include <cmath>
@@ -804,10 +805,11 @@ static aclTensor* aclnn_zero(ggml_backend_cann_context& ctx, void* buffer,
         nb[i] = nb[i - 1] * ne[i - 1];
     }
 
-    ggml_cann_async_memset(ctx, buffer, n_bytes, 0);
     aclTensor* zero =
         ggml_cann_create_tensor(buffer, type, type_size, ne, nb, dims);
+    GGML_CANN_CALL_ACLNN_OP(ctx, InplaceZero, zero);
     return zero;
+    GGML_UNUSED(n_bytes);
 }
 
 /**
Repository: facebook/react
Pull request: Add changelog for eslint-plugin-react-hooks

Fixes https://github.com/facebook/react/issues/18494 https://github.com/reactjs/reactjs.org/issues/2352 https://github.com/reactjs/reactjs.org/issues/2878 

I'll cut 4.0 now.

Changed files:
filename: packages/eslint-plugin-react-hooks/CHANGELOG.md
patch: @@ -0,0 +1,33 @@
+## 4.0.0
+
+* **New Violations:** Consider `PascalCase.useFoo()` calls as Hooks. ([@cyan33](https://github.com/cyan33) in [#18722](https://github.com/facebook/react/pull/18722))
+* **New Violations:** Check callback body when it's not written inline. ([@gaearon](https://github.com/gaearon) in [#18435](https://github.com/facebook/react/pull/18435))
+* Add a way to enable the dangerous autofix. ([@gaearon](https://github.com/gaearon) in [#18437](https://github.com/facebook/react/pull/18437))
+* Offer a more sensible suggestion when encountering an assignment. ([@Zzzen](https://github.com/Zzzen) in [#16784](https://github.com/facebook/react/pull/16784))
+* Consider TypeScript casts of `useRef` as constant. ([@sophiebits](https://github.com/sophiebits) in [#18496](https://github.com/facebook/react/pull/18496))
+* Add documentation. ([@ghmcadams](https://github.com/ghmcadams) in [#16607](https://github.com/facebook/react/pull/16607))
+
+## 3.0.0
+
+* **New Violations:** Forbid calling Hooks from classes. ([@ianobermiller](https://github.com/ianobermiller) in [#18341](https://github.com/facebook/react/pull/18341))
+* Add a recommended config. ([@SimenB](https://github.com/SimenB) in [#14762](https://github.com/facebook/react/pull/14762))
+
+## 2.5.0
+
+* Fix a misleading error message in loops. ([@M-Izadmehr](https://github.com/M-Izadmehr) in [#16853](https://github.com/facebook/react/pull/16853))
+
+## 2.4.0
+
+* **New Violations:** Run checks for functions passed to `forwardRef`. ([@dprgarner](https://github.com/dprgarner) in [#17255](https://github.com/facebook/react/pull/17255))
+* **New Violations:** Check for ref usage in any Hook containing the word `Effect`. ([@gaearon](https://github.com/gaearon) in [#17663](https://github.com/facebook/react/pull/17663))
+* Disable dangerous autofix and use ESLint Suggestions API instead. ([@wdoug](https://github.com/wdoug) in [#17385](https://github.com/facebook/react/pull/17385))
+
+## 2.0.0
+
+* **New Violations:** Forbid calling Hooks at the top level. ([@gaearon](https://github.com/gaearon) in [#16455](https://github.com/facebook/react/pull/16455))
+* Fix a crash when referencing arguments in arrow functions. ([@hristo-kanchev](https://github.com/hristo-kanchev) in [#16356](https://github.com/facebook/react/pull/16356))
+
+
+## 1.x
+
+The 1.x releases aren’t noted in this changelog, but you can find them in the [commit history](https://github.com/facebook/react/commits/master/packages/eslint-plugin-react-hooks).
Repository: huggingface/transformers
Pull request: Fix heuristic scheduling for UAG

# What does this PR do?
Fix #34803

The number of matching tokens according to the draft vocabulary is missing in [candidate_generator.py](https://github.com/huggingface/transformers/blob/main/src/transformers/generation/candidate_generator.py). To fix the [issue](https://github.com/huggingface/transformers/issues/34803), we propose to modify [update_candidate_strategy](https://github.com/huggingface/transformers/blob/main/src/transformers/generation/candidate_generator.py#L254) by comparing `num_matches` (the number of matched tokens according to the **target** vocabulary) with `len(scores[0]) - 1` that represents the number of tokens generated by the **draft** model according to the **target** vocabulary.

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?
 @gante @ArthurZucker @zucchini-nlp 

Changed files:
filename: src/transformers/generation/candidate_generator.py
patch: @@ -255,7 +255,8 @@ def update_candidate_strategy(self, input_ids: torch.LongTensor, scores: torch.F
             "heuristic",
             "heuristic_transient",
         }:
-            if num_matches == int(self.num_assistant_tokens):
+            # len(scores[0])-1 is the number of candidates according to the target tokenizer.
+            if num_matches == len(scores[0]) - 1:
                 self.num_assistant_tokens += 2.0
             else:
                 self.num_assistant_tokens = max(1.0, self.num_assistant_tokens - 1.0)
Repository: denoland/deno
Pull request: fix(install): percent encodings in interactive progress bar

Fixes percent encodings showing up when installing scoped packages via `deno add` or `deno install`. The issue is caused by us trying to map back the package name from the resolved http url. This doesn't and has never worked with private registries. The proper solution would be to pass the original specifier into here, but that's a bit of a bigger refactor.

So for now the quickest workaround is to replace `%2f` back to `/`.

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

Changed files:
filename: cli/util/progress_bar/renderer.rs
patch: @@ -193,10 +193,16 @@ impl ProgressBarRenderer for TextOnlyProgressBarRenderer {
         }
       };
 
+      // TODO(@marvinhagemeister): We're trying to reconstruct the original
+      // specifier from the resolved one, but we lack the information about
+      // private registries URLs and other things here.
       let message = display_entry
         .message
         .replace("https://registry.npmjs.org/", "npm:")
-        .replace("https://jsr.io/", "jsr:");
+        .replace("https://jsr.io/", "jsr:")
+        .replace("%2f", "/")
+        .replace("%2F", "/");
+
       display_str.push_str(
         &colors::gray(format!(" - {}{}\n", message, bytes_text)).to_string(),
       );
Repository: vercel/next.js
Pull request: [release-new] fix: slack notification only if is a publish workflow

The Slack notification workflow didn't have if condition, so it was notified on every `build_and_deploy` job.

x-ref: [slack thread](https://vercel.slack.com/archives/C0668R2391V/p1748475689878939)

Changed files:
filename: .github/workflows/build_and_deploy.yml
patch: @@ -606,6 +606,7 @@ jobs:
       # New release process
       - name: Publish to NPM
         id: changesets
+        # TODO: Change to IS_RELEASE condition when new release becomes stable.
         if: ${{ env.__NEW_RELEASE == 'true' }}
         uses: changesets/action@v1
         with:
@@ -615,6 +616,8 @@ jobs:
           NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
 
       - name: Send a Slack notification of the publish status
+        # TODO: Change to IS_RELEASE condition when new release becomes stable.
+        if: ${{ env.__NEW_RELEASE == 'true' && (steps.changesets.outputs.published == 'true' || steps.changesets.outputs.published == 'false') }}
         run: pnpm tsx scripts/release/slack.ts
         env:
           SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
Repository: electron/electron
Pull request: fix: crash on netlog connection error

Backport of #44406

See that PR for details.


Notes: Fix crash when network process terminates while a net log is running.


Changed files:
filename: shell/browser/api/electron_api_net_log.cc
patch: @@ -166,6 +166,7 @@ void NetLog::StartNetLogAfterCreateFile(net::NetLogCaptureMode capture_mode,
     std::move(*pending_start_promise_)
         .RejectWithErrorMessage(
             base::File::ErrorToString(output_file.error_details()));
+    pending_start_promise_.reset();
     net_log_exporter_.reset();
     return;
   }
@@ -178,13 +179,15 @@ void NetLog::StartNetLogAfterCreateFile(net::NetLogCaptureMode capture_mode,
 void NetLog::NetLogStarted(int32_t error) {
   DCHECK(pending_start_promise_);
   ResolvePromiseWithNetError(std::move(*pending_start_promise_), error);
+  pending_start_promise_.reset();
 }
 
 void NetLog::OnConnectionError() {
   net_log_exporter_.reset();
   if (pending_start_promise_) {
     std::move(*pending_start_promise_)
         .RejectWithErrorMessage("Failed to start net log exporter");
+    pending_start_promise_.reset();
   }
 }
Repository: facebook/react
Pull request: Revert "Clear more Fiber fields in detachFiber"

Reverts facebook/react#18556

This breaks some `beforeblur` + Scopes stuff.

Changed files:
filename: packages/react-reconciler/src/ReactFiberCommitWork.new.js
patch: @@ -1118,7 +1118,6 @@ function detachFiber(fiber: Fiber) {
   // itself will be GC:ed when the parent updates the next time.
   fiber.return = null;
   fiber.child = null;
-  fiber.sibling = null;
   fiber.memoizedState = null;
   fiber.updateQueue = null;
   fiber.dependencies = null;
@@ -1128,9 +1127,6 @@ function detachFiber(fiber: Fiber) {
   fiber.pendingProps = null;
   fiber.memoizedProps = null;
   fiber.stateNode = null;
-  if (__DEV__) {
-    fiber._debugOwner = null;
-  }
 }
 
 function emptyPortalContainer(current: Fiber) {

filename: packages/react-reconciler/src/ReactFiberCommitWork.old.js
patch: @@ -1118,7 +1118,6 @@ function detachFiber(fiber: Fiber) {
   // itself will be GC:ed when the parent updates the next time.
   fiber.return = null;
   fiber.child = null;
-  fiber.sibling = null;
   fiber.memoizedState = null;
   fiber.updateQueue = null;
   fiber.dependencies = null;
@@ -1128,9 +1127,6 @@ function detachFiber(fiber: Fiber) {
   fiber.pendingProps = null;
   fiber.memoizedProps = null;
   fiber.stateNode = null;
-  if (__DEV__) {
-    fiber._debugOwner = null;
-  }
 }
 
 function emptyPortalContainer(current: Fiber) {
Repository: nodejs/node
Pull request: test: fix test-without-async-context-frame.mjs in debug mode

The test is spawning the python test runner directly without considering whether the current build is a debug build or not i.e. does not propage the mode parameter when the test is run with --mode=debug, so it always ends up using the release build to run the test even if the test is being run for debug builds. This patch fixes that.

<!--
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-without-async-context-frame.mjs
patch: @@ -49,6 +49,7 @@ describe('without AsyncContextFrame', {
     it(test, async () => {
       const proc = spawn(python, [
         testRunner,
+        `--mode=${process.features.debug ? 'debug' : 'release'}`,
         '--node-args=--no-async-context-frame',
         test,
       ], {