build: lib/ pipeline via react-native-builder-bob (closes #47)#48
Open
LeslieOA wants to merge 1 commit into
Open
build: lib/ pipeline via react-native-builder-bob (closes #47)#48LeslieOA wants to merge 1 commit into
LeslieOA wants to merge 1 commit into
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.
e7778aa to
834ee24
Compare
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