diff --git a/.eslintignore b/.eslintignore index c81183b29..2341b186e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,4 +6,5 @@ cases/typia/build cases/deepkit/build cases/ts-auto-guard/build cases/ts-auto-guard/src/index.guard.ts -jest.config.js \ No newline at end of file +cases/jointz/build +jest.config.js diff --git a/.gitignore b/.gitignore index 2f9c9d893..d81de9b5c 100644 --- a/.gitignore +++ b/.gitignore @@ -164,4 +164,7 @@ cases/typia/build # ts-auto-guard build artifacts cases/ts-auto-guard/build -cases/ts-auto-guard/src/index.guard.ts \ No newline at end of file +cases/ts-auto-guard/src/index.guard.ts + +# jointz build artifacts +cases/jointz/build diff --git a/.npmrc b/.npmrc index 449691b70..ff06c0688 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ -save-exact=true \ No newline at end of file +save-exact=true +@jsr:registry=https://npm.jsr.io diff --git a/.prettierrc.js b/.prettierrc.cjs similarity index 100% rename from .prettierrc.js rename to .prettierrc.cjs diff --git a/README.md b/README.md index 6c0b2ef4a..9c40d8d9b 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ * [pure-parse](https://github.com/johannes-lindgren/pure-parse) * [purify-ts](https://github.com/gigobyte/purify) * [parse-dont-validate](https://github.com/Packer-Man/parse-dont-validate) +* [Paseri](https://github.com/vbudovski/paseri) * [r-assign](https://github.com/micnic/r-assign) * [rescript-schema](https://github.com/DZakh/rescript-schema) * [rulr](https://github.com/ryansmith94/rulr) diff --git a/benchmarks/assertLoose.ts b/benchmarks/assertLoose.ts index 10843370e..884b5ea8a 100644 --- a/benchmarks/assertLoose.ts +++ b/benchmarks/assertLoose.ts @@ -1,5 +1,5 @@ -import { Benchmark } from './helpers/types'; -import { validateData } from './parseSafe'; +import { Benchmark } from './helpers/types.ts'; +import { validateData } from './parseSafe.ts'; type Fn = (data: unknown) => boolean; diff --git a/benchmarks/assertStrict.ts b/benchmarks/assertStrict.ts index a04db5b79..1755b8dab 100644 --- a/benchmarks/assertStrict.ts +++ b/benchmarks/assertStrict.ts @@ -1,5 +1,5 @@ -import { Benchmark } from './helpers/types'; -import { validateData } from './parseSafe'; +import { Benchmark } from './helpers/types.ts'; +import { validateData } from './parseSafe.ts'; type Fn = (data: unknown) => boolean; diff --git a/benchmarks/helpers/graph.ts b/benchmarks/helpers/graph.ts index 42513c191..26c29f6c2 100644 --- a/benchmarks/helpers/graph.ts +++ b/benchmarks/helpers/graph.ts @@ -2,8 +2,11 @@ import { writeFileSync } from 'fs'; import { optimize } from 'svgo'; import { parse, View } from 'vega'; import { compile } from 'vega-lite'; -import { availableBenchmarks, type AvailableBenchmarksIds } from './register'; -import type { BenchmarkResult } from './types'; +import { + availableBenchmarks, + type AvailableBenchmarksIds, +} from './register.ts'; +import type { BenchmarkResult } from './types.ts'; interface PreviewGraphParams { values: BenchmarkResult[]; diff --git a/benchmarks/helpers/main.ts b/benchmarks/helpers/main.ts index 6dc77dbe9..d797f407d 100644 --- a/benchmarks/helpers/main.ts +++ b/benchmarks/helpers/main.ts @@ -1,11 +1,12 @@ import { add, complete, cycle, suite } from 'benny'; import { readFileSync, writeFileSync, existsSync, unlinkSync } from 'fs'; import { join } from 'path'; -import { writePreviewGraph } from './graph'; -import { getRegisteredBenchmarks } from './register'; -import type { BenchmarkCase, BenchmarkResult } from './types'; +import { fileURLToPath } from 'url'; +import { writePreviewGraph } from './graph.ts'; +import { getRegisteredBenchmarks } from './register.ts'; +import type { BenchmarkCase, BenchmarkResult } from './types.ts'; -const DOCS_DIR = join(__dirname, '../../docs'); +const DOCS_DIR = join(fileURLToPath(import.meta.url), '../../../docs'); const RUNTIME = process.env.RUNTIME || 'node'; const RUNTIME_VERSION = process.env.RUNTIME_VERSION || process.version; const RUNTIME_FOR_PREVIEW = 'node'; diff --git a/benchmarks/helpers/register.ts b/benchmarks/helpers/register.ts index 741d8e7bc..2a51a54ab 100644 --- a/benchmarks/helpers/register.ts +++ b/benchmarks/helpers/register.ts @@ -1,8 +1,8 @@ -import { AssertLoose } from '../assertLoose'; -import { AssertStrict } from '../assertStrict'; -import { ParseSafe } from '../parseSafe'; -import { ParseStrict } from '../parseStrict'; -import type { BenchmarkCase } from './types'; +import { AssertLoose } from '../assertLoose.ts'; +import { AssertStrict } from '../assertStrict.ts'; +import { ParseSafe } from '../parseSafe.ts'; +import { ParseStrict } from '../parseStrict.ts'; +import type { BenchmarkCase } from './types.ts'; /** * Map of all benchmarks. diff --git a/benchmarks/index.ts b/benchmarks/index.ts index 004f2df19..d5d49cc30 100644 --- a/benchmarks/index.ts +++ b/benchmarks/index.ts @@ -2,11 +2,11 @@ export { runAllBenchmarks, createPreviewGraph, deleteResults, -} from './helpers/main'; +} from './helpers/main.ts'; export { addCase, type AvailableBenchmarksIds, createCase, getRegisteredBenchmarks, -} from './helpers/register'; -export { type UnknownData } from './helpers/types'; +} from './helpers/register.ts'; +export { type UnknownData } from './helpers/types.ts'; diff --git a/benchmarks/parseSafe.ts b/benchmarks/parseSafe.ts index 120a91a6d..a112157d7 100644 --- a/benchmarks/parseSafe.ts +++ b/benchmarks/parseSafe.ts @@ -1,4 +1,4 @@ -import { Benchmark } from './helpers/types'; +import { Benchmark } from './helpers/types.ts'; export const validateData = Object.freeze({ number: 1, diff --git a/benchmarks/parseStrict.ts b/benchmarks/parseStrict.ts index d3523ac1b..3336c0710 100644 --- a/benchmarks/parseStrict.ts +++ b/benchmarks/parseStrict.ts @@ -1,5 +1,5 @@ -import { Benchmark } from './helpers/types'; -import { validateData } from './parseSafe'; +import { Benchmark } from './helpers/types.ts'; +import { validateData } from './parseSafe.ts'; type Fn = (data: unknown) => typeof validateData; diff --git a/bun.lockb b/bun.lockb index 9b42a66ef..5e24f6163 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/cases/aeria/index.ts b/cases/aeria/index.ts index 2c72cfd09..025d1f09b 100644 --- a/cases/aeria/index.ts +++ b/cases/aeria/index.ts @@ -1,5 +1,5 @@ import { validate } from '@aeriajs/validation'; -import { createCase } from '../../benchmarks'; +import { createCase } from '../../benchmarks/index.ts'; const schema = { type: 'object', diff --git a/cases/ajv.ts b/cases/ajv.ts index 3e6ceb261..bcea5a6f7 100644 --- a/cases/ajv.ts +++ b/cases/ajv.ts @@ -1,5 +1,5 @@ import Ajv from 'ajv'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('ajv', 'assertLoose', () => { const ajv = new Ajv(); diff --git a/cases/arktype.ts b/cases/arktype.ts index be39e59f8..9031a6fc7 100644 --- a/cases/arktype.ts +++ b/cases/arktype.ts @@ -1,5 +1,5 @@ import { type } from 'arktype'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; const t = type({ number: 'number', diff --git a/cases/banditypes.ts b/cases/banditypes.ts index 36ed1785f..891fbf5e8 100644 --- a/cases/banditypes.ts +++ b/cases/banditypes.ts @@ -1,5 +1,5 @@ import { boolean, number, object, string } from 'banditypes'; -import { addCase } from '../benchmarks'; +import { addCase } from '../benchmarks/index.ts'; const dataTypeSafe = object({ number: number(), diff --git a/cases/bueno.ts b/cases/bueno.ts index ac97e5e0b..1823f9158 100644 --- a/cases/bueno.ts +++ b/cases/bueno.ts @@ -9,7 +9,7 @@ import { result, string, } from 'bueno'; -import { type UnknownData, addCase } from '../benchmarks'; +import { type UnknownData, addCase } from '../benchmarks/index.ts'; const dataType = object({ number: number, diff --git a/cases/caketype.ts b/cases/caketype.ts index b6767e4f5..7be07b8b5 100644 --- a/cases/caketype.ts +++ b/cases/caketype.ts @@ -1,5 +1,5 @@ import { bake, boolean, number, string } from 'caketype'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; const cake = bake({ number: number, diff --git a/cases/class-validator.ts b/cases/class-validator.ts index fd105e4d8..350ea8572 100644 --- a/cases/class-validator.ts +++ b/cases/class-validator.ts @@ -8,7 +8,7 @@ import { ValidateNested, } from 'class-validator'; import 'reflect-metadata'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('class-transformer-validator-sync', 'assertLoose', () => { class DeeplyNestedType { diff --git a/cases/computed-types.ts b/cases/computed-types.ts index 8e676c9ec..386788b81 100644 --- a/cases/computed-types.ts +++ b/cases/computed-types.ts @@ -1,5 +1,7 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore import Schema, { boolean, number, string } from 'computed-types'; -import { type UnknownData, addCase } from '../benchmarks'; +import { type UnknownData, addCase } from '../benchmarks/index.ts'; const validator = Schema({ number: number, diff --git a/cases/decoders.ts b/cases/decoders.ts index d5f4b6983..83b6d33a3 100644 --- a/cases/decoders.ts +++ b/cases/decoders.ts @@ -1,5 +1,5 @@ import { boolean, exact, guard, number, object, string } from 'decoders'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('decoders', 'parseSafe', () => { const dataType = object({ diff --git a/cases/deepkit/build/index.js b/cases/deepkit/build/index.js index b659b738f..f80c78825 100644 --- a/cases/deepkit/build/index.js +++ b/cases/deepkit/build/index.js @@ -1,13 +1,7 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assertLoose = assertLoose; -exports.assertStrict = assertStrict; -exports.parseStrict = parseStrict; -exports.parseSafe = parseSafe; -const type_1 = require("@deepkit/type"); +import { castFunction, getValidatorFunction } from '@deepkit/type'; const __ΩToBeChecked = ['number', 'negNumber', 'maxNumber', 'string', 'longString', 'boolean', 'foo', 'num', 'bool', 'deeplyNested', 'ToBeChecked', 'P\'4!\'4"\'4#&4$&4%)4&P&4\'\'4()4)M4*Mw+y']; -const isToBeChecked = (type_1.getValidatorFunction.Ω = [[() => __ΩToBeChecked, 'n!']], (0, type_1.getValidatorFunction)()); -const safeToBeChecked = (type_1.castFunction.Ω = [[() => __ΩToBeChecked, 'n!']], (0, type_1.castFunction)()); +const isToBeChecked = (getValidatorFunction.Ω = [[() => __ΩToBeChecked, 'n!']], getValidatorFunction()); +const safeToBeChecked = (castFunction.Ω = [[() => __ΩToBeChecked, 'n!']], castFunction()); /** * Check that an object conforms to the schema. * @@ -18,7 +12,7 @@ const safeToBeChecked = (type_1.castFunction.Ω = [[() => __ΩToBeChecked, 'n!'] * But not checking for unknown/extra keys in records may provide massive * speedups and may suffice in certain scenarios. */ -function assertLoose(input) { +export function assertLoose(input) { if (!isToBeChecked(input)) throw new Error('wrong type.'); return true; @@ -29,14 +23,14 @@ assertLoose.__type = ['input', 'assertLoose', 'P#2!)/"']; * * Raise errors if any extra keys not present in the schema are found. */ -function assertStrict() { +export function assertStrict() { throw new Error('not supported.'); } assertStrict.__type = ['assertStrict', 'P)/!']; /** * Like parseSafe but throw on unknown (extra) keys in objects. */ -function parseStrict() { +export function parseStrict() { throw new Error('not supported.'); } parseStrict.__type = [() => __ΩToBeChecked, 'parseStrict', 'Pn!/"']; @@ -47,7 +41,7 @@ parseStrict.__type = [() => __ΩToBeChecked, 'parseStrict', 'Pn!/"']; * not result in unwanted parameters or the `__proto__` attribute being * maliciously passed to internal functions. */ -function parseSafe(input) { +export function parseSafe(input) { return safeToBeChecked(input); } parseSafe.__type = ['input', () => __ΩToBeChecked, 'parseSafe', 'P#2!n"/#']; diff --git a/cases/deepkit/build/index.js.map b/cases/deepkit/build/index.js.map index bafc22b2f..8ee2e7596 100644 --- a/cases/deepkit/build/index.js.map +++ b/cases/deepkit/build/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AA6BA,kCAGC;AAOD,oCAEC;AAKD,kCAEC;AASD,8BAEC;AA3DD,wCAAmE;;AAgBnE,MAAM,aAAa,IAAG,2BAAoB,qCAApB,IAAA,2BAAoB,GAAe,CAAA,CAAC;AAC1D,MAAM,eAAe,IAAG,mBAAY,qCAAZ,IAAA,mBAAY,GAAe,CAAA,CAAC;AAEpD;;;;;;;;;GASG;AACH,SAAgB,WAAW,CAAC,KAAc;IACxC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAY;QAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC;AACd,CAAC;;AAED;;;;GAIG;AACH,SAAgB,YAAY;IAC1B,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;AACpC,CAAC;;AAED;;GAEG;AACH,SAAgB,WAAW;IACzB,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;AACpC,CAAC;;AAED;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;;AAgBnE,MAAM,aAAa,IAAG,oBAAoB,qCAApB,oBAAoB,EAAe,CAAA,CAAC;AAC1D,MAAM,eAAe,IAAG,YAAY,qCAAZ,YAAY,EAAe,CAAA,CAAC;AAEpD;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAY;QAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC;AACd,CAAC;;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;AACpC,CAAC;;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;AACpC,CAAC;;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/cases/deepkit/index.ts b/cases/deepkit/index.ts index 6bd357890..f13dd6f94 100644 --- a/cases/deepkit/index.ts +++ b/cases/deepkit/index.ts @@ -1,5 +1,5 @@ -import { parseSafe, assertLoose } from './build'; -import { addCase } from '../../benchmarks'; +import { parseSafe, assertLoose } from './build/index.js'; +import { addCase } from '../../benchmarks/index.ts'; addCase('deepkit', 'parseSafe', data => { return parseSafe(data); diff --git a/cases/deepkit/tsconfig.json b/cases/deepkit/tsconfig.json index b604947aa..f81a9432f 100644 --- a/cases/deepkit/tsconfig.json +++ b/cases/deepkit/tsconfig.json @@ -1,8 +1,9 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "module": "commonjs", - "outDir": "build" + "module": "ESNext", + "outDir": "build", + "allowImportingTsExtensions": false }, "include": ["src/index.ts"], "reflection": true diff --git a/cases/effect-schema.ts b/cases/effect-schema.ts index 7d8601bff..4fae575cc 100644 --- a/cases/effect-schema.ts +++ b/cases/effect-schema.ts @@ -1,5 +1,5 @@ import { Schema } from '@effect/schema'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('effect-schema', 'parseSafe', () => { const dataType = Schema.Struct({ diff --git a/cases/index.ts b/cases/index.ts index b0878e07d..5960182a9 100644 --- a/cases/index.ts +++ b/cases/index.ts @@ -19,6 +19,7 @@ export const cases = [ 'parse-dont-validate', 'pure-parse', 'purify-ts', + 'paseri', 'r-assign', 'rescript-schema', 'rulr', @@ -57,5 +58,13 @@ export const cases = [ export type CaseName = (typeof cases)[number]; export async function importCase(caseName: CaseName) { - await import('./' + caseName); + try { + await import(`./${caseName}.ts`); + } catch { + try { + await import(`./${caseName}/index.ts`); + } catch (e) { + console.error(`Could not import ${caseName}.`, e); + } + } } diff --git a/cases/io-ts.ts b/cases/io-ts.ts index d2f445379..8bca052da 100644 --- a/cases/io-ts.ts +++ b/cases/io-ts.ts @@ -1,7 +1,7 @@ -import { fold } from 'fp-ts/Either'; -import { pipe } from 'fp-ts/function'; +import { fold } from 'fp-ts/lib/Either.js'; +import { pipe } from 'fp-ts/lib/function.js'; import * as t from 'io-ts'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('io-ts', 'assertLoose', () => { const dataType = t.type({ diff --git a/cases/jet-schema.ts b/cases/jet-schema.ts index 272e55ff0..d80353f46 100644 --- a/cases/jet-schema.ts +++ b/cases/jet-schema.ts @@ -1,5 +1,7 @@ -import jetSchema from 'jet-schema'; -import { createCase } from '../benchmarks'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import jetSchema from 'jet-schema/dist/index.min.mjs'; +import { createCase } from '../benchmarks/index.ts'; // **** Init Schema **** // diff --git a/cases/jointz.ts b/cases/jointz/index.ts similarity index 94% rename from cases/jointz.ts rename to cases/jointz/index.ts index 5713f3f39..5444bba21 100644 --- a/cases/jointz.ts +++ b/cases/jointz/index.ts @@ -1,5 +1,5 @@ -import jointz from 'jointz'; -import { addCase } from '../benchmarks'; +import jointz from './build/index.js'; +import { addCase } from '../../benchmarks/index.js'; const dataTypeLoose = jointz .object({ diff --git a/cases/jointz/src/index.ts b/cases/jointz/src/index.ts new file mode 100644 index 000000000..58530677f --- /dev/null +++ b/cases/jointz/src/index.ts @@ -0,0 +1,3 @@ +import { default as jointz } from 'jointz/src/index'; + +export default jointz; diff --git a/cases/jointz/tsconfig.json b/cases/jointz/tsconfig.json new file mode 100644 index 000000000..b2d45b979 --- /dev/null +++ b/cases/jointz/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "module": "CommonJS", + "moduleResolution": "Node", + "outDir": "build", + "strict": true, + "declaration": true, + "emitDeclarationOnly": true + }, + "include": ["src/index.ts"] + } diff --git a/cases/json-decoder.ts b/cases/json-decoder.ts index 47e583f46..3abf46bea 100644 --- a/cases/json-decoder.ts +++ b/cases/json-decoder.ts @@ -4,7 +4,7 @@ import { numberDecoder, boolDecoder, } from 'json-decoder'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('json-decoder', 'parseSafe', () => { const dataType = objectDecoder({ diff --git a/cases/mojotech-json-type-validation.ts b/cases/mojotech-json-type-validation.ts index 2cf1ac020..77fcaba48 100644 --- a/cases/mojotech-json-type-validation.ts +++ b/cases/mojotech-json-type-validation.ts @@ -4,7 +4,7 @@ import { object, boolean, } from '@mojotech/json-type-validation'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('@mojotech/json-type-validation', 'parseSafe', () => { const dataType = object({ diff --git a/cases/mol_data.ts b/cases/mol_data.ts index fe1460dce..7b4aef65d 100644 --- a/cases/mol_data.ts +++ b/cases/mol_data.ts @@ -7,7 +7,7 @@ const { $mol_data_boolean: Bool, } = $; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('$mol_data', 'parseSafe', () => { const dataType = Rec({ diff --git a/cases/mondrian-framework.ts b/cases/mondrian-framework.ts index a991bf677..4caeab72a 100644 --- a/cases/mondrian-framework.ts +++ b/cases/mondrian-framework.ts @@ -1,4 +1,4 @@ -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; import { model } from '@mondrian-framework/model'; const dataType = model.object({ diff --git a/cases/myzod.ts b/cases/myzod.ts index 5653b3ed9..6c0b50024 100644 --- a/cases/myzod.ts +++ b/cases/myzod.ts @@ -1,5 +1,5 @@ import myzod from 'myzod'; -import { addCase, createCase } from '../benchmarks'; +import { addCase, createCase } from '../benchmarks/index.ts'; createCase('myzod', 'parseSafe', () => { const dataType = myzod.object( diff --git a/cases/ok-computer.ts b/cases/ok-computer.ts index 17c2ce91b..d5d452421 100644 --- a/cases/ok-computer.ts +++ b/cases/ok-computer.ts @@ -1,5 +1,5 @@ import { boolean, number, object, string, assert } from 'ok-computer'; -import { type UnknownData, addCase } from '../benchmarks'; +import { type UnknownData, addCase } from '../benchmarks/index.ts'; const dataType = object({ number: number, diff --git a/cases/parse-dont-validate.ts b/cases/parse-dont-validate.ts index 51a1433d3..2f027ef39 100644 --- a/cases/parse-dont-validate.ts +++ b/cases/parse-dont-validate.ts @@ -4,7 +4,7 @@ import parse, { parseAsNumber, parseAsString, } from 'parse-dont-validate'; -import { addCase } from '../benchmarks'; +import { addCase } from '../benchmarks/index.ts'; addCase('parse-dont-validate (chained function)', 'parseSafe', data => parse(data) diff --git a/cases/paseri.ts b/cases/paseri.ts new file mode 100644 index 000000000..645ad9391 --- /dev/null +++ b/cases/paseri.ts @@ -0,0 +1,76 @@ +import * as p from '@vbudovski/paseri'; +import { addCase } from '../benchmarks/index.ts'; + +const dataTypeStrip = p + .object({ + number: p.number(), + negNumber: p.number(), + maxNumber: p.number(), + string: p.string(), + longString: p.string(), + boolean: p.boolean(), + deeplyNested: p + .object({ + foo: p.string(), + num: p.number(), + bool: p.boolean(), + }) + .strip(), + }) + .strip(); + +const dataTypeStrict = p + .object({ + number: p.number(), + negNumber: p.number(), + maxNumber: p.number(), + string: p.string(), + longString: p.string(), + boolean: p.boolean(), + deeplyNested: p + .object({ + foo: p.string(), + num: p.number(), + bool: p.boolean(), + }) + .strict(), + }) + .strict(); + +const dataTypePassthrough = p + .object({ + number: p.number(), + negNumber: p.number(), + maxNumber: p.number(), + string: p.string(), + longString: p.string(), + boolean: p.boolean(), + deeplyNested: p + .object({ + foo: p.string(), + num: p.number(), + bool: p.boolean(), + }) + .passthrough(), + }) + .passthrough(); + +addCase('paseri', 'parseSafe', data => { + return dataTypeStrip.parse(data); +}); + +addCase('paseri', 'parseStrict', data => { + return dataTypeStrict.parse(data); +}); + +addCase('paseri', 'assertLoose', data => { + dataTypePassthrough.parse(data); + + return true; +}); + +addCase('paseri', 'assertStrict', data => { + dataTypeStrict.parse(data); + + return true; +}); diff --git a/cases/pure-parse.ts b/cases/pure-parse.ts index 6b7fb135b..4cb26d7b4 100644 --- a/cases/pure-parse.ts +++ b/cases/pure-parse.ts @@ -1,4 +1,4 @@ -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; import { object, objectCompiled, diff --git a/cases/purify-ts.ts b/cases/purify-ts.ts index e82b7cfb2..a19fe59d7 100644 --- a/cases/purify-ts.ts +++ b/cases/purify-ts.ts @@ -1,5 +1,5 @@ import { Codec, string, number, boolean } from 'purify-ts'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('purify-ts', 'parseSafe', () => { const dataType = Codec.interface({ diff --git a/cases/r-assign.ts b/cases/r-assign.ts index 70a1ca92b..c1e2f5513 100644 --- a/cases/r-assign.ts +++ b/cases/r-assign.ts @@ -1,12 +1,7 @@ -import { - boolean, - number, - object, - strictObject, - string, - parseType, -} from 'r-assign/lib'; -import { createCase } from '../benchmarks'; +import pkg from 'r-assign/lib/index.js'; +const { boolean, number, object, strictObject, string, parseType } = pkg; + +import { createCase } from '../benchmarks/index.ts'; createCase('r-assign', 'parseSafe', () => { const dataType = object({ diff --git a/cases/rescript-schema.ts b/cases/rescript-schema.ts index 03bc1ad68..0a73d6978 100644 --- a/cases/rescript-schema.ts +++ b/cases/rescript-schema.ts @@ -1,6 +1,6 @@ import * as S from 'rescript-schema'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; S.setGlobalConfig({ disableNanNumberValidation: true, diff --git a/cases/rulr.ts b/cases/rulr.ts index da41cd2ad..9693d43e4 100644 --- a/cases/rulr.ts +++ b/cases/rulr.ts @@ -1,5 +1,9 @@ -import { object, number, string, boolean } from 'rulr'; -import { createCase } from '../benchmarks'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import * as pkg from 'rulr'; +const { object, number, string, boolean } = pkg; + +import { createCase } from '../benchmarks/index.ts'; createCase('rulr', 'parseSafe', () => { const dataType = object({ diff --git a/cases/runtypes.ts b/cases/runtypes.ts index 9c8df2dc7..739de7a91 100644 --- a/cases/runtypes.ts +++ b/cases/runtypes.ts @@ -1,5 +1,5 @@ import { Boolean, Number, String, Record } from 'runtypes'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('runtypes', 'assertLoose', () => { const dataType = Record({ diff --git a/cases/sapphire-shapeshift.ts b/cases/sapphire-shapeshift.ts index 5646fd65f..76b614f2e 100644 --- a/cases/sapphire-shapeshift.ts +++ b/cases/sapphire-shapeshift.ts @@ -1,5 +1,5 @@ import { s } from '@sapphire/shapeshift'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('@sapphire/shapeshift', 'parseSafe', () => { const dataType = s.object({ diff --git a/cases/simple-runtypes.ts b/cases/simple-runtypes.ts index 0b5990560..5bc369daa 100644 --- a/cases/simple-runtypes.ts +++ b/cases/simple-runtypes.ts @@ -1,5 +1,5 @@ import * as rt from 'simple-runtypes'; -import { addCase } from '../benchmarks'; +import { addCase } from '../benchmarks/index.ts'; const checkDataSafe = rt.sloppyRecord({ number: rt.integer(), diff --git a/cases/sinclair-typebox-ahead-of-time.ts b/cases/sinclair-typebox-ahead-of-time.ts index d1db470ce..52f455056 100644 --- a/cases/sinclair-typebox-ahead-of-time.ts +++ b/cases/sinclair-typebox-ahead-of-time.ts @@ -1,6 +1,6 @@ -import { createCase } from '../benchmarks'; -import { CheckLoose } from './typebox/build/check-loose'; -import { CheckStrict } from './typebox/build/check-strict'; +import { createCase } from '../benchmarks/index.ts'; +import { CheckLoose } from './typebox/build/check-loose.ts'; +import { CheckStrict } from './typebox/build/check-strict.ts'; createCase('@sinclair/typebox-(ahead-of-time)', 'assertLoose', () => { return data => { diff --git a/cases/sinclair-typebox-dynamic.ts b/cases/sinclair-typebox-dynamic.ts index 8779a4bbb..482ce8d72 100644 --- a/cases/sinclair-typebox-dynamic.ts +++ b/cases/sinclair-typebox-dynamic.ts @@ -1,6 +1,6 @@ -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; import { Value } from '@sinclair/typebox/value'; -import { Loose, Strict } from './sinclair-typebox'; +import { Loose, Strict } from './sinclair-typebox.ts'; createCase('@sinclair/typebox-(dynamic)', 'assertLoose', () => { return data => { diff --git a/cases/sinclair-typebox-just-in-time.ts b/cases/sinclair-typebox-just-in-time.ts index 9c117ffa0..a2aeda8f6 100644 --- a/cases/sinclair-typebox-just-in-time.ts +++ b/cases/sinclair-typebox-just-in-time.ts @@ -1,6 +1,6 @@ -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; import { TypeCompiler } from '@sinclair/typebox/compiler'; -import { Loose, Strict } from './sinclair-typebox'; +import { Loose, Strict } from './sinclair-typebox.ts'; const CheckLoose = TypeCompiler.Compile(Loose); const CheckStrict = TypeCompiler.Compile(Strict); diff --git a/cases/spectypes/.babelrc b/cases/spectypes/.babelrc index 8f6804e0f..f8f08f986 100644 --- a/cases/spectypes/.babelrc +++ b/cases/spectypes/.babelrc @@ -1,6 +1,16 @@ { - "presets": ["@babel/preset-env", "@babel/preset-typescript"], - "plugins": ["babel-plugin-spectypes"], + "presets": [ + [ + "@babel/preset-env", + { + "modules": false + } + ], + "@babel/preset-typescript" + ], + "plugins": [ + "babel-plugin-spectypes" + ], "targets": { "node": 16 } diff --git a/cases/spectypes/index.ts b/cases/spectypes/index.ts index 1fcfad4c0..bb4d72ae2 100644 --- a/cases/spectypes/index.ts +++ b/cases/spectypes/index.ts @@ -1,5 +1,5 @@ -import { parseSafe, parseStrict, assertLoose } from './build'; -import { addCase } from '../../benchmarks'; +import { parseSafe, parseStrict, assertLoose } from './build/index.js'; +import { addCase } from '../../benchmarks/index.ts'; addCase('spectypes', 'parseSafe', data => { const parsed = parseSafe(data); diff --git a/cases/spectypes/src/index.ts b/cases/spectypes/src/index.ts index e45dcfe9b..43b5b686f 100644 --- a/cases/spectypes/src/index.ts +++ b/cases/spectypes/src/index.ts @@ -9,7 +9,8 @@ import { unknown, } from 'spectypes'; -export const parseStrict = object({ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export const parseStrict: any = object({ number, negNumber: number, maxNumber: number, @@ -23,7 +24,8 @@ export const parseStrict = object({ }), }); -export const parseSafe = struct({ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export const parseSafe: any = struct({ number, negNumber: number, maxNumber: number, @@ -37,7 +39,8 @@ export const parseSafe = struct({ }), }); -export const assertLoose = merge( +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export const assertLoose: any = merge( object({ number, negNumber: number, diff --git a/cases/spectypes/src/tsconfig.json b/cases/spectypes/src/tsconfig.json index 07fa5fb28..1488039a8 100644 --- a/cases/spectypes/src/tsconfig.json +++ b/cases/spectypes/src/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../../tsconfig.json", "compilerOptions": { "module": "commonjs", + "moduleResolution": "Node", "outDir": "../build", "declaration": true, "emitDeclarationOnly": true diff --git a/cases/succulent.ts b/cases/succulent.ts index a4237c270..c95b735b3 100644 --- a/cases/succulent.ts +++ b/cases/succulent.ts @@ -7,7 +7,7 @@ import { $number, $string, } from 'succulent'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; const $LooseType = $interface({ number: $number, diff --git a/cases/superstruct.ts b/cases/superstruct.ts index 75d517d26..773c14a7c 100644 --- a/cases/superstruct.ts +++ b/cases/superstruct.ts @@ -7,7 +7,7 @@ import { string, type, } from 'superstruct'; -import { addCase } from '../benchmarks'; +import { addCase } from '../benchmarks/index.ts'; const dataTypeSafe = type({ number: number(), diff --git a/cases/suretype.ts b/cases/suretype.ts index c9660cc3d..797676a31 100644 --- a/cases/suretype.ts +++ b/cases/suretype.ts @@ -1,5 +1,5 @@ import { v, compile } from 'suretype'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('suretype', 'assertLoose', () => { const dataSchema = v.object({ diff --git a/cases/tiny-schema-validator.ts b/cases/tiny-schema-validator.ts index 902dc87de..61981d6ce 100644 --- a/cases/tiny-schema-validator.ts +++ b/cases/tiny-schema-validator.ts @@ -1,5 +1,5 @@ import { createSchema, _ } from 'tiny-schema-validator'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; // Define the Strict schema with additional property constraints export const Strict = createSchema({ diff --git a/cases/to-typed.ts b/cases/to-typed.ts index a0bf400b1..1030d198d 100644 --- a/cases/to-typed.ts +++ b/cases/to-typed.ts @@ -1,4 +1,4 @@ -import { addCase } from '../benchmarks'; +import { addCase } from '../benchmarks/index.ts'; import { Guard, Cast } from 'to-typed'; const model = { diff --git a/cases/toi.ts b/cases/toi.ts index 390cfd40b..12198abd2 100644 --- a/cases/toi.ts +++ b/cases/toi.ts @@ -1,5 +1,5 @@ import * as toi from '@toi/toi'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('toi', 'parseStrict', () => { const obj = () => toi.required().and(toi.obj.isplain()); diff --git a/cases/ts-auto-guard/index.ts b/cases/ts-auto-guard/index.ts index fd23b988a..fd125df8b 100644 --- a/cases/ts-auto-guard/index.ts +++ b/cases/ts-auto-guard/index.ts @@ -1,5 +1,5 @@ -import { isLoose } from './build/index.guard'; -import { addCase } from '../../benchmarks'; +import { isLoose } from './build/index.guard.js'; +import { addCase } from '../../benchmarks/index.ts'; addCase('ts-auto-guard', 'assertLoose', data => { if (!isLoose(data)) throw new Error('wrong type.'); diff --git a/cases/ts-auto-guard/tsconfig.json b/cases/ts-auto-guard/tsconfig.json index db972bfd4..a1766a83c 100644 --- a/cases/ts-auto-guard/tsconfig.json +++ b/cases/ts-auto-guard/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "module": "commonjs", + "module": "ESNext", "outDir": "build", "strict": true, "strictNullChecks": true, + "allowImportingTsExtensions": false }, "include": ["src/index.ts", "src/index.guard.ts"] } - \ No newline at end of file diff --git a/cases/ts-interface-checker.ts b/cases/ts-interface-checker.ts index 839a08334..b4852ccdd 100644 --- a/cases/ts-interface-checker.ts +++ b/cases/ts-interface-checker.ts @@ -1,5 +1,5 @@ import * as t from 'ts-interface-checker'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('ts-interface-checker', 'assertLoose', () => { const dataType = t.iface([], { diff --git a/cases/ts-json-validator.ts b/cases/ts-json-validator.ts index bc9d615cf..42837ff51 100644 --- a/cases/ts-json-validator.ts +++ b/cases/ts-json-validator.ts @@ -1,5 +1,5 @@ import { createSchema as S, TsjsonParser } from 'ts-json-validator'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('ts-json-validator', 'assertLoose', () => { const parser = new TsjsonParser( diff --git a/cases/ts-runtime-checks/index.ts b/cases/ts-runtime-checks/index.ts index d4eb817c9..8f15467f1 100644 --- a/cases/ts-runtime-checks/index.ts +++ b/cases/ts-runtime-checks/index.ts @@ -1,5 +1,5 @@ -import { assertStrict, assertLoose, parseStrict } from './build'; -import { addCase } from '../../benchmarks'; +import { assertStrict, assertLoose, parseStrict } from './build/index.js'; +import { addCase } from '../../benchmarks/index.ts'; addCase('ts-runtime-checks', 'parseStrict', data => { // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/cases/ts-runtime-checks/src/tsconfig.json b/cases/ts-runtime-checks/src/tsconfig.json index 8a40747a2..07579d093 100644 --- a/cases/ts-runtime-checks/src/tsconfig.json +++ b/cases/ts-runtime-checks/src/tsconfig.json @@ -1,9 +1,10 @@ { "extends": "../../../tsconfig.json", "compilerOptions": { - "module": "commonjs", + "module": "ESNext", "outDir": "../build", - "plugins": [{ "transform": "ts-runtime-checks" }] + "plugins": [{ "transform": "ts-runtime-checks" }], + "allowImportingTsExtensions": false }, "include": ["index.ts"] } diff --git a/cases/ts-utils.ts b/cases/ts-utils.ts index ea6ecaaf2..f9608faa7 100644 --- a/cases/ts-utils.ts +++ b/cases/ts-utils.ts @@ -1,5 +1,10 @@ -import { object, number, boolean, string } from '@ailabs/ts-utils/dist/decoder'; -import { createCase } from '../benchmarks'; +import { + object, + number, + boolean, + string, +} from '@ailabs/ts-utils/dist/decoder.js'; +import { createCase } from '../benchmarks/index.ts'; createCase('ts-utils', 'parseSafe', () => { const dataType = object('Data', { diff --git a/cases/tson.ts b/cases/tson.ts index 38944d04c..7d7e03d26 100644 --- a/cases/tson.ts +++ b/cases/tson.ts @@ -1,5 +1,5 @@ import { t } from '@skarab/tson'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('tson', 'parseSafe', () => { const dataType = t diff --git a/cases/typebox/index.ts b/cases/typebox/index.ts index 8c32d306a..4768e2a9b 100644 --- a/cases/typebox/index.ts +++ b/cases/typebox/index.ts @@ -1,6 +1,6 @@ import { TypeCompiler } from '@sinclair/typebox/compiler'; import type { TSchema } from '@sinclair/typebox'; -import { Loose, Strict } from '../sinclair-typebox'; +import { Loose, Strict } from '../sinclair-typebox.ts'; import { writeFileSync } from 'node:fs'; // typebox assertion routines require a named shim before writing as modules diff --git a/cases/typeofweb-schema.ts b/cases/typeofweb-schema.ts index a832ae553..1385898de 100644 --- a/cases/typeofweb-schema.ts +++ b/cases/typeofweb-schema.ts @@ -1,5 +1,5 @@ import { object, number, string, validate, boolean } from '@typeofweb/schema'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('@typeofweb/schema', 'assertLoose', () => { const dataType = object( diff --git a/cases/typia/index.ts b/cases/typia/index.ts index 55ab85b67..aa71addad 100644 --- a/cases/typia/index.ts +++ b/cases/typia/index.ts @@ -1,5 +1,5 @@ -import { is, equals, clone } from './build'; -import { addCase } from '../../benchmarks'; +import { is, equals, clone } from './build/index.js'; +import { addCase } from '../../benchmarks/index.ts'; addCase('typia', 'parseSafe', data => { if (!is(data)) throw new Error('wrong type.'); diff --git a/cases/typia/tsconfig.json b/cases/typia/tsconfig.json index 8aa00ec5d..24f0298f3 100644 --- a/cases/typia/tsconfig.json +++ b/cases/typia/tsconfig.json @@ -1,9 +1,11 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "module": "commonjs", + "module": "ESNext", + "moduleResolution": "Node", "outDir": "build", "strict": true, + "allowImportingTsExtensions": false, "plugins": [ { "transform": "typia/lib/transform", @@ -13,4 +15,3 @@ }, "include": ["src/index.ts"] } - \ No newline at end of file diff --git a/cases/unknownutil.ts b/cases/unknownutil.ts index f37eb7d48..dd9e874d4 100644 --- a/cases/unknownutil.ts +++ b/cases/unknownutil.ts @@ -1,5 +1,5 @@ import { is, ensure, assert } from 'unknownutil'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; const dataTypeLoose = is.ObjectOf({ number: is.Number, diff --git a/cases/valibot.ts b/cases/valibot.ts index ab4f4c430..921275e82 100644 --- a/cases/valibot.ts +++ b/cases/valibot.ts @@ -1,5 +1,5 @@ import { object, number, string, boolean, parse, strictObject } from 'valibot'; -import { addCase } from '../benchmarks'; +import { addCase } from '../benchmarks/index.ts'; const LooseSchema = object({ number: number(), diff --git a/cases/valita.ts b/cases/valita.ts index 7ec4e174b..3fa429455 100644 --- a/cases/valita.ts +++ b/cases/valita.ts @@ -1,5 +1,5 @@ import * as v from '@badrap/valita'; -import { addCase } from '../benchmarks'; +import { addCase } from '../benchmarks/index.ts'; const dataType = v.object({ number: v.number(), diff --git a/cases/vality.ts b/cases/vality.ts index 3f2d52258..16f71f606 100644 --- a/cases/vality.ts +++ b/cases/vality.ts @@ -1,5 +1,5 @@ import { v, validate } from 'vality'; -import { addCase } from '../benchmarks'; +import { addCase } from '../benchmarks/index.ts'; const dataType = v.object({ number: v.number, diff --git a/cases/yup.ts b/cases/yup.ts index 0889c4e05..bc0390c02 100644 --- a/cases/yup.ts +++ b/cases/yup.ts @@ -1,5 +1,5 @@ import * as yup from 'yup'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('yup', 'assertLoose', () => { const dataType = yup.object({ diff --git a/cases/zod.ts b/cases/zod.ts index e7c24101e..41fc2006d 100644 --- a/cases/zod.ts +++ b/cases/zod.ts @@ -1,5 +1,5 @@ import * as z from 'zod'; -import { createCase } from '../benchmarks'; +import { createCase } from '../benchmarks/index.ts'; createCase('zod', 'parseSafe', () => { const dataType = z.object({ diff --git a/index.ts b/index.ts index 19602d056..79874f86a 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,6 @@ import * as childProcess from 'child_process'; -import * as benchmarks from './benchmarks'; -import * as cases from './cases'; +import * as benchmarks from './benchmarks/index.ts'; +import * as cases from './cases/index.ts'; async function main() { // a runtype lib would be handy here to check the passed command names ;) @@ -46,6 +46,11 @@ async function main() { stdio: 'inherit', }); } + if (c === 'jointz') { + childProcess.execSync('npm run compile:jointz', { + stdio: 'inherit', + }); + } const cmd = [...process.argv.slice(0, 2), 'run-internal', c]; diff --git a/package-lock.json b/package-lock.json index f25d8e209..1413f8378 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "@toi/toi": "1.3.0", "@typeofweb/schema": "0.7.3", "@types/benchmark": "2.1.5", + "@vbudovski/paseri": "npm:@jsr/vbudovski__paseri@0.1.2", "ajv": "8.17.1", "arktype": "2.0.0-dev.12-cjs", "banditypes": "0.2.5", @@ -37,6 +38,7 @@ "computed-types": "1.11.2", "csv-stringify": "6.5.2", "decoders": "1.25.5", + "esbuild": "0.24.2", "fp-ts": "2.16.9", "io-ts": "2.2.22", "jet-schema": "1.4.3", @@ -2221,6 +2223,406 @@ "effect": "^3.9.2" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -3586,6 +3988,27 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/@vbudovski/paseri": { + "name": "@jsr/vbudovski__paseri", + "version": "0.1.2", + "resolved": "https://npm.jsr.io/~/11/@jsr/vbudovski__paseri/0.1.2.tgz", + "integrity": "sha512-DQksJouUSwQr0rBJ19bk+tjKIy8NEOaPFG8lpXhrAZKLm6QBk4ztkPP2rjZPM1xvmLftzx7fXpArUkQuQW6cLg==", + "dependencies": { + "type-fest": "4.30.0" + } + }, + "node_modules/@vbudovski/paseri/node_modules/type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@zeit/schemas": { "version": "2.36.0", "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.36.0.tgz", @@ -5509,6 +5932,46 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -6339,11 +6802,12 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -6396,9 +6860,10 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "license": "MIT", "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -12997,6 +13462,156 @@ "fast-check": "^3.21.0" } }, + "@esbuild/aix-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "optional": true + }, + "@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "optional": true + }, + "@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "optional": true + }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -14057,6 +14672,21 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "@vbudovski/paseri": { + "version": "npm:@jsr/vbudovski__paseri@0.1.2", + "resolved": "https://npm.jsr.io/~/11/@jsr/vbudovski__paseri/0.1.2.tgz", + "integrity": "sha512-DQksJouUSwQr0rBJ19bk+tjKIy8NEOaPFG8lpXhrAZKLm6QBk4ztkPP2rjZPM1xvmLftzx7fXpArUkQuQW6cLg==", + "requires": { + "type-fest": "4.30.0" + }, + "dependencies": { + "type-fest": { + "version": "4.30.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz", + "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==" + } + } + }, "@zeit/schemas": { "version": "2.36.0", "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.36.0.tgz", @@ -15381,6 +16011,38 @@ "is-arrayish": "^0.2.1" } }, + "esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "requires": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, "escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -15960,9 +16622,9 @@ "dev": true }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "optional": true }, @@ -15995,9 +16657,9 @@ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" }, "get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "requires": { "resolve-pkg-maps": "^1.0.0" } diff --git a/package.json b/package.json index 3a6d89013..ba7195c77 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,12 @@ "email": "rf@romanfilippov.com" }, "version": "1.0.0", + "type": "module", "scripts": { "lint": "gts check", "lint:fix": "gts fix", - "start": "ts-node index.ts", - "test:build": "npm run compile:spectypes && npm run compile:ts-runtime-checks && npm run compile:typebox && npm run compile:typia && npm run compile:deepkit && npm run compile:ts-auto-guard && tsc --noEmit", + "start": "NODE_OPTIONS=\"--loader=ts-node/esm\" ts-node index.ts", + "test:build": "npm run compile:spectypes && npm run compile:ts-runtime-checks && npm run compile:typebox && npm run compile:typia && npm run compile:deepkit && npm run compile:ts-auto-guard && npm run compile:jointz && tsc --noEmit", "test": "npm run compile:spectypes && npm run compile:ts-runtime-checks && npm run compile:typebox && npm run compile:typia && npm run compile:deepkit && npm run compile:ts-auto-guard && jest", "docs:serve": "serve docs", "docs:watch": "tsc --project tsconfig.docs.json --watch --preserveWatchOutput & serve docs", @@ -20,9 +21,10 @@ "compile:deepkit": "deepkit-type-install && rimraf cases/deepkit/build && tsc -p cases/deepkit/tsconfig.json", "compile:spectypes": "rimraf cases/spectypes/build && tsc -p cases/spectypes/src && babel cases/spectypes/src --out-dir cases/spectypes/build --extensions \".ts\"", "compile:ts-runtime-checks": "rimraf cases/ts-runtime-checks/build && tsc -p cases/ts-runtime-checks/src", - "compile:typebox": "ts-node cases/typebox/index.ts cases/typebox/build", + "compile:typebox": "NODE_OPTIONS=\"--loader=ts-node/esm\" ts-node cases/typebox/index.ts cases/typebox/build", "compile:typia": "rimraf cases/typia/build && tsc -p cases/typia/tsconfig.json", "compile:ts-auto-guard": "rimraf cases/ts-auto-guard/build && ts-auto-guard --project cases/ts-auto-guard/tsconfig.json && tsc -p cases/ts-auto-guard/tsconfig.json", + "compile:jointz": "rimraf cases/jointz/build && tsc -p cases/jointz/tsconfig.json && esbuild cases/jointz/src/index.ts --bundle --outfile=cases/jointz/build/index.js --platform=neutral", "prepare": "ts-patch install", "download-packages-popularity": "ts-node download-packages-popularity.ts" }, @@ -42,6 +44,7 @@ "@toi/toi": "1.3.0", "@typeofweb/schema": "0.7.3", "@types/benchmark": "2.1.5", + "@vbudovski/paseri": "npm:@jsr/vbudovski__paseri@0.1.2", "ajv": "8.17.1", "arktype": "2.0.0-dev.12-cjs", "banditypes": "0.2.5", @@ -55,6 +58,7 @@ "computed-types": "1.11.2", "csv-stringify": "6.5.2", "decoders": "1.25.5", + "esbuild": "0.24.2", "fp-ts": "2.16.9", "io-ts": "2.2.22", "jet-schema": "1.4.3", diff --git a/test/benchmarks.test.ts b/test/benchmarks.test.ts index 18bec2ee5..cf6800912 100644 --- a/test/benchmarks.test.ts +++ b/test/benchmarks.test.ts @@ -23,6 +23,7 @@ import '../cases/ok-computer'; import '../cases/parse-dont-validate'; import '../cases/pure-parse'; import '../cases/purify-ts'; +import '../cases/paseri'; import '../cases/r-assign'; import '../cases/rescript-schema'; import '../cases/rulr'; diff --git a/tsconfig.json b/tsconfig.json index 289a1ee89..f4c058339 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,15 @@ { "extends": "tsconfigs/nodejs-module", "compilerOptions": { + "moduleResolution": "Bundler", + "module": "ESNext", "lib": ["ES2021", "DOM"], "target": "ES2021", "experimentalDecorators": true, "emitDecoratorMetadata": true, "resolveJsonModule": true, - "skipLibCheck": true + "skipLibCheck": true, + "allowImportingTsExtensions": true }, "include": ["**/*.ts"] }