Build Issue: workspace:* Dependencies in Published Dist
Severity: High (build artifact)
Component: Package publishing (dist/package.json)
Description
The published dist/package.json contains workspace:* protocol dependencies:
"dependencies": {
"@opencode-ai/plugin": "workspace:*",
"@opencode-ai/sdk": "workspace:*"
}
The workspace:* protocol is a monorepo workspace resolution mechanism, not a valid npm registry specifier. Published packages should contain resolved, pinned version numbers.
Evidence
Found in the npm cache at:
~/.cache/opencode/packages/@whisperopencode/push@latest/node_modules/@whisperopencode/push/dist/package.json
Note: The npm registry version (package.json at root of package) has pinned versions ("@opencode-ai/plugin": "1.2.21", "@opencode-ai/sdk": "1.2.21"). The workspace:* issue appears in the dist/ subdirectory's nested package.json.
Impact
- npm will fail to resolve
workspace:* if someone installs from source
- The dist folder may not be self-contained for installation
- If
workspace:* is interpreted literally, it could resolve to an unintended version
Root Cause
This likely occurs when the build process copies a workspace-inherited package.json into dist/ without transforming workspace protocols to registry versions.
Recommendation
- Ensure the build process transforms
workspace:* references to explicit versions before publishing
- Add a CI check that validates
dist/package.json contains no workspace protocols
- Consider excluding
dist/package.json from published artifacts entirely
References
- File:
dist/package.json (inside npm package)
- Build configuration should resolve workspace deps before publishing
Build Issue: workspace:* Dependencies in Published Dist
Severity: High (build artifact)
Component: Package publishing (
dist/package.json)Description
The published
dist/package.jsoncontainsworkspace:*protocol dependencies:The
workspace:*protocol is a monorepo workspace resolution mechanism, not a valid npm registry specifier. Published packages should contain resolved, pinned version numbers.Evidence
Found in the npm cache at:
Note: The npm registry version (
package.jsonat root of package) has pinned versions ("@opencode-ai/plugin": "1.2.21","@opencode-ai/sdk": "1.2.21"). Theworkspace:*issue appears in thedist/subdirectory's nestedpackage.json.Impact
workspace:*if someone installs from sourceworkspace:*is interpreted literally, it could resolve to an unintended versionRoot Cause
This likely occurs when the build process copies a workspace-inherited
package.jsonintodist/without transforming workspace protocols to registry versions.Recommendation
workspace:*references to explicit versions before publishingdist/package.jsoncontains no workspace protocolsdist/package.jsonfrom published artifacts entirelyReferences
dist/package.json(inside npm package)