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

Migrate from yarn to pnpm #63

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
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
6 changes: 3 additions & 3 deletions .github/workflows/on_pr_to_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
- uses: ./.github/actions/ci-common-setup

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

ts_test_build:
ts_build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
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
Loading