-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,38 +52,36 @@ gh repo clone wevm/abitype | |
<a href="#basic-guide">↑ back to top</a></b> | ||
</div> | ||
|
||
## Installing Node.js and pnpm | ||
## 2. Installing Node.js and pnpm | ||
|
||
ABIType uses [pnpm](https://pnpm.io) as its package manager. You need to install **Node.js v16 or higher** and **pnpm v7 or higher**. | ||
|
||
You can run the following commands in your terminal to check your local Node.js and npm versions: | ||
ABIType uses Node.js with [pnpm workspaces](https://pnpm.io/workspaces) to manage multiple projects. You can run the following command in your terminal to check your local Node.js version. | ||
|
||
```bash | ||
node -v | ||
pnpm -v | ||
``` | ||
|
||
If the versions are not correct or you don't have Node.js or pnpm installed, download and follow their setup instructions: | ||
If **`node@22`** is not installed, you can install via [fnm](https://github.com/Schniz/fnm) or from the [official website](https://nodejs.org). | ||
|
||
Once Node.js is installed, run the following to install [Corepack](https://nodejs.org/api/corepack.html). Corepack automatically installs and manages pnpm. | ||
|
||
- Install Node.js using [fnm](https://github.com/Schniz/fnm) or from the [official website](https://nodejs.org) | ||
- Install [pnpm](https://pnpm.io/installation) | ||
```bash | ||
corepack enable | ||
``` | ||
|
||
<div align="right"> | ||
<a href="#basic-guide">↑ back to top</a></b> | ||
</div> | ||
|
||
## Installing dependencies | ||
|
||
Once in the project's root directory, run the following command to install the project's dependencies: | ||
Once in the project's root directory, run the following command to install pnpm (via Corepack) and the project's dependencies: | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
After the install completes, pnpm links packages across the project for development and [git hooks](https://github.com/toplenboren/simple-git-hooks) are set up. | ||
|
||
> **Note:** In case you have to install new packages or upgrade packages make sure to use **[email protected]** and **[email protected]** | ||
<div align="right"> | ||
<a href="#basic-guide">↑ back to top</a></b> | ||
</div> | ||
|
@@ -94,11 +92,8 @@ Tests are run with [Vitest](https://vitest.dev/guide/testing-types.html): | |
|
||
```bash | ||
pnpm test | ||
pnpm test:typecheck | ||
``` | ||
|
||
> **Note** Ensure to build the package (`pnpm build`) before running the `test:typecheck` suite. | ||
<div align="right"> | ||
<a href="#basic-guide">↑ back to top</a></b> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"type": "module", | ||
"scripts": { | ||
"bench": "vitest bench", | ||
"bench:types": "TYPES=true vitest bench-d.ts", | ||
"build": "pnpm run --r --filter \"./packages/**\" build", | ||
"changeset:prepublish": "pnpm version:update && pnpm build && bun .scripts/formatPackageJson.ts && bun .scripts/generateProxyPackages.ts", | ||
"changeset:publish": "pnpm changeset:prepublish && changeset publish", | ||
|
@@ -22,7 +23,6 @@ | |
"test": "vitest", | ||
"test:build": "pnpm run --r --parallel test:build", | ||
"test:cov": "vitest run --coverage", | ||
"test:types": "TYPES=true vitest bench-d.ts", | ||
"test:update": "vitest --update", | ||
"trace": "tsc --noEmit --generateTrace ./playgrounds/performance/out --incremental false --project playgrounds/performance/tsconfig.json && echo \"Open playgrounds/performance/out/trace.json in https://ui.perfetto.dev\"", | ||
"typecheck": "pnpm run --r --parallel typecheck && tsc --noEmit", | ||
|
@@ -49,6 +49,9 @@ | |
"vitest": "^1.6.0" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": "22.x" | ||
}, | ||
"simple-git-hooks": { | ||
"pre-commit": "pnpm format && pnpm lint:fix" | ||
}, | ||
|