Skip to content

Commit cbd2a16

Browse files
committed
Monorepo
1 parent c3716f1 commit cbd2a16

File tree

85 files changed

+24396
-50060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+24396
-50060
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
demo.gif filter=lfs diff=lfs merge=lfs -text
22
assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text
3+
src/assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text

.github/workflows/changeset-release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ env:
1010
REPO_PATH: ${{ github.repository }}
1111
GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }}
1212
NODE_VERSION: 20.18.1
13+
PNPM_VERSION: 10.8.1
1314

1415
jobs:
1516
# Job 1: Create version bump PR when changesets are merged to main
@@ -30,15 +31,18 @@ jobs:
3031
with:
3132
fetch-depth: 0
3233
ref: ${{ env.GIT_REF }}
33-
34+
- name: Install pnpm
35+
uses: pnpm/action-setup@v4
36+
with:
37+
version: ${{ env.PNPM_VERSION }}
3438
- name: Setup Node.js
3539
uses: actions/setup-node@v4
3640
with:
3741
node-version: ${{ env.NODE_VERSION }}
38-
cache: 'npm'
42+
cache: 'pnpm'
3943

4044
- name: Install Dependencies
41-
run: npm run install:all
45+
run: pnpm install
4246

4347
# Check if there are any new changesets to process
4448
- name: Check for changesets
@@ -56,7 +60,7 @@ jobs:
5660
with:
5761
commit: "changeset version bump"
5862
title: "Changeset version bump"
59-
version: npm run version-packages # This performs the changeset version bump
63+
version: pnpm --filter roo-cline version-packages # This performs the changeset version bump
6064
env:
6165
GITHUB_TOKEN: ${{ secrets.CROSS_REPO_ACCESS_TOKEN }}
6266

.github/workflows/code-qa.yml

Lines changed: 48 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,46 @@ on:
1010

1111
env:
1212
NODE_VERSION: 20.18.1
13+
PNPM_VERSION: 10.8.1
1314

1415
jobs:
1516
compile:
1617
runs-on: ubuntu-latest
1718
steps:
1819
- name: Checkout code
1920
uses: actions/checkout@v4
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: ${{ env.PNPM_VERSION }}
2025
- name: Setup Node.js
2126
uses: actions/setup-node@v4
2227
with:
2328
node-version: ${{ env.NODE_VERSION }}
24-
cache: 'npm'
29+
cache: 'pnpm'
2530
- name: Install dependencies
26-
run: npm run install:all
27-
- name: Compile
28-
run: npm run compile
31+
run: pnpm install
2932
- name: Check types
30-
run: npm run check-types
33+
run: pnpm check-types
3134
- name: Lint
32-
run: npm run lint
35+
run: pnpm lint
3336

3437
check-translations:
3538
runs-on: ubuntu-latest
3639
steps:
3740
- name: Checkout code
3841
uses: actions/checkout@v4
42+
- name: Install pnpm
43+
uses: pnpm/action-setup@v4
44+
with:
45+
version: ${{ env.PNPM_VERSION }}
3946
- name: Setup Node.js
4047
uses: actions/setup-node@v4
4148
with:
42-
node-version: '18'
43-
cache: 'npm'
49+
node-version: ${{ env.NODE_VERSION }}
50+
cache: 'pnpm'
4451
- name: Install dependencies
45-
run: npm run install:all
52+
run: pnpm install
4653
- name: Verify all translations are complete
4754
run: node scripts/find-missing-translations.js
4855

@@ -51,15 +58,19 @@ jobs:
5158
steps:
5259
- name: Checkout code
5360
uses: actions/checkout@v4
61+
- name: Install pnpm
62+
uses: pnpm/action-setup@v4
63+
with:
64+
version: ${{ env.PNPM_VERSION }}
5465
- name: Setup Node.js
5566
uses: actions/setup-node@v4
5667
with:
57-
node-version: '18'
58-
cache: 'npm'
68+
node-version: ${{ env.NODE_VERSION }}
69+
cache: 'pnpm'
5970
- name: Install dependencies
60-
run: npm run install:all
71+
run: pnpm install
6172
- name: Run knip checks
62-
run: npm run knip
73+
run: pnpm knip
6374

6475
test-extension:
6576
runs-on: ${{ matrix.os }}
@@ -69,19 +80,20 @@ jobs:
6980
steps:
7081
- name: Checkout code
7182
uses: actions/checkout@v4
83+
- name: Install pnpm
84+
uses: pnpm/action-setup@v4
85+
with:
86+
version: ${{ env.PNPM_VERSION }}
7287
- name: Setup Node.js
7388
uses: actions/setup-node@v4
7489
with:
7590
node-version: ${{ env.NODE_VERSION }}
76-
cache: 'npm'
91+
cache: 'pnpm'
7792
- name: Install dependencies
78-
run: npm run install:all
79-
- name: Compile (to build and copy WASM files)
80-
run: npm run compile
81-
- name: Run jest unit tests
82-
run: npx jest --silent
83-
- name: Run vitest unit tests
84-
run: npx vitest run --silent
93+
run: pnpm install
94+
- name: Run unit tests
95+
working-directory: src
96+
run: pnpm test
8597

8698
test-webview:
8799
runs-on: ${{ matrix.os }}
@@ -91,16 +103,20 @@ jobs:
91103
steps:
92104
- name: Checkout code
93105
uses: actions/checkout@v4
106+
- name: Install pnpm
107+
uses: pnpm/action-setup@v4
108+
with:
109+
version: ${{ env.PNPM_VERSION }}
94110
- name: Setup Node.js
95111
uses: actions/setup-node@v4
96112
with:
97-
node-version: '18'
98-
cache: 'npm'
113+
node-version: ${{ env.NODE_VERSION }}
114+
cache: 'pnpm'
99115
- name: Install dependencies
100-
run: npm run install:all
116+
run: pnpm install
101117
- name: Run unit tests
102118
working-directory: webview-ui
103-
run: npx jest --silent
119+
run: pnpm test
104120

105121
unit-test:
106122
needs: [test-extension, test-webview]
@@ -131,16 +147,20 @@ jobs:
131147
steps:
132148
- name: Checkout code
133149
uses: actions/checkout@v4
150+
- name: Install pnpm
151+
uses: pnpm/action-setup@v4
152+
with:
153+
version: ${{ env.PNPM_VERSION }}
134154
- name: Setup Node.js
135155
uses: actions/setup-node@v4
136156
with:
137157
node-version: ${{ env.NODE_VERSION }}
138-
cache: 'npm'
158+
cache: 'pnpm'
139159
- name: Install dependencies
140-
run: npm run install:all
160+
run: pnpm install
141161
- name: Create .env.local file
142162
working-directory: e2e
143163
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.local
144164
- name: Run integration tests
145165
working-directory: e2e
146-
run: xvfb-run -a npm run ci
166+
run: xvfb-run -a pnpm test:ci

.github/workflows/marketplace-publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,21 @@ jobs:
2929
git config user.name "github-actions[bot]"
3030
git config user.email "github-actions[bot]@users.noreply.github.com"
3131
- name: Install Dependencies
32-
run: npm run install:all
32+
run: pnpm install
3333
- name: Create .env file
3434
run: echo "POSTHOG_API_KEY=${{ secrets.POSTHOG_API_KEY }}" >> .env
3535
- name: Package Extension
3636
run: |
3737
current_package_version=$(node -p "require('./package.json').version")
38-
npm run vsix
38+
pnpm vsix
3939
package=$(unzip -l bin/roo-cline-${current_package_version}.vsix)
4040
echo "$package"
41-
echo "$package" | grep -q "dist/extension.js" || exit 1
41+
echo "$package" | grep -q "extension/dist/package.json" || exit 1
42+
echo "$package" | grep -q "extension/dist/package.nls.json" || exit 1
43+
echo "$package" | grep -q "extension/dist/extension.js" || exit 1
4244
echo "$package" | grep -q "extension/webview-ui/build/assets/index.js" || exit 1
43-
echo "$package" | grep -q "extension/node_modules/@vscode/codicons/dist/codicon.ttf" || exit 1
45+
echo "$package" | grep -q "extension/assets/codicons/codicon.ttf" || exit 1
46+
echo "$package" | grep -q "extension/assets/vscode-material-icons/icons/3d.svg" || exit 1
4447
echo "$package" | grep -q ".env" || exit 1
4548
- name: Create and Push Git Tag
4649
run: |
@@ -54,7 +57,7 @@ jobs:
5457
OVSX_PAT: ${{ secrets.OVSX_PAT }}
5558
run: |
5659
current_package_version=$(node -p "require('./package.json').version")
57-
npm run publish:marketplace
60+
pnpm publish:marketplace
5861
echo "Successfully published version $current_package_version to VS Code Marketplace"
5962
- name: Create GitHub Release
6063
env:

.github/workflows/update-contributors.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
- main
77
workflow_dispatch: # Allows manual triggering
88

9+
env:
10+
NODE_VERSION: 20.18.1
11+
PNPM_VERSION: 10.8.1
12+
913
jobs:
1014
update-contributors:
1115
runs-on: ubuntu-latest
@@ -15,30 +19,29 @@ jobs:
1519
steps:
1620
- name: Checkout code
1721
uses: actions/checkout@v4
18-
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: ${{ env.PNPM_VERSION }}
1926
- name: Setup Node.js
2027
uses: actions/setup-node@v4
2128
with:
22-
node-version: '18'
23-
cache: 'npm'
24-
29+
node-version: ${{ env.NODE_VERSION }}
30+
cache: 'pnpm'
2531
- name: Disable Husky
2632
run: |
2733
echo "HUSKY=0" >> $GITHUB_ENV
2834
git config --global core.hooksPath /dev/null
29-
3035
- name: Install dependencies
31-
run: npm ci
32-
36+
run: pnpm install
3337
- name: Update contributors and format
3438
run: |
35-
npm run update-contributors
39+
pnpm update-contributors
3640
npx prettier --write README.md
3741
if git diff --quiet; then echo "changes=false" >> $GITHUB_OUTPUT; else echo "changes=true" >> $GITHUB_OUTPUT; fi
3842
id: check-changes
3943
env:
4044
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
4245
- name: Create Pull Request
4346
if: steps.check-changes.outputs.changes == 'true'
4447
uses: peter-evans/create-pull-request@v5
@@ -51,6 +54,6 @@ jobs:
5154
title: "Update contributors list"
5255
body: |
5356
Automated update of contributors list and related files
54-
57+
5558
This PR was created automatically by a GitHub Action workflow and includes all changed files.
5659
base: main

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ docs/_site/
3131
!.env.*.sample
3232

3333

34-
#Local lint config
34+
# Local lint config
3535
.eslintrc.local.json
3636

37-
#Logging
37+
# Logging
3838
logs
3939

4040
# Vite development
4141
.vite-port
4242

43+
# Turborepo
44+
.turbo
45+
4346
# IntelliJ and Qodo plugin folders
4447
.idea/
4548
.qodo/

.husky/pre-commit

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,26 @@ if [ "$branch" = "main" ]; then
55
exit 1
66
fi
77

8-
# Detect if running on Windows and use npx.cmd, otherwise use npx
8+
# Detect if running on Windows and use pnpm.cmd, otherwise use pnpm.
99
if [ "$OS" = "Windows_NT" ]; then
10-
npx_cmd="npx.cmd"
10+
pnpm_cmd="pnpm.cmd"
1111
else
12-
npx_cmd="npx"
12+
pnpm_cmd="pnpm"
1313
fi
1414

15-
npm run generate-types
15+
"$pnpm_cmd" --filter roo-cline generate-types
1616

1717
if [ -n "$(git diff --name-only src/exports/roo-code.d.ts)" ]; then
18-
echo "Error: There are unstaged changes to roo-code.d.ts after running 'npm run generate-types'."
18+
echo "Error: There are unstaged changes to roo-code.d.ts after running 'pnpm --filter roo-cline generate-types'."
1919
echo "Please review and stage the changes before committing."
2020
exit 1
2121
fi
2222

23+
# Detect if running on Windows and use npx.cmd, otherwise use npx.
24+
if [ "$OS" = "Windows_NT" ]; then
25+
npx_cmd="npx.cmd"
26+
else
27+
npx_cmd="npx"
28+
fi
29+
2330
"$npx_cmd" lint-staged

.husky/pre-push

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ if [ "$branch" = "main" ]; then
55
exit 1
66
fi
77

8-
# Detect if running on Windows and use npm.cmd, otherwise use npm
8+
# Detect if running on Windows and use pnpm.cmd, otherwise use pnpm.
99
if [ "$OS" = "Windows_NT" ]; then
10-
npm_cmd="npm.cmd"
10+
pnpm_cmd="pnpm.cmd"
1111
else
12-
npm_cmd="npm"
12+
pnpm_cmd="pnpm"
1313
fi
1414

15-
"$npm_cmd" run compile
15+
"$pnpm_cmd" run lint check-types
1616

1717
# Check for new changesets.
1818
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
1919
echo "Changeset files: $NEW_CHANGESETS"
2020

2121
if [ "$NEW_CHANGESETS" == "0" ]; then
2222
echo "-------------------------------------------------------------------------------------"
23-
echo "Changes detected. Please run 'npm run changeset' to create a changeset if applicable."
23+
echo "Changes detected. Please run 'pnpm changeset' to create a changeset if applicable."
2424
echo "-------------------------------------------------------------------------------------"
2525
fi

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)