mancha 0.17.3 → 0.17.5
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/.github/workflows/ci.yml +8 -8
- package/.prettierrc +2 -2
- package/.vscode/extensions.json +1 -1
- package/.vscode/launch.json +33 -43
- package/README.md +94 -94
- package/dist/browser.js.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/css_gen_basic.js.map +1 -1
- package/dist/css_gen_utils.d.ts +786 -0
- package/dist/css_gen_utils.js +63 -23
- package/dist/css_gen_utils.js.map +1 -1
- package/dist/dome.js.map +1 -1
- package/dist/expressions/ast.d.ts +16 -16
- package/dist/expressions/ast.test.js +89 -64
- package/dist/expressions/ast.test.js.map +1 -1
- package/dist/expressions/ast_factory.d.ts +1 -1
- package/dist/expressions/ast_factory.js +17 -17
- package/dist/expressions/ast_factory.js.map +1 -1
- package/dist/expressions/ast_factory.test.js +42 -36
- package/dist/expressions/ast_factory.test.js.map +1 -1
- package/dist/expressions/constants.js +56 -56
- package/dist/expressions/constants.js.map +1 -1
- package/dist/expressions/constants.test.js +57 -57
- package/dist/expressions/constants.test.js.map +1 -1
- package/dist/expressions/eval.d.ts +17 -17
- package/dist/expressions/eval.js +58 -60
- package/dist/expressions/eval.js.map +1 -1
- package/dist/expressions/eval.test.js +11 -8
- package/dist/expressions/eval.test.js.map +1 -1
- package/dist/expressions/expressions.test.d.ts +6 -6
- package/dist/expressions/expressions.test.js +6 -6
- package/dist/expressions/index.d.ts +6 -6
- package/dist/expressions/index.js +6 -6
- package/dist/expressions/parser.d.ts +3 -3
- package/dist/expressions/parser.js +37 -42
- package/dist/expressions/parser.js.map +1 -1
- package/dist/expressions/parser.test.js +3 -6
- package/dist/expressions/parser.test.js.map +1 -1
- package/dist/expressions/tokenizer.js +22 -25
- package/dist/expressions/tokenizer.js.map +1 -1
- package/dist/expressions/tokenizer.test.js +40 -15
- package/dist/expressions/tokenizer.test.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/iterator.js.map +1 -1
- package/dist/mancha.js.map +1 -1
- package/dist/plugins.js +2 -2
- package/dist/plugins.js.map +1 -1
- package/dist/query.js.map +1 -1
- package/dist/renderer.js.map +1 -1
- package/dist/safe_browser.js.map +1 -1
- package/dist/store.js +1 -1
- package/dist/store.js.map +1 -1
- package/dist/test_utils.js.map +1 -1
- package/dist/trusted_attributes.js.map +1 -1
- package/dist/type_checker.js +11 -7
- package/dist/type_checker.js.map +1 -1
- package/dist/worker.js.map +1 -1
- package/docs/css.md +419 -0
- package/docs/quickstart.md +305 -296
- package/global.d.ts +2 -2
- package/gulpfile.ts +44 -0
- package/package.json +86 -84
- package/scripts/generate-css-docs.ts +374 -0
- package/tsconfig.json +42 -19
- package/tsec_exemptions.json +8 -3
- package/webpack.config.esmodule.ts +26 -0
- package/webpack.config.ts +21 -0
- package/gulpfile.js +0 -44
- package/webpack.config.esmodule.js +0 -23
- package/webpack.config.js +0 -18
package/tsec_exemptions.json
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
"ban-domparser-parsefromstring": [
|
|
3
|
+
"src/browser.ts",
|
|
4
|
+
"src/dome.test.ts",
|
|
5
|
+
"src/worker.test.ts",
|
|
6
|
+
"src/test_utils.ts"
|
|
7
|
+
],
|
|
8
|
+
"ban-range-createcontextualfragment": ["src/browser.ts"]
|
|
9
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import TerserPlugin from "terser-webpack-plugin";
|
|
2
|
+
import type { Configuration } from "webpack";
|
|
3
|
+
|
|
4
|
+
const config: Configuration = {
|
|
5
|
+
target: "web",
|
|
6
|
+
mode: "production",
|
|
7
|
+
entry: {
|
|
8
|
+
browser: "./dist/browser.js",
|
|
9
|
+
safe_browser: "./dist/safe_browser.js",
|
|
10
|
+
},
|
|
11
|
+
output: {
|
|
12
|
+
filename: "[name].js",
|
|
13
|
+
library: { type: "modern-module" },
|
|
14
|
+
},
|
|
15
|
+
experiments: {
|
|
16
|
+
outputModule: true,
|
|
17
|
+
},
|
|
18
|
+
optimization: {
|
|
19
|
+
minimize: true,
|
|
20
|
+
minimizer: [
|
|
21
|
+
new TerserPlugin({ extractComments: false, terserOptions: { output: { comments: false } } }),
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import TerserPlugin from "terser-webpack-plugin";
|
|
2
|
+
import type { Configuration } from "webpack";
|
|
3
|
+
|
|
4
|
+
const config: Configuration = {
|
|
5
|
+
target: "web",
|
|
6
|
+
mode: "production",
|
|
7
|
+
entry: {
|
|
8
|
+
mancha: "./dist/mancha.js",
|
|
9
|
+
},
|
|
10
|
+
output: {
|
|
11
|
+
filename: "[name].js",
|
|
12
|
+
},
|
|
13
|
+
optimization: {
|
|
14
|
+
minimize: true,
|
|
15
|
+
minimizer: [
|
|
16
|
+
new TerserPlugin({ extractComments: false, terserOptions: { output: { comments: false } } }),
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default config;
|
package/gulpfile.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as fs from "fs/promises";
|
|
2
|
-
import GulpClient from "gulp";
|
|
3
|
-
import csso from "gulp-csso";
|
|
4
|
-
import { exec } from "child_process";
|
|
5
|
-
|
|
6
|
-
const execTask = (command) => {
|
|
7
|
-
return async function (done) {
|
|
8
|
-
const { err, stderr, stdout } = await new Promise((resolve) =>
|
|
9
|
-
exec(command, (err, stderr, stdout) => resolve({ err, stderr, stdout }))
|
|
10
|
-
);
|
|
11
|
-
if (stdout) console.log(stdout);
|
|
12
|
-
if (stderr) console.error(stderr);
|
|
13
|
-
done(err);
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// Clean tasks
|
|
18
|
-
|
|
19
|
-
GulpClient.task("clean", function (done) {
|
|
20
|
-
return fs.rm("dist", { recursive: true, force: true }).then(done);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// Build tasks
|
|
24
|
-
|
|
25
|
-
GulpClient.task("ts", execTask("tsec -m ES2022 -p ."));
|
|
26
|
-
|
|
27
|
-
GulpClient.task("chmod", function (done) {
|
|
28
|
-
return fs.chmod("dist/cli.js", 0o755).then(done);
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
GulpClient.task("css", function () {
|
|
32
|
-
return GulpClient.src("src/**/*.css").pipe(csso()).pipe(GulpClient.dest("dist"));
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
GulpClient.task("webpack:main", execTask("webpack --config webpack.config.js"));
|
|
36
|
-
GulpClient.task("webpack:esmodule", execTask("webpack --config webpack.config.esmodule.js"));
|
|
37
|
-
|
|
38
|
-
GulpClient.task("fixtures", function () {
|
|
39
|
-
return GulpClient.src("src/fixtures/**/*").pipe(GulpClient.dest("dist/fixtures"));
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
GulpClient.task("webpack", GulpClient.series("webpack:main", "webpack:esmodule"));
|
|
43
|
-
GulpClient.task("build", GulpClient.series("ts", "chmod", "css", "webpack", "fixtures"));
|
|
44
|
-
GulpClient.task("default", GulpClient.series("build"));
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import TerserPlugin from "terser-webpack-plugin";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
target: "web",
|
|
5
|
-
mode: "production",
|
|
6
|
-
entry: {
|
|
7
|
-
"browser": "./dist/browser.js",
|
|
8
|
-
"safe_browser": "./dist/safe_browser.js",
|
|
9
|
-
},
|
|
10
|
-
output: {
|
|
11
|
-
filename: "[name].js",
|
|
12
|
-
library: { type: "modern-module" },
|
|
13
|
-
},
|
|
14
|
-
experiments: {
|
|
15
|
-
outputModule: true,
|
|
16
|
-
},
|
|
17
|
-
optimization: {
|
|
18
|
-
minimize: true,
|
|
19
|
-
minimizer: [
|
|
20
|
-
new TerserPlugin({ extractComments: false, terserOptions: { output: { comments: false } } }),
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
};
|
package/webpack.config.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import TerserPlugin from "terser-webpack-plugin";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
target: "web",
|
|
5
|
-
mode: "production",
|
|
6
|
-
entry: {
|
|
7
|
-
mancha: "./dist/mancha.js",
|
|
8
|
-
},
|
|
9
|
-
output: {
|
|
10
|
-
filename: "[name].js",
|
|
11
|
-
},
|
|
12
|
-
optimization: {
|
|
13
|
-
minimize: true,
|
|
14
|
-
minimizer: [
|
|
15
|
-
new TerserPlugin({ extractComments: false, terserOptions: { output: { comments: false } } }),
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
};
|