From 48cf9aaf1c96418e67e10ba3775d51ad8967fc19 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Tue, 1 Mar 2022 15:33:17 +0800 Subject: [PATCH] ci: add package manager and version --- .github/workflows/bundlewatch.yml | 6 ++---- .github/workflows/lint.yml | 6 ++---- .github/workflows/test.yml | 7 ++----- package.json | 3 ++- scripts/postinstall.mjs | 4 +++- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/bundlewatch.yml b/.github/workflows/bundlewatch.yml index 1a7dea4..50c6616 100644 --- a/.github/workflows/bundlewatch.yml +++ b/.github/workflows/bundlewatch.yml @@ -9,11 +9,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 - with: - version: 6.9.1 + - uses: pnpm/action-setup@v2.2.1 - run: pnpm install - - run: npm run build + - run: pnpm build - run: npx bundlewatch env: BUNDLEWATCH_GITHUB_TOKEN: '${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 763c49e..ae64c17 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,8 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 - with: - version: 6.9.1 + - uses: pnpm/action-setup@v2.2.1 - run: pnpm install - - run: npm run lint + - run: pnpm lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1948a8..d28304d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,9 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: pnpm/action-setup@v2.0.1 - with: - version: 6.9.1 + - uses: pnpm/action-setup@v2.2.1 - run: pnpm install - - run: npm run build - - run: npm test + - run: pnpm test diff --git a/package.json b/package.json index 99d6e9b..3a8804b 100644 --- a/package.json +++ b/package.json @@ -53,5 +53,6 @@ "main" ] } - } + }, + "packageManager": "pnpm@6.32.2" } diff --git a/scripts/postinstall.mjs b/scripts/postinstall.mjs index 2ae08d4..20b5073 100644 --- a/scripts/postinstall.mjs +++ b/scripts/postinstall.mjs @@ -121,4 +121,6 @@ fs.writeFileSync(path.join(rootDir, 'README.md'), readme) // format execSync('npm run lint:fix', { stdio: 'inherit' }) -execSync('npx sort-package-json packages/*/package.json', { stdio: 'inherit' }) +execSync('npx sort-package-json package.json packages/*/package.json', { + stdio: 'inherit', +})