diff --git a/package.json b/package.json index 1704638bd..3ddbed8a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reoverlay", - "version": "1.0.0", + "version": "1.0.2", "description": "The missing solution for managing modals in React.", "main": "lib/index.js", "keywords": [ @@ -25,7 +25,8 @@ "build": "cross-env NODE_ENV=production rollup -c" }, "dependencies": { - "shortid": "^2.2.15" + "nanoid": "^3.2.0", + "prop-types": "^15.7.2" }, "peerDependencies": { "react": ">=16.8.0", diff --git a/src/Reoverlay.js b/src/Reoverlay.js index 6fcd08a08..07ed8287f 100644 --- a/src/Reoverlay.js +++ b/src/Reoverlay.js @@ -1,4 +1,4 @@ -import shortid from 'shortid' +import { nanoid } from 'nanoid' import { VALIDATE, EVENT } from './constants' import { validate, eventManager, getLastElement } from './utils' @@ -40,7 +40,7 @@ const Reoverlay = { this.applyModal({ component: modal, props, - modalKey: shortid.generate(), + modalKey: nanoid(), type: EVENT.SHOW_MODAL, }) } diff --git a/yarn.lock b/yarn.lock index 868a77563..906e4f1c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5625,10 +5625,10 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== -nanoid@^2.1.0: - version "2.1.11" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" - integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== +nanoid@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c" + integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA== nanomatch@^1.2.9: version "1.2.13" @@ -7581,13 +7581,6 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shortid@^2.2.15: - version "2.2.15" - resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.15.tgz#2b902eaa93a69b11120373cd42a1f1fe4437c122" - integrity sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw== - dependencies: - nanoid "^2.1.0" - side-channel@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.2.tgz#df5d1abadb4e4bf4af1cd8852bf132d2f7876947"