import type { FunctionalComponent } from 'preact';
import { h, Fragment } from 'preact';
import { useState, useEffect } from 'preact/hooks';
import './ThemeToggleButton.css';

const themes = ['light', 'dark'];

const icons = [
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor">
    <path
      fillRule="evenodd"
      d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
      clipRule="evenodd"
    />
  </svg>,
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor">
    <path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" />
  </svg>,
];

const ThemeToggle: FunctionalComponent = () => {
  const [theme, setTheme] = useState(() => {
    if (import.meta.env.SSR) {
      return undefined;
    }
    if (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) {
      return localStorage.getItem('theme');
    }
    if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
      return 'dark';
    }
    return 'light';
  });

  useEffect(() => {
    const root = document.documentElement;
    if (theme === 'light') {
      root.classList.remove('theme-dark');
    } else {
      root.classList.add('theme-dark');
    }
  }, [theme]);

  return (
    <div class="theme-toggle">
      {themes.map((t, i) => {
        const icon = icons[i];
        const checked = t === theme;
        return (
          <label className={checked ? ' checked' : ''}>
            {icon}
            <input
              type="radio"
              name="theme-toggle"
              checked={checked}
              value={t}
              title={`Use ${t} theme`}
              aria-label={`Use ${t} theme`}
              onChange={() => {
                localStorage.setItem('theme', t);
                setTheme(t);
              }}
            />
          </label>
        );
      })}
    </div>
  );
};

export default ThemeToggle;
er</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'>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=ciro/queue-response-experiment'>about</a><a href='/ansg191/bun/?h=ciro/queue-response-experiment'>summary</a><a href='/ansg191/bun/refs/?h=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e'>refs</a><a class='active' href='/ansg191/bun/log/src/main.zig?h=ciro/queue-response-experiment&amp;follow=1'>log</a><a href='/ansg191/bun/tree/src/main.zig?h=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e'>tree</a><a href='/ansg191/bun/commit/src/main.zig?h=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e&amp;follow=1'>commit</a><a href='/ansg191/bun/diff/src/main.zig?h=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e&amp;follow=1'>diff</a></td><td class='form'><form class='right' method='get' action='/ansg191/bun/log/src/main.zig'>
<input type='hidden' name='h' value='ciro/queue-response-experiment'/><input type='hidden' name='id' value='43b4e1b67bad69ac4da193ea2ac603b1a985839e'/><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=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e&amp;follow=1'>root</a>/<a href='/ansg191/bun/log/src?h=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e&amp;follow=1'>src</a>/<a href='/ansg191/bun/log/src/main.zig?h=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e&amp;follow=1'>main.zig</a> (<a href='/ansg191/bun/log/src/main.zig?h=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e'>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/main.zig?h=ciro/queue-response-experiment&amp;id=43b4e1b67bad69ac4da193ea2ac603b1a985839e&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='2022-11-18 03:47:10 -0800'>2022-11-18</span></td><td><a href='/ansg191/bun/commit/src/napi/napi.zig?h=ciro/queue-response-experiment&amp;id=f3fb71205110448a4fb69ee39d11dc092a97069c&amp;follow=1'>Fix crash in process.env.FOO = bar that happened sometimes</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>12</td><td><span class='deletions'>-26</span>/<span class='insertions'>+45</span></td></tr>
<tr><td><span title='2022-11-16 05:16:30 -0800'>2022-11-16</span></td><td><a href='/ansg191/bun/commit/src/bun.js/bindings/exports.zig?h=ciro/queue-response-experiment&amp;id=f6779193c0e1c57b6d78979b7aacecda4e29081b&amp;follow=1'>`console.timeLog()` but no extra arguments yet</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'>-3</span>/<span class='insertions'>+21</span></td></tr>
<tr><td><span title='2022-11-16 05:15:56 -0800'>2022-11-16</span></td><td><a href='/ansg191/bun/commit/src/bun.js/modules/TTYModule.h?h=ciro/queue-response-experiment&amp;id=29f72efac30fc09df9eb1646d1553dcc16c5ce2d&amp;follow=1'>Mark some more commonjs modules</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'>-7</span>/<span class='insertions'>+34</span></td></tr>
<tr><td><span title='2022-11-16 05:13:17 -0800'>2022-11-16</span></td><td><a href='/ansg191/bun/commit/src/bun.js/api/server.zig?h=ciro/queue-response-experiment&amp;id=4985a44fe2409110b0cc044303e0c7db65f64c43&amp;follow=1'>Remove incorrect assertion</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'>-3</span>/<span class='insertions'>+1</span></td></tr>
<tr><td><span title='2022-11-16 04:58:51 -0800'>2022-11-16</span></td><td><a href='/ansg191/bun/commit/src/url.zig?h=ciro/queue-response-experiment&amp;id=6a9bc6f6c2482f32fd29ccfc46d41f5824e3dc6d&amp;follow=1'>Another test</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'>+9</span></td></tr>
<tr><td><span title='2022-11-16 04:42:33 -0800'>2022-11-16</span></td><td><a href='/ansg191/bun/commit/test/bun.js/string-decoder.test.js?h=ciro/queue-response-experiment&amp;id=bf6b1742330343c6004789f02761426aeafdb47b&amp;follow=1'>Make `node:http`.createServer work better</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>6</td><td><span class='deletions'>-39</span>/<span class='insertions'>+178</span></td></tr>
<tr><td><span title='2022-11-15 23:23:36 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/bun.js/api/server.zig?h=ciro/queue-response-experiment&amp;id=5de98f23bb4e69e54ea173039ce9ba5a0839e968&amp;follow=1'>Fix another assertion failure</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='2022-11-15 23:23:23 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/bun.js/webcore/response.zig?h=ciro/queue-response-experiment&amp;id=1d02104c518ef67f7b6f9871bbf7be3babc4d1f4&amp;follow=1'>Fix assertion failure</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'>+4</span></td></tr>
<tr><td><span title='2022-11-15 22:10:09 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/url.zig?h=ciro/queue-response-experiment&amp;id=4f22c39651bf57f929876bd58e83bf0b3156a9d1&amp;follow=1'>Handle trailing slash</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'>+17</span></td></tr>
<tr><td><span title='2022-11-15 21:58:31 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/url.zig?h=ciro/queue-response-experiment&amp;id=6c01a1191f07b3f2b8ce1ba07bf4eda25ce5e473&amp;follow=1'>Fixes #1390</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'>-24</span>/<span class='insertions'>+54</span></td></tr>
<tr><td><span title='2022-11-15 21:40:54 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/bun.js/webcore/response.zig?h=ciro/queue-response-experiment&amp;id=b95f7d5bbc2f415cf37f91d04669328acfc79388&amp;follow=1'>Fixes #1403</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'>-11</span>/<span class='insertions'>+16</span></td></tr>
<tr><td><span title='2022-11-15 21:37:28 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/bun.js/streams.exports.js?h=ciro/queue-response-experiment&amp;id=c32013dbbaa9d9cdca1c97b4bae1f894584c7f4e&amp;follow=1'>Never resize on close</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'>+6</span></td></tr>
<tr><td><span title='2022-11-15 21:01:08 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/bun.js/webcore/streams.zig?h=ciro/queue-response-experiment&amp;id=6cdb7e77dda5d1affe8a1b033e6d35ab1e78234d&amp;follow=1'>Handle blocking initial read</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'>+18</span></td></tr>
<tr><td><span title='2022-11-15 20:57:21 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/bun.js/webcore/streams.zig?h=ciro/queue-response-experiment&amp;id=0e7ed4c6672a21ad30135de01f3a60f43d135e7b&amp;follow=1'>Prevent blocking write()</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'>-75</span>/<span class='insertions'>+89</span></td></tr>
<tr><td><span title='2022-11-15 18:32:57 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/packages/bun-types/globals.d.ts?h=ciro/queue-response-experiment&amp;id=3b802c9a130683ff1f08858940892ed8f0a2f16c&amp;follow=1'>Add non-standard headers API types</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>3</td><td><span class='deletions'>-2</span>/<span class='insertions'>+57</span></td></tr>
<tr><td><span title='2022-11-15 18:31:22 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/test/bun.js/fetch.test.js?h=ciro/queue-response-experiment&amp;id=996e5dd235172bb14d286add7313306a8a8b772c&amp;follow=1'>Add test for non-standard Headers API additions</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'>+24</span></td></tr>
<tr><td><span title='2022-11-15 17:47:38 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/bun.js/test/jest.zig?h=ciro/queue-response-experiment&amp;id=025749027bbb9aefe371a85277c8103dc80c6a06&amp;follow=1'>add generated getter/setter type with thisValue (#1513)</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>6</td><td><span class='deletions'>-38</span>/<span class='insertions'>+107</span></td></tr>
<tr><td><span title='2022-11-15 00:12:34 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/src/bun.js/bindings/ZigGlobalObject.cpp?h=ciro/queue-response-experiment&amp;id=44babb9ce5a4e26fc43b002dedbf194c31331a0e&amp;follow=1'>Update ZigGlobalObject.cpp</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'>-3</span>/<span class='insertions'>+1</span></td></tr>
<tr><td><span title='2022-11-15 00:12:34 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/test/bun.js/fetch-gzip.test.ts?h=ciro/queue-response-experiment&amp;id=a63fe2be247c3f2dd5ab84552e3e9e9681498caa&amp;follow=1'>Add a test with decently large headers</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'>+61</span></td></tr>
<tr><td><span title='2022-11-15 00:12:34 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/packages/bun-types/bun-test.d.ts?h=ciro/queue-response-experiment&amp;id=bf75f61ddff892d78589b746af0c518fa7dd6ed0&amp;follow=1'>Update test types a little</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'>+2</span></td></tr>
<tr><td><span title='2022-11-15 00:12:34 -0800'>2022-11-15</span></td><td><a href='/ansg191/bun/commit/packages/bun-types/bun.d.ts?h=ciro/queue-response-experiment&amp;id=1b608fcc8a5350cd461d0f711026ca64f9cf65be&amp;follow=1'>Add missing type</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'>+5</span></td></tr>
<tr><td><span title='2022-11-14 22:00:45 -0800'>2022-11-14</span></td><td><a href='/ansg191/bun/commit/src/http_client_async.zig?h=ciro/queue-response-experiment&amp;id=c4cf38601be0a73bb6db2f0b2d31fd3e9270fbdc&amp;follow=1'>switch default encoding order (#1510)</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>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr>
<tr><td><span title='2022-11-14 21:52:04 -0800'>2022-11-14</span></td><td><a href='/ansg191/bun/commit/src/bun.js/webcore/streams.zig?h=ciro/queue-response-experiment&amp;id=25fc19e7c6aa1348bcec8faee344c39c6347cbf6&amp;follow=1'>Fix spawn macOS issue</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'>-7</span>/<span class='insertions'>+11</span></td></tr>
<tr><td><span title='2022-11-14 19:55:48 -0800'>2022-11-14</span></td><td><a href='/ansg191/bun/commit/src/bun.js/bindings/webcrypto/SubtleCrypto.h?h=ciro/queue-response-experiment&amp;id=9c3b2f7ad6549f1c86832bb9027278fcce9b80b5&amp;follow=1'>Fix crash in web crypto. caused by refptr</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>3</td><td><span class='deletions'>-2</span>/<span class='insertions'>+15</span></td></tr>
<tr><td><span title='2022-11-14 17:53:15 -0800'>2022-11-14</span></td><td><a href='/ansg191/bun/commit/test/bun.js/process.test.js?h=ciro/queue-response-experiment&amp;id=436b8e14611e346fdb2c581a7c137f1dde10f1b0&amp;follow=1'>Fix crashiness with `process.env`</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'>-27</span>/<span class='insertions'>+66</span></td></tr>
<tr><td><span title='2022-11-14 17:53:15 -0800'>2022-11-14</span></td><td><a href='/ansg191/bun/commit/src/bun.js/javascript_core_c_api.zig?h=ciro/queue-response-experiment&amp;id=272e71fec2117bc759b2a41e0eaf985f9b064e51&amp;follow=1'>Fix string encoding issue in JSC C API usages</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>3</td><td><span class='deletions'>-139</span>/<span class='insertions'>+74</span></td></tr>
<tr><td><span title='2022-11-14 17:53:15 -0800'>2022-11-14</span></td><td><a href='/ansg191/bun/commit/src/logger.zig?h=ciro/queue-response-experiment&amp;id=4ba97c7687ec7d6dc2176f37044ae35770180f17&amp;follow=1'>Prevent double-frees in log msgs</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'>-4</span>/<span class='insertions'>+15</span></td></tr>
<tr><td><span title='2022-11-14 04:14:23 -0800'>2022-11-14</span></td><td><a href='/ansg191/bun/commit/src/global.zig?h=ciro/queue-response-experiment&amp;id=3df5843503b65f327906b71e340f89dbabd71e40&amp;follow=1'>Fix build error</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'>-6</span>/<span class='insertions'>+1</span></td></tr>
<tr><td><span title='2022-11-14 04:08:36 -0800'>2022-11-14</span></td><td><a href='/ansg191/bun/commit/test/bun.js/test-programs/bigpipe-w.c?h=ciro/queue-response-experiment&amp;id=20eff9f6d21742540a7bf68c3dc364bf68b23504&amp;follow=1'>Bugfixes and perf improvements to child_process</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'>-192</span>/<span class='insertions'>+416</span></td></tr>
<tr><td><span title='2022-11-13 21:57:14 -0800'>2022-11-13</span></td><td><a href='/ansg191/bun/commit/src/io/io_darwin.zig?h=ciro/queue-response-experiment&amp;id=69eedb4c9232c7c3e75bc9f17a6ca81c06adcfe0&amp;follow=1'>use `write$NOCANCEL`, more logging</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>3</td><td><span class='deletions'>-12</span>/<span class='insertions'>+42</span></td></tr>
<tr><td><span title='2022-11-13 20:51:27 -0800'>2022-11-13</span></td><td><a href='/ansg191/bun/commit/test/bun.js/package.json?h=ciro/queue-response-experiment&amp;id=4a8bbc22161c7ffabf10195b55145c796d4b436a&amp;follow=1'>Add an e2e test</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>3</td><td><span class='deletions'>-0</span>/<span class='insertions'>+52</span></td></tr>
<tr><td><span title='2022-11-13 20:09:37 -0800'>2022-11-13</span></td><td><a href='/ansg191/bun/commit/src/bun.js/fs_promises.exports.js?h=ciro/queue-response-experiment&amp;id=92b766095de0e59fe40dfd9009e4fcc18117d93b&amp;follow=1'>Add missing `rmdir` export</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'>+2</span></td></tr>
<tr><td><span title='2022-11-13 19:14:44 -0800'>2022-11-13</span></td><td><a href='/ansg191/bun/commit/test/bun.js/spawn.test.ts?h=ciro/queue-response-experiment&amp;id=b18e4064a2efe2a1963b29d1bdfc33cd48070048&amp;follow=1'>Make node streams faster (#1502)</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>23</td><td><span class='deletions'>-406</span>/<span class='insertions'>+836</span></td></tr>
<tr><td><span title='2022-11-13 02:38:54 -0800'>2022-11-13</span></td><td><a href='/ansg191/bun/commit/src/cli/run_command.zig?h=ciro/queue-response-experiment&amp;id=58b67347e640be66814a22712ceecdc506ae6e53&amp;follow=1'>Fix incorrect exit status message</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'>-3</span>/<span class='insertions'>+6</span></td></tr>
<tr><td><span title='2022-11-12 23:43:24 -0800'>2022-11-12</span></td><td><a href='/ansg191/bun/commit/src/bundler/entry_points.zig?h=ciro/queue-response-experiment&amp;id=1a0fb4cf83a95ac8e7edb8eb80840d6e6376496c&amp;follow=1'>Fix syntax error</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'>+2</span></td></tr>
<tr><td><span title='2022-11-12 20:40:04 -0800'>2022-11-12</span></td><td><a href='/ansg191/bun/commit/src/linker.lds?h=ciro/queue-response-experiment&amp;id=6393e1e709d602559b82feabdeec8bf0b1530da8&amp;follow=1'>Set linker script to Bun 0.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'>+1</span></td></tr>
<tr><td><span title='2022-11-12 20:28:10 -0800'>2022-11-12</span></td><td><a href='/ansg191/bun/commit/test/bun.js/spawn.test.ts?h=ciro/queue-response-experiment&amp;id=a78b6f920d5042c583d8e2c8ab12132ba1a5e982&amp;follow=1'>Fix infinite write loop on Linux</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'>-44</span>/<span class='insertions'>+185</span></td></tr>
<tr><td><span title='2022-11-12 20:28:10 -0800'>2022-11-12</span></td><td><a href='/ansg191/bun/commit/packages/bun-types/globals.d.ts?h=ciro/queue-response-experiment&amp;id=7da520b22e2d6216a28e67382bcf6e0450e851b5&amp;follow=1'>Add missing type</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='2022-11-12 20:22:38 -0800'>2022-11-12</span></td><td><a href='/ansg191/bun/commit/src/linker.lds?h=ciro/queue-response-experiment&amp;id=45dc75b3be6f4668045c0850f659faaf4a4df425&amp;follow=1'>Add linker script to remove unwanted exports (#1499)</a></td><td><img src='//www.gravatar.com/avatar/7f82643a80c536e1ddf188d21826fc08?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> Tom Birch
</td><td>2</td><td><span class='deletions'>-1</span>/<span class='insertions'>+9</span></td></tr>
<tr><td><span title='2022-11-12 18:32:53 -0800'>2022-11-12</span></td><td><a href='/ansg191/bun/commit/test/bun.js/spawn.test.ts?h=ciro/queue-response-experiment&amp;id=1cce9da80a51d49e423223f24f94fee6a044ab10&amp;follow=1'>Fix memory leak in gzip pool + add test for gzip'd data</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'>-62</span>/<span class='insertions'>+1530</span></td></tr>
<tr><td><span title='2022-11-12 18:30:12 -0800'>2022-11-12</span></td><td><a href='/ansg191/bun/commit/test/bun.js/streams.test.js?h=ciro/queue-response-experiment&amp;id=21bf3ddaf23c842dc12a1d76dbd3b48daf08f349&amp;follow=1'>Redo how we poll pipes (#1496)</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'>-707</span>/<span class='insertions'>+1251</span></td></tr>
<tr><td><span title='2022-11-11 16:02:35 -0800'>2022-11-11</span></td><td><a href='/ansg191/bun/commit/test/bun.js/spawn-streaming-stdout.test.ts?h=ciro/queue-response-experiment&amp;id=514f2a8eddf1a1d35a33cc096ed7403a79afe36f&amp;follow=1'>Add test that fails on linux</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>7</td><td><span class='deletions'>-21</span>/<span class='insertions'>+42</span></td></tr>
<tr><td><span title='2022-11-11 04:18:15 -0800'>2022-11-11</span></td><td><a href='/ansg191/bun/commit/src/bun.js/bindings/wtf-bindings.cpp?h=ciro/queue-response-experiment&amp;id=5f5d74c534c6482d91c07037cd0a1ae02bd92a3f&amp;follow=1'>2 frames</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='2022-11-11 02:10:16 -0800'>2022-11-11</span></td><td><a href='/ansg191/bun/commit/Makefile?h=ciro/queue-response-experiment&amp;id=b3b70035a1d24e9aa3dbcba3e8fc8b2b34b7b95d&amp;follow=1'>Revert "Omit frame pointer"</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'>+1</span></td></tr>
<tr><td><span title='2022-11-11 01:12:41 -0800'>2022-11-11</span></td><td><a href='/ansg191/bun/commit/.github/workflows/bun-mac-x64.yml?h=ciro/queue-response-experiment&amp;id=666f5c5ea99109edd74c2ccf2b6ed3b0bafd4fbb&amp;follow=1'>Don't rm cached</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>4</td><td><span class='deletions'>-4</span>/<span class='insertions'>+0</span></td></tr>
<tr><td><span title='2022-11-11 00:51:39 -0800'>2022-11-11</span></td><td><a href='/ansg191/bun/commit/.github/workflows/bun-mac-x64.yml?h=ciro/queue-response-experiment&amp;id=55488ad77fa78f72c29b39b15f6761572c6ccdc8&amp;follow=1'>try this</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>4</td><td><span class='deletions'>-0</span>/<span class='insertions'>+4</span></td></tr>
<tr><td><span title='2022-11-11 00:48:39 -0800'>2022-11-11</span></td><td><a href='/ansg191/bun/commit/.github/workflows/bun-linux-build.yml?h=ciro/queue-response-experiment&amp;id=23fd28afc3d9d3a41c58d5f774a6564019b1d970&amp;follow=1'>Update bun-linux-build.yml</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='2022-11-11 00:48:05 -0800'>2022-11-11</span></td><td><a href='/ansg191/bun/commit/.github/workflows/bun-mac-x64.yml?h=ciro/queue-response-experiment&amp;id=f6cb20f51614085bf2d6f1a0da856a78c407f996&amp;follow=1'>try using git action</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>4</td><td><span class='deletions'>-7</span>/<span class='insertions'>+8</span></td></tr>
<tr><td><span title='2022-11-11 00:43:55 -0800'>2022-11-11</span></td><td><a href='/ansg191/bun/commit/src/deps/libbacktrace?h=ciro/queue-response-experiment&amp;id=096abc638a7074b35ea0aa51fd2171e62d4fd5b7&amp;follow=1'>Remove with `git rm`</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'>-8</span>/<span class='insertions'>+0</span></td></tr>
