helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: fix(test/integration): Check the right thing when resetting the server-side-dev-errors tests

This was asserting that the error still exists after resetting the file back to its original state.

Instead, it should refresh the browser and check that the error was fixed.

Something was causing this to quickly reload in the rspack case, so the test was flaking there.

```
pnpm test-dev integration/server-side-dev-errors/test/index.test.js -t 'api route correctly'
pnpm test-dev-turbopack integration/server-side-dev-errors/test/index.test.js -t 'api route correctly'
pnpm test-dev-rspack integration/server-side-dev-errors/test/index.test.js -t 'api route correctly'
```

Try running the tests a few times, see that they don't flake.

Closes PACK-4900

Changed files:
filename: test/integration/server-side-dev-errors/test/index.test.js
patch: @@ -4,11 +4,11 @@ import fs from 'fs/promises'
 import { join } from 'path'
 import webdriver from 'next-webdriver'
 import {
-  killApp,
+  assertNoRedbox,
   findPort,
+  killApp,
   launchApp,
   retry,
-  assertNoRedbox,
 } from 'next-test-utils'
 import stripAnsi from 'strip-ansi'
 
@@ -260,21 +260,13 @@ describe('server-side dev errors', () => {
         }
       `)
 
-      await fs.writeFile(apiPage, content)
+      await fs.writeFile(apiPage, content, { flush: true })
 
-      await expect(browser).toDisplayRedbox(`
-        {
-          "description": "missingVar is not defined",
-          "environmentLabel": null,
-          "label": "Runtime ReferenceError",
-          "source": "pages/api/hello.js (2:3) @ handler
-        > 2 |   missingVar;res.status(200).json({ hello: 'world' })
-            |   ^",
-          "stack": [
-            "handler pages/api/hello.js (2:3)",
-          ],
-        }
-      `)
+      await retry(async () => {
+        // manually refresh as this is an API route
+        await browser.refresh()
+        await assertNoRedbox(browser)
+      })
     } finally {
       await fs.writeFile(apiPage, content)
     }
@@ -334,21 +326,13 @@ describe('server-side dev errors', () => {
         }
       `)
 
-      await fs.writeFile(dynamicApiPage, content)
+      await fs.writeFile(dynamicApiPage, content, { flush: true })
 
-      await expect(browser).toDisplayRedbox(`
-        {
-          "description": "missingVar is not defined",
-          "environmentLabel": null,
-          "label": "Runtime ReferenceError",
-          "source": "pages/api/blog/[slug].js (2:3) @ handler
-        > 2 |   missingVar;res.status(200).json({ slug: req.query.slug })
-            |   ^",
-          "stack": [
-            "handler pages/api/blog/[slug].js (2:3)",
-          ],
-        }
-      `)
+      await retry(async () => {
+        // manually refresh as this is an API route
+        await browser.refresh()
+        await assertNoRedbox(browser)
+      })
     } finally {
       await fs.writeFile(dynamicApiPage, content)
     }
Repository: denoland/deno
Pull request: fix(unstable): Missing `PrivateIdentifier` type for `PropertyDefinition` key

The `PropertyDefinition` node also allows `PrivateIdentifier` as a type for the `key`. Example:

```ts
class Foo {
  #foo = 2;
}
```

Fixes one issue reported in https://github.com/denoland/deno/issues/28355

Changed files:
filename: cli/tsc/dts/lib.deno.unstable.d.ts
patch: @@ -1946,7 +1946,12 @@ declare namespace Deno {
       static: boolean;
       accessibility: Accessibility | undefined;
       decorators: Decorator[];
-      key: Expression | Identifier | NumberLiteral | StringLiteral;
+      key:
+        | Expression
+        | Identifier
+        | NumberLiteral
+        | StringLiteral
+        | PrivateIdentifier;
       value: Expression | null;
       typeAnnotation: TSTypeAnnotation | undefined;
     }
Repository: facebook/react
Pull request: fix[devtools/inspect]: null check memoized props before trying to call hasOwnProperty

Simple check to avoid `TypeError`, quite rare case, but still.

Changed files:
filename: packages/react-devtools-shared/src/backend/renderer.js
patch: @@ -3280,7 +3280,7 @@ export function attach(
     };
 
     if (enableStyleXFeatures) {
-      if (memoizedProps.hasOwnProperty('xstyle')) {
+      if (memoizedProps != null && memoizedProps.hasOwnProperty('xstyle')) {
         plugins.stylex = getStyleXData(memoizedProps.xstyle);
       }
     }
Repository: huggingface/transformers
Pull request: TST PEFT integration tests with pipeline generate

# What does this PR do?

Some PEFT integration tests involving text generation pipelines were failing since #38129 because the base model is too small to generate longer sequences. Setting max_new_tokens fixes this.

## 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?
- [x] 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.  <= internally on slack
- [ ] 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).
- [x] Did you write any new necessary tests? <= already there


## Who can review?

Changed files:
filename: tests/peft_integration/test_peft_integration.py
patch: @@ -531,7 +531,7 @@ def test_peft_pipeline(self):
             peft_params = list(peft_pipe.model.parameters())
             base_params = list(base_pipe.model.parameters())
             self.assertNotEqual(len(peft_params), len(base_params))  # Assert we actually loaded the adapter too
-            _ = peft_pipe("Hello")
+            _ = peft_pipe("Hello", max_new_tokens=20)
 
     def test_peft_add_adapter_with_state_dict(self):
         """
@@ -858,4 +858,4 @@ def test_peft_pipeline_no_warning(self):
             )
 
             # Generate text to verify pipeline works
-            _ = lora_generator(text)
+            _ = lora_generator(text, max_new_tokens=20)
Repository: vercel/next.js
Pull request: Fix PPR no fallback case

When we are resuming with postponed state we don't handle SSG behavior so this ensures we only trigger the `NoFallback` case if we have created a cache key. 

Changed files:
filename: packages/next/src/build/templates/app-page.ts
patch: @@ -186,12 +186,6 @@ export async function handler(
       prerenderManifest.routes[normalizedSrcPage]
   )
 
-  // if the page is dynamicParams: false and this pathname wasn't prerender
-  // trigger the no fallback handling
-  if (isSSG && prerenderInfo?.fallback === false && !isPrerendered) {
-    throw new NoFallbackError()
-  }
-
   const userAgent = req.headers['user-agent'] || ''
   const botType = getBotType(userAgent)
   const isHtmlBot = isHtmlBotRequest(req)
@@ -317,6 +311,11 @@ export async function handler(
     ssgCacheKey = resolvedPathname
   }
 
+  let staticPathKey = ssgCacheKey
+  if (!staticPathKey && routeModule.isDev) {
+    staticPathKey = resolvedPathname
+  }
+
   const ComponentMod = {
     ...entryBase,
     tree,
@@ -650,12 +649,24 @@ export async function handler(
       if (
         !minimalMode &&
         fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER &&
-        ssgCacheKey &&
+        staticPathKey &&
         !didRespond &&
         !isDraftMode &&
         pageIsDynamic &&
         (isProduction || !isPrerendered)
       ) {
+        // if the page has dynamicParams: false and this pathname wasn't
+        // prerendered trigger the no fallback handling
+        if (
+          // In development, fall through to render to handle missing
+          // getStaticPaths.
+          (isProduction || prerenderInfo) &&
+          // When fallback isn't present, abort this render so we 404
+          fallbackMode === FallbackMode.NOT_FOUND
+        ) {
+          throw new NoFallbackError()
+        }
+
         let fallbackResponse: ResponseCacheEntry | null | undefined
 
         if (isRoutePPREnabled && !isRSCRequest) {
Repository: vercel/next.js
Pull request: Add comment explaining staticPathKey vs ssgCacheKey

Follow-up form https://github.com/vercel/next.js/pull/80908 adding comment from review explaining difference. 

Changed files:
filename: packages/next/src/build/templates/app-page.ts
patch: @@ -311,6 +311,10 @@ export async function handler(
     ssgCacheKey = resolvedPathname
   }
 
+  // the staticPathKey differs from ssgCacheKey since
+  // ssgCacheKey is null in dev since we're always in "dynamic"
+  // mode in dev to bypass the cache, but we still need to honor
+  // dynamicParams = false in dev mode
   let staticPathKey = ssgCacheKey
   if (!staticPathKey && routeModule.isDev) {
     staticPathKey = resolvedPathname
Repository: nodejs/node
Pull request: util: preserve `length` of deprecated functions

More radical (and probably breaking some existing tests) solution would be wrapping original function in `Proxy` instead of separate `deprecated()` function.

Changed files:
filename: lib/internal/util.js
patch: @@ -142,6 +142,12 @@ function pendingDeprecate(fn, msg, code) {
     emitDeprecationWarning();
     return ReflectApply(fn, this, args);
   }
+
+  ObjectDefineProperty(deprecated, 'length', {
+    __proto__: null,
+    ...ObjectGetOwnPropertyDescriptor(fn, 'length'),
+  });
+
   return deprecated;
 }
 
@@ -180,6 +186,11 @@ function deprecate(fn, msg, code, useEmitSync) {
     deprecated.prototype = fn.prototype;
   }
 
+  ObjectDefineProperty(deprecated, 'length', {
+    __proto__: null,
+    ...ObjectGetOwnPropertyDescriptor(fn, 'length'),
+  });
+
   return deprecated;
 }
 

filename: test/parallel/test-util-deprecate.js
patch: @@ -1,3 +1,4 @@
+// Flags: --expose-internals
 'use strict';
 
 require('../common');
@@ -6,9 +7,27 @@ require('../common');
 
 const assert = require('assert');
 const util = require('util');
+const internalUtil = require('internal/util');
 
 const expectedWarnings = new Map();
 
+// Deprecated function length is preserved
+for (const fn of [
+  function() {},
+  function(a) {},
+  function(a, b, c) {},
+  function(...args) {},
+  function(a, b, c, ...args) {},
+  () => {},
+  (a) => {},
+  (a, b, c) => {},
+  (...args) => {},
+  (a, b, c, ...args) => {},
+]) {
+  assert.strictEqual(util.deprecate(fn).length, fn.length);
+  assert.strictEqual(internalUtil.pendingDeprecate(fn).length, fn.length);
+}
+
 // Emits deprecation only once if same function is called.
 {
   const msg = 'fhqwhgads';
Repository: denoland/deno
Pull request: fix(unstable): lint plugin regex attribute selector not working

The code to support regex matching on attribute values was already there. I just forgot to wire it up properly in the selector matching code.

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

Changed files:
filename: cli/js/40_lint_selector.js
patch: @@ -1008,9 +1008,13 @@ function matchAttrBin(attr, next) {
 function matchAttrValue(attr, value) {
   switch (attr.op) {
     case BinOp.Equal:
-      return value === attr.value;
+      return attr.value instanceof RegExp
+        ? attr.value.test(value)
+        : value === attr.value;
     case BinOp.NotEqual:
-      return value !== attr.value;
+      return attr.value instanceof RegExp
+        ? !attr.value.test(value)
+        : value !== attr.value;
     case BinOp.Greater:
       return typeof value === "number" && typeof attr.value === "number" &&
         value > attr.value;

filename: tests/unit/lint_plugin_test.ts
patch: @@ -271,6 +271,22 @@ Deno.test("Plugin - visitor attr length special case", () => {
   assertEquals(result[1].node.arguments.length, 2);
 });
 
+Deno.test("Plugin - visitor attr regex", () => {
+  let result = testVisit(
+    "class Foo { get foo() { return 1 } bar() {} }",
+    "MethodDefinition[kind=/(g|s)et/]",
+  );
+  assertEquals(result[0].node.type, "MethodDefinition");
+  assertEquals(result[0].node.kind, "get");
+
+  result = testVisit(
+    "class Foo { get foo() { return 1 } bar() {} }",
+    "MethodDefinition[kind!=/(g|s)et/]",
+  );
+  assertEquals(result[0].node.type, "MethodDefinition");
+  assertEquals(result[0].node.kind, "method");
+});
+
 Deno.test("Plugin - visitor :first-child", () => {
   const result = testVisit(
     "{ foo; bar }",
Repository: electron/electron
Pull request: build: fix clang-format duplicate message

Backport of #45235

See that PR for details.


Notes: none

Changed files:
filename: script/run-clang-format.py
patch: @@ -369,9 +369,6 @@ def main():
           patch_file.close()
           os.unlink(patch_file.name)
         else:
-          print(
-            'To patch these files, run:',
-            f"$ git apply {patch_file.name}", sep='\n')
           filename=patch_file.name
           print(f"\nTo patch these files, run:\n$ git apply {filename}\n")
Repository: ggml-org/llama.cpp
Pull request: perplexity: give more information about constraints on failure

This checks whether -np is insufficient vs context, and provides clues as to how much is needed for each.

The current error message is incorrectly blaming insufficient context e.g. for TruthfulQA which requires -np=16 or so due to `num_answers` being near that value.

Changed files:
filename: tools/perplexity/perplexity.cpp
patch: @@ -920,7 +920,7 @@ static void hellaswag_score(llama_context * ctx, const common_params & params) {
         }
 
         if (i0 == i1) {
-            LOG_ERR("%s : task %zu does not fit in the context window\n", __func__, i0);
+            LOG_ERR("%s : task %zu does not fit in the context window (requires %lu tokens)\n", __func__, i0, hs_data[i0].required_tokens);
             return;
         }
 
@@ -1213,7 +1213,7 @@ static void winogrande_score(llama_context * ctx, const common_params & params)
         }
 
         if (i0 == i1) {
-            LOG_ERR("%s : task %zu does not fit in the context window\n", __func__, i0);
+            LOG_ERR("%s : task %zu does not fit in the context window (requires %lu tokens)\n", __func__, i0, data[i0].required_tokens);
             return;
         }
 
@@ -1548,6 +1548,10 @@ static void multiple_choice_score(llama_context * ctx, const common_params & par
 
             int num_answers = cur_task.seq_tokens.size();
             if (s0 + num_answers > max_seq) {
+                if (s0 == 0) {
+                    LOG_ERR("%s : task %zu requires a higher -np|--parallel value (at least %d)\n", __func__, i0, num_answers);
+                    return;
+                }
                 break;
             }
 
@@ -1588,7 +1592,7 @@ static void multiple_choice_score(llama_context * ctx, const common_params & par
         }
 
         if (i0 == i1) {
-            LOG_ERR("%s : task %zu does not fit in the context window\n", __func__, i0);
+            LOG_ERR("%s : task %zu does not fit in the context window (requires %lu tokens)\n", __func__, i0, tasks[i0].required_tokens);
             return;
         }
Repository: facebook/react
Pull request: When selecting a package variant from an export map we should favor n…

When selecting a package variant from an export map we should favor node over edge-light

edge-light represents a runtime with some minimal set of web apis generally found across edge runtimes. However some environments might be both edge-light compatible and node compatible and (node is adding many web APIs) and when both conditions exist we want to favor the node implementations. A followup to this change will add the web streams APIs to Flight and Fizz so the node version exports the same interfaces for web streams that edge does in addition to the node specific implementations.

Changed files:
filename: packages/react-dom/package.json
patch: @@ -50,11 +50,12 @@
     "./client": "./client.js",
     "./server": {
       "workerd": "./server.edge.js",
-      "edge-light": "./server.edge.js",
       "bun": "./server.bun.js",
       "deno": "./server.browser.js",
       "worker": "./server.browser.js",
       "browser": "./server.browser.js",
+      "node": "./server.node.js",
+      "edge-light": "./server.edge.js",
       "default": "./server.node.js"
     },
     "./server.browser": "./server.browser.js",
@@ -63,10 +64,11 @@
     "./server.node": "./server.node.js",
     "./static": {
       "workerd": "./static.edge.js",
-      "edge-light": "./static.edge.js",
       "deno": "./static.browser.js",
       "worker": "./static.browser.js",
       "browser": "./static.browser.js",
+      "node": "./static.node.js",
+      "edge-light": "./static.edge.js",
       "default": "./static.node.js"
     },
     "./static.browser": "./static.browser.js",

filename: packages/react-server-dom-webpack/package.json
patch: @@ -33,13 +33,13 @@
     "./plugin": "./plugin.js",
     "./client": {
       "workerd": "./client.edge.js",
-      "edge-light": "./client.edge.js",
       "deno": "./client.edge.js",
       "worker": "./client.edge.js",
       "node": {
         "webpack": "./client.node.js",
         "default": "./client.node.unbundled.js"
       },
+      "edge-light": "./client.edge.js",
       "browser": "./client.browser.js",
       "default": "./client.browser.js"
     },
@@ -50,12 +50,12 @@
     "./server": {
       "react-server": {
         "workerd": "./server.edge.js",
-        "edge-light": "./server.edge.js",
         "deno": "./server.browser.js",
         "node": {
           "webpack": "./server.node.js",
           "default": "./server.node.unbundled.js"
         },
+        "edge-light": "./server.edge.js",
         "browser": "./server.browser.js"
       },
       "default": "./server.js"
Repository: electron/electron
Pull request: build: fix clang-format duplicate message

#### Description of Change

Remove duplicate message on clang-format failure exit.

<details><summary>Sample</summary>
<p>

```
electron on git:fix-fsa-crashes ❯ npm run lint                    10:37AM

> electron@0.0.0-development lint
> node ./script/lint.js && npm run lint:docs

--- a/shell/browser/file_system_access/file_system_access_permission_context.cc
+++ b/shell/browser/file_system_access/file_system_access_permission_context.cc
@@ -474,8 +474,8 @@
   bool creating_new_grant = !existing_grant;
   if (creating_new_grant) {
     grant = base::MakeRefCounted<PermissionGrantImpl>(
-        weak_factory_.GetWeakPtr(), origin, path_info, handle_type, GrantType::kRead,
-        user_action);
+        weak_factory_.GetWeakPtr(), origin, path_info, handle_type,
+        GrantType::kRead, user_action);
     existing_grant = grant.get();
   } else {
     grant = existing_grant;
To patch these files, run:
$ git apply /tmp/electron-format-xvbzg1j2

To patch these files, run:
$ git apply /tmp/electron-format-xvbzg1j2
```

</p>
</details> 

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [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: script/run-clang-format.py
patch: @@ -369,9 +369,6 @@ def main():
           patch_file.close()
           os.unlink(patch_file.name)
         else:
-          print(
-            'To patch these files, run:',
-            f"$ git apply {patch_file.name}", sep='\n')
           filename=patch_file.name
           print(f"\nTo patch these files, run:\n$ git apply {filename}\n")
Repository: nodejs/node
Pull request: lib: filter node:quic from builtinModules when flag not used

Make sure `node:quic` is not included in `module.builtinModules` when the `--experimental-quic` flat is not used.

Changed files:
filename: lib/internal/modules/cjs/loader.js
patch: @@ -435,7 +435,11 @@ Module.isBuiltin = BuiltinModule.isBuiltin;
 function initializeCJS() {
   // This need to be done at runtime in case --expose-internals is set.
 
-  Module.builtinModules = ObjectFreeze(BuiltinModule.getAllBuiltinModuleIds());
+  let modules = Module.builtinModules = BuiltinModule.getAllBuiltinModuleIds();
+  if (!getOptionValue('--experimental-quic')) {
+    modules = modules.filter((i) => i !== 'node:quic');
+  }
+  Module.builtinModules = ObjectFreeze(modules);
 
   initializeCjsConditions();
Repository: denoland/deno
Pull request: fix(otel): don't throw when calling setActiveSpan at root

When calling `setActiveSpan` at the module root, or with `options.root = true`, the function would internally throw.

Fixes bug reported in https://github.com/denoland/deno/issues/28321#issuecomment-2687936441.

Fixes #28268

Changed files:
filename: ext/telemetry/telemetry.ts
patch: @@ -145,7 +145,7 @@ function hrToMs(hr: [number, number]): number {
 
 export function enterSpan(span: Span): Context | undefined {
   if (!span.isRecording()) return undefined;
-  const context = (CURRENT.get() || ROOT_CONTEXT).setValue(SPAN_KEY, span);
+  const context = (CURRENT.get() ?? ROOT_CONTEXT).setValue(SPAN_KEY, span);
   return CURRENT.enter(context);
 }
 
@@ -254,9 +254,9 @@ class Tracer {
       throw new Error("startActiveSpan requires a function argument");
     }
     if (options?.root) {
-      context = undefined;
+      context = ROOT_CONTEXT;
     } else {
-      context = context ?? CURRENT.get();
+      context = context ?? CURRENT.get() ?? ROOT_CONTEXT;
     }
     const span = this.startSpan(name, options, context);
     const ctx = CURRENT.enter(context.setValue(SPAN_KEY, span));

filename: tests/specs/cli/otel_basic/__test__.jsonc
patch: @@ -33,6 +33,10 @@
     "links": {
       "args": "run -A main.ts links.ts",
       "output": "links.out"
+    },
+    "start_active_span": {
+      "args": "run -A main.ts start_active_span.ts",
+      "output": "start_active_span.out"
     }
   }
 }

filename: tests/specs/cli/otel_basic/start_active_span.out
patch: @@ -0,0 +1,48 @@
+{
+  "spans": [
+    {
+      "traceId": "00000000000000000000000000000001",
+      "spanId": "0000000000000001",
+      "traceState": "",
+      "parentSpanId": "",
+      "flags": 1,
+      "name": "top level span",
+      "kind": 1,
+      "startTimeUnixNano": "[WILDCARD]",
+      "endTimeUnixNano": "[WILDCARD]",
+      "attributes": [],
+      "droppedAttributesCount": 0,
+      "events": [],
+      "droppedEventsCount": 0,
+      "links": [],
+      "droppedLinksCount": 0,
+      "status": {
+        "message": "",
+        "code": 0
+      }
+    },
+    {
+      "traceId": "00000000000000000000000000000002",
+      "spanId": "0000000000000002",
+      "traceState": "",
+      "parentSpanId": "",
+      "flags": 1,
+      "name": "root span",
+      "kind": 1,
+      "startTimeUnixNano": "[WILDCARD]",
+      "endTimeUnixNano": "[WILDCARD]",
+      "attributes": [],
+      "droppedAttributesCount": 0,
+      "events": [],
+      "droppedEventsCount": 0,
+      "links": [],
+      "droppedLinksCount": 0,
+      "status": {
+        "message": "",
+        "code": 0
+      }
+    }
+  ],
+  "logs": [],
+  "metrics": []
+}

filename: tests/specs/cli/otel_basic/start_active_span.ts
patch: @@ -0,0 +1,12 @@
+// Copyright 2018-2025 the Deno authors. MIT license.
+
+import { trace } from "npm:@opentelemetry/api@1.9.0";
+
+const tracer = trace.getTracer("example-tracer");
+
+tracer.startActiveSpan("top level span", (span) => {
+  span.end();
+});
+tracer.startActiveSpan("root span", { root: true }, (span) => {
+  span.end();
+});