Skip to content

Commit 26a6867

Browse files
sameh-faroukclaude
andcommitted
chore: standardize on npm, remove yarn.lock
CI and local dev used yarn (yarn.lock) while the Dockerfile used npm ci (package-lock.json). The two lock files had 57 version mismatches. Standardize on npm everywhere: - Remove yarn.lock - Regenerate package-lock.json from clean npm install - CI: yarn install -> npm ci, yarn build -> npm run build - docker-compose: ["yarn", "process"] -> ["npm", "run", "process"] - Docs and scripts: yarn -> npm run Fixes: #220 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3ae18d2 commit 26a6867

8 files changed

Lines changed: 1516 additions & 28337 deletions

File tree

.github/workflows/CI.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ jobs:
1414
uses: actions/setup-node@v3
1515
with:
1616
node-version: 20
17-
cache: "yarn"
18-
cache-dependency-path: "**/yarn.lock"
17+
cache: "npm"
1918
- name: Install dependencies
20-
run: yarn install
19+
run: npm ci
2120
- name: Build
22-
run: yarn build
21+
run: npm run build

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ See [docs](./docs/readme.md)
3939
- [development.md](./docs/development.md) - Local development setup
4040
- [production.md](./docs/production.md) - Production deployment
4141
- [release_process.md](./docs/release_process.md) - Release workflow
42-
- `schema.graphql` - GraphQL schema — changes here regenerate `src/model/` via `yarn codegen`
42+
- `schema.graphql` - GraphQL schema — changes here regenerate `src/model/` via `npm run codegen`
4343
- `Makefile` - Common tasks: `typegen`, `typegen-add`, `typegen-seed`, `version-bump`
4444
- `processor-chart/` - Helm chart for processor + query node deployment
4545
- `indexer/chart/` - Helm chart for indexer stack deployment

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ services:
3232
- TYPEORM_LOGGING=error
3333
ports:
3434
- 44233:44233
35-
command: ["yarn", "process"]
35+
command: ["npm", "run", "process"]
3636

3737
query-node:
3838
image: ghcr.io/threefoldtech/tfchain_graphql_query-node:latest

docs/development.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## Install
44

55
```bash
6-
yarn
7-
yarn build
6+
npm install
7+
npm run build
88
```
99

1010
## Local Network
@@ -55,9 +55,9 @@ INDEXER_ENDPOINT_URL=http://localhost:8888/graphql
5555
Start the local PostgreSQL container and run the processor:
5656

5757
```bash
58-
yarn build
59-
yarn db:up
60-
yarn process
58+
npm run build
59+
npm run db:up
60+
npm run process
6161
```
6262

6363
You should see TFChain blocks being processed by the processor:
@@ -79,7 +79,7 @@ At this step, running `docker ps` should show the indexer containers running:
7979
Start the query node:
8080

8181
```bash
82-
yarn api
82+
npm run api
8383
```
8484

8585
Now you can use the GraphQL playground at http://localhost:4000/graphql
@@ -93,7 +93,7 @@ When TFChain has a new spec version with type changes, see [typeChanges.md](./ty
9393
make typegen-add
9494

9595
# Check what changed in src/types/, add handler branches if needed
96-
yarn build
96+
npm run build
9797
```
9898

9999
## Modifying the GraphQL Schema
@@ -103,17 +103,17 @@ If you need to add new entities or fields to the GraphQL API:
103103
1. Edit `schema.graphql`
104104
2. Regenerate models and create a migration:
105105
```bash
106-
yarn codegen
107-
yarn build
108-
yarn db:create-migration
106+
npm run codegen
107+
npm run build
108+
npm run db:create-migration
109109
```
110110
3. Add or update event handlers in `src/mappings/`
111111
4. Register new events in `src/processor.ts` if needed
112112
5. Test locally:
113113
```bash
114-
yarn db:up
115-
yarn db:migrate
116-
yarn process
114+
npm run db:up
115+
npm run db:migrate
116+
npm run process
117117
```
118118

119119
## Resetting the Processor Database
@@ -137,7 +137,7 @@ docker compose up -d
137137

138138
```bash
139139
./scripts/reset-db.sh
140-
yarn process
140+
npm run process
141141
```
142142

143143
## Debugging

0 commit comments

Comments
 (0)