@interfere/test-utils 10.1.0-rc.0 → 10.1.0-rc.2
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 +207 -0
- package/dist/vitest/otlp.d.mts +8 -0
- package/dist/vitest/otlp.mjs +1 -1
- package/package.json +7 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# @interfere/test-utils
|
|
2
|
+
|
|
3
|
+
## 10.1.0-rc.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7c8441a: `exportedSpans()` and `exceptions()` keep each span's `links` (trace and span ids).
|
|
8
|
+
|
|
9
|
+
## 10.1.0-rc.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ec97a9c: Ship CHANGELOG.md inside the published tarball of every package so release notes travel with the installed version.
|
|
14
|
+
- Updated dependencies [ec97a9c]
|
|
15
|
+
- @interfere/helpers@9.3.2-rc.0
|
|
16
|
+
|
|
17
|
+
## 10.1.0-rc.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 2b931b4: `application()` accepts `{ tarballs }`, a map from package name to a prebuilt tarball, so a consumer can install a listed `@interfere/*` package from a release pack directory instead of packing it from the workspace.
|
|
22
|
+
|
|
23
|
+
## 10.0.3
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 5579c57: Expose captured application output for assertions in packed application tests.
|
|
28
|
+
- 152d420: Keep customer builds running when release configuration returns malformed data, and exercise production SDK journeys against accurate release configuration fixtures.
|
|
29
|
+
- Updated dependencies [461082f]
|
|
30
|
+
- @interfere/helpers@9.3.1
|
|
31
|
+
|
|
32
|
+
## 10.0.2
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [67b57b8]
|
|
37
|
+
- Updated dependencies [cb80e0a]
|
|
38
|
+
- @interfere/helpers@9.3.0
|
|
39
|
+
|
|
40
|
+
## 10.0.1
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [c4e0754]
|
|
45
|
+
- @interfere/helpers@9.2.1
|
|
46
|
+
|
|
47
|
+
## 10.0.0
|
|
48
|
+
|
|
49
|
+
### Major Changes
|
|
50
|
+
|
|
51
|
+
- 7cbddb5: Remove the MSW server singleton, lifecycle wrapper, request interceptors, and associated types from `vitest/msw/node`. Use `setupServer` from `msw/node`, `http` and `HttpResponse` from `msw`, and your test runner's lifecycle hooks directly. Capture native `Request` objects in handlers when asserting requests.
|
|
52
|
+
- a66079f: Remove the Vitest and Playwright configuration wrappers, Node/browser/Worker presets, test tags, and viewport constants. Use each runner's native configuration APIs, Playwright device descriptors, and explicit project settings instead. The package no longer installs framework configuration plugins or loads environment files.
|
|
53
|
+
|
|
54
|
+
Replace `expectPackedPackageFiles`, `expectNodeCanLoadPackageSpecifiers`, and `PACKAGE_CONTRACT_TIMEOUT_MS` with `createPackedPackage(packageJsonUrl)`. Use native assertions against the returned files and manifest, and run Node against `consumerDir` when checking package resolution. Always await `cleanup()` in a `finally` block. Vitest is no longer a peer dependency.
|
|
55
|
+
|
|
56
|
+
The packing lifecycle isolates concurrent archives, rejects paths outside the owned consumer, and cleans temporary resources when setup fails. Deployment protection headers remain available.
|
|
57
|
+
|
|
58
|
+
- cc6197a: Remove unused browser HTTP interception helpers and configuration wrappers.
|
|
59
|
+
|
|
60
|
+
- Replace `vitest/msw/browser` and `vitest/msw/http` imports with native `setupWorker` from `msw/browser`, `http` and `HttpResponse` from `msw`, and Vitest lifecycle hooks. Request capture belongs in the test's handler.
|
|
61
|
+
- Import retained `HttpMethod` and `JsonValue` types from `vitest/msw/node`.
|
|
62
|
+
- Replace `vitest/presets/vite` with native Vitest configuration and `playwright` from `@vitest/browser-playwright`. Set browser instances and viewports explicitly.
|
|
63
|
+
- Replace `vitest/presets/integration` with native Vitest `test.globalSetup` pointing to resource lifecycle modules owned by the consuming project. Declare resource isolation and teardown explicitly.
|
|
64
|
+
|
|
65
|
+
- 19a0af0: The Workers Vitest preset now requires `@cloudflare/vitest-plugin` instead of `@cloudflare/vitest-pool-workers`. Consumers of this preset must replace the old optional peer dependency with the new plugin. Local Worker coverage runs now write LCOV reports alongside the existing summary and HTML output.
|
|
66
|
+
|
|
67
|
+
### Minor Changes
|
|
68
|
+
|
|
69
|
+
- 7a06dd6: `dualViewport()` accepts `mobileTests` and `exclude` options so packages that keep mobile specs outside `src/**/mobile/` no longer re-key the instances by index
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- fa32955: Pin the optional Cloudflare Vitest plugin peer dependency to version 1.1.8.
|
|
74
|
+
- 63df2c9: Refresh dependency ranges. `@interfere/nest` now accepts NestJS 11 or 12 as a peer.
|
|
75
|
+
- dc6f82b: Link independent package dependencies with bounded concurrency when checking packed package contracts.
|
|
76
|
+
- 7d3b14e: Consolidate optional SDK and test settings while preserving configured defaults, disabled options, and omitted properties.
|
|
77
|
+
- 5b8542b: Preserve inferred capture attribute types and verify optional telemetry fields with native exporter tests.
|
|
78
|
+
|
|
79
|
+
Preserve deep-merge behavior for nested values and use schema-owned field types in telemetry contracts.
|
|
80
|
+
|
|
81
|
+
Preserve inferred release-slug types and validate baked configuration before using it.
|
|
82
|
+
|
|
83
|
+
Treat inherited object-property names as unknown release error codes and hostnames rather than matching them as configured entries.
|
|
84
|
+
|
|
85
|
+
Use the generated request contracts for handwritten source-map upload helpers while preserving finalize-response validation.
|
|
86
|
+
|
|
87
|
+
Validate test application manifests before creating temporary directories so malformed manifests do not leave unused directories behind.
|
|
88
|
+
|
|
89
|
+
Validate source maps before patching JavaScript debug IDs in Vite and Next builds, preserving the original artifacts when a map is malformed.
|
|
90
|
+
|
|
91
|
+
Preserve special own keys such as `__proto__` as data when omitting undefined properties, without changing the result prototype.
|
|
92
|
+
|
|
93
|
+
Validate Vite source maps before injecting debug IDs into JavaScript chunks, so malformed maps leave the chunk unchanged.
|
|
94
|
+
|
|
95
|
+
- fac5408: Strengthen event validation and type handling, correct promise handling, and update test runner integration.
|
|
96
|
+
- Updated dependencies [2ec9c4f]
|
|
97
|
+
- Updated dependencies [b8b6902]
|
|
98
|
+
- Updated dependencies [63df2c9]
|
|
99
|
+
- Updated dependencies [5b8542b]
|
|
100
|
+
- Updated dependencies [fac5408]
|
|
101
|
+
- @interfere/helpers@9.2.0
|
|
102
|
+
|
|
103
|
+
## 9.1.2
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- f1dedba: improved types
|
|
108
|
+
- Updated dependencies [f1dedba]
|
|
109
|
+
- @interfere/helpers@9.1.2
|
|
110
|
+
|
|
111
|
+
## 9.1.1
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- c7f7d47: Add blank lines around multiline statements and before returns, from enforcing the internal padding-between-statements lint rule repo-wide. Whitespace only, no behavior or API difference.
|
|
116
|
+
- Updated dependencies [c7f7d47]
|
|
117
|
+
- @interfere/helpers@9.1.1
|
|
118
|
+
|
|
119
|
+
## 9.1.0
|
|
120
|
+
|
|
121
|
+
### Minor Changes
|
|
122
|
+
|
|
123
|
+
- 87d3a7f: Add `redisPerWorkerDatabase` to `defineIntegrationConfig`.
|
|
124
|
+
- 3514661: Tune the shared Vitest config for local and agent-driven runs. Coverage still runs everywhere, but locally it reports through `text-summary` instead of the per-file `text` table, so a run ends with a six-line summary rather than a screen of output, and it now writes `lcov.info` locally as well as in CI. Browser Mode runs headless unless `UI=1`, so browser projects no longer open a window each. The JUnit reporter writes `test-results/junit.xml` in every environment, giving local runs a machine-readable result alongside the human one.
|
|
125
|
+
- 911ecd4: Add `@interfere/test-utils/vitest/presets/workers`, a `workersProject()` preset that runs Cloudflare Worker tests inside workerd via the Workers Vitest integration. `@cloudflare/vitest-pool-workers` is an optional peer dependency.
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- e347b65: Internal lint modernization: apply oxlint autofixes across previously quarantined rules (import specifier style, catch variable naming, DOM idiom updates, and related mechanical cleanups). No behavior changes intended.
|
|
130
|
+
- 9a8843a: Bump the shared Vitest catalog from 4.1.9 to 4.1.10
|
|
131
|
+
- Updated dependencies [9162968]
|
|
132
|
+
- Updated dependencies [42d939d]
|
|
133
|
+
- Updated dependencies [e347b65]
|
|
134
|
+
- @interfere/helpers@9.1.0
|
|
135
|
+
|
|
136
|
+
## 9.0.4
|
|
137
|
+
|
|
138
|
+
### Patch Changes
|
|
139
|
+
|
|
140
|
+
- Updated dependencies [d5d405c]
|
|
141
|
+
- @interfere/helpers@9.0.3
|
|
142
|
+
|
|
143
|
+
## 9.0.3
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- 32a1acf: bug fixes & performance improvements
|
|
148
|
+
|
|
149
|
+
## 9.0.2
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- Updated dependencies [475f125]
|
|
154
|
+
- @interfere/helpers@9.0.2
|
|
155
|
+
|
|
156
|
+
## 9.0.1
|
|
157
|
+
|
|
158
|
+
### Patch Changes
|
|
159
|
+
|
|
160
|
+
- 6c47775: Resolve published workspace dependency ranges from package manifests.
|
|
161
|
+
- d265875: Refresh public package artifacts after build output drift.
|
|
162
|
+
- 4c03108: Minor updates
|
|
163
|
+
- 7ba7566: Republish to swap the TypeScript devDependency from `@typescript/native-preview` to `typescript`.
|
|
164
|
+
- Updated dependencies [ac95069]
|
|
165
|
+
- Updated dependencies [d265875]
|
|
166
|
+
- Updated dependencies [4c03108]
|
|
167
|
+
- Updated dependencies [7ba7566]
|
|
168
|
+
- @interfere/helpers@9.0.1
|
|
169
|
+
|
|
170
|
+
## 9.0.1-canary.2
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- 4c03108: Minor updates
|
|
175
|
+
- Updated dependencies [4c03108]
|
|
176
|
+
- @interfere/helpers@9.0.1-canary.2
|
|
177
|
+
|
|
178
|
+
## 9.0.1-canary.1
|
|
179
|
+
|
|
180
|
+
### Patch Changes
|
|
181
|
+
|
|
182
|
+
- 6c47775: Resolve published workspace dependency ranges from package manifests.
|
|
183
|
+
|
|
184
|
+
## 9.0.1-canary.0
|
|
185
|
+
|
|
186
|
+
### Patch Changes
|
|
187
|
+
|
|
188
|
+
- d265875: Refresh public package artifacts after build output drift.
|
|
189
|
+
- Updated dependencies [d265875]
|
|
190
|
+
- @interfere/helpers@9.0.1-canary.0
|
|
191
|
+
|
|
192
|
+
## 2.0.0
|
|
193
|
+
|
|
194
|
+
### Major Changes
|
|
195
|
+
|
|
196
|
+
- normalization release
|
|
197
|
+
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- Updated dependencies []:
|
|
201
|
+
- @interfere/helpers@2.0.0
|
|
202
|
+
|
|
203
|
+
## 1.0.1
|
|
204
|
+
|
|
205
|
+
### Patch Changes
|
|
206
|
+
|
|
207
|
+
- [`669f5e4`](https://github.com/interfere-inc/interfere/commit/669f5e40c24cf47b4335b8e51df09efe40112d29) Thanks [@skve](https://github.com/skve)! - Added telemetry for per-sdk breakdowns
|
package/dist/vitest/otlp.d.mts
CHANGED
|
@@ -33,6 +33,10 @@ export declare function exportedSpans(requests: ReceivedRequest[]): {
|
|
|
33
33
|
};
|
|
34
34
|
}[];
|
|
35
35
|
}[];
|
|
36
|
+
links: {
|
|
37
|
+
traceId: string;
|
|
38
|
+
spanId: string;
|
|
39
|
+
}[];
|
|
36
40
|
status?: {
|
|
37
41
|
code?: number | undefined;
|
|
38
42
|
} | undefined;
|
|
@@ -70,6 +74,10 @@ export declare function exceptions(requests: ReceivedRequest[], message: string)
|
|
|
70
74
|
};
|
|
71
75
|
}[];
|
|
72
76
|
}[];
|
|
77
|
+
links: {
|
|
78
|
+
traceId: string;
|
|
79
|
+
spanId: string;
|
|
80
|
+
}[];
|
|
73
81
|
status?: {
|
|
74
82
|
code?: number | undefined;
|
|
75
83
|
} | undefined;
|
package/dist/vitest/otlp.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"zod";const attributes=z.array(z.object({key:z.string(),value:z.object({stringValue:z.string().optional(),boolValue:z.boolean().optional(),intValue:z.union([z.string(),z.number()]).optional()})})),span=z.object({name:z.string(),traceId:z.string(),spanId:z.string(),parentSpanId:z.string().optional(),attributes:attributes.default([]),events:z.array(z.object({name:z.string(),attributes:attributes.default([])})).default([]),status:z.object({code:z.number().optional()}).optional()}),traces=z.object({resourceSpans:z.array(z.object({resource:z.object({attributes}),scopeSpans:z.array(z.object({spans:z.array(span)}))}))});function exportedSpans(requests){return requests.filter(request=>request.url.startsWith(`/drain/v1/traces`)&&request.status<300).flatMap(request=>traces.parse(JSON.parse(request.body)).resourceSpans.flatMap(resource=>resource.scopeSpans.flatMap(scope=>scope.spans.map(item=>({...item,resource:resource.resource.attributes})))))}function attribute(values,key){let value=values.find(item=>item.key===key)?.value;return value?.stringValue??value?.boolValue??value?.intValue}function exceptions(requests,message){return exportedSpans(requests).filter(item=>item.events.some(event=>event.name===`exception`&&attribute(event.attributes,`exception.message`)===message))}const logs=z.object({resourceLogs:z.array(z.object({resource:z.object({attributes}),scopeLogs:z.array(z.object({logRecords:z.array(z.object({eventName:z.string().optional(),attributes:attributes.default([]),traceId:z.string().optional(),spanId:z.string().optional()}))}))}))});function exportedLogRecords(requests){return requests.filter(request=>request.url.startsWith(`/drain/v1/logs`)&&request.status<300).flatMap(request=>logs.parse(JSON.parse(request.body)).resourceLogs.flatMap(resource=>resource.scopeLogs.flatMap(scope=>scope.logRecords.map(item=>({...item,resource:resource.resource.attributes})))))}export{attribute,exceptions,exportedLogRecords,exportedSpans};
|
|
1
|
+
import{z}from"zod";const attributes=z.array(z.object({key:z.string(),value:z.object({stringValue:z.string().optional(),boolValue:z.boolean().optional(),intValue:z.union([z.string(),z.number()]).optional()})})),span=z.object({name:z.string(),traceId:z.string(),spanId:z.string(),parentSpanId:z.string().optional(),attributes:attributes.default([]),events:z.array(z.object({name:z.string(),attributes:attributes.default([])})).default([]),links:z.array(z.object({traceId:z.string(),spanId:z.string()})).default([]),status:z.object({code:z.number().optional()}).optional()}),traces=z.object({resourceSpans:z.array(z.object({resource:z.object({attributes}),scopeSpans:z.array(z.object({spans:z.array(span)}))}))});function exportedSpans(requests){return requests.filter(request=>request.url.startsWith(`/drain/v1/traces`)&&request.status<300).flatMap(request=>traces.parse(JSON.parse(request.body)).resourceSpans.flatMap(resource=>resource.scopeSpans.flatMap(scope=>scope.spans.map(item=>({...item,resource:resource.resource.attributes})))))}function attribute(values,key){let value=values.find(item=>item.key===key)?.value;return value?.stringValue??value?.boolValue??value?.intValue}function exceptions(requests,message){return exportedSpans(requests).filter(item=>item.events.some(event=>event.name===`exception`&&attribute(event.attributes,`exception.message`)===message))}const logs=z.object({resourceLogs:z.array(z.object({resource:z.object({attributes}),scopeLogs:z.array(z.object({logRecords:z.array(z.object({eventName:z.string().optional(),attributes:attributes.default([]),traceId:z.string().optional(),spanId:z.string().optional()}))}))}))});function exportedLogRecords(requests){return requests.filter(request=>request.url.startsWith(`/drain/v1/logs`)&&request.status<300).flatMap(request=>logs.parse(JSON.parse(request.body)).resourceLogs.flatMap(resource=>resource.scopeLogs.flatMap(scope=>scope.logRecords.map(item=>({...item,resource:resource.resource.attributes})))))}export{attribute,exceptions,exportedLogRecords,exportedSpans};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interfere/test-utils",
|
|
3
|
-
"version": "10.1.0-rc.
|
|
3
|
+
"version": "10.1.0-rc.2",
|
|
4
4
|
"description": "Shared test utilities used across Interfere packages.",
|
|
5
5
|
"homepage": "https://interfere.com",
|
|
6
6
|
"bugs": "mailto:support@interfere.com",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"directory": "src/packages/public/test-utils"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
15
|
+
"dist",
|
|
16
|
+
"CHANGELOG.md"
|
|
16
17
|
],
|
|
17
18
|
"type": "module",
|
|
18
19
|
"exports": {
|
|
@@ -38,14 +39,14 @@
|
|
|
38
39
|
"typecheck": "bun check"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
|
-
"@interfere/helpers": "^9.3.
|
|
42
|
+
"@interfere/helpers": "^9.3.2-rc.0",
|
|
42
43
|
"msw": "2.15.0",
|
|
43
|
-
"zod": "4.6.
|
|
44
|
+
"zod": "4.6.7"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
|
-
"@interfere/typescript-config": "^9.0.
|
|
47
|
+
"@interfere/typescript-config": "^9.0.3-rc.0",
|
|
47
48
|
"@interfere/vitest-config": "0.0.0",
|
|
48
|
-
"@types/node": "26.
|
|
49
|
+
"@types/node": "26.6.6",
|
|
49
50
|
"tsdown": "0.23.0",
|
|
50
51
|
"typescript": "7.0.2",
|
|
51
52
|
"vitest": "5.0.5"
|