From afde7587b58e96153a7b243d4d0bfaf2f997a026 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Mon, 29 Aug 2022 08:52:30 -0400 Subject: [PATCH] ci: use pnpm --- .github/workflows/release.yml | 11 +++++++---- .github/workflows/test.yml | 11 +++++++---- package.json | 7 +++---- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49d82bde..c46d1c26 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,14 +19,17 @@ jobs: with: node-version-file: '.nvmrc' - - name: Install dependencies - run: npx ci + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.2 + with: + version: 7 + run_install: true - name: Lint - run: npm run lint + run: pnpm lint - name: Release env: GH_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release + run: pnpx semantic-release diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c893e40..425feb9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,12 +22,15 @@ jobs: with: node-version-file: '.nvmrc' - - name: Install dependencies - run: npx ci + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.2 + with: + version: 7 + run_install: true - name: Test - run: npm test + run: pnpm test - name: Lint if: ${{ matrix.os == 'ubuntu-latest' }} - run: npm run lint + run: pnpm lint diff --git a/package.json b/package.json index b6e7607c..9756768a 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,9 @@ "scripts": { "build": "pkgroll --target=node12.19 --minify", "lint": "eslint --cache .", - "pretest": "npm run build", - "test": "node ./dist/cli.js tests/index.ts", - "prepack": "npm run build && clean-pkg-json", - "prepublishOnly": "npm test" + "test": "pnpm build && node ./dist/cli.js tests/index.ts", + "prepack": "pnpm build && clean-pkg-json", + "prepublishOnly": "pnpm test" }, "dependencies": { "@esbuild-kit/cjs-loader": "^2.3.3",