This commit is contained in:
Sam Thorogood 2020-02-21 11:36:05 +11:00
Родитель f4e1a06518
Коммит 7dcbdeb8b2
5 изменённых файлов: 701 добавлений и 168 удалений

Просмотреть файл

@ -23,7 +23,7 @@ const closureCompiler = new ClosureCompiler({
language_in: 'ECMASCRIPT6_STRICT',
language_out: 'ECMASCRIPT5',
compilation_level: 'ADVANCED_OPTIMIZATIONS',
dependency_mode: 'STRICT',
// dependency_mode: 'STRICT',
warning_level: 'VERBOSE',
process_common_js_modules: true,
output_wrapper: '(function(){%output%})()', // this prevents closure compiler from polluting the global scope

Просмотреть файл

@ -22,9 +22,9 @@
},
"homepage": "https://github.com/GoogleChrome/proxy-polyfill#readme",
"devDependencies": {
"chai": "^4.1.2",
"mocha": "^3.5.3",
"google-closure-compiler": "^20180204.0.0"
"chai": "^4.2.0",
"google-closure-compiler": "^20200204.0.0",
"mocha": "^7.0.1"
},
"scripts": {
"build": "node build.js",

8
proxy.min.js поставляемый
Просмотреть файл

@ -1,4 +1,4 @@
(function(){function l(){function n(a){return a?"object"===typeof a||"function"===typeof a:!1}var p=null;var g=function(a,b){function f(){}if(!n(a)||!n(b))throw new TypeError("Cannot create proxy with a non-object as target or handler");p=function(){f=function(a){throw new TypeError("Cannot perform '"+a+"' on a proxy that has been revoked");}};var e=b;b={get:null,set:null,apply:null,construct:null};for(var k in e){if(!(k in b))throw new TypeError("Proxy polyfill does not support trap '"+k+"'");b[k]=e[k]}"function"===
typeof e&&(b.apply=e.apply.bind(e));var c=this,g=!1,q=!1;"function"===typeof a?(c=function(){var h=this&&this.constructor===c,d=Array.prototype.slice.call(arguments);f(h?"construct":"apply");return h&&b.construct?b.construct.call(this,a,d):!h&&b.apply?b.apply(a,this,d):h?(d.unshift(a),new (a.bind.apply(a,d))):a.apply(this,d)},g=!0):a instanceof Array&&(c=[],q=!0);var r=b.get?function(a){f("get");return b.get(this,a,c)}:function(a){f("get");return this[a]},v=b.set?function(a,d){f("set");b.set(this,
a,d,c)}:function(a,b){f("set");this[a]=b},t={};Object.getOwnPropertyNames(a).forEach(function(b){if(!((g||q)&&b in c)){var d={enumerable:!!Object.getOwnPropertyDescriptor(a,b).enumerable,get:r.bind(a,b),set:v.bind(a,b)};Object.defineProperty(c,b,d);t[b]=!0}});e=!0;Object.setPrototypeOf?Object.setPrototypeOf(c,Object.getPrototypeOf(a)):c.__proto__?c.__proto__=a.__proto__:e=!1;if(b.get||!e)for(var m in a)t[m]||Object.defineProperty(c,m,{get:r.bind(a,m)});Object.seal(a);Object.seal(c);return c};g.revocable=
function(a,b){return{proxy:new g(a,b),revoke:p}};return g};var u="undefined"!==typeof process&&"[object process]"==={}.toString.call(process)||"undefined"!==typeof navigator&&"ReactNative"===navigator.product?global:self;u.Proxy||(u.Proxy=l(),u.Proxy.revocable=u.Proxy.revocable);})()
(function(){function k(){function n(a){return a?"object"===typeof a||"function"===typeof a:!1}var p=null;var m=function(a,c){function g(){}if(!n(a)||!n(c))throw new TypeError("Cannot create proxy with a non-object as target or handler");p=function(){g=function(b){throw new TypeError("Cannot perform '"+b+"' on a proxy that has been revoked");}};var f=c;c={get:null,set:null,apply:null,construct:null};for(var h in f){if(!(h in c))throw new TypeError("Proxy polyfill does not support trap '"+h+"'");c[h]=f[h]}"function"===
typeof f&&(c.apply=f.apply.bind(f));var d=this,q=!1,r=!1;"function"===typeof a?(d=function(){var b=this&&this.constructor===d,e=Array.prototype.slice.call(arguments);g(b?"construct":"apply");return b&&c.construct?c.construct.call(this,a,e):!b&&c.apply?c.apply(a,this,e):b?(e.unshift(a),new (a.bind.apply(a,e))):a.apply(this,e)},q=!0):a instanceof Array&&(d=[],r=!0);var t=c.get?function(b){g("get");return c.get(this,b,d)}:function(b){g("get");return this[b]},w=c.set?function(b,e){g("set");c.set(this,
b,e,d)}:function(b,e){g("set");this[b]=e},u={};Object.getOwnPropertyNames(a).forEach(function(b){if(!((q||r)&&b in d)){var e={enumerable:!!Object.getOwnPropertyDescriptor(a,b).enumerable,get:t.bind(a,b),set:w.bind(a,b)};Object.defineProperty(d,b,e);u[b]=!0}});f=!0;Object.setPrototypeOf?Object.setPrototypeOf(d,Object.getPrototypeOf(a)):d.__proto__?d.__proto__=a.__proto__:f=!1;if(c.get||!f)for(var l in a)u[l]||Object.defineProperty(d,l,{get:t.bind(a,l)});Object.seal(a);Object.seal(d);return d};m.revocable=
function(a,c){return{proxy:new m(a,c),revoke:p}};return m};var v="undefined"!==typeof process&&"[object process]"==={}.toString.call(process)||"undefined"!==typeof navigator&&"ReactNative"===navigator.product?global:self;v.Proxy||(v.Proxy=k(),v.Proxy.revocable=v.Proxy.revocable);})()

Просмотреть файл

@ -76,7 +76,7 @@ module.exports = function proxyPolyfill() {
if (usingNew && handler['construct']) {
return handler['construct'].call(this, target, args);
} else if (!usingNew && handler.apply) {
return handler.apply(target, this, args);
return handler['apply'](target, this, args);
}
// since the target was a function, fallback to calling it directly.

851
yarn.lock

Разница между файлами не показана из-за своего большого размера Загрузить разницу