From 85e67a12c00786e8a52628568524d30b59409bad Mon Sep 17 00:00:00 2001 From: Jonathan Haines Date: Thu, 27 Mar 2025 15:13:54 +1100 Subject: [PATCH] build(tsyringe): lint published package (#1065) --- .github/workflows/ci-tsyringe.yml | 1 + packages/tsyringe/package.json | 16 +++++++++------- packages/tsyringe/tsconfig.json | 9 +++------ yarn.lock | 14 +++----------- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci-tsyringe.yml b/.github/workflows/ci-tsyringe.yml index bfb50d06..ce5baf1b 100644 --- a/.github/workflows/ci-tsyringe.yml +++ b/.github/workflows/ci-tsyringe.yml @@ -19,6 +19,7 @@ jobs: node-version: 20.x - run: yarn workspaces focus hono-middleware @hono/tsyringe - run: yarn workspace @hono/tsyringe build + - run: yarn workspace @hono/tsyringe publint - run: yarn test --coverage --project @hono/tsyringe - uses: codecov/codecov-action@v5 with: diff --git a/packages/tsyringe/package.json b/packages/tsyringe/package.json index a4f221e3..ac11672b 100644 --- a/packages/tsyringe/package.json +++ b/packages/tsyringe/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,7 +33,8 @@ }, "repository": { "type": "git", - "url": "https://github.com/honojs/middleware.git" + "url": "git+https://github.com/honojs/middleware.git", + "directory": "packages/tsyringe" }, "homepage": "https://github.com/honojs/middleware", "peerDependencies": { @@ -41,10 +42,11 @@ "tsyringe": ">=4.*" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.17.4", "hono": "^4.4.12", - "prettier": "^3.3.3", + "publint": "^0.3.9", "reflect-metadata": "^0.2.2", - "tsup": "^8.1.0", + "tsup": "^8.4.0", "tsyringe": "^4.8.0", "vitest": "^3.0.8" } diff --git a/packages/tsyringe/tsconfig.json b/packages/tsyringe/tsconfig.json index 3cbc5a07..d0f6fbf3 100644 --- a/packages/tsyringe/tsconfig.json +++ b/packages/tsyringe/tsconfig.json @@ -1,12 +1,9 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "rootDir": "./src", "outDir": "./dist", "experimentalDecorators": true, - "emitDecoratorMetadata": true - }, - "include": [ - "src/**/*.ts" - ], + "emitDecoratorMetadata": true, + "types": ["vitest/globals"] + } } diff --git a/yarn.lock b/yarn.lock index 1bff5d44..fa2aad02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2915,10 +2915,11 @@ __metadata: version: 0.0.0-use.local resolution: "@hono/tsyringe@workspace:packages/tsyringe" dependencies: + "@arethetypeswrong/cli": "npm:^0.17.4" hono: "npm:^4.4.12" - prettier: "npm:^3.3.3" + publint: "npm:^0.3.9" reflect-metadata: "npm:^0.2.2" - tsup: "npm:^8.1.0" + tsup: "npm:^8.4.0" tsyringe: "npm:^4.8.0" vitest: "npm:^3.0.8" peerDependencies: @@ -14018,15 +14019,6 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.3.3": - version: 3.3.3 - resolution: "prettier@npm:3.3.3" - bin: - prettier: bin/prettier.cjs - checksum: b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 - languageName: node - linkType: hard - "pretty-format@npm:^3.8.0": version: 3.8.0 resolution: "pretty-format@npm:3.8.0"