Skip to content

Commit 5234436

Browse files
build(oidc-auth): lint published package (#1054)
* build(oidc-auth): lint published package * build(oidc-auth): include require condition in subpath exports
1 parent 7c0f044 commit 5234436

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

.github/workflows/ci-oidc-auth.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
node-version: 20.x
2020
- run: yarn workspaces focus hono-middleware @hono/oidc-auth
2121
- run: yarn workspace @hono/oidc-auth build
22+
- run: yarn workspace @hono/oidc-auth publint
2223
- run: yarn test --coverage --project @hono/oidc-auth
2324
- uses: codecov/codecov-action@v5
2425
with:

packages/oidc-auth/package.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,26 @@
33
"version": "1.6.0",
44
"description": "OpenID Connect Authentication middleware for Hono",
55
"type": "module",
6-
"main": "dist/index.js",
6+
"module": "dist/index.js",
77
"types": "dist/index.d.ts",
88
"files": [
99
"dist"
1010
],
1111
"scripts": {
12-
"test": "vitest",
13-
"build": "tsup ./src/index.ts --format esm --dts",
14-
"prerelease": "yarn build && yarn test",
15-
"release": "yarn prerelease && yarn npm publish"
12+
"build": "tsup ./src/index.ts",
13+
"prepack": "yarn build",
14+
"publint": "attw --pack && publint",
15+
"test": "vitest"
1616
},
1717
"exports": {
1818
".": {
1919
"import": {
2020
"types": "./dist/index.d.ts",
2121
"default": "./dist/index.js"
22+
},
23+
"require": {
24+
"types": "./dist/index.d.cts",
25+
"default": "./dist/index.cjs"
2226
}
2327
}
2428
},
@@ -29,18 +33,20 @@
2933
},
3034
"repository": {
3135
"type": "git",
32-
"url": "https://github.com/honojs/middleware.git"
36+
"url": "git+https://github.com/honojs/middleware.git",
37+
"directory": "packages/oidc-auth"
3338
},
3439
"homepage": "https://github.com/honojs/middleware",
3540
"peerDependencies": {
3641
"hono": ">=3.*"
3742
},
3843
"devDependencies": {
44+
"@arethetypeswrong/cli": "^0.17.4",
3945
"@types/jsonwebtoken": "^9.0.5",
4046
"hono": "^4.0.1",
4147
"jsonwebtoken": "^9.0.2",
42-
"tsup": "^8.0.1",
43-
"typescript": "^5.3.3",
48+
"publint": "^0.3.9",
49+
"tsup": "^8.4.0",
4450
"vitest": "^3.0.8"
4551
},
4652
"dependencies": {

packages/oidc-auth/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"module": "ESNext",
5-
"rootDir": "./src",
65
"outDir": "./dist",
76
"types": ["vitest/globals"]
8-
},
9-
"include": ["src/**/*.ts"]
7+
}
108
}

yarn.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,12 +2727,13 @@ __metadata:
27272727
version: 0.0.0-use.local
27282728
resolution: "@hono/oidc-auth@workspace:packages/oidc-auth"
27292729
dependencies:
2730+
"@arethetypeswrong/cli": "npm:^0.17.4"
27302731
"@types/jsonwebtoken": "npm:^9.0.5"
27312732
hono: "npm:^4.0.1"
27322733
jsonwebtoken: "npm:^9.0.2"
27332734
oauth4webapi: "npm:^2.6.0"
2734-
tsup: "npm:^8.0.1"
2735-
typescript: "npm:^5.3.3"
2735+
publint: "npm:^0.3.9"
2736+
tsup: "npm:^8.4.0"
27362737
vitest: "npm:^3.0.8"
27372738
peerDependencies:
27382739
hono: ">=3.*"

0 commit comments

Comments
 (0)