Skip to content

Commit

Permalink
Merge pull request #19 from markusahlstrand/optimize-bundles
Browse files Browse the repository at this point in the history
Optimize bundles
  • Loading branch information
markusahlstrand authored Jan 15, 2025
2 parents e61cdf8 + c0d1abc commit 5627ba0
Show file tree
Hide file tree
Showing 17 changed files with 88 additions and 36 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,6 @@ dist
.pnp.*

# The default generated auth-server
auth-server
auth-server

.DS_Store
8 changes: 8 additions & 0 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @authhero/demo

## 0.7.2

### Patch Changes

- Updated dependencies
- [email protected]
- @authhero/kysely-adapter@1.0.0

## 0.7.1

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@authhero/demo",
"private": true,
"version": "0.7.1",
"version": "0.7.2",
"scripts": {
"dev": "bun --watch src/bun.ts"
},
"dependencies": {
"@authhero/kysely-adapter": "^0.28.1",
"@authhero/kysely-adapter": "^1.0.0",
"@hono/swagger-ui": "^0.5.0",
"@hono/zod-openapi": "^0.18.3",
"@peculiar/x509": "^1.12.3",
"authhero": "^0.39.0",
"authhero": "^0.40.0",
"hono": "^4.6.15",
"hono-openapi-middlewares": "^1.0.11",
"kysely": "^0.27.4",
Expand Down
6 changes: 6 additions & 0 deletions packages/adapter-interfaces/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @authhero/adapter-interfaces

## 0.37.0

### Minor Changes

- Optimized bundles

## 0.36.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "git",
"url": "https://github.com/markusahlstrand/authhero"
},
"version": "0.36.0",
"version": "0.37.0",
"files": [
"dist"
],
Expand Down
3 changes: 3 additions & 0 deletions packages/adapter-interfaces/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ module.exports = defineConfig({
formats,
fileName: (format) => fileName[format],
},
rollupOptions: {
external: ["@hono/zod-openapi"],
},
},
resolve: {
alias: [
Expand Down
11 changes: 11 additions & 0 deletions packages/authhero/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# authhero

## 0.40.0

### Minor Changes

- Optimized bundles

### Patch Changes

- Updated dependencies
- @authhero/adapter-interfaces@0.37.0

## 0.39.0

### Minor Changes
Expand Down
7 changes: 3 additions & 4 deletions packages/authhero/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "authhero",
"version": "0.39.0",
"version": "0.40.0",
"files": [
"dist"
],
Expand Down Expand Up @@ -37,13 +37,12 @@
"@authhero/adapter-interfaces": "workspace:^",
"@peculiar/x509": "^1.12.3",
"arctic": "3.1.2",
"bcrypt": "^5.1.1",
"bcryptjs": "^2.4.3",
"check-password-strength": "^2.0.10",
"classnames": "^2.5.1",
"i18next": "^24.2.0",
"nanoid": "^5.0.8",
"oslo": "^1.2.1",
"zxcvbn": "^4.4.2"
"oslo": "^1.2.1"
},
"peerDependencies": {
"@hono/zod-openapi": "^0.18.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/authhero/src/utils/password.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import zxcvbn from "zxcvbn";
import { passwordStrength } from "check-password-strength";

export default function validatePasswordStrength(password: string) {
// Check overall strength with zxcvbn
if (zxcvbn(password).score < 3) return false;
if (passwordStrength(password).id < 2) return false;

// Additional complexity rules.
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("dbconnections", () => {

expect(response.status).toBe(400);
const message = await response.text();
expect(message).toBe("Password does not meet the requirements");
expect(message).toBe("Invalid sign up");
});
});

Expand Down
3 changes: 3 additions & 0 deletions packages/authhero/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ module.exports = defineConfig({
formats,
fileName: (format) => fileName[format],
},
rollupOptions: {
external: ["@hono/zod-openapi", "hono"],
},
},
resolve: {
alias: [
Expand Down
7 changes: 7 additions & 0 deletions packages/drizzle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @authhero/drizzle

## 0.1.74

### Patch Changes

- Updated dependencies
- @authhero/adapter-interfaces@0.37.0

## 0.1.73

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/drizzle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "git",
"url": "https://github.com/markusahlstrand/authhero"
},
"version": "0.1.73",
"version": "0.1.74",
"files": [
"dist"
],
Expand Down
11 changes: 11 additions & 0 deletions packages/kysely/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @authhero/kysely-adapter

## 1.0.0

### Minor Changes

- Optimized bundles

### Patch Changes

- Updated dependencies
- @authhero/adapter-interfaces@0.37.0

## 0.28.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/kysely/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "git",
"url": "https://github.com/markusahlstrand/authhero"
},
"version": "0.28.1",
"version": "1.0.0",
"files": [
"dist"
],
Expand Down Expand Up @@ -44,11 +44,11 @@
"vitest": "^2.1.5"
},
"dependencies": {
"@authhero/adapter-interfaces": "workspace:^",
"kysely": "^0.27.4",
"nanoid": "^5.0.8"
},
"peerDependencies": {
"@authhero/adapter-interfaces": "workspace:^",
"@hono/zod-openapi": "^0.16.4",
"hono": "^4.6.8",
"kysely-bun-sqlite": "^0.3.2",
Expand Down
9 changes: 9 additions & 0 deletions packages/kysely/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ module.exports = defineConfig({
formats,
fileName: (format) => fileName[format],
},
rollupOptions: {
external: [
"@hono/zod-openapi",
"hono",
"kysely-bun-sqlite",
"kysely-planetscale",
"@authhero/adapter-interfaces",
],
},
},
resolve: {
alias: [
Expand Down
35 changes: 14 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5627ba0

Please sign in to comment.