Nx adapter: map files and test files to Nx projects from `nx graph`

Ouverte
#112 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
56/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
node.js, typescript
Domaine
devtools, testing

Piste de recherche

Start with the adapter interface in src/repo/adapters/types.ts and trace how repository adapters assign test files and package dependencies. Check how verify and observe --no-send handle repository analysis before deciding where the Nx graph can be used safely. Add a small Nx fixture with one inferred and one explicit test target; done means ownership and dependency edges are covered, and graph failures follow the stated blocker behavior.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

adapter enhancement help wanted

Part of #111.

  • Detect Nx: nx.json at the root and nx in the root manifest.
  • Run the repository's own Nx: node_modules/.bin/nx graph --file=<tmp>.json with NX_DAEMON=false, NX_NO_CLOUD=true and a timeout. Plugin-inferred targets (@nx/vite/plugin, @nx/jest/plugin) only exist after Nx evaluates its plugins, so reading project.json alone would miss them.
  • Running Nx executes plugin code. verify may do it. observe --no-send should use the graph only from a cache for the same tree, or with an explicit flag.
  • Contribute through the adapter interface (src/repo/adapters/types.ts):
    • project ownership of test files (testPackages, deepest project root wins);
    • implicitDependencies and Nx-detected project dependencies as package-level edges.
  • Blockers: Nx fails to produce a graph (global); a target with an executor DiffCI can't narrow (scoped to that project).
  • Fixture: a small Nx workspace with one inferred and one explicit test target.
Langage dominant
TypeScript
Étoiles
0
Forks
4
Merge moyen
18 h 41 min
PR mergées (30 j)
48

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de DiffCI/core

Toutes les issues de DiffCI/core

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.