@pubid/pubid 0.1.28 → 0.1.29
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/dist/flavors/ieee/index.js +15 -5
- package/dist/flavors/ieee/model.js +8 -3
- package/package.json +1 -1
- package/vendor/parg/ieee.json +1767 -1683
|
@@ -1196,11 +1196,18 @@ class IeeeBuilder {
|
|
|
1196
1196
|
/^\d/.test(extractValue(parsed["draft_version"]) ?? "");
|
|
1197
1197
|
// P + a /D designator (any draft capture) is a DRAFT, never a
|
|
1198
1198
|
// printed Std (the owner's 2026-10-24 ruling) -- the joint/
|
|
1199
|
-
// project-draft family owns the row
|
|
1200
|
-
//
|
|
1201
|
-
|
|
1199
|
+
// project-draft family owns the row whatever date trails the
|
|
1200
|
+
// designator. The ruling extends to the P-less joint rows
|
|
1201
|
+
// (pubid#597): a numeric /D designator alone is project status
|
|
1202
|
+
// too -- the row is a draft AND takes the P, so the marker is set
|
|
1203
|
+
// below when the source spelling lacked it.
|
|
1204
|
+
const pWithDraft = (parsed["project_marker"] !== undefined || numericDraft) &&
|
|
1202
1205
|
(parsed["draft_version"] !== undefined || parsed["draft_iso_stage"] !== undefined ||
|
|
1203
1206
|
parsed["draft_month"] !== undefined || parsed["draft_year"] !== undefined);
|
|
1207
|
+
if (pWithDraft && parsed["project_marker"] === undefined) {
|
|
1208
|
+
attributes["project_marker"] = true;
|
|
1209
|
+
parsed["project_marker"] = "P";
|
|
1210
|
+
}
|
|
1204
1211
|
if (parsed["iso_published"] !== undefined && !pWithDraft &&
|
|
1205
1212
|
(parsed["printed_dash_year"] !== undefined || parsed["printed_month_year"] !== undefined ||
|
|
1206
1213
|
(numericDraft && parsed["draft_month"] !== undefined) ||
|
|
@@ -1414,8 +1421,11 @@ class IeeeBuilder {
|
|
|
1414
1421
|
projectAttrs[k] = attributes[k];
|
|
1415
1422
|
}
|
|
1416
1423
|
}
|
|
1417
|
-
|
|
1418
|
-
|
|
1424
|
+
// The ruling (pubid#597): a joint row with a numeric /D designator
|
|
1425
|
+
// is a draft AND takes the P project marker, whatever the source
|
|
1426
|
+
// spelling printed -- the marker rides the identifier even when
|
|
1427
|
+
// the row reached it without one.
|
|
1428
|
+
projectAttrs["project_marker"] = true;
|
|
1419
1429
|
if (pubs.length > 0) {
|
|
1420
1430
|
projectAttrs["publisher"] = pubs[0];
|
|
1421
1431
|
if (pubs.length > 1)
|
|
@@ -492,12 +492,17 @@ export function renderIeeeBase(id) {
|
|
|
492
492
|
}
|
|
493
493
|
if (id.draft_status !== undefined)
|
|
494
494
|
parts.push(id.draft_status);
|
|
495
|
-
const
|
|
495
|
+
const isProjectDraft = id.constructor.polymorphicName ===
|
|
496
|
+
"pubid:ieee:project-draft-identifier";
|
|
497
|
+
// A project draft carries the word Draft whatever the lead
|
|
498
|
+
// publisher -- the ISO-led joint drafts (pubid#597) print it too.
|
|
499
|
+
const shouldRenderType = /^(IEEE|AIEE)/.test(id.publisher ?? "") || isProjectDraft;
|
|
496
500
|
const stageObj = id.typed_stage;
|
|
497
501
|
if (shouldRenderType && !(stageObj?.projectStatus === true) &&
|
|
498
|
-
id.type !== undefined && id.type.trim() !== "" && id.type !== "P"
|
|
502
|
+
((id.type !== undefined && id.type.trim() !== "" && id.type !== "P") ||
|
|
503
|
+
isProjectDraft) &&
|
|
499
504
|
!/unapproved/i.test(id.draft_status ?? "")) {
|
|
500
|
-
let typeStr = id.type;
|
|
505
|
+
let typeStr = id.type ?? "Draft";
|
|
501
506
|
if (typeStr.startsWith("P"))
|
|
502
507
|
typeStr = typeStr.slice(1);
|
|
503
508
|
// A draft carries the word Draft alone in every face (the C2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubid/pubid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
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",
|