-
-
Notifications
You must be signed in to change notification settings - Fork 618
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
fix: circular dependencies #3081
base: master
Are you sure you want to change the base?
Commits on Sep 27, 2024
-
fix(lib): circular dependency index.js <-> lib
pool.js and pool_connection.js required index.js, and index.js required pool.js and pool_connection.js. Circular dependency can cause all sorts of problems. This fix aims to provide a step towards fixing a problem with @opentelemetry/instrumentation-mysql2, which looses several exports when using its patched require. For instance, `format` is lost and can cause an instrumented application to crash.
Configuration menu - View commit details
-
Copy full SHA for 33da6f7 - Browse repository at this point
Copy the full SHA 33da6f7View commit details -
fix: circular dependency index.js <-> promise.js
index.js and promise.js require each other. Circular dependency can cause all sorts of problems. This commit aims to fix a problem with @opentelemetry/instrumentation-mysql2, which looses several exports when using its patched require. For instance, `format` is lost and can cause an instrumented application to crash.
Configuration menu - View commit details
-
Copy full SHA for 40053ad - Browse repository at this point
Copy the full SHA 40053adView commit details
Commits on Sep 28, 2024
-
refactor: split common.js into lib modules
The proposal to put common.js into lib was good, but it felt weird to arbitrarily stuff just some exported functions in lib/common.js. This made sense when common.js was meant to provide commons for index.js and promise.js. But in the lib, this felt like a weird scope. I therefore split common.js into - lib/create_connection.js - lib/create_pool.js - lib/create_pool_cluster.js Also made `require` more consistent in all affected files: all `require` files now have a js suffix when they refer to a single local file.
Configuration menu - View commit details
-
Copy full SHA for fbb8ab1 - Browse repository at this point
Copy the full SHA fbb8ab1View commit details
Commits on Oct 3, 2024
-
fix: circular dependency to promise.js
promise.js was required by lib sources, and promise.js required the same lib sources eventually. Extracted the respective classes to lib. Also extracted functions that are shared between several of the new files. Decided to put each exported class / function into its own file. This may bloat the lib folder a bit, but it provides clarity (where to find what).
Configuration menu - View commit details
-
Copy full SHA for c11fc8d - Browse repository at this point
Copy the full SHA c11fc8dView commit details
Commits on Oct 19, 2024
-
fix: missing patched functions
The extraction of classes was performed without extracting the patch of methods like `escape`, etc. The patching is now performed in the files that define the respective classes, guaranteeing patched versions when these files are required.
Configuration menu - View commit details
-
Copy full SHA for a1ec926 - Browse repository at this point
Copy the full SHA a1ec926View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ec00fe - Browse repository at this point
Copy the full SHA 2ec00feView commit details
Commits on Oct 24, 2024
-
style: add missing semicolons and file name suffixes for require
Co-authored-by: mknj <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 127df3c - Browse repository at this point
Copy the full SHA 127df3cView commit details