Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
allow dev and peer dependency list (#22)
Browse files Browse the repository at this point in the history
Allow dev and peer dependency list
  • Loading branch information
amadden80 authored and konraddysput committed Feb 6, 2019
1 parent 9a87e60 commit 32ff40c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/test"
],
"internalConsoleOptions": "openOnSessionStart"
}
]
}
7 changes: 6 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,12 @@ function populateDependencyTree(deps, rootModule, rootPackageJson, mod) {
} else {
var newDeps = {};
curDeps[item.packageJson.name] = {
requestedVersion: curParentJson.dependencies[item.packageJson.name],
requestedVersion:
(curParentJson.dependencies &&
curParentJson.dependencies[item.packageJson.name]) ||
(curParentJson.peerDependencies &&
curParentJson.peerDependencies[item.packageJson.name]) ||
curParentJson.devDependencies[item.packageJson.name],
installedVersion: item.packageJson.version,
dependencies: newDeps,
};
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": "backtrace-node",
"version": "0.8.0",
"version": "0.8.1",
"description": "Backtrace error reporting tool",
"main": "lib/index.js",
"author": "Backtrace <team@backtrace.io>",
Expand Down

0 comments on commit 32ff40c

Please sign in to comment.