Socket
Socket
Sign inDemoInstall

@fastify/ajv-compiler

Package Overview
Dependencies
Maintainers
9
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/ajv-compiler - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

3

index.js

@@ -51,3 +51,2 @@ 'use strict'

} else {
console.log(Object.assign({}, defaultAjvOptions, options.customOptions))
this.ajv = new Ajv(Object.assign({}, defaultAjvOptions, options.customOptions))

@@ -90,4 +89,2 @@ }

console.log({ schema })
return this.ajv.compile(schema)

@@ -94,0 +91,0 @@ }

2

package.json
{
"name": "@fastify/ajv-compiler",
"version": "3.3.0",
"version": "3.3.1",
"description": "Build and manage the AJV instances for the fastify framework",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -277,35 +277,1 @@ 'use strict'

})
t.test('global refs in main schemas', (t) => {
t.plan(2)
const factory = AjvCompiler()
const compiler = factory({}, {
customOptions: {
addUsedSchema: false
}
})
const validatorFunc1 = compiler({
schema: {
definitions: {
globalIdSchema: {
$id: 'globalId',
type: 'integer'
}
},
$ref: 'globalId'
}
})
const validatorFunc2 = compiler({
schema: {
definitions: {
globalIdSchema: {
$id: 'globalId',
type: 'string'
}
},
$ref: 'globalId'
}
})
t.equal(validatorFunc1(3), true)
t.equal(validatorFunc2(3), false)
})
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