reffy 17.0.0 → 17.1.0
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/index.js +13 -2
- package/package.json +3 -3
- package/src/cli/parse-webidl.js +6 -1
- package/src/lib/post-processor.js +5 -4
- package/src/lib/specs-crawler.js +1 -1
- package/src/lib/util.js +2 -5
- package/src/postprocessing/idlparsed.js +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { parseIdl } from "./src/cli/parse-webidl.js";
|
|
1
|
+
import { parse as parseIdl } from "./src/cli/parse-webidl.js";
|
|
2
2
|
import { crawlSpecs } from "./src/lib/specs-crawler.js";
|
|
3
3
|
import { expandCrawlResult } from "./src/lib/util.js";
|
|
4
|
-
import { mergeCrawlResults } from "./src/
|
|
4
|
+
import { mergeCrawlResults } from "./src/cli/merge-crawl-results.js";
|
|
5
5
|
import { isLatestLevelThatPasses } from "./src/lib/util.js";
|
|
6
6
|
import { getInterfaceTreeInfo } from "./src/lib/util.js";
|
|
7
7
|
import { getSchemaValidationFunction } from "./src/lib/util.js";
|
|
@@ -16,4 +16,15 @@ export {
|
|
|
16
16
|
getInterfaceTreeInfo,
|
|
17
17
|
getSchemaValidationFunction,
|
|
18
18
|
postProcessor
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
parseIdl,
|
|
23
|
+
crawlSpecs,
|
|
24
|
+
expandCrawlResult,
|
|
25
|
+
mergeCrawlResults,
|
|
26
|
+
isLatestLevelThatPasses,
|
|
27
|
+
getInterfaceTreeInfo,
|
|
28
|
+
getSchemaValidationFunction,
|
|
29
|
+
postProcessor
|
|
19
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reffy",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.1.0",
|
|
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",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"ajv-formats": "3.0.1",
|
|
38
38
|
"commander": "12.1.0",
|
|
39
39
|
"fetch-filecache-for-crawling": "5.1.1",
|
|
40
|
-
"puppeteer": "22.
|
|
40
|
+
"puppeteer": "22.14.0",
|
|
41
41
|
"semver": "^7.3.5",
|
|
42
|
-
"web-specs": "3.
|
|
42
|
+
"web-specs": "3.14.0",
|
|
43
43
|
"webidl2": "24.4.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
package/src/cli/parse-webidl.js
CHANGED
|
@@ -410,9 +410,14 @@ function addDependency(name, idlNames, externalDependencies) {
|
|
|
410
410
|
|
|
411
411
|
|
|
412
412
|
/**************************************************
|
|
413
|
-
Export the
|
|
413
|
+
Export the Web IDL parser
|
|
414
414
|
**************************************************/
|
|
415
|
+
const webidlParser = {
|
|
416
|
+
parse,
|
|
417
|
+
hasObsoleteIdl
|
|
418
|
+
};
|
|
415
419
|
export {
|
|
420
|
+
webidlParser as default,
|
|
416
421
|
parse,
|
|
417
422
|
hasObsoleteIdl
|
|
418
423
|
};
|
|
@@ -308,13 +308,14 @@ function appliesAtLevel(mod, level) {
|
|
|
308
308
|
/**************************************************
|
|
309
309
|
Export post-processing functions
|
|
310
310
|
**************************************************/
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
moduleNames as modules,
|
|
311
|
+
const postProcessor = {
|
|
312
|
+
modules: Object.keys(modules),
|
|
314
313
|
loadModules,
|
|
315
314
|
run, save,
|
|
316
315
|
extractsPerSeries,
|
|
317
316
|
dependsOn,
|
|
318
317
|
getProperty,
|
|
319
318
|
appliesAtLevel
|
|
320
|
-
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export default postProcessor;
|
package/src/lib/specs-crawler.js
CHANGED
|
@@ -14,7 +14,7 @@ import fs from 'node:fs';
|
|
|
14
14
|
import path from 'node:path';
|
|
15
15
|
import { inspect } from 'node:util';
|
|
16
16
|
import specs from 'web-specs' with { type: 'json' };
|
|
17
|
-
import
|
|
17
|
+
import postProcessor from './post-processor.js';
|
|
18
18
|
import ThrottledQueue from './throttled-queue.js';
|
|
19
19
|
import {
|
|
20
20
|
completeWithAlternativeUrls,
|
package/src/lib/util.js
CHANGED
|
@@ -1059,11 +1059,8 @@ async function getSchemaValidationFunction(schemaName) {
|
|
|
1059
1059
|
|
|
1060
1060
|
const schemasFolder = path.resolve(scriptPath, '..', '..', 'schemas');
|
|
1061
1061
|
const schemaFile = getSchemaFileFromSchemaName(schemaName);
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
schema = await loadJSON(path.join(schemasFolder, schemaFile));
|
|
1065
|
-
}
|
|
1066
|
-
catch (err) {
|
|
1062
|
+
const schema = await loadJSON(path.join(schemasFolder, schemaFile));
|
|
1063
|
+
if (!schema) {
|
|
1067
1064
|
return null;
|
|
1068
1065
|
}
|
|
1069
1066
|
|