Skip to content

Commit c0306e3

Browse files
committed
Revert "Merge pull request RooVetGit#799 from RooVetGit/cte/package-json-cleanup"
This reverts commit 00ec57a, reversing changes made to b83442e.
1 parent 56a7b8f commit c0306e3

17 files changed

+4060
-6933
lines changed
File renamed without changes.

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"@typescript-eslint/semi": "off",
1818
"eqeqeq": "warn",
1919
"no-throw-literal": "warn",
20-
"semi": "off"
20+
"semi": "off",
21+
"react-hooks/exhaustive-deps": "off"
2122
},
2223
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
2324
}

.github/workflows/code-qa.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches: [main]
1010

1111
jobs:
12-
qa:
12+
compile:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
@@ -21,8 +21,12 @@ jobs:
2121
cache: 'npm'
2222
- name: Install dependencies
2323
run: npm run install:all
24-
- name: Run lint, check types, and esbuild
25-
run: npm run qa
24+
- name: Compile
25+
run: npm run compile
26+
- name: Check types
27+
run: npm run check-types
28+
- name: Lint
29+
run: npm run lint
2630

2731
unit-test:
2832
runs-on: ubuntu-latest
@@ -66,9 +70,9 @@ jobs:
6670
with:
6771
node-version: '18'
6872
cache: 'npm'
69-
- name: Create env.e2e file
70-
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.e2e
73+
- name: Create env.integration file
74+
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.integration
7175
- name: Install dependencies
7276
run: npm run install:all
73-
- name: Run end-to-end tests
74-
run: xvfb-run -a npm run e2e
77+
- name: Run integration tests
78+
run: xvfb-run -a npm run test:integration

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dist
22
out
3-
out-*
3+
out-integration
44
node_modules
55
coverage/
66

@@ -21,4 +21,4 @@ roo-cline-*.vsix
2121
docs/_site/
2222

2323
# Dotenv
24-
.env.e2e
24+
.env.integration

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ if [ "$branch" = "main" ]; then
66
fi
77

88
npx lint-staged
9+
10+
npm run compile
11+
npm run lint
12+
npm run check-types

.husky/pre-push

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ if [ "$branch" = "main" ]; then
55
exit 1
66
fi
77

8-
npm run qa
8+
npm run compile
99

10-
# Check for new changesets.
10+
# Check for new changesets
1111
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
1212
echo "Changeset files: $NEW_CHANGESETS"
13-
1413
if [ "$NEW_CHANGESETS" == "0" ]; then
1514
echo "-------------------------------------------------------------------------------------"
1615
echo "Changes detected. Please run 'npm run changeset' to create a changeset if applicable."
1716
echo "-------------------------------------------------------------------------------------"
18-
fi
17+
fi

.vscode-test.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import { defineConfig } from '@vscode/test-cli';
66

77
export default defineConfig({
8-
label: 'e2e',
9-
files: 'out-e2e/test/**/*.test.js',
8+
label: 'integrationTest',
9+
files: 'out-integration/test/**/*.test.js',
1010
workspaceFolder: '.',
1111
mocha: {
1212
ui: 'tdd',

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
1414
"sourceMaps": true,
1515
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
16-
"preLaunchTask": "${defaultBuildTask}",
16+
"preLaunchTask": "debug-mode",
1717
"env": {
1818
"NODE_ENV": "development",
1919
"VSCODE_DEBUG_MODE": "true"

.vscode/tasks.json

+45-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,42 @@
33
{
44
"version": "2.0.0",
55
"tasks": [
6+
{
7+
"label": "compile",
8+
"type": "npm",
9+
"script": "compile",
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
},
14+
"presentation": {
15+
"reveal": "silent",
16+
"panel": "shared"
17+
},
18+
"problemMatcher": ["$tsc", "$eslint-stylish"]
19+
},
620
{
721
"label": "watch",
8-
"dependsOn": ["npm: dev", "npm: watch:tsc", "npm: watch:esbuild"],
22+
"dependsOn": ["npm: build:webview", "npm: watch:tsc", "npm: watch:esbuild"],
923
"presentation": {
1024
"reveal": "never"
1125
},
1226
"group": {
1327
"kind": "build",
14-
"isDefault": true
28+
"isDefault": false
29+
}
30+
},
31+
{
32+
"label": "debug-mode",
33+
"dependsOn": ["compile", "npm: dev"],
34+
"group": {
35+
"kind": "build",
36+
"isDefault": false
37+
},
38+
"dependsOrder": "parallel",
39+
"presentation": {
40+
"reveal": "always",
41+
"panel": "new"
1542
}
1643
},
1744
{
@@ -32,8 +59,20 @@
3259
},
3360
"isBackground": true,
3461
"presentation": {
35-
"group": "webview-ui",
36-
"reveal": "always"
62+
"group": "watch",
63+
"reveal": "never"
64+
}
65+
},
66+
{
67+
"label": "npm: build:webview",
68+
"type": "npm",
69+
"script": "build:webview",
70+
"group": "build",
71+
"problemMatcher": [],
72+
"isBackground": true,
73+
"presentation": {
74+
"group": "watch",
75+
"reveal": "never"
3776
}
3877
},
3978
{
@@ -45,7 +84,7 @@
4584
"isBackground": true,
4685
"presentation": {
4786
"group": "watch",
48-
"reveal": "always"
87+
"reveal": "never"
4988
}
5089
},
5190
{
@@ -57,7 +96,7 @@
5796
"isBackground": true,
5897
"presentation": {
5998
"group": "watch",
60-
"reveal": "always"
99+
"reveal": "never"
61100
}
62101
}
63102
]

package-lock.json

-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+45-52
Original file line numberDiff line numberDiff line change
@@ -264,34 +264,55 @@
264264
}
265265
},
266266
"scripts": {
267-
"prepare": "husky",
268-
"install:all": "npm run install:extension && npm run install:webview",
269-
"install:extension": "npm install",
270-
"install:webview": "cd webview-ui && npm install",
271-
"lint": "npm-run-all -l -p lint:*",
272-
"lint:extension": "eslint src --ext ts",
273-
"lint:webview": "cd webview-ui && npm run lint",
274-
"check-types": "npm-run-all -l -p check-types:*",
275-
"check-types:extension": "tsc --noEmit",
276-
"check-types:webview": "cd webview-ui && npm run check-types",
277-
"test": "npm-run-all -l -s test:*",
278-
"test:extension": "jest",
279-
"test:webview": "cd webview-ui && npm run test",
280-
"build": "npm-run-all -l -s build:webview build:extension",
281-
"build:extension": "mkdir -p bin && npx vsce package --out bin",
267+
"build": "npm run build:webview && npm run vsix",
282268
"build:webview": "cd webview-ui && npm run build",
269+
"changeset": "changeset",
270+
"check-types": "tsc --noEmit",
271+
"compile": "tsc -p . --outDir out && node esbuild.js",
272+
"compile:integration": "tsc -p tsconfig.integration.json",
273+
"install:all": "npm install && cd webview-ui && npm install",
274+
"lint": "eslint src --ext ts && npm run lint --prefix webview-ui",
275+
"package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production",
276+
"pretest": "npm run compile && npm run compile:integration",
283277
"dev": "cd webview-ui && npm run dev",
284-
"qa": "npm-run-all -l -p lint check-types && node esbuild.js",
285-
"e2e": "npm run build && tsc -p tsconfig.e2e.json && npx dotenvx run -f .env.e2e -- vscode-test",
278+
"test": "jest && npm run test:webview",
279+
"test:webview": "cd webview-ui && npm run test",
280+
"test:integration": "npm run build && npm run compile:integration && npx dotenvx run -f .env.integration -- vscode-test",
281+
"prepare": "husky",
282+
"publish:marketplace": "vsce publish && ovsx publish",
283+
"publish": "npm run build && changeset publish && npm install --package-lock-only",
284+
"version-packages": "changeset version && npm install --package-lock-only",
286285
"vscode:prepublish": "npm run package",
286+
"vsix": "mkdir -p bin && npx vsce package --out bin",
287287
"watch": "npm-run-all -p watch:*",
288288
"watch:esbuild": "node esbuild.js --watch",
289289
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
290-
"package": "npm-run-all -l -p lint check-types && node esbuild.js --production",
291-
"changeset": "changeset",
292-
"version-packages": "changeset version && npm install --package-lock-only",
293-
"publish": "npm run build && changeset publish && npm install --package-lock-only",
294-
"publish:marketplace": "vsce publish && ovsx publish"
290+
"watch-tests": "tsc -p . -w --outDir out"
291+
},
292+
"devDependencies": {
293+
"@changesets/cli": "^2.27.10",
294+
"@changesets/types": "^6.0.0",
295+
"@dotenvx/dotenvx": "^1.34.0",
296+
"@types/diff": "^5.2.1",
297+
"@types/diff-match-patch": "^1.0.36",
298+
"@types/jest": "^29.5.14",
299+
"@types/mocha": "^10.0.7",
300+
"@types/node": "20.x",
301+
"@types/string-similarity": "^4.0.2",
302+
"@typescript-eslint/eslint-plugin": "^7.14.1",
303+
"@typescript-eslint/parser": "^7.11.0",
304+
"@vscode/test-cli": "^0.0.9",
305+
"@vscode/test-electron": "^2.4.0",
306+
"esbuild": "^0.24.0",
307+
"eslint": "^8.57.0",
308+
"husky": "^9.1.7",
309+
"jest": "^29.7.0",
310+
"jest-simple-dot-reporter": "^1.0.5",
311+
"lint-staged": "^15.2.11",
312+
"npm-run-all": "^4.1.5",
313+
"prettier": "^3.4.2",
314+
"ts-jest": "^29.2.5",
315+
"typescript": "^5.4.5"
295316
},
296317
"dependencies": {
297318
"@anthropic-ai/bedrock-sdk": "^0.10.2",
@@ -338,41 +359,13 @@
338359
"web-tree-sitter": "^0.22.6",
339360
"zod": "^3.23.8"
340361
},
341-
"devDependencies": {
342-
"@changesets/cli": "^2.27.10",
343-
"@changesets/types": "^6.0.0",
344-
"@dotenvx/dotenvx": "^1.34.0",
345-
"@types/debug": "^4.1.12",
346-
"@types/diff": "^5.2.1",
347-
"@types/diff-match-patch": "^1.0.36",
348-
"@types/jest": "^29.5.14",
349-
"@types/mocha": "^10.0.7",
350-
"@types/node": "20.x",
351-
"@types/string-similarity": "^4.0.2",
352-
"@typescript-eslint/eslint-plugin": "^7.14.1",
353-
"@typescript-eslint/parser": "^7.11.0",
354-
"@vscode/test-cli": "^0.0.9",
355-
"@vscode/test-electron": "^2.4.0",
356-
"esbuild": "^0.24.0",
357-
"eslint": "^8.57.0",
358-
"husky": "^9.1.7",
359-
"jest": "^29.7.0",
360-
"jest-simple-dot-reporter": "^1.0.5",
361-
"lint-staged": "^15.2.11",
362-
"npm-run-all": "^4.1.5",
363-
"prettier": "^3.4.2",
364-
"ts-jest": "^29.2.5",
365-
"typescript": "^5.4.5"
366-
},
367362
"lint-staged": {
368363
"*.{js,jsx,ts,tsx,json,css,md}": [
369364
"prettier --write"
370365
],
371366
"src/**/*.{ts,tsx}": [
372-
"npx eslint -c .eslintrc.json --max-warnings=0 --fix"
373-
],
374-
"webview-ui/**/*.{ts,tsx}": [
375-
"npx eslint -c webview-ui/.eslintrc.json --max-warnings=0 --fix"
367+
"prettier --write",
368+
"npx eslint -c .eslintrc.json --fix"
376369
]
377370
}
378371
}

tsconfig.e2e.json tsconfig.integration.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"skipLibCheck": true,
1111
"useUnknownInCatchVariables": false,
1212
"rootDir": "src",
13-
"outDir": "out-e2e"
13+
"outDir": "out-integration"
1414
},
1515
"include": ["**/*.ts"],
16-
"exclude": [".vscode-test", "benchmark", "dist", "**/node_modules/**", "out", "out-e2e", "webview-ui"]
16+
"exclude": [".vscode-test", "benchmark", "dist", "**/node_modules/**", "out", "out-integration", "webview-ui"]
1717
}

webview-ui/.eslintrc.json

-3
This file was deleted.

0 commit comments

Comments
 (0)