Skip to content

fix: export esm and cjs#23

Merged
André L. (WipeAir) merged 1 commit intomainfrom
fix/cjs-export
Mar 16, 2026
Merged

fix: export esm and cjs#23
André L. (WipeAir) merged 1 commit intomainfrom
fix/cjs-export

Conversation

@WipeAir
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 16, 2026 12:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the monorepo build/publish setup to produce both ESM and CJS outputs, switching packages from tsc-based builds to tsdown, and updating package export maps accordingly.

Changes:

  • Add tsdown configs across packages and switch package build scripts to tsdown.
  • Update package exports/main/types to expose both ESM (.mjs) and CJS (.cjs) entrypoints with per-condition type paths.
  • Add publishing/type-lint tooling (publint, @arethetypeswrong/core) and update lockfile; remove per-package tsconfig.build.json files.

Reviewed changes

Copilot reviewed 35 out of 36 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
yarn.lock Adds new tooling/build dependencies (tsdown, publint/attw transitive deps, etc.).
packages/tsconfig/tsconfig.build.json Removed now-unused build tsconfig.
packages/tsconfig/package.json Field reordering (no functional change).
packages/sel-types/tsdown.config.ts Adds tsdown build configuration.
packages/sel-types/tsconfig.build.json Removed old tsc build config.
packages/sel-types/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions.
packages/sel-schema/tsdown.config.ts Adds tsdown build configuration.
packages/sel-schema/tsconfig.build.json Removed old tsc build config.
packages/sel-schema/scripts/generate-json-schema.ts Points schema generator at tsconfig.json (build config removed).
packages/sel-schema/package.json Switch build to tsdown; update exports to dual ESM/CJS + schema subpath.
packages/sel-runtime/tsdown.config.ts Adds tsdown build configuration.
packages/sel-runtime/tsconfig.build.json Removed old tsc build config.
packages/sel-runtime/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions.
packages/sel-env/tsdown.config.ts Adds tsdown build configuration.
packages/sel-env/tsconfig.build.json Removed old tsc build config.
packages/sel-env/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions.
packages/sel-editor/tsdown.config.ts Adds tsdown build configuration.
packages/sel-editor/tsconfig.build.json Removed old tsc build config.
packages/sel-editor/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions.
packages/sel-editor-react/tsdown.config.ts Adds tsdown build configuration.
packages/sel-editor-react/tsconfig.build.json Removed old tsc build config.
packages/sel-editor-react/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions; reorder deps/peerDeps blocks.
packages/sel-common/tsdown.config.ts Adds tsdown build configuration.
packages/sel-common/tsconfig.build.json Removed old tsc build config.
packages/sel-common/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions; add repository metadata.
packages/sel-checker/tsdown.config.ts Adds tsdown build configuration.
packages/sel-checker/tsconfig.build.json Removed old tsc build config.
packages/sel-checker/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions; reorder peerDeps block.
packages/sel-cel-lezer/tsdown.config.ts Adds tsdown build configuration.
packages/sel-cel-lezer/tsconfig.build.json Removed old tsc build config.
packages/sel-cel-lezer/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions.
packages/fixtures/tsdown.config.ts Adds tsdown build configuration.
packages/fixtures/tsconfig.build.json Removed old tsc build config.
packages/fixtures/package.json Switch build to tsdown; update exports to dual ESM/CJS + typed conditions.
packages/e2e/package.json Reorders script/license fields (no functional change).
package.json Adds root dev tooling deps (publint, @arethetypeswrong/core).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
"name": "@seljs/common",
"version": "1.0.0",
"repository": {
Comment on lines +16 to +23
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"main": "./dist/index.cjs",
"types": "./dist/index.d.cts",
Comment thread package.json
Comment on lines +41 to +48
"@arethetypeswrong/core": "^0.18.2",
"@commitlint/cli": "^20.4.2",
"@vitest/coverage-v8": "^4.0.18",
"concurrently": "^9.2.1",
"husky": "^9.1.7",
"lint-staged": "^16.3.3",
"prettier": "^3.8.1",
"publint": "^0.3.18",
@WipeAir André L. (WipeAir) merged commit 23d525d into main Mar 16, 2026
11 checks passed
@WipeAir André L. (WipeAir) deleted the fix/cjs-export branch March 16, 2026 12:35
@abi-releaser abi-releaser Bot mentioned this pull request Mar 16, 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.

2 participants