@cronn/lib-file-snapshots 0.14.0 → 0.15.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.
- package/dist/index.d.ts +2 -6
- package/dist/index.js +4 -5
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -81,16 +81,12 @@ declare class TextSerializer implements SnapshotSerializer {
|
|
|
81
81
|
interface ValidationFileMatcherConfig {
|
|
82
82
|
/**
|
|
83
83
|
* Directory in which golden masters are stored
|
|
84
|
-
*
|
|
85
|
-
* @default "data/test/validation"
|
|
86
84
|
*/
|
|
87
|
-
validationDir
|
|
85
|
+
validationDir: string;
|
|
88
86
|
/**
|
|
89
87
|
* Directory in which file snapshots from test runs are stored
|
|
90
|
-
*
|
|
91
|
-
* @default "data/test/output"
|
|
92
88
|
*/
|
|
93
|
-
outputDir
|
|
89
|
+
outputDir: string;
|
|
94
90
|
/**
|
|
95
91
|
* The full path to the snapshot file
|
|
96
92
|
*
|
package/dist/index.js
CHANGED
|
@@ -272,12 +272,11 @@ var ValidationFileMatcher = class {
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
buildFilePaths(config) {
|
|
275
|
-
const validationDir = config
|
|
276
|
-
const
|
|
277
|
-
const filePathWithExtenion = `${config.filePath}.${config.serializer.fileExtension}`;
|
|
275
|
+
const { validationDir, outputDir, filePath, serializer } = config;
|
|
276
|
+
const filePathWithExtension = `${filePath}.${serializer.fileExtension}`;
|
|
278
277
|
return {
|
|
279
|
-
outputFilePath: path2.join(outputDir,
|
|
280
|
-
validationFilePath: path2.join(validationDir,
|
|
278
|
+
outputFilePath: path2.join(outputDir, filePathWithExtension),
|
|
279
|
+
validationFilePath: path2.join(validationDir, filePathWithExtension)
|
|
281
280
|
};
|
|
282
281
|
}
|
|
283
282
|
readValidationFile() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cronn/lib-file-snapshots",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "The library agnostic core for testing file snapshots",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"file snapshots"
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
],
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@trivago/prettier-plugin-sort-imports": "5.2.2",
|
|
36
|
-
"@types/node": "22.18.
|
|
36
|
+
"@types/node": "22.18.1",
|
|
37
37
|
"@vitest/coverage-istanbul": "3.2.4",
|
|
38
|
-
"eslint": "9.
|
|
38
|
+
"eslint": "9.35.0",
|
|
39
39
|
"eslint-config-prettier": "10.1.8",
|
|
40
40
|
"eslint-plugin-unused-imports": "4.2.0",
|
|
41
41
|
"prettier": "3.6.2",
|