Skip to content

Commit

Permalink
Bump version to v0.31.0-rc.0 and update readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed May 20, 2024
1 parent 3573e82 commit 95c0246
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ First you create a schema that describes a structured data set. A schema can be

<!-- prettier-ignore -->
```ts
import { email, minLength, object, type Output, parse, string } from 'valibot'; // 1.54 kB
import * as v from 'valibot'; // 1.12 kB

// Create login schema with email and password
const LoginSchema = object({
email: string([email()]),
password: string([minLength(8)]),
const LoginSchema = v.object({
email: v.pipe(v.string(), v.email()),
password: v.pipe(v.string(), v.minLength(8)),
});

// Infer output TypeScript type of login schema
type LoginData = Output<typeof LoginSchema>; // { email: string; password: string }
type LoginData = v.InferOutput<typeof LoginSchema>; // { email: string; password: string }

// Throws error for `email` and `password`
parse(LoginSchema, { email: '', password: '' });
v.parse(LoginSchema, { email: '', password: '' });

// Returns data as { email: string; password: string }
parse(LoginSchema, { email: 'jane@example.com', password: '12345678' });
v.parse(LoginSchema, { email: 'jane@example.com', password: '12345678' });
```

Apart from `parse` I also offer a non-exception-based API with `safeParse` and a type guard function with `is`. You can read more about it [here](https://valibot.dev/guides/parse-data/).
Expand Down
3 changes: 1 addition & 2 deletions library/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ module.exports = {
// Disable rules ----------------------------------------------------------

// TypeScript
// '@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',

// Imports
// 'no-duplicate-imports': 'off',
'no-duplicate-imports': 'off',

// Security
'security/detect-object-injection': 'off', // Too many false positives
Expand Down
4 changes: 4 additions & 0 deletions library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the library will be documented in this file.

## v0.31.0 (Month DD, YYYY)

- More details will follow soon

## v0.30.0 (March 06, 2024)

- Add `Default` and `DefaultAsync` type and refactor codebase
Expand Down
14 changes: 7 additions & 7 deletions library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ First you create a schema that describes a structured data set. A schema can be

<!-- prettier-ignore -->
```ts
import { email, minLength, object, type Output, parse, string } from 'valibot'; // 1.54 kB
import * as v from 'valibot'; // 1.12 kB

// Create login schema with email and password
const LoginSchema = object({
email: string([email()]),
password: string([minLength(8)]),
const LoginSchema = v.object({
email: v.pipe(v.string(), v.email()),
password: v.pipe(v.string(), v.minLength(8)),
});

// Infer output TypeScript type of login schema
type LoginData = Output<typeof LoginSchema>; // { email: string; password: string }
type LoginData = v.InferOutput<typeof LoginSchema>; // { email: string; password: string }

// Throws error for `email` and `password`
parse(LoginSchema, { email: '', password: '' });
v.parse(LoginSchema, { email: '', password: '' });

// Returns data as { email: string; password: string }
parse(LoginSchema, { email: 'jane@example.com', password: '12345678' });
v.parse(LoginSchema, { email: 'jane@example.com', password: '12345678' });
```

Apart from `parse` I also offer a non-exception-based API with `safeParse` and a type guard function with `is`. You can read more about it [here](https://valibot.dev/guides/parse-data/).
Expand Down
2 changes: 1 addition & 1 deletion library/jsr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@valibot/valibot",
"version": "0.30.0",
"version": "0.31.0-rc.0",
"exports": "./src/index.ts"
}
4 changes: 2 additions & 2 deletions library/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "valibot",
"description": "The modular and TypeScript-first schema library",
"version": "0.30.0",
"description": "The modular and type safe schema library for validating structural data",
"version": "0.31.0-rc.0",
"license": "MIT",
"author": "Fabian Hiller",
"homepage": "https://valibot.dev",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "valibot",
"description": "The modular and TypeScript-first schema library",
"description": "The modular and type safe schema library for validating structural data ",
"version": "0.0.0",
"license": "MIT",
"author": "Fabian Hiller",
Expand Down

0 comments on commit 95c0246

Please sign in to comment.