-
Notifications
You must be signed in to change notification settings - Fork 0
Prepare release v1.0.1 #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
576ef3a
Merge pull request #131 from splitio/development
EmilianoSanchez b40d1ce
Putting back TypeScript SplitIO namespace at to allow explicit impor…
EmilianoSanchez f23f5ca
Add changelog entry
EmilianoSanchez 48d0f41
rc
EmilianoSanchez 94fd376
Added MIGRATION-GUIDE.md file
EmilianoSanchez b46214c
Update changelog entry
EmilianoSanchez c9baf3f
Typos
EmilianoSanchez 96167a9
Typos
EmilianoSanchez 30a883a
Polishing
EmilianoSanchez d13f6c7
Update MIGRATION-GUIDE.md
EmilianoSanchez a9ebdac
Lena's feedback
EmilianoSanchez ce6e2d5
stable version
EmilianoSanchez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Migrating to JavaScript Browser SDK v1 | ||
|
||
JavaScript Browser 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.IBrowserSettings` -> `SplitIO.IClientSideSettings` | ||
- `SplitIO.IBrowserAsyncSettings` -> `SplitIO.IClientSideAsyncSettings` | ||
- `SplitIO.ISDK` -> `SplitIO.IBrowserSDK` | ||
- `SplitIO.IAsyncSDK` -> `SplitIO.IBrowserAsyncSDK` | ||
- `SplitIO.IClient` -> `SplitIO.IBrowserClient` | ||
- `SplitIO.IAsyncClient` -> `SplitIO.IBrowserAsyncClient` | ||
|
||
For example, you should replace: | ||
|
||
```ts | ||
import { SplitFactory } from '@splitsoftware/splitio-browserjs'; | ||
|
||
const config: SplitIO.IBrowserSettings = { ... }; | ||
const factory: SplitIO.ISDK = SplitFactory(config); | ||
``` | ||
|
||
with: | ||
|
||
```ts | ||
import { SplitFactory } from '@splitsoftware/splitio-browserjs'; | ||
|
||
const config: SplitIO.IClientSideSettings = { ... }; | ||
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-browserjs'`), 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, simple remove it from your code. For example, replace: | ||
|
||
```js | ||
import { SplitFactory, LocalhostFromObject } from '@splitsoftware/splitio-browserjs'; | ||
|
||
const factory = SplitFactory({ | ||
core: { | ||
authorizationKey: 'localhost', | ||
key: SOME_KEY | ||
}, | ||
features: { | ||
'feature1': 'on' | ||
}, | ||
sync: { | ||
localhostMode: LocalhostFromObject() | ||
} | ||
}); | ||
``` | ||
|
||
with: | ||
|
||
```js | ||
import { SplitFactory } from '@splitsoftware/splitio-browserjs'; | ||
|
||
const factory = SplitFactory({ | ||
core: { | ||
authorizationKey: 'localhost', | ||
key: SOME_KEY | ||
}, | ||
features: { | ||
'feature1': 'on' | ||
} | ||
}); | ||
``` | ||
|
||
## Removed the deprecated `GoogleAnalyticsToSplit` and `SplitToGoogleAnalytics` pluggable integration modules, along with the related interfaces in the TypeScript definitions | ||
|
||
The Google Analytics integrations were removed since they integrate with the *Google Universal Analytics* library, which was shut down on July 1, 2024, and [replaced by *Google Analytics 4*](https://support.google.com/analytics/answer/11583528?hl=en). Check [this docs](https://help.split.io/hc/en-us/articles/360040838752-Google-Analytics#google-analytics-4-ga4) for more information on how to integrate Split with Google Analytics 4. | ||
|
||
## Removed internal polyfills for the `Map` and `Set` global objects, dropping support for IE and other outdated browsers | ||
|
||
The SDK no longer ships with internal implementations for the `Map` and `Set` global objects, which were used to support old browsers like IE. | ||
|
||
If you need to target environments that do not support these features natively, you should provide a polyfill for them. For example, [es6-map](https://github.com/medikoo/es6-map) for `Map`, and [es6-set](https://github.com/medikoo/es6-set) for `Set`. | ||
|
||
## 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 SDK on client-side, which uses a new HTTP endpoint to retrieve the segments data and is only supported by Split Proxy 5.9.0. | ||
EmilianoSanchez marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Type definitions for JavaScript Browser Split Software SDK | ||
|
||
import '@splitsoftware/splitio-commons'; | ||
|
||
export as namespace SplitIO; | ||
export = SplitIO; |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.