Compare commits

..

1 Commits

Author SHA1 Message Date
github-actions[bot]
7ee8f67d9c docs: auto-update documentation based on changes in next branch
This PR was automatically generated to update documentation based on recent changes.

  Original commit: fix: UI list and show (#1210)\n\n\n

  Co-authored-by: Claude <claude-assistant@anthropic.com>
2025-09-17 13:13:38 +00:00
33 changed files with 6631 additions and 1049 deletions

View File

@@ -0,0 +1,5 @@
---
"task-master-ai": patch
---
docs(move): clarify cross-tag move docs; deprecate "force"; add explicit --with-dependencies/--ignore-dependencies examples

View File

@@ -0,0 +1,5 @@
---
"task-master-ai": minor
---
Restore Taskmaster claude-code commands and move clear commands under /remove to avoid collision with the claude-code /clear command.

View File

@@ -0,0 +1,9 @@
---
"task-master-ai": minor
---
Enhanced Gemini CLI provider with codebase-aware task generation
Added automatic codebase analysis for Gemini CLI provider in parse-prd, and analyze-complexity, add-task, udpate-task, update, update-subtask commands
When using Gemini CLI as the AI provider, Task Master now instructs the AI to analyze the project structure, existing implementations, and patterns before generating tasks or subtasks
Tasks and subtasks generated by Claude Code are now informed by actual codebase analysis, resulting in more accurate and contextual outputs

16
.changeset/pre.json Normal file
View File

@@ -0,0 +1,16 @@
{
"mode": "exit",
"tag": "rc",
"initialVersions": {
"task-master-ai": "0.25.1",
"docs": "0.0.1",
"extension": "0.24.1"
},
"changesets": [
"clarify-force-move-docs",
"curvy-moons-dig",
"sour-coins-lay",
"strong-eagles-vanish",
"wet-candies-accept"
]
}

View File

@@ -0,0 +1,11 @@
---
"task-master-ai": minor
---
Add configurable codebase analysis feature flag with multiple configuration sources
Users can now control whether codebase analysis features (Claude Code and Gemini CLI integration) are enabled through environment variables, MCP configuration, or project config files.
Priority order: .env > MCP session env > .taskmaster/config.json.
Set `TASKMASTER_ENABLE_CODEBASE_ANALYSIS=false` in `.env` to disable codebase analysis prompts and tool integration.

View File

@@ -0,0 +1,12 @@
---
"task-master-ai": minor
---
feat(move): improve cross-tag move UX and safety
- CLI: print "Next Steps" tips after cross-tag moves that used --ignore-dependencies (validate/fix guidance)
- CLI: show dedicated help block on ID collisions (destination tag already has the ID)
- Core: add structured suggestions to TASK_ALREADY_EXISTS errors
- MCP: map ID collision errors to TASK_ALREADY_EXISTS and include suggestions
- Tests: cover MCP options, error suggestions, CLI tips printing, and integration error payload suggestions
---

View File

@@ -0,0 +1,14 @@
---
"task-master-ai": minor
---
Enhanced Claude Code and Google CLI integration with automatic codebase analysis for task operations
When using Claude Code as the AI provider, task management commands now automatically analyze your codebase before generating or updating tasks. This provides more accurate, context-aware implementation details that align with your project's existing architecture and patterns.
Commands contextualised:
- add-task
- update-subtask
- update-task
- update

View File

@@ -11,10 +11,6 @@ on:
- next - next
workflow_dispatch: workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: permissions:
contents: read contents: read
@@ -93,13 +89,6 @@ jobs:
NODE_ENV: production NODE_ENV: production
FORCE_COLOR: 1 FORCE_COLOR: 1
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/
retention-days: 1
test: test:
name: Test name: Test
timeout-minutes: 15 timeout-minutes: 15
@@ -119,11 +108,10 @@ jobs:
run: npm install --frozen-lockfile --prefer-offline run: npm install --frozen-lockfile --prefer-offline
timeout-minutes: 5 timeout-minutes: 5
- name: Download build artifacts - name: Build packages (required for tests)
uses: actions/download-artifact@v4 run: npm run build:packages
with: env:
name: build-artifacts NODE_ENV: production
path: dist/
- name: Run Tests - name: Run Tests
run: | run: |

View File

@@ -1,48 +1,5 @@
# task-master-ai # task-master-ai
## 0.26.0
### Minor Changes
- [#1133](https://github.com/eyaltoledano/claude-task-master/pull/1133) [`df26c65`](https://github.com/eyaltoledano/claude-task-master/commit/df26c65632000874a73504963b08f18c46283144) Thanks [@neonwatty](https://github.com/neonwatty)! - Restore Taskmaster claude-code commands and move clear commands under /remove to avoid collision with the claude-code /clear command.
- [#1163](https://github.com/eyaltoledano/claude-task-master/pull/1163) [`37af0f1`](https://github.com/eyaltoledano/claude-task-master/commit/37af0f191227a68d119b7f89a377bf932ee3ac66) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Enhanced Gemini CLI provider with codebase-aware task generation
Added automatic codebase analysis for Gemini CLI provider in parse-prd, and analyze-complexity, add-task, udpate-task, update, update-subtask commands
When using Gemini CLI as the AI provider, Task Master now instructs the AI to analyze the project structure, existing implementations, and patterns before generating tasks or subtasks
Tasks and subtasks generated by Claude Code are now informed by actual codebase analysis, resulting in more accurate and contextual outputs
- [#1165](https://github.com/eyaltoledano/claude-task-master/pull/1165) [`c4f92f6`](https://github.com/eyaltoledano/claude-task-master/commit/c4f92f6a0aee3435c56eb8d27d9aa9204284833e) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Add configurable codebase analysis feature flag with multiple configuration sources
Users can now control whether codebase analysis features (Claude Code and Gemini CLI integration) are enabled through environment variables, MCP configuration, or project config files.
Priority order: .env > MCP session env > .taskmaster/config.json.
Set `TASKMASTER_ENABLE_CODEBASE_ANALYSIS=false` in `.env` to disable codebase analysis prompts and tool integration.
- [#1135](https://github.com/eyaltoledano/claude-task-master/pull/1135) [`8783708`](https://github.com/eyaltoledano/claude-task-master/commit/8783708e5e3389890a78fcf685d3da0580e73b3f) Thanks [@mm-parthy](https://github.com/mm-parthy)! - feat(move): improve cross-tag move UX and safety
- CLI: print "Next Steps" tips after cross-tag moves that used --ignore-dependencies (validate/fix guidance)
- CLI: show dedicated help block on ID collisions (destination tag already has the ID)
- Core: add structured suggestions to TASK_ALREADY_EXISTS errors
- MCP: map ID collision errors to TASK_ALREADY_EXISTS and include suggestions
- Tests: cover MCP options, error suggestions, CLI tips printing, and integration error payload suggestions
***
- [#1162](https://github.com/eyaltoledano/claude-task-master/pull/1162) [`4dad2fd`](https://github.com/eyaltoledano/claude-task-master/commit/4dad2fd613ceac56a65ae9d3c1c03092b8860ac9) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Enhanced Claude Code and Google CLI integration with automatic codebase analysis for task operations
When using Claude Code as the AI provider, task management commands now automatically analyze your codebase before generating or updating tasks. This provides more accurate, context-aware implementation details that align with your project's existing architecture and patterns.
Commands contextualised:
- add-task
- update-subtask
- update-task
- update
### Patch Changes
- [#1135](https://github.com/eyaltoledano/claude-task-master/pull/1135) [`8783708`](https://github.com/eyaltoledano/claude-task-master/commit/8783708e5e3389890a78fcf685d3da0580e73b3f) Thanks [@mm-parthy](https://github.com/mm-parthy)! - docs(move): clarify cross-tag move docs; deprecate "force"; add explicit --with-dependencies/--ignore-dependencies examples
## 0.26.0-rc.1 ## 0.26.0-rc.1
### Minor Changes ### Minor Changes

View File

@@ -4,6 +4,8 @@
*/ */
import chalk from 'chalk'; import chalk from 'chalk';
import figlet from 'figlet';
import gradient from 'gradient-string';
/** /**
* Header configuration options * Header configuration options

View File

@@ -50,11 +50,6 @@ export function getStatusWithColor(
color: chalk.red, color: chalk.red,
icon: '!', icon: '!',
tableIcon: '!' tableIcon: '!'
},
completed: {
color: chalk.green,
icon: '✓',
tableIcon: '✓'
} }
}; };

View File

@@ -1,36 +1,27 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2022", "target": "ES2022",
"module": "NodeNext", "module": "ESNext",
"lib": ["ES2022"], "lib": ["ES2022"],
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"sourceMap": true, "sourceMap": true,
"outDir": "./dist", "outDir": "./dist",
"baseUrl": ".",
"rootDir": "./src", "rootDir": "./src",
"strict": true, "resolveJsonModule": true,
"noImplicitAny": true, "allowJs": false,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"esModuleInterop": true, "types": ["node"]
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "NodeNext",
"moduleDetection": "force",
"types": ["node"],
"resolveJsonModule": true,
"isolatedModules": true,
"allowImportingTsExtensions": false
}, },
"include": ["src/**/*"], "include": ["src/**/*"],
"exclude": ["node_modules", "dist", "tests", "**/*.test.ts", "**/*.spec.ts"] "exclude": ["node_modules", "dist", "tests"]
} }

View File

@@ -1,5 +1,3 @@
# docs # docs
## 0.0.2
## 0.0.1 ## 0.0.1

View File

@@ -128,23 +128,6 @@ You can reorganize tasks in various ways:
- Moving a task to a new ID position: `--from=5 --to=25` (even if task 25 doesn't exist yet) - Moving a task to a new ID position: `--from=5 --to=25` (even if task 25 doesn't exist yet)
- Moving multiple tasks at once: `--from=10,11,12 --to=16,17,18` (must have same number of IDs, Taskmaster will look through each position) - Moving multiple tasks at once: `--from=10,11,12 --to=16,17,18` (must have same number of IDs, Taskmaster will look through each position)
#### Cross-Tag Move Safety (v0.26.0+)
For moves between different tags, use the enhanced dependency handling:
```bash
# Move with all dependencies (safest)
task-master move --from=5 --to=3 --with-dependencies --tag-from=feature --tag-to=main
# Move ignoring dependencies (shows safety tips)
task-master move --from=5 --to=3 --ignore-dependencies --tag-from=feature --tag-to=main
```
**Enhanced Safety Features:**
- **Next Steps Guidance**: After cross-tag moves with `--ignore-dependencies`, the CLI provides "Next Steps" tips with validation and fix guidance
- **ID Collision Help**: Dedicated help blocks appear when destination tags already have the target ID, with structured suggestions
- **Better Error Messages**: Task collision errors now include actionable suggestions for resolution
When moving tasks to new IDs: When moving tasks to new IDs:
- The system automatically creates placeholder tasks for non-existent destination IDs - The system automatically creates placeholder tasks for non-existent destination IDs

View File

@@ -83,40 +83,9 @@ Taskmaster uses two primary methods for configuration:
- `VERTEX_PROJECT_ID`: Your Google Cloud project ID for Vertex AI. Required when using the 'vertex' provider. - `VERTEX_PROJECT_ID`: Your Google Cloud project ID for Vertex AI. Required when using the 'vertex' provider.
- `VERTEX_LOCATION`: Google Cloud region for Vertex AI (e.g., 'us-central1'). Default is 'us-central1'. - `VERTEX_LOCATION`: Google Cloud region for Vertex AI (e.g., 'us-central1'). Default is 'us-central1'.
- `GOOGLE_APPLICATION_CREDENTIALS`: Path to service account credentials JSON file for Google Cloud auth (alternative to API key for Vertex AI). - `GOOGLE_APPLICATION_CREDENTIALS`: Path to service account credentials JSON file for Google Cloud auth (alternative to API key for Vertex AI).
- `TASKMASTER_ENABLE_CODEBASE_ANALYSIS`: Control codebase analysis features (Claude Code and Gemini CLI integration). Set to 'false' to disable. Default: enabled.
**Important:** Settings like model ID selections (`main`, `research`, `fallback`), `maxTokens`, `temperature`, `logLevel`, `defaultSubtasks`, `defaultPriority`, and `projectName` are **managed in `.taskmaster/config.json`** (or `.taskmasterconfig` for unmigrated projects), not environment variables. **Important:** Settings like model ID selections (`main`, `research`, `fallback`), `maxTokens`, `temperature`, `logLevel`, `defaultSubtasks`, `defaultPriority`, and `projectName` are **managed in `.taskmaster/config.json`** (or `.taskmasterconfig` for unmigrated projects), not environment variables.
## Codebase Analysis Configuration
Task Master includes advanced codebase analysis features that enhance task generation by analyzing your project structure, existing implementations, and patterns. This is particularly useful when integrated with Claude Code or using Gemini CLI provider.
### Configuration Options
**Environment Variable Control (Priority Order: `.env` > MCP session env > `.taskmaster/config.json`)**
```bash
# In .env file
TASKMASTER_ENABLE_CODEBASE_ANALYSIS=false # Disable codebase analysis features
```
When enabled, the following commands benefit from codebase analysis:
- `parse-prd`: Generates tasks informed by project structure
- `analyze-complexity`: Considers existing codebase complexity
- `add-task`: Creates tasks aligned with project patterns
- `update-task`: Updates tasks with relevant codebase context
- `update-subtask`: Enhances subtasks based on implementation details
- `expand`: Generates subtasks informed by existing code patterns
### Integration with Claude Code
When Task Master detects it's running within Claude Code, it automatically provides codebase context to generate more accurate and relevant task details. This feature can be disabled using the environment variable above.
### Gemini CLI Provider Enhancement
The Gemini CLI provider includes automatic codebase analysis when generating or updating tasks, resulting in more contextually accurate outputs aligned with your project's architecture.
## Tagged Task Lists Configuration (v0.17+) ## Tagged Task Lists Configuration (v0.17+)
Taskmaster includes a tagged task lists system for multi-context task management. Taskmaster includes a tagged task lists system for multi-context task management.
@@ -178,9 +147,6 @@ PERPLEXITY_API_KEY=pplx-your-key-here
# Google Vertex AI Configuration (Required if using 'vertex' provider) # Google Vertex AI Configuration (Required if using 'vertex' provider)
# VERTEX_PROJECT_ID=your-gcp-project-id # VERTEX_PROJECT_ID=your-gcp-project-id
# Feature Control
# TASKMASTER_ENABLE_CODEBASE_ANALYSIS=false # Disable codebase analysis features
``` ```
## Troubleshooting ## Troubleshooting

View File

@@ -17,18 +17,37 @@ sidebarTitle: "CLI Commands"
<Accordion title="List Tasks"> <Accordion title="List Tasks">
```bash ```bash
# List all tasks # List all tasks with enhanced dashboard view
task-master list task-master list
# Alias available
task-master ls
# List tasks with a specific status # List tasks with a specific status (comma-separated multiple statuses supported)
task-master list --status=<status> task-master list --status=<status>
task-master list --status=pending,in-progress
# List tasks with subtasks # List tasks with subtasks
task-master list --with-subtasks task-master list --with-subtasks
# List tasks with a specific status and include subtasks # Filter by tag
task-master list --status=<status> --with-subtasks task-master list --tag=<tag>
# Output formats: text (default), json, compact
task-master list --format=json
task-master list --format=compact
# Suppress output for programmatic use
task-master list --silent
# Specify project directory
task-master list --project=/path/to/project
``` ```
The `list` command now displays:
- **Project dashboard** with task statistics and progress bars
- **Next recommended task** based on dependencies and priority
- **Suggested next steps** for project workflow
- **Enhanced table view** with complexity scores and color-coded status
</Accordion> </Accordion>
<Accordion title="Show Next Task"> <Accordion title="Show Next Task">
@@ -45,9 +64,32 @@ sidebarTitle: "CLI Commands"
# or # or
task-master show --id=<id> task-master show --id=<id>
# View multiple tasks at once (comma-separated)
task-master show 1,2,3
task-master show --id=1,2,3
# View a specific subtask (e.g., subtask 2 of task 1) # View a specific subtask (e.g., subtask 2 of task 1)
task-master show 1.2 task-master show 1.2
# Filter subtasks by status
task-master show <id> --status=<status>
# Output formats: text (default), json
task-master show <id> --format=json
# Suppress output for programmatic use
task-master show <id> --silent
# Specify project directory
task-master show <id> --project=/path/to/project
``` ```
The `show` command now features:
- **Enhanced task details** with markdown rendering for descriptions
- **Structured information display** with tables and sections
- **Multiple task support** for viewing several tasks simultaneously
- **Subtask filtering** by status
- **Suggested actions** for next steps on the task
</Accordion> </Accordion>
<Accordion title="Update Tasks"> <Accordion title="Update Tasks">
@@ -206,25 +248,4 @@ sidebarTitle: "CLI Commands"
task-master init task-master init
``` ```
</Accordion> </Accordion>
<Accordion title="Move Tasks">
```bash
# Move a task or subtask to a new position
task-master move --from=<id> --to=<id>
# Move multiple tasks at once (same number of IDs required)
task-master move --from=1,2,3 --to=7,8,9
# Cross-tag moves with dependency handling
task-master move --from=5 --to=3 --with-dependencies --tag-from=feature --tag-to=main
task-master move --from=5 --to=3 --ignore-dependencies --tag-from=feature --tag-to=main
# Note: --force flag is deprecated, use --with-dependencies or --ignore-dependencies instead
```
**Cross-tag Move Safety Features:**
- CLI shows "Next Steps" guidance after moves that ignore dependencies
- Dedicated help is displayed for ID collisions with structured suggestions
- Better error handling with actionable suggestions for resolution
</Accordion>
</AccordionGroup> </AccordionGroup>

View File

@@ -31,6 +31,12 @@ To see all tasks in the CLI you can use:
task-master list task-master list
``` ```
The `list` command now includes a comprehensive dashboard showing:
- Project statistics with completion progress bars
- Next recommended task based on dependencies and priority
- Suggested workflow steps
- Enhanced task table with complexity indicators
To see all implementation details of an individual task, including subtasks and testing strategy, you can use Show Task: To see all implementation details of an individual task, including subtasks and testing strategy, you can use Show Task:
``` ```

View File

@@ -1,6 +1,6 @@
{ {
"name": "docs", "name": "docs",
"version": "0.0.2", "version": "0.0.1",
"private": true, "private": true,
"description": "Task Master documentation powered by Mintlify", "description": "Task Master documentation powered by Mintlify",
"scripts": { "scripts": {

View File

@@ -1,12 +1,5 @@
# Change Log # Change Log
## 0.24.2
### Patch Changes
- Updated dependencies [[`8783708`](https://github.com/eyaltoledano/claude-task-master/commit/8783708e5e3389890a78fcf685d3da0580e73b3f), [`df26c65`](https://github.com/eyaltoledano/claude-task-master/commit/df26c65632000874a73504963b08f18c46283144), [`37af0f1`](https://github.com/eyaltoledano/claude-task-master/commit/37af0f191227a68d119b7f89a377bf932ee3ac66), [`c4f92f6`](https://github.com/eyaltoledano/claude-task-master/commit/c4f92f6a0aee3435c56eb8d27d9aa9204284833e), [`8783708`](https://github.com/eyaltoledano/claude-task-master/commit/8783708e5e3389890a78fcf685d3da0580e73b3f), [`4dad2fd`](https://github.com/eyaltoledano/claude-task-master/commit/4dad2fd613ceac56a65ae9d3c1c03092b8860ac9)]:
- task-master-ai@0.26.0
## 0.24.2-rc.1 ## 0.24.2-rc.1
### Patch Changes ### Patch Changes

View File

@@ -3,7 +3,7 @@
"private": true, "private": true,
"displayName": "TaskMaster", "displayName": "TaskMaster",
"description": "A visual Kanban board interface for TaskMaster projects in VS Code", "description": "A visual Kanban board interface for TaskMaster projects in VS Code",
"version": "0.24.2", "version": "0.24.2-rc.1",
"publisher": "Hamster", "publisher": "Hamster",
"icon": "assets/icon.png", "icon": "assets/icon.png",
"engines": { "engines": {
@@ -240,7 +240,7 @@
"check-types": "tsc --noEmit" "check-types": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"task-master-ai": "0.26.0" "task-master-ai": "0.26.0-rc.1"
}, },
"devDependencies": { "devDependencies": {
"@dnd-kit/core": "^6.3.1", "@dnd-kit/core": "^6.3.1",

View File

@@ -18,17 +18,7 @@ export default {
testMatch: ['**/__tests__/**/*.js', '**/?(*.)+(spec|test).js'], testMatch: ['**/__tests__/**/*.js', '**/?(*.)+(spec|test).js'],
// Transform files // Transform files
preset: 'ts-jest/presets/default-esm', transform: {},
extensionsToTreatAsEsm: ['.ts'],
moduleFileExtensions: ['js', 'ts', 'json', 'node'],
transform: {
'^.+\\.ts$': [
'ts-jest',
{
useESM: true
}
]
},
// Disable transformations for node_modules // Disable transformations for node_modules
transformIgnorePatterns: ['/node_modules/'], transformIgnorePatterns: ['/node_modules/'],
@@ -37,7 +27,6 @@ export default {
moduleNameMapper: { moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1' '^@/(.*)$': '<rootDir>/$1'
}, },
resolver: '<rootDir>/jest.resolver.cjs',
// Setup module aliases // Setup module aliases
moduleDirectories: ['node_modules', '<rootDir>'], moduleDirectories: ['node_modules', '<rootDir>'],

View File

@@ -1,19 +0,0 @@
const { defaultResolver } = require('jest-resolve');
module.exports = function customResolver(request, options) {
const resolve = options.defaultResolver || defaultResolver;
try {
return resolve(request, options);
} catch (error) {
if (request.startsWith('.') && request.endsWith('.js')) {
try {
return resolve(request.replace(/\.js$/, '.ts'), options);
} catch (tsError) {
tsError.cause = tsError.cause ?? error;
throw tsError;
}
}
throw error;
}
};

File diff suppressed because one or more lines are too long

6881
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "task-master-ai", "name": "task-master-ai",
"version": "0.26.0", "version": "0.26.0-rc.1",
"description": "A task management system for ambitious AI-driven development that doesn't overwhelm and confuse Cursor.", "description": "A task management system for ambitious AI-driven development that doesn't overwhelm and confuse Cursor.",
"main": "index.js", "main": "index.js",
"type": "module", "type": "module",
@@ -11,12 +11,20 @@
}, },
"workspaces": ["apps/*", "packages/*", "."], "workspaces": ["apps/*", "packages/*", "."],
"scripts": { "scripts": {
"build": "npm run build:build-config && cross-env NODE_ENV=production tsdown", "build": "npm run build:build-config && tsup",
"dev": "tsdown --watch='packages/*/src/**/*' --watch='apps/cli/src/**/*' --watch='bin/**/*' --watch='mcp-server/**/*'", "dev": "tsup --watch='packages/*/src/**/*' --watch='apps/cli/src/**/*' --watch='bin/**/*' --watch='mcp-server/**/*'",
"turbo:dev": "turbo dev", "turbo:dev": "turbo dev",
"turbo:build": "turbo build", "turbo:build": "turbo build",
"turbo:typecheck": "turbo typecheck", "turbo:typecheck": "turbo typecheck",
"dev:main": "tsup --watch --onSuccess 'echo \"📦 Main package built\" && npm link'",
"dev:legacy": "npm run build:build-config && concurrently -n \"core,cli,main\" -c \"blue,green,yellow\" \"npm run dev:core\" \"npm run dev:cli\" \"npm run dev:main\"",
"dev:core": "npm run dev -w @tm/core",
"dev:cli": "npm run dev -w @tm/cli",
"build:packages": "turbo build --filter='./packages/*' --filter='./apps/*'",
"build:packages:parallel": "turbo build --filter='./packages/*' --filter='./apps/*'",
"build:build-config": "npm run build -w @tm/build-config", "build:build-config": "npm run build -w @tm/build-config",
"build:core": "npm run build -w @tm/core",
"build:cli": "npm run build -w @tm/cli",
"test": "node --experimental-vm-modules node_modules/.bin/jest", "test": "node --experimental-vm-modules node_modules/.bin/jest",
"test:unit": "node --experimental-vm-modules node_modules/.bin/jest --testPathPattern=unit", "test:unit": "node --experimental-vm-modules node_modules/.bin/jest --testPathPattern=unit",
"test:integration": "node --experimental-vm-modules node_modules/.bin/jest --testPathPattern=integration", "test:integration": "node --experimental-vm-modules node_modules/.bin/jest --testPathPattern=integration",
@@ -135,8 +143,7 @@
"mock-fs": "^5.5.0", "mock-fs": "^5.5.0",
"prettier": "^3.5.3", "prettier": "^3.5.3",
"supertest": "^7.1.0", "supertest": "^7.1.0",
"ts-jest": "^29.4.2", "tsup": "^8.5.0",
"tsdown": "^0.15.2",
"tsx": "^4.16.2", "tsx": "^4.16.2",
"turbo": "^2.5.6", "turbo": "^2.5.6",
"typescript": "^5.9.2" "typescript": "^5.9.2"

View File

@@ -3,12 +3,12 @@
"version": "1.0.0", "version": "1.0.0",
"description": "Shared build configuration for Task Master monorepo", "description": "Shared build configuration for Task Master monorepo",
"type": "module", "type": "module",
"main": "./dist/tsdown.base.js", "main": "./dist/tsup.base.js",
"types": "./src/tsdown.base.ts", "types": "./dist/tsup.base.d.ts",
"exports": { "exports": {
".": { ".": {
"types": "./src/tsdown.base.ts", "types": "./dist/tsup.base.d.ts",
"import": "./dist/tsdown.base.js" "import": "./dist/tsup.base.js"
} }
}, },
"files": ["dist", "src"], "files": ["dist", "src"],

View File

@@ -1,46 +0,0 @@
/**
* Base tsdown configuration for Task Master monorepo
* Provides shared configuration that can be extended by individual packages
*/
import type { UserConfig } from 'tsdown';
const isProduction = process.env.NODE_ENV === 'production';
const isDevelopment = !isProduction;
/**
* Environment helpers
*/
export const env = {
isProduction,
isDevelopment,
NODE_ENV: process.env.NODE_ENV || 'development'
};
/**
* Base tsdown configuration for all packages
* Since everything gets bundled into root dist/ anyway, use consistent settings
*/
export const baseConfig: Partial<UserConfig> = {
sourcemap: isDevelopment,
format: 'esm',
platform: 'node',
dts: isDevelopment,
minify: isProduction,
treeshake: isProduction,
// Keep all npm dependencies external (available via node_modules)
external: [/^[^@./]/, /^@(?!tm\/)/]
};
/**
* Utility function to merge configurations
* Simplified for tsdown usage
*/
export function mergeConfig(
base: Partial<UserConfig>,
overrides: Partial<UserConfig>
): Partial<UserConfig> {
return {
...base,
...overrides
};
}

View File

@@ -0,0 +1,101 @@
/**
* Base tsup configuration for Task Master monorepo
* Provides shared configuration that can be extended by individual packages
*/
import type { Options } from 'tsup';
const isProduction = process.env.NODE_ENV === 'production';
const isDevelopment = !isProduction;
/**
* Environment helpers
*/
export const env = {
isProduction,
isDevelopment,
NODE_ENV: process.env.NODE_ENV || 'development'
};
/**
* Base tsup configuration for all packages
* Since everything gets bundled into root dist/ anyway, use consistent settings
*/
export const baseConfig: Partial<Options> = {
format: ['esm'],
target: 'node18',
sourcemap: isDevelopment,
clean: true,
dts: false,
minify: isProduction,
treeshake: isProduction,
splitting: false,
// Don't bundle any other dependencies (auto-external all node_modules)
external: [/^[^./]/],
esbuildOptions(options) {
options.platform = 'node';
// Allow importing TypeScript from JavaScript
options.resolveExtensions = ['.ts', '.js', '.mjs', '.json'];
// Better source mapping in development only
options.sourcesContent = isDevelopment;
// Keep original names for better debugging in development
options.keepNames = isDevelopment;
},
// Watch mode configuration for development
watch: false
};
/**
* Legacy external modules list - kept for backwards compatibility
* Note: When using tsup-node, this is not needed as it automatically
* excludes dependencies and peerDependencies from package.json
*/
export const commonExternals = [
// Native Node.js modules (for cases where tsup is used instead of tsup-node)
'fs',
'path',
'child_process',
'crypto',
'os',
'url',
'util',
'stream',
'http',
'https',
'events',
'assert',
'buffer',
'querystring',
'readline',
'zlib',
'tty',
'net',
'dgram',
'dns',
'tls',
'cluster',
'process',
'module'
];
/**
* Utility function to merge configurations
* Simplified for tsup-node usage
*/
export function mergeConfig(
baseConfig: Partial<Options>,
overrides: Partial<Options>
): Options {
return {
...baseConfig,
...overrides,
// Merge esbuildOptions
esbuildOptions(options, context) {
if (baseConfig.esbuildOptions) {
baseConfig.esbuildOptions(options, context);
}
if (overrides.esbuildOptions) {
overrides.esbuildOptions(options, context);
}
}
} as Options;
}

View File

@@ -53,7 +53,6 @@ export type OutputFormat = (typeof OUTPUT_FORMATS)[number];
*/ */
export const STATUS_ICONS: Record<TaskStatus, string> = { export const STATUS_ICONS: Record<TaskStatus, string> = {
done: '✓', done: '✓',
completed: '✓',
'in-progress': '►', 'in-progress': '►',
blocked: '⭕', blocked: '⭕',
pending: '○', pending: '○',
@@ -72,6 +71,5 @@ export const STATUS_COLORS: Record<TaskStatus, string> = {
deferred: 'gray', deferred: 'gray',
cancelled: 'red', cancelled: 'red',
blocked: 'magenta', blocked: 'magenta',
review: 'cyan', review: 'cyan'
completed: 'green'
} as const; } as const;

View File

@@ -24,8 +24,7 @@ export type TaskStatus =
| 'deferred' | 'deferred'
| 'cancelled' | 'cancelled'
| 'blocked' | 'blocked'
| 'review' | 'review';
| 'completed';
/** /**
* Task priority levels * Task priority levels

View File

@@ -17,7 +17,7 @@ describe('Complex Cross-Tag Scenarios', () => {
'..', '..',
'..', '..',
'..', '..',
'dist', 'bin',
'task-master.js' 'task-master.js'
); );

View File

@@ -1,31 +0,0 @@
import { defineConfig } from 'tsdown';
import { baseConfig, mergeConfig } from '@tm/build-config';
import { load as dotenvLoad } from 'dotenv-mono';
dotenvLoad();
// Get all TM_PUBLIC_* env variables for build-time injection
const getBuildTimeEnvs = () => {
const envs: Record<string, string> = {};
for (const [key, value] of Object.entries(process.env)) {
if (key.startsWith('TM_PUBLIC_')) {
// Return the actual value, not JSON.stringify'd
envs[key] = value || '';
}
}
return envs;
};
export default defineConfig(
mergeConfig(baseConfig, {
entry: {
'task-master': 'scripts/dev.js',
'mcp-server': 'mcp-server/server.js'
},
outDir: 'dist',
copy: ['public'],
// Bundle only our workspace packages, keep npm dependencies external
noExternal: [/^@tm\//],
env: getBuildTimeEnvs()
})
);

97
tsup.config.ts Normal file
View File

@@ -0,0 +1,97 @@
import { defineConfig } from 'tsup';
import { baseConfig, mergeConfig } from '@tm/build-config';
import { load as dotenvLoad } from 'dotenv-mono';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
dotenvLoad();
// Get all TM_PUBLIC_* env variables for build-time injection
const getBuildTimeEnvs = () => {
const envs: Record<string, string> = {};
for (const [key, value] of Object.entries(process.env)) {
if (key.startsWith('TM_PUBLIC_')) {
// Return the actual value, not JSON.stringify'd
envs[key] = value || '';
}
}
return envs;
};
export default defineConfig(
mergeConfig(baseConfig, {
entry: {
'task-master': 'scripts/dev.js',
'mcp-server': 'mcp-server/server.js'
},
outDir: 'dist',
publicDir: 'public',
// Override the base config's external to bundle our workspace packages
noExternal: [/^@tm\//],
external: [
/^@supabase\//, // Keep Supabase external to avoid dynamic require issues
'marked',
'marked-terminal'
],
env: getBuildTimeEnvs(),
esbuildOptions(options) {
// Set up path aliases for workspace packages
options.alias = {
'@tm/core': path.resolve(__dirname, 'packages/tm-core/src/index.ts'),
'@tm/core/auth': path.resolve(
__dirname,
'packages/tm-core/src/auth/index.ts'
),
'@tm/core/storage': path.resolve(
__dirname,
'packages/tm-core/src/storage/index.ts'
),
'@tm/core/config': path.resolve(
__dirname,
'packages/tm-core/src/config/index.ts'
),
'@tm/core/providers': path.resolve(
__dirname,
'packages/tm-core/src/providers/index.ts'
),
'@tm/core/services': path.resolve(
__dirname,
'packages/tm-core/src/services/index.ts'
),
'@tm/core/errors': path.resolve(
__dirname,
'packages/tm-core/src/errors/index.ts'
),
'@tm/core/logger': path.resolve(
__dirname,
'packages/tm-core/src/logger/index.ts'
),
'@tm/core/types': path.resolve(
__dirname,
'packages/tm-core/src/types/index.ts'
),
'@tm/core/interfaces': path.resolve(
__dirname,
'packages/tm-core/src/interfaces/index.ts'
),
'@tm/core/utils': path.resolve(
__dirname,
'packages/tm-core/src/utils/index.ts'
),
'@tm/cli': path.resolve(__dirname, 'apps/cli/src/index.ts'),
'@tm/cli/commands': path.resolve(
__dirname,
'apps/cli/src/commands/index.ts'
),
'@tm/cli/utils': path.resolve(__dirname, 'apps/cli/src/utils/index.ts'),
'@tm/cli/ui': path.resolve(__dirname, 'apps/cli/src/ui/index.ts'),
'@tm/build-config': path.resolve(
__dirname,
'packages/build-config/src/tsup.base.ts'
)
};
}
})
);