mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-27 03:51:21 -04:00
fix(sdk): identify workspace dependencies by version specifier (#45309)
This commit is contained in:
@@ -38,9 +38,9 @@ try {
|
||||
const archive = join(temporary, `${name}.tgz`)
|
||||
|
||||
if (pkg.dependencies) {
|
||||
const unpacked = Object.keys(pkg.dependencies).filter(
|
||||
(dependency) => dependency.startsWith("@opencode-ai/") && !archives.has(dependency),
|
||||
)
|
||||
const unpacked = Object.entries(pkg.dependencies)
|
||||
.filter(([dependency, version]) => version.startsWith("workspace:") && !archives.has(dependency))
|
||||
.map(([dependency]) => dependency)
|
||||
if (unpacked.length > 0)
|
||||
throw new Error(`${pkg.name} has unpacked workspace dependencies: ${unpacked.join(", ")}`)
|
||||
pkg.dependencies = Object.fromEntries(
|
||||
|
||||
Reference in New Issue
Block a user