diff --git a/.configs/tsconfig.base.json b/.configs/tsconfig.base.json index 3e6b66b75..6bdb4e2b6 100644 --- a/.configs/tsconfig.base.json +++ b/.configs/tsconfig.base.json @@ -27,6 +27,7 @@ "downlevelIteration": true, "isolatedModules": true, - "pretty": true + "pretty": true, + "customConditions": ["@zod/source"] } } diff --git a/biome.jsonc b/biome.jsonc index b2e134784..076b95f61 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -32,6 +32,6 @@ } }, "files": { - "ignore": ["lib", "coverage", "dist"] + "ignore": ["lib", "coverage", "dist", ".tshy", ".tshy-build"] } } diff --git a/package.json b/package.json index f1a52dfea..d44801c4d 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ }, "lint-staged": { "src/*.ts": ["biome format --write", "biome lint --write"], + "*.json": ["biome format --write", "biome lint --write"], "*.md": ["prettier --ignore-unknown --write"] }, "scripts": { diff --git a/packages/effect-plugin/package.json b/packages/effect-plugin/package.json index 29d2ecd18..ca00a1cd3 100644 --- a/packages/effect-plugin/package.json +++ b/packages/effect-plugin/package.json @@ -3,19 +3,10 @@ "type": "module", "version": "0.1.0", "author": "Colin McDonnell ", - "files": [ - "src", - "dist" - ], + "files": ["src", "dist"], "funding": "https://github.com/sponsors/colinhacks", "homepage": "https://zod.dev", - "keywords": [ - "typescript", - "schema", - "validation", - "type", - "inference" - ], + "keywords": ["typescript", "schema", "validation", "type", "inference"], "license": "MIT", "sideEffects": false, "main": "./dist/commonjs/index.js", @@ -25,6 +16,7 @@ "./package.json": "./package.json", ".": { "import": { + "@zod/source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" }, @@ -38,7 +30,8 @@ "exports": { "./package.json": "./package.json", ".": "./src/index.ts" - } + }, + "sourceDialects": ["@zod/source"] }, "repository": { "type": "git", diff --git a/packages/zod/package.json b/packages/zod/package.json index 8214da82c..71a2762a3 100644 --- a/packages/zod/package.json +++ b/packages/zod/package.json @@ -4,19 +4,10 @@ "version": "3.23.8", "author": "Colin McDonnell ", "description": "TypeScript-first schema declaration and validation library with static type inference", - "files": [ - "src", - "dist" - ], + "files": ["src", "dist"], "funding": "https://github.com/sponsors/colinhacks", "homepage": "https://zod.dev", - "keywords": [ - "typescript", - "schema", - "validation", - "type", - "inference" - ], + "keywords": ["typescript", "schema", "validation", "type", "inference"], "license": "MIT", "sideEffects": false, "main": "./dist/commonjs/index.js", @@ -26,6 +17,7 @@ "./package.json": "./package.json", ".": { "import": { + "@zod/source": "./src/index.ts", "types": "./dist/esm/index.d.ts", "default": "./dist/esm/index.js" }, @@ -36,6 +28,7 @@ }, "./locales/*": { "import": { + "@zod/source": "./src/locales/*", "types": "./dist/esm/locales/*", "default": "./dist/esm/locales/*" }, @@ -50,7 +43,8 @@ "./package.json": "./package.json", ".": "./src/index.ts", "./locales/*": "./src/locales/*" - } + }, + "sourceDialects": ["@zod/source"] }, "repository": { "type": "git", @@ -70,5 +64,8 @@ "test:watch": "pnpm vitest", "test": "pnpm vitest run", "prepublishOnly": "pnpm test && pnpm run build" + }, + "dependencies": { + "effect": "^3.5.6" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49f228887..a6b09a657 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -100,7 +100,11 @@ importers: specifier: ^3.0.0 version: link:../zod - packages/zod: {} + packages/zod: + dependencies: + effect: + specifier: ^3.5.6 + version: 3.5.6 packages: diff --git a/vitest.root.mts b/vitest.root.mts index 912a49daa..44b96efcc 100644 --- a/vitest.root.mts +++ b/vitest.root.mts @@ -1,6 +1,9 @@ import { type UserConfig, defineConfig } from "vitest/config"; export default defineConfig({ + resolve: { + conditions: ["@zod/source"], + }, test: { watch: false, isolate: false,