chore: use spawn arg arrays, remove dead code, fix template var#24
Merged
Olanetsoft merged 2 commits intomainfrom Mar 26, 2026
Merged
chore: use spawn arg arrays, remove dead code, fix template var#24Olanetsoft merged 2 commits intomainfrom
Olanetsoft merged 2 commits intomainfrom
Conversation
- Replace execSync string interpolation with spawnSync arg arrays in
git-cloner and package-manager for consistency with the rest of the
codebase (git-utils, package-installer already use spawn arrays)
- Download Compact installer to temp file before executing instead of
piping curl output directly to shell
- Add path safety guard in create-app before removing existing dirs
- Remove unused ErrorHandler methods (checkDocker, checkNodeVersion,
warn, info) and PackageInstaller.detectPackageManager — all had
zero callers
- Remove redundant Node version check from cli.ts (bin entry point
already enforces this via semver before cli.ts runs)
- Fix hello-world template using unpopulated {{author}} variable
- Exclude test.ts from tsconfig build so it doesn't ship in package
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Olanetsoft
approved these changes
Mar 26, 2026
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
git-clonerandpackage-managernow usespawnSyncwith argument arrays, matching the pattern already used bygit-utilsandpackage-installer. This avoids shell string interpolation and is easier to read/maintain.curloutput directly tosh. Includes a shebang check to reject non-script responses (e.g. HTML error pages).create-appnow rejects dangerous project paths (/,~, system dirs) before anyfs.removecall.ErrorHandler.checkDocker,ErrorHandler.checkNodeVersion,ErrorHandler.warn,ErrorHandler.info, andPackageInstaller.detectPackageManagerall had zero callers.cli.ts— the bin entry point already enforces Node >= 22 viasemver.satisfiesbeforecli.tsruns.{{author}}template variable: was never provided to Mustache, rendered as empty string silently. Now explicitly"".test.tsfrom build: smoke test no longer compiles todist/test.jsand ships in the npm package.Test plan
tsc --noEmitpassesvitest run— all 39 tests passnpx create-mn-app test-app --template hello-world --skip-install --skip-gitstill scaffolds correctlynpx create-mn-app test-app --from midnightntwrk/example-counter --dry-runshows expected outputGenerated with Claude Code