Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ld-react-components

Package Overview
Dependencies
Maintainers
2
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ld-react-components - npm Package Compare versions

Comparing version 1.0.18 to 1.0.19

.eslintrc.json

22

CHANGELOG.md

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

# v1.0.19 (Wed Oct 02 2019)
#### 🐛 Bug Fix
- 18 Update CircleCI yaml to build storybook docs [#28](https://github.com/intuit/LD-React-Components/pull/28) (gary_grumbley@intuit.com [@ggrumbley](https://github.com/ggrumbley))
- Adding @ishubhamarora to contributor list [#29](https://github.com/intuit/LD-React-Components/pull/29) (shubham_arora@intuit.com)
- updating ESLinting rules and fixing the linting issues [#27](https://github.com/intuit/LD-React-Components/pull/27) (shubham_arora@intuit.com)
- 18 Add Storybook dependencies [#26](https://github.com/intuit/LD-React-Components/pull/26) (gary_grumbley@intuit.com [@ggrumbley](https://github.com/ggrumbley))
#### ⚠️ Pushed to master
- corrected lockfile ([@poorpaddy](https://github.com/poorpaddy))
#### Authors: 4
- Shubham Arora ([@ishubhamarora](https://github.com/ishubhamarora))
- poorpaddy ([@poorpaddy](https://github.com/poorpaddy))
- Gary Grumbley ([@ggrumbley](https://github.com/ggrumbley))
- gary (gary_grumbley@intuit.com)
---
# v1.0.18 (Tue Oct 01 2019)

@@ -2,0 +24,0 @@

2

dist/FeatureCase/index.js

@@ -17,3 +17,3 @@ "use strict";

var children = props.children;
return _react["default"].Children.map(children, function (child, i) {
return _react["default"].Children.map(children, function (child) {
return child;

@@ -20,0 +20,0 @@ });

@@ -17,3 +17,3 @@ "use strict";

var children = props.children;
return _react["default"].Children.map(children, function (child, i) {
return _react["default"].Children.map(children, function (child) {
return child;

@@ -20,0 +20,0 @@ });

@@ -17,3 +17,3 @@ "use strict";

var children = props.children;
return _react["default"].Children.map(children, function (child, i) {
return _react["default"].Children.map(children, function (child) {
return child;

@@ -20,0 +20,0 @@ });

@@ -20,3 +20,4 @@ "use strict";

flagKey = props.flagKey,
appFlags = props.appFlags; // isChildPluginComponent is true if the child is one of [ FeatureFlag, FeatureTrue, FeatureSwitch, FeatureFalse, FeatureDefault]
appFlags = props.appFlags; // isChildPluginComponent is true if the child is one of
// [ FeatureFlag, FeatureTrue, FeatureSwitch, FeatureFalse, FeatureDefault]

@@ -33,2 +34,3 @@ var isChildPluginComponent = false; // isNonPluginComponent is true if the child is not a component from this plugin.

// telling the developer to not use NonPlugin components under FeatureFlag.
// eslint-disable-next-line no-console
console.warn('Dont Use <FeatureTrue /> among other elements/components under <FeatureFlag /> only use it with <FeatureFalse />, No mix allowed');

@@ -48,2 +50,3 @@ return;

if (isNonPluginComponent) {
// eslint-disable-next-line no-console
console.warn('Dont Use <FeatureFalse /> among other elements/components under <FeatureFlag /> only use it with <FeatureTrue />, No mix allowed');

@@ -63,2 +66,3 @@ return;

if (isNonPluginComponent) {
// eslint-disable-next-line no-console
console.warn('Dont Use <FeatureSwitch /> unless its the immediate children of <FeatureFlag />, No mix allowed');

@@ -86,3 +90,3 @@ return;

return _react["default"].Children.map(childArray, function (child, i) {
return _react["default"].Children.map(childArray, function (child) {
return child;

@@ -94,2 +98,3 @@ });

flagKey: _propTypes["default"].string.isRequired,
// eslint-disable-next-line react/forbid-prop-types
appFlags: _propTypes["default"].object.isRequired

@@ -96,0 +101,0 @@ };

@@ -41,3 +41,3 @@ "use strict";

return _react["default"].Children.map(childArray, function (child, i) {
return _react["default"].Children.map(childArray, function (child) {
return child;

@@ -44,0 +44,0 @@ });

@@ -17,3 +17,3 @@ "use strict";

var children = props.children;
return _react["default"].Children.map(children, function (child, i) {
return _react["default"].Children.map(children, function (child) {
return child;

@@ -20,0 +20,0 @@ });

@@ -38,4 +38,6 @@ "use strict";

if (!options) {
// eslint-disable-next-line no-console
return console.log('Endpoint Options is not provided');
} // returns the library and it's methods to use outside of the module
// eslint-disable-next-line no-param-reassign

@@ -47,5 +49,5 @@

/**
* Initializes the launch darkly client and returns a promise to ensure that
* methods won't be called until the client emits the 'ready' event
*/
* Initializes the launch darkly client and returns a promise to ensure that
* methods won't be called until the client emits the 'ready' event
*/

@@ -64,8 +66,8 @@ }, {

/**
* Create the LD client
*
* @param user user object
* @param envClientKey SDK key for the env
* @returns {*}
*/
* Create the LD client
*
* @param user user object
* @param envClientKey SDK key for the env
* @returns {*}
*/

@@ -89,2 +91,5 @@ }, {

if (user !== undefined) {
/* eslint-disable no-restricted-syntax, guard-for-in */
// TO-DO: check if inherited properties of obj 'user' has to iterated or not
// and remove these eslint-disable as per that.
for (var key in user) {

@@ -98,2 +103,3 @@ var userKey = key;

if (key === 'authId') {
// eslint-disable-next-line no-param-reassign
user[key] = _hash["default"].sha256().update(user[key]).digest('hex');

@@ -104,2 +110,4 @@ }

}
/* eslint-enable */
}

@@ -110,9 +118,12 @@

/**
* LD client posts events. This function handles them. First set a timeout for the ready event. If it takes too long time out.
* Log updates when they happen
*
* @param timeout LD client timeout
* @param ldClient initialized client
* @param logUpdates Set to true if you want to see the update events
*/
* LD client posts events. This function handles them.
* First set a timeout for the ready event.
* If it takes too long time out.
* Log updates when they happen
*
* @param timeout LD client timeout
* @param ldClient initialized client
* @param logUpdates Set to true if you want to see the update events
*/
// eslint-disable-next-line no-unused-vars

@@ -133,5 +144,5 @@ }, {

return reject(error);
} else {
throw error;
}
throw error;
}

@@ -145,5 +156,5 @@

return reject(error);
} else {
throw error;
}
throw error;
}, timeout);

@@ -153,5 +164,5 @@ ldClient.on('error', function (error) {

return reject(error);
} else {
throw error;
}
throw error;
});

@@ -164,12 +175,15 @@ ldClient.on('ready', function () {

}
return undefined;
});
return undefined;
}
/**
* Grab the feature flag value. If the LD client does not exist return the default
* value.
*
* @param featureId LD feature flag id
* @param defaultValue boolean value that is the default (this is used we can get the feature flag from LD)
* @returns {object} Value of feature flag. Flags can be boolean or enums, depending on their configuration
*/
* Grab the feature flag value. If the LD client does not exist return the default
* value.
*
* @param featureId LD feature flag id
* @param defaultValue boolean value that is the default (this is used we can get the feature flag from LD)
* @returns {object} Value of feature flag. Flags can be boolean or enums, depending on their configuration
*/

@@ -185,4 +199,5 @@ }, {

return defaultValue;
}
} // eslint-disable-next-line no-console
console.log('featureId ', featureId);

@@ -197,9 +212,10 @@

/**
* Grab the feature flag value resolved as a Promise If the LD client does not exist return the default
* value.
*
* @param featureFlag LD feature flag id
* @param defaultValue boolean value (this is used we can get the feature flag from LD)
* @returns {object} Value of feature flag as a promise. Flags can be boolean or enums, depending on their configuration
*/
* Grab the feature flag value resolved as a Promise If the LD client does not exist return the default
* value.
*
* @param featureFlag LD feature flag id
* @param defaultValue boolean value (this is used we can get the feature flag from LD)
* @returns {object} Value of feature flag as a promise.
* Flags can be boolean or enums, depending on their configuration
*/

@@ -211,3 +227,3 @@ }, {

return new Promise(function (resolve, reject) {
return new Promise(function (resolve) {
resolve(_this3.getFeatureFlag(featureFlag, defaultValue));

@@ -217,7 +233,7 @@ });

/**
* Grab All feature flags for the user. If the LD client does not exist, return the default
* value.
*
* @returns {object} Value of feature flags. Flags can be boolean or enums, depending on their configuration
*/
* Grab All feature flags for the user. If the LD client does not exist, return the default
* value.
*
* @returns {object} Value of feature flags. Flags can be boolean or enums, depending on their configuration
*/

@@ -224,0 +240,0 @@ }, {

{
"name": "ld-react-components",
"version": "1.0.18",
"version": "1.0.19",
"description": "Semantic component helpers to support LaunchDarkly in your react app.",

@@ -18,2 +18,3 @@ "main": "dist/index.js",

"scripts": {
"start": "start-storybook -p 6010",
"prepare": "yarn build",

@@ -27,5 +28,6 @@ "clean": "rimraf ./dist ./coverage",

"docs:build": "NODE_ENV=production webpack --config src/docs/webpack.config.live.babel.js",
"docs:publish": "push-dir --cleanup --dir=src/docs/dist --branch=gh-pages --message='Update Docs [skip ci]'",
"docs:publish": "push-dir --cleanup --dir=storybook-static --branch=gh-pages --message='Update Docs [skip ci]'",
"dev": "yarn docs",
"release": "auto shipit"
"release": "auto shipit",
"build:storybook": "build-storybook"
},

@@ -46,2 +48,9 @@ "keywords": [

"@babel/preset-react": "^7.0.0",
"@storybook/addon-a11y": "^5.2.1",
"@storybook/addon-actions": "^5.2.1",
"@storybook/addon-docs": "^5.3.0-alpha.6",
"@storybook/addon-links": "^5.2.1",
"@storybook/addon-notes": "^5.2.1",
"@storybook/addons": "^5.2.1",
"@storybook/react": "^5.2.1",
"all-contributors-cli": "^6.9.1",

@@ -57,8 +66,12 @@ "auto": "^7.6.2",

"enzyme-adapter-react-16": "^1.14.0",
"eslint": "~6.5.1",
"eslint": "^6.5.1",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.3.0",
"eslint-config-standard": "~14.1.0",
"eslint-plugin-import": "~2.18.2",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-node": "~10.0.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "~4.2.1",
"eslint-plugin-react": "~7.15.0",
"eslint-plugin-react": "^7.15.1",
"eslint-plugin-standard": "~4.0.1",

@@ -73,6 +86,6 @@ "expect": "^24.9.0",

"nyc": "^14.1.1",
"prettier": "^1.18.2",
"push-dir": "^0.4.1",
"react": "^16.0.0",
"react": "^16.10.1",
"react-dom": "^16.3.2",
"react-hot-loader": "^4.12.14",
"react-test-renderer": "^16.10.1",

@@ -88,3 +101,4 @@ "sinon": "^7.5.0",

"ldclient-js": "^2.10.2",
"prop-types": "^15.7.2"
"prop-types": "^15.7.2",
"react-hot-loader": "^4.12.14"
},

@@ -91,0 +105,0 @@ "peerDependencies": {

@@ -276,2 +276,3 @@ <div align="center">

<td align="center"><a href="https://github.com/Buranch"><img src="https://avatars2.githubusercontent.com/u/17932362?v=4" width="100px;" alt="Buranch"/><br /><sub><b>Buranch</b></sub></a><br /><a href="https://github.com/intuit/LD-React-Components/commits?author=Buranch" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ishubhamarora"><img src="https://avatars2.githubusercontent.com/u/55948973?v=4" width="100px;" alt="Shubham Arora"/><br /><sub><b>Shubham Arora</b></sub></a><br /><a href="https://github.com/intuit/LD-React-Components/commits?author=ishubhamarora" title="Code">💻</a></td>
</tr>

@@ -278,0 +279,0 @@ </table>

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