Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion apps/entropy-tester/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lib
dist
2 changes: 1 addition & 1 deletion apps/entropy-tester/cli/run.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env node
import { main } from "../dist/index.js";
main();
main().argv;
5 changes: 3 additions & 2 deletions apps/entropy-tester/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/entropy-tester",
"version": "1.0.0",
"version": "1.0.1",
"description": "Utility to test entropy provider callbacks",
"type": "module",
"main": "dist/index.js",
Expand All @@ -22,7 +22,8 @@
"test:format": "prettier --check .",
"test:lint": "eslint . --max-warnings 0",
"test:types": "tsc",
"start": "tsc && node cli/run.js"
"dev:start": "tsc && node cli/run.js",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is named start:dev (and the other one is named start:prod) in other services

"start": "node cli/run.js"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion apps/entropy-tester/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const RUN_OPTIONS = {
} as const;

export const main = function () {
yargs(hideBin(process.argv))
return yargs(hideBin(process.argv))
.parserConfiguration({
"parse-numbers": false,
})
Expand Down
8 changes: 6 additions & 2 deletions apps/entropy-tester/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "@cprussin/tsconfig/nextjs.json",
"include": ["**/*.ts", "**/*.tsx"],
"extends": "@cprussin/tsconfig/base.json",
"compilerOptions": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, I will separate out things so that the base tsconfig is just used to check types (i.e. noEmit: true), and I have an extended tsconfig for actually building. See https://github.com/pyth-network/pyth-crosschain/blob/main/packages/component-library/tsconfig.build.json for an example, and https://github.com/pyth-network/pyth-crosschain/blob/main/packages/component-library/package.json#L22 for the corresponding build script (this one is a bit weird because it's running react compiler but in your case you can just omit the babel command).

I prefer doing things this way because it allows you to run just a type check as part of CI without actually building. It's a bit pedantic but I do find it nice.

"outDir": "./dist",
"noEmit": false
},
"include": ["**/*.ts"],
"exclude": ["node_modules"]
}
Loading