Skip to content
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eleven-hornets-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"roo-cline": patch
---

Fix -p parsing issue blocking build; various devX improvements
5 changes: 5 additions & 0 deletions .changeset/tall-jokes-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"roo-cline": patch
---

Devx housekeeping incl fix build failing on subsequent invocations due to -p not parsing correctly
20 changes: 11 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "import",
"format": ["camelCase", "PascalCase"]
}
],
"no-var": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/return-await": "error",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/semi": "off",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off",
"react-hooks/exhaustive-deps": "off"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
"ignorePatterns": ["out", "dist", "**/*.d.ts", "jest.*.js"]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ roo-cline-*.vsix
# Test environment
.test_env
.vscode-test/
.clineignore
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
"typescript.tsc.autoDetect": "off",
"cmake.ignoreCMakeListsMissing": true
}
14 changes: 14 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@
"label": "tasks: watch-tests",
"dependsOn": ["npm: watch", "npm: watch-tests"],
"problemMatcher": []
},
{
"type": "npm",
"script": "lint",
"problemMatcher": ["$eslint-stylish"],
"label": "npm: lint",
"detail": "eslint \"src/**/*.{js,jsx,ts,tsx}\""
},
{
"type": "npm",
"script": "lint:fix",
"problemMatcher": ["$eslint-stylish"],
"label": "npm: lint:fix",
"detail": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix"
}
]
}
14 changes: 14 additions & 0 deletions jest-custom-reporter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class CustomReporter {
constructor(globalConfig, options) {
this._globalConfig = globalConfig
this._options = options
}

onRunComplete(contexts, results) {
console.log(
`\nTests: ${results.numFailedTests} failed, ${results.numPassedTests} passed, ${results.numTotalTests} total`,
)
}
}

module.exports = CustomReporter
23 changes: 20 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
},
],
},
testMatch: ["**/__tests__/**/*.test.ts"],
testMatch: ["**/src/**/__tests__/**/*.test.ts", "**/src/**/*.test.ts"],
moduleNameMapper: {
"^vscode$": "<rootDir>/src/__mocks__/vscode.js",
"@modelcontextprotocol/sdk$": "<rootDir>/src/__mocks__/@modelcontextprotocol/sdk/index.js",
Expand All @@ -35,6 +35,23 @@ module.exports = {
"node_modules/(?!(@modelcontextprotocol|delay|p-wait-for|globby|serialize-error|strip-ansi|default-shell|os-name)/)",
],
modulePathIgnorePatterns: [".vscode-test"],
reporters: [["jest-simple-dot-reporter", {}]],
setupFiles: [],
rootDir: ".",
verbose: false,
silent: true,
noStackTrace: true,
reporters: [
[
"jest-silent-reporter",
{
useDots: false,
showPaths: true,
showWarnings: false,
showFailures: true,
showFailuresSummary: false,
showInlineStatus: false,
},
],
"<rootDir>/jest-custom-reporter.js",
],
setupFiles: ["<rootDir>/jest.setup.js"],
}
42 changes: 42 additions & 0 deletions jest.debug.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: {
module: "CommonJS",
moduleResolution: "node",
esModuleInterop: true,
allowJs: true,
},
diagnostics: false,
isolatedModules: true,
},
],
},
testMatch: ["**/src/**/__tests__/**/*.test.ts", "**/src/**/*.test.ts"],
moduleNameMapper: {
"^vscode$": "<rootDir>/src/__mocks__/vscode.js",
"@modelcontextprotocol/sdk$": "<rootDir>/src/__mocks__/@modelcontextprotocol/sdk/index.js",
"@modelcontextprotocol/sdk/(.*)": "<rootDir>/src/__mocks__/@modelcontextprotocol/sdk/$1",
"^delay$": "<rootDir>/src/__mocks__/delay.js",
"^p-wait-for$": "<rootDir>/src/__mocks__/p-wait-for.js",
"^globby$": "<rootDir>/src/__mocks__/globby.js",
"^serialize-error$": "<rootDir>/src/__mocks__/serialize-error.js",
"^strip-ansi$": "<rootDir>/src/__mocks__/strip-ansi.js",
"^default-shell$": "<rootDir>/src/__mocks__/default-shell.js",
"^os-name$": "<rootDir>/src/__mocks__/os-name.js",
},
transformIgnorePatterns: [
"node_modules/(?!(@modelcontextprotocol|delay|p-wait-for|globby|serialize-error|strip-ansi|default-shell|os-name)/)",
],
modulePathIgnorePatterns: [".vscode-test"],
rootDir: ".",
verbose: true,
silent: false,
setupFiles: ["<rootDir>/jest.setup.js"],
}
12 changes: 12 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Only silence console output if not in debug mode
if (!process.env.DEBUG) {
console.log = () => {}
console.info = () => {}
console.warn = () => {}
console.error = () => {}
}

process.env.NODE_NO_WARNINGS = "1"

// Set up mock API key for tests
process.env.OPEN_ROUTER_API_KEY = "sk-or-v1-mock-key-for-testing"
Loading
Loading