Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flora-colossus

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flora-colossus - npm Package Compare versions

Comparing version 0.0.3 to 1.0.0

yarn.lock

5

lib/depTypes.d.ts

@@ -5,5 +5,6 @@ export declare enum DepType {

OPTIONAL = 2,
ROOT = 3,
DEV_OPTIONAL = 3,
ROOT = 4,
}
export declare const depTypeGreater: (newType: DepType, existing: DepType) => boolean;
export declare const childDepType: (parentType: DepType, childType: DepType) => DepType.PROD | DepType.DEV | DepType.OPTIONAL;
export declare const childDepType: (parentType: DepType, childType: DepType) => DepType.PROD | DepType.DEV | DepType.OPTIONAL | DepType.DEV_OPTIONAL;

22

lib/depTypes.js

@@ -8,3 +8,4 @@ "use strict";

DepType[DepType["OPTIONAL"] = 2] = "OPTIONAL";
DepType[DepType["ROOT"] = 3] = "ROOT";
DepType[DepType["DEV_OPTIONAL"] = 3] = "DEV_OPTIONAL";
DepType[DepType["ROOT"] = 4] = "ROOT";
})(DepType = exports.DepType || (exports.DepType = {}));

@@ -20,5 +21,17 @@ exports.depTypeGreater = function (newType, existing) {

case DepType.DEV:
case DepType.DEV_OPTIONAL:
default:
return false;
}
case DepType.DEV_OPTIONAL:
switch (newType) {
case DepType.OPTIONAL:
case DepType.PROD:
case DepType.ROOT:
case DepType.DEV:
return true;
case DepType.DEV_OPTIONAL:
default:
return false;
}
case DepType.OPTIONAL:

@@ -31,2 +44,3 @@ switch (newType) {

case DepType.DEV:
case DepType.DEV_OPTIONAL:
default:

@@ -42,2 +56,3 @@ return false;

case DepType.DEV:
case DepType.DEV_OPTIONAL:
default:

@@ -52,2 +67,3 @@ return false;

case DepType.DEV:
case DepType.DEV_OPTIONAL:
default:

@@ -73,3 +89,7 @@ return false;

return DepType.OPTIONAL;
case DepType.DEV_OPTIONAL:
return DepType.DEV_OPTIONAL;
case DepType.DEV:
if (childType === DepType.OPTIONAL)
return DepType.DEV_OPTIONAL;
return DepType.DEV;

@@ -76,0 +96,0 @@ }

@@ -108,3 +108,3 @@ "use strict";

// If we can't find it the install is probably buggered
if (!discoveredPath && depType !== depTypes_1.DepType.OPTIONAL) {
if (!discoveredPath && depType !== depTypes_1.DepType.OPTIONAL && depType !== depTypes_1.DepType.DEV_OPTIONAL) {
throw new Error("Failed to locate module \"" + moduleName + "\" from \"" + modulePath + "\"\n\n This normally means that either you have deleted this package already somehow (check your ignore settings if using electron-packager). Or your module installation failed.");

@@ -165,3 +165,3 @@ }

moduleName = _a[_i];
// npm decides it's a funny thing to put optioanl dependencies in the "dependencies" section
// npm decides it's a funny thing to put optional dependencies in the "dependencies" section
// after install, because that makes perfect sense

@@ -168,0 +168,0 @@ if (moduleName in pJ.optionalDependencies) {

{
"name": "flora-colossus",
"version": "0.0.3",
"version": "1.0.0",
"description": "Walks your node_modules tree",

@@ -26,2 +26,3 @@ "main": "lib/index.js",

"mocha": "^4.1.0",
"sane": "^2.5.0",
"ts-node": "^4.1.0",

@@ -28,0 +29,0 @@ "typescript": "^2.4.2"

@@ -22,2 +22,3 @@ Flora Colossus

// DepType.DEV --> Development dependency
// DepType.DEV_OPTIONAL --> Optional dependency of a development dependency
// DepType.ROOT --> The root module

@@ -24,0 +25,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc