From fb341b094b335e1cd1bbea31048ff1869707385d Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 6 Aug 2015 14:04:10 -0600 Subject: [PATCH] Add Promise.prototype.done shim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Base on our research, this is the only non-standard Q method people are really calling. We didn’t check the really obscure stuff, but this should cover the vast majority of issues. Signed-off-by: Max Brunsfeld --- src/atom.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/atom.coffee b/src/atom.coffee index 9a5a29d6b..3b4d8b6a6 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -873,6 +873,11 @@ class Atom extends Model ipc.send('call-window-method', 'setAutoHideMenuBar', autoHide) ipc.send('call-window-method', 'setMenuBarVisibility', not autoHide) +# Preserve this deprecation until 2.0. Sorry. Should have removed Q sooner. +Promise.prototype.done = (callback) -> + deprecate("Atom now uses ES6 Promises instead of Q. Call promise.then instead of promise.done") + @then(callback) + if includeDeprecatedAPIs # Deprecated: Callers should be converted to use atom.deserializers Atom::registerRepresentationClass = ->