@systemfsoftware/hex-schema 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +2 -1
- package/package.json +12 -6
package/dist/index.mjs
CHANGED
|
@@ -8,12 +8,13 @@ const StrictHex = Schema.String.pipe(Schema.pattern(/^[0-9a-f]*$/), Schema.annot
|
|
|
8
8
|
}));
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/hex-string.schema.ts
|
|
11
|
+
const toStrictHex = (hex) => (hex.startsWith("0x") ? hex.slice(2) : hex).toLowerCase();
|
|
11
12
|
const HexString = pipe(Schema.transform(Schema.String.pipe(Schema.pattern(/^(0x)?[0-9a-fA-F]*$/), Schema.annotations({
|
|
12
13
|
arbitrary: () => (fc) => fc.stringMatching(/^(0x)?[0-9a-fA-F]*$/),
|
|
13
14
|
identifier: "HexStringInput",
|
|
14
15
|
description: "A hex string, optionally prefixed with 0x (empty string allowed)"
|
|
15
16
|
})), StrictHex, {
|
|
16
|
-
decode:
|
|
17
|
+
decode: toStrictHex,
|
|
17
18
|
encode: (s) => s
|
|
18
19
|
}), Schema.annotations({
|
|
19
20
|
identifier: "HexString",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/hex-schema",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -36,18 +36,22 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@effect/vitest": "0.30.0",
|
|
38
38
|
"@microsoft/api-extractor": "^7.58.7",
|
|
39
|
+
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
39
40
|
"@types/node": "^24",
|
|
40
41
|
"effect": "^3.22.0",
|
|
41
42
|
"fast-check": "^3",
|
|
42
43
|
"rimraf": "^6.1.3",
|
|
43
44
|
"tsdown": "^0.22.9",
|
|
44
45
|
"vitest": "^4",
|
|
45
|
-
"@systemfsoftware/arethetypeswrong-cli": "^1.0.7",
|
|
46
46
|
"@systemfsoftware/effect-schema-law": "^0.5.0",
|
|
47
|
-
"@systemfsoftware/
|
|
47
|
+
"@systemfsoftware/arethetypeswrong-cli": "^1.0.7",
|
|
48
|
+
"@systemfsoftware/effect-schema-vite": "^1.4.0",
|
|
49
|
+
"@systemfsoftware/stryker-js-core": "^1.1.6",
|
|
48
50
|
"@systemfsoftware/oxlint-config": "^0.1.0",
|
|
49
|
-
"@systemfsoftware/
|
|
50
|
-
"@systemfsoftware/
|
|
51
|
+
"@systemfsoftware/stryker-js-typescript-checker": "^1.1.6",
|
|
52
|
+
"@systemfsoftware/stryker-plugins": "^0.6.0",
|
|
53
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
54
|
+
"@systemfsoftware/tsconfig": "^1.2.6"
|
|
51
55
|
},
|
|
52
56
|
"peerDependencies": {
|
|
53
57
|
"effect": "^3.22.0"
|
|
@@ -63,6 +67,8 @@
|
|
|
63
67
|
"api:check": "api-extractor run",
|
|
64
68
|
"api:update": "api-extractor run --local",
|
|
65
69
|
"lint": "oxlint . ${AGENT:+--format=unix --quiet}",
|
|
66
|
-
"attw": "attw --pack ."
|
|
70
|
+
"attw": "attw --pack .",
|
|
71
|
+
"mutation": "stryker run --incremental",
|
|
72
|
+
"mutation:full": "stryker run"
|
|
67
73
|
}
|
|
68
74
|
}
|