@fibery/correlation-id
Advanced tools
Comparing version 4.0.2 to 4.1.0
const cls = require(`cls-hooked`); | ||
const uuid = require(`uuid`); | ||
const {randomUUID} = require(`node:crypto`); | ||
@@ -20,3 +20,3 @@ function validateOptions(opts = {}) { | ||
function generateDefaultId() { | ||
return opts.generateDefaultId ? opts.generateDefaultId() : uuid.v4(); | ||
return opts.generateDefaultId ? opts.generateDefaultId() : randomUUID(); | ||
} | ||
@@ -23,0 +23,0 @@ |
{ | ||
"name": "@fibery/correlation-id", | ||
"version": "4.0.2", | ||
"version": "4.1.0", | ||
"main": "index.js", | ||
@@ -26,5 +26,2 @@ "description": "Correlation id helper based on async hooks", | ||
}, | ||
"peerDependencies": { | ||
"uuid": ">= 7.0.0 < 9" | ||
}, | ||
"scripts": { | ||
@@ -34,15 +31,14 @@ "lint": "eslint --quiet ." | ||
"devDependencies": { | ||
"@vizydrop/eslint-config-vizydrop": "6.0.9", | ||
"eslint": "6.8.0", | ||
"eslint-config-airbnb": "18.1.0", | ||
"eslint-plugin-babel": "^5.3.0", | ||
"@vizydrop/eslint-config-vizydrop": "7.2.3", | ||
"eslint": "8.30.0", | ||
"eslint-config-airbnb": "19.0.4", | ||
"eslint-plugin-babel": "^5.3.1", | ||
"eslint-plugin-filenames": "1.3.2", | ||
"eslint-plugin-flowtype": "4.7.0", | ||
"eslint-plugin-import": "2.20.2", | ||
"eslint-plugin-flowtype": "8.0.3", | ||
"eslint-plugin-import": "2.26.0", | ||
"eslint-plugin-lodash-fp": "2.2.0-a1", | ||
"eslint-plugin-mocha": "6.3.0", | ||
"eslint-plugin-mocha": "10.1.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-promise": "4.2.1", | ||
"uuid": "^7.0.3" | ||
"eslint-plugin-promise": "6.1.1" | ||
} | ||
} |
@@ -59,3 +59,3 @@ # Correlation Id | ||
Custom settings can be passed as an object to `createCorrelationId` function. | ||
- `generateDefaultId` - function that should return new correlation id. By default `uuid` is used. | ||
- `generateDefaultId` - function that should return new correlation id. By default [`crypto.randomUUID`](https://nodejs.org/api/crypto.html#cryptorandomuuidoptions) is used. | ||
- `namespaceName` - namespace for cls hook. Default value is `correlation-id-namespace` | ||
@@ -62,0 +62,0 @@ - `httpHeaderParamName` - name of http header that contains correlation id value. Default value is `x-correlationid` |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1
11
11859
12
163
1