react-x11 2.10.1 → 2.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-x11",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "react renderer with X11 as a target",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -111,6 +111,14 @@ export function createStorage(persist) {
111
111
  */
112
112
  export async function prepare() {
113
113
  try {
114
+ // Each hook's source location is read off a stack captured at the hook
115
+ // dispatch, and V8 keeps ten frames — fewer than a loader leaves
116
+ // between the hook and its call site. Under `tsx` (which every
117
+ // `npm run examples:*` uses) that costs about ten frames, so the call
118
+ // site falls off the end, `hookSource` comes back null, and DevTools
119
+ // shows the element's hooks with no names and no source lines.
120
+ // Upwards only: an app that asked for more keeps it.
121
+ if (Error.stackTraceLimit < 50) Error.stackTraceLimit = 50;
114
122
  // react-devtools-core's backend bundle expects browser-ish globals
115
123
  global.self ??= global;
116
124
  global.window ??= global;