@markuplint/types 3.5.1 → 3.7.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 (37) hide show
  1. package/lib/check-multi-types.d.ts +1 -1
  2. package/lib/check.spec.js +61 -61
  3. package/lib/css-syntax.spec.js +151 -149
  4. package/lib/get-candidate.d.ts +1 -4
  5. package/lib/list.spec.js +117 -117
  6. package/lib/match-result.d.ts +1 -1
  7. package/lib/primitive/index.spec.js +52 -52
  8. package/lib/primitive/is-quantity.d.ts +1 -5
  9. package/lib/primitive/is-uint.d.ts +3 -6
  10. package/lib/primitive/split-unit.d.ts +2 -2
  11. package/lib/rfc/is-bcp-47.spec.js +8 -8
  12. package/lib/token/token-collection.d.ts +1 -1
  13. package/lib/token/token-collection.spec.js +155 -134
  14. package/lib/token/token.d.ts +1 -1
  15. package/lib/types.d.ts +55 -79
  16. package/lib/types.schema.d.ts +31 -1084
  17. package/lib/types.schema.js +0 -1
  18. package/lib/w3c/check-serialized-permissions-policy.spec.js +30 -28
  19. package/lib/whatwg/check-autocomplete.spec.js +360 -360
  20. package/lib/whatwg/check-datetime/datetime-tokens.d.ts +1 -21
  21. package/lib/whatwg/check-datetime/index.spec.js +277 -276
  22. package/lib/whatwg/check-datetime/time-zone-offset-string.d.ts +1 -1
  23. package/lib/whatwg/check-mime-type.d.ts +4 -4
  24. package/lib/whatwg/check-mime-type.spec.js +52 -52
  25. package/lib/whatwg/is-abs-url.spec.js +5 -5
  26. package/package.json +8 -10
  27. package/test/check.spec.js +89 -0
  28. package/test/css-syntax.spec.js +165 -0
  29. package/test/list.spec.js +133 -0
  30. package/test/primitive/index.spec.js +65 -0
  31. package/test/rfc/is-bcp-47.spec.js +23 -0
  32. package/test/token/token-collection.spec.js +146 -0
  33. package/test/w3c/check-serialized-permissions-policy.spec.js +36 -0
  34. package/test/whatwg/check-autocomplete.spec.js +387 -0
  35. package/test/whatwg/check-datetime/index.spec.js +336 -0
  36. package/test/whatwg/check-mime-type.spec.js +59 -0
  37. package/test/whatwg/is-abs-url.spec.js +8 -0
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- /* tslint:disable */
3
2
  /**
4
3
  * This file was automatically generated by json-schema-to-typescript.
5
4
  * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
@@ -1,34 +1,36 @@
1
- "use strict";
1
+ 'use strict';
2
2
  // @ts-nocheck
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- const check_serialized_permissions_policy_1 = require("./check-serialized-permissions-policy");
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+ const check_serialized_permissions_policy_1 = require('./check-serialized-permissions-policy');
5
5
  const check = (0, check_serialized_permissions_policy_1.checkSerializedPermissionsPolicy)();
6
6
  test('checkSerializedPermissionsPolicy', () => {
7
- expect(check('').reason).toBe('empty-token');
8
- expect(check(' ').reason).toBe('unexpected-token');
9
- // expect(check('a').reason).toBe('missing-token');
10
- expect(check('a').matched).toBe(true); // Current supported
11
- expect(check('a:').reason).toBe('unexpected-token');
12
- // expect(check('a ').reason).toBe('missing-token'); // Current supported
13
- expect(check('a ').matched).toBe(true);
14
- expect(check('a a').reason).toBe('unexpected-token');
15
- expect(check('a *').matched).toBe(true);
16
- expect(check('a *a').reason).toBe('unexpected-token');
17
- expect(check('a none').reason).toBe('missing-token');
18
- expect(check("a 'none'").matched).toBe(true);
19
- expect(check('a https://markuplint.dev').matched).toBe(true);
20
- expect(check('a https://markuplint.dev/path/to').reason).toBe('extra-token');
21
- expect(check('a https://マルチバイト.abc.xyz').reason).toBe('must-be-serialized');
22
- expect(check('a * https://markuplint.dev').matched).toBe(true);
23
- expect(check("a * https://markuplint.dev 'none'").matched).toBe(true);
24
- // expect(check("a * https://markuplint.dev 'none';b").reason).toBe('missing-token');
25
- expect(check("a * https://markuplint.dev 'none';b").matched).toBe(true); // Current supported
26
- // expect(check("a * https://markuplint.dev 'none';b ").reason).toBe('missing-token');
27
- expect(check("a * https://markuplint.dev 'none';b ").matched).toBe(true); // Current supported
28
- expect(check("a * https://markuplint.dev 'none';b *").matched).toBe(true);
29
- expect(check("a * https://markuplint.dev 'none';b *;c 'none'").matched).toBe(true);
30
- expect(check("a * https://markuplint.dev 'none'; b *; c 'none'").matched).toBe(true);
7
+ expect(check('').reason).toBe('empty-token');
8
+ expect(check(' ').reason).toBe('unexpected-token');
9
+ // expect(check('a').reason).toBe('missing-token');
10
+ expect(check('a').matched).toBe(true); // Current supported
11
+ expect(check('a:').reason).toBe('unexpected-token');
12
+ // expect(check('a ').reason).toBe('missing-token'); // Current supported
13
+ expect(check('a ').matched).toBe(true);
14
+ expect(check('a a').reason).toBe('unexpected-token');
15
+ expect(check('a *').matched).toBe(true);
16
+ expect(check('a *a').reason).toBe('unexpected-token');
17
+ expect(check('a none').reason).toBe('missing-token');
18
+ expect(check("a 'none'").matched).toBe(true);
19
+ expect(check('a https://markuplint.dev').matched).toBe(true);
20
+ expect(check('a https://markuplint.dev/path/to').reason).toBe('extra-token');
21
+ expect(check('a https://マルチバイト.abc.xyz').reason).toBe('must-be-serialized');
22
+ expect(check('a * https://markuplint.dev').matched).toBe(true);
23
+ expect(check("a * https://markuplint.dev 'none'").matched).toBe(true);
24
+ // expect(check("a * https://markuplint.dev 'none';b").reason).toBe('missing-token');
25
+ expect(check("a * https://markuplint.dev 'none';b").matched).toBe(true); // Current supported
26
+ // expect(check("a * https://markuplint.dev 'none';b ").reason).toBe('missing-token');
27
+ expect(check("a * https://markuplint.dev 'none';b ").matched).toBe(true); // Current supported
28
+ expect(check("a * https://markuplint.dev 'none';b *").matched).toBe(true);
29
+ expect(check("a * https://markuplint.dev 'none';b *;c 'none'").matched).toBe(true);
30
+ expect(check("a * https://markuplint.dev 'none'; b *; c 'none'").matched).toBe(true);
31
31
  });
32
32
  test('YouTube embed', () => {
33
- expect(check('accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture').matched).toBe(true);
33
+ expect(
34
+ check('accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture').matched,
35
+ ).toBe(true);
34
36
  });