Skip to content

Commit

Permalink
6.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Oct 13, 2019
1 parent 94c9cae commit 23ebf58
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 21 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
SystemJS 6.3.1 (2019/10/06)
SystemJS 6.1.4 (2019/10/12)
* Fix IE global detection to ignore IFrames (https://github.com/systemjs/systemjs/pull/2035, @kduret)
* Remove stray console.log (https://github.com/systemjs/systemjs/pull/2046, @joeldenning)

SystemJS 6.1.3 (2019/10/06)
* Fix relative resolution of LHS URLs in import maps (https://github.com/systemjs/systemjs/pull/2039)
* Fix named register extra to extend rather than reinstantiate the SystemJS instance (https://github.com/systemjs/systemjs/pull/2042)
* Update extras to extend the global System instance explicitly (https://github.com/systemjs/systemjs/pull/2043)
Expand Down
17 changes: 13 additions & 4 deletions dist/extras/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
(function (global) {
const systemJSPrototype = global.System.constructor.prototype;
const isIE = navigator.userAgent.indexOf('Trident') !== -1;

// safari unpredictably lists some new globals first or second in object order
let firstGlobalProp, secondGlobalProp, lastGlobalProp;
Expand All @@ -13,7 +14,11 @@
let lastProp;
for (let p in global) {
// do not check frames cause it could be removed during import
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length))
if (
!global.hasOwnProperty(p)
|| (!isNaN(p) && p < global.length)
|| (isIE && global[p] && global[p].parent === window)
)
continue;
if (cnt === 0 && p !== firstGlobalProp || cnt === 1 && p !== secondGlobalProp)
return p;
Expand All @@ -30,7 +35,11 @@
firstGlobalProp = secondGlobalProp = undefined;
for (let p in global) {
// do not check frames cause it could be removed during import
if (!global.hasOwnProperty(p) || (!isNaN(p) && p < global.length))
if (
!global.hasOwnProperty(p)
|| (!isNaN(p) && p < global.length)
|| (isIE && global[p] && global[p].parent === window)
)
continue;
if (!firstGlobalProp)
firstGlobalProp = p;
Expand All @@ -54,15 +63,15 @@
const lastRegister = getRegister.call(this);
if (lastRegister)
return lastRegister;

// no registration -> attempt a global detection as difference from snapshot
// when multiple globals, we take the global value to be the last defined new global object property
// for performance, this will not support multi-version / global collisions as previous SystemJS versions did
// note in Edge, deleting and re-adding a global does not change its ordering
const globalProp = getGlobalProp();
if (!globalProp)
return emptyInstantiation;

let globalExport;
try {
globalExport = global[globalProp];
Expand Down
2 changes: 1 addition & 1 deletion dist/extras/global.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/extras/global.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions dist/s.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SJS 6.1.3
* SJS 6.1.4
* Minimal SystemJS Build
*/
(function () {
Expand Down Expand Up @@ -377,7 +377,6 @@
}
}

console.log('instance');
envGlobal.System = new SystemJS();

/*
Expand Down
2 changes: 1 addition & 1 deletion dist/s.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 23ebf58

Please sign in to comment.