Skip to content

fix(market): clean stale temp directories and optimize pnpm config for Windows - #126

Merged
yaojin3616 merged 1 commit into
mainfrom
fix/market-installer-windows-tmp-cleanup
Aug 21, 2026
Merged

yaojin3616 merged 1 commit into
mainfrom
fix/market-installer-windows-tmp-cleanup

Conversation

@yaojin3616

Copy link
Copy Markdown
Contributor

Summary

  • Cleans up stale *_tmp_* directories in profiles/web/node_modules before install/uninstall and during recovery to prevent Windows rename/lock collisions.
  • Automatically clears broken pnpm-lock.yaml on installer failures so subsequent retries can succeed.
  • Generates profiles/web/.npmrc with package-import-method=clone-or-copy and child-concurrency=1.
  • Sets PNPM_CONFIG_CHILD_CONCURRENCY=1 and PNPM_CONFIG_PACKAGE_IMPORT_METHOD=clone-or-copy in both the Harness runtime spawn options and market installer child process environment.

yaojin3616 added a commit that referenced this pull request Aug 21, 2026
yaojin3616 added a commit that referenced this pull request Aug 21, 2026
@yaojin3616
yaojin3616 merged commit 18f9f3b into main Aug 21, 2026
3 of 4 checks passed
@yaojin3616
yaojin3616 deleted the fix/market-installer-windows-tmp-cleanup branch August 21, 2026 06:10
Kunstderfug added a commit to Kunstderfug/dsh-desktop that referenced this pull request Sep 16, 2026
…d escapable

Keep the pnpm side-effects cache DISABLED at both spawn sites: bundled pnpm 10.34.5 keys side-effect entries on ENGINE_NAME (${platform};${arch};node<MAJOR>), which is ABI-blind while pnpm runs under ELECTRON_RUN_AS_NODE against native modules (node-pty conpty failure family, dataelement#183). The disable is a deliberate opt-out introduced in dataelement#126 and preserved through dataelement#204/dataelement#220/dataelement#352 (profile .npmrc seed and generations staging pin), not inheritance.

Both buildHarnessSpawnOptions and buildProfilePluginCommandEnvironment now compute npm_config_side_effects_cache and PNPM_CONFIG_SIDE_EFFECTS_CACHE from one exported helper, pnpmSideEffectsCacheAllowed(): default 'false', overwriting any stray parent-shell npm_config value. DSH_PNPM_SIDE_EFFECTS_CACHE=1 (exact token) opts a diagnostic run back in; the two market-installer disable sites are cross-referenced but untouched so generation installs never see the hatch. Windows note documented: env names are case-preserved, so the hatch must be exported with exact casing.

Table-driven tests pin default-off, stray-parent override, near-miss token rejection, and exact '1' enablement for both builders.
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