Skip to content

Commit aab396f

Browse files
build(esbuild-transpiler): lint published package (#1046)
* build(esbuild-transpiler): lint published package * chore: fix repository directory reference
1 parent 738f1da commit aab396f

File tree

4 files changed

+42
-28
lines changed

4 files changed

+42
-28
lines changed

.github/workflows/ci-esbuild-transpiler.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/esbuild-transpiler
2121
- run: yarn workspace @hono/esbuild-transpiler build
22+
- run: yarn workspace @hono/esbuild-transpiler publint
2223
- run: yarn test --coverage --project @hono/esbuild-transpiler
2324
- uses: codecov/codecov-action@v5
2425
with:

packages/esbuild-transpiler/package.json

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,48 @@
22
"name": "@hono/esbuild-transpiler",
33
"version": "0.1.3",
44
"description": "esbuild Transpiler Middleware for Hono",
5-
"main": "dist/index.js",
65
"type": "module",
6+
"module": "dist/index.js",
77
"types": "dist/index.d.ts",
88
"files": [
99
"dist"
1010
],
1111
"scripts": {
12-
"test": "vitest run",
13-
"build": "tsup ./src/*.ts ./src/transpilers/*.ts --format esm,cjs --dts --no-splitting --external esbuild-wasm,esbuild",
14-
"publint": "publint",
15-
"release": "yarn build && yarn test && yarn publint && yarn publish"
12+
"build": "tsup ./src/*.ts ./src/transpilers/*.ts --no-splitting --external esbuild-wasm,esbuild",
13+
"prepack": "yarn build",
14+
"publint": "attw --pack && publint",
15+
"test": "vitest"
1616
},
1717
"exports": {
1818
".": {
19-
"import": "./dist/index.js",
20-
"require": "./dist/index.cjs"
19+
"import": {
20+
"types": "./dist/index.d.ts",
21+
"default": "./dist/index.js"
22+
},
23+
"require": {
24+
"types": "./dist/index.d.cts",
25+
"default": "./dist/index.cjs"
26+
}
2127
},
2228
"./wasm": {
23-
"types": "./dist/transpilers/wasm.d.ts",
24-
"import": "./dist/transpilers/wasm.js",
25-
"require": "./dist/transpilers/wasm.cjs"
29+
"import": {
30+
"types": "./dist/transpilers/wasm.d.ts",
31+
"default": "./dist/transpilers/wasm.js"
32+
},
33+
"require": {
34+
"types": "./dist/transpilers/wasm.d.cts",
35+
"default": "./dist/transpilers/wasm.cjs"
36+
}
2637
},
2738
"./node": {
28-
"types": "./dist/transpilers/node.d.ts",
29-
"import": "./dist/transpilers/node.js",
30-
"require": "./dist/transpilers/node.cjs"
39+
"import": {
40+
"types": "./dist/transpilers/node.d.ts",
41+
"default": "./dist/transpilers/node.js"
42+
},
43+
"require": {
44+
"types": "./dist/transpilers/node.d.cts",
45+
"default": "./dist/transpilers/node.cjs"
46+
}
3147
}
3248
},
3349
"typesVersions": {
@@ -47,20 +63,23 @@
4763
},
4864
"repository": {
4965
"type": "git",
50-
"url": "https://github.com/honojs/middleware.git"
66+
"url": "git+https://github.com/honojs/middleware.git",
67+
"directory": "packages/esbuild-transpiler"
5168
},
5269
"homepage": "https://github.com/honojs/middleware",
5370
"peerDependencies": {
5471
"hono": ">=3.9.2"
5572
},
5673
"devDependencies": {
74+
"@arethetypeswrong/cli": "^0.17.4",
5775
"esbuild": "^0.19.9",
5876
"esbuild-wasm": "^0.19.5",
5977
"hono": "^3.11.7",
60-
"tsup": "^8.0.1",
78+
"publint": "^0.3.9",
79+
"tsup": "^8.4.0",
6180
"vitest": "^3.0.8"
6281
},
6382
"engines": {
6483
"node": ">=18.14.1"
6584
}
66-
}
85+
}
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"skipLibCheck": false,
5-
"rootDir": "./src",
6-
},
7-
"include": [
8-
"src/**/*.ts"
9-
],
10-
"exclude": [
11-
"node_modules",
12-
"dist"
13-
]
14-
}
4+
"skipLibCheck": false
5+
}
6+
}

yarn.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2570,10 +2570,12 @@ __metadata:
25702570
version: 0.0.0-use.local
25712571
resolution: "@hono/esbuild-transpiler@workspace:packages/esbuild-transpiler"
25722572
dependencies:
2573+
"@arethetypeswrong/cli": "npm:^0.17.4"
25732574
esbuild: "npm:^0.19.9"
25742575
esbuild-wasm: "npm:^0.19.5"
25752576
hono: "npm:^3.11.7"
2576-
tsup: "npm:^8.0.1"
2577+
publint: "npm:^0.3.9"
2578+
tsup: "npm:^8.4.0"
25772579
vitest: "npm:^3.0.8"
25782580
peerDependencies:
25792581
hono: ">=3.9.2"

0 commit comments

Comments
 (0)