@take-out/scripts 0.0.32 → 0.0.33

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.0.32",
3
+ "version": "0.0.33",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "sideEffects": false,
@@ -16,15 +16,15 @@
16
16
  }
17
17
  },
18
18
  "scripts": {
19
- "lint": "biome check src",
20
- "lint:fix": "biome check --write src",
19
+ "lint": "oxlint src",
20
+ "lint:fix": "oxfmt src && oxlint --fix --fix-suggestions src",
21
21
  "typecheck": "tko run typecheck"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@take-out/helpers": "0.0.32"
27
+ "@take-out/helpers": "0.0.33"
28
28
  },
29
29
  "devDependencies": {
30
30
  "vxrn": "*"
package/src/bootstrap.ts CHANGED
@@ -25,6 +25,7 @@ import {
25
25
  unlinkSync,
26
26
  } from 'node:fs'
27
27
  import { join } from 'node:path'
28
+
28
29
  import { getZeroVersion } from '@take-out/scripts/helpers/zero-get-version'
29
30
 
30
31
  const ENV_PATH = join(process.cwd(), '.env')
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env bun
2
2
 
3
+ import { basename } from 'node:path'
4
+
3
5
  import { $ } from 'bun'
4
6
  import { globSync } from 'glob'
5
- import { basename } from 'node:path'
6
7
 
7
8
  const projectRoot = process.cwd()
8
9
 
@@ -60,6 +61,21 @@ try {
60
61
  // parse the output to check for cycles
61
62
  const output = error.stderr?.toString() || error.stdout?.toString() || ''
62
63
 
64
+ // check if this is a tool crash (assertion error) rather than actual cycle detection
65
+ if (output.includes('Assertion failed') || output.includes('at panic')) {
66
+ const nodeVersion = process.versions.node
67
+ const majorVersion = parseInt(nodeVersion.split('.')[0] || '0', 10)
68
+ if (majorVersion >= 24) {
69
+ console.warn(`⚠️ @glideapps/ts-helper crashes on Node.js ${nodeVersion}`)
70
+ console.warn(' skipping locally - CI uses Node 20 where this check runs properly')
71
+ process.exit(0)
72
+ }
73
+ // unknown crash on older node, fail
74
+ console.error(output)
75
+ console.error('❌ Circular dependency check crashed unexpectedly')
76
+ process.exit(1)
77
+ }
78
+
63
79
  // parse cycle arrays from output
64
80
  const cycleRegex = /\[([^\]]+)\]/g
65
81
  const cycles: string[][] = []
package/src/dev-tunnel.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'
4
4
  import { homedir } from 'node:os'
5
5
  import { join } from 'node:path'
6
+
6
7
  import { handleProcessExit } from './helpers/handleProcessExit'
7
8
  import { run } from './helpers/run'
8
9
 
package/src/env-pull.ts CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { existsSync, writeFileSync } from 'node:fs'
4
4
  import { join } from 'node:path'
5
+
5
6
  import { getEnvironment } from './sst-get-environment'
6
7
 
7
8
  const rootDir = process.cwd()
@@ -1,4 +1,5 @@
1
1
  import { join } from 'node:path'
2
+
2
3
  import { loadEnv as vxrnLoadEnv } from 'vxrn/loadEnv'
3
4
 
4
5
  export async function loadEnv(
@@ -1,4 +1,5 @@
1
1
  import { join } from 'node:path'
2
+
2
3
  import { loadEnv } from './env-load'
3
4
  import { getDockerHost } from './get-docker-host'
4
5
  import { getZeroVersion } from './zero-get-version'
@@ -1,5 +1,5 @@
1
- import type { ChildProcess } from 'node:child_process'
2
1
  import { spawn } from 'node:child_process'
2
+
3
3
  import {
4
4
  addProcessHandler,
5
5
  setExitCleanupState,
@@ -7,6 +7,8 @@ import {
7
7
  type ProcessType,
8
8
  } from './run'
9
9
 
10
+ import type { ChildProcess } from 'node:child_process'
11
+
10
12
  type ExitCallback = (info: { signal: NodeJS.Signals | string }) => void | Promise<void>
11
13
 
12
14
  interface HandleProcessExitReturn {
@@ -1,6 +1,7 @@
1
- import type { ChildProcess } from 'node:child_process'
2
1
  import { cpus } from 'node:os'
2
+
3
3
  import type { Timer } from '@take-out/helpers'
4
+ import type { ChildProcess } from 'node:child_process'
4
5
 
5
6
  export type ProcessType = ChildProcess | Bun.Subprocess
6
7
  export type ProcessHandler = (process: ProcessType) => void
@@ -92,7 +93,7 @@ export async function run(
92
93
 
93
94
  try {
94
95
  const shell = Bun.spawn(['bash', '-c', command], {
95
- env: { ...process.env, ...(env || {}) },
96
+ env: { ...process.env, ...env },
96
97
  cwd,
97
98
  stdout: 'pipe',
98
99
  stderr: 'pipe', // always pipe stderr so we can capture it for error messages
package/src/release.ts CHANGED
@@ -1,9 +1,10 @@
1
+ import path, { join } from 'node:path'
2
+
1
3
  // note! this is an helper script used by tamagui team for publishing the takeout packages
2
4
  // you can delete this from your own app
3
5
 
4
6
  import { run } from '@take-out/scripts/helpers/run'
5
7
  import fs, { ensureDir, writeJSON } from 'fs-extra'
6
- import path, { join } from 'node:path'
7
8
  import pMap from 'p-map'
8
9
 
9
10
  // avoid emitter error
package/src/run.ts CHANGED
@@ -4,10 +4,12 @@
4
4
  * @description Run multiple scripts in parallel or sequence
5
5
  */
6
6
 
7
- import { handleProcessExit } from '@take-out/scripts/helpers/handleProcessExit'
8
7
  import { spawn } from 'node:child_process'
9
8
  import { promises as fs } from 'node:fs'
10
9
  import { join, relative, resolve } from 'node:path'
10
+
11
+ import { handleProcessExit } from '@take-out/scripts/helpers/handleProcessExit'
12
+
11
13
  import { getIsExiting } from './helpers/run'
12
14
  import { checkNodeVersion } from './node-version-check'
13
15
 
@@ -4,10 +4,11 @@
4
4
  * @description Update dependencies across workspace packages
5
5
  */
6
6
 
7
- import { $ } from 'bun'
8
7
  import { existsSync, readdirSync, readFileSync, rmSync } from 'node:fs'
9
8
  import { join } from 'node:path'
10
9
 
10
+ import { $ } from 'bun'
11
+
11
12
  let globalTag: string | undefined
12
13
  const packagePatterns: string[] = []
13
14