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 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/lib/util.js";
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.0.0",
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.13.1",
40
+ "puppeteer": "22.14.0",
41
41
  "semver": "^7.3.5",
42
- "web-specs": "3.13.1",
42
+ "web-specs": "3.14.0",
43
43
  "webidl2": "24.4.1"
44
44
  },
45
45
  "devDependencies": {
@@ -410,9 +410,14 @@ function addDependency(name, idlNames, externalDependencies) {
410
410
 
411
411
 
412
412
  /**************************************************
413
- Export the parse method for use as module
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 moduleNames = Object.keys(modules);
312
- export {
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;
@@ -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 * as postProcessor from './post-processor.js';
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
- let schema;
1063
- try {
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
 
@@ -5,7 +5,7 @@
5
5
  * The module runs at the spec level and generates an `idlparsed` property.
6
6
  */
7
7
 
8
- import * as webidlParser from '../cli/parse-webidl.js';
8
+ import webidlParser from '../cli/parse-webidl.js';
9
9
 
10
10
  export default {
11
11
  dependsOn: ['dfns', 'idl'],