Skip to content

Conversation

@yslpn
Copy link
Contributor

@yslpn yslpn commented Nov 8, 2025

Overview

  • add jwt validation action and associated issue/action typings
  • cover the feature with targeted runtime and type tests
  • document the new action and types on the website, including navigation updates

Copilot AI review requested due to automatic review settings November 8, 2025 22:19
@vercel
Copy link

vercel bot commented Nov 8, 2025

@yslpn is attempting to deploy a commit to the Valibot Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request labels Nov 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds JWT (JSON Web Token) validation functionality to the library. It introduces a new validation action that verifies whether a string conforms to the three-part Base64URL-encoded structure of a JWT token.

  • Adds jwt() validation action with regex-based format checking
  • Implements JwtAction and JwtIssue types with appropriate generics
  • Includes comprehensive test coverage for valid/invalid JWT formats

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/src/routes/api/menu.md Adds menu entries for jwt, JwtAction, and JwtIssue API documentation
website/src/routes/api/(types)/JwtIssue/properties.ts Defines property metadata for JwtIssue type documentation
website/src/routes/api/(types)/JwtIssue/index.mdx Documents the JwtIssue interface
website/src/routes/api/(types)/JwtAction/properties.ts Defines property metadata for JwtAction type documentation
website/src/routes/api/(types)/JwtAction/index.mdx Documents the JwtAction interface
website/src/routes/api/(actions)/jwt/properties.ts Defines property metadata for jwt function documentation
website/src/routes/api/(actions)/jwt/index.mdx Provides comprehensive documentation and examples for the jwt validation action
library/src/regex.ts Adds JWT_REGEX pattern for validating JWT token structure
library/src/actions/jwt/jwt.ts Implements the jwt validation action with JwtAction and JwtIssue interfaces
library/src/actions/jwt/jwt.test.ts Adds runtime tests for jwt validation with valid/invalid test cases
library/src/actions/jwt/jwt.test-d.ts Adds type-level tests for jwt validation action
library/src/actions/jwt/index.ts Exports jwt validation action
library/src/actions/index.ts Re-exports jwt from actions index

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant