build: lib/ pipeline via react-native-builder-bob (closes #47) - #48
Merged
Conversation
package.json's main/module/types pointed at lib/… paths that nothing generated — we'd been relying on metro's `source` exports condition for local-path consumers. A real npm tarball needs compiled output. This adds the build so the package is publishable. - Add react-native-builder-bob + del-cli devDeps. - bob config: module (ESM) + typescript targets → lib/module/ + lib/typescript/. Matches the paths declared in main/module/types/ exports. ESM-only (no commonjs) — RN + modern bundlers consume ESM; can add CJS later if a consumer needs it. - Scripts: `build` (bob build), `clean` (del lib), `prepare` (bob build — runs on install + before npm publish). - Add `source` + `module` fields; exports keeps the `source` condition first so metro/local-path dev still reads src/ directly. - .gitignore lib/ (build artifact). - CI typecheck job: `npm ci --ignore-scripts` then explicit `npm run build` step so a broken build is caught and attributable. Verified: - npm run build → lib/module/index.js + lib/typescript/src/index.d.ts. - npm pack --dry-run → 33 files: lib compiled output, src, ios, android/src + TextMate assets, podspec, app.plugin.js, react-native.config.js. node_modules + example/ excluded. - root + example typecheck clean. Last scaffolding gate before v1.0 is publishable.
LeslieOA
force-pushed
the
feat/build-pipeline
branch
from
May 29, 2026 15:15
e7778aa to
834ee24
Compare
The macOS job failed on Xcode 26.3 (May) with unresolved Swift back-deployment symbols; the same commit builds clean locally on Xcode 26.6. GitHub refuses to retry runs older than a month, so re-testing toolchain-sensitive failures needed a no-op commit. Add the manual trigger instead. Refs: #47 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The job has never been green. It fails at link with unresolved `__swift_FORCE_LOAD_$_swiftCompatibility56` / `…Concurrency`, force-loaded by the vendored SPM deps (CoreTextSwift declares `.macOS(.v10_15)`). The macos-15 image caps at Xcode 26.3, whose toolchain does not carry those shims for arm64; the same commit builds and links clean locally under Xcode 26.6. If this does not fix it, the alternative is raising the deployment target the SPM dependencies compile with so the back-deployment references are never emitted. Refs: #47 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The link failed with `library 'swiftCompatibility56' not found`: the vendored SPM deps declare low minimums (CoreTextSwift is `.macOS(.v10_15)`), so the compiler emits back-deployment force-load references to shims the CI toolchain does not carry. Pinning the whole build to the app's own 14.0 stops them being emitted at all, which is robust whether or not a given Xcode ships the shims. Refs: #47 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
package.json'smain/module/typespointed atlib/…paths nothing generated — we'd been relying on metro'ssourceexports condition for local-path consumers. A real npm tarball needs compiled output. This is the last scaffolding gate before v1.0 is publishable.Changes
module(ESM) +typescripttargets →lib/module/+lib/typescript/, matching the paths declared inmain/module/types/exports. ESM-only — CJS addable later if needed.build,clean,prepare(runsbob buildon install + beforenpm publish).source+modulefields;exportskeepssourcefirst so metro/local-path dev still readssrc/directly.lib/.npm ci --ignore-scriptsthen an explicitnpm run buildstep, so a broken build is caught and attributable.Test plan
npm run build→lib/module/index.js+lib/typescript/src/index.d.ts.npm pack --dry-run→ 49 files: lib output + src + ios + android/src (incl. TextMate assets) + podspec + app.plugin.js + react-native.config.js.node_modules/example/excluded.Not in scope
Actual
npm publish— that's the v1.0 release moment.🤖 Generated with Claude Code