@useblu/ocean-react
Advanced tools
Comparing version 0.2.7-next.0 to 1.0.0
@@ -53,3 +53,3 @@ import React, { useContext, useMemo, useRef, useEffect, useCallback, useLayoutEffect, useState } from 'react'; | ||
/*! | ||
Copyright (c) 2017 Jed Watson. | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
@@ -66,3 +66,3 @@ http://jedwatson.github.io/classnames | ||
function classNames () { | ||
function classNames() { | ||
var classes = []; | ||
@@ -78,12 +78,18 @@ | ||
classes.push(arg); | ||
} else if (Array.isArray(arg) && arg.length) { | ||
var inner = classNames.apply(null, arg); | ||
if (inner) { | ||
classes.push(inner); | ||
} else if (Array.isArray(arg)) { | ||
if (arg.length) { | ||
var inner = classNames.apply(null, arg); | ||
if (inner) { | ||
classes.push(inner); | ||
} | ||
} | ||
} else if (argType === 'object') { | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes.push(key); | ||
if (arg.toString === Object.prototype.toString) { | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes.push(key); | ||
} | ||
} | ||
} else { | ||
classes.push(arg.toString()); | ||
} | ||
@@ -281,23 +287,9 @@ } | ||
/** | ||
* Copyright (c) 2014-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
function canUseDOM() { | ||
return !!(typeof window !== "undefined" && window.document && window.document.createElement); | ||
} | ||
/** | ||
* Similar to invariant but only logs a warning if the condition is not met. | ||
* This can be used to log issues in development environments in critical | ||
* paths. Removing the logging code for production environments will keep the | ||
* same logic and follow the same code paths. | ||
*/ | ||
process.env.NODE_ENV !== 'production'; | ||
/* eslint-disable no-restricted-globals, eqeqeq */ | ||
/** | ||
* React currently throws a warning when using useLayoutEffect on the server. | ||
* To get around it, we can conditionally useEffect on the server (no-op) and | ||
* React currently throws a warning when using useLayoutEffect on the server. To | ||
* get around it, we can conditionally useEffect on the server (no-op) and | ||
* useLayoutEffect in the browser. We occasionally need useLayoutEffect to | ||
@@ -318,6 +310,2 @@ * ensure we don't get a render flash for certain operations, but we may also | ||
* | ||
* TODO: We are calling useLayoutEffect in a couple of places that will likely | ||
* cause some issues for SSR users, whether the warning shows or not. Audit and | ||
* fix these. | ||
* | ||
* https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85 | ||
@@ -329,25 +317,5 @@ * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js | ||
*/ | ||
var useIsomorphicLayoutEffect = /*#__PURE__*/canUseDOM() ? useLayoutEffect : useEffect; | ||
if (process.env.NODE_ENV !== "production") { | ||
// In CJS files, process.env.NODE_ENV is stripped from our build, but we need | ||
// it to prevent style checks from clogging up user logs while testing. | ||
// This is a workaround until we can tweak the build a bit to accommodate. | ||
var _ref = typeof process !== "undefined" ? process : { | ||
env: { | ||
NODE_ENV: "development" | ||
} | ||
}; | ||
_ref.env; | ||
} | ||
function canUseDOM() { | ||
return !!(typeof window !== "undefined" && window.document && window.document.createElement); | ||
} | ||
if (process.env.NODE_ENV !== "production") ; | ||
if (process.env.NODE_ENV !== "production") ; | ||
if (process.env.NODE_ENV !== "production") ; | ||
/* | ||
@@ -354,0 +322,0 @@ * Welcome to @reach/auto-id! |
74
index.js
@@ -61,3 +61,3 @@ 'use strict'; | ||
/*! | ||
Copyright (c) 2017 Jed Watson. | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
@@ -74,3 +74,3 @@ http://jedwatson.github.io/classnames | ||
function classNames () { | ||
function classNames() { | ||
var classes = []; | ||
@@ -86,12 +86,18 @@ | ||
classes.push(arg); | ||
} else if (Array.isArray(arg) && arg.length) { | ||
var inner = classNames.apply(null, arg); | ||
if (inner) { | ||
classes.push(inner); | ||
} else if (Array.isArray(arg)) { | ||
if (arg.length) { | ||
var inner = classNames.apply(null, arg); | ||
if (inner) { | ||
classes.push(inner); | ||
} | ||
} | ||
} else if (argType === 'object') { | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes.push(key); | ||
if (arg.toString === Object.prototype.toString) { | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes.push(key); | ||
} | ||
} | ||
} else { | ||
classes.push(arg.toString()); | ||
} | ||
@@ -289,23 +295,9 @@ } | ||
/** | ||
* Copyright (c) 2014-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
function canUseDOM() { | ||
return !!(typeof window !== "undefined" && window.document && window.document.createElement); | ||
} | ||
/** | ||
* Similar to invariant but only logs a warning if the condition is not met. | ||
* This can be used to log issues in development environments in critical | ||
* paths. Removing the logging code for production environments will keep the | ||
* same logic and follow the same code paths. | ||
*/ | ||
process.env.NODE_ENV !== 'production'; | ||
/* eslint-disable no-restricted-globals, eqeqeq */ | ||
/** | ||
* React currently throws a warning when using useLayoutEffect on the server. | ||
* To get around it, we can conditionally useEffect on the server (no-op) and | ||
* React currently throws a warning when using useLayoutEffect on the server. To | ||
* get around it, we can conditionally useEffect on the server (no-op) and | ||
* useLayoutEffect in the browser. We occasionally need useLayoutEffect to | ||
@@ -326,6 +318,2 @@ * ensure we don't get a render flash for certain operations, but we may also | ||
* | ||
* TODO: We are calling useLayoutEffect in a couple of places that will likely | ||
* cause some issues for SSR users, whether the warning shows or not. Audit and | ||
* fix these. | ||
* | ||
* https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85 | ||
@@ -337,25 +325,5 @@ * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js | ||
*/ | ||
var useIsomorphicLayoutEffect = /*#__PURE__*/canUseDOM() ? React.useLayoutEffect : React.useEffect; | ||
if (process.env.NODE_ENV !== "production") { | ||
// In CJS files, process.env.NODE_ENV is stripped from our build, but we need | ||
// it to prevent style checks from clogging up user logs while testing. | ||
// This is a workaround until we can tweak the build a bit to accommodate. | ||
var _ref = typeof process !== "undefined" ? process : { | ||
env: { | ||
NODE_ENV: "development" | ||
} | ||
}; | ||
_ref.env; | ||
} | ||
function canUseDOM() { | ||
return !!(typeof window !== "undefined" && window.document && window.document.createElement); | ||
} | ||
if (process.env.NODE_ENV !== "production") ; | ||
if (process.env.NODE_ENV !== "production") ; | ||
if (process.env.NODE_ENV !== "production") ; | ||
/* | ||
@@ -362,0 +330,0 @@ * Welcome to @reach/auto-id! |
{ | ||
"name": "@useblu/ocean-react", | ||
"version": "0.2.7-next.0", | ||
"version": "1.0.0", | ||
"private": false, | ||
@@ -24,7 +24,7 @@ "description": "React components that implement Ocean's Design System.", | ||
"dependencies": { | ||
"@reach/auto-id": "0.13.2", | ||
"classnames": "2.2.6" | ||
"@reach/auto-id": "0.15.0", | ||
"classnames": "2.3.1" | ||
}, | ||
"peerDependencies": { | ||
"@useblu/ocean-core": "0.2.6", | ||
"@useblu/ocean-core": "0.2.7", | ||
"react": ">=16.8.0", | ||
@@ -31,0 +31,0 @@ "react-dom": ">=16.8.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
78
1
1
42
0
0
125
4
5
1
28
259205
1357
+ Added@reach/auto-id@0.15.0(transitive)
+ Added@reach/utils@0.15.0(transitive)
+ Addedclassnames@2.3.1(transitive)
+ Addedtiny-warning@1.0.3(transitive)
- Removed@reach/auto-id@0.13.2(transitive)
- Removed@reach/utils@0.13.2(transitive)
- Removed@types/warning@3.0.3(transitive)
- Removedclassnames@2.2.6(transitive)
- Removedwarning@4.0.3(transitive)
Updated@reach/auto-id@0.15.0
Updatedclassnames@2.3.1