Skip to content

Commit 6c8f8a6

Browse files
committed
docs: require a git repo, scan HEAD for package/repo
CI versions only make sense when coupled with a git repo. Scanning for older versions makes no sense, because the intent here is to detect _forward_ support - the past/current releases are locked to the versions they already tested in.
1 parent 7cc34de commit 6c8f8a6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,24 @@ const result = await require('node-support').detect({ repository });
4848

4949
- Throws if the `path` / `repository` does not have a `package.json`
5050
- Throws if `package` does not exist in the registry
51+
- Throws when unable to detect a git repository for the package
5152

5253
Otherwise returns an object with:
5354

5455
```javascript
5556
const result = {
5657

57-
// the "name" field of the `package.json`
58+
// the `name` field of the `package.json`
5859
name: "package-name",
5960

60-
// the "version" field of the `package.json` when used with `path` / `repository`,
61+
// the `version` field of the `package.json` when used with `path` / `repository`,
6162
// the `latest` dist-tag version when used with `package`
6263
version: "0.0.0",
6364

6465
// the current time when the result is returned
6566
timestamp: 1577115956099,
6667

67-
// git commit hash of the repository HEAD at the time of scanning `path` / `repository`
68-
// git commit hash for git tag of the `version` when used with `package`
69-
// will be left out when no git repository detected
68+
// git commit hash of the repository HEAD at the time of scanning
7069
commit: "2de28c8c4ab8ac998d403509123736929131908c",
7170

7271
// will be left out when not present in the `package.json`

0 commit comments

Comments
 (0)