Skip to content

Commit 2015888

Browse files
committed
Release v2.1.1: Fixed batch flags, dependency tracking, file linking, and installation validation
1 parent c63f4f6 commit 2015888

9 files changed

Lines changed: 910 additions & 110 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [2.1.1] - 2024-03-31
6+
7+
### Fixed
8+
- Batch command flag handling in any position (especially `--silent`)
9+
- Task dependency tracking in the reorganized directory structure
10+
- File linking parameter parsing to prevent flags from being treated as files
11+
- Added verification script to detect and fix missing files post-update
12+
- Improved terminal compatibility with option to suppress specific warnings
13+
514
## [2.1.0] - 2024-03-31
615

716
### Added

RELEASE-SUMMARY.md

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# TaskTracker v2.1.0 Release Summary
1+
# TaskTracker v2.1.1 Release Summary
22

3-
## Key Features
3+
## Key Fixes
44

5-
- **Claude Agent Integration**: Specialized templates and batch commands for cost-efficient AI interactions
6-
- **Directory Reorganization**: Improved code organization with core, reporting, and integration modules
7-
- **Security Enhancements**: Better protection of sensitive data and expanded security testing
8-
- **Cost Optimization**: Advanced batch operations to reduce premium tool call costs by up to 83%
9-
- **Improved Documentation**: Comprehensive guides and update instructions
5+
- **Batch Command Enhancement**: Fixed `--silent` flag recognition in batch templates regardless of position
6+
- **Dependency Tracking Repair**: Fixed `depends-on` feature in the reorganized directory structure
7+
- **File Linking Improvement**: Corrected parameter parsing to prevent flags from being added as related files
8+
- **Installation Validation**: Added a verification script to confirm required files are present post-update
9+
- **Terminal Compatibility**: Improved terminal detection with option to suppress specific warnings
1010

1111
## Installation
1212

@@ -24,7 +24,7 @@ npm install
2424
./bin/tasktracker setup
2525
```
2626

27-
### Updating from Previous Versions
27+
### Updating from v2.1.0
2828

2929
```bash
3030
# Back up your data
@@ -36,29 +36,41 @@ git pull
3636
# Install updated dependencies
3737
npm install
3838

39-
# Verify the installation
40-
./bin/tasktracker verify
39+
# Run the new verification script
40+
./bin/tasktracker verify --fix
4141
```
4242

4343
For detailed update instructions, see the [Update Guide](docs/guides/UPDATING.md).
4444

45-
## Claude Agent Integration
45+
## Important Changes
46+
47+
### Enhanced Batch Command Processing
48+
49+
The batch processor now properly handles flags in any position:
50+
51+
```bash
52+
# Now correctly processes flags at the end of commands
53+
update 1 status done --silent
54+
```
55+
56+
All Claude templates have been updated to place flags in their recommended positions.
57+
58+
### Improved Migration Experience
4659

47-
This version introduces optimized integration with Claude agents in Cursor IDE:
60+
The installation verification script now detects and reports missing files:
4861

4962
```bash
50-
# Use batch templates to reduce premium tool call costs
51-
task.batch examples/claude-templates/daily-update.txt
63+
# Check installation integrity
64+
./bin/tasktracker verify
65+
66+
# Automatically fix common installation issues
67+
./bin/tasktracker verify --fix
5268
```
5369

54-
Available templates:
55-
- `daily-update.txt` - Update multiple task statuses efficiently
56-
- `task-create.txt` - Create multiple related tasks
57-
- `pr-prepare.txt` - Prepare a task for a pull request
70+
See the [Update Guide](docs/guides/UPDATING.md) for comprehensive information about installation requirements.
5871

5972
## Documentation
6073

61-
- [Update Guide](docs/guides/UPDATING.md) - Instructions for updating from previous versions
62-
- [AI Integration Guide](docs/AI-INTEGRATION.md) - Claude agent integration details
63-
- [Cost Optimization Guide](docs/guides/COST-OPTIMIZATION.md) - Tips for reducing premium tool call costs
64-
- [IDE Integration Guide](docs/ide-integrations/ide-integration.md) - IDE integration features
74+
- [Update Guide](docs/guides/UPDATING.md) - Enhanced with explicit file requirements
75+
- [AI Integration Guide](docs/AI-INTEGRATION.md) - Updated Claude agent integration details
76+
- [Cost Optimization Guide](docs/guides/COST-OPTIMIZATION.md) - Added metrics for measuring AI cost savings

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0
1+
2.1.1

bin/tasktracker-batch

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,41 @@ function parseCommands(content) {
112112
.filter(line => line && !line.startsWith('#'));
113113
}
114114

115+
// Parse command arguments to properly identify flags regardless of position
116+
function parseCommandArgs(commandLine) {
117+
// Split by spaces but preserve quoted strings
118+
const regex = /[^\s"']+|"([^"]*)"|'([^']*)'/g;
119+
let matches = [];
120+
let match;
121+
122+
while ((match = regex.exec(commandLine))) {
123+
// If the match is a quoted string, use the captured group
124+
if (match[1] || match[2]) {
125+
matches.push(match[1] || match[2]);
126+
} else {
127+
matches.push(match[0]);
128+
}
129+
}
130+
131+
// Separate command, flags, and other arguments
132+
const command = matches[0];
133+
const flags = matches.filter(arg => arg.startsWith('--'));
134+
const nonFlagArgs = matches.filter(arg => !arg.startsWith('--') && arg !== command);
135+
136+
return {
137+
command,
138+
flags,
139+
nonFlagArgs,
140+
allArgs: [...nonFlagArgs, ...flags]
141+
};
142+
}
143+
144+
// Check if a command has a specific flag
145+
function hasFlag(commandLine, flagName) {
146+
const { flags } = parseCommandArgs(commandLine);
147+
return flags.includes(flagName);
148+
}
149+
115150
// Get command type from full command
116151
function getCommandType(command) {
117152
const parts = command.split(' ');
@@ -221,17 +256,38 @@ async function executeCommands(commands) {
221256
try {
222257
// Handle redirection separately if present
223258
const hasRedirection = command.includes('>');
224-
const actualCommand = hasRedirection ? command.split('>')[0].trim() : command;
259+
const commandToProcess = hasRedirection ? command.split('>')[0].trim() : command;
225260
const redirectTarget = hasRedirection ? command.split('>')[1].trim() : null;
226261

262+
// Parse the command arguments to properly handle flags
263+
const parsedCommand = parseCommandArgs(commandToProcess);
264+
const cmdType = parsedCommand.command;
265+
227266
// Create a unique output file for this command
228267
const outputFile = path.join(tmpDir, `cmd_${i}.out`);
229268

230269
// Set maximum buffer size based on command type
231-
const cmdType = getCommandType(actualCommand);
232270
const maxBuffer = cmdType === 'list' ? 5 * 1024 * 1024 : 1024 * 1024; // 5MB for list, 1MB for others
233271

234-
const result = execSync(`${TASKTRACKER_BIN} ${actualCommand} --non-interactive`, {
272+
// Build the command with proper flag handling
273+
let execCommand = `${TASKTRACKER_BIN} ${parsedCommand.command}`;
274+
275+
// Add non-flag arguments first
276+
if (parsedCommand.nonFlagArgs.length > 0) {
277+
execCommand += ` ${parsedCommand.nonFlagArgs.join(' ')}`;
278+
}
279+
280+
// Add flags
281+
if (parsedCommand.flags.length > 0) {
282+
execCommand += ` ${parsedCommand.flags.join(' ')}`;
283+
}
284+
285+
// Always add non-interactive flag for batch operations
286+
if (!parsedCommand.flags.includes('--non-interactive')) {
287+
execCommand += ' --non-interactive';
288+
}
289+
290+
const result = execSync(execCommand, {
235291
encoding: 'utf8',
236292
stdio: ['pipe', 'pipe', 'pipe'],
237293
maxBuffer: maxBuffer

0 commit comments

Comments
 (0)