fix: package.mjs to correspond to taskmaster AI pre-releases in extensions (what vscode expects)
- chore: run format
This commit is contained in:
@@ -9,17 +9,9 @@
|
||||
"engines": {
|
||||
"vscode": "^1.93.0"
|
||||
},
|
||||
"categories": [
|
||||
"AI",
|
||||
"Visualization",
|
||||
"Education",
|
||||
"Other"
|
||||
],
|
||||
"categories": ["AI", "Visualization", "Education", "Other"],
|
||||
"main": "./dist/extension.js",
|
||||
"activationEvents": [
|
||||
"onStartupFinished",
|
||||
"workspaceContains:.taskmaster/**"
|
||||
],
|
||||
"activationEvents": ["onStartupFinished", "workspaceContains:.taskmaster/**"],
|
||||
"contributes": {
|
||||
"viewsContainers": {
|
||||
"activitybar": [
|
||||
@@ -147,11 +139,7 @@
|
||||
},
|
||||
"taskmaster.ui.theme": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"auto",
|
||||
"light",
|
||||
"dark"
|
||||
],
|
||||
"enum": ["auto", "light", "dark"],
|
||||
"default": "auto",
|
||||
"description": "UI theme preference"
|
||||
},
|
||||
@@ -212,12 +200,7 @@
|
||||
},
|
||||
"taskmaster.debug.logLevel": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"error",
|
||||
"warn",
|
||||
"info",
|
||||
"debug"
|
||||
],
|
||||
"enum": ["error", "warn", "info", "debug"],
|
||||
"default": "info",
|
||||
"description": "Logging level"
|
||||
},
|
||||
|
||||
@@ -64,23 +64,49 @@ try {
|
||||
fs.readFileSync(publishPackagePath, 'utf8')
|
||||
);
|
||||
|
||||
// Check if versions are in sync
|
||||
if (devPackage.version !== publishPackage.version) {
|
||||
// Handle RC versions for VS Code Marketplace
|
||||
let finalVersion = devPackage.version;
|
||||
if (finalVersion.includes('-rc.')) {
|
||||
console.log(
|
||||
` - Version sync needed: ${publishPackage.version} → ${devPackage.version}`
|
||||
' - Detected RC version, transforming for VS Code Marketplace...'
|
||||
);
|
||||
publishPackage.version = devPackage.version;
|
||||
|
||||
// Update the source package.publish.json file
|
||||
// Extract base version and RC number
|
||||
const baseVersion = finalVersion.replace(/-rc\.\d+$/, '');
|
||||
const rcMatch = finalVersion.match(/rc\.(\d+)/);
|
||||
const rcNumber = rcMatch ? parseInt(rcMatch[1]) : 0;
|
||||
|
||||
// For each RC iteration, increment the patch version
|
||||
// This ensures unique versions in VS Code Marketplace
|
||||
if (rcNumber > 0) {
|
||||
const [major, minor, patch] = baseVersion.split('.').map(Number);
|
||||
finalVersion = `${major}.${minor}.${patch + rcNumber}`;
|
||||
console.log(
|
||||
` - RC version mapping: ${devPackage.version} → ${finalVersion}`
|
||||
);
|
||||
} else {
|
||||
finalVersion = baseVersion;
|
||||
console.log(
|
||||
` - RC version mapping: ${devPackage.version} → ${finalVersion}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if versions need updating
|
||||
if (publishPackage.version !== finalVersion) {
|
||||
console.log(
|
||||
` - Version sync needed: ${publishPackage.version} → ${finalVersion}`
|
||||
);
|
||||
publishPackage.version = finalVersion;
|
||||
|
||||
// Update the source package.publish.json file with the final version
|
||||
fs.writeFileSync(
|
||||
publishPackagePath,
|
||||
JSON.stringify(publishPackage, null, '\t') + '\n'
|
||||
);
|
||||
console.log(
|
||||
` - Updated package.publish.json version to ${devPackage.version}`
|
||||
);
|
||||
console.log(` - Updated package.publish.json version to ${finalVersion}`);
|
||||
} else {
|
||||
console.log(` - Versions already in sync: ${devPackage.version}`);
|
||||
console.log(` - Versions already in sync: ${finalVersion}`);
|
||||
}
|
||||
|
||||
// Copy the (now synced) package.publish.json as package.json
|
||||
@@ -124,8 +150,7 @@ try {
|
||||
`cd vsix-build && npx vsce package --no-dependencies`
|
||||
);
|
||||
|
||||
// Use the synced version for output
|
||||
const finalVersion = devPackage.version;
|
||||
// Use the transformed version for output
|
||||
console.log(
|
||||
`\nYour extension will be packaged to: vsix-build/task-master-${finalVersion}.vsix`
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "task-master-hamster",
|
||||
"displayName": "Taskmaster AI",
|
||||
"description": "A visual Kanban board interface for Taskmaster projects in VS Code",
|
||||
"version": "0.23.0",
|
||||
"version": "0.23.1",
|
||||
"publisher": "Hamster",
|
||||
"icon": "assets/icon.png",
|
||||
"engines": {
|
||||
|
||||
@@ -9,10 +9,7 @@
|
||||
"task-master-mcp": "mcp-server/server.js",
|
||||
"task-master-ai": "mcp-server/server.js"
|
||||
},
|
||||
"workspaces": [
|
||||
"apps/*",
|
||||
"."
|
||||
],
|
||||
"workspaces": ["apps/*", "."],
|
||||
"scripts": {
|
||||
"test": "node --experimental-vm-modules node_modules/.bin/jest",
|
||||
"test:fails": "node --experimental-vm-modules node_modules/.bin/jest --onlyFailures",
|
||||
|
||||
Reference in New Issue
Block a user