Skip to content

Commit

Permalink
Remove unreleased changelog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Jun 27, 2024
1 parent 0ff3957 commit 2dbf132
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Newly exports the following types: `Assign`, `If`, `IsUnion`, `ObjectType`, `PartialObjectSchema`, `StructSchema`, `TupleSchema` ([#25](https://github.com/MetaMask/superstruct/pull/25)).

## [3.0.0]

### Added
Expand Down Expand Up @@ -45,7 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
via [`error.cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause).
- For example:
```ts
assert(data, User, "The user is invalid!");
assert(data, User, 'The user is invalid!');
// StructError: The user is invalid!
```

Expand Down Expand Up @@ -162,7 +158,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
```ts
// Previously
const MyNumber = coerce(number(), (value) => {
return typeof value === "string" ? parseFloat(value) : value;
return typeof value === 'string' ? parseFloat(value) : value;
});
// Now
Expand All @@ -188,10 +184,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
const c = assign([a, b]);
// Pick out specific properties with `pick`:
const a2 = pick(c, ["id"]);
const a2 = pick(c, ['id']);
// Omit specific properties with `omit`:
const a3 = omit(c, ["name"]);
const a3 = omit(c, ['name']);
```

- New `unknown` struct.
Expand Down Expand Up @@ -315,14 +311,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

```ts
// Previously
"Array<string>";
"[string,number]";
"Map<string,number>";
'Array<string>';
'[string,number]';
'Map<string,number>';
// Now
"array";
"tuple";
"map";
'array';
'tuple';
'map';
```

## [0.10.0]
Expand All @@ -339,8 +335,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
```ts
// Previously
const User = struct.object({
name: "string",
age: "number",
name: 'string',
age: 'number',
});
// Now
Expand All @@ -366,10 +362,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
},
});
const Email = struct("email");
const Email = struct('email');
// Now
const Email = struct("email", isEmail);
const Email = struct('email', isEmail);
```

- **BREAKING:** Coercion is now separate from validation.
Expand Down Expand Up @@ -402,11 +398,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
```ts
const Article = struct.object(
{
title: "string",
title: 'string',
},
{
title: "Untitled",
}
title: 'Untitled',
},
);
// Now
Expand All @@ -415,8 +411,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
title: string(),
}),
{
title: "Untitled",
}
title: 'Untitled',
},
);
```

Expand All @@ -427,7 +423,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- For example:

```ts
const Flag = struct("string?");
const Flag = struct('string?');
// Now
const Flag = optional(string());
Expand Down Expand Up @@ -514,7 +510,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- This was special-cased in the API previously, but you can get the exact same
behavior by creating it using the `array` and `enum` structs:
```ts
struct.array(struct.enum(["red", "blue", "green"]));
struct.array(struct.enum(['red', 'blue', 'green']));
```
- **BREAKING:** The `any` struct has been removed! (Not the scalar though.)
- Previously `struct.any()` was exposed that did the same thing as `struct()`,
Expand Down

0 comments on commit 2dbf132

Please sign in to comment.