@wopee-io/wopee.wdio 5.2.5 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/build/domain/model/config.interface.d.ts +15 -60
- package/build/domain/model/config.interface.d.ts.map +1 -1
- package/build/domain/service/wopeeService.d.ts.map +1 -1
- package/build/domain/service/wopeeService.js +2 -0
- package/build/domain/service/wopeeService.js.map +1 -1
- package/build/utils/versionMetadata.d.ts.map +1 -1
- package/build/utils/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.d.ts +1 -7
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.d.ts +1 -23
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.d.ts +1 -5
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.d.ts +1 -7
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.d.ts +3 -11
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.js +1 -1
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.d.ts +1 -7
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/visualAssert.interface.d.ts +3 -11
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/visualAssert.interface.js +1 -1
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/visualAssertPayload.interface.d.ts +1 -9
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.d.ts +9 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.js +30 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/axios-config.d.ts +15 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/axios-config.js +17 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/deadline.d.ts +36 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/deadline.js +63 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/errors.js +10 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.js +1 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.d.ts +41 -224
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.js +16 -8
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/retry.d.ts +52 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/retry.js +122 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.js +3 -7
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloService.interface.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.d.ts +5 -10
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.js +2 -1
- package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.d.ts +10 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.js +8 -0
- package/node_modules/@autonomous-testing/sdk/package.json +2 -2
- package/node_modules/debug/README.md +1 -1
- package/node_modules/debug/package.json +8 -4
- package/node_modules/debug/src/browser.js +2 -1
- package/node_modules/debug/src/common.js +57 -39
- package/node_modules/follow-redirects/README.md +27 -1
- package/node_modules/follow-redirects/index.js +11 -6
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/ms/index.js +1 -1
- package/node_modules/ms/license.md +1 -1
- package/node_modules/ms/package.json +5 -4
- package/node_modules/ms/readme.md +1 -2
- package/node_modules/zod/README.md +34 -24
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +22 -3
- package/node_modules/zod/index.d.cts +3 -4
- package/node_modules/zod/index.d.ts +3 -4
- package/node_modules/zod/index.js +7 -4
- package/node_modules/zod/locales/index.cjs +36 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +51 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +44 -15
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +7 -4
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +23 -13
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/complex.test.ts +17 -3
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +7 -3
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/nan.test.ts +5 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +10 -13
- package/node_modules/zod/src/v3/tests/partials.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +8 -2
- package/node_modules/zod/src/v3/types.ts +8 -6
- package/node_modules/zod/src/v4/classic/checks.ts +3 -0
- package/node_modules/zod/src/v4/classic/compat.ts +30 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +61 -39
- package/node_modules/zod/src/v4/classic/external.ts +18 -11
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +57 -2
- package/node_modules/zod/src/v4/classic/schemas.ts +1258 -375
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +35 -8
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +192 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +43 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +357 -5
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +572 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +704 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +27 -5
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +67 -6
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +37 -17
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +142 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +333 -10
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +394 -4
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +9 -4
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +160 -37
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +134 -5
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +93 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +168 -5
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +4 -3
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +37 -1
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +153 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +15 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +161 -7
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +457 -14
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +255 -12
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +350 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +89 -5
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +25 -5
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +107 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +74 -21
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +1 -69
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +553 -10
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +352 -1
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +229 -68
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +40 -1
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +20 -3
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +16 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +568 -9
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +58 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +70 -16
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3409 -990
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +128 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +353 -5
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -3
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +442 -161
- package/node_modules/zod/src/v4/core/checks.ts +134 -151
- package/node_modules/zod/src/v4/core/compile.ts +2322 -0
- package/node_modules/zod/src/v4/core/core.ts +146 -50
- package/node_modules/zod/src/v4/core/doc.ts +18 -10
- package/node_modules/zod/src/v4/core/errors.ts +221 -102
- package/node_modules/zod/src/v4/core/index.ts +5 -1
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +9 -4
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +252 -37
- package/node_modules/zod/src/v4/core/regexes.ts +112 -30
- package/node_modules/zod/src/v4/core/registries.ts +19 -10
- package/node_modules/zod/src/v4/core/schemas.ts +1972 -588
- package/node_modules/zod/src/v4/core/standard-schema.ts +114 -19
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +1 -1
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +180 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +2 -2
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +706 -826
- package/node_modules/zod/src/v4/core/util.ts +675 -157
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +22 -27
- package/node_modules/zod/src/v4/locales/az.ts +22 -27
- package/node_modules/zod/src/v4/locales/be.ts +31 -27
- package/node_modules/zod/src/v4/locales/bg.ts +133 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +22 -28
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +26 -45
- package/node_modules/zod/src/v4/locales/da.ts +128 -0
- package/node_modules/zod/src/v4/locales/de.ts +24 -27
- package/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +38 -29
- package/node_modules/zod/src/v4/locales/eo.ts +25 -27
- package/node_modules/zod/src/v4/locales/es.ts +53 -33
- package/node_modules/zod/src/v4/locales/fa.ts +24 -27
- package/node_modules/zod/src/v4/locales/fi.ts +22 -27
- package/node_modules/zod/src/v4/locales/fr-CA.ts +22 -27
- package/node_modules/zod/src/v4/locales/fr.ts +58 -43
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +208 -80
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/node_modules/zod/src/v4/locales/hu.ts +24 -28
- package/node_modules/zod/src/v4/locales/hy.ts +175 -0
- package/node_modules/zod/src/v4/locales/id.ts +22 -27
- package/node_modules/zod/src/v4/locales/index.ts +24 -0
- package/node_modules/zod/src/v4/locales/is.ts +124 -0
- package/node_modules/zod/src/v4/locales/it.ts +24 -28
- package/node_modules/zod/src/v4/locales/ja.ts +24 -27
- package/node_modules/zod/src/v4/locales/ka.ts +128 -0
- package/node_modules/zod/src/v4/locales/kh.ts +3 -122
- package/node_modules/zod/src/v4/locales/km.ts +124 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +22 -27
- package/node_modules/zod/src/v4/locales/lt.ts +243 -0
- package/node_modules/zod/src/v4/locales/mk.ts +24 -28
- package/node_modules/zod/src/v4/locales/ms.ts +23 -27
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +37 -37
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +26 -29
- package/node_modules/zod/src/v4/locales/ota.ts +25 -28
- package/node_modules/zod/src/v4/locales/pl.ts +24 -27
- package/node_modules/zod/src/v4/locales/ps.ts +24 -26
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +107 -71
- package/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/node_modules/zod/src/v4/locales/ru.ts +31 -27
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +24 -27
- package/node_modules/zod/src/v4/locales/sv.ts +26 -29
- package/node_modules/zod/src/v4/locales/ta.ts +25 -27
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +25 -27
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +22 -27
- package/node_modules/zod/src/v4/locales/ua.ts +3 -122
- package/node_modules/zod/src/v4/locales/uk.ts +122 -0
- package/node_modules/zod/src/v4/locales/ur.ts +25 -27
- package/node_modules/zod/src/v4/locales/uz.ts +120 -0
- package/node_modules/zod/src/v4/locales/vi.ts +24 -27
- package/node_modules/zod/src/v4/locales/yo.ts +129 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +25 -27
- package/node_modules/zod/src/v4/locales/zh-TW.ts +22 -27
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +5 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +15 -3
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/iso.ts +8 -4
- package/node_modules/zod/src/v4/mini/parse.ts +16 -1
- package/node_modules/zod/src/v4/mini/schemas.ts +586 -114
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +57 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +63 -2
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +582 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +12 -18
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +24 -5
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +7 -36
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +281 -6
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +15 -1
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +116 -9
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +68 -2
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +98 -1
- package/node_modules/zod/src/v4-mini/index.ts +3 -1
- package/node_modules/zod/v3/ZodError.cjs +42 -13
- package/node_modules/zod/v3/ZodError.d.cts +6 -6
- package/node_modules/zod/v3/ZodError.d.ts +6 -6
- package/node_modules/zod/v3/ZodError.js +23 -13
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/locales/en.cjs +1 -0
- package/node_modules/zod/v3/locales/en.d.cts +1 -1
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +28 -5
- package/node_modules/zod/v3/types.d.cts +4 -1
- package/node_modules/zod/v3/types.d.ts +4 -1
- package/node_modules/zod/v3/types.js +9 -5
- package/node_modules/zod/v4/classic/checks.cjs +22 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +24 -1
- package/node_modules/zod/v4/classic/compat.d.cts +13 -11
- package/node_modules/zod/v4/classic/compat.d.ts +13 -11
- package/node_modules/zod/v4/classic/compat.js +4 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +63 -28
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +45 -29
- package/node_modules/zod/v4/classic/external.cjs +55 -28
- package/node_modules/zod/v4/classic/external.d.cts +8 -2
- package/node_modules/zod/v4/classic/external.d.ts +8 -2
- package/node_modules/zod/v4/classic/external.js +7 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -1
- package/node_modules/zod/v4/classic/parse.d.cts +21 -0
- package/node_modules/zod/v4/classic/parse.d.ts +21 -0
- package/node_modules/zod/v4/classic/parse.js +10 -0
- package/node_modules/zod/v4/classic/schemas.cjs +805 -238
- package/node_modules/zod/v4/classic/schemas.d.cts +241 -55
- package/node_modules/zod/v4/classic/schemas.d.ts +241 -55
- package/node_modules/zod/v4/classic/schemas.js +766 -237
- package/node_modules/zod/v4/core/api.cjs +284 -54
- package/node_modules/zod/v4/core/api.d.cts +133 -82
- package/node_modules/zod/v4/core/api.d.ts +133 -82
- package/node_modules/zod/v4/core/api.js +255 -54
- package/node_modules/zod/v4/core/checks.cjs +100 -130
- package/node_modules/zod/v4/core/checks.d.cts +32 -16
- package/node_modules/zod/v4/core/checks.d.ts +32 -16
- package/node_modules/zod/v4/core/checks.js +80 -129
- package/node_modules/zod/v4/core/compile.cjs +1916 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1866 -0
- package/node_modules/zod/v4/core/core.cjs +120 -20
- package/node_modules/zod/v4/core/core.d.cts +40 -7
- package/node_modules/zod/v4/core/core.d.ts +40 -7
- package/node_modules/zod/v4/core/core.js +101 -21
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +4 -2
- package/node_modules/zod/v4/core/doc.d.ts +4 -2
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +151 -60
- package/node_modules/zod/v4/core/errors.d.cts +41 -24
- package/node_modules/zod/v4/core/errors.d.ts +41 -24
- package/node_modules/zod/v4/core/errors.js +132 -60
- package/node_modules/zod/v4/core/index.cjs +28 -2
- package/node_modules/zod/v4/core/index.d.cts +5 -1
- package/node_modules/zod/v4/core/index.d.ts +5 -1
- package/node_modules/zod/v4/core/index.js +5 -1
- package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +6 -4
- package/node_modules/zod/v4/core/json-schema.d.ts +6 -4
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +183 -37
- package/node_modules/zod/v4/core/parse.d.cts +34 -7
- package/node_modules/zod/v4/core/parse.d.ts +34 -7
- package/node_modules/zod/v4/core/parse.js +154 -36
- package/node_modules/zod/v4/core/regexes.cjs +137 -31
- package/node_modules/zod/v4/core/regexes.d.cts +30 -2
- package/node_modules/zod/v4/core/regexes.d.ts +30 -2
- package/node_modules/zod/v4/core/regexes.js +90 -29
- package/node_modules/zod/v4/core/registries.cjs +26 -7
- package/node_modules/zod/v4/core/registries.d.cts +2 -2
- package/node_modules/zod/v4/core/registries.d.ts +2 -2
- package/node_modules/zod/v4/core/registries.js +9 -9
- package/node_modules/zod/v4/core/schemas.cjs +1373 -422
- package/node_modules/zod/v4/core/schemas.d.cts +276 -42
- package/node_modules/zod/v4/core/schemas.d.ts +276 -42
- package/node_modules/zod/v4/core/schemas.js +1341 -422
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +90 -19
- package/node_modules/zod/v4/core/standard-schema.d.ts +90 -19
- package/node_modules/zod/v4/core/to-json-schema.cjs +628 -801
- package/node_modules/zod/v4/core/to-json-schema.d.cts +103 -37
- package/node_modules/zod/v4/core/to-json-schema.d.ts +103 -37
- package/node_modules/zod/v4/core/to-json-schema.js +602 -800
- package/node_modules/zod/v4/core/util.cjs +580 -155
- package/node_modules/zod/v4/core/util.d.cts +98 -1
- package/node_modules/zod/v4/core/util.d.ts +98 -1
- package/node_modules/zod/v4/core/util.js +536 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +20 -24
- package/node_modules/zod/v4/locales/ar.d.cts +2 -1
- package/node_modules/zod/v4/locales/ar.js +19 -24
- package/node_modules/zod/v4/locales/az.cjs +20 -24
- package/node_modules/zod/v4/locales/az.d.cts +2 -1
- package/node_modules/zod/v4/locales/az.js +19 -24
- package/node_modules/zod/v4/locales/be.cjs +29 -24
- package/node_modules/zod/v4/locales/be.d.cts +2 -1
- package/node_modules/zod/v4/locales/be.js +28 -24
- package/node_modules/zod/v4/locales/bg.cjs +152 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +125 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +20 -25
- package/node_modules/zod/v4/locales/ca.d.cts +2 -1
- package/node_modules/zod/v4/locales/ca.js +19 -25
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +24 -42
- package/node_modules/zod/v4/locales/cs.d.cts +2 -1
- package/node_modules/zod/v4/locales/cs.js +23 -42
- package/node_modules/zod/v4/locales/da.cjs +147 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +120 -0
- package/node_modules/zod/v4/locales/de.cjs +22 -24
- package/node_modules/zod/v4/locales/de.d.cts +2 -1
- package/node_modules/zod/v4/locales/de.js +21 -24
- package/node_modules/zod/v4/locales/el.cjs +139 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +112 -0
- package/node_modules/zod/v4/locales/en.cjs +35 -28
- package/node_modules/zod/v4/locales/en.d.cts +2 -2
- package/node_modules/zod/v4/locales/en.d.ts +0 -1
- package/node_modules/zod/v4/locales/en.js +34 -26
- package/node_modules/zod/v4/locales/eo.cjs +23 -26
- package/node_modules/zod/v4/locales/eo.d.cts +2 -2
- package/node_modules/zod/v4/locales/eo.d.ts +0 -1
- package/node_modules/zod/v4/locales/eo.js +22 -24
- package/node_modules/zod/v4/locales/es.cjs +51 -31
- package/node_modules/zod/v4/locales/es.d.cts +2 -1
- package/node_modules/zod/v4/locales/es.js +50 -31
- package/node_modules/zod/v4/locales/fa.cjs +22 -24
- package/node_modules/zod/v4/locales/fa.d.cts +2 -1
- package/node_modules/zod/v4/locales/fa.js +21 -24
- package/node_modules/zod/v4/locales/fi.cjs +20 -24
- package/node_modules/zod/v4/locales/fi.d.cts +2 -1
- package/node_modules/zod/v4/locales/fi.js +19 -24
- package/node_modules/zod/v4/locales/fr-CA.cjs +20 -24
- package/node_modules/zod/v4/locales/fr-CA.d.cts +2 -1
- package/node_modules/zod/v4/locales/fr-CA.js +19 -24
- package/node_modules/zod/v4/locales/fr.cjs +53 -39
- package/node_modules/zod/v4/locales/fr.d.cts +2 -1
- package/node_modules/zod/v4/locales/fr.js +52 -39
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +183 -78
- package/node_modules/zod/v4/locales/he.d.cts +2 -1
- package/node_modules/zod/v4/locales/he.js +182 -78
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +126 -0
- package/node_modules/zod/v4/locales/hu.cjs +22 -25
- package/node_modules/zod/v4/locales/hu.d.cts +2 -1
- package/node_modules/zod/v4/locales/hu.js +21 -25
- package/node_modules/zod/v4/locales/hy.cjs +185 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +158 -0
- package/node_modules/zod/v4/locales/id.cjs +20 -24
- package/node_modules/zod/v4/locales/id.d.cts +2 -1
- package/node_modules/zod/v4/locales/id.js +19 -24
- package/node_modules/zod/v4/locales/index.cjs +69 -1
- package/node_modules/zod/v4/locales/index.d.cts +24 -0
- package/node_modules/zod/v4/locales/index.d.ts +24 -0
- package/node_modules/zod/v4/locales/index.js +24 -0
- package/node_modules/zod/v4/locales/is.cjs +141 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +114 -0
- package/node_modules/zod/v4/locales/it.cjs +22 -25
- package/node_modules/zod/v4/locales/it.d.cts +2 -1
- package/node_modules/zod/v4/locales/it.js +21 -25
- package/node_modules/zod/v4/locales/ja.cjs +22 -24
- package/node_modules/zod/v4/locales/ja.d.cts +2 -1
- package/node_modules/zod/v4/locales/ja.js +21 -24
- package/node_modules/zod/v4/locales/ka.cjs +144 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +117 -0
- package/node_modules/zod/v4/locales/kh.cjs +6 -137
- package/node_modules/zod/v4/locales/kh.d.cts +2 -1
- package/node_modules/zod/v4/locales/kh.d.ts +1 -0
- package/node_modules/zod/v4/locales/kh.js +3 -115
- package/node_modules/zod/v4/locales/km.cjs +142 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +115 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +20 -24
- package/node_modules/zod/v4/locales/ko.d.cts +2 -1
- package/node_modules/zod/v4/locales/ko.js +19 -24
- package/node_modules/zod/v4/locales/lt.cjs +234 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +207 -0
- package/node_modules/zod/v4/locales/mk.cjs +22 -25
- package/node_modules/zod/v4/locales/mk.d.cts +2 -1
- package/node_modules/zod/v4/locales/mk.js +21 -25
- package/node_modules/zod/v4/locales/ms.cjs +21 -24
- package/node_modules/zod/v4/locales/ms.d.cts +2 -1
- package/node_modules/zod/v4/locales/ms.js +20 -24
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +31 -32
- package/node_modules/zod/v4/locales/nl.d.cts +2 -1
- package/node_modules/zod/v4/locales/nl.js +30 -32
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +24 -26
- package/node_modules/zod/v4/locales/no.d.cts +2 -1
- package/node_modules/zod/v4/locales/no.js +23 -26
- package/node_modules/zod/v4/locales/ota.cjs +23 -25
- package/node_modules/zod/v4/locales/ota.d.cts +2 -1
- package/node_modules/zod/v4/locales/ota.js +22 -25
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +22 -24
- package/node_modules/zod/v4/locales/pl.d.cts +2 -1
- package/node_modules/zod/v4/locales/pl.js +21 -24
- package/node_modules/zod/v4/locales/ps.cjs +22 -24
- package/node_modules/zod/v4/locales/ps.d.cts +2 -1
- package/node_modules/zod/v4/locales/ps.js +21 -24
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +95 -68
- package/node_modules/zod/v4/locales/pt.d.cts +2 -1
- package/node_modules/zod/v4/locales/pt.js +94 -68
- package/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +122 -0
- package/node_modules/zod/v4/locales/ru.cjs +29 -24
- package/node_modules/zod/v4/locales/ru.d.cts +2 -1
- package/node_modules/zod/v4/locales/ru.js +28 -24
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +22 -24
- package/node_modules/zod/v4/locales/sl.d.cts +2 -1
- package/node_modules/zod/v4/locales/sl.js +21 -24
- package/node_modules/zod/v4/locales/sv.cjs +24 -26
- package/node_modules/zod/v4/locales/sv.d.cts +2 -1
- package/node_modules/zod/v4/locales/sv.js +23 -26
- package/node_modules/zod/v4/locales/ta.cjs +23 -24
- package/node_modules/zod/v4/locales/ta.d.cts +2 -1
- package/node_modules/zod/v4/locales/ta.js +22 -24
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +23 -24
- package/node_modules/zod/v4/locales/th.d.cts +2 -1
- package/node_modules/zod/v4/locales/th.js +22 -24
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +20 -26
- package/node_modules/zod/v4/locales/tr.d.cts +2 -2
- package/node_modules/zod/v4/locales/tr.d.ts +0 -1
- package/node_modules/zod/v4/locales/tr.js +19 -24
- package/node_modules/zod/v4/locales/ua.cjs +6 -137
- package/node_modules/zod/v4/locales/ua.d.cts +2 -1
- package/node_modules/zod/v4/locales/ua.d.ts +1 -0
- package/node_modules/zod/v4/locales/ua.js +3 -115
- package/node_modules/zod/v4/locales/uk.cjs +140 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +113 -0
- package/node_modules/zod/v4/locales/ur.cjs +23 -24
- package/node_modules/zod/v4/locales/ur.d.cts +2 -1
- package/node_modules/zod/v4/locales/ur.js +22 -24
- package/node_modules/zod/v4/locales/uz.cjs +140 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +113 -0
- package/node_modules/zod/v4/locales/vi.cjs +22 -24
- package/node_modules/zod/v4/locales/vi.d.cts +2 -1
- package/node_modules/zod/v4/locales/vi.js +21 -24
- package/node_modules/zod/v4/locales/yo.cjs +139 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +112 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +23 -24
- package/node_modules/zod/v4/locales/zh-CN.d.cts +2 -1
- package/node_modules/zod/v4/locales/zh-CN.js +22 -24
- package/node_modules/zod/v4/locales/zh-TW.cjs +20 -24
- package/node_modules/zod/v4/locales/zh-TW.d.cts +2 -1
- package/node_modules/zod/v4/locales/zh-TW.js +19 -24
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +24 -0
- package/node_modules/zod/v4/mini/coerce.js +5 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +36 -3
- package/node_modules/zod/v4/mini/external.d.cts +7 -2
- package/node_modules/zod/v4/mini/external.d.ts +7 -2
- package/node_modules/zod/v4/mini/external.js +4 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +27 -4
- package/node_modules/zod/v4/mini/iso.js +8 -4
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +30 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +390 -82
- package/node_modules/zod/v4/mini/schemas.d.cts +156 -32
- package/node_modules/zod/v4/mini/schemas.d.ts +156 -32
- package/node_modules/zod/v4/mini/schemas.js +329 -59
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +35 -1
- package/node_modules/zod/v4-mini/index.d.cts +3 -1
- package/node_modules/zod/v4-mini/index.d.ts +3 -1
- package/node_modules/zod/v4-mini/index.js +3 -1
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +23 -16
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/function.ts +0 -176
- package/node_modules/zod/v4/core/function.cjs +0 -102
- package/node_modules/zod/v4/core/function.d.cts +0 -52
- package/node_modules/zod/v4/core/function.d.ts +0 -52
- package/node_modules/zod/v4/core/function.js +0 -75
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/CHANGELOG.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/LICENSE +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/MIGRATION_GUIDE.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/dist/axios.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/dist/axios.min.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/dist/axios.min.js.map +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/dist/browser/axios.cjs +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/dist/esm/axios.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/dist/esm/axios.min.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/dist/esm/axios.min.js.map +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/dist/node/axios.cjs +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/index.d.cts +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/index.d.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/index.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/adapters/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/adapters/adapters.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/adapters/fetch.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/adapters/http.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/adapters/xhr.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/axios.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/cancel/CancelToken.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/cancel/CanceledError.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/cancel/isCancel.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/Axios.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/AxiosError.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/AxiosHeaders.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/InterceptorManager.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/buildFullPath.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/dispatchRequest.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/mergeConfig.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/methodList.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/setFormDataHeaders.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/settle.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/core/transformData.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/defaults/index.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/defaults/transitional.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/env/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/env/classes/FormData.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/env/data.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/AxiosTransformStream.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/AxiosURLSearchParams.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/Http2Sessions.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/HttpStatusCode.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/ZlibHeaderTransformStream.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/bind.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/buildURL.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/callbackify.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/combineURLs.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/composeSignals.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/cookies.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/deprecatedMethod.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/estimateDataURLDecodedBytes.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/formDataToJSON.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/formDataToStream.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/fromDataURI.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/isAbsoluteURL.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/isAxiosError.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/isURLSameOrigin.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/normalizeURLForProtocolCheck.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/null.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/parseHeaders.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/parseProtocol.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/progressEventReducer.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/readBlob.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/resolveConfig.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/sanitizeHeaderValue.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/shouldBypassProxy.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/speedometer.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/spread.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/throttle.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/toFormData.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/toURLEncodedForm.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/trackStream.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/helpers/validator.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/browser/classes/Blob.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/browser/classes/FormData.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/browser/classes/URLSearchParams.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/browser/index.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/common/utils.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/index.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/node/classes/Buffer.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/node/classes/FormData.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/node/classes/URLSearchParams.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/platform/node/index.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/lib/utils.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/dist/src/index.d.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/dist/src/index.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/dist/src/index.js.map +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/dist/src/promisify.d.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/dist/src/promisify.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/dist/src/promisify.js.map +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/package.json +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/src/index.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk → axios}/node_modules/agent-base/src/promisify.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/agent.d.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/agent.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/agent.js.map +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/index.d.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/index.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/index.js.map +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/node_modules/https-proxy-agent/package.json +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/axios → axios}/package.json +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/form-data → form-data}/CHANGELOG.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/form-data → form-data}/License +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/form-data → form-data}/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/form-data → form-data}/index.d.ts +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/form-data → form-data}/lib/browser.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/form-data → form-data}/lib/form_data.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/form-data → form-data}/lib/populate.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/form-data → form-data}/package.json +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/HISTORY.md +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/LICENSE +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/README.md +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/db.json +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/index.js +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/package.json +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/proxy-from-env → proxy-from-env}/LICENSE +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/proxy-from-env → proxy-from-env}/README.md +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/proxy-from-env → proxy-from-env}/index.cjs +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/proxy-from-env → proxy-from-env}/index.js +0 -0
- /package/node_modules/{@autonomous-testing/sdk/node_modules/proxy-from-env → proxy-from-env}/package.json +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { expect, test } from "vitest";
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
|
|
4
|
+
test("locales - tg", () => {
|
|
5
|
+
z.config(z.locales.tg());
|
|
6
|
+
|
|
7
|
+
const invalidType = z.number().safeParse("a");
|
|
8
|
+
expect(invalidType.error!.issues[0].code).toBe("invalid_type");
|
|
9
|
+
expect(invalidType.error!.issues[0].message).toBe("Вуруди нодуруст: рақам интизор мерафт, сатр гирифта шуд");
|
|
10
|
+
|
|
11
|
+
const invalidType2 = z.string().safeParse(1);
|
|
12
|
+
expect(invalidType2.error!.issues[0].code).toBe("invalid_type");
|
|
13
|
+
expect(invalidType2.error!.issues[0].message).toBe("Вуруди нодуруст: сатр интизор мерафт, рақам гирифта шуд");
|
|
14
|
+
|
|
15
|
+
const invalidValue = z.enum(["a", "b"]).safeParse(1);
|
|
16
|
+
expect(invalidValue.error!.issues[0].code).toBe("invalid_value");
|
|
17
|
+
expect(invalidValue.error!.issues[0].message).toBe('Интихоби нодуруст: яке аз "a"|"b" интизор мерафт');
|
|
18
|
+
|
|
19
|
+
const tooBig = z.number().max(10).safeParse(15);
|
|
20
|
+
expect(tooBig.error!.issues[0].code).toBe("too_big");
|
|
21
|
+
expect(tooBig.error!.issues[0].message).toBe("Хеле калон: number бояд <=10 бошад");
|
|
22
|
+
|
|
23
|
+
const tooSmall = z.number().min(10).safeParse(5);
|
|
24
|
+
expect(tooSmall.error!.issues[0].code).toBe("too_small");
|
|
25
|
+
expect(tooSmall.error!.issues[0].message).toBe("Хеле хурд: number бояд >=10 бошад");
|
|
26
|
+
|
|
27
|
+
// singular units after numerals in Tajik
|
|
28
|
+
const tooShort = z.string().min(5).safeParse("hi");
|
|
29
|
+
expect(tooShort.error!.issues[0].message).toBe("Хеле хурд: string бояд >=5 аломат дошта бошад");
|
|
30
|
+
|
|
31
|
+
const tooFewItems = z.array(z.number()).min(2).safeParse([1]);
|
|
32
|
+
expect(tooFewItems.error!.issues[0].message).toBe("Хеле хурд: array бояд >=2 унсур дошта бошад");
|
|
33
|
+
|
|
34
|
+
const invalidEmail = z.string().email().safeParse("nope");
|
|
35
|
+
expect(invalidEmail.error!.issues[0].code).toBe("invalid_format");
|
|
36
|
+
expect(invalidEmail.error!.issues[0].message).toBe("суроғаи email-и нодуруст");
|
|
37
|
+
|
|
38
|
+
const invalidStart = z.string().startsWith("ab").safeParse("xy");
|
|
39
|
+
expect(invalidStart.error!.issues[0].message).toBe('Сатри нодуруст: бояд бо "ab" оғоз шавад');
|
|
40
|
+
|
|
41
|
+
const invalidRegex = z.string().regex(/abcd/).safeParse("xy");
|
|
42
|
+
expect(invalidRegex.error!.issues[0].message).toContain("мувофиқат кунад");
|
|
43
|
+
|
|
44
|
+
const notMultipleOf = z.number().multipleOf(5).safeParse(7);
|
|
45
|
+
expect(notMultipleOf.error!.issues[0].message).toBe("Рақами нодуруст: бояд ба 5 бе бақия тақсим шавад");
|
|
46
|
+
|
|
47
|
+
const oneUnknownKey = z.strictObject({ a: z.string() }).safeParse({ a: "x", b: 1 });
|
|
48
|
+
expect(oneUnknownKey.error!.issues[0].message).toBe('Калиди номаълум: "b"');
|
|
49
|
+
|
|
50
|
+
const twoUnknownKeys = z.strictObject({ a: z.string() }).safeParse({ a: "x", b: 1, c: 2 });
|
|
51
|
+
expect(twoUnknownKeys.error!.issues[0].message).toBe('Калидҳои номаълум: "b", "c"');
|
|
52
|
+
|
|
53
|
+
const cases: [z.ZodType, unknown, string][] = [
|
|
54
|
+
[z.literal("a"), "b", 'Вуруди нодуруст: "a" интизор мерафт'],
|
|
55
|
+
[z.boolean(), null, "Вуруди нодуруст: boolean интизор мерафт, null гирифта шуд"],
|
|
56
|
+
[z.number(), Number.NaN, "Вуруди нодуруст: рақам интизор мерафт, NaN гирифта шуд"],
|
|
57
|
+
[z.number().lt(10), 10, "Хеле калон: number бояд <10 бошад"],
|
|
58
|
+
[z.number().gt(10), 10, "Хеле хурд: number бояд >10 бошад"],
|
|
59
|
+
[z.string().max(1), "ab", "Хеле калон: string бояд <=1 аломат дошта бошад"],
|
|
60
|
+
[z.set(z.string()).min(1), new Set(), "Хеле хурд: set бояд >=1 унсур дошта бошад"],
|
|
61
|
+
[z.map(z.string(), z.number()).min(1), new Map(), "Хеле хурд: map бояд >=1 сабт дошта бошад"],
|
|
62
|
+
[z.file().min(1), new File([], "empty"), "Хеле хурд: file бояд >=1 байт дошта бошад"],
|
|
63
|
+
[z.string().endsWith("ab"), "xy", 'Сатри нодуруст: бояд бо "ab" анҷом ёбад'],
|
|
64
|
+
[z.string().includes("ab"), "xy", 'Сатри нодуруст: бояд "ab"-ро дар бар гирад'],
|
|
65
|
+
[z.stringFormat("custom", () => false), "xy", "custom-и нодуруст"],
|
|
66
|
+
[z.union([z.string(), z.number()]), null, "Вуруди нодуруст"],
|
|
67
|
+
[
|
|
68
|
+
z.discriminatedUnion("kind", [z.object({ kind: z.literal("a") }), z.object({ kind: z.literal("b") })]),
|
|
69
|
+
{ kind: "c" },
|
|
70
|
+
"Қимати нодурусти дискриминатор: 'a' | 'b' интизор мерафт",
|
|
71
|
+
],
|
|
72
|
+
[z.record(z.string().min(2), z.number()), { a: 1 }, "Калиди нодуруст дар record"],
|
|
73
|
+
[z.map(z.string(), z.number()), new Map([[{}, 1]]), "Калиди нодуруст дар map"],
|
|
74
|
+
[z.map(z.object({}), z.number()), new Map([[{}, "a"]]), "Қимати нодуруст дар map"],
|
|
75
|
+
[z.custom(() => false), "a", "Вуруди нодуруст"],
|
|
76
|
+
];
|
|
77
|
+
for (const [schema, input, message] of cases) {
|
|
78
|
+
expect(schema.safeParse(input).error!.issues[0].message).toBe(message);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
expect(z.object({ name: z.string().min(1), age: z.number().min(0) }).parse({ name: "Ali", age: 30 })).toEqual({
|
|
82
|
+
name: "Ali",
|
|
83
|
+
age: 30,
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { expect, test } from "vitest";
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
import { parsedType } from "../../util.js";
|
|
4
|
+
|
|
5
|
+
test("parsedType", () => {
|
|
6
|
+
expect(parsedType("string")).toBe("string");
|
|
7
|
+
expect(parsedType(1)).toBe("number");
|
|
8
|
+
expect(parsedType(true)).toBe("boolean");
|
|
9
|
+
expect(parsedType(null)).toBe("null");
|
|
10
|
+
expect(parsedType(undefined)).toBe("undefined");
|
|
11
|
+
expect(parsedType([])).toBe("array");
|
|
12
|
+
expect(parsedType({})).toBe("object");
|
|
13
|
+
expect(parsedType(new Date())).toBe("Date");
|
|
14
|
+
expect(parsedType(new Map())).toBe("Map");
|
|
15
|
+
expect(parsedType(new Set())).toBe("Set");
|
|
16
|
+
expect(parsedType(new Error())).toBe("Error");
|
|
17
|
+
|
|
18
|
+
const nullPrototype = Object.create(null);
|
|
19
|
+
expect(parsedType(nullPrototype)).toBe("object");
|
|
20
|
+
|
|
21
|
+
const doubleNullPrototype = Object.create(Object.create(null));
|
|
22
|
+
expect(parsedType(doubleNullPrototype)).toBe("object");
|
|
23
|
+
|
|
24
|
+
expect(parsedType(Number.NaN)).toBe("nan");
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test("locales - tk", () => {
|
|
28
|
+
z.config(z.locales.tk());
|
|
29
|
+
|
|
30
|
+
const invalidType = z.number().safeParse("a");
|
|
31
|
+
expect(invalidType.error!.issues[0].code).toBe("invalid_type");
|
|
32
|
+
expect(invalidType.error!.issues[0].message).toBe("Nädogry baha: garaşylan number ýerine string alyndy");
|
|
33
|
+
|
|
34
|
+
const invalidType2 = z.string().safeParse(1);
|
|
35
|
+
expect(invalidType2.error!.issues[0].code).toBe("invalid_type");
|
|
36
|
+
expect(invalidType2.error!.issues[0].message).toBe("Nädogry baha: garaşylan string ýerine number alyndy");
|
|
37
|
+
|
|
38
|
+
const invalidValue = z.enum(["a", "b"]).safeParse(1);
|
|
39
|
+
expect(invalidValue.error!.issues[0].code).toBe("invalid_value");
|
|
40
|
+
expect(invalidValue.error!.issues[0].message).toBe('Nädogry saýlaw: aşakdakylardan biri bolmaly: "a"|"b"');
|
|
41
|
+
|
|
42
|
+
const tooBig = z.number().max(10).safeParse(15);
|
|
43
|
+
expect(tooBig.error!.issues[0].code).toBe("too_big");
|
|
44
|
+
expect(tooBig.error!.issues[0].message).toBe("Has uly: garaşylýan number <= 10");
|
|
45
|
+
|
|
46
|
+
const tooSmall = z.number().min(10).safeParse(5);
|
|
47
|
+
expect(tooSmall.error!.issues[0].code).toBe("too_small");
|
|
48
|
+
expect(tooSmall.error!.issues[0].message).toBe("Has kiçi: garaşylýan number >= 10");
|
|
49
|
+
|
|
50
|
+
const invalidFormatRegex = z.string().regex(/abcd/).safeParse("invalid-string");
|
|
51
|
+
expect(invalidFormatRegex.error!.issues[0].code).toBe("invalid_format");
|
|
52
|
+
expect(invalidFormatRegex.error!.issues[0].message).toBe("Nädogry setir: /abcd/ nusga laýyk bolmaly");
|
|
53
|
+
|
|
54
|
+
const invalidFormatStartsWith = z.string().startsWith("abcd").safeParse("invalid-string");
|
|
55
|
+
expect(invalidFormatStartsWith.error!.issues[0].code).toBe("invalid_format");
|
|
56
|
+
expect(invalidFormatStartsWith.error!.issues[0].message).toBe('Nädogry setir: "abcd" bilen başlamaly');
|
|
57
|
+
|
|
58
|
+
const notMultipleOf = z.number().multipleOf(3).safeParse(10);
|
|
59
|
+
expect(notMultipleOf.error!.issues[0].code).toBe("not_multiple_of");
|
|
60
|
+
expect(notMultipleOf.error!.issues[0].message).toBe("Nädogry san: 3 bilen galyndysyz bölünmeli");
|
|
61
|
+
|
|
62
|
+
const unrecognizedKeys = z.object({ a: z.string(), b: z.number() }).strict().safeParse({ a: "a", b: 1, c: 2 });
|
|
63
|
+
expect(unrecognizedKeys.error!.issues[0].code).toBe("unrecognized_keys");
|
|
64
|
+
expect(unrecognizedKeys.error!.issues[0].message).toBe('Tanalmaýan açar: "c"');
|
|
65
|
+
|
|
66
|
+
const invalidUnion = z.union([z.string(), z.number()]).safeParse(true);
|
|
67
|
+
expect(invalidUnion.error!.issues[0].code).toBe("invalid_union");
|
|
68
|
+
expect(invalidUnion.error!.issues[0].message).toBe("Nädogry baha");
|
|
69
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expect, test } from "vitest";
|
|
2
2
|
import * as z from "zod/v4";
|
|
3
|
-
import { parsedType } from "
|
|
3
|
+
import { parsedType } from "../../util.js";
|
|
4
4
|
|
|
5
5
|
test("parsedType", () => {
|
|
6
6
|
expect(parsedType("string")).toBe("string");
|
|
@@ -21,7 +21,7 @@ test("parsedType", () => {
|
|
|
21
21
|
const doubleNullPrototype = Object.create(Object.create(null));
|
|
22
22
|
expect(parsedType(doubleNullPrototype)).toBe("object");
|
|
23
23
|
|
|
24
|
-
expect(parsedType(Number.NaN)).toBe("
|
|
24
|
+
expect(parsedType(Number.NaN)).toBe("nan");
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
test("locales - tr", () => {
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { expect, test } from "vitest";
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
|
|
4
|
+
test("locales - uz", () => {
|
|
5
|
+
z.config(z.locales.uz());
|
|
6
|
+
|
|
7
|
+
const invalidType = z.number().safeParse("a");
|
|
8
|
+
expect(invalidType.error!.issues[0].code).toBe("invalid_type");
|
|
9
|
+
expect(invalidType.error!.issues[0].message).toBe("Noto‘g‘ri kirish: kutilgan raqam, qabul qilingan string");
|
|
10
|
+
|
|
11
|
+
const invalidType2 = z.string().safeParse(1);
|
|
12
|
+
expect(invalidType2.error!.issues[0].code).toBe("invalid_type");
|
|
13
|
+
expect(invalidType2.error!.issues[0].message).toBe("Noto‘g‘ri kirish: kutilgan string, qabul qilingan raqam");
|
|
14
|
+
|
|
15
|
+
const invalidValue = z.enum(["a", "b"]).safeParse(1);
|
|
16
|
+
expect(invalidValue.error!.issues[0].code).toBe("invalid_value");
|
|
17
|
+
expect(invalidValue.error!.issues[0].message).toBe('Noto‘g‘ri variant: quyidagilardan biri kutilgan "a"|"b"');
|
|
18
|
+
|
|
19
|
+
const tooBig = z.number().max(10).safeParse(15);
|
|
20
|
+
expect(tooBig.error!.issues[0].code).toBe("too_big");
|
|
21
|
+
expect(tooBig.error!.issues[0].message).toBe("Juda katta: kutilgan number <=10");
|
|
22
|
+
|
|
23
|
+
const tooSmall = z.number().min(10).safeParse(5);
|
|
24
|
+
expect(tooSmall.error!.issues[0].code).toBe("too_small");
|
|
25
|
+
expect(tooSmall.error!.issues[0].message).toBe("Juda kichik: kutilgan number >=10");
|
|
26
|
+
|
|
27
|
+
const invalidFormatRegex = z.string().regex(/abcd/).safeParse("invalid-string");
|
|
28
|
+
expect(invalidFormatRegex.error!.issues[0].code).toBe("invalid_format");
|
|
29
|
+
expect(invalidFormatRegex.error!.issues[0].message).toContain("shabloniga mos kelishi kerak");
|
|
30
|
+
|
|
31
|
+
const invalidFormatStartsWith = z.string().startsWith("abcd").safeParse("invalid-string");
|
|
32
|
+
expect(invalidFormatStartsWith.error!.issues[0].code).toBe("invalid_format");
|
|
33
|
+
expect(invalidFormatStartsWith.error!.issues[0].message).toContain('"abcd" bilan boshlanishi kerak');
|
|
34
|
+
|
|
35
|
+
const notMultipleOf = z.number().multipleOf(3).safeParse(10);
|
|
36
|
+
expect(notMultipleOf.error!.issues[0].code).toBe("not_multiple_of");
|
|
37
|
+
expect(notMultipleOf.error!.issues[0].message).toContain("3 ning karralisi bo‘lishi kerak");
|
|
38
|
+
|
|
39
|
+
const unrecognizedKeys = z.object({ a: z.string(), b: z.number() }).strict().safeParse({ a: "a", b: 1, c: 2 });
|
|
40
|
+
expect(unrecognizedKeys.error!.issues[0].code).toBe("unrecognized_keys");
|
|
41
|
+
expect(unrecognizedKeys.error!.issues[0].message).toContain('Noma’lum kalit: "c"');
|
|
42
|
+
|
|
43
|
+
const invalidUnion = z.union([z.string(), z.number()]).safeParse(true);
|
|
44
|
+
expect(invalidUnion.error!.issues[0].code).toBe("invalid_union");
|
|
45
|
+
expect(invalidUnion.error!.issues[0].message).toBe("Noto‘g‘ri kirish");
|
|
46
|
+
|
|
47
|
+
const tooBigString = z.string().max(5).safeParse("too long string");
|
|
48
|
+
expect(tooBigString.error!.issues[0].code).toBe("too_big");
|
|
49
|
+
expect(tooBigString.error!.issues[0].message).toContain("belgi");
|
|
50
|
+
expect(tooBigString.error!.issues[0].message).toContain("bo‘lishi kerak");
|
|
51
|
+
|
|
52
|
+
const tooSmallArray = z.array(z.string()).min(3).safeParse(["a", "b"]);
|
|
53
|
+
expect(tooSmallArray.error!.issues[0].code).toBe("too_small");
|
|
54
|
+
expect(tooSmallArray.error!.issues[0].message).toContain("element");
|
|
55
|
+
expect(tooSmallArray.error!.issues[0].message).toContain("bo‘lishi kerak");
|
|
56
|
+
|
|
57
|
+
const invalidFormatEndsWith = z.string().endsWith("xyz").safeParse("invalid-string");
|
|
58
|
+
expect(invalidFormatEndsWith.error!.issues[0].code).toBe("invalid_format");
|
|
59
|
+
expect(invalidFormatEndsWith.error!.issues[0].message).toContain('"xyz" bilan tugashi kerak');
|
|
60
|
+
|
|
61
|
+
const invalidFormatIncludes = z.string().includes("test").safeParse("invalid-string");
|
|
62
|
+
expect(invalidFormatIncludes.error!.issues[0].code).toBe("invalid_format");
|
|
63
|
+
expect(invalidFormatIncludes.error!.issues[0].message).toContain('"test" ni o‘z ichiga olishi kerak');
|
|
64
|
+
|
|
65
|
+
const invalidFormatEmail = z.string().email().safeParse("invalid-email");
|
|
66
|
+
expect(invalidFormatEmail.error!.issues[0].code).toBe("invalid_format");
|
|
67
|
+
expect(invalidFormatEmail.error!.issues[0].message).toContain("elektron pochta manzili");
|
|
68
|
+
|
|
69
|
+
const invalidFormatUrl = z.string().url().safeParse("invalid-url");
|
|
70
|
+
expect(invalidFormatUrl.error!.issues[0].code).toBe("invalid_format");
|
|
71
|
+
expect(invalidFormatUrl.error!.issues[0].message).toContain("URL");
|
|
72
|
+
|
|
73
|
+
const unrecognizedKeysMultiple = z
|
|
74
|
+
.object({ a: z.string(), b: z.number() })
|
|
75
|
+
.strict()
|
|
76
|
+
.safeParse({ a: "a", b: 1, c: 2, d: 3 });
|
|
77
|
+
expect(unrecognizedKeysMultiple.error!.issues[0].code).toBe("unrecognized_keys");
|
|
78
|
+
expect(unrecognizedKeysMultiple.error!.issues[0].message).toContain("Noma’lum kalitlar");
|
|
79
|
+
|
|
80
|
+
const invalidElement = z.array(z.string()).safeParse([1, 2, 3]);
|
|
81
|
+
expect(invalidElement.error!.issues[0].code).toBe("invalid_type");
|
|
82
|
+
expect(invalidElement.error!.issues[0].message).toContain("raqam");
|
|
83
|
+
|
|
84
|
+
const tooSmallMap = z
|
|
85
|
+
.map(z.string(), z.string())
|
|
86
|
+
.min(3)
|
|
87
|
+
.safeParse(new Map([["a", "b"]]));
|
|
88
|
+
expect(tooSmallMap.error!.issues[0].code).toBe("too_small");
|
|
89
|
+
expect(tooSmallMap.error!.issues[0].message).toContain("yozuv");
|
|
90
|
+
expect(tooSmallMap.error!.issues[0].message).toContain("bo‘lishi kerak");
|
|
91
|
+
|
|
92
|
+
const tooBigMap = z
|
|
93
|
+
.map(z.string(), z.string())
|
|
94
|
+
.max(2)
|
|
95
|
+
.safeParse(
|
|
96
|
+
new Map([
|
|
97
|
+
["a", "b"],
|
|
98
|
+
["c", "d"],
|
|
99
|
+
["e", "f"],
|
|
100
|
+
])
|
|
101
|
+
);
|
|
102
|
+
expect(tooBigMap.error!.issues[0].code).toBe("too_big");
|
|
103
|
+
expect(tooBigMap.error!.issues[0].message).toContain("yozuv");
|
|
104
|
+
expect(tooBigMap.error!.issues[0].message).toContain("bo‘lishi kerak");
|
|
105
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { build, transform } from "esbuild";
|
|
4
|
+
import { expect, test } from "vitest";
|
|
5
|
+
import * as core from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
// Browser polyfills for node globals land as raw text in the bundle's top scope — an esbuild `banner`, a scope-unaware injector — so the bundler never sees the collision and the browser is the first thing to read both declarations. zod must therefore declare none of these names at module scope. The JSON Schema pass shipped an `export function process` for three minors before #6397 reported the white screen it caused.
|
|
8
|
+
const INJECTED = ["process", "Buffer", "global", "__dirname", "__filename"];
|
|
9
|
+
|
|
10
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const CLASSIC = path.resolve(here, "../../../index.ts");
|
|
12
|
+
const MINI = path.resolve(here, "../../../mini/index.ts");
|
|
13
|
+
|
|
14
|
+
const polyfills = INJECTED.map((name) => `const ${name} = {};`).join("\n");
|
|
15
|
+
|
|
16
|
+
// toJSONSchema has to be reachable: a bundle that only parses a schema tree-shakes the offending module away and would pass no matter what it declares. `z.core.process` is the pre-rename export name, read as a namespace property so the entry itself declares no `process` binding.
|
|
17
|
+
const ENTRY = `import * as z from "%ENTRY%";\nglobalThis.__out = [z.toJSONSchema(z.string()), z.core.process];`;
|
|
18
|
+
|
|
19
|
+
test.each([
|
|
20
|
+
["classic", CLASSIC],
|
|
21
|
+
["mini", MINI],
|
|
22
|
+
])(
|
|
23
|
+
"a %s bundle reaching toJSONSchema parses beside polyfilled node globals",
|
|
24
|
+
async (_flavor, entrypoint) => {
|
|
25
|
+
const result = await build({
|
|
26
|
+
stdin: { contents: ENTRY.replace("%ENTRY%", entrypoint), loader: "ts", resolveDir: here },
|
|
27
|
+
bundle: true,
|
|
28
|
+
format: "esm",
|
|
29
|
+
target: "es2020",
|
|
30
|
+
write: false,
|
|
31
|
+
logLevel: "silent",
|
|
32
|
+
banner: { js: polyfills },
|
|
33
|
+
});
|
|
34
|
+
const out = result.outputFiles[0]!.text;
|
|
35
|
+
|
|
36
|
+
expect(out).toContain("https://json-schema.org/draft/2020-12/schema");
|
|
37
|
+
|
|
38
|
+
// the banner is appended after esbuild has already renamed its own symbols, so this second pass is where a duplicate surfaces: `The symbol "process" has already been declared`
|
|
39
|
+
await expect(transform(out, { loader: "js", format: "esm" })).resolves.toBeTruthy();
|
|
40
|
+
},
|
|
41
|
+
30000
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
test("the pre-rename `process` export still resolves to the helper", () => {
|
|
45
|
+
expect(core.process).toBe(core.processSchema);
|
|
46
|
+
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { expect, test } from "vitest";
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
|
|
4
|
+
test("record should parse objects with non-function constructor field", () => {
|
|
5
|
+
const schema = z.record(z.string(), z.any());
|
|
6
|
+
|
|
7
|
+
expect(() => schema.parse({ constructor: "string", key: "value" })).not.toThrow();
|
|
8
|
+
|
|
9
|
+
const result1 = schema.parse({ constructor: "string", key: "value" });
|
|
10
|
+
expect(result1).toEqual({ constructor: "string", key: "value" });
|
|
11
|
+
|
|
12
|
+
expect(() => schema.parse({ constructor: 123, key: "value" })).not.toThrow();
|
|
13
|
+
|
|
14
|
+
const result2 = schema.parse({ constructor: 123, key: "value" });
|
|
15
|
+
expect(result2).toEqual({ constructor: 123, key: "value" });
|
|
16
|
+
|
|
17
|
+
expect(() => schema.parse({ constructor: null, key: "value" })).not.toThrow();
|
|
18
|
+
|
|
19
|
+
const result3 = schema.parse({ constructor: null, key: "value" });
|
|
20
|
+
expect(result3).toEqual({ constructor: null, key: "value" });
|
|
21
|
+
|
|
22
|
+
expect(() => schema.parse({ constructor: {}, key: "value" })).not.toThrow();
|
|
23
|
+
|
|
24
|
+
const result4 = schema.parse({ constructor: {}, key: "value" });
|
|
25
|
+
expect(result4).toEqual({ constructor: {}, key: "value" });
|
|
26
|
+
|
|
27
|
+
expect(() => schema.parse({ constructor: [], key: "value" })).not.toThrow();
|
|
28
|
+
|
|
29
|
+
const result5 = schema.parse({ constructor: [], key: "value" });
|
|
30
|
+
expect(result5).toEqual({ constructor: [], key: "value" });
|
|
31
|
+
|
|
32
|
+
expect(() => schema.parse({ constructor: true, key: "value" })).not.toThrow();
|
|
33
|
+
|
|
34
|
+
const result6 = schema.parse({ constructor: true, key: "value" });
|
|
35
|
+
expect(result6).toEqual({ constructor: true, key: "value" });
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test("record should still work with normal objects", () => {
|
|
39
|
+
const schema = z.record(z.string(), z.string());
|
|
40
|
+
|
|
41
|
+
expect(() => schema.parse({ normalKey: "value" })).not.toThrow();
|
|
42
|
+
|
|
43
|
+
const result1 = schema.parse({ normalKey: "value" });
|
|
44
|
+
expect(result1).toEqual({ normalKey: "value" });
|
|
45
|
+
|
|
46
|
+
expect(() => schema.parse({ key1: "value1", key2: "value2" })).not.toThrow();
|
|
47
|
+
|
|
48
|
+
const result2 = schema.parse({ key1: "value1", key2: "value2" });
|
|
49
|
+
expect(result2).toEqual({ key1: "value1", key2: "value2" });
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test("record should validate values according to schema even with constructor field", () => {
|
|
53
|
+
const stringSchema = z.record(z.string(), z.string());
|
|
54
|
+
|
|
55
|
+
expect(() => stringSchema.parse({ constructor: "string", key: "value" })).not.toThrow();
|
|
56
|
+
|
|
57
|
+
expect(() => stringSchema.parse({ constructor: 123, key: "value" })).toThrow();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test("record should work with different key types and constructor field", () => {
|
|
61
|
+
const enumSchema = z.record(z.enum(["constructor", "key"]), z.string());
|
|
62
|
+
|
|
63
|
+
expect(() => enumSchema.parse({ constructor: "value1", key: "value2" })).not.toThrow();
|
|
64
|
+
|
|
65
|
+
const result = enumSchema.parse({ constructor: "value1", key: "value2" });
|
|
66
|
+
expect(result).toEqual({ constructor: "value1", key: "value2" });
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("record should skip non-enumerable own properties", () => {
|
|
70
|
+
const schema = z.record(z.string(), z.string());
|
|
71
|
+
|
|
72
|
+
const input = { key: "value" };
|
|
73
|
+
Object.defineProperty(input, "~standard", {
|
|
74
|
+
value: { validate: () => {}, vendor: "zod", version: 1 },
|
|
75
|
+
enumerable: false,
|
|
76
|
+
writable: false,
|
|
77
|
+
configurable: false,
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const result = schema.safeParse(input);
|
|
81
|
+
expect(result.success).toBe(true);
|
|
82
|
+
if (result.success) {
|
|
83
|
+
expect(result.data).toEqual({ key: "value" });
|
|
84
|
+
expect("~standard" in result.data).toBe(false);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
test("record fails on enumerable invalid values even when non-enumerable properties are present", () => {
|
|
89
|
+
const schema = z.record(z.string(), z.string());
|
|
90
|
+
|
|
91
|
+
const input = { key: "value", bad: 123 };
|
|
92
|
+
Object.defineProperty(input, "hidden", {
|
|
93
|
+
value: "should be ignored",
|
|
94
|
+
enumerable: false,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const result = schema.safeParse(input);
|
|
98
|
+
expect(result.success).toBe(false);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
test("record validates enumerable Symbol keys and skips non-enumerable Symbol keys", () => {
|
|
102
|
+
const enumerableSym = Symbol.for("included");
|
|
103
|
+
const nonEnumerableSym = Symbol.for("hidden");
|
|
104
|
+
const schema = z.record(z.symbol(), z.string());
|
|
105
|
+
|
|
106
|
+
const input: Record<symbol, unknown> = { [enumerableSym]: "value" };
|
|
107
|
+
Object.defineProperty(input, nonEnumerableSym, {
|
|
108
|
+
value: 123,
|
|
109
|
+
enumerable: false,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const result = schema.safeParse(input);
|
|
113
|
+
expect(result.success).toBe(true);
|
|
114
|
+
if (result.success) {
|
|
115
|
+
expect(result.data[enumerableSym]).toBe("value");
|
|
116
|
+
expect(Object.prototype.hasOwnProperty.call(result.data, nonEnumerableSym)).toBe(false);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test("z.json() accepts z.toJSONSchema() output (issue #5714)", () => {
|
|
121
|
+
const schema = z.object({ name: z.string() });
|
|
122
|
+
const jsonSchema = z.toJSONSchema(schema);
|
|
123
|
+
|
|
124
|
+
expect(z.json().safeParse(jsonSchema).success).toBe(true);
|
|
125
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import * as z from "zod/v4";
|
|
3
|
+
|
|
4
|
+
describe("Recursive Tuples Regression #5089", () => {
|
|
5
|
+
it("creates recursive tuple without crash", () => {
|
|
6
|
+
expect(() => {
|
|
7
|
+
const y = z.lazy((): any => z.tuple([y, y]).or(z.string()));
|
|
8
|
+
}).not.toThrow();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it("parses recursive tuple data correctly", () => {
|
|
12
|
+
const y = z.lazy((): any => z.tuple([y, y]).or(z.string()));
|
|
13
|
+
|
|
14
|
+
// Base case
|
|
15
|
+
expect(y.parse("hello")).toBe("hello");
|
|
16
|
+
|
|
17
|
+
// Recursive cases
|
|
18
|
+
expect(() => y.parse(["a", "b"])).not.toThrow();
|
|
19
|
+
expect(() => y.parse(["a", ["b", "c"]])).not.toThrow();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it("matches #5089 expected behavior", () => {
|
|
23
|
+
// Exact code from the issue
|
|
24
|
+
expect(() => {
|
|
25
|
+
const y = z.lazy((): any => z.tuple([y, y]).or(z.string()));
|
|
26
|
+
y.parse(["a", ["b", "c"]]);
|
|
27
|
+
}).not.toThrow();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("handles workaround pattern", () => {
|
|
31
|
+
// Alternative pattern from issue discussion
|
|
32
|
+
expect(() => {
|
|
33
|
+
const y = z.lazy((): any => z.string().or(z.lazy(() => z.tuple([y, y]))));
|
|
34
|
+
y.parse(["a", ["b", "c"]]);
|
|
35
|
+
}).not.toThrow();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("recursive arrays still work (comparison)", () => {
|
|
39
|
+
const y = z.lazy((): any => z.array(y).or(z.string()));
|
|
40
|
+
|
|
41
|
+
expect(y.parse("hello")).toBe("hello");
|
|
42
|
+
expect(y.parse(["hello", "world"])).toEqual(["hello", "world"]);
|
|
43
|
+
expect(y.parse(["a", ["b", "c"]])).toEqual(["a", ["b", "c"]]);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { build } from "esbuild";
|
|
4
|
+
import { expect, test } from "vitest";
|
|
5
|
+
|
|
6
|
+
// These declarations are unreachable from a minimal schema, but esbuild only drops them because of details that read as noise: `@__PURE__` annotations, and the `anchor()` helper in regexes.ts that exists solely because esbuild will not drop an annotated call whose argument interpolates a variable. Inlining the helper or deleting an annotation silently puts them back with no other test going red.
|
|
7
|
+
//
|
|
8
|
+
// Rollup drops all of these regardless, so a rollup fixture would report no difference and prove nothing. This has to run under esbuild.
|
|
9
|
+
|
|
10
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const MINI = path.resolve(here, "../../../mini/index.ts");
|
|
12
|
+
const CLASSIC = path.resolve(here, "../../../index.ts");
|
|
13
|
+
|
|
14
|
+
async function bundle(entrypoint: string, source: string): Promise<string> {
|
|
15
|
+
const result = await build({
|
|
16
|
+
stdin: {
|
|
17
|
+
contents: source.replace("%ENTRY%", entrypoint),
|
|
18
|
+
loader: "ts",
|
|
19
|
+
resolveDir: here,
|
|
20
|
+
},
|
|
21
|
+
bundle: true,
|
|
22
|
+
minify: true,
|
|
23
|
+
format: "esm",
|
|
24
|
+
target: "es2020",
|
|
25
|
+
treeShaking: true,
|
|
26
|
+
write: false,
|
|
27
|
+
logLevel: "silent",
|
|
28
|
+
});
|
|
29
|
+
return result.outputFiles[0]!.text;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
test("a minimal zod/mini schema drops the declarations it cannot reach", async () => {
|
|
33
|
+
const out = await bundle(MINI, `import * as z from "%ENTRY%";\nconsole.log(z.boolean().parse(true));`);
|
|
34
|
+
|
|
35
|
+
// Sanity check: the schema itself is present, so an empty bundle cannot pass this test.
|
|
36
|
+
expect(out).toContain("boolean");
|
|
37
|
+
|
|
38
|
+
expect(out, "core.ts `$brand` lost its @__PURE__ annotation").not.toContain("zod_brand");
|
|
39
|
+
expect(out, "util.ts `NUMBER_FORMAT_RANGES` escaped its @__PURE__ IIFE").not.toContain("MAX_SAFE_INTEGER");
|
|
40
|
+
expect(out, "regexes.ts `date` is pinned again — was `anchor()` inlined?").not.toContain("02-29");
|
|
41
|
+
}, 30000);
|
|
42
|
+
|
|
43
|
+
// `registries.ts` is dropped from the mini module graph entirely, so its two symbols are absent there before and after. Classic is the entrypoint that exercises them.
|
|
44
|
+
test("a minimal classic schema drops the registry symbols", async () => {
|
|
45
|
+
const out = await bundle(CLASSIC, `import * as z from "%ENTRY%";\nconsole.log(z.boolean().parse(true));`);
|
|
46
|
+
|
|
47
|
+
expect(out).toContain("boolean");
|
|
48
|
+
|
|
49
|
+
expect(out, "registries.ts `$output` lost its @__PURE__ annotation").not.toContain("ZodOutput");
|
|
50
|
+
expect(out, "registries.ts `$input` lost its @__PURE__ annotation").not.toContain("ZodInput");
|
|
51
|
+
}, 30000);
|