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

Open
#112 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
56/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript
Domain
devtools, testing

Research direction

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.

Written by the indexing model from the issue text.

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.
Dominant language
TypeScript
Stars
0
Forks
4
Avg merge
18h 41m
Merged PRs (30d)
48

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiffCI/core

All issues in DiffCI/core

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.