Skip to content

Commit

Permalink
Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and George-Payne committed Jan 15, 2025
1 parent 85e2ad3 commit 3973781
Show file tree
Hide file tree
Showing 12 changed files with 124 additions and 115 deletions.
33 changes: 0 additions & 33 deletions .changeset/breezy-paws-hide.md

This file was deleted.

26 changes: 0 additions & 26 deletions .changeset/hungry-spies-sniff.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ninety-dolls-rescue.md

This file was deleted.

47 changes: 0 additions & 47 deletions .changeset/rare-hats-sip.md

This file was deleted.

29 changes: 29 additions & 0 deletions packages/fields/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# @kurrent-ui/fields

## 2.1.0

### Minor Changes

- [`b0f2624f`](https://github.com/EventStore/Design-System/commit/b0f2624fef898cf25a72409216140857d6862303) - `FieldChangeEvent` is now more flexible.

Previously, it only took the complete form type, and a key to the form:

```ts
interface MyForm {
something: number;
another: string;
}

const handleSomethingChange = (
e: FieldChangeEvent<MyForm, 'something'>,
) => {
// e.details is now `{ name: "something", value: number }`
};
```

Now, you can also pass a typing as a single value, so it is easier to use outside of a validatedForm context:

```ts
const handleSomethingChange = (e: FieldChangeEvent<number>) => {
// e.details is now `{ name: string, value: number }`
};
```

## 2.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/fields/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kurrent-ui/fields",
"version": "2.0.0",
"version": "2.1.0",
"description": "Forms and fields for Kurrent Design System",
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
Expand Down
37 changes: 37 additions & 0 deletions packages/forms/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# @kurrent-ui/forms

## 2.1.0

### Minor Changes

- [`2f6239c9`](https://github.com/EventStore/Design-System/commit/2f6239c9f88192f88af1df12ef2300cadcf58ce6) - `createValidatedForm` has a new option `shouldValidateBranch` for helping to create branching forms.

When a parent validated form is validated, it will only call validation on a nested validated form if `shouldValidateBranch` returns true (or is `undefined`).
`shouldValidateBranch` is passed the data of the top level form which had validation called on it, it's own data, and the reason for validating.

Example usage

```ts
interface DinnerForm {
mealType: string;
pizzaToppings: {
pepperoni: boolean;
pineapple: boolean;
};
}

const form = createValidatedForm<DinnerForm, DinnerForm>({
mealType: '',
pizzaToppings: createValidatedForm<
DinnerForm['pizzaToppings'],
DinnerForm
>(
{
pepperoni: true,
pineapple: true,
},
{
shouldValidateBranch: (root) => root.mealType === 'pizza',
},
),
});
```

## 2.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kurrent-ui/forms",
"version": "2.0.0",
"version": "2.1.0",
"description": "Form validation and working copy data store.",
"license": "Apache-2.0",
"main": "dist/index.js",
Expand Down
6 changes: 6 additions & 0 deletions packages/stores/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @kurrent-ui/stores

## 2.0.1

### Patch Changes

- [`e63b24dd`](https://github.com/EventStore/Design-System/commit/e63b24ddb98f52cafaf6c47abb1dfaf5b91c0609) - Bug Fix: `updateOrSet` returns the current value as-is, in line with `update`

## 2.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/stores/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kurrent-ui/stores",
"version": "2.0.0",
"version": "2.0.1",
"description": "Data stores for Stencil",
"license": "Apache-2.0",
"main": "dist/index.js",
Expand Down
48 changes: 48 additions & 0 deletions packages/utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# @kurrent-ui/utils

## 2.1.0

### Minor Changes

- [`818bf6a1`](https://github.com/EventStore/Design-System/commit/818bf6a1bbdf723a40609524d7d6ee3bfe0c790d) - `HTTPError` has two new helper methods for modifying it's problem details

### `HTTPError.mapProblemDetails`

Allows you to create a new HTTPError that will call the passed mapping function on it's details.

Example usage:

```ts
try {
await callAPI();
} catch (e) {
if (HTTPError.isHTTPError(error)) {
throw error.mapProblemDetails((details) => ({
...details,
title: "Its's okay..",
}));
}

throw error;
}
```

### `HTTPError.mapFieldKeys`

Allows you to create a new HTTPError that will call the passed mapping function on it's detail's field keys.

Example usage:

```ts
try {
await callAPI();
} catch (e) {
if (HTTPError.isHTTPError(error)) {
throw throw error.mapFieldKeys((key) =>
key.replace(/^chicken/, 'turkey'),
);
}
throw error;
}
```

## 2.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kurrent-ui/utils",
"version": "2.0.0",
"version": "2.1.0",
"description": "Utilities for Kurrent Design System",
"license": "Apache-2.0",
"main": "dist/index.js",
Expand Down

0 comments on commit 3973781

Please sign in to comment.