@roomi-fields/grillhouse 0.49.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +38 -0
- package/bin/grillhouse.mjs +2 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +5 -0
- package/cadre/templates/projet/.github/workflows/nuit.yml +6 -4
- package/cadre/templates/projet/CLAUDE.md +13 -96
- package/cadre/templates/projet/docs/agents/issue-tracker.md +5 -5
- package/charte.md +88 -96
- package/dist/temporal/acte.d.ts +9 -0
- package/dist/temporal/acte.js +45 -21
- 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 +35 -13
- 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/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-de-la-machine.mjs +10 -16
- package/scripts/avancement.mjs +2 -0
- package/scripts/base-des-workflows.mjs +2 -1
- package/scripts/binaires.mjs +2 -1
- package/scripts/branche-de-nuit.mjs +2 -1
- package/scripts/cadre.mjs +12 -3
- 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/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 +2 -1
- package/scripts/disque-des-copies.mjs +1 -1
- package/scripts/donnees-cles.mjs +2 -0
- package/scripts/droits.mjs +12 -10
- 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 +113 -89
- package/scripts/enveloppe/lancer.sh +5 -3
- package/scripts/enveloppe/paquets-du-plan.mjs +4 -6
- package/scripts/enveloppe/travail-de-la-copie.mjs +11 -16
- 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 +39 -0
- 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 +5 -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 +17 -4
- 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 +12 -5
- package/scripts/langages/typescript/tests-du-poste.mjs +60 -21
- 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/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/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/nuit.sh +48 -15
- 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/regles-des-places.mjs +4 -6
- package/scripts/repli-de-la-nuit.mjs +107 -35
- 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 +3 -0
- package/scripts/session-start.sh +0 -6
- 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/style-a-l-ecriture.mjs +2 -0
- package/scripts/tableau-des-composants.mjs +5 -7
- package/scripts/tableau.mjs +6 -5
- package/scripts/taches-du-graphe.mjs +3 -0
- package/scripts/ticket-du-circuit.mjs +1 -1
- package/scripts/ticket.mjs +3 -0
- package/scripts/transitions.mjs +30 -19
- 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/architecte/SKILL.md +203 -0
- package/skills/architecte/references/exemple-d-architecture.md +159 -0
- 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 +179 -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 +10 -8
- package/skills/testwriter/SKILL.md +8 -11
|
@@ -1,169 +1,106 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// The `turbo.json` of
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
2
|
+
// The generator of the graph: writes the `turbo.json` of the root and of each package of a
|
|
3
|
+
// repository of packages, from their package.json and TypeScript configurations, and refuses one
|
|
4
|
+
// that is absent or stale. A repository without `workspaces` has no package: none is written or
|
|
5
|
+
// refused. The dependencies are read in the package.json only. Packages come from `paquets`
|
|
6
|
+
// (scripts/paquets.mjs). Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.1
|
|
7
|
+
// (generator of the graph), §5.1.
|
|
8
8
|
//
|
|
9
9
|
// npx grillhouse turbo-des-paquets refuses a turbo.json absent or stale, and a
|
|
10
|
-
// declaration of a path read or trace refused
|
|
11
|
-
// npx grillhouse turbo-des-paquets --ecrire writes the
|
|
12
|
-
//
|
|
13
|
-
// turbo.json of each package, in one pass
|
|
10
|
+
// declaration of a path read or trace refused
|
|
11
|
+
// npx grillhouse turbo-des-paquets --ecrire writes the root's guard `dependsOn`, typing task and
|
|
12
|
+
// tests' `env`, then each package's turbo.json
|
|
14
13
|
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
14
|
+
// Per package (a package configuration, `extends: ["//"]`):
|
|
15
|
+
// - `build` waits for the `<name>#build` of each internal package named in `dependencies`,
|
|
16
|
+
// `peerDependencies` and `optionalDependencies` that has a `build` script, sorted; never the
|
|
17
|
+
// devDependencies, which would make a cycle with the shared test material. The tests keep the
|
|
18
|
+
// root's `build` and `^build`.
|
|
19
|
+
// - `build` inputs, for a package with a `tsconfig.build.json`: the root's build inputs without
|
|
20
|
+
// `$TURBO_DEFAULT$`, then, sorted, its package.json, its tsconfig.build.json, each configuration
|
|
21
|
+
// it extends inside the package, `<dir>/**` per included directory (an `include` entry, its fixed
|
|
22
|
+
// part before a glob; a `files` entry, its directory), the same for each configuration a `tsc` of
|
|
23
|
+
// its `build` script compiles (`-p`, `--project`, `-b`, `--build`, else tsconfig.json). tsc's
|
|
24
|
+
// rules hold: a configuration's `include` and `files` replace its bases', a later base of an
|
|
25
|
+
// `extends` list replaces an earlier one, each path is relative to the file that writes it
|
|
26
|
+
// (`${configDir}`, to the configuration compiled). What is unknown leaves Turborepo's default,
|
|
27
|
+
// every file hashed: a tsconfig.build.json absent or not JSON, a `build` command other than
|
|
28
|
+
// `tsc …`, a base that cannot be read, a configuration with neither `include` nor `files`, an
|
|
29
|
+
// included path out of the package or at its root.
|
|
30
|
+
// - A package out of the frame (`docs/agents/hors-cadre.txt`) stays a workspace and excludes each
|
|
31
|
+
// task of the root's turbo.json (`"extends": false`). A `^` dependency still reaches an excluded
|
|
32
|
+
// task, so a package of the frame that declares one (`dependencies`, `devDependencies`,
|
|
33
|
+
// `optionalDependencies`) has each root task whose `dependsOn` holds a `^<task>` written out:
|
|
34
|
+
// its other entries kept, then the `<name>#<task>` of each internal package it declares, those
|
|
35
|
+
// out of the frame left out, sorted. The check refuses a configuration that is not so.
|
|
25
36
|
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
// package's build as it is, and so the builds and tests of every package depending on it. A
|
|
29
|
-
// package with a `tsconfig.build.json` has its `build` hash the root's build inputs, Turborepo's
|
|
30
|
-
// default (`$TURBO_DEFAULT$`) left out, then, sorted: its package.json, its tsconfig.build.json and
|
|
31
|
-
// each configuration it extends inside the package, `<dir>/**` per directory it includes (an
|
|
32
|
-
// `include` entry, its fixed part before a glob; a `files` entry, its directory, since tsc compiles
|
|
33
|
-
// what a listed file imports, its neighbours most often), the same for each configuration a `tsc`
|
|
34
|
-
// of its `build` script compiles (`-p`, `--project`, `-b`, `--build`, else tsconfig.json). tsc's
|
|
35
|
-
// own rules hold: a configuration's `include`
|
|
36
|
-
// and `files` replace its bases', a later base of an `extends` list replacing an earlier one, each
|
|
37
|
-
// path relative to the file that writes it (`${configDir}`, to the configuration compiled). What is
|
|
38
|
-
// unknown leaves the build on Turborepo's default, every file of its package hashed, so that it
|
|
39
|
-
// never gives a stale cache: a tsconfig.build.json absent or not JSON, a command of the `build`
|
|
40
|
-
// script other than `tsc …` (`vite build`, `node copier.mjs`), a base that cannot be read, a
|
|
41
|
-
// configuration setting
|
|
42
|
-
// neither `include` nor `files` (tsc then takes every file), an included path out of the package
|
|
43
|
-
// or at its root.
|
|
44
|
-
//
|
|
45
|
-
// A package out of the frame (`docs/agents/hors-cadre.txt`: a directory under `packages/` or
|
|
46
|
-
// `src/`) stays a workspace, which a neighbour may import by its name, and Turborepo plays none
|
|
47
|
-
// of its tasks: its configuration excludes each task of the root's turbo.json (or turbo.jsonc),
|
|
48
|
-
// `"extends": false`, by which the task does not exist for it. A `^` dependency still reaches an excluded task, so no `dependsOn`
|
|
49
|
-
// written here names a package out of the frame, and a package of the frame that declares one
|
|
50
|
-
// (in its `dependencies`, `devDependencies` or `optionalDependencies`, the fields `^` follows)
|
|
51
|
-
// has each root task whose `dependsOn` holds a `^<task>` written out: its other entries kept, then
|
|
52
|
-
// the `<name>#<task>` of each internal package it declares there, out of the frame left out,
|
|
53
|
-
// sorted. The check refuses a configuration that is not so, which Turborepo would play.
|
|
54
|
-
//
|
|
55
|
-
// What a package's tests read, as Bazel's `data`, and the traces a stage writes, as Bazel's
|
|
56
|
-
// genrule: the test task of a package depends on its code, on what it imports and on the paths it
|
|
57
|
-
// declares only. A package declares in its package.json, each path from the root:
|
|
37
|
+
// What a package's tests read and the traces it writes. A package declares in its package.json,
|
|
38
|
+
// each path from the root:
|
|
58
39
|
//
|
|
59
40
|
// "grillhouse": {
|
|
60
41
|
// "lit": ["packages/990-corpus/test/060-encoder/paires-v1"],
|
|
61
42
|
// "traces": { "trace:grammaires": { "lit": ["…/paires-v1"], "ecrit": "packages/060-encoder/trace/grammaires-du-corpus" } }
|
|
62
43
|
// }
|
|
63
44
|
//
|
|
64
|
-
// - `lit`: the paths its tests read, directories or files, data or code
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
// ./vitest-config/lances.mjs) are hashed with them (`$TURBO_ROOT$/<motif>` each, those `lit`
|
|
72
|
-
// already covers left out), a package without `lit` included: one declaration, read by the
|
|
73
|
-
// choice of the tests of a pass and by Turborepo's cache.
|
|
45
|
+
// - `lit`: the paths its tests read, directories or files, data or code. Its `test:unit` hashes
|
|
46
|
+
// them (`inputs`: the root's, `$TURBO_EXTENDS$`, or `$TURBO_DEFAULT$` when the root's task sets
|
|
47
|
+
// none; then `$TURBO_ROOT$/<dir>/**` each) and waits, beside the root's `dependsOn`, for each
|
|
48
|
+
// trace whose output one of them overlaps (`<producer>#trace:<name>`). The patterns its test
|
|
49
|
+
// files declare they read (`// @lit <motif>` at their head, ./vitest-config/lances.mjs) are
|
|
50
|
+
// hashed with them (`$TURBO_ROOT$/<motif>` each, those `lit` already covers left out), a
|
|
51
|
+
// package without `lit` included.
|
|
74
52
|
// - `traces`: each trace the package produces, its command the package's script of the same name,
|
|
75
|
-
// `trace:<name>`. Its task waits for `build` and `^build
|
|
53
|
+
// `trace:<name>`. Its task waits for `build` and `^build` and for the traces its `lit` overlaps;
|
|
76
54
|
// it hashes the package's files and its `lit`, its output left out, and Turborepo caches its
|
|
77
55
|
// output, `ecrit`, a directory inside the package that git ignores. A restore from the cache
|
|
78
|
-
// adds files and removes none: the command empties its directory before writing it.
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
// (scripts/langages/typescript/tests.mjs) and the build of an agent's copy
|
|
82
|
-
// (scripts/taches-du-graphe.mjs, every language's), which produce them before the tests; the envelope shows the
|
|
83
|
-
// directory of a neighbour's trace read-only (scripts/enveloppe/enveloppe.mjs), and the targeted
|
|
84
|
-
// run inside it plays the traces of the agent's package only.
|
|
56
|
+
// adds files and removes none: the command empties its directory before writing it. The traces
|
|
57
|
+
// a package's tests wait for are read in Turborepo's plan of its tests (`tracesDuPlan` of
|
|
58
|
+
// scripts/taches-du-graphe.mjs).
|
|
85
59
|
// - The package holding a declared path of data alone (the shared test material) has its `build`
|
|
86
|
-
// leave it out (`inputs`: the root's, then `!<dir>/**` each)
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
// `.jsx`, `.mjs`, `.cjs`) stays an input of its package's build, as Bazel's `data` leaves a file
|
|
90
|
-
// in the rule that builds it; what a trace writes is no code of it. The builds a package's
|
|
91
|
-
// dependencies give stay as they are: a package reduces them in its package.json.
|
|
60
|
+
// leave it out (`inputs`: the root's, then `!<dir>/**` each). A declared path holding code
|
|
61
|
+
// (`.ts`, `.tsx`, `.mts`, `.cts`, `.d.ts`, `.js`, `.jsx`, `.mjs`, `.cjs`) stays an input of its
|
|
62
|
+
// package's build; what a trace writes is no code of it.
|
|
92
63
|
//
|
|
93
64
|
// The check refuses a declared path absent that no trace writes; a trace written out of its
|
|
94
|
-
// package, followed by git, or not ignored; a `trace:*` script without
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
65
|
+
// package, followed by git, or not ignored; a `trace:*` script without declaration, a declaration
|
|
66
|
+
// without script or not named `trace:<name>`. In the root's turbo.json, which is the project's, it
|
|
67
|
+
// refuses what the generator owns: a task of one package (`<package>#<task>`, the root's own
|
|
68
|
+
// `//#…` kept), a `trace:*` task, an input (`inputs` under `$TURBO_ROOT$/`, `globalDependencies`)
|
|
69
|
+
// naming a package directory.
|
|
99
70
|
//
|
|
100
71
|
// A submodule's `.git`, in a copy (a worktree), is a file naming that copy: an input reaching it
|
|
101
|
-
// changes the hash of its task in each
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
// and in the inputs it writes in a package's turbo.json; the check refuses a root input lacking it.
|
|
72
|
+
// changes the hash of its task in each copy. Beside each input that can reach the `.git` of a
|
|
73
|
+
// submodule `.gitmodules` declares (a pattern of the root under `$TURBO_ROOT$/`, of any task, or
|
|
74
|
+
// a global dependency, whose fixed part is the submodule or holds it, then a glob), the generator
|
|
75
|
+
// writes its exclusion, `!$TURBO_ROOT$/<path>/.git` (`!<path>/.git` for a global dependency), in
|
|
76
|
+
// the root's turbo.json and in the inputs of a package's; the check refuses a root input lacking it.
|
|
107
77
|
//
|
|
108
78
|
// The configuration of Vitest of the package of the shared test material (`matieres` of
|
|
109
|
-
//
|
|
110
|
-
// read-only to every role but the testwriter
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
// that package, and a `.js` or `.ts` when its `type` is `module`, as Vite tells ESM from CommonJS.
|
|
114
|
-
//
|
|
115
|
-
// The guard tasks of the root: the frame's controls (`grillhouse:gardes`) and the project's own
|
|
116
|
-
// guards (`gardes`, the root script the frame reserves for them; a root without it plays none),
|
|
117
|
-
// which `npm run verifier` plays beside the tests. They read what the builds write (the API
|
|
118
|
-
// reports and the code-mort check read the `dist/`; a project's guards may read its built form):
|
|
119
|
-
// each waits for the build of each package of the frame that has a `build` script, sorted, a
|
|
120
|
-
// package out of the frame left out (`//#grillhouse:gardes`, `//#gardes` in a repository of
|
|
121
|
-
// packages), or for the root's build (`grillhouse:gardes`, `gardes`) in a repository without
|
|
122
|
-
// packages. The generator writes their `dependsOn` in the root's turbo.json (or turbo.jsonc), and
|
|
123
|
-
// adds a guard task the root lacks (`{ dependsOn, outputs: [] }`); the rest of that file is the
|
|
124
|
-
// project's, its comments and its layout kept (jsonc-parser, the library of the JSON editing of
|
|
125
|
-
// VS Code: each edit touches the value it sets). The check refuses a guard task absent or whose
|
|
126
|
-
// `dependsOn` differs. A repository without a root turbo.json (or turbo.jsonc) has nothing written
|
|
127
|
-
// or refused at its root.
|
|
128
|
-
//
|
|
129
|
-
// The typing of each package (`typecheck`, its script, as `check-types` in the examples of
|
|
130
|
-
// create-turbo), which `npm run verifier` plays beside the guards and the tests: a task of the
|
|
131
|
-
// root's turbo.json (or turbo.jsonc), cached per package, that waits, as `test:unit`, for the
|
|
132
|
-
// build of its own package (`build`: the tests of BPScript's 990-corpus import its built entry,
|
|
133
|
-
// `990-corpus/test-fixtures`) and, in a repository of packages, for the build of each package its
|
|
134
|
-
// package declares (`^build`), whose types it reads; a package without a `typecheck` script plays
|
|
135
|
-
// none. The generator adds the task the root lacks (`{ dependsOn: ["build", "^build"], outputs:
|
|
136
|
-
// [] }`, `["build"]` without packages), and each of those builds a `dependsOn` of the project's
|
|
137
|
-
// lacks, the rest of the task kept; the check refuses either. Witness: BPScript 320.21.4, whose type errors in test/ showed only at night.
|
|
138
|
-
//
|
|
139
|
-
// The tests of a targeted run: the paths reach Vitest in the variable `GRILLHOUSE_TESTS`
|
|
140
|
-
// (scripts/langages/typescript/vitest-config/cibles.mjs, scripts/langages/typescript/tests.mjs), which the `env` of the root's
|
|
141
|
-
// `test:unit` names: it enters the hash of the tests alone, and reaches their process alone
|
|
142
|
-
// (Turborepo's strict mode of the variables). A package's own `test:unit` sets no `env`, and
|
|
143
|
-
// inherits the root's. The generator adds the variable to the `env` of the root's `test:unit`,
|
|
144
|
-
// the project's entries kept, and the check refuses a `test:unit` of the root without it.
|
|
145
|
-
//
|
|
146
|
-
// Some variables pass to every task without entering any hash: the root's `globalPassThroughEnv`
|
|
147
|
-
// names them, Turborepo's strict mode of the variables keeping out of a task every variable its
|
|
148
|
-
// configuration does not name. The results directory of a run (`GRILLHOUSE_RESULTATS`,
|
|
149
|
-
// scripts/resultats.mjs), where the guards write their SARIF, Turborepo its summaries and Vitest
|
|
150
|
-
// its JSON reports; the changes since the last green (`GRILLHOUSE_CHANGEMENTS`,
|
|
151
|
-
// scripts/dernier-vert.mjs), by which the tests of a package Turborepo plays again are those
|
|
152
|
-
// Vitest relates to them, while a package whose inputs did not move replays from the cache; the
|
|
153
|
-
// progress directory of a pass (`GRILLHOUSE_AVANCEMENT`, scripts/avancement.mjs), where Vitest
|
|
154
|
-
// writes the files done and planned of each task, which the board reads; the temporary directory
|
|
155
|
-
// (`TMPDIR`), the base of a pass (scripts/mesure/base-de-passe.mjs), where every task writes
|
|
156
|
-
// its temporary files and which goes at the end of the pass; the workers of the tests of a task
|
|
157
|
-
// (`GRILLHOUSE_TRAVAILLEURS`, scripts/places-de-la-machine.mjs), the bound a session or a pass
|
|
158
|
-
// sets, which the tool of each language reads; the Rust toolchain of a runner (`CARGO_HOME`,
|
|
159
|
-
// `RUSTUP_HOME`), which a runner of the repository holds per executor. The generator adds each
|
|
160
|
-
// one the root lacks, the project's entries kept, and the check refuses a
|
|
161
|
-
// root without one.
|
|
79
|
+
// ./consommateurs.mjs) is CommonJS (`vitest.config.cjs`): the envelope shows that package
|
|
80
|
+
// read-only to every role but the testwriter, and Vite 5 bundles an ESM configuration into a file
|
|
81
|
+
// beside it (`vitest.config.mjs.timestamp-<n>.mjs`). The check refuses a `vitest.config.mjs` or
|
|
82
|
+
// `.mts` of that package, and a `.js` or `.ts` when its `type` is `module`.
|
|
162
83
|
//
|
|
163
|
-
// The
|
|
164
|
-
//
|
|
165
|
-
//
|
|
166
|
-
//
|
|
84
|
+
// The root's tasks, in its turbo.json or turbo.jsonc (the rest of the file is the project's,
|
|
85
|
+
// its comments and layout kept by jsonc-parser; a repository without one has nothing written or
|
|
86
|
+
// refused at its root). The generator adds a task the root lacks and writes its entries; the
|
|
87
|
+
// check refuses a task absent or differing:
|
|
88
|
+
// - the guard tasks, `grillhouse:gardes` and `gardes` (the root script the frame reserves for the
|
|
89
|
+
// project's guards; a root without it plays none): each waits for the build of each package of
|
|
90
|
+
// the frame that has a `build` script, sorted (`//#grillhouse:gardes`, `//#gardes` in a
|
|
91
|
+
// repository of packages), or for the root's build in a repository without packages; the task
|
|
92
|
+
// added is `{ dependsOn, outputs: [] }`;
|
|
93
|
+
// - `typecheck`, cached per package: it waits for `build` and, in a repository of packages, for
|
|
94
|
+
// `^build`; a package without a `typecheck` script plays none; the task added is
|
|
95
|
+
// `{ dependsOn: ["build", "^build"], outputs: [] }` (`["build"]` without packages), and a
|
|
96
|
+
// `dependsOn` of the project's lacking one of them is completed, the rest kept;
|
|
97
|
+
// - `test:unit`: its `env` names `GRILLHOUSE_TESTS` (cibles.mjs, tests.mjs), which so enters the
|
|
98
|
+
// hash of the tests alone; a package's own `test:unit` sets no `env` and inherits the root's;
|
|
99
|
+
// the project's entries are kept;
|
|
100
|
+
// - `globalPassThroughEnv`: the variables that pass to every task without entering any hash:
|
|
101
|
+
// `GRILLHOUSE_RESULTATS`, `GRILLHOUSE_CHANGEMENTS`, `GRILLHOUSE_AVANCEMENT`, `TMPDIR`,
|
|
102
|
+
// `GRILLHOUSE_TRAVAILLEURS`, and the Rust toolchain of a runner (`CARGO_HOME`, `RUSTUP_HOME`);
|
|
103
|
+
// the project's entries are kept.
|
|
167
104
|
import { spawnSync } from 'node:child_process';
|
|
168
105
|
import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
169
106
|
import { createRequire } from 'node:module';
|
|
@@ -199,8 +136,8 @@ const TOPOLOGIE = ['dependencies', 'devDependencies', 'optionalDependencies'];
|
|
|
199
136
|
const RACINES = ['turbo.json', 'turbo.jsonc'];
|
|
200
137
|
// The guard tasks of the root: the frame's controls, and the project's own guards.
|
|
201
138
|
export const GARDES = SCRIPTS_DE_GARDES;
|
|
202
|
-
// The controls of the root the CI
|
|
203
|
-
// lint
|
|
139
|
+
// The controls of the root that the CI plays beside the verification: the format check and the
|
|
140
|
+
// lint. A root plays those its package.json holds a script for, none demanded.
|
|
204
141
|
export const CONTROLES = ['format:check', 'lint'];
|
|
205
142
|
// The controls the root package.json of <racine> holds a script for.
|
|
206
143
|
export function controlesDeRacine(racine) {
|
|
@@ -271,7 +208,7 @@ const relanceLesPaquets = script =>
|
|
|
271
208
|
/(^|[\s;&|])(npx\s+)?turbo\s+run(\s|$)/.test(String(script));
|
|
272
209
|
|
|
273
210
|
// The refusals of the root's format and lint scripts at <racine> that name a file a package holds,
|
|
274
|
-
// or launch the packages' scripts again: the root keeps its own files
|
|
211
|
+
// or launch the packages' scripts again: the root keeps its own files, a package
|
|
275
212
|
// plays its own.
|
|
276
213
|
function controlesDeRacineRefuses(racine) {
|
|
277
214
|
const dossiers = paquets(racine)
|
|
@@ -1067,7 +1004,9 @@ export function ecrire(racine) {
|
|
|
1067
1004
|
const abs = path.join(racine, controles[0].f);
|
|
1068
1005
|
let texte = readFileSync(abs, 'utf8');
|
|
1069
1006
|
for (const { cle } of controles) {
|
|
1070
|
-
|
|
1007
|
+
// The lint of a package reads the types its build writes (and its neighbours'), as the typing.
|
|
1008
|
+
const tache = cle === 'lint' ? { dependsOn: ['build', '^build'], outputs: [] } : { outputs: [] };
|
|
1009
|
+
texte = applyEdits(texte, modify(texte, ['tasks', cle], tache, MISE_EN_FORME));
|
|
1071
1010
|
}
|
|
1072
1011
|
writeFileSync(abs, texte);
|
|
1073
1012
|
if (!ecrits.includes(controles[0].f)) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// The verdict of a run of the module typescript, the third demand of the join
|
|
2
2
|
// (scripts/jointure.d.ts, `verdict`): what a run of Turborepo and of Vitest left in the results
|
|
3
|
-
// directory of a pass (`GRILLHOUSE_RESULTATS`, scripts/resultats.mjs
|
|
3
|
+
// directory of a pass (`GRILLHOUSE_RESULTATS`, scripts/resultats.mjs; packages/grillhouse/docs/architecture/tests.md
|
|
4
|
+
// §3.3).
|
|
4
5
|
//
|
|
5
6
|
// - The summary of a run of Turborepo (./resume-du-lanceur.mjs): `lireLesResumes` gives each task.
|
|
6
7
|
// - The JSON report of Vitest, which the frame's base configuration writes under
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// `npm run verifier`: the
|
|
3
|
-
//
|
|
4
|
-
// for
|
|
2
|
+
// `npm run verifier`: the verification pass, one run of Turborepo on the whole graph. Its verdict
|
|
3
|
+
// is green (0) or red (1); « à repasser » (75) only when the wait for the part of the machine, or
|
|
4
|
+
// for room in the temporary directory, reaches its bound, or the memory watch cuts it.
|
|
5
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md, §5.1 (the pass), §5.3 (the tests
|
|
6
|
+
// replayed), §3.1.
|
|
5
7
|
//
|
|
6
8
|
// npx grillhouse verifier [<argument of Turborepo>…] (npm run verifier -- --force)
|
|
7
9
|
// npx grillhouse verifier --tout [<argument>…] every test, played for real
|
|
@@ -9,104 +11,67 @@
|
|
|
9
11
|
// npx grillhouse verifier --sans-tests [<argument>…] every control but the tests
|
|
10
12
|
// npx grillhouse verifier --tranche i/n [<argument>…] the tests of the tranche i of n
|
|
11
13
|
//
|
|
12
|
-
// -
|
|
13
|
-
// `
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
// (`
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
// project's
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
// - `--tout`, and `--force` (the night, scripts/nuit.sh), play the complete pass: no measure
|
|
30
|
-
// against the last green, and each task of tests played for real (the variable of the tests
|
|
31
|
-
// carries the moment of the pass, `rejouer`, which no cached run holds).
|
|
32
|
-
// - The pass takes its part of the budget of the machine (scripts/places-de-la-machine.mjs,
|
|
33
|
-
// `avecLaPasse`), shared by every repository of the machine: a pass whose part does not fit in
|
|
34
|
-
// what the parts held leave, or that the load and the memory refuse, waits, and says so, with
|
|
35
|
-
// what it waits for, when it begins and every 30 s. The wait bounded (60 min), the pass ends at
|
|
36
|
-
// 75, « à repasser »; a key `grillhouse.part` or a reserve that is faulty ends it at once, red
|
|
37
|
-
// (1); either way without playing. A pass in the frame's own repository passes before a
|
|
38
|
-
// project's. It plays held to its part by the system, in a control group of its own.
|
|
39
|
-
// - Turborepo plays the build, then the guards (the frame's, `grillhouse:gardes`, and the
|
|
40
|
-
// project's own, its root script `gardes`), the typing of each package (`typecheck`, its
|
|
41
|
-
// sources and its tests, cached per package: scripts/langages/typescript/turbo-des-paquets.mjs) and the tests
|
|
42
|
-
// (`test:unit`) beside each other:
|
|
14
|
+
// - The measure: against the last green (scripts/dernier-vert.mjs), the changes reach Vitest in
|
|
15
|
+
// `GRILLHOUSE_CHANGEMENTS`, which no hash counts (vitest-config/changements.mjs); the line `↳`
|
|
16
|
+
// says whether the pass is targeted or complete. The final pass of a circuit gives the base of
|
|
17
|
+
// its lot (`GRILLHOUSE_BASE_DU_LOT`) and measures against it, targeted; a `--base` given takes
|
|
18
|
+
// precedence. The guards and the builds play whole. A pass green and restricted by no filter
|
|
19
|
+
// keeps its tree as the last green; a red one leaves it. The pass alone keeps it, for every
|
|
20
|
+
// language: it plays the tasks of every package of the graph, a crate's and a Python
|
|
21
|
+
// project's beside a TypeScript package's (their `test:unit` and `typecheck`).
|
|
22
|
+
// - `--tout`, and `--force` (the night, scripts/nuit.sh), play the complete pass: each task of
|
|
23
|
+
// tests for real (`GRILLHOUSE_TESTS` carries only `rejouer`, the moment of the pass, no path).
|
|
24
|
+
// - The part of the budget of the machine (scripts/places-de-la-machine.mjs, `avecLaPasse`): a
|
|
25
|
+
// pass whose part does not fit waits, says so with what it waits for, when it begins and every
|
|
26
|
+
// 30 s; the wait bounded (60 min), it ends at 75; a key `grillhouse.part` or a reserve that is
|
|
27
|
+
// faulty ends it at once, red (1); either way without playing. A pass in the frame's own
|
|
28
|
+
// repository passes before a project's. It plays held to its part in a control group of its own.
|
|
29
|
+
// - Turborepo plays the build, the guards (`grillhouse:gardes`, the project's `gardes`), the
|
|
30
|
+
// typing (`typecheck`, ./turbo-des-paquets.mjs) and the tests (`test:unit`) beside each other:
|
|
43
31
|
// `turbo run grillhouse:gardes gardes typecheck test:unit --continue=dependencies-successful
|
|
44
|
-
// --concurrency=<n> --summarize`, each argument given after it
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
// - The
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
// - The
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
// (
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
// their cache reads again what changed), with the same verdict: what the reviewer plays on the
|
|
70
|
-
// ticket's copy, the tests aside.
|
|
32
|
+
// --concurrency=<n> --summarize`, each argument given after it; a `--concurrency` among them
|
|
33
|
+
// replaces <n>, half the cores of the pass's part, one at least (`tachesCoteACote`). A red
|
|
34
|
+
// stops no task whose prerequisites passed, and each red is named. The workers of each task of
|
|
35
|
+
// tests (`travailleursDeLaPasse`, GRILLHOUSE_TRAVAILLEURS) share the cores between the tasks of
|
|
36
|
+
// tests side by side: the test processes of a pass never outnumber the cores.
|
|
37
|
+
// - The memory watch (scripts/garde-de-la-memoire.mjs): the run is cut when the memory available
|
|
38
|
+
// and the free swap run out, or when the machine waits for its memory half of the time; the
|
|
39
|
+
// pass says why and ends at 75, no task judged.
|
|
40
|
+
// - The pass plays no measure of time: a time budget bench and a time witness (a test file that
|
|
41
|
+
// imports `mesurerAuRepos`) are out of the day, as the night tests are (vitest-config/cibles.mjs,
|
|
42
|
+
// ./tests-de-nuit.mjs). A delay past is a red, and so is a task at 75.
|
|
43
|
+
// - The format check and the lint play per package (`<package>#format:check`, `<package>#lint`,
|
|
44
|
+
// the scripts of each package that holds them) and for the root's own files (`//#format:check`,
|
|
45
|
+
// `//#lint`), under the same `--continue`.
|
|
46
|
+
// - `--gardes` plays the guards, `format:check` and `lint` alone (`turbo run grillhouse:gardes
|
|
47
|
+
// gardes format:check lint …`), the repository whole, with the same verdict: what the reviewer
|
|
48
|
+
// plays. `--sans-tests` plays every task but the tests (`turbo run grillhouse:gardes gardes
|
|
49
|
+
// typecheck format:check lint …`), with no measure. `--tranche i/n` plays the tasks of tests
|
|
50
|
+
// alone (`turbo run test:unit …`) with the builds they depend on, each package of Vitest playing
|
|
51
|
+
// the i-th of n parts of its test files (./tranches.mjs); it is measured as the pass is
|
|
52
|
+
// (complete with `--tout`), carries itself in `GRILLHOUSE_TESTS`, which the hash of the tests
|
|
53
|
+
// counts, plays for real since it writes its reports (`.vitest-reports/`, the former ones
|
|
54
|
+
// removed first). Neither a tranche nor `--sans-tests` keeps its tree as the last green. A
|
|
55
|
+
// tranche not of the form `i/n` (1 ≤ i ≤ n), or given with `--gardes` or `--sans-tests`, is
|
|
56
|
+
// refused before any work, code 1.
|
|
71
57
|
// - The verdict reads the exit code of each task in the summary of each run
|
|
72
|
-
// (`.turbo/runs/<id>.json`), since Turborepo exits with the greatest code of its tasks
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
// -
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
// the
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
// reading of the summaries.
|
|
90
|
-
// - The pass has a base of its own (scripts/mesure/base-de-passe.mjs), in the temporary
|
|
91
|
-
// directory of its environment, which it sweeps first of the bases a killed pass left: every
|
|
92
|
-
// run of Turborepo gets it in TMPDIR, TMP and TEMP, the root's `globalPassThroughEnv` passing
|
|
93
|
-
// TMPDIR on to every task (scripts/langages/typescript/turbo-des-paquets.mjs), and the pass
|
|
94
|
-
// removes it at its end, green, red or interrupted (SIGINT, SIGTERM, SIGHUP).
|
|
95
|
-
// - `--sans-tests` plays every task of the pass but the tests: the guards, the typing, the format
|
|
96
|
-
// check and the lint (`turbo run grillhouse:gardes gardes typecheck format:check lint …`), with no
|
|
97
|
-
// measure; `--tranche i/n` plays the tasks of tests alone (`turbo run test:unit …`), with the
|
|
98
|
-
// builds they depend on, each package of Vitest playing the i-th of n parts of its test files
|
|
99
|
-
// (./tranches.mjs): the n tranches and `--sans-tests` together play the complete pass, each task
|
|
100
|
-
// once, as the CI plays it, one job each. A tranche is measured as the pass is (against the last
|
|
101
|
-
// green or its `--base`; complete with `--tout`), carries itself in the variable
|
|
102
|
-
// `GRILLHOUSE_TESTS`, which the hash of the tests counts (two tranches never replay one another
|
|
103
|
-
// from the cache), plays for real, since it writes its reports (./tranches.mjs, under
|
|
104
|
-
// `.vitest-reports/`, its former ones removed first), and never keeps its tree as the last green,
|
|
105
|
-
// green or not; neither does `--sans-tests`. A tranche not of the form `i/n` (1 ≤ i ≤ n), or given
|
|
106
|
-
// with `--gardes` or `--sans-tests`, is refused before any work, code 1.
|
|
107
|
-
// - The run plays without the paths of a targeted run's tests: the variable `GRILLHOUSE_TESTS`
|
|
108
|
-
// (scripts/langages/typescript/vitest-config/cibles.mjs) carries only `rejouer`, for a complete
|
|
109
|
-
// pass.
|
|
58
|
+
// (`.turbo/runs/<id>.json`), since Turborepo exits with the greatest code of its tasks. The
|
|
59
|
+
// summary is removed, and `.turbo/runs` with it when the run created it; under a results
|
|
60
|
+
// directory (`GRILLHOUSE_RESULTATS`) it goes there. A task at 0 is green; any other code, 75
|
|
61
|
+
// included, and a summary that does not read while Turborepo failed: red, code 1, each task named.
|
|
62
|
+
// - The progress (scripts/avancement.mjs): the directory `GRILLHOUSE_AVANCEMENT` names, else one
|
|
63
|
+
// of its own, named in the file of the part it holds (`nommerLAvancement`) and removed at its
|
|
64
|
+
// end. Before its run, the plan (`turbo run … --dry=json`) names the tasks of tests and counts
|
|
65
|
+
// done the files of those Turborepo replays from its cache.
|
|
66
|
+
// - The red tasks: while `GRILLHOUSE_ROUGES` (`ROUGES`) names a file, the pass writes there, once
|
|
67
|
+
// each, one line per task red on its own exit code: its id (`<package>#<task>`, `//#<task>`
|
|
68
|
+
// for the root), a tab, the command that replays it alone (`npx turbo run <task>
|
|
69
|
+
// --filter=<package>`); a task that did not play is none. Green, the file is empty. The night
|
|
70
|
+
// reads it for its bisect commands (scripts/nuit.sh).
|
|
71
|
+
// - The base of the pass (scripts/mesure/base-de-passe.mjs): in the temporary directory of its
|
|
72
|
+
// environment, swept first of the bases a killed pass left; every run of Turborepo gets it in
|
|
73
|
+
// TMPDIR, TMP and TEMP (`globalPassThroughEnv`, ./turbo-des-paquets.mjs); removed at the end,
|
|
74
|
+
// green, red or interrupted (SIGINT, SIGTERM, SIGHUP).
|
|
110
75
|
import { spawnSync } from 'node:child_process';
|
|
111
76
|
import { existsSync, readdirSync, readFileSync, rmdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
112
77
|
import { availableParallelism, tmpdir } from 'node:os';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// The lock of the dependencies (package-lock.json) against the package.json it locks, on the model
|
|
3
3
|
// of `npm ci`, which refuses a lock out of step with its package.json: the lock is written by the
|
|
4
4
|
// frame at the integration (`fichiersEngendres` of ./index.mjs), and this guard refuses a copy
|
|
5
|
-
// whose lock is late
|
|
5
|
+
// whose lock is late: the guard `verrou-des-dependances`
|
|
6
|
+
// (packages/grillhouse/docs/architecture/tests.md §3.4).
|
|
6
7
|
//
|
|
7
8
|
// npx grillhouse verrou-des-dependances run from the repository root (a guard of grillhouse:gardes)
|
|
8
9
|
//
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// done, then at the end of the run, every file done. The name of the record is made of the package
|
|
5
5
|
// directory it runs in and its process; it carries the hash of its Turborepo task (TURBO_HASH), by
|
|
6
6
|
// which the pass knows it again in Turborepo's cache (scripts/avancement.mjs).
|
|
7
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.1 (progress of a pass).
|
|
7
8
|
import { fileURLToPath } from 'node:url';
|
|
8
9
|
import { AVANCEMENT, ecrireTache } from '../../../services-du-noyau.mjs';
|
|
9
10
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// `@roomi-fields/grillhouse/vitest-config`: every Vitest configuration of a project extends it
|
|
3
3
|
// (`mergeConfig(base, defineConfig({ … }))`) and adds its own `include`, coverage and options
|
|
4
4
|
// without repeating what this file sets.
|
|
5
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.1, §4.2 (the temporary base),
|
|
6
|
+
// §5.4.
|
|
5
7
|
//
|
|
6
8
|
// - Every configuration imports it by its name (`import base from
|
|
7
9
|
// '@roomi-fields/grillhouse/vitest-config'`), the root's of a project as each package's, as the
|
|
@@ -58,9 +60,7 @@
|
|
|
58
60
|
// module typescript: what the tests left there at the end of the run, once Vitest removed its
|
|
59
61
|
// own directory, fails the run, each name written, the caches of the tools a test launches
|
|
60
62
|
// tolerated by name (`CACHES_DES_OUTILS`, below) (`baseDeVitest`, below; the base,
|
|
61
|
-
// scripts/mesure/base-de-passe.mjs).
|
|
62
|
-
// `mkdtempSync(path.join(tmpdir(), '<prefix>-'))` and removes it in `afterAll` (`rmSync`,
|
|
63
|
-
// `recursive` and `force`), a red test included.
|
|
63
|
+
// scripts/mesure/base-de-passe.mjs).
|
|
64
64
|
// - While a run names the progress directory of its pass (`GRILLHOUSE_AVANCEMENT`,
|
|
65
65
|
// scripts/mesure/avancement.mjs), the reporter of progress writes there the files done and planned of its
|
|
66
66
|
// task at each test file done, which the board reads (scripts/avancement.mjs,
|
|
@@ -95,8 +95,8 @@ const MARQUE = 'GRILLHOUSE_BASE_DE_VITEST';
|
|
|
95
95
|
* tests start, written out of the pass for good;
|
|
96
96
|
* - `claude-<uid>`: the temporary directory of Claude Code (`CLAUDE_CODE_TMPDIR`, else
|
|
97
97
|
* `os.tmpdir()`), where a claude a test launches keeps its scratchpads. Its variable named out
|
|
98
|
-
* of the pass would bring them back into the machine's /tmp (
|
|
99
|
-
*
|
|
98
|
+
* of the pass would bring them back into the machine's /tmp (one directory per envelope of a
|
|
99
|
+
* trial copy).
|
|
100
100
|
*/
|
|
101
101
|
const CACHES_DES_OUTILS = new Set(['node-compile-cache', `claude-${process.getuid?.() ?? ''}`]);
|
|
102
102
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// large. A module of its own, with no import: the configurations of Vitest (./base.mjs,
|
|
3
3
|
// ../vitest.nuit.config.mjs) are bundled by Vite and read only these numbers, while the
|
|
4
4
|
// classification that deduces a file's size (./delais.mjs) reads the guard of the sizes, a script.
|
|
5
|
+
// Mechanism: packages/grillhouse/docs/architecture/tests.md, §3.4 (the guard of the sizes).
|
|
5
6
|
|
|
6
7
|
/** The delay of each size, in ms (Bazel: small 60 s, medium 300 s, large 900 s). */
|
|
7
8
|
export const DELAIS_MS = { petit: 60000, moyen: 300000, grand: 900000 };
|