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

ajv-cmd

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ajv-cmd - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

16

commands/deref.js

@@ -43,13 +43,21 @@ import { stat, readFile, writeFile } from 'node:fs/promises'

const cache = {}
const enc = new TextEncoder()
for (let i = schemas.length; i--; ) {
const schema = schemas[i]
if (schema.$id) {
cache[schema.$id] = schema
cache[schema.$id] = enc.encode(JSON.stringify(schema))
}
}
globalThis.fetch = async () => {
if (cache[arguments[0]]) return cache[arguments[0]]
return _fetch(...arguments)
globalThis.fetch = async (...args) => {
if (cache[args[0].href]) {
return Promise.resolve({
status: 200,
body: true,
arrayBuffer: async () => cache[args[0].href]
})
}
return _fetch(...args)
}
}

@@ -30,3 +30,3 @@ import { stat, readFile, writeFile } from 'node:fs/promises'

if (options?.testDataFiles) {
const testDataFile = []
const testDataFiles = []
for (const testDataFilePath of options.testDataFiles) {

@@ -33,0 +33,0 @@ const testDataFile = await readFile(testDataFilePath, {

{
"name": "ajv-cmd",
"version": "0.6.2",
"version": "0.6.3",
"description": "Deref, Validate, Transpile, and Test JSON-Schema (.json) files using ajv",

@@ -5,0 +5,0 @@ "type": "module",

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