Skip to content

Commit 45c659b

Browse files
committed
build: migrate to pnpm
1 parent d294c94 commit 45c659b

File tree

14 files changed

+10134
-12580
lines changed

14 files changed

+10134
-12580
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
dist
2-
.yarn
32
node_modules

.github/workflows/build-and-test.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,25 @@ jobs:
2020
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
23+
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
26+
2327
- name: Use Node.js LTS
2428
uses: actions/setup-node@v4
2529
with:
2630
node-version-file: '.nvmrc'
27-
cache: 'yarn'
28-
- name: Get yarn cache directory path
29-
id: yarn-cache-dir-path
30-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
31-
- uses: actions/cache@v4
32-
id: yarn-cache
33-
with:
34-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
35-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
36-
restore-keys: |
37-
${{ runner.os }}-yarn-
31+
cache: 'pnpm'
32+
3833
- name: Install Dependencies
39-
run: yarn install
34+
run: pnpm install
35+
4036
- name: Build
41-
run: yarn build
37+
run: pnpm run build
38+
4239
- name: Test with Coverage
43-
run: yarn coverage
40+
run: pnpm run coverage
41+
4442
- uses: codecov/codecov-action@v4
4543
with:
4644
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/lint-check.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,18 @@ jobs:
2222
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
25+
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v4
28+
2529
- name: Use Node.js LTS
2630
uses: actions/setup-node@v4
2731
with:
2832
node-version-file: '.nvmrc'
29-
cache: 'yarn'
30-
- name: Get yarn cache directory path
31-
id: yarn-cache-dir-path
32-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
33-
- uses: actions/cache@v4
34-
id: yarn-cache
35-
with:
36-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
37-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
38-
restore-keys: |
39-
${{ runner.os }}-yarn-
33+
cache: 'pnpm'
34+
4035
- name: Install Dependencies
41-
run: yarn install
36+
run: pnpm install
37+
4238
- name: Lint
43-
run: yarn lint:ci
39+
run: pnpm run lint:ci

.github/workflows/release-please.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,36 @@ jobs:
2323
steps:
2424
- name: Checkout repository
2525
uses: actions/checkout@v4
26+
2627
- name: Use Node.js LTS
2728
uses: actions/setup-node@v4
2829
with:
2930
node-version: 20
30-
cache: 'yarn'
31-
registry-url: 'https://registry.npmjs.org'
32-
- name: Get yarn cache directory path
33-
id: yarn-cache-dir-path
34-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
35-
- uses: actions/cache@v4
36-
id: yarn-release-cache
31+
cache: 'pnpm'
32+
33+
- name: Install pnpm
34+
uses: pnpm/action-setup@v4
35+
36+
- name: Use Node.js LTS
37+
uses: actions/setup-node@v4
3738
with:
38-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
39-
key: ${{ runner.os }}-yarn-release-${{ hashFiles('**/yarn.lock') }}
40-
restore-keys: |
41-
${{ runner.os }}-yarn-release
39+
node-version-file: '.nvmrc'
40+
cache: 'pnpm'
41+
4242
- name: Install Dependencies
43-
run: yarn install
43+
run: pnpm install
44+
4445
- name: Prepack
45-
run: yarn run prepack
46+
run: pnpm run prepack
47+
4648
- name: Build
4749
run: npm run build
48-
- name: Delete Scripts
49-
run: npm pkg delete scripts
50-
- name: Delete Workspaces
51-
run: npm pkg delete workspaces
50+
51+
- name: Clean package.json
52+
run: |
53+
npm pkg delete scripts
54+
npm pkg delete lint-staged
55+
5256
- name: Publish to npm
5357
run: npm publish --provenance --access public
5458
env:

.gitignore

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,44 @@
1+
2+
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
pnpm-debug.log*
10+
lerna-debug.log*
11+
12+
# yarn
113
**/.yarn/*
214
**/!.yarn/patches
315
**/!.yarn/plugins
416
**/!.yarn/releases
517
**/!.yarn/sdks
618
**/!.yarn/versions
719

8-
# Swap the comments on the following lines if you don't wish to use zero-installs
9-
# Documentation here: https://yarnpkg.com/features/zero-installs
10-
#!.yarn/cache
11-
.pnp.*
12-
13-
dist
14-
tsconfig.tsbuildinfo
15-
.eslintcache
1620
node_modules
17-
21+
dist
22+
dist-ssr
23+
coverage
24+
*.local
25+
.idea
26+
.vscode
1827
.next
1928
.vercel
20-
coverage
2129

30+
# Editor directories and files
31+
.vscode/*
32+
!.vscode/extensions.json
2233
.idea
23-
.vscode
34+
.DS_Store
35+
*.suo
36+
*.ntvs*
37+
*.njsproj
38+
*.sln
39+
*.sw?
40+
41+
# cache
42+
tsconfig.tsbuildinfo
43+
.eslintcache
44+
node_modules

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ logs
4646
npm-debug.log*
4747
yarn-debug.log*
4848
yarn-error.log*
49+
pnpm-debug.log*
4950
lerna-debug.log*
5051

5152
# Diagnostic reports (https://nodejs.org/api/report.html)

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 0 additions & 541 deletions
This file was deleted.

.yarn/releases/yarn-3.2.4.cjs

Lines changed: 0 additions & 801 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
"@textea/json-viewer": "workspace:^",
1414
"gray-matter": "^4.0.3",
1515
"next": "^13.5.6",
16-
"nextra": "^2.13.3",
17-
"nextra-theme-docs": "^2.13.3",
16+
"nextra": "^2.13.4",
17+
"nextra-theme-docs": "^2.13.4",
1818
"react": "^18.3.1",
1919
"react-dom": "^18.3.1"
2020
},
2121
"devDependencies": {
22-
"@types/node": "^20.11.19",
23-
"@types/react": "^18.3.3",
22+
"@types/node": "^20.16.5",
23+
"@types/react": "^18.3.5",
2424
"@types/react-dom": "^18.3.0",
25-
"typescript": "^5.5.4"
25+
"typescript": "^5.6.2"
2626
}
2727
}

0 commit comments

Comments
 (0)