fix: nameVerFromPkgSnapshot() always returns name and version

This commit is contained in:
Zoltan Kochan
2018-04-12 02:38:58 +03:00
parent 59a8c798c1
commit 6b2abc89d4
3 changed files with 4 additions and 6 deletions

View File

@@ -54,7 +54,7 @@
"@types/js-yaml": "^3.10.1",
"@types/node": "^9.3.0",
"@types/ramda": "^0.25.12",
"dependency-path": "^1.0.0",
"dependency-path": "^1.2.1",
"get-npm-tarball-url": "^2.0.1",
"js-yaml": "^3.8.4",
"load-yaml-file": "^0.1.0",

View File

@@ -1506,7 +1506,7 @@ specifiers:
'@types/node': ^9.3.0
'@types/ramda': ^0.25.12
'@types/tape': ^4.2.30
dependency-path: ^1.0.0
dependency-path: ^1.2.1
get-npm-tarball-url: ^2.0.1
js-yaml: ^3.8.4
load-yaml-file: ^0.1.0

View File

@@ -8,10 +8,8 @@ export default (
if (!pkgSnapshot.name) {
const pkgInfo = dp.parse(relDepPath)
return {
// tslint:disable:no-string-literal
name: pkgInfo['name'],
version: pkgInfo['version'],
// tslint:enable:no-string-literal
name: pkgInfo.name as string,
version: pkgInfo.version as string,
}
}
return {