From 6a7e42d4ee6db62604646cbb12eb51e7c6582ce0 Mon Sep 17 00:00:00 2001 From: Jonathan Haines Date: Thu, 27 Mar 2025 13:20:23 +1100 Subject: [PATCH] build(hello): lint published package (#1050) --- .github/workflows/ci-hello.yml | 1 + packages/hello/package.json | 15 +++++++++------ packages/hello/tsconfig.json | 10 +++------- yarn.lock | 4 +++- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-hello.yml b/.github/workflows/ci-hello.yml index 77f211df..0438bf4a 100644 --- a/.github/workflows/ci-hello.yml +++ b/.github/workflows/ci-hello.yml @@ -19,6 +19,7 @@ jobs: node-version: 20.x - run: yarn workspaces focus hono-middleware @hono/hello - run: yarn workspace @hono/hello build + - run: yarn workspace @hono/hello publint - run: yarn test --coverage --project @hono/hello - uses: codecov/codecov-action@v5 with: diff --git a/packages/hello/package.json b/packages/hello/package.json index f65438ad..e803aa7d 100644 --- a/packages/hello/package.json +++ b/packages/hello/package.json @@ -9,10 +9,10 @@ "dist" ], "scripts": { - "test": "vitest --run", - "build": "tsup ./src/index.ts --format esm,cjs --dts", - "publint": "publint", - "release": "yarn build && yarn test && yarn publint && yarn publish" + "build": "tsup ./src/index.ts", + "prepack": "yarn build", + "publint": "attw --pack && publint", + "test": "vitest" }, "exports": { ".": { @@ -33,15 +33,18 @@ }, "repository": { "type": "git", - "url": "https://github.com/honojs/middleware.git" + "url": "git+https://github.com/honojs/middleware.git", + "directory": "packages/hello" }, "homepage": "https://github.com/honojs/middleware", "peerDependencies": { "hono": "*" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.17.4", "hono": "^4.4.12", - "tsup": "^8.1.0", + "publint": "^0.3.9", + "tsup": "^8.4.0", "vitest": "^3.0.8" } } diff --git a/packages/hello/tsconfig.json b/packages/hello/tsconfig.json index acfcd843..9f275945 100644 --- a/packages/hello/tsconfig.json +++ b/packages/hello/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 285b3ffa..c0ecceb4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2657,8 +2657,10 @@ __metadata: version: 0.0.0-use.local resolution: "@hono/hello@workspace:packages/hello" dependencies: + "@arethetypeswrong/cli": "npm:^0.17.4" hono: "npm:^4.4.12" - tsup: "npm:^8.1.0" + publint: "npm:^0.3.9" + tsup: "npm:^8.4.0" vitest: "npm:^3.0.8" peerDependencies: hono: "*"