npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@onekeyfe/react-native-split-bundle-loader

v6.7.0-40

Published

Native split JavaScript bundle context and segment loading for OneKey

Readme

@onekeyfe/react-native-split-bundle-loader

Native loading of OneKey split JavaScript bundles on iOS and Android. The module reports the current runtime's bundle context, resolves a segment path and loads the segment into that runtime. It is intended for applications with the matching OneKey split-bundle packaging and native host integration.

Installation

yarn add @onekeyfe/react-native-split-bundle-loader

Install the application's iOS pods and rebuild the native application. The package declares @onekeyfe/react-native-bundle-update as a peer dependency. The native binary must include the segment loader; adding JavaScript alone cannot enable native segment evaluation.

Usage

import { SplitBundleLoader } from '@onekeyfe/react-native-split-bundle-loader';

const context = await SplitBundleLoader.getRuntimeBundleContext();
// Use this context to select the matching application-owned segment metadata.
const bundleRoot = context.bundleRoot;

API

| Method | Purpose | | --- | --- | | getRuntimeBundleContext() | Return runtime kind, source kind, bundle root and native/bundle version information. | | resolveSegmentPath(relativePath, sha256) | Resolve a segment using its expected SHA-256. | | loadSegment(segmentId, segmentKey, relativePath, sha256) | Load a segment into the calling runtime. |

The application supplies IDs, keys, relative paths and expected hashes from its own split-bundle metadata. Keep them aligned with the running native and bundle versions. The module does not generate manifests or choose compatible module ID tables for the caller.

Handle rejected load promises before requiring modules from the segment. A resolved path alone does not mean segment code has been evaluated. UI and background JavaScript runtimes have separate loading contexts; initialize and load in the runtime that will consume the modules.

See src/NativeSplitBundleLoader.ts for the complete TypeScript interface and the native source directories for platform loading and failure handling.

Runtime-context fields

getRuntimeBundleContext() returns runtimeKind, sourceKind, bundleRoot and nativeVersion, with optional builtinExtractRoot and bundleVersion. Treat absent fields as absent rather than substituting a version from another runtime. The exported SplitBundleLoaderSpec contains the bridge signature.

loadSegment takes four arguments in order: numeric segmentId, segmentKey, relativePath and expected sha256. Await it before consuming that segment. resolveSegmentPath returns a path string and does not itself evaluate the segment. The API does not fetch a missing segment from the network.

License

MIT.