Skip to content

Commit e56294e

Browse files
committed
fix: make test suite and packaging work on windows and macos
1 parent 3948e09 commit e56294e

16 files changed

Lines changed: 75 additions & 14 deletions

‎.gitattributes‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Force LF for every text file, in the index and on checkout.
2+
#
3+
# GitHub's Windows runners default to core.autocrlf=true. A CRLF checkout gives
4+
# bin/*.mjs a "#!/usr/bin/env node\r" shebang, which Node's ESM loader rejects
5+
# with "SyntaxError: Invalid or unexpected token" - reproduced locally by
6+
# converting packages/crewcode-plugin-cli/bin/crewcode.mjs to CRLF.
7+
* text=auto eol=lf
8+
9+
# Never line-ending-convert binary assets. build/ icons ship inside the
10+
# packaged app, so a corrupted byte here is a corrupted app icon.
11+
*.png binary
12+
*.ico binary
13+
*.icns binary
14+
*.woff binary
15+
*.woff2 binary
16+
*.ttf binary
17+
*.otf binary
18+
*.7z binary
19+
*.zip binary
20+
*.gz binary
21+
*.tsbuildinfo binary

‎.github/workflows/ci.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,25 @@ on:
77

88
jobs:
99
verify:
10-
runs-on: ubuntu-latest
10+
name: verify (${{ matrix.os }})
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
# Platform-specific failures are the whole point of this matrix, so one
14+
# runner going red must not cancel the others - we want all three reports.
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
1118
steps:
1219
- uses: actions/checkout@v4
1320
- uses: actions/setup-node@v4
1421
with:
1522
node-version: 22
1623
cache: npm
1724
- run: npm ci --legacy-peer-deps
25+
# Several suites transitively import `electron`, and its index.js downloads
26+
# the binary on first require. Parallel vitest workers racing that download
27+
# corrupt the extract on macOS (EEXIST on the Electron Framework symlink),
28+
# so do it once, serially, up front. Idempotent - exits early if present.
29+
- run: npm run install-electron
1830
- run: npm run typecheck
1931
- run: npm test

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ jobs:
4444
- name: Install
4545
run: npm ci --legacy-peer-deps
4646

47+
# Several suites transitively import `electron`, and its index.js downloads
48+
# the binary on first require. Parallel vitest workers racing that download
49+
# corrupt the extract on macOS (EEXIST on the Electron Framework symlink),
50+
# so do it once, serially, up front. Idempotent - exits early if present.
51+
- name: Install Electron binary
52+
run: npm run install-electron
53+
4754
# package.json sets npmRebuild:false, so node-pty is NOT rebuilt for
4855
# Electron's ABI automatically. Without this the packaged app dies on
4956
# first terminal spawn.

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ node_modules/
55
dist/
66
dist-electron/
77
out/
8-
/build/
98
release/
109
native/**/.build/
1110

‎build/icon-dark.png‎

320 KB
Loading

‎build/icon.ico‎

14.7 KB
Binary file not shown.

‎build/icon.png‎

150 KB
Loading

‎build/icons/256x256.png‎

28.4 KB
Loading

‎build/icons/512x512.png‎

87.1 KB
Loading

‎build/logo-256.png‎

28.4 KB
Loading

0 commit comments

Comments
 (0)