chore: migrate package manager from npm to pnpm
This commit is contained in:
@@ -84,7 +84,7 @@ This project includes a build step to prepare the action for use.
|
||||
### Why a Build Step?
|
||||
|
||||
We use a build step to compile the JavaScript code and its dependencies into a single, self-contained file (`dist/index.js`). This approach is chosen for the following reasons:
|
||||
1. **Zero-configuration at Runtime:** By bundling everything, the action runner doesn't need to run `npm install`, which speeds up the action execution.
|
||||
1. **Zero-configuration at Runtime:** By bundling everything, the action runner doesn't need to run `pnpm install` or `npm install`, which speeds up the action execution.
|
||||
2. **Reliability:** It guarantees that the exact versions of dependencies tested during development are used in the action, avoiding potential issues with version updates or missing packages.
|
||||
3. **Standard Practice:** This is a recommended practice for JavaScript-based GitHub/Gitea Actions.
|
||||
|
||||
@@ -100,8 +100,8 @@ We chose [`@vercel/ncc`](https://github.com/vercel/ncc) as the compiler because:
|
||||
If you modify `index.js` or change dependencies, you must rebuild the project before committing:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run build
|
||||
pnpm install
|
||||
pnpm run build
|
||||
```
|
||||
|
||||
This will update the `dist/index.js` file, which should be committed to the repository.
|
||||
|
||||
Reference in New Issue
Block a user