Skip to content

Commit e5824f5

Browse files
committed
:Fix sdk type updates
1 parent 2504d15 commit e5824f5

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

src/commands/scan/output-diff-scan.mts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ async function handleMarkdown(
122122
logger.log('')
123123
logger.log(`- directDependenciesChanged: ${data.directDependenciesChanged}`)
124124
logger.log(`- Added packages: ${data.artifacts.added.length}`)
125+
125126
if (data.artifacts.added.length > 0) {
126127
data.artifacts.added.slice(0, 10).forEach(artifact => {
127128
logger.log(` - ${artifact.type} ${artifact.name}@${artifact.version}`)
@@ -130,6 +131,7 @@ async function handleMarkdown(
130131
logger.log(` ... and ${data.artifacts.added.length - 10} more`)
131132
}
132133
}
134+
133135
logger.log(`- Removed packages: ${data.artifacts.removed.length}`)
134136
if (data.artifacts.removed.length > 0) {
135137
data.artifacts.removed.slice(0, 10).forEach(artifact => {
@@ -139,6 +141,7 @@ async function handleMarkdown(
139141
logger.log(` ... and ${data.artifacts.removed.length - 10} more`)
140142
}
141143
}
144+
142145
logger.log(`- Replaced packages: ${data.artifacts.replaced.length}`)
143146
if (data.artifacts.replaced.length > 0) {
144147
data.artifacts.replaced.slice(0, 10).forEach(artifact => {
@@ -148,6 +151,7 @@ async function handleMarkdown(
148151
logger.log(` ... and ${data.artifacts.replaced.length - 10} more`)
149152
}
150153
}
154+
151155
logger.log(`- Updated packages: ${data.artifacts.updated.length}`)
152156
if (data.artifacts.updated.length > 0) {
153157
data.artifacts.updated.slice(0, 10).forEach(artifact => {
@@ -157,15 +161,19 @@ async function handleMarkdown(
157161
logger.log(` ... and ${data.artifacts.updated.length - 10} more`)
158162
}
159163
}
160-
logger.log(`- Unchanged packages: ${data.artifacts.unchanged.length}`)
161-
if (data.artifacts.unchanged.length > 0) {
162-
data.artifacts.unchanged.slice(0, 10).forEach(artifact => {
164+
165+
const unchanged = data.artifacts.unchanged ?? []
166+
logger.log(`- Unchanged packages: ${unchanged.length}`)
167+
if (unchanged.length > 0) {
168+
const firstUpToTen = unchanged.slice(0, 10)
169+
for (const artifact of firstUpToTen) {
163170
logger.log(` - ${artifact.type} ${artifact.name}@${artifact.version}`)
164-
})
165-
if (data.artifacts.unchanged.length > 10) {
166-
logger.log(` ... and ${data.artifacts.unchanged.length - 10} more`)
171+
}
172+
if (unchanged.length > 10) {
173+
logger.log(` ... and ${unchanged.length - 10} more`)
167174
}
168175
}
176+
169177
logger.log('')
170178
logger.log(`## Scan ${data.before.id}`)
171179
logger.log('')
@@ -184,6 +192,7 @@ async function handleMarkdown(
184192
logger.groupEnd()
185193
}
186194
}
195+
187196
logger.log('')
188197
logger.log(`## Scan ${data.after.id}`)
189198
logger.log('')
@@ -200,5 +209,6 @@ async function handleMarkdown(
200209
logger.groupEnd()
201210
}
202211
}
212+
203213
logger.log('')
204214
}

0 commit comments

Comments
 (0)