helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix(node): align type stripping in node_modules error message with Node


Changed files:
filename: cli/lib/loader.rs
patch: @@ -27,20 +27,25 @@ pub struct ModuleCodeStringSource {
 
 #[derive(Debug, Error, deno_error::JsError)]
 #[class(type)]
-#[error("{media_type} files are not supported in npm packages: {specifier}")]
-pub struct NotSupportedKindInNpmError {
-  pub media_type: MediaType,
+#[error("[{}]: Stripping types is currently unsupported for files under node_modules, for \"{}\"", self.code(), specifier)]
+pub struct StrippingTypesNodeModulesError {
   pub specifier: Url,
 }
 
+impl StrippingTypesNodeModulesError {
+  pub fn code(&self) -> &'static str {
+    "ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING"
+  }
+}
+
 #[derive(Debug, Error, deno_error::JsError)]
 pub enum NpmModuleLoadError {
   #[class(inherit)]
   #[error(transparent)]
   UrlToFilePath(#[from] deno_path_util::UrlToFilePathError),
   #[class(inherit)]
   #[error(transparent)]
-  NotSupportedKindInNpm(#[from] NotSupportedKindInNpmError),
+  StrippingTypesNodeModules(#[from] StrippingTypesNodeModulesError),
   #[class(inherit)]
   #[error(transparent)]
   ClosestPkgJson(#[from] node_resolver::errors::ClosestPkgJsonError),
@@ -177,9 +182,8 @@ impl<
 
     let media_type = MediaType::from_specifier(specifier);
     if media_type.is_emittable() {
-      return Err(NpmModuleLoadError::NotSupportedKindInNpm(
-        NotSupportedKindInNpmError {
-          media_type,
+      return Err(NpmModuleLoadError::StrippingTypesNodeModules(
+        StrippingTypesNodeModulesError {
           specifier: specifier.clone(),
         },
       ));

filename: cli/module_loader.rs
patch: @@ -38,8 +38,8 @@ use deno_graph::ModuleGraphError;
 use deno_graph::Resolution;
 use deno_graph::WasmModule;
 use deno_lib::loader::ModuleCodeStringSource;
-use deno_lib::loader::NotSupportedKindInNpmError;
 use deno_lib::loader::NpmModuleLoadError;
+use deno_lib::loader::StrippingTypesNodeModulesError;
 use deno_lib::npm::NpmRegistryReadPermissionChecker;
 use deno_lib::util::hash::FastInsecureHasher;
 use deno_lib::worker::CreateModuleLoaderResult;
@@ -1257,8 +1257,7 @@ impl<TGraphContainer: ModuleGraphContainer> NodeRequireLoader
       let specifier = deno_path_util::url_from_file_path(path)
         .map_err(JsErrorBox::from_err)?;
       if self.in_npm_pkg_checker.in_npm_package(&specifier) {
-        return Err(JsErrorBox::from_err(NotSupportedKindInNpmError {
-          media_type,
+        return Err(JsErrorBox::from_err(StrippingTypesNodeModulesError {
           specifier,
         }));
       }

filename: tests/specs/npm/typescript_file_in_package/main.out
patch: @@ -1,3 +1,3 @@
 Download http://localhost:4260/@denotest%2ftypescript-file
 Download http://localhost:4260/@denotest/typescript-file/1.0.0.tgz
-error: TypeScript files are not supported in npm packages: file:///[WILDCARD]/@denotest/typescript-file/1.0.0/index.ts
+error: [ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING]: Stripping types is currently unsupported for files under node_modules, for "file:///[WILDLINE]/index.ts"
Repository: nodejs/node
Pull request: timers: remove unnecessary allocation of _onTimeout

This doesn't cause that problem anymore

Changed files:
filename: lib/internal/timers.js
patch: @@ -208,9 +208,6 @@ class Timeout {
     this._idlePrev = this;
     this._idleNext = this;
     this._idleStart = null;
-    // This must be set to null first to avoid function tracking
-    // on the hidden class, revisit in V8 versions after 6.2
-    this._onTimeout = null;
     this._onTimeout = callback;
     this._timerArgs = args;
     this._repeat = isRepeat ? after : null;
Repository: ggml-org/llama.cpp
Pull request: kleidiai: fix unsigned overflow bug

This patch fixes the overflow issue reported by Edward https://github.com/ggml-org/llama.cpp/issues/15079.


Changed files:
filename: ggml/src/ggml-cpu/kleidiai/kleidiai.cpp
patch: @@ -259,7 +259,10 @@ class tensor_traits : public ggml::cpu::tensor_traits {
                 const int64_t m_start      = 0;
 
                 const int64_t n_step      = static_cast<int64_t>(kernel->get_n_step());
-                const int64_t num_threads = KAI_MIN(n / n_step, nth);
+                int64_t num_threads       = KAI_MIN(n / n_step, nth);
+                if (num_threads <= 0) {
+                    num_threads = 1;
+                }
 
                 if (ith < num_threads) {
                     const int64_t num_n_per_thread0   = round_down(n / num_threads, n_step);
@@ -309,7 +312,8 @@ class tensor_traits : public ggml::cpu::tensor_traits {
         GGML_ASSERT(kernel);
 
         const int ith = params->ith;
-        const int nth = params->nth;
+        const int nth_raw = params->nth;
+        const int nth = nth_raw > 0 ? nth_raw : 1;
 
         const size_t k = ne00;
         const size_t m = ne11;
@@ -327,9 +331,12 @@ class tensor_traits : public ggml::cpu::tensor_traits {
         const size_t num_n_per_thread = kai_roundup(kai_roundup(n, nth) / nth, n_step);
         const size_t n_start = ith * num_n_per_thread;
 
-        size_t n_to_process = num_n_per_thread;
-        if ((n_start + n_to_process) > n) {
-            n_to_process = n - n_start;
+        size_t n_to_process = 0;
+        if (n_start < n) {
+            n_to_process = num_n_per_thread;
+            if ((n_start + n_to_process) > n) {
+                n_to_process = n - n_start;
+            }
         }
 
         // Calculate number of columns to be processed per thread
@@ -361,8 +368,10 @@ class tensor_traits : public ggml::cpu::tensor_traits {
         const void* lhs_ptr            = (const void*)((const char *)lhs_packed + lhs_packed_offset);
         float *dst_ptr                 = reinterpret_cast<float *>(static_cast<uint8_t *>(dst->data) + dst_offset);
 
-        variant_call<void>(kernel->run_kernel, m, n_to_process, k, QK4_0, lhs_ptr, rhs_ptr, dst_ptr, dst_stride,
-                           sizeof(float), -FLT_MAX, FLT_MAX);
+        if (n_to_process > 0) {
+            variant_call<void>(kernel->run_kernel, m, n_to_process, k, QK4_0, lhs_ptr, rhs_ptr, dst_ptr, dst_stride,
+                               sizeof(float), -FLT_MAX, FLT_MAX);
+        }
 
         return true;
     }
Repository: huggingface/transformers
Pull request: [video processor] fix slow tests

# What does this PR do?

Fixes failing CI. Some models like InternVL have a shared image processor with a different model (GotOCR). So when we check for an `image_processor_type` and infer that changing `Image -> Video` gives us video processor, it fails. Because GotOCR has no video video processing and should not have. Thus we need to check against mapping to be safe and if the inferred name is not in mapping, fallback to `type(config.json)` at last

Video processor BC is giving me headaches 😿 

cc @ydshieh 

Changed files:
filename: src/transformers/models/auto/video_processing_auto.py
patch: @@ -311,7 +311,12 @@ def from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwargs):
         if video_processor_class is None and video_processor_auto_map is None:
             image_processor_class = config_dict.pop("image_processor_type", None)
             if image_processor_class is not None:
-                video_processor_class = image_processor_class.replace("ImageProcessor", "VideoProcessor")
+                video_processor_class_inferred = image_processor_class.replace("ImageProcessor", "VideoProcessor")
+
+                # Some models have different image processors, e.g. InternVL uses GotOCRImageProcessor
+                # We cannot use GotOCRVideoProcessor when falling back for BC and should try to infer from config later on
+                if video_processor_class_inferred in VIDEO_PROCESSOR_MAPPING_NAMES.values():
+                    video_processor_class = video_processor_class_inferred
             if "AutoImageProcessor" in config_dict.get("auto_map", {}):
                 image_processor_auto_map = config_dict["auto_map"]["AutoImageProcessor"]
                 video_processor_auto_map = image_processor_auto_map.replace("ImageProcessor", "VideoProcessor")
Repository: vercel/next.js
Pull request: [test] Stop opening browser by default in local Dev Overlay Storybook

This doesn't properly work with if a different Chrome release channel is used. It opens Chrome stable even if I have Beta as my default.
It's also annoying if you restart it and have a tab already open in you non-default browser.
We don't open a browser in Next.js for those same reasons.

Storybook will display a URL to click in the terminal so all this adds is one click if you start it for the first time.

Changed files:
filename: packages/next/package.json
patch: @@ -87,7 +87,7 @@
     "types": "tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir dist",
     "typescript": "tsec --noEmit",
     "ncc-compiled": "taskr ncc",
-    "storybook": "storybook dev -p 6006",
+    "storybook": "BROWSER=none storybook dev -p 6006",
     "build-storybook": "storybook build",
     "test-storybook": "test-storybook"
   },
Repository: vercel/next.js
Pull request: [dev-overlay] Remove positive tab-index

Can be disorienting if more focusable content is added. See https://dequeuniversity.com/tips/tabindex-positive-numbers

Changed files:
filename: packages/next/src/client/components/react-dev-overlay/ui/components/hydration-diff/diff-view.tsx
patch: @@ -120,7 +120,6 @@ export function PseudoHtmlDiff({
       data-nextjs-container-errors-pseudo-html-collapse={isDiffCollapsed}
     >
       <button
-        tabIndex={10} // match CallStackFrame
         data-nextjs-container-errors-pseudo-html-collapse-button
         onClick={() => toggleCollapseHtml(!isDiffCollapsed)}
       >

filename: packages/next/src/client/components/react-dev-overlay/ui/components/terminal/editor-link.tsx
patch: @@ -19,7 +19,6 @@ export function EditorLink({ file, location }: EditorLinkProps) {
     <div
       data-with-open-in-editor-link
       data-with-open-in-editor-link-import-trace
-      tabIndex={10}
       role={'link'}
       onClick={open}
       title={'Click to open in your editor'}
Repository: denoland/deno
Pull request: fix(types): `Deno.readDirSync`'s type returns an `IteratorObject`

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->

closes #27625

Changed files:
filename: cli/tsc/dts/lib.deno.ns.d.ts
patch: @@ -3124,7 +3124,7 @@ declare namespace Deno {
    * @tags allow-read
    * @category File System
    */
-  export function readDirSync(path: string | URL): Iterable<DirEntry>;
+  export function readDirSync(path: string | URL): IteratorObject<DirEntry>;
 
   /** Copies the contents and permissions of one file to another specified path,
    * by default creating a new file if needed, else overwriting. Fails if target

filename: tests/unit/read_dir_test.ts
patch: @@ -25,6 +25,14 @@ Deno.test({ permissions: { read: true } }, function readDirSyncSuccess() {
   assertSameContent(files);
 });
 
+Deno.test(
+  { permissions: { read: true } },
+  function readDirSyncResultHasIteratorHelperMethods() {
+    const iterator = Deno.readDirSync("tests/testdata");
+    assertEquals(typeof iterator.map, "function");
+  },
+);
+
 Deno.test({ permissions: { read: true } }, function readDirSyncWithUrl() {
   const files = [
     ...Deno.readDirSync(pathToAbsoluteFileUrl("tests/testdata")),
Repository: nodejs/node
Pull request: doc: remove @mertcanaltin from Triagers

When I became I triager, I did my best to fulfill the responsibilities of a triager, but unfortunately with time, I realized that it will be better for me and the project to spend my time on contributing to Node.js directly. This was an educational experience for me, and I've learned a lot. Thank you for all the help. ❤️ 

Changed files:
filename: README.md
patch: @@ -757,8 +757,6 @@ maintaining the Node.js project.
   **Akhil Marsonya** <<akhil.marsonya27@gmail.com>> (he/him)
 * [meixg](https://github.com/meixg) -
   **Xuguang Mei** <<meixuguang@gmail.com>> (he/him)
-* [mertcanaltin](https://github.com/mertcanaltin) -
-  **Mert Can Altin** <<mertgold60@gmail.com>>
 * [preveen-stack](https://github.com/preveen-stack) -
   **Preveen Padmanabhan** <<wide4head@gmail.com>> (he/him)
 * [RaisinTen](https://github.com/RaisinTen) -
Repository: facebook/react
Pull request: Fix a test case in ReactUpdates-test

Just noticed the test isn't testing what it is meant to test properly.
The error `Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot` is thrown, the inner `expect(error).toContain('Warning: Maximum update depth exceeded.');`  failed and threw jest error, and the outer `.toThrow('Maximum update depth exceeded.')` happens to catch it makes the test pass.

Changed files:
filename: packages/react-dom/src/__tests__/ReactUpdates-test.js
patch: @@ -1646,12 +1646,12 @@ describe('ReactUpdates', () => {
       try {
         const container = document.createElement('div');
         expect(() => {
-          ReactDOM.render(<App />, container);
+          const root = ReactDOMClient.createRoot(container);
+          root.render(<App />);
           while (error === null) {
             Scheduler.unstable_flushNumberOfYields(1);
             Scheduler.unstable_clearLog();
           }
-          expect(error).toContain('Warning: Maximum update depth exceeded.');
           expect(stack).toContain(' NonTerminating');
           // rethrow error to prevent going into an infinite loop when act() exits
           throw error;
Repository: nodejs/node
Pull request: doc: recommend watching the collaborators repo in the onboarding doc

It might be easy to miss this repo. For example, I forgot rewatching this repo when I rejoined. So it would be a good idea to mention this in the collaborator onboarding guide.

<!--
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: onboarding.md
patch: @@ -53,6 +53,8 @@ onboarding session.
     set up email
   * Watching the main repository will flood your inbox (several hundred
     notifications on typical weekdays), so be prepared
+  * Watching the discussions in the
+    [collaborators repo](https://github.com/nodejs/collaborators) is recommended.
 
 The project has a venue for real-time discussion:
Repository: vercel/next.js
Pull request: [test] Fix crashes in Dev Overlay Stories

A bit annoying that Storybook marks required props as optional. Makes it hard to keep those working during refactor.


Changed files:
filename: packages/next/.storybook/test-runner.ts
patch: @@ -15,6 +15,9 @@ const config: TestRunnerConfig = {
       detailedReportOptions: {
         html: true,
       },
+      // Verbose prints additional logs in the terminal on passing tests taking up space
+      // that's needed by failed tests.
+      verbose: false,
     })
   },
 }

filename: packages/next/src/client/components/react-dev-overlay/ui/components/errors/error-overlay-layout/error-overlay-layout.stories.tsx
patch: @@ -15,6 +15,10 @@ type Story = StoryObj<typeof ErrorOverlayLayout>
 
 export const Default: Story = {
   args: {
+    error: {
+      name: 'ModuleNotFoundError',
+      message: "Cannot find module './missing-module'",
+    },
     errorType: 'Build Error',
     errorMessage: 'Failed to compile',
     errorCode: 'E001',

filename: packages/next/src/client/components/react-dev-overlay/ui/components/hydration-diff/diff-view.tsx
patch: @@ -58,7 +58,7 @@ export function PseudoHtmlDiff({
 
   const htmlComponents = useMemo(() => {
     const componentStacks: React.ReactNode[] = []
-    const reactComponentDiffLines = reactOutputComponentDiff!.split('\n')
+    const reactComponentDiffLines = reactOutputComponentDiff.split('\n')
     reactComponentDiffLines.forEach((line, index) => {
       const isDiffLine = line[0] === '+' || line[0] === '-'
       const isHighlightedLine = line[0] === '>'

filename: packages/next/src/client/components/react-dev-overlay/ui/container/errors.stories.tsx
patch: @@ -156,6 +156,7 @@ const runtimeErrors: ReadyRuntimeError[] = [
 
 export const Default: Story = {
   args: {
+    getSquashedHydrationErrorDetails: () => null,
     runtimeErrors,
     versionInfo: {
       installed: '15.0.0',
@@ -188,6 +189,7 @@ export const VeryLongErrorMessage: Story = {
 
 export const WithHydrationWarning: Story = {
   args: {
+    ...Default.args,
     runtimeErrors: [
       {
         id: 1,

filename: packages/next/src/client/components/react-dev-overlay/ui/container/runtime-error/component-stack-pseudo-html.stories.tsx
patch: @@ -15,22 +15,17 @@ type Story = StoryObj<typeof PseudoHtmlDiff>
 
 export const TextMismatch: Story = {
   args: {
-    reactOutputComponentDiff: undefined,
-  },
-}
-
-export const TextInTagMismatch: Story = {
-  args: {
-    reactOutputComponentDiff: undefined,
+    reactOutputComponentDiff: `<Page>
+  <Layout>
+    <div>
+-     Server content
++     Client content`,
   },
 }
 
 export const ReactUnifiedMismatch: Story = {
   args: {
-    reactOutputComponentDiff: `<Page>
-  <Layout>
-    <div>
--     <p>Server content</p>
-+     <p>Client content</p>`,
+    reactOutputComponentDiff:
+      '<Page>\n  <Layout>\n    <div>asd\n-     <p>Server content</p>\n+     <p>Client content</p>',
   },
 }
Repository: facebook/react
Pull request: Warn for ARIA typos on custom elements

Normally we allow any attribute/property on custom elements. However it's a shared namespace. The `aria-` namespace applies to all generic elements which are shared with custom elements. So arguably adding custom extensions there is a really bad idea since it can conflict with future additions.

It's possible there is a new standard one that's polyfilled by a custom element but the same issue applies to React in general that we might warn for very new additions so we just have to be quick on that.

cc @josepharhar 

Changed files:
filename: packages/react-dom-bindings/src/shared/ReactDOMInvalidARIAHook.js
patch: @@ -6,7 +6,6 @@
  */
 
 import {ATTRIBUTE_NAME_CHAR} from './isAttributeNameSafe';
-import isCustomComponent from './isCustomComponent';
 import validAriaProperties from './validAriaProperties';
 import hasOwnProperty from 'shared/hasOwnProperty';
 
@@ -76,7 +75,7 @@ function validateProperty(tagName, name) {
   return true;
 }
 
-function warnInvalidARIAProps(type, props) {
+export function validateProperties(type, props) {
   if (__DEV__) {
     const invalidProps = [];
 
@@ -108,10 +107,3 @@ function warnInvalidARIAProps(type, props) {
     }
   }
 }
-
-export function validateProperties(type, props) {
-  if (isCustomComponent(type, props)) {
-    return;
-  }
-  warnInvalidARIAProps(type, props);
-}
Repository: facebook/react
Pull request: Add Circle CI API token to request header if available

Follow up of #26499
A Circle CI team member got back to me. It is indeed not necessary, but they had a regression not long ago on fetching without token.
https://discuss.circleci.com/t/is-api-token-required-when-fetching-artifacts/47606/5

To mitigate the impact of this kind of issues, let's add this token to requests' header when it's available.

Changed files:
filename: scripts/release/shared-commands/download-build-artifacts.js
patch: @@ -22,9 +22,15 @@ const run = async ({build, cwd, releaseChannel}) => {
   }
 
   // Download and extract artifact
+  const {CIRCLE_CI_API_TOKEN} = process.env;
+  let header = '';
+  // Add Circle CI API token to request header if available.
+  if (CIRCLE_CI_API_TOKEN != null) {
+    header = '-H "Circle-Token: ${CIRCLE_CI_API_TOKEN}" ';
+  }
   await exec(`rm -rf ./build`, {cwd});
   await exec(
-    `curl -L $(fwdproxy-config curl) ${buildArtifacts.url} | tar -xvz`,
+    `curl -L $(fwdproxy-config curl) ${buildArtifacts.url} ${header}| tar -xvz`,
     {
       cwd,
     }

filename: scripts/release/utils.js
patch: @@ -59,8 +59,13 @@ const extractCommitFromVersionNumber = version => {
 };
 
 const getArtifactsList = async buildID => {
+  const headers = {};
+  const {CIRCLE_CI_API_TOKEN} = process.env;
+  if (CIRCLE_CI_API_TOKEN != null) {
+    headers['Circle-Token'] = CIRCLE_CI_API_TOKEN;
+  }
   const jobArtifactsURL = `https://circleci.com/api/v1.1/project/github/facebook/react/${buildID}/artifacts`;
-  const jobArtifacts = await fetch(jobArtifactsURL);
+  const jobArtifacts = await fetch(jobArtifactsURL, {headers});
   return jobArtifacts.json();
 };
Repository: vercel/next.js
Pull request: [test] Fix Dev Overlay Storybook

Broke in https://github.com/vercel/next.js/pull/79699

Changed files:
filename: packages/next/.storybook/preview.tsx
patch: @@ -1,4 +1,18 @@
 import type { Preview } from '@storybook/react'
+import { useInsertionEffect } from 'react'
+
+function CreatePortalNode() {
+  useInsertionEffect(() => {
+    const portalNode = document.createElement('nextjs-portal')
+    document.body.appendChild(portalNode)
+
+    return () => {
+      document.body.removeChild(portalNode)
+    }
+  })
+
+  return null
+}
 
 const preview: Preview = {
   parameters: {
@@ -28,6 +42,14 @@ const preview: Preview = {
       manual: true,
     },
   },
+  decorators: [
+    (Story) => (
+      <>
+        <CreatePortalNode />
+        <Story />
+      </>
+    ),
+  ],
 }
 
 export default preview