mem-fs-editor 12.0.0 → 12.0.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.
- package/README.md +2 -0
- package/dist/util.d.ts +5 -5
- package/dist/util.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -80,11 +80,13 @@ Copy file(s) from the `from` path to the `to` path.
|
|
|
80
80
|
When passing array, you should pass `options.fromBasePath` to be used to calculate the `to` relative path. The common directory will be detected and used as `fromBasePath` otherwise.
|
|
81
81
|
|
|
82
82
|
Optionally, pass an `options.fileTransform` function (`fileTransform(destinationPath, sourcePath, contents)`) that transforms both the destination path and file contents. The function takes two arguments:
|
|
83
|
+
|
|
83
84
|
- `destinationPath`: The resolved destination file path
|
|
84
85
|
- `sourcePath`: The resolved source file path
|
|
85
86
|
- `contents`: The file contents as a `Buffer`
|
|
86
87
|
|
|
87
88
|
It should return a tuple `[newFilepath, newContents]` where:
|
|
89
|
+
|
|
88
90
|
- `newFilepath`: The transformed destination path (string)
|
|
89
91
|
- `newContents`: The transformed file contents (Buffer)
|
|
90
92
|
|
package/dist/util.d.ts
CHANGED
|
@@ -11,10 +11,10 @@ export declare function resolveFromPaths({ from, fromBasePath, }: {
|
|
|
11
11
|
from: string | string[];
|
|
12
12
|
fromBasePath: string;
|
|
13
13
|
}): ResolvedFrom[];
|
|
14
|
-
export declare function resolveGlobOptions({ noGlob, hasGlobOptions, hasDynamicPattern }: {
|
|
15
|
-
noGlob
|
|
16
|
-
hasGlobOptions
|
|
17
|
-
hasDynamicPattern
|
|
14
|
+
export declare function resolveGlobOptions({ noGlob, hasGlobOptions, hasDynamicPattern, }: {
|
|
15
|
+
noGlob?: boolean;
|
|
16
|
+
hasGlobOptions?: boolean;
|
|
17
|
+
hasDynamicPattern?: boolean;
|
|
18
18
|
}): {
|
|
19
|
-
preferFiles:
|
|
19
|
+
preferFiles: boolean;
|
|
20
20
|
};
|
package/dist/util.js
CHANGED
|
@@ -63,6 +63,6 @@ export function resolveFromPaths({ from, fromBasePath, }) {
|
|
|
63
63
|
return { from: filePath, resolvedFrom, relativeFrom };
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
export function resolveGlobOptions({ noGlob, hasGlobOptions, hasDynamicPattern }) {
|
|
66
|
+
export function resolveGlobOptions({ noGlob, hasGlobOptions, hasDynamicPattern, }) {
|
|
67
67
|
return { preferFiles: noGlob || (!hasGlobOptions && !hasDynamicPattern) };
|
|
68
68
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mem-fs-editor",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "File edition helpers working on top of mem-fs",
|
|
5
5
|
"repository": "SBoudrias/mem-fs-editor",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@types/ejs": "^3.1.5",
|
|
37
|
+
"@types/picomatch": "^4.0.2",
|
|
37
38
|
"binaryextensions": "^6.11.0",
|
|
38
39
|
"commondir": "^1.0.1",
|
|
39
40
|
"debug": "^4.4.3",
|