Socket
Socket
Sign inDemoInstall

@fibery/correlation-id

Package Overview
Dependencies
1
Maintainers
10
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.2 to 4.1.0

4

lib/correlator.js
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`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc