@regressionproof/snapshotter 0.6.1 → 0.6.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/build/esm/sync.js +3 -1
- package/build/sync.js +3 -1
- package/package.json +2 -2
package/build/esm/sync.js
CHANGED
|
@@ -29,7 +29,9 @@ export function syncFiles(sourcePath, mirrorPath) {
|
|
|
29
29
|
const hasGitIgnore = existsSync(path.join(sourcePath, '.gitignore'));
|
|
30
30
|
const excludes = DEFAULT_EXCLUDES.map((e) => `--exclude='${e}'`).join(' ');
|
|
31
31
|
if (hasGitIgnore) {
|
|
32
|
-
|
|
32
|
+
// Filter through a file existence check to handle deleted files in git index
|
|
33
|
+
// This is more portable than --ignore-missing-args which isn't available on older rsync (macOS)
|
|
34
|
+
const cmd = `cd "${sourcePath}" && git ls-files --cached --others --exclude-standard -z | while IFS= read -r -d '' file; do [ -e "$file" ] && printf '%s\\0' "$file"; done | rsync -av --files-from=- --from0 ${excludes} . "${mirrorPath}/"`;
|
|
33
35
|
yield execAsync(cmd);
|
|
34
36
|
}
|
|
35
37
|
else {
|
package/build/sync.js
CHANGED
|
@@ -25,7 +25,9 @@ async function syncFiles(sourcePath, mirrorPath) {
|
|
|
25
25
|
const hasGitIgnore = (0, fs_1.existsSync)(path_1.default.join(sourcePath, '.gitignore'));
|
|
26
26
|
const excludes = DEFAULT_EXCLUDES.map((e) => `--exclude='${e}'`).join(' ');
|
|
27
27
|
if (hasGitIgnore) {
|
|
28
|
-
|
|
28
|
+
// Filter through a file existence check to handle deleted files in git index
|
|
29
|
+
// This is more portable than --ignore-missing-args which isn't available on older rsync (macOS)
|
|
30
|
+
const cmd = `cd "${sourcePath}" && git ls-files --cached --others --exclude-standard -z | while IFS= read -r -d '' file; do [ -e "$file" ] && printf '%s\\0' "$file"; done | rsync -av --files-from=- --from0 ${excludes} . "${mirrorPath}/"`;
|
|
29
31
|
await execAsync(cmd);
|
|
30
32
|
}
|
|
31
33
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regressionproof/snapshotter",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"@sprucelabs/spruce-core-schemas": "^42.1.3",
|
|
95
95
|
"@sprucelabs/spruce-skill-utils": "^34.0.3"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "3fa8b85ebd5e12992575a2bfc04581eecf3ef5ee"
|
|
98
98
|
}
|