Skip to content

Commit

Permalink
Merge pull request #94 from splitio/type_declarations_update
Browse files Browse the repository at this point in the history
Prepare release v1.0.1
  • Loading branch information
EmilianoSanchez authored Nov 11, 2024
2 parents 871562f + 38344db commit c4f5377
Show file tree
Hide file tree
Showing 13 changed files with 2,643 additions and 1,393 deletions.
7 changes: 6 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
1.0.1 (November 11, 2024)
- Bugfixing - Revert removal of TypeScript `SplitIO` namespace at `/types/splitio.d.ts` to allow explicit imports of types from the React Native SDK package. E.g., `import type { IReactNativeSettings } from '@splitsoftware/splitio-react-native/types/splitio';`.

1.0.0 (November 1, 2024)
- Added support for targeting rules based on large segments.
- Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory.
- Updated @splitsoftware/splitio-commons package to version 2.0.0 that includes major updates and updated some transitive dependencies for vulnerability fixes.
- BREAKING CHANGES:
- NOTE: Refer to ./MIGRATION-GUIDE.md for instructions on how to migrate your codebase from version 0.x to 1.0.0.
- Dropped support for Split Proxy below version 5.9.0, when using in the browser (client-side API). The SDK now requires Split Proxy 5.9.0 or above.
- Renamed some TypeScript definitions in the SplitIO namespace to avoid conflicts with other Split packages: `SplitIO.ISDK` to `SplitIO.IBrowserSDK`, and `SplitIO.IClient` to `SplitIO.IBrowserClient`.
- Renamed some TypeScript definitions in the `SplitIO` namespace to avoid conflicts with other Split packages: `SplitIO.ISDK` to `SplitIO.IBrowserSDK`, and `SplitIO.IClient` to `SplitIO.IBrowserClient`.
- Removed TypeScript `SplitIO` namespace from `@splitsoftware/splitio-react-native/types/splitio`. Reverted in 1.0.1.
- Removed the `LocalhostFromObject` export from the default import (`import { LocalhostFromObject } from '@splitsoftware/splitio-react-native'`). It is no longer necessary to manually import and configure it in the `sync.localhostMode` option to enable localhost mode.

0.10.0 (September 13, 2024)
Expand Down
70 changes: 70 additions & 0 deletions MIGRATION-GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Migrating to React Native SDK v1

React Native SDK v1.0.0 has a few breaking changes that you should consider when migrating from version 0.x.x.

## Renamed some TypeScript definitions in the `SplitIO` namespace to avoid conflicts with other Split packages

The renamed types are:
- `SplitIO.ISDK` -> `SplitIO.IBrowserSDK`
- `SplitIO.IClient` -> `SplitIO.IBrowserClient`

For example, you should replace:

```ts
import { SplitFactory } from '@splitsoftware/splitio-react-native';

const config: SplitIO.IReactNativeSettings = { ... };
const factory: SplitIO.ISDK = SplitFactory(config);
```

with:

```ts
import { SplitFactory } from '@splitsoftware/splitio-react-native';

const config: SplitIO.IReactNativeSettings = { ... };
const factory: SplitIO.IBrowserSDK = SplitFactory(config);
```

## Removed the `LocalhostFromObject` export from the default import

In order to simplify the SDK API, the `LocalhostFromObject` export was removed from the default import (`import { LocalhostFromObject } from '@splitsoftware/splitio-react-native'`), and it is no longer necessary to manually pass it to the `sync.localhostMode` configuration option to enable localhost mode.

If you were using the `LocalhostFromObject` export, you should remove it from your code. For example, replace:

```js
import { SplitFactory, LocalhostFromObject } from '@splitsoftware/splitio-react-native';

const factory = SplitFactory({
core: {
authorizationKey: 'localhost',
key: SOME_KEY
},
features: {
'feature1': 'on'
},
sync: {
localhostMode: LocalhostFromObject()
}
});
```

with:

```js
import { SplitFactory } from '@splitsoftware/splitio-react-native';

const factory = SplitFactory({
core: {
authorizationKey: 'localhost',
key: SOME_KEY
},
features: {
'feature1': 'on'
}
});
```

## Dropped support for Split Proxy below version 5.9.0. The SDK now requires Split Proxy 5.9.0 or above

If using the Split Proxy with the SDK, make sure to update it to version 5.9.0 or above. This is required due to the introduction of Large Segments matchers in the React Native SDK, which uses a new HTTP endpoint to retrieve the segments data and is only supported by Split Proxy 5.9.0.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Split has built and maintains SDKs for:
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
* Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
* PHP thin-client [Github](https://github.com/splitio/php-thin-client) [Docs](https://help.split.io/hc/en-us/articles/18305128673933-PHP-Thin-Client-SDK)
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
Expand Down
Loading

0 comments on commit c4f5377

Please # to comment.