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

Use pnpm #60

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion .github/workflows/api-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- uses: actions/setup-node@v3
with:
node-version: '18.17.0'
cache: 'pnpm'

- run: npm ci
- run: pnpm install

- name: Copy old public.d.ts
run: mv ./.api/public.d.ts ./.api/public_old.d.ts
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- uses: actions/setup-node@v3
with:
node-version: '18.17.0'
cache: 'pnpm'

- name: Build all modules
run: npm ci
run: pnpm install

- name: Get changed files
id: changed-files
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- uses: actions/setup-node@v3
with:
node-version: '18.17.0'
cache: 'pnpm'

- run: npm ci
- run: pnpm install

- run: npm test

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- uses: actions/setup-node@v3
with:
node-version: '18.17.0'
cache: 'pnpm'

- run: node --version
- run: npm --version

- run: npm ci
- run: pnpm install

- run: npm test

Expand Down
15 changes: 2 additions & 13 deletions README_MAINTAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,5 @@ npm run version-alpha

## publish

We used monorepo but only `@cocos/ccbuild` is public project, every time we need to publish, we need to deploy the project first.
Please remember to version your package before you deploy and publish it.

```sh

# this would collect all private project together, and generate one project in 'deploy' folder
npm run deploy

# if you got a publish authorization, then you could publish the package in 'deploy' folder
cd ./deploy/
npm publish
```

- Update version in package.json
- After code is merged repo, [draft a new release](https://github.com/cocos/cocos-ccbuild/releases/new) with correct version, it will trigger github action runner to run the `deploy` task and push to npm registry. Note that only the people who have the authority could draft a release.
17 changes: 12 additions & 5 deletions modules/build-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,25 @@
"author": "",
"license": "ISC",
"dependencies": {
"@types/babel__core": "7.1.20",
"@types/babel__generator": "7.6.4",
"@types/babel__traverse": "7.18.2",
"@babel/core": "^7.20.12",
"@babel/parser": "^7.20.13",
"@babel/traverse": "^7.20.13",

"@types/resolve": "^1.20.2",
"dedent": "^0.7.0",
"fs-extra": "~11.1.1",
"glob": "~7.2.0",
"json5": "^2.2.3",
"resolve": "^1.22.1",
"@ccbuild/stats-query": "*",
"@ccbuild/transformer": "*",
"@ccbuild/utils": "*",
"@ccbuild/stats-query": "workspace:*",
"@ccbuild/transformer": "workspace:*",
"@ccbuild/utils": "workspace:*",
"semver": "~7.5.3",
"@ccbuild/bundler": "*",
"@ccbuild/modularize": "*"
"@ccbuild/bundler": "workspace:*",
"@ccbuild/modularize": "workspace:*"
},
"devDependencies": {
"@types/dedent": "^0.7.0",
Expand Down
8 changes: 4 additions & 4 deletions modules/dts-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"dependencies": {
"tfig": "^3.3.2",
"fs-extra": "~11.1.1",
"@ccbuild/modularize": "*",
"@ccbuild/stats-query": "*",
"@ccbuild/transformer": "*",
"@ccbuild/utils": "*"
"@ccbuild/modularize": "workspace:*",
"@ccbuild/stats-query": "workspace:*",
"@ccbuild/transformer": "workspace:*",
"@ccbuild/utils": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion modules/modularize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"author": "PP",
"license": "ISC",
"dependencies": {
"@ccbuild/utils": "*",
"@ccbuild/utils": "workspace:*",
"commander": "~11.0.0",
"ejs": "~3.1.9",
"fs-extra": "~11.1.1",
Expand Down
2 changes: 1 addition & 1 deletion modules/stats-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@ccbuild/modularize": "*",
"@ccbuild/modularize": "workspace:*",
"@types/resolve": "^1.20.2",
"dedent": "^0.7.0",
"fs-extra": "~11.1.1",
Expand Down
Loading
Loading