hadron-package-manager
Advanced tools
Comparing version 3.0.1 to 4.0.0
@@ -35,2 +35,3 @@ 'use strict'; | ||
this.packagePath = packagePath; | ||
this.isActivated = false; | ||
try { | ||
@@ -55,12 +56,5 @@ this.metadata = require(path.resolve(this.packagePath, PACKAGE_FILENAME)); | ||
} | ||
try { | ||
const module = require(path.resolve(this.packagePath, this.metadata.main)); | ||
Cache[this.packagePath] = module; | ||
return module; | ||
} catch (e) { | ||
debug(e.message); | ||
const module = { activate: () => {}, deactivate: () => {}}; | ||
Cache[this.packagePath] = module; | ||
return module; | ||
} | ||
const module = require(path.resolve(this.packagePath, this.metadata.main)); | ||
Cache[this.packagePath] = module; | ||
return module; | ||
} | ||
@@ -77,3 +71,9 @@ | ||
activate(appRegistry) { | ||
return this.load().activate(appRegistry); | ||
try { | ||
const value = this.load().activate(appRegistry); | ||
this.isActivated = true; | ||
return value; | ||
} catch (e) { | ||
this.error = e; | ||
} | ||
} | ||
@@ -80,0 +80,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
"homepage": "https://github.com/mongodb-js/hadron-package-manager", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"repository": { | ||
@@ -10,0 +10,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17582