Skip to content

Commit 26bb775

Browse files
authored
chore: remove legacy code related to w3c-common profile (#2839)
1 parent 1e6b28a commit 26bb775

File tree

7 files changed

+2
-33
lines changed

7 files changed

+2
-33
lines changed

src/core/data-cite.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
* directly by the author as well as via other modules like core/xref.
1111
*/
1212
import { biblio, resolveRef, updateFromNetwork } from "./biblio.js";
13-
import { pub, sub } from "./pubsubhub.js";
1413
import {
1514
refTypeFromContext,
1615
showInlineError,
1716
showInlineWarning,
1817
wrapInner,
1918
} from "./utils.js";
19+
import { sub } from "./pubsubhub.js";
2020
export const name = "core/data-cite";
2121

2222
/**
@@ -178,13 +178,6 @@ export async function run() {
178178
}
179179

180180
sub("beforesave", cleanup);
181-
182-
// Added message for legacy compat with Aria specs
183-
// See https://github.com/w3c/respec/issues/793,
184-
//
185-
// Why `core/link-to-dfn` and not `core/data-cite`? For backward compatibility
186-
// after a refactor (https://github.com/w3c/respec/issues/2830)
187-
pub("end", "core/link-to-dfn");
188181
}
189182

190183
/**

src/core/location-hash.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
// Module core/location-hash
33
// Resets window.location.hash to jump to the right point in the document
44

5-
import { pub } from "./pubsubhub.js";
65
export const name = "core/location-hash";
76

87
export function run() {
9-
// Added message for legacy compat with Aria specs
10-
// See https://github.com/w3c/respec/issues/793
11-
pub("start", "core/location-hash");
128
if (!location.hash) {
139
return;
1410
}

src/core/override-configuration.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import { pub, sub } from "./pubsubhub.js";
1010
export const name = "core/override-configuration";
1111

1212
function overrideConfig(config) {
13-
// For legacy reasons, we still support both ";" and "&"
14-
const searchQuery = document.location.search.replace(/;/g, "&");
15-
const params = new URLSearchParams(searchQuery);
13+
const params = new URLSearchParams(document.location.search);
1614
const overrideEntries = Array.from(params)
1715
.filter(([key, value]) => !!key && !!value)
1816
.map(([codedKey, codedValue]) => {

src/dini/conformance.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,4 @@ export function run(conf) {
8989
'Please add a `<section id="conformance">`.'
9090
);
9191
}
92-
// Added message for legacy compat with Aria specs
93-
// See https://github.com/w3c/respec/issues/793
94-
pub("end", name);
9592
}

src/dini/defaults.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55
export const name = "dini/defaults";
66
import { coreDefaults } from "../core/defaults.js";
7-
import { definitionMap } from "../core/dfn-map.js";
87
import linter from "../core/linter.js";
98
import { rule as privsecSectionRule } from "../core/linter-rules/privsec-section.js";
109

@@ -80,9 +79,4 @@ export function run(conf) {
8079

8180
// computed properties
8281
Object.assign(conf, computeProps(conf));
83-
84-
// TODO: eventually, we want to remove this.
85-
// It's here for legacy support of json-ld specs
86-
// see https://github.com/w3c/respec/issues/2019
87-
Object.assign(conf, { ...Object.fromEntries(definitionMap) });
8882
}

src/w3c/conformance.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,4 @@ export function run(conf) {
8989
'Please add a `<section id="conformance">`.'
9090
);
9191
}
92-
// Added message for legacy compat with Aria specs
93-
// See https://github.com/w3c/respec/issues/793
94-
pub("end", name);
9592
}

src/w3c/defaults.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55
export const name = "w3c/defaults";
66
import { coreDefaults } from "../core/defaults.js";
7-
import { definitionMap } from "../core/dfn-map.js";
87
import linter from "../core/linter.js";
98
import { rule as privsecSectionRule } from "../core/linter-rules/privsec-section.js";
109
import { rule as wptTestsExist } from "../core/linter-rules/wpt-tests-exist.js";
@@ -46,9 +45,4 @@ export function run(conf) {
4645
...conf,
4746
lint,
4847
});
49-
50-
// TODO: eventually, we want to remove this.
51-
// It's here for legacy support of json-ld specs
52-
// see https://github.com/w3c/respec/issues/2019
53-
Object.assign(conf, { ...Object.fromEntries(definitionMap) });
5448
}

0 commit comments

Comments
 (0)