Skip to content

feat: migrate to native ES modules#3

Merged
SerhiyGreench merged 2 commits into
masterfrom
v3
Jul 9, 2026
Merged

feat: migrate to native ES modules#3
SerhiyGreench merged 2 commits into
masterfrom
v3

Conversation

@SerhiyGreench

Copy link
Copy Markdown
Collaborator

No description provided.

- package.json: type=module, exports map, engines node>=22.12
- explicit .js extensions on all relative imports; tsconfig es2024 +
  skipLibCheck + verbatimModuleSyntax with import type annotations
- host package.json reads (instrumentation name/version, traced pkg
  name) use readFileSync/JSON.parse instead of require() — no module
  semantics needed for JSON
- spec: package manifest read via import.meta.url; the no-package.json
  fallback test loads a fresh module copy via query-busted dynamic
  import (the ES module registry is immutable)

BREAKING CHANGE: package is ESM-only; CJS consumers require Node >=22.12
(require(esm)) and TypeScript >=5.8 to type-check

Verified: 21/21 tests on Node 24.16.0, docker node:22 (22.23) and
docker node:24 (24.18); CJS require(esm) interop smoke-tested
@SerhiyGreench
SerhiyGreench merged commit e47e8a4 into master Jul 9, 2026
6 checks passed
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.

1 participant