From 1ee443c47861bcf69ab8d05d6f2dd1538d6ce81b Mon Sep 17 00:00:00 2001 From: Konstantin Tyutyunnik Date: Wed, 29 Apr 2026 22:36:04 +0000 Subject: [PATCH] fix: ship compiled dist/ instead of TypeScript source The npm package was shipping raw TypeScript source files (.ts), but OpenCode's ESM plugin loader resolves imports with .js extensions. This caused ENOENT errors and complete plugin failure. Changes: - module: points to dist/index.js (compiled output) - prepublishOnly: auto-builds dist/ before npm publish - files: ships dist/ + README.md instead of raw TypeScript source --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5739b2b..2474fb9 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,12 @@ "name": "opencode-qwencode-auth", "version": "1.3.0", "description": "Qwen OAuth authentication plugin for OpenCode - Access Qwen AI models (Coder, Vision) with your qwen.ai account", - "module": "index.ts", + "module": "dist/index.js", "type": "module", "scripts": { "build": "bun build ./src/index.ts --outdir ./dist --target node --format esm && bun build ./src/cli.ts --outdir ./dist --target node --format esm", "dev": "bun run --watch src/index.ts", + "prepublishOnly": "bun run build", "typecheck": "tsc --noEmit" }, "keywords": [ @@ -39,8 +40,7 @@ "typescript": "^5.6.0" }, "files": [ - "index.ts", - "src", + "dist", "README.md" ], "engines": {