@bastani/atomic 0.5.32-0 → 0.5.32
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.5.32
|
|
3
|
+
"version": "0.5.32",
|
|
4
4
|
"description": "Configuration management CLI and SDK for coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@j178/prek": "^0.3.10",
|
|
68
|
-
"@types/bun": "^1.3.
|
|
68
|
+
"@types/bun": "^1.3.13",
|
|
69
69
|
"@types/react": "^19.2.14",
|
|
70
70
|
"oxlint": "^1.61.0",
|
|
71
71
|
"typescript": "^6.0.3",
|
|
72
72
|
"typescript-language-server": "^5.1.3"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.
|
|
75
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.118",
|
|
76
76
|
"@clack/prompts": "^1.2.0",
|
|
77
77
|
"@commander-js/extra-typings": "^14.0.0",
|
|
78
78
|
"@github/copilot-sdk": "^0.2.2",
|
|
@@ -51,6 +51,12 @@ import type {
|
|
|
51
51
|
const realDiscoverWorkflows = realWorkflows.discoverWorkflows;
|
|
52
52
|
const realLoadWorkflowsMetadata = realWorkflows.loadWorkflowsMetadata;
|
|
53
53
|
const realIsCommandInstalled = realDetect.isCommandInstalled;
|
|
54
|
+
// Snapshot the real `auth.ts` exports before `mock.module` rebinds them.
|
|
55
|
+
// Bun 1.3.13 canonicalizes `mock.module` specifiers to an absolute path, so
|
|
56
|
+
// our registration for `"../../services/system/auth.ts"` now shares a key with
|
|
57
|
+
// `auth.test.ts`'s `"./auth.ts"` — the mock leaks across files unless we
|
|
58
|
+
// explicitly restore on teardown. See `afterAll` at the bottom of this file.
|
|
59
|
+
const realAuthSnapshot = { ...realAuth };
|
|
54
60
|
|
|
55
61
|
// ─── Dependency mocks ───────────────────────────────────────────────────────
|
|
56
62
|
// Every mock is a wrapper around the real implementation by default so
|
|
@@ -133,6 +139,12 @@ mock.module("../../lib/spawn.ts", () => ({
|
|
|
133
139
|
// binds to the mocked dependencies. Top-level await is fine under Bun.
|
|
134
140
|
const { workflowCommand } = await import("./workflow.ts");
|
|
135
141
|
|
|
142
|
+
// Restore `auth.ts` to its real exports once this file's tests finish so the
|
|
143
|
+
// leaked `checkAgentAuthMock` doesn't hijack `auth.test.ts` when it loads next.
|
|
144
|
+
afterAll(() => {
|
|
145
|
+
mock.module("../../services/system/auth.ts", () => realAuthSnapshot);
|
|
146
|
+
});
|
|
147
|
+
|
|
136
148
|
// ─── Output capture ─────────────────────────────────────────────────────────
|
|
137
149
|
// The CLI writes error banners to stderr via `console.error`, success content
|
|
138
150
|
// to stdout via `process.stdout.write`. Wrap both so tests can snapshot the
|