Skip to content

Commit 4afe729

Browse files
committed
chore: migrate yarn v1 to pnpm v10
1 parent 7bc9f09 commit 4afe729

File tree

18 files changed

+11992
-9667
lines changed

18 files changed

+11992
-9667
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
# Only set ownership on our package management files to help with dependabot updates
55
package.json @ably/team-website
6-
yarn.lock @ably/team-website
6+
pnpm-lock.yaml @ably/team-website

.github/workflows/push.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ jobs:
2222
uses: actions/setup-node@v4
2323
with:
2424
node-version: 20
25+
- uses: pnpm/action-setup@v4
26+
with:
27+
version: latest
2528
- name: Install dependencies
26-
run: yarn && npx playwright install --with-deps
29+
run: pnpm install && npx playwright install --with-deps
2730
- name: Lint
2831
uses: wearerequired/lint-action@v2
2932
with:
@@ -35,4 +38,4 @@ jobs:
3538
prettier_extensions: js,ts,tsx
3639
prettier_auto_fix: false
3740
- name: Run Storybook test-runner
38-
run: yarn test
41+
run: pnpm test

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
- uses: actions/setup-node@v4
2222
with:
2323
node-version: 20
24-
- run: npm install -g yarn
24+
- uses: pnpm/action-setup@v4
25+
with:
26+
version: latest
2527
- name: Release latest Ably UI version
2628
env:
2729
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -42,7 +44,7 @@ jobs:
4244
- name: Checkout
4345
uses: actions/checkout@v4
4446
- name: Build
45-
run: yarn && yarn build-storybook
47+
run: pnpm install && pnpm build-storybook
4648
- name: Upload
4749
uses: actions/upload-pages-artifact@v3.0.1
4850
with:

.github/workflows/review.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ jobs:
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
25+
- uses: pnpm/action-setup@v4
26+
with:
27+
version: latest
2528
- name: Build
26-
run: yarn && yarn build-storybook
29+
run: pnpm install && pnpm build-storybook
2730
- name: Upload
2831
uses: actions/upload-pages-artifact@v3.0.1
2932
with:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.bundle
22
.DS_Store
33
node_modules
4-
yarn-error.log
4+
pnpm-debug.log*
5+
pnpm-error.log
56
/dist
67
/preview
78
/core

.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
2+
3+
# pnpm configuration
4+
auto-install-peers=true
5+
shamefully-hoist=false
6+
strict-peer-dependencies=false

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
nodejs 20.13.1
2-
yarn 1.22.22
2+
pnpm 10.12.4

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ npm install @ably/ui
3737

3838
# or
3939

40-
yarn add @ably/ui # Preferred
40+
pnpm add @ably/ui # Preferred
4141
```
4242

4343
To attach the imported JavaScript from the `Core` module to the `window` object:
@@ -211,11 +211,11 @@ An important part of ably-ui is ensuring the produced UI is accessible to as wid
211211

212212
To visualise the assets in `ably-ui`, there is a Storybook instance, which serves as both a showcase and a development environment.
213213

214-
Firstly, ensure you have all of the required project dependencies by running `yarn` in the project root.
214+
Firstly, ensure you have all of the required project dependencies by running `pnpm install` in the project root.
215215

216-
Then, to run Storybook, run `yarn storybook` in the project root - it should open automatically in your browser.
216+
Then, to run Storybook, run `pnpm storybook` in the project root - it should open automatically in your browser.
217217

218-
To build Storybook as if it was a statically built site (i.e. what it looks like when deployed), run `yarn build-storybook` from the project root, go to the generated directory with `cd preview`, and then run `npx http-server` (accepting the prompt to install that package if you haven't done already). The built site will be available at the listed local URL.
218+
To build Storybook as if it was a statically built site (i.e. what it looks like when deployed), run `pnpm build-storybook` from the project root, go to the generated directory with `cd preview`, and then run `npx http-server` (accepting the prompt to install that package if you haven't done already). The built site will be available at the listed local URL.
219219

220220
### SWC compile flags
221221

@@ -236,7 +236,7 @@ if (__DEBUG_MODE__) {
236236
The flag can be added to the list in `swc.config.ts`, and enabled with an environment variable:
237237

238238
```
239-
$ DEBUG_MODE=true yarn build
239+
$ DEBUG_MODE=true pnpm build
240240
```
241241

242242
### Publishing pre-release packages for review apps
@@ -349,6 +349,6 @@ This will release the packages and update library and create & push the commit &
349349

350350
`ably-ui` uses Storybook's `test-runner`, which on push automatically turns all stories into executable tests, underpinned by Jest and Playright. This means that we don't have to explicitly write tests for stories, though we have the ability to write [https://storybook.js.org/docs/writing-stories/play-function](play functions), which allow us to test more detailed interactions. More information on the capabilities of `test-runner` can be found [https://storybook.js.org/docs/writing-tests/test-runner](here).
351351

352-
Snapshots are also assessed via `test-runner`. To generate new snapshots, run `yarn test:update-snapshots`.
352+
Snapshots are also assessed via `test-runner`. To generate new snapshots, run `pnpm test:update-snapshots`.
353353

354-
You can run the tests by either running a dev instance of Storybook locally and then running `yarn test`, or by pushing a branch to GitHub.
354+
You can run the tests by either running a dev instance of Storybook locally and then running `pnpm test`, or by pushing a branch to GitHub.

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"devDependencies": {
2222
"@storybook/addon-essentials": "^8.6.14",
2323
"@storybook/addon-interactions": "^8.6.14",
24+
"@storybook/react": "^8.6.14",
2425
"@storybook/react-vite": "^8.6.14",
2526
"@storybook/test": "^8.6.14",
2627
"@storybook/test-runner": "^0.23.0",
@@ -69,20 +70,20 @@
6970
"build:tsc": "tsc && node tsc.js && rm -r types",
7071
"build:cleanup": "mv dist/* . && rm -r dist",
7172
"build:icons": "ts-node scripts/generate-icons.ts",
72-
"build": "yarn build:prebuild && yarn build:icons && yarn build:swc && yarn build:tsc && yarn build:cleanup",
73-
"watch": "yarn build:swc -w",
73+
"build": "pnpm build:prebuild && pnpm build:icons && pnpm build:swc && pnpm build:tsc && pnpm build:cleanup",
74+
"watch": "pnpm build:swc -w",
7475
"format:check": "prettier -c *.{js,ts} src/**/*.{js,ts,tsx,stories.tsx}",
7576
"format:write": "prettier -w *.{js,ts} src/**/*.{js,ts,tsx,stories.tsx}",
7677
"lint": "eslint *.{js,ts} src/**/*.{js,ts,tsx,stories.tsx}",
7778
"update:all": "./scripts/update-dependents.sh",
7879
"pre-release": "./scripts/pre-release.sh",
7980
"release": "./scripts/release.sh",
8081
"start": "vite --port 5000",
81-
"storybook": "yarn build && storybook dev -p 6006",
82-
"build-storybook": "yarn build && storybook build --quiet -o preview",
83-
"test": "yarn test:storybook && yarn test:vitest run",
84-
"test:storybook": "npx concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook && yarn http-server preview --port 6007 --silent\" \"wait-on tcp:6007 && yarn test-storybook --url http://127.0.0.1:6007\"",
85-
"test:update-snapshots": "npx concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook && yarn http-server preview --port 6007 --silent\" \"wait-on tcp:6007 && yarn test-storybook -u --url http://127.0.0.1:6007\"",
82+
"storybook": "pnpm build && storybook dev -p 6006",
83+
"build-storybook": "pnpm build && storybook build --quiet -o preview",
84+
"test": "pnpm test:storybook && pnpm test:vitest run",
85+
"test:storybook": "npx concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm build-storybook && pnpm http-server preview --port 6007 --silent\" \"wait-on tcp:6007 && pnpm test-storybook --url http://127.0.0.1:6007\"",
86+
"test:update-snapshots": "npx concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm build-storybook && pnpm http-server preview --port 6007 --silent\" \"wait-on tcp:6007 && pnpm test-storybook -u --url http://127.0.0.1:6007\"",
8687
"test:vitest": "vitest --environment=jsdom --dir=src"
8788
},
8889
"dependencies": {

0 commit comments

Comments
 (0)