Skip to content

Support .mark file signatures (rebase of #8) - #30

Merged
philips merged 1 commit into
mainfrom
worktree-pr8-rebase
Jul 27, 2026
Merged

Support .mark file signatures (rebase of #8)#30
philips merged 1 commit into
mainfrom
worktree-pr8-rebase

Conversation

@philips-clanker

Copy link
Copy Markdown
Collaborator

Rebases #8 by @Tboules onto current main, which has diverged significantly since the PR was opened (typescript/eslint/vitest toolchain upgrades, color v5, worker-parallel PDF rendering, etc).

What's kept

  • src/parsing.ts: _parseSignature now accepts markSN_FILE_VER_... in addition to noteSN_FILE_VER_..., so digest exports (.mark files) parse correctly.
  • tests/input/digest_test.mark + a digest_image test in tests/main.test.ts exercising toImage() on a real digest-export .mark file, matching current test file conventions.

What's dropped from #8

The original PR's diff was mostly incidental churn against a much older main, all of which is now stale or superseded:

  • Reformatting of unrelated code (different tab/prettier settings than the repo currently uses).
  • tsconfig.json target bump (es2016es2018) — main is already on es2022.
  • package.json @types/color version bump — main no longer depends on @types/color at all (uses color's own ColorInstance type since v5).
  • defaultPalette.background changed from Color('transparent') to Color('white') — an unrelated behavior change to default rendering that main did not adopt; left as transparent to avoid a silent rendering regression.

Verified: npm run build, npm run lint, and npx vitest run all pass (23/23 tests), including the new digest_image test against the real .mark fixture.

Closes/supersedes #8.

@philips
philips marked this pull request as ready for review July 27, 2026 01:47
Supernote digest exports use a "markSN_FILE_VER_" signature instead
of "noteSN_FILE_VER_". Accept both so SupernoteX can parse .mark
files exported from digest backups.

Rebased from #8 (Tboules): carries forward the signature-parsing fix
and the digest_test.mark fixture/test, dropped the incidental
formatting, tsconfig, and dependency-version churn that had gone
stale against current main.
@philips
philips merged commit 5723b5c into main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants