@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.
Files changed (71) hide show
  1. package/README.md +2 -0
  2. package/TESTING.md +26 -0
  3. package/dist/ci-budget-B2AuZ3xa.mjs +80 -0
  4. package/dist/ci-budget-cli.d.mts +2 -0
  5. package/dist/ci-budget-cli.mjs +31 -0
  6. package/dist/ci-budget.d.mts +22 -0
  7. package/dist/ci-budget.mjs +1 -0
  8. package/dist/ci-result.d.mts +1 -0
  9. package/dist/ci-result.mjs +12 -0
  10. package/dist/{compatible-DIYO9MZf.d.mts → compatible-BKEJ_p20.d.mts} +1 -1
  11. package/dist/{compatible-D54mCSlT.mjs → compatible-CRaMYpBM.mjs} +2 -2
  12. package/dist/compatible.d.mts +1 -1
  13. package/dist/compatible.mjs +1 -1
  14. package/dist/conformance.mjs +1 -1
  15. package/dist/{effect-plugin-BsrW5_nI.mjs → effect-plugin-roghk4W1.mjs} +2 -3
  16. package/dist/effect-plugin.mjs +1 -1
  17. package/dist/exceptions-D0yZUk8P.mjs +145 -0
  18. package/dist/exceptions.mjs +1 -1
  19. package/dist/foldkit-plugin.mjs +2 -2
  20. package/dist/formal.d.mts +1 -1
  21. package/dist/formal.mjs +5 -5
  22. package/dist/{guard-fFg_0NIp.mjs → guard-n0LC_buo.mjs} +6 -6
  23. package/dist/guard.d.mts +1 -1
  24. package/dist/guard.mjs +1 -1
  25. package/dist/hooks.d.mts +1 -1
  26. package/dist/hooks.mjs +2 -2
  27. package/dist/{lint-BJ6SmGk1.mjs → lint-Bx4NP_kA.mjs} +5 -5
  28. package/dist/lint.mjs +1 -1
  29. package/dist/{plugin-CwxhPtui.mjs → plugin-DUUAfi92.mjs} +326 -30
  30. package/dist/plugin.d.mts +5 -0
  31. package/dist/plugin.mjs +1 -1
  32. package/dist/proof.mjs +3 -3
  33. package/dist/renovate-ci-BdVmECgm.mjs +73 -0
  34. package/dist/renovate-ci.d.mts +10 -0
  35. package/dist/renovate-ci.mjs +1 -0
  36. package/dist/{rules-vHmNoAU0.mjs → rules-5qwzfDWJ.mjs} +3 -1
  37. package/dist/rules.d.mts +2 -0
  38. package/dist/rules.mjs +1 -1
  39. package/dist/standard.mjs +6 -6
  40. package/dist/starts.mjs +4 -2
  41. package/dist/verdict.d.mts +1 -1
  42. package/dist/verdict.mjs +2 -2
  43. package/dist/{verification-FgQFU1YN.d.mts → verification-fnhfrxmy.d.mts} +1 -1
  44. package/dist/verification.d.mts +1 -1
  45. package/dist/verification.mjs +1 -1
  46. package/dist/versions.mjs +1 -1
  47. package/package.json +13 -1
  48. package/renovate.json +29 -3
  49. package/src/ci-budget-cli.ts +39 -0
  50. package/src/ci-budget.ts +116 -0
  51. package/src/ci-result.ts +12 -0
  52. package/src/effect-plugin.ts +0 -1
  53. package/src/exceptions.ts +132 -0
  54. package/src/plugin.ts +10 -0
  55. package/src/renovate-ci.ts +96 -0
  56. package/src/rules/no-mock-call-mirrors.ts +121 -0
  57. package/src/rules/no-test-internal-imports.ts +102 -0
  58. package/src/rules/no-test-timeouts.ts +83 -0
  59. package/src/rules/no-test-waits.ts +113 -0
  60. package/src/rules/require-test-quarantine.ts +36 -0
  61. package/src/rules/test-api.ts +57 -0
  62. package/src/rules/test-hygiene.test.ts +241 -0
  63. package/src/rules/test-package.ts +32 -0
  64. package/src/rules.ts +2 -0
  65. package/src/shared/member-path.ts +7 -0
  66. package/src/starts/policy.ts +5 -1
  67. package/dist/exceptions-Dybl9xpc.mjs +0 -11
  68. package/dist/{specs-file-NsQF4V7X.mjs → specs-file-Ck9ZOt46.mjs} +1 -1
  69. package/dist/{syntax-CGEOffZK.mjs → syntax-B3n7lDYJ.mjs} +1 -1
  70. package/dist/{verification-oAc1Q6I9.mjs → verification-D4Sn2fh5.mjs} +4 -4
  71. 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
  }
@@ -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 Schema from "effect/Schema";
2
1
  import * as Effect from "effect/Effect";
2
+ import * as Schema from "effect/Schema";
3
3
  import * as Result from "effect/Result";
4
4
  import * as SchemaIssue from "effect/SchemaIssue";
5
5
  // src/formal/critical.ts
@@ -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";