Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"lint": "eslint src --ext=ts --max-warnings=0",
"check-types": "tsc --noEmit",
"test": "vitest --globals --run",
"test": "vitest run",
"build": "tsc",
"clean": "rimraf dist .turbo"
},
Expand Down
12 changes: 11 additions & 1 deletion packages/build/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// npx vitest --globals run src/__tests__/index.test.ts
// npx vitest run src/__tests__/index.test.ts

import { generatePackageJson } from "../index.js"

Expand Down Expand Up @@ -67,6 +67,11 @@ describe("generatePackageJson", () => {
group: "navigation@6",
when: "activeWebviewPanelId == roo-cline.TabPanelProvider",
},
{
command: "roo-cline.accountButtonClicked",
group: "navigation@6",
when: "activeWebviewPanelId == roo-cline.TabPanelProvider && config.roo-cline.rooCodeCloudEnabled",
},
],
},
submenus: [
Expand Down Expand Up @@ -175,6 +180,11 @@ describe("generatePackageJson", () => {
group: "navigation@6",
when: "activeWebviewPanelId == roo-code-nightly.TabPanelProvider",
},
{
command: "roo-code-nightly.accountButtonClicked",
group: "navigation@6",
when: "activeWebviewPanelId == roo-code-nightly.TabPanelProvider && config.roo-code-nightly.rooCodeCloudEnabled",
},
],
},
submenus: [
Expand Down
8 changes: 4 additions & 4 deletions packages/build/src/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ function transformArrayRecord<T>(obj: Record<string, any[]>, from: string, to: s
return Object.entries(obj).reduce(
(acc, [key, ary]) => ({
...acc,
[key.replace(from, to)]: ary.map((item) => {
[key.replaceAll(from, to)]: ary.map((item) => {
const transformedItem = { ...item }

for (const prop of props) {
if (prop in item && typeof item[prop] === "string") {
transformedItem[prop] = item[prop].replace(from, to)
transformedItem[prop] = item[prop].replaceAll(from, to)
}
}

Expand All @@ -232,7 +232,7 @@ function transformArrayRecord<T>(obj: Record<string, any[]>, from: string, to: s
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function transformArray<T>(arr: any[], from: string, to: string, idProp: string): T[] {
return arr.map(({ [idProp]: id, ...rest }) => ({
[idProp]: id.replace(from, to),
[idProp]: id.replaceAll(from, to),
...rest,
}))
}
Expand All @@ -242,7 +242,7 @@ function transformRecord<T>(obj: Record<string, any>, from: string, to: string):
return Object.entries(obj).reduce(
(acc, [key, value]) => ({
...acc,
[key.replace(from, to)]: value,
[key.replaceAll(from, to)]: value,
}),
{} as T,
)
Expand Down
8 changes: 8 additions & 0 deletions packages/build/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "vitest/config"

export default defineConfig({
test: {
globals: true,
environment: "node",
},
})
2 changes: 1 addition & 1 deletion packages/cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"lint": "eslint src --ext=ts --max-warnings=0",
"check-types": "tsc --noEmit",
"test": "vitest --globals --run",
"test": "vitest run",
"clean": "rimraf dist .turbo"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cloud/src/__tests__/RefreshTimer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// npx vitest run --globals src/__tests__/RefreshTimer.test.ts
// npx vitest run src/__tests__/RefreshTimer.test.ts

import { Mock } from "vitest"

Expand Down
2 changes: 1 addition & 1 deletion packages/telemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"lint": "eslint src --ext=ts --max-warnings=0",
"check-types": "tsc --noEmit",
"test": "vitest --globals --run",
"test": "vitest run",
"clean": "rimraf dist .turbo"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"lint": "eslint src --ext=ts --max-warnings=0",
"check-types": "tsc --noEmit",
"test": "vitest --globals --run",
"test": "vitest run",
"build": "tsup",
"npm:publish:test": "tsup --outDir npm/dist && cd npm && npm publish --dry-run",
"npm:publish": "tsup --outDir npm/dist && cd npm && npm publish",
Expand Down
2 changes: 1 addition & 1 deletion src/api/providers/fetchers/__tests__/openrouter.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// npx vitest run --globals api/providers/fetchers/__tests__/openrouter.spec.ts
// npx vitest run api/providers/fetchers/__tests__/openrouter.spec.ts

import * as path from "path"

Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
"lint": "eslint . --ext=ts --max-warnings=0",
"check-types": "tsc --noEmit",
"pretest": "turbo run bundle --cwd ..",
"test": "jest -w=40% && vitest run --globals",
"test": "jest -w=40% && vitest run",
"format": "prettier --write .",
"bundle": "node esbuild.mjs",
"vscode:prepublish": "pnpm bundle --production",
Expand Down
Loading