Skip to content

fix: Circular dependencies #70

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

Merged
merged 1 commit into from
Apr 8, 2025
Merged

Conversation

micksatana
Copy link
Contributor

@micksatana micksatana commented Apr 5, 2025

Issue

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

node_modules/.pnpm/@fastify+fast-json-stringify-compiler@5.0.2/node_modules/@fastify/fast-json-stringify-compiler/index.js -> node_modules/.pnpm/@fastify+fast-json-stringify-compiler@5.0.2/node_modules/@fastify/fast-json-stringify-compiler/standalone.js -> node_modules/.pnpm/@fastify+fast-json-stringify-compiler@5.0.2/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.

Checklist

  • run npm run test and npm run benchmark (no benchmark script in this project)
  • tests and/or benchmarks are included (not changing functionality)
  • documentation is changed or added (no change nor feature)
  • commit message and code follows the Developer's Certification of Origin
    and the Code of conduct

Sorry, something went wrong.

@micksatana micksatana changed the title fix: Circular dependencies fix: Circular dependencies. Close #69 Apr 5, 2025
@micksatana micksatana changed the title fix: Circular dependencies. Close #69 fix: Circular dependencies Apr 5, 2025
@micksatana
Copy link
Contributor Author

Fixes #69

@Eomm Eomm merged commit 1ee0983 into fastify:main Apr 8, 2025
11 checks passed
@Eomm Eomm linked an issue Apr 8, 2025 that may be closed by this pull request
2 tasks
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.

Circular dependencies index and standalone pointing to each other
2 participants