@jaypie/mcp 0.8.75 → 0.8.76
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.
|
@@ -9,7 +9,7 @@ import { gt } from 'semver';
|
|
|
9
9
|
/**
|
|
10
10
|
* Docs Suite - Documentation services (skill, version, release_notes)
|
|
11
11
|
*/
|
|
12
|
-
const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.
|
|
12
|
+
const BUILD_VERSION_STRING = "@jaypie/mcp@0.8.76#d4ee8b15"
|
|
13
13
|
;
|
|
14
14
|
const __filename$1 = fileURLToPath(import.meta.url);
|
|
15
15
|
const __dirname$1 = path.dirname(__filename$1);
|
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.66
|
|
3
|
+
date: 2026-06-20
|
|
4
|
+
summary: Forward DD_VERSION to the Lambda environment for Datadog version tagging
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- `jaypieLambdaEnv` now passes `DD_VERSION` through to the Lambda environment
|
|
10
|
+
when present in `process.env`, alongside the other allowlisted vars. This lets
|
|
11
|
+
projects tag telemetry with a version derived independently of
|
|
12
|
+
`PROJECT_VERSION` (e.g. from the latest git tag), which `dd-trace` reads at
|
|
13
|
+
runtime.
|
|
14
|
+
- `addDatadogLayers` now falls back the `DatadogLambda` `version` to
|
|
15
|
+
`process.env.DD_VERSION || process.env.PROJECT_VERSION`, keeping the version
|
|
16
|
+
tag consistent with the env var.
|
|
17
|
+
|
|
18
|
+
Issue: [#384](https://github.com/finlaysonstudio/jaypie/issues/384)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.8.76
|
|
3
|
+
date: 2026-06-20
|
|
4
|
+
summary: Correct the mocks skill to document the real @jaypie/testkit/mock pattern
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Changes
|
|
8
|
+
|
|
9
|
+
- Rewrote the `mocks` skill, which documented a non-existent
|
|
10
|
+
`mockJaypie(vi)` / `mockLogger(vi)` / `mockAws(vi)` API. The working pattern
|
|
11
|
+
is `vi.mock("jaypie", async () => await import("@jaypie/testkit/mock"))`,
|
|
12
|
+
returning the flat mock namespace directly. Sub-package and export-verification
|
|
13
|
+
examples updated to match.
|
|
14
|
+
|
|
15
|
+
Issue: [#385](https://github.com/finlaysonstudio/jaypie/issues/385)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.2.45
|
|
3
|
+
date: 2026-06-20
|
|
4
|
+
summary: Drop the deprecated mongoose mock that broke @jaypie/testkit/mock at load time
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Removed
|
|
8
|
+
|
|
9
|
+
- **Mongoose mock dropped from the `./mock` umbrella.** `@jaypie/testkit/mock`
|
|
10
|
+
statically imported `@jaypie/mongoose` (a deprecated, undeclared phantom
|
|
11
|
+
dependency), which threw `Cannot find package '@jaypie/mongoose'` at module
|
|
12
|
+
load in any project without mongoose installed. The mock is removed entirely;
|
|
13
|
+
`jaypie` never re-exported mongoose. The `connect`, `connectFromSecretEnv`,
|
|
14
|
+
`disconnect`, and `mongoose` exports are no longer available from
|
|
15
|
+
`@jaypie/testkit/mock`.
|
|
16
|
+
|
|
17
|
+
Issue: [#385](https://github.com/finlaysonstudio/jaypie/issues/385)
|
package/skills/mocks.md
CHANGED
|
@@ -22,11 +22,14 @@ In your test setup file:
|
|
|
22
22
|
import { vi } from "vitest";
|
|
23
23
|
|
|
24
24
|
vi.mock("jaypie", async () => {
|
|
25
|
-
const
|
|
26
|
-
return
|
|
25
|
+
const testkit = await import("@jaypie/testkit/mock");
|
|
26
|
+
return testkit;
|
|
27
27
|
});
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
`@jaypie/testkit/mock` re-exports a vitest mock for every `jaypie` export as a
|
|
31
|
+
flat namespace, so returning it directly mocks the whole package.
|
|
32
|
+
|
|
30
33
|
Configure in vitest.config.ts:
|
|
31
34
|
|
|
32
35
|
```typescript
|
|
@@ -43,35 +46,25 @@ export default defineConfig({
|
|
|
43
46
|
|
|
44
47
|
```typescript
|
|
45
48
|
vi.mock("jaypie", async () => {
|
|
46
|
-
const
|
|
47
|
-
return
|
|
49
|
+
const testkit = await import("@jaypie/testkit/mock");
|
|
50
|
+
return testkit;
|
|
48
51
|
});
|
|
49
52
|
|
|
50
53
|
// Mocked: log, getSecret, sendMessage, etc.
|
|
51
54
|
```
|
|
52
55
|
|
|
53
|
-
###
|
|
54
|
-
|
|
55
|
-
```typescript
|
|
56
|
-
vi.mock("@jaypie/logger", async () => {
|
|
57
|
-
const { mockLogger } = await import("@jaypie/testkit");
|
|
58
|
-
return mockLogger(vi);
|
|
59
|
-
});
|
|
60
|
-
```
|
|
56
|
+
### Sub-Packages
|
|
61
57
|
|
|
62
|
-
|
|
58
|
+
To mock an individual `@jaypie/*` package, return the relevant mocks from the
|
|
59
|
+
same flat `@jaypie/testkit/mock` namespace:
|
|
63
60
|
|
|
64
61
|
```typescript
|
|
65
|
-
vi.mock("@jaypie/
|
|
66
|
-
const
|
|
67
|
-
return
|
|
62
|
+
vi.mock("@jaypie/express", async () => {
|
|
63
|
+
const testkit = await import("@jaypie/testkit/mock");
|
|
64
|
+
return { expressHandler: testkit.expressHandler };
|
|
68
65
|
});
|
|
69
66
|
```
|
|
70
67
|
|
|
71
|
-
### Legacy Mocks
|
|
72
|
-
|
|
73
|
-
For legacy packages, see `skill("legacy")`.
|
|
74
|
-
|
|
75
68
|
## Using Mocks in Tests
|
|
76
69
|
|
|
77
70
|
### Verify Logging
|
|
@@ -158,20 +151,20 @@ afterEach(() => {
|
|
|
158
151
|
|
|
159
152
|
## Export Verification
|
|
160
153
|
|
|
161
|
-
When adding exports to
|
|
154
|
+
When adding exports to a Jaypie package, add a matching mock to testkit so the
|
|
155
|
+
auto-mock stays complete:
|
|
162
156
|
|
|
163
157
|
```typescript
|
|
164
|
-
// packages/testkit/src/
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
getSecret: vi.fn().mockResolvedValue("mock"),
|
|
169
|
-
// Add new exports here
|
|
170
|
-
newFunction: vi.fn(),
|
|
171
|
-
};
|
|
172
|
-
}
|
|
158
|
+
// packages/testkit/src/mock/<package>.ts
|
|
159
|
+
import { createMockFunction } from "./utils";
|
|
160
|
+
|
|
161
|
+
export const newFunction = createMockFunction((x) => x);
|
|
173
162
|
```
|
|
174
163
|
|
|
164
|
+
Then re-export it from `src/mock/index.ts` (named export and default object) and
|
|
165
|
+
bump the testkit patch version. Missing mocks surface as failures in testkit's
|
|
166
|
+
`mock/__tests__/index.spec.ts` "all exports from original" check.
|
|
167
|
+
|
|
175
168
|
## See Also
|
|
176
169
|
|
|
177
170
|
- **`skill("errors")`** - Error types used in mock assertions
|