You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@ladjs/shared-config

Package Overview
Dependencies
Maintainers
5
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ladjs/shared-config - npm Package Compare versions

Comparing version
6.0.2
to
7.0.0
+25
-1
index.js

@@ -10,2 +10,3 @@ const fs = require('fs');

// eslint-disable-next-line complexity
function sharedConfig(prefix, env = process.env.NODE_ENV || 'development') {

@@ -105,3 +106,26 @@ prefix = prefix.toUpperCase();

process.env[`${prefix}_REDIS_SHOW_FRIENDLY_ERROR_STACK`]
)
),
//
// NOTE: we override default values in ioredis for `maxRetriesPerRequest`
// and also `maxLoadingRetryTime`, because otherwise the default values
// of 20 * 10000 would cause 200s retry time, which is more than the
// HTTP default timeout per request of 30s as per above, and we use
// sensible default values of 3 * 3000 = 9s max redis retry time
//
// default in ioredis is 20
maxRetriesPerRequest: process.env[
`${prefix}_REDIS_MAX_RETRIES_PER_REQUEST`
]
? Number.parseInt(
process.env[`${prefix}_REDIS_MAX_RETRIES_PER_REQUEST`],
10
)
: 3,
// default in ioredis is 10000 (10s)
maxLoadingRetryTime: process.env[`${prefix}_REDIS_MAX_LOADING_RETRY_TIME`]
? Number.parseInt(
process.env[`${prefix}_REDIS_MAX_LOADING_RETRY_TIME`],
10
)
: 3000
},

@@ -108,0 +132,0 @@ redisMonitor: boolean(process.env[`${prefix}_REDIS_MONITOR`]),

+2
-2
{
"name": "@ladjs/shared-config",
"description": "Shared configuration for Lad's API and Web servers",
"version": "6.0.2",
"version": "7.0.0",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -37,3 +37,3 @@ "ava": {

"husky": "^8.0.1",
"lint-staged": "^12.4.2",
"lint-staged": "^12.4.3",
"nyc": "^15.1.0",

@@ -40,0 +40,0 @@ "remark-cli": "^10.0.1",