Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm monorepo #148

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x

- uses: pnpm/action-setup@v4
- name: Install dependencies
run: npm install
run: pnpm install --frozen-lockfile
- name: Build
run: npm run build
run: pnpm run build
- name: Test
run: npm run test
run: pnpm run test
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v4
- name: Install dependencies
run: npm install
run: pnpm install --frozen-lockfile
- name: Build
run: npm run build
run: pnpm run build
- name: Test
run: npm test
run: pnpm run test
- name: Publish to npm
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }}
12 changes: 6 additions & 6 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: pnpm/action-setup@v4
- name: Install dependencies
run: npm install
run: pnpm install --frozen-lockfile
- name: Build TypeDoc
run: npm run typedoc && npm run typedoc -- --json website/public/api/openapi.json
run: |
pnpm run typedoc
pnpm run typedoc -- --json website/public/api/openapi.json
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: ./website/public
folder: ./website/public
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ node_modules/
website/public/api/

package-lock.json
pnpm-lock.yaml
*.log
.env
.env
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"build:test": "rimraf bin && tsc -p test/tsconfig.json",
"dev": "npm run build:test -- --watch",
"test": "node bin/test",
"typedoc": "typedoc --plugin typedoc-github-theme --theme typedoc-github-theme"
"typedoc": "typedoc --plugin typedoc-github-theme --theme typedoc-github-theme",
"preinstall": "npx only-allow pnpm"
},
"keywords": [
"swagger",
Expand Down Expand Up @@ -91,5 +92,14 @@
"src",
"README.md",
"LICENSE"
]
],
"packageManager": "pnpm@10.5.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manage pnpm version

"pnpm": {
"executionEnv": {
"nodeVersion": "22.14.0"
},
Comment on lines +98 to +100
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manage node version by pnpm so contributors can use the same node version

"onlyBuiltDependencies": [
"@nestjs/core"
]
}
}
Loading