Skip to content

Commit 8d4e889

Browse files
committed
More npm -> pnpm
1 parent e167f94 commit 8d4e889

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed

browser-extension/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
### Hotreload development
66

7-
- `npm install`
8-
- `npm run dev`
7+
- `pnpm install`
8+
- `pnpm run dev`
99
- open [`chrome://extensions`](chrome://extensions)
1010
- toggle **Developer mode** (top-right)
1111
- click "Load unpacked" (far left)
@@ -14,15 +14,15 @@
1414
- click the puzzle icon next to the url bar, then pin the Gitcasso icon
1515

1616
### Testing and quality
17-
- `npm run biome` - runs `biome check` (lint & formatting)
18-
- `npm run biome:fix` - fixes most of what `biome check` finds
19-
- `npm run compile` - typechecking
20-
- `npm test` - vitest
21-
- `npm test -- -u` updates all the snapshots
17+
- `pnpm run biome` - runs `biome check` (lint & formatting)
18+
- `pnpm run biome:fix` - fixes most of what `biome check` finds
19+
- `pnpm run compile` - typechecking
20+
- `pnpm test` - vitest
21+
- `pnpm test -- -u` updates all the snapshots
2222

2323
### Deployment
24-
- `npm run build` - build for mv3 for most browsers
25-
- `npm run build:firefox` - build mv2 specifically for Firefox
24+
- `pnpm run build` - build for mv3 for most browsers
25+
- `pnpm run build:firefox` - build mv2 specifically for Firefox
2626

2727
## How it works
2828

@@ -48,15 +48,15 @@ When the `textarea` gets removed from the page, the `TextareaRegistry` is notifi
4848

4949
In `tests/har` there are various `.har` files. These are complete recordings of a single page load.
5050

51-
- `npm run har:view` and you can see the recordings, with or without our browser extension.
51+
- `pnpm run har:view` and you can see the recordings, with or without our browser extension.
5252

5353
### Recording new HAR files
5454

5555
- you can add or change URLs in `tests/har-index.ts`
5656
- `npx playwright codegen https://github.com/login --save-storage=playwright/.auth/gh.json` will store new auth tokens
5757
- login manually, then close the browser
5858
- ***these cookies are very sensitive! we only run this script using a test account that has no permissions or memberships to anything, recommend you do the same!***
59-
- `npm run har:record` this records new snapshots using those auth tokens (it needs args, run it with no args for docs)
59+
- `pnpm run har:record` this records new snapshots using those auth tokens (it needs args, run it with no args for docs)
6060
- DO NOT COMMIT AND PUSH NEW OR CHANGED `har` files!
6161
- we try to sanitize these (see `har-record.ts` for details) but there may be important PII in them
6262
- if you need new HAR files for something, let us know and we will generate them ourselves using a dummy account

browser-extension/tests/har-record.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ async function sanitize(filename: string) {
9191
for (const [name] of Object.entries(PAGES)) {
9292
console.log(` ${name}`)
9393
}
94-
console.log('\nUsage: npm run har:record <pattern>')
94+
console.log('\nUsage: pnpm run har:record <pattern>')
9595
console.log('Examples:')
96-
console.log(' npm run har:record "*" # Record all')
97-
console.log(' npm run har:record "github_*" # Record all github_*')
98-
console.log(' npm run har:record "github_issue" # Record specific target')
96+
console.log(' pnpm run har:record "*" # Record all')
97+
console.log(' pnpm run har:record "github_*" # Record all github_*')
98+
console.log(' pnpm run har:record "github_issue" # Record specific target')
9999
return
100100
}
101101

browser-extension/tests/har-view.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ app.post('/rebuild', async (_req, res) => {
250250
try {
251251
console.log('Rebuild triggered via API')
252252

253-
// Run npx wxt build --mode development
254-
const buildProcess = spawn('npx', ['wxt', 'build', '--mode', 'development'], {
255-
cwd: path.join(__dirname, '..'),
253+
// Run pnpm run rebuild:dev
254+
const buildProcess = spawn('pnpm', ['run', 'rebuild:dev'], {
255+
cwd: path.join(__dirname, '..', '..'),
256256
stdio: ['pipe', 'pipe', 'pipe'],
257257
})
258258

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"build:overtype": "pnpm --filter=overtype run build",
66
"build:browser-extension": "pnpm --filter=gitcasso run compile",
77
"build": "pnpm run build:overtype && pnpm run build:browser-extension",
8+
"rebuild:dev": "pnpm run build:overtype && pnpm --filter=gitcasso exec wxt build --mode development",
89
"postinstall": "pnpm run build:overtype"
910
}
1011
}

0 commit comments

Comments
 (0)