Conversation
Runtime: isomorphic-fetch 2→3 (node-fetch v2 fallback for pre-18 node), promise-retry 1→2, latest babel 7.x runtime, lodash 4.18. Dev: typescript 4.3→6.0 with @goodeggs/tsconfig 2 and @goodeggs/toolkit 8, mocha 11, nyc 18, leasot 14, @types/node 22. Removed flow-bin (nothing references it; build:types uses tsc). Type fallout from TS 6 + the ESNext-only lib in tsconfig v2: - explicit types list in tsconfig (TS 6 no longer auto-includes @types) plus skipLibCheck - catch variables are unknown under strict mode: annotated where the code mutates the error - test fetch spy/stub types use Parameters<typeof fetch> instead of the DOM-lib RequestInfo global - getRequestOptions return cast: it intentionally passes node-fetch extension options (timeout, agent) that RequestInit does not declare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #1200 (GHA + Node 22). Brings every dependency current:
Runtime deps
isomorphic-fetch2.2.1 → 3.0.0 — retires the ancient node-fetch v1 fallback (pre-Node-18 consumers get node-fetch v2; Node 18+ uses native fetch as before)promise-retry1.1.1 → 2.0.1,@babel/runtime→ latest 7.x,lodash→ 4.18@babel/runtime8.0.0 requires migrating the whole build chain to Babel 8, out of scope hereDev deps
typescript4.3 → 6.0 with@goodeggs/tsconfig1 → 2 and@goodeggs/toolkit7 → 8mocha11,nyc18,leasot14,@types/node22, latest@types/*(@types/node-fetchstays v2 to match what isomorphic-fetch 3 uses)flow-bin— nothing references it (build:typesruns tsc); it was 80+ releases staleType fallout (no runtime behavior changes)
@typespackages → explicittypeslist in tsconfig;skipLibCheckfor third-party declaration hygienecatchvariables areunknownunder modern strict mode → annotated where the code mutates errors (the existingerr.retryCount/err.namepattern; 13 lint warnings forno-explicit-any, no errors)Parameters<typeof fetch>instead of the DOM-libRequestInfoglobalgetRequestOptionsreturn cast documents that it intentionally passes node-fetch extension options (timeout,agent) not present inRequestInitNot changed:
enginesstays>=12— the shipped (transpiled) code is unchanged, so no reason to force a breaking engine bump on consumers.Test plan
yarn testgreen on Node 22: 35 passing, 0 failing; typecheck 0 errors; lint 0 errorsyarn build(transpile + declarations) succeedsNote for reviewers
@goodeggs/toolkit/@goodeggs/tsconfigmetadata on npm.goodeggs.com requires auth that yarn 1 fails to send from~/.npmrcscope config — updating those two needed a temporary project-local token line (not committed; verified no token in the diff). Existing lockfile installs are unaffected.