Skip to content

Fix to Corrupt: TEXT value in notes.sfld.#62

Open
AldoMX wants to merge 2 commits intorepeat-space:masterfrom
AldoMX:master
Open

Fix to Corrupt: TEXT value in notes.sfld.#62
AldoMX wants to merge 2 commits intorepeat-space:masterfrom
AldoMX:master

Conversation

@AldoMX
Copy link

@AldoMX AldoMX commented Dec 7, 2024

I noticed that a fix was proposed in #31, but the PR was breaking the API and the PR author never addressed the API breakage.

So this is a PR that builds on top of the proposed solution, without any API breakage.

This PR contains the following fixes:

  1. Update dev dependencies that break the build under Node 22: ava & sqlite3
  2. Add multiple fields in createTemplate & exporter.addCard (feature proposed on Support more than two fields and custom sort field, get rid of extra object in save options merging #31)
  3. Update exporter to address the Corrupt: TEXT value in notes.sfld error, and update tests

NOTE: yarn.lock adds too much noise, the PR is actually smaller.

Comment on lines +92 to +97
} else if (typeof sortField === 'string') {
const index = fields.indexOf(sortField);
if (index !== -1) {
intSortField = index;
}
}
Copy link
Author

@AldoMX AldoMX Dec 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The else if (typeof sortField === 'string') {} branch was added to preserve the behavior from #31, I can remove it if requested.

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.

1 participant