Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout

- uses: borales/actions-yarn@v3.0.0
name: Validation
with:
cmd: install

- name: Verify frozen assignment mapping
run: yarn test src/internal/__tests__/Mapper.test.ts --runInBand
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ jobs:
yarn
yarn prepare

- name: Verify frozen assignment mapping
run: yarn test src/internal/__tests__/Mapper.test.ts --runInBand

- name: Publish to npm
run: npm publish
run: npm publish
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
dependencies {
implementation "com.facebook.react:react-android"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "io.qonversion:sandwich:7.12.0"
implementation "io.qonversion:sandwich:7.13.0"
}

if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion qonversion-react-native-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
s.private_header_files = "ios/**/*.h"

s.dependency "QonversionSandwich", "7.12.0"
s.dependency "QonversionSandwich", "7.13.0"
install_modules_dependencies(s)
end
1 change: 1 addition & 0 deletions src/dto/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ export enum RemoteConfigurationAssignmentType {
UNKNOWN = "unknown",
AUTO = "auto",
MANUAL = "manual",
FROZEN = "frozen",
}

export enum ScreenPresentationStyle {
Expand Down
2 changes: 2 additions & 0 deletions src/internal/Mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,8 @@ class Mapper {
return RemoteConfigurationAssignmentType.AUTO;
case "manual":
return RemoteConfigurationAssignmentType.MANUAL;
case "frozen":
return RemoteConfigurationAssignmentType.FROZEN;
default:
return RemoteConfigurationAssignmentType.UNKNOWN;
}
Expand Down
13 changes: 13 additions & 0 deletions src/internal/__tests__/Mapper.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Mapper from '../Mapper';
import { RemoteConfigurationAssignmentType } from '../../dto/enums';

describe('remote configuration assignment provenance', () => {
it('preserves frozen and keeps unknown values fail-safe', () => {
expect(Mapper.convertRemoteConfigurationAssignmentType('frozen')).toBe(
RemoteConfigurationAssignmentType.FROZEN
);
expect(Mapper.convertRemoteConfigurationAssignmentType('future')).toBe(
RemoteConfigurationAssignmentType.UNKNOWN
);
});
});
Loading