iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
9 stars 2 forks source link

Do not export `@internal` APIs #1060

Closed GerardasB closed 1 month ago

GerardasB commented 1 month ago

Changes

This PR removes all @internal API exports from the barrel file. Additionally, an internal subpath export is added to package.json as an implementation detail to share the code between version-locked AppUI packages, but it should never be used by AppUI consumers directly.

build-cjs script is added to build CJS modules with NodeNext module resolution. The script updates the type field of package.json before running the tsc. I've avoided introducing other tooling as CJS modules will likely be dropped before 5.0 is released (we'll need to verify there are no run-time issues with CJS in case it is not dropped due to the internal subpath).

Testing

N/A