path-serializer 0.1.2 → 0.1.3
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 +2 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.ts +5 -2
- package/dist/esm/index.d.ts +5 -2
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.cjs
CHANGED
|
@@ -881,7 +881,7 @@ function __webpack_require__(moduleId) {
|
|
|
881
881
|
test (val) {
|
|
882
882
|
return 'string' == typeof val;
|
|
883
883
|
},
|
|
884
|
-
serialize (val
|
|
884
|
+
serialize (val) {
|
|
885
885
|
const normalized = transformCodeToPosixPath(val);
|
|
886
886
|
let replaced = applyMatcherReplacement(pathMatchers, normalized);
|
|
887
887
|
if (ansiDoubleQuotes) replaced = replaced.replace(/"/g, '\\"');
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { SnapshotSerializer } from '@vitest/snapshot';
|
|
2
|
-
|
|
3
1
|
export declare function createSnapshotSerializer(options?: SnapshotSerializerOptions): SnapshotSerializer;
|
|
4
2
|
|
|
5
3
|
declare interface Features {
|
|
@@ -36,6 +34,11 @@ declare interface PathMatcher {
|
|
|
36
34
|
|
|
37
35
|
declare type PathMatchExpression = string | RegExp;
|
|
38
36
|
|
|
37
|
+
declare interface SnapshotSerializer {
|
|
38
|
+
serialize: (val: any) => string;
|
|
39
|
+
test: (arg0: any) => boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
39
42
|
declare interface SnapshotSerializerOptions {
|
|
40
43
|
cwd?: string;
|
|
41
44
|
workspace?: string;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { SnapshotSerializer } from '@vitest/snapshot';
|
|
2
|
-
|
|
3
1
|
export declare function createSnapshotSerializer(options?: SnapshotSerializerOptions): SnapshotSerializer;
|
|
4
2
|
|
|
5
3
|
declare interface Features {
|
|
@@ -36,6 +34,11 @@ declare interface PathMatcher {
|
|
|
36
34
|
|
|
37
35
|
declare type PathMatchExpression = string | RegExp;
|
|
38
36
|
|
|
37
|
+
declare interface SnapshotSerializer {
|
|
38
|
+
serialize: (val: any) => string;
|
|
39
|
+
test: (arg0: any) => boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
39
42
|
declare interface SnapshotSerializerOptions {
|
|
40
43
|
cwd?: string;
|
|
41
44
|
workspace?: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -856,7 +856,7 @@ function createSnapshotSerializer(options) {
|
|
|
856
856
|
test (val) {
|
|
857
857
|
return 'string' == typeof val;
|
|
858
858
|
},
|
|
859
|
-
serialize (val
|
|
859
|
+
serialize (val) {
|
|
860
860
|
const normalized = transformCodeToPosixPath(val);
|
|
861
861
|
let replaced = applyMatcherReplacement(pathMatchers, normalized);
|
|
862
862
|
if (ansiDoubleQuotes) replaced = replaced.replace(/"/g, '\\"');
|