From 0836e4d45abbed91d173f3a60e6503983d1ae22e Mon Sep 17 00:00:00 2001 From: Evan <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:07:31 -0700 Subject: [PATCH] add npm protos to tests.json for dev build (#3107) --- .changeset/blue-cars-drive.md | 5 +++++ .vscode/tasks.json | 30 +++++++++++++++++++++++++++--- package.json | 8 ++++---- 3 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 .changeset/blue-cars-drive.md diff --git a/.changeset/blue-cars-drive.md b/.changeset/blue-cars-drive.md new file mode 100644 index 000000000..07430f156 --- /dev/null +++ b/.changeset/blue-cars-drive.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Make sure protos run before dev build scripts diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 16b95dbbf..688a4a33c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,9 +3,24 @@ { "version": "2.0.0", "tasks": [ + { + "label": "npm: protos", + "type": "npm", + "script": "protos", + "problemMatcher": [], + "isBackground": false, + "presentation": { + "reveal": "always" + }, + "options": { + "env": { + "IS_DEV": "true" + } + } + }, { "label": "watch", - "dependsOn": ["npm: build:webview", "npm: dev:webview", "npm: watch:tsc", "npm: watch:esbuild"], + "dependsOn": ["npm: protos", "npm: build:webview", "npm: dev:webview", "npm: watch:tsc", "npm: watch:esbuild"], "presentation": { "reveal": "never" }, @@ -16,7 +31,13 @@ }, { "label": "watch:test", - "dependsOn": ["npm: build:webview:test", "npm: dev:webview", "npm: watch:tsc", "npm: watch:esbuild:test"], + "dependsOn": [ + "npm: protos", + "npm: build:webview:test", + "npm: dev:webview", + "npm: watch:tsc", + "npm: watch:esbuild:test" + ], "presentation": { "reveal": "never" }, @@ -29,6 +50,7 @@ "problemMatcher": [], "isBackground": true, "label": "npm: build:webview", + "dependsOn": ["npm: protos"], "presentation": { "group": "watch", "reveal": "never", @@ -100,6 +122,7 @@ "problemMatcher": "$esbuild-watch", "isBackground": true, "label": "npm: watch:esbuild", + "dependsOn": ["npm: protos"], "presentation": { "group": "watch", "reveal": "never", @@ -118,6 +141,7 @@ "problemMatcher": "$esbuild-watch", "isBackground": true, "label": "npm: watch:esbuild:test", + "dependsOn": ["npm: protos"], "presentation": { "group": "watch", "reveal": "never", @@ -156,7 +180,7 @@ }, { "label": "tasks: watch-tests", - "dependsOn": ["npm: watch", "npm: watch-tests"], + "dependsOn": ["npm: protos", "npm: watch", "npm: watch-tests"], "problemMatcher": [] }, { diff --git a/package.json b/package.json index 552daf485..29de2c260 100644 --- a/package.json +++ b/package.json @@ -289,13 +289,13 @@ "compile": "npm run check-types && npm run lint && node esbuild.js", "watch": "npm-run-all -p watch:*", "watch:esbuild": "node esbuild.js --watch", - "watch:tsc": "npm run protos && tsc --noEmit --watch --project tsconfig.json", + "watch:tsc": "tsc --noEmit --watch --project tsconfig.json", "package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production", "protos": "node proto/build-proto.js && prettier src/shared/proto --write && prettier src/core/controller --write", - "compile-tests": "npm run protos && tsc -p ./tsconfig.test.json --outDir out", - "watch-tests": "npm run protos && tsc -p . -w --outDir out", + "compile-tests": "tsc -p ./tsconfig.test.json --outDir out", + "watch-tests": "tsc -p . -w --outDir out", "pretest": "npm run compile-tests && npm run compile && npm run lint", - "check-types": "npm run protos && tsc --noEmit", + "check-types": "tsc --noEmit", "lint": "eslint src --ext ts && eslint webview-ui/src --ext ts", "format": "prettier . --check", "format:fix": "prettier . --write",