Skip to content
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

feat(js): improve @nx/js:node executor to be more resilient to many file change events #16924

Merged
merged 1 commit into from
May 11, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented May 10, 2023

This PR provides a new implementation of @nx/js:node executor to fix two issues:

  1. File changes cause server to not start properly (e.g. port is already in use from old process)
  2. Changes to workspace libraries don't cause a rebuild.

TODO:

  • Support node require overrides that the old executor implements (i.e. buildable lib mapping)
  • Cleanup (remove old implementation, etc.)

What's new

  • @nx/js:node executor uses Nx Daemon to watch for while changes to app and its dependencies.
  • New --debounce option to batch file events to avoid unnecessary rebuilds. Defaults to 500 ms.
  • Better logging so users know if something errors out or exits unexpectedly.

Related Issues

#9239, #13248

@vercel
Copy link

vercel bot commented May 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2023 4:33pm

@jaysoo jaysoo force-pushed the feat/node-exec-v2 branch 2 times, most recently from d02f8e1 to e0b3297 Compare May 10, 2023 19:37
@jaysoo jaysoo force-pushed the feat/node-exec-v2 branch from e0b3297 to 4bcc06d Compare May 11, 2023 14:18
@jaysoo jaysoo force-pushed the feat/node-exec-v2 branch from 4bcc06d to d2432dc Compare May 11, 2023 15:28
@jaysoo jaysoo marked this pull request as ready for review May 11, 2023 15:30
@jaysoo jaysoo requested review from nartc and ndcunningham as code owners May 11, 2023 15:30
@jaysoo jaysoo force-pushed the feat/node-exec-v2 branch from d2432dc to 6fdfb63 Compare May 11, 2023 15:32
@jaysoo jaysoo force-pushed the feat/node-exec-v2 branch from 6fdfb63 to 6a8ff2c Compare May 11, 2023 15:56
@jaysoo jaysoo force-pushed the feat/node-exec-v2 branch from 6a8ff2c to dc9bd0c Compare May 11, 2023 16:08
@jaysoo jaysoo force-pushed the feat/node-exec-v2 branch from dc9bd0c to efe04d6 Compare May 11, 2023 16:15
@jaysoo jaysoo force-pushed the feat/node-exec-v2 branch from efe04d6 to db2f3cc Compare May 11, 2023 16:22
@jaysoo jaysoo merged commit dc71229 into nrwl:master May 11, 2023
@jaysoo jaysoo deleted the feat/node-exec-v2 branch May 11, 2023 20:31
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2023
@mandarini
Copy link
Member

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants