Skip to content

build(deps): bump the three shipped runtime majors - #56

Merged
stuffbucket merged 1 commit into
mainfrom
chore/npm-major-runtime
Sep 6, 2026
Merged

stuffbucket merged 1 commit into
mainfrom
chore/npm-major-runtime

Conversation

@stuffbucket

Copy link
Copy Markdown
Owner

Group 2 of 4 replacing #37. These ship inside the product rather than
building it, so a behaviour change reaches users. All in maximal-core.

Package From To
undici 7.16.0 8.10.0
gpt-tokenizer 3.0.1 4.0.0
proxy-from-env 1.1.0 2.1.0

proxy-from-env 2 is the real change

It is ESM-only and replaces url.parse with the WHATWG URL API.

Both land safely here: maximal-core is ESM, and
src/lib/http/proxy.ts already passes a full URL string
(origin.toString()) rather than a parsed object — which is the shape the new
parser wants.

Why a green suite was not enough

None of these three has direct test coverage. proxy.ts has no test at all
and the tokenizer has none, so the container suite passing says very little
about the two genuinely breaking changes. I exercised them directly instead,
against the exact call shapes the code uses:

ok    proxy-from-env getProxyForUrl(proxied)     http://proxy.example:3128
ok    proxy-from-env getProxyForUrl(NO_PROXY)    ""
ok    undici export Agent                        function
ok    undici export ProxyAgent                   function
ok    undici export setGlobalDispatcher          function
ok    undici Agent#dispatch                      function
ok    gpt-tokenizer o200k_base.encode            2 tokens
ok    gpt-tokenizer cl100k_base.encode           2 tokens
ok    gpt-tokenizer p50k_base.encode             2 tokens
ok    gpt-tokenizer p50k_edit.encode             2 tokens
ok    gpt-tokenizer r50k_base.encode             2 tokens

That covers getProxyForUrl through an ESM named import (both the proxied and
NO_PROXY-bypassed paths), the three undici bindings proxy.ts imports plus
the Agent#dispatch it delegates to, and all five gpt-tokenizer encoding
subpaths that ENCODING_MAP imports lazily.

The gap is worth naming rather than papering over: this bump is verified by
construction, not by regression tests.
If proxy routing is worth protecting,
proxy.ts wants a test of its own — but writing one belongs in its own change,
not smuggled into a dependency bump.

Verification

  • maximal-core check:deep:host passes end to end.
  • Container suite 15/15 tasks.
  • verify:workspace passes; lockfile re-resolved and stripped of rotating shard
    hosts per SOURCES.md.

Replaces part of #37.

From the npm-major group of 17, the part that ships inside the product
rather than building it, all in maximal-core:

  undici          7 -> 8
  gpt-tokenizer   3 -> 4
  proxy-from-env  1 -> 2

proxy-from-env 2 is the real change of the three: it is ESM-only and
replaces url.parse with the WHATWG URL API. maximal-core is ESM, and
src/lib/http/proxy.ts already passes a full URL string
(origin.toString()), which is the shape the new parser wants.

None of the three has direct test coverage -- proxy.ts has no test and
the tokenizer has none -- so a green suite says little about them. They
were exercised directly instead, against the exact call shapes the code
uses:

  getProxyForUrl through an ESM named import, returning the proxy for a
    matching URL and "" for one covered by NO_PROXY
  undici's Agent, ProxyAgent and setGlobalDispatcher bindings, and
    Agent#dispatch, which is what proxy.ts delegates to
  all five gpt-tokenizer encoding subpaths ENCODING_MAP imports lazily,
    each encoding to a non-empty token array

Verified: maximal-core check:deep:host passes, the container suite is
15/15, and verify:workspace passes with the lockfile re-resolved and
stripped of rotating shard hosts.
@stuffbucket
stuffbucket merged commit 6d8f346 into main Sep 6, 2026
6 checks passed
@stuffbucket
stuffbucket deleted the chore/npm-major-runtime branch September 6, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant