import type { FunctionalComponent } from 'preact';
import { h } from 'preact';
import { useState, useEffect, useRef } from 'preact/hooks';
import EditOnGithub from './EditOnGithub';

const DocSidebar: FunctionalComponent<{ headers: any[]; editHref: string }> = ({ headers = [], editHref }) => {
  const itemOffsets = useRef([]);
  const [activeId, setActiveId] = useState<string>(undefined);

  useEffect(() => {
    const getItemOffsets = () => {
      const titles = document.querySelectorAll('article :is(h2, h3, h4)');
      itemOffsets.current = Array.from(titles).map((title) => ({
        id: title.id,
        topOffset: title.getBoundingClientRect().top + window.scrollY,
      }));
    };

    const onScroll = () => {
      const itemIndex = itemOffsets.current.findIndex((item) => item.topOffset > window.scrollY + window.innerHeight / 3);
      if (itemIndex === 0) {
        setActiveId(undefined);
      } else if (itemIndex === -1) {
        setActiveId(itemOffsets.current[itemOffsets.current.length - 1].id);
      } else {
        setActiveId(itemOffsets.current[itemIndex - 1].id);
      }
    };

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

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

  return (
    <nav>
      <div>
        <h4>Contents</h4>
        <ul>
          {headers
            .filter(({ depth }) => depth > 1 && depth < 5)
            .map((header) => (
              <li class={`header-link depth-${header.depth} ${activeId === header.slug ? 'active' : ''}`.trim()}>
                <a href={`#${header.slug}`}>{header.text}</a>
              </li>
            ))}
        </ul>
      </div>
      <div>
        <EditOnGithub href={editHref} />
      </div>
    </nav>
  );
};

export default DocSidebar;
ndshake'>ciro/ws-fetch-proper-handshake</option>
<option value='cli-flags'>cli-flags</option>
<option value='completions'>completions</option>
<option value='create-constructors-when-needed'>create-constructors-when-needed</option>
<option value='dap2'>dap2</option>
<option value='dap3'>dap3</option>
<option value='dave/assert-double-is-valid'>dave/assert-double-is-valid</option>
<option value='dave/bundler-string-length'>dave/bundler-string-length</option>
<option value='dave/es5-class-helper'>dave/es5-class-helper</option>
<option value='dave/import.meta.resolve'>dave/import.meta.resolve</option>
<option value='dave/install-tag-without-dash'>dave/install-tag-without-dash</option>
<option 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' selected='selected'>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'>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=dylan/github-api-option'>about</a><a href='/ansg191/bun/?h=dylan/github-api-option'>summary</a><a href='/ansg191/bun/refs/?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc'>refs</a><a class='active' href='/ansg191/bun/log/test/snippets/jsx-top-level.tsx?h=dylan/github-api-option&amp;follow=1'>log</a><a href='/ansg191/bun/tree/test/snippets/jsx-top-level.tsx?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc'>tree</a><a href='/ansg191/bun/commit/test/snippets/jsx-top-level.tsx?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc&amp;follow=1'>commit</a><a href='/ansg191/bun/diff/test/snippets/jsx-top-level.tsx?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc&amp;follow=1'>diff</a></td><td class='form'><form class='right' method='get' action='/ansg191/bun/log/test/snippets/jsx-top-level.tsx'>
<input type='hidden' name='h' value='dylan/github-api-option'/><input type='hidden' name='id' value='40d00a961ec4aa4398e18bada520eaf5791151cc'/><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=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc&amp;follow=1'>root</a>/<a href='/ansg191/bun/log/test?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc&amp;follow=1'>test</a>/<a href='/ansg191/bun/log/test/snippets?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc&amp;follow=1'>snippets</a>/<a href='/ansg191/bun/log/test/snippets/jsx-top-level.tsx?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc&amp;follow=1'>jsx-top-level.tsx</a> (<a href='/ansg191/bun/log/test/snippets/jsx-top-level.tsx?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc'>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/test/snippets/jsx-top-level.tsx?h=dylan/github-api-option&amp;id=40d00a961ec4aa4398e18bada520eaf5791151cc&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='2023-08-08 19:37:36 -0700'>2023-08-08</span></td><td><a href='/ansg191/bun/commit/test/js/node/module/node-module-module.test.js?h=dylan/github-api-option&amp;id=1941dbbd71c6d6730ca78b21ef2fd20f51124950&amp;follow=1'>Set exports to {} in user-constructed CommonJSModuleRecords (#4076)</a></td><td><img src='//www.gravatar.com/avatar/7eeb3c9446e467f71ba578a6fcc9c614?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> dave caruso
</td><td>2</td><td><span class='deletions'>-1</span>/<span class='insertions'>+8</span></td></tr>
<tr><td><span title='2023-08-08 18:23:33 -0700'>2023-08-08</span></td><td><a href='/ansg191/bun/commit/test/js/node/module/node-module-module.test.js?h=dylan/github-api-option&amp;id=320cdcf97e549c45ab50bbbc3c415dc011260f20&amp;follow=1'>Fix require("console") #3820 (#4073)</a></td><td><img src='//www.gravatar.com/avatar/7eeb3c9446e467f71ba578a6fcc9c614?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> dave caruso
</td><td>3</td><td><span class='deletions'>-2</span>/<span class='insertions'>+9</span></td></tr>
<tr><td><span title='2023-08-08 15:08:16 -0700'>2023-08-08</span></td><td><a href='/ansg191/bun/commit/src/bun.js/bindings/webcore/Worker.cpp?h=dylan/github-api-option&amp;id=454407003e97d6896dc16d9b0145f50d183a0529&amp;follow=1'>Update Worker.cpp</a></td><td><img src='//www.gravatar.com/avatar/0f2ac0141773b63a6cd646063e7ebfca?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Dylan Conway
</td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+0</span></td></tr>
<tr><td><span title='2023-08-08 07:03:18 -0700'>2023-08-08</span></td><td><a href='/ansg191/bun/commit/test/js/node/path/path.test.js?h=dylan/github-api-option&amp;id=511f6bdf79ca64193219e5e9dcfa4bbc2717242a&amp;follow=1'>1. Check if the argument is an empty string in `path.format`. (#4064)</a></td><td><img src='//www.gravatar.com/avatar/f5e958b74d4aa97583ba7956d3e033ff?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Ai Hoshino
</td><td>2</td><td><span class='deletions'>-67</span>/<span class='insertions'>+213</span></td></tr>
<tr><td><span title='2023-08-08 01:42:44 -0700'>2023-08-08</span></td><td><a href='/ansg191/bun/commit/test/js/bun/resolve/import-meta.test.js?h=dylan/github-api-option&amp;id=320ee6b6b78bb2b9752efff45e83167e532c0b9d&amp;follow=1'>import bun (#4055)</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'>-18</span>/<span class='insertions'>+61</span></td></tr>
<tr><td><span title='2023-08-08 01:18:36 -0700'>2023-08-08</span></td><td><a href='/ansg191/bun/commit/test/js/web/fetch/headers.test.ts?h=dylan/github-api-option&amp;id=38df5b146fab5e8b7d8d52e81ce1d385c3590f3d&amp;follow=1'>Enable `Headers.prototype.getSetCookie`</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>2</td><td><span class='deletions'>-25</span>/<span class='insertions'>+11</span></td></tr>
<tr><td><span title='2023-08-08 00:31:46 -0700'>2023-08-08</span></td><td><a href='/ansg191/bun/commit/src/bun.js/bindings/webcore/JSWorker.cpp?h=dylan/github-api-option&amp;id=25c91aecab8aae72f030843abfcdeee2595fc9d1&amp;follow=1'>Remove printf</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?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'>+0</span></td></tr>
<tr><td><span title='2023-08-07 23:58:38 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/test/js/web/worker.test.ts?h=dylan/github-api-option&amp;id=5497accbdb14da9e361175ad1cd074731b7f8eeb&amp;follow=1'>Add `env` option for `node:worker_threads` (#4052)</a></td><td><img src='//www.gravatar.com/avatar/7eeb3c9446e467f71ba578a6fcc9c614?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> dave caruso
</td><td>23</td><td><span class='deletions'>-185</span>/<span class='insertions'>+723</span></td></tr>
<tr><td><span title='2023-08-07 23:30:05 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/test/js/bun/util/hash.test.js?h=dylan/github-api-option&amp;id=182e600eb79655e85b3f0371bc46fc4de8e70094&amp;follow=1'>Fix `Bun.hash` functions (#4054)</a></td><td><img src='//www.gravatar.com/avatar/958d0baeae1a0aad456542208e99986b?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> jhmaster
</td><td>4</td><td><span class='deletions'>-37</span>/<span class='insertions'>+42</span></td></tr>
<tr><td><span title='2023-08-07 22:40:32 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/src/bun.js/web_worker.zig?h=dylan/github-api-option&amp;id=cb873cc0818d02216ac7285c58fe59883220d1a9&amp;follow=1'>fix `worker.ref()`</a></td><td><img src='//www.gravatar.com/avatar/0f2ac0141773b63a6cd646063e7ebfca?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Dylan Conway
</td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td><span title='2023-08-07 21:14:42 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/src/cli.zig?h=dylan/github-api-option&amp;id=330d19e34444702c07a3f59f8b2e8c043a8fe368&amp;follow=1'>add bun update to help menu</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?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'>+2</span></td></tr>
<tr><td><span title='2023-08-07 20:15:53 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/test/js/web/fetch/fetch.test.ts?h=dylan/github-api-option&amp;id=2fe6a965af394db7228dce56ce29b629c650764c&amp;follow=1'>implement fetching data urls (#4000)</a></td><td><img src='//www.gravatar.com/avatar/9c0e69537b9d9493708725dd4c91e3af?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Dylan Conway
</td><td>10</td><td><span class='deletions'>-21</span>/<span class='insertions'>+244</span></td></tr>
<tr><td><span title='2023-08-07 20:11:32 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/test/cli/install/bun-update.test.ts?h=dylan/github-api-option&amp;id=a32097aa9f53f7c8ea1331c61dc2658bc1b11208&amp;follow=1'>implement `bun update` (#4046)</a></td><td><img src='//www.gravatar.com/avatar/e38c5ad2cb13f012227c5b00f1763175?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Alex Lam S.L
</td><td>5</td><td><span class='deletions'>-89</span>/<span class='insertions'>+389</span></td></tr>
<tr><td><span title='2023-08-07 19:32:23 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/test/js/web/fetch/fetch.test.ts?h=dylan/github-api-option&amp;id=1239c9460ac1d10376e27653b4c34d789f2a8f43&amp;follow=1'>fix iterating headers with `set-cookie` (#4048)</a></td><td><img src='//www.gravatar.com/avatar/9c0e69537b9d9493708725dd4c91e3af?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Dylan Conway
</td><td>5</td><td><span class='deletions'>-53</span>/<span class='insertions'>+51</span></td></tr>
<tr><td><span title='2023-08-07 18:51:16 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/test/js/node/path/path.test.js?h=dylan/github-api-option&amp;id=f2f227720b3ffe1797a0a4e500e9a9a639167dc6&amp;follow=1'>WASM test analyzer (#4043)</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>25</td><td><span class='deletions'>-169</span>/<span class='insertions'>+965</span></td></tr>
<tr><td><span title='2023-08-07 14:02:43 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/docs/runtime/plugins.md?h=dylan/github-api-option&amp;id=0b183beb51367004795d8a431eb06bb2fa4f8250&amp;follow=1'>Improve plugin docs</a></td><td><img src='//www.gravatar.com/avatar/7314f20052c467b4e5b959ac03e39ff0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Colin McDonnell
</td><td>3</td><td><span class='deletions'>-306</span>/<span class='insertions'>+283</span></td></tr>
<tr><td><span title='2023-08-07 06:44:04 -0700'>2023-08-07</span></td><td><a href='/ansg191/bun/commit/test/js/node/path/path.test.js?h=dylan/github-api-option&amp;id=5ce393aab815f38ce9594d8a7d481a608ee8524c&amp;follow=1'>Fix `path.normalize` edge case. (#4042)</a></td><td><img src='//www.gravatar.com/avatar/f5e958b74d4aa97583ba7956d3e033ff?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Ai Hoshino
</td><td>2</td><td><span class='deletions'>-1</span>/<span class='insertions'>+2</span></td></tr>
<tr><td><span title='2023-08-06 22:49:10 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/test/js/bun/http/bun-server.test.ts?h=dylan/github-api-option&amp;id=00a907c7de842787e87b0d0a42d8d33704c5aaae&amp;follow=1'>Fixes #4001 (#4034)</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'>-9</span>/<span class='insertions'>+108</span></td></tr>
<tr><td><span title='2023-08-06 20:39:40 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/test/js/node/fs/node-fetch.test.js?h=dylan/github-api-option&amp;id=0665733b0302ac7e743e4c131c7697741fa923a5&amp;follow=1'>Fixes #4029 and fixes #4022 (#4032)</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'>-29</span>/<span class='insertions'>+34</span></td></tr>
<tr><td><span title='2023-08-06 19:30:06 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/src/http/websocket_http_client.zig?h=dylan/github-api-option&amp;id=70c3371b14293e18a5e0470e8b8cd4c04259a606&amp;follow=1'>Fixes #4010 (#4031)</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'>-24</span>/<span class='insertions'>+17</span></td></tr>
<tr><td><span title='2023-08-06 18:07:15 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/src/build-id?h=dylan/github-api-option&amp;id=0b2be88bac4301df22528f3e032026df5b512887&amp;follow=1'>Update build-id</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?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='2023-08-06 18:06:18 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/test/cli/run/require-cache-fixture.cjs?h=dylan/github-api-option&amp;id=8297fb0d2f28ff8bd3fe3bf1383d704420e73a38&amp;follow=1'>Bind require.resolve() (#4030)</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'>-13</span>/<span class='insertions'>+47</span></td></tr>
<tr><td><span title='2023-08-06 17:57:44 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/src/cli/test_command.zig?h=dylan/github-api-option&amp;id=04925bb94c12a7c961bb758d2e2f3ecbe091fff0&amp;follow=1'>Fixes #4020</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>2</td><td><span class='deletions'>-1</span>/<span class='insertions'>+6</span></td></tr>
<tr><td><span title='2023-08-06 17:43:24 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/test/regression/issue/4011.test.ts?h=dylan/github-api-option&amp;id=3185ca2d9599de18bbdd18069d411c1d775d1535&amp;follow=1'>Running missing scripts exits with non-0 (#4026)</a></td><td><img src='//www.gravatar.com/avatar/fc15bd7fb8ce8c6a8ea501655e3177b6?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Yash Sharma
</td><td>2</td><td><span class='deletions'>-1</span>/<span class='insertions'>+13</span></td></tr>
<tr><td><span title='2023-08-06 17:42:08 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/test/cli/install/bun-remove.test.ts?h=dylan/github-api-option&amp;id=b93f304c063698ada698eddc4321c5c7010e5e5d&amp;follow=1'>[install] handle `bun add` of existing `peerDependencies` correctly (#4028)</a></td><td><img src='//www.gravatar.com/avatar/e38c5ad2cb13f012227c5b00f1763175?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Alex Lam S.L
</td><td>3</td><td><span class='deletions'>-22</span>/<span class='insertions'>+98</span></td></tr>
<tr><td><span title='2023-08-06 07:55:22 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/src/sourcemap/CodeCoverage.zig?h=dylan/github-api-option&amp;id=a9b3d58353061212b7fddfd1ec13dd9f7a414f11&amp;follow=1'>fix nan</a><span class='decoration'><a class='tag-deco' href='/ansg191/bun/tag/?h=bun-v0.7.3'>bun-v0.7.3</a></span></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?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'>+3</span></td></tr>
<tr><td><span title='2023-08-06 07:48:06 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/docs/test/coverage.md?h=dylan/github-api-option&amp;id=cf483799216b5bd3470ae356559807d676cb3fb6&amp;follow=1'>Update coverage.md</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?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='2023-08-06 07:35:29 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/src/deps/lol-html?h=dylan/github-api-option&amp;id=f8026df821b615c5ce2538109200c21f9668d2a4&amp;follow=1'>Update lol-html</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?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='2023-08-06 07:35:07 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/test/js/bun/globals.test.js?h=dylan/github-api-option&amp;id=fa4e5d033e40f5af8151a0d7f55fb95b8254ceb0&amp;follow=1'>Fixes #3129 (#4018)</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'>-104</span>/<span class='insertions'>+58</span></td></tr>
<tr><td><span title='2023-08-06 06:30:23 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/test/js/node/path/path.test.js?h=dylan/github-api-option&amp;id=14624454196370e08309d4f0b0463b494e4df9ca&amp;follow=1'>Code coverage for `bun test` (#3975)</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'>-61</span>/<span class='insertions'>+1211</span></td></tr>
<tr><td><span title='2023-08-06 06:16:54 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/test/js/node/dns/node-dns.test.js?h=dylan/github-api-option&amp;id=ecdf2ffa6c615d8a431c2919c0b9bdc4cbe2c4f0&amp;follow=1'>feat: impl `dns.getServers` (#3982)</a></td><td><img src='//www.gravatar.com/avatar/f5e958b74d4aa97583ba7956d3e033ff?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Ai Hoshino
</td><td>5</td><td><span class='deletions'>-3</span>/<span class='insertions'>+135</span></td></tr>
<tr><td><span title='2023-08-06 06:13:39 -0700'>2023-08-06</span></td><td><a href='/ansg191/bun/commit/src/string_mutable.zig?h=dylan/github-api-option&amp;id=cd0774cd89f44ae3880ae5d3840787012d9df603&amp;follow=1'>Implement --test-name-pattern (#3998)</a></td><td><img src='//www.gravatar.com/avatar/7eeb3c9446e467f71ba578a6fcc9c614?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> dave caruso
</td><td>8</td><td><span class='deletions'>-7</span>/<span class='insertions'>+151</span></td></tr>
<tr><td><span title='2023-08-05 04:48:22 -0700'>2023-08-05</span></td><td><a href='/ansg191/bun/commit/src/cli/init_command.zig?h=dylan/github-api-option&amp;id=cf8650937aa03b7410c24675868eec36b7e2f390&amp;follow=1'>Fix(cli/init): support subpath entrypoint. (#4002)</a></td><td><img src='//www.gravatar.com/avatar/f5e958b74d4aa97583ba7956d3e033ff?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Ai Hoshino
</td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+8</span></td></tr>
<tr><td><span title='2023-08-05 04:42:30 -0700'>2023-08-05</span></td><td><a href='/ansg191/bun/commit/src/runtime.zig?h=dylan/github-api-option&amp;id=3803d398408044b36e1f4cf0db37c490270113f0&amp;follow=1'>Remove Bun.plugin transpiler hook, encourage usage of `--preload` instead (#3...</a></td><td><img src='//www.gravatar.com/avatar/7eeb3c9446e467f71ba578a6fcc9c614?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> dave caruso
</td><td>5</td><td><span class='deletions'>-243</span>/<span class='insertions'>+1</span></td></tr>
<tr><td><span title='2023-08-04 20:41:16 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/src/install/install.zig?h=dylan/github-api-option&amp;id=78081cbb40b3149be3fcd7f050ec365c499421d0&amp;follow=1'>Support --dev/-D and support more flags on bun install (#3989)</a></td><td><img src='//www.gravatar.com/avatar/7314f20052c467b4e5b959ac03e39ff0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Colin McDonnell
</td><td>5</td><td><span class='deletions'>-9</span>/<span class='insertions'>+14</span></td></tr>
<tr><td><span title='2023-08-04 19:34:09 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/test/transpiler/macro.ts?h=dylan/github-api-option&amp;id=6bdee80cfce0205ea1b59679fda93f816a66eed0&amp;follow=1'>fix macro string escaping (#3967)</a></td><td><img src='//www.gravatar.com/avatar/9c0e69537b9d9493708725dd4c91e3af?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Dylan Conway
</td><td>4</td><td><span class='deletions'>-8</span>/<span class='insertions'>+97</span></td></tr>
<tr><td><span title='2023-08-04 18:54:08 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/test/js/bun/sqlite/sqlite.test.js?h=dylan/github-api-option&amp;id=637a38f394704eaea29b503a69d554b5726d6214&amp;follow=1'>Fixes #3991</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Jarred Sumner
</td><td>2</td><td><span class='deletions'>-4</span>/<span class='insertions'>+40</span></td></tr>
<tr><td><span title='2023-08-04 18:21:13 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/test/cli/install/bun-install.test.ts?h=dylan/github-api-option&amp;id=190ba6b74380f4e92cea9e38ecce63cbcb7002b4&amp;follow=1'>[install] handle `workspace:*` correctly (#3994)</a></td><td><img src='//www.gravatar.com/avatar/e38c5ad2cb13f012227c5b00f1763175?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Alex Lam S.L
</td><td>2</td><td><span class='deletions'>-54</span>/<span class='insertions'>+158</span></td></tr>
<tr><td><span title='2023-08-04 17:40:11 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/docs/api/import-meta.md?h=dylan/github-api-option&amp;id=e2c526708a53ff0d4e224e08d5d39a4a561ba950&amp;follow=1'>Update import-meta.md</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?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'>+1</span></td></tr>
<tr><td><span title='2023-08-04 17:38:17 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/docs/api/import-meta.md?h=dylan/github-api-option&amp;id=f06f178862f6572391e9462e340ce8046add46fc&amp;follow=1'>Fix incorrect docs</a></td><td><img src='//www.gravatar.com/avatar/5145ad1d8bb861137d85da7a3e32ef36?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'>+3</span></td></tr>
<tr><td><span title='2023-08-04 17:30:38 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/packages/bun-types/globals.d.ts?h=dylan/github-api-option&amp;id=8275b8ccd2f0d39b482950dd809d6753c165607c&amp;follow=1'>[types] fix `blob.json()` (#3995)</a></td><td><img src='//www.gravatar.com/avatar/e38c5ad2cb13f012227c5b00f1763175?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Alex Lam S.L
</td><td>1</td><td><span class='deletions'>-4</span>/<span class='insertions'>+4</span></td></tr>
<tr><td><span title='2023-08-04 16:08:50 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/test/js/bun/ffi/ffi.test.js?h=dylan/github-api-option&amp;id=d196aa2de6074affd2ec8b4524302f214161fb37&amp;follow=1'>FFI typo (#3973)</a></td><td><img src='//www.gravatar.com/avatar/7eeb3c9446e467f71ba578a6fcc9c614?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> dave caruso
</td><td>3</td><td><span class='deletions'>-5</span>/<span class='insertions'>+10</span></td></tr>
<tr><td><span title='2023-08-04 16:08:25 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/test/js/node/buffer.test.js?h=dylan/github-api-option&amp;id=bdbc21ff7bc0bb1d2215a0a5bd892eaade41e76f&amp;follow=1'>Buffer.copy should ignore out-of-range sourceEnd (#3971)</a></td><td><img src='//www.gravatar.com/avatar/4c54f4cf4baa2ccb30e5772708284b5a?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Yifei Wang
</td><td>2</td><td><span class='deletions'>-17</span>/<span class='insertions'>+34</span></td></tr>
<tr><td><span title='2023-08-04 23:28:42 +0300'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/test/cli/install/bun-install.test.ts?h=dylan/github-api-option&amp;id=ff315a3bf2ae30b3e933fa267c96baefc1164399&amp;follow=1'>[install] store resolved workspace path in lockfile (#3974)</a></td><td><img src='//www.gravatar.com/avatar/e38c5ad2cb13f012227c5b00f1763175?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Alex Lam S.L
</td><td>5</td><td><span class='deletions'>-82</span>/<span class='insertions'>+187</span></td></tr>
<tr><td><span title='2023-08-04 12:56:34 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/packages/bun-types/ws.d.ts?h=dylan/github-api-option&amp;id=63d265780f122f8390a71b3a15cea4c71b540b8f&amp;follow=1'>Fix types (#3963)</a></td><td><img src='//www.gravatar.com/avatar/7314f20052c467b4e5b959ac03e39ff0?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Colin McDonnell
</td><td>14</td><td><span class='deletions'>-274</span>/<span class='insertions'>+892</span></td></tr>
<tr><td><span title='2023-08-04 04:01:10 -0700'>2023-08-04</span></td><td><a href='/ansg191/bun/commit/src/bun.js/javascript.zig?h=dylan/github-api-option&amp;id=18a2e18ae1959d0198e8262cbc5bc8a1760981fe&amp;follow=1'>feat(hot-clear-screen): clear terminal on hot reload (#3976)</a></td><td><img src='//www.gravatar.com/avatar/e3196719708003b3238f2188bbb322a9?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> simylein
</td><td>1</td><td><span class='deletions'>-0</span>/<span class='insertions'>+7</span></td></tr>
