Skip to content

Commit 05366d7

Browse files
Copilotvoxpelli
andcommitted
Add distinct errors to all three examples
- basic: meow engine mismatch (requires Node >=20, package specifies >=18.6.0) - monorepo root: shows both root's meow issue AND workspace-a's knip issue - workspace-a: knip engine mismatch (requires Node >=18.18.0, package specifies >=18.6.0) - Demonstrates that parent's meow issue is excluded due to includeWorkspaceRoot: false All three examples now have non-empty, different outputs that demonstrate distinct aspects of the tool's functionality. Co-authored-by: voxpelli <34457+voxpelli@users.noreply.github.com>
1 parent 33ce039 commit 05366d7

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

examples/monorepo/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ node cli-wrapper.cjs examples/monorepo
3838
Errors:
3939
4040
root: meow: Narrower "engines.node" is needed: >=20.0.0
41+
workspace-a: knip: Narrower "engines.node" is needed: >=18.18.0
4142
4243
Suggestions:
4344
4445
root: Combined "engines.node" needs to be narrower: >=20.0.0
46+
workspace-a: Combined "engines.node" needs to be narrower: >=18.18.0
4547
```
4648
<!-- END EXPECTED OUTPUT -->
4749

examples/monorepo/packages/workspace-a/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This workspace is part of the monorepo example and demonstrates automatic parent
66

77
This workspace:
88
- Depends on `chalk@^4.0.0` (installed in parent's node_modules)
9-
- Has a clean configuration with no errors
9+
- Has `knip@^5.0.0` in devDependencies (requires Node >=18.18.0, narrower than package's >=18.6.0)
1010

1111
The parent monorepo root has a `meow` dependency with an engine issue, but that issue does NOT appear when checking this workspace because `includeWorkspaceRoot` is set to `false` when using parent workspace detection.
1212

@@ -31,17 +31,23 @@ When you run `installed-check` in this workspace:
3131
1. **Parent detection**: Automatically detects the parent monorepo at `examples/monorepo`
3232
2. **Module resolution**: Uses the parent's `node_modules` for finding dependencies
3333
3. **Filtered checking**: Only checks this workspace package, not the parent (includeWorkspaceRoot: false)
34-
4. **Validation**: Passes cleanly - the root's meow issue is excluded
34+
4. **Validation**: Shows knip engine issue - but the parent's meow issue is correctly excluded
3535

3636
## Example Output
3737

3838
<!-- BEGIN EXPECTED OUTPUT -->
3939
```
40+
Errors:
4041
42+
workspace-a: knip: Narrower "engines.node" is needed: >=18.18.0
43+
44+
Suggestions:
45+
46+
workspace-a: Combined "engines.node" needs to be narrower: >=18.18.0
4147
```
4248
<!-- END EXPECTED OUTPUT -->
4349

44-
The empty output indicates success - this workspace has no issues, and the parent's issue is excluded.
50+
This shows the knip engine requirement issue in this workspace. Note that the parent's meow issue does NOT appear because `includeWorkspaceRoot: false` excludes the parent from checks.
4551

4652
### Debug Output
4753

examples/monorepo/packages/workspace-a/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"dependencies": {
77
"chalk": "^4.0.0"
88
},
9+
"devDependencies": {
10+
"knip": "^5.0.0"
11+
},
912
"engines": {
1013
"node": ">=18.6.0"
1114
}

0 commit comments

Comments
 (0)