feat(ci): add package contents verification to CI and publish workflows - #24
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe package now publishes ChangesPackage contents verification
Estimated code review effort: 2 (Simple) | ~15 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
scripts/check-package-contents.mjsParsing error: Cannot use keyword 'await' outside an async function Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
DrumPicker.podspecwas never published to npm. It exists in the repo but was missing from thefilesarray inpackage.json, which is an allow-list — npm stripped it at pack time.Because
react-native.config.jsdeclaresios: {}without an explicitpodspecPath, the React Native CLI resolves the podspec by globbing*.podspecover the package root. It found nothing, so the pod never entered the Podfile, the Fabric component was never compiled, and iOS renderedUnimplemented component: <DrumPickerView>. Android was unaffected because Gradle autolinking only needsandroid/, which was published correctly.Verified against the real tarballs — the podspec is absent from both 0.2.4 and 0.3.0, so every iOS consumer on the current
latestis broken.Why CI did not catch it
ios-buildbuilds the example app straight from the workspace, where the podspec is always reachable through the yarn symlink, andios-unit-testslints../../DrumPicker.podspecby explicit path. Both stay green with a completely broken tarball, because nothing ever inspected the artifact npm actually publishes. This PR closes that gap so the same class of bug cannot ship again.Changes
DrumPicker.podspecto thefilesarrayscripts/check-package-contents.mjs— validates the realnpm pack --dry-runoutput: podspec present at the tarball root (a nested copy would not be autolinked),react-native.config.js,android/build.gradle, the manifest and Kotlin sources, the JS entry points read back frompackage.jsonitself, and that the podspec'ssource_filesglob resolves non-emptypackage-contentsCI job, plus the same check inpublish.ymlbeforenpm publishand inprepublishOnlyfor local publishesNo dependencies added; the script is dependency-free ESM.
Type of change
Checklist
yarn lint,yarn build,yarn typecheck, andyarn testfrom the repo rootpackage-contentsCI job insteadyarn.lockifpackage.jsondependencies changed — n/a, no dependency changessrc/,android/, orios/(example app only)Verification
yarn check:packageafteryarn buildfilesyarn testyarn typecheckyarn lintnpm pack react-native-drum-picker@0.2.4/@0.3.0Final confirmation on a device is a
pod installin a consumer app against the packed tarball, which needs macOS. Theios-buildandios-unit-testsjobs in this PR still exercise the podspec itself, andpackage-contentsproves it now ships at the tarball root.CI
PRs to
mainrun the full CI workflow automatically. This PR adds one required job,package-contents, wired intoall-checks-passed.Screenshots / recordings (UI changes)
n/a — no UI change.
Related issues
Fixes #21
Summary by CodeRabbit
New Features
Bug Fixes
Chores