respec 32.8.0 → 33.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/builds/respec-aom.js +23 -23
- package/builds/respec-aom.js.map +1 -1
- package/builds/respec-dini.js +72 -72
- package/builds/respec-dini.js.map +1 -1
- package/builds/respec-geonovum.js +85 -85
- package/builds/respec-geonovum.js.map +1 -1
- package/builds/respec-w3c.js +3 -3
- package/builds/respec-w3c.js.map +1 -1
- package/package.json +27 -25
- package/tools/respec2html.js +9 -10
- package/tools/respecDocWriter.js +8 -7
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "respec",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "33.0.0",
|
|
4
4
|
"license": "W3C",
|
|
5
5
|
"description": "A technical specification pre-processor.",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
8
|
-
"npm": ">=7"
|
|
7
|
+
"node": ">=18.14"
|
|
9
8
|
},
|
|
9
|
+
"packageManager": "pnpm@8.1.1",
|
|
10
10
|
"bin": {
|
|
11
11
|
"respec": "tools/respec2html.js",
|
|
12
12
|
"respec2html": "tools/respec2html.js"
|
|
13
13
|
},
|
|
14
14
|
"main": "./tools/respecDocWriter.js",
|
|
15
|
+
"type": "module",
|
|
15
16
|
"repository": {
|
|
16
17
|
"type": "git",
|
|
17
18
|
"url": "git://github.com/w3c/respec.git"
|
|
@@ -32,8 +33,8 @@
|
|
|
32
33
|
"chokidar": "^3.5.3",
|
|
33
34
|
"clean-css": "^5.3.2",
|
|
34
35
|
"epipebomb": "^1.0.0",
|
|
35
|
-
"eslint": "^8.
|
|
36
|
-
"eslint-config-prettier": "^8.
|
|
36
|
+
"eslint": "^8.37.0",
|
|
37
|
+
"eslint-config-prettier": "^8.8.0",
|
|
37
38
|
"eslint-plugin-import": "^2.27.5",
|
|
38
39
|
"eslint-plugin-jasmine": "^4.1.3",
|
|
39
40
|
"eslint-plugin-prettier": "^4.2.1",
|
|
@@ -51,9 +52,9 @@
|
|
|
51
52
|
"karma-safari-launcher": "^1.0.0",
|
|
52
53
|
"loading-indicator": "^2.0.0",
|
|
53
54
|
"pluralize": "^8.0.0",
|
|
54
|
-
"prettier": "^2.8.
|
|
55
|
+
"prettier": "^2.8.7",
|
|
55
56
|
"prompt": "^1.3.0",
|
|
56
|
-
"rollup": "^3.20.
|
|
57
|
+
"rollup": "^3.20.2",
|
|
57
58
|
"rollup-plugin-minify-html-literals": "^1.2.6",
|
|
58
59
|
"rollup-plugin-terser": "^7.0.2",
|
|
59
60
|
"serve": "^14.2.0",
|
|
@@ -64,31 +65,32 @@
|
|
|
64
65
|
"webidl2": "^24.2.2"
|
|
65
66
|
},
|
|
66
67
|
"scripts": {
|
|
67
|
-
"build:aom-debug": "
|
|
68
|
-
"build:aom": "
|
|
69
|
-
"build:geonovum-debug": "
|
|
70
|
-
"build:geonovum": "
|
|
71
|
-
"build:w3c-debug": "
|
|
72
|
-
"build:w3c": "
|
|
73
|
-
"build:dini-debug": "
|
|
74
|
-
"build:dini": "
|
|
68
|
+
"build:aom-debug": "pnpm build:aom -- --debug",
|
|
69
|
+
"build:aom": "pnpm builder aom",
|
|
70
|
+
"build:geonovum-debug": "pnpm build:geonovum -- --debug",
|
|
71
|
+
"build:geonovum": "pnpm builder geonovum",
|
|
72
|
+
"build:w3c-debug": "pnpm build:w3c -- --debug",
|
|
73
|
+
"build:w3c": "pnpm builder w3c",
|
|
74
|
+
"build:dini-debug": "pnpm build:dini -- --debug",
|
|
75
|
+
"build:dini": "pnpm builder dini",
|
|
75
76
|
"builddeps": "rollup -c js/deps/rollup.config.js --bundleConfigAsCjs && rollup -c worker/rollup.config.js --bundleConfigAsCjs",
|
|
76
77
|
"lint": "tsc -p src/jsconfig.json && eslint .",
|
|
77
|
-
"prepare": "
|
|
78
|
-
"
|
|
78
|
+
"prepare": "pnpm builddeps",
|
|
79
|
+
"builder": "node ./tools/builder.cjs",
|
|
80
|
+
"release": "node ./tools/release.cjs",
|
|
79
81
|
"server": "serve",
|
|
80
|
-
"start": "node ./tools/dev-server.
|
|
81
|
-
"test:build": "jasmine --random=false ./tests/test-build.
|
|
82
|
-
"test:headless": "jasmine --random=false ./tests/headless.
|
|
83
|
-
"test": "
|
|
84
|
-
"test:unit": "karma start ./tests/unit/karma.conf.
|
|
85
|
-
"test:integration": "karma start ./tests/spec/karma.conf.
|
|
82
|
+
"start": "node ./tools/dev-server.cjs",
|
|
83
|
+
"test:build": "jasmine --random=false ./tests/test-build.cjs",
|
|
84
|
+
"test:headless": "jasmine --random=false ./tests/headless.cjs",
|
|
85
|
+
"test": "pnpm test:unit && pnpm test:integration",
|
|
86
|
+
"test:unit": "karma start ./tests/unit/karma.conf.cjs --single-run",
|
|
87
|
+
"test:integration": "karma start ./tests/spec/karma.conf.cjs --single-run"
|
|
86
88
|
},
|
|
87
89
|
"dependencies": {
|
|
88
90
|
"colors": "1.4.0",
|
|
89
91
|
"finalhandler": "^1.2.0",
|
|
90
|
-
"marked": "^4.
|
|
91
|
-
"puppeteer": "^19.
|
|
92
|
+
"marked": "^4.3.0",
|
|
93
|
+
"puppeteer": "^19.8.2",
|
|
92
94
|
"sade": "^1.8.1",
|
|
93
95
|
"serve-static": "^1.15.0"
|
|
94
96
|
},
|
package/tools/respec2html.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const { toHTML } = require("./respecDocWriter.js");
|
|
2
|
+
import colors from "colors";
|
|
3
|
+
import finalhandler from "finalhandler";
|
|
4
|
+
import http from "http";
|
|
5
|
+
import { marked } from "marked";
|
|
6
|
+
import path from "path";
|
|
7
|
+
import sade from "sade";
|
|
8
|
+
import serveStatic from "serve-static";
|
|
9
|
+
import { toHTML } from "./respecDocWriter.js";
|
|
10
|
+
import { writeFile } from "fs/promises";
|
|
12
11
|
|
|
13
12
|
class Renderer extends marked.Renderer {
|
|
14
13
|
strong(text) {
|
package/tools/respecDocWriter.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Exports toHTML() method, allowing programmatic control of the spec generator.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { mkdtemp, readFile } from "fs/promises";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
import path from "path";
|
|
7
|
+
import puppeteer from "puppeteer";
|
|
8
|
+
import { tmpdir } from "os";
|
|
9
|
+
|
|
10
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
11
|
|
|
9
12
|
const noop = () => {};
|
|
10
13
|
|
|
@@ -22,7 +25,7 @@ const noop = () => {};
|
|
|
22
25
|
* @return {Promise<{ html: string, errors: RsError[], warnings: RsError[] }>}
|
|
23
26
|
* @throws {Error} If failed to process.
|
|
24
27
|
*/
|
|
25
|
-
async function toHTML(src, options = {}) {
|
|
28
|
+
export async function toHTML(src, options = {}) {
|
|
26
29
|
const {
|
|
27
30
|
timeout = 300000,
|
|
28
31
|
disableSandbox = false,
|
|
@@ -345,5 +348,3 @@ function createTimer(duration) {
|
|
|
345
348
|
},
|
|
346
349
|
};
|
|
347
350
|
}
|
|
348
|
-
|
|
349
|
-
exports.toHTML = toHTML;
|