fix(targets): Add missing spawnProcess imports in pypi and crates#746
Merged
fix(targets): Add missing spawnProcess imports in pypi and crates#746
Conversation
The pypi and crates targets used spawnProcess without importing it, causing runtime errors during publishing. This was not caught because: - esbuild (used for builds) doesn't perform type checking - Tests mocked the entire method instead of the dependency Changes: - Add missing spawnProcess import to pypi.ts and crates.ts - Add test that exercises real uploadAssets implementation - Add typecheck script for local development
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes runtime error
spawnProcess is not definedwhen publishing to PyPI target.Problem
The
pypi.tsandcrates.tstargets usedspawnProcesswithout importing it, causing runtime errors:This was not caught because:
uploadAssetsmethod instead of testing the real implementationChanges
spawnProcessimport topypi.tsandcrates.tsuploadAssetsimplementation (mocksspawnProcessdependency instead of the method)typecheckscript topackage.jsonfor local developmentNote
Full CI type checking was considered but deferred - the codebase has ~150 pre-existing type errors that would need to be fixed first. The
pnpm typecheckscript is available for developers to catch similar issues locally.