@@ -56,31 +56,37 @@ Otherwise returns an object with:
5656const result = {
5757
5858 // the `name` field of the `package.json`
59- name: " package-name" ,
59+ " name" : " package-name" ,
6060
6161 // the `version` field of the `package.json` when used with `path` / `repository`,
6262 // the `latest` dist-tag version when used with `package`
63- version: " 0.0.0" ,
63+ " version" : " 0.0.0" ,
6464
6565 // the current time when the result is returned
66- timestamp: 1577115956099 ,
66+ " timestamp" : 1577115956099 ,
6767
6868 // git commit hash of the repository HEAD at the time of scanning
69- commit: " 2de28c8c4ab8ac998d403509123736929131908c" ,
69+ " commit" : " 2de28c8c4ab8ac998d403509123736929131908c" ,
7070
7171 // will be left out when not present in the `package.json`
7272 // a copy of the `engines.node` field from the `package.json` if present
73- engines: " >=x.y.z" ,
73+ " engines" : " >=x.y.z" ,
7474
7575 // will be left out when `.travis.yml` file is not present
76- travis: {
76+ " travis" : {
7777 // the list of versions as detected by inspecting `node_js` / `matrix` configuration
7878 // will be an empty array when no versions are detected or the project is not a Node.js project
7979 // 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+ }
8490 }
8591}
8692```
0 commit comments