import type { MarkdownHeading } from 'astro';
import type { FunctionalComponent } from 'preact';
import { unescape } from 'html-escaper';
import { useState, useEffect, useRef } from 'preact/hooks';

type ItemOffsets = {
	id: string;
	topOffset: number;
};

const TableOfContents: FunctionalComponent<{ headings: MarkdownHeading[] }> = ({
	headings = [],
}) => {
	const toc = useRef<HTMLUListElement>();
	const onThisPageID = 'on-this-page-heading';
	const itemOffsets = useRef<ItemOffsets[]>([]);
	const [currentID, setCurrentID] = useState('overview');
	useEffect(() => {
		const getItemOffsets = () => {
			const titles = document.querySelectorAll('article :is(h1, h2, h3, h4)');
			itemOffsets.current = Array.from(titles).map((title) => ({
				id: title.id,
				topOffset: title.getBoundingClientRect().top + window.scrollY,
			}));
		};

		getItemOffsets();
		window.addEventListener('resize', getItemOffsets);

		return () => {
			window.removeEventListener('resize', getItemOffsets);
		};
	}, []);

	useEffect(() => {
		if (!toc.current) return;

		const setCurrent: IntersectionObserverCallback = (entries) => {
			for (const entry of entries) {
				if (entry.isIntersecting) {
					const { id } = entry.target;
					if (id === onThisPageID) continue;
					setCurrentID(entry.target.id);
					break;
				}
			}
		};

		const observerOptions: IntersectionObserverInit = {
			// Negative top margin accounts for `scroll-margin`.
			// Negative bottom margin means heading needs to be towards top of viewport to trigger intersection.
			rootMargin: '-100px 0% -66%',
			threshold: 1,
		};

		const headingsObserver = new IntersectionObserver(setCurrent, observerOptions);

		// Observe all the headings in the main page content.
		document.querySelectorAll('article :is(h1,h2,h3)').forEach((h) => headingsObserver.observe(h));

		// Stop observing when the component is unmounted.
		return () => headingsObserver.disconnect();
	}, [toc.current]);

	const onLinkClick = (e) => {
		setCurrentID(e.target.getAttribute('href').replace('#', ''));
	};

	return (
		<>
			<h2 id={onThisPageID} className="heading">
				On this page
			</h2>
			<ul ref={toc}>
				{headings
					.filter(({ depth }) => depth > 1 && depth < 4)
					.map((heading) => (
						<li
							className={`header-link depth-${heading.depth} ${
								currentID === heading.slug ? 'current-header-link' : ''
							}`.trim()}
						>
							<a href={`#${heading.slug}`} onClick={onLinkClick}>
								{unescape(heading.text)}
							</a>
						</li>
					))}
			</ul>
		</>
	);
};

export default TableOfContents;
 value='dave/lol'>dave/lol</option>
<option value='dave/nodemodule-preloadmodules'>dave/nodemodule-preloadmodules</option>
<option value='dave/postinstall'>dave/postinstall</option>
<option value='dave/postinstall_2'>dave/postinstall_2</option>
<option value='dave/remove-native-event'>dave/remove-native-event</option>
<option value='dave/zlib'>dave/zlib</option>
<option value='debugger-dev'>debugger-dev</option>
<option value='derrick/fix/bindings-mark-jscinitialize'>derrick/fix/bindings-mark-jscinitialize</option>
<option value='derrick/fix/event-emitter-async-iter'>derrick/fix/event-emitter-async-iter</option>
<option value='derrick/fix/event-emitter-emit-throw-native'>derrick/fix/event-emitter-emit-throw-native</option>
<option value='derrick/fix/http-lowercase-headers'>derrick/fix/http-lowercase-headers</option>
<option value='derrick/fix/node-tests'>derrick/fix/node-tests</option>
<option value='derrick/test/add-ed25519-tests'>derrick/test/add-ed25519-tests</option>
<option value='detect-libc'>detect-libc</option>
<option value='doc/0.8'>doc/0.8</option>
<option value='dylan/callback-fulfilled-after-rejection'>dylan/callback-fulfilled-after-rejection</option>
<option value='dylan/change-pathname-assert'>dylan/change-pathname-assert</option>
<option value='dylan/cli-fixes'>dylan/cli-fixes</option>
<option value='dylan/encoding-fix'>dylan/encoding-fix</option>
<option value='dylan/fix-bundling-lodash-es-is-buffer'>dylan/fix-bundling-lodash-es-is-buffer</option>
<option value='dylan/fix-error-inlining'>dylan/fix-error-inlining</option>
<option value='dylan/fix-module-field-in-exports'>dylan/fix-module-field-in-exports</option>
<option value='dylan/github-api-option'>dylan/github-api-option</option>
<option value='dylan/github-dependencies'>dylan/github-dependencies</option>
<option value='dylan/import-file-path'>dylan/import-file-path</option>
<option value='dylan/non-enumerable-export-values'>dylan/non-enumerable-export-values</option>
<option value='dylan/resolve-rope-in-string'>dylan/resolve-rope-in-string</option>
<option value='dylan/set-exit-code'>dylan/set-exit-code</option>
<option value='dylan/source-map-names-property'>dylan/source-map-names-property</option>
<option value='eventstream'>eventstream</option>
<option value='feat/ecosystem'>feat/ecosystem</option>
<option value='feat/npm'>feat/npm</option>
<option value='fix'>fix</option>
<option value='fix-prepare-stack-trace'>fix-prepare-stack-trace</option>
<option value='fix-websocket-upgrade'>fix-websocket-upgrade</option>
<option value='fs-watch-file'>fs-watch-file</option>
<option value='got'>got</option>
<option value='guides-3'>guides-3</option>
<option value='improve-docker'>improve-docker</option>
<option value='insensitive-pkg-names'>insensitive-pkg-names</option>
<option value='integration-tests'>integration-tests</option>
<option value='jarred/5859'>jarred/5859</option>
<option value='jarred/actions'>jarred/actions</option>
<option value='jarred/add-git'>jarred/add-git</option>
<option value='jarred/analytics'>jarred/analytics</option>
<option value='jarred/arenas'>jarred/arenas</option>
<option value='jarred/ast'>jarred/ast</option>
<option value='jarred/ast-again'>jarred/ast-again</option>
<option value='jarred/async_bio'>jarred/async_bio</option>
<option value='jarred/bench'>jarred/bench</option>
<option value='jarred/brotli'>jarred/brotli</option>
<option value='jarred/bump-uws'>jarred/bump-uws</option>
<option value='jarred/bundle-workspace-packages'>jarred/bundle-workspace-packages</option>
<option value='jarred/bunfig'>jarred/bunfig</option>
<option value='jarred/callable'>jarred/callable</option>
<option value='jarred/canvas'>jarred/canvas</option>
<option value='jarred/ci-check'>jarred/ci-check</option>
<option value='jarred/cjs2'>jarred/cjs2</option>
<option value='jarred/cleanup-error'>jarred/cleanup-error</option>
<option value='jarred/clipboard-objc'>jarred/clipboard-objc</option>
<option value='jarred/direct'>jarred/direct</option>
<option value='jarred/dump'>jarred/dump</option>
<option value='jarred/edgecase'>jarred/edgecase</option>
<option value='jarred/esbuild-plugin-api'>jarred/esbuild-plugin-api</option>
<option value='jarred/escapeHTML'>jarred/escapeHTML</option>
<option value='jarred/esm-conditions'>jarred/esm-conditions</option>
<option value='jarred/experiment-bsp'>jarred/experiment-bsp</option>
<option value='jarred/export-star-flat'>jarred/export-star-flat</option>
<option value='jarred/exports-map'>jarred/exports-map</option>
<option value='jarred/faster-error-capturestacktrace'>jarred/faster-error-capturestacktrace</option>
<option value='jarred/faster-ordered-properties'>jarred/faster-ordered-properties</option>
<option value='jarred/fastmalloc'>jarred/fastmalloc</option>
<option value='jarred/fetch-experiment'>jarred/fetch-experiment</option>
<option value='jarred/fetchheaders'>jarred/fetchheaders</option>
<option value='jarred/fix-blob-slice-test'>jarred/fix-blob-slice-test</option>
<option value='jarred/fix-bunbun-on-wsl'>jarred/fix-bunbun-on-wsl</option>
<option value='jarred/fix-crash'>jarred/fix-crash</option>
<option value='jarred/fix-http-compression'>jarred/fix-http-compression</option>
<option value='jarred/fix-issue-with-tsconfig-run'>jarred/fix-issue-with-tsconfig-run</option>
<option value='jarred/fix-proxy-regression' selected='selected'>jarred/fix-proxy-regression</option>
<option value='jarred/fixes-3129'>jarred/fixes-3129</option>
<option value='jarred/gen'>jarred/gen</option>
<option value='jarred/htmlrewriter'>jarred/htmlrewriter</option>
<option value='jarred/improve-testing'>jarred/improve-testing</option>
<option value='jarred/inquirer'>jarred/inquirer</option>
<option value='jarred/isolation'>jarred/isolation</option>
<option value='jarred/jsc'>jarred/jsc</option>
<option value='jarred/land'>jarred/land</option>
<option value='jarred/landing'>jarred/landing</option>
<option value='jarred/linux'>jarred/linux</option>
<option value='jarred/live-bindings'>jarred/live-bindings</option>
<option value='jarred/make-strings-better'>jarred/make-strings-better</option>
<option value='jarred/mdx-thrwawy'>jarred/mdx-thrwawy</option>
<option value='jarred/move'>jarred/move</option>
<option value='jarred/napi'>jarred/napi</option>
<option value='jarred/new-bund'>jarred/new-bund</option>
<option value='jarred/new-bund-ressurected-branch'>jarred/new-bund-ressurected-branch</option>
<option value='jarred/new-http'>jarred/new-http</option>
<option value='jarred/no-more-npm'>jarred/no-more-npm</option>
<option value='jarred/package-mapper'>jarred/package-mapper</option>
<option value='jarred/pg'>jarred/pg</option>
<option value='jarred/port'>jarred/port</option>
<option value='jarred/possibly-2732'>jarred/possibly-2732</option>
<option value='jarred/postgresql'>jarred/postgresql</option>
<option value='jarred/precompile-linux-dependencies'>jarred/precompile-linux-dependencies</option>
<option value='jarred/prepare-for-libuv'>jarred/prepare-for-libuv</option>
<option value='jarred/profiled-call'>jarred/profiled-call</option>
<option value='jarred/read-tsconfig-jsx'>jarred/read-tsconfig-jsx</option>
<option value='jarred/redo-evaluation-order'>jarred/redo-evaluation-order</option>
<option value='jarred/redo-zigstring-for-utf16'>jarred/redo-zigstring-for-utf16</option>
<option value='jarred/relay'>jarred/relay</option>
<option value='jarred/rename'>jarred/rename</option>
<option value='jarred/repl'>jarred/repl</option>
<option value='jarred/request-finalizer'>jarred/request-finalizer</option>
<option value='jarred/rewrite-router'>jarred/rewrite-router</option>
<option value='jarred/run'>jarred/run</option>
<option value='jarred/simdjson'>jarred/simdjson</option>
<option value='jarred/simplify'>jarred/simplify</option>
<option value='jarred/some-fixes-for-eventsource'>jarred/some-fixes-for-eventsource</option>
<option value='jarred/standalone-repro1'>jarred/standalone-repro1</option>
<option value='jarred/start'>jarred/start</option>
<option value='jarred/strong'>jarred/strong</option>
<option value='jarred/subprocess'>jarred/subprocess</option>
<option value='jarred/support-tee'>jarred/support-tee</option>
<option value='jarred/tcc'>jarred/tcc</option>
<option value='jarred/throw-if'>jarred/throw-if</option>
<option value='jarred/update-install-stuff'>jarred/update-install-stuff</option>
<option value='jarred/update-zig1'>jarred/update-zig1</option>
<option value='jarred/upgrade-zig-2'>jarred/upgrade-zig-2</option>
<option value='jarred/uws'>jarred/uws</option>
<option value='jarred/webkit-upgrade-may-17'>jarred/webkit-upgrade-may-17</option>
<option value='jarred/wip-more-reliable'>jarred/wip-more-reliable</option>
<option value='jarred/workers'>jarred/workers</option>
<option value='jarred/zlib'>jarred/zlib</option>
<option value='jarred/zls'>jarred/zls</option>
<option value='lithdew/picohttp-mimalloc'>lithdew/picohttp-mimalloc</option>
<option value='main'>main</option>
<option value='move-templates'>move-templates</option>
<option value='nestjs-guide'>nestjs-guide</option>
<option value='next-cleanup'>next-cleanup</option>
<option value='origin/main'>origin/main</option>
<option value='plugin/plugindata'>plugin/plugindata</option>
<option value='plugin/resolvedir'>plugin/resolvedir</option>
<option value='postinstall_3'>postinstall_3</option>
<option value='repl'>repl</option>
<option value='request-body-stream'>request-body-stream</option>
<option value='reserve-commands'>reserve-commands</option>
<option value='revert-5167-dylan/decode-regex-if-needed'>revert-5167-dylan/decode-regex-if-needed</option>
<option value='rfc/bun-bundler-api'>rfc/bun-bundler-api</option>
<option value='rfc/bunfig-overhaul'>rfc/bunfig-overhaul</option>
<option value='save-in-update'>save-in-update</option>
<option value='sdl'>sdl</option>
<option value='test/action'>test/action</option>
<option value='types/mock'>types/mock</option>
<option value='types/readable-stream-default'>types/readable-stream-default</option>
<option value='types/tty'>types/tty</option>
<option value='u/vjpr/zig-0.10'>u/vjpr/zig-0.10</option>
<option value='xHyroM/types/expose-Bun-Env'>xHyroM/types/expose-Bun-Env</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>Unnamed repository; edit this file 'description' to name the repository.</td><td class='sub right'></td></tr></table>
<table class='tabs'><tr><td>
<a href='/ansg191/bun/about/?h=jarred/fix-proxy-regression'>about</a><a href='/ansg191/bun/?h=jarred/fix-proxy-regression'>summary</a><a href='/ansg191/bun/refs/?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c'>refs</a><a class='active' href='/ansg191/bun/log/src/js_ast.zig?h=jarred/fix-proxy-regression&amp;follow=1'>log</a><a href='/ansg191/bun/tree/src/js_ast.zig?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c'>tree</a><a href='/ansg191/bun/commit/src/js_ast.zig?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c&amp;follow=1'>commit</a><a href='/ansg191/bun/diff/src/js_ast.zig?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c&amp;follow=1'>diff</a></td><td class='form'><form class='right' method='get' action='/ansg191/bun/log/src/js_ast.zig'>
<input type='hidden' name='h' value='jarred/fix-proxy-regression'/><input type='hidden' name='id' value='395deef793ca895d13f365bdbb5051183c16c52c'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/ansg191/bun/log/?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c&amp;follow=1'>root</a>/<a href='/ansg191/bun/log/src?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c&amp;follow=1'>src</a>/<a href='/ansg191/bun/log/src/js_ast.zig?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c&amp;follow=1'>js_ast.zig</a> (<a href='/ansg191/bun/log/src/js_ast.zig?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c'>unfollow</a>)</div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/ansg191/bun/log/src/js_ast.zig?h=jarred/fix-proxy-regression&amp;id=395deef793ca895d13f365bdbb5051183c16c52c&amp;showmsg=1&amp;follow=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
<tr><td><span title='2021-06-06 21:17:43 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/src/bundler.zig?h=jarred/fix-proxy-regression&amp;id=9f74fba3951934034a573bd5bf5cda7617474eb0&amp;follow=1'>Fix crash that happens when hundreds of files have been parsed and process.en...</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-18</span>/<span class='insertions'>+26</span></td></tr>
<tr><td><span title='2021-06-06 21:16:50 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/src/json_parser.zig?h=jarred/fix-proxy-regression&amp;id=f96f299377ce00afce0a4fd2dda681e417511855&amp;follow=1'>hash</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>2</td><td><span class='deletions'>-3</span>/<span class='insertions'>+3</span></td></tr>
<tr><td><span title='2021-06-06 21:16:43 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/src/string_immutable.zig?h=jarred/fix-proxy-regression&amp;id=079fe523d4c397c5e4d877cc2faf8d29139e0a07&amp;follow=1'>Upgrade hash table</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>9</td><td><span class='deletions'>-66</span>/<span class='insertions'>+126</span></td></tr>
<tr><td><span title='2021-06-06 21:15:07 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/src/js_printer.zig?h=jarred/fix-proxy-regression&amp;id=13653a93a2a4181fcea35576338fe24f465fc748&amp;follow=1'>Fix bug printing large scientific notation floats</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-9</span>/<span class='insertions'>+29</span></td></tr>
<tr><td><span title='2021-06-06 18:34:16 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/esdev.before-comptime-js-parser.REMOVED.git-id?h=jarred/fix-proxy-regression&amp;id=19d472c8470fc21a10af053824b3724e50ac9a9d&amp;follow=1'>hm</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>14</td><td><span class='deletions'>-186</span>/<span class='insertions'>+167</span></td></tr>
<tr><td><span title='2021-06-06 18:34:01 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/src/test/fixtures/nql-define.js?h=jarred/fix-proxy-regression&amp;id=d49e0a5fa129152c27b70a57d1cc7a2af770577c&amp;follow=1'>WIP node module bundles</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>22</td><td><span class='deletions'>-1047</span>/<span class='insertions'>+1411</span></td></tr>
<tr><td><span title='2021-06-06 18:33:53 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/.gitignore?h=jarred/fix-proxy-regression&amp;id=e66466cc1a453db1370a199a32729441747761bb&amp;follow=1'>wip</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+2</span></td></tr>
<tr><td><span title='2021-06-06 14:12:52 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/src/global.zig?h=jarred/fix-proxy-regression&amp;id=69627d8a47ca882841d462552f6d4a94611ab5e2&amp;follow=1'>debug-only print</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-0</span>/<span class='insertions'>+12</span></td></tr>
<tr><td><span title='2021-06-06 14:12:08 -0700'>2021-06-06</span></td><td><a href='/ansg191/bun/commit/src/api/schema.zig?h=jarred/fix-proxy-regression&amp;id=f4245c90e8b3562b78b16678fb668df3a8f563f5&amp;follow=1'>Bump schema</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>4</td><td><span class='deletions'>-0</span>/<span class='insertions'>+926</span></td></tr>
<tr><td><span title='2021-06-04 19:30:26 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/js_parser/js_parser.zig?h=jarred/fix-proxy-regression&amp;id=913891905f6d21bd7e044b034311fbd6cd204c00&amp;follow=1'>Generate parser versions at compile time</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-9667</span>/<span class='insertions'>+9690</span></td></tr>
<tr><td><span title='2021-06-04 19:30:08 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/cli.zig?h=jarred/fix-proxy-regression&amp;id=9dc7f258259e95fcdb1d5d7d3db0a41992efa79e&amp;follow=1'>oops typescript</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>2</td><td><span class='deletions'>-3</span>/<span class='insertions'>+7</span></td></tr>
<tr><td><span title='2021-06-04 18:26:55 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/string_mutable.zig?h=jarred/fix-proxy-regression&amp;id=faa3c867e21c3af023b584c1798b09e947a21670&amp;follow=1'>Fix extra space in printer</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>3</td><td><span class='deletions'>-28</span>/<span class='insertions'>+52</span></td></tr>
<tr><td><span title='2021-06-04 17:33:11 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/string_mutable.zig?h=jarred/fix-proxy-regression&amp;id=756c41719cd63ff3dc4b695d42ddf88a63cd8abd&amp;follow=1'>Fix extra underscore in ensureValidIdentifier</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>2</td><td><span class='deletions'>-14</span>/<span class='insertions'>+21</span></td></tr>
<tr><td><span title='2021-06-04 16:06:38 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/resolver/tsconfig_json.zig?h=jarred/fix-proxy-regression&amp;id=65f4ea1e189aad169efc010052eadf378202e653&amp;follow=1'>Generate differnet versions of Bundler, Resolver, and Caches at comptime base...</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>10</td><td><span class='deletions'>-2236</span>/<span class='insertions'>+2303</span></td></tr>
<tr><td><span title='2021-06-04 14:46:46 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/options.zig?h=jarred/fix-proxy-regression&amp;id=3d827342a57f424add2e62bfe5243fadbaa92600&amp;follow=1'>mostly fix --resolve=disable</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>3</td><td><span class='deletions'>-29</span>/<span class='insertions'>+145</span></td></tr>
<tr><td><span title='2021-06-04 13:50:22 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/resolver/resolver.zig?h=jarred/fix-proxy-regression&amp;id=ea2a4aa181d3ea804cdd7dd4e4d52cc2d5488838&amp;follow=1'>rename</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>3</td><td><span class='deletions'>-10</span>/<span class='insertions'>+9</span></td></tr>
<tr><td><span title='2021-06-04 03:46:52 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/resolver/resolver.zig?h=jarred/fix-proxy-regression&amp;id=76267469045a9b073ff523d19d31bc8669a6a44c&amp;follow=1'>readme was premature</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>4</td><td><span class='deletions'>-150</span>/<span class='insertions'>+16</span></td></tr>
<tr><td><span title='2021-06-04 02:47:07 -0700'>2021-06-04</span></td><td><a href='/ansg191/bun/commit/src/timer.zig?h=jarred/fix-proxy-regression&amp;id=fa2f60cdd529c589505f2ec5fa2eb21c5abf8aaa&amp;follow=1'>fix the leaks</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>15</td><td><span class='deletions'>-566</span>/<span class='insertions'>+21587</span></td></tr>
<tr><td><span title='2021-06-02 20:37:04 -0700'>2021-06-02</span></td><td><a href='/ansg191/bun/commit/src/main.zig?h=jarred/fix-proxy-regression&amp;id=21a1134de36e25b3559fac88243d1a9e1c7ca273&amp;follow=1'>okl</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>5</td><td><span class='deletions'>-13</span>/<span class='insertions'>+39</span></td></tr>
<tr><td><span title='2021-06-02 20:36:23 -0700'>2021-06-02</span></td><td><a href='/ansg191/bun/commit/src/http.zig?h=jarred/fix-proxy-regression&amp;id=3bd725d80b9b3892e42a2c9e549b9a90b084252e&amp;follow=1'>keep that</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-2</span>/<span class='insertions'>+2</span></td></tr>
<tr><td><span title='2021-06-02 16:39:40 -0700'>2021-06-02</span></td><td><a href='/ansg191/bun/commit/src/timer.zig?h=jarred/fix-proxy-regression&amp;id=da0bb118dc130c42606aa2688298d14060fc4354&amp;follow=1'>HTTP fixes + buffer stdout/in + a little HTTP caching</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>15</td><td><span class='deletions'>-108</span>/<span class='insertions'>+241</span></td></tr>
<tr><td><span title='2021-06-02 12:48:38 -0700'>2021-06-02</span></td><td><a href='/ansg191/bun/commit/src/runtime.js?h=jarred/fix-proxy-regression&amp;id=ddd5ed1cc2e64f151864bd977cedcefa6929fb74&amp;follow=1'>JSX &amp; CJS work end-to-end!</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>7</td><td><span class='deletions'>-157</span>/<span class='insertions'>+292</span></td></tr>
<tr><td><span title='2021-06-01 20:49:49 -0700'>2021-06-01</span></td><td><a href='/ansg191/bun/commit/src/test/fixtures/object-newline.js?h=jarred/fix-proxy-regression&amp;id=ee6643ce8b8b3ac32d5ba71d2617b38bb03379af&amp;follow=1'>wip</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>32</td><td><span class='deletions'>-793</span>/<span class='insertions'>+13870</span></td></tr>
<tr><td><span title='2021-05-31 20:30:40 -0700'>2021-05-31</span></td><td><a href='/ansg191/bun/commit/src/runtime.js?h=jarred/fix-proxy-regression&amp;id=38f1eb07012eaf0e09400ba06d06fe15007a9022&amp;follow=1'>linker things</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>9</td><td><span class='deletions'>-183</span>/<span class='insertions'>+322</span></td></tr>
<tr><td><span title='2021-05-30 23:35:43 -0700'>2021-05-30</span></td><td><a href='/ansg191/bun/commit/src/resolver/resolve_path.zig?h=jarred/fix-proxy-regression&amp;id=87d01c9f4a315341c1c5f57e09e29df88ce9c996&amp;follow=1'>Fix printing bugs</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>8</td><td><span class='deletions'>-44</span>/<span class='insertions'>+206</span></td></tr>
<tr><td><span title='2021-05-30 18:26:18 -0700'>2021-05-30</span></td><td><a href='/ansg191/bun/commit/src/test/fixtures/object-newline.js?h=jarred/fix-proxy-regression&amp;id=dd72bf5ab657af89d45ee629e8432d9b860a2351&amp;follow=1'>cool</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>9</td><td><span class='deletions'>-3</span>/<span class='insertions'>+54</span></td></tr>
<tr><td><span title='2021-05-30 15:42:47 -0700'>2021-05-30</span></td><td><a href='/ansg191/bun/commit/src/global.zig?h=jarred/fix-proxy-regression&amp;id=741d35f0b3f50edd58592259890ca0ef71d2b8dd&amp;follow=1'>stderr</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>3</td><td><span class='deletions'>-6</span>/<span class='insertions'>+10</span></td></tr>
<tr><td><span title='2021-05-30 15:32:39 -0700'>2021-05-30</span></td><td><a href='/ansg191/bun/commit/src/js_printer.zig?h=jarred/fix-proxy-regression&amp;id=0e74b0081c63c674bc7a1a6d0d69ffabdd19dd5b&amp;follow=1'>Fix indent</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-117</span>/<span class='insertions'>+56</span></td></tr>
<tr><td><span title='2021-05-30 12:50:08 -0700'>2021-05-30</span></td><td><a href='/ansg191/bun/commit/src/resolver/package_json.zig?h=jarred/fix-proxy-regression&amp;id=d264d4e4ba40ae754765afcc3d134beb4521a5cd&amp;follow=1'>Fix Define, JSX, use more pointers for property access to minimize calls to m...</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>9</td><td><span class='deletions'>-795</span>/<span class='insertions'>+364</span></td></tr>
<tr><td><span title='2021-05-30 01:17:55 -0700'>2021-05-30</span></td><td><a href='/ansg191/bun/commit/src/js_parser/js_parser.zig?h=jarred/fix-proxy-regression&amp;id=534f9cf509a1816734ff77af0ae132069b25761c&amp;follow=1'>This'll do for now, I guess.</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>3</td><td><span class='deletions'>-466</span>/<span class='insertions'>+168</span></td></tr>
<tr><td><span title='2021-05-30 00:17:17 -0700'>2021-05-30</span></td><td><a href='/ansg191/bun/commit/src/js_printer.zig?h=jarred/fix-proxy-regression&amp;id=d1db1fdd79ae34f443c3ab701016790737980458&amp;follow=1'>This blocks approach seems to work</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>6</td><td><span class='deletions'>-781</span>/<span class='insertions'>+469</span></td></tr>
<tr><td><span title='2021-05-29 19:55:35 -0700'>2021-05-29</span></td><td><a href='/ansg191/bun/commit/src/thread_safe_hash_map.zig?h=jarred/fix-proxy-regression&amp;id=2a54b9f13803a06514c1681464a4a86c0c15f978&amp;follow=1'>Revert "WIP"</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>8</td><td><span class='deletions'>-498</span>/<span class='insertions'>+653</span></td></tr>
<tr><td><span title='2021-05-29 17:40:00 -0700'>2021-05-29</span></td><td><a href='/ansg191/bun/commit/src/thread_safe_hash_map.zig?h=jarred/fix-proxy-regression&amp;id=b5612b303b934b668c35c1a70d64f498b7c62856&amp;follow=1'>WIP</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>8</td><td><span class='deletions'>-653</span>/<span class='insertions'>+498</span></td></tr>
<tr><td><span title='2021-05-29 13:33:48 -0700'>2021-05-29</span></td><td><a href='/ansg191/bun/commit/src/thread_safe_hash_map.zig?h=jarred/fix-proxy-regression&amp;id=3436ee9deddf21594a0b4fb3640a7596ea078093&amp;follow=1'>microp</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>7</td><td><span class='deletions'>-25</span>/<span class='insertions'>+92</span></td></tr>
<tr><td><span title='2021-05-29 13:33:37 -0700'>2021-05-29</span></td><td><a href='/ansg191/bun/commit/src/cli.zig?h=jarred/fix-proxy-regression&amp;id=923e2c5c5d43adce832c8eb4999a8070dbd8cced&amp;follow=1'>fix crash</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td><span title='2021-05-29 13:33:31 -0700'>2021-05-29</span></td><td><a href='/ansg191/bun/commit/src/hash_map.zig?h=jarred/fix-proxy-regression&amp;id=bbc95209f00ae44db6b765a9a92c2f8683acd4ed&amp;follow=1'>microp-optimize hash table stuff</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-4</span>/<span class='insertions'>+36</span></td></tr>
<tr><td><span title='2021-05-29 13:32:13 -0700'>2021-05-29</span></td><td><a href='/ansg191/bun/commit/src/Wyhash.zig?h=jarred/fix-proxy-regression&amp;id=e73da759b9ec6281844db04e4ca8cc288c4d7c3e&amp;follow=1'>Move wyhasxh</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-0</span>/<span class='insertions'>+0</span></td></tr>
<tr><td><span title='2021-05-28 23:48:10 -0700'>2021-05-28</span></td><td><a href='/ansg191/bun/commit/src/js_ast.zig?h=jarred/fix-proxy-regression&amp;id=6e8e16d91655cebb3ad78a16ab307ef35674007a&amp;follow=1'>2</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+4</span></td></tr>
<tr><td><span title='2021-05-28 23:26:13 -0700'>2021-05-28</span></td><td><a href='/ansg191/bun/commit/src/test/fixtures/await.ts?h=jarred/fix-proxy-regression&amp;id=05ec7232bfc97894ae8f04d313fed97c1d619503&amp;follow=1'>all</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>14</td><td><span class='deletions'>-89</span>/<span class='insertions'>+591</span></td></tr>
<tr><td><span title='2021-05-28 23:04:40 -0700'>2021-05-28</span></td><td><a href='/ansg191/bun/commit/src/js_parser/imports.zig?h=jarred/fix-proxy-regression&amp;id=254a2b779b2b51616f8ab895bd9d54b984b73a2c&amp;follow=1'>w</a></td><td><img src='//www.gravatar.com/avatar/764ea52180f7f5236744034dd5e1a3c0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+4</span></td></tr>
