es-module-loader
Advanced tools
| import { addToError, createSymbol } from './common.js'; | ||
| export { Loader, ModuleNamespace } | ||
| export { Loader, ModuleNamespace, REGISTRY } | ||
@@ -139,3 +139,2 @@ var resolvedPromise = Promise.resolve(); | ||
| this[REGISTRY] = {}; | ||
| this._registry = REGISTRY; | ||
| } | ||
@@ -142,0 +141,0 @@ // 4.4.1 |
+21
-10
@@ -1,2 +0,2 @@ | ||
| import { Loader, ModuleNamespace } from './loader-polyfill.js'; | ||
| import { Loader, ModuleNamespace, REGISTRY } from './loader-polyfill.js'; | ||
| import { resolveIfNotPlain } from './resolve.js'; | ||
@@ -119,3 +119,3 @@ import { addToError, global, createSymbol, baseURI } from './common.js'; | ||
| var state = this[REGISTER_INTERNAL]; | ||
| var registry = loader.registry[loader.registry._registry]; | ||
| var registry = this.registry[REGISTRY]; | ||
@@ -127,7 +127,12 @@ return resolveInstantiate(loader, key, parentKey, registry, state) | ||
| // if already beaten to linked, return | ||
| if (instantiated.module) | ||
| return instantiated.module; | ||
| // resolveInstantiate always returns a load record with a link record and no module value | ||
| let link = instantiated.linkRecord; | ||
| // resolveInstantiate always returns a load record with a link record and no module value | ||
| // if already beaten to done, return | ||
| if (!link) { | ||
| if (instantiated.module) | ||
| return instantiated.module; | ||
| throw instantiated.evalError; | ||
| } | ||
| if (instantiated.linkRecord.linked) | ||
@@ -153,4 +158,7 @@ return ensureEvaluate(loader, instantiated, instantiated.linkRecord, registry, state, undefined); | ||
| // already linked but not in main registry is ignored | ||
| if (load && !load.module) | ||
| if (load && !load.module) { | ||
| if (load.loadError) | ||
| return Promise.reject(load.loadError); | ||
| return instantiate(loader, load, load.linkRecord, registry, state); | ||
| } | ||
@@ -173,2 +181,5 @@ return loader.resolve(key, parentKey) | ||
| if (load.loadError) | ||
| return Promise.reject(load.loadError); | ||
| var link = load.linkRecord; | ||
@@ -293,2 +304,5 @@ if (!link) | ||
| if (load && load.loadError) | ||
| throw load.loadError; | ||
| // already has a module value but not already in the registry (load.module) | ||
@@ -409,5 +423,2 @@ // means it was removed by registry.delete, so we should | ||
| if (depLoad.loadError) | ||
| throw depLoad.loadError; | ||
| if (!depLink || depLink.linked) | ||
@@ -414,0 +425,0 @@ continue; |
+1
-1
| { | ||
| "name": "es-module-loader", | ||
| "description": "An ES Module Loader shim", | ||
| "version": "2.2.1", | ||
| "version": "2.2.2", | ||
| "homepage": "https://github.com/ModuleLoader/es-module-loader", | ||
@@ -6,0 +6,0 @@ "author": { |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
264145
0.08%8785
0.09%