Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastify/type-provider-typebox

Package Overview
Dependencies
Maintainers
19
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/type-provider-typebox - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

tests/index.js

5

index.ts

@@ -8,6 +8,1 @@ import { FastifyTypeProvider } from 'fastify'

}
export const ajvTypeBoxPlugin = function (ajv: any): void {
ajv.addKeyword({ keyword: 'kind' })
ajv.addKeyword({ keyword: 'modifier' })
}

12

package.json
{
"name": "@fastify/type-provider-typebox",
"version": "1.0.0",
"version": "2.0.0",
"description": "A Type Provider for Typebox over Fastify",

@@ -8,3 +8,3 @@ "main": "dist/index.js",

"peerDependencies": {
"@sinclair/typebox": "^0.23.0",
"@sinclair/typebox": "^0.24.1",
"fastify": "^4.0.0"

@@ -14,3 +14,3 @@ },

"build": "rimraf ./dist && mkdir dist && tsc --outDir dist",
"test": "npm run build && npm run typescript",
"test": "npm run build && npm run typescript && tap tests/index.js",
"typescript": "tsd"

@@ -33,6 +33,8 @@ },

"devDependencies": {
"@types/node": "^17.0.41",
"@types/node": "^18.0.0",
"fastify": "^4.2.0",
"fastify-tsconfig": "^1.0.1",
"rimraf": "^3.0.2",
"tsd": "^0.20.0"
"tap": "^16.3.0",
"tsd": "^0.21.0"
},

@@ -39,0 +41,0 @@ "tsd": {

@@ -20,15 +20,2 @@ # fastify-type-provider-typebox

**Note**: For [ajv] version 7 and above is required to use the `ajvTypeBoxPlugin`:
```ts
import Fastify from 'fastify'
import { ajvTypeBoxPlugin, TypeBoxTypeProvider } from '@fastify/type-provider-typebox'
const fastify = Fastify({
ajv: {
plugins: [ajvTypeBoxPlugin]
}
}).withTypeProvider<TypeBoxTypeProvider>()
```
## Example

@@ -35,0 +22,0 @@

@@ -1,2 +0,2 @@

import { TypeBoxTypeProvider, ajvTypeBoxPlugin } from '../index'
import { TypeBoxTypeProvider } from '../index'
import { Type } from '@sinclair/typebox'

@@ -14,3 +14,3 @@ import { expectAssignable, expectType } from 'tsd'

y: Type.Number(),
z: Type.Boolean()
z: Type.Boolean(),
})

@@ -24,3 +24,2 @@ }

expectAssignable<FastifyInstance>(Fastify({ ajv: { plugins: [ajvTypeBoxPlugin] } }))
expectType<void>(ajvTypeBoxPlugin({ addKeyword: () => {} }))
expectAssignable<FastifyInstance>(Fastify())

Sorry, the diff of this file is not supported yet

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