From 4ee3fe2a506685a348b3f978dfc4c3d6a2971483 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 27 Oct 2025 16:44:42 -0300 Subject: [PATCH 01/26] Update README.md --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c1a763a..7982bf4 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,14 @@ import { OpenFeatureSplitProvider } from '@splitsoftware/openfeature-web-split-p const splitFactory = SplitFactory({ core: { - authorizationKey: 'your auth key' + authorizationKey: 'CLIENT_SIDE_SDK_KEY', + key: 'TARGETING_KEY' } }); const provider = new OpenFeatureSplitProvider(splitFactory); -OpenFeature.setProvider(provider); + +// Wait for the default SDK client for 'TARGETING_KEY' to be ready +await OpenFeature.setProviderAndWait(provider); ``` ## Use of OpenFeature with Split @@ -43,7 +46,7 @@ const context: EvaluationContext = { targetingKey: 'TARGETING_KEY', trafficType: 'account' }; -OpenFeature.setContext(context) +await OpenFeature.setContext(context) ``` ## Evaluate with details @@ -65,7 +68,7 @@ const context: EvaluationContext = { plan: 'premium', couppon: 'WELCOME10' }; -OpenFeature.setContext(context); +await OpenFeature.setContext(context); const booleanTreatment = client.getBooleanDetails('boolFlag', false); ``` @@ -89,7 +92,7 @@ Example: const context = { targetingKey: 'user-123', trafficType: 'account' } const details = { value: 19.99, properties: { plan: 'pro', coupon: 'WELCOME10' }} -client.setEvaluationContext(context) +await client.setContext(context) client.track('checkout.completed', details) ``` ## Submitting issues From 45e965311cf23239b9ce58910c16cd1c9dc4f1e5 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Wed, 29 Oct 2025 13:40:13 -0300 Subject: [PATCH 02/26] README: add OpenFeature client initialization and fix typo in context example --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7982bf4..6e09bcf 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,13 @@ const splitFactory = SplitFactory({ key: 'TARGETING_KEY' } }); + const provider = new OpenFeatureSplitProvider(splitFactory); -// Wait for the default SDK client for 'TARGETING_KEY' to be ready +// Register provider and wait for the default SDK client for 'TARGETING_KEY' to be ready await OpenFeature.setProviderAndWait(provider); + +const client = OpenFeature.getClient(); ``` ## Use of OpenFeature with Split @@ -65,8 +68,9 @@ Evaluation attributes must be set in context before evaluation const context: EvaluationContext = { targetingKey: 'TARGETING_KEY', trafficType: 'account', + // Evaluation attributes: plan: 'premium', - couppon: 'WELCOME10' + coupon: 'WELCOME10' }; await OpenFeature.setContext(context); const booleanTreatment = client.getBooleanDetails('boolFlag', false); @@ -96,7 +100,7 @@ await client.setContext(context) client.track('checkout.completed', details) ``` ## Submitting issues - + The Split team monitors all issues submitted to this [issue tracker](https://github.com/splitio/split-openfeature-provider-web-js/issues). We encourage you to use this issue tracker to submit any bug reports, feedback, and feature enhancements. We'll do our best to respond in a timely manner. ## Contributing @@ -106,13 +110,13 @@ Please see [Contributors Guide](CONTRIBUTORS-GUIDE.md) to find all you need to s Licensed under the Apache License, Version 2.0. See: [Apache License](http://www.apache.org/licenses/). ## About Split - + Split is the leading Feature Delivery Platform for engineering teams that want to confidently deploy features as fast as they can develop them. Split’s fine-grained management, real-time monitoring, and data-driven experimentation ensure that new features will improve the customer experience without breaking or degrading performance. Companies like Twilio, Salesforce, GoDaddy and WePay trust Split to power their feature delivery. - + To learn more about Split, contact hello@split.io, or get started with feature flags for free at https://www.split.io/signup. - + Split has built and maintains SDKs for: - + * .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK) * Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK) * Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/6495326064397-Angular-utilities) @@ -131,10 +135,9 @@ Split has built and maintains SDKs for: * React Native [Github](https://github.com/splitio/react-native-client) [Docs](https://help.split.io/hc/en-us/articles/4406066357901-React-Native-SDK) * Redux [Github](https://github.com/splitio/redux-client) [Docs](https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK) * Ruby [Github](https://github.com/splitio/ruby-client) [Docs](https://help.split.io/hc/en-us/articles/360020673251-Ruby-SDK) - + For a comprehensive list of open source projects visit our [Github page](https://github.com/splitio?utf8=%E2%9C%93&query=%20only%3Apublic%20). - + **Learn more about Split:** - -Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](http://help.split.io) for more detailed information. +Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](http://help.split.io) for more detailed information. From f0bae1ab5b62fb5db64cd090d811e0be4a50c036 Mon Sep 17 00:00:00 2001 From: Emmanuel Zamora Date: Wed, 5 Nov 2025 14:06:22 -0300 Subject: [PATCH 03/26] Add angular and react snippets to readme --- README.md | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 127 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e09bcf..8eb57d6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Split OpenFeature Provider for NodeJS +# Split OpenFeature Provider for web js [![Twitter Follow](https://img.shields.io/twitter/follow/splitsoftware.svg?style=social&label=Follow&maxAge=1529000)](https://twitter.com/intent/follow?screen_name=splitsoftware) ## Overview @@ -99,6 +99,132 @@ const details = { value: 19.99, properties: { plan: 'pro', coupon: 'WELCOME10' } await client.setContext(context) client.track('checkout.completed', details) ``` + +## Angular Usage + +### Traditional (NgModule) setup +```js +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { OpenFeatureModule } from '@openfeature/angular-sdk'; +import { SplitFactory } from '@splitsoftware/splitio-browserjs'; +import { OpenFeatureSplitProvider } from '@splitsoftware/openfeature-web-split-provider'; + +const splitFactory = SplitFactory({ + core: { + authorizationKey: 'CLIENT_SIDE_SDK_KEY', + key: 'TARGETING_KEY' + } +}); +const openFeatureProvider = new OpenFeatureSplitProvider(splitFactory); + +@NgModule({ + imports: [ + RouterModule.forRoot(routes), + OpenFeatureModule.forRoot({ + provider: openFeatureProvider + }) + ], + bootstrap: [AppComponent] +}) +export class AppModule {} +``` + +### Standalone (Angular 16+) setup +```js +import { ApplicationConfig, provideBrowserGlobalErrorListeners, importProvidersFrom } from '@angular/core'; +import { OpenFeatureModule } from '@openfeature/angular-sdk'; +import { SplitFactory } from '@splitsoftware/splitio-browserjs'; +import { OpenFeatureSplitProvider } from '@splitsoftware/openfeature-web-split-provider'; + +const splitFactory = SplitFactory({ + core: { + authorizationKey: 'CLIENT_SIDE_SDK_KEY', + key: 'TARGETING_KEY' + } +}); +const openFeatureProvider = new OpenFeatureSplitProvider(splitFactory); + +export const appConfig: ApplicationConfig = { + providers: [ + provideBrowserGlobalErrorListeners(), + importProvidersFrom( + OpenFeatureModule.forRoot({ + provider: openFeatureProvider + }) + ) + ] +}; +``` + +### Component injection and usage +```js +import { FeatureFlagService, EvaluationDetails } from '@openfeature/angular-sdk'; + +@Component({ + selector: 'app-root', + imports: [RouterOutlet], + templateUrl: './app.html', + styleUrl: './app.css' +}) +export class App { + constructor(private splitService: FeatureFlagService) {} + + ngOnInit() { + this.splitService.getStringDetails('featureFlagName', 'default').subscribe((result: EvaluationDetails) => { + console.log('Feature flag result:', result.value); + }); + } +} +``` +> 🔗 For more information on Angular integration, visit the [official OpenFeature Angular SDK documentation][angular-docs]. + +[angular-docs]: https://openfeature.dev/docs/reference/sdks/client/web/angular + +## React usage +```js +import { OpenFeature } from '@openfeature/react-sdk'; +import { OpenFeatureSplitProvider } from '@splitsoftware/openfeature-web-split-provider'; +import { DebugLogger, SplitFactory } from '@splitsoftware/splitio-browserjs'; + +const splitFactory = SplitFactory({ + core: { + authorizationKey: 'CLIENT_SIDE_SDK_KEY', + key: 'TARGETING_KEY' + } +}) +const openFeatureProvider = new OpenFeatureSplitProvider(splitFactory); + +OpenFeature.setProvider(openFeatureProvider); + +function App() { + return ( + + + + ); +} +``` +### Evaluation hooks +```js +import { useFlag } from '@openfeature/react-sdk'; + +function Page() { + // Use the "query-style" flag evaluation hook, specifying a flag-key and a default value. + const { value: showNewMessage } = useFlag('new-message', true); + return ( +
+
+ {showNewMessage ?

Welcome to this OpenFeature-enabled React app!

:

Welcome to this React app.

} +
+
+ ) +} +``` +> 🔗 For more information on React integration, visit the [official OpenFeature React SDK documentation][react-docs]. + +[react-docs]: https://openfeature.dev/docs/reference/sdks/client/web/react + ## Submitting issues The Split team monitors all issues submitted to this [issue tracker](https://github.com/splitio/split-openfeature-provider-web-js/issues). We encourage you to use this issue tracker to submit any bug reports, feedback, and feature enhancements. We'll do our best to respond in a timely manner. From 2553c232ad5651b44899ef7673e6814291dc96dd Mon Sep 17 00:00:00 2001 From: Emmanuel Zamora Date: Wed, 5 Nov 2025 14:12:49 -0300 Subject: [PATCH 04/26] fix snippet --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8eb57d6..cd46349 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Example: const context = { targetingKey: 'user-123', trafficType: 'account' } const details = { value: 19.99, properties: { plan: 'pro', coupon: 'WELCOME10' }} -await client.setContext(context) +await OpenFeature.setContext(context) client.track('checkout.completed', details) ``` From bf09cbc51899b80909608c7d4f834f0aac389e0e Mon Sep 17 00:00:00 2001 From: ZamoraEmmanuel <87494075+ZamoraEmmanuel@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:23:40 -0300 Subject: [PATCH 05/26] Update README.md Co-authored-by: Emiliano Sanchez --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd46349..14ef651 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Split OpenFeature Provider for web js +# Split OpenFeature Provider for Web JavaScript [![Twitter Follow](https://img.shields.io/twitter/follow/splitsoftware.svg?style=social&label=Follow&maxAge=1529000)](https://twitter.com/intent/follow?screen_name=splitsoftware) ## Overview From 1a92882995afe5ae19a86867f806cc73ddd0894b Mon Sep 17 00:00:00 2001 From: Emmanuel Zamora Date: Wed, 5 Nov 2025 14:42:12 -0300 Subject: [PATCH 06/26] Add instal dependencies section --- README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 14ef651..0589719 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,14 @@ client.track('checkout.completed', details) ## Angular Usage -### Traditional (NgModule) setup +### Install dependencies +```bash +npm i @openfeature/angular-sdk @splitsoftware/splitio-browserjs @splitsoftware/openfeature-web-split-provider +``` + +### Initialize the React SDK + +#### Traditional (NgModule) setup ```js import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; @@ -130,7 +137,7 @@ const openFeatureProvider = new OpenFeatureSplitProvider(splitFactory); export class AppModule {} ``` -### Standalone (Angular 16+) setup +#### Standalone (Angular 16+) setup ```js import { ApplicationConfig, provideBrowserGlobalErrorListeners, importProvidersFrom } from '@angular/core'; import { OpenFeatureModule } from '@openfeature/angular-sdk'; @@ -157,7 +164,7 @@ export const appConfig: ApplicationConfig = { }; ``` -### Component injection and usage +#### Component injection and usage ```js import { FeatureFlagService, EvaluationDetails } from '@openfeature/angular-sdk'; @@ -182,6 +189,13 @@ export class App { [angular-docs]: https://openfeature.dev/docs/reference/sdks/client/web/angular ## React usage + +### Install dependencies +```bash +npm i @openfeature/react-sdk @splitsoftware/splitio-browserjs @splitsoftware/openfeature-web-split-provider +``` + +### Initialize the React SDK ```js import { OpenFeature } from '@openfeature/react-sdk'; import { OpenFeatureSplitProvider } from '@splitsoftware/openfeature-web-split-provider'; @@ -205,7 +219,8 @@ function App() { ); } ``` -### Evaluation hooks + +#### Evaluation hooks ```js import { useFlag } from '@openfeature/react-sdk'; From ec5bfd97bfa27f2a82880c42e491a7cf9e8e4910 Mon Sep 17 00:00:00 2001 From: Emmanuel Zamora Date: Wed, 5 Nov 2025 15:58:45 -0300 Subject: [PATCH 07/26] Fix Angular title --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0589719..20b23a7 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ client.track('checkout.completed', details) npm i @openfeature/angular-sdk @splitsoftware/splitio-browserjs @splitsoftware/openfeature-web-split-provider ``` -### Initialize the React SDK +### Initialize the Angular SDK #### Traditional (NgModule) setup ```js From e98a6be8012c6152221f14de964fc3c1ee47162d Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:25:28 +0000 Subject: [PATCH 08/26] Create pipeline test --- .harness/test.yml | 109 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 .harness/test.yml diff --git a/.harness/test.yml b/.harness/test.yml new file mode 100644 index 0000000..fb2c44b --- /dev/null +++ b/.harness/test.yml @@ -0,0 +1,109 @@ +pipeline: + name: test + identifier: test + projectIdentifier: Harness_Split + orgIdentifier: PROD + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+input> + connectorRef: <+input> + stages: + - stage: + name: CI Stage + identifier: ci_stage + type: CI + spec: + cloneCodebase: true + runtime: + type: Cloud + spec: + size: small + platform: + os: Linux + arch: Amd64 + execution: + steps: + - step: + type: Run + name: Setup NodeJS + identifier: setup_nodejs + spec: + connectorRef: account.harnessImage + image: ubuntu:22.04 + shell: Bash + command: | + # Install curl and other dependencies + apk add --no-cache curl bash + + # Install nvm + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash + + # Load nvm + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + + # Install latest LTS version of Node.js + nvm install --lts + + # Use the installed version + nvm use --lts + + # Export the Node.js version + export NODE_VERSION=$(node -v) + echo "Node.js version: $NODE_VERSION" + outputVariables: + - name: NODE_VERSION + timeout: 10m + - step: + type: Run + name: Install Dependencies + identifier: install_dependencies + spec: + connectorRef: account.harnessImage + image: ubuntu:22.04 + shell: Bash + command: | + # Set up npm cache directory + mkdir -p ~/.npm + + # Run npm ci with cache enabled + npm ci + envVariables: + npm_config_cache: ~/.npm + timeout: 10m + - step: + type: Run + name: Run Checks + identifier: run_checks + spec: + connectorRef: account.harnessImage + image: ubuntu:22.04 + shell: Bash + command: | + npm run check + timeout: 10m + - step: + identifier: run_tests + name: Run Tests + type: Test + timeout: 10m + spec: + command: | + npm run test + shell: Bash + connectorRef: account.harnessImage + image: ubuntu:22.04 + reports: + type: JUnit + spec: + paths: + - "**/test-results.xml" + - "**/junit-*.xml" + envVariables: + NODE_ENV: test + CI: "true" + rollbackSteps: [] From 59cc9949cf44aeb34705a3495a48e9d9fe5a1a52 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:25:58 +0000 Subject: [PATCH 09/26] Update pipeline test --- .harness/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/test.yml b/.harness/test.yml index fb2c44b..dee7b7b 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -10,7 +10,7 @@ pipeline: type: PR spec: number: <+input> - connectorRef: <+input> + connectorRef: splitio stages: - stage: name: CI Stage From a0291b85b5eaccd15dd5c649baf0cabe6a4cfed4 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:32:17 +0000 Subject: [PATCH 10/26] Update pipeline test --- .harness/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.harness/test.yml b/.harness/test.yml index dee7b7b..9184daf 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -6,11 +6,12 @@ pipeline: properties: ci: codebase: + connectorRef: splitio + repoName: split-openfeature-provider-web-js build: - type: PR + type: branch spec: - number: <+input> - connectorRef: splitio + branch: <+input> stages: - stage: name: CI Stage From 39e11a9c988cc3d66658f69be7b17946d317f554 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:32:31 +0000 Subject: [PATCH 11/26] Update pipeline test --- .harness/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.harness/test.yml b/.harness/test.yml index 9184daf..b9faa66 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -107,4 +107,3 @@ pipeline: envVariables: NODE_ENV: test CI: "true" - rollbackSteps: [] From 702a242f3c778aa7e0a6b39d8dfa47b69ebecffd Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:33:19 +0000 Subject: [PATCH 12/26] Update pipeline test --- .harness/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.harness/test.yml b/.harness/test.yml index b9faa66..8ccd1d8 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -64,8 +64,6 @@ pipeline: name: Install Dependencies identifier: install_dependencies spec: - connectorRef: account.harnessImage - image: ubuntu:22.04 shell: Bash command: | # Set up npm cache directory @@ -81,8 +79,6 @@ pipeline: name: Run Checks identifier: run_checks spec: - connectorRef: account.harnessImage - image: ubuntu:22.04 shell: Bash command: | npm run check From f37e2147e09583645e775fc269589a8e6b235822 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 16:37:37 -0300 Subject: [PATCH 13/26] Delete .harness/test.yml --- .harness/test.yml | 105 ---------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 .harness/test.yml diff --git a/.harness/test.yml b/.harness/test.yml deleted file mode 100644 index 8ccd1d8..0000000 --- a/.harness/test.yml +++ /dev/null @@ -1,105 +0,0 @@ -pipeline: - name: test - identifier: test - projectIdentifier: Harness_Split - orgIdentifier: PROD - properties: - ci: - codebase: - connectorRef: splitio - repoName: split-openfeature-provider-web-js - build: - type: branch - spec: - branch: <+input> - stages: - - stage: - name: CI Stage - identifier: ci_stage - type: CI - spec: - cloneCodebase: true - runtime: - type: Cloud - spec: - size: small - platform: - os: Linux - arch: Amd64 - execution: - steps: - - step: - type: Run - name: Setup NodeJS - identifier: setup_nodejs - spec: - connectorRef: account.harnessImage - image: ubuntu:22.04 - shell: Bash - command: | - # Install curl and other dependencies - apk add --no-cache curl bash - - # Install nvm - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash - - # Load nvm - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - - # Install latest LTS version of Node.js - nvm install --lts - - # Use the installed version - nvm use --lts - - # Export the Node.js version - export NODE_VERSION=$(node -v) - echo "Node.js version: $NODE_VERSION" - outputVariables: - - name: NODE_VERSION - timeout: 10m - - step: - type: Run - name: Install Dependencies - identifier: install_dependencies - spec: - shell: Bash - command: | - # Set up npm cache directory - mkdir -p ~/.npm - - # Run npm ci with cache enabled - npm ci - envVariables: - npm_config_cache: ~/.npm - timeout: 10m - - step: - type: Run - name: Run Checks - identifier: run_checks - spec: - shell: Bash - command: | - npm run check - timeout: 10m - - step: - identifier: run_tests - name: Run Tests - type: Test - timeout: 10m - spec: - command: | - npm run test - shell: Bash - connectorRef: account.harnessImage - image: ubuntu:22.04 - reports: - type: JUnit - spec: - paths: - - "**/test-results.xml" - - "**/junit-*.xml" - envVariables: - NODE_ENV: test - CI: "true" From 0605195116992ed77bae5218d5883b347fcd78ff Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:37:51 +0000 Subject: [PATCH 14/26] Create pipeline test --- .harness/test.yml | 105 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .harness/test.yml diff --git a/.harness/test.yml b/.harness/test.yml new file mode 100644 index 0000000..618ea04 --- /dev/null +++ b/.harness/test.yml @@ -0,0 +1,105 @@ +pipeline: + name: test + identifier: test + projectIdentifier: Harness_Split + orgIdentifier: PROD + properties: + ci: + codebase: + connectorRef: splitio + repoName: split-openfeature-provider-web-js + build: + type: branch + spec: + branch: <+input> + stages: + - stage: + name: CI Stage + identifier: ci_stagex + type: CI + spec: + cloneCodebase: true + runtime: + type: Cloud + spec: + size: small + platform: + os: Linux + arch: Amd64 + execution: + steps: + - step: + type: Run + name: Setup NodeJS + identifier: setup_nodejs + spec: + connectorRef: account.harnessImage + image: ubuntu:22.04 + shell: Bash + command: | + # Install curl and other dependencies + apk add --no-cache curl bash + + # Install nvm + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash + + # Load nvm + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + + # Install latest LTS version of Node.js + nvm install --lts + + # Use the installed version + nvm use --lts + + # Export the Node.js version + export NODE_VERSION=$(node -v) + echo "Node.js version: $NODE_VERSION" + outputVariables: + - name: NODE_VERSION + timeout: 10m + - step: + type: Run + name: Install Dependencies + identifier: install_dependencies + spec: + shell: Bash + command: | + # Set up npm cache directory + mkdir -p ~/.npm + + # Run npm ci with cache enabled + npm ci + envVariables: + npm_config_cache: ~/.npm + timeout: 10m + - step: + type: Run + name: Run Checks + identifier: run_checks + spec: + shell: Bash + command: | + npm run check + timeout: 10m + - step: + identifier: run_tests + name: Run Tests + type: Test + timeout: 10m + spec: + command: | + npm run test + shell: Bash + connectorRef: account.harnessImage + image: ubuntu:22.04 + reports: + type: JUnit + spec: + paths: + - "**/test-results.xml" + - "**/junit-*.xml" + envVariables: + NODE_ENV: test + CI: "true" From dc6f45eea9ad40ea558b8c9da1ad234ea1fda812 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:39:53 +0000 Subject: [PATCH 15/26] Update pipeline test --- .harness/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.harness/test.yml b/.harness/test.yml index 618ea04..e9ff294 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -34,7 +34,7 @@ pipeline: identifier: setup_nodejs spec: connectorRef: account.harnessImage - image: ubuntu:22.04 + image: ubuntu:24.04 shell: Bash command: | # Install curl and other dependencies @@ -93,7 +93,7 @@ pipeline: npm run test shell: Bash connectorRef: account.harnessImage - image: ubuntu:22.04 + image: ubuntu:24.04 reports: type: JUnit spec: From d6c87a76ea4ef444237654e51772a5574ca63272 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:41:02 +0000 Subject: [PATCH 16/26] Update pipeline test --- .harness/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/test.yml b/.harness/test.yml index e9ff294..b417eea 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -38,7 +38,7 @@ pipeline: shell: Bash command: | # Install curl and other dependencies - apk add --no-cache curl bash + apt-get update && apt-get install -y curl bash # Install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash From f1c9e3cdc81707960da03d84cf6f4bb83cd14e74 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:46:51 +0000 Subject: [PATCH 17/26] Update pipeline test --- .harness/test.yml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.harness/test.yml b/.harness/test.yml index b417eea..43b5f94 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -36,28 +36,12 @@ pipeline: connectorRef: account.harnessImage image: ubuntu:24.04 shell: Bash - command: | - # Install curl and other dependencies - apt-get update && apt-get install -y curl bash - - # Install nvm - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash - - # Load nvm - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - - # Install latest LTS version of Node.js - nvm install --lts - - # Use the installed version - nvm use --lts - - # Export the Node.js version - export NODE_VERSION=$(node -v) - echo "Node.js version: $NODE_VERSION" - outputVariables: - - name: NODE_VERSION + command: |- + echo "Installing Node.js version <+matrix.nodeVersion>" + apt-get update + apt-get install -y curl + curl -fsSL https://deb.nodesource.com/setup_<+matrix.nodeVersion>.x | bash - + apt-get install -y nodejs timeout: 10m - step: type: Run From 2e71880bef598e56f9ba8ed5a75e785f12a90226 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:48:34 +0000 Subject: [PATCH 18/26] Update pipeline test --- .harness/test.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.harness/test.yml b/.harness/test.yml index 43b5f94..e791bc8 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -36,12 +36,9 @@ pipeline: connectorRef: account.harnessImage image: ubuntu:24.04 shell: Bash - command: |- - echo "Installing Node.js version <+matrix.nodeVersion>" - apt-get update - apt-get install -y curl - curl -fsSL https://deb.nodesource.com/setup_<+matrix.nodeVersion>.x | bash - - apt-get install -y nodejs + uses: dcodeIO/setup-node-nvm@master + with: + node-version: 20 timeout: 10m - step: type: Run From a03b37ba947d0fad4c3dc4d2d28e0524c1dbc0ca Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:54:18 +0000 Subject: [PATCH 19/26] Update pipeline test --- .harness/test.yml | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/.harness/test.yml b/.harness/test.yml index e791bc8..e084b5d 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -8,10 +8,7 @@ pipeline: codebase: connectorRef: splitio repoName: split-openfeature-provider-web-js - build: - type: branch - spec: - branch: <+input> + build: <+input> stages: - stage: name: CI Stage @@ -23,6 +20,8 @@ pipeline: type: Cloud spec: size: small + imageSpec: + imageName: ubuntu-latest platform: os: Linux arch: Amd64 @@ -33,46 +32,33 @@ pipeline: name: Setup NodeJS identifier: setup_nodejs spec: - connectorRef: account.harnessImage - image: ubuntu:24.04 - shell: Bash uses: dcodeIO/setup-node-nvm@master with: node-version: 20 - timeout: 10m - step: type: Run name: Install Dependencies identifier: install_dependencies spec: shell: Bash - command: | - # Set up npm cache directory - mkdir -p ~/.npm - - # Run npm ci with cache enabled - npm ci + command: mkdir -p ~/.npm npm ci envVariables: npm_config_cache: ~/.npm - timeout: 10m - step: type: Run name: Run Checks identifier: run_checks spec: - shell: Bash - command: | - npm run check - timeout: 10m + shell: Sh + command: npm run check - step: identifier: run_tests name: Run Tests type: Test - timeout: 10m spec: command: | npm run test - shell: Bash + shell: Sh connectorRef: account.harnessImage image: ubuntu:24.04 reports: From cc00ae2a8849e4b95dc485cbdf306ca4b6d06d57 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 19:57:12 +0000 Subject: [PATCH 20/26] Update pipeline test --- .harness/test.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.harness/test.yml b/.harness/test.yml index e084b5d..eee9ed9 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -41,9 +41,7 @@ pipeline: identifier: install_dependencies spec: shell: Bash - command: mkdir -p ~/.npm npm ci - envVariables: - npm_config_cache: ~/.npm + command: npm ci - step: type: Run name: Run Checks @@ -56,8 +54,7 @@ pipeline: name: Run Tests type: Test spec: - command: | - npm run test + command: npm run test shell: Sh connectorRef: account.harnessImage image: ubuntu:24.04 From 4240ee614c39ea848985314712727fbc95b99151 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 20:00:01 +0000 Subject: [PATCH 21/26] Update pipeline test --- .harness/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/test.yml b/.harness/test.yml index eee9ed9..a37a36f 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -28,7 +28,7 @@ pipeline: execution: steps: - step: - type: Run + type: Action name: Setup NodeJS identifier: setup_nodejs spec: From 455ad43cb3a0e2364faa4dc4e1789baf7c99743d Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 20:02:08 +0000 Subject: [PATCH 22/26] Update pipeline test --- .harness/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.harness/test.yml b/.harness/test.yml index a37a36f..48125d4 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -56,8 +56,6 @@ pipeline: spec: command: npm run test shell: Sh - connectorRef: account.harnessImage - image: ubuntu:24.04 reports: type: JUnit spec: From 29babac6af2cd23ad17e09846317ddf4123ecc93 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 17:07:22 -0300 Subject: [PATCH 23/26] Delete .github/workflows directory --- .github/workflows/test.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 3eac060..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: test -on: - pull_request: - branches: - - '*' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true - -jobs: - build: - name: Run tests - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v5 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 'lts/*' - cache: 'npm' - - - name: npm ci - run: npm ci - - - name: npm check - run: npm run check - - - name: npm test - run: npm run test From 1ca1ead47ef5955158f57520f647ba8fa07f9d23 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 20:09:22 +0000 Subject: [PATCH 24/26] Create inputset DefaultInput --- .../pipelines/test/input_sets/DefaultInput.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/test/input_sets/DefaultInput.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/test/input_sets/DefaultInput.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/test/input_sets/DefaultInput.yaml new file mode 100644 index 0000000..7def06a --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/test/input_sets/DefaultInput.yaml @@ -0,0 +1,14 @@ +inputSet: + name: DefaultInput + identifier: DefaultInput + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: test + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+trigger.prNumber> From 6a373a041c9d165b01aecea73924aef636656eff Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 17:13:25 -0300 Subject: [PATCH 25/26] Update DefaultInput.yaml --- .../Harness_Split/pipelines/test/input_sets/DefaultInput.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/test/input_sets/DefaultInput.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/test/input_sets/DefaultInput.yaml index 7def06a..8caea2f 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/test/input_sets/DefaultInput.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/test/input_sets/DefaultInput.yaml @@ -11,4 +11,4 @@ inputSet: build: type: PR spec: - number: <+trigger.prNumber> + number: <+trigger.branch> From b3507a94234c7aea136ad73489486a03fab93ce4 Mon Sep 17 00:00:00 2001 From: Martin Cardozo Date: Fri, 6 Feb 2026 20:53:40 +0000 Subject: [PATCH 26/26] Update pipeline FME-openFeature-JS-web --- .harness/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.harness/test.yml b/.harness/test.yml index 48125d4..424cd92 100644 --- a/.harness/test.yml +++ b/.harness/test.yml @@ -1,5 +1,5 @@ pipeline: - name: test + name: FME-openFeature-JS-web identifier: test projectIdentifier: Harness_Split orgIdentifier: PROD @@ -65,3 +65,4 @@ pipeline: envVariables: NODE_ENV: test CI: "true" + tags: {}