Repository: colinhacks/zod
Pull request #4808 (2025-07-03 02:50:16)

Move source to `/src`
- **Add src dir**
- **Update tsconfig and package.json**
- **Tweaks**
- **Remove postbuld**
- **Tweak prepush**
- **Update workflows**
- **Test**
- **Fix tests and resolution**



Patch:
diff --git a/.configs/tsconfig.base.json b/.configs/tsconfig.base.json
index 6b422b2a..ec55f2bb 100644
--- a/.configs/tsconfig.base.json
+++ b/.configs/tsconfig.base.json
@@ -8,7 +8,7 @@
 
     "strict": true,
     "alwaysStrict": true,
-    "noUncheckedIndexedAccess": true,
+    "noUncheckedIndexedAccess": false,
 
     "exactOptionalPropertyTypes": true,
     "skipLibCheck": true,
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 702a1070..d63f5ce8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -33,7 +33,7 @@ jobs:
       - run: pnpm install
       - run: pnpm build
       - run: pnpm test
-      - run: pnpm run --filter @zod/resolution test
+      - run: pnpm run --filter @zod/resolution test:all
       
       - id: publish
         name: Publish to NPM
diff --git a/.husky/pre-push b/.husky/pre-push
index 734a35a4..93ab5958 100755
--- a/.husky/pre-push
+++ b/.husky/pre-push
@@ -5,5 +5,3 @@ if [ -n "$(git ls-files --others --exclude-standard)" ]; then
 fi
 pnpm semver-check
 pnpm test
-pnpm build
-pnpm clean
diff --git a/packages/resolution/package.json b/packages/resolution/package.json
index 075294ed..2163b37e 100644
--- a/packages/resolution/package.json
+++ b/packages/resolution/package.json
@@ -16,8 +16,7 @@
   ],
   "typings": "./lib/index.d.ts",
   "scripts": {
-    "test": "pnpm vitest run && tsx test-resolution.ts",
-    "test:vitest": "vitest"
+    "test:all": "pnpm vitest run && tsx test-resolution.ts"
   },
   "zshy": "./src/index.ts",
   "module": "./dist/index.js",
diff --git a/packages/zod/.gitignore b/packages/zod/.gitignore
index e577a831..22507455 100644
--- a/packages/zod/.gitignore
+++ b/packages/zod/.gitignore
@@ -1,4 +1,3 @@
-_virtual
 **/*.js
 **/*.mjs
 **/*.cjs
diff --git a/packages/zod/package.json b/packages/zod/package.json
index adaacef8..14167d98 100644
--- a/packages/zod/package.json
+++ b/packages/zod/package.json
@@ -5,6 +5,7 @@
   "author": "Colin McDonnell <zod@colinhacks.com>",
   "description": "TypeScript-first schema declaration and validation library with static type inference",
   "files": [
+    "src",
     "**/*.js",
     "**/*.mjs",
     "**/*.cjs",
@@ -29,14 +30,14 @@
   "zshy": {
     "exports": {
       "./package.json": "./package.json",
-      ".": "./index.ts",
-      "./v3": "./v3/index.ts",
-      "./v4": "./v4/index.ts",
-      "./v4-mini": "./v4-mini/index.ts",
-      "./v4/mini": "./v4/mini/index.ts",
-      "./v4/core": "./v4/core/index.ts",
-      "./v4/locales": "./v4/locales/index.ts",
-      "./v4/locales/*": "./v4/locales/*"
+      ".": "./src/index.ts",
+      "./v3": "./src/v3/index.ts",
+      "./v4": "./src/v4/index.ts",
+      "./v4-mini": "./src/v4-mini/index.ts",
+      "./v4/mini": "./src/v4/mini/index.ts",
+      "./v4/core": "./src/v4/core/index.ts",
+      "./v4/locales": "./src/v4/locales/index.ts",
+      "./v4/locales/*": "./src/v4/locales/*"
     },
     "sourceDialects": [
       "@zod/source"
@@ -45,49 +46,49 @@
   "exports": {
     "./package.json": "./package.json",
     ".": {
-      "@zod/source": "./index.ts",
+      "@zod/source": "./src/index.ts",
       "types": "./index.d.cts",
       "import": "./index.js",
       "require": "./index.cjs"
     },
     "./v3": {
-      "@zod/source": "./v3/index.ts",
+      "@zod/source": "./src/v3/index.ts",
       "types": "./v3/index.d.cts",
       "import": "./v3/index.js",
       "require": "./v3/index.cjs"
     },
     "./v4": {
-      "@zod/source": "./v4/index.ts",
+      "@zod/source": "./src/v4/index.ts",
       "types": "./v4/index.d.cts",
       "import": "./v4/index.js",
       "require": "./v4/index.cjs"
     },
     "./v4-mini": {
-      "@zod/source": "./v4-mini/index.ts",
+      "@zod/source": "./src/v4-mini/index.ts",
       "types": "./v4-mini/index.d.cts",
       "import": "./v4-mini/index.js",
       "require": "./v4-mini/index.cjs"
     },
     "./v4/mini": {
-      "@zod/source": "./v4/mini/index.ts",
+      "@zod/source": "./src/v4/mini/index.ts",
       "types": "./v4/mini/index.d.cts",
       "import": "./v4/mini/index.js",
       "require": "./v4/mini/index.cjs"
     },
     "./v4/core": {
-      "@zod/source": "./v4/core/index.ts",
+      "@zod/source": "./src/v4/core/index.ts",
       "types": "./v4/core/index.d.cts",
       "import": "./v4/core/index.js",
       "require": "./v4/core/index.cjs"
     },
     "./v4/locales": {
-      "@zod/source": "./v4/locales/index.ts",
+      "@zod/source": "./src/v4/locales/index.ts",
       "types": "./v4/locales/index.d.cts",
       "import": "./v4/locales/index.js",
       "require": "./v4/locales/index.cjs"
     },
     "./v4/locales/*": {
-      "@zod/source": "./v4/locales/*",
+      "@zod/source": "./src/v4/locales/*",
       "types": "./v4/locales/*",
       "import": "./v4/locales/*",
       "require": "./v4/locales/*"
@@ -106,12 +107,11 @@
     }
   },
   "scripts": {
-    "clean": "rm -rf dist && git clean -qxdf . -e node_modules",
-    "build": "pnpm clean && zshy",
+    "clean": "git clean -xdf . -e node_modules",
+    "build": "zshy --project tsconfig.build.json",
     "postbuild": "pnpm biome check --write .",
     "test:watch": "pnpm vitest",
     "test": "pnpm vitest run",
-    "test:resolution": "pnpm build && pnpm attw --pack . && pnpm run --filter @zod/resolution test",
     "bump:beta": "pnpm version \"v$(pnpm pkg get version | jq -r)-beta.$(date +%Y%m%dT%H%M%S)\"",
     "pub:beta": "pnpm bump:beta && pnpm publish --tag next --publish-branch v4 --no-git-checks --dry-run"
   }
diff --git a/packages/zod/postbuild.ts b/packages/zod/postbuild.ts
deleted file mode 100644
index 2802b7fb..00000000
--- a/packages/zod/postbuild.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { readFileSync, writeFileSync } from "node:fs";
-
-const packageJsonPath = "./package.json";
-
-try {
-  // Read the package.json file
-  const packageJson = readFileSync(packageJsonPath, "utf-8");
-
-  // Replace occurrences of "types": "./dist/commonjs/ with "types": "./dist/esm/
-  const updatedPackageJson = packageJson.replace(/"types": "\.\/dist\/commonjs\//g, '"types": "./dist/esm/');
-
-  // Write the updated content back to package.json
-  writeFileSync(packageJsonPath, updatedPackageJson, "utf-8");
-
-  console.log('Successfully updated "types" paths in package.json');
-} catch (error) {
-  console.error("Error updating package.json:", error);
-}
diff --git a/packages/zod/index.ts b/packages/zod/src/index.ts
similarity index 100%
rename from packages/zod/index.ts
rename to packages/zod/src/index.ts
diff --git a/packages/zod/v3/ZodError.ts b/packages/zod/src/v3/ZodError.ts
similarity index 100%
rename from packages/zod/v3/ZodError.ts
rename to packages/zod/src/v3/ZodError.ts
diff --git a/packages/zod/v3/benchmarks/datetime.ts b/packages/zod/src/v3/benchmarks/datetime.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/datetime.ts
rename to packages/zod/src/v3/benchmarks/datetime.ts
diff --git a/packages/zod/v3/benchmarks/discriminatedUnion.ts b/packages/zod/src/v3/benchmarks/discriminatedUnion.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/discriminatedUnion.ts
rename to packages/zod/src/v3/benchmarks/discriminatedUnion.ts
diff --git a/packages/zod/v3/benchmarks/index.ts b/packages/zod/src/v3/benchmarks/index.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/index.ts
rename to packages/zod/src/v3/benchmarks/index.ts
diff --git a/packages/zod/v3/benchmarks/ipv4.ts b/packages/zod/src/v3/benchmarks/ipv4.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/ipv4.ts
rename to packages/zod/src/v3/benchmarks/ipv4.ts
diff --git a/packages/zod/v3/benchmarks/object.ts b/packages/zod/src/v3/benchmarks/object.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/object.ts
rename to packages/zod/src/v3/benchmarks/object.ts
diff --git a/packages/zod/v3/benchmarks/primitives.ts b/packages/zod/src/v3/benchmarks/primitives.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/primitives.ts
rename to packages/zod/src/v3/benchmarks/primitives.ts
diff --git a/packages/zod/v3/benchmarks/realworld.ts b/packages/zod/src/v3/benchmarks/realworld.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/realworld.ts
rename to packages/zod/src/v3/benchmarks/realworld.ts
diff --git a/packages/zod/v3/benchmarks/string.ts b/packages/zod/src/v3/benchmarks/string.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/string.ts
rename to packages/zod/src/v3/benchmarks/string.ts
diff --git a/packages/zod/v3/benchmarks/union.ts b/packages/zod/src/v3/benchmarks/union.ts
similarity index 100%
rename from packages/zod/v3/benchmarks/union.ts
rename to packages/zod/src/v3/benchmarks/union.ts
diff --git a/packages/zod/v3/errors.ts b/packages/zod/src/v3/errors.ts
similarity index 100%
rename from packages/zod/v3/errors.ts
rename to packages/zod/src/v3/errors.ts
diff --git a/packages/zod/v3/external.ts b/packages/zod/src/v3/external.ts
similarity index 100%
rename from packages/zod/v3/external.ts
rename to packages/zod/src/v3/external.ts
diff --git a/packages/zod/v3/helpers/enumUtil.ts b/packages/zod/src/v3/helpers/enumUtil.ts
similarity index 100%
rename from packages/zod/v3/helpers/enumUtil.ts
rename to packages/zod/src/v3/helpers/enumUtil.ts
diff --git a/packages/zod/v3/helpers/errorUtil.ts b/packages/zod/src/v3/helpers/errorUtil.ts
similarity index 100%
rename from packages/zod/v3/helpers/errorUtil.ts
rename to packages/zod/src/v3/helpers/errorUtil.ts
diff --git a/packages/zod/v3/helpers/parseUtil.ts b/packages/zod/src/v3/helpers/parseUtil.ts
similarity index 100%
rename from packages/zod/v3/helpers/parseUtil.ts
rename to packages/zod/src/v3/helpers/parseUtil.ts
diff --git a/packages/zod/v3/helpers/partialUtil.ts b/packages/zod/src/v3/helpers/partialUtil.ts
similarity index 100%
rename from packages/zod/v3/helpers/partialUtil.ts
rename to packages/zod/src/v3/helpers/partialUtil.ts
diff --git a/packages/zod/v3/helpers/typeAliases.ts b/packages/zod/src/v3/helpers/typeAliases.ts
similarity index 100%
rename from packages/zod/v3/helpers/typeAliases.ts
rename to packages/zod/src/v3/helpers/typeAliases.ts
diff --git a/packages/zod/v3/helpers/util.ts b/packages/zod/src/v3/helpers/util.ts
similarity index 100%
rename from packages/zod/v3/helpers/util.ts
rename to packages/zod/src/v3/helpers/util.ts
diff --git a/packages/zod/v3/index.ts b/packages/zod/src/v3/index.ts
similarity index 100%
rename from packages/zod/v3/index.ts
rename to packages/zod/src/v3/index.ts
diff --git a/packages/zod/v3/locales/en.ts b/packages/zod/src/v3/locales/en.ts
similarity index 100%
rename from packages/zod/v3/locales/en.ts
rename to packages/zod/src/v3/locales/en.ts
diff --git a/packages/zod/v3/standard-schema.ts b/packages/zod/src/v3/standard-schema.ts
similarity index 100%
rename from packages/zod/v3/standard-schema.ts
rename to packages/zod/src/v3/standard-schema.ts
diff --git a/packages/zod/v3/tests/Mocker.ts b/packages/zod/src/v3/tests/Mocker.ts
similarity index 100%
rename from packages/zod/v3/tests/Mocker.ts
rename to packages/zod/src/v3/tests/Mocker.ts
diff --git a/packages/zod/v3/tests/all-errors.test.ts b/packages/zod/src/v3/tests/all-errors.test.ts
similarity index 100%
rename from packages/zod/v3/tests/all-errors.test.ts
rename to packages/zod/src/v3/tests/all-errors.test.ts
diff --git a/packages/zod/v3/tests/anyunknown.test.ts b/packages/zod/src/v3/tests/anyunknown.test.ts
similarity index 100%
rename from packages/zod/v3/tests/anyunknown.test.ts
rename to packages/zod/src/v3/tests/anyunknown.test.ts
diff --git a/packages/zod/v3/tests/array.test.ts b/packages/zod/src/v3/tests/array.test.ts
similarity index 100%
rename from packages/zod/v3/tests/array.test.ts
rename to packages/zod/src/v3/tests/array.test.ts
diff --git a/packages/zod/v3/tests/async-parsing.test.ts b/packages/zod/src/v3/tests/async-parsing.test.ts
similarity index 100%
rename from packages/zod/v3/tests/async-parsing.test.ts
rename to packages/zod/src/v3/tests/async-parsing.test.ts
diff --git a/packages/zod/v3/tests/async-refinements.test.ts b/packages/zod/src/v3/tests/async-refinements.test.ts
similarity index 100%
rename from packages/zod/v3/tests/async-refinements.test.ts
rename to packages/zod/src/v3/tests/async-refinements.test.ts
diff --git a/packages/zod/v3/tests/base.test.ts b/packages/zod/src/v3/tests/base.test.ts
similarity index 100%
rename from packages/zod/v3/tests/base.test.ts
rename to packages/zod/src/v3/tests/base.test.ts
diff --git a/packages/zod/v3/tests/bigint.test.ts b/packages/zod/src/v3/tests/bigint.test.ts
similarity index 100%
rename from packages/zod/v3/tests/bigint.test.ts
rename to packages/zod/src/v3/tests/bigint.test.ts
diff --git a/packages/zod/v3/tests/branded.test.ts b/packages/zod/src/v3/tests/branded.test.ts
similarity index 100%
rename from packages/zod/v3/tests/branded.test.ts
rename to packages/zod/src/v3/tests/branded.test.ts
diff --git a/packages/zod/v3/tests/catch.test.ts b/packages/zod/src/v3/tests/catch.test.ts
similarity index 100%
rename from packages/zod/v3/tests/catch.test.ts
rename to packages/zod/src/v3/tests/catch.test.ts
diff --git a/packages/zod/v3/tests/coerce.test.ts b/packages/zod/src/v3/tests/coerce.test.ts
similarity index 100%
rename from packages/zod/v3/tests/coerce.test.ts
rename to packages/zod/src/v3/tests/coerce.test.ts
diff --git a/packages/zod/v3/tests/complex.test.ts b/packages/zod/src/v3/tests/complex.test.ts
similarity index 100%
rename from packages/zod/v3/tests/complex.test.ts
rename to packages/zod/src/v3/tests/complex.test.ts
diff --git a/packages/zod/v3/tests/custom.test.ts b/packages/zod/src/v3/tests/custom.test.ts
similarity index 100%
rename from packages/zod/v3/tests/custom.test.ts
rename to packages/zod/src/v3/tests/custom.test.ts
diff --git a/packages/zod/v3/tests/date.test.ts b/packages/zod/src/v3/tests/date.test.ts
similarity index 100%
rename from packages/zod/v3/tests/date.test.ts
rename to packages/zod/src/v3/tests/date.test.ts
diff --git a/packages/zod/v3/tests/deepmasking.test.ts b/packages/zod/src/v3/tests/deepmasking.test.ts
similarity index 100%
rename from packages/zod/v3/tests/deepmasking.test.ts
rename to packages/zod/src/v3/tests/deepmasking.test.ts
diff --git a/packages/zod/v3/tests/default.test.ts b/packages/zod/src/v3/tests/default.test.ts
similarity index 100%
rename from packages/zod/v3/tests/default.test.ts
rename to packages/zod/src/v3/tests/default.test.ts
diff --git a/packages/zod/v3/tests/description.test.ts b/packages/zod/src/v3/tests/description.test.ts
similarity index 100%
rename from packages/zod/v3/tests/description.test.ts
rename to packages/zod/src/v3/tests/description.test.ts
diff --git a/packages/zod/v3/tests/discriminated-unions.test.ts b/packages/zod/src/v3/tests/discriminated-unions.test.ts
similarity index 100%
rename from packages/zod/v3/tests/discriminated-unions.test.ts
rename to packages/zod/src/v3/tests/discriminated-unions.test.ts
diff --git a/packages/zod/v3/tests/enum.test.ts b/packages/zod/src/v3/tests/enum.test.ts
similarity index 100%
rename from packages/zod/v3/tests/enum.test.ts
rename to packages/zod/src/v3/tests/enum.test.ts
diff --git a/packages/zod/v3/tests/error.test.ts b/packages/zod/src/v3/tests/error.test.ts
similarity index 100%
rename from packages/zod/v3/tests/error.test.ts
rename to packages/zod/src/v3/tests/error.test.ts
diff --git a/packages/zod/v3/tests/firstparty.test.ts b/packages/zod/src/v3/tests/firstparty.test.ts
similarity index 100%
rename from packages/zod/v3/tests/firstparty.test.ts
rename to packages/zod/src/v3/tests/firstparty.test.ts
diff --git a/packages/zod/v3/tests/firstpartyschematypes.test.ts b/packages/zod/src/v3/tests/firstpartyschematypes.test.ts
similarity index 100%
rename from packages/zod/v3/tests/firstpartyschematypes.test.ts
rename to packages/zod/src/v3/tests/firstpartyschematypes.test.ts
diff --git a/packages/zod/v3/tests/function.test.ts b/packages/zod/src/v3/tests/function.test.ts
similarity index 100%
rename from packages/zod/v3/tests/function.test.ts
rename to packages/zod/src/v3/tests/function.test.ts
diff --git a/packages/zod/v3/tests/generics.test.ts b/packages/zod/src/v3/tests/generics.test.ts
similarity index 100%
rename from packages/zod/v3/tests/generics.test.ts
rename to packages/zod/src/v3/tests/generics.test.ts
diff --git a/packages/zod/v3/tests/instanceof.test.ts b/packages/zod/src/v3/tests/instanceof.test.ts
similarity index 100%
rename from packages/zod/v3/tests/instanceof.test.ts
rename to packages/zod/src/v3/tests/instanceof.test.ts
diff --git a/packages/zod/v3/tests/intersection.test.ts b/packages/zod/src/v3/tests/intersection.test.ts
similarity index 100%
rename from packages/zod/v3/tests/intersection.test.ts
rename to packages/zod/src/v3/tests/intersection.test.ts
diff --git a/packages/zod/v3/tests/language-server.source.ts b/packages/zod/src/v3/tests/language-server.source.ts
similarity index 100%
rename from packages/zod/v3/tests/language-server.source.ts
rename to packages/zod/src/v3/tests/language-server.source.ts
diff --git a/packages/zod/v3/tests/language-server.test.ts b/packages/zod/src/v3/tests/language-server.test.ts
similarity index 100%
rename from packages/zod/v3/tests/language-server.test.ts
rename to packages/zod/src/v3/tests/language-server.test.ts
diff --git a/packages/zod/v3/tests/literal.test.ts b/packages/zod/src/v3/tests/literal.test.ts
similarity index 100%
rename from packages/zod/v3/tests/literal.test.ts
rename to packages/zod/src/v3/tests/literal.test.ts
diff --git a/packages/zod/v3/tests/map.test.ts b/packages/zod/src/v3/tests/map.test.ts
similarity index 100%
rename from packages/zod/v3/tests/map.test.ts
rename to packages/zod/src/v3/tests/map.test.ts
diff --git a/packages/zod/v3/tests/masking.test.ts b/packages/zod/src/v3/tests/masking.test.ts
similarity index 100%
rename from packages/zod/v3/tests/masking.test.ts
rename to packages/zod/src/v3/tests/masking.test.ts
diff --git a/packages/zod/v3/tests/mocker.test.ts b/packages/zod/src/v3/tests/mocker.test.ts
similarity index 100%
rename from packages/zod/v3/tests/mocker.test.ts
rename to packages/zod/src/v3/tests/mocker.test.ts
diff --git a/packages/zod/v3/tests/nan.test.ts b/packages/zod/src/v3/tests/nan.test.ts
similarity index 100%
rename from packages/zod/v3/tests/nan.test.ts
rename to packages/zod/src/v3/tests/nan.test.ts
diff --git a/packages/zod/v3/tests/nativeEnum.test.ts b/packages/zod/src/v3/tests/nativeEnum.test.ts
similarity index 100%
rename from packages/zod/v3/tests/nativeEnum.test.ts
rename to packages/zod/src/v3/tests/nativeEnum.test.ts
diff --git a/packages/zod/v3/tests/nullable.test.ts b/packages/zod/src/v3/tests/nullable.test.ts
similarity index 100%
rename from packages/zod/v3/tests/nullable.test.ts
rename to packages/zod/src/v3/tests/nullable.test.ts
diff --git a/packages/zod/v3/tests/number.test.ts b/packages/zod/src/v3/tests/number.test.ts
similarity index 100%
rename from packages/zod/v3/tests/number.test.ts
rename to packages/zod/src/v3/tests/number.test.ts
diff --git a/packages/zod/v3/tests/object-augmentation.test.ts b/packages/zod/src/v3/tests/object-augmentation.test.ts
similarity index 100%
rename from packages/zod/v3/tests/object-augmentation.test.ts
rename to packages/zod/src/v3/tests/object-augmentation.test.ts
diff --git a/packages/zod/v3/tests/object-in-es5-env.test.ts b/packages/zod/src/v3/tests/object-in-es5-env.test.ts
similarity index 100%
rename from packages/zod/v3/tests/object-in-es5-env.test.ts
rename to packages/zod/src/v3/tests/object-in-es5-env.test.ts
diff --git a/packages/zod/v3/tests/object.test.ts b/packages/zod/src/v3/tests/object.test.ts
similarity index 100%
rename from packages/zod/v3/tests/object.test.ts
rename to packages/zod/src/v3/tests/object.test.ts
diff --git a/packages/zod/v3/tests/optional.test.ts b/packages/zod/src/v3/tests/optional.test.ts
similarity index 100%
rename from packages/zod/v3/tests/optional.test.ts
rename to packages/zod/src/v3/tests/optional.test.ts
diff --git a/packages/zod/v3/tests/parseUtil.test.ts b/packages/zod/src/v3/tests/parseUtil.test.ts
similarity index 100%
rename from packages/zod/v3/tests/parseUtil.test.ts
rename to packages/zod/src/v3/tests/parseUtil.test.ts
diff --git a/packages/zod/v3/tests/parser.test.ts b/packages/zod/src/v3/tests/parser.test.ts
similarity index 100%
rename from packages/zod/v3/tests/parser.test.ts
rename to packages/zod/src/v3/tests/parser.test.ts
diff --git a/packages/zod/v3/tests/partials.test.ts b/packages/zod/src/v3/tests/partials.test.ts
similarity index 100%
rename from packages/zod/v3/tests/partials.test.ts
rename to packages/zod/src/v3/tests/partials.test.ts
diff --git a/packages/zod/v3/tests/pickomit.test.ts b/packages/zod/src/v3/tests/pickomit.test.ts
similarity index 100%
rename from packages/zod/v3/tests/pickomit.test.ts
rename to packages/zod/src/v3/tests/pickomit.test.ts
diff --git a/packages/zod/v3/tests/pipeline.test.ts b/packages/zod/src/v3/tests/pipeline.test.ts
similarity index 100%
rename from packages/zod/v3/tests/pipeline.test.ts
rename to packages/zod/src/v3/tests/pipeline.test.ts
diff --git a/packages/zod/v3/tests/preprocess.test.ts b/packages/zod/src/v3/tests/preprocess.test.ts
similarity index 100%
rename from packages/zod/v3/tests/preprocess.test.ts
rename to packages/zod/src/v3/tests/preprocess.test.ts
diff --git a/packages/zod/v3/tests/primitive.test.ts b/packages/zod/src/v3/tests/primitive.test.ts
similarity index 100%
rename from packages/zod/v3/tests/primitive.test.ts
rename to packages/zod/src/v3/tests/primitive.test.ts
diff --git a/packages/zod/v3/tests/promise.test.ts b/packages/zod/src/v3/tests/promise.test.ts
similarity index 100%
rename from packages/zod/v3/tests/promise.test.ts
rename to packages/zod/src/v3/tests/promise.test.ts
diff --git a/packages/zod/v3/tests/readonly.test.ts b/packages/zod/src/v3/tests/readonly.test.ts
similarity index 100%
rename from packages/zod/v3/tests/readonly.test.ts
rename to packages/zod/src/v3/tests/readonly.test.ts
diff --git a/packages/zod/v3/tests/record.test.ts b/packages/zod/src/v3/tests/record.test.ts
similarity index 100%
rename from packages/zod/v3/tests/record.test.ts
rename to packages/zod/src/v3/tests/record.test.ts
diff --git a/packages/zod/v3/tests/recursive.test.ts b/packages/zod/src/v3/tests/recursive.test.ts
similarity index 100%
rename from packages/zod/v3/tests/recursive.test.ts
rename to packages/zod/src/v3/tests/recursive.test.ts
diff --git a/packages/zod/v3/tests/refine.test.ts b/packages/zod/src/v3/tests/refine.test.ts
similarity index 100%
rename from packages/zod/v3/tests/refine.test.ts
rename to packages/zod/src/v3/tests/refine.test.ts
diff --git a/packages/zod/v3/tests/safeparse.test.ts b/packages/zod/src/v3/tests/safeparse.test.ts
similarity index 100%
rename from packages/zod/v3/tests/safeparse.test.ts
rename to packages/zod/src/v3/tests/safeparse.test.ts
diff --git a/packages/zod/v3/tests/set.test.ts b/packages/zod/src/v3/tests/set.test.ts
similarity index 100%
rename from packages/zod/v3/tests/set.test.ts
rename to packages/zod/src/v3/tests/set.test.ts
diff --git a/packages/zod/v3/tests/standard-schema.test.ts b/packages/zod/src/v3/tests/standard-schema.test.ts
similarity index 100%
rename from packages/zod/v3/tests/standard-schema.test.ts
rename to packages/zod/src/v3/tests/standard-schema.test.ts
diff --git a/packages/zod/v3/tests/string.test.ts b/packages/zod/src/v3/tests/string.test.ts
similarity index 100%
rename from packages/zod/v3/tests/string.test.ts
rename to packages/zod/src/v3/tests/string.test.ts
diff --git a/packages/zod/v3/tests/transformer.test.ts b/packages/zod/src/v3/tests/transformer.test.ts
similarity index 100%
rename from packages/zod/v3/tests/transformer.test.ts
rename to packages/zod/src/v3/tests/transformer.test.ts
diff --git a/packages/zod/v3/tests/tuple.test.ts b/packages/zod/src/v3/tests/tuple.test.ts
similarity index 100%
rename from packages/zod/v3/tests/tuple.test.ts
rename to packages/zod/src/v3/tests/tuple.test.ts
diff --git a/packages/zod/v3/tests/unions.test.ts b/packages/zod/src/v3/tests/unions.test.ts
similarity index 100%
rename from packages/zod/v3/tests/unions.test.ts
rename to packages/zod/src/v3/tests/unions.test.ts
diff --git a/packages/zod/v3/tests/validations.test.ts b/packages/zod/src/v3/tests/validations.test.ts
similarity index 100%
rename from packages/zod/v3/tests/validations.test.ts
rename to packages/zod/src/v3/tests/validations.test.ts
diff --git a/packages/zod/v3/tests/void.test.ts b/packages/zod/src/v3/tests/void.test.ts
similarity index 100%
rename from packages/zod/v3/tests/void.test.ts
rename to packages/zod/src/v3/tests/void.test.ts
diff --git a/packages/zod/v3/types.ts b/packages/zod/src/v3/types.ts
similarity index 100%
rename from packages/zod/v3/types.ts
rename to packages/zod/src/v3/types.ts
diff --git a/packages/zod/v4-mini/index.ts b/packages/zod/src/v4-mini/index.ts
similarity index 100%
rename from packages/zod/v4-mini/index.ts
rename to packages/zod/src/v4-mini/index.ts
diff --git a/packages/zod/v4/classic/checks.ts b/packages/zod/src/v4/classic/checks.ts
similarity index 100%
rename from packages/zod/v4/classic/checks.ts
rename to packages/zod/src/v4/classic/checks.ts
diff --git a/packages/zod/v4/classic/coerce.ts b/packages/zod/src/v4/classic/coerce.ts
similarity index 100%
rename from packages/zod/v4/classic/coerce.ts
rename to packages/zod/src/v4/classic/coerce.ts
diff --git a/packages/zod/v4/classic/compat.ts b/packages/zod/src/v4/classic/compat.ts
similarity index 100%
rename from packages/zod/v4/classic/compat.ts
rename to packages/zod/src/v4/classic/compat.ts
diff --git a/packages/zod/v4/classic/errors.ts b/packages/zod/src/v4/classic/errors.ts
similarity index 100%
rename from packages/zod/v4/classic/errors.ts
rename to packages/zod/src/v4/classic/errors.ts
diff --git a/packages/zod/v4/classic/external.ts b/packages/zod/src/v4/classic/external.ts
similarity index 100%
rename from packages/zod/v4/classic/external.ts
rename to packages/zod/src/v4/classic/external.ts
diff --git a/packages/zod/v4/classic/index.ts b/packages/zod/src/v4/classic/index.ts
similarity index 100%
rename from packages/zod/v4/classic/index.ts
rename to packages/zod/src/v4/classic/index.ts
diff --git a/packages/zod/v4/classic/iso.ts b/packages/zod/src/v4/classic/iso.ts
similarity index 100%
rename from packages/zod/v4/classic/iso.ts
rename to packages/zod/src/v4/classic/iso.ts
diff --git a/packages/zod/v4/classic/parse.ts b/packages/zod/src/v4/classic/parse.ts
similarity index 100%
rename from packages/zod/v4/classic/parse.ts
rename to packages/zod/src/v4/classic/parse.ts
diff --git a/packages/zod/v4/classic/schemas.ts b/packages/zod/src/v4/classic/schemas.ts
similarity index 100%
rename from packages/zod/v4/classic/schemas.ts
rename to packages/zod/src/v4/classic/schemas.ts
diff --git a/packages/zod/v4/classic/tests/anyunknown.test.ts b/packages/zod/src/v4/classic/tests/anyunknown.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/anyunknown.test.ts
rename to packages/zod/src/v4/classic/tests/anyunknown.test.ts
diff --git a/packages/zod/v4/classic/tests/array.test.ts b/packages/zod/src/v4/classic/tests/array.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/array.test.ts
rename to packages/zod/src/v4/classic/tests/array.test.ts
diff --git a/packages/zod/v4/classic/tests/assignability.test.ts b/packages/zod/src/v4/classic/tests/assignability.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/assignability.test.ts
rename to packages/zod/src/v4/classic/tests/assignability.test.ts
diff --git a/packages/zod/v4/classic/tests/async-parsing.test.ts b/packages/zod/src/v4/classic/tests/async-parsing.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/async-parsing.test.ts
rename to packages/zod/src/v4/classic/tests/async-parsing.test.ts
diff --git a/packages/zod/v4/classic/tests/async-refinements.test.ts b/packages/zod/src/v4/classic/tests/async-refinements.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/async-refinements.test.ts
rename to packages/zod/src/v4/classic/tests/async-refinements.test.ts
diff --git a/packages/zod/v4/classic/tests/base.test.ts b/packages/zod/src/v4/classic/tests/base.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/base.test.ts
rename to packages/zod/src/v4/classic/tests/base.test.ts
diff --git a/packages/zod/v4/classic/tests/bigint.test.ts b/packages/zod/src/v4/classic/tests/bigint.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/bigint.test.ts
rename to packages/zod/src/v4/classic/tests/bigint.test.ts
diff --git a/packages/zod/v4/classic/tests/brand.test.ts b/packages/zod/src/v4/classic/tests/brand.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/brand.test.ts
rename to packages/zod/src/v4/classic/tests/brand.test.ts
diff --git a/packages/zod/v4/classic/tests/catch.test.ts b/packages/zod/src/v4/classic/tests/catch.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/catch.test.ts
rename to packages/zod/src/v4/classic/tests/catch.test.ts
diff --git a/packages/zod/v4/classic/tests/coalesce.test.ts b/packages/zod/src/v4/classic/tests/coalesce.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/coalesce.test.ts
rename to packages/zod/src/v4/classic/tests/coalesce.test.ts
diff --git a/packages/zod/v4/classic/tests/coerce.test.ts b/packages/zod/src/v4/classic/tests/coerce.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/coerce.test.ts
rename to packages/zod/src/v4/classic/tests/coerce.test.ts
diff --git a/packages/zod/v4/classic/tests/continuability.test.ts b/packages/zod/src/v4/classic/tests/continuability.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/continuability.test.ts
rename to packages/zod/src/v4/classic/tests/continuability.test.ts
diff --git a/packages/zod/v4/classic/tests/custom.test.ts b/packages/zod/src/v4/classic/tests/custom.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/custom.test.ts
rename to packages/zod/src/v4/classic/tests/custom.test.ts
diff --git a/packages/zod/v4/classic/tests/date.test.ts b/packages/zod/src/v4/classic/tests/date.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/date.test.ts
rename to packages/zod/src/v4/classic/tests/date.test.ts
diff --git a/packages/zod/v4/classic/tests/datetime.test.ts b/packages/zod/src/v4/classic/tests/datetime.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/datetime.test.ts
rename to packages/zod/src/v4/classic/tests/datetime.test.ts
diff --git a/packages/zod/v4/classic/tests/default.test.ts b/packages/zod/src/v4/classic/tests/default.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/default.test.ts
rename to packages/zod/src/v4/classic/tests/default.test.ts
diff --git a/packages/zod/v4/classic/tests/description.test.ts b/packages/zod/src/v4/classic/tests/description.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/description.test.ts
rename to packages/zod/src/v4/classic/tests/description.test.ts
diff --git a/packages/zod/v4/classic/tests/discriminated-unions.test.ts b/packages/zod/src/v4/classic/tests/discriminated-unions.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/discriminated-unions.test.ts
rename to packages/zod/src/v4/classic/tests/discriminated-unions.test.ts
diff --git a/packages/zod/v4/classic/tests/enum.test.ts b/packages/zod/src/v4/classic/tests/enum.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/enum.test.ts
rename to packages/zod/src/v4/classic/tests/enum.test.ts
diff --git a/packages/zod/v4/classic/tests/error-utils.test.ts b/packages/zod/src/v4/classic/tests/error-utils.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/error-utils.test.ts
rename to packages/zod/src/v4/classic/tests/error-utils.test.ts
diff --git a/packages/zod/v4/classic/tests/error.test.ts b/packages/zod/src/v4/classic/tests/error.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/error.test.ts
rename to packages/zod/src/v4/classic/tests/error.test.ts
diff --git a/packages/zod/v4/classic/tests/file.test.ts b/packages/zod/src/v4/classic/tests/file.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/file.test.ts
rename to packages/zod/src/v4/classic/tests/file.test.ts
diff --git a/packages/zod/v4/classic/tests/firstparty.test.ts b/packages/zod/src/v4/classic/tests/firstparty.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/firstparty.test.ts
rename to packages/zod/src/v4/classic/tests/firstparty.test.ts
diff --git a/packages/zod/v4/classic/tests/function.test.ts b/packages/zod/src/v4/classic/tests/function.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/function.test.ts
rename to packages/zod/src/v4/classic/tests/function.test.ts
diff --git a/packages/zod/v4/classic/tests/generics.test.ts b/packages/zod/src/v4/classic/tests/generics.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/generics.test.ts
rename to packages/zod/src/v4/classic/tests/generics.test.ts
diff --git a/packages/zod/v4/classic/tests/index.test.ts b/packages/zod/src/v4/classic/tests/index.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/index.test.ts
rename to packages/zod/src/v4/classic/tests/index.test.ts
diff --git a/packages/zod/v4/classic/tests/instanceof.test.ts b/packages/zod/src/v4/classic/tests/instanceof.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/instanceof.test.ts
rename to packages/zod/src/v4/classic/tests/instanceof.test.ts
diff --git a/packages/zod/v4/classic/tests/intersection.test.ts b/packages/zod/src/v4/classic/tests/intersection.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/intersection.test.ts
rename to packages/zod/src/v4/classic/tests/intersection.test.ts
diff --git a/packages/zod/v4/classic/tests/json.test.ts b/packages/zod/src/v4/classic/tests/json.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/json.test.ts
rename to packages/zod/src/v4/classic/tests/json.test.ts
diff --git a/packages/zod/v4/classic/tests/lazy.test.ts b/packages/zod/src/v4/classic/tests/lazy.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/lazy.test.ts
rename to packages/zod/src/v4/classic/tests/lazy.test.ts
diff --git a/packages/zod/v4/classic/tests/literal.test.ts b/packages/zod/src/v4/classic/tests/literal.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/literal.test.ts
rename to packages/zod/src/v4/classic/tests/literal.test.ts
diff --git a/packages/zod/v4/classic/tests/map.test.ts b/packages/zod/src/v4/classic/tests/map.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/map.test.ts
rename to packages/zod/src/v4/classic/tests/map.test.ts
diff --git a/packages/zod/v4/classic/tests/nan.test.ts b/packages/zod/src/v4/classic/tests/nan.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/nan.test.ts
rename to packages/zod/src/v4/classic/tests/nan.test.ts
diff --git a/packages/zod/v4/classic/tests/nested-refine.test.ts b/packages/zod/src/v4/classic/tests/nested-refine.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/nested-refine.test.ts
rename to packages/zod/src/v4/classic/tests/nested-refine.test.ts
diff --git a/packages/zod/v4/classic/tests/nonoptional.test.ts b/packages/zod/src/v4/classic/tests/nonoptional.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/nonoptional.test.ts
rename to packages/zod/src/v4/classic/tests/nonoptional.test.ts
diff --git a/packages/zod/v4/classic/tests/nullable.test.ts b/packages/zod/src/v4/classic/tests/nullable.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/nullable.test.ts
rename to packages/zod/src/v4/classic/tests/nullable.test.ts
diff --git a/packages/zod/v4/classic/tests/number.test.ts b/packages/zod/src/v4/classic/tests/number.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/number.test.ts
rename to packages/zod/src/v4/classic/tests/number.test.ts
diff --git a/packages/zod/v4/classic/tests/object.test.ts b/packages/zod/src/v4/classic/tests/object.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/object.test.ts
rename to packages/zod/src/v4/classic/tests/object.test.ts
diff --git a/packages/zod/v4/classic/tests/optional.test.ts b/packages/zod/src/v4/classic/tests/optional.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/optional.test.ts
rename to packages/zod/src/v4/classic/tests/optional.test.ts
diff --git a/packages/zod/v4/classic/tests/partial.test.ts b/packages/zod/src/v4/classic/tests/partial.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/partial.test.ts
rename to packages/zod/src/v4/classic/tests/partial.test.ts
diff --git a/packages/zod/v4/classic/tests/pickomit.test.ts b/packages/zod/src/v4/classic/tests/pickomit.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/pickomit.test.ts
rename to packages/zod/src/v4/classic/tests/pickomit.test.ts
diff --git a/packages/zod/v4/classic/tests/pipe.test.ts b/packages/zod/src/v4/classic/tests/pipe.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/pipe.test.ts
rename to packages/zod/src/v4/classic/tests/pipe.test.ts
diff --git a/packages/zod/v4/classic/tests/prefault.test.ts b/packages/zod/src/v4/classic/tests/prefault.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/prefault.test.ts
rename to packages/zod/src/v4/classic/tests/prefault.test.ts
diff --git a/packages/zod/v4/classic/tests/preprocess.test.ts b/packages/zod/src/v4/classic/tests/preprocess.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/preprocess.test.ts
rename to packages/zod/src/v4/classic/tests/preprocess.test.ts
diff --git a/packages/zod/v4/classic/tests/primitive.test.ts b/packages/zod/src/v4/classic/tests/primitive.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/primitive.test.ts
rename to packages/zod/src/v4/classic/tests/primitive.test.ts
diff --git a/packages/zod/v4/classic/tests/promise.test.ts b/packages/zod/src/v4/classic/tests/promise.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/promise.test.ts
rename to packages/zod/src/v4/classic/tests/promise.test.ts
diff --git a/packages/zod/v4/classic/tests/prototypes.test.ts b/packages/zod/src/v4/classic/tests/prototypes.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/prototypes.test.ts
rename to packages/zod/src/v4/classic/tests/prototypes.test.ts
diff --git a/packages/zod/v4/classic/tests/readonly.test.ts b/packages/zod/src/v4/classic/tests/readonly.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/readonly.test.ts
rename to packages/zod/src/v4/classic/tests/readonly.test.ts
diff --git a/packages/zod/v4/classic/tests/record.test.ts b/packages/zod/src/v4/classic/tests/record.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/record.test.ts
rename to packages/zod/src/v4/classic/tests/record.test.ts
diff --git a/packages/zod/v4/classic/tests/recursive-types.test.ts b/packages/zod/src/v4/classic/tests/recursive-types.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/recursive-types.test.ts
rename to packages/zod/src/v4/classic/tests/recursive-types.test.ts
diff --git a/packages/zod/v4/classic/tests/refine.test.ts b/packages/zod/src/v4/classic/tests/refine.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/refine.test.ts
rename to packages/zod/src/v4/classic/tests/refine.test.ts
diff --git a/packages/zod/v4/classic/tests/registries.test.ts b/packages/zod/src/v4/classic/tests/registries.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/registries.test.ts
rename to packages/zod/src/v4/classic/tests/registries.test.ts
diff --git a/packages/zod/v4/classic/tests/set.test.ts b/packages/zod/src/v4/classic/tests/set.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/set.test.ts
rename to packages/zod/src/v4/classic/tests/set.test.ts
diff --git a/packages/zod/v4/classic/tests/standard-schema.test.ts b/packages/zod/src/v4/classic/tests/standard-schema.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/standard-schema.test.ts
rename to packages/zod/src/v4/classic/tests/standard-schema.test.ts
diff --git a/packages/zod/v4/classic/tests/string-formats.test.ts b/packages/zod/src/v4/classic/tests/string-formats.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/string-formats.test.ts
rename to packages/zod/src/v4/classic/tests/string-formats.test.ts
diff --git a/packages/zod/v4/classic/tests/string.test.ts b/packages/zod/src/v4/classic/tests/string.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/string.test.ts
rename to packages/zod/src/v4/classic/tests/string.test.ts
diff --git a/packages/zod/v4/classic/tests/stringbool.test.ts b/packages/zod/src/v4/classic/tests/stringbool.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/stringbool.test.ts
rename to packages/zod/src/v4/classic/tests/stringbool.test.ts
diff --git a/packages/zod/v4/classic/tests/template-literal.test.ts b/packages/zod/src/v4/classic/tests/template-literal.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/template-literal.test.ts
rename to packages/zod/src/v4/classic/tests/template-literal.test.ts
diff --git a/packages/zod/v4/classic/tests/to-json-schema.test.ts b/packages/zod/src/v4/classic/tests/to-json-schema.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/to-json-schema.test.ts
rename to packages/zod/src/v4/classic/tests/to-json-schema.test.ts
diff --git a/packages/zod/v4/classic/tests/transform.test.ts b/packages/zod/src/v4/classic/tests/transform.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/transform.test.ts
rename to packages/zod/src/v4/classic/tests/transform.test.ts
diff --git a/packages/zod/v4/classic/tests/tuple.test.ts b/packages/zod/src/v4/classic/tests/tuple.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/tuple.test.ts
rename to packages/zod/src/v4/classic/tests/tuple.test.ts
diff --git a/packages/zod/v4/classic/tests/union.test.ts b/packages/zod/src/v4/classic/tests/union.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/union.test.ts
rename to packages/zod/src/v4/classic/tests/union.test.ts
diff --git a/packages/zod/v4/classic/tests/validations.test.ts b/packages/zod/src/v4/classic/tests/validations.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/validations.test.ts
rename to packages/zod/src/v4/classic/tests/validations.test.ts
diff --git a/packages/zod/v4/classic/tests/void.test.ts b/packages/zod/src/v4/classic/tests/void.test.ts
similarity index 100%
rename from packages/zod/v4/classic/tests/void.test.ts
rename to packages/zod/src/v4/classic/tests/void.test.ts
diff --git a/packages/zod/v4/core/api.ts b/packages/zod/src/v4/core/api.ts
similarity index 100%
rename from packages/zod/v4/core/api.ts
rename to packages/zod/src/v4/core/api.ts
diff --git a/packages/zod/v4/core/checks.ts b/packages/zod/src/v4/core/checks.ts
similarity index 100%
rename from packages/zod/v4/core/checks.ts
rename to packages/zod/src/v4/core/checks.ts
diff --git a/packages/zod/v4/core/config.ts b/packages/zod/src/v4/core/config.ts
similarity index 100%
rename from packages/zod/v4/core/config.ts
rename to packages/zod/src/v4/core/config.ts
diff --git a/packages/zod/v4/core/core.ts b/packages/zod/src/v4/core/core.ts
similarity index 100%
rename from packages/zod/v4/core/core.ts
rename to packages/zod/src/v4/core/core.ts
diff --git a/packages/zod/v4/core/doc.ts b/packages/zod/src/v4/core/doc.ts
similarity index 100%
rename from packages/zod/v4/core/doc.ts
rename to packages/zod/src/v4/core/doc.ts
diff --git a/packages/zod/v4/core/errors.ts b/packages/zod/src/v4/core/errors.ts
similarity index 100%
rename from packages/zod/v4/core/errors.ts
rename to packages/zod/src/v4/core/errors.ts
diff --git a/packages/zod/v4/core/function.ts b/packages/zod/src/v4/core/function.ts
similarity index 100%
rename from packages/zod/v4/core/function.ts
rename to packages/zod/src/v4/core/function.ts
diff --git a/packages/zod/v4/core/index.ts b/packages/zod/src/v4/core/index.ts
similarity index 100%
rename from packages/zod/v4/core/index.ts
rename to packages/zod/src/v4/core/index.ts
diff --git a/packages/zod/v4/core/json-schema.ts b/packages/zod/src/v4/core/json-schema.ts
similarity index 100%
rename from packages/zod/v4/core/json-schema.ts
rename to packages/zod/src/v4/core/json-schema.ts
diff --git a/packages/zod/v4/core/parse.ts b/packages/zod/src/v4/core/parse.ts
similarity index 100%
rename from packages/zod/v4/core/parse.ts
rename to packages/zod/src/v4/core/parse.ts
diff --git a/packages/zod/v4/core/regexes.ts b/packages/zod/src/v4/core/regexes.ts
similarity index 100%
rename from packages/zod/v4/core/regexes.ts
rename to packages/zod/src/v4/core/regexes.ts
diff --git a/packages/zod/v4/core/registries.ts b/packages/zod/src/v4/core/registries.ts
similarity index 100%
rename from packages/zod/v4/core/registries.ts
rename to packages/zod/src/v4/core/registries.ts
diff --git a/packages/zod/v4/core/schemas.ts b/packages/zod/src/v4/core/schemas.ts
similarity index 100%
rename from packages/zod/v4/core/schemas.ts
rename to packages/zod/src/v4/core/schemas.ts
diff --git a/packages/zod/v4/core/standard-schema.ts b/packages/zod/src/v4/core/standard-schema.ts
similarity index 100%
rename from packages/zod/v4/core/standard-schema.ts
rename to packages/zod/src/v4/core/standard-schema.ts
diff --git a/packages/zod/v4/core/tests/index.test.ts b/packages/zod/src/v4/core/tests/index.test.ts
similarity index 100%
rename from packages/zod/v4/core/tests/index.test.ts
rename to packages/zod/src/v4/core/tests/index.test.ts
diff --git a/packages/zod/v4/core/tests/locales/be.test.ts b/packages/zod/src/v4/core/tests/locales/be.test.ts
similarity index 100%
rename from packages/zod/v4/core/tests/locales/be.test.ts
rename to packages/zod/src/v4/core/tests/locales/be.test.ts
diff --git a/packages/zod/v4/core/tests/locales/en.test.ts b/packages/zod/src/v4/core/tests/locales/en.test.ts
similarity index 100%
rename from packages/zod/v4/core/tests/locales/en.test.ts
rename to packages/zod/src/v4/core/tests/locales/en.test.ts
diff --git a/packages/zod/v4/core/tests/locales/ru.test.ts b/packages/zod/src/v4/core/tests/locales/ru.test.ts
similarity index 100%
rename from packages/zod/v4/core/tests/locales/ru.test.ts
rename to packages/zod/src/v4/core/tests/locales/ru.test.ts
diff --git a/packages/zod/v4/core/tests/locales/tr.test.ts b/packages/zod/src/v4/core/tests/locales/tr.test.ts
similarity index 100%
rename from packages/zod/v4/core/tests/locales/tr.test.ts
rename to packages/zod/src/v4/core/tests/locales/tr.test.ts
diff --git a/packages/zod/v4/core/to-json-schema.ts b/packages/zod/src/v4/core/to-json-schema.ts
similarity index 100%
rename from packages/zod/v4/core/to-json-schema.ts
rename to packages/zod/src/v4/core/to-json-schema.ts
diff --git a/packages/zod/v4/core/util.ts b/packages/zod/src/v4/core/util.ts
similarity index 100%
rename from packages/zod/v4/core/util.ts
rename to packages/zod/src/v4/core/util.ts
diff --git a/packages/zod/v4/core/versions.ts b/packages/zod/src/v4/core/versions.ts
similarity index 100%
rename from packages/zod/v4/core/versions.ts
rename to packages/zod/src/v4/core/versions.ts
diff --git a/packages/zod/v4/core/zsf.ts b/packages/zod/src/v4/core/zsf.ts
similarity index 100%
rename from packages/zod/v4/core/zsf.ts
rename to packages/zod/src/v4/core/zsf.ts
diff --git a/packages/zod/v4/index.ts b/packages/zod/src/v4/index.ts
similarity index 100%
rename from packages/zod/v4/index.ts
rename to packages/zod/src/v4/index.ts
diff --git a/packages/zod/v4/locales/ar.ts b/packages/zod/src/v4/locales/ar.ts
similarity index 100%
rename from packages/zod/v4/locales/ar.ts
rename to packages/zod/src/v4/locales/ar.ts
diff --git a/packages/zod/v4/locales/az.ts b/packages/zod/src/v4/locales/az.ts
similarity index 100%
rename from packages/zod/v4/locales/az.ts
rename to packages/zod/src/v4/locales/az.ts
diff --git a/packages/zod/v4/locales/be.ts b/packages/zod/src/v4/locales/be.ts
similarity index 100%
rename from packages/zod/v4/locales/be.ts
rename to packages/zod/src/v4/locales/be.ts
diff --git a/packages/zod/v4/locales/ca.ts b/packages/zod/src/v4/locales/ca.ts
similarity index 100%
rename from packages/zod/v4/locales/ca.ts
rename to packages/zod/src/v4/locales/ca.ts
diff --git a/packages/zod/v4/locales/cs.ts b/packages/zod/src/v4/locales/cs.ts
similarity index 100%
rename from packages/zod/v4/locales/cs.ts
rename to packages/zod/src/v4/locales/cs.ts
diff --git a/packages/zod/v4/locales/de.ts b/packages/zod/src/v4/locales/de.ts
similarity index 100%
rename from packages/zod/v4/locales/de.ts
rename to packages/zod/src/v4/locales/de.ts
diff --git a/packages/zod/v4/locales/en.ts b/packages/zod/src/v4/locales/en.ts
similarity index 100%
rename from packages/zod/v4/locales/en.ts
rename to packages/zod/src/v4/locales/en.ts
diff --git a/packages/zod/v4/locales/es.ts b/packages/zod/src/v4/locales/es.ts
similarity index 100%
rename from packages/zod/v4/locales/es.ts
rename to packages/zod/src/v4/locales/es.ts
diff --git a/packages/zod/v4/locales/fa.ts b/packages/zod/src/v4/locales/fa.ts
similarity index 100%
rename from packages/zod/v4/locales/fa.ts
rename to packages/zod/src/v4/locales/fa.ts
diff --git a/packages/zod/v4/locales/fi.ts b/packages/zod/src/v4/locales/fi.ts
similarity index 100%
rename from packages/zod/v4/locales/fi.ts
rename to packages/zod/src/v4/locales/fi.ts
diff --git a/packages/zod/v4/locales/fr-CA.ts b/packages/zod/src/v4/locales/fr-CA.ts
similarity index 100%
rename from packages/zod/v4/locales/fr-CA.ts
rename to packages/zod/src/v4/locales/fr-CA.ts
diff --git a/packages/zod/v4/locales/fr.ts b/packages/zod/src/v4/locales/fr.ts
similarity index 100%
rename from packages/zod/v4/locales/fr.ts
rename to packages/zod/src/v4/locales/fr.ts
diff --git a/packages/zod/v4/locales/he.ts b/packages/zod/src/v4/locales/he.ts
similarity index 100%
rename from packages/zod/v4/locales/he.ts
rename to packages/zod/src/v4/locales/he.ts
diff --git a/packages/zod/v4/locales/hu.ts b/packages/zod/src/v4/locales/hu.ts
similarity index 100%
rename from packages/zod/v4/locales/hu.ts
rename to packages/zod/src/v4/locales/hu.ts
diff --git a/packages/zod/v4/locales/id.ts b/packages/zod/src/v4/locales/id.ts
similarity index 100%
rename from packages/zod/v4/locales/id.ts
rename to packages/zod/src/v4/locales/id.ts
diff --git a/packages/zod/v4/locales/index.ts b/packages/zod/src/v4/locales/index.ts
similarity index 100%
rename from packages/zod/v4/locales/index.ts
rename to packages/zod/src/v4/locales/index.ts
diff --git a/packages/zod/v4/locales/it.ts b/packages/zod/src/v4/locales/it.ts
similarity index 100%
rename from packages/zod/v4/locales/it.ts
rename to packages/zod/src/v4/locales/it.ts
diff --git a/packages/zod/v4/locales/ja.ts b/packages/zod/src/v4/locales/ja.ts
similarity index 100%
rename from packages/zod/v4/locales/ja.ts
rename to packages/zod/src/v4/locales/ja.ts
diff --git a/packages/zod/v4/locales/kh.ts b/packages/zod/src/v4/locales/kh.ts
similarity index 100%
rename from packages/zod/v4/locales/kh.ts
rename to packages/zod/src/v4/locales/kh.ts
diff --git a/packages/zod/v4/locales/ko.ts b/packages/zod/src/v4/locales/ko.ts
similarity index 100%
rename from packages/zod/v4/locales/ko.ts
rename to packages/zod/src/v4/locales/ko.ts
diff --git a/packages/zod/v4/locales/mk.ts b/packages/zod/src/v4/locales/mk.ts
similarity index 100%
rename from packages/zod/v4/locales/mk.ts
rename to packages/zod/src/v4/locales/mk.ts
diff --git a/packages/zod/v4/locales/ms.ts b/packages/zod/src/v4/locales/ms.ts
similarity index 100%
rename from packages/zod/v4/locales/ms.ts
rename to packages/zod/src/v4/locales/ms.ts
diff --git a/packages/zod/v4/locales/nl.ts b/packages/zod/src/v4/locales/nl.ts
similarity index 100%
rename from packages/zod/v4/locales/nl.ts
rename to packages/zod/src/v4/locales/nl.ts
diff --git a/packages/zod/v4/locales/no.ts b/packages/zod/src/v4/locales/no.ts
similarity index 100%
rename from packages/zod/v4/locales/no.ts
rename to packages/zod/src/v4/locales/no.ts
diff --git a/packages/zod/v4/locales/ota.ts b/packages/zod/src/v4/locales/ota.ts
similarity index 100%
rename from packages/zod/v4/locales/ota.ts
rename to packages/zod/src/v4/locales/ota.ts
diff --git a/packages/zod/v4/locales/pl.ts b/packages/zod/src/v4/locales/pl.ts
similarity index 100%
rename from packages/zod/v4/locales/pl.ts
rename to packages/zod/src/v4/locales/pl.ts
diff --git a/packages/zod/v4/locales/ps.ts b/packages/zod/src/v4/locales/ps.ts
similarity index 100%
rename from packages/zod/v4/locales/ps.ts
rename to packages/zod/src/v4/locales/ps.ts
diff --git a/packages/zod/v4/locales/pt.ts b/packages/zod/src/v4/locales/pt.ts
similarity index 100%
rename from packages/zod/v4/locales/pt.ts
rename to packages/zod/src/v4/locales/pt.ts
diff --git a/packages/zod/v4/locales/ru.ts b/packages/zod/src/v4/locales/ru.ts
similarity index 100%
rename from packages/zod/v4/locales/ru.ts
rename to packages/zod/src/v4/locales/ru.ts
diff --git a/packages/zod/v4/locales/sl.ts b/packages/zod/src/v4/locales/sl.ts
similarity index 100%
rename from packages/zod/v4/locales/sl.ts
rename to packages/zod/src/v4/locales/sl.ts
diff --git a/packages/zod/v4/locales/sv.ts b/packages/zod/src/v4/locales/sv.ts
similarity index 100%
rename from packages/zod/v4/locales/sv.ts
rename to packages/zod/src/v4/locales/sv.ts
diff --git a/packages/zod/v4/locales/ta.ts b/packages/zod/src/v4/locales/ta.ts
similarity index 100%
rename from packages/zod/v4/locales/ta.ts
rename to packages/zod/src/v4/locales/ta.ts
diff --git a/packages/zod/v4/locales/th.ts b/packages/zod/src/v4/locales/th.ts
similarity index 100%
rename from packages/zod/v4/locales/th.ts
rename to packages/zod/src/v4/locales/th.ts
diff --git a/packages/zod/v4/locales/tr.ts b/packages/zod/src/v4/locales/tr.ts
similarity index 100%
rename from packages/zod/v4/locales/tr.ts
rename to packages/zod/src/v4/locales/tr.ts
diff --git a/packages/zod/v4/locales/ua.ts b/packages/zod/src/v4/locales/ua.ts
similarity index 100%
rename from packages/zod/v4/locales/ua.ts
rename to packages/zod/src/v4/locales/ua.ts
diff --git a/packages/zod/v4/locales/ur.ts b/packages/zod/src/v4/locales/ur.ts
similarity index 100%
rename from packages/zod/v4/locales/ur.ts
rename to packages/zod/src/v4/locales/ur.ts
diff --git a/packages/zod/v4/locales/vi.ts b/packages/zod/src/v4/locales/vi.ts
similarity index 100%
rename from packages/zod/v4/locales/vi.ts
rename to packages/zod/src/v4/locales/vi.ts
diff --git a/packages/zod/v4/locales/zh-CN.ts b/packages/zod/src/v4/locales/zh-CN.ts
similarity index 100%
rename from packages/zod/v4/locales/zh-CN.ts
rename to packages/zod/src/v4/locales/zh-CN.ts
diff --git a/packages/zod/v4/locales/zh-TW.ts b/packages/zod/src/v4/locales/zh-TW.ts
similarity index 100%
rename from packages/zod/v4/locales/zh-TW.ts
rename to packages/zod/src/v4/locales/zh-TW.ts
diff --git a/packages/zod/v4/mini/checks.ts b/packages/zod/src/v4/mini/checks.ts
similarity index 100%
rename from packages/zod/v4/mini/checks.ts
rename to packages/zod/src/v4/mini/checks.ts
diff --git a/packages/zod/v4/mini/coerce.ts b/packages/zod/src/v4/mini/coerce.ts
similarity index 100%
rename from packages/zod/v4/mini/coerce.ts
rename to packages/zod/src/v4/mini/coerce.ts
diff --git a/packages/zod/v4/mini/external.ts b/packages/zod/src/v4/mini/external.ts
similarity index 100%
rename from packages/zod/v4/mini/external.ts
rename to packages/zod/src/v4/mini/external.ts
diff --git a/packages/zod/v4/mini/index.ts b/packages/zod/src/v4/mini/index.ts
similarity index 100%
rename from packages/zod/v4/mini/index.ts
rename to packages/zod/src/v4/mini/index.ts
diff --git a/packages/zod/v4/mini/iso.ts b/packages/zod/src/v4/mini/iso.ts
similarity index 100%
rename from packages/zod/v4/mini/iso.ts
rename to packages/zod/src/v4/mini/iso.ts
diff --git a/packages/zod/v4/mini/parse.ts b/packages/zod/src/v4/mini/parse.ts
similarity index 100%
rename from packages/zod/v4/mini/parse.ts
rename to packages/zod/src/v4/mini/parse.ts
diff --git a/packages/zod/v4/mini/schemas.ts b/packages/zod/src/v4/mini/schemas.ts
similarity index 100%
rename from packages/zod/v4/mini/schemas.ts
rename to packages/zod/src/v4/mini/schemas.ts
diff --git a/packages/zod/v4/mini/tests/assignability.test.ts b/packages/zod/src/v4/mini/tests/assignability.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/assignability.test.ts
rename to packages/zod/src/v4/mini/tests/assignability.test.ts
diff --git a/packages/zod/v4/mini/tests/brand.test.ts b/packages/zod/src/v4/mini/tests/brand.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/brand.test.ts
rename to packages/zod/src/v4/mini/tests/brand.test.ts
diff --git a/packages/zod/v4/mini/tests/checks.test.ts b/packages/zod/src/v4/mini/tests/checks.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/checks.test.ts
rename to packages/zod/src/v4/mini/tests/checks.test.ts
diff --git a/packages/zod/v4/mini/tests/computed.test.ts b/packages/zod/src/v4/mini/tests/computed.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/computed.test.ts
rename to packages/zod/src/v4/mini/tests/computed.test.ts
diff --git a/packages/zod/v4/mini/tests/error.test.ts b/packages/zod/src/v4/mini/tests/error.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/error.test.ts
rename to packages/zod/src/v4/mini/tests/error.test.ts
diff --git a/packages/zod/v4/mini/tests/functions.test.ts b/packages/zod/src/v4/mini/tests/functions.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/functions.test.ts
rename to packages/zod/src/v4/mini/tests/functions.test.ts
diff --git a/packages/zod/v4/mini/tests/index.test.ts b/packages/zod/src/v4/mini/tests/index.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/index.test.ts
rename to packages/zod/src/v4/mini/tests/index.test.ts
diff --git a/packages/zod/v4/mini/tests/number.test.ts b/packages/zod/src/v4/mini/tests/number.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/number.test.ts
rename to packages/zod/src/v4/mini/tests/number.test.ts
diff --git a/packages/zod/v4/mini/tests/object.test.ts b/packages/zod/src/v4/mini/tests/object.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/object.test.ts
rename to packages/zod/src/v4/mini/tests/object.test.ts
diff --git a/packages/zod/v4/mini/tests/prototypes.test.ts b/packages/zod/src/v4/mini/tests/prototypes.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/prototypes.test.ts
rename to packages/zod/src/v4/mini/tests/prototypes.test.ts
diff --git a/packages/zod/v4/mini/tests/recursive-types.test.ts b/packages/zod/src/v4/mini/tests/recursive-types.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/recursive-types.test.ts
rename to packages/zod/src/v4/mini/tests/recursive-types.test.ts
diff --git a/packages/zod/v4/mini/tests/string.test.ts b/packages/zod/src/v4/mini/tests/string.test.ts
similarity index 100%
rename from packages/zod/v4/mini/tests/string.test.ts
rename to packages/zod/src/v4/mini/tests/string.test.ts
diff --git a/packages/zod/tsconfig.build.json b/packages/zod/tsconfig.build.json
new file mode 100644
index 00000000..a84a4b2d
--- /dev/null
+++ b/packages/zod/tsconfig.build.json
@@ -0,0 +1,8 @@
+{
+  "extends": "../../.configs/tsconfig.base.json",
+  "compilerOptions": {
+    "rootDir": "src",
+    "outDir": ".",
+    "customConditions": ["@zod/source"],
+  }
+}
diff --git a/packages/zod/tsconfig.json b/packages/zod/tsconfig.json
index 48aa7bb2..2e6932b3 100644
--- a/packages/zod/tsconfig.json
+++ b/packages/zod/tsconfig.json
@@ -1,12 +1,8 @@
 {
   "extends": "../../.configs/tsconfig.base.json",
   "compilerOptions": {
-    "module": "node16",
-    "moduleResolution": "node16",
+    "module": "nodenext",
     "customConditions": ["@zod/source"],
-    "esModuleInterop": true,
-    "rootDir": ".",
-    "outDir": "."
   },
   "include": ["**/*.ts"]
 }


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index fcc7e461..16bcb515 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -27,7 +27,7 @@ jobs:
       - run: pnpm add typescript@${{ matrix.typescript }} -w
       - run: pnpm build
       - run: pnpm test
-      - run: pnpm run --filter @zod/resolution test
+      - run: pnpm run --filter @zod/resolution test:all
 
   lint:
     runs-on: ubuntu-latest
diff --git a/packages/resolution/attw.test.ts b/packages/resolution/attw.test.ts
index 304ebfa5..beaf4cc0 100644
--- a/packages/resolution/attw.test.ts
+++ b/packages/resolution/attw.test.ts
@@ -9,11 +9,6 @@ const __dirname = path.dirname(__filename);
 
 describe("Are The Types Wrong (attw) tests", () => {
   it("should run attw --pack node_modules/zod and check output", async () => {
-    const result = await execa("pnpm", ["attw", "--pack", "node_modules/zod", "--format", "ascii"], {
-      cwd: __dirname,
-      reject: false, // Don't throw on non-zero exit codes
-    });
-
     // check if node_modules/zod/index.js exists
     const zodIndexPath = path.join(__dirname, "node_modules", "zod", "index.js");
     if (!existsSync(zodIndexPath)) {
@@ -21,6 +16,11 @@ describe("Are The Types Wrong (attw) tests", () => {
       return;
     }
 
+    const result = await execa("pnpm", ["attw", "--pack", "node_modules/zod", "--format", "ascii"], {
+      cwd: __dirname,
+      reject: false, // Don't throw on non-zero exit codes
+    });
+
     // Combine stdout and stderr for comprehensive output
     const output = result.stdout + (result.stderr ? "\n" + result.stderr : "");
     // remove first line
diff --git a/packages/zod/tsconfig.test.json b/packages/zod/tsconfig.test.json
new file mode 100644
index 00000000..d4461b61
--- /dev/null
+++ b/packages/zod/tsconfig.test.json
@@ -0,0 +1,7 @@
+{
+  "extends": "./tsconfig.json",
+  "compilerOptions": {
+    "noUncheckedIndexedAccess": false,
+    "noUnusedLocals": false
+  }
+}
diff --git a/packages/zod/vitest.config.ts b/packages/zod/vitest.config.ts
new file mode 100644
index 00000000..1320a73b
--- /dev/null
+++ b/packages/zod/vitest.config.ts
@@ -0,0 +1,13 @@
+import { defineProject, mergeConfig } from "vitest/config";
+import rootConfig from "../../vitest.root.mjs";
+
+export default mergeConfig(
+  rootConfig,
+  defineProject({
+    test: {
+      typecheck: {
+        tsconfig: "./tsconfig.test.json",
+      },
+    },
+  })
+) as object;