@hublo/sentinel 1.4.0-alpha.55 → 1.4.0-alpha.57
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/dist/bin/sentinel.js
CHANGED
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
palette,
|
|
16
16
|
registerAdapters,
|
|
17
17
|
resolve
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-MM6EUHGX.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveContext
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-EO7KSZRX.js";
|
|
22
22
|
import "../chunk-O7REVMOC.js";
|
|
23
23
|
import "../chunk-QXFCZON7.js";
|
|
24
24
|
import {
|
|
@@ -145,7 +145,7 @@ async function runValidate(ctx) {
|
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
147
|
if (!ctx.targets.includes("test")) return 1;
|
|
148
|
-
const { validateModuleTests } = await import("../validate-
|
|
148
|
+
const { validateModuleTests } = await import("../validate-H3WDWLTU.js");
|
|
149
149
|
const outcomes = modules.flatMap(
|
|
150
150
|
(module) => validateModuleTests(module.name, module.root)
|
|
151
151
|
);
|
|
@@ -1032,7 +1032,11 @@ function inheritedMocksSetup(specifiers) {
|
|
|
1032
1032
|
* vitest keeps the exported FUNCTIONS and drops \`aws\`, the object the code calls, so the
|
|
1033
1033
|
* provider dies on \`Cannot read properties of undefined (reading 'ddb')\`. The factory below
|
|
1034
1034
|
* rebuilds the shape jest handed back: every property is a spy, a nested one builds another,
|
|
1035
|
-
* and \`new Thing()\`
|
|
1035
|
+
* and \`new Thing()\` yields an INSTANCE that carries its methods too. That last part is not
|
|
1036
|
+
* decoration: the real \`PeriodicExportingMetricReader\` holds an instance of the mocked
|
|
1037
|
+
* exporter and calls \`forceFlush\` on it, and a plain \`{}\` fails with
|
|
1038
|
+
* \`this._exporter.forceFlush is not a function\`. A property the underlying spy already owns,
|
|
1039
|
+
* such as
|
|
1036
1040
|
* \`mockImplementation\`, is returned untouched, so \`vi.mocked(X).mockImplementation(...)\`
|
|
1037
1041
|
* keeps working.
|
|
1038
1042
|
*/
|
|
@@ -1042,16 +1046,21 @@ const automock = (): Record<string | symbol, unknown> => {
|
|
|
1042
1046
|
const anything = (): never =>
|
|
1043
1047
|
new Proxy(vi.fn() as never, {
|
|
1044
1048
|
get: (target: Record<string | symbol, unknown>, key: string | symbol) => {
|
|
1045
|
-
if (key === 'then')
|
|
1049
|
+
if (key === 'then') {
|
|
1050
|
+
return undefined
|
|
1051
|
+
}
|
|
1046
1052
|
target[key] ??= anything()
|
|
1047
1053
|
return target[key]
|
|
1048
1054
|
},
|
|
1055
|
+
construct: (): object => anything() as never,
|
|
1049
1056
|
})
|
|
1050
1057
|
|
|
1051
1058
|
const namespace: Record<string | symbol, unknown> = {}
|
|
1052
1059
|
return new Proxy(namespace, {
|
|
1053
1060
|
get: (target, key) => {
|
|
1054
|
-
if (key === 'then' || key === '__esModule')
|
|
1061
|
+
if (key === 'then' || key === '__esModule') {
|
|
1062
|
+
return undefined
|
|
1063
|
+
}
|
|
1055
1064
|
target[key] ??= anything()
|
|
1056
1065
|
return target[key]
|
|
1057
1066
|
},
|
package/dist/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
registerAdapters,
|
|
7
7
|
resolve,
|
|
8
8
|
setDefaultRunner
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MM6EUHGX.js";
|
|
10
10
|
import {
|
|
11
11
|
BaseAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EO7KSZRX.js";
|
|
13
13
|
import "./chunk-O7REVMOC.js";
|
|
14
14
|
import "./chunk-QXFCZON7.js";
|
|
15
15
|
import "./chunk-KMKQDGI6.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hublo/sentinel",
|
|
3
|
-
"version": "1.4.0-alpha.
|
|
3
|
+
"version": "1.4.0-alpha.57",
|
|
4
4
|
"description": "One CLI that guards code health across Hublo repos: shared lint/typescript/build/test presets, static & dynamic analysis, and architecture checks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|