@systemfsoftware/effect-schema-vite 1.5.3 → 1.5.4
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 +11 -0
- package/dist/effect-schema-vite-untrimmed.d.ts +59 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @systemfsoftware/effect-schema-vite
|
|
2
2
|
|
|
3
|
+
## 1.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The peer requirements for `effect` and for the Effect test-runner integration now accept any compatible `4.0.0-rc` release, instead of demanding one exact release candidate.
|
|
8
|
+
|
|
9
|
+
Installing alongside a newer release candidate no longer reports an unmet peer dependency or resolves a second copy of `effect` into the dependency tree.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies:
|
|
12
|
+
- @systemfsoftware/effect-schema-law@0.9.0
|
|
13
|
+
|
|
3
14
|
## 1.5.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Plugin as Plugin_2 } from 'vite';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Build the law-suite body injected into a consumer's `schema-laws.test.ts`.
|
|
5
|
+
*
|
|
6
|
+
* Import specifiers are relative to `lawFilePath`, never to the Vite root: the
|
|
7
|
+
* file being rewritten lives in `src/`, so a root-relative specifier resolves
|
|
8
|
+
* to `src/src/…` and yields a suite that silently imports nothing.
|
|
9
|
+
*
|
|
10
|
+
* Every schema is imported under a generated local alias. Two modules may
|
|
11
|
+
* export the same name, and a bare `import { X }` pair for them is invalid
|
|
12
|
+
* ESM — one binding wins, so a schema silently loses its laws to its
|
|
13
|
+
* namesake while the suite still reports a passing pair for it. An alias also
|
|
14
|
+
* keeps a schema named `it` or `ruleOfSchemas` from shadowing the harness.
|
|
15
|
+
*
|
|
16
|
+
* @since 1.4.0
|
|
17
|
+
*/
|
|
18
|
+
export declare const generateSchemaLaws: (lawFilePath: string, srcDir: string) => string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Vite plugin that walks the consumer's `src/` directory, finds every
|
|
22
|
+
* exported Effect `Schema`, and auto-injects `ruleOfSchemas` round-trip
|
|
23
|
+
* property tests for each one.
|
|
24
|
+
*
|
|
25
|
+
* The laws are injected by rewriting the consumer's own
|
|
26
|
+
* `src/schema-laws.test.ts` — the one test filename the placement taxonomy
|
|
27
|
+
* whitelists by name. It is deliberately NOT a virtual module: the generated
|
|
28
|
+
* body carries real `import` edges to each schema file, so vitest's
|
|
29
|
+
* related-file walk reaches them. A virtual module breaks that walk (its id
|
|
30
|
+
* has no path on disk), which silently drops every generated law from
|
|
31
|
+
* `stryker --related` runs and reports the survivors as coverage gaps.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // vitest.config.ts
|
|
36
|
+
* import { inlineSchemaTests } from '@systemfsoftware/effect-schema-vite'
|
|
37
|
+
*
|
|
38
|
+
* export default defineConfig({
|
|
39
|
+
* plugins: [inlineSchemaTests()],
|
|
40
|
+
* })
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const inlineSchemaTests: (options?: InlineSchemaTestsOptions) => Plugin_2;
|
|
44
|
+
|
|
45
|
+
/** @since 0.1.0 */
|
|
46
|
+
export declare interface InlineSchemaTestsOptions {
|
|
47
|
+
/** Directory to scan for schema files, relative to Vite root. Default: `"src"`. */
|
|
48
|
+
dir?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The one test filename the placement taxonomy whitelists by name. The plugin
|
|
53
|
+
* rewrites this file in the consumer's `src/`; nothing else is touched.
|
|
54
|
+
*
|
|
55
|
+
* @since 1.4.0
|
|
56
|
+
*/
|
|
57
|
+
export declare const LAW_FILE_BASENAME: 'schema-laws.test.ts';
|
|
58
|
+
|
|
59
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/effect-schema-vite",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.4",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -41,23 +41,23 @@
|
|
|
41
41
|
"@microsoft/api-extractor": "^7.58.7",
|
|
42
42
|
"@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
|
|
43
43
|
"@types/node": "^24",
|
|
44
|
-
"effect": "4.0.0-rc.
|
|
44
|
+
"effect": "4.0.0-rc.111",
|
|
45
45
|
"oxlint": "^1.77.0",
|
|
46
46
|
"rimraf": "^6.1.3",
|
|
47
47
|
"tsdown": "^0.22.14",
|
|
48
48
|
"vite": "^8",
|
|
49
49
|
"vitest": "^4.1.10",
|
|
50
|
-
"@systemfsoftware/effect-
|
|
51
|
-
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
50
|
+
"@systemfsoftware/effect-schema-law": "^0.9.0",
|
|
52
51
|
"@systemfsoftware/tsconfig": "^1.3.3",
|
|
53
|
-
"@systemfsoftware/
|
|
54
|
-
"@systemfsoftware/
|
|
52
|
+
"@systemfsoftware/oxlint-config": "^0.1.0",
|
|
53
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
54
|
+
"@systemfsoftware/effect-gherkin-spec": "^2.0.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"effect": "4.0.0-rc.
|
|
57
|
+
"effect": "^4.0.0-rc.111",
|
|
58
58
|
"vite": ">5.0.0",
|
|
59
59
|
"vitest": "*",
|
|
60
|
-
"@systemfsoftware/effect-schema-law": "0.
|
|
60
|
+
"@systemfsoftware/effect-schema-law": "0.9.0"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"provenance": true
|