@roomi-fields/grillhouse 0.49.1 → 0.50.1
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +24 -0
- package/bin/grillhouse.mjs +2 -0
- package/cadre/templates/projet/CLAUDE.md +13 -96
- package/cadre/templates/projet/docs/agents/issue-tracker.md +5 -5
- package/charte.md +77 -96
- package/dist/temporal/acte.js +2 -1
- package/dist/temporal/acte.js.map +1 -1
- package/dist/temporal/circuit/activites.js +2 -1
- package/dist/temporal/circuit/activites.js.map +1 -1
- package/dist/temporal/circuit/appel.js +2 -2
- package/dist/temporal/circuit/appel.js.map +1 -1
- package/dist/temporal/circuit/client.d.ts +2 -4
- package/dist/temporal/circuit/client.js +5 -8
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +5 -4
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +3 -3
- package/dist/temporal/circuit/contrat.js +2 -2
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +4 -4
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/commande.js +1 -1
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/deroules.js +3 -4
- package/dist/temporal/deroules.js.map +1 -1
- package/dist/temporal/etat.js +1 -1
- package/dist/temporal/etat.js.map +1 -1
- package/dist/temporal/file/activites.js +2 -1
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/client.js.map +1 -1
- package/dist/temporal/file/contrat.js +3 -2
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.js +2 -1
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/installation.js +2 -0
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/nuits/activites.js +4 -3
- package/dist/temporal/nuits/activites.js.map +1 -1
- package/dist/temporal/nuits/appel.js +2 -1
- package/dist/temporal/nuits/appel.js.map +1 -1
- package/dist/temporal/nuits/choix.js +2 -1
- package/dist/temporal/nuits/choix.js.map +1 -1
- package/dist/temporal/nuits/client.js +2 -1
- package/dist/temporal/nuits/client.js.map +1 -1
- package/dist/temporal/nuits/commande.js +2 -1
- package/dist/temporal/nuits/commande.js.map +1 -1
- package/dist/temporal/nuits/contrat.js +2 -1
- package/dist/temporal/nuits/contrat.js.map +1 -1
- package/dist/temporal/nuits/deroule.js +2 -1
- package/dist/temporal/nuits/deroule.js.map +1 -1
- package/dist/temporal/places/activites.js +2 -1
- package/dist/temporal/places/activites.js.map +1 -1
- package/dist/temporal/places/client.js +1 -0
- package/dist/temporal/places/client.js.map +1 -1
- package/dist/temporal/places/deroule.js +4 -5
- package/dist/temporal/places/deroule.js.map +1 -1
- package/dist/temporal/tickets/activites.js +1 -1
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/deroule.js +4 -4
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/docs/ARCHITECTURE.md +3 -3
- package/docs/CADRE.md +10 -68
- package/docs/INTERFACE.md +59 -179
- package/docs/architecture/circuit.md +440 -0
- package/docs/architecture/entree.md +281 -0
- package/docs/architecture/greffon.md +284 -0
- package/docs/architecture/installation.md +306 -0
- package/docs/architecture/machine.md +383 -0
- package/docs/architecture/tests.md +337 -0
- package/hooks/crochet.mjs +3 -1
- package/package.json +1 -1
- package/scripts/abi-des-dependances.mjs +2 -1
- package/scripts/activites.mjs +8 -8
- package/scripts/aiguillage.mjs +4 -4
- package/scripts/arbitrages.mjs +1 -1
- package/scripts/arbres-juges.mjs +2 -1
- package/scripts/attente-a-l-arret.mjs +7 -8
- package/scripts/attente-au-tour.mjs +2 -2
- package/scripts/attente-de-la-machine.mjs +10 -16
- package/scripts/avancement.mjs +2 -0
- package/scripts/base-des-workflows.mjs +2 -1
- package/scripts/bilan.mjs +39 -61
- package/scripts/binaires.mjs +2 -1
- package/scripts/branche-de-nuit.mjs +2 -1
- package/scripts/cadre.mjs +37 -9
- package/scripts/ci-de-main.mjs +2 -1
- package/scripts/circuit.mjs +101 -618
- package/scripts/circuits-cles.mjs +4 -6
- package/scripts/circuits-du-serveur.mjs +1 -1
- package/scripts/codes-de-sortie.mjs +1 -1
- package/scripts/coeurs-dedies.mjs +2 -4
- package/scripts/commande-du-langage.mjs +2 -0
- package/scripts/commandes-composees.mjs +3 -3
- package/scripts/commandes-du-path.mjs +1 -1
- package/scripts/composants-affectes.mjs +3 -1
- package/scripts/composition-des-langages.mjs +2 -0
- package/scripts/conformite.d.ts +2 -1
- package/scripts/conformite.mjs +2 -0
- package/scripts/consommation-des-passes.mjs +5 -4
- package/scripts/consommation.mjs +1 -0
- package/scripts/copies-finies.mjs +9 -10
- package/scripts/crochet.mjs +1 -0
- package/scripts/crochets.mjs +2 -1
- package/scripts/depart-du-ticket.mjs +2 -2
- package/scripts/dependances-internes.mjs +4 -2
- package/scripts/dernier-vert.mjs +3 -3
- package/scripts/dette.d.ts +2 -1
- package/scripts/dette.mjs +2 -0
- package/scripts/direct.mjs +66 -6
- package/scripts/disque-des-copies.mjs +1 -1
- package/scripts/donnees-cles.mjs +2 -0
- package/scripts/droits.mjs +18 -13
- package/scripts/echantillonneur-de-la-passe.mjs +1 -1
- package/scripts/effets.mjs +3 -3
- package/scripts/engendres.mjs +1 -1
- package/scripts/enveloppe/codes.mjs +1 -0
- package/scripts/enveloppe/enveloppe.mjs +61 -84
- package/scripts/enveloppe/lancer.sh +5 -3
- package/scripts/enveloppe/paquets-du-plan.mjs +4 -6
- package/scripts/enveloppe/travail-de-la-copie.mjs +17 -17
- package/scripts/etapes.mjs +10 -9
- package/scripts/etat-du-depot.mjs +2 -1
- package/scripts/faits-du-circuit.mjs +19 -19
- package/scripts/fermeture-de-la-machine.mjs +2 -2
- package/scripts/fichier-du-poste.mjs +3 -4
- package/scripts/fichiers-nommes.mjs +2 -1
- package/scripts/file-des-tickets.mjs +3 -1
- package/scripts/flux-de-la-nuit.mjs +2 -1
- package/scripts/flux-des-paquets.mjs +2 -1
- package/scripts/fusion-du-changelog.mjs +2 -1
- package/scripts/garde-de-la-memoire.mjs +1 -1
- package/scripts/gardes-du-cadre.mjs +2 -0
- package/scripts/greffons.mjs +2 -2
- package/scripts/grillhouse-maj.mjs +55 -150
- package/scripts/groupe-cles.mjs +2 -1
- package/scripts/index-interfaces.mjs +2 -0
- package/scripts/init.mjs +2 -1
- package/scripts/integration/file.mjs +3 -3
- package/scripts/integration/integrer.mjs +5 -6
- package/scripts/integration/rejeu.mjs +4 -2
- package/scripts/integration/verdict.mjs +2 -1
- package/scripts/jointure.d.ts +2 -1
- package/scripts/journal-des-etats.mjs +2 -2
- package/scripts/langages/cargo/binaires.mjs +3 -2
- package/scripts/langages/cargo/clippy.mjs +2 -0
- package/scripts/langages/cargo/commandes.mjs +72 -17
- package/scripts/langages/cargo/composants.mjs +4 -3
- package/scripts/langages/cargo/elements-du-lot.mjs +2 -0
- package/scripts/langages/cargo/etiquettes.mjs +87 -0
- package/scripts/langages/cargo/executables-de-tests.mjs +3 -1
- package/scripts/langages/cargo/exemples.mjs +6 -4
- package/scripts/langages/cargo/frontieres.mjs +2 -0
- package/scripts/langages/cargo/index-interfaces.mjs +2 -0
- package/scripts/langages/cargo/index.mjs +8 -9
- package/scripts/langages/cargo/migrations/0.28.4-tailles-des-tests.mjs +8 -8
- package/scripts/langages/cargo/migrations/0.34.0-executables-de-tests.mjs +7 -8
- package/scripts/langages/cargo/mise-a-jour.mjs +6 -3
- package/scripts/langages/cargo/sccache.mjs +10 -6
- package/scripts/langages/cargo/squelette.mjs +2 -0
- package/scripts/langages/cargo/tailles-des-tests.mjs +2 -0
- package/scripts/langages/cargo/verdict.mjs +8 -6
- package/scripts/langages/typescript/chemins-des-tests.mjs +2 -1
- package/scripts/langages/typescript/code-mort.mjs +2 -1
- package/scripts/langages/typescript/composants.mjs +7 -5
- package/scripts/langages/typescript/consommateurs-arbitres.mjs +2 -1
- package/scripts/langages/typescript/consommateurs.d.ts +2 -1
- package/scripts/langages/typescript/consommateurs.mjs +5 -7
- package/scripts/langages/typescript/construire.mjs +2 -1
- package/scripts/langages/typescript/elements-du-lot.mjs +2 -1
- package/scripts/langages/typescript/exemples.mjs +2 -1
- package/scripts/langages/typescript/frontieres.mjs +3 -2
- package/scripts/langages/typescript/index-interfaces.mjs +3 -2
- package/scripts/langages/typescript/index.mjs +3 -2
- package/scripts/langages/typescript/interfaces-contre-code.mjs +2 -1
- package/scripts/langages/typescript/lecteurs.mjs +2 -1
- package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +5 -6
- package/scripts/langages/typescript/migrations/0.24.4-noms-declares-inutilises.mjs +4 -8
- package/scripts/langages/typescript/migrations/0.24.6-lignes-mal-formees.mjs +5 -9
- package/scripts/langages/typescript/migrations/0.24.7-matiere-dans-les-tests.mjs +6 -10
- package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +5 -6
- package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -8
- package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +5 -4
- package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +7 -7
- package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +5 -6
- package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +6 -6
- package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +5 -5
- package/scripts/langages/typescript/migrations/0.34.1-cache-des-outils.mjs +4 -4
- package/scripts/langages/typescript/migrations/0.49.0-tests-equipes.mjs +7 -7
- package/scripts/langages/typescript/mise-a-jour.mjs +5 -5
- package/scripts/langages/typescript/module-absent.mjs +2 -1
- package/scripts/langages/typescript/parcours.mjs +2 -1
- package/scripts/langages/typescript/references-par-les-types.mjs +2 -1
- package/scripts/langages/typescript/regle-des-tests.mjs +2 -1
- package/scripts/langages/typescript/resume-du-lanceur.mjs +1 -1
- package/scripts/langages/typescript/resumes.mjs +2 -1
- package/scripts/langages/typescript/squelette.mjs +2 -1
- package/scripts/langages/typescript/tailles-des-tests.mjs +5 -4
- package/scripts/langages/typescript/tests-de-nuit.mjs +5 -4
- package/scripts/langages/typescript/tests-du-poste.mjs +2 -1
- package/scripts/langages/typescript/tests.mjs +44 -66
- package/scripts/langages/typescript/titres-de-tests.mjs +2 -2
- package/scripts/langages/typescript/tranches.mjs +2 -1
- package/scripts/langages/typescript/turbo-des-paquets.mjs +87 -148
- package/scripts/langages/typescript/verdict.mjs +2 -1
- package/scripts/langages/typescript/verifier.mjs +64 -99
- package/scripts/langages/typescript/verrou-des-dependances.mjs +2 -1
- package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/base.mjs +5 -5
- package/scripts/langages/typescript/vitest-config/bornes.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/changements.mjs +6 -10
- package/scripts/langages/typescript/vitest-config/cibles.mjs +3 -3
- package/scripts/langages/typescript/vitest-config/delais.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/delais.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/duree.classement.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +4 -3
- package/scripts/langages/typescript/vitest-config/lances.mjs +3 -2
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/mesure.mjs +1 -1
- package/scripts/langages/typescript/vitest-config/mesure.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/registre.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest-config/resultats.mjs +2 -1
- package/scripts/langages/typescript/vitest-config/resultats.setup.mjs +1 -0
- package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
- package/scripts/langages-des-paquets.mjs +3 -1
- package/scripts/langages.mjs +5 -3
- package/scripts/lecture-unique.mjs +2 -1
- package/scripts/ligne-etat/defaut.sh +2 -1
- package/scripts/ligne-etat/ligne-etat.mjs +1 -0
- package/scripts/lint-des-scripts.mjs +1 -0
- package/scripts/machine.mjs +4 -4
- package/scripts/matiere-de-test.d.ts +2 -1
- package/scripts/matieres-lues.mjs +2 -0
- package/scripts/messages-non-lus.mjs +2 -4
- package/scripts/mesure/avancement.mjs +1 -1
- package/scripts/mesure/base-de-passe.mjs +10 -13
- package/scripts/mesure/pression.mjs +3 -4
- package/scripts/mesure-de-la-machine.mjs +2 -1
- package/scripts/migrations/0.23.0-charte-importee.mjs +7 -13
- package/scripts/migrations/0.23.0-crochets-de-seance.mjs +6 -8
- package/scripts/migrations/0.23.0-marche-du-projet.mjs +8 -12
- package/scripts/migrations/0.23.2-copies-du-cadre.mjs +9 -32
- package/scripts/migrations/0.24.0-circuit-simplifie.mjs +11 -39
- package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -9
- package/scripts/migrations/0.24.2-api-extractor-du-paquet.mjs +8 -19
- package/scripts/migrations/0.25.0-script-des-tests.mjs +7 -13
- package/scripts/migrations/0.27.0-langages-dans-l-architecture.mjs +9 -23
- package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +7 -9
- package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -18
- package/scripts/migrations/0.33.0-cache-distant.mjs +6 -9
- package/scripts/migrations/0.33.0-ci-du-cadre.mjs +5 -8
- package/scripts/migrations/0.33.0-node-26.mjs +5 -8
- package/scripts/migrations/0.35.0-greffon-mattpocock-retire.mjs +5 -10
- package/scripts/migrations/0.44.0-node-26-seul.mjs +6 -9
- package/scripts/migrations/0.44.0-seuil-des-codes-de-tickets.mjs +6 -7
- package/scripts/migrations/0.47.0-ci-de-main.mjs +6 -7
- package/scripts/migrations/0.48.0-ci-declenchee-par-la-file.mjs +6 -6
- package/scripts/migrations/0.48.0-poussee-retiree.mjs +3 -5
- package/scripts/migrations/0.49.0-reservation-de-trois-coeurs.mjs +3 -4
- package/scripts/migrations/0.50.0-reglages-hors-de-la-charte.mjs +81 -0
- package/scripts/migrations-des-gardes.mjs +2 -0
- package/scripts/migrations.mjs +4 -0
- package/scripts/newday.mjs +2 -2
- package/scripts/nuit.sh +7 -5
- package/scripts/outil.mjs +2 -1
- package/scripts/outils-cles.mjs +6 -6
- package/scripts/paquet-npm.mjs +3 -2
- package/scripts/paquet.mjs +3 -4
- package/scripts/paquets.d.ts +1 -1
- package/scripts/paquets.mjs +2 -0
- package/scripts/passe-de-la-machine.mjs +9 -12
- package/scripts/places-de-la-machine.mjs +36 -53
- package/scripts/places-du-serveur.mjs +5 -4
- package/scripts/plafond-de-la-machine.mjs +19 -19
- package/scripts/poussee-retiree.mjs +2 -1
- package/scripts/prefixe-des-tickets.mjs +1 -0
- package/scripts/preparation.mjs +2 -1
- package/scripts/recommencer.mjs +2 -2
- package/scripts/references-changees.mjs +1 -1
- package/scripts/registre-des-resultats.mjs +3 -1
- package/scripts/registre.mjs +14 -16
- package/scripts/regles-des-places.mjs +4 -6
- package/scripts/repli-de-la-nuit.mjs +2 -1
- package/scripts/reponses-du-circuit.mjs +4 -3
- package/scripts/reprise.mjs +3 -2
- package/scripts/resultats.mjs +71 -93
- package/scripts/retirer-copie.sh +2 -1
- package/scripts/retirer-les-copies-finies.mjs +2 -1
- package/scripts/seances.mjs +3 -2
- package/scripts/services-du-noyau.mjs +2 -0
- package/scripts/session-start.sh +33 -52
- package/scripts/sigle-du-projet.mjs +1 -2
- package/scripts/sortie.mjs +2 -1
- package/scripts/sources.mjs +2 -0
- package/scripts/sous-commandes.mjs +2 -1
- package/scripts/sous-modules.sh +24 -43
- package/scripts/structure-guard.sh +2 -1
- package/scripts/style-a-l-ecriture.mjs +2 -0
- package/scripts/suiveur.mjs +1 -1
- package/scripts/superviseur.mjs +36 -55
- package/scripts/tableau-des-composants.mjs +5 -7
- package/scripts/tableau.mjs +78 -121
- package/scripts/taches-du-graphe.mjs +3 -0
- package/scripts/ticket-du-circuit.mjs +1 -1
- package/scripts/transitions.mjs +15 -15
- package/scripts/un-commit-par-ticket.mjs +2 -1
- package/scripts/verdict-de-la-nuit.mjs +2 -1
- package/scripts/verrou-de-fichier.mjs +1 -0
- package/scripts/verrous/commande.mjs +2 -1
- package/scripts/verrous/ecriture-hors-enveloppe.mjs +1 -0
- package/scripts/verrous/ticket-du-sous-agent.mjs +1 -0
- package/scripts/verrous/verrou.mjs +3 -3
- package/scripts/workflows-du-cadre.mjs +2 -1
- package/skills/developpeur/SKILL.md +6 -10
- package/skills/explorateur/SKILL.md +1 -1
- package/skills/grill/SKILL.md +4 -5
- package/skills/grill/references/paquets.md +5 -8
- package/skills/pitmaster/SKILL.md +176 -268
- package/skills/pitmaster/references/cadre.md +7 -6
- package/skills/pitmaster/references/consigne-agent.md +36 -32
- package/skills/pitmaster/references/tour.md +2 -2
- package/skills/redacteur/references/documents-d-un-composant.md +9 -8
- package/skills/testwriter/SKILL.md +8 -11
- package/types/index.d.ts +3 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// The tags of the night tests of a crate, read as the module typescript reads them
|
|
2
|
+
// (the one rule of every language, ../typescript/vitest-config/cibles.mjs): `// @poste: <reason>`
|
|
3
|
+
// and `// @equipee: <reason>` in the comment at the head of a test file. In a crate, a night test
|
|
4
|
+
// is the target `tests/<nom>_nuit.rs` (the tag is read in that file) or a module of the target
|
|
5
|
+
// `tests/<nom>_nuit/main.rs` (the tag is read in the module's file, `tests/<nom>_nuit/<module>.rs`).
|
|
6
|
+
// `tests-de-nuit --hors-du-poste` leaves out the tagged `@poste`, with `--sans-equipement` the
|
|
7
|
+
// tagged `@equipee` too (./commandes.mjs).
|
|
8
|
+
import { readdirSync, readFileSync } from 'node:fs';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
|
|
11
|
+
// Whether the text <texte> bears the line `// <etiquette>` in the comment at its head, before its
|
|
12
|
+
// first line of code (the rule of ../typescript/vitest-config/cibles.mjs, which a module of
|
|
13
|
+
// language cannot import).
|
|
14
|
+
function porteLEtiquette(texte, etiquette) {
|
|
15
|
+
const re = new RegExp(`^//\\s*${etiquette}\\b`);
|
|
16
|
+
for (const ligne of texte.split('\n')) {
|
|
17
|
+
const l = ligne.trim();
|
|
18
|
+
if (re.test(l)) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
if (l !== '' && !l.startsWith('//')) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Whether the text <texte> of a test file bears a tag the night <nuit> leaves out:
|
|
30
|
+
* `{ horsDuPoste, sansEquipement }`.
|
|
31
|
+
* @param {string} texte
|
|
32
|
+
* @param {{ horsDuPoste?: boolean, sansEquipement?: boolean }} [nuit]
|
|
33
|
+
*/
|
|
34
|
+
export function ecarteeDeLaNuit(texte, { horsDuPoste = false, sansEquipement = false } = {}) {
|
|
35
|
+
return (
|
|
36
|
+
(horsDuPoste && porteLEtiquette(texte, '@poste')) ||
|
|
37
|
+
(horsDuPoste && sansEquipement && porteLEtiquette(texte, '@equipee'))
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// The `.rs` files under <dossier>, absolute, in order.
|
|
42
|
+
function fichiersRs(dossier) {
|
|
43
|
+
return readdirSync(dossier, { withFileTypes: true })
|
|
44
|
+
.sort((a, b) => a.name.localeCompare(b.name))
|
|
45
|
+
.flatMap(e => {
|
|
46
|
+
const f = path.join(dossier, e.name);
|
|
47
|
+
if (e.isDirectory()) {
|
|
48
|
+
return fichiersRs(f);
|
|
49
|
+
}
|
|
50
|
+
return e.isFile() && e.name.endsWith('.rs') ? [f] : [];
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* What the night <nuit> leaves out of the test target at <src> (the file of its root): `null`
|
|
56
|
+
* when the whole target is left out (its root file bears the tag), else the module paths of its
|
|
57
|
+
* executable that are (`tests/it_nuit/foo.rs` → `foo`, `foo/mod.rs` → `foo`,
|
|
58
|
+
* `foo/sous.rs` → `foo::sous`), empty when none.
|
|
59
|
+
* @param {string} src
|
|
60
|
+
* @param {{ horsDuPoste?: boolean, sansEquipement?: boolean }} nuit
|
|
61
|
+
* @returns {string[] | null}
|
|
62
|
+
*/
|
|
63
|
+
export function ecartsDeLaCible(src, nuit) {
|
|
64
|
+
const ecartee = f => ecarteeDeLaNuit(readFileSync(f, 'utf8'), nuit);
|
|
65
|
+
if (ecartee(src)) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
if (path.basename(src) !== 'main.rs' || path.basename(path.dirname(src)) === 'tests') {
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
const dossier = path.dirname(src);
|
|
72
|
+
const modules = [];
|
|
73
|
+
for (const f of fichiersRs(dossier)) {
|
|
74
|
+
if (f === src || !ecartee(f)) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const parts = path.relative(dossier, f).split(path.sep);
|
|
78
|
+
parts[parts.length - 1] = parts[parts.length - 1].replace(/\.rs$/, '');
|
|
79
|
+
if (parts.at(-1) === 'mod') {
|
|
80
|
+
parts.pop();
|
|
81
|
+
}
|
|
82
|
+
if (parts.length) {
|
|
83
|
+
modules.push(parts.join('::'));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return modules;
|
|
87
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// One executable of integration tests per crate and per moment, on the model of Cargo's own
|
|
3
3
|
// testsuite (`tests/testsuite/main.rs`, each test file a module) and of matklad's « Delete Cargo
|
|
4
4
|
// Integration Tests »: each file of `tests/` is an executable cargo links apart, with every
|
|
5
|
-
// dependency
|
|
5
|
+
// dependency; one entry point links one.
|
|
6
6
|
//
|
|
7
7
|
// npx grillhouse executables-de-tests run from the repository root (a guard of grillhouse:gardes)
|
|
8
8
|
//
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
// (./migrations/0.34.0-executables-de-tests.mjs), the count never rises, and a new one is
|
|
22
22
|
// refused.
|
|
23
23
|
// - The guard writes on its error stream the count of the crates and of their executables.
|
|
24
|
+
//
|
|
25
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language), §3.4 (the guards).
|
|
24
26
|
import path from 'node:path';
|
|
25
27
|
import { pathToFileURL } from 'node:url';
|
|
26
28
|
import { MODE, trancher } from '../../dette.mjs';
|
|
@@ -8,17 +8,19 @@
|
|
|
8
8
|
// `ws-outil`, which depends on `ws-app` for its tests (`dev`) and on `ws-core` for its build
|
|
9
9
|
// script (`build`); `ws-matiere`, the shared test material (`[package.metadata.grillhouse]
|
|
10
10
|
// matiere = true`); the interfaces of `ws-core`, of `ws-app` and of the root, and the index of the
|
|
11
|
-
// interfaces they give, up to date
|
|
11
|
+
// interfaces they give, up to date. Committed: `espace`; the same with a second commit
|
|
12
12
|
// that changes `ws-core`, adds the crate `ws-neuf` and removes `ws-outil`: `lot`; the same, the
|
|
13
13
|
// interface of `ws-core` then changed, its index late: `enRetard`.
|
|
14
|
-
// - Each workspace commits its Cargo.lock, the one cargo writes
|
|
14
|
+
// - Each workspace commits its Cargo.lock, the one cargo writes: the commands
|
|
15
15
|
// tester, verifier and tests-de-nuit refuse a workspace whose Cargo.lock git does not track.
|
|
16
|
-
// - A crate at the root, its workspace `members = ["."]`, with its tests
|
|
16
|
+
// - A crate at the root, its workspace `members = ["."]`, with its tests: `seul`;
|
|
17
17
|
// a crate at the root holding a second crate, `crates/aide`, none with tests: `imbrique`.
|
|
18
18
|
// - A directory without Cargo.toml: `vide`.
|
|
19
19
|
// - Two results directories of a run: every task and test green (`vert`); `ws-core` at 75,
|
|
20
20
|
// `ws-app` red with a test of `integ` failed, `ws-outil` not played (`defaut`).
|
|
21
21
|
// - `depots`: the repositories, for the tests of the module beside the suite.
|
|
22
|
+
//
|
|
23
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language).
|
|
22
24
|
import { execFileSync } from 'node:child_process';
|
|
23
25
|
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
24
26
|
import path from 'node:path';
|
|
@@ -85,7 +87,7 @@ export const INDEX = [
|
|
|
85
87
|
|
|
86
88
|
// The Cargo.lock that cargo writes for the crates <paquets> (`[nom, [dépendance…]]`), each at
|
|
87
89
|
// 0.1.0, sorted by name, as `cargo generate-lockfile` writes it: every trial commits its own, as
|
|
88
|
-
// Cargo recommends for every project
|
|
90
|
+
// Cargo recommends for every project.
|
|
89
91
|
const verrou = paquets =>
|
|
90
92
|
[
|
|
91
93
|
'# This file is automatically @generated by Cargo.',
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
// the rule `dependance-non-permise`, a message naming both crates and the kind. The findings are
|
|
17
17
|
// judged by the debt (../../dette.mjs) and written in SARIF (../../resultats.mjs); cargo unable
|
|
18
18
|
// to answer refuses, named, never inscribed.
|
|
19
|
+
//
|
|
20
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language), §3.4 (the guards).
|
|
19
21
|
import path from 'node:path';
|
|
20
22
|
import { pathToFileURL } from 'node:url';
|
|
21
23
|
import { MODE, trancher } from '../../dette.mjs';
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
// root, as OSC Bridge), else `(racine) — <title>`.
|
|
20
20
|
// - No line per element: a crate's interface has no part generated from its code, which the
|
|
21
21
|
// index of the module typescript reads its elements from.
|
|
22
|
+
//
|
|
23
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language).
|
|
22
24
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
23
25
|
import path from 'node:path';
|
|
24
26
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
@@ -30,12 +30,13 @@
|
|
|
30
30
|
// (./frontieres.mjs), the index of the interfaces up to date, each a command by its name too
|
|
31
31
|
// (./commandes.mjs), which the line of a red guard names; the entries of the index of each
|
|
32
32
|
// interface (`entreesDeLIndex`), which the core assembles in a project of several languages.
|
|
33
|
-
// - Its migrations (./migrations/):
|
|
34
|
-
// in its debt when the guard of
|
|
35
|
-
// inscribed when the guard of the executables arrives.
|
|
33
|
+
// - Its migrations (./migrations/): the large tests of the day, then the executables of tests too
|
|
34
|
+
// many, a project holds are inscribed in its debt when the guard of each arrives.
|
|
36
35
|
// - Its share of the update (./mise-a-jour.mjs, `miseAJour`): the template of a project of cargo
|
|
37
36
|
// (`templates/cargo/`) and its test scripts.
|
|
38
37
|
// - The skeleton of a new crate (./squelette.mjs, `squelette`), which `grillhouse paquet` writes.
|
|
38
|
+
//
|
|
39
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language).
|
|
39
40
|
import { readFileSync } from 'node:fs';
|
|
40
41
|
import path from 'node:path';
|
|
41
42
|
import { fileURLToPath } from 'node:url';
|
|
@@ -67,7 +68,7 @@ const ici = nom => path.join(path.dirname(fileURLToPath(import.meta.url)), nom);
|
|
|
67
68
|
|
|
68
69
|
export default {
|
|
69
70
|
nom: 'cargo',
|
|
70
|
-
// The expected size of a copy before any is measured: its target
|
|
71
|
+
// The expected size of a copy before any is measured: its target/.
|
|
71
72
|
tailleDUneCopie: 8 * 1024 ** 3,
|
|
72
73
|
manifeste: 'Cargo.toml',
|
|
73
74
|
nomDuManifeste,
|
|
@@ -82,9 +83,8 @@ export default {
|
|
|
82
83
|
// The programs the installer of Temporal requires in the PATH of the workers: cargo's folder is
|
|
83
84
|
// also rustc's, nextest's and sccache's (rustup, `cargo install`).
|
|
84
85
|
executables: ['cargo'],
|
|
85
|
-
// The binaries the module runs, each at an exact version
|
|
86
|
-
//
|
|
87
|
-
// (./sccache.mjs), at the last release of mozilla/sccache, v0.19.0 (2026-10-24).
|
|
86
|
+
// The binaries the module runs, each at an exact version (nextest, cargo-deny, sccache, the
|
|
87
|
+
// cache of compilation common to the copies, ./sccache.mjs).
|
|
88
88
|
binaires: JSON.parse(readFileSync(ici('binaires.json'), 'utf8')),
|
|
89
89
|
// What cargo writes in a project: its target directory.
|
|
90
90
|
ignorer: ['target'],
|
|
@@ -95,8 +95,7 @@ export default {
|
|
|
95
95
|
// (./sccache.mjs), where a server of sccache the session starts writes; the targets of the
|
|
96
96
|
// workspaces rooted in the temporary directory, `~/.cache/grillhouse/cargo/` (./sccache.mjs). What it reads, read-only: its home, `~/.cargo`
|
|
97
97
|
// (its binaries, its `env`, which the shells source, and its configuration stay unwritten), and
|
|
98
|
-
// rustup's toolchains, `~/.rustup`.
|
|
99
|
-
// osc-bridge in bwrap with these mounts alone, green, the cache of its packages written.
|
|
98
|
+
// rustup's toolchains, `~/.rustup`.
|
|
100
99
|
sorties: {
|
|
101
100
|
ecrites: [
|
|
102
101
|
'target/',
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// project's known debt (scripts/dette.mjs), frozen: the count never rises, a new large test of the
|
|
8
|
-
// day is refused, and its verification does not change that day.
|
|
1
|
+
// The migration of the guard of the sizes of the tests in Rust (../tailles-des-tests.mjs): the
|
|
2
|
+
// large tests of the day a project of cargo holds when the guard arrives are inscribed as the
|
|
3
|
+
// project's known debt (scripts/dette.mjs), frozen, as ESLint's `--suppress-all` does at the
|
|
4
|
+
// passage of a rule and as the module typescript's migration does
|
|
5
|
+
// (../../typescript/migrations/0.25.0-tailles-des-tests.mjs): the count never rises, a new large
|
|
6
|
+
// test of the day is refused.
|
|
9
7
|
//
|
|
10
8
|
// - The migration writes the section of the guard in `grillhouse-dette.json` when the guard finds a
|
|
11
9
|
// large test of the day and the file holds no section of it yet; the rest of the debt stays.
|
|
@@ -13,6 +11,8 @@
|
|
|
13
11
|
// (a module of `tests/it_nuit/`) or reduces it, and the debt comes down with it.
|
|
14
12
|
// - Replayable without effect: once the section is written, nothing (a debt lowered since never
|
|
15
13
|
// rises again).
|
|
14
|
+
//
|
|
15
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language), §3.4 (the guards).
|
|
16
16
|
import { FICHIER, lire, trancher } from '../../../dette.mjs';
|
|
17
17
|
import { GARDE, verifier } from '../tailles-des-tests.mjs';
|
|
18
18
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// benches)
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// passage of a rule, the update inscribes them as the project's known debt (scripts/dette.mjs),
|
|
7
|
-
// frozen: the count never rises, a new executable is refused, and its verification does not change
|
|
8
|
-
// that day.
|
|
1
|
+
// The migration of the guard of the executables of tests in Rust (../executables-de-tests.mjs):
|
|
2
|
+
// the crates with more than one executable of integration tests of a moment (the day, the night,
|
|
3
|
+
// the benches) a project of cargo holds when the guard arrives are inscribed as the project's
|
|
4
|
+
// known debt (scripts/dette.mjs), frozen, as the migration of the sizes
|
|
5
|
+
// (./0.28.4-tailles-des-tests.mjs) does: the count never rises, a new executable is refused.
|
|
9
6
|
//
|
|
10
7
|
// - The migration writes the section of the guard in `grillhouse-dette.json` when the guard finds
|
|
11
8
|
// an executable too many and the file holds no section of it yet; the rest of the debt stays.
|
|
@@ -13,6 +10,8 @@
|
|
|
13
10
|
// (`tests/it_nuit/`, `tests/it_budget/`), and the debt comes down with it.
|
|
14
11
|
// - Replayable without effect: once the section is written, nothing (a debt lowered since never
|
|
15
12
|
// rises again).
|
|
13
|
+
//
|
|
14
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language), §3.4 (the guards).
|
|
16
15
|
import { FICHIER, lire, trancher } from '../../../dette.mjs';
|
|
17
16
|
import { GARDE, verifier } from '../executables-de-tests.mjs';
|
|
18
17
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// scripts, which run the frame's commands (`grillhouse tests`, `grillhouse verifier`), and no
|
|
8
8
|
// tool of npm.
|
|
9
9
|
// - Each other file of the template a project lacks is copied at its path: `deny.toml`, the
|
|
10
|
-
// policy of cargo-deny, which refuses every licence without one (cargo-deny's code 4
|
|
11
|
-
//
|
|
10
|
+
// policy of cargo-deny, which refuses every licence without one (cargo-deny's code 4);
|
|
11
|
+
// `.config/nextest.toml`, the project's configuration of nextest, which
|
|
12
12
|
// leaves the frame's profile `grillhouse` to the frame (./nextest.toml); `rust-toolchain.toml`,
|
|
13
13
|
// the toolchain and its components clippy and rustfmt, which the guards run. A file the project
|
|
14
14
|
// holds is its own: never written again.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// - The root scripts `test`, `test:forcer` and `verifier` a project lacks become the template's:
|
|
18
18
|
// the agents run `npm test`, the integration and the night `npm run verifier`. A project's own
|
|
19
19
|
// script stays.
|
|
20
|
-
// - A Cargo.lock that git does not track is left to the project (`aFaire
|
|
20
|
+
// - A Cargo.lock that git does not track is left to the project (`aFaire`): the
|
|
21
21
|
// line of ./commandes.mjs (`verrouNonVersionne`), the gesture named; the core writes it on the
|
|
22
22
|
// error stream and plays no verification, which `--locked` would fail in a copy taken from git.
|
|
23
23
|
// - The generator: the index of the interfaces (./index-interfaces.mjs), run where the project
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
// - The installation of its binaries (./binaires.json): the commands of ./binaires.mjs, which list
|
|
26
26
|
// what cargo installed and install one binary by cargo-binstall, installed first when it lacks;
|
|
27
27
|
// the core runs them.
|
|
28
|
+
//
|
|
29
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language);
|
|
30
|
+
// installation.md §5.2 (the update of a project) and §4.4 (what the frame writes in a project).
|
|
28
31
|
import { copyFileSync, existsSync, mkdirSync, readdirSync } from 'node:fs';
|
|
29
32
|
import path from 'node:path';
|
|
30
33
|
import { fileURLToPath } from 'node:url';
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
// (`cibleDeCompilation`).
|
|
13
13
|
// - Cargo compiles without incremental compilation (`CARGO_INCREMENTAL=0`), as the CI of Rust and
|
|
14
14
|
// the usual continuous integrations do: a copy of a ticket compiles once and seldom again, and
|
|
15
|
-
// its `target/debug/incremental`
|
|
16
|
-
//
|
|
15
|
+
// its `target/debug/incremental` weighs on the disk; sccache caches no incremental compilation
|
|
16
|
+
// either. Whoever decides it keeps
|
|
17
17
|
// it, as cargo reads it, which lets each of them override every profile: the caller, by
|
|
18
18
|
// `CARGO_INCREMENTAL` (an agent or a person who debugs, `CARGO_INCREMENTAL=1`),
|
|
19
19
|
// `CARGO_BUILD_INCREMENTAL` or a `CARGO_PROFILE_<nom>_INCREMENTAL` of the environment; the
|
|
@@ -35,14 +35,13 @@
|
|
|
35
35
|
// read-only copy nor the 108 bytes of a socket's path bind it, and it goes with its server,
|
|
36
36
|
// leaving no stale file. A server cargo starts keeps the temporary directory of its run, where it
|
|
37
37
|
// writes as it compiles, and outlives it (its idle time): a pass, whose temporary directory goes
|
|
38
|
-
// at its end, never joins the server of another
|
|
39
|
-
// common.
|
|
38
|
+
// at its end, never joins the server of another. The disk cache stays common.
|
|
40
39
|
// - The server starts before each run of cargo that compiles, under the machine's `/tmp`
|
|
41
40
|
// (`demarrerLeServeur`): sccache 0.19.0 starts its server by binding a socket of a path under
|
|
42
41
|
// TMPDIR (`<TMPDIR>/sccacheXXXXXX/sock`, src/commands.rs, `run_server_process`), which fails
|
|
43
42
|
// past the 108 bytes of a socket's path (« path must be shorter than SUN_LEN »), and the
|
|
44
|
-
// temporary directory of a pass of tests under the working directory of a session passes them
|
|
45
|
-
//
|
|
43
|
+
// temporary directory of a pass of tests under the working directory of a session passes them.
|
|
44
|
+
// Cargo then finds the server running and starts none; it
|
|
46
45
|
// keeps its own temporary directory, the pass's.
|
|
47
46
|
// - A wrapper the project sets already is its own: the run keeps it, without sccache. It is read
|
|
48
47
|
// as cargo reads it: the environment (`RUSTC_WRAPPER`, `CARGO_BUILD_RUSTC_WRAPPER`), then
|
|
@@ -51,6 +50,11 @@
|
|
|
51
50
|
// - A machine without sccache on the PATH of the command is refused before any run of cargo, in
|
|
52
51
|
// one line that names it and the command that installs it (`sccacheAbsent`), rather than on the
|
|
53
52
|
// error of cargo that cannot run its wrapper.
|
|
53
|
+
//
|
|
54
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language).
|
|
55
|
+
// Settings applied: the variables of the environment named above (`SCCACHE_DIR`,
|
|
56
|
+
// `CARGO_TARGET_DIR`, `CARGO_INCREMENTAL`, `RUSTC_WRAPPER`), none of the project's keys of
|
|
57
|
+
// installation.md §4.2 nor of the post's files of §4.3.
|
|
54
58
|
import { spawnSync } from 'node:child_process';
|
|
55
59
|
import { createHash } from 'node:crypto';
|
|
56
60
|
import { readFileSync, readlinkSync, realpathSync } from 'node:fs';
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
// root; code under `src/` without `src/lib.rs`), the folder is refused by its name, nothing
|
|
31
31
|
// written, the layout and what is missing named, in place of a skeleton beside the code.
|
|
32
32
|
// - The manifest is read with smol-toml, the tool of this module (`outils`), loaded at the call.
|
|
33
|
+
//
|
|
34
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language).
|
|
33
35
|
import { spawnSync } from 'node:child_process';
|
|
34
36
|
import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs';
|
|
35
37
|
import { createRequire } from 'node:module';
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
// when the rule arrives are inscribed there by the update
|
|
31
31
|
// (./migrations/0.28.4-tailles-des-tests.mjs), the count never rises, and a new one is refused.
|
|
32
32
|
// - The guard writes on its error stream the count of each size, the night's included.
|
|
33
|
+
//
|
|
34
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language), §3.4 (the guards).
|
|
33
35
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
34
36
|
import path from 'node:path';
|
|
35
37
|
import { pathToFileURL } from 'node:url';
|
|
@@ -10,18 +10,20 @@
|
|
|
10
10
|
// of the doctests; `journal`, from the root, the log of the task `build`, the build of a crate's
|
|
11
11
|
// test targets, which the circuit reads for a failed build), and the file of each test binary of nextest by its id (`ws-core`,
|
|
12
12
|
// `ws-core::integ`, `ws-core::bin/outil`), its target's source.
|
|
13
|
-
// - `echecDeCompilation` reads a task's log: whether a test target did not compile
|
|
13
|
+
// - `echecDeCompilation` reads a task's log: whether a test target did not compile,
|
|
14
14
|
// which the circuit reads as a failed build whatever the cargo task that bears it — the build of
|
|
15
|
-
// `cargo test --no-run
|
|
15
|
+
// `cargo test --no-run`, or the test task nextest, which bears the compiler's
|
|
16
16
|
// errors with no JUnit when a target does not compile.
|
|
17
17
|
// - `<dossier>/nextest/<run>-<crate>.xml`, the JUnit report of each run of nextest: each
|
|
18
18
|
// `testsuite`, a test binary, gives a test file, each `testcase` a test, failed when it holds a
|
|
19
19
|
// `failure` or an `error`, skipped when it holds `skipped`; its message, the failure's. A unit
|
|
20
20
|
// test of a module `tests` that lives in a file of its own (`server::tests::relais`, in
|
|
21
|
-
// `src/server/tests.rs` beside the library's root
|
|
21
|
+
// `src/server/tests.rs` beside the library's root) gives that file, so that the
|
|
22
22
|
// proof of the red finds the result of a new tests.rs; so does a test of a module of a target
|
|
23
|
-
// `tests/<dossier>/main.rs` (`foo::bar`, in `tests/it/foo.rs
|
|
23
|
+
// `tests/<dossier>/main.rs` (`foo::bar`, in `tests/it/foo.rs`), each test file
|
|
24
24
|
// of `tests/it/` a module of the crate's one executable.
|
|
25
|
+
//
|
|
26
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md §3.3 (the modules of language).
|
|
25
27
|
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
26
28
|
import path from 'node:path';
|
|
27
29
|
import { tachesDuVerdict } from '../../services-du-noyau.mjs';
|
|
@@ -160,7 +162,7 @@ export function verdict(dossier) {
|
|
|
160
162
|
// compile`). A test that compiled then failed at run time, or a binary that does not load, shows
|
|
161
163
|
// neither. The circuit reads a test target that does not compile as a failed build
|
|
162
164
|
// (`construction de <crate> », scripts/activites.mjs), whatever the cargo task that bears it: the
|
|
163
|
-
// build of `cargo test --no-run
|
|
164
|
-
// errors with no JUnit when a target does not compile
|
|
165
|
+
// build of `cargo test --no-run`, or the test task nextest, which bears the
|
|
166
|
+
// errors with no JUnit when a target does not compile.
|
|
165
167
|
export const echecDeCompilation = texte =>
|
|
166
168
|
/error\[E\d+\]/.test(texte) || /could not compile/.test(texte);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The paths the tests launch or read, on the model of Bazel's sandbox, which fails a test that
|
|
3
3
|
// reads an input its target does not declare: a test's run that the frame cannot relate to a
|
|
4
|
-
// changed file would keep a stale green, so the guard refuses the path the frame cannot read
|
|
4
|
+
// changed file would keep a stale green, so the guard refuses the path the frame cannot read: the
|
|
5
|
+
// guard `chemins-des-tests` (packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
5
6
|
//
|
|
6
7
|
// npx grillhouse chemins-des-tests run from the repository root (a guard of grillhouse:gardes)
|
|
7
8
|
//
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The dead-code guard: refuses a file, an export, a type or a dependency that nothing living
|
|
3
|
-
// uses, measured by knip (configured in the project's `knip.json`). Run by `grillhouse:gardes
|
|
3
|
+
// uses, measured by knip (configured in the project's `knip.json`). Run by `grillhouse:gardes`:
|
|
4
|
+
// the guard `code-mort` (packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
4
5
|
//
|
|
5
6
|
// - Each finding is named with its file; exit code 1 when there is one. A finding inscribed in the
|
|
6
7
|
// project's debt (`grillhouse-dette.json`, see `dette.mjs`) passes, keyed by its file and knip's
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The components of a repository of the module typescript and its packages of the shared test
|
|
2
|
-
// material: one reading, without a line `#!`, that ./consommateurs.mjs (the guard, which the entry
|
|
2
|
+
// material (packages/grillhouse/docs/architecture/tests.md §3.3): one reading, without a line `#!`, that ./consommateurs.mjs (the guard, which the entry
|
|
3
3
|
// `@roomi-fields/grillhouse/consommateurs` publishes) and the Vitest configuration of the frame
|
|
4
4
|
// (./vitest-config/lances.mjs, which Vite bundles and whose parser refuses a `#!` out of the first
|
|
5
5
|
// file) both import.
|
|
@@ -7,19 +7,21 @@ import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
|
7
7
|
import path from 'node:path';
|
|
8
8
|
import { horsCadre, ignoresParGit } from '../../paquets.mjs';
|
|
9
9
|
|
|
10
|
-
// Every directory under `packages/` and `src/` of the repository at <racine
|
|
10
|
+
// Every directory under `packages/` and `src/` of the repository at <racine>, and each one of
|
|
11
|
+
// `mods/` that holds a `package.json` (the plugin, named `mods/<dir>`): [{ nom, dir }], a
|
|
11
12
|
// directory git ignores (the local clone of another repository) left out: its package.json when
|
|
12
13
|
// it holds one, the directory itself otherwise.
|
|
13
14
|
function tousDossiers(racine) {
|
|
14
15
|
const found = [];
|
|
15
|
-
for (const parent of ['packages', 'src']) {
|
|
16
|
+
for (const parent of ['packages', 'src', 'mods']) {
|
|
16
17
|
const base = path.join(racine, parent);
|
|
17
18
|
if (!existsSync(base)) {
|
|
18
19
|
continue;
|
|
19
20
|
}
|
|
20
21
|
for (const e of readdirSync(base, { withFileTypes: true })) {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const dir = path.join(base, e.name);
|
|
23
|
+
if (e.isDirectory() && (parent !== 'mods' || existsSync(path.join(dir, 'package.json')))) {
|
|
24
|
+
found.push({ nom: parent === 'mods' ? `mods/${e.name}` : e.name, dir });
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
//
|
|
2
|
+
// The guard `consommateurs-arbitres` (packages/grillhouse/docs/architecture/tests.md §3.4): a line
|
|
3
|
+
// of a `## Consommateurs` section that a lot changes enters with its settled arbitrage at the
|
|
3
4
|
// ticket: each dependency between components is decided before it is written, as a code owner
|
|
4
5
|
// approves a change to the files it owns.
|
|
5
6
|
//
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// The types of ./consommateurs.mjs as the entry `@roomi-fields/grillhouse/consommateurs`
|
|
2
|
-
// publishes it, for a project's guard over the shared test material
|
|
2
|
+
// publishes it, for a project's guard over the shared test material (the guard `consommateurs`:
|
|
3
|
+
// packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* The components of `racine` whose `package.json` exports `./test-fixtures`, a package out of the
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// The consumers of the interfaces
|
|
2
|
+
// The consumers of the interfaces, the guard `consommateurs`
|
|
3
|
+
// (packages/grillhouse/docs/architecture/tests.md §3.4): each component's `docs/INTERFACE.md` declares, in its
|
|
3
4
|
// `## Consommateurs` section, which components use which of its elements:
|
|
4
5
|
//
|
|
5
6
|
// ## Consommateurs
|
|
@@ -10,8 +11,7 @@
|
|
|
10
11
|
// This check reads what the production code of every component imports from every other, and what
|
|
11
12
|
// its tests import from a package of the shared test material (`matieres`), whose only readers are
|
|
12
13
|
// tests, as knip counts test files as entries out of its `--production` mode; it refuses (exit 1) a use that the provider's interface does not declare, and a declared name that
|
|
13
|
-
// no code of its consumer uses, as ESLint's `no-unused-vars` refuses a name nothing uses
|
|
14
|
-
// 320.3.2.1: « LEVEL_TYPES » declared for 020-loader, only reported, caught by its second review).
|
|
14
|
+
// no code of its consumer uses, as ESLint's `no-unused-vars` refuses a name nothing uses.
|
|
15
15
|
// `*` stands for a namespace, default, re-export-all or side-effect import, and for a dynamic
|
|
16
16
|
// import not destructured; a literal dynamic import destructured gives its names, as knip reads
|
|
17
17
|
// it. A bullet of the section is a list of names, each a JavaScript identifier or `*`: a bullet of
|
|
@@ -19,10 +19,8 @@
|
|
|
19
19
|
// and passes. A refusal inscribed in the project's debt
|
|
20
20
|
// (`grillhouse-dette.json`, see `dette.mjs`) passes, keyed by the provider's interface and
|
|
21
21
|
// `usage-non-declare`, `declare-non-utilise` or `ligne-mal-formee` (`homonyme` for two components
|
|
22
|
-
// of one name, keyed by the first path). The debt of
|
|
23
|
-
// updates
|
|
24
|
-
// scripts/langages/typescript/migrations/0.24.6-lignes-mal-formees.mjs,
|
|
25
|
-
// scripts/langages/typescript/migrations/0.24.7-matiere-dans-les-tests.mjs); in a ticket, the name leaves its line, and a
|
|
22
|
+
// of one name, keyed by the first path). The debt of each refusal is inscribed once, when a project
|
|
23
|
+
// updates (scripts/langages/typescript/migrations/); in a lot, the name leaves its line, and a
|
|
26
24
|
// line of prose is written as a list of names.
|
|
27
25
|
//
|
|
28
26
|
// npx grillhouse consommateurs run from the repository root
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The build of an agent's copy before its session, the command `construire` of the module
|
|
3
3
|
// typescript (scripts/jointure.d.ts), which the launcher (scripts/enveloppe/lancer.sh) runs in the
|
|
4
|
-
// prepared copy, through its mounts: the session finds built what it reads out of its plan
|
|
4
|
+
// prepared copy, through its mounts: the session finds built what it reads out of its plan
|
|
5
|
+
// (packages/grillhouse/docs/architecture/tests.md §3.3).
|
|
5
6
|
//
|
|
6
7
|
// node construire.mjs --echec <fichier> <plan> from the root of the copy
|
|
7
8
|
// node construire.mjs --gardes what the guard tasks wait for, before the
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
// whether its package's entry exports it. As API Extractor's report and its diff, read line by
|
|
4
4
|
// line, and a review that asks a word on every changed file, the circuit gives this list to the
|
|
5
5
|
// reviewer (`relire` of scripts/circuit.mjs), whose sheet holds one line of conformity per element
|
|
6
|
-
// (scripts/resultats.mjs, `conformiteDuLot`).
|
|
6
|
+
// (scripts/resultats.mjs, `conformiteDuLot`). The element of a lot is the module's answer to the
|
|
7
|
+
// join (packages/grillhouse/docs/architecture/tests.md §3.3).
|
|
7
8
|
//
|
|
8
9
|
// - The lot is the difference between two commits of the copy (<avant>, its HEAD, and <apres>,
|
|
9
10
|
// the lot the circuit keeps): its changed files by `git diff --name-status -z`, the text of a
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// The entries of the suite of conformity (scripts/conformite.mjs) for the module typescript, as
|
|
2
2
|
// the valid and invalid cases a rule of ESLint gives its RuleTester: each a trial, built under the
|
|
3
|
-
// directory the suite gives, with what a sound module answers on it
|
|
3
|
+
// directory the suite gives, with what a sound module answers on it (the modules of language:
|
|
4
|
+
// packages/grillhouse/docs/architecture/tests.md §3.3).
|
|
4
5
|
//
|
|
5
6
|
// - A repository of four packages: `@e/a`; `@e/b`, which depends on `@e/a`; `@e/c`, which depends
|
|
6
7
|
// on `@e/b`; `@e/m`, the shared test material (it exports `./test-fixtures`). Each has its
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// The boundaries of the code,
|
|
2
|
+
// The boundaries of the code, the guard `frontieres` (packages/grillhouse/docs/architecture/tests.md
|
|
3
|
+
// §3.4), checked by dependency-cruiser. Its configuration
|
|
3
4
|
// (`.dependency-cruiser.cjs`) is generated from the components of the repository, like the index
|
|
4
5
|
// of the interfaces; a project adds its own rules and options in `.dependency-cruiser.projet.cjs`
|
|
5
6
|
// (`module.exports = { forbidden: [...], options: {...} }`), which the generated file reads when
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
// npx grillhouse frontieres refuses a stale configuration, then runs dependency-cruiser
|
|
12
13
|
// npx grillhouse frontieres --ecrire writes the configuration, and `.dependency-cruiser.projet.cjs`
|
|
13
14
|
// empty when the project has none, so that knip resolves
|
|
14
|
-
// the require of the configuration
|
|
15
|
+
// the require of the configuration
|
|
15
16
|
//
|
|
16
17
|
// The rules: no cycle; a package reaches another by its name, never by a path into its tree; a
|
|
17
18
|
// module of `src/` reaches another by its entry (`index`); the code of `src/` imports no test; the
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The index of the interfaces: one line per component, then one line per element it provides,
|
|
3
3
|
// generated from the components' `docs/INTERFACE.md`. An agent loads it at start and opens an
|
|
4
|
-
// interface, then one of its sections, only when the index names it.
|
|
4
|
+
// interface, then one of its sections, only when the index names it. The guard `index-interfaces`
|
|
5
|
+
// (packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
5
6
|
//
|
|
6
7
|
// npx grillhouse index-interfaces writes docs/agents/index-des-interfaces.md
|
|
7
8
|
// npx grillhouse index-interfaces --verifier refuses (exit 1) when that file is out of date,
|
|
@@ -200,7 +201,7 @@ function rend(racine, rel) {
|
|
|
200
201
|
// repository, which the section points to the index of the interfaces; or the plan of a session,
|
|
201
202
|
// several paths in the form of the envelope's list (`packages/a:packages/b`, `lireLaListe`), one
|
|
202
203
|
// part of the section per package of the plan, its providers under it, as one session works the
|
|
203
|
-
// whole plan of a ticket
|
|
204
|
+
// whole plan of a ticket. Its providers are the
|
|
204
205
|
// components whose `## Consommateurs` section names it; for each, its line in the index of the
|
|
205
206
|
// interfaces (its heading, its first sentence, its interface), the names of the elements its
|
|
206
207
|
// `## Consommateurs` line declares for the component, never their sentence, which the index of the
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// The module of language typescript: what the core asks of a language (scripts/jointure.d.ts,
|
|
2
|
-
// docs/INTERFACE.md
|
|
2
|
+
// docs/INTERFACE.md; the modules of language: packages/grillhouse/docs/architecture/tests.md §3.3),
|
|
3
|
+
// answered by the scripts of this directory — the components of the frame
|
|
3
4
|
// (./consommateurs.mjs), the tests by Turborepo and Vitest (./tests.mjs, ./verifier.mjs), the
|
|
4
5
|
// guards of structure and their generators. The core loads it by scripts/langages.mjs, and this
|
|
5
6
|
// module imports of the core its published entries alone.
|
|
@@ -161,7 +162,7 @@ const joueDesTests = (_racine, composant) =>
|
|
|
161
162
|
|
|
162
163
|
export default {
|
|
163
164
|
nom: 'typescript',
|
|
164
|
-
// The expected size of a copy before any is measured: its node_modules, about 0.5 to 1 GB
|
|
165
|
+
// The expected size of a copy before any is measured: its node_modules, about 0.5 to 1 GB.
|
|
165
166
|
tailleDUneCopie: 1024 ** 3,
|
|
166
167
|
manifeste: 'package.json',
|
|
167
168
|
// The name a package.json gives its package; its internal dependencies are the package.json's
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// The written interface of each component against its code
|
|
2
|
+
// The written interface of each component against its code: the guard `interfaces-contre-code`
|
|
3
|
+
// (packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
3
4
|
//
|
|
4
5
|
// - The public API of a component is reported by API Extractor from its built declarations:
|
|
5
6
|
// `docs/INTERFACE.api.md`, kept in the repository. The check refuses an API that changed
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// The readers of the elements a ticket names, by the code of the module typescript: the part of
|
|
2
2
|
// the survey of composants-affectes (scripts/composants-affectes.mjs) that reads the sources, the
|
|
3
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.
|
|
4
|
+
// language service starts from a published symbol (packages/grillhouse/docs/architecture/tests.md
|
|
5
|
+
// §3.3).
|
|
5
6
|
//
|
|
6
7
|
// - The provider of an element is the component whose interface (`docs/INTERFACE.md`) publishes
|
|
7
8
|
// it: a heading of its generated part (`lire` of scripts/langages/typescript/index-interfaces.mjs). A name no
|