@@ -56,31 +56,37 @@ Otherwise returns an object with:
56
56
const result = {
57
57
58
58
// the `name` field of the `package.json`
59
- name: " package-name" ,
59
+ " name" : " package-name" ,
60
60
61
61
// the `version` field of the `package.json` when used with `path` / `repository`,
62
62
// the `latest` dist-tag version when used with `package`
63
- version: " 0.0.0" ,
63
+ " version" : " 0.0.0" ,
64
64
65
65
// the current time when the result is returned
66
- timestamp: 1577115956099 ,
66
+ " timestamp" : 1577115956099 ,
67
67
68
68
// git commit hash of the repository HEAD at the time of scanning
69
- commit: " 2de28c8c4ab8ac998d403509123736929131908c" ,
69
+ " commit" : " 2de28c8c4ab8ac998d403509123736929131908c" ,
70
70
71
71
// will be left out when not present in the `package.json`
72
72
// a copy of the `engines.node` field from the `package.json` if present
73
- engines: " >=x.y.z" ,
73
+ " engines" : " >=x.y.z" ,
74
74
75
75
// will be left out when `.travis.yml` file is not present
76
- travis: {
76
+ " travis" : {
77
77
// the list of versions as detected by inspecting `node_js` / `matrix` configuration
78
78
// will be an empty array when no versions are detected or the project is not a Node.js project
79
79
// will contain "latest" when `language: node_js` specified, but no explicit versions detected
80
- raw: [" 8" , " 10" , " lts/*" ],
81
-
82
- // raw version specifiers and keywords resolved to exact Node.js versions
83
- resolved: [" 8.17.0" , " 10.18.0" , " 12.14.0" ]
80
+ " raw" : [" 8" , " 10" , " lts/*" , " invalid-specifier" ],
81
+
82
+ // raw version specifiers and keywords (as keys) resolved to exact Node.js versions (as values)
83
+ // the value will be `false` when the specifier/keyword is unrecognized
84
+ " resolved" : {
85
+ " 8" : " 8.17.0" ,
86
+ " 10" : " 10.18.0" ,
87
+ " lts/*" : " 12.14.0" ,
88
+ " invalid-specifier" : false
89
+ }
84
90
}
85
91
}
86
92
```
0 commit comments