-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: setup monorepo structure + indexer workspace #3
Conversation
Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
@juliangruber hindsight please 🙏🏻 |
"migrate": "node bin/migrate.js", | ||
"start": "node bin/piece-indexer.js", | ||
"lint": "standard", | ||
"test": "node --test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we include lint
in test
? To me, when I run npm test
, I expect it to tell me whether CI will pass. This is not the case here. Or do you have a reason for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense.
However, your proposed change would mean that we execute the linter twice when you run npm test
in the monorepo root.
I am using the setup we already have in other places:
- https://github.com/filecoin-station/spark-stats/blob/28fbe3a9b10c907f11052651d0f939f286397eec/observer/package.json#L9-L10
- https://github.com/filecoin-station/spark-api/blob/0d79f8b060aac01d2f8c04d622aed3aded3dc707/api/package.json#L11-L12
What you can do in the monorepo root
npm test
to run all CI checks in all workspaces (directories)npm test -w indexer
to run only the tests only in theindexer
directorynpm lint -w indexer
to run only the linters only in theindexer
directory
}, | ||
"dependencies": { | ||
"debug": "^4.3.6", | ||
"ioredis": "^5.4.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is ioredis
used for here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it's not used here. I want to try using Redis instead of PG, as you did in spark-rewards, and I accidentally added ioredis to dependencies in the wrong PR.
Based on the layout of https://github.com/filecoin-station/spark-stats
Components:
Links: