diff --git a/.vscode/settings.json b/.vscode/settings.json index e1bf8c926e..d8f5e44d16 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,9 +17,7 @@ "out", // too many overlapping names, easy to import in schema/arktype where we don't want it // should just import as * as ts when we need it in attest - "typescript", - "./ark/type/api.ts" - // "./ark/schema/api.ts" + "typescript" ], "typescript.tsserver.experimental.enableProjectDiagnostics": true, // IF YOU UPDATE THE MOCHA CONFIG HERE, PLEASE ALSO UPDATE package.json/mocha AND ark/repo/mocha.jsonc diff --git a/ark/attest/api.ts b/ark/attest/index.ts similarity index 100% rename from ark/attest/api.ts rename to ark/attest/index.ts diff --git a/ark/attest/package.json b/ark/attest/package.json index 5b64c702c2..a547cd291f 100644 --- a/ark/attest/package.json +++ b/ark/attest/package.json @@ -7,10 +7,10 @@ "url": "https://arktype.io" }, "type": "module", - "main": "./out/api.js", - "types": "./out/api.d.ts", + "main": "./out/index.js", + "types": "./out/index.d.ts", "exports": { - ".": "./out/api.js", + ".": "./out/index.js", "./internal/*": "./out/*" }, "files": [ diff --git a/ark/fs/api.ts b/ark/fs/index.ts similarity index 100% rename from ark/fs/api.ts rename to ark/fs/index.ts diff --git a/ark/fs/package.json b/ark/fs/package.json index 498039a360..0146b339e7 100644 --- a/ark/fs/package.json +++ b/ark/fs/package.json @@ -7,10 +7,10 @@ "url": "https://arktype.io" }, "type": "module", - "main": "./out/api.js", - "types": "./out/api.d.ts", + "main": "./out/index.js", + "types": "./out/index.d.ts", "exports": { - ".": "./out/api.js", + ".": "./out/index.js", "./internal/*": "./out/*" }, "scripts": { diff --git a/ark/repo/.eslintrc.cjs b/ark/repo/.eslintrc.cjs index 9f1b9711ab..7850adb195 100644 --- a/ark/repo/.eslintrc.cjs +++ b/ark/repo/.eslintrc.cjs @@ -89,7 +89,7 @@ module.exports = defineConfig({ message: `Use a specifier like '@arktype/util' to import from a package` }, { - group: ["**/api.js"], + group: ["**/index.js"], message: `Use a path like '../original/definition.js' instead of a package entrypoint` } ] diff --git a/ark/repo/tsconfig.esm.json b/ark/repo/tsconfig.esm.json index eebb99c775..e7f6907346 100644 --- a/ark/repo/tsconfig.esm.json +++ b/ark/repo/tsconfig.esm.json @@ -1,10 +1,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "rootDir": ".", - "outDir": "out", - "noEmit": false, - "paths": {} - }, - "exclude": ["out", "__tests__"] + "rootDir": "." + } } diff --git a/ark/schema/api.ts b/ark/schema/index.ts similarity index 95% rename from ark/schema/api.ts rename to ark/schema/index.ts index 56eab6e954..dadb472367 100644 --- a/ark/schema/api.ts +++ b/ark/schema/index.ts @@ -24,8 +24,10 @@ export * from "./refinements/min.js" export * from "./refinements/minLength.js" export * from "./refinements/range.js" export * from "./refinements/regex.js" +export * from "./roots/domain.js" export * from "./roots/intersection.js" export * from "./roots/morph.js" +export * from "./roots/proto.js" export * from "./roots/root.js" export * from "./roots/union.js" export * from "./roots/unit.js" diff --git a/ark/schema/package.json b/ark/schema/package.json index f1c849effd..84a5d66dd8 100644 --- a/ark/schema/package.json +++ b/ark/schema/package.json @@ -12,10 +12,10 @@ "url": "https://github.com/arktypeio/arktype.git" }, "type": "module", - "main": "./out/api.js", - "types": "./out/api.d.ts", + "main": "./out/index.js", + "types": "./out/index.d.ts", "exports": { - ".": "./out/api.js", + ".": "./out/index.js", "./config": "./out/config.js", "./internal/*": "./out/*" }, diff --git a/ark/type/api.ts b/ark/type/index.ts similarity index 100% rename from ark/type/api.ts rename to ark/type/index.ts diff --git a/ark/type/package.json b/ark/type/package.json index f08dbc1f3d..a064ddbdd5 100644 --- a/ark/type/package.json +++ b/ark/type/package.json @@ -13,10 +13,10 @@ "url": "https://github.com/arktypeio/arktype.git" }, "type": "module", - "main": "./out/api.js", - "types": "./out/api.d.ts", + "main": "./out/index.js", + "types": "./out/index.d.ts", "exports": { - ".": "./out/api.js", + ".": "./out/index.js", "./config": "./out/config.js", "./internal/*": "./out/*" }, diff --git a/ark/type/tsconfig.build.json b/ark/type/tsconfig.json similarity index 100% rename from ark/type/tsconfig.build.json rename to ark/type/tsconfig.json diff --git a/ark/type/type.ts b/ark/type/type.ts index 0b03eed37b..ade912ef4b 100644 --- a/ark/type/type.ts +++ b/ark/type/type.ts @@ -38,7 +38,6 @@ import { type array, type conform } from "@arktype/util" - import { Generic, type validateParameterString } from "./generic.js" import type { inferDefinition, diff --git a/ark/util/api.ts b/ark/util/index.ts similarity index 100% rename from ark/util/api.ts rename to ark/util/index.ts diff --git a/ark/util/package.json b/ark/util/package.json index 62f2424c20..1d92babb5b 100644 --- a/ark/util/package.json +++ b/ark/util/package.json @@ -7,10 +7,10 @@ "url": "https://arktype.io" }, "type": "module", - "main": "./out/api.js", - "types": "./out/api.d.ts", + "main": "./out/index.js", + "types": "./out/index.d.ts", "exports": { - ".": "./out/api.js", + ".": "./out/index.js", "./internal/*": "./out/*", "./tsconfig.base.json": "./tsconfig.base.json" }, diff --git a/tsconfig.json b/tsconfig.json index 63b3c664d4..8b5ccda88e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,12 +5,12 @@ // "noErrorTruncation": true, // "isolatedDeclarations": true, "paths": { - "arktype": ["./ark/type/api.ts"], + "arktype": ["./ark/type/index.ts"], "arktype/config": ["./ark/type/config.ts"], - "@arktype/util": ["./ark/util/api.ts"], - "@arktype/fs": ["./ark/fs/api.ts"], - "@arktype/attest": ["./ark/attest/api.ts"], - "@arktype/schema": ["./ark/schema/api.ts"], + "@arktype/util": ["./ark/util/index.ts"], + "@arktype/fs": ["./ark/fs/index.ts"], + "@arktype/attest": ["./ark/attest/index.ts"], + "@arktype/schema": ["./ark/schema/index.ts"], "@arktype/schema/config": ["./ark/schema/config.ts"] }, "types": ["mocha", "node"]