@tracepass/dpp-schemas 1.32.0 → 1.34.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.
Files changed (3) hide show
  1. package/README.md +33 -12
  2. package/instruments.json +19 -0
  3. package/package.json +10 -3
package/README.md CHANGED
@@ -355,6 +355,17 @@ matching types.
355
355
  npm install @tracepass/dpp-schemas
356
356
  ```
357
357
 
358
+ Every JSON file the package ships can be imported by its path: the manifest as the
359
+ package root, then `schema.json`, `templates/<category>.json`, `instruments.json`,
360
+ `standards.json`, `units.json`, `model-subset.json`, `model-versions.json` and
361
+ `guidance/<file>.json`.
362
+
363
+ ```js
364
+ import manifest from "@tracepass/dpp-schemas" with { type: "json" };
365
+ import battery from "@tracepass/dpp-schemas/templates/battery.json" with { type: "json" };
366
+ import units from "@tracepass/dpp-schemas/units.json" with { type: "json" };
367
+ ```
368
+
358
369
  ## Validating the specs themselves
359
370
 
360
371
  [`schema.json`](./schema.json) is a JSON Schema (Draft 2020-12) describing the template
@@ -392,6 +403,8 @@ runs it on every push:
392
403
  an instrument it is adopted under, and its planned date matches its source's precision.
393
404
  - **Data-model versions** (`scripts/check-model-versions.mjs`): every template's
394
405
  `modelVersion` matches its hash in `model-versions.json`. See below.
406
+ - **Exports** (`scripts/check-exports.mjs`): every JSON file the package ships resolves
407
+ through Node's own resolver, so nothing ships that a consumer cannot import.
395
408
 
396
409
  ## Data-model versions
397
410
 
@@ -440,23 +453,31 @@ The integer `version` is a legacy label and is not enforced.
440
453
 
441
454
  ## Recent changes
442
455
 
443
- **1.13.0** (unreleased) — battery template corrections and primary-text verification.
456
+ Every release is on the [GitHub releases page](https://github.com/malinoto/tracepass-dpp-schemas/releases),
457
+ with the changes it carries, and each template records its own history in its `changelog`.
444
458
 
445
- *Legal corrections (Battery Regulation consolidated text 02023R1542-20260813):*
459
+ ## Vocabulary alignment
446
460
 
447
- - **Pre-consumer recycled-content fields relabelled.** `preConsumerRecycled{Nickel,Cobalt,Lithium}Share` labels now use the Art. 3(1)(51) official term "battery manufacturing waste" across all 24 EU languages. The field names are unchanged.
448
- - **Recycled-content split fields made optional.** Art. 8(1) and Annex XIII 1(e) require ONE combined recycled-content figure per metal. The pre-consumer / post-consumer breakdown is voluntary; both split fields lose their `requiredBy` entries. The share becomes binding only if a future Art. 8(1) delegated act mandates the split (not yet adopted).
449
- - **`cadmiumLeadSymbolsUrl` corrected.** Provision reference fixed from "Annex XIII (1s)" to "Annex XIII (1q)" per corrigendum 32023R1542R(13). `requiredBy` entries changed from `"required"` to `"conditional"` for all three battery categories — Art. 13(5) applies only to batteries with >0.002 % cadmium or >0.004 % lead.
450
- - **`componentPartNumbersUrl` and `sparePartsSourcesUrl` made optional.** Annex XIII 2(b) mandates the part-number and spare-parts data (carried by the array fields), not a URI format. The URL fields are a GEFEG data-model choice, not an independent legal duty.
451
- - **A4 description corrections.** `stateOfCertifiedEnergy` (EV-only, Art. 14 + Annex VII), `remainingCapacity`, `evolutionOfSelfDischargeRate` (LMT + stationary storage, not EV), and `initialEnergyRoundTripEfficiency` all carry corrected `regulationRef.article` and `regulationRef.description`.
452
- - **Per-category required-field counts after corrections:** EV 53, LMT 53, industrial >2 kWh 38 (flat required-field count stays at 38).
461
+ Three templates have a sectoral CIRPASS-2 ontology to align with, and each has a
462
+ field-by-field table:
453
463
 
454
- *Primary-text verification:*
464
+ - [`alignment/cirpass2-battery.md`](alignment/cirpass2-battery.md) — the
465
+ [battery ontology](https://github.com/CIRPASS-2/ontologies-battery)
466
+ - [`alignment/cirpass2-tyres.md`](alignment/cirpass2-tyres.md) — the
467
+ [example tyre ontology](https://github.com/CIRPASS-2/ontologies-tyre) (ETO)
468
+ - [`alignment/cirpass2-textile.md`](alignment/cirpass2-textile.md) — the
469
+ [textile ontology](https://github.com/CIRPASS-2/ontologie-textiles)
455
470
 
456
- - **`verifiedAgainstPrimaryText` set on 55 battery fields** read against the consolidated Battery Regulation 02023R1542-20260813. The eight legally-corrected fields listed above are deliberately NOT marked (they required a correction, not a confirmation).
457
- - **Audit script reports verified-share per category** — informational, not a gate.
471
+ Each lists every field with its CIRPASS-2 term, or "none" where CIRPASS-2 has no
472
+ term. A match is **exact** where CIRPASS-2 has a datatype property for the same
473
+ datum, and **structured** where it models the datum as a node (a class, or an object
474
+ property to a vocabulary or record). Every term was checked against the ontology
475
+ Turtle at the pinned commits each table names. The same data is in the `.json` file
476
+ next to each table.
458
477
 
459
- Two new battery state-of-health fields added: `remainingPowerCapabilityAt80Soc` (EV-only, Annex XIII 4(b)) and `remainingPowerCapabilityAt20Soc` (EV-only, Annex XIII 4(b)) — see 1.12.x notes.
478
+ The CIRPASS-2 ontologies are a research draft and say so. The model the EU DPP
479
+ Registry validates against for batteries is the Commission's semantic package. The
480
+ other categories have no CIRPASS-2 sectoral ontology yet.
460
481
 
461
482
  ## Related
462
483
 
package/instruments.json CHANGED
@@ -1045,6 +1045,25 @@
1045
1045
  },
1046
1046
  "lastChecked": "2026-10-09"
1047
1047
  },
1048
+ "espr-da-smartphones-tablets": {
1049
+ "framework": "32024R1781",
1050
+ "article": "Art. 4",
1051
+ "kind": "product-group",
1052
+ "productGroup": "Mobile phones and tablets",
1053
+ "note": "Carried over from the 2022-2024 ecodesign and energy labelling working plan; the working plan lists ecodesign requirements and an energy label, adoption end 2030. It does not say whether the act will require a digital product passport; products with an energy label may be served by the EPREL database instead.",
1054
+ "stage": "not-scheduled",
1055
+ "planned": {
1056
+ "date": "2030",
1057
+ "precision": "year",
1058
+ "event": "adoption"
1059
+ },
1060
+ "source": {
1061
+ "kind": "working_plan",
1062
+ "document": "COM(2025) 187",
1063
+ "url": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:52025DC0187"
1064
+ },
1065
+ "lastChecked": "2026-11-16"
1066
+ },
1048
1067
  "espr-dppsp-da": {
1049
1068
  "framework": "32024R1781",
1050
1069
  "article": "Art. 11, third subparagraph",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracepass/dpp-schemas",
3
- "version": "1.32.0",
3
+ "version": "1.34.0",
4
4
  "description": "Machine-readable field specifications for EU Digital Product Passports (ESPR) — 13 product categories, 1016 fields, each traced to the article of EU law that mandates it. Pure JSON, no dependencies.",
5
5
  "keywords": [
6
6
  "digital-product-passport",
@@ -26,7 +26,12 @@
26
26
  ".": "./index.json",
27
27
  "./schema.json": "./schema.json",
28
28
  "./templates/*.json": "./templates/*.json",
29
- "./instruments.json": "./instruments.json"
29
+ "./instruments.json": "./instruments.json",
30
+ "./standards.json": "./standards.json",
31
+ "./units.json": "./units.json",
32
+ "./model-subset.json": "./model-subset.json",
33
+ "./model-versions.json": "./model-versions.json",
34
+ "./guidance/*.json": "./guidance/*.json"
30
35
  },
31
36
  "files": [
32
37
  "templates",
@@ -50,7 +55,7 @@
50
55
  "validate": "python3 -c \"import json,glob,sys;from jsonschema import Draft202012Validator as V;v=V(json.load(open('schema.json')));bad=0\nfor p in sorted(glob.glob('templates/*.json')):\n e=list(v.iter_errors(json.load(open(p))));bad+=bool(e);print(('FAIL' if e else 'ok '),p)\n [print(' ',str(x.absolute_path),x.message[:120]) for x in e[:3]]\nsys.exit(1 if bad else 0)\"",
51
56
  "build:index": "node scripts/build-index.mjs",
52
57
  "check:index": "node scripts/build-index.mjs --check",
53
- "check": "npm run validate && npm run check:index && npm run check:standards && npm run check:locales && npm run check:audit && npm run test:audit && npm run check:planned && npm run test:planned && npm run check:model && npm run test:model",
58
+ "check": "npm run validate && npm run check:index && npm run check:standards && npm run check:locales && npm run check:audit && npm run test:audit && npm run check:planned && npm run test:planned && npm run check:model && npm run test:model && npm run check:exports && npm run test:exports",
54
59
  "check:standards": "node scripts/check-standards.mjs",
55
60
  "check:locales": "node scripts/check-locales.mjs",
56
61
  "check:audit": "node audit/audit.mjs",
@@ -58,6 +63,8 @@
58
63
  "check:planned": "node scripts/check-planned-acts.mjs",
59
64
  "test:planned": "node --test scripts/check-planned-acts.test.mjs",
60
65
  "check:model": "node scripts/check-model-versions.mjs",
66
+ "check:exports": "node scripts/check-exports.mjs",
67
+ "test:exports": "node --test scripts/check-exports.test.mjs",
61
68
  "test:model": "node --test scripts/model-hash.test.mjs",
62
69
  "bump:model": "node scripts/bump-model.mjs"
63
70
  }