helloadhavan/github_issues huggingface dataset:
Repository: vuejs/vue
Pull request: Fix error when recursively traverse an object

Fixing 'Maximum call stack size exceeded' when recursively traverse an object which contains some circular references.


Changed files:
filename: src/watcher.js
patch: @@ -334,14 +334,25 @@ Watcher.prototype.teardown = function () {
  * @param {*} val
  */
 
-function traverse (val) {
+function traverse (val, walkedObjs) {
   var i, keys
+
+  walkedObjs = walkedObjs || {}
   if (isArray(val)) {
     i = val.length
-    while (i--) traverse(val[i])
+    while (i--) traverse(val[i], walkedObjs)
   } else if (isObject(val)) {
+    if (val.__ob__) {
+      var depId = val.__ob__.dep.id
+      if (walkedObjs[depId]) {
+        return
+      } else {
+        walkedObjs[depId] = true
+      }
+    }
+
     keys = Object.keys(val)
     i = keys.length
-    while (i--) traverse(val[keys[i]])
+    while (i--) traverse(val[keys[i]], walkedObjs)
   }
 }

filename: test/unit/specs/watcher_spec.js
patch: @@ -286,6 +286,23 @@ describe('Watcher', function () {
     })
   })
 
+  it('deep watch with circular references', function (done) {
+    new Watcher(vm, 'b', spy, {
+      deep: true
+    })
+    Vue.set(vm.b, '_', vm.b)
+    nextTick(function () {
+      expect(spy).toHaveBeenCalledWith(vm.b, vm.b)
+      expect(spy.calls.count()).toBe(1)
+      vm.b._.c = 1
+      nextTick(function () {
+        expect(spy).toHaveBeenCalledWith(vm.b, vm.b)
+        expect(spy.calls.count()).toBe(2)
+        done()
+      })
+    })
+  })
+
   it('fire change for prop addition/deletion in non-deep mode', function (done) {
     new Watcher(vm, 'b', spy)
     Vue.set(vm.b, 'e', 123)
Repository: nodejs/node
Pull request: Update VTune include paths

Updates VTune include header paths which were changed in v8 https://github.com/v8/v8/commit/846f470ae0b6b334ce3b4e14cca6f7606f6fce42

This fixes the VTune build when built as follows 
```
./configure --enable-vtune-profiling
make
```
and shows the appropriate JIT / Dynamic Code module in VTune.

Changed files:
filename: src/api/environment.cc
patch: @@ -18,7 +18,7 @@
 #include "node_wasm_web_api.h"
 #include "uv.h"
 #ifdef NODE_ENABLE_VTUNE_PROFILING
-#include "../deps/v8/src/third_party/vtune/v8-vtune.h"
+#include "../deps/v8/third_party/vtune/v8-vtune.h"
 #endif
 #if HAVE_INSPECTOR
 #include "inspector/worker_inspector.h"  // ParentInspectorHandle

filename: src/node.cc
patch: @@ -73,7 +73,7 @@
 #endif
 
 #ifdef NODE_ENABLE_VTUNE_PROFILING
-#include "../deps/v8/src/third_party/vtune/v8-vtune.h"
+#include "../deps/v8/third_party/vtune/v8-vtune.h"
 #endif
 
 #include "large_pages/node_large_page.h"

filename: tools/v8_gypfiles/v8vtune.gyp
patch: @@ -13,17 +13,14 @@
       'target_name': 'v8_vtune',
       'type': 'static_library',
       'sources': [
-        '<(V8_ROOT)/third_party/ittapi/src/ittnotify/ittnotify_config.h',
-        '<(V8_ROOT)/third_party/ittapi/src/ittnotify/ittnotify_types.h',
         '<(V8_ROOT)/third_party/ittapi/src/ittnotify/jitprofiling.c',
-        '<(V8_ROOT)/third_party/ittapi/include/jitprofiling.h',
-        '<(V8_ROOT)/src/third_party/vtune/v8-vtune.h',
-        '<(V8_ROOT)/src/third_party/vtune/vtune-jit.cc',
-        '<(V8_ROOT)/src/third_party/vtune/vtune-jit.h',
+        '<(V8_ROOT)/third_party/vtune/vtune-jit.cc',
       ],
       'include_dirs': [
         '<(V8_ROOT)/third_party/ittapi/include',
         '<(V8_ROOT)/third_party/ittapi/src/ittnotify',
+        '<(V8_ROOT)/include',
+        '<(V8_ROOT)',
       ],
 
       'direct_dependent_settings': {
Repository: ggml-org/llama.cpp
Pull request: vocab : fix attribute overrides for harmony

cont #18541
fix #18794

I have accidentally broken the harmony workaround with #18541. The goal of assigning the "user-defined" token attribute to the control tokens is to force them to render in the CLI. Restore that logic.

Changed files:
filename: src/llama-vocab.cpp
patch: @@ -2436,7 +2436,10 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
             auto & attr = id_to_token[t.second].attr;
 
             if (t.first == "
" || t.first == "
" || t.first == "
" || t.first == "
") {
-                attr = (llama_token_attr) (attr | LLAMA_TOKEN_ATTR_USER_DEFINED);
+                LLAMA_LOG_WARN("%s: setting token '%s' (%d) attribute to USER_DEFINED (%u), old attributes: %u\n",
+                        __func__, t.first.c_str(), t.second, LLAMA_TOKEN_ATTR_USER_DEFINED, attr);
+
+                attr = LLAMA_TOKEN_ATTR_USER_DEFINED;
             }
         }
 
@@ -2489,7 +2492,7 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
                 special_eog_ids.erase(end_id);
 
                 auto & attr = id_to_token[end_id].attr;
-                attr = (llama_token_attr) (attr | LLAMA_TOKEN_ATTR_USER_DEFINED);
+                attr = LLAMA_TOKEN_ATTR_USER_DEFINED;
 
                 LLAMA_LOG_WARN("%s: special_eog_ids contains both '
' and '
', or '
' and '
' tokens, removing '
' token from EOG list\n", __func__);
             }
Repository: electron/electron
Pull request: fix: system accent color parsing hex order

#### Description of Change

Closes https://github.com/electron/electron/issues/48086
Closes https://github.com/electron/electron/issues
Refs https://github.com/electron/electron/pull/47741.

Fixes an issue where the accent color would be accidentally inverted when set to match the system color. This could be seen if you chose e.g. an orange, whose color opposite is blue; the window would have a blue border in that case. This happened because `DwmGetColorizationColor` returns a color formatted `0xAARRGGBB`,  and the parsing performed [here](https://github.com/electron/electron/blob/5c98e3609f4b62490fd44541f28f1086b604e4e9/shell/browser/native_window_views_win.cc#L585-L589) used `Get{R|G|B}Value` to parse the color into a `COLORREF`. From [documentation](https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmgetcolorizationcolor):

> The value pointed to by pcrColorization is in an 0xAARRGGBB format. Many Microsoft Win32 APIs, such as `COLORREF`, use a `0x00BBGGRR` format. Be careful to assure that the intended colors are used.

Switch to pulling the color from the windows registry, which does not require extra conversion to ensure the color is in the right format.

cc @bpasero

Tested to ensure the color updates correctly with settings change.

#### 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: Fixes an issue where the accent color would be accidentally inverted when set to match the system color.

Changed files:
filename: shell/common/color_util.cc
patch: @@ -12,6 +12,8 @@
 
 #if BUILDFLAG(IS_WIN)
 #include <dwmapi.h>
+
+#include "base/win/registry.h"
 #endif
 
 namespace {
@@ -68,12 +70,18 @@ std::string ToRGBAHex(SkColor color, bool include_hash) {
 
 #if BUILDFLAG(IS_WIN)
 std::optional<DWORD> GetSystemAccentColor() {
-  DWORD color = 0;
-  BOOL opaque = FALSE;
+  base::win::RegKey key;
+  if (key.Open(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\DWM",
+               KEY_READ) != ERROR_SUCCESS) {
+    return std::nullopt;
+  }
 
-  if (FAILED(DwmGetColorizationColor(&color, &opaque)))
+  DWORD accent_color = 0;
+  if (key.ReadValueDW(L"AccentColor", &accent_color) != ERROR_SUCCESS) {
     return std::nullopt;
-  return color;
+  }
+
+  return accent_color;
 }
 #endif
Repository: vuejs/vue
Pull request: Fix typo, should be transition, not v-transition


Changed files:
filename: examples/modal/modal.css
patch: @@ -41,7 +41,7 @@
 
 /*
  * the following styles are auto-applied to elements with
- * v-transition="modal" when their visibility is toggled
+ * transition="modal" when their visibility is toggled
  * by Vue.js.
  *
  * You can easily play with the modal transition by editing
Repository: vuejs/vue
Pull request: 修复ios微信中滑动导致双向绑定失效

在ios微信新版本中，一旦滑动，拖拽等
MutationObserver 就失效了 
先暂时让微信中用setTimeout 支持


Changed files:
filename: src/util/env.js
patch: @@ -15,6 +15,8 @@ export const devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__
 const UA = inBrowser && window.navigator.userAgent.toLowerCase()
 export const isIE9 = UA && UA.indexOf('msie 9.0') > 0
 export const isAndroid = UA && UA.indexOf('android') > 0
+export const isIos = UA && /(iphone|ipad|ipod|ios)/i.test(UA)
+export const isWechat = UA && UA.indexOf('micromessenger') > 0
 
 let transitionProp
 let transitionEndEvent
@@ -74,7 +76,7 @@ export const nextTick = (function () {
   }
 
   /* istanbul ignore if */
-  if (typeof MutationObserver !== 'undefined') {
+  if (typeof MutationObserver !== 'undefined' && !(isWechat && isIos)) {
     var counter = 1
     var observer = new MutationObserver(nextTickHandler)
     var textNode = document.createTextNode(counter)
Repository: vercel/next.js
Pull request: Update E2E deploy tests manifest

This updates manifest with known flakey tests

x-ref: https://github.com/vercel/next.js/actions/runs/18886182152/job/53902013243
x-ref: https://github.com/vercel/next.js/actions/runs/18886182152/job/53902013283
x-ref: https://github.com/vercel/next.js/actions/runs/18886182152/job/53902013307

Changed files:
filename: test/deploy-tests-manifest.json
patch: @@ -5,14 +5,18 @@
       "failed": [
         "app-dir action handling fetch actions should invalidate client cache when path is revalidated",
         "app-dir action handling fetch actions should invalidate client cache when tag is revalidated",
-        "app-dir action handling fetch actions should handle revalidateTag"
+        "app-dir action handling fetch actions should handle revalidateTag",
+        "app-dir action handling fetch actions should store revalidation data in the prefetch cache",
+        "app-dir action handling fetch actions should invalidate the client router cache if the redirect action triggers a revalidation"
       ]
     },
     "test/e2e/app-dir/actions/app-action-node-middleware.test.ts": {
       "failed": [
         "app-dir action handling fetch actions should invalidate client cache when path is revalidated",
         "app-dir action handling fetch actions should invalidate client cache when tag is revalidated",
-        "app-dir action handling fetch actions should handle revalidateTag"
+        "app-dir action handling fetch actions should handle revalidateTag",
+        "app-dir action handling fetch actions should store revalidation data in the prefetch cache",
+        "app-dir action handling fetch actions should invalidate the client router cache if the redirect action triggers a revalidation"
       ]
     },
     "test/e2e/app-dir/app-static/app-static.test.ts": {
Repository: facebook/react
Pull request: Update React Native shims to use export syntax

## Summary

I'm working to get the main `react-native` package parsable by modern Flow tooling (both `flow-bundler`, `flow-api-translator`), and one blocker is legacy `module.exports` syntax. This diff updates files which are [synced to `react-native`](https://github.com/facebook/react-native/tree/main/packages/react-native/Libraries/Renderer/shims) from this repo.

## How did you test this change?

Files were pasted into `react-native-github` under fbsource, where Flow validates ✅.

Changed files:
filename: scripts/rollup/shims/react-native/ReactFabric.js
patch: @@ -15,7 +15,7 @@ import {BatchedBridge} from 'react-native/Libraries/ReactPrivate/ReactNativePriv
 
 import type {ReactFabricType} from './ReactNativeTypes';
 
-let ReactFabric;
+let ReactFabric: ReactFabricType;
 
 if (__DEV__) {
   ReactFabric = require('../implementations/ReactFabric-dev');
@@ -29,4 +29,4 @@ if (global.RN$Bridgeless !== true) {
   BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
 }
 
-module.exports = (ReactFabric: ReactFabricType);
+export default ReactFabric;

filename: scripts/rollup/shims/react-native/ReactFeatureFlags.js
patch: @@ -15,4 +15,4 @@ const ReactFeatureFlags = {
   debugRenderPhaseSideEffects: false,
 };
 
-module.exports = ReactFeatureFlags;
+export default ReactFeatureFlags;

filename: scripts/rollup/shims/react-native/ReactNative.js
patch: @@ -12,12 +12,12 @@
 
 import type {ReactNativeType} from './ReactNativeTypes';
 
-let ReactNative;
+let ReactNative: ReactNativeType;
 
 if (__DEV__) {
   ReactNative = require('../implementations/ReactNativeRenderer-dev');
 } else {
   ReactNative = require('../implementations/ReactNativeRenderer-prod');
 }
 
-module.exports = (ReactNative: ReactNativeType);
+export default ReactNative;

filename: scripts/rollup/shims/react-native/createReactNativeComponentClass.js
patch: @@ -31,4 +31,4 @@ const createReactNativeComponentClass = function (
   return register(name, callback);
 };
 
-module.exports = createReactNativeComponentClass;
+export default createReactNativeComponentClass;
Repository: facebook/react
Pull request: [www] set disableLegacyMode to true


Changed files:
filename: packages/shared/forks/ReactFeatureFlags.www-dynamic.js
patch: @@ -16,7 +16,6 @@
 export const alwaysThrottleRetries = true;
 export const disableDefaultPropsExceptForClasses = __VARIANT__;
 export const disableLegacyContextForFunctionComponents = __VARIANT__;
-export const disableLegacyMode = __VARIANT__;
 export const disableSchedulerTimeoutInWorkLoop = __VARIANT__;
 export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
 export const enableDO_NOT_USE_disableStrictPassiveEffect = __VARIANT__;

filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -117,8 +117,7 @@ export const enableServerComponentLogs = true;
 export const enableReactTestRendererWarning = false;
 export const useModernStrictMode = true;
 
-export const disableLegacyMode: boolean =
-  __EXPERIMENTAL__ || dynamicFeatureFlags.disableLegacyMode;
+export const disableLegacyMode = true;
 
 export const enableOwnerStacks = false;
 export const enableShallowPropDiffing = false;
Repository: vercel/next.js
Pull request: [turbopack] fix build of empty entries of pages

Initially in #82444 we treat the app router only flag when `pages/` conventional folder doesn't exist. But actually it's not the only critical condition. Cause you might have a pages folder but there's no actual routes but contain some other random files.

When traversing the entries from `pages/` folder, if the app router folder is set to false before, after no routes found we can flag it to `true` to avoid adding unnessary pages routes there

Changed files:
filename: packages/next/src/build/entries.ts
patch: @@ -552,6 +552,12 @@ export async function createPagesMapping({
       // added or removed.
       const root = isDev && pagesDir ? PAGES_DIR_ALIAS : 'next/dist/pages'
 
+      // If there are no user pages routes, treat this as app-dir-only mode.
+      // The pages/ folder could be present and the initial appDirOnly is treated as false, but no valid routes are found.
+      if (Object.keys(pages).length === 0 && !appDirOnly) {
+        appDirOnly = true
+      }
+
       return {
         // Don't add default pages entries if this is an app-router-only build
         ...((isDev || !appDirOnly) && {

filename: packages/next/src/build/index.ts
patch: @@ -1276,6 +1276,11 @@ export default async function build(
         )
       NextBuildContext.mappedPages = mappedPages
 
+      // Update appDirOnly if no user pages routes are found
+      if (Object.keys(mappedPages).length === 0 && !appDirOnly) {
+        NextBuildContext.appDirOnly = appDirOnly = true
+      }
+
       let mappedAppPages: MappedPages | undefined
       let mappedAppLayouts: MappedPages | undefined
       let denormalizedAppPages: string[] | undefined
Repository: vuejs/vue
Pull request: added array with spaces test, fixed some spacing

I noticed there wasn't any tests for doing like `:class="['foo bar baz']"` because it wasn't working in 1.0.21 when I tried it out so I added one and fixed some spacing.


Changed files:
filename: test/unit/specs/directives/internal/class_spec.js
patch: @@ -53,6 +53,8 @@ describe(':class', function () {
     expect(el.className).toBe('a b c')
     dir.update(['d', 'c'])
     expect(el.className).toBe('a c d')
+    dir.update(['w', 'x y z'])
+    expect(el.className).toBe('a w x y z')
     dir.update()
     expect(el.className).toBe('a')
     // test mutating array
@@ -64,13 +66,13 @@ describe(':class', function () {
     dir.update(arr)
     expect(el.className).toBe('a f')
     // test array with objects
-    dir.update(['x', {y: true, z: true}])
+    dir.update(['x', { y: true, z: true }])
     expect(el.className).toBe('a x y z')
-    dir.update(['x', {y: true, z: false}])
+    dir.update(['x', { y: true, z: false }])
     expect(el.className).toBe('a x y')
-    dir.update(['f', {z: true}])
+    dir.update(['f', { z: true }])
     expect(el.className).toBe('a f z')
-    dir.update(['l', 'f', {n: true, z: true}])
+    dir.update(['l', 'f', { n: true, z: true }])
     expect(el.className).toBe('a f z l n')
     dir.update(['x', {}])
     expect(el.className).toBe('a x')
Repository: electron/electron
Pull request: fix: avoid deprecated login item methods

There appears to be a deadlock condition inside `LSSharedFileListCopySnapshot` which is called deep within the deprecated codepath on macOS. This change _should_ ensure that the deprecated codepath is not followed 99% of the time.

Honestly we should probably just remove this deprecated code, but for now this is a backport safe variant that should fix the deadlock.

Notes: Fixed potential deadlock inside `app.getLoginItemSettings` on macOS

Changed files:
filename: shell/browser/browser_mac.mm
patch: @@ -426,19 +426,18 @@ LoginItemSettings GetLoginItemSettingsDeprecated() {
 #else
   // If the app was previously set as a LoginItem with the deprecated API,
   // we should report its LoginItemSettings via the old API.
-  LoginItemSettings settings_deprecated = GetLoginItemSettingsDeprecated();
   if (@available(macOS 13, *)) {
     const std::string status =
         platform_util::GetLoginItemEnabled(options.type, options.service_name);
     if (status == "enabled-deprecated") {
-      settings = settings_deprecated;
+      settings = GetLoginItemSettingsDeprecated();
     } else {
       settings.open_at_login = status == "enabled";
       settings.opened_at_login = was_launched_at_login_;
       settings.status = status;
     }
   } else {
-    settings = settings_deprecated;
+    settings = GetLoginItemSettingsDeprecated();
   }
 #endif
   return gin::ConvertToV8(isolate, settings);

filename: shell/common/platform_util_mac.mm
patch: @@ -220,7 +220,6 @@ void Beep() {
 
 std::string GetLoginItemEnabled(const std::string& type,
                                 const std::string& service_name) {
-  bool enabled = GetLoginItemEnabledDeprecated();
   if (@available(macOS 13, *)) {
     SMAppService* service = GetServiceForType(type, service_name);
     SMAppServiceStatus status = [service status];
@@ -232,10 +231,11 @@ void Beep() {
       return "requires-approval";
     else if (status == SMAppServiceStatusNotFound) {
       // If the login item was enabled with the old API, return that.
-      return enabled ? "enabled-deprecated" : "not-found";
+      return GetLoginItemEnabledDeprecated() ? "enabled-deprecated"
+                                             : "not-found";
     }
   }
-  return enabled ? "enabled" : "not-registered";
+  return GetLoginItemEnabledDeprecated() ? "enabled" : "not-registered";
 }
 
 bool SetLoginItemEnabled(const std::string& type,
Repository: nodejs/node
Pull request: util: inspect objects with throwing Symbol.toStringTag

`util.inspect()` should handle all kinds of input, even if it is not well defined. Throwing is something that is meant to be worked around in all known cases. This fixes issues inspecting objects where accessing the Symbol.toStringTag would cause an error. The symbol is just ignored in that case.

Refs: https://github.com/nodejs/node/issues/55539
Refs: https://github.com/nodejs/node/pull/55544

Changed files:
filename: lib/internal/util/inspect.js
patch: @@ -1186,7 +1186,14 @@ function formatRaw(ctx, value, recurseTimes, typedArray) {
     protoProps = undefined;
   }
 
-  let tag = value[SymbolToStringTag];
+  let tag = '';
+
+  try {
+    tag = value[SymbolToStringTag];
+  } catch {
+    // Ignore error.
+  }
+
   // Only list the tag in case it's non-enumerable / not an own property.
   // Otherwise we'd print this twice.
   if (typeof tag !== 'string' ||

filename: test/parallel/test-util-inspect.js
patch: @@ -1646,7 +1646,7 @@ util.inspect(process);
     }
   }
 
-  assert.throws(() => util.inspect(new ThrowingClass()), /toStringTag error/);
+  assert.strictEqual(util.inspect(new ThrowingClass()), 'ThrowingClass {}');
 
   const y = {
     get [Symbol.toStringTag]() {
@@ -1655,7 +1655,11 @@ util.inspect(process);
   };
   const x = { y };
   y.x = x;
-  assert.throws(() => util.inspect(x), /TypeError: Converting circular structure to JSON/);
+
+  assert.strictEqual(
+    util.inspect(x),
+    '<ref *1> {\n  y: { x: [Circular *1], Symbol(Symbol.toStringTag): [Getter] }\n}'
+  );
 
   class NotStringClass {
     get [Symbol.toStringTag]() {
Repository: vuejs/vue
Pull request: remove :is attribute even when component is cached (fixes #2666)

Hello,

**This bug fixes #2666, a html file reproducing the bug within it's context can be found [here](https://github.com/GuillaumeLeclerc/vue-seo/blob/master/examples/hreflang.html)** 

Since it's only one line I don't think a test is required but I'll explain why the bug occurs and why the PR fixes this.

As stated [here](https://github.com/vuejs/vue/blob/be7339b38ad5083fd0d0baaa2eb9f508b5f9ce23/src/directives/internal/component.js#L55), the compilation is cached so for all components except the first one the attributes are not removed. Users might want to use the ':is' version. In this case it's not removed from the DOM and visible.

This PR fixes the bug in my codebase.

Thank you !


Changed files:
filename: src/directives/internal/component.js
patch: @@ -56,6 +56,7 @@ export default {
       // cached, when the component is used elsewhere this attribute
       // will remain at link time.
       this.el.removeAttribute('is')
+      this.el.removeAttribute(':is')
       // remove ref, same as above
       if (this.descriptor.ref) {
         this.el.removeAttribute('v-ref:' + hyphenate(this.descriptor.ref))