// This is based on v0.11.0 of react-refresh // The following changes: // - Removed __DEV__ checks // - inlined REACT_MEMO_TYPE & REACT_FORWARD_REF_TYPE // - minified const F = "for" in Symbol ? Symbol.for("react.forward_ref") : 60112, C = "for" in Symbol ? Symbol.for("react.memo") : 60115, O = typeof WeakMap == "function" ? WeakMap : Map, T = new Map(), k = new O(), m = new O(), M = new O(); let g = []; const b = new Map(), w = new Map(), c = new Set(), p = new Set(), R = typeof WeakMap == "function" ? new WeakMap() : null; let S = !1; function _(e) { if (e.fullKey !== null) return e.fullKey; let t = e.ownKey, n; try { n = e.getCustomHooks(); } catch { return (e.forceReset = !0), (e.fullKey = t), t; } for (let o = 0; o < n.length; o++) { const l = n[o]; if (typeof l != "function") return (e.forceReset = !0), (e.fullKey = t), t; const s = m.get(l); if (s === void 0) continue; const r = _(s); s.forceReset && (e.forceReset = !0), (t += ` --- ` + r); } return (e.fullKey = t), t; } function D(e, t) { const n = m.get(e), o = m.get(t); return n === void 0 && o === void 0 ? !0 : !(n === void 0 || o === void 0 || _(n) !== _(o) || o.forceReset); } function B(e) { return e.prototype && e.prototype.isReactComponent; } function v(e, t) { return B(e) || B(t) ? !1 : !!D(e, t); } function I(e) { return M.get(e); } function P(e) { const t = new Map(); return ( e.forEach((n, o) => { t.set(o, n); }), t ); } function L(e) { const t = new Set(); return ( e.forEach((n) => { t.add(n); }), t ); } function H(e, t) { try { return e[t]; } catch { return; } } function j() { if (g.length === 0 || S) return null; S = !0; try { const e = new Set(), t = new Set(), n = g; (g = []), n.forEach((f) => { let [i, u] = f; const a = i.current; M.set(a, i), M.set(u, i), (i.current = u), v(a, u) ? t.add(i) : e.add(i); }); const o = { updatedFamilies: t, staleFamilies: e }; b.forEach((f) => { f.setRefreshHandler(I); }); let l = !1, s = null; const r = L(p), h = L(c), d = P(w); if ( (r.forEach((f) => { const i = d.get(f); if (i === void 0) throw new Error( "Could not find helpers for a root. This is a bug in React Refresh.", ); if ((!p.has(f), R === null || !R.has(f))) return; const u = R.get(f); try { i.scheduleRoot(f, u); } catch (a) { l || ((l = !0), (s = a)); } }), h.forEach((f) => { const i = d.get(f); if (i === void 0) throw new Error( "Could not find helpers for a root. This is a bug in React Refresh.", ); !c.has(f); try { i.scheduleRefresh(f, o); } catch (u) { l || ((l = !0), (s = u)); } }), l) ) throw s; return o; } finally { S = !1; } } function K(e, t) { if ( e === null || (typeof e != "function" && typeof e != "object") || k.has(e) ) return; let n = T.get(t); if ( (n === void 0 ? ((n = { current: e }), T.set(t, n)) : g.push([n, e]), k.set(e, n), typeof e == "object" && e !== null) ) switch (H(e, "$$typeof")) { case F: K(e.render, t + "$render"); break; case C: K(e.type, t + "$type"); break; } } function E(e, t) { let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 ? arguments[3] : void 0; if ( (m.has(e) || m.set(e, { forceReset: n, ownKey: t, fullKey: null, getCustomHooks: o || (() => []), }), typeof e == "object" && e !== null) ) switch (H(e, "$$typeof")) { case F: E(e.render, t, n, o); break; case C: E(e.type, t, n, o); break; } } function A(e) { const t = m.get(e); t !== void 0 && _(t); } function $(e) { return T.get(e); } function W(e) { return k.get(e); } function x(e) { const t = new Set(); return ( c.forEach((n) => { const o = w.get(n); if (o === void 0) throw new Error( "Could not find helpers for a root. This is a bug in React Refresh.", ); o.findHostInstancesForRefresh(n, e).forEach((s) => { t.add(s); }); }), t ); } function z(e) { let t = e.__REACT_DEVTOOLS_GLOBAL_HOOK__; if (t === void 0) { let s = 0; e.__REACT_DEVTOOLS_GLOBAL_HOOK__ = t = { renderers: new Map(), supportsFiber: !0, inject(r) { return s++; }, onScheduleFiberRoot(r, h, d) {}, onCommitFiberRoot(r, h, d, f) {}, onCommitFiberUnmount() {}, }; } if (t.isDisabled) { console.warn( "Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). Fast Refresh is not compatible with this shim and will be disabled.", ); return; } const n = t.inject; (t.inject = function (s) { const r = n.apply(this, arguments); return ( typeof s.scheduleRefresh == "function" && typeof s.setRefreshHandler == "function" && b.set(r, s), r ); }), t.renderers.forEach((s, r) => { typeof s.scheduleRefresh == "function" && typeof s.setRefreshHandler == "function" && b.set(r, s); }); const o = t.onCommitFiberRoot, l = t.onScheduleFiberRoot || (() => {}); (t.onScheduleFiberRoot = function (s, r, h) { return ( S || (p.delete(r), R !== null && R.set(r, h)), l.apply(this, arguments) ); }), (t.onCommitFiberRoot = function (s, r, h, d) { const f = b.get(s); if (f !== void 0) { w.set(r, f); const i = r.current, u = i.alternate; if (u !== null) { const a = u.memoizedState != null && u.memoizedState.element != null && c.has(r), y = i.memoizedState != null && i.memoizedState.element != null; !a && y ? (c.add(r), p.delete(r)) : (a && y) || (a && !y ? (c.delete(r), d ? p.add(r) : w.delete(r)) : !a && !y && d && p.add(r)); } else c.add(r); } return o.apply(this, arguments); }); } function G() { return !1; } function N() { return c.size; } function U() { let e, t, n = !1; return function (o, l, s, r) { if (typeof l == "string") return ( e || ((e = o), (t = typeof r == "function")), o != null && (typeof o == "function" || typeof o == "object") && E(o, l, s, r), o ); !n && t && ((n = !0), A(e)); }; } function V(e) { switch (typeof e) { case "function": { if (e.prototype != null) { if (e.prototype.isReactComponent) return !0; const n = Object.getOwnPropertyNames(e.prototype); if ( n.length > 1 || n[0] !== "constructor" || e.prototype.__proto__ !== Object.prototype ) return !1; } const t = e.name || e.displayName; return typeof t == "string" && /^[A-Z]/.test(t); } case "object": { if (e != null) switch (H(e, "$$typeof")) { case F: case C: return !0; default: return !1; } return !1; } default: return !1; } } export { N as _getMountedRootCount, A as collectCustomHooksForSignature, U as createSignatureFunctionForTransform, x as findAffectedHostInstances, $ as getFamilyByID, W as getFamilyByType, G as hasUnrecoverableErrors, z as injectIntoGlobalHook, V as isLikelyComponentType, j as performReactRefresh, K as register, E as setSignature, }; ig-run Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/string.zig (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-01exclusive maxGravatar Dylan Conway 1-1/+1
2023-09-01Fix debug console from appears on startGravatar Ashcon Partovi 2-2/+5
2023-09-01Add configuration options to extensionGravatar Ashcon Partovi 5-5/+137
2023-09-01Fix run button starting cwd at /Gravatar Ashcon Partovi 1-0/+2
2023-09-01fix(runtime): fix dns_resolver crash (#4435)Gravatar dave caruso 3-17/+19
* fix incorrect c pointer * format * lets go * random other test case fixed * hanassagi patch * Update dns_resolver.zig * Revert "Update dns_resolver.zig" This reverts commit 53eb338048583a338e7c01d2b351f1c679db3e15. * See if the tests pass --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-09-01Fix background colorGravatar Ashcon Partovi 1-2/+3
2023-09-01Allow older versions of VSCodeGravatar Ashcon Partovi 2-6/+5
2023-09-01Fix README for extensionGravatar Ashcon Partovi 2-7/+12
2023-09-01Update VSCode extensionGravatar Ashcon Partovi 1-3/+4
2023-09-01Fix breakpoint on entry for extensionGravatar Ashcon Partovi 5-18/+15
2023-09-01Add Bun.canReload event to inspectorGravatar Ashcon Partovi 2-0/+17
2023-08-31JavaScript Debug Terminal == Bun TerminalGravatar Ashcon Partovi 1-0/+32
2023-08-31fix(runtime): `fs.cp` edge cases (#4439)Gravatar dave caruso 2-8/+44
* yippee * enable cpSync tests * much better * that doesnt actually do anything * lose
2023-08-31only set initial debugger breakpoint once (#4441)Gravatar Dylan Conway 1-2/+11
* unset `set_breakpoint_on_first_line` on reload * move to `module_loader.zig`
2023-08-31Make breakpoints faster in VSCode extensionGravatar Ashcon Partovi 1-241/+327
2023-08-31`bun install` correctly join dependency URLs (#4421)Gravatar Julian 6-64/+243
* use WTF to join registry strings * show dependency error messages, better join error We actually report errors when enqueuing dependencies now. I also made the join URLs error message read better. It'd be cleaner to handle it all in one place, but there's currently no way to propagate the data up. * starting on registry URL tests * added more registry URL tests * [install] prevent optional/peer deps from failing builds Couldn't get the peer dependency test to work, but the code is there. * ran prettier * changed error note to use realname, updated tests * ran prettier again...
2023-08-31get name if not provided in `FormData.append` (#4434)Gravatar Dylan Conway 4-5/+45
* get file name from blob if not provided * add test * another test * format
2023-08-31Fix vscode debug terminalGravatar Ashcon Partovi 1-21/+0