Skip to content

Commit 914111e

Browse files
authored
yarn to pnpm (#134)
* yarn to pnpm * npx playwright install only chromium
1 parent 058c8fe commit 914111e

File tree

9 files changed

+2556
-2266
lines changed

9 files changed

+2556
-2266
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,29 @@ jobs:
1717
- name: Check out repo
1818
uses: actions/checkout@v3
1919

20+
- name: Set up pnpm
21+
uses: pnpm/action-setup@v2
22+
with:
23+
version: latest
24+
2025
- name: Set up node
2126
uses: actions/setup-node@v3
2227
with:
23-
cache: yarn
28+
cache: pnpm
2429

2530
- name: Install dependencies
2631
run: |
27-
yarn
28-
npx playwright install
32+
pnpm install
33+
npx playwright install chromium
2934
3035
- name: Run tests
3136
id: tests
32-
run: yarn test
37+
run: pnpm test
3338

3439
- name: Build package and publish to NPM
3540
if: github.event_name == 'release' && steps.tests.outcome == 'success' && runner.os == 'Linux'
3641
run: |
37-
yarn package
38-
yarn publish package
42+
pnpm package
43+
pnpm publish package
3944
env:
4045
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ default_stages: [commit]
55

66
default_install_hook_types: [pre-commit, commit-msg]
77

8+
exclude: ^pnpm-lock.yaml$
9+
810
repos:
911
- repo: https://github.com/pre-commit/pre-commit-hooks
1012
rev: v4.3.0
@@ -33,7 +35,6 @@ repos:
3335
hooks:
3436
- id: codespell
3537
stages: [commit, commit-msg]
36-
exclude: yarn.lock
3738

3839
- repo: https://github.com/pre-commit/mirrors-eslint
3940
rev: v8.24.0

netlify.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build]
2-
command = "yarn build"
2+
command = "pnpm build"
33
publish = "build"
44

55
[build.environment]
66
NODE_VERSION = "18.6.0"
7-
YARN_VERSION = "1.22.19"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build": "vite build",
1616
"preview": "vite preview",
1717
"package": "svelte-package",
18-
"serve": "yarn build && yarn preview",
18+
"serve": "pnpm build && pnpm preview",
1919
"check": "svelte-check --ignore package",
2020
"test": "vitest --run tests/unit/*.ts && playwright test tests/*.test.ts"
2121
},

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { PlaywrightTestConfig } from '@playwright/test'
22

33
const config: PlaywrightTestConfig = {
44
webServer: {
5-
command: `yarn dev --port 3005`,
5+
command: `pnpm dev --port 3005`,
66
port: 3005,
77
},
88
}

0 commit comments

Comments
 (0)