Commit graph

112 commits

Author SHA1 Message Date
ClaudiaFang
49bfe9f4c2
docs: add video (#30)
Updated video link to a GitHub asset for better accessibility.
2026-06-19 20:23:03 +08:00
ClaudiaFang
df44a96c9b docs: update intro video with refreshed content 2026-06-19 11:59:00 +00:00
semantic-release-bot
9a4d136e63 chore(release): 1.1.2 [skip ci]
## [1.1.2](https://github.com/firstsun-dev/git-files-sync/compare/1.1.1...1.1.2) (2026-06-16)

### Bug Fixes

* **lint:** replace activeWindow.setTimeout with setTimeout ([4099f44](4099f44fa5))
2026-06-16 13:34:20 +00:00
ClaudiaFang
4099f44fa5 fix(lint): replace activeWindow.setTimeout with setTimeout
Removes the eslint-disable comment and uses the standard setTimeout
which is properly typed in the DOM lib and satisfies the obsidianmd
lint rule requiring window-prefixed timer functions to use bare form.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 13:32:44 +00:00
semantic-release-bot
e18851934a chore(release): 1.1.1 [skip ci]
## [1.1.1](https://github.com/firstsun-dev/git-files-sync/compare/1.1.0...1.1.1) (2026-06-16)

### Bug Fixes

* **ci:** switch to shared workflow v1 and fix repository url ([3a0f99e](3a0f99e383))
2026-06-16 03:54:45 +00:00
ClaudiaFang
3a0f99e383 fix(ci): switch to shared workflow v1 and fix repository url 2026-06-16 03:53:29 +00:00
semantic-release-bot
1bde1c33e9 chore(release): 1.1.0 [skip ci]
## [1.1.0](https://github.com/firstsun-dev/git-files-sync/compare/1.0.6...1.1.0) (2026-06-16)

### Features

* support hidden file sync and expand binary extension list ([649d732](649d732781))

### Documentation

* remove SonarCloud quality gate badge from README ([d907baf](d907baf229))
* update README badges ([7cd9e38](7cd9e38e65))

### Code Refactoring

* **test:** eliminate duplicate code flagged by SonarCloud ([f49600e](f49600eb66))
* **test:** extract shared SyncManager mock setup to reduce duplication ([1f71a43](1f71a43980))
2026-06-16 03:50:36 +00:00
ClaudiaFang
6d475cef6c
Merge pull request #27 from firstsun-dev/dependabot/npm_and_yarn/npm_and_yarn-53cbaf2a5b
chore(deps-dev): bump esbuild from 0.28.0 to 0.28.1 in the npm_and_yarn group across 1 directory
2026-06-16 01:41:16 +08:00
dependabot[bot]
44b3db39a3
chore(deps-dev): bump esbuild
Bumps the npm_and_yarn group with 1 update in the / directory: [esbuild](https://github.com/evanw/esbuild).


Updates `esbuild` from 0.28.0 to 0.28.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.28.0...v0.28.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.28.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 01:43:47 +00:00
ClaudiaFang
eefd72846e
Merge pull request #25 from firstsun-dev/issue-23-code-quality
feat: support hidden file sync and expand binary extension list
2026-05-26 12:51:11 +08:00
ClaudiaFang
8d7a25f30c ci: add CodeQL static analysis workflow 2026-05-25 02:47:07 +00:00
ClaudiaFang
7cd9e38e65 docs: update README badges 2026-05-25 02:35:58 +00:00
ClaudiaFang
f49600eb66 refactor(test): eliminate duplicate code flagged by SonarCloud
- Extract adapter variable and loadWith() helper in gitignore hidden-file tests
- Hoist shared ArrayBuffer constants in path.test.ts
Reduces new_duplicated_lines_density from ~78%/46% to near 0%.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 03:52:32 +00:00
ClaudiaFang
d907baf229 docs: remove SonarCloud quality gate badge from README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 03:45:56 +00:00
ClaudiaFang
1f71a43980 refactor(test): extract shared SyncManager mock setup to reduce duplication
Move repeated beforeEach mock initialization into createSyncManagerMocks()
helper to eliminate ~45 lines of copy-paste across binary and hidden test files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 03:40:45 +00:00
ClaudiaFang
fcb9447733 test: expand coverage for binary files, hidden paths, and edge cases
- Add sync-manager-binary.test.ts: push/pull ArrayBuffer via adapter.readBinary/writeBinary
- Add sync-manager-hidden.test.ts: hidden path mkdir, push, pull via string paths
- Add utils/path.test.ts: isBinaryPath and contentsEqual full coverage
- Add metadata-on-equal assertion to sync-manager tests
- Add GitHub truncated result and GitLab pagination boundary tests
- Add hidden file gitignore filter tests
- Add docs/test-coverage.md with all 189 test cases documented

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 03:35:36 +00:00
ClaudiaFang
49acf05241 chore(agent): update obsidian skills 2026-05-22 03:16:30 +00:00
ClaudiaFang
d5379c1f3f
Merge branch 'master' into issue-23-code-quality 2026-05-22 11:09:44 +08:00
ClaudiaFang
649d732781 feat: support hidden file sync and expand binary extension list
- Use FileSystemAdapter.list() recursively to discover hidden files (e.g. .claude)
- Fix ensureParentDirs to use adapter.mkdir() for hidden directory creation
- Expand BINARY_EXTENSIONS with modern image, audio, video, archive, and design formats
- Exclude .agents/** from ESLint to prevent project-service parse errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 03:08:15 +00:00
semantic-release-bot
d41d98d0b3 chore(release): 1.0.6 [skip ci]
## [1.0.6](https://github.com/firstsun-dev/git-files-sync/compare/1.0.5...1.0.6) (2026-05-20)

### Bug Fixes

* **release:** trigger patch release on chore(deps) commits ([910305a](910305a81c))
* **test:** add @types/jsdom and fix Element type cast in setup-dom ([8f7207a](8f7207a388))
* **ui:** real-time file status during refresh and unsynced file actions ([c6152a6](c6152a61bb))

### Code Refactoring

* code quality enhancements for issue [#23](https://github.com/firstsun-dev/git-files-sync/issues/23) ([7f223e3](7f223e33b8))
* code quality enhancements for issue [#23](https://github.com/firstsun-dev/git-files-sync/issues/23) ([31ac918](31ac9189cf))
* eliminate code duplication flagged by SonarCloud ([556f9e9](556f9e930d))
2026-05-20 09:12:47 +00:00
ClaudiaFang
f9499a4895
Merge pull request #24 from firstsun-dev/issue-23-code-quality
fix: code quality enhancements and UI improvements (#23)
2026-05-20 17:11:30 +08:00
ClaudiaFang
556f9e930d refactor: eliminate code duplication flagged by SonarCloud
- Move contentsEqual to src/utils/path.ts (shared by sync-manager + SyncStatusView)
- Replace private isBinary in both files with isBinaryPath from path.ts
- Extract fileItemCallbacks() in SyncStatusView to remove duplicate callback objects
- Create tests/services/service-test-helpers.ts with shared testConnection,
  getRepoGitignores, getFile error handling, getLastRequestCall helpers
- Refactor github/gitlab service tests to use shared helpers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 09:09:02 +00:00
ClaudiaFang
8f7207a388 fix(test): add @types/jsdom and fix Element type cast in setup-dom
jsdom v29 uses exports field for types, incompatible with moduleResolution
"node" in CI — adding @types/jsdom provides standalone type declarations.
Cast el to HTMLInputElement directly instead of instanceof window.HTMLInputElement
to avoid unresolvable type narrowing across jsdom window context.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 08:59:05 +00:00
ClaudiaFang
7f223e33b8 refactor: code quality enhancements for issue #23
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 08:56:28 +00:00
ClaudiaFang
c6152a61bb fix(ui): real-time file status during refresh and unsynced file actions
- Render checked files incrementally below progress bar during refresh
- Progress bar now shows X/Y count and percentage
- Remove fileStatus.file guard from push/remove for unsynced files
- Fix canPush/canDelete in action bar to include hidden (string-path) files
- Fix lint: use pre-declared vi.fn() to avoid unbound-method errors
- Fix test import path and mockSettings typing for sync-manager-mapping

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 08:53:51 +00:00
ClaudiaFang
c945b9dfb0 ci: add attestations and id-token permissions for artifact provenance
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 07:25:32 +00:00
ClaudiaFang
a77e0150a1 test(ui): add interaction tests for ActionBar, FileListItem, and DiffPanel
Adds comprehensive UI component test coverage with 54 new test cases across three components to close issue #23. Includes JSDOM setup polyfills and tooltip mock utilities for DOM-dependent component testing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 05:25:13 +00:00
ClaudiaFang
31ac9189cf refactor: code quality enhancements for issue #23
- Fix plugin scanner warnings: remove !important from styles.css,
  fix CSS shorthand (0 0 8px), use activeWindow.setTimeout(),
  remove .zip from release assets
- Extract LCS diff algorithm to src/utils/diff.ts with full unit tests
- Extract UI render components: ActionBar, FileListItem, DiffPanel
  reducing SyncStatusView from 853 to 523 lines
- Add shared types in src/ui/types.ts
- Add unified logger in src/utils/logger.ts replacing 9 console.* calls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 04:55:26 +00:00
ClaudiaFang
910305a81c fix(release): trigger patch release on chore(deps) commits
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 03:29:45 +00:00
dependabot[bot]
ad1eadb4cb
chore(deps-dev): bump fast-uri (#22)
Bumps the npm_and_yarn group with 1 update in the / directory: [fast-uri](https://github.com/fastify/fast-uri).


Updates `fast-uri` from 3.1.0 to 3.1.2
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-20 03:21:20 +00:00
Tianyao
c3f1d4fdc1 ci: migrate shared workflow reference to .github 2026-05-02 13:37:54 +08:00
semantic-release-bot
438a4981b1 chore(release): 1.0.5 [skip ci]
## [1.0.5](https://github.com/firstsun-dev/git-files-sync/compare/1.0.4...1.0.5) (2026-04-26)

### Code Refactoring

* address SonarCloud issues and reduce code duplication ([#20](https://github.com/firstsun-dev/git-files-sync/issues/20)) ([4574abc](4574abc294))
* fix quality gate issues, improve type safety and pagination ([#21](https://github.com/firstsun-dev/git-files-sync/issues/21)) ([70171fd](70171fd5d7))
2026-04-26 18:17:27 +00:00
ClaudiaFang
70171fd5d7
refactor: fix quality gate issues, improve type safety and pagination (#21)
* refactor: fix quality gate issues, improve type safety and pagination

* refactor: integrate eslint-plugin-sonarjs and fix cognitive complexity issues

* fix(ci): remove invalid secrets reference in workflow with block

* fix(build): resolve strict null check errors in diff logic

---------

Co-authored-by: ClaudiaFang <tianyao.firstsun@gmail.coim>
2026-04-27 02:16:26 +08:00
ClaudiaFang
4574abc294
refactor: address SonarCloud issues and reduce code duplication (#20)
* ci: use shared obsidian plugin workflow and update obsidian version

* Add quality gate status badge to README

Added a quality gate status badge to the README.

* refactor: address SonarCloud issues and reduce code duplication

---------

Co-authored-by: ClaudiaFang <tianyao.firstsun@gmail.coim>
2026-04-27 01:20:40 +08:00
ClaudiaFang
67bf95ae89
Add quality gate status badge to README
Added a quality gate status badge to the README.
2026-04-27 00:41:26 +08:00
ClaudiaFang
f79f36d5aa
ci: use shared obsidian plugin workflow and update obsidian version (#19)
Co-authored-by: ClaudiaFang <tianyao.firstsun@gmail.coim>
2026-04-27 00:33:35 +08:00
ClaudiaFang
7f21cad9db
chore(ci): update minAppVersion to 1.12.7 and add git plugin to release (#18) 2026-04-26 11:35:55 +08:00
ClaudiaFang
591dd6e82a
refactor: consolidate duplicated methods into BaseGitService (#17) 2026-04-26 10:46:44 +08:00
ClaudiaFang
655cd69252
Fix lint (#15)
* ci: optimize workflow to reduce redundancy and refine permissions

* ci: fix syntax errors in workflow file

* docs: resolve SonarCloud issues and refactor for complexity

* refactor: extract BaseGitService to reduce duplication and fix lint/tests

* fix: resolve TS build errors due to unchecked indexed access

* refactor: address gemini-code-assist bot reviews

- Add last_commit_id to GitLabFileResponse
- Use last_commit_id as sha in GitLabService.getFile
- Add rename detection to SyncManager.processSingleBatchPush

---------

Co-authored-by: ClaudiaFang <tianyao.firstsun@gmail.coim>
2026-04-26 05:23:13 +08:00
ClaudiaFang
f33ef3e3fd
fix: remove commend (#14)
Co-authored-by: ClaudiaFang <tianyao.firstsun@gmail.coim>
2026-04-25 20:25:53 +00:00
ClaudiaFang
d26043c4a3
Merge pull request #13 from firstsun-dev/docs/fix-readme-videos
docs: use local video assets for READMEs
2026-04-26 02:20:10 +08:00
ClaudiaFang
3f91ff5601 docs: use local video assets for READMEs 2026-04-25 18:19:39 +00:00
ClaudiaFang
4d757d15a9 ci: implement job-level filtering and final status check 2026-04-25 17:41:46 +00:00
ClaudiaFang
fa7e2a9361 ci: skip release for configuration updates and update docs 2026-04-25 17:28:44 +00:00
ClaudiaFang
5c62533d93
fix: final test coverage and logic improvements (#11)
* chore: update GitHub Actions to latest versions and increase test coverage for batch operations

* fix: resolve linting errors in batch tests

* chore: consolidate GitHub workflows into unified ci.yml and allow sonar failure

* fix: include missing test coverage and logic improvements

---------

Co-authored-by: ClaudiaFang <tianyao.firstsun@gmail.coim>
2026-04-25 15:40:36 +00:00
ClaudiaFang
5e954f1c2b
ci: remove permissions from CI workflow
Removed permissions section from CI workflow.
2026-04-25 23:36:35 +08:00
ClaudiaFang
684551b8f8
fix: resolve SonarCloud Quality Gate failures and improve marketplace readiness (#10)
This commit consolidates several improvements to satisfy SonarCloud Quality Gate and enhance the overall plugin stability:

- Code Quality & Refactoring:
  - Reduced duplication to 0% by refactoring SyncManager and SyncStatusView.
  - Implemented centralized 'processBatch' logic for multi-file sync operations.
  - Fixed security hotspots by replacing legacy atob/btoa with Buffer.
  - Added memory safety limits to the diff algorithm to prevent DoS.

- Test Coverage & Reliability:
  - Improved SyncManager coverage to 81.8% and GitignoreManager to 92.8%.
  - Added comprehensive unit tests for batch operations and complex .gitignore patterns.
  - Resolved all ESLint 'unsafe-member-access' and 'unbound-method' warnings in tests.

- Infrastructure & Metadata:
  - Consolidated GitHub Actions into a single optimized 'ci.yml' using latest versions (v6-v8).
  - Synchronized manifest.json and versions.json to v1.1.0.
  - Fixed workflow permission issues identified by CodeQL.
2026-04-25 23:35:32 +08:00
ClaudiaFang
63f80530a1
Merge pull request #9 from firstsun-dev/fix/sonarcloud-failure
fix: SonarCloud analysis failure and quality gate issues
2026-04-25 14:13:03 +08:00
ClaudiaFang
fa9502c7ab fix: SonarCloud analysis failure and quality gate issues 2026-04-25 06:10:55 +00:00
ClaudiaFang
f7a7e95459 feat: initial release 2026-04-25 04:50:15 +00:00