Skip to content

build: publish the package with its native artifacts - #8

Merged
iscekic merged 6 commits into
mainfrom
build/npm-release
Nov 13, 2026
Merged

iscekic merged 6 commits into
mainfrom
build/npm-release

Conversation

@iscekic

@iscekic iscekic commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Makes the npm package installable: a files allowlist ships the TypeScript build, the iOS xcframework and Swift bindings, and the Android libraries and Kotlin bindings, which git ignores because CI builds them. Version 0.1.0.

A release workflow (manual dispatch or a v* tag) builds iOS on macOS and Android on Linux, collects both into one tree, fails if any native artifact is missing, logs the npm pack contents and publishes with provenance. It needs an NPM_TOKEN secret.

Also formats the repository with its Prettier config and adds a format check to CI.

Verified on a Linux VM: the packed tarball holds the Android libraries and bindings and no Rust, example or test files; the example app builds against the tarball and its APK carries both libraries. The iOS half of the tarball is checked by the release workflow.

Replace .npmignore with a files allowlist so the tarball carries build/,
src/, the Android and iOS sources with their generated bindings, and the
Expo config, while keeping the Rust workspace, the example app and the
build outputs out. Bump to 0.1.0 and read the Gradle version from
package.json so the two cannot drift.
The .prettierrc was in place but the sources were never run through it.
Add a format:check script, ignore generated and vendored paths, and gate
pull requests on the check.
Build the xcframework with its Swift bindings on macOS and the jniLibs
with their Kotlin bindings on Linux, then assemble, verify and publish
from a single job. Triggered by a v* tag or by hand with a dist-tag, and
signed with provenance.
A prepare script also runs for consumers who install the tarball, where
the internal build scripts it calls are absent. prepack covers publish,
pack and git dependencies without touching a plain install, and the CI
jobs now build the module explicitly.
@socket-security

Copy link
Copy Markdown

@iscekic
iscekic merged commit 0058e04 into main Nov 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant