Skip to content

Commit

Permalink
migrate from yarn to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
shtaif committed Aug 28, 2023
1 parent d9a42f8 commit 6c7582f
Show file tree
Hide file tree
Showing 5 changed files with 4,383 additions and 3,904 deletions.
14 changes: 7 additions & 7 deletions .github/actions/ci-common-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ description: Reusable common setup for project's CI jobs
runs:
using: composite
steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: '10.21.0'
node-version: v20.5.1

- name: Get Node.js Version
- name: Get Node.js version
id: node_version
run: |
echo "::set-output name=version::$(node -v)"
shell: bash

- name: Install yarn
run: npm install -g yarn
- name: Install `pnpm`
run: npm install -g pnpm
shell: bash

- name: Restore possibly cached dependencies
id: cache-node-modules
uses: actions/cache@v2
with:
path: ./node_modules
key: node-modules-${{ runner.os }}-${{ steps.node_version.outputs.version }}-${{ hashFiles('./yarn.lock') }}
key: node-modules-${{ runner.os }}-${{ steps.node_version.outputs.version }}-${{ hashFiles('./pnpm-lock.yaml') }}

- name: Install dependencies if weren't cached
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install
run: pnpm install --frozen-lockfile
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/on_pr_to_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: ./.github/actions/ci-common-setup

- name: Run tests
run: yarn test
run: pnpm run test

ts_test_build:
runs-on: ubuntu-latest
Expand All @@ -50,6 +50,6 @@ jobs:

- uses: ./.github/actions/ci-common-setup

- name: TypeScript test build
- name: TypeScript build test
run: npx tsc --noEmit

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
],
"scripts": {
"test": "ts-mocha -p ./tsconfig-cjs.json",
"release": "./scripts/release.sh",
"code-check": "prettier --check \"./src/**/*.{ts,js}\" && eslint ./src --cache && yarn run test --type-check && tsc --noEmit",
"code-check": "prettier --check \"./src/**/*.{ts,js}\" && eslint ./src --cache && pnpm run test --type-check && tsc --noEmit",
"build": "rm -rf ./dist && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node ./scripts/mark-dist-dirs-package-module-type.js",
"prepublishOnly": "yarn build"
"prepublishOnly": "pnpm build"
},
"devDependencies": {
"@types/chai": "^4.2.21",
Expand Down
Loading

0 comments on commit 6c7582f

Please sign in to comment.