Skip to content

chore: replace pkg-up with empathic - #934

Open
andriyor wants to merge 1 commit into
fastify:mainfrom
andriyor:replace-pkg-up-with-empathic
Open

andriyor wants to merge 1 commit into
fastify:mainfrom
andriyor:replace-pkg-up-with-empathic

Conversation

@andriyor

Copy link
Copy Markdown

Replaces pkg-up with empathic, the replacement suggested by e18e module-replacements.

pkg-up was used only in getPackageType (util.js), to find the nearest package.json and read its type. It now calls require('empathic/package').up({ cwd }). That also works when cwd is a file path, which requireServerPluginFromPath passes.

empathic has no dependencies, so a production install goes from 95 to 89 packages: pkg-up, find-up@6, locate-path, p-locate, p-limit, yocto-queue and path-exists are replaced by empathic.

Checklist

  • run npm run test: same results as main locally on Node 24.11.1 (222 passing). The 7 tests that fail or are cancelled on main in my environment do the same on this branch: start, graceful shutdown and app-crash tests that time out. util.js stays at 100% coverage. The global coverage threshold fails on both branches because of lib/watch/fork.js.
  • lint passes
  • commit message follows commit guidelines

🤖 Generated with Claude Code

pkg-up pulls in find-up and five more packages to find the nearest
package.json. empathic does the same with no dependencies, as suggested
by e18e module-replacements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant