Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 .github/workflows/marketplace-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Package Extension
run: |
current_package_version=$(node -p "require('./src/package.json').version")
pnpm build
pnpm vsix

# Save VSIX contents to a temporary file to avoid broken pipe issues.
unzip -l bin/roo-cline-${current_package_version}.vsix > /tmp/roo-code-vsix-contents.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
console.log(`🔖 Nightly version set to ${pkg.version}`);
EOF
- name: Build VSIX
run: pnpm build:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix
run: pnpm vsix:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix
- name: Publish to VS Code Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
Expand Down
37 changes: 34 additions & 3 deletions MONOREPO.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pnpm install
If things are in good working order then you should be able to build a vsix and install it in VSCode:

```sh
pnpm build -- --out ../bin/roo-code-main.vsix && \
pnpm vsix -- --out ../bin/roo-code-main.vsix && \
code --install-extension bin/roo-code-main.vsix
```

Expand All @@ -34,9 +34,40 @@ To fully stress the monorepo setup, run the following:
pnpm clean && pnpm lint
pnpm clean && pnpm check-types
pnpm clean && pnpm test
pnpm clean && pnpm bundle
pnpm clean && pnpm build
pnpm clean && pnpm bundle
pnpm clean && pnpm bundle:nightly

pnpm clean && pnpm npx turbo watch:bundle
pnpm clean && pnpm npx turbo watch:tsc
cd apps/vscode-e2e && pnpm test:ci

pnpm --filter @roo-code/vscode-e2e test:ci

pnpm clean && \
pnpm vsix -- --out ../bin/roo-code.vsix && \
code --install-extension bin/roo-code.vsix

pnpm clean && \
pnpm vsix:nightly -- --out ../../../bin/roo-code-nightly.vsix && \
code --install-extension bin/roo-code-nightly.vsix
```

### Turborepo

Note that this excludes the `build` task for next.js apps (@roo-code/web-\*).

Tasks: `build` -> `bundle` -> `vsix`

build:

- `@roo-code/build` [input: src, package.json, tsconfig.json | output: dist]
- `@roo-code/types` [input: src, package.json, tsconfig.json, tsup.config.ts | output: dist]
- `@roo-code/webview-ui` [input: src, package.json, tsconfig.json, vite.config.ts | output: ../src/webview-ui]

bundle:

- `roo-cline` [input: * | output: dist]

vsix:

- `roo-cline` [input: dist | output: bin]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Changes to the webview will appear immediately. Changes to the core extension wi
Alternatively you can build a .vsix and install it directly in VSCode:

```sh
pnpm build
pnpm vsix
```

A `.vsix` file will appear in the `bin/` directory which can be installed with:
Expand Down
5 changes: 2 additions & 3 deletions apps/vscode-nightly/esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ async function main() {
console.log(`[${name}] buildDir: ${buildDir}`)
console.log(`[${name}] distDir: ${distDir}`)

// Clean build directory before starting new build
if (fs.existsSync(buildDir)) {
console.log(`[${name}] Cleaning build directory: ${buildDir}`)
if (fs.existsSync(distDir)) {
console.log(`[${name}] Cleaning dist directory: ${distDir}`)
fs.rmSync(buildDir, { recursive: true, force: true })
}

Expand Down
15 changes: 15 additions & 0 deletions apps/vscode-nightly/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"bundle:nightly": {
"dependsOn": ["^build", "@roo-code/vscode-webview#build:nightly"],
"outputs": ["build/**"]
},
"vsix:nightly": {
"dependsOn": ["bundle:nightly"],
"inputs": ["build/**"],
"outputs": ["../../../bin/**"]
}
}
}
5 changes: 4 additions & 1 deletion apps/web-evals/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import type { NextConfig } from "next"

const nextConfig: NextConfig = {
/* config options here */
webpack: (config) => {
config.resolve.extensionAlias = { ".js": [".ts", ".tsx", ".js", ".jsx"] }
return config
},
}

export default nextConfig
3 changes: 2 additions & 1 deletion apps/web-evals/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@roo-code/web-evals",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"lint": "next lint",
"check-types": "tsc -b",
Expand Down
10 changes: 10 additions & 0 deletions apps/web-evals/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"outputs": [".next/**"],
"inputs": ["src/**", "package.json", "tsconfig.json", "next.config.ts"]
}
}
}
10 changes: 10 additions & 0 deletions apps/web-roo-code/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"outputs": [".next/**"],
"inputs": ["src/**", "package.json", "tsconfig.json", "next.config.ts"]
}
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"check-types": "turbo check-types --log-order grouped --output-logs new-only",
"test": "turbo test --log-order grouped --output-logs new-only",
"format": "turbo format --log-order grouped --output-logs new-only",
"build": "turbo build --log-order grouped --output-logs new-only",
"bundle": "turbo bundle --log-order grouped --output-logs new-only",
"bundle:nightly": "turbo bundle:nightly --log-order grouped --output-logs new-only",
"build": "turbo vsix --log-order grouped --output-logs new-only",
"build:nightly": "turbo vsix:nightly --log-order grouped --output-logs new-only",
"vsix": "turbo vsix --log-order grouped --output-logs new-only",
"vsix:nightly": "turbo vsix:nightly --log-order grouped --output-logs new-only",
"clean": "turbo clean --log-order grouped --output-logs new-only && rimraf dist out bin .vite-port .turbo",
"changeset:version": "cp CHANGELOG.md src/CHANGELOG.md && changeset version && cp -vf src/CHANGELOG.md .",
"knip": "knip --include files",
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
"publish:marketplace": "vsce publish --no-dependencies && ovsx publish --no-dependencies",
"watch:bundle": "pnpm bundle --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"clean": "rimraf README.md CHANGELOG.md LICENSE dist webview-ui out mock .turbo"
"clean": "rimraf README.md CHANGELOG.md LICENSE dist mock .turbo"
},
"dependencies": {
"@anthropic-ai/bedrock-sdk": "^0.10.2",
Expand Down
19 changes: 19 additions & 0 deletions src/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"bundle": {
"dependsOn": ["^build", "@roo-code/vscode-webview#build"],
"outputs": ["dist/**"]
},
"vsix": {
"dependsOn": ["bundle"],
"inputs": ["dist/**"],
"outputs": ["../bin/**"]
},
"watch:bundle": {
"dependsOn": ["@roo-code/build#build", "@roo-code/types#build"],
"cache": false
}
}
}
23 changes: 1 addition & 22 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,7 @@
},
"build": {
"outputs": ["dist/**"],
"inputs": ["src/**", "package.json", "tsconfig.json", "tsup.config.ts"]
},
"build:nightly": {},
"bundle": {
"dependsOn": ["^build"],
"cache": false
},
"bundle:nightly": {
"dependsOn": ["^build"],
"cache": false
},
"vsix": {
"dependsOn": ["bundle", "@roo-code/vscode-webview#build"],
"cache": false
},
"vsix:nightly": {
"dependsOn": ["bundle:nightly", "@roo-code/vscode-webview#build:nightly"],
"cache": false
},
"watch:bundle": {
"dependsOn": ["@roo-code/build#build", "@roo-code/types#build"],
"cache": false
"inputs": ["src/**", "package.json", "tsconfig.json", "tsup.config.ts", "vite.config.ts"]
},
"watch:tsc": {
"cache": false
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"clean": "rimraf build tsconfig.tsbuildinfo .turbo"
"clean": "rimraf ../src/webview-ui/build ../apps/vscode-nightly/build/webview-ui tsconfig.tsbuildinfo .turbo"
},
"dependencies": {
"@radix-ui/react-alert-dialog": "^1.1.6",
Expand Down
12 changes: 12 additions & 0 deletions webview-ui/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"outputs": ["../src/webview-ui/**"]
},
"build:nightly": {
"outputs": ["../apps/vscode-nightly/build/webview-ui/**"]
}
}
}