html-validate 7.7.0 → 7.7.1
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/README.md +16 -16
- package/dist/cjs/core.js +1 -1
- package/dist/es/core.js +1 -1
- package/elements/html5.js +2 -2
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -13,22 +13,6 @@ Offline HTML5 validator. Validates either a full document or a smaller
|
|
|
13
13
|
- Strict and non-forgiving parsing. It will not try to correct any incorrect
|
|
14
14
|
markup or guess what it should do.
|
|
15
15
|
|
|
16
|
-
## Bundles
|
|
17
|
-
|
|
18
|
-
The library comes in four flavours:
|
|
19
|
-
|
|
20
|
-
- CommonJS full (`dist/cjs/main.js`)
|
|
21
|
-
- CommonJS browser (`dist/cjs/browser.js`)
|
|
22
|
-
- ESM full (`dist/es/main.js`)
|
|
23
|
-
- ESM browser (`dist/es/browser.js`)
|
|
24
|
-
|
|
25
|
-
The browser versions contains a slimmed version without CLI dependencies.
|
|
26
|
-
Your tooling will probably use the correct version but if needed you can import the files directly.
|
|
27
|
-
|
|
28
|
-
Do note that to run in a browser you still need to polyfill the `fs` nodejs library.
|
|
29
|
-
|
|
30
|
-
Browsers and bundlers are currently not 100% supported but is possible with some tricks, see [running in browser](https://html-validate.org/dev/running-in-browser.html) for more details.
|
|
31
|
-
|
|
32
16
|
## Usage
|
|
33
17
|
|
|
34
18
|
npm install -g html-validate
|
|
@@ -68,6 +52,22 @@ Create `.htmlvalidate.json`:
|
|
|
68
52
|
6:4 error Unexpected close-tag, expected opening tag close-order
|
|
69
53
|
```
|
|
70
54
|
|
|
55
|
+
## Bundles
|
|
56
|
+
|
|
57
|
+
The library comes in four flavours:
|
|
58
|
+
|
|
59
|
+
- CommonJS full (`dist/cjs/main.js`)
|
|
60
|
+
- CommonJS browser (`dist/cjs/browser.js`)
|
|
61
|
+
- ESM full (`dist/es/main.js`)
|
|
62
|
+
- ESM browser (`dist/es/browser.js`)
|
|
63
|
+
|
|
64
|
+
The browser versions contains a slimmed version without CLI dependencies.
|
|
65
|
+
Your tooling will probably use the correct version but if needed you can import the files directly.
|
|
66
|
+
|
|
67
|
+
Do note that to run in a browser you still need to polyfill the `fs` nodejs library.
|
|
68
|
+
|
|
69
|
+
Browsers and bundlers are currently not 100% supported but is possible with some tricks, see [running in browser](https://html-validate.org/dev/running-in-browser.html) for more details.
|
|
70
|
+
|
|
71
71
|
## Developing
|
|
72
72
|
|
|
73
73
|
### Prerequisites
|
package/dist/cjs/core.js
CHANGED
|
@@ -3537,7 +3537,7 @@ var TRANSFORMER_API;
|
|
|
3537
3537
|
/** @public */
|
|
3538
3538
|
const name = "html-validate";
|
|
3539
3539
|
/** @public */
|
|
3540
|
-
const version = "7.7.
|
|
3540
|
+
const version = "7.7.1";
|
|
3541
3541
|
/** @public */
|
|
3542
3542
|
const homepage = "https://html-validate.org";
|
|
3543
3543
|
/** @public */
|
package/dist/es/core.js
CHANGED
|
@@ -3506,7 +3506,7 @@ var TRANSFORMER_API;
|
|
|
3506
3506
|
/** @public */
|
|
3507
3507
|
const name = "html-validate";
|
|
3508
3508
|
/** @public */
|
|
3509
|
-
const version = "7.7.
|
|
3509
|
+
const version = "7.7.1";
|
|
3510
3510
|
/** @public */
|
|
3511
3511
|
const homepage = "https://html-validate.org";
|
|
3512
3512
|
/** @public */
|
package/elements/html5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable sonarjs/no-duplicate-string */
|
|
2
2
|
|
|
3
|
-
const { defineMetadata, metadataHelper, DynamicValue } = require("html-validate");
|
|
3
|
+
const { defineMetadata, metadataHelper, DynamicValue } = require("html-validate/browser");
|
|
4
4
|
|
|
5
5
|
const { allowedIfAttributeIsPresent, allowedIfAttributeIsAbsent, allowedIfAttributeHasValue } =
|
|
6
6
|
metadataHelper;
|
|
@@ -1259,7 +1259,7 @@ module.exports = defineMetadata({
|
|
|
1259
1259
|
enum: ["utf-8"],
|
|
1260
1260
|
},
|
|
1261
1261
|
content: {
|
|
1262
|
-
allowed: allowedIfAttributeIsPresent("name", "http-equiv", "itemprop"),
|
|
1262
|
+
allowed: allowedIfAttributeIsPresent("name", "http-equiv", "itemprop", "property"),
|
|
1263
1263
|
},
|
|
1264
1264
|
itemprop: {
|
|
1265
1265
|
allowed: allowedIfAttributeIsAbsent("http-equiv", "name"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-validate",
|
|
3
|
-
"version": "7.7.
|
|
3
|
+
"version": "7.7.1",
|
|
4
4
|
"description": "Offline html5 validator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"html",
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
"require": "./dist/cjs/index.js",
|
|
28
28
|
"import": "./dist/es/index.js"
|
|
29
29
|
},
|
|
30
|
+
"./browser": {
|
|
31
|
+
"require": "./dist/cjs/browser.js",
|
|
32
|
+
"import": "./dist/es/browser.js"
|
|
33
|
+
},
|
|
30
34
|
"./dist/cjs/*": "./dist/cjs/*",
|
|
31
35
|
"./dist/es/*": "./dist/es/*",
|
|
32
36
|
"./dist/schema/*": "./dist/schema/*",
|
|
@@ -45,6 +49,7 @@
|
|
|
45
49
|
"bin",
|
|
46
50
|
"dist",
|
|
47
51
|
"elements",
|
|
52
|
+
"browser.{js,d.ts}",
|
|
48
53
|
"jest.{js,d.ts}",
|
|
49
54
|
"test-utils.{js,d.ts}",
|
|
50
55
|
"!dist/types/**",
|
|
@@ -133,7 +138,7 @@
|
|
|
133
138
|
"!**/__fixtures__/**"
|
|
134
139
|
],
|
|
135
140
|
"moduleNameMapper": {
|
|
136
|
-
"^html-validate$": "<rootDir>/src/
|
|
141
|
+
"^html-validate/browser$": "<rootDir>/src/browser.ts"
|
|
137
142
|
},
|
|
138
143
|
"preset": "@html-validate/jest-config",
|
|
139
144
|
"roots": [
|