Skip to content

Commit 43c28b7

Browse files
committed
static hermes compatibility
1 parent a28a3d7 commit 43c28b7

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
lines changed

ark/attest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/attest",
3-
"version": "0.43.3",
3+
"version": "0.43.4",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",

ark/fs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/fs",
3-
"version": "0.43.3",
3+
"version": "0.43.4",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",

ark/schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/schema",
3-
"version": "0.43.3",
3+
"version": "0.43.4",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",

ark/schema/shared/disjoint.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,17 @@ export class Disjoint extends Array<DisjointEntry> {
8787
}
8888

8989
invert(): Disjoint {
90-
return this.map(entry => ({
90+
const result = this.map(entry => ({
9191
...entry,
9292
l: entry.r,
9393
r: entry.l
94-
})) as Disjoint
94+
}))
95+
96+
// Workaround for Static Hermes, which doesn't preserve the Array subclass here
97+
// https://github.com/arktypeio/arktype/issues/1027
98+
if (!(result instanceof Disjoint)) return new Disjoint(...result)
99+
100+
return result
95101
}
96102

97103
withPrefixKey(key: PropertyKey, kind: Prop.Kind): Disjoint {

ark/type/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "arktype",
33
"description": "Optimized runtime validation for TypeScript syntax",
4-
"version": "2.1.3",
4+
"version": "2.1.4",
55
"license": "MIT",
66
"repository": {
77
"type": "git",

ark/util/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/util",
3-
"version": "0.43.3",
3+
"version": "0.43.4",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",

ark/util/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { FileConstructor, objectKindOf } from "./objectKinds.ts"
88
// recent node versions (https://nodejs.org/api/esm.html#json-modules).
99

1010
// For now, we assert this matches the package.json version via a unit test.
11-
export const arkUtilVersion = "0.43.3"
11+
export const arkUtilVersion = "0.43.4"
1212

1313
export const initialRegistryContents = {
1414
version: arkUtilVersion,

0 commit comments

Comments
 (0)