-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore(worker): Move nodemon to tsx for reloads from packages/shared #8801
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
Conversation
"start": "dotenv -e ../.env -- node dist/index.js", | ||
"build": "tsc", | ||
"dev": "dotenv -e ../.env -- nodemon src/index.ts", | ||
"dev": "dotenv -e ../.env -- tsx watch --clear-screen=false --include '../packages/shared/dist/*' src/index.ts", |
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.
Clear screen disabled to not remove other packages output when running the composed dev.
'@emotion/[email protected]': | ||
resolution: {integrity: sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==} | ||
|
||
'@esbuild/[email protected]': |
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.
These changes seem wrong, not sure what pnpm is doing
Will re-run
"eslint-config-standard": "^17.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"kysely-codegen": "^0.16.8", | ||
"nodemon": "^3.1.7", |
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.
Wasn't used in shared, so we can remove
turbo.json
Outdated
"cache": false, | ||
"persistent": true, | ||
"dependsOn": [ | ||
"@langfuse/shared#build" |
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.
We had this dependency also in the web container and this was hghly resource intensive. I think we can remove this and hit "pnpm run dev" on initial startup in this repo twice to account for the concurrency.
What does this PR do?
This PR changes the watcher from the worker's
dev
task from nodemon to tsx.This allows for automated reloads in the dev environment when packages/shared changes:
Screen.Recording.2025-08-28.at.22.58.03.mov
It would have been possible to configure nodemon to also listen on the dist dir, but nodemon is generally a bit outdated and tsx well supported. Additionally nodemon on mac not only listens on actualy content changes but also saves without changes, which can lead to issues when spinning up
@langfuse/shared#dev
and@langfuse/worker#dev
at the some time, due to tsc in shared dev doing a lot of writes. To help this situationshared#build
is now a depdency ofworker#dev
, so the content is updated before tsx starts listening.Type of change
Mandatory Tasks
Important
Replaces
nodemon
withtsx
forworker
dev script, updates task dependencies inturbo.json
, and removesnodemon
from dependencies.nodemon
withtsx
inworker/package.json
fordev
script to improve reloads whenpackages/shared
changes.@langfuse/shared#build
as a dependency forworker#dev
inturbo.json
to ensure content is updated beforetsx
starts.nodemon
fromdevDependencies
inpackages/shared/package.json
andworker/package.json
.tsx
todevDependencies
inworker/package.json
.turbo.json
fordev:worker
andworker#dev
to include@langfuse/shared
tasks.This description was created by
for 80282ed. You can customize this summary. It will automatically update as commits are pushed.