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

es-module-loader

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-module-loader - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

3

core/loader-polyfill.js
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

@@ -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;

{
"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": {

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