Conversation
README.md
Outdated
| * Documentation Completeness: High quality documentation makes the project easier to adopt and use (README, API References, Usage Examples). | ||
| * Tests checklist (unit/snapshot): Tests ensure correctness and prevent regressions. | ||
| * Author Track Record: Measures how many packages the author has published, more published packages often indicate greater experience. | ||
| * Stable versioning (>=1.x.x, not deprecated): Indicates API maturity and stability. |
There was a problem hiding this comment.
nit: its confusing why you are adding more than 'author track record' to the readme. i assume this is because you forgot to for some other signals and now are reading, but its not good to force the reviewer to make assumption
There was a problem hiding this comment.
Do you want me to remove this and make a separate PR for this or write about why I added this in the PR description?
src/lib/data/npm.ts
Outdated
| } | ||
|
|
||
| async fetchAuthorPackageCount(): Promise<number | undefined> { | ||
| // Use the first maintainer to search for their packages (libraries can have multiple maintainers) |
There was a problem hiding this comment.
why first? is it guaranteed that npm returns the same order each time? how do they order it?
i would expect something like this is more robust:
- pick the "best" maintainer for the score.
- pick the "average" score of all maintainers.
- accumulate the package count for each maintainer
There was a problem hiding this comment.
picked best maintainer
src/lib/data/npm.ts
Outdated
| } | ||
|
|
||
| try { | ||
| const response = await fetch(`https://registry.npmjs.org/-/v1/search?text=maintainer:${encodeURIComponent(maintainer.name)}&size=1`); |
There was a problem hiding this comment.
this (and your other fetch calls) are ugly. in a separate PR, see if you can refactor and "build" these endpoints in a helper function so you don't have string concatenation as part of the main fetchAuthorPackageCount function
src/lib/config.ts
Outdated
| name: 'authorTrackRecord', | ||
| weight: 3, | ||
| description: 'Track record of strong authors', | ||
| benchmarks: (packageCount: number) => categorizeHigherIsBetter([20, 11, 5, 2], packageCount), |
There was a problem hiding this comment.
track record doesn't make sense to me. the number you are returning is package count, not track record. i can see how it would correlate, but calling the number track record is confusing.
There was a problem hiding this comment.
updated to package count
This PR adds a new quality signal that tracks the number of packages published by a package's primary maintainer on NPM.
Changes
Scoring
Example CLI Input and Output: