build(otel): lint published package (#1055)

pull/1068/head
Jonathan Haines 2025-03-27 13:38:15 +11:00 committed by GitHub
parent 33c3faae59
commit c0ee9a4f5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 13 deletions

View File

@ -19,6 +19,7 @@ jobs:
node-version: 20.x
- run: yarn workspaces focus hono-middleware @hono/otel
- run: yarn workspace @hono/otel build
- run: yarn workspace @hono/otel publint
- run: yarn test --coverage --project @hono/otel
- uses: codecov/codecov-action@v5
with:

View File

@ -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/otel"
},
"homepage": "https://github.com/honojs/middleware",
"peerDependencies": {
@ -44,10 +45,12 @@
"@opentelemetry/semantic-conventions": "^1.28.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.4",
"@opentelemetry/sdk-trace-base": "^1.30.0",
"@opentelemetry/sdk-trace-node": "^1.30.0",
"hono": "^4.4.12",
"tsup": "^8.1.0",
"publint": "^0.3.9",
"tsup": "^8.4.0",
"vitest": "^3.0.8"
}
}

View File

@ -1,4 +1,5 @@
import { SpanKind, SpanStatusCode, type TracerProvider, trace } from '@opentelemetry/api'
import type { TracerProvider } from '@opentelemetry/api'
import { SpanKind, SpanStatusCode, trace } from '@opentelemetry/api'
import {
ATTR_HTTP_REQUEST_HEADER,
ATTR_HTTP_REQUEST_METHOD,

View File

@ -1,10 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"module": "ESNext",
"resolveJsonModule": true
},
"include": ["src/**/*.ts"]
"resolveJsonModule": true,
"types": ["vitest/globals"]
}
}

View File

@ -2743,12 +2743,14 @@ __metadata:
version: 0.0.0-use.local
resolution: "@hono/otel@workspace:packages/otel"
dependencies:
"@arethetypeswrong/cli": "npm:^0.17.4"
"@opentelemetry/api": "npm:^1.9.0"
"@opentelemetry/sdk-trace-base": "npm:^1.30.0"
"@opentelemetry/sdk-trace-node": "npm:^1.30.0"
"@opentelemetry/semantic-conventions": "npm:^1.28.0"
hono: "npm:^4.4.12"
tsup: "npm:^8.1.0"
publint: "npm:^0.3.9"
tsup: "npm:^8.4.0"
vitest: "npm:^3.0.8"
peerDependencies:
hono: "*"