autotel-tanstack 1.13.17 → 1.13.19
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/package.json +3 -3
- package/src/middleware.test.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-tanstack",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.19",
|
|
4
4
|
"description": "OpenTelemetry instrumentation for TanStack Start - automatic tracing for server functions, middleware, and route loaders",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
"license": "MIT",
|
|
121
121
|
"dependencies": {
|
|
122
122
|
"@opentelemetry/api": "^1.9.1",
|
|
123
|
-
"autotel": "3.0
|
|
124
|
-
"autotel-adapters": "0.2.
|
|
123
|
+
"autotel": "3.1.0",
|
|
124
|
+
"autotel-adapters": "0.2.18",
|
|
125
125
|
"autotel-edge": "3.16.11"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
package/src/middleware.test.ts
CHANGED
|
@@ -114,6 +114,11 @@ describe('middleware', () => {
|
|
|
114
114
|
const error = new Error('Handler error');
|
|
115
115
|
const next = vi.fn().mockRejectedValue(error);
|
|
116
116
|
const request = new Request('http://localhost/api/users');
|
|
117
|
+
// Middleware reports the rejected error via console.error in
|
|
118
|
+
// error-reporting.ts — that's the contract under test (errors don't
|
|
119
|
+
// get silently swallowed). Silence the noise; the rejection assertion
|
|
120
|
+
// proves the propagation.
|
|
121
|
+
const errSpy = vi.spyOn(console, 'error').mockImplementation(() => {});
|
|
117
122
|
|
|
118
123
|
await expect(
|
|
119
124
|
middleware({
|
|
@@ -123,6 +128,8 @@ describe('middleware', () => {
|
|
|
123
128
|
context: {},
|
|
124
129
|
}),
|
|
125
130
|
).rejects.toThrow('Handler error');
|
|
131
|
+
|
|
132
|
+
errSpy.mockRestore();
|
|
126
133
|
});
|
|
127
134
|
|
|
128
135
|
it('should pass through when no request is available', async () => {
|