v2.0.0 — Data v2: one canonical record contract
Data v2 unifies every sector package onto one canonical record contract via a new @geoalgeria/schema dependency, replacing 26 hand-written, drifted types/index.d.ts shapes. This is a breaking schema change across 25 packages — the 23 migrated sector packages plus the @geoalgeria/transport and @geoalgeria/pharma umbrellas. Consumers on ^1 are unaffected until they opt in; read packages/schema/MIGRATING.md before bumping.
Breaking changes
- Record shape:
wilaya_codeis now a zero-padded string ("16", not16); commune linkage iscommune_code(string ONS code) +commune; coordinates arelat/lng; external ids collapse intorefs: { osm, wikidata, … }instead of flatosm_id/wikidata;idis an opaque string unique within its file. Update any code keyed on the old shapes before adopting2.0.0. geo_precision: now strictlyexact | approximate | null— null if and only if the record has no coordinate. The old method vocabulary (osm_point,commune_centroid,campus, …) moved to a newgeo_methodfield.exactnow requires ≥3 decimal places and a point unique within its file — 409 records that could not carry that claim were downgraded toapproximate.
New
@geoalgeria/schema: canonical TypeScript types, a zero-dependency runtime validator (Algeria-bbox + point-in-wilaya-boundary checks, catching coordinate swaps/sign-flips), a canonicalmetadata.jsonwriter, and CSV/GeoJSON emit helpers. CI now fails the build on any contract violation instead of silently shipping bad data. (Dev dependency — not published to npm.)- Catalog artifacts: a root
index.jsoncatalog and aschema.org/Datasetdescriptor (dataset-metadata.json) shipped in 24 packages. - Wilaya boundaries: the 69 wilaya boundary polygons now ship in the core dataset package as
data/geojson/wilaya-boundaries.geojson(OSM-derived, ODbL, display-grade — median vertex gap 3.36 km, not survey-grade).
Corrections
- Tourisme: 972 previously-dropped values restored (
address,phone,website,stars,rooms,description,heritage,heritage_status,refs.wikidata/refs.wikipedia); 115 records corrected from a falsesource: "osm"tosource: "wikidata"; package license corrected toODbL-1.0 AND CC0-1.0 AND factual public listing (ASAL). - Provenance: real git-traceable dates across packages; licence metadata completed (6 open-licence packages with canonical URLs, 18 packages with
conditionsOfAccess). - Id prefixes:
mobilisids are nowag-…/pdv-…;tourismeids arelodging-/attraction-/historic-/thermal-spring-/park-, keeping each merged multi-file collection unique.
Not included
Two packages predate this contract and are not part of the migration: the core geoalgeria dataset package (wilayas/dairas/communes, still v1 shape) and @geoalgeria/telecom. The root index.json catalog marks both schema_version: null. Their migrations will land as separate breaking changes.
Packages
@geoalgeria/schema (new) · poste · emploi · mobilis · aviation · banques · livraison · jeunesse (3.0.0) · sports · enseignement-superieur · tourisme · formation-professionnelle · djezzy · mosquees · sante · culture · agriculture · ecoles · gares-routieres · ferroviaire · buses · transport · industrie-pharmaceutique · pharmacies · ooredoo · pharma
Full details in CHANGELOG.md.