@milkenjoyer/toolchain 0.20.0 → 0.22.0
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/README.md +2 -0
- package/TESTING.md +26 -0
- package/dist/ci-budget-B2AuZ3xa.mjs +80 -0
- package/dist/ci-budget-cli.d.mts +2 -0
- package/dist/ci-budget-cli.mjs +31 -0
- package/dist/ci-budget.d.mts +22 -0
- package/dist/ci-budget.mjs +1 -0
- package/dist/ci-result.d.mts +1 -0
- package/dist/ci-result.mjs +12 -0
- package/dist/{compatible-DIYO9MZf.d.mts → compatible-BKEJ_p20.d.mts} +1 -1
- package/dist/{compatible-D54mCSlT.mjs → compatible-CRaMYpBM.mjs} +2 -2
- package/dist/compatible.d.mts +1 -1
- package/dist/compatible.mjs +1 -1
- package/dist/conformance.mjs +1 -1
- package/dist/{effect-plugin-BsrW5_nI.mjs → effect-plugin-roghk4W1.mjs} +2 -3
- package/dist/effect-plugin.mjs +1 -1
- package/dist/exceptions-D0yZUk8P.mjs +145 -0
- package/dist/exceptions.mjs +1 -1
- package/dist/foldkit-plugin.mjs +2 -2
- package/dist/formal.d.mts +1 -1
- package/dist/formal.mjs +5 -5
- package/dist/{guard-fFg_0NIp.mjs → guard-n0LC_buo.mjs} +6 -6
- package/dist/guard.d.mts +1 -1
- package/dist/guard.mjs +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.mjs +2 -2
- package/dist/{lint-BJ6SmGk1.mjs → lint-Bx4NP_kA.mjs} +5 -5
- package/dist/lint.mjs +1 -1
- package/dist/{plugin-CwxhPtui.mjs → plugin-DUUAfi92.mjs} +326 -30
- package/dist/plugin.d.mts +5 -0
- package/dist/plugin.mjs +1 -1
- package/dist/proof.mjs +3 -3
- package/dist/renovate-ci-BdVmECgm.mjs +73 -0
- package/dist/renovate-ci.d.mts +10 -0
- package/dist/renovate-ci.mjs +1 -0
- package/dist/{rules-vHmNoAU0.mjs → rules-5qwzfDWJ.mjs} +3 -1
- package/dist/rules.d.mts +2 -0
- package/dist/rules.mjs +1 -1
- package/dist/standard.mjs +6 -6
- package/dist/starts.mjs +4 -2
- package/dist/verdict.d.mts +1 -1
- package/dist/verdict.mjs +2 -2
- package/dist/{verification-FgQFU1YN.d.mts → verification-fnhfrxmy.d.mts} +1 -1
- package/dist/verification.d.mts +1 -1
- package/dist/verification.mjs +1 -1
- package/dist/versions.mjs +1 -1
- package/package.json +13 -1
- package/renovate.json +29 -3
- package/src/ci-budget-cli.ts +39 -0
- package/src/ci-budget.ts +116 -0
- package/src/ci-result.ts +12 -0
- package/src/effect-plugin.ts +0 -1
- package/src/exceptions.ts +132 -0
- package/src/plugin.ts +10 -0
- package/src/renovate-ci.ts +96 -0
- package/src/rules/no-mock-call-mirrors.ts +121 -0
- package/src/rules/no-test-internal-imports.ts +102 -0
- package/src/rules/no-test-timeouts.ts +83 -0
- package/src/rules/no-test-waits.ts +113 -0
- package/src/rules/require-test-quarantine.ts +36 -0
- package/src/rules/test-api.ts +57 -0
- package/src/rules/test-hygiene.test.ts +241 -0
- package/src/rules/test-package.ts +32 -0
- package/src/rules.ts +2 -0
- package/src/shared/member-path.ts +7 -0
- package/src/starts/policy.ts +5 -1
- package/dist/exceptions-Dybl9xpc.mjs +0 -11
- package/dist/{specs-file-NsQF4V7X.mjs → specs-file-Ck9ZOt46.mjs} +1 -1
- package/dist/{syntax-CGEOffZK.mjs → syntax-B3n7lDYJ.mjs} +1 -1
- package/dist/{verification-oAc1Q6I9.mjs → verification-D4Sn2fh5.mjs} +4 -4
- package/dist/{versions-DpRzgSR_.mjs → versions-KbYa8kbF.mjs} +1 -1
|
@@ -89,6 +89,13 @@ export const importedPath: {
|
|
|
89
89
|
return { source: declaration.source.value, members: path.members };
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
if (specifier.type === "ImportDefaultSpecifier") {
|
|
93
|
+
return {
|
|
94
|
+
source: declaration.source.value,
|
|
95
|
+
members: ["default", ...path.members],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
92
99
|
if (specifier.type !== "ImportSpecifier") {
|
|
93
100
|
return yield* Option.none();
|
|
94
101
|
}
|
package/src/starts/policy.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
2
|
import { parse } from "yaml";
|
|
3
3
|
|
|
4
|
+
import { isRenovateCi } from "../renovate-ci.ts";
|
|
5
|
+
|
|
4
6
|
export const BOAT_JOBS_PER_RUN = 2;
|
|
5
7
|
|
|
6
8
|
const Matrix = Schema.Record(Schema.String, Schema.Array(Schema.Unknown));
|
|
@@ -43,6 +45,7 @@ type WorkflowFile = readonly [path: string, text: string];
|
|
|
43
45
|
type Parsed = {
|
|
44
46
|
readonly path: string;
|
|
45
47
|
readonly workflow: typeof Workflow.Type;
|
|
48
|
+
readonly renovate: boolean;
|
|
46
49
|
};
|
|
47
50
|
|
|
48
51
|
const dynamic = (value: unknown): boolean => {
|
|
@@ -84,6 +87,7 @@ export const boatJobFindings = (
|
|
|
84
87
|
workflows.push({
|
|
85
88
|
path,
|
|
86
89
|
workflow: Schema.decodeUnknownSync(Workflow)(parse(text)),
|
|
90
|
+
renovate: isRenovateCi(text),
|
|
87
91
|
});
|
|
88
92
|
} catch {
|
|
89
93
|
findings.push(`${path}: workflow unread`);
|
|
@@ -186,7 +190,7 @@ export const boatJobFindings = (
|
|
|
186
190
|
};
|
|
187
191
|
for (const entry of workflows) {
|
|
188
192
|
const total = count(entry, [], true);
|
|
189
|
-
if (total > 0 && startsOnPr(entry.workflow.on))
|
|
193
|
+
if (total > 0 && startsOnPr(entry.workflow.on) && !entry.renovate)
|
|
190
194
|
findings.push(
|
|
191
195
|
`${entry.path}: a pull_request or PR-branch push starts ${total} Boat jobs; PR ready starts on request`
|
|
192
196
|
);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// src/exceptions.ts
|
|
2
|
-
const exceptions = [{
|
|
3
|
-
files: ["packages/toolchain/src/conformance.ts"],
|
|
4
|
-
rules: [
|
|
5
|
-
"eslint/no-restricted-imports",
|
|
6
|
-
"vitest/no-disabled-tests",
|
|
7
|
-
"vitest/no-conditional-tests"
|
|
8
|
-
],
|
|
9
|
-
issue: "https://github.com/birbprophet/agent-kit/issues/278"
|
|
10
|
-
}];
|
|
11
|
-
export { exceptions as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Option from "effect/Option";
|
|
2
1
|
import * as Schema from "effect/Schema";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
3
3
|
// src/shared/syntax.ts
|
|
4
4
|
const unwrapExpression = (node) => {
|
|
5
5
|
if (node.type === "ParenthesizedExpression" || node.type === "ChainExpression" || node.type === "TSAsExpression" || node.type === "TSTypeAssertion" || node.type === "TSNonNullExpression" || node.type === "TSSatisfiesExpression") return unwrapExpression(node.expression);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as Data from "effect/Data";
|
|
2
|
-
import * as Schema from "effect/Schema";
|
|
3
1
|
import * as Config from "effect/Config";
|
|
2
|
+
import * as Console from "effect/Console";
|
|
4
3
|
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Redacted from "effect/Redacted";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
6
|
+
import * as Data from "effect/Data";
|
|
5
7
|
import { NodeServices } from "@effect/platform-node";
|
|
6
8
|
import * as Cause from "effect/Cause";
|
|
7
|
-
import * as Console from "effect/Console";
|
|
8
9
|
import * as Exit from "effect/Exit";
|
|
9
10
|
import { FileSystem } from "effect/FileSystem";
|
|
10
11
|
import { Octokit } from "@octokit/rest";
|
|
11
|
-
import * as Redacted from "effect/Redacted";
|
|
12
12
|
// src/verification.ts
|
|
13
13
|
const exemptions = [{
|
|
14
14
|
reason: "Renovate PR",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
1
2
|
import * as Arr from "effect/Array";
|
|
2
3
|
import { dual } from "effect/Function";
|
|
3
4
|
import * as Option from "effect/Option";
|
|
4
5
|
import * as R from "effect/Record";
|
|
5
|
-
import * as Schema from "effect/Schema";
|
|
6
6
|
import * as Str from "effect/String";
|
|
7
7
|
// src/versions.ts
|
|
8
8
|
const nodeVersion = "26.13.1";
|