ci(release): adopt automated SDK governance - #66
Conversation
MaximusHaximus
left a comment
There was a problem hiding this comment.
Cool! This looks great.
-
Trusted publishing has been configured for @polygonlabs/oms-wallet-react-native so that your release.yml will successfully publish the package from now on 🙂
-
Missing supply chain protection configuration (this one will be flagged by the security team's repo scans too)
Strongly recommend just migrating to PNPM so you get the benefit of consistency by adopting the shared workflows we maintain across the org -- right now we've got hand-rolled ci.yml, verification.yml, changeset-check.yml and release.yml locally in this repo; it's around 400 lines of bespoke workflow that now has to be maintained in parallel with the existing ecosystem, and will drift.
- Metro symlink support has been stable since RN 0.73 (the 0.72 release notes call it out explicitly as "monorepo/pnpm support"). This repo is on 0.85.
- You're already on
nodeLinker: node-modules, withnmHoistingLimits: workspaces-- i.e. not using Yarn PnP at all. That's a near-identical shape to pnpm with a hoisted linker, so the migration is much less of a leap than it would be from a PnP repo. The main risk would be concentrated in the native layer — CocoaPodsuse_native_modules!and Gradle autolinking resolving through symlinks, plus the standalone Expo example's prebuild path.
Being pragmatic about symlinks and the native code side of things, this might take some effort so shouldn't block releasing something -- but at the very least if you're going to stick with Yarn, update to a more recent version of yarn that supports most of the equivalent supply chain hardening, and configure appropriately in yarnrc -- right now, Yarn is totally unconfigured on this axis
e.g.
minimumReleaseAgeisn't supported until >= 4.12-
= 4.14 would default
trustPolicyappropriately also - There isn't really a
blockExoticSubdepsequivalent for Yarn at all.
Added a few other things that I noticed would be problems as a code review w/ changes requested
Summary
Migrates the transferred React Native SDK to the same Changesets-based governance and npm trusted-publishing model used by
oms-wallet-typescript-sdk, adapted for this repository's single root package, Yarn 4, Builder Bob, TurboModule/codegen, native Android/iOS builds, and standalone Expo example.This PR includes a patch Changeset. Its release PR will propose
0.2.1and publish the validated package metadata (type,engines, andsideEffects) together with the release machinery.TypeScript SDK alignment
NPM_TOKENcommitMode: github-apiCHANGELOG.md@0xPolygon/product-applicationsReact Native-specific adaptations
@polygonlabs/oms-wallet-react-nativepublishable at the repository root.in the Yarn workspace list so Changesets versions the root package while leaving private examples unversioned@polygonlabs/sourcepatternsandroid/andios/, bare React Native examples, and Expo autolinking@mainChanges after requested review
0xPolygon/pipelinesreview and interactive-trigger workflows usingCLAUDE_API_KEYtrustPolicyorblockExoticSubdeps, so unsupported configuration was not addedfast-uriandjs-yamlresolutions and incorporated the safe dependency updates merged intomasterRelease flow
masterruns full verification and opens or updateschore(release): publish package.CHANGELOG.md.v<version>, and creates the GitHub Release.Manual snapshots verify the same surface, version only runner state, publish under the selected non-SemVer dist-tag, and skip git tags, GitHub Releases, and Expo follow-up pull requests.
Verification
yarn install --immutableyarn verifyAll good!yarn check:package: 107-file npm dry run0.2.00.2.0to0.2.1; private examples remain unchangedchangeset versionrun updates the root package and changelog successfullyExternal configuration
Completed
@polygonlabs/oms-wallet-react-nativewith organization0xPolygon, repositoryoms-wallet-react-native-sdk, and workflowrelease.ymlRequired before merge
CHANGESET_RELEASE_BOT_APP_IDandCHANGESET_RELEASE_BOT_APP_PRIVATE_KEYto this repositoryCLAUDE_API_KEY@0xPolygon/product-applicationshas explicit Write accessmasterrulesetRecommended hardening: change the default
GITHUB_TOKENpermission from Write to Read and disable its ability to create or approve pull requests. Release pull requests use the GitHub App token instead.Findings intentionally kept separate
Peer dependency warnings
@eslint/js10hermes-eslintpeer requested byeslint-plugin-ft-flow@tanstack/react-queryandreact-dompeers requested by0xtrailsPackaging and dependency audit
All good!; no package export changes were made for unsupported Node ESM or React Native Web behavioruuid@7.0.3deprecation and 22 audit findings (11 moderate and 11 high)Checklist
yarn lintpassesyarn typecheckpassesyarn preparesucceeds0.2.1release plan)