Skip to content

Commit 763acaf

Browse files
committed
fix potential mem leak, pnpm, prompts session typeof
1 parent 64d70df commit 763acaf

File tree

13 files changed

+107
-6464
lines changed

13 files changed

+107
-6464
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ jobs:
1515
uses: actions/setup-node@v4
1616
with:
1717
node-version: '22'
18-
cache: 'npm'
18+
cache: 'pnpm'
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 8
1923
- name: Install dependencies
20-
run: npm ci
21-
- run: npm run build
24+
run: pnpm install --frozen-lockfile
25+
- run: pnpm run build
2226
- name: Run ESLint
23-
run: npm run lint
27+
run: pnpm run lint
2428
- name: Ensure no changes
2529
run: git diff --exit-code

.github/workflows/publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ jobs:
1414
with:
1515
node-version: 22
1616
registry-url: https://registry.npmjs.org/
17-
- run: npm ci
18-
- run: npm run build
19-
- run: npm publish --provenance
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v4
19+
with:
20+
version: 8
21+
- run: pnpm install --frozen-lockfile
22+
- run: pnpm run build
23+
- run: pnpm publish --provenance
2024
env:
2125
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Use pnpm for package management
2+
engine-strict=true
3+
auto-install-peers=true
4+
strict-peer-dependencies=false

README.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ This server provides cloud browser automation capabilities using [Browserbase](h
2525

2626
[Smithery](https://smithery.ai/server/@browserbasehq/mcp-browserbase)
2727

28+
## Prerequisites
29+
30+
This project uses [pnpm](https://pnpm.io/) as the package manager. If you don't have pnpm installed, you can install it via:
31+
32+
```bash
33+
npm install -g pnpm
34+
# or
35+
curl -fsSL https://get.pnpm.io/install.sh | sh
36+
```
37+
2838
## How to Setup
2939

3040
### Quickstarts:
@@ -62,7 +72,7 @@ git clone https://github.com/browserbase/mcp-server-browserbase.git
6272
cd mcp-server-browserbase
6373

6474
# Install the dependencies and build the project
65-
npm install && npm run build
75+
pnpm install && pnpm build
6676
```
6777

6878
Then in your MCP Config JSON run the server. To run locally we can use STDIO or self-host SHTTP.
@@ -112,6 +122,54 @@ Then in your MCP Config JSON file put the following:
112122

113123
Then reload your MCP client and you should be good to go!
114124

125+
## Development
126+
127+
### Getting Started
128+
129+
1. **Clone the repository:**
130+
131+
```bash
132+
git clone https://github.com/browserbase/mcp-server-browserbase.git
133+
cd mcp-server-browserbase
134+
```
135+
136+
2. **Install dependencies:**
137+
138+
```bash
139+
pnpm install
140+
```
141+
142+
3. **Build the project:**
143+
144+
```bash
145+
pnpm run build
146+
```
147+
148+
4. **Run in development mode:**
149+
```bash
150+
pnpm run watch
151+
```
152+
153+
### Available Scripts
154+
155+
- `pnpm build` - Build the TypeScript project
156+
- `pnpm watch` - Watch for changes and rebuild
157+
- `pnpm lint` - Run ESLint
158+
- `pnpm prettier:check` - Check code formatting
159+
- `pnpm prettier:fix` - Fix code formatting
160+
- `pnpm clean` - Clean build artifacts
161+
- `pnpm publish` - Build and publish to npm registry
162+
163+
### Publishing
164+
165+
To publish a new version:
166+
167+
```bash
168+
pnpm run publish
169+
```
170+
171+
This will clean, build, and publish the package using pnpm's built-in publishing capabilities.
172+
115173
## Configuration
116174

117175
The Browserbase MCP server accepts the following command-line flags:

0 commit comments

Comments
 (0)