Skip to content

Commit 2c4fb71

Browse files
Merge pull request #8036 from BloomBooks/pnpm
Switch front-end from yarn to pnpm; volta to vite-plus (#8036) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 parents 55babf1 + c40cbc5 commit 2c4fb71

80 files changed

Lines changed: 29212 additions & 17320 deletions

File tree

Some content is hidden

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

.claude/skills/run-bloom/SKILL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ verified quick path.
1818

1919
## Prerequisites
2020

21-
Dev machines already have: volta (provides node + yarn 1.22), .NET SDK 10,
22-
WebView2 runtime. On a machine missing dependencies, run `./init.sh`
23-
(fetches C# deps, yarn installs, initial `yarn build`) — documented but not
24-
re-verified here; a failed C# build with CS0246 errors (missing
25-
`PodcastUtilities` etc.) means `./init.sh` is needed.
21+
Dev machines already have: node 22 + pnpm 11.5.2 (see .node-version and the
22+
packageManager field), .NET SDK 10, WebView2 runtime. On a machine missing
23+
dependencies, run `./init.sh` (fetches C# deps, pnpm installs, initial
24+
`pnpm build`) — documented but not re-verified here; a failed C# build with
25+
CS0246 errors (missing `PodcastUtilities` etc.) means `./init.sh` is needed.
2626

27-
Never run `yarn build` while a watch/dev build is running (see AGENTS.md).
27+
Never run `pnpm build` while a watch/dev build is running (see AGENTS.md).
2828
Never launch a previously built `Bloom.exe` directly — it can be stale.
2929

3030
## Step 1: Is Bloom already running?
@@ -160,5 +160,5 @@ the whole flow down.
160160
Exe-backed Playwright suite (not re-run this session; see
161161
`.github/skills/bloom-automation/SKILL.md` for detail): from
162162
`src/BloomBrowserUI/react_components/component-tester`,
163-
`BLOOM_HTTP_PORT=<httpPort> yarn playwright test --config playwright.bloom-exe.config.ts`.
164-
TypeScript unit tests: `yarn test` in `src/BloomBrowserUI` (Vitest).
163+
`BLOOM_HTTP_PORT=<httpPort> pnpm playwright test --config playwright.bloom-exe.config.ts`.
164+
TypeScript unit tests: `pnpm test` in `src/BloomBrowserUI` (Vitest).

.claude/skills/run-bloom/screenshotBloom.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const loadPlaywright = () => {
100100
} catch (error) {
101101
const message = error instanceof Error ? error.message : String(error);
102102
throw new Error(
103-
`Could not load Playwright from ${componentTesterDir}. Run 'yarn install' in src/BloomBrowserUI/react_components/component-tester if dependencies are missing. Original error: ${message}`,
103+
`Could not load Playwright from ${componentTesterDir}. Run 'pnpm install' in src/BloomBrowserUI/react_components/component-tester if dependencies are missing. Original error: ${message}`,
104104
);
105105
}
106106
};

.github/skills/bloom-automation/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Notes:
147147
6. Use `node .github/skills/bloom-automation/switchWorkspaceTab.mjs --http-port <httpPort> --tab <collection|edit|publish>` for top bar interactions, or attach another confirmed client to `http://localhost:<cdpPort>` if you need lower-level inspection.
148148
7. Manipulate the UI by clicking or typing in the attached browser context. Do not use Bloom API endpoints to simulate the user action itself.
149149
8. Use browser-native inspection for DOM, console, and network.
150-
9. If the task is test-related, run the exe-backed Playwright suite with `BLOOM_HTTP_PORT=<httpPort> yarn playwright test --config playwright.bloom-exe.config.ts`.
150+
9. If the task is test-related, run the exe-backed Playwright suite with `BLOOM_HTTP_PORT=<httpPort> pnpm exec playwright test --config playwright.bloom-exe.config.ts`.
151151

152152
## Running Bloom Workflow
153153
Use this when the user says to reuse the already-running Bloom.
@@ -217,8 +217,8 @@ Reason: the current MCP wrappers in this environment control their own browser i
217217

218218
## Tests
219219
- Run from `src/BloomBrowserUI/react_components/component-tester`.
220-
- Use `BLOOM_HTTP_PORT=<httpPort> yarn playwright test --config playwright.bloom-exe.config.ts`.
221-
- Run one file with `BLOOM_HTTP_PORT=<httpPort> yarn playwright test --config playwright.bloom-exe.config.ts ../TopBar/component-tests/bloom-exe-tabs.uitest.ts`.
220+
- Use `BLOOM_HTTP_PORT=<httpPort> pnpm exec playwright test --config playwright.bloom-exe.config.ts`.
221+
- Run one file with `BLOOM_HTTP_PORT=<httpPort> pnpm exec playwright test --config playwright.bloom-exe.config.ts ../TopBar/component-tests/bloom-exe-tabs.uitest.ts`.
222222

223223
These tests attach to the real Bloom.exe target over CDP and verify tab switching plus console and network observation.
224224

.github/skills/bloom-automation/dismissProblemDialog.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const loadPlaywright = () => {
111111
} catch (error) {
112112
const message = error instanceof Error ? error.message : String(error);
113113
throw new Error(
114-
`Could not load Playwright from ${componentTesterDir}. Run 'yarn install' there if dependencies are missing. Original error: ${message}`,
114+
`Could not load Playwright from ${componentTesterDir}. Run 'pnpm install' there if dependencies are missing. Original error: ${message}`,
115115
);
116116
}
117117
};

.github/skills/bloom-automation/switchWorkspaceTab.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const loadPlaywright = () => {
128128
} catch (error) {
129129
const message = error instanceof Error ? error.message : String(error);
130130
throw new Error(
131-
`Could not load Playwright from ${componentTesterDir}. Run 'yarn install' in src/BloomBrowserUI/react_components/component-tester if dependencies are missing. Original error: ${message}`,
131+
`Could not load Playwright from ${componentTesterDir}. Run 'pnpm install' in src/BloomBrowserUI/react_components/component-tester if dependencies are missing. Original error: ${message}`,
132132
);
133133
}
134134
};

.github/skills/bloom-canvas-e2e-testing/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ Use the `src/BloomBrowserUI` package and run the canvas suite via the root e2e s
3030

3131
1) Install once (or when deps change):
3232
- `cd src/BloomBrowserUI`
33-
- `yarn install`
33+
- `pnpm install`
3434

3535
2) Run one canvas test:
3636
- `cd src/BloomBrowserUI`
37-
- `yarn e2e canvas specs/01-toolbox-drag-to-canvas.spec.ts`
37+
- `pnpm e2e canvas specs/01-toolbox-drag-to-canvas.spec.ts`
3838

3939
3) Run the full canvas suite:
4040
- `cd src/BloomBrowserUI`
41-
- `yarn e2e canvas`
41+
- `pnpm e2e canvas`
4242

4343
## Frame model (critical)
4444
Bloom Edit Tab has multiple iframes. Use frame names first:
@@ -89,7 +89,7 @@ A valid non-trivial proof test should:
8989

9090
## Troubleshooting
9191
- If test says "No tests found": verify path filter is relative to the config `testDir`.
92-
- If command says `playwright: not found`: run `yarn install` in `src/BloomBrowserUI`.
92+
- If command says `playwright: not found`: run `pnpm install` in `src/BloomBrowserUI`.
9393
- If canvas waits time out: confirm you selected the `page` frame, not top frame.
9494
- If canvas tab click times out: check whether Canvas controls are already visible and skip click in that case.
9595

.github/skills/edit-bloom-book/validateBloomBook.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const loadJSDOM = () => {
2222
} catch (error) {
2323
const details = error instanceof Error ? error.message : String(error);
2424
console.error(
25-
"Failed to load jsdom from src/BloomBrowserUI. Run yarn in src/BloomBrowserUI if dependencies are missing.",
25+
"Failed to load jsdom from src/BloomBrowserUI. Run pnpm install in src/BloomBrowserUI if dependencies are missing.",
2626
);
2727
console.error(details);
2828
process.exitCode = 2;

.github/workflows/pr-automation.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ jobs:
4141
node-version: lts/*
4242

4343
- name: Install Playwright driver (no browser download)
44+
# npm (not pnpm) is deliberate here: this job runs without a repo checkout,
45+
# so the repo's pnpm policy doesn't apply. It only needs playwright-core in
46+
# a throwaway directory on the runner, and npm is preinstalled there.
4447
run: |
45-
yarn init -y
46-
yarn add playwright-core
48+
npm init -y
49+
npm install playwright-core
4750
4851
- name: Open the devinreview.com URL in a real (headless) browser
4952
env:

.gitignore

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ DistFiles/IntegrityFailureAdvice-*.htm
135135
DistFiles/infoPages/TrainingVideos-*.htm
136136
DistFiles/localization/*.htm
137137

138-
src/BloomBrowserUI/yarn-error\.log
138+
pnpm-debug.log*
139139

140140
src/BloomExe/Firefox/
141141

@@ -178,22 +178,8 @@ src/BloomBrowserUI/templates/template books/Activity/domActivities.css
178178

179179
src/BloomBrowserUI/templates/template books/Activity/choiceActivities.css
180180

181-
# per https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
182-
src/BloomBrowserUI/.pnp.*
183-
src/BloomBrowserUI/.yarn/*
184-
!src/BloomBrowserUI/.yarn/patches
185-
!src/BloomBrowserUI/.yarn/plugins
186-
!src/BloomBrowserUI/.yarn/releases
187-
!src/BloomBrowserUI/.yarn/sdks
188-
!src/BloomBrowserUI/.yarn/versions
189-
190-
src/content/.pnp.*
191-
src/content/.yarn/*
192-
!src/content/.yarn/patches
193-
!src/content/.yarn/plugins
194-
!src/content/.yarn/releases
195-
!src/content/.yarn/sdks
196-
!src/content/.yarn/versions
181+
# pnpm's per-project store / state; the committed pnpm-lock.yaml files are NOT ignored.
182+
.pnpm-store/
197183

198184
.github/copilot-instructions.md
199185

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.21.1

0 commit comments

Comments
 (0)