Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add aeria #1218

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
91 changes: 91 additions & 0 deletions cases/aeria.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import type { ObjectProperty } from '@aeriajs/types'

Check failure on line 1 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

"@aeriajs/types" is extraneous

Check failure on line 1 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Insert `;`

Check failure on line 1 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

"@aeriajs/types" is extraneous

Check failure on line 1 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Insert `;`
import { silentValidator } from '@aeriajs/validation'

Check failure on line 2 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Insert `;`

Check failure on line 2 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Insert `;`
import { createCase } from '../benchmarks';

const schema = <const>{

Check failure on line 5 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Insert `(`

Check failure on line 5 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Insert `(`
type: 'object',
properties: {
number: {
type: 'number',
},
negNumber: {
type: 'number',
},
maxNumber: {
type: 'number',
},
string: {
type: 'string',
},
longString: {
type: 'string',
},
boolean: {
type: 'boolean',
},
deeplyNested: {
type: 'object',
properties: {
foo: {
type: 'string',
},
num: {
type: 'number',
},
bool: {
type: 'boolean',
},
},
required: ['foo', 'num', 'bool'],
},
},
required: [
'number',
'negNumber',
'maxNumber',
'string',
'longString',
'boolean',
'deeplyNested',
],
} satisfies ObjectProperty

Check failure on line 51 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Replace `·satisfies·ObjectProperty` with `)·satisfies·ObjectProperty;`

Check failure on line 51 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Replace `·satisfies·ObjectProperty` with `)·satisfies·ObjectProperty;`

createCase('aeria', 'parseSafe', () => {
const [_, validate] = silentValidator(schema, {

Check warning on line 54 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

'_' is assigned a value but never used

Check warning on line 54 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

'_' is assigned a value but never used
extraneous: true,
filterOutExtraneous: true,
coerce: true

Check failure on line 57 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Insert `,`

Check failure on line 57 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Insert `,`
})

Check failure on line 58 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Insert `;`

Check failure on line 58 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Insert `;`

return (data: any) => {

Check warning on line 60 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Unexpected any. Specify a different type

Check warning on line 60 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected any. Specify a different type
return validate(data)

Check failure on line 61 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Insert `;`

Check failure on line 61 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Insert `;`
}

Check failure on line 62 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Insert `;`

Check failure on line 62 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Insert `;`
})

Check failure on line 63 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Insert `;`

Check failure on line 63 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Insert `;`

createCase('aeria', 'parseStrict', () => {
const [_, validate] = silentValidator(schema, {

Check warning on line 66 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

'_' is assigned a value but never used

Check warning on line 66 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

'_' is assigned a value but never used
coerce: true
})

return (data: any) => {

Check warning on line 70 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Unexpected any. Specify a different type

Check warning on line 70 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected any. Specify a different type
return validate(data)
}
})

createCase('aeria', 'assertLoose', () => {
const [_, validate] = silentValidator(schema, {

Check warning on line 76 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

'_' is assigned a value but never used

Check warning on line 76 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

'_' is assigned a value but never used
extraneous: true
})

return (data: any) => {

Check warning on line 80 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Unexpected any. Specify a different type

Check warning on line 80 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected any. Specify a different type
return validate(data)
}
})

createCase('aeria', 'assertStrict', () => {
const [_, validate] = silentValidator(schema)

Check warning on line 86 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

'_' is assigned a value but never used

Check warning on line 86 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

'_' is assigned a value but never used

return (data: any) => {

Check warning on line 88 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Unexpected any. Specify a different type

Check warning on line 88 in cases/aeria.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected any. Specify a different type
return validate(data)
}
})
43 changes: 0 additions & 43 deletions cases/deepkit/build/index.d.ts

This file was deleted.

55 changes: 0 additions & 55 deletions cases/deepkit/build/index.js

This file was deleted.

1 change: 0 additions & 1 deletion cases/deepkit/build/index.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion docs/results/node-20.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"results":[{"benchmark":"assertLoose","name":"ajv","ops":41535582,"margin":0.37,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"ajv","ops":21111299,"margin":0.26,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"arktype","ops":152159,"margin":15.01,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"arktype","ops":178885,"margin":12.75,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"arktype","ops":83176,"margin":24.81,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"bueno","ops":263859,"margin":0.36,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"bueno","ops":257800,"margin":1.11,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"bueno","ops":472409,"margin":0.99,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"bueno","ops":467212,"margin":0.93,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"class-transformer-validator-sync","ops":82924,"margin":12.73,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"computed-types","ops":1312497,"margin":0.55,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"computed-types","ops":1111305,"margin":0.24,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"computed-types","ops":1106815,"margin":0.48,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"decoders","ops":335439,"margin":1.02,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"decoders","ops":208959,"margin":0.4,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"decoders","ops":209218,"margin":0.28,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"io-ts","ops":2707026,"margin":0.55,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"jointz","ops":627063,"margin":1.05,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"jointz","ops":629111,"margin":0.33,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"jointz","ops":828803,"margin":0.18,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"json-decoder","ops":1460015,"margin":0.67,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"$mol_data","ops":3179283,"margin":0.48,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"$mol_data","ops":3188630,"margin":0.38,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"@mojotech/json-type-validation","ops":2541091,"margin":0.47,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"myzod","ops":1942367,"margin":0.73,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"myzod","ops":2468776,"margin":0.41,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"myzod","ops":2473371,"margin":0.41,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"ok-computer","ops":190810,"margin":0.34,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"ok-computer","ops":197866,"margin":0.35,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"parse-dont-validate (chained function)","ops":729288,"margin":0.61,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"parse-dont-validate (named parameters)","ops":2064130,"margin":0.38,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"purify-ts","ops":1842835,"margin":0.69,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"r-assign","ops":1887876,"margin":0.49,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"r-assign","ops":1496225,"margin":1.17,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"r-assign","ops":1854692,"margin":1.26,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"r-assign","ops":1519307,"margin":0.45,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"rescript-schema","ops":37301107,"margin":0.42,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"rescript-schema","ops":16292229,"margin":1.35,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"rescript-schema","ops":37246780,"margin":0.35,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"rescript-schema","ops":17229853,"margin":0.56,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"rulr","ops":1073655,"margin":0.58,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"runtypes","ops":172622,"margin":0.39,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"@sapphire/shapeshift","ops":273627,"margin":0.61,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"@sapphire/shapeshift","ops":266513,"margin":0.71,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"@sapphire/shapeshift","ops":235493,"margin":0.69,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"@sapphire/shapeshift","ops":265559,"margin":0.59,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"simple-runtypes","ops":2861787,"margin":0.57,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"simple-runtypes","ops":3845400,"margin":0.64,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"simple-runtypes","ops":3733215,"margin":0.24,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"@sinclair/typebox-(ahead-of-time)","ops":163643383,"margin":0.17,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"@sinclair/typebox-(ahead-of-time)","ops":40900843,"margin":0.3,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"@sinclair/typebox-(dynamic)","ops":1700755,"margin":1.23,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"@sinclair/typebox-(dynamic)","ops":1305394,"margin":0.63,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"@sinclair/typebox-(just-in-time)","ops":124237222,"margin":0.28,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"@sinclair/typebox-(just-in-time)","ops":36483167,"margin":1.83,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"spectypes","ops":40558627,"margin":0.26,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"spectypes","ops":29821647,"margin":0.31,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"spectypes","ops":140111617,"margin":0.31,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"spectypes","ops":27890063,"margin":0.31,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"succulent","ops":490927,"margin":0.44,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"succulent","ops":891069,"margin":0.28,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"succulent","ops":488983,"margin":0.36,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"superstruct","ops":175176,"margin":0.4,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"superstruct","ops":216607,"margin":0.23,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"superstruct","ops":175749,"margin":0.23,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"suretype","ops":58176089,"margin":0.38,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"to-typed","ops":4263271,"margin":0.74,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"to-typed","ops":3259169,"margin":0.25,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"to-typed","ops":116702,"margin":0.27,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"to-typed","ops":2899198,"margin":0.24,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"toi","ops":1104129,"margin":0.42,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"toi","ops":1088580,"margin":1.53,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"ts-interface-checker","ops":4122854,"margin":0.43,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"ts-json-validator","ops":58210764,"margin":0.62,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"ts-runtime-checks","ops":35475551,"margin":0.43,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"ts-runtime-checks","ops":35376747,"margin":0.57,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"ts-runtime-checks","ops":163408636,"margin":0.24,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"ts-utils","ops":318553,"margin":0.34,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"tson","ops":671835,"margin":0.48,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"tson","ops":724713,"margin":0.22,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"tson","ops":732784,"margin":0.29,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"tson","ops":723310,"margin":0.36,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"@typeofweb/schema","ops":1651915,"margin":0.65,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"@typeofweb/schema","ops":1634465,"margin":1.5,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"typia","ops":61492853,"margin":0.32,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"typia","ops":38320332,"margin":0.54,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"typia","ops":36180118,"margin":0.43,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"typia","ops":140528530,"margin":0.71,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"unknownutil","ops":3597629,"margin":0.68,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"unknownutil","ops":3520788,"margin":0.58,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"unknownutil","ops":4671982,"margin":0.23,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"valibot","ops":2316292,"margin":0.38,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"valibot","ops":1654580,"margin":0.55,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"valibot","ops":2261959,"margin":0.38,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"valibot","ops":1655215,"margin":1.01,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"valita","ops":6928062,"margin":0.2,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"valita","ops":6912033,"margin":0.31,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"valita","ops":6934665,"margin":1.66,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"valita","ops":6610081,"margin":0.47,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"vality","ops":215435,"margin":0.32,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"vality","ops":209876,"margin":0.2,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"vality","ops":213104,"margin":0.29,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"vality","ops":209316,"margin":0.34,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"yup","ops":48376,"margin":0.41,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"yup","ops":47032,"margin":0.25,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"zod","ops":755162,"margin":0.25,"nodeVersion":"v20.11.0"},{"benchmark":"parseStrict","name":"zod","ops":703746,"margin":0.36,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"zod","ops":656816,"margin":1.44,"nodeVersion":"v20.11.0"},{"benchmark":"assertStrict","name":"zod","ops":668024,"margin":0.28,"nodeVersion":"v20.11.0"},{"benchmark":"parseSafe","name":"deepkit","ops":6491176,"margin":0.28,"nodeVersion":"v20.11.0"},{"benchmark":"assertLoose","name":"deepkit","ops":39182400,"margin":0.24,"nodeVersion":"v20.11.0"}]}
{"results":[{"benchmark":"parseSafe","name":"zod","ops":592874,"margin":2.71,"nodeVersion":"v20.6.1"},{"benchmark":"parseStrict","name":"zod","ops":503190,"margin":2.29,"nodeVersion":"v20.6.1"},{"benchmark":"assertLoose","name":"zod","ops":482721,"margin":5.68,"nodeVersion":"v20.6.1"},{"benchmark":"assertStrict","name":"zod","ops":322082,"margin":7.65,"nodeVersion":"v20.6.1"},{"benchmark":"parseSafe","name":"myzod","ops":1098527,"margin":8.75,"nodeVersion":"v20.6.1"},{"benchmark":"parseStrict","name":"myzod","ops":1046181,"margin":9.01,"nodeVersion":"v20.6.1"},{"benchmark":"assertStrict","name":"myzod","ops":1359131,"margin":9.1,"nodeVersion":"v20.6.1"},{"benchmark":"parseSafe","name":"valita","ops":3776539,"margin":9.55,"nodeVersion":"v20.6.1"},{"benchmark":"parseStrict","name":"valita","ops":3697487,"margin":10.44,"nodeVersion":"v20.6.1"},{"benchmark":"assertLoose","name":"valita","ops":2798940,"margin":10.81,"nodeVersion":"v20.6.1"},{"benchmark":"assertStrict","name":"valita","ops":3990087,"margin":11.03,"nodeVersion":"v20.6.1"},{"benchmark":"parseSafe","name":"aeria","ops":575413,"margin":9.42,"nodeVersion":"v20.6.1"},{"benchmark":"parseStrict","name":"aeria","ops":457398,"margin":9.87,"nodeVersion":"v20.6.1"},{"benchmark":"assertLoose","name":"aeria","ops":390359,"margin":10.57,"nodeVersion":"v20.6.1"},{"benchmark":"assertStrict","name":"aeria","ops":532434,"margin":10.68,"nodeVersion":"v20.6.1"}]}
Loading
Loading