@fractary/codex 0.12.18 → 0.12.22

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.js CHANGED
@@ -4803,33 +4803,15 @@ function createSyncPlan(sourceFiles, targetFiles, options, config) {
4803
4803
  hash: sourceFile.hash
4804
4804
  });
4805
4805
  } else {
4806
- const isDifferent = sourceFile.hash !== targetFile.hash;
4806
+ const isDifferent = sourceFile.hash !== void 0 && targetFile.hash !== void 0 ? sourceFile.hash !== targetFile.hash : sourceFile.size !== targetFile.size;
4807
4807
  if (isDifferent) {
4808
- if (options.force) {
4809
- files.push({
4810
- path: sourceFile.path,
4811
- operation: "update",
4812
- size: sourceFile.size,
4813
- mtime: sourceFile.mtime,
4814
- hash: sourceFile.hash
4815
- });
4816
- } else if (targetFile.mtime > sourceFile.mtime) {
4817
- conflicts.push({
4818
- path: sourceFile.path,
4819
- operation: "conflict",
4820
- size: sourceFile.size,
4821
- mtime: sourceFile.mtime,
4822
- reason: "Target file is newer than source"
4823
- });
4824
- } else {
4825
- files.push({
4826
- path: sourceFile.path,
4827
- operation: "update",
4828
- size: sourceFile.size,
4829
- mtime: sourceFile.mtime,
4830
- hash: sourceFile.hash
4831
- });
4832
- }
4808
+ files.push({
4809
+ path: sourceFile.path,
4810
+ operation: "update",
4811
+ size: sourceFile.size,
4812
+ mtime: sourceFile.mtime,
4813
+ hash: sourceFile.hash
4814
+ });
4833
4815
  } else {
4834
4816
  skipped.push({
4835
4817
  path: sourceFile.path,