Skip to content
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

chore: migrate to pnpm #407

Merged
merged 6 commits into from
Aug 28, 2023
Merged
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
24 changes: 17 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: ci

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -11,24 +14,31 @@ jobs:
node: [18.8.0]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- uses: pnpm/action-setup@v2
with:
version: 7.12

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install

- name: Unit tests
run: yarn test:unit
run: pnpm test:unit

- name: Build
run: yarn build
run: pnpm build

- name: Node.js tests
run: yarn test:integration:node
run: pnpm test:node

- name: Install Playwright browsers
run: pnpx playwright install --with-deps

- name: Browser tests
run: yarn test:integration:browser
run: pnpm test:browser
21 changes: 12 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,31 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_ADMIN_TOKEN }}

- name: Setup Git
run: |
git config --local user.name "Artem Zakharchenko"
git config --local user.email "kettanaito@gmail.com"

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 18.8.0
always-auth: true
cache: yarn

- name: Setup Git
run: |
git config --local user.name "Artem Zakharchenko"
git config --local user.email "kettanaito@gmail.com"
- uses: pnpm/action-setup@v2
with:
version: 7.12

- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install

- name: Release
run: yarn release
run: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion ossjs.release.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
script: 'yarn publish --new-version $RELEASE_VERSION',
script: 'pnpm publish --no-git-checks',
}
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@
},
"scripts": {
"start": "tsc --build -w",
"test": "yarn test:unit && yarn test:integration",
"test": "pnpm test:unit && pnpm test:integration",
"test:unit": "vitest run",
"test:integration": "yarn test:integration:node && yarn test:integration:browser",
"test:integration:node": "vitest run -c test/vitest.config.js",
"test:integration:browser": "playwright test -c test/playwright.config.ts",
"test:integration": "pnpm test:node && pnpm test:browser",
"test:node": "vitest run -c test/vitest.config.js",
"test:browser": "pnpm playwright test -c test/playwright.config.ts",
"clean": "rimraf lib",
"build": "yarn clean && cross-env NODE_ENV=production tsup --splitting",
"prepare": "yarn simple-git-hooks init",
"build": "pnpm clean && cross-env NODE_ENV=production tsup --splitting",
"prepare": "pnpm simple-git-hooks init",
"release": "release publish",
"prepublishOnly": "yarn build && yarn test"
"prepublishOnly": "pnpm build && pnpm test"
},
"files": [
"lib",
Expand All @@ -102,7 +102,7 @@
"@commitlint/config-conventional": "^16.0.0",
"@open-draft/test-server": "^0.5.1",
"@ossjs/release": "^0.4.0",
"@playwright/test": "^1.31.1",
"@playwright/test": "^1.37.1",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@types/express-rate-limit": "^6.0.0",
Expand All @@ -123,7 +123,6 @@
"got": "^11.8.3",
"jest": "^27.4.3",
"node-fetch": "2.6.7",
"playwright": "^1.31.1",
"rimraf": "^3.0.2",
"simple-git-hooks": "^2.7.0",
"superagent": "^6.1.0",
Expand Down Expand Up @@ -165,4 +164,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}
Loading