Skip to content

Commit 3f033e3

Browse files
committed
fix: migrate CI workflows from npm to pnpm and remove stale package-lock.json
1 parent a88fade commit 3f033e3

5 files changed

Lines changed: 41 additions & 14180 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,28 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121

22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v4
24+
2225
- name: Setup Node.js ${{ matrix.node-version }}
2326
uses: actions/setup-node@v4
2427
with:
2528
node-version: ${{ matrix.node-version }}
26-
cache: 'npm'
29+
cache: 'pnpm'
2730

2831
- name: Install dependencies
29-
run: npm ci
32+
run: pnpm install --frozen-lockfile
3033
env:
3134
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3235

3336
- name: Run type checking
34-
run: npm run typecheck
37+
run: pnpm run typecheck
3538

3639
- name: Run linter
37-
run: npm run lint
40+
run: pnpm run lint
3841

3942
- name: Run tests
40-
run: npm run test:coverage
43+
run: pnpm run test:coverage
4144

4245
- name: Upload coverage to Codecov
4346
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
@@ -56,19 +59,22 @@ jobs:
5659
- name: Checkout code
5760
uses: actions/checkout@v4
5861

62+
- name: Install pnpm
63+
uses: pnpm/action-setup@v4
64+
5965
- name: Setup Node.js
6066
uses: actions/setup-node@v4
6167
with:
6268
node-version: '20.x'
63-
cache: 'npm'
69+
cache: 'pnpm'
6470

6571
- name: Install dependencies
66-
run: npm ci
72+
run: pnpm install --frozen-lockfile
6773
env:
6874
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6975

7076
- name: Build project
71-
run: npm run build
77+
run: pnpm run build
7278

7379
- name: Upload build artifacts
7480
uses: actions/upload-artifact@v4

.github/workflows/release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,37 @@ jobs:
3333
fetch-depth: 0
3434
ref: prod
3535

36+
- name: Install pnpm
37+
uses: pnpm/action-setup@v4
38+
3639
- name: Setup Node.js
3740
uses: actions/setup-node@v4
3841
with:
3942
node-version: '20.x'
4043
registry-url: 'https://registry.npmjs.org'
41-
cache: 'npm'
44+
cache: 'pnpm'
4245

4346
- name: Configure Git
4447
run: |
4548
git config user.name "github-actions[bot]"
4649
git config user.email "github-actions[bot]@users.noreply.github.com"
4750
4851
- name: Install dependencies
49-
run: npm ci
52+
run: pnpm install --frozen-lockfile
5053
env:
5154
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5255

5356
- name: Run validation
54-
run: npm run validate
57+
run: pnpm run validate
5558

5659
- name: Build production with fresh docs
57-
run: npm run build:prod
60+
run: pnpm run build:prod
5861
env:
5962
NODE_OPTIONS: --max-old-space-size=6144
6063

61-
- name: Update npm
62-
run: npm install -g npm@latest
63-
6464
- name: Publish to npm
6565
if: ${{ github.event.inputs.skip_npm != 'true' }}
66-
run: npm publish --provenance --access public --ignore-scripts
66+
run: pnpm publish --provenance --access public --no-git-checks
6767
env:
6868
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6969

@@ -72,10 +72,10 @@ jobs:
7272
RELEASE_TAG: ${{ github.event.release.tag_name }}
7373
run: |
7474
echo "📋 Indexing Parchment mappings..."
75-
npm run index-mappings:force
75+
pnpm run index-mappings:force
7676
7777
echo "📋 Generating mappings manifest..."
78-
npm run mappings:manifest -- --bump patch --changelog "Release $RELEASE_TAG"
78+
pnpm run mappings:manifest -- --bump patch --changelog "Release $RELEASE_TAG"
7979
8080
# Log the new mappings version
8181
MAPPINGS_VERSION=$(node -p "require('./data/parchment-mappings-manifest.json').version")
@@ -89,7 +89,7 @@ jobs:
8989
9090
# Regenerate manifest with a patch bump to ensure a new version is created
9191
# This makes the DB version independent of the package version
92-
npm run db:manifest -- --bump patch --changelog "Release $RELEASE_TAG" --release-tag "$RELEASE_TAG"
92+
pnpm run db:manifest -- --bump patch --changelog "Release $RELEASE_TAG" --release-tag "$RELEASE_TAG"
9393
9494
# Log the new DB version
9595
DB_VERSION=$(node -p "require('./data/db-manifest.json').version")

.github/workflows/semantic-release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,27 @@ jobs:
2222
fetch-depth: 0
2323
persist-credentials: false
2424

25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v4
27+
2528
- name: Setup Node.js
2629
uses: actions/setup-node@v4
2730
with:
2831
node-version: '20'
29-
cache: 'npm'
32+
cache: 'pnpm'
3033

3134
- name: Install dependencies
32-
run: npm ci --ignore-scripts
35+
run: pnpm install --frozen-lockfile --ignore-scripts
3336
env:
3437
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3538

3639
- name: Download Database
37-
run: npm run postinstall
40+
run: pnpm run postinstall
3841
env:
3942
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4043

4144
- name: Build
42-
run: npm run build
45+
run: pnpm run build
4346

4447
- name: Release
4548
env:

.github/workflows/update-docs-weekly.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,22 @@ jobs:
2323
ref: dev # Checkout dev branch to commit changes later
2424
fetch-depth: 0
2525

26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v4
28+
2629
- name: Setup Node.js
2730
uses: actions/setup-node@v4
2831
with:
2932
node-version: '20.x'
30-
cache: 'npm'
33+
cache: 'pnpm'
3134

3235
- name: Configure Git
3336
run: |
3437
git config user.name "github-actions[bot]"
3538
git config user.email "github-actions[bot]@users.noreply.github.com"
3639
3740
- name: Install dependencies
38-
run: npm ci
41+
run: pnpm install --frozen-lockfile
3942
env:
4043
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4144

@@ -58,15 +61,15 @@ jobs:
5861
rm -f data/mcmodding-docs.db
5962
6063
# Run full index (no incremental flag)
61-
npm run index-docs -- --sitemap --embeddings
64+
pnpm run index-docs -- --sitemap --embeddings
6265
env:
6366
# Allow longer timeout and more memory for embedding generation
6467
NODE_OPTIONS: --max-old-space-size=8192
6568

6669
- name: Generate Documentation Database Manifest
6770
run: |
6871
# Generate manifest with a patch bump
69-
npm run db:manifest -- --bump patch --changelog "Weekly update for $LATEST_TAG" --release-tag "$LATEST_TAG"
72+
pnpm run db:manifest -- --bump patch --changelog "Weekly update for $LATEST_TAG" --release-tag "$LATEST_TAG"
7073
env:
7174
LATEST_TAG: ${{ steps.get_release.outputs.tag }}
7275

@@ -80,14 +83,14 @@ jobs:
8083
rm -f data/parchment-mappings.db
8184
8285
# Run full mappings index with force flag
83-
npm run index-mappings:force
86+
pnpm run index-mappings:force
8487
env:
8588
NODE_OPTIONS: --max-old-space-size=8192
8689

8790
- name: Generate Mappings Database Manifest
8891
run: |
8992
# Generate mappings manifest with a patch bump
90-
npm run mappings:manifest -- --bump patch --changelog "Weekly mappings update for $LATEST_TAG"
93+
pnpm run mappings:manifest -- --bump patch --changelog "Weekly mappings update for $LATEST_TAG"
9194
env:
9295
LATEST_TAG: ${{ steps.get_release.outputs.tag }}
9396

0 commit comments

Comments
 (0)