@take-out/scripts 0.0.61 → 0.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/up.ts +10 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@take-out/scripts",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "type": "module",
5
5
  "main": "./src/run.ts",
6
6
  "sideEffects": false,
@@ -28,9 +28,9 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@take-out/helpers": "0.0.61"
31
+ "@take-out/helpers": "0.0.62"
32
32
  },
33
33
  "devDependencies": {
34
- "vxrn": "*1.4.7"
34
+ "vxrn": "*1.4.8"
35
35
  }
36
36
  }
package/src/up.ts CHANGED
@@ -302,22 +302,22 @@ async function updatePackages(
302
302
  await $`bun install`
303
303
  console.info('✅ Done!')
304
304
  } catch (error: any) {
305
- const errorMessage = error.message?.split('\n')[0] || ''
305
+ const stderr = error.stderr?.toString() || error.message || ''
306
306
  // check if it's a version resolution error (common after new publish)
307
- if (
308
- errorMessage.includes('No version matching') ||
309
- errorMessage.includes('failed to resolve')
310
- ) {
311
- console.info(`⚠️ Version not in cache, retrying with --force...`)
307
+ if (stderr.includes('No version matching') || stderr.includes('failed to resolve')) {
308
+ console.info(`⚠️ Version not in cache, clearing cache and retrying...`)
312
309
  try {
313
- await $`bun install --force`
310
+ await $`bun pm cache rm`.quiet()
311
+ await $`bun install`
314
312
  console.info('✅ Done!')
315
313
  } catch (retryError: any) {
316
- const retryMessage = retryError.message?.split('\n')[0]
317
- console.error(`🚨 'bun install --force' failed: ${retryMessage}`)
314
+ const retryStderr = retryError.stderr?.toString() || retryError.message || ''
315
+ console.error(
316
+ `🚨 'bun install' failed after cache clear: ${retryStderr.split('\n')[0]}`
317
+ )
318
318
  }
319
319
  } else {
320
- console.error(`🚨 'bun install' failed: ${errorMessage}`)
320
+ console.error(`🚨 'bun install' failed: ${stderr.split('\n')[0]}`)
321
321
  }
322
322
  }
323
323
  }