-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'update_dependencies' into update_typescript_config
- Loading branch information
Showing
56 changed files
with
13,542 additions
and
1,868 deletions.
There are no files selected for viewing
This file contains 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,60 @@ | ||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'es6': true, | ||
'node': true | ||
}, | ||
'extends': [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:@typescript-eslint/recommended' | ||
], | ||
'parser': '@typescript-eslint/parser', | ||
'parserOptions': { | ||
'ecmaVersion': 2015, | ||
'sourceType': 'module' | ||
}, | ||
'plugins': [ | ||
'react', | ||
'@typescript-eslint', | ||
'import' | ||
], | ||
'rules': { | ||
'indent': ['error', 2, { 'SwitchCase': 1 }], | ||
'quotes': ['warn', 'single', 'avoid-escape'], | ||
'linebreak-style': ['error', 'unix'], | ||
'camelcase': ['error', { 'properties': 'never' }], | ||
'eol-last': ['error', 'always'], | ||
'keyword-spacing': 'error', | ||
'no-trailing-spaces': 'error', | ||
'space-before-function-paren': ['error', {'named': 'never'}], | ||
'react/display-name': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-inferrable-types': 'error', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_' }], | ||
'prefer-const': ['error', { | ||
'destructuring': 'all' | ||
}] | ||
}, | ||
'overrides': [{ | ||
'files': ['src/**/*.ts'], | ||
'excludedFiles': ['src/**/__tests__/**'], | ||
'extends': [ | ||
'plugin:compat/recommended' | ||
], | ||
'settings': { | ||
'polyfills': [ | ||
'Promise' // required as a polyfill by the user | ||
] | ||
}, | ||
'rules': { | ||
'no-restricted-syntax': ['error', 'ForOfStatement', 'ForInStatement'], | ||
'compat/compat': ['error', 'defaults, not ie < 11'], | ||
'no-throw-literal': 'error', | ||
'import/no-self-import': 'error', | ||
'import/no-default-export': 'error', | ||
} | ||
}], | ||
}; |
Validating CODEOWNERS rules …
This file contains 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 @@ | ||
* @splitio/sdk |
This file contains 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 |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
## How do we test the changes introduced in this PR? | ||
|
||
## Extra Notes | ||
## Extra Notes |
This file contains 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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- master | ||
pull_request_target: | ||
branches: | ||
- development | ||
push: | ||
branches: | ||
- '*' | ||
|
||
|
@@ -13,10 +16,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up nodejs | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' | ||
cache: 'npm' | ||
|
@@ -28,7 +33,38 @@ jobs: | |
run: npm run check | ||
|
||
- name: npm Test | ||
run: npm run test | ||
run: npm run test -- --coverage | ||
|
||
- name: npm Build | ||
run: npm run build | ||
|
||
- name: Set VERSION env | ||
run: echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV | ||
|
||
- name: SonarQube Scan (Push) | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development') | ||
uses: SonarSource/[email protected] | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
projectBaseDir: . | ||
args: > | ||
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
-Dsonar.projectVersion=${{ env.VERSION }} | ||
-Dsonar.branch.name=${{ github.ref_name }} | ||
- name: SonarQube Scan (Pull Request) | ||
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' | ||
uses: SonarSource/[email protected] | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
projectBaseDir: . | ||
args: > | ||
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
-Dsonar.projectVersion=${{ env.VERSION }} | ||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} | ||
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} |
This file contains 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 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 |
---|---|---|
|
@@ -5,4 +5,5 @@ es | |
types | ||
coverage | ||
examples | ||
.vscode | ||
.vscode | ||
.scannerwork |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
v14 | ||
lts/* |
This file contains 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 |
---|---|---|
@@ -1,3 +1,61 @@ | ||
1.11.0 (March 27, 2023) | ||
- Added `sideEffects: false` property in the package.json file to allow tree shaking. | ||
- Updated Redux-Thunk peer dependency range to include [email protected]. | ||
- Updated the build process and added the `tslib` package as an explicit dependency to import TypeScript helpers, thereby avoiding duplicated helper code in the output files. | ||
- Updated @splitsoftware/splitio package to version 10.25.2, which includes vulnerability fixes and other improvements. | ||
|
||
1.10.0 (December 18, 2023) | ||
- Added support for Flag Sets on the SDK, which enables grouping feature flags and interacting with the group rather than individually (more details in our documentation): | ||
- Added a new optional `flagSets` property to the param object of the `getTreatments` action creator, to support evaluating flags in given flag set/s. Either `splitNames` or `flagSets` must be provided to the function. If both are provided, `splitNames` will be used. | ||
- Added a new optional Split Filter configuration option. This allows the SDK and Split services to only synchronize the flags in the specified flag sets, avoiding unused or unwanted flags from being synced on the SDK instance, bringing all the benefits from a reduced payload. | ||
- Added `sets` property to the `SplitView` object returned by the `getSplit` and `getSplits` helper functions to expose flag sets on flag views. | ||
- Added `defaultTreatment` property to the `SplitView` object returned by the `getSplit` and `getSplits` helper functions (Related to issue https://github.com/splitio/javascript-commons/issues/225). | ||
- Updated `getTreatments` action creator to validate the provided params object, in order to log a descriptive error when an invalid object is provided rather than throwing a cryptic error. | ||
- Updated @splitsoftware/splitio package to version 10.24.1 that includes flag sets support, vulnerability fixes and other improvements. | ||
|
||
1.9.0 (July 18, 2023) | ||
- Updated some transitive dependencies for vulnerability fixes. | ||
- Updated @splitsoftware/splitio package to version 10.23.0 that includes: | ||
- Updated streaming architecture implementation to apply feature flag updates from the notification received which is now enhanced, improving efficiency and reliability of the whole update system. | ||
|
||
1.8.0 (June 27, 2023) | ||
- Added `ISplitState` TypeScript interface to the library exports, which is the type for the Split reducer's slice of state. | ||
|
||
1.7.3 (May 16, 2023) | ||
- Updated @splitsoftware/splitio package to version 10.22.5 that includes: | ||
- Updated terminology on the SDKs codebase to be more aligned with current standard without causing a breaking change. The core change is the term split for feature flag on things like logs and IntelliSense comments. | ||
- Updated some transitive dependencies for vulnerability fixes. | ||
|
||
1.7.2 (April 3, 2023) | ||
- Updated linter dependencies and rules. The deprecated TSLint package was replaced by ESLint. | ||
- Updated some transitive dependencies for vulnerability fixes. | ||
- Updated @splitsoftware/splitio package to version 10.22.4 that includes minor improvements. | ||
- Bugfixing - Fixed error when using the SDK in localhost mode for testing with NodeJS test runners such as Jest (See https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK#localhost-mode). | ||
|
||
1.7.1 (November 15, 2022) | ||
- Updated React Redux peer dependency range to include [email protected] and [email protected]. | ||
- Updated @splitsoftware/splitio dependency to version 10.22.2, which includes vulnerability and bug fixes. | ||
|
||
1.7.0 (October 5, 2022) | ||
- Updated @splitsoftware/splitio dependency to version 10.22.0, which includes: | ||
- Added a new impressions mode for the SDK called NONE, to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions. | ||
- Added `autoRequire` configuration option to the Google Analytics to Split integration, which takes care of requiring the splitTracker plugin on trackers dynamically created by Google tag managers (See https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js). | ||
- Updated default value of `scheduler.featuresRefreshRate` config parameter from 30 seconds to 60 seconds. | ||
- Updated storage implementations to improve the performance of split evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory. | ||
- Updated browser listener to push remaining impressions and events on 'visibilitychange' and 'pagehide' DOM events, instead of 'unload', which is not reliable in modern mobile and desktop Web browsers. | ||
- Updated the synchronization flow to be more reliable in the event of an edge case generating delay in cache purge propagation, keeping the SDK cache properly synced. | ||
- Updated some dependencies for vulnerability fixes. | ||
|
||
1.6.0 (Jul 7, 2022) | ||
- Updated @splitsoftware/splitio dependency to version 10.20.0, which includes: | ||
- Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config sync.enabled . Running online Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used. | ||
- Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown. | ||
- Updated submitters logic, to avoid duplicating the post of impressions to Split cloud when the SDK is destroyed while its periodic post of impressions is running. | ||
- Added `scheduler.telemetryRefreshRate` property to SDK configuration, and deprecated `scheduler.metricsRefreshRate` property. | ||
- Updated SDK telemetry storage, metrics and updater to be more effective and send less often. | ||
- Updated eventsource dependency range to ^1.1.2 to avoid a vulnerability and dependency resolution to a vulnerable version of url-parse transitive dependency. | ||
- Bugfixing - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending. | ||
|
||
1.5.0 (April 20, 2022) | ||
- Updated @splitsoftware/splitio dependency to version 10.18.1, which includes: | ||
- Added user consent feature to allow delaying or disabling the data tracking from SDK until user consent is explicitly granted or declined. Read more in our docs. | ||
|
@@ -25,12 +83,12 @@ | |
- Updated Split's SDK dependency to fix vulnerabilities. | ||
|
||
1.3.0 (December 9, 2020) | ||
- Added a new parameter to `getTreatments` actions creator: `evalOnReadyFromCache` to evaluate splits when the SDK_READY_FROM_CACHE event is emitted. Learn more in our Redux SDK documentation. | ||
- Updated how splits evaluations are handled on SDK_READY, SDK_READY_FROM_CACHE and SDK_UPDATE events, to dispatch a single action with evaluations that results in all treatments updates in the state at once, instead of having multiple actions that might lead to multiple store notifications. | ||
- Added a new parameter to `getTreatments` action creator: `evalOnReadyFromCache` to evaluate feature flags when the SDK_READY_FROM_CACHE event is emitted. Learn more in our Redux SDK documentation. | ||
- Updated how feature flag evaluations are handled on SDK_READY, SDK_READY_FROM_CACHE and SDK_UPDATE events, to dispatch a single action with evaluations that results in all treatments updates in the state at once, instead of having multiple actions that might lead to multiple store notifications. | ||
- Updated some NPM dependencies for vulnerability fixes. | ||
|
||
1.2.1 (Oct 7, 2020) | ||
- Updated @splitsoftware/splitio dependency to version 10.15.0, which uses the optimized impressions sending and supports filtering the splits to be synced. Learn more in our javascript-client changelog or documentation. | ||
- Updated @splitsoftware/splitio dependency to version 10.15.0, which uses the optimized impressions sending and supports filtering the feature flags to be synced. Learn more in our javascript-client changelog or documentation. | ||
|
||
1.2.0 (Jul 7, 2020) | ||
- Updated @splitsoftware/splitio dependency to version 10.13.0, which uses streaming synchronization by default, amongst other updates. Learn more in our javascript-client changelog or documentation. | ||
|
@@ -39,7 +97,7 @@ | |
- Added an optional callback parameter to `destroySplitSdk` action creator: `onDestroy`, to listen when the SDK has gracefully shut down. | ||
|
||
1.1.0 (May 11, 2020) | ||
- Bugfixing - incorrect evaluation of splits on browser when using `getTreatments` with a different user key than the default, caused by not waiting the fetch of segments. | ||
- Bugfixing - incorrect evaluation of feature flags on browser when using `getTreatments` with a different user key than the default, caused by not waiting the fetch of segments. | ||
- Added `destroySplitSdk` action creator to gracefully shutdown the SDK. | ||
- Added two new status properties to split's piece of state: `hasTimedout` and `isDestroyed` to better reflect the current state of the associated factory. | ||
|
||
|
This file contains 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 |
---|---|---|
|
@@ -40,4 +40,4 @@ If you want to debug your changes consuming it from a test application, you can | |
|
||
# Contact | ||
|
||
If you have any other questions or need to contact us directly in a private manner send us a note at [email protected] | ||
If you have any other questions or need to contact us directly in a private manner send us a note at [email protected] |
This file contains 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 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 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
Oops, something went wrong.