@shivaedev/platform 0.3.3 → 0.3.5
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/CHANGELOG.md +16 -0
- package/dist/testing/types.d.ts +2 -2
- package/dist/testing/types.d.ts.map +1 -1
- package/dist/testing/vitest.d.ts +3 -3
- package/dist/testing/vitest.d.ts.map +1 -1
- package/dist/testing/vitest.js.map +1 -1
- package/package.json +9 -9
- package/src/testing/types.ts +1 -6
- package/src/testing/vitest.ts +3 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.3.5 - 2026-08-27
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Require Effect Prisma 0.6.0 and carry only the Database service through the
|
|
10
|
+
shared application test transaction.
|
|
11
|
+
|
|
12
|
+
## 0.3.4 - 2026-08-12
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Require Effect 4.0.0-rc.108. The 4.0 release candidate starts the stable line,
|
|
17
|
+
so consumers pick up the compatibility promise the betas did not carry.
|
|
18
|
+
- Require Effect Prisma 0.5.3 and Effect tRPC 0.3.2, which move to the same
|
|
19
|
+
Effect release.
|
|
20
|
+
|
|
5
21
|
## 0.3.3 - 2026-08-12
|
|
6
22
|
|
|
7
23
|
### Changed
|
package/dist/testing/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TestContext, Vitest } from "@effect/vitest";
|
|
2
|
-
import type { AnyDatabase,
|
|
2
|
+
import type { AnyDatabase, DatabaseService } from "@shivaedev/effect-prisma/testing";
|
|
3
3
|
import type { EffectTRPCAdapter } from "@shivaedev/effect-trpc";
|
|
4
4
|
import type { CallerOptions, CallerResult, EffectCallerFactory, TrpcHarnessTest, TrpcHarnessTester } from "@shivaedev/effect-trpc/testing";
|
|
5
5
|
import type { Effect, Layer } from "effect";
|
|
@@ -20,7 +20,7 @@ export interface MakePlatformItOptions<Database extends AnyDatabase, CreateCalle
|
|
|
20
20
|
readonly extend?: (base: Readonly<{
|
|
21
21
|
db: DatabaseService<Database>;
|
|
22
22
|
trpc: EffectCallerFactory<CallerOptions<NoInfer<CreateCaller>>, CallerResult<NoInfer<CreateCaller>>>;
|
|
23
|
-
}>, context: TestContext) => Effect.Effect<Extension, unknown, Provided |
|
|
23
|
+
}>, context: TestContext) => Effect.Effect<Extension, unknown, Provided | Effect.Services<Database>>;
|
|
24
24
|
readonly layer: Layer.Layer<Provided, LayerError>;
|
|
25
25
|
}
|
|
26
26
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/testing/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EACX,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/testing/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EACX,WAAW,EACX,eAAe,EACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EACX,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,MAAM,eAAe,CAC1B,QAAQ,SAAS,WAAW,EAC5B,OAAO,EACP,MAAM,EACN,SAAS,IACN,QAAQ,CAAC;IACZ,EAAE,EAAE,eAAe,CAAC,QAAQ,CAA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C;KACF,CAAC,EACF,OAAO,EAAE,WAAW,KAChB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7E,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;CAClD"}
|
package/dist/testing/vitest.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type AnyDatabase
|
|
1
|
+
import { type AnyDatabase } from "@shivaedev/effect-prisma/testing";
|
|
2
2
|
import { type CallerOptions, type CallerResult } from "@shivaedev/effect-trpc/testing";
|
|
3
3
|
import { Effect, type Layer } from "effect";
|
|
4
4
|
import type { MakePlatformItOptions, PlatformHarness, PlatformIt } from "./types.js";
|
|
5
5
|
export declare const makePlatformIt: <const Database extends AnyDatabase>(database: Database) => <CreateCaller extends (...arguments_: never[]) => object, Provided, LayerError, Extension extends object = Record<never, never>>(options: MakePlatformItOptions<Database, CreateCaller, Provided, LayerError, Extension> & {
|
|
6
|
-
readonly layer: Layer.Layer<Provided |
|
|
7
|
-
}) => PlatformIt<PlatformHarness<Database, CallerOptions<CreateCaller>, CallerResult<CreateCaller>, Extension>, Provided |
|
|
6
|
+
readonly layer: Layer.Layer<Provided | Effect.Services<Database>, LayerError>;
|
|
7
|
+
}) => PlatformIt<PlatformHarness<Database, CallerOptions<CreateCaller>, CallerResult<CreateCaller>, Extension>, Provided | Effect.Services<Database>>;
|
|
8
8
|
//# sourceMappingURL=vitest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../src/testing/vitest.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../src/testing/vitest.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,WAAW,EAGhB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,YAAY,EAGjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EACX,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,cAAc,GACzB,KAAK,CAAC,QAAQ,SAAS,WAAW,EAAE,UAAU,QAAQ,MAEtD,YAAY,SAAS,CAAC,GAAG,UAAU,EAAE,KAAK,EAAE,KAAK,MAAM,EACvD,QAAQ,EACR,UAAU,EACV,SAAS,SAAS,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAE/C,SAAS,qBAAqB,CAC7B,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,SAAS,CACT,GAAG;IACH,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAC1B,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACpC,UAAU,CACV,CAAC;CACF,KACC,UAAU,CACZ,eAAe,CACd,QAAQ,EACR,aAAa,CAAC,YAAY,CAAC,EAC3B,YAAY,CAAC,YAAY,CAAC,EAC1B,SAAS,CACT,EACD,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAiDpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.js","sourceRoot":"","sources":["../../src/testing/vitest.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"vitest.js","sourceRoot":"","sources":["../../src/testing/vitest.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,mBAAmB,GACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAIN,iBAAiB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,MAAM,EAAc,MA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AO,MAAM,CAAC,UAAU,CAAC;YAC1B,CAAC;YACD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;KACD,CAEiC,CAAC;AACpC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/platform",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Opinionated Effect application infrastructure for ShivaeDev services",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"provenance": true
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@effect/vitest": "4.0.0-
|
|
59
|
-
"@shivaedev/effect-prisma": "0.
|
|
60
|
-
"@shivaedev/effect-trpc": "0.3.
|
|
58
|
+
"@effect/vitest": "4.0.0-rc.108",
|
|
59
|
+
"@shivaedev/effect-prisma": "0.6.0",
|
|
60
|
+
"@shivaedev/effect-trpc": "0.3.2",
|
|
61
61
|
"@trpc/server": "11.18.0",
|
|
62
62
|
"better-auth": "1.6.25",
|
|
63
|
-
"effect": "4.0.0-
|
|
63
|
+
"effect": "4.0.0-rc.108"
|
|
64
64
|
},
|
|
65
65
|
"peerDependenciesMeta": {
|
|
66
66
|
"better-auth": {
|
|
@@ -68,19 +68,19 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@effect/vitest": "4.0.0-
|
|
71
|
+
"@effect/vitest": "4.0.0-rc.108",
|
|
72
72
|
"@prisma-next/adapter-postgres": "0.15.0",
|
|
73
73
|
"@prisma-next/contract": "0.15.0",
|
|
74
74
|
"@prisma-next/postgres": "0.15.0",
|
|
75
75
|
"@prisma-next/sql-contract": "0.15.0",
|
|
76
76
|
"@prisma-next/target-postgres": "0.15.0",
|
|
77
|
-
"@shivaedev/effect-prisma": "0.
|
|
78
|
-
"@shivaedev/effect-trpc": "0.3.
|
|
77
|
+
"@shivaedev/effect-prisma": "0.6.0",
|
|
78
|
+
"@shivaedev/effect-trpc": "0.3.2",
|
|
79
79
|
"@trpc/server": "11.18.0",
|
|
80
80
|
"@types/node": "24.10.1",
|
|
81
81
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
82
82
|
"better-auth": "1.6.25",
|
|
83
|
-
"effect": "4.0.0-
|
|
83
|
+
"effect": "4.0.0-rc.108",
|
|
84
84
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
85
85
|
"vitest": "4.1.9"
|
|
86
86
|
},
|
package/src/testing/types.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TestContext, Vitest } from "@effect/vitest";
|
|
2
2
|
import type {
|
|
3
3
|
AnyDatabase,
|
|
4
|
-
DatabaseRequirement,
|
|
5
4
|
DatabaseService,
|
|
6
5
|
} from "@shivaedev/effect-prisma/testing";
|
|
7
6
|
import type { EffectTRPCAdapter } from "@shivaedev/effect-trpc";
|
|
@@ -62,10 +61,6 @@ export interface MakePlatformItOptions<
|
|
|
62
61
|
>;
|
|
63
62
|
}>,
|
|
64
63
|
context: TestContext,
|
|
65
|
-
) => Effect.Effect<
|
|
66
|
-
Extension,
|
|
67
|
-
unknown,
|
|
68
|
-
Provided | DatabaseRequirement<Database> | Effect.Services<Database>
|
|
69
|
-
>;
|
|
64
|
+
) => Effect.Effect<Extension, unknown, Provided | Effect.Services<Database>>;
|
|
70
65
|
readonly layer: Layer.Layer<Provided, LayerError>;
|
|
71
66
|
}
|
package/src/testing/vitest.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Vitest } from "@effect/vitest";
|
|
2
2
|
import {
|
|
3
3
|
type AnyDatabase,
|
|
4
|
-
type DatabaseRequirement,
|
|
5
4
|
type DatabaseService,
|
|
6
5
|
withTestTransaction,
|
|
7
6
|
} from "@shivaedev/effect-prisma/testing";
|
|
@@ -34,7 +33,7 @@ export const makePlatformIt =
|
|
|
34
33
|
Extension
|
|
35
34
|
> & {
|
|
36
35
|
readonly layer: Layer.Layer<
|
|
37
|
-
Provided |
|
|
36
|
+
Provided | Effect.Services<Database>,
|
|
38
37
|
LayerError
|
|
39
38
|
>;
|
|
40
39
|
},
|
|
@@ -45,14 +44,11 @@ export const makePlatformIt =
|
|
|
45
44
|
CallerResult<CreateCaller>,
|
|
46
45
|
Extension
|
|
47
46
|
>,
|
|
48
|
-
Provided |
|
|
47
|
+
Provided | Effect.Services<Database>
|
|
49
48
|
> => {
|
|
50
49
|
type Options = CallerOptions<CreateCaller>;
|
|
51
50
|
type Caller = CallerResult<CreateCaller>;
|
|
52
|
-
type Services =
|
|
53
|
-
| Provided
|
|
54
|
-
| DatabaseRequirement<Database>
|
|
55
|
-
| Effect.Services<Database>;
|
|
51
|
+
type Services = Provided | Effect.Services<Database>;
|
|
56
52
|
type Harness = PlatformHarness<Database, Options, Caller, Extension>;
|
|
57
53
|
|
|
58
54
|
const trpcIt = makeTrpcHarnessIt<
|