Skip to content

Commit cf11551

Browse files
Coly010nx-cloud[bot]
authored andcommitted
feat(misc): update PLUGIN.md files to help agents verification (#34379)
## Current Behavior There is currently no plugin.md file for Gradle. Other plugin.md files can be improved ## Expected Behavior Add plugin.md file for Gradle to aid with verification with Agents. Add plugin.md file for Vite for workspaces that have not migrated to @nx/vitest. ## Related Issue(s) CLOSES NXC-3843 --------- Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com> Co-authored-by: Coly010 <Coly010@users.noreply.github.com> (cherry picked from commit 5a1735b)
1 parent ff1b8d8 commit cf11551

7 files changed

Lines changed: 78 additions & 57 deletions

File tree

packages/cypress/PLUGIN.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ Check in order (first match wins):
88

99
| Mode | Detection |
1010
| --------- | ------------------------------------------------------ |
11-
| Atomized | `ciTargetName` in nx.json `@nx/cypress` plugin options |
1211
| Inference | `@nx/cypress/plugin` in nx.json plugins array |
1312
| Executor | `@nx/cypress:cypress` executor in project.json targets |
1413

1514
## Run Specific Test File
1615

17-
### Atomized
18-
19-
```bash
20-
nx run <project>:<ciTargetName>--<path/to/file.cy.ts>
21-
# Example: nx run my-app-e2e:e2e-ci--src/login.cy.ts
22-
```
23-
2416
### Inference
2517

2618
```bash
@@ -35,7 +27,7 @@ nx run <project>:e2e --spec=<path/to/file.cy.ts>
3527

3628
## Quick Reference
3729

38-
| Task | Atomized | Inference | Executor |
39-
| ----------- | ------------------------------------- | --------------------------------------- | ---------------------------------------- |
40-
| Run file | `nx run proj:e2e-ci--path/file.cy.ts` | `nx e2e proj -- --spec=path/file.cy.ts` | `nx run proj:e2e --spec=path/file.cy.ts` |
41-
| Run pattern | N/A | `nx e2e proj -- --spec="**/*login*"` | `nx run proj:e2e --spec="**/*login*"` |
30+
| Task | Inference | Executor |
31+
| ----------- | --------------------------------------- | ---------------------------------------- |
32+
| Run file | `nx e2e proj -- --spec=path/file.cy.ts` | `nx run proj:e2e --spec=path/file.cy.ts` |
33+
| Run pattern | `nx e2e proj -- --spec="**/*login*"` | `nx run proj:e2e --spec="**/*login*"` |

packages/gradle/PLUGIN.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Gradle
2+
3+
After making changes to a project, run the relevant test class(es) to verify your changes work correctly.
4+
5+
## Run Specific Test Class
6+
7+
Use the `test` target with the `--testClassName` flag to filter by class name:
8+
9+
```bash
10+
nx test <project> --testClassName=<ClassName>
11+
# Example: nx test my-app --testClassName=DemoApplicationTest
12+
```
13+
14+
## Quick Reference
15+
16+
| Task | Command |
17+
| -------------- | -------------------------------------------------- |
18+
| Run test class | `nx test proj --testClassName=DemoApplicationTest` |
19+
| Run all tests | `nx test proj` |

packages/gradle/project-graph/src/main/kotlin/dev/nx/gradle/utils/CiTargetsUtils.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ private fun buildTestCiTarget(
118118
"taskName" to "${projectBuildPath}:${testTask.name}",
119119
"testClassName" to testClassPackagePath),
120120
"metadata" to
121-
getMetadata("Runs Gradle test $testClassPackagePath in CI", projectBuildPath, "test"),
121+
getMetadata(
122+
"Runs Gradle test $testClassPackagePath in CI.", projectBuildPath, "test"),
122123
"cache" to true,
123124
"inputs" to taskInputs)
124125

packages/jest/PLUGIN.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,13 @@ After making changes to a project, run the relevant test file to verify your cha
66

77
Check in order (first match wins):
88

9-
| Mode | Detection |
10-
| --------- | --------------------------------------------------- |
11-
| Atomized | `ciTargetName` in nx.json `@nx/jest` plugin options |
12-
| Inference | `@nx/jest/plugin` in nx.json plugins array |
13-
| Executor | `@nx/jest:jest` executor in project.json targets |
9+
| Mode | Detection |
10+
| --------- | ------------------------------------------------ |
11+
| Inference | `@nx/jest/plugin` in nx.json plugins array |
12+
| Executor | `@nx/jest:jest` executor in project.json targets |
1413

1514
## Run Specific Test File
1615

17-
### Atomized
18-
19-
```bash
20-
nx run <project>:<ciTargetName>--<path/to/file.spec.ts>
21-
# Example: nx run my-lib:test-ci--src/utils.spec.ts
22-
```
23-
2416
### Inference
2517

2618
```bash
@@ -35,7 +27,7 @@ nx run <project>:test --testFile=<path/to/file.spec.ts>
3527

3628
## Quick Reference
3729

38-
| Task | Atomized | Inference | Executor |
39-
| ----------- | ---------------------------------------- | ----------------------------------------------------- | ----------------------------------------------- |
40-
| Run file | `nx run proj:test-ci--path/file.spec.ts` | `nx test proj -- --testPathPattern=path/file.spec.ts` | `nx run proj:test --testFile=path/file.spec.ts` |
41-
| Run pattern | N/A | `nx test proj -- -t "pattern"` | `nx run proj:test --testNamePattern="pattern"` |
30+
| Task | Inference | Executor |
31+
| ----------- | ----------------------------------------------------- | ----------------------------------------------- |
32+
| Run file | `nx test proj -- --testPathPattern=path/file.spec.ts` | `nx run proj:test --testFile=path/file.spec.ts` |
33+
| Run pattern | `nx test proj -- -t "pattern"` | `nx run proj:test --testNamePattern="pattern"` |

packages/playwright/PLUGIN.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ Check in order (first match wins):
88

99
| Mode | Detection |
1010
| --------- | ------------------------------------------------------------ |
11-
| Atomized | `ciTargetName` in nx.json `@nx/playwright` plugin options |
1211
| Inference | `@nx/playwright/plugin` in nx.json plugins array |
1312
| Executor | `@nx/playwright:playwright` executor in project.json targets |
1413

1514
## Run Specific Test File
1615

17-
### Atomized
18-
19-
```bash
20-
nx run <project>:<ciTargetName>--<path/to/file.spec.ts>
21-
# Example: nx run my-app-e2e:e2e-ci--src/login.spec.ts
22-
```
23-
2416
### Inference
2517

2618
```bash
@@ -35,7 +27,7 @@ nx run <project>:e2e --testFiles=<path/to/file.spec.ts>
3527

3628
## Quick Reference
3729

38-
| Task | Atomized | Inference | Executor |
39-
| ----------- | --------------------------------------- | ---------------------------------- | ----------------------------------------------- |
40-
| Run file | `nx run proj:e2e-ci--path/file.spec.ts` | `nx e2e proj -- path/file.spec.ts` | `nx run proj:e2e --testFiles=path/file.spec.ts` |
41-
| Run pattern | N/A | `nx e2e proj -- --grep="pattern"` | `nx run proj:e2e --grep="pattern"` |
30+
| Task | Inference | Executor |
31+
| ----------- | ---------------------------------- | ----------------------------------------------- |
32+
| Run file | `nx e2e proj -- path/file.spec.ts` | `nx run proj:e2e --testFiles=path/file.spec.ts` |
33+
| Run pattern | `nx e2e proj -- --grep="pattern"` | `nx run proj:e2e --grep="pattern"` |

packages/vite/PLUGIN.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Vite with Vitest
2+
3+
After making changes to a project, run the relevant test file to verify your changes work correctly.
4+
5+
## Mode Detection
6+
7+
Check in order (first match wins):
8+
9+
| Mode | Detection |
10+
| --------- | ---------------------------------------------------------- |
11+
| Inference | `@nx/vitest` or `@nx/vite/plugin` in nx.json plugins array |
12+
| Executor | `@nx/vitest:test` executor in project.json targets |
13+
14+
## Run Specific Test File
15+
16+
### Inference
17+
18+
```bash
19+
nx test <project> -- <path/to/file.spec.ts>
20+
```
21+
22+
### Executor
23+
24+
```bash
25+
nx run <project>:test --testFile=<path/to/file.spec.ts>
26+
```
27+
28+
## Quick Reference
29+
30+
| Task | Inference | Executor |
31+
| ----------- | ----------------------------------- | ----------------------------------------------- |
32+
| Run file | `nx test proj -- path/file.spec.ts` | `nx run proj:test --testFile=path/file.spec.ts` |
33+
| Run pattern | `nx test proj -- -t "pattern"` | `nx run proj:test --testNamePattern="pattern"` |

packages/vitest/PLUGIN.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,13 @@ After making changes to a project, run the relevant test file to verify your cha
66

77
Check in order (first match wins):
88

9-
| Mode | Detection |
10-
| --------- | ------------------------------------------------------------------- |
11-
| Atomized | `ciTargetName` in nx.json `@nx/vitest` or `@nx/vite` plugin options |
12-
| Inference | `@nx/vitest` or `@nx/vite/plugin` in nx.json plugins array |
13-
| Executor | `@nx/vitest:test` executor in project.json targets |
9+
| Mode | Detection |
10+
| --------- | ---------------------------------------------------------- |
11+
| Inference | `@nx/vitest` or `@nx/vite/plugin` in nx.json plugins array |
12+
| Executor | `@nx/vitest:test` executor in project.json targets |
1413

1514
## Run Specific Test File
1615

17-
### Atomized
18-
19-
```bash
20-
nx run <project>:<ciTargetName>--<path/to/file.spec.ts>
21-
# Example: nx run my-lib:test-ci--src/utils.spec.ts
22-
```
23-
2416
### Inference
2517

2618
```bash
@@ -35,7 +27,7 @@ nx run <project>:test --testFile=<path/to/file.spec.ts>
3527

3628
## Quick Reference
3729

38-
| Task | Atomized | Inference | Executor |
39-
| ----------- | ---------------------------------------- | ----------------------------------- | ----------------------------------------------- |
40-
| Run file | `nx run proj:test-ci--path/file.spec.ts` | `nx test proj -- path/file.spec.ts` | `nx run proj:test --testFile=path/file.spec.ts` |
41-
| Run pattern | N/A | `nx test proj -- -t "pattern"` | `nx run proj:test --testNamePattern="pattern"` |
30+
| Task | Inference | Executor |
31+
| ----------- | ----------------------------------- | ----------------------------------------------- |
32+
| Run file | `nx test proj -- path/file.spec.ts` | `nx run proj:test --testFile=path/file.spec.ts` |
33+
| Run pattern | `nx test proj -- -t "pattern"` | `nx run proj:test --testNamePattern="pattern"` |

0 commit comments

Comments
 (0)