mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-10 08:08:16 -05:00
Follow up to https://github.com/ChainSafe/lodestar/pull/7610 with a few restructuring suggestions, see comments below for detailed changes, revives constants tests we are no longer running in CI and makes each package executable separately again, ie. `cd packages/<package-name>` into `yarn test:unit` works for all packages again. One major change is that unit tests default should be written with `mainnet` preset in mind as I noticed that makes a lot more sense for a bunch of existing tests, eg. we have tests that depend on external fixtures, like api spec tests for events and those are not compatible with `minimal` preset. Also there doesn't seem to be much downside in most cases for unit tests to use `mainnet` preset as it does not run through all the epoch, like for example a e2e or sim test does. So overall, it allows us to use mainnet fixtures / more "real world" data which seems better with little to no downside. Time comparison running unit tests on `unstable` vs. this branch **unstable**  **nflaig/restructure-tests**  There is just a difference of 2 seconds (might be a fluke) in a 6 minute run, this seems acceptable to me considering the benefits of using `mainnet` preset noted above.
96 lines
2.3 KiB
JSON
96 lines
2.3 KiB
JSON
{
|
|
"name": "@lodestar/api",
|
|
"description": "A Typescript REST client for the Ethereum Consensus API",
|
|
"license": "Apache-2.0",
|
|
"author": "ChainSafe Systems",
|
|
"homepage": "https://github.com/ChainSafe/lodestar#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com:ChainSafe/lodestar.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/ChainSafe/lodestar/issues"
|
|
},
|
|
"version": "1.29.0",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"import": "./lib/index.js"
|
|
},
|
|
"./server": {
|
|
"import": "./lib/server/index.js"
|
|
},
|
|
"./beacon": {
|
|
"import": "./lib/beacon/index.js"
|
|
},
|
|
"./beacon/server": {
|
|
"import": "./lib/beacon/server/index.js"
|
|
},
|
|
"./builder": {
|
|
"import": "./lib/builder/index.js"
|
|
},
|
|
"./builder/server": {
|
|
"import": "./lib/builder/server/index.js"
|
|
},
|
|
"./keymanager": {
|
|
"import": "./lib/keymanager/index.js"
|
|
},
|
|
"./keymanager/server": {
|
|
"import": "./lib/keymanager/server/index.js"
|
|
}
|
|
},
|
|
"typesVersions": {
|
|
"*": {
|
|
"*": [
|
|
"*",
|
|
"lib/*",
|
|
"lib/*/index"
|
|
]
|
|
}
|
|
},
|
|
"types": "./lib/index.d.ts",
|
|
"files": [
|
|
"lib/**/*.d.ts",
|
|
"lib/**/*.js",
|
|
"lib/**/*.js.map",
|
|
"*.d.ts",
|
|
"*.js"
|
|
],
|
|
"scripts": {
|
|
"clean": "rm -rf lib && rm -f *.tsbuildinfo",
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"build:watch": "yarn run build --watch",
|
|
"build:release": "yarn clean && yarn run build",
|
|
"check-build": "node -e \"(async function() { await import('./lib/index.js') })()\"",
|
|
"check-types": "tsc",
|
|
"lint": "biome check src/ test/",
|
|
"lint:fix": "yarn run lint --write",
|
|
"test": "yarn test:unit",
|
|
"test:unit": "vitest run --project unit --project unit-minimal",
|
|
"check-readme": "typescript-docs-verifier"
|
|
},
|
|
"dependencies": {
|
|
"@chainsafe/persistent-merkle-tree": "^1.1.0",
|
|
"@chainsafe/ssz": "^1.2.0",
|
|
"@lodestar/config": "^1.29.0",
|
|
"@lodestar/params": "^1.29.0",
|
|
"@lodestar/types": "^1.29.0",
|
|
"@lodestar/utils": "^1.29.0",
|
|
"eventsource": "^2.0.2",
|
|
"qs": "^6.11.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/eventsource": "^1.1.11",
|
|
"@types/qs": "^6.9.7",
|
|
"ajv": "^8.12.0",
|
|
"fastify": "^5.2.1"
|
|
},
|
|
"keywords": [
|
|
"ethereum",
|
|
"eth-consensus",
|
|
"beacon",
|
|
"api",
|
|
"blockchain"
|
|
]
|
|
}
|