Skip to content

fix(validation): restore npm ci for esbuild platform packages#569

Closed
JustYannicc wants to merge 72 commits into
SuperCmdLabs:mainfrom
JustYannicc:codex/fix-validation-esbuild-platform-install
Closed

fix(validation): restore npm ci for esbuild platform packages#569
JustYannicc wants to merge 72 commits into
SuperCmdLabs:mainfrom
JustYannicc:codex/fix-validation-esbuild-platform-install

Conversation

@JustYannicc

@JustYannicc JustYannicc commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Removed hard direct macOS esbuild platform packages from package.json in the existing PR work.
  • Kept the Project Checks install step on npm ci --ignore-scripts without --force.
  • Moved electron-liquid-glass from dependencies to optionalDependencies and synced package-lock.json so npm treats the Darwin-only runtime package as optional on unsupported platforms.
  • Added scripts/ensure-macos-runtime-deps.mjs to the normal postinstall path so macOS installs still fail if the required runtime package cannot be loaded.

Why

Direct dependencies with os or cpu restrictions are hard install requirements in npm. After the esbuild direct deps were fixed, Ubuntu Project Checks still failed because electron-liquid-glass@1.1.1 declares os: ["darwin"] while being listed as a hard root dependency. Making it an optional dependency is the npm-correct platform contract for this macOS-only runtime package, and the Darwin postinstall guard keeps real macOS install errors visible.

Compatibility impact

No runtime behavior change is intended. SuperCmd already gates electron-liquid-glass loading behind process.platform === "darwin" and uses the existing fallback path if runtime calls fail. Linux installs can now skip the Darwin-only package, while normal macOS installs still install and load-check it before native app dependency rebuilds. The existing asarUnpack entry for node_modules/electron-liquid-glass/** is unchanged.

How tested

  • Before: PR fix(validation): restore npm ci for esbuild platform packages #569 Project Checks run 28699040467, job 85113818669, failed on Ubuntu with Node 22.23.1 and npm 10.9.8 at npm ci --ignore-scripts: EBADPLATFORM Unsupported platform for electron-liquid-glass@1.1.1: wanted {"os":"darwin"} (current: {"os":"linux"}).
  • Local true-Linux Docker reproduction was not practical because the Docker daemon socket was unavailable: connect: no such file or directory.
  • env PATH=/opt/homebrew/opt/node@22/bin:$PATH ELECTRON_SKIP_BINARY_DOWNLOAD=1 SUPERCMD_SKIP_ELECTRON_TESTS=1 CI=true /opt/homebrew/opt/node@22/bin/npm ci --ignore-scripts passed in 5.1s without --force.
  • env PATH=/opt/homebrew/opt/node@22/bin:$PATH SUPERCMD_SKIP_ELECTRON_TESTS=1 /opt/homebrew/opt/node@22/bin/npm ci passed in 10.3s and ran ensure-macos-runtime-deps, ensure-cross-arch-esbuild, and electron-builder install-app-deps.
  • env PATH=/opt/homebrew/opt/node@22/bin:$PATH ELECTRON_SKIP_BINARY_DOWNLOAD=1 SUPERCMD_SKIP_ELECTRON_TESTS=1 CI=true /opt/homebrew/opt/node@22/bin/npm ci --ignore-scripts --omit=optional passed in 4.8s.
  • env PATH=/opt/homebrew/opt/node@22/bin:$PATH node_modules/.bin/tsc -p tsconfig.main.json --noEmit passed in 1.6s.
  • env PATH=/opt/homebrew/opt/node@22/bin:$PATH node_modules/.bin/tsc -p tsconfig.renderer.json --noEmit passed in 4.1s.
  • env PATH=/opt/homebrew/opt/node@22/bin:$PATH CI=true SUPERCMD_SKIP_ELECTRON_TESTS=1 node --test 'scripts/test-*.mjs' passed in 28.4s: 236 tests, 235 pass, 1 skip, 0 fail.
  • env PATH=/opt/homebrew/opt/node@22/bin:$PATH npm run build:renderer passed in 5.0s.
  • env PATH=/opt/homebrew/opt/node@22/bin:$PATH npm run check:i18n passed in 0.24s.

Performance evidence

Install now reaches the real script-enabled macOS setup path in 10.3s, including the new runtime dependency guard and existing native dependency rebuild. Renderer production build completed in 4.97s. The dependency metadata change only affects install resolution for unsupported platforms and does not add a runtime code path.

Stack validation

  • Direct hard platform dependency scan over root dependencies and devDependencies returned [] after the fix.
  • package-lock.json root metadata is synced to package.json version 1.0.26; electron-liquid-glass and its transitive lock entries are marked optional.
  • pnpm-lock.yaml was not generated.
  • git diff --check passed.
  • Codex LSP status: TypeScript language server installed. LSP diagnostics for scripts/ensure-macos-runtime-deps.mjs reported no errors. Package JSON diagnostics are limited because the configured Biome LSP is not installed locally.

Replaces

Replaces the remaining hard direct macOS platform dependency and the need for install-force workarounds in validation setup.

…ated-integration-stack

# Conflicts:
#	src/renderer/src/raycast-api/hooks/use-cached-promise.ts
…ated-integration-stack

# Conflicts:
#	src/renderer/src/raycast-api/list-runtime-renderers.tsx
#	src/renderer/src/raycast-api/list-runtime.tsx
…ated-integration-stack

# Conflicts:
#	src/renderer/src/CameraExtension.tsx
…ated-integration-stack

# Conflicts:
#	src/renderer/src/raycast-api/list-runtime.tsx
… into codex/perf-consolidated-integration-stack
@JustYannicc
JustYannicc marked this pull request as ready for review July 4, 2026 10:50
@JustYannicc

Copy link
Copy Markdown
Collaborator Author

Superseded by the consolidated validation PR: #578

@JustYannicc JustYannicc closed this Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant