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

deps: modify npm to pnpm #2

Merged
merged 7 commits into from
Jan 17, 2024
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
11 changes: 6 additions & 5 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ jobs:
id: checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

cache: pnpm
- name: Install Dependencies
id: install
run: npm ci
run: pnpm install --frozen-lockfile

- name: Build dist/ Directory
id: build
run: npm run bundle
run: pnpm run bundle

# This will fail the workflow if the PR wasn't created by Dependabot.
- name: Compare Directories
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,30 @@ jobs:
id: checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
cache: pnpm

- name: Install Dependencies
id: npm-ci
run: npm ci
id: pnpm-install
run: pnpm install --frozen-lockfile

- name: Check Format
id: npm-format-check
run: npm run format:check
id: pnpm-format-check
run: pnpm run format:check

- name: Lint
id: npm-lint
run: npm run lint
id: pnpm-lint
run: pnpm run lint

- name: Test
id: npm-ci-test
run: npm run ci-test
id: pnpm-ci-test
run: pnpm run ci-test

test-action:
name: GitHub Actions Test
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ jobs:
id: checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
cache: pnpm

- name: Install Dependencies
id: install
run: npm ci
run: pnpm install --frozen-lockfile

- name: Lint Codebase
id: super-linter
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use-node-version=20.11.0
strict-peer-dependencies=true
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ need to perform some initial setup steps before you can develop your action.
1. :hammer_and_wrench: Install the dependencies

```bash
npm install
pnpm install
```

1. :building_construction: Package the TypeScript for distribution

```bash
npm run bundle
pnpm run bundle
```

1. :white_check_mark: Run the tests

```bash
$ npm test
$ pnpm test

PASS ./index.test.js
✓ throws invalid number (3ms)
Expand Down Expand Up @@ -121,7 +121,7 @@ So, what are you waiting for? Go ahead and start customizing your action!
1. Format, test, and build the action

```bash
npm run all
pnpm run all
```

> [!WARNING]
Expand Down
1 change: 0 additions & 1 deletion __tests__/wait.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/

import { wait } from '../src/wait'
import { expect } from '@jest/globals'

describe('wait.ts', () => {
it('throws an invalid number', async () => {
Expand Down
Loading
Loading