@systemfsoftware/effect-schema-law 0.1.0 → 0.2.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.
@@ -1,5 +1,4 @@
1
1
  import { Schema } from "effect";
2
-
3
2
  //#region src/bounded-union.d.ts
4
3
  declare const boundedUnion: <Base extends readonly [Schema.Schema.Any, ...ReadonlyArray<Schema.Schema.Any>], Recur extends readonly [Schema.Schema.Any, ...ReadonlyArray<Schema.Schema.Any>]>(identifier: string, options: {
5
4
  readonly base: Base;
package/dist/index.mjs CHANGED
@@ -24,10 +24,12 @@ const ruleOfSchemas = (name, schema) => {
24
24
  const encoded = encodeSync(value);
25
25
  const result = decodeEither(encoded);
26
26
  if (Either.isLeft(result)) return false;
27
- return encodedEq(encodeSync(result.right), encoded);
27
+ const reencoded = encodeSync(result.right);
28
+ return encodedEq(reencoded, encoded);
28
29
  });
29
30
  it.prop(`∀x_${name}_=x`, [schema], ([value]) => {
30
- const result = decodeEither(encodeSync(value));
31
+ const encoded = encodeSync(value);
32
+ const result = decodeEither(encoded);
31
33
  return Either.isRight(result) && typeEq(result.right, value);
32
34
  });
33
35
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/effect-schema-law",
3
3
  "license": "MIT",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -26,24 +26,28 @@
26
26
  ],
27
27
  "type": "module",
28
28
  "exports": {
29
- ".": "./dist/index.mjs",
29
+ ".": {
30
+ "types": "./dist/effect-schema-law.d.ts",
31
+ "default": "./dist/index.mjs"
32
+ },
30
33
  "./package.json": "./package.json"
31
34
  },
32
35
  "files": [
33
36
  "dist"
34
37
  ],
35
38
  "devDependencies": {
36
- "@effect/vitest": "0.29.0",
39
+ "@effect/vitest": "0.30.0",
40
+ "@microsoft/api-extractor": "^7.58.7",
37
41
  "@types/node": "^24",
38
- "effect": "^3.21.2",
42
+ "effect": "^3.22.0",
39
43
  "fast-check": "^3",
40
44
  "rimraf": "^6.1.3",
41
- "tsdown": "^0.22.3",
45
+ "tsdown": "^0.22.9",
42
46
  "vite-tsconfig-paths": "^6.1.1",
43
47
  "vitest": "^4",
44
- "@systemfsoftware/vitest-config": "^0.1.0",
45
48
  "@systemfsoftware/oxlint-config": "^0.1.0",
46
- "@systemfsoftware/tsconfig": "^1.0.0"
49
+ "@systemfsoftware/tsconfig": "^1.0.0",
50
+ "@systemfsoftware/vitest-config": "^0.1.0"
47
51
  },
48
52
  "peerDependencies": {
49
53
  "@effect/vitest": "*",
@@ -53,9 +57,11 @@
53
57
  "scripts": {
54
58
  "clean": "rimraf dist",
55
59
  "build": "tsdown",
56
- "typecheck": "tsgo --noEmit --incremental",
60
+ "typecheck": "tsc --noEmit --incremental",
57
61
  "test": "vitest run",
58
62
  "test:run": "vitest run",
63
+ "api:check": "api-extractor run",
64
+ "api:update": "api-extractor run --local",
59
65
  "lint": "oxlint . ${AGENT:+--format=unix --quiet}"
60
66
  }
61
67
  }