evanderkoogh / otel-cf-workers

An OpenTelemetry compatible library for instrumenting and exporting traces for Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
239 stars 50 forks source link

Types are not properly exposed #29

Closed yacinehmito closed 1 year ago

yacinehmito commented 1 year ago

I just attempted to use this package with Deno, using esm.sh to get it from npm, and the types were not available.

I ran diagnostics from arethetypeswrong and here are the results:

  "@microlabs/otel-cf-workers"
node10
node16 (from CJS) 👺 Masquerading as ESM / ⚠️ ESM (dynamic import only) / 🥴 Internal resolution error
node16 (from ESM) 🥴 Internal resolution error
bundler

👺 Masquerading as ESM

Import resolved to an ESM type declaration file, but a CommonJS JavaScript file.

⚠️ ESM (dynamic import only)

A require call resolved to an ESM JavaScript file, which is an error in Node and some bundlers. CommonJS consumers will need to use a dynamic import.

🥴 Internal resolution error

Import found in a type declaration file failed to resolve. Either this indicates that runtime resolution errors will occur, or (more likely) the types misrepresent the contents of the JavaScript files.