@metamask/snaps-sdk
Advanced tools
Comparing version 4.4.1 to 4.4.2
@@ -9,2 +9,6 @@ # Changelog | ||
## [4.4.2] | ||
### Fixed | ||
- Require at least 1 child in JSX components ([#2466](https://github.com/MetaMask/snaps/pull/2466)) | ||
## [4.4.1] | ||
@@ -154,3 +158,4 @@ ### Fixed | ||
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@4.4.1...HEAD | ||
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@4.4.2...HEAD | ||
[4.4.2]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@4.4.1...@metamask/snaps-sdk@4.4.2 | ||
[4.4.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@4.4.0...@metamask/snaps-sdk@4.4.1 | ||
@@ -157,0 +162,0 @@ [4.4.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-sdk@4.3.0...@metamask/snaps-sdk@4.4.0 |
@@ -835,4 +835,7 @@ "use strict"; | ||
}); | ||
function nonEmptyArray(struct) { | ||
return (0, import_superstruct17.nonempty)((0, import_superstruct17.array)(struct)); | ||
} | ||
function maybeArray(struct) { | ||
return nullUnion([struct, (0, import_superstruct17.array)(struct)]); | ||
return nullUnion([struct, nonEmptyArray(struct)]); | ||
} | ||
@@ -839,0 +842,0 @@ function element(name, props = {}) { |
@@ -205,4 +205,7 @@ "use strict"; | ||
}); | ||
function nonEmptyArray(struct) { | ||
return (0, import_superstruct2.nonempty)((0, import_superstruct2.array)(struct)); | ||
} | ||
function maybeArray(struct) { | ||
return nullUnion([struct, (0, import_superstruct2.array)(struct)]); | ||
return nullUnion([struct, nonEmptyArray(struct)]); | ||
} | ||
@@ -209,0 +212,0 @@ function element(name, props = {}) { |
@@ -82,4 +82,7 @@ "use strict"; | ||
}); | ||
function nonEmptyArray(struct) { | ||
return (0, import_superstruct2.nonempty)((0, import_superstruct2.array)(struct)); | ||
} | ||
function maybeArray(struct) { | ||
return nullUnion([struct, (0, import_superstruct2.array)(struct)]); | ||
return nullUnion([struct, nonEmptyArray(struct)]); | ||
} | ||
@@ -86,0 +89,0 @@ function element(name, props = {}) { |
@@ -1,2 +0,2 @@ | ||
import type { Json } from '@metamask/utils'; | ||
import type { Json, NonEmptyArray } from '@metamask/utils'; | ||
/** | ||
@@ -43,3 +43,3 @@ * A key, which can be a string or a number. | ||
*/ | ||
export declare type MaybeArray<Type> = Type | Type[]; | ||
export declare type MaybeArray<Type> = Type | NonEmptyArray<Type>; | ||
/** | ||
@@ -46,0 +46,0 @@ * A JSX node, which can be an element, a string, null, or an array of nodes. |
{ | ||
"name": "@metamask/snaps-sdk", | ||
"version": "4.4.1", | ||
"version": "4.4.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
722292
7969