diff --git a/.github/workflows/ci-bun-transpiler.yml b/.github/workflows/ci-bun-transpiler.yml index 7744488e..baadc5d0 100644 --- a/.github/workflows/ci-bun-transpiler.yml +++ b/.github/workflows/ci-bun-transpiler.yml @@ -19,6 +19,7 @@ jobs: bun-version: 1.1.32 - run: yarn workspaces focus hono-middleware @hono/bun-transpiler - run: yarn workspace @hono/bun-transpiler build + - run: yarn workspace @hono/bun-transpiler publint - run: yarn workspace @hono/bun-transpiler test --coverage --coverage-reporter lcov - uses: codecov/codecov-action@v5 with: diff --git a/packages/bun-transpiler/package.json b/packages/bun-transpiler/package.json index 39fe21e8..11650eaf 100644 --- a/packages/bun-transpiler/package.json +++ b/packages/bun-transpiler/package.json @@ -2,23 +2,29 @@ "name": "@hono/bun-transpiler", "version": "0.2.0", "description": "Bun Transpiler Middleware for Hono", + "type": "module", "main": "dist/index.js", - "module": "dist/index.mjs", + "module": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist" ], "scripts": { - "test": "bun test", - "build": "tsup ./src/index.ts --format esm,cjs --dts --external bun", - "publint": "publint", - "release": "yarn build && yarn test && yarn publint && yarn publish" + "build": "tsup ./src/index.ts --external bun", + "prepack": "yarn build", + "publint": "attw --pack && publint", + "test": "bun test" }, "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", @@ -28,16 +34,20 @@ }, "repository": { "type": "git", - "url": "https://github.com/honojs/middleware.git" + "url": "git+https://github.com/honojs/middleware.git", + "directory": "packages/bun-transpiler" }, "homepage": "https://github.com/honojs/middleware", "peerDependencies": { "hono": "*" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.17.4", "@types/bun": "^1.0.0", "hono": "^3.11.7", - "tsup": "^8.0.1" + "publint": "^0.3.9", + "tsup": "^8.4.0", + "vitest": "^3.0.8" }, "engines": { "node": ">=18.14.1" diff --git a/packages/bun-transpiler/tsconfig.json b/packages/bun-transpiler/tsconfig.json index acfcd843..9f275945 100644 --- a/packages/bun-transpiler/tsconfig.json +++ b/packages/bun-transpiler/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 4610acbe..94f8d7a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2618,9 +2618,12 @@ __metadata: version: 0.0.0-use.local resolution: "@hono/bun-transpiler@workspace:packages/bun-transpiler" dependencies: + "@arethetypeswrong/cli": "npm:^0.17.4" "@types/bun": "npm:^1.0.0" 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: hono: "*" languageName: unknown