Skip to content

Commit 0842e04

Browse files
Copilothotlong
andcommitted
chore: migrate from npm to pnpm
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent e72691a commit 0842e04

File tree

8 files changed

+298
-21
lines changed

8 files changed

+298
-21
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
# Enable version updates for npm
3+
# Enable version updates for pnpm
44
- package-ecosystem: "npm"
55
directory: "/"
66
schedule:

.github/workflows/ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,25 @@ jobs:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
2424

25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
version: 9
29+
2530
- name: Setup Node.js ${{ matrix.node-version }}
2631
uses: actions/setup-node@v4
2732
with:
2833
node-version: ${{ matrix.node-version }}
29-
cache: 'npm'
34+
cache: 'pnpm'
3035

3136
- name: Install dependencies
32-
run: npm ci --legacy-peer-deps || npm install --legacy-peer-deps
37+
run: pnpm install --frozen-lockfile
3338

3439
- name: Type check
35-
run: npm run typecheck
40+
run: pnpm run typecheck
3641

3742
- name: Build
38-
run: npm run build
43+
run: pnpm run build
3944

4045
- name: Upload build artifacts
4146
if: matrix.node-version == '20.x'

.github/workflows/release.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,26 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121

22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 9
26+
2227
- name: Setup Node.js
2328
uses: actions/setup-node@v4
2429
with:
2530
node-version: '20.x'
26-
cache: 'npm'
31+
cache: 'pnpm'
2732
registry-url: 'https://registry.npmjs.org'
2833

2934
- name: Install dependencies
30-
run: npm ci --legacy-peer-deps || npm install --legacy-peer-deps
35+
run: pnpm install --frozen-lockfile
3136

3237
- name: Type check
33-
run: npm run typecheck
38+
run: pnpm run typecheck
3439

3540
- name: Build
36-
run: npm run build
41+
run: pnpm run build
3742

3843
- name: Create GitHub Release
3944
uses: softprops/action-gh-release@v1
@@ -47,6 +52,6 @@ jobs:
4752
# Uncomment when ready to publish to npm
4853
# - name: Publish to npm
4954
# if: startsWith(github.ref, 'refs/tags/')
50-
# run: npm publish --access public
55+
# run: pnpm publish --access public --no-git-checks
5156
# env:
5257
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# pnpm configuration
2+
auto-install-peers=false
3+
strict-peer-dependencies=false

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ Thank you for your interest in contributing to the ObjectStack Auth Plugin! This
1212

1313
2. **Install dependencies**
1414
```bash
15-
npm install
15+
pnpm install
1616
```
1717

1818
3. **Build the project**
1919
```bash
20-
npm run build
20+
pnpm run build
2121
```
2222

2323
4. **Watch mode for development**
2424
```bash
25-
npm run dev
25+
pnpm run dev
2626
```
2727

2828
## Project Structure
@@ -109,8 +109,8 @@ When adding tests (future work):
109109

110110
3. **Verify your changes**
111111
```bash
112-
npm run typecheck
113-
npm run build
112+
pnpm run typecheck
113+
pnpm run build
114114
```
115115

116116
4. **Commit with clear messages**
@@ -161,7 +161,7 @@ This repository includes several GitHub Actions workflows to ensure code quality
161161
### Dependabot
162162
- **Schedule**: Weekly (Mondays)
163163
- **Updates**:
164-
- npm dependencies
164+
- pnpm dependencies
165165
- GitHub Actions versions
166166
- **Configuration**: `.github/dependabot.yml`
167167

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
## Installation
1414

1515
```bash
16-
npm install @objectstack/plugin-auth better-auth
16+
pnpm add @objectstack/plugin-auth better-auth
1717
```
1818

1919
## Quick Start

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
"author": "ObjectStack",
2020
"license": "MIT",
2121
"peerDependencies": {
22+
"@objectstack/protocol": "*",
23+
"@objectstack/ql": "*",
2224
"better-auth": "^1.0.0",
2325
"react": "^18.0.0"
2426
},
25-
"dependencies": {
26-
"@objectstack/protocol": "*",
27-
"@objectstack/ql": "*"
28-
},
2927
"devDependencies": {
3028
"@types/node": "^20.0.0",
3129
"@types/react": "^18.0.0",
30+
"better-auth": "^1.4.17",
31+
"react": "^19.2.3",
3232
"typescript": "^5.0.0"
3333
},
3434
"exports": {

0 commit comments

Comments
 (0)