Changelog
All notable changes to this package. The format follows Keep a Changelog, and versions follow the id rules: adding data is a minor version, fixing a value a patch, removing or renaming an id a major version.
Unreleased
Changed
New identifiers (breaking). Every id now follows one rule: an official code where one exists, otherwise lowercase kebab-case from the local-language name. See identifiers. The package had no users yet, so this was done before 1.0 rather than carried forever.
- Judicial areas:
Antwerp→antwerpen,Brussels→brussel,Ghent→gent,Liege→liege,Mons→mons. - Arrondissements:
Antwerp→antwerpen,Limburg→limburg,Brussels→brussel,Leuven→leuven,WalloonBrabant→brabant-wallon,EastFlanders→oost-vlaanderen,WestFlanders→west-vlaanderen,Liege→liege,Eupen→eupen,Luxembourg→luxembourg,Namur→namur,Hainaut→hainaut. - Cantons: the same name, lowercase, words joined by hyphens, number as a suffix:
Gent1→gent-1,MerelbekeMelle→merelbeke-melle,BraineLAlleud→braine-l-alleud,EupenSanktVith1→eupen-sankt-vith-1. - Courts: the court
typefollowed by the place:VredegerechtGent1→justice-of-the-peace-gent-1,OndernemingsrechtbankGentBrugge→enterprise-court-gent-brugge. - Municipalities: the REFNIS code moves from
refnistoid; a canton'smunicipalities[].refnisis nowmunicipalities[].municipality. - A justice of the peace links to its canton through a new
cantonfield (the canton id). Its canton number, which was incanton, is nownumber.getJusticeOfThePeacefollows the link instead of building an id. - A canton's
source(the article of the annex) is nowlegalBasis, so it isn't confused with thesources(URLs) on other records.
Distribution (breaking). ESM only, Node 22.12 or later (require() still loads it there). The CommonJS build and typesVersions are gone, and dist/ is no longer in git: install from npm.
Canonical data (breaking). Court phone numbers are E.164 (+3253820701), IBANs are in electronic format (BE73679200844560), e-mail addresses lowercase, and opening hours in OpenStreetMap opening_hours syntax (Mo-Fr 08:30-12:30,13:30-16:00). Contact labels are a closed ContactLabel type.
Other changes.
getInterestRatethrows aRangeErrorfor a string that isn't a validYYYY-MM-DDday and for an invalidDate. Before,'2013-1-15'silently returned the second semester's rate (7.5 % instead of 8 %), and other malformed input returnednullas if no rate were on file.- The exported datasets are typed
readonly, so TypeScript flags code that modifies the shared data. Copy an array before sorting or changing it. - Lookups by id use an index instead of a linear search.
package.jsondeclares"sideEffects": false, so bundlers can drop unused datasets.
Added
formatPhoneNumberandformatIbanfor display,getArrondissementForMunicipality, andfindJusticesOfThePeace(municipalityId), which answers "which justice of the peace?" for a municipality, including split cities.Quality gates: strict TypeScript, ESLint (type-aware), Prettier, 100 % coverage, IBAN checksum and contact-format tests, type tests.
A design decisions page.
Generated id types (
CantonId,CourtId,MunicipalityId,ArrondissementId,JudicialAreaId). Lookups with a known id return the record withoutundefined; the JSON Schemas list the valid ids, so a dangling link fails validation.Entry points per dataset:
be-legal-data/territory,be-legal-data/courtsandbe-legal-data/interest-rates. Importing only the interest rates no longer bundles the canton texts (12 KB instead of 250 KB).getJusticeOfThePeace(cantonId).JSON Schemas for every data file (
schema/, also published on the documentation site).datapackage.json: a Frictionless Data Package descriptor with sources, licences and review dates for every dataset.Optional
websiteandsourcesfields on courts, and a sharedSourceReftype.Weekly freshness check that opens an issue when a rate is missing, a dataset is overdue for review, a source URL is dead, or the Judicial Code or Statbel data changed.
Fixed
- The French name of the third canton of Brussels was
judicaire de Bruxelles: a typo in the annex ("canton judicaire") broke the parser. It is nowBruxelles, and the generator corrects the typo.
0.2.0 - 2026-10-18
Added
- Judicial areas, arrondissements, all 162 cantons and the 565 municipalities, generated from the annex to the Judicial Code and Statbel.
- Published on npm with provenance.
0.1.0 - 2026-10-05
Added
- Courts (justices of the peace in East and West Flanders, Ondernemingsrechtbank Gent) and the legal and commercial interest rates.