diff --git a/.vscode/settings.json b/.vscode/settings.json index 3471dc6..cb84d9c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,7 +2,7 @@ "prettier.enable": false, "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "editor.tabSize": 2, "cSpell.words": [ diff --git a/build.config.ts b/build.config.ts index 5116f79..dd5904b 100644 --- a/build.config.ts +++ b/build.config.ts @@ -2,7 +2,7 @@ import { defineBuildConfig } from 'unbuild'; export default defineBuildConfig({ entries: [ - 'lib/index', + 'src/index', ], declaration: true, clean: true, diff --git a/package.json b/package.json index 5d29d14..ae06083 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "import": "./dist/index.mjs" } }, - "main": "./dist/index.mjs", + "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "typesVersions": { diff --git a/lib/MockGenerator.ts b/src/MockGenerator.ts similarity index 100% rename from lib/MockGenerator.ts rename to src/MockGenerator.ts diff --git a/lib/errors/DepthLimitError.ts b/src/errors/DepthLimitError.ts similarity index 100% rename from lib/errors/DepthLimitError.ts rename to src/errors/DepthLimitError.ts diff --git a/lib/generators/ArrayGenerator.ts b/src/generators/ArrayGenerator.ts similarity index 100% rename from lib/generators/ArrayGenerator.ts rename to src/generators/ArrayGenerator.ts diff --git a/lib/generators/BaseGenerator.ts b/src/generators/BaseGenerator.ts similarity index 100% rename from lib/generators/BaseGenerator.ts rename to src/generators/BaseGenerator.ts diff --git a/lib/generators/BigIntGenerator.ts b/src/generators/BigIntGenerator.ts similarity index 100% rename from lib/generators/BigIntGenerator.ts rename to src/generators/BigIntGenerator.ts diff --git a/lib/generators/BooleanGenerator.ts b/src/generators/BooleanGenerator.ts similarity index 100% rename from lib/generators/BooleanGenerator.ts rename to src/generators/BooleanGenerator.ts diff --git a/lib/generators/BrandedGenerator.ts b/src/generators/BrandedGenerator.ts similarity index 100% rename from lib/generators/BrandedGenerator.ts rename to src/generators/BrandedGenerator.ts diff --git a/lib/generators/CatchGenerator.ts b/src/generators/CatchGenerator.ts similarity index 100% rename from lib/generators/CatchGenerator.ts rename to src/generators/CatchGenerator.ts diff --git a/lib/generators/DateGenerator.ts b/src/generators/DateGenerator.ts similarity index 100% rename from lib/generators/DateGenerator.ts rename to src/generators/DateGenerator.ts diff --git a/lib/generators/DefaultGenerator.ts b/src/generators/DefaultGenerator.ts similarity index 100% rename from lib/generators/DefaultGenerator.ts rename to src/generators/DefaultGenerator.ts diff --git a/lib/generators/DiscriminatedUnionGenerator.ts b/src/generators/DiscriminatedUnionGenerator.ts similarity index 100% rename from lib/generators/DiscriminatedUnionGenerator.ts rename to src/generators/DiscriminatedUnionGenerator.ts diff --git a/lib/generators/EffectsGenerator.ts b/src/generators/EffectsGenerator.ts similarity index 100% rename from lib/generators/EffectsGenerator.ts rename to src/generators/EffectsGenerator.ts diff --git a/lib/generators/EnumGenerator.ts b/src/generators/EnumGenerator.ts similarity index 100% rename from lib/generators/EnumGenerator.ts rename to src/generators/EnumGenerator.ts diff --git a/lib/generators/FunctionGenerator.ts b/src/generators/FunctionGenerator.ts similarity index 100% rename from lib/generators/FunctionGenerator.ts rename to src/generators/FunctionGenerator.ts diff --git a/lib/generators/IntersectionGenerator.ts b/src/generators/IntersectionGenerator.ts similarity index 100% rename from lib/generators/IntersectionGenerator.ts rename to src/generators/IntersectionGenerator.ts diff --git a/lib/generators/LazyGenerator.ts b/src/generators/LazyGenerator.ts similarity index 100% rename from lib/generators/LazyGenerator.ts rename to src/generators/LazyGenerator.ts diff --git a/lib/generators/LiteralGenerator.ts b/src/generators/LiteralGenerator.ts similarity index 100% rename from lib/generators/LiteralGenerator.ts rename to src/generators/LiteralGenerator.ts diff --git a/lib/generators/MapGenerator.ts b/src/generators/MapGenerator.ts similarity index 100% rename from lib/generators/MapGenerator.ts rename to src/generators/MapGenerator.ts diff --git a/lib/generators/NaNGenerator.ts b/src/generators/NaNGenerator.ts similarity index 100% rename from lib/generators/NaNGenerator.ts rename to src/generators/NaNGenerator.ts diff --git a/lib/generators/NativeEnumGenerator.ts b/src/generators/NativeEnumGenerator.ts similarity index 100% rename from lib/generators/NativeEnumGenerator.ts rename to src/generators/NativeEnumGenerator.ts diff --git a/lib/generators/NullGenerator.ts b/src/generators/NullGenerator.ts similarity index 100% rename from lib/generators/NullGenerator.ts rename to src/generators/NullGenerator.ts diff --git a/lib/generators/NullableGenerator.ts b/src/generators/NullableGenerator.ts similarity index 100% rename from lib/generators/NullableGenerator.ts rename to src/generators/NullableGenerator.ts diff --git a/lib/generators/NumberGenerator.ts b/src/generators/NumberGenerator.ts similarity index 100% rename from lib/generators/NumberGenerator.ts rename to src/generators/NumberGenerator.ts diff --git a/lib/generators/ObjectGenerator.ts b/src/generators/ObjectGenerator.ts similarity index 100% rename from lib/generators/ObjectGenerator.ts rename to src/generators/ObjectGenerator.ts diff --git a/lib/generators/OptionalGenerator.ts b/src/generators/OptionalGenerator.ts similarity index 100% rename from lib/generators/OptionalGenerator.ts rename to src/generators/OptionalGenerator.ts diff --git a/lib/generators/PipelineGenerator.ts b/src/generators/PipelineGenerator.ts similarity index 100% rename from lib/generators/PipelineGenerator.ts rename to src/generators/PipelineGenerator.ts diff --git a/lib/generators/PromiseGenerator.ts b/src/generators/PromiseGenerator.ts similarity index 100% rename from lib/generators/PromiseGenerator.ts rename to src/generators/PromiseGenerator.ts diff --git a/lib/generators/RecordGenerator.ts b/src/generators/RecordGenerator.ts similarity index 100% rename from lib/generators/RecordGenerator.ts rename to src/generators/RecordGenerator.ts diff --git a/lib/generators/SetGenerator.ts b/src/generators/SetGenerator.ts similarity index 100% rename from lib/generators/SetGenerator.ts rename to src/generators/SetGenerator.ts diff --git a/lib/generators/StringGenerator.ts b/src/generators/StringGenerator.ts similarity index 100% rename from lib/generators/StringGenerator.ts rename to src/generators/StringGenerator.ts diff --git a/lib/generators/SymbolGenerator.ts b/src/generators/SymbolGenerator.ts similarity index 100% rename from lib/generators/SymbolGenerator.ts rename to src/generators/SymbolGenerator.ts diff --git a/lib/generators/TuppleGenerator.ts b/src/generators/TuppleGenerator.ts similarity index 100% rename from lib/generators/TuppleGenerator.ts rename to src/generators/TuppleGenerator.ts diff --git a/lib/generators/UndefinedGenerator.ts b/src/generators/UndefinedGenerator.ts similarity index 100% rename from lib/generators/UndefinedGenerator.ts rename to src/generators/UndefinedGenerator.ts diff --git a/lib/generators/UnionGenerator.ts b/src/generators/UnionGenerator.ts similarity index 100% rename from lib/generators/UnionGenerator.ts rename to src/generators/UnionGenerator.ts diff --git a/lib/generators/VoidGenerator.ts b/src/generators/VoidGenerator.ts similarity index 100% rename from lib/generators/VoidGenerator.ts rename to src/generators/VoidGenerator.ts diff --git a/lib/index.ts b/src/index.ts similarity index 100% rename from lib/index.ts rename to src/index.ts diff --git a/tests/effects.test.ts b/tests/effects.test.ts index 4bae029..66f6884 100644 --- a/tests/effects.test.ts +++ b/tests/effects.test.ts @@ -1,6 +1,6 @@ import { describe, test, expect as viExpect } from 'vitest'; import { z } from 'zod'; -import { createMock } from '../lib'; +import { createMock } from '../src'; import { expect } from './utils/expect'; describe('Effects', () => { diff --git a/tests/utils/expect.ts b/tests/utils/expect.ts index c2a60ca..4f307d4 100644 --- a/tests/utils/expect.ts +++ b/tests/utils/expect.ts @@ -1,6 +1,6 @@ import type { z } from 'zod'; import { expect as viExpect } from 'vitest'; -import { createMock } from '../../lib'; +import { createMock } from '../../src'; export function expect(schema: T) { return viExpect(schema.safeParse(createMock(schema)).success).toBe(true);