-
-
Notifications
You must be signed in to change notification settings - Fork 12
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 bug allowing logtape to work under Node.js #4
Conversation
[ci skip]
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4 +/- ##
==========================================
+ Coverage 97.74% 98.00% +0.25%
==========================================
Files 9 9
Lines 622 703 +81
Branches 128 128
==========================================
+ Hits 608 689 +81
Misses 13 13
Partials 1 1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
The lint seemed to fail. Could you check it out?
error[no-slow-types]: found destructuring, which is not supported in the public API
--> /Users/runner/work/logtape/logtape/logtape/mod.ts:35:14
|
35 | export const { getFileSink, getRotatingFileSink } =
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= hint: separate each destructured symbol into its own export statement
info: destructuring can not be inferred by fast check
docs: https://jsr.io/go/slow-type-unsupported-destructuring
Yeah, forgot to do a publish dry run... It should pass now. |
Fixes #3
This dynamic imports the filesink module based on if it is Deno or not, as well as safely access the Deno namespace for top level code that is evaluated when modules are loaded (which occurs when Cloudflare Workers create bundles).