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
2376396Thanks @bataevvlad! - Fix@ui-kitten/metro-configbeing unusable frommetro.config.js.The package is loaded by Node, not by Metro, but it was published as ESM only.
services/project.service.tsused__dirname, which does not exist in ESM, so the documented usage threwReferenceError: __dirname is not defined in ES module scopeand took the whole Metro config down with it. Theui-kittenCLI binary was broken for a related reason:bin/ui-kittenrequired../cli, a directory that ships only TypeScript sources.- Build this package as CommonJS instead of ESM, and emit real
.d.tsfiles instead of pointingtypesat the raw source. - Resolve the project root from
process.cwd()rather than from the module's own location, which was also off by two directory levels in the compiled output. - Point the
ui-kittenbinary at the compiled CLI.
- Build this package as CommonJS instead of ESM, and emit real
-
#1871
5714ed0Thanks @bataevvlad! - Compile Eva styles whenmetro.config.jsis loaded, not on a Metro reporter event.MetroConfig.create()only ran the bootstrap from itsreporter.updatehandler when Metro
emittedinitialize_started. Tools that replace the reporter never delivered that event, so
under Expo CLI (expo start,expo export) the cache innode_modules/.cache/ui-kitten/was
never written and@ui-kitten/eva/index.jsnever received itsexports.stylesline. The
bootstrap now runs eagerly and synchronously insidecreate(); the reporter hook is kept for
bare Metro and still runs it again (idempotently) oninitialize_started.Other fixes in the same package:
- The custom-mapping watcher is installed from
create()itself (so it also works under
Expo CLI, which never delivers Metro'sinitialize_startedevent), and only when
customMappingPathis a non-empty string pointing at an existing file. It polls with
persistent: false, so a dev server keeps recompiling on changes while one-shot processes
(expo export, a script that requiresmetro.config.js, the CLI) still exit on their own.
Previously an absent path resolved to the project root, sofs.watchFile('./')polled the
whole project directory every 100 ms and kept any Node process that loaded the config alive. - A missing or non-JSON custom mapping is reported as a
warnnaming the path that was tried,
instead of crashing withTypeError: Cannot read properties of null (reading 'length'). BootstrapService.runreturns a boolean, andui-kitten bootstrapsets exit code 1 on an
unknown package, a project without Eva packages or a bad custom mapping, so CI can detect it.- The
exports.stylesline is appended without accumulating blank lines; the eva index always
ends with exactly one newline after the append. success Successfully bootstrapped …is only printed when the cache was written or the
export line was appended. A no-op run prints nothing from the service; the CLI prints
info <package> styles are up to dateinstead, so apostinstallor a bundler that
bootstraps twice no longer repeats the success line.- The cache checksum now covers the eva mapping as well as the custom mapping, so the styles
are rebuilt exactly when either file changed (including after upgrading the eva package)
and are left alone otherwise. - Installed-package checks look at the file system instead of
require-ing the eva package
index. Once bootstrapped, that index requires the generated cache, so wiping
node_modules/.cacheused to make the next bootstrap report the package as not installed
instead of regenerating the cache.
- The custom-mapping watcher is installed from
-
Updated dependencies [
657fc23,03cad37,e6651ad]:- @ui-kitten/processor@6.0.0
- @ui-kitten/mapping-base@6.0.0