@pubid/pubid 0.1.29 → 0.1.30

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.
@@ -340,6 +340,19 @@ function normalizeJointStageSpellings(input) {
340
340
  ? _m
341
341
  : `${pubs} ${num}/D=${stage}${iter}-${year}${month}`;
342
342
  });
343
+ // The crawl glues the month onto the stage after the code's slash
344
+ // ("IEEE/IEC/ISO P80005-1/FDIS_March 2012", and its canonical comma
345
+ // form "... Draft P80005-1/FDIS_March, 2012"): the stage is the
346
+ // ISO/IEC token and the month belongs to the date (pubid#600, the
347
+ // 2026-10-25 ruling) - decode onto the D= designator face. Scoped to
348
+ // a real month name glued to a stage token; the stage-iteration
349
+ // routes are untouched.
350
+ cleaned = cleaned.replace(/^((?:IEEE|ISO|IEC)(?:\/(?:IEEE|ISO|IEC))*\s+(?:Draft\s+)?P?[A-Z0-9][A-Z0-9.-]*\/)(FDIS|FCD|CDV|DIS|CD|WD|PWI|NP)_([A-Za-z]+),?\s+(\d{4})$/, (_m, head, stage, mon, year) => {
351
+ const month = STAGE_MONTH_NUMBERS[mon.charAt(0).toUpperCase() + mon.slice(1).toLowerCase()];
352
+ return month === undefined
353
+ ? _m
354
+ : `${head}D=${stage}-${year}${month}`;
355
+ });
343
356
  const pubs = "((?:ISO/IEC/IEEE|IEEE/ISO/IEC|IEEE/IEC/ISO|ISO/IEEE|IEC/IEEE|IEEE/IEC|ISO/IEC)(?:/ ?| ))";
344
357
  const stage = "(FDIS|FCD|CDV|DIS\\d?|CD\\d?|WD|PWI|NP)";
345
358
  const num = "(P?\\d+(?:[.-]\\d+)?)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pubid/pubid",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "TypeScript PubID identifiers: resolution, normalization and canonical hashes for every identifier in the pubid-testsuite corpus (41 standards bodies), with a conformance runner mirroring the Ruby reference",
5
5
  "type": "module",
6
6
  "license": "MIT",