From dc1bbea56becfd5faa199cec59b34afab49101fd Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Tue, 5 May 2026 09:46:51 +0200 Subject: [PATCH] Undo merge issue --- .../interceptors/npm/modifyNpmInfo.js | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/packages/safe-chain/src/registryProxy/builtInProxy/interceptors/npm/modifyNpmInfo.js b/packages/safe-chain/src/registryProxy/builtInProxy/interceptors/npm/modifyNpmInfo.js index 9fc64e4..37c57e9 100644 --- a/packages/safe-chain/src/registryProxy/builtInProxy/interceptors/npm/modifyNpmInfo.js +++ b/packages/safe-chain/src/registryProxy/builtInProxy/interceptors/npm/modifyNpmInfo.js @@ -1,10 +1,10 @@ import { EventEmitter } from "events"; -import { - getMinimumPackageAgeExclusions, - getMinimumPackageAgeHours, -} from "../../../../config/settings.js"; +import { getMinimumPackageAgeHours } from "../../../../config/settings.js"; import { ui } from "../../../../environment/userInteraction.js"; -import { clearCachingHeaders, getHeaderValueAsString } from "../../http-utils.js"; +import { + clearCachingHeaders, + getHeaderValueAsString, +} from "../../http-utils.js"; /** @type {EventEmitter<{ versionsRemoved: [{packageName: string, packageVersions: string[]}] }>} */ export const modifyResponseEventEmitter = new EventEmitter(); @@ -68,21 +68,6 @@ export function modifyNpmInfoResponse(body, headers) { return body; } - // Check if this package is excluded from minimum age filtering - const packageName = bodyJson.name; - const exclusions = getMinimumPackageAgeExclusions(); - if ( - packageName && - exclusions.some((pattern) => - matchesExclusionPattern(packageName, pattern), - ) - ) { - ui.writeVerbose( - `Safe-chain: ${packageName} is excluded from minimum package age filtering (minimumPackageAgeExclusions setting).`, - ); - return body; - } - const cutOff = new Date( new Date().getTime() - getMinimumPackageAgeHours() * 3600 * 1000, );