fix: release script grep -P macOS compat and CLI typecheck actor errors
- Replace grep -P (Perl regex, unavailable on macOS) with sed for extracting the CLI version string in release.sh - Add triple-slash reference to server/src/types/express.d.ts in server/src/index.ts so CLI's tsc picks up the Express Request augmentation when following workspace links Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -113,7 +113,7 @@ NEW_VERSION=$(node -e "console.log(require('$CLI_DIR/package.json').version)")
|
||||
echo " New version: $NEW_VERSION"
|
||||
|
||||
# Update the version string in cli/src/index.ts
|
||||
CURRENT_VERSION_IN_SRC=$(grep -oP '\.version\("\K[^"]+' "$CLI_DIR/src/index.ts" || echo "")
|
||||
CURRENT_VERSION_IN_SRC=$(sed -n 's/.*\.version("\([^"]*\)".*/\1/p' "$CLI_DIR/src/index.ts" | head -1)
|
||||
if [ -n "$CURRENT_VERSION_IN_SRC" ] && [ "$CURRENT_VERSION_IN_SRC" != "$NEW_VERSION" ]; then
|
||||
sed -i '' "s/\.version(\"$CURRENT_VERSION_IN_SRC\")/\.version(\"$NEW_VERSION\")/" "$CLI_DIR/src/index.ts"
|
||||
echo " ✓ Updated cli/src/index.ts version to $NEW_VERSION"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/// <reference path="./types/express.d.ts" />
|
||||
import { existsSync, readFileSync, rmSync } from "node:fs";
|
||||
import { createServer } from "node:http";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
Reference in New Issue
Block a user