Skip to content

Commit

Permalink
Version Packages (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Aug 26, 2024
1 parent b32e2cc commit 1c08ffd
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 30 deletions.
22 changes: 0 additions & 22 deletions .changeset/clean-toys-roll.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/grumpy-ants-know.md

This file was deleted.

28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# @nrfcloud/ts-json-schema-transformer

## 3.0.0

### Major Changes

- b32e2cc: Added several new helper methods

- `assert` - Asserts that a value is valid while returning the value
- `createAssertFn` - Creates a function that asserts that a value is valid
- `parse` - Parses a value and return undefined if it is invalid
- `createParseFn` - Creates a function that parses a value and returns undefined if it is invalid
- `assertParse` - Parses a value and asserts that it is valid
- `createAssertParseFn` - Creates a function that parses a value and asserts that it is valid
- `createMockFn` - Creates a function that generates a mock value
- `createAssertGuardFn` - Creates a function that asserts that a value is valid, narrowing the type
- `guard` - Validates a value and narrows the type (type guard)
- `validate` - Validates a value and returns the value if it is valid or undefined if it is invalid
- `createValidateFn` - Creates a function that validates a value and returns the value if it is valid or undefined if it is invalid

A few methods have been renamed, and their previous names are now deprecated:

- `assertValid` -> `assertGuard`
- `getMockObject` -> `mock`
- `getValidator` -> `createGuardFn`

### Minor Changes

- b32e2cc: seeded mock

## 2.1.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nrfcloud/ts-json-schema-transformer",
"version": "2.1.0",
"version": "3.0.0",
"description": "A TypeScript transformer that generates JSON schemas and validators from TypeScript interfaces",
"type": "commonjs",
"main": "dist/index.js",
Expand Down Expand Up @@ -31,8 +31,8 @@
"require": "./dist/transform.js"
},
"./dist/jsf": {
"types": "./dist/json-schema-faker-proxy.d.ts",
"require": "./dist/json-schema-faker-proxy.js"
"types": "./dist/json-schema-faker-proxy.d.ts",
"require": "./dist/json-schema-faker-proxy.js"
},
"./transform": {
"types": "./dist/transform.d.ts",
Expand Down

0 comments on commit 1c08ffd

Please sign in to comment.