@roomi-fields/grillhouse 0.24.14 → 0.25.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 (124) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/bin/grillhouse.mjs +40 -12
  3. package/cadre/templates/cargo/.config/nextest.toml +8 -0
  4. package/cadre/templates/cargo/deny.toml +36 -0
  5. package/cadre/templates/cargo/package.json +15 -0
  6. package/cadre/templates/cargo/rust-toolchain.toml +6 -0
  7. package/cadre/templates/projet/package.json +5 -1
  8. package/cadre/templates/turbo/paquets.json +1 -1
  9. package/cadre/templates/turbo/sans-paquets.json +1 -1
  10. package/charte.md +16 -0
  11. package/docs/ARCHITECTURE.md +167 -17
  12. package/docs/CADRE.md +47 -0
  13. package/docs/INTERFACE.md +168 -0
  14. package/package.json +71 -14
  15. package/scripts/arbitrages.mjs +23 -0
  16. package/scripts/avancement.mjs +15 -29
  17. package/scripts/circuit.mjs +89 -97
  18. package/scripts/commande-du-langage.mjs +56 -0
  19. package/scripts/composants-affectes.mjs +47 -170
  20. package/scripts/conformite.d.ts +27 -0
  21. package/scripts/conformite.mjs +226 -0
  22. package/scripts/demon.mjs +1 -1
  23. package/scripts/dernier-vert.mjs +11 -9
  24. package/scripts/droits.mjs +27 -21
  25. package/scripts/enveloppe/enveloppe.mjs +206 -64
  26. package/scripts/enveloppe/lancer.sh +24 -75
  27. package/scripts/enveloppe/paquets-du-plan.mjs +24 -2
  28. package/scripts/etapes.mjs +2 -2
  29. package/scripts/gardes-du-cadre.mjs +12 -18
  30. package/scripts/grillhouse-maj.mjs +246 -389
  31. package/scripts/init.mjs +2 -1
  32. package/scripts/integration/file.mjs +3 -3
  33. package/scripts/integration/integrer.mjs +13 -10
  34. package/scripts/integration/rejeu.mjs +36 -7
  35. package/scripts/jointure.d.ts +304 -0
  36. package/scripts/langages/cargo/binaires.json +4 -0
  37. package/scripts/langages/cargo/binaires.mjs +60 -0
  38. package/scripts/langages/cargo/clippy.mjs +103 -0
  39. package/scripts/langages/cargo/commandes.mjs +378 -0
  40. package/scripts/langages/cargo/composants.mjs +191 -0
  41. package/scripts/langages/cargo/elements-du-lot.mjs +139 -0
  42. package/scripts/langages/cargo/exemples.mjs +357 -0
  43. package/scripts/langages/cargo/frontieres.mjs +84 -0
  44. package/scripts/langages/cargo/index-interfaces.mjs +138 -0
  45. package/scripts/langages/cargo/index.mjs +115 -0
  46. package/scripts/langages/cargo/mise-a-jour.mjs +93 -0
  47. package/scripts/langages/cargo/nextest.toml +5 -0
  48. package/scripts/langages/cargo/touches.mjs +93 -0
  49. package/scripts/langages/cargo/verdict.mjs +85 -0
  50. package/scripts/langages/typescript/chemins-des-tests.mjs +68 -0
  51. package/scripts/{code-mort.mjs → langages/typescript/code-mort.mjs} +5 -5
  52. package/scripts/langages/typescript/composants.mjs +64 -0
  53. package/scripts/{consommateurs-arbitres.mjs → langages/typescript/consommateurs-arbitres.mjs} +6 -24
  54. package/scripts/{consommateurs.mjs → langages/typescript/consommateurs.mjs} +13 -71
  55. package/scripts/langages/typescript/construire.mjs +176 -0
  56. package/scripts/{elements-du-lot.mjs → langages/typescript/elements-du-lot.mjs} +2 -2
  57. package/scripts/langages/typescript/exemples.mjs +289 -0
  58. package/scripts/{frontieres.mjs → langages/typescript/frontieres.mjs} +3 -5
  59. package/scripts/{index-interfaces.mjs → langages/typescript/index-interfaces.mjs} +3 -3
  60. package/scripts/langages/typescript/index.mjs +335 -0
  61. package/scripts/{interfaces-contre-code.mjs → langages/typescript/interfaces-contre-code.mjs} +2 -2
  62. package/scripts/langages/typescript/lecteurs.mjs +179 -0
  63. package/scripts/{migrations → langages/typescript/migrations}/0.23.0-config-vitest.mjs +14 -29
  64. package/scripts/{migrations → langages/typescript/migrations}/0.24.4-noms-declares-inutilises.mjs +2 -2
  65. package/scripts/{migrations → langages/typescript/migrations}/0.24.6-lignes-mal-formees.mjs +2 -2
  66. package/scripts/{migrations → langages/typescript/migrations}/0.24.7-matiere-dans-les-tests.mjs +2 -2
  67. package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +27 -0
  68. package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +31 -0
  69. package/scripts/langages/typescript/mise-a-jour.mjs +320 -0
  70. package/scripts/{references-par-les-types.mjs → langages/typescript/references-par-les-types.mjs} +3 -3
  71. package/scripts/langages/typescript/regle-des-tests.mjs +39 -0
  72. package/scripts/{resumes.mjs → langages/typescript/resumes.mjs} +4 -4
  73. package/scripts/langages/typescript/script-des-tests.mjs +6 -0
  74. package/scripts/langages/typescript/tailles-des-tests.mjs +219 -0
  75. package/scripts/langages/typescript/tests-de-nuit.mjs +57 -0
  76. package/scripts/{tests.mjs → langages/typescript/tests.mjs} +41 -32
  77. package/scripts/{turbo-des-paquets.mjs → langages/typescript/turbo-des-paquets.mjs} +61 -34
  78. package/scripts/langages/typescript/verdict.mjs +105 -0
  79. package/scripts/{verifier.mjs → langages/typescript/verifier.mjs} +53 -34
  80. package/scripts/{vitest-config → langages/typescript/vitest-config}/avancement.reporter.mjs +10 -2
  81. package/scripts/{vitest-config → langages/typescript/vitest-config}/base.mjs +63 -9
  82. package/scripts/{vitest-config → langages/typescript/vitest-config}/changements.mjs +18 -9
  83. package/scripts/{vitest-config → langages/typescript/vitest-config}/cibles.mjs +7 -6
  84. package/scripts/{vitest-config → langages/typescript/vitest-config}/duree.reporter.mjs +6 -1
  85. package/scripts/langages/typescript/vitest-config/lances.mjs +473 -0
  86. package/scripts/{vitest-config → langages/typescript/vitest-config}/mesure.setup.mjs +1 -1
  87. package/scripts/{vitest-config → langages/typescript/vitest-config}/resultats.mjs +5 -5
  88. package/scripts/{vitest-config → langages/typescript/vitest-config}/resultats.setup.mjs +4 -3
  89. package/scripts/{vitest.nuit.config.mjs → langages/typescript/vitest.nuit.config.mjs} +2 -2
  90. package/scripts/langages.mjs +85 -0
  91. package/scripts/{vitest-config → mesure}/avancement.mjs +4 -13
  92. package/scripts/{vitest-config → mesure}/base-de-passe.mjs +70 -33
  93. package/scripts/{vitest-config → mesure}/pression.mjs +5 -6
  94. package/scripts/migrations/0.23.2-copies-du-cadre.mjs +29 -6
  95. package/scripts/migrations/0.24.0-circuit-simplifie.mjs +13 -6
  96. package/scripts/migrations/0.25.0-script-des-tests.mjs +92 -0
  97. package/scripts/migrations.mjs +17 -13
  98. package/scripts/nuit.sh +59 -63
  99. package/scripts/paquets.d.ts +5 -0
  100. package/scripts/paquets.mjs +24 -2
  101. package/scripts/resultats.mjs +8 -82
  102. package/scripts/services-du-noyau.mjs +30 -0
  103. package/scripts/session-start.sh +17 -9
  104. package/scripts/sources.mjs +35 -13
  105. package/scripts/sous-commandes.mjs +57 -17
  106. package/scripts/superviseur.mjs +1 -1
  107. package/scripts/tableau.mjs +1 -1
  108. package/scripts/un-commit-par-ticket.mjs +48 -14
  109. package/scripts/verrou-de-fichier.mjs +1 -1
  110. package/scripts/verrou-de-machine.mjs +4 -4
  111. package/scripts/verrous/verrou.mjs +28 -37
  112. package/skills/developpeur/SKILL.md +2 -2
  113. package/skills/explorateur/SKILL.md +13 -5
  114. package/skills/grill/SKILL.md +2 -2
  115. package/skills/pitmaster/references/cadre.md +1 -1
  116. package/skills/pitmaster/references/consigne-agent.md +10 -3
  117. package/skills/redacteur/references/documents-d-un-composant.md +4 -4
  118. package/skills/relecteur/SKILL.md +4 -1
  119. package/skills/testwriter/SKILL.md +20 -6
  120. /package/scripts/{consommateurs.d.ts → langages/typescript/consommateurs.d.ts} +0 -0
  121. /package/scripts/{vitest-config → langages/typescript/vitest-config}/base.d.ts +0 -0
  122. /package/scripts/{vitest-config → langages/typescript/vitest-config}/machine.setup.mjs +0 -0
  123. /package/scripts/{vitest-config → langages/typescript/vitest-config}/mesure.d.ts +0 -0
  124. /package/scripts/{vitest-config → langages/typescript/vitest-config}/mesure.mjs +0 -0
@@ -58,8 +58,8 @@ import { tmpdir } from 'node:os';
58
58
  import path from 'node:path';
59
59
  import { pathToFileURL } from 'node:url';
60
60
  import { composants, lireSiPresent, parcourir } from './consommateurs.mjs';
61
- import { paquetsDeLEnveloppe } from './enveloppe/paquets-du-plan.mjs';
62
- import { trancher } from './dette.mjs';
61
+ import { paquetsDeLEnveloppe } from '../../services-du-noyau.mjs';
62
+ import { trancher } from '../../dette.mjs';
63
63
 
64
64
  const require = createRequire(import.meta.url);
65
65
  const SOURCE = /\.(ts|tsx|mts|cts|js|jsx|mjs|cjs|svelte|vue)$/;
@@ -0,0 +1,179 @@
1
+ // The readers of the elements a ticket names, by the code of the module typescript: the part of
2
+ // the survey of composants-affectes (scripts/composants-affectes.mjs) that reads the sources, the
3
+ // first demand of the join (scripts/jointure.d.ts, `lecteurs`), as « find all references » of a
4
+ // language service starts from a published symbol.
5
+ //
6
+ // - The provider of an element is the component whose interface (`docs/INTERFACE.md`) publishes
7
+ // it: a heading of its generated part (`lire` of scripts/langages/typescript/index-interfaces.mjs). A name no
8
+ // interface publishes, no component bears as its package name and no survey by the types
9
+ // resolves, that names a path of the repository or a declaration at the top of a component's
10
+ // production source, is set apart (`sansFournisseur`).
11
+ // - The readers of an element are the other components that: its provider's `## Consommateurs`
12
+ // declares for it, or for `*` (`consommateurs`); import it, or the whole provider, in their
13
+ // production code, or in their tests for a package of the shared test material (`import`, the
14
+ // uses of scripts/langages/typescript/consommateurs.mjs); hold a test file that names it, as a whole word, and
15
+ // imports the provider (the test file's path).
16
+ // - By the types (scripts/langages/typescript/references-par-les-types.mjs): each element the text writes, resolved by
17
+ // TypeScript's language service over the components' `tsconfig.json`.
18
+ // - What each component reads (`lit`): its imports, and the providers of the elements it reads.
19
+ import { existsSync, readFileSync } from 'node:fs';
20
+ import path from 'node:path';
21
+ import {
22
+ declares,
23
+ imports,
24
+ lireSiPresent,
25
+ NOM_DE_TEST,
26
+ parcourir,
27
+ utilise,
28
+ } from './consommateurs.mjs';
29
+ import { lire } from './index-interfaces.mjs';
30
+ import { elementsEcrits, parLesTypes } from './references-par-les-types.mjs';
31
+
32
+ const DOSSIERS_DE_TEST = new Set(['test', 'tests', '__tests__']);
33
+ const SAUTES = new Set(['node_modules', 'dist', 'build', 'coverage']);
34
+ const SOURCE = /\.[cm]?[jt]sx?$/;
35
+ const echapper = s => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
36
+ const identifiant = nom => new RegExp(`(?<![\\w$])${echapper(nom)}(?![\\w$])`);
37
+
38
+ // A declaration of <nom> at the top of a source, exported or not.
39
+ const DECLARATION_EN_TETE = nom =>
40
+ new RegExp(
41
+ `^(?:export\\s+)?(?:default\\s+)?(?:declare\\s+)?(?:abstract\\s+)?(?:async\\s+)?(?:function\\*?|class|interface|type|enum|const|let|var)\\s+${echapper(nom)}(?![\\w$])`,
42
+ 'm'
43
+ );
44
+ // The texts of the production sources of the components <tous>, their tests left out.
45
+ function sourcesDe(tous) {
46
+ return tous.flatMap(c =>
47
+ parcourir(c.dir, p => SAUTES.has(path.basename(p)))
48
+ .filter(f => {
49
+ if (!SOURCE.test(f) || NOM_DE_TEST.test(path.basename(f))) return false;
50
+ return !path
51
+ .relative(c.dir, f)
52
+ .split(path.sep)
53
+ .some(d => DOSSIERS_DE_TEST.has(d));
54
+ })
55
+ .map(f => lireSiPresent(f) ?? '')
56
+ );
57
+ }
58
+
59
+ // Each component's published elements and declared consumers, read in its interface.
60
+ function interfacesDe(racine, tous) {
61
+ const out = new Map();
62
+ for (const c of tous) {
63
+ const f = path.join(c.dir, 'docs', 'INTERFACE.md');
64
+ if (!existsSync(f)) continue;
65
+ const i = lire(path.relative(racine, f).split(path.sep).join('/'), readFileSync(f, 'utf8'));
66
+ const publies = new Set(
67
+ i.parties.filter(p => !p.consommateurs).map(p => p.titre.replace(/`/g, '').trim())
68
+ );
69
+ const consommateurs = i.parties.find(p => p.consommateurs)?.consommateurs ?? declares('');
70
+ out.set(c, { publies, consommateurs });
71
+ }
72
+ return out;
73
+ }
74
+
75
+ // The test sources of the component <c>: test files, and the sources of its test folders, built
76
+ // files left out.
77
+ function testsDe(c) {
78
+ return parcourir(c.dir, p => SAUTES.has(path.basename(p))).filter(f => {
79
+ if (!SOURCE.test(f)) return false;
80
+ const rel = path.relative(c.dir, f).split(path.sep);
81
+ return NOM_DE_TEST.test(path.basename(f)) || rel.some(d => DOSSIERS_DE_TEST.has(d));
82
+ });
83
+ }
84
+
85
+ // Whether the source <texte> of the file <fichier> imports the component <p>.
86
+ function importe(texte, fichier, p) {
87
+ return imports(texte).some(({ spec }) => {
88
+ if (spec.startsWith('.')) {
89
+ const cible = path.resolve(path.dirname(fichier), spec);
90
+ return cible === p.dir || cible.startsWith(p.dir + path.sep);
91
+ }
92
+ return Boolean(p.paquet) && (spec === p.paquet || spec.startsWith(`${p.paquet}/`));
93
+ });
94
+ }
95
+
96
+ // The readers, by the code, of the elements <noms> that the text <texte> names, among the
97
+ // components <composants> of <racine> (`composants` of the module), the components the text
98
+ // names <nommes>: `{ elements: [{ nom, fournisseur, lecteurs: [{ composant, par }] }],
99
+ // sansFournisseur, types: { etat, raison, elements: [{ nom, declarations: [{ composant, publie }],
100
+ // lecteurs: Map composant → Set of « par » }] }, lit: Map composant → Set of composants }`, each
101
+ // component one of <composants>.
102
+ export function lecteurs(racine, { composants, noms, texte, nommes }) {
103
+ const tous = composants.map(c => ({ nom: c.nom, dir: c.dossier, paquet: c.paquet, c }));
104
+ const exterieur = i => i.c;
105
+ const reel = utilise(racine, tous);
106
+ const ifaces = interfacesDe(racine, tous);
107
+ const tests = new Map();
108
+ const testsDuComposant = c => {
109
+ if (!tests.has(c))
110
+ tests.set(
111
+ c,
112
+ testsDe(c).map(f => ({ f, texte: lireSiPresent(f) ?? '' }))
113
+ );
114
+ return tests.get(c);
115
+ };
116
+ const elements = [];
117
+ const sansFournisseur = [];
118
+ for (const nom of noms) {
119
+ const fournisseurs = tous.filter(c => ifaces.get(c)?.publies.has(nom));
120
+ if (fournisseurs.length === 0) {
121
+ if (!tous.some(c => c.paquet === nom)) sansFournisseur.push(nom);
122
+ continue;
123
+ }
124
+ for (const p of fournisseurs) {
125
+ const lus = [];
126
+ for (const c of tous) {
127
+ if (c === p) continue;
128
+ const par = [];
129
+ const declare =
130
+ ifaces.get(p).consommateurs.get(c.nom) ?? ifaces.get(p).consommateurs.get(c.paquet);
131
+ if (declare && (declare.has(nom) || declare.has('*'))) par.push('consommateurs');
132
+ const n = reel.get(p.nom)?.get(c.nom);
133
+ if (n && (n.has(nom) || n.has('*'))) par.push('import');
134
+ for (const t of testsDuComposant(c)) {
135
+ if (identifiant(nom).test(t.texte) && importe(t.texte, t.f, p)) {
136
+ par.push(path.relative(racine, t.f).split(path.sep).join('/'));
137
+ }
138
+ }
139
+ if (par.length) lus.push({ composant: exterieur(c), par });
140
+ }
141
+ elements.push({ nom, fournisseur: exterieur(p), lecteurs: lus });
142
+ }
143
+ }
144
+ const parInterne = new Map(tous.map(i => [i.c, i]));
145
+ const types = parLesTypes(racine, tous, elementsEcrits(texte), {
146
+ fichiers: new Set(
147
+ [...texte.matchAll(/[\w.-]+\.[cm]?[jt]sx?\b/g)].map(m => path.basename(m[0]))
148
+ ),
149
+ composants: new Set(nommes.map(c => parInterne.get(c))),
150
+ });
151
+ const resolus = new Set(types.elements.map(e => e.ecrit));
152
+ let sources = null;
153
+ const lit = new Map(composants.map(c => [c, new Set()]));
154
+ for (const p of tous) {
155
+ for (const nomLecteur of reel.get(p.nom)?.keys() ?? []) {
156
+ for (const c of tous) if (c.nom === nomLecteur) lit.get(c.c).add(p.c);
157
+ }
158
+ }
159
+ for (const e of elements) for (const l of e.lecteurs) lit.get(l.composant).add(e.fournisseur);
160
+ return {
161
+ elements,
162
+ sansFournisseur: sansFournisseur.filter(
163
+ n =>
164
+ !resolus.has(n) &&
165
+ (existsSync(path.join(racine, n)) ||
166
+ (sources ??= sourcesDe(tous)).some(s => DECLARATION_EN_TETE(n).test(s)))
167
+ ),
168
+ types: {
169
+ etat: types.etat,
170
+ raison: types.raison,
171
+ elements: types.elements.map(e => ({
172
+ nom: e.nom,
173
+ declarations: e.declarations.map(d => ({ composant: exterieur(d.c), publie: d.publie })),
174
+ lecteurs: new Map([...e.lecteurs].map(([c, par]) => [exterieur(c), par])),
175
+ })),
176
+ },
177
+ lit,
178
+ };
179
+ }
@@ -2,13 +2,13 @@
2
2
  // (and `/mesure`), in place of the workspace package `@grillhouse/vitest-config` that the frame's
3
3
  // copied files held.
4
4
  //
5
- // - Each source file of the project (scripts/sources.mjs) that names
5
+ // - A migration of the module typescript (../index.mjs), which a project of TypeScript plays.
6
+ // - Each source file of the project (`sources` of the core) that names
6
7
  // `@grillhouse/vitest-config` or `@grillhouse/vitest-config/mesure` in quotes names the package's
7
8
  // instead; a root configuration that imports the base by its former path
8
9
  // (`./scripts/vitest-config/base.mjs`, `./packages/grillhouse/scripts/vitest-config/base.mjs`)
9
- // imports it by its name. `formesAnterieures` gives back what a text so rewritten held before,
10
- // by which the migration of the copies (0.23.2-copies-du-cadre.mjs) still knows a former copy of
11
- // the frame by its fingerprint.
10
+ // imports it by its name. The migration of the copies (scripts/migrations/0.23.2-copies-du-cadre.mjs)
11
+ // still knows a former copy of the frame so rewritten by its fingerprint.
12
12
  // - Each package.json of the project (the root's and each workspace's) that declares
13
13
  // `@grillhouse/vitest-config` declares `@roomi-fields/grillhouse` in the same field in its place,
14
14
  // at the range the root declares (else `^<version>` of the package), unless it already declares
@@ -16,10 +16,15 @@
16
16
  // `packages/grillhouse/scripts/vitest-config`).
17
17
  // - A project already in the new form is not written.
18
18
  import { existsSync, readFileSync, writeFileSync } from 'node:fs';
19
+ import { createRequire } from 'node:module';
19
20
  import path from 'node:path';
20
- import { VERSION } from '../cadre.mjs';
21
- import { paquets } from '../paquets.mjs';
22
- import { sources } from '../sources.mjs';
21
+ import { paquets } from '../../../paquets.mjs';
22
+ import { sources } from '../../../services-du-noyau.mjs';
23
+
24
+ // The version of the frame's package, read by its published entry `./package.json` when the
25
+ // migration plays: the module loads where the package is not resolved by its name.
26
+ const versionDuCadre = () =>
27
+ createRequire(import.meta.url)('@roomi-fields/grillhouse/package.json').version;
23
28
 
24
29
  export const version = '0.23.0';
25
30
  export const nom = 'configuration de base de Vitest';
@@ -33,30 +38,9 @@ const CHAMPS = ['dependencies', 'devDependencies', 'optionalDependencies', 'peer
33
38
  const NOMME =
34
39
  /(['"])(?:@grillhouse\/vitest-config(\/mesure)?|\.\/(?:packages\/grillhouse\/)?scripts\/vitest-config\/base\.mjs)\1/g;
35
40
 
36
- // A quoted name of the package's base, as this migration writes it.
37
- const ECRIT = /(['"])@roomi-fields\/grillhouse\/vitest-config(\/mesure)?\1/g;
38
- const ANCIENS_CHEMINS = [
39
- './scripts/vitest-config/base.mjs',
40
- './packages/grillhouse/scripts/vitest-config/base.mjs',
41
- ];
42
-
43
41
  const lireJson = f => JSON.parse(readFileSync(f, 'utf8'));
44
42
  const ecrireJson = (f, v) => writeFileSync(f, `${JSON.stringify(v, null, 2)}\n`);
45
43
 
46
- /**
47
- * The texts <texte> may have held before this migration rewrote it: each name it wrote back to the
48
- * former package's, or each name of the base back to one former path; none when it wrote nothing.
49
- */
50
- export function formesAnterieures(texte) {
51
- if (texte.search(ECRIT) < 0) return [];
52
- return [
53
- texte.replace(ECRIT, (_, q, mesure) => `${q}${ANCIEN}${mesure ?? ''}${q}`),
54
- ...ANCIENS_CHEMINS.map(c =>
55
- texte.replace(ECRIT, (tout, q, mesure) => (mesure ? tout : `${q}${c}${q}`))
56
- ),
57
- ];
58
- }
59
-
60
44
  /** Brings the project to the package's base configuration of Vitest; returns what it did. */
61
45
  export function migrer(projet) {
62
46
  const lignes = [];
@@ -71,7 +55,8 @@ export function migrer(projet) {
71
55
  const fracine = path.join(projet, 'package.json');
72
56
  if (!existsSync(fracine)) return lignes;
73
57
  const racine = lireJson(fracine);
74
- const plage = CHAMPS.map(c => racine[c]?.[PAQUET]).find(v => v !== undefined) ?? `^${VERSION}`;
58
+ const plage =
59
+ CHAMPS.map(c => racine[c]?.[PAQUET]).find(v => v !== undefined) ?? `^${versionDuCadre()}`;
75
60
  const declarer = pkg => {
76
61
  let change = false;
77
62
  for (const c of CHAMPS) {
@@ -1,5 +1,5 @@
1
1
  // From 0.24.4 the guard of the consumers refuses a declared name that no code of its consumer uses
2
- // (`declare-non-utilise`, scripts/consommateurs.mjs), which it only reported before, as ESLint's
2
+ // (`declare-non-utilise`, scripts/langages/typescript/consommateurs.mjs), which it only reported before, as ESLint's
3
3
  // `no-unused-vars` refuses a name nothing uses. A project that updates holds such names already
4
4
  // (BPScript: 26 names on 11 lines of 4 interfaces), and its main would turn red at its next pass
5
5
  // without a word. As a codemod reports what it leaves, the update names them, and the command that
@@ -14,7 +14,7 @@
14
14
  // (`juger` of dette.mjs), its interface, its consumer and those names; then the line of the
15
15
  // command, `npm run grillhouse:dette:inscrire`. Nothing once the debt holds them, or once the
16
16
  // names are gone.
17
- import { juger, lire } from '../dette.mjs';
17
+ import { juger, lire } from '../../../dette.mjs';
18
18
  import { DECLARE_NON_UTILISE, verifier } from '../consommateurs.mjs';
19
19
 
20
20
  export const version = '0.24.4';
@@ -1,5 +1,5 @@
1
1
  // From 0.24.6 the guard of the consumers refuses a bullet of a `## Consommateurs` section that is
2
- // no list of names (`ligne-mal-formee`, scripts/consommateurs.mjs): one form only,
2
+ // no list of names (`ligne-mal-formee`, scripts/langages/typescript/consommateurs.mjs): one form only,
3
3
  // ``- `consommateur` : nom, nom``, each name a JavaScript identifier or `*`. Before, the text after
4
4
  // « : » was cut at its commas, and a bullet of prose gave « names » that are none, or was passed
5
5
  // over without « : » (BPScript 990-corpus/docs/INTERFACE.md:274-289, at 0.24.5). A project that updates may hold such lines, and its
@@ -15,7 +15,7 @@
15
15
  // interface and the bullet; then the line of the command,
16
16
  // `npm run grillhouse:dette:inscrire`. Nothing once the debt holds them, or once each line is a
17
17
  // list of names.
18
- import { juger, lire } from '../dette.mjs';
18
+ import { juger, lire } from '../../../dette.mjs';
19
19
  import { LIGNE_MAL_FORMEE, verifier } from '../consommateurs.mjs';
20
20
 
21
21
  export const version = '0.24.6';
@@ -1,5 +1,5 @@
1
1
  // From 0.24.7 the guard of the consumers reads the uses of a package of the shared test material in
2
- // the tests of its consumers (scripts/consommateurs.mjs, as knip counts test files as entries out
2
+ // the tests of its consumers (scripts/langages/typescript/consommateurs.mjs, as knip counts test files as entries out
3
3
  // of its `--production` mode): the material has only tests for readers, and every name declared
4
4
  // for it came out « declared, not used » (BPScript 990-corpus: 176 names, inscribed as debt at
5
5
  // 0.24.6). A test that imports a name of the material its interface does not declare is now
@@ -15,7 +15,7 @@
15
15
  // `grillhouse-dette.json` already inscribes (`juger` of dette.mjs), the guard's message; then the
16
16
  // line of the command, `npm run grillhouse:dette:inscrire`. Nothing once the debt holds them, or
17
17
  // once each name is declared.
18
- import { juger, lire } from '../dette.mjs';
18
+ import { juger, lire } from '../../../dette.mjs';
19
19
  import { verifier } from '../consommateurs.mjs';
20
20
 
21
21
  export const version = '0.24.7';
@@ -0,0 +1,27 @@
1
+ // From 0.25.0 the guard of the paths of the tests (scripts/langages/typescript/chemins-des-tests.mjs)
2
+ // refuses a test that names a module of its package by a path the frame cannot read, which a pass
3
+ // measured against the last green would not play when that module changes (2026-10-30: 11 in
4
+ // BPScript). As ESLint's `--suppress-all` does once at the passage of a rule, the update inscribes
5
+ // them as the project's known debt (scripts/dette.mjs), frozen: the count never rises, a new one
6
+ // is refused, and its verification does not change that day.
7
+ //
8
+ // - The migration writes the section of the guard in `grillhouse-dette.json` when the guard finds
9
+ // one and the file holds no section of it yet; the rest of the debt stays.
10
+ // - It rewrites no test of the project.
11
+ // - Replayable without effect: once the section is written, nothing.
12
+ import { FICHIER, lire, trancher } from '../../../dette.mjs';
13
+ import { GARDE, verifier } from '../chemins-des-tests.mjs';
14
+
15
+ export const version = '0.25.0';
16
+ export const nom = 'chemins des tests';
17
+
18
+ /** Inscribes the paths the tests of the project at <projet> name undeclared; what it did. */
19
+ export function migrer(projet) {
20
+ if (lire(projet)[GARDE]) return [];
21
+ const constats = verifier(projet);
22
+ if (constats.length === 0) return [];
23
+ trancher(projet, GARDE, constats, 'inscrire', {});
24
+ return [
25
+ `${FICHIER} : ${constats.length} chemin(s) qu'un test nomme sans que le cadre le lise, inscrit(s) dans la dette de ${GARDE}, gelée ; un neuf est refusé, et chaque test écrit le chemin entier`,
26
+ ];
27
+ }
@@ -0,0 +1,31 @@
1
+ // From 0.25.0 the guard of the sizes of the tests (scripts/langages/typescript/tailles-des-tests.mjs) refuses a large
2
+ // test of the day, one that mounts a trial repository and starts the product or the frame there,
3
+ // as the test pyramid of Google keeps the large tests out of the day. A project that updates holds
4
+ // such tests already (2026-10-29: Grillhouse 70 of its 170 test files, BPScript 7 of its 1 079,
5
+ // all of 995-tools), and its main would turn
6
+ // red at its next pass. As ESLint's `--suppress-all` does once at the passage of a rule, the update
7
+ // inscribes them as the project's known debt (scripts/dette.mjs), frozen: the count never rises,
8
+ // a new large test of the day is refused, and its verification does not change that day.
9
+ //
10
+ // - The migration writes the section of the guard in `grillhouse-dette.json` when the guard finds a
11
+ // large test of the day and the file holds no section of it yet; the rest of the debt stays.
12
+ // - It rewrites no test of the project: the project moves each one to the night (`*.nuit.test.*`)
13
+ // or reduces it, and the debt comes down with it.
14
+ // - Replayable without effect: once the section is written, nothing (a debt lowered since never
15
+ // rises again).
16
+ import { FICHIER, lire, trancher } from '../../../dette.mjs';
17
+ import { GARDE, verifier } from '../tailles-des-tests.mjs';
18
+
19
+ export const version = '0.25.0';
20
+ export const nom = 'tailles des tests';
21
+
22
+ /** Inscribes the large tests of the day of the project at <projet> in its debt; what it did. */
23
+ export function migrer(projet) {
24
+ if (lire(projet)[GARDE]) return [];
25
+ const constats = verifier(projet);
26
+ if (constats.length === 0) return [];
27
+ trancher(projet, GARDE, constats, 'inscrire', {});
28
+ return [
29
+ `${FICHIER} : ${constats.length} grand(s) test(s) de jour inscrit(s) dans la dette de ${GARDE}, gelée ; un grand test de jour neuf est refusé, et chacun passe à la nuit (*.nuit.test.*) ou se réduit`,
30
+ ];
31
+ }