Michał Gołębiowski-Owczarek
a32cf6324f
Deferred: Rename master to primary
...
Closes gh-4828
2021-01-12 20:56:51 +01:00
Michał Gołębiowski-Owczarek
d0ce00cdfa
Core: Migrate from AMD to ES modules 🎉
...
Migrate all source AMD modules to ECMAScript modules. The final bundle
is compiled by a custom build process that uses Rollup under the hood.
Test files themselves are still loaded via RequireJS as that has to work in
IE 11.
Tests can now be run in "Load as modules" mode which replaces the previous
"Load with AMD" option. That option of running tests doesn't work in IE
and Edge as it requires support for dynamic imports.
Some of the changes required by the migration:
* check `typeof` of `noGlobal` instead of using the variable directly
as it's not available when modules are used
* change the nonce module to be an object as ECMASscript module exports
are immutable
* remove some unused exports
* import `./core/parseHTML.js` directly in `jquery.js` so that it's not
being cut out when the `ajax` module is excluded in a custom compilation
Closes gh-4541
2019-11-18 21:15:03 +01:00
Michał Gołębiowski-Owczarek
438b1a3e8a
Build: ESLint: forbid unused function parameters
...
This commit requires all function parameters to be used, not just the last one.
In cases where that's not possible as we need to match an external API, there's
an escape hatch of prefixing an unused argument with `_`.
This change makes it easier to catch unused AMD dependencies and unused
parameters in internal functions the API of which we may change at will, among
other things.
Unused AMD dependencies have been removed as part of this commit.
Closes gh-4381
2019-05-13 22:25:11 +02:00
Michał Gołębiowski-Owczarek
cf84696fd1
Core: Drop support for IE <11, iOS <11, Firefox <65, Android Browser & PhantomJS
...
Also, update support comments format to match format described in:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
with the change from:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-448998379
(open-ended ranges end with `+`).
Fixes gh-3950
Fixes gh-4299
Closes gh-4347
2019-04-29 22:56:09 +02:00
Jason Bedard
3d732cca6b
Core: deprecate jQuery.isFunction
...
Fixes gh-3609
2018-01-15 09:26:19 -08:00
Jason Bedard
36389288e8
Deferred: fix memory leak of promise callbacks
...
Fixes gh-3606
Closes gh-3657
2017-06-20 01:23:24 -04:00
Richard Gibson
5d79c64663
Deferred: Stop inventing jQuery.when() resolution values
...
Fixes gh-3442
Closes gh-3445
2016-12-16 11:45:35 -05:00
Oleg Gaidarenko
58c6ca9822
Build: ESLint details
...
Use eslint pragmas, fix new errors, etc
Closes gh-3148
2016-06-11 10:41:33 +03:00
Michał Gołębiowski
d5dae259eb
Deferred: Propagate progress correctly from unwrapped promises
...
Progress parameters are now correctly propagated from a deferred to which
another deferred resolved unwrapping it.
Thanks to @gibson042 for the report and a clear description of the problem
and the needed fix.
Fixes gh-3062
Closes gh-3150
2016-06-09 14:53:34 +02:00
Richard Gibson
de71e9755f
Deferred: Make jQuery.when synchronous when possible
...
Closes gh-3102
Fixes gh-3100
Closes gh-3105
2016-05-09 12:14:22 -04:00
Richard Gibson
356a3bccb0
Deferred: Separate the two paths in jQuery.when
...
Single- and no-argument calls act like Promise.resolve.
Multi-argument calls act like Promise.all.
Fixes gh-3029
Closes gh-3059
2016-05-02 12:30:31 -04:00
Richard Gibson
7f1e59343b
Deferred: Provide explicit undefined context for jQuery.when raw casts
...
Fixes gh-3082
Closes gh-3084
2016-04-27 15:33:12 -04:00
Richard Gibson
76084372c2
Deferred: Remove default callback context
...
Employs strict mode to simplify Deferred callback context handling.
Fixes gh-3060
Closes gh-3061
2016-04-23 00:30:48 -04:00
Josh Soref
aae44111e2
Docs: Fix various spelling errors
...
Closes gh-2761
2016-01-13 13:11:11 -05:00
Dave Methvin
36a7cf9b1e
Deferred: Warn on exceptions that are likely programming errors
...
Fixes gh-2736
Closes gh-2737
2016-01-13 12:39:58 -05:00
Dave Methvin
bdf1b8f317
Deferred: Remove undocumented progress notifications in $.when
...
Fixes gh-2710
Closes gh-2816
2016-01-13 12:21:17 -05:00
Timmy Willison
78b9eac119
Deferred: syncronize single and multiple target handling in $.when
...
Fixes gh-2546
Fixes gh-2018
Close gh-2707
2015-11-13 11:16:26 -05:00
Oleg Gaidarenko
10fdad742a
Build: Update jscs and lint files
...
Fixes gh-2056
2015-09-07 20:03:50 +03:00
Timmy Willison
84ccf2606c
Deferred: add .catch handler
...
Fixes gh-2102
2015-07-06 10:47:30 -04:00
Michał Gołębiowski
842958e7ae
Core: Switch from modules to just window.setTimeout etc.
...
Using modules for window.setTimeout etc. made those functions cached and
disabled Sinon mocking, making effects tests fail. Just writing
window.setTimeout directly is smaller anyway.
2015-06-17 12:59:01 +02:00
Michał Gołębiowski
219c749493
Core: Use window.setTimeout & friends instead of global equivalents
...
Fixes gh-2177
2015-06-17 12:29:49 +02:00
Richard Gibson
002240a6eb
Deferred: Always handle progress callbacks before done/fail
...
Fixes gh-2013
Fixes gh-2010
Closes gh-2210
2015-04-22 15:24:37 -04:00
Richard Gibson
555a50d340
Deferred: Backwards-compatible standards interoperability
...
Fixes gh-1722
Closes gh-1996
2015-03-20 02:00:17 -04:00
Nicolas HENRY
ab20d9d24f
Deferred: Fix $.when with resolved deferred and progress callbacks
...
Fixes gh-1894
Closes gh-1915
2014-12-25 15:39:28 +03:00
Timmy Willison
c869a1ef8a
Build: update grunt-jscs-checker and pass with the new rules
2014-07-17 10:25:59 -07:00
Dave Methvin
d837f119c3
Support: clean up comments and Support notation
...
Closes gh-1577
2014-06-10 23:28:14 -04:00
Oleg
cb37994d76
No ticket: fix code style inconsistencies. Closes gh-1361
2013-09-13 01:04:29 +04:00
Timmy Willison
b534ee2ccf
Always return jQuery in modules that can be included separately
2013-09-08 21:25:27 -04:00
Timmy Willison
6318ae6ab9
AMD-ify jQuery sourcegit s! Woo! Fixes #14113 , #14163 .
2013-08-15 14:15:49 -04:00
terrycojones
3484a68c16
Removed an unneeded variable. Closes gh-1321.
2013-08-08 01:15:16 +04:00
nanto_vi
412d910697
Eliminate redundancy of Deferred.then().
2013-01-08 01:03:38 +09:00
nanto_vi
e7fdda9819
Propagete context of returned deferred object in Deferred.then(). Fixes #13160
2013-01-07 02:49:15 +09:00
jaubourg
23d7cf0488
Deferred: .resolve(), .reject() and .notify() now set the callback context to the promise instance rather than the deferred instance ; .then() has also been amended. Fixes #11405 .
2012-12-07 15:14:12 +01:00
jaubourg
74cdd78497
deferred.promise(obj) should work with non-objects. Fixes #12521 . Much needed unit tests added!
2012-09-13 15:44:12 +02:00
Richard Gibson
a101e81bde
Interim take on cross-module variables, closes gh-817.
2012-06-15 21:01:44 -04:00
Rick Waldron
7c23b77af2
Strips IIFEs from modules; Always require built jQuery for tests.
2012-06-04 12:48:18 -04:00
jaubourg
f93a2f569d
Preserves context objects when multiple Deferreds are passed to $.when(). Context is an array containing the original contexts in order. When non-observable value is given, associated context is undefined. In case only a single non-observable value is given, context is the global object (thanks so much Function.prototype.apply!). Fixes #11749 .
2012-05-12 21:41:39 +02:00
Dave Methvin
c5fda2945c
Fix #11736 . Remove deprecated Deferred.isResolved/isRejected.
2012-05-11 15:02:18 -04:00
jaubourg
a1e3122706
Gains 1 more byte min/gz and reminds that isResolved and isRejected are deprecated in the comments.
2012-04-28 23:06:48 +02:00
Richard Gibson
a25721a2cd
code compression
2012-04-26 16:08:17 -04:00
jaubourg
6e066a4db7
Trims down deferred.js. The gist of it is from the magnificent @gibson042, I just added some minor touches.
2012-04-25 18:25:52 +02:00
Sindre Sorhus
d5ee856a44
Remove moot second argument from slice.call()
...
The zeroes were added to fix http://bugs.jquery.com/ticket/4942 but those browsers are no longer supported.
2012-04-04 23:22:15 -04:00
jaubourg
a41f240674
Makes Deferred implementation truly Promise/A compliant. Unit tests amended. Actually few changes required in jQuery's own source and we gained 8 bytes minified gzipped \o/.
2012-04-02 01:29:39 +02:00
jaubourg
2a9f0681de
Have Deferred.always return the object onto which it is currently attached to enable true chainability. Fixes #10723 . Unit tests added.
2011-11-09 01:02:29 +01:00
Rick Waldron
a9f1346c16
Core styleguide cleanup. Fixes #10586
2011-10-26 14:58:05 -04:00
jaubourg
d29182e8d0
Removes isPending and introduces state as a means to retrieve the Deferred/Promise state. Unit tests amended.
2011-10-11 20:23:56 -04:00
jaubourg
749d32a290
isProgressing becomes isPending. Unit tests added.
2011-10-04 12:08:46 -04:00
jaubourg
a588336a6d
Trimmed down $.Callbacks and $.Deferred.
2011-09-21 17:00:55 +02:00
jaubourg
4092e3d275
$.Callbacks, $.Topic and notify/progress on $.Deferred.
2011-09-19 15:42:30 -04:00
jaubourg
139135a98a
Fixes #9446 . Context is properly propagated using pipe. If context was the original deferred, then context is updated to next deferred in the chain. Unit tests added.
2011-07-01 01:51:50 +02:00