Repository navigation
fix: make Windows unit and integration test suites pass under test:pr - #342
Conversation
- Spawn TypeScript 7 tsgo from dirname(root) during the initial updateSnapshot in withNativeCompiler while keeping --cwd set to root, so Windows does not lock root while tsgo closes its stdio pipe after api.close(). - Configure GIT_CEILING_DIRECTORIES, TERM=xterm-256color, and Git for Windows bin PATH in packages/intent/vitest.config.ts so temporary test fixtures do not inherit a parent git repository or WSL bash.exe. - Use path.delimiter, #!/usr/bin/env node, and pathToFileURL(preload) in reusable-workflows.test.ts and review-workflow.test.ts. - Spawn Node directly with verdaccio/bin/verdaccio and await process close before deleting storageDir in integration tests, and invoke npm pack via execSync in packed-release.test.ts.
🦋 Changeset detectedLatest commit: d882106 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 9
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit bfd25ea
☁️ Nx Cloud last updated this comment at |
commit: |
Merging this PR will not alter performance
|
🎯 Changes
withNativeCompiler(packages/intent/src/validate/blocks.ts),typescript/unstable/async'sClient.connectViaSpawnspawnstsgowithout acwdoption (inheriting the parent'sprocess.cwd()) while passing--cwd <root>on the command line, andapi.close()closesstdinwithout waiting for the child process to exit. Temporarily switchingprocess.cwd()todirname(root)across the initialapi.updateSnapshotcall keepstsgofrom holding an OS directory handle onrooton Windows so callers canrmSync(root)immediately afterapi.close().packages/intent/vitest.config.ts, setGIT_CEILING_DIRECTORIEStotmpdir()(so non-git temp fixtures do not walk up into an ancestor.gitdirectory duringgit apply),TERM: 'xterm-256color'(so@clack/promptsenables Unicode symbols before module-load evaluation on Windows), and prependC:\Program Files\Git\bintoPATHwhen present on Windows (sobashresolves to Git Bash rather than WSLC:\Windows\System32\bash.exe).reusable-workflows.test.tsandreview-workflow.test.ts, joinPATHentries withpath.delimiter, use#!/usr/bin/env nodeinstead of#!${process.execPath}(which contains spaces and backslashes on Windows), and passpathToFileURL(preload).hreftonode --import.tests/integration/scaffold.ts, spawnprocess.execPathwithnode_modules/verdaccio/bin/verdacciodirectly instead ofcmd.exe /c verdaccio(shell: true) soregistry.stop()terminates the Verdaccio Node process directly and awaits'close'before removingstorageDir. RaisebeforeAlltimeout inload-integration.test.tsandscanner-integration.test.tsto60_000ms to match the test cases, and useexecSyncfornpm packinpacked-release.test.ts.✅ Checklist
pnpm run test:pr(runpnpm build:allfirst).🚀 Release Impact