Skip to content

chore: remove shortid, add nanoid#212

Open
nkgardose wants to merge 1 commit intoTimboKZ:2.xfrom
nkgardose:chore/update-deps
Open

chore: remove shortid, add nanoid#212
nkgardose wants to merge 1 commit intoTimboKZ:2.xfrom
nkgardose:chore/update-deps

Conversation

@nkgardose
Copy link

Fixes #211

@nkgardose
Copy link
Author

nkgardose commented Jan 2, 2025

@TimboKZ Hey, shortid is deprecated and is dependent on an older version of nanoid which causes a dependabot alert due to security issues. Just FYI

Warning

When nanoid is called with a fractional value, there were a number of undesirable effects:

  1. in browser and non-secure, the code infinite loops on while (size--)
  2. in node, the value of poolOffset becomes fractional, causing calls to nanoid to return zeroes until the pool is next filled
  3. if the first call in node is a fractional argument, the initial buffer allocation fails with an error

Version 3.3.8 and 5.0.9 are fixed.

Let me know if these changes are good for you. Feel free to update, approve, or merge as you wish. Thanks!

@nkgardose
Copy link
Author

@TimboKZ Would highly appreciate it if you can check this out. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependencies deprecated

1 participant