Major Changes
e6651adThanks @bataevvlad! - UI Kitten v6: React 19, React Native 0.81, Expo 54, all components migrated to functional, ESM build system, New Architecture ready.
Patch Changes
-
#1871
657fc23Thanks @bataevvlad! - Stop shipping build leftovers in the published tarballs.builder-bob is configured with
source: ".", so it swept the package root into the build output. Every ESM package published alib/module/package.jsonthat was a copy of its own manifest — with no"type": "module"field and amainpointing at a path that does not exist — alongsidelib/module/CHANGELOG.mdandlib/module/tsconfig.build.json. Toolchains that determine module type from the nearestpackage.jsonwould read the ESM output as CommonJS; it only worked because Node falls back to syntax detection. bob now writes its own{"type": "module"}marker instead.@ui-kitten/processoralso shipped 38 spec and spec-config files (its!*.spec.*exclusion only matched the package root, notjs/), which is a third of the tarball. -
#1871
561a0acThanks @bataevvlad! - Ship a dual CommonJS + ES module build with type definitions that work under every
TypeScript module resolution.@ui-kitten/componentspublished ESM-only output whose.d.tsfiles sat in an ES-module
scope (lib/typescript/package.jsonwith"type": "module") but used extensionless relative
imports. UndermoduleResolution: node16/nodenextTypeScript rejected them with TS2834,
which made every root export disappear (Module '"@ui-kitten/components"' has no exported member 'Button').@ui-kitten/date-fns,@ui-kitten/eva-iconsand@ui-kitten/moment
pointedmainat ESM without a"type"field andtypesat their raw.tssource, so they
were reported asMasquerading as CJSand consumers compiled the library's TypeScript under
their own tsconfig.All four packages now build
lib/commonjs,lib/moduleand generated declarations for both
(lib/typescript/commonjs,lib/typescript/module) via react-native-builder-bob, and the
relative imports in the ESM declarations carry explicit.jsextensions.exportsexposes
importandrequireconditions with matchingtypes; thereact-nativeandsource
conditions still resolve to the TypeScript source for Metro.@arethetypeswrong/clireports
no problems fornode10,node16(CJS and ESM) andbundler.Every export object also ends with a
defaultcondition pointing at the CommonJS build with
matching types, as a fallback for resolvers that match none ofsource,react-native,
importorrequire.The dual layout costs tarball size. Measured with
npm pack(bytes, gzip):package 6.0.0-beta.2 (ESM only) dual build dual build, trimmed @ui-kitten/components375 697 479 774 421 524 @ui-kitten/moment3 780 6 240 5 458 @ui-kitten/eva-icons2 760 4 591 4 082 @ui-kitten/date-fns2 343 3 651 3 362 The trimmed column drops the
.js.mapfiles fromlib/commonjs(themoduletree keeps its
source maps). The.d.ts.mapfiles are kept in both declaration trees: without them,
go-to-definition lands on the generated.d.tsinstead of the shipped.tssource. The
remaining growth is the second JavaScript build and the second copy of the declarations,
which is the price of resolving correctly under bothrequireandimport. -
Updated dependencies [
83bf8fd,efe22dd,c0e274d,657fc23,e8e14be,561a0ac,73e517f,2bee712,48f2806,918ef23,1d65240,6ce4786,92eedc8,f00c66b,f8ca657,e6651ad]:- @ui-kitten/components@6.0.0