New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

registry-sync

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

registry-sync - npm Package Compare versions

Comparing version 5.0.2 to 6.0.0

35

package.json
{
"name": "registry-sync",
"version": "5.0.2",
"version": "6.0.0",
"description": "synchronize a remote npm registry for private use",

@@ -23,15 +23,16 @@ "repository": "https://github.com/heikkipora/registry-sync",

"@yarnpkg/lockfile": "1.1.0",
"axios": "1.6.5",
"commander": "11.1.0",
"semver": "7.5.4",
"ssri": "10.0.5",
"tar-fs": "3.0.4"
"axios": "1.7.2",
"commander": "12.1.0",
"lru-cache": "10.2.2",
"semver": "7.6.2",
"ssri": "10.0.6",
"tar-fs": "3.0.6"
},
"devDependencies": {
"@arkweid/lefthook": "0.7.7",
"@types/chai": "4.3.11",
"@types/lodash": "4.14.202",
"@types/chai": "4.3.16",
"@types/lodash": "4.17.4",
"@types/mocha": "10.0.6",
"@types/node": "20.11.5",
"@types/semver": "7.5.6",
"@types/node": "20.12.12",
"@types/semver": "7.5.8",
"@types/ssri": "7.1.5",

@@ -46,9 +47,9 @@ "@types/tar-fs": "2.0.4",

"eslint-formatter-codeframe": "7.32.1",
"eslint-plugin-mocha": "10.2.0",
"express": "4.18.2",
"lint-staged": "14.0.1",
"mocha": "10.2.0",
"prettier": "3.2.4",
"eslint-plugin-mocha": "10.4.3",
"express": "4.19.2",
"lint-staged": "15.2.5",
"mocha": "10.4.0",
"prettier": "3.2.5",
"ts-node": "10.9.2",
"typescript": "5.3.3"
"typescript": "5.4.5"
},

@@ -63,4 +64,4 @@ "keywords": [

"engines": {
"node": ">=16.14.0"
"node": ">=18.20.0"
}
}

@@ -6,3 +6,4 @@ "use strict";

const axios_1 = require("axios");
const metadataCache = {};
const lru_cache_1 = require("lru-cache");
const metadataCache = new lru_cache_1.LRUCache({ max: 100 });
const client = axios_1.default.create({

@@ -13,12 +14,10 @@ httpsAgent: new https.Agent({ keepAlive: true }),

async function fetchJsonWithCacheCloned(url, token) {
if (!metadataCache[url]) {
// eslint-disable-next-line require-atomic-updates
metadataCache[url] = await fetch(url, 'json', token);
if (metadataCache.has(url)) {
return structuredClone(metadataCache.get(url));
}
return cloneDeep(metadataCache[url]);
const value = await fetch(url, 'json', token);
metadataCache.set(url, value);
return structuredClone(value);
}
exports.fetchJsonWithCacheCloned = fetchJsonWithCacheCloned;
function cloneDeep(metadata) {
return JSON.parse(JSON.stringify(metadata));
}
function fetchBinaryData(url, token) {

@@ -25,0 +24,0 @@ return fetch(url, 'arraybuffer', token);

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc