mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-10 08:08:16 -05:00
**Motivation** Make the types exports consistent for all packages. All modern runtimes support [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) and there are caveats when we have both conditional exports and normal exports present in a package.json. This PR tend to make all exports follow same consistent and modern pattern. **Description** - We were using subpath exports for some packages and module exports for other - Keep all the types export consistent as subpath exports. - Remove "types" and "exports` directive from package.json - Remove `typesVersions`, this is useful only if we have different version of types for different versions of Typescript. Or having different types files for different file paths. **Steps to test or reproduce** - Run all CI
75 lines
2.1 KiB
JSON
75 lines
2.1 KiB
JSON
{
|
|
"name": "@lodestar/params",
|
|
"version": "1.35.0",
|
|
"description": "Chain parameters required for lodestar",
|
|
"author": "ChainSafe Systems",
|
|
"license": "Apache-2.0",
|
|
"bugs": {
|
|
"url": "https://github.com/ChainSafe/lodestar/issues"
|
|
},
|
|
"homepage": "https://github.com/ChainSafe/lodestar#readme",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"bun": "./src/index.ts",
|
|
"types": "./lib/index.d.ts",
|
|
"import": "./lib/index.js"
|
|
},
|
|
"./presets/mainnet": {
|
|
"bun": "./src/presets/mainnet.ts",
|
|
"types": "./lib/presets/mainnet.d.ts",
|
|
"import": "./lib/presets/mainnet.js"
|
|
},
|
|
"./presets/minimal": {
|
|
"bun": "./src/presets/minimal.ts",
|
|
"types": "./lib/presets/minimal.d.ts",
|
|
"import": "./lib/presets/minimal.js"
|
|
},
|
|
"./presets/gnosis": {
|
|
"bun": "./src/presets/gnosis.ts",
|
|
"types": "./lib/presets/gnosis.d.ts",
|
|
"import": "./lib/presets/gnosis.js"
|
|
},
|
|
"./setPreset": {
|
|
"bun": "./src/setPreset.ts",
|
|
"types": "./lib/setPreset.d.ts",
|
|
"import": "./lib/setPreset.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"src",
|
|
"lib",
|
|
"!**/*.tsbuildinfo"
|
|
],
|
|
"scripts": {
|
|
"clean": "rm -rf lib && rm -f *.tsbuildinfo",
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"build:release": "yarn clean && yarn build",
|
|
"build:watch": "yarn run build --watch",
|
|
"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",
|
|
"test:browsers": "vitest run --project browser",
|
|
"test:e2e": "vitest run --project e2e --project e2e-mainnet",
|
|
"check-readme": "typescript-docs-verifier"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com:ChainSafe/lodestar.git"
|
|
},
|
|
"keywords": [
|
|
"ethereum",
|
|
"eth-consensus",
|
|
"beacon",
|
|
"blockchain"
|
|
],
|
|
"devDependencies": {
|
|
"@types/js-yaml": "^4.0.5",
|
|
"axios": "^1.3.4",
|
|
"js-yaml": "^4.1.0"
|
|
}
|
|
}
|