Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies, add matchers #18

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/big-kids-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@repo/eslint-config': patch
'@repo/tsconfig': patch
'better-auth-harmony': patch
---

Upgrade dependencies
5 changes: 5 additions & 0 deletions .changeset/spotty-insects-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'better-auth-harmony': patch
---

Protect and normalize more routes, like change-email, fixes #16
5 changes: 5 additions & 0 deletions .changeset/unlucky-bikes-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'better-auth-harmony': minor
---

Add optional matchers support, closes #15
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
},
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.11",
"@changesets/cli": "^2.27.12",
"@repo/eslint-config": "workspace:*",
"@repo/tsconfig": "workspace:*",
"eslint": "^9.17.0",
"eslint": "^9.19.0",
"prettier": "^3.4.2",
"turbo": "^2.3.3",
"typescript": "5.7.2"
"turbo": "^2.3.4",
"typescript": "5.7.3"
},
"dependencies": {
"better-auth": "^1.1.14"
}
}
26 changes: 13 additions & 13 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,35 @@
"./ignorePatterns": "./src/ignorePatterns.js"
},
"devDependencies": {
"eslint": "^9.17.0",
"typescript": "^5.7.2"
"eslint": "^9.19.0",
"typescript": "^5.7.3"
},
"dependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.17.0",
"@eslint/json": "^0.9.0",
"@eslint/markdown": "^6.2.1",
"@typescript-eslint/parser": "^8.19.0",
"@typescript-eslint/utils": "^8.19.0",
"@vitest/eslint-plugin": "^1.1.21",
"@eslint/js": "^9.19.0",
"@eslint/json": "^0.10.0",
"@eslint/markdown": "^6.2.2",
"@typescript-eslint/parser": "^8.21.0",
"@typescript-eslint/utils": "^8.21.0",
"@vitest/eslint-plugin": "^1.1.25",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "^2.3.3",
"eslint-config-prettier": "^10.0.1",
"eslint-config-turbo": "^2.3.4",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsdoc": "^50.6.1",
"eslint-plugin-jsdoc": "^50.6.3",
"eslint-plugin-n": "^17.15.1",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-redos": "^4.4.5",
"eslint-plugin-regexp": "^2.7.0",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-turbo": "^2.3.3",
"eslint-plugin-turbo": "^2.3.4",
"eslint-plugin-unicorn": "^56.0.1",
"eslint-plugin-yml": "^1.16.0",
"typescript-eslint": "^8.19.0"
"typescript-eslint": "^8.21.0"
},
"peerDependencies": {
"eslint": "9.15.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ See the [Schema](#schema) section to add the fields manually.
[Mailchecker](https://github.com/FGRibreau/mailchecker).
- `normalizer` - Custom function to normalize the email address. By default uses
[`validator.js/normalizeEmail()`](https://github.com/validatorjs/validator.js#sanitizers).
- `matchers` - Customize when to run input `email` validation and normalization. Normalization
always runs on user creation and update regardless of this setting.

## Schema

Expand Down Expand Up @@ -158,3 +160,4 @@ information on configuring the `phoneNumber()`, including **validation**.
[`parsePhoneNumberWithError`](https://www.npmjs.com/package/libphonenumber-js#user-content-parse-phone-number)
from `libphonenumber-js/max`. Can be used to infer the country through the Request object, for
example using IP address geolocation.
- `matchers` - Customize when to run input `phoneNumber` validation.
36 changes: 28 additions & 8 deletions packages/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,26 @@
"types": "./dist/email.d.cts",
"default": "./dist/email.cjs"
}
},
"./email/matchers": {
"import": {
"types": "./dist/email/matchers.d.ts",
"default": "./dist/email/matchers.js"
},
"require": {
"types": "./dist/email/matchers.d.cts",
"default": "./dist/email/matchers.cjs"
}
},
"./phone/matchers": {
"import": {
"types": "./dist/phone/matchers.d.ts",
"default": "./dist/phone/matchers.js"
},
"require": {
"types": "./dist/phone/matchers.d.cts",
"default": "./dist/phone/matchers.cjs"
}
}
},
"files": [
Expand All @@ -71,24 +91,24 @@
"@repo/eslint-config": "*",
"@repo/tsconfig": "*",
"@types/eslint": "^9.6.1",
"@types/node": "^22.10.2",
"@types/react-dom": "19.0.2",
"@types/node": "^22.10.10",
"@types/react-dom": "19.0.3",
"@types/validator": "^13.12.2",
"@vitest/coverage-v8": "^2.1.8",
"better-auth": "1.1.7",
"eslint": "^9.17.0",
"better-auth": "1.1.14",
"eslint": "^9.19.0",
"rimraf": "^6.0.1",
"tsup": "^8.3.5",
"typescript": "5.7.2",
"tsup": "^8.3.6",
"typescript": "5.7.3",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^2.1.8"
},
"peerDependencies": {
"better-auth": "^1.0.3"
},
"dependencies": {
"libphonenumber-js": "^1.11.17",
"mailchecker": "^6.0.14",
"libphonenumber-js": "^1.11.18",
"mailchecker": "^6.0.15",
"validator": "^13.12.0"
}
}
Loading
Loading