From d905d009fe6b956fc4f2137a83a38a3b0ca5825e Mon Sep 17 00:00:00 2001 From: Jonathan Haines Date: Thu, 27 Mar 2025 13:14:58 +1100 Subject: [PATCH] build(firebase-auth): lint published package (#1048) --- .github/workflows/ci-firebase-auth.yml | 1 + packages/firebase-auth/package.json | 17 +++++++++-------- packages/firebase-auth/tsconfig.json | 13 +++---------- yarn.lock | 5 +++-- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-firebase-auth.yml b/.github/workflows/ci-firebase-auth.yml index 2e0d02b3..d9114624 100644 --- a/.github/workflows/ci-firebase-auth.yml +++ b/.github/workflows/ci-firebase-auth.yml @@ -19,6 +19,7 @@ jobs: node-version: 18.x - run: yarn workspaces focus hono-middleware @hono/firebase-auth - run: yarn workspace @hono/firebase-auth build + - run: yarn workspace @hono/firebase-auth publint - run: yarn test --coverage --project @hono/firebase-auth - uses: codecov/codecov-action@v5 with: diff --git a/packages/firebase-auth/package.json b/packages/firebase-auth/package.json index 0be20dfe..e59c4ce3 100644 --- a/packages/firebase-auth/package.json +++ b/packages/firebase-auth/package.json @@ -12,11 +12,10 @@ "scripts": { "start-firebase-emulator": "firebase emulators:start --project example-project12345", "test-with-emulator": "firebase emulators:exec --project example-project12345 'vitest run'", - "test": "vitest run", - "build": "tsup ./src/index.ts --format esm,cjs --dts", - "publint": "publint", - "prerelease": "yarn build && arn publint", - "release": "yarn publish" + "test": "vitest", + "build": "tsup ./src/index.ts", + "prepack": "yarn build", + "publint": "attw --pack && publint" }, "exports": { ".": { @@ -33,7 +32,8 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/honojs/middleware.git" + "url": "git+https://github.com/honojs/middleware.git", + "directory": "packages/firebase-auth" }, "homepage": "https://github.com/honojs/middleware", "author": "codehex", @@ -48,13 +48,14 @@ "hono": "*" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.17.4", "@cloudflare/workers-types": "^4.20240222.0", "firebase-tools": "^13.29.1", "hono": "^4.2.4", "miniflare": "^3.20240208.0", "prettier": "^3.2.5", - "tsup": "^8.0.2", - "typescript": "^5.3.3", + "publint": "^0.3.9", + "tsup": "^8.4.0", "vitest": "^3.0.8" } } diff --git a/packages/firebase-auth/tsconfig.json b/packages/firebase-auth/tsconfig.json index a5e0074b..f8678c52 100644 --- a/packages/firebase-auth/tsconfig.json +++ b/packages/firebase-auth/tsconfig.json @@ -1,14 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "rootDir": "./src", "outDir": "./dist", - "types": [ - "node", - "@cloudflare/workers-types" - ] - }, - "include": [ - "src/**/*.ts" - ], -} \ No newline at end of file + "types": ["node", "@cloudflare/workers-types"] + } +} diff --git a/yarn.lock b/yarn.lock index 3ac29040..bd1c5c9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2622,14 +2622,15 @@ __metadata: version: 0.0.0-use.local resolution: "@hono/firebase-auth@workspace:packages/firebase-auth" dependencies: + "@arethetypeswrong/cli": "npm:^0.17.4" "@cloudflare/workers-types": "npm:^4.20240222.0" firebase-auth-cloudflare-workers: "npm:^2.0.6" firebase-tools: "npm:^13.29.1" hono: "npm:^4.2.4" miniflare: "npm:^3.20240208.0" prettier: "npm:^3.2.5" - tsup: "npm:^8.0.2" - typescript: "npm:^5.3.3" + publint: "npm:^0.3.9" + tsup: "npm:^8.4.0" vitest: "npm:^3.0.8" peerDependencies: hono: "*"