@featurevisor/sdk
Advanced tools
Comparing version 0.14.0 to 0.14.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.14.1](https://github.com/fahad19/featurevisor/compare/v0.14.0...v0.14.1) (2023-04-22) | ||
### Bug Fixes | ||
* do not require variation type in Feature's YAML ([#57](https://github.com/fahad19/featurevisor/issues/57)) ([2e7c0cf](https://github.com/fahad19/featurevisor/commit/2e7c0cfb441a60beffa14dae17152257d97862b0)) | ||
# [0.14.0](https://github.com/fahad19/featurevisor/compare/v0.13.1...v0.14.0) (2023-04-21) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@featurevisor/sdk", | ||
"version": "0.14.0", | ||
"version": "0.14.1", | ||
"description": "Featurevisor SDK for Node.js and the browser", | ||
@@ -45,7 +45,7 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@featurevisor/types": "^0.14.0", | ||
"@featurevisor/types": "^0.14.1", | ||
"compare-versions": "^6.0.0-rc.1", | ||
"murmurhash": "^2.0.1" | ||
}, | ||
"gitHead": "eb0599df92747f40e6ece174e4de37ac4c098c4c" | ||
"gitHead": "3ddcffdba992a36b564cf4471f0e4982cfd9fc83" | ||
} |
@@ -5,8 +5,8 @@ import { DatafileContent } from "@featurevisor/types"; | ||
describe("sdk: createInstance", function() { | ||
it("should be a function", function() { | ||
describe("sdk: createInstance", function () { | ||
it("should be a function", function () { | ||
expect(typeof createInstance).toEqual("function"); | ||
}); | ||
it("should create instance with datafile content", function() { | ||
it("should create instance with datafile content", function () { | ||
const sdk = createInstance({ | ||
@@ -25,3 +25,3 @@ datafile: { | ||
it("should trigger onReady event once", function(done) { | ||
it("should trigger onReady event once", function (done) { | ||
let readyCount = 0; | ||
@@ -48,3 +48,3 @@ | ||
it("should intercept attributes", function() { | ||
it("should intercept attributes", function () { | ||
let intercepted = false; | ||
@@ -61,6 +61,3 @@ | ||
bucketBy: "userId", | ||
variations: [ | ||
{ type: "boolean", value: true }, | ||
{ type: "boolean", value: false }, | ||
], | ||
variations: [{ value: true }, { value: false }], | ||
traffic: [ | ||
@@ -82,3 +79,3 @@ { | ||
}, | ||
interceptAttributes: function(attributes) { | ||
interceptAttributes: function (attributes) { | ||
intercepted = true; | ||
@@ -100,3 +97,3 @@ | ||
it("should activate feature", function() { | ||
it("should activate feature", function () { | ||
let activated = false; | ||
@@ -113,6 +110,3 @@ | ||
bucketBy: "userId", | ||
variations: [ | ||
{ type: "boolean", value: true }, | ||
{ type: "boolean", value: false }, | ||
], | ||
variations: [{ value: true }, { value: false }], | ||
traffic: [ | ||
@@ -134,3 +128,3 @@ { | ||
}, | ||
onActivation: function(featureKey) { | ||
onActivation: function (featureKey) { | ||
activated = true; | ||
@@ -155,3 +149,3 @@ }, | ||
it("should refresh datafile", function(done) { | ||
it("should refresh datafile", function (done) { | ||
let revision = 1; | ||
@@ -170,6 +164,3 @@ let refreshed = false; | ||
bucketBy: "userId", | ||
variations: [ | ||
{ type: "boolean", value: true }, | ||
{ type: "boolean", value: false }, | ||
], | ||
variations: [{ value: true }, { value: false }], | ||
traffic: [ | ||
@@ -199,4 +190,4 @@ { | ||
datafileUrl: "http://localhost:3000/datafile.json", | ||
handleDatafileFetch: function(datafileUrl) { | ||
return new Promise(function(resolve, reject) { | ||
handleDatafileFetch: function (datafileUrl) { | ||
return new Promise(function (resolve, reject) { | ||
resolve(getDatafileContent()); | ||
@@ -216,3 +207,3 @@ }); | ||
setTimeout(function() { | ||
setTimeout(function () { | ||
expect(refreshed).toEqual(true); | ||
@@ -219,0 +210,0 @@ expect(updated).toEqual(true); |
Sorry, the diff of this file is not supported yet
268213
3455
Updated@featurevisor/types@^0.14.1