From 0d74b3b8bd76c422091d0768ebed63ea08fdc024 Mon Sep 17 00:00:00 2001 From: Nystik <236107-Nystik@users.noreply.gitlab.com> Date: Mon, 23 Mar 2026 13:04:35 +0100 Subject: [PATCH] shim randomUUID, bump version --- CHANGELOG.md | 24 ++++++++++++++++++++++++ package.json | 2 +- src/shims/crypto/index.js | 2 ++ src/shims/crypto/random-uuid.js | 3 +++ src/shims/loader.js | 11 ++++++++--- 5 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 src/shims/crypto/random-uuid.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 68015c1..597e3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,30 @@ All notable changes to this project will be documented in this file. +## [0.5.0] - (2026-03-22) + +### Added + +- Compression middleware (gzip/brotli) for API responses to reduce bandwidth +- Plugin installation prompt system with per-vault trust flags +- Versioning system with cache-busting query parameters on script URLs +- Option to install ignis-bridge plugin to vaults imported at runtime + +### Changed + +- Auto-creation of default vault now requires `AUTO_CREATE_DEFAULT=true` environment variable +- Script URLs (`ignis-ui.js`, `shim-loader.js`) now include version query params for automatic cache invalidation +- Cache headers: versioned assets cached for 1 year, non-versioned for 5 minutes + +### Fixed + +- Vault manager not displaying when no vaults exist +- `window.close()` now shows vault manager when no vault is configured + +### Removed + +- Unused `VAULT_PATH` environment variable fallback logic + ## [0.4.0] - Basil (2026-03-18) ### Added diff --git a/package.json b/package.json index f14abbb..7184e70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ignis", - "version": "0.4.0", + "version": "0.5.0", "private": true, "description": "An Electron shim and server bridge for running Obsidian in a browser.", "scripts": { diff --git a/src/shims/crypto/index.js b/src/shims/crypto/index.js index 8155c7f..6272a20 100644 --- a/src/shims/crypto/index.js +++ b/src/shims/crypto/index.js @@ -1,9 +1,11 @@ import { randomBytes } from "./random-bytes.js"; import { createHash } from "./create-hash.js"; import { scrypt } from "./scrypt.js"; +import { randomUUID } from "./random-uuid.js"; export const cryptoShim = { randomBytes, createHash, scrypt, + randomUUID, }; diff --git a/src/shims/crypto/random-uuid.js b/src/shims/crypto/random-uuid.js new file mode 100644 index 0000000..665463f --- /dev/null +++ b/src/shims/crypto/random-uuid.js @@ -0,0 +1,3 @@ +export function randomUUID() { + return crypto.randomUUID(); +} diff --git a/src/shims/loader.js b/src/shims/loader.js index b55f7d2..cc52bef 100644 --- a/src/shims/loader.js +++ b/src/shims/loader.js @@ -88,12 +88,17 @@ for (const [name, shim] of Object.entries(rawRegistry)) { const throwOnRequire = new Set(["btime", "get-fonts", "vibrancy-win"]); window.require = function (moduleName) { - if (throwOnRequire.has(moduleName)) { + // Strip node: prefix if present + const normalizedName = moduleName.startsWith("node:") + ? moduleName.slice(5) + : moduleName; + + if (throwOnRequire.has(normalizedName)) { throw new Error(`Cannot find module '${moduleName}'`); } - if (shimRegistry[moduleName]) { - return shimRegistry[moduleName]; + if (shimRegistry[normalizedName]) { + return shimRegistry[normalizedName]; } console.warn("[ignis] Unshimmed require:", moduleName);