reffy 6.1.0 → 6.1.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reffy",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "W3C/WHATWG spec dependencies exploration companion. Features a short set of tools to study spec references as well as WebIDL term definitions and references found in W3C specifications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"browser-specs": "2.21.0",
|
|
36
36
|
"commander": "8.3.0",
|
|
37
37
|
"fetch-filecache-for-crawling": "4.0.2",
|
|
38
|
-
"puppeteer": "13.1.
|
|
38
|
+
"puppeteer": "13.1.2",
|
|
39
39
|
"semver": "^7.3.5",
|
|
40
40
|
"webidl2": "24.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"chai": "4.3.4",
|
|
44
|
-
"mocha": "9.
|
|
44
|
+
"mocha": "9.2.0",
|
|
45
45
|
"nock": "13.2.2",
|
|
46
|
-
"respec": "28.2.
|
|
46
|
+
"respec": "28.2.6",
|
|
47
47
|
"respec-hljs": "2.1.1",
|
|
48
|
-
"rollup": "2.
|
|
48
|
+
"rollup": "2.66.1"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"test": "mocha --recursive tests/"
|
|
@@ -56,7 +56,7 @@ async function generateIdlParsed(spec) {
|
|
|
56
56
|
// IDL content is invalid and cannot be parsed.
|
|
57
57
|
// Let's return the error, along with the raw IDL
|
|
58
58
|
// content so that it may be saved to a file.
|
|
59
|
-
spec.idlparsed = err;
|
|
59
|
+
spec.idlparsed = err.toString();
|
|
60
60
|
}
|
|
61
61
|
return spec;
|
|
62
62
|
}
|
package/src/cli/parse-webidl.js
CHANGED
|
@@ -261,8 +261,14 @@ function parseInterfaceOrDictionary(def, idlReport) {
|
|
|
261
261
|
|
|
262
262
|
const exposedEA = def.extAttrs.find(ea => ea.name === "Exposed");
|
|
263
263
|
if (exposedEA && exposedEA.rhs) {
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
let exposedNames = [];
|
|
265
|
+
if (exposedEA.rhs.type === "*") {
|
|
266
|
+
exposedNames.push("*");
|
|
267
|
+
} else if (exposedEA.rhs.type === "identifier") {
|
|
268
|
+
exposedNames.push(exposedEA.rhs.value);
|
|
269
|
+
} else {
|
|
270
|
+
exposedNames = exposedEA.rhs.value.map(c => c.value);
|
|
271
|
+
}
|
|
266
272
|
exposedNames.forEach(name => {
|
|
267
273
|
if (!exposed[name]) {
|
|
268
274
|
exposed[name] = [];
|
|
@@ -313,7 +319,9 @@ function addToJSContext(eas, jsNames, name, type) {
|
|
|
313
319
|
var exposed = eas && eas.some(ea => ea.name === "Exposed");
|
|
314
320
|
if (exposed) {
|
|
315
321
|
var exposedEa = eas.find(ea => ea.name === "Exposed");
|
|
316
|
-
if (exposedEa.rhs.type === "
|
|
322
|
+
if (exposedEa.rhs.type === "*") {
|
|
323
|
+
contexts = ["*"];
|
|
324
|
+
} else if (exposedEa.rhs.type === "identifier") {
|
|
317
325
|
contexts = [exposedEa.rhs.value];
|
|
318
326
|
} else {
|
|
319
327
|
contexts = exposedEa.rhs.value.map(c => c.value);
|