From fda62dea375e736b9d5c6ad902a7b24f6de47560 Mon Sep 17 00:00:00 2001 From: Yoshio HANAWA Date: Tue, 13 Feb 2024 23:20:36 +0900 Subject: [PATCH] fix(oidc-auth): Fix "yarn release" for Yarn v4 / Build ESM only (#386) --- .changeset/curvy-lemons-give.md | 5 +++++ package.json | 1 + packages/oidc-auth/package.json | 12 ++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .changeset/curvy-lemons-give.md diff --git a/.changeset/curvy-lemons-give.md b/.changeset/curvy-lemons-give.md new file mode 100644 index 00000000..ce51c165 --- /dev/null +++ b/.changeset/curvy-lemons-give.md @@ -0,0 +1,5 @@ +--- +'@hono/oidc-auth': patch +--- + +Fix "yarn release" and fix npm package diff --git a/package.json b/package.json index 21118e91..65f160d6 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "build:auth-js": "yarn workspace @hono/auth-js build", "build:bun-transpiler": "yarn workspace @hono/bun-transpiler build", "build:prometheus": "yarn workspace @hono/prometheus build", + "build:oidc-auth": "yarn workspace @hono/oidc-auth build", "build": "run-p 'build:*'", "lint": "eslint 'packages/**/*.{ts,tsx}'", "lint:fix": "eslint --fix 'packages/**/*.{ts,tsx}'", diff --git a/packages/oidc-auth/package.json b/packages/oidc-auth/package.json index 6cc68fc9..7b472a97 100644 --- a/packages/oidc-auth/package.json +++ b/packages/oidc-auth/package.json @@ -4,22 +4,22 @@ "description": "OpenID Connect Authentication middleware for Hono", "type": "module", "main": "dist/index.js", - "module": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist" ], "scripts": { "test": "NODE_OPTIONS=--experimental-vm-modules jest --verbose --coverage", - "build": "tsup ./src/index.ts --format esm,cjs --dts", + "build": "tsup ./src/index.ts --format esm --dts", "prerelease": "yarn build && yarn test", - "release": "yarn publish" + "release": "yarn prerelease && yarn npm publish" }, "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "require": "./dist/index.cjs" + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } } }, "license": "MIT",