[SSW-3179] Expose versionLabel on packages from update_check - #65
Merged
Merged
Conversation
Map the server's new version_label ("vN") onto RemotePackage.versionLabel
so it is persisted with the package and reaches native like label does.
Document it in the typings and API docs, and cover it in the E2E mock.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The mock typing must remain optional, and local-package persistence needs E2E coverage before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Exposes the service’s human-readable version_label as optional versionLabel package metadata while preserving the UUID-based label.
Changes:
- Maps
version_labelthrough the acquisition SDK. - Updates public typings, documentation, and API compatibility checks.
- Extends mocks and test expectations.
| File | Description |
|---|---|
typings/react-native-code-push.d.ts |
Adds public versionLabel typing. |
test/test.ts |
Verifies remote-package propagation; local-package persistence coverage remains needed. |
src/acquisition-sdk/types.ts |
Types the service response field. |
src/acquisition-sdk/acquisition-sdk.ts |
Maps the field to packages; its nullability comment needs correction. |
src/acquisition-sdk/__tests__/acquisition-sdk.test.ts |
Updates SDK expectations. |
src/acquisition-sdk/__tests__/acquisition-rest-mock.ts |
Adds mock response data. |
docs/api-js.md |
Documents label semantics; one conflicting example remains. |
code-push-plugin-testing-framework/typings/code-push-plugin-testing-framework.d.ts |
Types the mock field, but incorrectly requires it. |
code-push-plugin-testing-framework/script/serverUtil.js |
Populates mock version labels. |
api-compat/compat.ts |
Covers the additive public API. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The download E2E test now checks that label and versionLabel come back on the package read from native storage, not only on the update_check response. The checkForUpdate docs example no longer calls the CodePush label "v1". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ofalvai
approved these changes
Sep 23, 2026
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.

SSW-3179
Summary
A customer reported that the only release identifier the SDK exposes,
label, holds the update's UUID, while the Bitrise UI and CLI call the same updatev1,v2, and so on. The CodePush service is adding aversion_labelfield toupdate_checkwith that value (service PR linked below). This PR passes it through to apps asversionLabelonRemotePackageandLocalPackage, so an app can show or report which release its users are running.Changes
version_labelfrom theupdate_checkresponse toversionLabelon the remote package, next tolabel.versionLabelis an optional string in the public typings, with the API docs and the API compatibility check updated. It is optional because packages downloaded by an older SDK were persisted without it.labeldocs no longer say the value looks likev5. On Bitrise it is the update's UUID, and that mismatch is what prompted the customer report.version_label. The checkForUpdate test asserts it reaches the app, and the download test asserts it is still on the package read back from native storage.Why there are no native changes
iOS and Android persist the whole package object to
app.jsonand hand it back fromgetUpdateMetadata, the sync status report, and the nativegetCurrentPackageaccessors. The new property reaches native code the same waylabeldoes, with no per-field plumbing.Notes for reviewers
versionLabel: undefined. The bridge and both native JSON layers already accept that, as they do for a missingdescription.labelis unchanged on purpose. The SDK sends it back on status reports and on the nextupdate_check, and the service expects the UUID there.@bitrise/code-push-sdk10.5.6.Service side: https://github.com/bitrise-io/release-management-code-push-service/pull/258