Skip to content

Commit

Permalink
fix(w3c): remove PER status as it no longer exists. (#4584)
Browse files Browse the repository at this point in the history
  • Loading branch information
caribouW3 authored Nov 17, 2023
1 parent 3cbe8b6 commit faa96aa
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 48 deletions.
1 change: 0 additions & 1 deletion src/core/render-biblio.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const REF_STATUSES = new Map([
["ED", "W3C Editor's Draft"],
["LCWD", "W3C Last Call Working Draft"],
["NOTE", "W3C Working Group Note"],
["PER", "W3C Proposed Edited Recommendation"],
["PR", "W3C Proposed Recommendation"],
["REC", "W3C Recommendation"],
["WD", "W3C Working Draft"],
Expand Down
9 changes: 0 additions & 9 deletions src/w3c/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ export const status2text = {
CR: "Candidate Recommendation",
CRD: "Candidate Recommendation",
PR: "Proposed Recommendation",
PER: "Proposed Edited Recommendation",
REC: "Recommendation",
DISC: "Discontinued Draft",
RSCND: "Rescinded Recommendation",
Expand Down Expand Up @@ -182,7 +181,6 @@ export const recTrackStatus = [
"CRD",
"DISC",
"FPWD",
"PER",
"PR",
"REC",
"RSCND",
Expand Down Expand Up @@ -333,7 +331,6 @@ export async function run(conf) {
conf.isMO = conf.specStatus === "MO";
conf.isNote = W3CNotes.includes(conf.specStatus);
conf.isNoTrack = noTrackStatus.includes(conf.specStatus);
conf.isPER = conf.specStatus === "PER";
conf.isPR = conf.specStatus === "PR";
conf.isRecTrack = recTrackStatus.includes(conf.specStatus);
conf.isRec = conf.isRecTrack && conf.specStatus === "REC";
Expand Down Expand Up @@ -574,12 +571,6 @@ export async function run(conf) {
}
conf.prEnd = validateDateAndRecover(conf, "prEnd");

if (conf.isPER && !conf.perEnd) {
const msg = docLink`${"[specStatus]"} is "PER", but no ${"[perEnd]"} is specified.`;
showError(msg, name);
}
conf.perEnd = validateDateAndRecover(conf, "perEnd");

if (conf.hasOwnProperty("updateableRec")) {
const msg = "Configuration option `updateableRec` is deprecated.";
const hint = docLink`Add an ${"[`updateable-rec`|#updateable-rec-class]"} CSS class to the Status of This Document section instead.`;
Expand Down
1 change: 0 additions & 1 deletion src/w3c/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const status2rdf = {
CRD: "w3p:CRD",
PR: "w3p:PR",
REC: "w3p:REC",
PER: "w3p:PER",
RSCND: "w3p:RSCND",
};

Expand Down
29 changes: 0 additions & 29 deletions tests/spec/w3c/headers-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,6 @@ describe("W3C — Headers", () => {
previousPublishDate: "197-123131-15",
crEnd: "bad date",
prEnd: "next wednesday",
perEnd: "today",
};
Object.assign(ops.config, newProps);
const doc = await makeRSDoc(ops);
Expand Down Expand Up @@ -1776,34 +1775,6 @@ describe("W3C — Headers", () => {
});
});

describe("perEnd", () => {
it("correctly flags a PER", async () => {
const ops = makeStandardOps();
const newProps = {
previousMaturity: "REC",
previousPublishDate: "2014-01-01",
prevRecURI: "https://www.example.com/rec.html",
implementationReportURI: "https://www.example.com/report.html",
perEnd: "2014-12-01",
specStatus: "PER",
wgPublicList: "WGLIST",
subjectPrefix: "[The Prefix]",
group: "webapps",
};
Object.assign(ops.config, newProps);
const doc = await makeRSDoc(ops);
const sotd = doc.getElementById("sotd");
const f = contains(sotd, "p", "Proposed Edited Recommendation");
expect(f).toHaveSize(2);
const questionnaires = doc
.getElementById("sotd")
.querySelector(
"a[href='https://www.w3.org/2002/09/wbs/myQuestionnaires']"
);
expect(questionnaires).toBeNull();
});
});

describe("sotdAfterWGinfo", () => {
it("relocates custom sotd", async () => {
const ops = makeStandardOps();
Expand Down
6 changes: 3 additions & 3 deletions tests/spec/w3c/seo-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ describe("W3C - SEO", () => {
publishDate: "2013-06-25",
previousPublishDate: "2012-06-07",
previousMaturity: "REC",
specStatus: "PER",
perEnd: "2014-06-25",
specStatus: "CR",
crEnd: "2014-06-25",
wgPatentURI: "http://www.w3.org/fake-patent-uri",
doJsonLd: true,
localBiblio: {
Expand Down Expand Up @@ -170,7 +170,7 @@ describe("W3C - SEO", () => {
expect(jsonld["@context"]).toContain("http://schema.org");
expect(jsonld.id).toBe("https://www.w3.org/TR/some-spec/");
expect(jsonld.type).toContain("TechArticle");
expect(jsonld.type).toContain("w3p:PER");
expect(jsonld.type).toContain("w3p:CR");
expect(jsonld.datePublished).toBe("2013-06-25");
expect(jsonld.description).toContain("test abstract");
expect(jsonld.inLanguage).toBe("en");
Expand Down
5 changes: 0 additions & 5 deletions tests/spec/w3c/style-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ const statuses = [
expectedURL: "https://www.w3.org/StyleSheets/TR/2021/W3C-NOTE",
group: "webapps",
},
{
specStatus: "PER",
expectedURL: "https://www.w3.org/StyleSheets/TR/2021/W3C-PER",
group: "webapps",
},
{
specStatus: "PR",
expectedURL: "https://www.w3.org/StyleSheets/TR/2021/W3C-PR",
Expand Down

0 comments on commit faa96aa

Please sign in to comment.