mirror of
https://github.com/saberzero1/quartz-syncer.git
synced 2026-07-22 12:50:25 +00:00
* fix: prevent greedy regex matching across wikilink boundaries and preserve anchors
TRANSCLUDED_FILE_REGEX used (.*?) which matched across ]] boundaries when
multiple transcluded files appeared on the same line. Replace with character
classes [^\]|]* to constrain matches. Also fix anchor/fragment handling in
extractBlobLinks and convertFileLinks so #page=3 and #right are preserved
through the compile pipeline instead of being silently dropped.
* test: add Layer 1 regex contract tests and Layer 2 compiler step unit tests
Establish a two-layer testing foundation for the regex-to-remark-obsidian
migration. Layer 1 (44 tests) validates every regex pattern's match/capture
behavior as behavioral contracts. Layer 2 (29 tests) exercises compiler steps
in isolation with mocked Obsidian APIs. Expand __mocks__/obsidian.ts from a
stub to a full mock supporting Vault, MetadataCache, getLinkpath, etc.
* chore: scaffold Layer 3 E2E test infrastructure with wdio-obsidian-service
Add wdio.conf.mts, test vault fixtures, E2E test spec, and flake.nix for
NixOS nix-ld support. Configure Jest to exclude test/e2e/ and add test:unit
and test:e2e npm scripts. The E2E tests require installing wdio-obsidian-service
and its dependencies before they can run.
* fix(e2e): use destructured executeObsidian API and tolerate sandboxed vault names
Fix mocha import crash by using WDIO-provided globals. Use { app } destructuring
for executeObsidian callbacks per wdio-obsidian-service API. Use toContain for
vault name assertion since the service appends a random sandbox suffix.
* ci: add E2E test job with wdio-obsidian-service to GitHub Actions
Run E2E tests on ubuntu-latest after build, using xvfb and herbstluftwm
for virtual display. Cache downloaded Obsidian versions between runs.
* test: expand utils and regex contract coverage and add FrontmatterCompiler tests
Add Layer 2 FrontmatterCompiler unit tests (33 cases) covering compile output,
permalink/alias handling, pass-through fields, tags, CSS classes, social image
fields, and timestamp behavior. Expand Layer 1 regex contract tests with capture
assertions, edge cases, and CRLF/URL behaviors. Extend utils tests for
generateUrlPath, generateBlobHash, sanitizePermalink, and escapeRegExp.
* test: add createTranscludedText unit tests for transclusion behavior
Add a focused transclusion test suite that mocks PublishFile instances and
metadata cache resolution. Covers depth limits, applyEmbeds=false, block refs,
header transclusion, recursive embeds, excalidraw skip, vault path filtering,
and block-math line handling.
* fix: align lint/typecheck for E2E files and remove explicit any in tests
Introduce a dedicated tsconfig.eslint.json so lint can include E2E and wdio
files while typecheck excludes them. Remove explicit-any casts in unit tests
by using safer unknown casts and typed internal helpers. Update justfile full
recipe to run unit+e2e, and adjust mock signatures to satisfy lint.
* docs: add three-layer testing strategy to migration plan
Document the Layer 1 (regex contracts), Layer 2 (compiler unit tests),
and Layer 3 (E2E via wdio-obsidian-service) parity gates. Update Phase 1
and Phase 2 verification checklists to reference the test layers. Add
environment notes for NixOS, CI, and the tsconfig.eslint.json split.
* feat: complete Phase 2-3 migration to AST-based transforms and minimize compiler
Phase 2: Replace string-replace transforms with remark-obsidian AST pipeline
- Consolidate comment stripping, link resolution, vault path stripping into astTransform
- Remove removeObsidianComments, convertLinksToFullPath, applyVaultPath methods
- Add unified/remark-parse/remark-stringify/remark-obsidian dependencies
Phase 3: Delegate transforms to Quartz v5 build pipeline
- Remove createTranscludedText, createSvgEmbeds, and publish cache system
- Simplify constructor (5 params instead of 6)
- Reduce pipeline from 8 steps to 4: convertFrontMatter, convertIntegrations, linkTargeting, astTransform
Bug fixes:
- Fix embed blending: use text-based replacement instead of stale CachedMetadata offsets
- Fix callout bracket escaping: post-process to unescape blockquote callout syntax
- Fix table wikilink pipes: post-process to escape pipe in wikilinks on table rows
Compiler reduced from ~900 to ~500 lines. 155 tests pass.
* docs: add v1.11.0 changelog entry
* refactor: remove dead settings and simplify Excalidraw to pass-through
Remove applyEmbeds and pathRewriteRules (dead after Phase 2-3 migration)
from settings interface, defaults, UI toggle, and test mocks.
Simplify Excalidraw integration from SVG conversion (245 lines) to
pass-through (31 lines) matching BasesIntegration pattern. Quartz v5
will handle rendering. Add excalidraw shouldPublish check in Publisher.
Remove dead rewriteRule field and getRewriteRules/PathRewriteRule
imports from Publisher.
* feat: split connection status into read and write access checks
Use listServerRefs with forPush:true to query git-receive-pack endpoint,
testing write (push) access separately from read (fetch) access.
Settings header now shows two indicators: (read: ok) (write: ok).
A public repo without token correctly shows read ok but write failed.
* docs: update v1.11.0 changelog with settings cleanup and connection split
* fix: address Copilot review feedback
- Replace truncated PNG fixture with valid 1x1 PNG
- Rename misleading E2E test names to match actual assertions
- Fix status element detachment: recreate elements in initializeGitHeader
instead of constructor, so they survive display() -> empty() cycles
* fix: handle escaped pipes in embed matching and prevent double-escape
- convertFileLinks now falls back to escaped-pipe variant of embed.original
when astTransform has escaped | to \| in table-row wikilinks
- Table pipe escaping regex uses negative lookbehind to skip already-escaped pipes
- Remove misleading stripVaultPath docstring
* fix: scope pipe escaping fallback to wikilink context only
Replace generic | → \| replacement with wikilink-scoped regex to avoid
CodeQL incomplete-sanitization alert (js/incomplete-sanitization).
The replacement now only escapes pipes between [[ and ]], matching the
exact transformation astTransform applies on table rows.
* fix: remove stale convertFileLinks docstring referencing position-based replacement
* fix: filter canvas extractBlobLinks to asset extensions only
Canvas file nodes previously included all linked files (including .md
notes). Now filters through ASSET_EXTENSIONS so only images, fonts, and
other binary assets are collected for syncing.
61 lines
1.3 KiB
JSON
61 lines
1.3 KiB
JSON
{
|
|
"nodes": {
|
|
"flake-utils": {
|
|
"inputs": {
|
|
"systems": "systems"
|
|
},
|
|
"locked": {
|
|
"lastModified": 1731533236,
|
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
|
"owner": "numtide",
|
|
"repo": "flake-utils",
|
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
|
"type": "github"
|
|
},
|
|
"original": {
|
|
"owner": "numtide",
|
|
"repo": "flake-utils",
|
|
"type": "github"
|
|
}
|
|
},
|
|
"nixpkgs": {
|
|
"locked": {
|
|
"lastModified": 1774106199,
|
|
"narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=",
|
|
"owner": "NixOS",
|
|
"repo": "nixpkgs",
|
|
"rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655",
|
|
"type": "github"
|
|
},
|
|
"original": {
|
|
"owner": "NixOS",
|
|
"ref": "nixos-unstable",
|
|
"repo": "nixpkgs",
|
|
"type": "github"
|
|
}
|
|
},
|
|
"root": {
|
|
"inputs": {
|
|
"flake-utils": "flake-utils",
|
|
"nixpkgs": "nixpkgs"
|
|
}
|
|
},
|
|
"systems": {
|
|
"locked": {
|
|
"lastModified": 1681028828,
|
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
"owner": "nix-systems",
|
|
"repo": "default",
|
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
"type": "github"
|
|
},
|
|
"original": {
|
|
"owner": "nix-systems",
|
|
"repo": "default",
|
|
"type": "github"
|
|
}
|
|
}
|
|
},
|
|
"root": "root",
|
|
"version": 7
|
|
}
|