diff --git a/.github/workflows/ci-arktype-validator.yml b/.github/workflows/ci-arktype-validator.yml index 7576c6f7..9e6686ab 100644 --- a/.github/workflows/ci-arktype-validator.yml +++ b/.github/workflows/ci-arktype-validator.yml @@ -19,6 +19,7 @@ jobs: node-version: 18.x - run: yarn workspaces focus hono-middleware @hono/arktype-validator - run: yarn workspace @hono/arktype-validator build + - run: yarn workspace @hono/arktype-validator publint - run: yarn test --coverage --project @hono/arktype-validator - uses: codecov/codecov-action@v5 with: diff --git a/packages/ajv-validator/tsup.config.ts b/packages/ajv-validator/tsup.config.ts deleted file mode 100644 index 010d3727..00000000 --- a/packages/ajv-validator/tsup.config.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from '../../tsup.config' diff --git a/packages/arktype-validator/package.json b/packages/arktype-validator/package.json index 35f990c3..337de3aa 100644 --- a/packages/arktype-validator/package.json +++ b/packages/arktype-validator/package.json @@ -2,22 +2,29 @@ "name": "@hono/arktype-validator", "version": "2.0.0", "description": "ArkType validator middleware", + "type": "module", "main": "dist/index.js", - "module": "dist/index.mjs", + "module": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist" ], "scripts": { - "test": "vitest --run", - "build": "tsup ./src/index.ts --format esm,cjs --dts", - "release": "yarn build && yarn test && yarn publish" + "build": "tsup ./src/index.ts", + "prepack": "yarn build", + "publint": "attw --pack && publint", + "test": "vitest" }, "exports": { ".": { - "types": "./dist/index.d.mts", - "import": "./dist/index.mjs", - "require": "./dist/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } } }, "license": "MIT", @@ -27,7 +34,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/honojs/middleware.git" + "url": "git+https://github.com/honojs/middleware.git", + "directory": "packages/arktype-validator" }, "homepage": "https://github.com/honojs/middleware", "peerDependencies": { @@ -35,9 +43,11 @@ "hono": "*" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.17.4", "arktype": "^2.0.0-dev.14", "hono": "^3.11.7", - "tsup": "^8.0.1", + "publint": "^0.3.9", + "tsup": "^8.4.0", "vitest": "^3.0.8" } } diff --git a/packages/arktype-validator/tsconfig.json b/packages/arktype-validator/tsconfig.json index acfcd843..9f275945 100644 --- a/packages/arktype-validator/tsconfig.json +++ b/packages/arktype-validator/tsconfig.json @@ -1,10 +1,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "rootDir": "./src", - "outDir": "./dist", - }, - "include": [ - "src/**/*.ts" - ], -} \ No newline at end of file + "outDir": "./dist" + } +} diff --git a/yarn.lock b/yarn.lock index c4ffcc9c..d3eb2093 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2584,9 +2584,11 @@ __metadata: version: 0.0.0-use.local resolution: "@hono/arktype-validator@workspace:packages/arktype-validator" dependencies: + "@arethetypeswrong/cli": "npm:^0.17.4" arktype: "npm:^2.0.0-dev.14" hono: "npm:^3.11.7" - tsup: "npm:^8.0.1" + publint: "npm:^0.3.9" + tsup: "npm:^8.4.0" vitest: "npm:^3.0.8" peerDependencies: arktype: ^2.0.0-dev.14