Skip to content

Commit 93a6957

Browse files
committed
fix: Add optional chaining to workspace checking
1 parent 2d6abfc commit 93a6957

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/kind-garlics-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"secco": patch
3+
---
4+
5+
Add optional chaining check when checking for workspace packages

src/utils/check-deps-changes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export async function checkDepsChanges(args: CheckDependencyChangesArgs) {
134134
continue
135135
}
136136

137-
if (sourcePkgJson.dependencies[key].startsWith('workspace:') || sourcePkgJson.dependencies[key]?.startsWith('catalog:')) {
137+
if (sourcePkgJson.dependencies[key]?.startsWith('workspace:') || sourcePkgJson.dependencies[key]?.startsWith('catalog:')) {
138138
// If the source is using pnpm workspaces with workspace or catalog protocols, the dependencies were adjusted in the "adjustPackageJson" function. The change from specific versions back to "workspace:" or "catalog:" should be ignored here
139139

140140
// The check is also necessary because otherwise after a "--force-verdaccio" it tries to publish the packages again

0 commit comments

Comments
 (0)