Socket
Socket
Sign inDemoInstall

bpk-react-utils

Package Overview
Dependencies
30
Maintainers
6
Versions
119
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.2 to 4.1.0

8

package.json
{
"name": "bpk-react-utils",
"version": "4.0.2",
"version": "4.1.0",
"description": "Utilities for Backpack's React components.",

@@ -15,3 +15,3 @@ "license": "Apache-2.0",

},
"gitHead": "9c09ca3bffc0b2dc422785cd4fe3953eb0041c3f",
"gitHead": "cc0aa986efd4d34136626a477283ed08b9291e20",
"dependencies": {

@@ -24,5 +24,5 @@ "object-assign": "^4.1.1",

"peerDependencies": {
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^16.3.0 || ^17.0.0",
"react-dom": "^16.3.0 || ^17.0.0"
}
}

@@ -57,3 +57,3 @@ /*

it('should not have programmatically-detectable accessibility issues', async () => {
const TestComponent = props => <div {...props} />;
const TestComponent = (props) => <div {...props} />;

@@ -60,0 +60,0 @@ const Component = withDefaultProps(TestComponent, {

@@ -21,11 +21,10 @@ /*

export default (styles: {} = {}) => (
...classNames: Array<?string | ?boolean | ?number | ?{}>
) =>
classNames.reduce((className, currentClass) => {
if (currentClass && typeof currentClass === 'string') {
const realName = styles[currentClass] || currentClass;
return className ? `${className} ${realName}` : realName;
}
return className;
}, '');
export default (styles: {} = {}) =>
(...classNames: Array<?string | ?boolean | ?number | ?{}>) =>
classNames.reduce((className, currentClass) => {
if (currentClass && typeof currentClass === 'string') {
const realName = styles[currentClass] || currentClass;
return className ? `${className} ${realName}` : realName;
}
return className;
}, '');

@@ -22,17 +22,20 @@ /*

// We disable eslint on the below line because it breaks the flow type definitions and the FlowIssue comment below
// We can remove this when we migrate this file to TypeScript.
// $FlowIssue[value-as-type] - PropType is imported as a type so is incorrectly reporting the PropType is not a valid type
const deprecated = (propType: PropType, alternativeSuggestion: string) => (
props: { [string]: any },
propName: string,
componentName: string,
...rest: [any]
) => {
if (props[propName] != null) {
const message = `Warning: "${propName}" property of "${componentName}" has been deprecated. ${alternativeSuggestion}`;
// eslint-disable-next-line no-console
console.warn(message);
}
return propType(props, propName, componentName, ...rest);
};
const deprecated = (propType: PropType, alternativeSuggestion: string) => // eslint-disable-line
(
props: { [string]: any },
propName: string,
componentName: string,
...rest: [any]
) => {
if (props[propName] != null) {
const message = `Warning: "${propName}" property of "${componentName}" has been deprecated. ${alternativeSuggestion}`;
// eslint-disable-next-line no-console
console.warn(message);
}
return propType(props, propName, componentName, ...rest);
};
export default deprecated;

@@ -21,18 +21,12 @@ /*

const isDeviceIphone = () => {
return /iPhone/i.test(
const isDeviceIphone = () =>
/iPhone/i.test(
typeof window !== 'undefined' ? window.navigator.platform : '',
);
};
const isDeviceIpad = () => {
return /iPad/i.test(
typeof window !== 'undefined' ? window.navigator.platform : '',
);
};
const isDeviceIpad = () =>
/iPad/i.test(typeof window !== 'undefined' ? window.navigator.platform : '');
const isDeviceIos = () => {
return isDeviceIphone() || isDeviceIpad();
};
const isDeviceIos = () => isDeviceIphone() || isDeviceIpad();
export { isDeviceIphone, isDeviceIpad, isDeviceIos };

@@ -38,6 +38,6 @@ /*

const TransitionInitialMount = ({
appearActiveClassName,
appearClassName,
appearActiveClassName,
children,
transitionTimeout,
children,
}: Props) => (

@@ -44,0 +44,0 @@ <CSSTransition

@@ -26,3 +26,3 @@ /*

const TestComponent = props => <div {...props} />;
const TestComponent = (props) => <div {...props} />;

@@ -29,0 +29,0 @@ describe('withDefaultProps', () => {

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc