fix: remove Node.js DEP0190 deprecation warning

Use platform-specific shell option (Windows only) instead of shell: true
to avoid deprecation warning in Node.js v22.9.0+.

Changes:
- bin/ccs.js: Change shell: true to shell: process.platform === 'win32'
- CHANGELOG.md: Document fix for v2.4.8
- VERSION: Bump to 2.4.8
- package.json: Bump to 2.4.8

Benefits:
- No deprecation warning on Windows
- Better performance on Unix (no shell overhead)
- Maintains Windows .cmd/.bat compatibility
This commit is contained in:
kaitranntt committed 2025-11-05 17:20:47 -05:00
1 parent 9c88c9f66b
commit 56295fee00
8 files changed
+20 -7

No files matched your search

+12
View File
@@ -4,6 +4,18 @@ All notable changes to CCS will be documented here.
Format based on [Keep a Changelog](https://keepachangelog.com/).
## [2.4.8] - 2025-11-05
### Fixed
- **Deprecation Warning**: Fixed Node.js DEP0190 warning by using platform-specific shell option (Windows only)
- Improved cross-platform compatibility (shell only on Windows, direct spawn on macOS/Linux)
### Technical Details
- **Files Modified**: `bin/ccs.js` (execClaude function)
- **Change**: Use `shell: process.platform === 'win32'` instead of `shell: true`
- **Security**: No injection risk (array-based arguments, controlled inputs)
- **Performance**: Better performance on Unix systems (no shell overhead)
## [2.4.7] - 2025-11-05
### Fixed
+1 -1
View File
@@ -1 +1 @@
2.4.7
2.4.8
+2 -1
View File
@@ -13,10 +13,11 @@ const CCS_VERSION = require('../package.json').version;
// Execute Claude CLI with unified spawn logic
function execClaude(claudeCli, args) {
// Use shell only on Windows for .cmd/.bat compatibility
const child = spawn(claudeCli, args, {
stdio: 'inherit',
windowsHide: true,
shell: true // FIX: Enable shell for .cmd/.bat files on Windows
shell: process.platform === 'win32'
});
child.on('exit', (code, signal) => {
if (signal) process.kill(process.pid, signal);
+1 -1
View File
@@ -30,7 +30,7 @@ $InstallMethod = if ($ScriptDir -and ((Test-Path "$ScriptDir\lib\ccs.ps1") -or (
# IMPORTANT: Update this version when releasing new versions!
# This hardcoded version is used for standalone installations (irm | iex)
# For git installations, VERSION file is read if available
$CcsVersion = "2.4.7"
$CcsVersion = "2.4.8"
# Try to read VERSION file for git installations
if ($ScriptDir) {
+1 -1
View File
@@ -31,7 +31,7 @@ fi
# IMPORTANT: Update this version when releasing new versions!
# This hardcoded version is used for standalone installations (curl | bash)
# For git installations, VERSION file is read if available
CCS_VERSION="2.4.7"
CCS_VERSION="2.4.8"
# Try to read VERSION file for git installations
if [[ -f "$SCRIPT_DIR/VERSION" ]]; then
+1 -1
View File
@@ -2,7 +2,7 @@
set -euo pipefail
# Version (updated by scripts/bump-version.sh)
CCS_VERSION="2.4.7"
CCS_VERSION="2.4.8"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly CONFIG_FILE="${CCS_CONFIG:-$HOME/.ccs/config.json}"
+1 -1
View File
@@ -134,7 +134,7 @@ function Show-Help {
}
# Version (updated by scripts/bump-version.sh)
$CcsVersion = "2.4.7"
$CcsVersion = "2.4.8"
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$ConfigFile = if ($env:CCS_CONFIG) { $env:CCS_CONFIG } else { "$env:USERPROFILE\.ccs\config.json" }
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@kaitranntt/ccs",
"version": "2.4.7",
"version": "2.4.8",
"description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6",
"keywords": [
"cli",