@tbela99/css-parser 1.1.1 → 1.3.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +53 -6
  3. package/dist/index-umd-web.js +5503 -5037
  4. package/dist/index.cjs +5510 -5044
  5. package/dist/index.d.ts +148 -41
  6. package/dist/lib/ast/expand.js +81 -65
  7. package/dist/lib/ast/features/calc.js +14 -36
  8. package/dist/lib/ast/features/inlinecssvariables.js +6 -17
  9. package/dist/lib/ast/features/prefix.js +22 -19
  10. package/dist/lib/ast/features/shorthand.js +1 -1
  11. package/dist/lib/ast/features/transform.js +17 -2
  12. package/dist/lib/ast/math/expression.js +74 -172
  13. package/dist/lib/ast/math/math.js +24 -22
  14. package/dist/lib/ast/minify.js +249 -199
  15. package/dist/lib/ast/transform/compute.js +18 -41
  16. package/dist/lib/ast/transform/matrix.js +36 -36
  17. package/dist/lib/ast/transform/minify.js +37 -59
  18. package/dist/lib/ast/transform/perspective.js +1 -1
  19. package/dist/lib/ast/transform/rotate.js +13 -13
  20. package/dist/lib/ast/transform/scale.js +8 -8
  21. package/dist/lib/ast/transform/skew.js +4 -4
  22. package/dist/lib/ast/transform/translate.js +8 -8
  23. package/dist/lib/ast/transform/utils.js +80 -28
  24. package/dist/lib/ast/types.js +122 -2
  25. package/dist/lib/fs/resolve.js +1 -14
  26. package/dist/lib/parser/declaration/list.js +1 -1
  27. package/dist/lib/parser/declaration/map.js +1 -1
  28. package/dist/lib/parser/declaration/set.js +3 -3
  29. package/dist/lib/parser/parse.js +53 -107
  30. package/dist/lib/parser/tokenize.js +29 -53
  31. package/dist/lib/parser/utils/declaration.js +1 -1
  32. package/dist/lib/parser/utils/type.js +2 -2
  33. package/dist/lib/renderer/render.js +79 -194
  34. package/dist/lib/{renderer → syntax}/color/a98rgb.js +2 -2
  35. package/dist/lib/syntax/color/cmyk.js +104 -0
  36. package/dist/lib/{renderer → syntax}/color/color-mix.js +31 -33
  37. package/dist/lib/syntax/color/color.js +581 -0
  38. package/dist/lib/syntax/color/hex.js +179 -0
  39. package/dist/lib/syntax/color/hsl.js +201 -0
  40. package/dist/lib/syntax/color/hwb.js +204 -0
  41. package/dist/lib/syntax/color/lab.js +262 -0
  42. package/dist/lib/syntax/color/lch.js +194 -0
  43. package/dist/lib/syntax/color/oklab.js +237 -0
  44. package/dist/lib/syntax/color/oklch.js +166 -0
  45. package/dist/lib/{renderer → syntax}/color/p3.js +3 -3
  46. package/dist/lib/{renderer → syntax}/color/rec2020.js +11 -11
  47. package/dist/lib/{renderer → syntax}/color/relativecolor.js +54 -41
  48. package/dist/lib/syntax/color/rgb.js +140 -0
  49. package/dist/lib/{renderer → syntax}/color/srgb.js +58 -46
  50. package/dist/lib/syntax/color/utils/components.js +46 -0
  51. package/dist/lib/{renderer → syntax}/color/utils/constants.js +6 -33
  52. package/dist/lib/syntax/color/utils/distance.js +40 -0
  53. package/dist/lib/{renderer → syntax}/color/xyz.js +27 -14
  54. package/dist/lib/{renderer → syntax}/color/xyzd50.js +8 -8
  55. package/dist/lib/syntax/syntax.js +78 -77
  56. package/dist/lib/syntax/utils.js +70 -0
  57. package/dist/lib/validation/at-rules/container.js +1 -1
  58. package/dist/lib/validation/at-rules/counter-style.js +1 -1
  59. package/dist/lib/validation/at-rules/custom-media.js +1 -1
  60. package/dist/lib/validation/at-rules/document.js +2 -2
  61. package/dist/lib/validation/at-rules/font-feature-values.js +2 -2
  62. package/dist/lib/validation/at-rules/import.js +5 -5
  63. package/dist/lib/validation/at-rules/keyframes.js +3 -13
  64. package/dist/lib/validation/at-rules/layer.js +1 -1
  65. package/dist/lib/validation/at-rules/media.js +1 -1
  66. package/dist/lib/validation/at-rules/namespace.js +1 -1
  67. package/dist/lib/validation/at-rules/page-margin-box.js +1 -1
  68. package/dist/lib/validation/at-rules/page.js +1 -1
  69. package/dist/lib/validation/at-rules/supports.js +7 -7
  70. package/dist/lib/validation/at-rules/when.js +1 -1
  71. package/dist/lib/validation/atrule.js +2 -2
  72. package/dist/lib/validation/config.js +0 -3
  73. package/dist/lib/validation/config.json.js +1 -1
  74. package/dist/lib/validation/parser/parse.js +8 -11
  75. package/dist/lib/validation/selector.js +1 -9
  76. package/dist/lib/validation/syntax.js +67 -137
  77. package/dist/lib/validation/syntaxes/complex-selector-list.js +2 -19
  78. package/dist/lib/validation/syntaxes/complex-selector.js +1 -1
  79. package/dist/lib/validation/syntaxes/compound-selector.js +5 -24
  80. package/dist/lib/validation/syntaxes/family-name.js +5 -40
  81. package/dist/lib/validation/syntaxes/keyframe-selector.js +3 -22
  82. package/dist/lib/validation/syntaxes/layer-name.js +1 -1
  83. package/dist/lib/validation/syntaxes/relative-selector-list.js +1 -25
  84. package/dist/lib/validation/syntaxes/relative-selector.js +1 -1
  85. package/dist/lib/validation/syntaxes/url.js +3 -34
  86. package/dist/lib/validation/utils/list.js +2 -9
  87. package/dist/lib/validation/utils/whitespace.js +1 -1
  88. package/dist/node/index.js +4 -2
  89. package/dist/web/index.js +4 -2
  90. package/package.json +4 -4
  91. package/.editorconfig +0 -484
  92. package/dist/lib/ast/transform/convert.js +0 -33
  93. package/dist/lib/ast/utils/utils.js +0 -104
  94. package/dist/lib/renderer/color/color.js +0 -654
  95. package/dist/lib/renderer/color/hex.js +0 -105
  96. package/dist/lib/renderer/color/hsl.js +0 -125
  97. package/dist/lib/renderer/color/hwb.js +0 -103
  98. package/dist/lib/renderer/color/lab.js +0 -148
  99. package/dist/lib/renderer/color/lch.js +0 -90
  100. package/dist/lib/renderer/color/oklab.js +0 -131
  101. package/dist/lib/renderer/color/oklch.js +0 -75
  102. package/dist/lib/renderer/color/rgb.js +0 -50
  103. package/dist/lib/renderer/color/utils/components.js +0 -34
  104. package/dist/lib/validation/syntaxes/keyframe-block-list.js +0 -28
  105. package/dist/lib/{renderer → syntax}/color/hsv.js +0 -0
  106. package/dist/lib/{renderer → syntax}/color/prophotorgb.js +1 -1
  107. /package/dist/lib/{renderer → syntax}/color/utils/matrix.js +0 -0
@@ -5,7 +5,7 @@ import '../../parser/parse.js';
5
5
  import '../../parser/tokenize.js';
6
6
  import '../../parser/utils/config.js';
7
7
  import { mozExtensions, webkitExtensions } from '../../syntax/syntax.js';
8
- import '../../renderer/color/utils/constants.js';
8
+ import '../../syntax/color/utils/constants.js';
9
9
  import '../../renderer/sourcemap/lib/encode.js';
10
10
  import { consumeWhitespace } from '../utils/whitespace.js';
11
11
  import { getSyntaxConfig } from '../config.js';
@@ -108,17 +108,7 @@ function validateCompoundSelector(tokens, root, options) {
108
108
  while (tokens.length > 0 && tokens[0].typ == EnumToken.AttrTokenType) {
109
109
  const children = tokens[0].chi.slice();
110
110
  consumeWhitespace(children);
111
- if (children.length == 0) {
112
- // @ts-ignore
113
- return {
114
- valid: SyntaxValidationResult.Drop,
115
- context: [],
116
- node: tokens[0],
117
- syntax: null,
118
- error: 'invalid attribute selector'
119
- };
120
- }
121
- if (![
111
+ if (children.length == 0 || ![
122
112
  EnumToken.IdenTokenType,
123
113
  EnumToken.NameSpaceAttributeTokenType,
124
114
  EnumToken.MatchExpressionTokenType
@@ -151,20 +141,11 @@ function validateCompoundSelector(tokens, root, options) {
151
141
  EnumToken.StartMatchTokenType, EnumToken.ContainMatchTokenType,
152
142
  EnumToken.EndMatchTokenType, EnumToken.IncludeMatchTokenType
153
143
  ].includes(children[0].op.typ) ||
154
- !([
144
+ ![
155
145
  EnumToken.StringTokenType,
156
146
  EnumToken.IdenTokenType
157
- ].includes(children[0].r.typ))) {
158
- // @ts-ignore
159
- return {
160
- valid: SyntaxValidationResult.Drop,
161
- context: [],
162
- node: tokens[0],
163
- syntax: null,
164
- error: 'invalid attribute selector'
165
- };
166
- }
167
- if (children[0].attr != null && !['i', 's'].includes(children[0].attr)) {
147
+ ].includes(children[0].r.typ) ||
148
+ (children[0].attr != null && !['i', 's'].includes(children[0].attr))) {
168
149
  // @ts-ignore
169
150
  return {
170
151
  valid: SyntaxValidationResult.Drop,
@@ -1,10 +1,10 @@
1
- import { SyntaxValidationResult, EnumToken } from '../../ast/types.js';
1
+ import { EnumToken, SyntaxValidationResult } from '../../ast/types.js';
2
2
  import '../../ast/minify.js';
3
3
  import '../../ast/walk.js';
4
4
  import '../../parser/parse.js';
5
5
  import '../../parser/tokenize.js';
6
6
  import '../../parser/utils/config.js';
7
- import '../../renderer/color/utils/constants.js';
7
+ import '../../syntax/color/utils/constants.js';
8
8
  import '../../renderer/sourcemap/lib/encode.js';
9
9
  import { consumeWhitespace } from '../utils/whitespace.js';
10
10
 
@@ -12,18 +12,7 @@ function validateFamilyName(tokens, atRule) {
12
12
  let node;
13
13
  tokens = tokens.slice();
14
14
  consumeWhitespace(tokens);
15
- if (tokens.length == 0) {
16
- // @ts-ignore
17
- return {
18
- valid: SyntaxValidationResult.Drop,
19
- matches: [],
20
- node: atRule,
21
- syntax: null,
22
- error: 'expected at-rule prelude',
23
- tokens
24
- };
25
- }
26
- if (tokens[0].typ == EnumToken.CommaTokenType) {
15
+ if (tokens.length == 0 || tokens[0].typ == EnumToken.CommaTokenType) {
27
16
  // @ts-ignore
28
17
  return {
29
18
  valid: SyntaxValidationResult.Drop,
@@ -35,22 +24,6 @@ function validateFamilyName(tokens, atRule) {
35
24
  };
36
25
  }
37
26
  while (tokens.length > 0) {
38
- // @ts-ignore
39
- if (tokens[0].typ == EnumToken.CommaTokenType) {
40
- node = tokens.shift();
41
- consumeWhitespace(tokens);
42
- if (tokens.length == 0) {
43
- // @ts-ignore
44
- return {
45
- valid: SyntaxValidationResult.Drop,
46
- matches: [],
47
- node,
48
- syntax: null,
49
- error: 'unexpected token',
50
- tokens
51
- };
52
- }
53
- }
54
27
  node = tokens[0];
55
28
  if (![EnumToken.IdenTokenType, EnumToken.StringTokenType].includes(node.typ)) {
56
29
  // @ts-ignore
@@ -66,16 +39,8 @@ function validateFamilyName(tokens, atRule) {
66
39
  tokens.shift();
67
40
  consumeWhitespace(tokens);
68
41
  // @ts-ignore
69
- if (tokens.length > 0 && node.typ == EnumToken.BadStringTokenType && tokens[0].typ != EnumToken.CommaTokenType) {
70
- // @ts-ignore
71
- return {
72
- valid: SyntaxValidationResult.Drop,
73
- matches: [],
74
- node: tokens[0],
75
- syntax: null,
76
- error: 'expected comma token',
77
- tokens
78
- };
42
+ if (tokens.length > 0 && tokens[0].typ == EnumToken.CommaTokenType) {
43
+ tokens.shift();
79
44
  }
80
45
  }
81
46
  // @ts-ignore
@@ -1,37 +1,18 @@
1
1
  import { consumeWhitespace } from '../utils/whitespace.js';
2
2
  import { splitTokenList } from '../utils/list.js';
3
- import { SyntaxValidationResult, EnumToken } from '../../ast/types.js';
3
+ import { EnumToken, SyntaxValidationResult } from '../../ast/types.js';
4
4
  import '../../ast/minify.js';
5
5
  import '../../ast/walk.js';
6
6
  import '../../parser/parse.js';
7
7
  import '../../parser/tokenize.js';
8
8
  import '../../parser/utils/config.js';
9
- import '../../renderer/color/utils/constants.js';
9
+ import '../../syntax/color/utils/constants.js';
10
10
  import '../../renderer/sourcemap/lib/encode.js';
11
11
 
12
12
  function validateKeyframeSelector(tokens, options) {
13
13
  consumeWhitespace(tokens);
14
- if (tokens.length == 0) {
15
- // @ts-ignore
16
- return {
17
- valid: SyntaxValidationResult.Drop,
18
- context: [],
19
- node: null,
20
- syntax: null,
21
- error: 'expected keyframe selector'
22
- };
23
- }
24
14
  for (const t of splitTokenList(tokens)) {
25
- if (t.length != 1) {
26
- return {
27
- valid: SyntaxValidationResult.Drop,
28
- context: [],
29
- node: t[0] ?? null,
30
- syntax: null,
31
- error: 'unexpected token'
32
- };
33
- }
34
- if (t[0].typ != EnumToken.PercentageTokenType && !(t[0].typ == EnumToken.IdenTokenType && ['from', 'to', 'cover', 'contain', 'entry', 'exit', 'entry-crossing', 'exit-crossing'].includes(t[0].val))) {
15
+ if (t.length != 1 || (t[0].typ != EnumToken.PercentageTokenType && !(t[0].typ == EnumToken.IdenTokenType && ['from', 'to', 'cover', 'contain', 'entry', 'exit', 'entry-crossing', 'exit-crossing'].includes(t[0].val)))) {
35
16
  return {
36
17
  valid: SyntaxValidationResult.Drop,
37
18
  context: [],
@@ -4,7 +4,7 @@ import '../../ast/walk.js';
4
4
  import '../../parser/parse.js';
5
5
  import '../../parser/tokenize.js';
6
6
  import '../../parser/utils/config.js';
7
- import '../../renderer/color/utils/constants.js';
7
+ import '../../syntax/color/utils/constants.js';
8
8
  import '../../renderer/sourcemap/lib/encode.js';
9
9
 
10
10
  function validateLayerName(tokens) {
@@ -4,7 +4,7 @@ import '../../ast/walk.js';
4
4
  import '../../parser/parse.js';
5
5
  import '../../parser/tokenize.js';
6
6
  import '../../parser/utils/config.js';
7
- import '../../renderer/color/utils/constants.js';
7
+ import '../../syntax/color/utils/constants.js';
8
8
  import '../../renderer/sourcemap/lib/encode.js';
9
9
  import { validateRelativeSelector } from './relative-selector.js';
10
10
  import { consumeWhitespace } from '../utils/whitespace.js';
@@ -13,31 +13,7 @@ import { splitTokenList } from '../utils/list.js';
13
13
  function validateRelativeSelectorList(tokens, root, options) {
14
14
  tokens = tokens.slice();
15
15
  consumeWhitespace(tokens);
16
- if (tokens.length == 0) {
17
- return {
18
- valid: SyntaxValidationResult.Drop,
19
- matches: [],
20
- // @ts-ignore
21
- node: root,
22
- // @ts-ignore
23
- syntax: null,
24
- error: 'expecting relative selector list',
25
- tokens
26
- };
27
- }
28
16
  for (const t of splitTokenList(tokens)) {
29
- if (t.length == 0) {
30
- return {
31
- valid: SyntaxValidationResult.Drop,
32
- matches: [],
33
- // @ts-ignore
34
- node: root,
35
- // @ts-ignore
36
- syntax: null,
37
- error: 'unexpected comma',
38
- tokens
39
- };
40
- }
41
17
  const result = validateRelativeSelector(t, root, options);
42
18
  if (result.valid == SyntaxValidationResult.Drop) {
43
19
  return result;
@@ -5,7 +5,7 @@ import '../../ast/walk.js';
5
5
  import '../../parser/parse.js';
6
6
  import '../../parser/tokenize.js';
7
7
  import '../../parser/utils/config.js';
8
- import '../../renderer/color/utils/constants.js';
8
+ import '../../syntax/color/utils/constants.js';
9
9
  import '../../renderer/sourcemap/lib/encode.js';
10
10
  import { validateSelector } from './selector.js';
11
11
  import { combinatorsTokens } from './complex-selector.js';
@@ -4,47 +4,16 @@ import '../../ast/walk.js';
4
4
  import '../../parser/parse.js';
5
5
  import '../../parser/tokenize.js';
6
6
  import '../../parser/utils/config.js';
7
- import '../../renderer/color/utils/constants.js';
7
+ import '../../syntax/color/utils/constants.js';
8
8
  import '../../renderer/sourcemap/lib/encode.js';
9
9
  import { consumeWhitespace } from '../utils/whitespace.js';
10
10
 
11
11
  function validateURL(token) {
12
- if (token.typ == EnumToken.UrlTokenTokenType) {
13
- // @ts-ignore
14
- return {
15
- valid: SyntaxValidationResult.Valid,
16
- context: [],
17
- node: token,
18
- // @ts-ignore
19
- syntax: 'url()',
20
- error: ''
21
- };
22
- }
23
- if (token.typ != EnumToken.UrlFunctionTokenType) {
24
- // @ts-ignore
25
- return {
26
- valid: SyntaxValidationResult.Drop,
27
- context: [],
28
- node: token,
29
- // @ts-ignore
30
- syntax: 'url()',
31
- error: 'expected url()'
32
- };
33
- }
34
12
  const children = token.chi.slice();
35
13
  consumeWhitespace(children);
36
- if (children.length == 0 || ![EnumToken.UrlTokenTokenType, EnumToken.StringTokenType, EnumToken.HashTokenType].includes(children[0].typ)) {
37
- // @ts-ignore
38
- return {
39
- valid: SyntaxValidationResult.Drop,
40
- context: [],
41
- node: children[0] ?? token,
42
- // @ts-ignore
43
- syntax: 'url()',
44
- error: 'expected url-token'
45
- };
14
+ if (children.length > 0 && [EnumToken.UrlTokenTokenType, EnumToken.StringTokenType, EnumToken.HashTokenType].includes(children[0].typ)) {
15
+ children.shift();
46
16
  }
47
- children.shift();
48
17
  consumeWhitespace(children);
49
18
  if (children.length > 0) {
50
19
  // @ts-ignore
@@ -4,18 +4,14 @@ import '../../ast/walk.js';
4
4
  import '../../parser/parse.js';
5
5
  import '../../parser/tokenize.js';
6
6
  import '../../parser/utils/config.js';
7
- import '../../renderer/color/utils/constants.js';
7
+ import '../../syntax/color/utils/constants.js';
8
8
  import '../../renderer/sourcemap/lib/encode.js';
9
9
 
10
10
  function stripCommaToken(tokenList) {
11
11
  let result = [];
12
- let last = null;
13
12
  for (let i = 0; i < tokenList.length; i++) {
14
- if (tokenList[i].typ == EnumToken.CommaTokenType && last != null && last.typ == EnumToken.CommaTokenType) {
15
- return null;
16
- }
17
13
  if (tokenList[i].typ != EnumToken.WhitespaceTokenType) {
18
- last = tokenList[i];
14
+ tokenList[i];
19
15
  }
20
16
  if (tokenList[i].typ == EnumToken.CommentTokenType || tokenList[i].typ == EnumToken.CommaTokenType) {
21
17
  continue;
@@ -26,9 +22,6 @@ function stripCommaToken(tokenList) {
26
22
  }
27
23
  function splitTokenList(tokenList, split = [EnumToken.CommaTokenType]) {
28
24
  return tokenList.reduce((acc, curr) => {
29
- if (curr.typ == EnumToken.CommentTokenType) {
30
- return acc;
31
- }
32
25
  if (split.includes(curr.typ)) {
33
26
  acc.push([]);
34
27
  }
@@ -4,7 +4,7 @@ import '../../ast/walk.js';
4
4
  import '../../parser/parse.js';
5
5
  import '../../parser/tokenize.js';
6
6
  import '../../parser/utils/config.js';
7
- import '../../renderer/color/utils/constants.js';
7
+ import '../../syntax/color/utils/constants.js';
8
8
  import '../../renderer/sourcemap/lib/encode.js';
9
9
 
10
10
  function consumeWhitespace(tokens) {
@@ -1,11 +1,13 @@
1
1
  import process from 'node:process';
2
- export { EnumToken, ValidationLevel } from '../lib/ast/types.js';
2
+ export { ColorType, EnumToken, ValidationLevel } from '../lib/ast/types.js';
3
3
  export { minify } from '../lib/ast/minify.js';
4
4
  export { walk, walkValues } from '../lib/ast/walk.js';
5
5
  export { expand } from '../lib/ast/expand.js';
6
6
  import { doRender } from '../lib/renderer/render.js';
7
7
  export { renderToken } from '../lib/renderer/render.js';
8
- import '../lib/renderer/color/utils/constants.js';
8
+ import '../lib/syntax/color/utils/constants.js';
9
+ export { convertColor } from '../lib/syntax/color/color.js';
10
+ export { isOkLabClose, okLabDistance } from '../lib/syntax/color/utils/distance.js';
9
11
  import { doParse } from '../lib/parser/parse.js';
10
12
  export { parseString, parseTokens } from '../lib/parser/parse.js';
11
13
  import '../lib/parser/tokenize.js';
package/dist/web/index.js CHANGED
@@ -1,10 +1,12 @@
1
- export { EnumToken, ValidationLevel } from '../lib/ast/types.js';
1
+ export { ColorType, EnumToken, ValidationLevel } from '../lib/ast/types.js';
2
2
  export { minify } from '../lib/ast/minify.js';
3
3
  export { walk, walkValues } from '../lib/ast/walk.js';
4
4
  export { expand } from '../lib/ast/expand.js';
5
5
  import { doRender } from '../lib/renderer/render.js';
6
6
  export { renderToken } from '../lib/renderer/render.js';
7
- import '../lib/renderer/color/utils/constants.js';
7
+ import '../lib/syntax/color/utils/constants.js';
8
+ export { convertColor } from '../lib/syntax/color/color.js';
9
+ export { isOkLabClose, okLabDistance } from '../lib/syntax/color/utils/distance.js';
8
10
  import { doParse } from '../lib/parser/parse.js';
9
11
  export { parseString, parseTokens } from '../lib/parser/parse.js';
10
12
  import '../lib/parser/tokenize.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tbela99/css-parser",
3
3
  "description": "CSS parser for node and the browser",
4
- "version": "v1.1.1",
4
+ "version": "v1.3.0",
5
5
  "exports": {
6
6
  ".": "./dist/node/index.js",
7
7
  "./node": "./dist/node/index.js",
@@ -19,8 +19,8 @@
19
19
  "test": "web-test-runner \"test/**/web.spec.js\" --node-resolve --playwright --browsers chromium firefox webkit --root-dir=.; mocha --reporter-options='maxDiffSize=1801920' --timeout=10000 \"test/**/node.spec.js\"",
20
20
  "test:web": "web-test-runner \"test/**/web.spec.js\" --node-resolve --playwright --browsers chromium firefox webkit --root-dir=.",
21
21
  "test:node": "mocha --reporter-options='maxDiffSize=1801920' \"test/**/node.spec.js\"",
22
- "test:cov": "c8 -x 'test/specs/**/*.js' -x dist/lib/validation/syntax.js -x 'dist/lib/validation/parser/*.js' --reporter=html --reporter=text --reporter=json-summary mocha --reporter-options='maxDiffSize=1801920' --timeout=10000 \"test/**/node.spec.js\"",
23
- "test:web-cov": "web-test-runner -x 'test/specs/**/*.js' -x dist/lib/validation/syntax.js,dist/lib/validation/parser \"test/**/web.spec.js\" --node-resolve --playwright --browsers chromium firefox webkit --root-dir=. --coverage",
22
+ "test:cov": "c8 -x 'test/specs/**/*.js' --reporter=html --reporter=text --reporter=json-summary mocha --reporter-options='maxDiffSize=1801920' --timeout=10000 \"test/**/node.spec.js\"",
23
+ "test:web-cov": "web-test-runner -x 'test/specs/**/*.js' \"test/**/web.spec.js\" --node-resolve --playwright --browsers chromium firefox webkit --root-dir=. --coverage",
24
24
  "profile": "node --enable-source-maps --inspect-brk test/inspect.js",
25
25
  "syntax-update": "esno tools/validation.ts",
26
26
  "debug": "web-test-runner \"test/**/web.spec.js\" --manual --open --node-resolve --root-dir=."
@@ -70,4 +70,4 @@
70
70
  "rollup-plugin-dts": "^6.2.1",
71
71
  "tslib": "^2.8.1"
72
72
  }
73
- }
73
+ }