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

systemjs

Package Overview
Dependencies
Maintainers
1
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systemjs - npm Package Compare versions

Comparing version 6.1.4 to 6.1.5

0

CHANGELOG.md

@@ -0,0 +0,0 @@ SystemJS 6.1.4 (2019/10/12)

18

dist/extras/amd.js

@@ -13,2 +13,4 @@ /*

let tmpRegister;
function emptyFn () {}

@@ -82,2 +84,5 @@

systemPrototype.getRegister = function () {
if (tmpRegister)
return tmpRegister;
const register = getRegister.call(this);

@@ -104,3 +109,3 @@ // if its an actual System.register leave it

throw Error('Include the named register extension for SystemJS named AMD support.');
System.registerRegistry[name] = createAMDRegister(deps, execute);
addToRegisterRegistry(name, createAMDRegister(deps, execute));
amdDefineDeps = [];

@@ -112,3 +117,3 @@ amdDefineExec = emptyFn;

if (System.registerRegistry)
System.registerRegistry[name] = createAMDRegister([].concat(deps), execute);
addToRegisterRegistry(name, createAMDRegister([].concat(deps), execute));
name = deps;

@@ -135,2 +140,11 @@ deps = execute;

global.define.amd = {};
function addToRegisterRegistry(name, define) {
// We must call System.getRegister() here to give other extras, such as the named-exports extra,
// a chance to modify the define before it's put into the registerRegistry.
// See https://github.com/systemjs/systemjs/issues/2073
tmpRegister = define;
System.registerRegistry[name] = System.getRegister();
tmpRegister = null;
}
})(typeof self !== 'undefined' ? self : global);

2

dist/extras/amd.min.js

@@ -1,1 +0,1 @@

!function(t){const e=t.System.constructor.prototype,n=[[],function(){return{}}];function r(){throw Error("AMD require not supported.")}function s(){}const o=["require","exports","module"];function i(t,e){const n={},s={exports:n},o=[],i=[];let u=0;for(let e=0;e<t.length;e++){const f=t[e],c=i.length;if("require"===f)o[e]=r,u++;else if("module"===f)o[e]=s,u++;else if("exports"===f)o[e]=n,u++;else{const t=e;i.push(function(e){o[t]=e.__useDefault?e.default:e})}u&&(t[c]=f)}u&&(t.length-=u);const f=e;return[t,function(t){return t({default:n,__useDefault:!0}),{setters:i,execute:function(){s.exports=f.apply(n,o)||s.exports,n!==s.exports&&t("default",s.exports)}}}]}let u;const f=e.register;e.register=function(t,e,n){u="string"==typeof t?n:e,f.apply(this,arguments)};const c=e.instantiate;e.instantiate=function(){return p=null,c.apply(this,arguments)};const l=e.getRegister;let p,g;e.getRegister=function(){const t=l.call(this);if(t&&t[1]===u)return t;if(!p)return t||n;const e=i(p,g);return p=null,e},t.define=function(t,e,n){if("string"==typeof t){if(p){if(!System.registerRegistry)throw Error("Include the named register extension for SystemJS named AMD support.");return System.registerRegistry[t]=i(e,n),p=[],void(g=s)}System.registerRegistry&&(System.registerRegistry[t]=i([].concat(e),n)),t=e,e=n}t instanceof Array?(p=t,g=e):"object"==typeof t?(p=[],g=function(){return t}):"function"==typeof t&&(p=o,g=t)},t.define.amd={}}("undefined"!=typeof self?self:global);
!function(t){const e=t.System.constructor.prototype,n=[[],function(){return{}}];function r(){throw Error("AMD require not supported.")}let o;function s(){}const i=["require","exports","module"];function u(t,e){const n={},o={exports:n},s=[],i=[];let u=0;for(let e=0;e<t.length;e++){const f=t[e],c=i.length;if("require"===f)s[e]=r,u++;else if("module"===f)s[e]=o,u++;else if("exports"===f)s[e]=n,u++;else{const t=e;i.push(function(e){s[t]=e.__useDefault?e.default:e})}u&&(t[c]=f)}u&&(t.length-=u);const f=e;return[t,function(t){return t({default:n,__useDefault:!0}),{setters:i,execute:function(){o.exports=f.apply(n,s)||o.exports,n!==o.exports&&t("default",o.exports)}}}]}let f;const c=e.register;e.register=function(t,e,n){f="string"==typeof t?n:e,c.apply(this,arguments)};const l=e.instantiate;e.instantiate=function(){return g=null,l.apply(this,arguments)};const p=e.getRegister;let g,a;function y(t,e){o=e,System.registerRegistry[t]=System.getRegister(),o=null}e.getRegister=function(){if(o)return o;const t=p.call(this);if(t&&t[1]===f)return t;if(!g)return t||n;const e=u(g,a);return g=null,e},t.define=function(t,e,n){if("string"==typeof t){if(g){if(!System.registerRegistry)throw Error("Include the named register extension for SystemJS named AMD support.");return y(t,u(e,n)),g=[],void(a=s)}System.registerRegistry&&y(t,u([].concat(e),n)),t=e,e=n}t instanceof Array?(g=t,a=e):"object"==typeof t?(g=[],a=function(){return t}):"function"==typeof t&&(g=i,a=t)},t.define.amd={}}("undefined"!=typeof self?self:global);

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

/*
* SJS 6.1.4
* SJS 6.1.5
* Minimal SystemJS Build

@@ -285,3 +285,3 @@ */

// set to NULL immediately after execution (or on any failure) to indicate execution has happened
// in such a case, pC should be used, and pLo, pLi will be emptied
// in such a case, C should be used, and E, I, L will be emptied
e: undefined,

@@ -295,3 +295,3 @@

// On execution, pLi, pLo, e cleared
// On execution, L, I, E cleared

@@ -298,0 +298,0 @@ // Promise for top-level completion

/*
* SystemJS 6.1.4
* SystemJS 6.1.5
*/

@@ -373,3 +373,3 @@ (function () {

// set to NULL immediately after execution (or on any failure) to indicate execution has happened
// in such a case, pC should be used, and pLo, pLi will be emptied
// in such a case, C should be used, and E, I, L will be emptied
e: undefined,

@@ -383,3 +383,3 @@

// On execution, pLi, pLo, e cleared
// On execution, L, I, E cleared

@@ -821,10 +821,8 @@ // Promise for top-level completion

}
const done = Promise.resolve(ns);
this.delete(id);
this[REGISTRY][id] = {
const load = this[REGISTRY][id] || (this[REGISTRY][id] = {
id: id,
i: [],
n: ns,
I: done,
L: done,
h: false,

@@ -834,5 +832,14 @@ d: [],

er: undefined,
E: undefined,
E: undefined
});
if (load.e || load.E)
return false;
Object.assign(load, {
n: ns,
I: undefined,
L: undefined,
C: done
};
});
return ns;

@@ -843,3 +850,3 @@ };

const load = this[REGISTRY][id];
return load && load.e === null && !load.E;
return !!load;
};

@@ -849,8 +856,13 @@

systemJSPrototype.delete = function (id) {
const load = this.get(id);
if (load === undefined)
const registry = this[REGISTRY];
const load = registry[id];
// in future we can support load.E case by failing load first
// but that will require TLA callbacks to be implemented
if (!load || load.e !== null || load.E)
return false;
let importerSetters = load.i;
// remove from importerSetters
// (release for gc)
if (load && load.d)
if (load.d)
load.d.forEach(function (depLoad) {

@@ -861,3 +873,14 @@ const importerIndex = depLoad.i.indexOf(load);

});
return delete this[REGISTRY][id];
delete registry[id];
return function () {
const load = registry[id];
if (!load || !importerSetters || load.e !== null || load.E)
return false;
// add back the old setters
importerSetters.forEach(setter => {
load.i.push(setter);
setter(load.n);
});
importerSetters = null;
};
};

@@ -864,0 +887,0 @@

/*
* SystemJS 6.1.4
* SystemJS 6.1.5
*/
!function(){const t="undefined"!=typeof self,e="undefined"!=typeof document,n=t?self:global;let r;if(e){const t=document.querySelector("base[href]");t&&(r=t.href)}if(!r&&"undefined"!=typeof location){const t=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==t&&(r=r.slice(0,t+1))}const o=/\\/g;function i(t,e){if(-1!==t.indexOf("\\")&&(t=t.replace(o,"/")),"/"===t[0]&&"/"===t[1])return e.slice(0,e.indexOf(":")+1)+t;if("."===t[0]&&("/"===t[1]||"."===t[1]&&("/"===t[2]||2===t.length&&(t+="/"))||1===t.length&&(t+="/"))||"/"===t[0]){const n=e.slice(0,e.indexOf(":")+1);let r;if(r="/"===e[n.length+1]?"file:"!==n?(r=e.slice(n.length+2)).slice(r.indexOf("/")+1):e.slice(8):e.slice(n.length+("/"===e[n.length])),"/"===t[0])return e.slice(0,e.length-r.length-1)+t;const o=r.slice(0,r.lastIndexOf("/")+1)+t,i=[];let c=-1;for(let t=0;t<o.length;t++)-1!==c?"/"===o[t]&&(i.push(o.slice(c,t+1)),c=-1):"."===o[t]?"."!==o[t+1]||"/"!==o[t+2]&&t+2!==o.length?"/"===o[t+1]||t+1===o.length?t+=1:c=t:(i.pop(),t+=2):c=t;return-1!==c&&i.push(o.slice(c)),e.slice(0,e.length-r.length)+i.join("")}}function c(t,e){return i(t,e)||(-1!==t.indexOf(":")?t:i("./"+t,e))}function s(t,e){for(let n in e)t[n]=e[n];return t}function u(t,e,n,r,o){for(let c in t){const s=i(c,n)||c,u=t[c];if("string"!=typeof u)continue;const l=d(r,i(u,n)||u,o);l?e[s]=l:a(c,u,"bare specifier did not resolve")}}function l(t,e){if(e[t])return t;let n=t.length;do{const r=t.slice(0,n+1);if(r in e)return r}while(-1!==(n=t.lastIndexOf("/",n-1)))}function f(t,e){const n=l(t,e);if(n){const r=e[n];if(null===r)return;if(!(t.length>n.length&&"/"!==r[r.length-1]))return r+t.slice(n.length);a(n,r,"should have a trailing '/'")}}function a(t,e,n){console.warn("Package target "+n+", resolving target '"+e+"' for "+t)}function d(t,e,n){let r=n&&l(n,t.scopes);for(;r;){const n=f(e,t.scopes[r]);if(n)return n;r=l(r.slice(0,r.lastIndexOf("/")),t.scopes)}return f(e,t.imports)||-1!==e.indexOf(":")&&e}const h="undefined"!=typeof Symbol,p=h&&Symbol.toStringTag,m=h?Symbol():"@";function y(){this[m]={}}const g=y.prototype;function v(t){return t.id}function b(t,e,n){if(t.onload(n,e.id,e.d&&e.d.map(v)),n)throw n}let w;g.prepareImport=function(){},g.import=function(t,e){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(t,e)}).then(function(t){const e=function t(e,n,r){let o=e[m][n];if(o)return o;const i=[],c=Object.create(null);p&&Object.defineProperty(c,p,{value:"Module"});let s=Promise.resolve().then(function(){return e.instantiate(n,r)}).then(function(t){if(!t)throw Error("Module "+n+" did not instantiate");const r=t[1](function(t,e){o.h=!0;let n=!1;if("object"!=typeof t)t in c&&c[t]===e||(c[t]=e,n=!0);else for(let e in t){let r=t[e];e in c&&c[e]===r||(c[e]=r,n=!0)}if(n)for(let t=0;t<i.length;t++)i[t](c);return e},2===t[1].length?{import:function(t){return e.import(t,n)},meta:e.createContext(n)}:void 0);return o.e=r.execute||function(){},[t[0],r.setters||[]]});const u=(s=s.catch(function(t){b(e,o,t)})).then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(e.resolve(o,n)).then(function(r){const o=t(e,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(t){o.d=t})});return u.catch(function(t){o.e=null,o.er=t}),o=e[m][n]={id:n,i:i,n:c,I:s,L:u,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(n,t);return e.C||function(t,e){return e.C=function t(e,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then(function(){return Promise.all(n.d.map(function(n){return t(e,n,r)}))})}(t,e,{}).then(function(){return function t(e,n,r){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(i){try{const c=t(e,i,r);c&&(c.catch(function(t){b(e,n,t)}),(o=o||[]).push(c))}catch(t){b(e,n,t)}}),o?Promise.all(o).then(i):i();function i(){try{let t=n.e.call(O);if(t)return t=t.then(function(){n.C=n.n,n.E=null,b(e,n,null)},function(t){b(e,n,t)}),n.E=n.E||t;n.C=n.n,b(e,n,null)}catch(t){throw b(e,n,t),n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}}(t,e,{})}).then(function(){return e.n})}(n,e)})},g.createContext=function(t){return{url:t}},g.onload=function(){},g.register=function(t,e){w=[t,e]},g.getRegister=function(){const t=w;return w=void 0,t};const O=Object.freeze(Object.create(null));n.System=new y;let S,E={imports:{},scopes:{}};e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"][src]'),function(t){t._j=fetch(t.src).then(function(t){return t.json()})}),g.prepareImport=function(){return S||(S=Promise.resolve(),e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"]'),function(t){S=S.then(function(){return(t._j||t.src&&fetch(t.src).then(function(t){return t.json()})||Promise.resolve(JSON.parse(t.innerHTML))).then(function(e){E=function(t,e,n){const r={imports:s({},n.imports),scopes:s({},n.scopes)};if(t.imports&&u(t.imports,r.imports,e,n,null),t.scopes)for(let o in t.scopes){const i=c(o,e);u(t.scopes[o],r.scopes[i]||(r.scopes[i]={}),e,n,i)}return r}(e,t.src||r,E)})})})),S},g.resolve=function(t,e){return d(E,i(t,e=e||r)||t,e)||function(t,e){throw Error("Unable to resolve specifier '"+t+(e?"' from "+e:"'"))}(t,e)};const x=g.register;function j(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(t){t.src&&System.import("import:"===t.src.slice(0,7)?t.src.slice(7):c(t.src,r))})}g.register=function(t,e){x.call(this,t,e)},g.instantiate=function(t,e){const n=this;return new Promise(function(r,o){let i;function c(e){e.filename===t&&(i=e.error)}window.addEventListener("error",c);const s=document.createElement("script");s.charset="utf-8",s.async=!0,s.crossOrigin="anonymous",s.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+t+(e?" from "+e:"")))}),s.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(s),i?o(i):r(n.getRegister())}),s.src=t,document.head.appendChild(s)})},e&&(window.addEventListener("DOMContentLoaded",j),j()),t&&"function"==typeof importScripts&&(g.instantiate=function(t){const e=this;return new Promise(function(n,r){try{importScripts(t)}catch(t){r(t)}n(e.getRegister())})}),function(t){const e=t.System.constructor.prototype,n=-1!==navigator.userAgent.indexOf("Trident");let r,o,i;const c=e.import;e.import=function(e,s){return function(){r=o=void 0;for(let e in t)!t.hasOwnProperty(e)||!isNaN(e)&&e<t.length||n&&t[e]&&t[e].parent===window||(r?o||(o=e):r=e,i=e)}(),c.call(this,e,s)};const s=[[],function(){return{}}],u=e.getRegister;e.getRegister=function(){const e=u.call(this);if(e)return e;const c=function(){let e,c=0;for(let i in t)if(!(!t.hasOwnProperty(i)||!isNaN(i)&&i<t.length||n&&t[i]&&t[i].parent===window)){if(0===c&&i!==r||1===c&&i!==o)return i;c++,e=i}if(e!==i)return e}();if(!c)return s;let l;try{l=t[c]}catch(t){return s}return[[],function(t){return{execute:function(){t({default:l,__useDefault:!0})}}}]}}("undefined"!=typeof self?self:global),function(t){const e=t.System.constructor.prototype,n=e.instantiate;e.instantiate=function(t,e){const r=this;switch(t.slice(t.lastIndexOf("."))){case".css":return c(function(t,e){const n=new CSSStyleSheet;n.replaceSync(e),t("default",n)});case".html":return o().then(function(t){return i(t)||s("'.html' modules not implemented")});case".json":return c(function(t,e){t("default",JSON.parse(e))});case".wasm":return o().then(function(t){return i(t)||(WebAssembly.compileStreaming?WebAssembly.compileStreaming(t):t.arrayBuffer().then(WebAssembly.compile))}).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const o=t.module;-1===e.indexOf(o)&&(e.push(o),n.push(function(t){r[o]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]})}return n.apply(this,arguments);function o(){return fetch(t).then(function(t){return t.ok||s(t.status+" "+t.statusText),t})}function i(t){const e=t.headers.get("content-type");if(e&&e.match(/^application\/javascript(;|$)/))return t.text().then(function(t){return(0,eval)(t),r.getRegister()})}function c(t){return o().then(function(e){return i(e)||e.text().then(function(e){return[[],function(n){return{execute:t(n,e)}}]})})}function s(n){throw Error(n+", loading "+t+(e?" from "+e:""))}}}("undefined"!=typeof self?self:global);const P="undefined"!=typeof Symbol&&Symbol.toStringTag;g.get=function(t){const e=this[m][t];if(e&&null===e.e&&!e.E)return e.er?null:e.n},g.set=function(t,e){let n;P&&"Module"===e[P]?n=e:(n=Object.assign(Object.create(null),e),P&&Object.defineProperty(n,P,{value:"Module"}));const r=Promise.resolve(n);return this.delete(t),this[m][t]={id:t,i:[],n:n,I:r,L:r,h:!1,d:[],e:null,er:void 0,E:void 0,C:r},n},g.has=function(t){const e=this[m][t];return e&&null===e.e&&!e.E},g.delete=function(t){const e=this.get(t);return void 0!==e&&(e&&e.d&&e.d.forEach(function(t){const n=t.i.indexOf(e);-1!==n&&t.i.splice(n,1)}),delete this[m][t])};const A="undefined"!=typeof Symbol&&Symbol.iterator;g.entries=function(){const t=this,e=Object.keys(t[m]);let n,r,o=0;const i={next:function(){for(;void 0!==(r=e[o++])&&void 0===(n=t.get(r)););return{done:void 0===r,value:void 0!==r&&[r,n]}}};return i[A]=function(){return this},i}}();
!function(){const t="undefined"!=typeof self,e="undefined"!=typeof document,n=t?self:global;let r;if(e){const t=document.querySelector("base[href]");t&&(r=t.href)}if(!r&&"undefined"!=typeof location){const t=(r=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==t&&(r=r.slice(0,t+1))}const o=/\\/g;function i(t,e){if(-1!==t.indexOf("\\")&&(t=t.replace(o,"/")),"/"===t[0]&&"/"===t[1])return e.slice(0,e.indexOf(":")+1)+t;if("."===t[0]&&("/"===t[1]||"."===t[1]&&("/"===t[2]||2===t.length&&(t+="/"))||1===t.length&&(t+="/"))||"/"===t[0]){const n=e.slice(0,e.indexOf(":")+1);let r;if(r="/"===e[n.length+1]?"file:"!==n?(r=e.slice(n.length+2)).slice(r.indexOf("/")+1):e.slice(8):e.slice(n.length+("/"===e[n.length])),"/"===t[0])return e.slice(0,e.length-r.length-1)+t;const o=r.slice(0,r.lastIndexOf("/")+1)+t,i=[];let c=-1;for(let t=0;t<o.length;t++)-1!==c?"/"===o[t]&&(i.push(o.slice(c,t+1)),c=-1):"."===o[t]?"."!==o[t+1]||"/"!==o[t+2]&&t+2!==o.length?"/"===o[t+1]||t+1===o.length?t+=1:c=t:(i.pop(),t+=2):c=t;return-1!==c&&i.push(o.slice(c)),e.slice(0,e.length-r.length)+i.join("")}}function c(t,e){return i(t,e)||(-1!==t.indexOf(":")?t:i("./"+t,e))}function s(t,e){for(let n in e)t[n]=e[n];return t}function u(t,e,n,r,o){for(let c in t){const s=i(c,n)||c,u=t[c];if("string"!=typeof u)continue;const l=d(r,i(u,n)||u,o);l?e[s]=l:a(c,u,"bare specifier did not resolve")}}function l(t,e){if(e[t])return t;let n=t.length;do{const r=t.slice(0,n+1);if(r in e)return r}while(-1!==(n=t.lastIndexOf("/",n-1)))}function f(t,e){const n=l(t,e);if(n){const r=e[n];if(null===r)return;if(!(t.length>n.length&&"/"!==r[r.length-1]))return r+t.slice(n.length);a(n,r,"should have a trailing '/'")}}function a(t,e,n){console.warn("Package target "+n+", resolving target '"+e+"' for "+t)}function d(t,e,n){let r=n&&l(n,t.scopes);for(;r;){const n=f(e,t.scopes[r]);if(n)return n;r=l(r.slice(0,r.lastIndexOf("/")),t.scopes)}return f(e,t.imports)||-1!==e.indexOf(":")&&e}const h="undefined"!=typeof Symbol,p=h&&Symbol.toStringTag,m=h?Symbol():"@";function y(){this[m]={}}const g=y.prototype;function v(t){return t.id}function b(t,e,n){if(t.onload(n,e.id,e.d&&e.d.map(v)),n)throw n}let E;g.prepareImport=function(){},g.import=function(t,e){const n=this;return Promise.resolve(n.prepareImport()).then(function(){return n.resolve(t,e)}).then(function(t){const e=function t(e,n,r){let o=e[m][n];if(o)return o;const i=[],c=Object.create(null);p&&Object.defineProperty(c,p,{value:"Module"});let s=Promise.resolve().then(function(){return e.instantiate(n,r)}).then(function(t){if(!t)throw Error("Module "+n+" did not instantiate");const r=t[1](function(t,e){o.h=!0;let n=!1;if("object"!=typeof t)t in c&&c[t]===e||(c[t]=e,n=!0);else for(let e in t){let r=t[e];e in c&&c[e]===r||(c[e]=r,n=!0)}if(n)for(let t=0;t<i.length;t++)i[t](c);return e},2===t[1].length?{import:function(t){return e.import(t,n)},meta:e.createContext(n)}:void 0);return o.e=r.execute||function(){},[t[0],r.setters||[]]});const u=(s=s.catch(function(t){b(e,o,t)})).then(function(r){return Promise.all(r[0].map(function(o,i){const c=r[1][i];return Promise.resolve(e.resolve(o,n)).then(function(r){const o=t(e,r,n);return Promise.resolve(o.I).then(function(){return c&&(o.i.push(c),!o.h&&o.I||c(o.n)),o})})})).then(function(t){o.d=t})});return u.catch(function(t){o.e=null,o.er=t}),o=e[m][n]={id:n,i:i,n:c,I:s,L:u,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0}}(n,t);return e.C||function(t,e){return e.C=function t(e,n,r){if(!r[n.id])return r[n.id]=!0,Promise.resolve(n.L).then(function(){return Promise.all(n.d.map(function(n){return t(e,n,r)}))})}(t,e,{}).then(function(){return function t(e,n,r){if(r[n.id])return;if(r[n.id]=!0,!n.e){if(n.er)throw n.er;return n.E?n.E:void 0}let o;return n.d.forEach(function(i){try{const c=t(e,i,r);c&&(c.catch(function(t){b(e,n,t)}),(o=o||[]).push(c))}catch(t){b(e,n,t)}}),o?Promise.all(o).then(i):i();function i(){try{let t=n.e.call(O);if(t)return t=t.then(function(){n.C=n.n,n.E=null,b(e,n,null)},function(t){b(e,n,t)}),n.E=n.E||t;n.C=n.n,b(e,n,null)}catch(t){throw b(e,n,t),n.er=t,t}finally{n.L=n.I=void 0,n.e=null}}}(t,e,{})}).then(function(){return e.n})}(n,e)})},g.createContext=function(t){return{url:t}},g.onload=function(){},g.register=function(t,e){E=[t,e]},g.getRegister=function(){const t=E;return E=void 0,t};const O=Object.freeze(Object.create(null));n.System=new y;let w,S={imports:{},scopes:{}};e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"][src]'),function(t){t._j=fetch(t.src).then(function(t){return t.json()})}),g.prepareImport=function(){return w||(w=Promise.resolve(),e&&Array.prototype.forEach.call(document.querySelectorAll('script[type="systemjs-importmap"]'),function(t){w=w.then(function(){return(t._j||t.src&&fetch(t.src).then(function(t){return t.json()})||Promise.resolve(JSON.parse(t.innerHTML))).then(function(e){S=function(t,e,n){const r={imports:s({},n.imports),scopes:s({},n.scopes)};if(t.imports&&u(t.imports,r.imports,e,n,null),t.scopes)for(let o in t.scopes){const i=c(o,e);u(t.scopes[o],r.scopes[i]||(r.scopes[i]={}),e,n,i)}return r}(e,t.src||r,S)})})})),w},g.resolve=function(t,e){return d(S,i(t,e=e||r)||t,e)||function(t,e){throw Error("Unable to resolve specifier '"+t+(e?"' from "+e:"'"))}(t,e)};const x=g.register;function j(){Array.prototype.forEach.call(document.querySelectorAll("script[type=systemjs-module]"),function(t){t.src&&System.import("import:"===t.src.slice(0,7)?t.src.slice(7):c(t.src,r))})}g.register=function(t,e){x.call(this,t,e)},g.instantiate=function(t,e){const n=this;return new Promise(function(r,o){let i;function c(e){e.filename===t&&(i=e.error)}window.addEventListener("error",c);const s=document.createElement("script");s.charset="utf-8",s.async=!0,s.crossOrigin="anonymous",s.addEventListener("error",function(){window.removeEventListener("error",c),o(Error("Error loading "+t+(e?" from "+e:"")))}),s.addEventListener("load",function(){window.removeEventListener("error",c),document.head.removeChild(s),i?o(i):r(n.getRegister())}),s.src=t,document.head.appendChild(s)})},e&&(window.addEventListener("DOMContentLoaded",j),j()),t&&"function"==typeof importScripts&&(g.instantiate=function(t){const e=this;return new Promise(function(n,r){try{importScripts(t)}catch(t){r(t)}n(e.getRegister())})}),function(t){const e=t.System.constructor.prototype,n=-1!==navigator.userAgent.indexOf("Trident");let r,o,i;const c=e.import;e.import=function(e,s){return function(){r=o=void 0;for(let e in t)!t.hasOwnProperty(e)||!isNaN(e)&&e<t.length||n&&t[e]&&t[e].parent===window||(r?o||(o=e):r=e,i=e)}(),c.call(this,e,s)};const s=[[],function(){return{}}],u=e.getRegister;e.getRegister=function(){const e=u.call(this);if(e)return e;const c=function(){let e,c=0;for(let i in t)if(!(!t.hasOwnProperty(i)||!isNaN(i)&&i<t.length||n&&t[i]&&t[i].parent===window)){if(0===c&&i!==r||1===c&&i!==o)return i;c++,e=i}if(e!==i)return e}();if(!c)return s;let l;try{l=t[c]}catch(t){return s}return[[],function(t){return{execute:function(){t({default:l,__useDefault:!0})}}}]}}("undefined"!=typeof self?self:global),function(t){const e=t.System.constructor.prototype,n=e.instantiate;e.instantiate=function(t,e){const r=this;switch(t.slice(t.lastIndexOf("."))){case".css":return c(function(t,e){const n=new CSSStyleSheet;n.replaceSync(e),t("default",n)});case".html":return o().then(function(t){return i(t)||s("'.html' modules not implemented")});case".json":return c(function(t,e){t("default",JSON.parse(e))});case".wasm":return o().then(function(t){return i(t)||(WebAssembly.compileStreaming?WebAssembly.compileStreaming(t):t.arrayBuffer().then(WebAssembly.compile))}).then(function(t){const e=[],n=[],r={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(t){const o=t.module;-1===e.indexOf(o)&&(e.push(o),n.push(function(t){r[o]=t}))}),[e,function(e){return{setters:n,execute:function(){return WebAssembly.instantiate(t,r).then(function(t){e(t.exports)})}}}]})}return n.apply(this,arguments);function o(){return fetch(t).then(function(t){return t.ok||s(t.status+" "+t.statusText),t})}function i(t){const e=t.headers.get("content-type");if(e&&e.match(/^application\/javascript(;|$)/))return t.text().then(function(t){return(0,eval)(t),r.getRegister()})}function c(t){return o().then(function(e){return i(e)||e.text().then(function(e){return[[],function(n){return{execute:t(n,e)}}]})})}function s(n){throw Error(n+", loading "+t+(e?" from "+e:""))}}}("undefined"!=typeof self?self:global);const P="undefined"!=typeof Symbol&&Symbol.toStringTag;g.get=function(t){const e=this[m][t];if(e&&null===e.e&&!e.E)return e.er?null:e.n},g.set=function(t,e){let n;P&&"Module"===e[P]?n=e:(n=Object.assign(Object.create(null),e),P&&Object.defineProperty(n,P,{value:"Module"}));const r=Promise.resolve(n),o=this[m][t]||(this[m][t]={id:t,i:[],h:!1,d:[],e:null,er:void 0,E:void 0});return!o.e&&!o.E&&(Object.assign(o,{n:n,I:void 0,L:void 0,C:r}),n)},g.has=function(t){return!!this[m][t]},g.delete=function(t){const e=this[m],n=e[t];if(!n||null!==n.e||n.E)return!1;let r=n.i;return n.d&&n.d.forEach(function(t){const e=t.i.indexOf(n);-1!==e&&t.i.splice(e,1)}),delete e[t],function(){const n=e[t];if(!n||!r||null!==n.e||n.E)return!1;r.forEach(t=>{n.i.push(t),t(n.n)}),r=null}};const A="undefined"!=typeof Symbol&&Symbol.iterator;g.entries=function(){const t=this,e=Object.keys(t[m]);let n,r,o=0;const i={next:function(){for(;void 0!==(r=e[o++])&&void 0===(n=t.get(r)););return{done:void 0===r,value:void 0!==r&&[r,n]}}};return i[A]=function(){return this},i}}();
{
"name": "systemjs",
"version": "6.1.4",
"version": "6.1.5",
"description": "Dynamic ES module loader",

@@ -5,0 +5,0 @@ "repository": {

@@ -25,3 +25,3 @@ # SystemJS

The minimal [1.5KB s.js loader](dist/s.min.js) provides a workflow where code written for production workflows of native ES modules in browsers ([like Rollup code-splitting builds](https://rollupjs.org/guide/en#code-splitting)), can be transpiled to the [System.register module format](docs/system-register.md) to work in older browsers that don't supporting native modules, including IE11++.
The minimal [1.5KB s.js loader](dist/s.min.js) provides a workflow where code written for production workflows of native ES modules in browsers ([like Rollup code-splitting builds](https://rollupjs.org/guide/en#code-splitting)), can be transpiled to the [System.register module format](docs/system-register.md) to work in older browsers that don't support native modules, including IE11++.

@@ -51,4 +51,2 @@ Since the ES module semantics such as live bindings, circular references, contextual metadata, dynamic import and top-level await [can all be fully supported this way](docs/system-register.md#semantics), while supporting CSP and cross-origin support, this workflow can be relied upon as a polyfill-like path.

* [Transform loader](dist/extras/transform.js) support, using fetch and eval, supporting a hookable `loader.transform`
* [Use default](dist/extras/use-default.js) provides a convenience interop for AMD modules to return the direct AMD
binding instead of a `{ default: amdModule }` object from `System.import`.

@@ -82,7 +80,7 @@ The following extras are included in system.js loader by default, and can be added to the s.js loader for a smaller tailored footprint:

```html
<script type="systemjs-module" src="/js/main.js"></script>
<script type="systemjs-module" src="import:name-of-module"></script>
<script src="system.js"></script>
<script>System.import('/js/main.js')</script>
<script>System.import('name-of-module')</script>
```
Using an [`import:` URL](https://github.com/WICG/import-maps/#import-urls) the `src` attribute in HTML can reference [import maps](/docs/import-maps.md).
### Loading with System.import

@@ -101,2 +99,16 @@ You can also dynamically load modules at any time with `System.import()`:

Note that when building System modules you typically want to ensure anonymous System.register statements like:
```js
System.register([], function () { ... });
```
are emitted, as these can be loaded in a way that behaves the same as normal ES modules, and **not** named register statements like:
```js
System.register('name', [], function () { ... });
```
While these can be supported with the named register extension, this approach is typically not recommended for modern modules workflows.
### Import Maps

@@ -130,3 +142,2 @@

* [js-env](https://github.com/jsenv/jsenv-core) - Collection of development tools providing a unified workflow to write JavaScript for the web, node.js or both at the same time.
* [jspm.io](https://jspm.io) - `https://system-dev.jspm.io/[name]` provides a CDN serving npm modules for SystemJS.
* [jspm.org](https://jspm.org) - Package manager for native modules, using SystemJS for backwards compatibility.

@@ -133,0 +144,0 @@ * [single-spa](https://single-spa.js.org/) - JavaScript framework for front-end microservices.

Sorry, the diff of this file is not supported yet

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