Skip to content

Circular dependencies index and standalone pointing to each other #69

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

Closed
2 tasks done
micksatana opened this issue Apr 5, 2025 · 2 comments · Fixed by #70
Closed
2 tasks done

Circular dependencies index and standalone pointing to each other #69

micksatana opened this issue Apr 5, 2025 · 2 comments · Fixed by #70

Comments

@micksatana
Copy link
Contributor

micksatana commented Apr 5, 2025

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

pnpm helps in detecting circular dependencies. This is what it found.

node_modules/.pnpm/@[email protected]/node_modules/@fastify/fast-json-stringify-compiler/index.js -> node_modules/.pnpm/@[email protected]/node_modules/@fastify/fast-json-stringify-compiler/standalone.js -> node_modules/.pnpm/@[email protected]/node_modules/@fastify/fast-json-stringify-compiler/index.js

Both files depending on each other; index.js requires standalone.js and vice versa. This can be fixed by moving the functions from the index.js to the standalone.js. Then require in one direction only.

@mcollina
Copy link
Member

mcollina commented Apr 7, 2025

Thanks for reporting! Would you like to send a Pull Request to address this issue?

This is perfectly valid in npm, and likely due to some setting/default in which pnpm differs.

@micksatana
Copy link
Contributor Author

I have created a PR at #70

@Eomm Eomm linked a pull request Apr 8, 2025 that will close this issue
4 tasks
@Eomm Eomm closed this as completed Apr 8, 2025
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 a pull request may close this issue.

3 participants