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

Use pnpm instead of npm #751

Merged
merged 5 commits into from
Apr 7, 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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ updates:
determinatesystems-actions:
patterns:
- 'DeterminateSystems*'
- package-ecosystem: 'npm'
- package-ecosystem: 'pnpm'
directory: '/'
schedule:
interval: 'weekly'
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.node-version'
cache: npm
- run: npm ci --ignore-scripts
- run: npm run build
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- name: Check no diff for products
run: git add --intent-to-add . && git diff --exit-code

Expand All @@ -35,25 +36,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.node-version'
cache: npm
- run: npm ci --ignore-scripts
- run: npm test
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test

typecheck:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.node-version'
cache: npm
- run: npm ci --ignore-scripts
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Typecheck
run: npm run typecheck
run: pnpm run typecheck

lint:
timeout-minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
paths:
- '.github/workflows/**'
- 'package.json'
- 'package-lock.json'
- 'pnpm-lock.yaml'

permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
branches: [main]
paths-ignore:
- 'dist/**'
- 'package-lock.json'
- 'pnpm-lock.yaml'
pull_request:
paths-ignore:
- 'dist/**'
- 'package-lock.json'
- 'pnpm-lock.yaml'
jobs:
dprint:
timeout-minutes: 15
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/update-nixpkgs-and-versions-in-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,10 @@ on:
jobs:
update-nixpkgs:
uses: kachick/selfup/.github/workflows/reusable-bump-flake-lock-and-selfup.yml@action-v1
if: (github.event.sender.login == 'kachick') || (github.event_name != 'pull_request')
with:
dry-run: ${{ github.event_name == 'pull_request' }}
optional-run: |
nix develop --command nix run github:kachick/selfup/v0.0.2 -- run --prefix='# selfup ' --skip-by='nix run' .github/ISSUE_TEMPLATE/*.yml
git diff-index --quiet HEAD || git commit -m 'Update latest versions in issue template' .github

nix develop --command bash -c 'node --version | tr -d v' > .node-version
git add .node-version
# https://stackoverflow.com/q/34807971
git update-index -q --really-refresh
git diff-index --quiet HEAD || git commit -m 'Update .node-version' .node-version
nix run .#bump-nix-dependencies
secrets:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ See also [scripts](package.json) for tasks details.
## REPL

```typescript
npm run repl
pnpm run repl

Welcome to Node.js v20.5.1.
Type ".help" for more information.
Expand Down
9 changes: 5 additions & 4 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ skip_core_tasks = true
category = "Tools"
description = "Install dependencies after nix"
script = [
"npm ci --ignore-scripts",
"pnpm install --frozen-lockfile",
]

[tasks.fmt]
Expand All @@ -30,21 +30,21 @@ script = [
category = "Tools"
description = 'Test'
script = [
"npm run test",
"pnpm run test",
]

[tasks.typecheck]
category = "Tools"
description = 'Correctness in TypeScript'
script = [
"npm run typecheck",
"pnpm run typecheck",
]

[tasks.build]
category = "Tools"
description = 'Build that actually run in production'
script = [
"npm run build",
"pnpm run build",
]

[tasks.check]
Expand All @@ -64,6 +64,7 @@ category = "Tools"
description = 'Print dependency and the versions'
script = [
"node --version",
"pnpm --version",
"nix --version",
"deno --version",
"makers --version",
Expand Down
Loading
Loading