From: Timmy Willison <4timmywil@gmail.com> Date: Mon, 12 Aug 2019 16:06:52 +0000 (-0400) Subject: Tests: update npo.js and include unminified source instead X-Git-Tag: 3.5.0~49 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3654bc831d2b9d506d372396c9f6275e44f488ca;p=jquery.git Tests: update npo.js and include unminified source instead Close gh-4446 Ref gh-4445 --- diff --git a/Gruntfile.js b/Gruntfile.js index 7fa324399..9524e70c0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -86,7 +86,7 @@ module.exports = function( grunt ) { "sizzle/dist": "sizzle/dist", "sizzle/LICENSE.txt": "sizzle/LICENSE.txt", - "npo/npo.js": "native-promise-only/npo.js", + "npo/npo.js": "native-promise-only/lib/npo.src.js", "qunit/qunit.js": "qunit/qunit/qunit.js", "qunit/qunit.css": "qunit/qunit/qunit.css", diff --git a/external/npo/npo.js b/external/npo/npo.js index c363ed4c2..50e24ae6c 100644 --- a/external/npo/npo.js +++ b/external/npo/npo.js @@ -2,4 +2,372 @@ v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org */ -!function(t,n,e){n[t]=n[t]||e(),"undefined"!=typeof module&&module.exports?module.exports=n[t]:"function"==typeof define&&define.amd&&define(function(){return n[t]})}("Promise","undefined"!=typeof global?global:this,function(){"use strict";function t(t,n){l.add(t,n),h||(h=y(l.drain))}function n(t){var n,e=typeof t;return null==t||"object"!=e&&"function"!=e||(n=t.then),"function"==typeof n?n:!1}function e(){for(var t=0;t0&&t(e,u))}catch(a){i.call(new f(u),a)}}}function i(n){var o=this;o.triggered||(o.triggered=!0,o.def&&(o=o.def),o.msg=n,o.state=2,o.chain.length>0&&t(e,o))}function c(t,n,e,o){for(var r=0;r 0) { + schedule(notify,self); + } + } + } + catch (err) { + reject.call(new MakeDefWrapper(self),err); + } + } + + function reject(msg) { + var self = this; + + // already triggered? + if (self.triggered) { return; } + + self.triggered = true; + + // unwrap + if (self.def) { + self = self.def; + } + + self.msg = msg; + self.state = 2; + if (self.chain.length > 0) { + schedule(notify,self); + } + } + + function iteratePromises(Constructor,arr,resolver,rejecter) { + for (var idx=0; idx