Skip to content

Commit

Permalink
#6
Browse files Browse the repository at this point in the history
  • Loading branch information
arfeo committed Aug 21, 2019
1 parent d27d032 commit 852f14c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class NpmAddDependencies {
};

runNpmShow(dep) {
const [depName, depVersion] = dep.split('@');
const depSplit = dep.split('@');
const [depName, depVersion] = dep.charAt(0) !== '@' ? depSplit : [`@${depSplit[1]}`, depSplit[2]];

if (depVersion) {
const depRange = semver.validRange(depVersion) || '';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npm-add-dependencies",
"version": "0.2.0",
"version": "0.2.1",
"description": "Add dependencies (latest versions) to the package.json file without installing them",
"repository": {
"type": "git",
Expand Down

0 comments on commit 852f14c

Please sign in to comment.