Skip to content

Commit 684abed

Browse files
authored
fix(deps): always update Socket packages in update script (#476)
The update script was only updating @socketsecurity/* packages when --apply flag was passed. This meant newly released Socket packages within taze's 7-day maturity period were being skipped during regular updates. Now Socket packages are always updated to bypass the maturity period, ensuring teams get the latest Socket packages immediately.
1 parent bdb5cc2 commit 684abed

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

scripts/update.mjs

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -49,40 +49,38 @@ async function main() {
4949
process.stdout.write('\r\x1b[K')
5050
}
5151

52-
// Always update Socket packages when applying (bypass taze maturity period).
53-
if (apply) {
54-
if (!quiet) {
55-
logger.progress('Updating Socket packages...')
56-
}
52+
// Always update Socket packages (bypass taze maturity period).
53+
if (!quiet) {
54+
logger.progress('Updating Socket packages...')
55+
}
5756

58-
const socketResult = await spawn(
59-
'pnpm',
60-
[
61-
'update',
62-
'@socketsecurity/*',
63-
'@socketregistry/*',
64-
'@socketbin/*',
65-
'--latest',
66-
'-r',
67-
],
68-
{
69-
shell: WIN32,
70-
stdio: quiet ? 'pipe' : 'inherit',
71-
},
72-
)
57+
const socketResult = await spawn(
58+
'pnpm',
59+
[
60+
'update',
61+
'@socketsecurity/*',
62+
'@socketregistry/*',
63+
'@socketbin/*',
64+
'--latest',
65+
'-r',
66+
],
67+
{
68+
shell: WIN32,
69+
stdio: quiet ? 'pipe' : 'inherit',
70+
},
71+
)
7372

74-
// Clear progress line.
75-
if (!quiet) {
76-
process.stdout.write('\r\x1b[K')
77-
}
73+
// Clear progress line.
74+
if (!quiet) {
75+
process.stdout.write('\r\x1b[K')
76+
}
7877

79-
if (socketResult.code !== 0) {
80-
if (!quiet) {
81-
logger.fail('Failed to update Socket packages')
82-
}
83-
process.exitCode = 1
84-
return
78+
if (socketResult.code !== 0) {
79+
if (!quiet) {
80+
logger.fail('Failed to update Socket packages')
8581
}
82+
process.exitCode = 1
83+
return
8684
}
8785

8886
if (result.code !== 0) {

0 commit comments

Comments
 (0)