Skip to content

migrate to pnpm #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 10 additions & 23 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,21 @@ jobs:
deploy_web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
node-version: '14.x'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache dependencies
uses: actions/cache@v1
version: 8.2.0
- uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies (web)
run: (cd web; yarn install)

- name: Test (web)
run: (cd web; yarn test)
node-version: 18
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: npm test

- name: Copy to dist (web)
run: |
(cd web; CI=false yarn build)
(cd web; CI=false npm run build)
mkdir -p web/dist/d
cp -r web/build web/dist/d/`date '+%Y-%m-%d'`

Expand Down
31 changes: 9 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,14 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
node-version: '14.x'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache dependencies
uses: actions/cache@v1
version: 8.2.0
- uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install

- name: Test
run: yarn test
node-version: 18
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: npm test
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hoist=false
shamefully-hoist=true
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

18 changes: 1 addition & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,7 @@
"description": "A small app to share webcam still images periodically",
"private": true,
"author": "Daishi Kato",
"workspaces": {
"packages": [
"web",
"electron",
"ckeditor5"
],
"nohoist": [
"**/electron",
"**/electron/**"
]
},
"scripts": {
"test": "yarn workspaces run test",
"postinstall": "patch-package"
},
"devDependencies": {
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0"
"test": "pnpm -r run test"
}
}
Loading