reffy 6.4.3 → 7.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reffy",
3
- "version": "6.4.3",
3
+ "version": "7.0.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",
@@ -34,18 +34,18 @@
34
34
  "abortcontroller-polyfill": "1.7.3",
35
35
  "commander": "9.0.0",
36
36
  "fetch-filecache-for-crawling": "4.1.0",
37
- "puppeteer": "13.3.2",
37
+ "puppeteer": "13.5.0",
38
38
  "semver": "^7.3.5",
39
- "web-specs": "1.2.0",
39
+ "web-specs": "2.0.0",
40
40
  "webidl2": "24.2.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "chai": "4.3.6",
44
44
  "mocha": "9.2.1",
45
45
  "nock": "13.2.4",
46
- "respec": "31.0.3",
46
+ "respec": "31.0.11",
47
47
  "respec-hljs": "2.1.1",
48
- "rollup": "2.67.3"
48
+ "rollup": "2.70.0"
49
49
  },
50
50
  "scripts": {
51
51
  "test": "mocha --recursive tests/"
@@ -34,7 +34,7 @@ function normalize(str) {
34
34
  }
35
35
 
36
36
  // Valid types defined in https://tabatkins.github.io/bikeshed/#dfn-types
37
- // (+ "namespace" and "event" which are not yet in the doc)
37
+ // (+ "namespace", "event" and "permission" which are not yet in the doc)
38
38
  function hasValidType(el) {
39
39
  const validDfnTypes = [
40
40
  // CSS types
@@ -68,6 +68,7 @@ function hasValidType(el) {
68
68
  'setlike',
69
69
  'extended-attribute',
70
70
  'event',
71
+ 'permission',
71
72
 
72
73
  // Element types
73
74
  'element',
@@ -447,11 +447,20 @@ async function adjustExtractsPerSeries(data, property, settings) {
447
447
 
448
448
  data.forEach(spec => {
449
449
  if (fullLevels.includes(spec)) {
450
- // Full level, rename the extract after the series' shortname
451
- const pathname = path.resolve(settings.output, spec[property]);
452
- spec[property] = `${property}/${spec.series.shortname}${path.extname(spec[property])}`;
453
- const newpathname = path.resolve(settings.output, spec[property]);
454
- fs.renameSync(pathname, newpathname);
450
+ // Full level, rename the extract after the series' shortname,
451
+ // unless we're dealing with a fork spec, in which case, we'll
452
+ // drop the created extract (not to run into IDL duplication issues)
453
+ if (spec.seriesComposition === 'fork') {
454
+ const pathname = path.resolve(settings.output, spec[property]);
455
+ fs.unlinkSync(pathname);
456
+ delete spec[property];
457
+ }
458
+ else {
459
+ const pathname = path.resolve(settings.output, spec[property]);
460
+ spec[property] = `${property}/${spec.series.shortname}${path.extname(spec[property])}`;
461
+ const newpathname = path.resolve(settings.output, spec[property]);
462
+ fs.renameSync(pathname, newpathname);
463
+ }
455
464
  }
456
465
  else if (deltaLevels.includes(spec)) {
457
466
  // Delta level, need to keep the extract as-is