Skip to content

v0.4.0 β€” πŸ”’ Security

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Nov 20:18
· 9 commits to main since this release
fa2000f

v0.4.0

πŸ”’ Security

  • Registry file paths may no longer contain control characters, and add, update and diff strip them from every path they print, so a registry can't send terminal escape sequences. Registry names in registryDependencies and nativra.json must be lowercase letters, numbers and -, and names in nativra.json must be unique.
  • Remote registries are fetched one redirect at a time: a hop from HTTPS to plain HTTP (or from http://localhost to anywhere else) is refused before it is requested, and more than 5 redirects fail.
  • nativra.lock.json, nativra.json, .gitignore and .nativra/backups/ are no longer written or deleted through a symbolic link.
  • Release workflow: each job gets only the permissions it needs, checkout no longer leaves a token in .git/config, and an optional job publishes to npm with provenance through trusted publishing.
  • The npm publish job installs dependencies with --ignore-scripts, so no install script runs while the job can mint a publish token.
  • add --dry-run strips control characters from item names too, the last registry text the CLI printed unfiltered.
  • A http://localhost registry may only redirect to localhost, as documented.
  • pnpm audit no longer ignores the two image-size advisories: Expo SDK 58's Metro doesn't use image-size at all. The unused deepmerge override is gone.
  • CodeQL also scans the GitHub Actions workflows (actions language).

✨ MCP server

  • New nativra-mcp package: an MCP server with nativra_search, nativra_list, nativra_info, nativra_init, nativra_add, nativra_diff, nativra_update and nativra_doctor, so AI agents can find and install components. It runs the bundled CLI with argument arrays and never prompts. It can't force-overwrite edited files or remove items.

✨ Registry

  • New components: search-bar, form-field, list-item, swipeable-row (no gesture-handler needed; actions are also screen-reader actions) and time-picker. New register-form block, and new use-form and use-infinite-scroll hooks. All are beta.
  • New components: country-picker (searchable, about 240 countries with flags and dial codes), phone-input (country code picker; autofilled +44… numbers pick their country; toE164), credit-card-input (brand detection, Luhn, auto-advance), image-with-fallback, section-list (themed headers, inset-grouped variant) and color-swatch. All are beta.
  • New code-scanner component (QR and barcodes on expo-camera, with a framing guide, torch, duplicate filtering and permission states) and use-image-picker hook (library or camera on expo-image-picker, with permission handling and a blocked-permission state). Both are beta.
  • New blocks: transaction-history (grouped by day, daily totals, running balance), product-card, search-results-row (query highlighting) and chat-bubble (grouping, delivery ticks, retry). New templates: social-feed, booking-flow and profile-flow. All are beta.
  • Button takes any node as its label, leftIcon / rightIcon (a node, or a function given the label color), and a function style; the loading spinner scales with the size.
  • labels prop on chat-bubble, product-card, transaction-history, code-scanner, country-picker, phone-input, time-picker and credit-card-input: every piece of text they show or read to screen readers, for translation. Anything left out stays English.
  • use-form catches a rejected onSubmit into submitError (so onPress={form.handleSubmit} is safe) and handleSubmit resolves to whether it succeeded. register-form shows that error.
  • Selected and checked states are also set as aria-selected / aria-checked, so they reach screen readers on web too (the docs previews). Radios report "checked".

✨ CLI

  • nativra diff --summary prints one line per file and a count instead of the patch.
  • nativra list --outdated lists only items with an update and exits 1 when there are any.
  • nativra search marks beta, experimental and deprecated items.
  • nativra info --json --docs includes the item's usage docs.
  • nativra update --check: like --dry-run, but exits with code 1 while anything is out of date. An edited file whose registry source hasn't changed is reported as your edit and doesn't count.
  • nativra doctor --json prints the checks as JSON for CI.
  • add no longer treats a file that already matches what it would write as a conflict, and starts tracking it.
  • Import rewriting also covers side-effect import "@/…", import("@/…") and require("@/…").
  • nativra diff --exit-code exits with code 1 while the installed files differ from the registry, for CI.
  • update removes files that a new item version no longer ships (backed up first, so rollback restores them). A dropped file you edited is kept and no longer tracked.
  • nativra doctor warns when the project's NativeWind major isn't one Nativra's sources target, and when NativeWind 4 is paired with Tailwind CSS 4.
  • init --force (or answering yes to replace) backs up the previous nativra.json; nativra rollback nativra-config restores it.
  • Items with many dependencies resolve faster: each item's dependencies are fetched at once, and concurrent lookups of one item share a request.
  • nativra info <id> shows the installed version and whether an update is available (installedVersion and updateAvailable with --json).
  • nativra list --installed lists what the project has installed, each with the registry's current version and whether an update is available (--json too).

πŸ› Fixes

  • list --outdated lists items whose registry couldn't be read and exits 1, instead of printing "Everything installed is up to date" and passing a CI check while the registry was down.
  • The MCP server reports a CLI failure from nativra_list (outdated) or nativra_doctor as an error; exit code 1 counts as results only with JSON output.
  • Slider is version 0.3.1, so projects get its scroll-handoff fix through update (it was changed without a version bump).
  • credit-card-input moves to the expiry field after 16 digits for Visa, Discover, JCB and UnionPay, not only at their 19-digit maximum.
  • use-infinite-scroll with enabled: false no longer loads page 1 when an empty FlatList calls onEndReached.
  • NativeWind Button passes a plain style array unless the caller passes a style function, so NativeWind's className merge can't drop the shadow.
  • code-scanner shows "Open Settings" once camera access is blocked, instead of a disabled button.
  • time-picker finds a 24-hour locale through hour12 or a formatted 13:00 when the engine doesn't report hourCycle.
  • country-picker sorts its list at load: "U.S. Virgin Islands" was out of order.
  • update keeps tracking a file it could not remove, instead of forgetting it while it stays on disk; update --check no longer fails over a dropped file that is already gone.
  • rollback nativra-config refuses to discard edits made to nativra.json after init, unless --force.
  • add keeps the CRLF line endings of a file that is already up to date.
  • init only warns when it can't add .nativra/ to a symlinked .gitignore, instead of reporting that nativra.json failed.
  • Sibling imports named after Object.prototype members (./toString, ./constructor) are no longer rewritten.
  • Slider: a vertical scroll that starts on the slider scrolls the page instead of changing the value; accessibility actions at the limits no longer fire onSlidingComplete.
  • NativeWind Button, Input and Textarea add a caller's className to their own classes instead of replacing them.
  • Blocks and templates use the style's press feedback (pressedStyle) instead of a fixed opacity.
  • Installing an item whose id is already installed from another registry (acme/button after button) is refused instead of overwriting the other's lockfile entry and backups.
  • audit --fix refreshes lockfile hashes of the files it migrates that were unedited before, so update keeps updating them; rollback audit-fix moves them back.
  • A lockfile entry without a version or files map gets the "restore it from git" error instead of a crash.
  • remove no longer deletes the install folders named in nativra.json when they become empty.
  • The registry build rejects an item with two files that would install under the same name.
  • Docs home page: the registry overview counts every item type (utilities included) from the registry, so each card matches the catalog it links to.
  • rollback reads and verifies every backup file before it changes anything. A corrupt backup used to fail halfway, leaving some files restored and the lockfile stale; if a write fails now, the files already restored are put back.
  • Lockfile ids are looked up without Object.prototype, so nativra remove constructor reports an unknown item instead of crashing, and a registry item named like a prototype member can't leave files untracked.
  • Path checks work in a project at a drive or filesystem root (C:\), where every path used to be rejected.
  • On Windows, dependency installs run as one quoted command line, avoiding Node 24's DEP0190 warning.
  • theme add and style add render files through the same code as add, update and diff.
  • The registry build no longer stamps updatedAt with the build time, so identical sources build identical files. It also rejects dependency cycles and deprecated items without a deprecationMessage. It also rejects two items that would install a file with the same name into the same folder.
  • doctor fetches installed items in parallel: on a network that drops requests, each one used to wait out the 15 s timeout in turn.
  • Style and theme preset lookups ignore Object.prototype members, like the lockfile.
  • Package-manager detection stops at the git root, so a stray lockfile in a folder above the project no longer picks the package manager.
  • Release notes: tagging v0.3.1 no longer picks up a v0.3.10 section, tags with + work, and a tag without a CHANGELOG section fails the release instead of publishing placeholder notes.
  • Line endings no longer count as edits. Git for Windows checks files out with CRLF by default (core.autocrlf), so after a commit and checkout every installed file looked modified: update skipped them as local changes, remove asked before deleting them, rollback refused, add treated identical files as conflicts and diff showed every line changed. Lockfile hashes and all comparisons now ignore line endings; existing lockfiles keep working.
  • update no longer warns that a registry changed a file without a version bump when the installed file already matches the registry.

β™Ώ Registry

  • React Native 0.88 compatibility: Dialog and OTP Input no longer use APIs removed from RN 0.88's types (StyleSheet.absoluteFillObject, useRef<TextInput>).
  • Badge accepts className (NativeWind) and style (StyleSheet); the e-commerce template already passed className and failed to type-check.
  • Skeleton follows the style's radius roles (sm, md, lg β†’ small, control, card) and holds still when Reduce Motion is on. Its width/height are typed as DimensionValue.
  • Toast's close button has a 44pt touch target, and screen readers hear the variant ("Error. …") that the dot shows by color.
  • 25 StyleSheet components no longer rebuild their styles on every render.
  • Slider works on any width. It used to assume a 200pt track and measure taps from whichever child was touched. It now drags, honours step, takes defaultValue (uncontrolled) and onSlidingComplete, survives min === max, and screen readers adjust it by one step.
  • DatePicker is a real date picker: a month grid with previous/next month, quick picks computed from today (they were fixed November 2026 dates), minDate/maxDate, locale, weekStartsOn and defaultValue. Values stay "YYYY-MM-DD", read as local days.
  • OTP Input: pasting a formatted code (123 456) keeps every digit, Android gets SMS-code autofill (autoComplete="sms-otp"), and the input covers the cells so a long press offers Paste.
  • PaginationDots: with onDotPress, screen readers change the page with a swipe up or down.
  • BottomSheet keeps VoiceOver inside the open sheet (accessibilityViewIsModal), like Dialog and Select.
  • The registry build fails an adjustable element that doesn't handle onAccessibilityAction.
  • Blocks and templates use Pressable everywhere: 46 TouchableOpacity elements across AppHeader, AppSidebar, FilterSheet, TransactionRow and five templates are converted, keeping their press dimming. Every pressable now has an accessibility role, and ChatFlow's icon-only buttons (back, more options, attach, send) have labels. The registry build now rejects TouchableOpacity/TouchableHighlight and a Pressable with neither a role nor a label.
  • Slider calls a caller's onLayout instead of being replaced by it (which stopped dragging), and drags the right way in right-to-left layouts.
  • Input forwards its ref to the TextInput (React 18 and 19), so forms can move focus between fields.
  • LoginForm: password managers and autofill fill it (autoComplete, textContentType), screen readers read "Email" and "Password" instead of the placeholders, Next on the email field moves to the password, Go signs in, and it can't submit twice while loading.
  • useColorScheme: choosing "system" after "dark" or "light" follows the system again; it used to stay on the forced scheme.
  • useKeyboard uses the iOS "will" keyboard events, so layouts move with the keyboard instead of after it.
  • useHaptics imports expo-haptics statically: Metro resolves import() while bundling, so the dynamic import never made it optional.
  • npm ranges match what the sources are tested with: lucide-react-native ^1.73.0 (was ^0.460.0, which stayed on 0.460.x), react-native-safe-area-context >=4.10.0 and expo-haptics >=13.0.0, so new installs get the current majors that React Native 0.88 needs.

🧰 Repo

  • packages/registry-tests unit-tests the pure helpers registry items ship (card checks, country data), which nothing tested before.
  • Maestro flows in apps/native-preview/.maestro cover the gestures and the camera on a device (Slider, SwipeableRow, TimePicker, CodeScanner). CI has no simulator, so they run by hand.
  • The preview sync writes in place instead of deleting the folder, so a running Metro server keeps reloading on Windows.
  • The preview app configures the expo-camera and expo-image-picker permission texts.
  • The preview app now runs Expo SDK 58 (React Native 0.88, React 19.3, TypeScript 6.0) and copies every hook. Its typecheck also type-checks every NativeWind source with NativeWind's className types, which nothing compiled before.
  • Every package that runs tsc declares its own typescript (5.x), so the Expo apps' TypeScript 6 can't be picked up through hoisting.
  • The docs playground uses the CLI's own install logic (filesForTarget, the cross-folder import map) instead of a copy, so it can't drift from what nativra add writes.
  • The preview playground batches console output, so code that logs on every render no longer floods the editor page.
  • Docs pages keep og:url in sync on client-side navigation, and a 404's noindex no longer sticks to the next page.
  • .gitattributes makes every checkout LF, so the registry builds byte-for-byte the same on Windows as in CI.
  • CI checks that every registry npm range accepts the version the preview app tests with (scripts/check-registry-deps.mjs) and that the example apps are current with the registry (scripts/check-examples.mjs, --fix to refresh them). The examples are refreshed.
  • The preview type-checks fixture props against the components (fixture-check.ts); the LoginForm and EmptyState fixtures used props that don't exist and are fixed.
  • The docs' Yarn tab runs npx, since yarn dlx doesn't exist in Yarn 1.
  • The CLI README, the repo README and the Updating guide cover list --installed, update --check, diff --exit-code and the backup init --force keeps. The home page's Styles card names the styles for screen readers, like the Themes card.
  • The compatibility matrix lists Expo SDK 58, React Native 0.88.1, React 19.3, TypeScript 6.0 and NativeWind 4.2 as tested.