chore(release): prepare v1.3.5

This commit is contained in:
Yuri Karamian
2026-08-17 16:50:14 +02:00
parent b253ec4121
commit ade146f9f3
35 changed files with 3973 additions and 3174 deletions
+33
View File
@@ -0,0 +1,33 @@
import assert from 'node:assert/strict';
import test from 'node:test';
const source = await import(new URL('../src/lib/utils/notebook-icons.ts', import.meta.url));
const {
NOTEBOOK_ICON_OPTIONS,
decodeBuiltinNotebookIcon,
encodeBuiltinNotebookIcon,
normalizeNotebookIconKey
} = source;
test('built-in notebook icons have stable unique storage values', () => {
assert.equal(NOTEBOOK_ICON_OPTIONS.length, 16);
assert.equal(new Set(NOTEBOOK_ICON_OPTIONS.map(({ id }) => id)).size, NOTEBOOK_ICON_OPTIONS.length);
for (const { id } of NOTEBOOK_ICON_OPTIONS) {
const stored = encodeBuiltinNotebookIcon(id);
assert.equal(stored, `builtin:${id}`);
assert.equal(decodeBuiltinNotebookIcon(stored), id);
}
});
test('custom paths and unknown built-in values remain outside the icon codec', () => {
assert.equal(decodeBuiltinNotebookIcon('.helixnotes/attachments/notebook-icon.png'), null);
assert.equal(decodeBuiltinNotebookIcon('builtin:unknown'), null);
assert.equal(decodeBuiltinNotebookIcon(null), null);
});
test('normalizes notebook icon keys to portable vault-relative paths', () => {
assert.equal(normalizeNotebookIconKey('Projects/Client'), 'Projects/Client');
assert.equal(normalizeNotebookIconKey(String.raw`Projects\Client`), 'Projects/Client');
});