Harden React Native release publication - #36
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)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughChangesGuarded npm package bootstrap
React Native rendering and interaction
Native distribution and documentation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant BootstrapScript
participant NpmRegistry
participant Npm
GitHubActions->>BootstrapScript: validate workflow and revision
BootstrapScript->>NpmRegistry: inspect release metadata
BootstrapScript->>GitHubActions: write bootstrap plan
GitHubActions->>BootstrapScript: publish confirmed package
BootstrapScript->>Npm: publish with provenance
BootstrapScript->>NpmRegistry: verify integrity and provenance
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
scripts/bootstrap-release-package.test.mjs (1)
30-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRename this test and add coverage for a spec outside the fixed set.
The title names two cases, but the body only asserts the multiple-missing case. No test covers the guard that rejects a confirmation that is not a fixed-set package and version (
scripts/bootstrap-release-package.mjslines 85-88). That guard blocks an arbitrary operator-supplied package name, so it deserves a regression.💚 Proposed test changes
- it('rejects zero-confirmation and multiple-missing publication', () => { + it('rejects publication when more than one fixed package is missing', () => { expect(() => selectBootstrapCandidate({ artifacts, expectedSpec: '`@tanstack/react-native-charts`@0.4.0', registryPackages: new Map([ ['`@tanstack/charts`', null], ['`@tanstack/react-native-charts`', null], ]), }), ).toThrow(/exactly one missing fixed-set package/) }) + + it('rejects a confirmation outside the fixed release set', () => { + expect(() => + selectBootstrapCandidate({ + artifacts, + expectedSpec: '`@tanstack/unknown-charts`@0.4.0', + registryPackages: new Map([ + ['`@tanstack/charts`', registry(artifacts[0])], + ['`@tanstack/react-native-charts`', null], + ]), + }), + ).toThrow(/is not the exact fixed-set package and version/) + })🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/bootstrap-release-package.test.mjs` around lines 30 - 41, Rename the existing test to describe only the multiple-missing fixed-set package case, then add a separate test covering selectBootstrapCandidate rejecting an expectedSpec whose package and version are outside the fixed set. Assert the guard’s rejection error for the arbitrary operator-supplied spec while preserving the current multiple-missing assertion.scripts/bootstrap-release-package.mjs (1)
285-306: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low valueNo change needed for external dependency declarations currently.
The fixed release set uses
dependenciesfor@tanstack/chartsworkspaces, sovalidateBootstrapDependencies()validates the current internal links. If the fixed-set packages later add internal links topeerDependenciesoroptionalDependencies, include those fields in this loop.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/bootstrap-release-package.mjs` around lines 285 - 306, No code change is needed in validateBootstrapDependencies; retain its current dependencies-only validation because fixed release packages currently declare internal links there. If fixed-set packages later introduce internal links through peerDependencies or optionalDependencies, extend the validation loop to process those fields as well.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/charts-core/docs/installation.md`:
- Line 21: Update the installation commands in the source documentation under
the root docs/ tree rather than the generated packages/charts-core/docs copy,
then run pnpm docs:sync to regenerate all affected documentation copies.
In `@packages/react-native-charts/src/SvgScene.tsx`:
- Around line 275-281: Update resolveScenePaint to parse empty and
delimiter-containing resource IDs consistently with encodeResourceId, replacing
the non-empty `([^)]+)` capture and truthiness check with parsing that permits
empty IDs and an explicit undefined check. Add regression tests covering empty
IDs and IDs containing `)` to verify the encoded gradient definitions are
correctly resolved and applied.
---
Nitpick comments:
In `@scripts/bootstrap-release-package.mjs`:
- Around line 285-306: No code change is needed in
validateBootstrapDependencies; retain its current dependencies-only validation
because fixed release packages currently declare internal links there. If
fixed-set packages later introduce internal links through peerDependencies or
optionalDependencies, extend the validation loop to process those fields as
well.
In `@scripts/bootstrap-release-package.test.mjs`:
- Around line 30-41: Rename the existing test to describe only the
multiple-missing fixed-set package case, then add a separate test covering
selectBootstrapCandidate rejecting an expectedSpec whose package and version are
outside the fixed set. Assert the guard’s rejection error for the arbitrary
operator-supplied spec while preserving the current multiple-missing assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1a1cae7a-520f-4086-b540-31d4762d2041
📒 Files selected for processing (17)
.github/workflows/bootstrap-release-package.ymlAPI-FRICTION.mdbenchmarks/entries/charts-react-native-universal-boundary.tsdocs/installation.mdpackages/charts-core/docs/installation.mdpackages/react-native-charts/README.mdpackages/react-native-charts/src/Chart.test.tsxpackages/react-native-charts/src/Chart.tsxpackages/react-native-charts/src/SvgScene.test.tsxpackages/react-native-charts/src/SvgScene.tsxpackages/react-native-charts/src/Tooltip.test.tsscripts/bootstrap-release-package.mjsscripts/bootstrap-release-package.test.mjsscripts/bootstrap-release-workflow.test.mjsscripts/measure-bundles.mjsvitest.config.tsvitest.setup.ts
|
|
||
| # React Native | ||
| pnpm add @tanstack/react-native-charts react react-native react-native-svg | ||
| pnpm add @tanstack/react-native-charts react@^19.2.3 react-native@^0.86.0 react-native-svg@^15.15.4 |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Update the source documentation instead of this generated copy.
These changes are in packages/charts-core/docs/installation.md. Update docs/installation.md, then run pnpm docs:sync to regenerate this file. Direct edits can be overwritten and can leave the published documentation out of sync.
As per coding guidelines, author public documentation only in the root docs/ tree; do not directly edit packages/charts-core/docs because those copies are generated by pnpm docs:sync.
Also applies to: 83-83, 100-100
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/charts-core/docs/installation.md` at line 21, Update the
installation commands in the source documentation under the root docs/ tree
rather than the generated packages/charts-core/docs copy, then run pnpm
docs:sync to regenerate all affected documentation copies.
Source: Coding guidelines
Summary
Validation
pnpm validatepnpm react-native:poc:typespnpm bundle:checkpnpm release:artifactspnpm release:check@tanstack/react-native-charts@0.4.0as missing and verified attestations for the existing fixed setSummary by CodeRabbit
Bug Fixes
New Features
Documentation