Skip to content

Commit 3b9d2d2

Browse files
build(auth-js): lint published package (#1034)
* build(auth-js): lint published package * ci(auth-js): run publint * build(auth-js): remove no splitting flag
1 parent 3ae1b48 commit 3b9d2d2

File tree

5 files changed

+24
-30
lines changed

5 files changed

+24
-30
lines changed

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

+1
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/auth-js
2121
- run: yarn workspace @hono/auth-js build
22+
- run: yarn workspace @hono/auth-js publint
2223
- run: yarn test --coverage --project @hono/auth-js
2324
- uses: codecov/codecov-action@v5
2425
with:

packages/auth-js/package.json

+19-16
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@
33
"version": "1.0.15",
44
"description": "A third-party Auth js middleware for Hono",
55
"main": "dist/index.js",
6+
"type": "module",
67
"exports": {
78
".": {
89
"import": {
9-
"types": "./dist/index.d.mts",
10-
"default": "./dist/index.mjs"
11-
},
12-
"require": {
1310
"types": "./dist/index.d.ts",
1411
"default": "./dist/index.js"
12+
},
13+
"require": {
14+
"types": "./dist/index.d.cts",
15+
"default": "./dist/index.cjs"
1516
}
1617
},
1718
"./react": {
1819
"import": {
19-
"types": "./dist/react.d.mts",
20-
"default": "./dist/react.mjs"
21-
},
22-
"require": {
2320
"types": "./dist/react.d.ts",
2421
"default": "./dist/react.js"
22+
},
23+
"require": {
24+
"types": "./dist/react.d.cts",
25+
"default": "./dist/react.cjs"
2526
}
2627
}
2728
},
@@ -36,10 +37,10 @@
3637
"dist"
3738
],
3839
"scripts": {
39-
"test": "vitest --run",
40-
"build": "tsup",
41-
"prerelease": "yarn build && yarn test",
42-
"release": "yarn publish"
40+
"build": "tsup src/index.ts src/react.tsx",
41+
"prepack": "yarn build",
42+
"publint": "attw --pack --profile node16 && publint",
43+
"test": "vitest"
4344
},
4445
"license": "MIT",
4546
"publishConfig": {
@@ -48,7 +49,8 @@
4849
},
4950
"repository": {
5051
"type": "git",
51-
"url": "https://github.com/honojs/middleware.git"
52+
"url": "git+https://github.com/honojs/middleware.git",
53+
"directory": "packages/auth-js"
5254
},
5355
"homepage": "https://github.com/honojs/middleware",
5456
"peerDependencies": {
@@ -57,15 +59,16 @@
5759
"react": "^18 || ^19 || ^19.0.0-rc"
5860
},
5961
"devDependencies": {
62+
"@arethetypeswrong/cli": "^0.17.4",
6063
"@auth/core": "^0.35.3",
6164
"@types/react": "^18",
6265
"hono": "^3.11.7",
66+
"publint": "^0.3.9",
6367
"react": "^18.2.0",
64-
"tsup": "^8.0.1",
65-
"typescript": "^5.3.3",
68+
"tsup": "^8.4.0",
6669
"vitest": "^3.0.8"
6770
},
6871
"engines": {
6972
"node": ">=18.4.0"
7073
}
71-
}
74+
}

packages/auth-js/tsconfig.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
"target": "ESNext",
55
"module": "ESNext",
66
"moduleResolution": "node",
7-
"rootDir": "./",
87
"outDir": "./dist",
98
"jsx": "react",
109
"types": ["node", "vitest/globals"]
11-
},
12-
"include": ["src/**/*.ts", "src/**/*.tsx"]
10+
}
1311
}

packages/auth-js/tsup.config.ts

-9
This file was deleted.

yarn.lock

+3-2
Original file line numberDiff line numberDiff line change
@@ -2600,12 +2600,13 @@ __metadata:
26002600
version: 0.0.0-use.local
26012601
resolution: "@hono/auth-js@workspace:packages/auth-js"
26022602
dependencies:
2603+
"@arethetypeswrong/cli": "npm:^0.17.4"
26032604
"@auth/core": "npm:^0.35.3"
26042605
"@types/react": "npm:^18"
26052606
hono: "npm:^3.11.7"
2607+
publint: "npm:^0.3.9"
26062608
react: "npm:^18.2.0"
2607-
tsup: "npm:^8.0.1"
2608-
typescript: "npm:^5.3.3"
2609+
tsup: "npm:^8.4.0"
26092610
vitest: "npm:^3.0.8"
26102611
peerDependencies:
26112612
"@auth/core": 0.*

0 commit comments

Comments
 (0)