Skip to content

Commit 380e398

Browse files
authored
Merge pull request #6 from objectstack-ai/copilot/update-project-to-pnpm
2 parents 8d3b999 + d8e01f7 commit 380e398

6 files changed

Lines changed: 101 additions & 1338 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,27 @@ jobs:
2222
uses: actions/setup-node@v4
2323
with:
2424
node-version: '20'
25-
cache: 'npm'
25+
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v4
28+
with:
29+
version: 10
30+
31+
- name: Get pnpm store directory
32+
shell: bash
33+
run: |
34+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
35+
36+
- name: Setup pnpm cache
37+
uses: actions/cache@v4
38+
with:
39+
path: ${{ env.STORE_PATH }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
2643
2744
- name: Install dependencies
28-
run: npm ci
45+
run: pnpm install --frozen-lockfile
2946

3047
- name: Build
31-
run: npm run build
48+
run: pnpm run build

.github/workflows/release.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,37 @@ jobs:
2222
uses: actions/setup-node@v4
2323
with:
2424
node-version: '20'
25-
cache: 'npm'
25+
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v4
28+
with:
29+
version: 10
30+
31+
- name: Get pnpm store directory
32+
shell: bash
33+
run: |
34+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
35+
36+
- name: Setup pnpm cache
37+
uses: actions/cache@v4
38+
with:
39+
path: ${{ env.STORE_PATH }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
2643
2744
- name: Install dependencies
28-
run: npm ci
45+
run: pnpm install --frozen-lockfile
2946

3047
- name: Build
31-
run: npm run build
48+
run: pnpm run build
3249

3350
- name: Create Release Pull Request or Publish to npm
3451
id: changesets
3552
uses: changesets/action@v1
3653
with:
37-
publish: npm run release
38-
version: npm run version
54+
publish: pnpm run release
55+
version: pnpm run version
3956
commit: 'chore: version packages'
4057
title: 'chore: version packages'
4158
env:

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This package does NOT contain:
2424
## 🚀 Installation
2525

2626
```bash
27-
npm install @objectstack/spec
27+
pnpm install @objectstack/spec
2828
```
2929

3030
## 📦 What's Inside
@@ -116,16 +116,16 @@ console.log(PKG_CONVENTIONS.FILES.MANIFEST); // 'objectstack.config.ts'
116116

117117
```bash
118118
# Install dependencies
119-
npm install
119+
pnpm install
120120

121121
# Build the project
122-
npm run build
122+
pnpm run build
123123

124124
# Watch mode for development
125-
npm run dev
125+
pnpm run dev
126126

127127
# Clean build artifacts
128-
npm run clean
128+
pnpm run clean
129129
```
130130

131131
## 📄 License
@@ -204,7 +204,7 @@ interface ObjectView {
204204
### Installation
205205

206206
```bash
207-
npm install @objectstack/spec
207+
pnpm install @objectstack/spec
208208
```
209209

210210
### Importing Types
@@ -267,8 +267,8 @@ const userEntity: ObjectEntity = {
267267
## Building
268268

269269
```bash
270-
npm install
271-
npm run build
270+
pnpm install
271+
pnpm run build
272272
```
273273

274274
This will compile TypeScript files to JavaScript and generate type declarations in the `dist/` directory.

0 commit comments

Comments
 (0)