Skip to content

Commit c2f75fc

Browse files
committed
pnpm migration
1 parent 783d160 commit c2f75fc

File tree

226 files changed

+11693
-13481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+11693
-13481
lines changed
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: 🚀 pkg-pr-new
2+
on: [push, pull_request]
3+
24
concurrency:
35
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
46
cancel-in-progress: true
5-
on:
6-
push:
7-
branches: [main]
8-
pull_request:
9-
branches: [main]
10-
117
jobs:
128
build:
139
runs-on: ubuntu-latest
@@ -16,16 +12,18 @@ jobs:
1612
- name: Checkout code
1713
uses: actions/checkout@v2
1814

15+
- name: Install pnpm
16+
uses: pnpm/action-setup@v4
17+
1918
- run: corepack enable
2019
- uses: actions/setup-node@v4
2120
with:
22-
node-version: 20
23-
cache: "npm"
21+
node-version-file: "package.json"
2422

2523
- name: Install dependencies
26-
run: npm install
24+
run: pnpm install
2725

2826
- name: Build
29-
run: npm run build
27+
run: pnpm run build
3028

31-
- run: npx pkg-pr-new publish
29+
- run: npx pkg-pr-new publish ./packages/*

.github/workflows/publish.yaml

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,47 @@
1-
name: Publish Package to npmjs
1+
name: Release
2+
23
on:
3-
release:
4-
types: [published]
5-
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
67

78
jobs:
8-
npm-publish:
9+
release:
10+
name: Release
911
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
actions: write
16+
id-token: write
1017
steps:
11-
- uses: actions/checkout@v4
12-
# Setup .npmrc file to publish to npm
13-
- uses: actions/setup-node@v4
18+
- name: Checkout Repo
19+
uses: actions/checkout@v3
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v3
1426
with:
15-
node-version: "20.x"
16-
registry-url: "https://registry.npmjs.org"
17-
- run: npm ci
18-
- run: npm publish
19-
env:
20-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
node-version-file: "package.json"
2128

29+
- name: Install Dependencies
30+
run: pnpm install
2231

23-
deploy-docs:
24-
name: "🚀 Deploy Docs"
25-
runs-on: ubuntu-latest
26-
environment:
27-
name: docs-release
28-
url: ${{ steps.deploy.outputs.app_url }}
29-
steps:
30-
- uses: actions/checkout@v4
31-
- uses: forge-42/fly-deploy@v1.0.0-rc.1
32-
id: deploy
32+
# - name: 🔐 Setup npm auth
33+
# run: |
34+
# echo "registry=https://registry.npmjs.org" >> ~/.npmrc
35+
# echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
36+
37+
- name: Create Release Pull Request or Publish to npm
38+
id: changesets
39+
uses: changesets/action@v1
3340
env:
34-
FLY_ORG: ${{ vars.FLY_ORG }}
35-
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
36-
FLY_REGION: fra
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3743
with:
38-
workspace_name: docs
39-
app_name: react-router-devtools-docs-release
40-
use_isolated_workspace: true
44+
title: "🚀 Release PR"
45+
commit: "chore: release"
46+
version: pnpm run version
47+
publish: pnpm run release

.github/workflows/validate.yaml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,71 @@
1-
name: 🚀 Validation Pipeline
1+
name: 🚀 PR
2+
23
concurrency:
34
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
45
cancel-in-progress: true
5-
on:
6-
push:
7-
branches: [main]
8-
pull_request:
9-
branches: [main]
6+
7+
on: [pull_request] # Run only on pull_request, to also get status updates in PRs. We omit push because this would run the steps two times (for push and pull_request).
108

119
permissions:
1210
actions: write
1311
contents: read
1412
# Required to put a comment into the pull-request
1513
pull-requests: write
14+
1615
jobs:
1716
lint:
18-
name: Biome lint
17+
name: Linting
1918
runs-on: ubuntu-latest
2019
steps:
21-
- name: ⬇️ Checkout repo
22-
uses: actions/checkout@v4
23-
- name: Setup Biome
24-
uses: biomejs/setup-biome@v2
25-
- name: Run Biome
26-
run: biome ci .
20+
- uses: actions/checkout@v4
21+
- uses: biomejs/setup-biome@v2
22+
- run: biome ci . --reporter=github
2723

2824
typecheck:
2925
name: 🔎 Type check
3026
runs-on: ubuntu-latest
3127
steps:
3228
- name: 🛑 Cancel Previous Runs
3329
uses: styfle/cancel-workflow-action@0.12.1
30+
3431
- name: ⬇️ Checkout repo
3532
uses: actions/checkout@v4
33+
- name: Install pnpm
34+
uses: pnpm/action-setup@v4
3635
- name: ⎔ Setup node
3736
uses: actions/setup-node@v4
3837
with:
39-
node-version: 20
38+
node-version-file: "package.json"
39+
4040
- name: 📥 Download deps
41-
uses: bahmutov/npm-install@v1
42-
with:
43-
useLockFile: false
41+
run: pnpm install
42+
4443
- name: 🔎 Type check
45-
run: npm run typecheck
44+
run: pnpm run typecheck
4645

4746
vitest:
4847
name: ⚡ Unit Tests
4948
runs-on: ubuntu-latest
5049
steps:
5150
- name: 🛑 Cancel Previous Runs
5251
uses: styfle/cancel-workflow-action@0.12.1
52+
5353
- name: ⬇️ Checkout repo
5454
uses: actions/checkout@v4
55+
56+
- name: Install pnpm
57+
uses: pnpm/action-setup@v4
58+
5559
- name: ⎔ Setup node
5660
uses: actions/setup-node@v4
5761
with:
58-
node-version: 20
62+
node-version-file: "package.json"
63+
5964
- name: 📥 Download deps
60-
uses: bahmutov/npm-install@v1
61-
with:
62-
useLockFile: false
63-
- name: Install dotenv cli
64-
run: npm install -g dotenv-cli
65+
run: pnpm install
66+
6567
- name: ⚡ Run vitest
66-
run: npm run test:cov
67-
# - name: "Report Coverage"
68-
# Only works if you set `reportOnFailure: true` in your vite config as specified above
69-
# if: always()
70-
# uses: davelosert/vitest-coverage-report-action@v2
68+
run: pnpm run test:cov
7169

7270
deploy-docs-pr-preview:
7371
if: ${{ github.event_name == 'pull_request' }}

lefthook.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ pre-commit:
22
parallel: true
33
commands:
44
check:
5-
run: npm run check -- --staged --fix --no-errors-on-unmatched
5+
run: pnpm run check --staged --fix --no-errors-on-unmatched
66
stage_fixed: true
77
typecheck:
8-
run: npm run typecheck
8+
run: pnpm run typecheck
99
test:
10-
run: npm run test
10+
run: pnpm run test
1111
unused-code:
12-
run: npm run check:unused
12+
run: pnpm run check:unused

0 commit comments

Comments
 (0)