@meterapp/vehicle-db 2.8.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  An offline, international vehicle make/model catalog for Node.js and TypeScript. The package combines U.S. model-year data, the UK registered fleet, the European Union's new car and van registration register, the daily-updated Dutch vehicle register, Asian-origin vehicles registered in New Zealand, Malaysian registration transactions, and an Indian manufacturer catalog into one small, zero-dependency API. It never makes runtime network requests.
4
4
 
5
- The current snapshot spans **1990–2027** and includes **1,580 makes**, **36,870 model names**, and **207,953 deduplicated model-year entries** from **7 data sources**.
5
+ The current snapshot spans **1990–2027** and includes **1,599 makes**, **36,998 model names**, and **210,424 deduplicated model-year entries** from **7 data sources**.
6
6
 
7
7
  The catalog covers seven vehicle types: **Motorcycle**, **Passenger Car**, **Truck**, **Bus**, **Multipurpose Passenger Vehicle (MPV)**, **Auto Rickshaw**, and **Other Vehicle**. The European source adds continental models from Dacia, Cupra, DS, Lynk & Co, Alpine, and the Chinese brands entering Europe such as BYD, MG, Omoda, Xpeng, and Nio, as sold in the EU rather than the UK or U.S. The Dutch register keeps that coverage current: vehicles first registered this year appear within days, so 2026 models such as the BYD Atto 2 and Renault 5 E-Tech are already listed. The Asia-Pacific sources add Japanese domestic and kei models, Chinese EVs, Indian and Korean vehicles, Southeast Asian makes such as Perodua and Proton, and additional motorcycles and commercial vehicles.
8
8
 
@@ -29,10 +29,6 @@ import {
29
29
  getMakes,
30
30
  getModels,
31
31
  getAvailableYears,
32
- getAvailableYearRanges,
33
- getModelAppearanceRanges,
34
- getModelRenderGroups,
35
- getRepresentativeYear,
36
32
  } from "@meterapp/vehicle-db";
37
33
 
38
34
  // Inspect provenance and coverage before querying.
@@ -111,55 +107,6 @@ const years = getAvailableYears({
111
107
  vehicleTypeId: 2,
112
108
  sourceId: "nhtsa-vpic",
113
109
  });
114
-
115
- // Availability and exterior equivalence are intentionally separate.
116
- const availability = getAvailableYearRanges({ makeId: toyota!.makeId });
117
- const arteonAppearances = getModelAppearanceRanges({
118
- makeId: getMakes().find((make) => make.makeName === "VOLKSWAGEN")!.makeId,
119
- modelName: "Arteon",
120
- });
121
-
122
- // Safe cache identity: verified ranges share a representative year; unknown
123
- // and overlapping transition years return the requested year unchanged.
124
- const renderYear = getRepresentativeYear({
125
- makeId: arteonAppearances[0].makeId,
126
- modelName: "Arteon",
127
- year: 2018,
128
- }); // 2019
129
- ```
130
-
131
- ## Appearance ranges and image reuse
132
-
133
- A model being available in consecutive years does **not** prove that its exterior stayed the
134
- same. `getAvailableYearRanges()` only compresses catalog availability for display. Sourced
135
- generation/facelift facts live in `data/appearance-ranges.json` and are returned by
136
- `getModelAppearanceRanges()` with their body style, market, and evidence URL.
137
-
138
- `getModelRenderGroups()` turns those facts into a complete cache plan. It groups a year only when
139
- exactly one verified appearance range covers it. Years with no evidence, and transition years
140
- covered by two overlapping ranges, remain singleton exact-year groups. `getRepresentativeYear()`
141
- is the convenience lookup for storage/cache keys and has the same fail-closed behavior.
142
-
143
- This split is deliberate. NHTSA vPIC provides model-year and body-class data but no global
144
- generation identifier; Wikidata is CC0 but generation and facelift coverage is sparse. Broad
145
- third-party generation dumps commonly carry restrictive or share-alike terms and overlapping
146
- records, so they are useful for research but are not imported automatically. Verified ranges are
147
- small, reviewable facts linked to first-party or equivalently authoritative public evidence.
148
-
149
- NHTSA wheelbase, dimensions, doors, series, and truck cab/bed fields can rank possible body-family
150
- matches. They are candidate evidence only: related platforms and trims can still have visibly
151
- different bodywork. `appearanceId` is intentionally stricter than a derived `body_family_id` and
152
- is the only grouping allowed to drive render reuse. See CONTRIBUTING for the review criteria.
153
-
154
- ```typescript
155
- const volkswagen = getMakes().find((make) => make.makeName === "VOLKSWAGEN")!;
156
-
157
- getModelAppearanceRanges({ makeId: volkswagen.makeId, modelName: "Arteon" });
158
- // Original Arteon: 2017–2020, Fastback, with Volkswagen evidence
159
- // Updated Arteon: 2020–2026, Fastback, with Volkswagen evidence
160
-
161
- getModelRenderGroups({ makeId: volkswagen.makeId, modelName: "Arteon" });
162
- // 2017–2019 share one render; overlapping 2020 stays exact; 2021–2026 share one render.
163
110
  ```
164
111
 
165
112
  ## Driver search and autocomplete
@@ -286,17 +233,6 @@ getAvailableYears({ makeId: 448, vehicleTypeId: 2, sourceId: "nhtsa-vpic" });
286
233
  getAvailableYears({ modelId: 2469, sourceId: "nhtsa-vpic" });
287
234
  ```
288
235
 
289
- ### Appearance and year-range APIs
290
-
291
- - `getAvailableYearRanges(options?): VehicleYearRange[]` compresses consecutive availability
292
- years; it makes no exterior-equivalence claim.
293
- - `getModelAppearanceRanges({ makeId, modelName, year? }): VehicleAppearanceRange[]` returns
294
- verified generation/facelift periods and evidence. Overlap is preserved.
295
- - `getModelRenderGroups({ makeId, modelName, vehicleTypeId?, sourceId? }): VehicleRenderGroup[]`
296
- returns safe, non-overlapping cache groups for every available year.
297
- - `getRepresentativeYear({ makeId, modelName, year, ... }): number` returns the canonical cache
298
- year for an unambiguous verified group, otherwise the requested year.
299
-
300
236
  ### `searchVehicles(query, options?): VehicleSearchResult[]`
301
237
 
302
238
  Import from `@meterapp/vehicle-db/search`. Returns deterministic make and grouped model candidates for free-form input. Options include `year`, `vehicleTypeId`, `sourceId`, `limit` (default 10, maximum 100), and `fuzzy` (default `true`).
@@ -311,7 +247,7 @@ Model results contain `years` and a year-specific `variants` array. Make results
311
247
  | [UK DfT/DVLA vehicle licensing statistics](https://www.gov.uk/government/statistical-data-sets/vehicle-licensing-statistics-data-files) | 701 normalized makes across cars, motorcycles, goods vehicles, buses and coaches, and other vehicles; manufacture years 1990–2025 | [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/) |
312
248
  | [Atul Auto product catalog](https://atulauto.co.in/products/) | Current Indian passenger and cargo auto-rickshaw range; catalog years 2024–2026 | Source attribution; factual product names only |
313
249
  | [NZTA Motor Vehicle Register](https://www.nzta.govt.nz/resources/new-zealand-motor-vehicle-register-statistics/new-zealand-vehicle-fleet-open-data-sets) | 30,374 Asian-origin car, truck, bus, motorcycle, and moped model-year records from 12 countries of origin; vehicle years 1990–2026 | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
314
- | [Malaysia JPJ registration transactions](https://data.gov.my/data-catalogue/registration_transactions_car) | 1,756 passenger car, MPV, jeep, pickup, and window-van model/registration-year records; 2024–2026 | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
250
+ | [Malaysia JPJ registration transactions](https://data.gov.my/data-catalogue/registration_transactions_car) | 6,645 passenger car, MPV, jeep, pickup, and window-van model/registration-year records; 2015–2026 | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
315
251
  | [EEA CO2 monitoring of new passenger cars and vans](https://www.eea.europa.eu/en/datahub/datahubitem-view/fa8b1229-3db6-495d-b18e-9c9b3267c02b) | 29,939 passenger car (M1) and van (N1) model/registration-year records from 235 makes reported by EU member states, Iceland, and Norway; 2010–2025 | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
316
252
  | [Netherlands RDW vehicle register](https://opendata.rdw.nl/Voertuigen/Open-Data-RDW-Gekentekende_voertuigen/m9d7-ebf2) | 73,190 passenger car, commercial vehicle, bus, and motorcycle model/first-admission-year records from 624 makes licensed in the Netherlands; 1990–2026 | [Public domain (RDW Open Data)](https://opendata.rdw.nl/) |
317
253
 
@@ -336,10 +272,10 @@ Factory paint availability is not included. The NZTA and Malaysia records contai
336
272
  | Years | 1990–2027 |
337
273
  | Sources | 7 |
338
274
  | Vehicle types | 7 |
339
- | Makes | 1,580 |
340
- | Model names | 36,870 |
341
- | Deduplicated model-year entries | 207,953 |
342
- | Bundled TypeScript data | 7.17 MB |
275
+ | Makes | 1,599 |
276
+ | Model names | 36,998 |
277
+ | Deduplicated model-year entries | 210,424 |
278
+ | Bundled TypeScript data | 7.25 MB |
343
279
 
344
280
  ## Refreshing and rebuilding
345
281
 
@@ -358,7 +294,7 @@ Refresh either network source independently, then rebuild the combined catalog:
358
294
  npm run refresh:uk-dft
359
295
  npm run refresh:nhtsa -- --start-year 1990 --end-year 2027
360
296
  npm run refresh:nzta-asia-pacific -- --start-year 1990 --end-year 2026
361
- npm run refresh:malaysia-jpj -- --start-year 2024 --end-year 2026
297
+ npm run refresh:malaysia-jpj -- --start-year 2015 --end-year 2026
362
298
  npm run refresh:eea-co2 -- --start-year 2010 --end-year 2026
363
299
  npm run refresh:rdw-nl -- --start-year 1990 --end-year 2026
364
300
  npm run build:data
package/dist/data.d.ts CHANGED
@@ -24,20 +24,6 @@ interface CompactData {
24
24
  }[];
25
25
  modelNames: string[];
26
26
  models: [number, number, number, number, number, number][];
27
- appearanceRanges: {
28
- id: string;
29
- make_id: number;
30
- make_name: string;
31
- model_name: string;
32
- label: string;
33
- body_style: string;
34
- year_from: number;
35
- year_to: number;
36
- representative_year: number;
37
- regions: string[];
38
- source_name: string;
39
- source_url: string;
40
- }[];
41
27
  }
42
28
  declare const data: CompactData;
43
29
  export default data;