From ff6be2c12e918409f36aed200115c34b4055c2c7 Mon Sep 17 00:00:00 2001 From: Emmanuel Almonte <35371633+EmmanuelAlmonte@users.noreply.github.com> Date: Tue, 24 Feb 2026 22:54:00 -0500 Subject: [PATCH 1/2] fix(cache-nostr): include dist files in npm package Add a "files" allowlist to cache-nostr/package.json so published npm tarballs include the dist artifacts referenced by main/module/exports. Why: - @nostr-dev-kit/cache-nostr@0.1.66 from npm fails to import/require because dist/index.js and dist/index.mjs are missing. Validation: - npm pack --dry-run includes dist/index.js and dist/index.mjs - isolated import/require checks pass with local tarball - manual NDK + cache-nostr functional app test passes (publish + 2 fetches) Fixes #256 --- cache-nostr/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cache-nostr/package.json b/cache-nostr/package.json index e5bb27df7..d04add9fa 100644 --- a/cache-nostr/package.json +++ b/cache-nostr/package.json @@ -4,6 +4,9 @@ "description": "NDK cache adapter that uses a local nostr relay.", "main": "./dist/index.js", "module": "./dist/index.mjs", + "files": [ + "dist" + ], "exports": { "import": { "types": "./dist/index.d.mts", From 02e78dbb6be3581c79e528912867005ee972c446 Mon Sep 17 00:00:00 2001 From: Emmanuel Almonte <35371633+EmmanuelAlmonte@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:10:42 -0400 Subject: [PATCH 2/2] fix(cache-nostr): build dist before publish --- cache-nostr/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/cache-nostr/package.json b/cache-nostr/package.json index d04add9fa..b988b0e09 100644 --- a/cache-nostr/package.json +++ b/cache-nostr/package.json @@ -20,6 +20,7 @@ "scripts": { "dev": "bun run build --watch", "build": "tsup src/index.ts --format cjs,esm --dts", + "prepublishOnly": "bun run build", "clean": "rm -rf dist", "lint": "prettier --check . && eslint .", "format": "prettier --write ."