fix: ship compiled dist/ instead of TypeScript source#16
Open
kostyun wants to merge 1 commit intogustavodiasdev:mainfrom
Open
fix: ship compiled dist/ instead of TypeScript source#16kostyun wants to merge 1 commit intogustavodiasdev:mainfrom
kostyun wants to merge 1 commit intogustavodiasdev:mainfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The published npm package (
opencode-qwencode-auth@1.3.0) contains only TypeScript source files (.ts), but OpenCode's ESM plugin loader resolves imports with.jsextensions. This causes the plugin to fail loading with:Changes
module: Changed fromindex.tstodist/index.js(compiled output)scripts.prepublishOnly: Addedbun run buildto auto-builddist/before everynpm publishfiles: Updated to shipdist/+ README.md instead of raw TypeScript sourceVerification
bun run buildproducesdist/index.jsanddist/cli.jsnpm packincludesdist/in tarballopencode auth loginshows "Qwen Code" providerRelated Issues