Files
hub-monorepo/package.json
Shane da Silva 1d07446152 fix: Display correct app version when run in Docker container (#1047)
Currently, if you call `getInfo` the version falls back to `1.0.0`,
which is confusing since users want to know which version of the hub
they are communicating with.

The reason this happens is because the `npm_package_version` environment
variable trick only works if you run via `npm`/`yarn`. Since we don't
want those as PID 1 (it interferes with signal processing) we build and
run directly with the `node` executable.

To get this to work, we create a symlink to `package.json` in the `src`
directory so that we can still reference the version specified in that
file.

This required some adjustments to have TypeScript not error (including
upgrading Jest), but should now work.
2023-07-10 16:47:06 -07:00

52 lines
1.5 KiB
JSON

{
"name": "hubble",
"description": "A monorepo for the Farcaster Hub",
"version": "0.0.0",
"private": true,
"packageManager": "yarn@1.22.19",
"workspaces": [
"apps/*",
"packages/*"
],
"scripts": {
"build": "./node_modules/.bin/turbo run build",
"clean": "./node_modules/.bin/turbo run clean",
"dev": "./node_modules/.bin/turbo run dev --parallel",
"protoc": "cd packages/core && yarn protoc && cd ../hub-nodejs && yarn protoc && cd ../hub-web && yarn protoc",
"test": "./node_modules/.bin/turbo run test",
"test:ci": "./node_modules/.bin/turbo run test:ci -- --passWithNoTests",
"lint": "./node_modules/.bin/turbo run lint --parallel",
"lint:ci": "./node_modules/.bin/turbo run lint:ci --parallel",
"prepare": "husky install",
"version-packages": "changeset version --ignore @farcaster/hubble",
"release-packages": "yarn build && changeset publish",
"release-all": "yarn build && changeset publish && changeset tag"
},
"engines": {
"npm": ">=8.0.0",
"node": ">=18.7"
},
"devDependencies": {
"@changesets/changelog-git": "^0.1.14",
"@changesets/cli": "^2.26.0",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.3.64",
"@swc/jest": "^0.2.26",
"@types/jest": "^29.0.2",
"@types/node": "^18.7.14",
"husky": "^8.0.3",
"jest": "^29.6.1",
"lint-staged": "^13.2.2",
"rimraf": "^5.0.1",
"ts-node": "^10.9.1",
"tsup": "^6.5.0",
"turbo": "1.10.3",
"typescript": "^5.0.2"
},
"lint-staged": {
"*.ts": [
"rome check"
]
}
}