schemata-validator 0.3.1 → 0.3.2

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 (2) hide show
  1. package/README.md +13 -4
  2. package/package.json +10 -7
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # schemata-validator
2
2
 
3
- Check the validity of Schema.org vocabulary used in JSON-LD data
3
+ Check the validity of Schema.org vocabulary used in JSON-LD and HTML microdata
4
4
 
5
5
  ![License: MIT](https://img.shields.io/github/license/webdevbynight/schemata-validator)
6
6
  [![ESM-only package](https://img.shields.io/badge/package-ESM--only-ffe536)](https://nodejs.org/api/esm.html)
@@ -11,7 +11,7 @@ Check the validity of Schema.org vocabulary used in JSON-LD data
11
11
  ![Node support](https://img.shields.io/node/v/schemata-validator)
12
12
  ![Build status](https://img.shields.io/github/actions/workflow/status/webdevbynight/schemata-validator/run-tests.yml)
13
13
 
14
- **schemata-validator** takes JSON-LD and HTML files using JSON-LD data and returns detailed validation results.
14
+ **schemata-validator** takes JSON-LD data and microdata in HTML and returns detailed validation results.
15
15
 
16
16
  ## Installation
17
17
 
@@ -87,8 +87,8 @@ You can run `schemata-validator` from the `scripts` section of your `package.jso
87
87
 
88
88
  #### Examples
89
89
 
90
- - `schemata-validator`: validates all HTML files using JSON-LD data in the project;
91
- - `schemata-validator --paths docs --exclude build tmp`: validates all HTML files using JSON-LD data in the `docs/` folder, except files which have `build` or `tmp` anywhere in their pathname or filename;
90
+ - `schemata-validator`: validates all HTML files in the project;
91
+ - `schemata-validator --paths docs --exclude build tmp`: validates all HTML files in the `docs/` folder, except files which have `build` or `tmp` anywhere in their pathname or filename;
92
92
  - `schemata-validator --files docs/index.html`: validates only the specified files.
93
93
 
94
94
  ### Application code
@@ -110,6 +110,15 @@ const validate = await validator.validate();
110
110
  validator.log(validate); // Outputs the reporting object
111
111
  ```
112
112
 
113
+ ```js
114
+ import { SchemataValidator } from "schemata-validator";
115
+
116
+ const options = { paths: ["docs"] };
117
+ const validator = new SchemataValidator(options);
118
+ const validate = await validator.validate();
119
+ validator.log(validate); // Outputs the reporting object
120
+ ```
121
+
113
122
  ## Get help
114
123
 
115
124
  - [Stack Overflow](https://stackoverflow.com/questions/tagged/schemata-validator)
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "schemata-validator",
3
- "version": "0.3.1",
4
- "description": "Check the validity of Schema.org vocabulary used in JSON-LD data",
3
+ "version": "0.3.2",
4
+ "description": "Check the validity of Schema.org vocabulary used in JSON-LD and HTML microdata",
5
5
  "keywords": [
6
+ "html",
7
+ "html5",
6
8
  "json-ld",
9
+ "microdata",
7
10
  "schema-org",
8
11
  "web-semantic",
9
12
  "validator"
@@ -36,16 +39,16 @@
36
39
  "pnpm": ">=10.32.1"
37
40
  },
38
41
  "dependencies": {
39
- "parse5": "8.0.0"
42
+ "parse5": "8.0.1"
40
43
  },
41
44
  "devDependencies": {
42
- "@biomejs/biome": "2.4.9",
45
+ "@biomejs/biome": "2.4.12",
43
46
  "@commitlint/cli": "20.5.0",
44
47
  "@commitlint/config-conventional": "20.5.0",
45
- "@types/node": "24.12.0",
48
+ "@types/node": "24.12.2",
46
49
  "husky": "9.1.7",
47
- "typescript": "6.0.2",
48
- "vitest": "4.1.2"
50
+ "typescript": "6.0.3",
51
+ "vitest": "4.1.4"
49
52
  },
50
53
  "scripts": {
51
54
  "biome": "biome check --write .",