Commit graph

20 commits

Author SHA1 Message Date
Claude
692fc0f293 build(compat): derive the compat typecheck's target version dynamically
The 1.11 compatibility gate previously hardcoded the target Obsidian
version in two places (an obsidian-1_11 alias devDependency and a static
tsconfig.compat.json), so bumping minAppVersion would silently leave the
check pinned to the old version.

Replace both with scripts/typecheck-compat.mjs, which reads the target from
versions.json (the entry for the current manifest version, falling back to
manifest.minAppVersion), installs the matching Obsidian typings into a
git-ignored cache on demand, and type-checks src against them. The gate now
follows minAppVersion automatically with no code changes.

Also fold `typecheck:compat` into `npm run build` so it runs wherever the
build runs (the husky pre-commit hook and any CI step that builds).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSikT9ZAfQF8K4SE3DatD3
2026-07-07 01:53:28 +00:00
Claude
d896015765 fix(compat): support Obsidian down to 1.11.0
Release 1.2.0 raised minAppVersion to 1.13.0, pushing users still on
Obsidian 1.11/1.12 back to the older 1.1.2 build via versions.json. Only
three 1.13-era APIs were in use; two were already runtime-guarded, but
ButtonComponent.setDestructive() would throw on older Obsidian.

- Guard setDestructive() behind applyDestructiveStyle() (no-ops on < 1.13).
- Declare SettingDefinitionItem locally and read update() via a cast so the
  forward-compatible settings code type-checks against 1.11 typings.
- Ship 1.2.1 with minAppVersion 1.11.0 (manifest.json + versions.json).
- Add tsconfig.compat.json and `npm run typecheck:compat` to type-check src
  against the 1.11 API, plus regression tests for applyDestructiveStyle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSikT9ZAfQF8K4SE3DatD3
2026-07-07 01:53:28 +00:00
ClaudiaFang
a47cfcb708 fix(deps): resolve Dependabot security alerts in dev dependencies
Bump semantic-release, vitest, jsdom, and related tooling to latest
patch versions, and add npm overrides for transitive packages bundled
deep inside the npm CLI (sigstore, tar, ip-address) and the eslint
toolchain (js-yaml, undici via @actions/http-client) that npm install
alone could not reach.

brace-expansion needed no override: npm's default resolver already
picks the highest version satisfying each consumer's own semver range
once tar/sigstore/etc. are unpinned, so a nested override there only
forced an incompatible version onto minimatch@3.1.5 and broke lockfile
consistency (`npm ci` failed with EUSAGE).

All flagged packages were dev-only; none ship in the built plugin.
npm audit now reports 0 vulnerabilities, and `npm ci` + build/test/lint
pass from a clean install.
2026-07-05 07:12:32 +00:00
ClaudiaFang
5c64b96c08 fix(deprecations): migrate off deprecated Obsidian APIs
- Bump obsidian dependency to ^1.13.1
- settings.ts: add getSettingDefinitions() alongside display()
  fallback for Obsidian < 1.13.0 (minAppVersion)
- SyncConflictModal.ts: setWarning() -> setDestructive()
2026-07-05 05:28:53 +00:00
Claude
bcc5cda69c
fix(services): clear error when Git API returns HTML instead of JSON
Refresh failed with the cryptic "Unexpected token '<', "<!DOCTYPE ..."
is not valid JSON" whenever the Git server returned an HTML page (login,
SSO redirect, or proxy/error page) on a 2xx/3xx response. safeRequest
only threw on status >= 400, so such bodies slipped through and crashed
at response.json.

Add BaseGitService.parseJson() which detects non-JSON/HTML bodies and
throws an actionable message, and use it for all response.json reads in
the GitHub and GitLab services. Also harden parseErrorResponse so HTML
error pages produce a clear message instead of dumping the raw document.

Add tests covering HTML 2xx responses, HTML detection by leading '<',
malformed JSON, and HTML error pages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DwioG4CNKUBuKiZdowLFWe
2026-06-26 06:02:40 +00: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
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
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
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
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
591dd6e82a
refactor: consolidate duplicated methods into BaseGitService (#17) 2026-04-26 10:46:44 +08:00
ClaudiaFang
cbc55d502d feat: Support .gitignore filtering and GitHub-style diff viewer 2026-04-24 12:41:36 +00:00
tianyao
423ca4165a fix(release): add conventional-changelog-conventionalcommits dependency
Add missing conventional-changelog-conventionalcommits package required
by semantic-release for commit analysis.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 04:31:25 +00:00
tianyao
c59ad0a5ec fix(test): add @vitest/coverage-v8 dependency
Add missing @vitest/coverage-v8 package required for running tests
with coverage in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 04:30:49 +00:00
tianyao
29f55a14ec fix(deps): update esbuild to 0.28.0 to satisfy vite peer dependency
Update esbuild from 0.25.5 to 0.28.0 to meet vite's peer dependency
requirement (^0.27.0 || ^0.28.0). This fixes package-lock.json sync
issues in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 04:29:41 +00:00
ClaudiaFang
d5539434dc
feat(core,ui,ci,docs): add GitHub support, sync status view, batch operations, and CI/CD workflows (#1)
Major feature release including:
- GitHub service support alongside GitLab
- Sync status view with visual diff
- Batch push/pull operations
- Conflict resolution modal
- Vault folder filtering
- File rename detection
- Complete CI/CD workflows (check, auto-release, semantic-release)
- Comprehensive documentation (CHANGELOG, COMPLIANCE, RELEASE guides)

Co-authored-by: tianyao <tianyao@heavendev01.royal-powan.ts.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 11:03:05 +08:00
Tianyao
6161bd75cd fix(build): resolve dependencies, fix Vitest 4 mocking, and handle file existence 2026-04-02 19:50:43 +08:00
tianyao
cccf096103 feat: implement rootPath setting and Test connection button
- Added rootPath to GitLabFilesPushSettings and DEFAULT_SETTINGS
- Implemented testConnection in GitLabService to verify credentials
- Added rootPath support to GitLabService API URL generation
- Added UI fields for rootPath and Test connection button in settings tab
- Updated tests to include rootPath in mock settings and services

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-01 17:13:12 +00:00
tianyao
362def7cd3 feat: integrate SyncConflictModal into SyncManager
- Implement conflict detection in pushFile and pullFile using SHA comparison.
- Use SyncConflictModal to prompt users for manual resolution ('Use local' or 'Use remote').
- Added unit tests in sync-manager.test.ts to verify conflict handling logic.
- Fixed linting issues related to unhandled promises and mock type safety.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 16:43:10 +00:00
ClaudiaFang
b620e9eb40
Initial commit 2026-04-01 00:23:18 +08:00