Comparing version 2.2.16 to 2.2.17
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 2.2.17 | ||
* Fixed CVE warning by moving to Nano ID 3. | ||
## 2.2.16 | ||
@@ -5,0 +8,0 @@ * Add deprecation notice to project readme (by Russell Dunphy). |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var random = require('./random/random-byte'); | ||
var format = require('nanoid/format'); | ||
var customRandom = require('nanoid').customRandom; | ||
@@ -15,3 +15,3 @@ function generate(number) { | ||
while (!done) { | ||
str = str + format(random, alphabet.get(), 1); | ||
str = str + customRandom(alphabet.get(), 1, random)(); | ||
done = number < (Math.pow(16, loopCounter + 1 ) ); | ||
@@ -18,0 +18,0 @@ loopCounter++; |
@@ -1,1 +0,2 @@ | ||
module.exports = require('nanoid/random'); | ||
var random = require('nanoid').random; | ||
module.exports = random; |
{ | ||
"name": "shortid", | ||
"version": "2.2.16", | ||
"version": "2.2.17", | ||
"description": "Amazingly short non-sequential url-friendly unique id generator.", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "grunt build", | ||
"test": "grunt test && size-limit" | ||
}, | ||
"keywords": [ | ||
@@ -23,6 +27,25 @@ "short", | ||
}, | ||
"devDependencies": { | ||
"@size-limit/preset-small-lib": "^2.1.3", | ||
"chai": "^4.2.0", | ||
"clean-publish": "^1.1.8", | ||
"envify": "^4.1.0", | ||
"grunt": "^1.0.3", | ||
"grunt-browserify": "^5.3.0", | ||
"grunt-cli": "^1.3.2", | ||
"grunt-contrib-concat": "^1.0.1", | ||
"grunt-contrib-jshint": "^1.1.0", | ||
"grunt-contrib-uglify": "^3.4.0", | ||
"grunt-mocha-test": "^0.13.3", | ||
"grunt-notify": "^0.4.1", | ||
"grunt-open": "^0.2.3", | ||
"grunt-release": "^0.14.0", | ||
"load-grunt-tasks": "^4.0.0", | ||
"mocha": "^5.2.0", | ||
"time-grunt": "^1.2.1" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"nanoid": "^2.1.0" | ||
"nanoid": "^3.3.8" | ||
} | ||
} |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
21746
252
0
17
+ Addednanoid@3.3.8(transitive)
- Removednanoid@2.1.11(transitive)
Updatednanoid@^3.3.8