@conformetry/core 0.0.5 → 0.0.6
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/CHANGELOG.md +6 -0
- package/README.md +13 -13
- package/dist/src/index.d.ts +10 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -217,8 +217,8 @@ graph LR
|
|
|
217
217
|
|
|
218
218
|
### Project
|
|
219
219
|
|
|
220
|
-

|
|
221
|
+

|
|
222
222
|

|
|
223
223
|

|
|
224
224
|
|
|
@@ -233,7 +233,7 @@ graph LR
|
|
|
233
233
|

|
|
234
234
|

|
|
235
235
|

|
|
236
|
-

|
|
237
237
|

|
|
238
238
|
|
|
239
239
|
### JavaScript
|
|
@@ -249,8 +249,8 @@ graph LR
|
|
|
249
249
|

|
|
250
250
|

|
|
251
251
|

|
|
252
|
-

|
|
253
|
+

|
|
254
254
|

|
|
255
255
|
|
|
256
256
|
### Python
|
|
@@ -405,21 +405,21 @@ graph LR
|
|
|
405
405
|
|
|
406
406
|
### Markdown
|
|
407
407
|
|
|
408
|
-

|
|
409
|
+

|
|
410
410
|

|
|
411
|
-

|
|
412
|
+

|
|
413
413
|

|
|
414
414
|

|
|
415
415
|

|
|
416
|
-

|
|
417
|
+

|
|
418
|
+

|
|
419
419
|

|
|
420
420
|

|
|
421
421
|

|
|
422
|
-

|
|
423
423
|

|
|
424
424
|

|
|
425
425
|

|
package/dist/src/index.d.ts
CHANGED
|
@@ -76,9 +76,10 @@ export declare type ConformetryDifferenceLanguage = "javascript" | "json" | "mar
|
|
|
76
76
|
*
|
|
77
77
|
* `"instance"` is the odd one out: it does not name a missing element inside a
|
|
78
78
|
* file but a directory or file the caller declared to be generated code, which
|
|
79
|
-
* conformetry could not attribute to any single template.
|
|
79
|
+
* conformetry could not attribute to any single template. `"placeholder"`
|
|
80
|
+
* names a template placeholder whose value no instance node revealed.
|
|
80
81
|
*/
|
|
81
|
-
export declare type ConformetryDifferenceType = "code" | "comment" | "directory" | "file" | "instance";
|
|
82
|
+
export declare type ConformetryDifferenceType = "code" | "comment" | "directory" | "file" | "instance" | "placeholder";
|
|
82
83
|
|
|
83
84
|
/**
|
|
84
85
|
* A validator for one language or file format.
|
|
@@ -112,6 +113,13 @@ export declare interface ConformetryLanguageValidator {
|
|
|
112
113
|
* only against the files it got wrong.
|
|
113
114
|
*/
|
|
114
115
|
export declare interface DocumentValidationResult {
|
|
116
|
+
/**
|
|
117
|
+
* What each placeholder value in the rendered template stood for, keyed by
|
|
118
|
+
* the value: the text of the instance node the comparison aligned with the
|
|
119
|
+
* template node holding it, first occurrence first. Absent when a language
|
|
120
|
+
* captures nothing.
|
|
121
|
+
*/
|
|
122
|
+
readonly captures?: Readonly<Record<string, string>>;
|
|
115
123
|
readonly differences: ConformetryDifference[];
|
|
116
124
|
/** Combined weight of the template requirements this document imposes. */
|
|
117
125
|
readonly totalWeight: number;
|
package/package.json
CHANGED