Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"src/pwa/icons/",
"README.md",
"CHANGELOG.md",
"LICENSE"
"LICENSE",
"scripts/postinstall.mjs"
],
"publishConfig": {
"provenance": true
Expand Down Expand Up @@ -55,7 +56,8 @@
"test:pw:chromium": "playwright test --project=chromium-android",
"test:pw:webkit": "playwright test --project=webkit-iphone",
"release": "semantic-release",
"prepublishOnly": "pnpm run lint:ox && pnpm run lint:knip && pnpm run build:dist && pnpm run lint:publint"
"prepublishOnly": "pnpm run lint:ox && pnpm run lint:knip && pnpm run build:dist && pnpm run lint:publint",
"postinstall": "node scripts/postinstall.mjs"
},
"devDependencies": {
"@biomejs/biome": "^1.9.0",
Expand Down
17 changes: 17 additions & 0 deletions scripts/postinstall.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Workaround for microsoft/node-pty#850 — spawn-helper prebuild ships without
// execute permission on macOS, causing "posix_spawnp failed" at runtime.
// Remove this script once node-pty >=1.2.0 stable is released and we upgrade.
import { chmodSync, existsSync } from 'node:fs'
import { createRequire } from 'node:module'
import { dirname, join } from 'node:path'

const require = createRequire(import.meta.url)
try {
const ptyDir = dirname(require.resolve('node-pty/package.json'))
for (const arch of ['darwin-arm64', 'darwin-x64']) {
const helper = join(ptyDir, 'prebuilds', arch, 'spawn-helper')
if (existsSync(helper)) chmodSync(helper, 0o755)
}
} catch {
// node-pty not found, skip
}
Loading