• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / snapshots-fetcher / 28621060381
87%
main: 87%

Build:
Build:
LAST BUILD BRANCH: 10.0.0
DEFAULT BRANCH: main
Ran 02 Jul 2026 08:57PM UTC
Jobs 1
Files 16
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Jul 2026 08:37PM UTC coverage: 86.56% (-0.5%) from 87.014%
28621060381

push

github

web-flow
refactor: migrate to @dcl/fetch-component and drain response bodies (#202)

* refactor: migrate off @well-known-components to @dcl fetch and test helpers

Replace @well-known-components/fetch-component with @dcl/fetch-component
and source IFetchComponent/RequestOptions/IHttpServerComponent from
@dcl/core-commons. The undici-backed fetcher has no `size` option and
pins sockets when response bodies go unconsumed, so fetchJson now:

- drains the body (response.body.cancel()) before throwing on non-2xx,
  releasing the socket back to the undici pool
- reads the body through a bounded reader that enforces the 50 MiB cap
  manually and cancels the stream if the limit is exceeded

Also migrate the test harness from @well-known-components/test-helpers to
@dcl/test-helpers (createRunner/defaultServerConfig), bump @dcl/http-server
to v2, drop node-fetch in favour of the native fetcher and global Headers,
and add jest/ts-jest/@types/jest explicitly (the old WKC test-helpers
bundled them transitively). The one sinon-style suite is converted to jest
spyComponents + toHaveBeenCalledTimes, since the new stub/spy components
return jest mocks. Bump the node engine to >=22.

* fix: correct the node-version guard and reject empty JSON bodies

The startup guard used process.version ("v22.14.0"), so
parseInt(version.split('.')[0]) parsed "v22" as NaN and the check never
fired; it also still referenced Node 16. Switch to process.versions.node
(no "v" prefix) and require >=22 to match the engines field.

fetchJson returned JSON.parse('') on an empty/null 2xx body, throwing a
bare SyntaxError. Reject an empty body explicitly, including the URL for
context, before parsing.

168 of 224 branches covered (75.0%)

Branch coverage included in aggregate %.

24 of 29 new or added lines in 4 files covered. (82.76%)

1 existing line in 1 file now uncovered.

695 of 773 relevant lines covered (89.91%)

15.97 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
91.85
-3.15% src/utils.ts
1
75.0
0.0% src/index.ts

Coverage Regressions

Lines Coverage ∆ File
1
91.85
-3.15% src/utils.ts
Jobs
ID Job ID Ran Files Coverage
1 28621060381.1 02 Jul 2026 08:57PM UTC 16
86.56
GitHub Action Run
Source Files on build 28621060381
  • Tree
  • List 16
  • Changed 5
  • Source Changed 5
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28621060381
  • da920280 on github
  • Prev Build on main (#28542347752)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc