Skip to content

v0.5.1

Choose a tag to compare

@iamkm1 iamkm1 released this 23 Jul 05:30

Patch release fixing three defects found in the 0.5.0 request-budget and profile code, each now covered by a regression test.

Fixes

  • A provider's default request budget could be spent twice per window. A request naming a budget the provider never declared was keyed by the requested name, so it received its own limiter holding a copy of the default policy instead of sharing it. The limiter is now keyed by the resolved budget name. Declared budgets, such as Data.norge's resource, stay separate as before.
  • profiles.address() credited NVE in the composed source even when all three Varsom warning feeds had failed and contributed nothing. An empty hazards array next to an NVE attribution reads as an all-clear NVE never issued. NVE is now named only when at least one feed answered, matching the behaviour profiles.municipality() already had. Per-feed status remains available in components.
  • profiles.municipality() fetched SSB's table 07459 metadata twice per call — once to resolve the municipality and once inside the population query — spending two requests of SSB's documented 30-per-minute budget on identical bytes. The metadata is now fetched once and reused. The supported query() and queryRaw() surface is unchanged.

Also fixes pnpm check:portability leaving its generated probe file inside dist/ when the probe process failed, because process.exit in the error path pre-empted the cleanup.

No changes to the supported consumer surface. See CHANGELOG.md for full details.

npm install norway-open-data-sdk@0.5.1