Skip to content

Commit 78839c3

Browse files
authored
chore: add turborepo move to pnpm (#147)
* chore: add turborepo move to pnpm * chore: migrate github workflow to use pnpm * fix: unify pnpm version between package.json and github workflow * fix: run commands using npm instead of pnpm
1 parent 5986291 commit 78839c3

File tree

12 files changed

+7775
-14660
lines changed

12 files changed

+7775
-14660
lines changed

.github/workflows/node.js.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v4
1920
- name: Use Node.js
2021
uses: actions/setup-node@v4
2122
with:
2223
node-version: 22.x
23-
cache: 'npm'
24-
cache-dependency-path: ./packages/nextjs-cache-handler/package-lock.json
25-
- run: npm ci
24+
cache: 'pnpm'
25+
- run: pnpm install --frozen-lockfile
2626
- run: npm run build --if-present
2727
- run: npm test

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
- name: Copy README file to package directory
2424
run: |
2525
cp ../../README.md .
26+
- uses: pnpm/action-setup@v4
2627
- uses: actions/setup-node@v4
2728
with:
28-
cache: npm
29+
cache: pnpm
2930
node-version: lts/*
30-
cache-dependency-path: ${{ env.rootDir }}/package-lock.json
3131
registry-url: "https://registry.npmjs.org"
32-
- run: npm ci
32+
- run: pnpm install --frozen-lockfile
3333
- name: Publish to npm
3434
run: |
3535
if [ "${{ github.event.inputs.prerelease }}" == "true" ]; then

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Turborepo
2+
.turbo
3+
4+
# Dependencies
5+
node_modules
6+
7+
8+
# Build outputs
9+
dist
10+
.next
11+
12+
# Logs
13+
*.log
14+
15+
# OS
16+
.DS_Store
17+
18+
# IDE
19+
.vscode
20+
.idea
21+
*.swp
22+
*.swo
23+

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# pnpm configuration
2+
shamefully-hoist=true
3+
strict-peer-dependencies=false
4+

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,22 @@ export default async function handler(request, response) {
557557
558558
---
559559
560+
## Contributing
561+
562+
This project uses [Turborepo](https://turbo.build/repo) to manage the monorepo structure with the main package and examples.
563+
564+
### Prerequisites
565+
566+
- Node.js >= 22.0.0
567+
- pnpm >= 9.0.0
568+
569+
### Development Workflow
570+
571+
- **Start dev server**: `pnpm dev` (runs all dev servers in parallel)
572+
- **Run all tests**: `pnpm test`
573+
574+
---
575+
560576
## License
561577
562578
Licensed under the [MIT License](./LICENSE), consistent with the original `@neshca/cache-handler`.

0 commit comments

Comments
 (0)