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

improve node management #1153

Closed
wants to merge 6 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
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: pnpm/action-setup@v2
with:
version: 8

- uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install

- name: Build
run: npm run build
run: pnpm run build

- name: test
working-directory: ./test
run: pnpm install && npm start -- --skipBuild
run: |
pnpm install
pnpm start -- --skipBuild
16 changes: 7 additions & 9 deletions .github/workflows/migrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: pnpm/action-setup@v2
with:
version: 8

- uses: pnpm/action-setup@v4

- name: Setup dependencies
run: pnpm install && npm run build
run: |
pnpm install
pnpm run build

- name: Build
working-directory: ./packages/migrate
run: npm run build
run: pnpm run build

- name: test
working-directory: ./packages/migrate
run: npm run test
run: pnpm run test
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ 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@v2
with:
version: 8

- uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install
- name: Publish to npm
run: npm run package:latest
run: pnpm run package:latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH }}
- name: Website
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: ./website/out
folder: ./website/out
18 changes: 9 additions & 9 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: pnpm/action-setup@v2
with:
version: 8

- uses: pnpm/action-setup@v4
- name: Root Setup
run: pnpm install && npm run build
run: |
pnpm install
pnpm run build
- name: Build
working-directory: website
run: npm install && npm run build
Copy link
Owner

Choose a reason for hiding this comment

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

Also, website must use npm at now.

This may be caused by my unskilled monorepo composition, anyway, if try to use pnpm install command in the website directory, it does not install of website, but of other modules enrolled in the pnpm-workspace.yaml file.

By the way, if add the website directory to the pnpm-workspace.yaml file is impossible. It is because the website module requires other module's complete compilation and testing.

run: |
pnpm install
pnpm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: ./website/out
folder: ./website/out
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ node_modules/

packages/*/*.tgz
packages/*/docs
package-lock.json
pnpm-lock.yaml
*.log
*.log
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use-node-version=22.12.0
manage-package-manager-versions=true
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "node deploy build",
"package:latest": "node deploy publish --tag latest",
"package:next": "node deploy publish --tag next",
"prettier": "prettier packages/*/src/**/*.ts --write && prettier benchmark/**/*.ts && prettier test/**/*.ts --write"
"prettier": "prettier packages/*/src/**/*.ts --write && prettier benchmark/**/*.ts && prettier test/**/*.ts --write",
"preinstall": "npx only-allow pnpm"
},
"repository": {
"type": "git",
Expand All @@ -19,6 +20,7 @@
"url": "https://github.com/samchon/nestia/issues"
},
"homepage": "https://nestia.io",
"packageManager": "pnpm@9.15.0",
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^22.10.1",
Expand Down
Loading
Loading