New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

unleash-client

Package Overview
Dependencies
Maintainers
4
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unleash-client - npm Package Compare versions

Comparing version 3.3.1 to 3.3.2

17

CHANGELOG.md
# Changelog
## 3.3.2
- feat: add events for changed and unchanged repository
- fix: upgrade @types/node to verison 12.12.25
- fix: upgrade typescript to version 3.7.5
- fix: upgrade husky to version 4.2.1
- fix: upgrade sinon to version 8.1.1
- fix: upgrade prettier to verseion 1.19.1
- fix: upgrade nock to version 11.7.2
- fix: upgrade dependencies
- fix: remove package-lock.json
- fix: upgrade sinon to version 8.1.1
- fix: upgrade prettier to verseion 1.19.1
- fix: upgrade nock to version 11.7.2
- fix: upgrade dependencies
- fix: remove package-lock.json
## 3.3.1

@@ -4,0 +21,0 @@

1

lib/client.d.ts

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { EventEmitter } from 'events';

@@ -2,0 +3,0 @@ import { Strategy, StrategyTransportInterface } from './strategy';

2

lib/details.json

@@ -1,1 +0,1 @@

{ "name": "unleash-client-node", "version": "3.3.1", "sdkVersion": "unleash-client-node:3.3.1" }
{ "name": "unleash-client-node", "version": "3.3.2", "sdkVersion": "unleash-client-node:3.3.2" }

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { EventEmitter } from 'events';

@@ -2,0 +3,0 @@ import { Data } from './request';

@@ -16,6 +16,7 @@ "use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -22,0 +23,0 @@ });

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { EventEmitter } from 'events';

@@ -2,0 +3,0 @@ import { Storage } from './storage';

@@ -16,6 +16,7 @@ "use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -136,2 +137,3 @@ });

// No new data
_this.emit('unchanged');
return;

@@ -153,3 +155,3 @@ }

: res.headers.etag;
_this.emit('data');
_this.emit('changed', _this.storage.getAll());
}

@@ -156,0 +158,0 @@ catch (err) {

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { EventEmitter } from 'events';

@@ -2,0 +3,0 @@ export interface StorageOptions {

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { RepositoryInterface } from './repository';

@@ -2,0 +3,0 @@ import { Context } from './context';

@@ -88,2 +88,8 @@ "use strict";

});
_this.repository.on('unchanged', function () {
_this.emit('unchanged');
});
_this.repository.on('changed', function (data) {
_this.emit('changed', data);
});
_this.metrics = new metrics_1.default({

@@ -90,0 +96,0 @@ disableMetrics: disableMetrics,

{
"name": "unleash-client",
"version": "3.3.1",
"version": "3.3.2",
"description": "Unleash Client for Node",

@@ -48,19 +48,19 @@ "license": "Apache-2.0",

"@types/nock": "^11.1.0",
"@types/node": "^12.0.2",
"@types/request": "^2.0.8",
"@types/node": "^12.12.25",
"@types/request": "^2.48.4",
"@unleash/client-specification": "^3.3.0",
"ava": "^2.2.0",
"coveralls": "^3.0.3",
"cross-env": "^6.0.0",
"coveralls": "^3.0.3",
"eslint": "^6.1.0",
"eslint-config-finn": "^3.0.0",
"eslint-config-finn-prettier": "^3.0.0",
"husky": "^3.0.1",
"husky": "^4.2.1",
"lint-staged": "^9.2.1",
"mkdirp": "^0.5.1",
"nock": "^11.1.0",
"nyc": "^14.1.1",
"nyc": "^15.0.0",
"prettier": "^1.17.1",
"typescript": "^3.2.2",
"sinon": "^7.3.2"
"sinon": "^8.1.1",
"typescript": "^3.7.5"
},

@@ -67,0 +67,0 @@ "nyc": {

@@ -1,3 +0,5 @@

# unleash-client-node
# Unleash Client SDK for Node.js
![npm](https://img.shields.io/npm/v/unleash-client)
![npm](https://img.shields.io/npm/dm/unleash-client)
[![Greenkeeper badge](https://badges.greenkeeper.io/Unleash/unleash-client-node.svg)](https://greenkeeper.io/)

@@ -8,7 +10,6 @@ [![Build Status](https://travis-ci.org/Unleash/unleash-client-node.svg?branch=master)](https://travis-ci.org/Unleash/unleash-client-node)

This is the node client for Unleash. Read more about the
[Unleash project](https://github.com/finn-no/unleash)
Unleash Client SDK for Node.js. It is compatible with the
[Unlesah-hosted.com SaaS offering](https://www.unleash-hosted.com/) and
[Unleash Open-Source](https://github.com/finn-no/unleash).
**Version 3.x of the client requires `unleash-server` >= v3.x**
## Getting started

@@ -175,10 +176,13 @@

| event | payload | description |
| ---------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
| ready | - | is emitted once the fs-cache is ready. if no cache file exists it will still be emitted. |
| registered | - | is emitted after the app has been registered at the api server |
| sent | `object` data | key/value pair of delivered metrics |
| count | `string` name, `boolean` enabled | is emitted when a feature is evaluated |
| warn | `string` msg | is emitted on a warning |
| error | `Error` err | is emitted on a error |
| event | payload | description |
| ---------- | -------------------------------- | ------------------------------------------------------------------------------------------- |
| ready | - | is emitted once the fs-cache is ready. if no cache file exists it will still be emitted. |
| registered | - | is emitted after the app has been registered at the api server |
| sent | `object` data | key/value pair of delivered metrics |
| count | `string` name, `boolean` enabled | is emitted when a feature is evaluated |
| warn | `string` msg | is emitted on a warning |
| error | `Error` err | is emitted on a error |
| unchanged | - | is emitted each time the client gets new toggle state from server, but nothing has changed |
| changed | `object` data | is emitted each time the client gets new toggle state from server and changes has been made |
| |

@@ -185,0 +189,0 @@ Example usage:

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc