@take-out/scripts 0.1.34 → 0.1.35-1772258140754

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@take-out/scripts",
3
- "version": "0.1.34",
3
+ "version": "0.1.35-1772258140754",
4
4
  "type": "module",
5
5
  "main": "./src/run.ts",
6
6
  "sideEffects": false,
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@clack/prompts": "^0.8.2",
32
32
  "@lydell/node-pty": "^1.2.0-beta.3",
33
- "@take-out/helpers": "0.1.34",
33
+ "@take-out/helpers": "0.1.35-1772258140754",
34
34
  "picocolors": "^1.1.1"
35
35
  },
36
36
  "peerDependencies": {
package/src/release.ts CHANGED
@@ -12,7 +12,8 @@ await cmd`publish takeout packages to npm`
12
12
  `--patch boolean --minor boolean --major boolean --canary boolean
13
13
  --rerun boolean --republish boolean --finish boolean --skip-finish boolean
14
14
  --dry-run boolean --skip-test boolean --skip-build boolean --skip-version boolean
15
- --dirty boolean --tamagui-git-user boolean --sync-on-zero boolean --skip-on-zero-sync boolean`
15
+ --dirty boolean --tamagui-git-user boolean --sync-on-zero boolean --skip-on-zero-sync boolean
16
+ --undocumented boolean --skip-all boolean`
16
17
  )
17
18
  .run(async ({ args, $, run, path, os }) => {
18
19
  const fs = (await import('fs-extra')).default
@@ -27,17 +28,19 @@ await cmd`publish takeout packages to npm`
27
28
  const reRun = args.rerun
28
29
  const rePublish = reRun || args.republish
29
30
  const finish = args.finish
30
- const skipFinish = args.skipFinish
31
+ const skipAll = args.skipAll
32
+ const undocumented = args.undocumented
33
+ const skipFinish = args.skipFinish || skipAll || undocumented
31
34
 
32
35
  const canary = args.canary
33
36
  const skipVersion = finish || rePublish || args.skipVersion
34
37
  const shouldMajor = args.major
35
38
  const shouldMinor = args.minor
36
39
  const shouldPatch = args.patch
37
- const dirty = finish || args.dirty
40
+ const dirty = finish || undocumented || args.dirty
38
41
  const skipTest =
39
- finish || rePublish || args.skipTest || process.argv.includes('--skip-tests')
40
- const skipBuild = finish || rePublish || args.skipBuild
42
+ finish || rePublish || skipAll || args.skipTest || process.argv.includes('--skip-tests')
43
+ const skipBuild = finish || rePublish || skipAll || args.skipBuild
41
44
  const dryRun = args.dryRun
42
45
  const tamaguiGitUser = args.tamaguiGitUser
43
46
  const syncOnZeroOnly = args.syncOnZero
@@ -231,7 +234,7 @@ await cmd`publish takeout packages to npm`
231
234
  const curVersion = fs.readJSONSync('./packages/helpers/package.json').version
232
235
 
233
236
  // must specify version (unless republishing):
234
- if (!rePublish && !skipVersion && !shouldPatch && !shouldMinor && !shouldMajor) {
237
+ if (!rePublish && !skipVersion && !canary && !shouldPatch && !shouldMinor && !shouldMajor) {
235
238
  console.error(`Must specify one of --patch, --minor, or --major`)
236
239
  process.exit(1)
237
240
  }
@@ -458,6 +461,13 @@ await cmd`publish takeout packages to npm`
458
461
  await run(`git checkout -- packages/*/package.json`, { silent: true })
459
462
  console.info('Reverted version changes\n')
460
463
  }
464
+
465
+ // restore package.json files for undocumented releases (no git history)
466
+ if (undocumented) {
467
+ console.info('restoring package.json files...')
468
+ await run(`git checkout -- packages/*/package.json`, { silent: true })
469
+ console.info(`✅ restored package.json files (undocumented release)\n`)
470
+ }
461
471
  }
462
472
 
463
473
  if (!skipFinish && !dryRun) {
package/src/run.ts CHANGED
@@ -235,6 +235,7 @@ const runScript = async (
235
235
  const proc = spawn('bun', runArgs, {
236
236
  stdio: ['ignore', 'pipe', 'pipe'],
237
237
  shell: false,
238
+ detached: true,
238
239
  env: {
239
240
  ...process.env,
240
241
  FORCE_COLOR: '3',