Two bugs were found in termcast that prevented the release command from working properly.
File: src/cli.ts (or dist/cli.js)
Problem: The release command was defined with a required <path> argument, but dev and build commands use optional [path]. Running termcast release without a path silently did nothing.
Fix: Change <path> to [path] and add fallback to process.cwd():
cli
- .command('release <path>', 'Build and publish extension to GitHub releases')
+ .command('release [path]', 'Build and publish extension to GitHub releases')
.option('--single', 'Only compile for the current platform')
.action(async (extensionPath, options) => {
- extensionPath = path.resolve(extensionPath);
+ extensionPath = path.resolve(extensionPath || process.cwd());File: src/compile.ts (or dist/compile.js)
Problem: When releasing, compileExtension is called in parallel for all 11 targets using Promise.all. Each compilation creates a temporary _entry.tsx file in the same location. This causes a race condition where one compile deletes the file while another is still using it.
Fix: Use a unique temp entry file per target:
+ const targetSuffix = target ? targetToFileSuffix(target) : 'default';
- const tempEntryPath = path.join(bundleDir, '_entry.tsx');
+ const tempEntryPath = path.join(bundleDir, `_entry-${targetSuffix}.tsx`);| Bug | Location | Issue | Fix |
|---|---|---|---|
| 1 | cli.ts | <path> required |
Change to [path] with process.cwd() fallback |
| 2 | compile.ts | Shared _entry.tsx |
Use _entry-${targetSuffix}.tsx per target |