Skip to content

Add dual CommonJS/ESM and Deno support - #119

Merged
zuchka merged 1 commit into
mainfrom
codex/dual-cjs-esm-deno
Aug 24, 2026
Merged

zuchka merged 1 commit into
mainfrom
codex/dual-cjs-esm-deno

Conversation

@zuchka

@zuchka zuchka commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve the existing CommonJS implementation and add a thin native ESM entry point
  • add conditional exports with matching CommonJS and ESM TypeScript declarations
  • preserve established deep paths and package metadata/document paths when introducing the export map
  • support Deno 2 through the npm package
  • document CommonJS, Node ESM, and Deno usage and add an unreleased 0.7.0 changelog entry

This replaces and supersedes #116 while retaining credit for the original ESM/Deno proposal from @tukkek. The existing index.js implementation is unchanged.

Performance issue #118 is intentionally separate from this PR.

Compatibility coverage

  • existing behavior suite: 39 passing tests
  • packed-tarball CommonJS, ESM, legacy deep-path, metadata, README, and license consumers
  • Node.js 18, 20, 22, 24, and 26 package tests
  • TypeScript CommonJS/ESM consumer compilation plus Are the Types Wrong validation
  • deterministic differential comparison against published remove-markdown@0.6.4 across 11,165 input/option combinations
  • esbuild and Rollup browser-targeted consumer bundles
  • Deno 2 source and packed npm-package checks
  • package smoke tests on Linux, macOS, and Windows in CI
  • reproducible npm ci, zero audit findings, and clean workflow lint

Rollout gates

  • Let the draft CI matrix complete on GitHub
  • Publish the exact candidate as a prerelease under a non-latest dist-tag
  • Run representative downstream application suites against the exact prerelease
  • Hold a short prerelease soak window and review install/runtime reports
  • Promote to 0.7.0 only after those gates are green

No package has been published as part of this PR.

@zuchka
zuchka force-pushed the codex/dual-cjs-esm-deno branch from ab24e3a to 0b1ebcc Compare August 24, 2026 22:10
@zuchka
zuchka force-pushed the codex/dual-cjs-esm-deno branch from 0b1ebcc to 3994cc2 Compare August 24, 2026 22:11
@zuchka
zuchka marked this pull request as ready for review August 24, 2026 22:14
@zuchka
zuchka merged commit d5d204d into main Aug 24, 2026
11 checks passed
@zuchka
zuchka deleted the codex/dual-cjs-esm-deno branch August 24, 2026 22:26
This was referenced Aug 26, 2026
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