Skip to content
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

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Jul 1, 2024

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).

[ci skip]
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.00%. Comparing base (b6141a6) to head (e195e73).
Report is 1 commits behind head on main.

Current head e195e73 differs from pull request most recent head 683171e

Please upload reports for the commit 683171e to get more accurate results.

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.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@dahlia dahlia left a 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

@kitsonk
Copy link
Contributor Author

kitsonk commented Jul 1, 2024

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.

@dahlia dahlia merged commit 8939685 into dahlia:main Jul 2, 2024
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.

JSR logtape doesn't work under Node.js
2 participants