dotsync 0.4.2 → 0.4.4
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.
- checksums.yaml +4 -4
- data/.claude/settings.local.json.example +23 -0
- data/.gitignore +1 -1
- data/CHANGELOG.md +21 -1
- data/Gemfile.lock +1 -1
- data/lib/dotsync/actions/concerns/mappings_transfer.rb +6 -1
- data/lib/dotsync/actions/pull_action.rb +8 -19
- data/lib/dotsync/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 64db8926a739c2b24c68dd4048d9074f516a8238d3e745cd4461c25420275406
|
|
4
|
+
data.tar.gz: a81dca043a4a8952d87419cf148c34c2e705da9991d35308e4347c1f4475d7d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e459483e1caac6bdd491b456718f10ca01dc7fe63088acd71c5433e5cce700a6bc42b6aa8538a43bb44656d09ccaff7e12eebdbbe54d8e80b83ffa260c5bcb7c
|
|
7
|
+
data.tar.gz: 7ab7945a4fa369086b1888947be36784c36a03d2eeea02388811ab6f8efbcb4de31a813b5176d8b71524388f57a5f17f8fa47b39a1f696b37c586812d9e102d3
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(*)",
|
|
5
|
+
"Edit(*)",
|
|
6
|
+
"Write(*)",
|
|
7
|
+
"Read(*)",
|
|
8
|
+
"Glob(*)",
|
|
9
|
+
"Grep(*)",
|
|
10
|
+
"WebFetch(*)",
|
|
11
|
+
"WebSearch(*)",
|
|
12
|
+
"Agent(*)",
|
|
13
|
+
"Skill(*)",
|
|
14
|
+
"NotebookEdit(*)"
|
|
15
|
+
],
|
|
16
|
+
"deny": [],
|
|
17
|
+
"ask": []
|
|
18
|
+
},
|
|
19
|
+
"attribution": {
|
|
20
|
+
"commit": "",
|
|
21
|
+
"pr": ""
|
|
22
|
+
}
|
|
23
|
+
}
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
|
+
## [0.4.4] - 2026-04-07
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- Skip file transfer for mappings with no differences (#39)
|
|
6
|
+
- `transfer_mappings` now filters using cached diff results to only transfer mappings that have actual changes
|
|
7
|
+
- Prevents unnecessary file mtime updates that caused Neovim to reload all plugins on every `dotsync pull`
|
|
8
|
+
- No redundant file comparisons — leverages the already-computed `@differs` from the display phase
|
|
9
|
+
|
|
10
|
+
## [0.4.3] - 2026-03-22
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fix backup to respect `only`/`ignore` filters via FileTransfer reuse (#37)
|
|
15
|
+
- Backup no longer copies entire destination directories — only files matching sync filters are backed up
|
|
16
|
+
- Fixes `Permission denied` crash when destination contains restricted files (e.g. `.git/objects`) outside the filter
|
|
17
|
+
- Removes `cp_r_regular_files` in favor of reusing `FileTransfer` with a backup mapping
|
|
18
|
+
|
|
1
19
|
## [0.4.2] - 2026-03-22
|
|
2
20
|
|
|
3
21
|
### Fixed
|
|
4
22
|
|
|
5
23
|
- Fix `cp_r_regular_files` crash on pre-existing symlinks during backup (#35)
|
|
6
24
|
- Add `FileUtils.rm_f` before `FileUtils.ln_s` to handle leftover symlinks from partial backup runs
|
|
7
|
-
|
|
8
25
|
## [0.4.1] - 2026-03-17
|
|
9
26
|
|
|
10
27
|
### Fixed
|
|
@@ -489,6 +506,9 @@ Add gem executables
|
|
|
489
506
|
|
|
490
507
|
Initial version
|
|
491
508
|
|
|
509
|
+
[0.4.4]: https://github.com/dsaenztagarro/dotsync/compare/v0.4.3...v0.4.4
|
|
510
|
+
[0.4.3]: https://github.com/dsaenztagarro/dotsync/compare/v0.4.2...v0.4.3
|
|
511
|
+
[0.4.2]: https://github.com/dsaenztagarro/dotsync/compare/v0.4.1...v0.4.2
|
|
492
512
|
[0.4.1]: https://github.com/dsaenztagarro/dotsync/compare/v0.4.0...v0.4.1
|
|
493
513
|
[0.4.0]: https://github.com/dsaenztagarro/dotsync/compare/v0.3.3...v0.4.0
|
|
494
514
|
[0.3.3]: https://github.com/dsaenztagarro/dotsync/compare/v0.3.2...v0.3.3
|
data/Gemfile.lock
CHANGED
|
@@ -114,8 +114,13 @@ module Dotsync
|
|
|
114
114
|
errors = []
|
|
115
115
|
mutex = Mutex.new
|
|
116
116
|
|
|
117
|
+
# Only transfer mappings that have actual differences (uses cached diffs)
|
|
118
|
+
changed_mappings = valid_mappings.each_with_index.filter_map do |mapping, idx|
|
|
119
|
+
mapping if differs[idx].any?
|
|
120
|
+
end
|
|
121
|
+
|
|
117
122
|
# Process mappings in parallel - each mapping is independent
|
|
118
|
-
Dotsync::Parallel.each(
|
|
123
|
+
Dotsync::Parallel.each(changed_mappings) do |mapping|
|
|
119
124
|
Dotsync::FileTransfer.new(mapping).transfer
|
|
120
125
|
rescue Dotsync::PermissionError => e
|
|
121
126
|
mutex.synchronize { errors << ["Permission denied: #{e.message}", "Try: chmod +w <path> or check file permissions"] }
|
|
@@ -62,30 +62,19 @@ module Dotsync
|
|
|
62
62
|
if File.file?(mapping.src)
|
|
63
63
|
FileUtils.cp(mapping.dest, backup_path)
|
|
64
64
|
else
|
|
65
|
-
|
|
65
|
+
backup_mapping = Dotsync::Mapping.new(
|
|
66
|
+
"src" => mapping.dest,
|
|
67
|
+
"dest" => backup_path,
|
|
68
|
+
"only" => mapping.original_only,
|
|
69
|
+
"ignore" => mapping.original_ignores,
|
|
70
|
+
"force" => false
|
|
71
|
+
)
|
|
72
|
+
Dotsync::FileTransfer.new(backup_mapping).transfer
|
|
66
73
|
end
|
|
67
74
|
end
|
|
68
75
|
true
|
|
69
76
|
end
|
|
70
77
|
|
|
71
|
-
# Recursively copy a directory, skipping sockets, FIFOs, and device files.
|
|
72
|
-
# FileUtils.cp_r fails on macOS when socket paths exceed the 104-byte limit.
|
|
73
|
-
def cp_r_regular_files(src, dest)
|
|
74
|
-
FileUtils.mkdir_p(dest)
|
|
75
|
-
Dir.each_child(src) do |entry|
|
|
76
|
-
src_entry = File.join(src, entry)
|
|
77
|
-
dest_entry = File.join(dest, entry)
|
|
78
|
-
if File.symlink?(src_entry)
|
|
79
|
-
FileUtils.rm_f(dest_entry)
|
|
80
|
-
FileUtils.ln_s(File.readlink(src_entry), dest_entry)
|
|
81
|
-
elsif File.directory?(src_entry)
|
|
82
|
-
cp_r_regular_files(src_entry, dest_entry)
|
|
83
|
-
elsif File.file?(src_entry)
|
|
84
|
-
FileUtils.cp(src_entry, dest_entry, preserve: true)
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
|
|
89
78
|
def purge_old_backups
|
|
90
79
|
backups = Dir[File.join(backups_root, "*")].sort.reverse
|
|
91
80
|
if backups.size > 10
|
data/lib/dotsync/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dotsync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Sáenz
|
|
@@ -283,6 +283,7 @@ executables:
|
|
|
283
283
|
extensions: []
|
|
284
284
|
extra_rdoc_files: []
|
|
285
285
|
files:
|
|
286
|
+
- ".claude/settings.local.json.example"
|
|
286
287
|
- ".editorconfig"
|
|
287
288
|
- ".github/workflows/ci.yml"
|
|
288
289
|
- ".github/workflows/release.yml"
|