Skip to content

Commit caa28a2

Browse files
committed
chore(scripts): improve and fix update script
- Add -w flag to taze by default to write changes automatically - Simplify conditional logic by checking !quiet first - Remove trailing period from comment for consistency - Fix Socket package updates to run regardless of taze result - Previously required taze to succeed (exit code 0) before updating Socket packages - This caused Socket packages to be skipped when taze found no updates due to maturity period - Socket-controlled packages (@socketsecurity/*, @socketregistry/*) should bypass maturity period
1 parent 77a3d8f commit caa28a2

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

scripts/update.mjs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,13 @@ async function main() {
3131
logger.log('\n🔨 Monorepo Dependency Update\n')
3232
}
3333

34-
// Build taze command with appropriate flags for monorepo.
35-
const tazeArgs = ['exec', 'taze', '-r']
34+
// Build taze command with appropriate flags for monorepo
35+
const tazeArgs = ['exec', 'taze', '-r', '-w']
3636

37-
if (apply) {
38-
tazeArgs.push('-w')
39-
if (!quiet) {
37+
if (!quiet) {
38+
if (apply) {
4039
logger.progress('Updating dependencies across monorepo...')
41-
}
42-
} else {
43-
if (!quiet) {
40+
} else {
4441
logger.progress('Checking for updates across monorepo...')
4542
}
4643
}
@@ -56,8 +53,8 @@ async function main() {
5653
process.stdout.write('\r\x1b[K')
5754
}
5855

59-
// If applying updates, also update Socket packages.
60-
if (apply && result.code === 0) {
56+
// Always update Socket packages when applying (bypass taze maturity period).
57+
if (apply) {
6158
if (!quiet) {
6259
logger.progress('Updating Socket packages...')
6360
}

0 commit comments

Comments
 (0)