Comparing version 0.1.1 to 0.1.2
@@ -207,5 +207,21 @@ //------------------------------------------------------------------------------- | ||
//------------------------------------------------------------------------------- | ||
// Global | ||
//------------------------------------------------------------------------------- | ||
// NOTE BRN: We store the BugPackApi in global context so that we can cross load BugPackContexts in the same process. | ||
// We can't do this simply through the require() mechanism because each file loads its BugPack based on | ||
// what dependency is relative to the current node js module. So if you are cross loading contexts, you end up with | ||
// an entirely different BugPackApi that has no contexts at all in memory. | ||
//TODO BRN: Add a version check to throw an error when different versions of bugpack cross load. | ||
if (!global.BugPackApi) { | ||
global.BugPackApi = BugPackApi; | ||
} | ||
//------------------------------------------------------------------------------- | ||
// Exports | ||
//------------------------------------------------------------------------------- | ||
module.exports = BugPackApi; | ||
module.exports = global.BugPackApi; |
{ | ||
"name": "bugpack", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Package loader to help make browser and node js package loading consistent", | ||
@@ -5,0 +5,0 @@ "main": "./lib/BugPackApi.js", |
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
54484
1586