build(oauth-providers): lint published package (#1053)

pull/1017/head
Jonathan Haines 2025-03-27 13:30:17 +11:00 committed by Tim Barley
parent 9e77615d91
commit fcce865c87
5 changed files with 25 additions and 95 deletions

View File

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

View File

@ -2,96 +2,38 @@
"name": "@hono/oauth-providers", "name": "@hono/oauth-providers",
"version": "0.7.0", "version": "0.7.0",
"description": "Social login for Hono JS, integrate authentication with facebook, github, google and linkedin to your projects.", "description": "Social login for Hono JS, integrate authentication with facebook, github, google and linkedin to your projects.",
"type": "module",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"files": [ "files": [
"./dist" "./dist"
], ],
"scripts": { "scripts": {
"test": "vitest", "build": "tsup ./src/index.ts ./src/providers/**/index.ts ./src/providers/**/types.ts --no-splitting",
"build": "tsup && publint", "prepack": "yarn build",
"watch": "tsup --watch", "publint": "attw --pack && publint",
"publint": "publint", "test": "vitest"
"release": "yarn build && yarn test && yarn publint && yarn publish"
}, },
"exports": { "exports": {
".": { ".": {
"import": { "import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"default": "./dist/index.js" "default": "./dist/index.js"
}
},
"./google": {
"import": {
"types": "./dist/providers/google/index.d.mts",
"default": "./dist/providers/google/index.mjs"
}, },
"require": { "require": {
"types": "./dist/providers/google/index.d.ts", "types": "./dist/index.d.cts",
"default": "./dist/providers/google/index.js" "default": "./dist/index.cjs"
} }
}, },
"./facebook": { "./*": {
"import": { "import": {
"types": "./dist/providers/facebook/index.d.mts", "types": "./dist/providers/*/index.d.ts",
"default": "./dist/providers/facebook/index.mjs" "default": "./dist/providers/*/index.js"
}, },
"require": { "require": {
"types": "./dist/providers/facebook/index.d.ts", "types": "./dist/providers/*/index.d.cts",
"default": "./dist/providers/facebook/index.js" "default": "./dist/providers/*/index.cjs"
}
},
"./github": {
"import": {
"types": "./dist/providers/github/index.d.mts",
"default": "./dist/providers/github/index.mjs"
},
"require": {
"types": "./dist/providers/github/index.d.ts",
"default": "./dist/providers/github/index.js"
}
},
"./linkedin": {
"import": {
"types": "./dist/providers/linkedin/index.d.mts",
"default": "./dist/providers/linkedin/index.mjs"
},
"require": {
"types": "./dist/providers/linkedin/index.d.ts",
"default": "./dist/providers/linkedin/index.js"
}
},
"./x": {
"import": {
"types": "./dist/providers/x/index.d.mts",
"default": "./dist/providers/x/index.mjs"
},
"require": {
"types": "./dist/providers/x/index.d.ts",
"default": "./dist/providers/x/index.js"
}
},
"./discord": {
"import": {
"types": "./dist/providers/discord/index.d.mts",
"default": "./dist/providers/discord/index.mjs"
},
"require": {
"types": "./dist/providers/discord/index.d.ts",
"default": "./dist/providers/discord/index.js"
}
},
"./twitch": {
"import": {
"types": "./dist/providers/twitch/index.d.mts",
"default": "./dist/providers/twitch/index.mjs"
},
"require": {
"types": "./dist/providers/twitch/index.d.ts",
"default": "./dist/providers/twitch/index.js"
} }
}, },
"./msentra": { "./msentra": {
@ -137,16 +79,14 @@
"hono": ">=3.*" "hono": ">=3.*"
}, },
"devDependencies": { "devDependencies": {
"@cloudflare/workers-types": "^4.20231025.0", "@arethetypeswrong/cli": "^0.17.4",
"hono": "^4.5.1", "hono": "^4.5.1",
"msw": "^2.0.11", "msw": "^2.0.11",
"patch-package": "^8.0.0", "publint": "^0.3.9",
"publint": "^0.2.6", "tsup": "^8.4.0",
"tsup": "^8.0.0",
"typescript": "^5.2.2",
"vitest": "^3.0.8" "vitest": "^3.0.8"
}, },
"engines": { "engines": {
"node": ">=18.4.0" "node": ">=18.4.0"
} }
} }

View File

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

View File

@ -1,9 +0,0 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts', 'src/providers/**/index.ts', 'src/providers/**/types.ts'],
format: ['esm', 'cjs'],
dts: true,
splitting: false,
clean: true,
})

View File

@ -2712,13 +2712,13 @@ __metadata:
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "@hono/oauth-providers@workspace:packages/oauth-providers" resolution: "@hono/oauth-providers@workspace:packages/oauth-providers"
dependencies: dependencies:
"@arethetypeswrong/cli": "npm:^0.17.4"
"@cloudflare/workers-types": "npm:^4.20231025.0" "@cloudflare/workers-types": "npm:^4.20231025.0"
hono: "npm:^4.5.1" hono: "npm:^4.5.1"
msw: "npm:^2.0.11" msw: "npm:^2.0.11"
patch-package: "npm:^8.0.0" patch-package: "npm:^8.0.0"
publint: "npm:^0.2.6" publint: "npm:^0.3.9"
tsup: "npm:^8.0.0" tsup: "npm:^8.4.0"
typescript: "npm:^5.2.2"
vitest: "npm:^3.0.8" vitest: "npm:^3.0.8"
peerDependencies: peerDependencies:
hono: ">=3.*" hono: ">=3.*"
@ -14291,7 +14291,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"publint@npm:^0.2.2, publint@npm:^0.2.6": "publint@npm:^0.2.2":
version: 0.2.6 version: 0.2.6
resolution: "publint@npm:0.2.6" resolution: "publint@npm:0.2.6"
dependencies: dependencies:
@ -16747,7 +16747,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"tsup@npm:^8.0.0, tsup@npm:^8.0.1": "tsup@npm:^8.0.1":
version: 8.0.1 version: 8.0.1
resolution: "tsup@npm:8.0.1" resolution: "tsup@npm:8.0.1"
dependencies: dependencies: