Rip out the remainder of Bluebird

This commit is contained in:
Michael Telatynski 2019-11-18 10:03:05 +00:00
parent 47948812b0
commit d4d51dc61f
75 changed files with 71 additions and 135 deletions

View file

@ -13,7 +13,6 @@
], ],
"transform-class-properties", "transform-class-properties",
"transform-object-rest-spread", "transform-object-rest-spread",
"transform-async-to-bluebird",
"transform-runtime", "transform-runtime",
"add-module-exports", "add-module-exports",
"syntax-dynamic-import" "syntax-dynamic-import"

View file

@ -60,7 +60,6 @@
"dependencies": { "dependencies": {
"babel-plugin-syntax-dynamic-import": "^6.18.0", "babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-runtime": "^6.26.0", "babel-runtime": "^6.26.0",
"bluebird": "^3.5.0",
"blueimp-canvas-to-blob": "^3.5.0", "blueimp-canvas-to-blob": "^3.5.0",
"browser-encrypt-attachment": "^0.3.0", "browser-encrypt-attachment": "^0.3.0",
"browser-request": "^0.3.3", "browser-request": "^0.3.3",
@ -120,7 +119,6 @@
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"babel-loader": "^7.1.5", "babel-loader": "^7.1.5",
"babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-async-to-bluebird": "^1.1.1",
"babel-plugin-transform-builtin-extend": "^1.1.2", "babel-plugin-transform-builtin-extend": "^1.1.2",
"babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-transform-object-rest-spread": "^6.26.0",

View file

@ -17,7 +17,6 @@ limitations under the License.
'use strict'; 'use strict';
import Promise from 'bluebird';
import extend from './extend'; import extend from './extend';
import dis from './dispatcher'; import dis from './dispatcher';
import MatrixClientPeg from './MatrixClientPeg'; import MatrixClientPeg from './MatrixClientPeg';

View file

@ -16,7 +16,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
import Matrix from 'matrix-js-sdk'; import Matrix from 'matrix-js-sdk';
import MatrixClientPeg from './MatrixClientPeg'; import MatrixClientPeg from './MatrixClientPeg';
@ -525,7 +524,7 @@ export function logout() {
console.log("Failed to call logout API: token will not be invalidated"); console.log("Failed to call logout API: token will not be invalidated");
onLoggedOut(); onLoggedOut();
}, },
).done(); );
} }
export function softLogout() { export function softLogout() {
@ -614,7 +613,7 @@ export function onLoggedOut() {
// that can occur when components try to use a null client. // that can occur when components try to use a null client.
dis.dispatch({action: 'on_logged_out'}, true); dis.dispatch({action: 'on_logged_out'}, true);
stopMatrixClient(); stopMatrixClient();
_clearStorage().done(); _clearStorage();
} }
/** /**

View file

@ -23,7 +23,6 @@ import Analytics from './Analytics';
import sdk from './index'; import sdk from './index';
import dis from './dispatcher'; import dis from './dispatcher';
import { _t } from './languageHandler'; import { _t } from './languageHandler';
import Promise from "bluebird";
import {defer} from "./utils/promise"; import {defer} from "./utils/promise";
const DIALOG_CONTAINER_ID = "mx_Dialog_Container"; const DIALOG_CONTAINER_ID = "mx_Dialog_Container";

View file

@ -198,7 +198,7 @@ const Notifier = {
if (enable) { if (enable) {
// Attempt to get permission from user // Attempt to get permission from user
plaf.requestNotificationPermission().done((result) => { plaf.requestNotificationPermission().then((result) => {
if (result !== 'granted') { if (result !== 'granted') {
// The permission request was dismissed or denied // The permission request was dismissed or denied
// TODO: Support alternative branding in messaging // TODO: Support alternative branding in messaging

View file

@ -35,7 +35,7 @@ module.exports = {
}, },
resend: function(event) { resend: function(event) {
const room = MatrixClientPeg.get().getRoom(event.getRoomId()); const room = MatrixClientPeg.get().getRoom(event.getRoomId());
MatrixClientPeg.get().resendEvent(event, room).done(function(res) { MatrixClientPeg.get().resendEvent(event, room).then(function(res) {
dis.dispatch({ dis.dispatch({
action: 'message_sent', action: 'message_sent',
event: event, event: event,

View file

@ -17,7 +17,6 @@ limitations under the License.
import MatrixClientPeg from './MatrixClientPeg'; import MatrixClientPeg from './MatrixClientPeg';
import PushProcessor from 'matrix-js-sdk/lib/pushprocessor'; import PushProcessor from 'matrix-js-sdk/lib/pushprocessor';
import Promise from 'bluebird';
export const ALL_MESSAGES_LOUD = 'all_messages_loud'; export const ALL_MESSAGES_LOUD = 'all_messages_loud';
export const ALL_MESSAGES = 'all_messages'; export const ALL_MESSAGES = 'all_messages';

View file

@ -15,7 +15,6 @@ limitations under the License.
*/ */
import MatrixClientPeg from './MatrixClientPeg'; import MatrixClientPeg from './MatrixClientPeg';
import Promise from 'bluebird';
/** /**
* Given a room object, return the alias we should use for it, * Given a room object, return the alias we should use for it,

View file

@ -16,7 +16,6 @@ limitations under the License.
*/ */
import url from 'url'; import url from 'url';
import Promise from 'bluebird';
import SettingsStore from "./settings/SettingsStore"; import SettingsStore from "./settings/SettingsStore";
import { Service, startTermsFlow, TermsNotSignedError } from './Terms'; import { Service, startTermsFlow, TermsNotSignedError } from './Terms';
const request = require('browser-request'); const request = require('browser-request');

View file

@ -279,7 +279,7 @@ function inviteUser(event, roomId, userId) {
} }
} }
client.invite(roomId, userId).done(function() { client.invite(roomId, userId).then(function() {
sendResponse(event, { sendResponse(event, {
success: true, success: true,
}); });
@ -398,7 +398,7 @@ function setPlumbingState(event, roomId, status) {
sendError(event, _t('You need to be logged in.')); sendError(event, _t('You need to be logged in.'));
return; return;
} }
client.sendStateEvent(roomId, "m.room.plumbing", { status: status }).done(() => { client.sendStateEvent(roomId, "m.room.plumbing", { status: status }).then(() => {
sendResponse(event, { sendResponse(event, {
success: true, success: true,
}); });
@ -414,7 +414,7 @@ function setBotOptions(event, roomId, userId) {
sendError(event, _t('You need to be logged in.')); sendError(event, _t('You need to be logged in.'));
return; return;
} }
client.sendStateEvent(roomId, "m.room.bot.options", event.data.content, "_" + userId).done(() => { client.sendStateEvent(roomId, "m.room.bot.options", event.data.content, "_" + userId).then(() => {
sendResponse(event, { sendResponse(event, {
success: true, success: true,
}); });
@ -444,7 +444,7 @@ function setBotPower(event, roomId, userId, level) {
}, },
); );
client.setPowerLevel(roomId, userId, level, powerEvent).done(() => { client.setPowerLevel(roomId, userId, level, powerEvent).then(() => {
sendResponse(event, { sendResponse(event, {
success: true, success: true,
}); });

View file

@ -28,7 +28,6 @@ import { linkifyAndSanitizeHtml } from './HtmlUtils';
import QuestionDialog from "./components/views/dialogs/QuestionDialog"; import QuestionDialog from "./components/views/dialogs/QuestionDialog";
import WidgetUtils from "./utils/WidgetUtils"; import WidgetUtils from "./utils/WidgetUtils";
import {textToHtmlRainbow} from "./utils/colour"; import {textToHtmlRainbow} from "./utils/colour";
import Promise from "bluebird";
import { getAddressType } from './UserAddress'; import { getAddressType } from './UserAddress';
import { abbreviateUrl } from './utils/UrlUtils'; import { abbreviateUrl } from './utils/UrlUtils';
import { getDefaultIdentityServerUrl, useDefaultIdentityServer } from './utils/IdentityServerUtils'; import { getDefaultIdentityServerUrl, useDefaultIdentityServer } from './utils/IdentityServerUtils';

View file

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
import classNames from 'classnames'; import classNames from 'classnames';
import MatrixClientPeg from './MatrixClientPeg'; import MatrixClientPeg from './MatrixClientPeg';

View file

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from "bluebird";
// const OUTBOUND_API_NAME = 'toWidget'; // const OUTBOUND_API_NAME = 'toWidget';
// Initiate requests using the "toWidget" postMessage API and handle responses // Initiate requests using the "toWidget" postMessage API and handle responses

View file

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
import {createNewMatrixCall, Room} from "matrix-js-sdk"; import {createNewMatrixCall, Room} from "matrix-js-sdk";
import CallHandler from './CallHandler'; import CallHandler from './CallHandler';
import MatrixClientPeg from "./MatrixClientPeg"; import MatrixClientPeg from "./MatrixClientPeg";

View file

@ -26,7 +26,6 @@ import RoomProvider from './RoomProvider';
import UserProvider from './UserProvider'; import UserProvider from './UserProvider';
import EmojiProvider from './EmojiProvider'; import EmojiProvider from './EmojiProvider';
import NotifProvider from './NotifProvider'; import NotifProvider from './NotifProvider';
import Promise from 'bluebird';
import {timeout} from "../utils/promise"; import {timeout} from "../utils/promise";
export type SelectionRange = { export type SelectionRange = {

View file

@ -19,7 +19,6 @@ limitations under the License.
import React from 'react'; import React from 'react';
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Promise from 'bluebird';
import MatrixClientPeg from '../../MatrixClientPeg'; import MatrixClientPeg from '../../MatrixClientPeg';
import sdk from '../../index'; import sdk from '../../index';
import dis from '../../dispatcher'; import dis from '../../dispatcher';
@ -637,7 +636,7 @@ export default createReactClass({
title: _t('Error'), title: _t('Error'),
description: _t('Failed to upload image'), description: _t('Failed to upload image'),
}); });
}).done(); });
}, },
_onJoinableChange: function(ev) { _onJoinableChange: function(ev) {
@ -676,7 +675,7 @@ export default createReactClass({
this.setState({ this.setState({
avatarChanged: false, avatarChanged: false,
}); });
}).done(); });
}, },
_saveGroup: async function() { _saveGroup: async function() {

View file

@ -121,7 +121,7 @@ export default createReactClass({
this.setState({ this.setState({
errorText: msg, errorText: msg,
}); });
}).done(); });
this._intervalId = null; this._intervalId = null;
if (this.props.poll) { if (this.props.poll) {

View file

@ -17,8 +17,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
import React from 'react'; import React from 'react';
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@ -542,7 +540,7 @@ export default createReactClass({
const Loader = sdk.getComponent("elements.Spinner"); const Loader = sdk.getComponent("elements.Spinner");
const modal = Modal.createDialog(Loader, null, 'mx_Dialog_spinner'); const modal = Modal.createDialog(Loader, null, 'mx_Dialog_spinner');
MatrixClientPeg.get().leave(payload.room_id).done(() => { MatrixClientPeg.get().leave(payload.room_id).then(() => {
modal.close(); modal.close();
if (this.state.currentRoomId === payload.room_id) { if (this.state.currentRoomId === payload.room_id) {
dis.dispatch({action: 'view_next_room'}); dis.dispatch({action: 'view_next_room'});
@ -863,7 +861,7 @@ export default createReactClass({
waitFor = this.firstSyncPromise.promise; waitFor = this.firstSyncPromise.promise;
} }
waitFor.done(() => { waitFor.then(() => {
let presentedId = roomInfo.room_alias || roomInfo.room_id; let presentedId = roomInfo.room_alias || roomInfo.room_id;
const room = MatrixClientPeg.get().getRoom(roomInfo.room_id); const room = MatrixClientPeg.get().getRoom(roomInfo.room_id);
if (room) { if (room) {
@ -980,7 +978,7 @@ export default createReactClass({
const [shouldCreate, createOpts] = await modal.finished; const [shouldCreate, createOpts] = await modal.finished;
if (shouldCreate) { if (shouldCreate) {
createRoom({createOpts}).done(); createRoom({createOpts});
} }
}, },
@ -1756,7 +1754,7 @@ export default createReactClass({
return; return;
} }
cli.sendEvent(roomId, event.getType(), event.getContent()).done(() => { cli.sendEvent(roomId, event.getType(), event.getContent()).then(() => {
dis.dispatch({action: 'message_sent'}); dis.dispatch({action: 'message_sent'});
}, (err) => { }, (err) => {
dis.dispatch({action: 'message_send_failed'}); dis.dispatch({action: 'message_send_failed'});

View file

@ -47,7 +47,7 @@ export default createReactClass({
}, },
_fetch: function() { _fetch: function() {
this.context.matrixClient.getJoinedGroups().done((result) => { this.context.matrixClient.getJoinedGroups().then((result) => {
this.setState({groups: result.groups, error: null}); this.setState({groups: result.groups, error: null});
}, (err) => { }, (err) => {
if (err.errcode === 'M_GUEST_ACCESS_FORBIDDEN') { if (err.errcode === 'M_GUEST_ACCESS_FORBIDDEN') {

View file

@ -27,7 +27,6 @@ const dis = require('../../dispatcher');
import { linkifyAndSanitizeHtml } from '../../HtmlUtils'; import { linkifyAndSanitizeHtml } from '../../HtmlUtils';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Promise from 'bluebird';
import { _t } from '../../languageHandler'; import { _t } from '../../languageHandler';
import { instanceForInstanceId, protocolNameForInstanceId } from '../../utils/DirectoryUtils'; import { instanceForInstanceId, protocolNameForInstanceId } from '../../utils/DirectoryUtils';
import Analytics from '../../Analytics'; import Analytics from '../../Analytics';
@ -89,7 +88,7 @@ module.exports = createReactClass({
this.setState({protocolsLoading: false}); this.setState({protocolsLoading: false});
return; return;
} }
MatrixClientPeg.get().getThirdpartyProtocols().done((response) => { MatrixClientPeg.get().getThirdpartyProtocols().then((response) => {
this.protocols = response; this.protocols = response;
this.setState({protocolsLoading: false}); this.setState({protocolsLoading: false});
}, (err) => { }, (err) => {
@ -135,7 +134,7 @@ module.exports = createReactClass({
publicRooms: [], publicRooms: [],
loading: true, loading: true,
}); });
this.getMoreRooms().done(); this.getMoreRooms();
}, },
getMoreRooms: function() { getMoreRooms: function() {
@ -246,7 +245,7 @@ module.exports = createReactClass({
if (!alias) return; if (!alias) return;
step = _t('delete the alias.'); step = _t('delete the alias.');
return MatrixClientPeg.get().deleteAlias(alias); return MatrixClientPeg.get().deleteAlias(alias);
}).done(() => { }).then(() => {
modal.close(); modal.close();
this.refreshRoomList(); this.refreshRoomList();
}, (err) => { }, (err) => {
@ -348,7 +347,7 @@ module.exports = createReactClass({
}); });
return; return;
} }
MatrixClientPeg.get().getThirdpartyLocation(protocolName, fields).done((resp) => { MatrixClientPeg.get().getThirdpartyLocation(protocolName, fields).then((resp) => {
if (resp.length > 0 && resp[0].alias) { if (resp.length > 0 && resp[0].alias) {
this.showRoomAlias(resp[0].alias, true); this.showRoomAlias(resp[0].alias, true);
} else { } else {

View file

@ -27,7 +27,6 @@ import React from 'react';
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Promise from 'bluebird';
import classNames from 'classnames'; import classNames from 'classnames';
import {Room} from "matrix-js-sdk"; import {Room} from "matrix-js-sdk";
import { _t } from '../../languageHandler'; import { _t } from '../../languageHandler';
@ -1101,7 +1100,7 @@ module.exports = createReactClass({
} }
ContentMessages.sharedInstance().sendStickerContentToRoom(url, this.state.room.roomId, info, text, MatrixClientPeg.get()) ContentMessages.sharedInstance().sendStickerContentToRoom(url, this.state.room.roomId, info, text, MatrixClientPeg.get())
.done(undefined, (error) => { .then(undefined, (error) => {
if (error.name === "UnknownDeviceError") { if (error.name === "UnknownDeviceError") {
// Let the staus bar handle this // Let the staus bar handle this
return; return;
@ -1145,7 +1144,7 @@ module.exports = createReactClass({
filter: filter, filter: filter,
term: term, term: term,
}); });
this._handleSearchResult(searchPromise).done(); this._handleSearchResult(searchPromise);
}, },
_handleSearchResult: function(searchPromise) { _handleSearchResult: function(searchPromise) {
@ -1316,7 +1315,7 @@ module.exports = createReactClass({
}, },
onForgetClick: function() { onForgetClick: function() {
MatrixClientPeg.get().forget(this.state.room.roomId).done(function() { MatrixClientPeg.get().forget(this.state.room.roomId).then(function() {
dis.dispatch({ action: 'view_next_room' }); dis.dispatch({ action: 'view_next_room' });
}, function(err) { }, function(err) {
const errCode = err.errcode || _t("unknown error code"); const errCode = err.errcode || _t("unknown error code");
@ -1333,7 +1332,7 @@ module.exports = createReactClass({
this.setState({ this.setState({
rejecting: true, rejecting: true,
}); });
MatrixClientPeg.get().leave(this.state.roomId).done(function() { MatrixClientPeg.get().leave(this.state.roomId).then(function() {
dis.dispatch({ action: 'view_next_room' }); dis.dispatch({ action: 'view_next_room' });
self.setState({ self.setState({
rejecting: false, rejecting: false,

View file

@ -17,7 +17,6 @@ limitations under the License.
import React from "react"; import React from "react";
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Promise from 'bluebird';
import { KeyCode } from '../../Keyboard'; import { KeyCode } from '../../Keyboard';
import Timer from '../../utils/Timer'; import Timer from '../../utils/Timer';
import AutoHideScrollbar from "./AutoHideScrollbar"; import AutoHideScrollbar from "./AutoHideScrollbar";

View file

@ -23,7 +23,6 @@ import React from 'react';
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Promise from 'bluebird';
const Matrix = require("matrix-js-sdk"); const Matrix = require("matrix-js-sdk");
const EventTimeline = Matrix.EventTimeline; const EventTimeline = Matrix.EventTimeline;
@ -462,7 +461,7 @@ const TimelinePanel = createReactClass({
// timeline window. // timeline window.
// //
// see https://github.com/vector-im/vector-web/issues/1035 // see https://github.com/vector-im/vector-web/issues/1035
this._timelineWindow.paginate(EventTimeline.FORWARDS, 1, false).done(() => { this._timelineWindow.paginate(EventTimeline.FORWARDS, 1, false).then(() => {
if (this.unmounted) { return; } if (this.unmounted) { return; }
const { events, liveEvents } = this._getEvents(); const { events, liveEvents } = this._getEvents();

View file

@ -105,7 +105,7 @@ module.exports = createReactClass({
phase: PHASE_SENDING_EMAIL, phase: PHASE_SENDING_EMAIL,
}); });
this.reset = new PasswordReset(this.props.serverConfig.hsUrl, this.props.serverConfig.isUrl); this.reset = new PasswordReset(this.props.serverConfig.hsUrl, this.props.serverConfig.isUrl);
this.reset.resetPassword(email, password).done(() => { this.reset.resetPassword(email, password).then(() => {
this.setState({ this.setState({
phase: PHASE_EMAIL_SENT, phase: PHASE_EMAIL_SENT,
}); });

View file

@ -253,7 +253,7 @@ module.exports = createReactClass({
this.setState({ this.setState({
busy: false, busy: false,
}); });
}).done(); });
}, },
onUsernameChanged: function(username) { onUsernameChanged: function(username) {
@ -424,7 +424,7 @@ module.exports = createReactClass({
this.setState({ this.setState({
busy: false, busy: false,
}); });
}).done(); });
}, },
_isSupportedFlow: function(flow) { _isSupportedFlow: function(flow) {

View file

@ -43,7 +43,7 @@ module.exports = createReactClass({
const cli = MatrixClientPeg.get(); const cli = MatrixClientPeg.get();
this.setState({busy: true}); this.setState({busy: true});
const self = this; const self = this;
cli.getProfileInfo(cli.credentials.userId).done(function(result) { cli.getProfileInfo(cli.credentials.userId).then(function(result) {
self.setState({ self.setState({
avatarUrl: MatrixClientPeg.get().mxcUrlToHttp(result.avatar_url), avatarUrl: MatrixClientPeg.get().mxcUrlToHttp(result.avatar_url),
busy: false, busy: false,

View file

@ -18,7 +18,6 @@ limitations under the License.
*/ */
import Matrix from 'matrix-js-sdk'; import Matrix from 'matrix-js-sdk';
import Promise from 'bluebird';
import React from 'react'; import React from 'react';
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
@ -371,7 +370,7 @@ module.exports = createReactClass({
if (pushers[i].kind === 'email') { if (pushers[i].kind === 'email') {
const emailPusher = pushers[i]; const emailPusher = pushers[i];
emailPusher.data = { brand: this.props.brand }; emailPusher.data = { brand: this.props.brand };
matrixClient.setPusher(emailPusher).done(() => { matrixClient.setPusher(emailPusher).then(() => {
console.log("Set email branding to " + this.props.brand); console.log("Set email branding to " + this.props.brand);
}, (error) => { }, (error) => {
console.error("Couldn't set email branding: " + error); console.error("Couldn't set email branding: " + error);

View file

@ -441,7 +441,7 @@ export const MsisdnAuthEntry = createReactClass({
this.props.fail(e); this.props.fail(e);
}).finally(() => { }).finally(() => {
this.setState({requestingToken: false}); this.setState({requestingToken: false});
}).done(); });
}, },
/* /*

View file

@ -160,7 +160,7 @@ module.exports = createReactClass({
_onClickForget: function() { _onClickForget: function() {
// FIXME: duplicated with RoomSettings (and dead code in RoomView) // FIXME: duplicated with RoomSettings (and dead code in RoomView)
MatrixClientPeg.get().forget(this.props.room.roomId).done(() => { MatrixClientPeg.get().forget(this.props.room.roomId).then(() => {
// Switch to another room view if we're currently viewing the // Switch to another room view if we're currently viewing the
// historical room // historical room
if (RoomViewStore.getRoomId() === this.props.room.roomId) { if (RoomViewStore.getRoomId() === this.props.room.roomId) {
@ -190,7 +190,7 @@ module.exports = createReactClass({
this.setState({ this.setState({
roomNotifState: newState, roomNotifState: newState,
}); });
RoomNotifs.setRoomNotifsState(roomId, newState).done(() => { RoomNotifs.setRoomNotifsState(roomId, newState).then(() => {
// delay slightly so that the user can see their state change // delay slightly so that the user can see their state change
// before closing the menu // before closing the menu
return sleep(500).then(() => { return sleep(500).then(() => {

View file

@ -266,7 +266,7 @@ module.exports = createReactClass({
this.setState({ this.setState({
searchError: err.errcode ? err.message : _t('Something went wrong!'), searchError: err.errcode ? err.message : _t('Something went wrong!'),
}); });
}).done(() => { }).then(() => {
this.setState({ this.setState({
busy: false, busy: false,
}); });
@ -379,7 +379,7 @@ module.exports = createReactClass({
// Do a local search immediately // Do a local search immediately
this._doLocalSearch(query); this._doLocalSearch(query);
} }
}).done(() => { }).then(() => {
this.setState({ this.setState({
busy: false, busy: false,
}); });

View file

@ -93,7 +93,7 @@ export default createReactClass({
this.setState({createError: e}); this.setState({createError: e});
}).finally(() => { }).finally(() => {
this.setState({creating: false}); this.setState({creating: false});
}).done(); });
}, },
_onCancel: function() { _onCancel: function() {

View file

@ -78,7 +78,7 @@ export default createReactClass({
true, true,
); );
} }
}).done(); });
}, },
componentWillUnmount: function() { componentWillUnmount: function() {

View file

@ -62,7 +62,7 @@ export default createReactClass({
return; return;
} }
this._addThreepid = new AddThreepid(); this._addThreepid = new AddThreepid();
this._addThreepid.addEmailAddress(emailAddress).done(() => { this._addThreepid.addEmailAddress(emailAddress).then(() => {
Modal.createTrackedDialog('Verification Pending', '', QuestionDialog, { Modal.createTrackedDialog('Verification Pending', '', QuestionDialog, {
title: _t("Verification Pending"), title: _t("Verification Pending"),
description: _t( description: _t(
@ -96,7 +96,7 @@ export default createReactClass({
}, },
verifyEmailAddress: function() { verifyEmailAddress: function() {
this._addThreepid.checkEmailLinkClicked().done(() => { this._addThreepid.checkEmailLinkClicked().then(() => {
this.props.onFinished(true); this.props.onFinished(true);
}, (err) => { }, (err) => {
this.setState({emailBusy: false}); this.setState({emailBusy: false});

View file

@ -15,7 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
import React from 'react'; import React from 'react';
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';

View file

@ -205,7 +205,7 @@ export default class AppTile extends React.Component {
if (!this._scalarClient) { if (!this._scalarClient) {
this._scalarClient = defaultManager.getScalarClient(); this._scalarClient = defaultManager.getScalarClient();
} }
this._scalarClient.getScalarToken().done((token) => { this._scalarClient.getScalarToken().then((token) => {
// Append scalar_token as a query param if not already present // Append scalar_token as a query param if not already present
this._scalarClient.scalarToken = token; this._scalarClient.scalarToken = token;
const u = url.parse(this._addWurlParams(this.props.url)); const u = url.parse(this._addWurlParams(this.props.url));

View file

@ -17,7 +17,6 @@ limitations under the License.
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import sdk from '../../../index'; import sdk from '../../../index';
import Promise from 'bluebird';
/** /**
* A component which wraps an EditableText, with a spinner while updates take * A component which wraps an EditableText, with a spinner while updates take
@ -51,7 +50,7 @@ export default class EditableTextContainer extends React.Component {
this.setState({busy: true}); this.setState({busy: true});
this.props.getInitialValue().done( this.props.getInitialValue().then(
(result) => { (result) => {
if (this._unmounted) { return; } if (this._unmounted) { return; }
this.setState({ this.setState({
@ -83,7 +82,7 @@ export default class EditableTextContainer extends React.Component {
errorString: null, errorString: null,
}); });
this.props.onSubmit(value).done( this.props.onSubmit(value).then(
() => { () => {
if (this._unmounted) { return; } if (this._unmounted) { return; }
this.setState({ this.setState({

View file

@ -54,7 +54,7 @@ export default class ErrorBoundary extends React.PureComponent {
if (!PlatformPeg.get()) return; if (!PlatformPeg.get()) return;
MatrixClientPeg.get().stopClient(); MatrixClientPeg.get().stopClient();
MatrixClientPeg.get().store.deleteAllData().done(() => { MatrixClientPeg.get().store.deleteAllData().then(() => {
PlatformPeg.get().reload(); PlatformPeg.get().reload();
}); });
}; };

View file

@ -84,7 +84,7 @@ export default class ImageView extends React.Component {
title: _t('Error'), title: _t('Error'),
description: _t('You cannot delete this image. (%(code)s)', {code: code}), description: _t('You cannot delete this image. (%(code)s)', {code: code}),
}); });
}).done(); });
}, },
}); });
}; };

View file

@ -49,7 +49,7 @@ export default class LanguageDropdown extends React.Component {
this.setState({langs}); this.setState({langs});
}).catch(() => { }).catch(() => {
this.setState({langs: ['en']}); this.setState({langs: ['en']});
}).done(); });
if (!this.props.value) { if (!this.props.value) {
// If no value is given, we start with the first // If no value is given, we start with the first

View file

@ -36,7 +36,7 @@ export default createReactClass({
}, },
componentWillMount: function() { componentWillMount: function() {
this.context.matrixClient.getJoinedGroups().done((result) => { this.context.matrixClient.getJoinedGroups().then((result) => {
this.setState({groups: result.groups || [], error: null}); this.setState({groups: result.groups || [], error: null});
}, (err) => { }, (err) => {
console.error(err); console.error(err);

View file

@ -55,7 +55,7 @@ export default class MAudioBody extends React.Component {
decryptFile(content.file).then(function(blob) { decryptFile(content.file).then(function(blob) {
decryptedBlob = blob; decryptedBlob = blob;
return URL.createObjectURL(decryptedBlob); return URL.createObjectURL(decryptedBlob);
}).done((url) => { }).then((url) => {
this.setState({ this.setState({
decryptedUrl: url, decryptedUrl: url,
decryptedBlob: decryptedBlob, decryptedBlob: decryptedBlob,

View file

@ -24,7 +24,6 @@ import MFileBody from './MFileBody';
import Modal from '../../../Modal'; import Modal from '../../../Modal';
import sdk from '../../../index'; import sdk from '../../../index';
import { decryptFile } from '../../../utils/DecryptFile'; import { decryptFile } from '../../../utils/DecryptFile';
import Promise from 'bluebird';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import SettingsStore from "../../../settings/SettingsStore"; import SettingsStore from "../../../settings/SettingsStore";
@ -289,7 +288,7 @@ export default class MImageBody extends React.Component {
this.setState({ this.setState({
error: err, error: err,
}); });
}).done(); });
} }
// Remember that the user wanted to show this particular image // Remember that the user wanted to show this particular image

View file

@ -20,7 +20,6 @@ import createReactClass from 'create-react-class';
import MFileBody from './MFileBody'; import MFileBody from './MFileBody';
import MatrixClientPeg from '../../../MatrixClientPeg'; import MatrixClientPeg from '../../../MatrixClientPeg';
import { decryptFile } from '../../../utils/DecryptFile'; import { decryptFile } from '../../../utils/DecryptFile';
import Promise from 'bluebird';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import SettingsStore from "../../../settings/SettingsStore"; import SettingsStore from "../../../settings/SettingsStore";
@ -115,7 +114,7 @@ module.exports = createReactClass({
this.setState({ this.setState({
error: err, error: err,
}); });
}).done(); });
} }
}, },

View file

@ -870,7 +870,7 @@ const UserInfo = withLegacyMatrixClient(({matrixClient: cli, user, groupId, room
}, },
).finally(() => { ).finally(() => {
stopUpdating(); stopUpdating();
}).done(); });
}; };
const roomId = user.roomId; const roomId = user.roomId;

View file

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';

View file

@ -21,7 +21,6 @@ import PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import flatMap from 'lodash/flatMap'; import flatMap from 'lodash/flatMap';
import type {Completion} from '../../../autocomplete/Autocompleter'; import type {Completion} from '../../../autocomplete/Autocompleter';
import Promise from 'bluebird';
import { Room } from 'matrix-js-sdk'; import { Room } from 'matrix-js-sdk';
import SettingsStore from "../../../settings/SettingsStore"; import SettingsStore from "../../../settings/SettingsStore";

View file

@ -53,7 +53,7 @@ module.exports = createReactClass({
); );
}, (error)=>{ }, (error)=>{
console.error("Failed to get URL preview: " + error); console.error("Failed to get URL preview: " + error);
}).done(); });
}, },
componentDidMount: function() { componentDidMount: function() {

View file

@ -248,7 +248,7 @@ module.exports = createReactClass({
return client.getStoredDevicesForUser(member.userId); return client.getStoredDevicesForUser(member.userId);
}).finally(function() { }).finally(function() {
self._cancelDeviceList = null; self._cancelDeviceList = null;
}).done(function(devices) { }).then(function(devices) {
if (cancelled) { if (cancelled) {
// we got cancelled - presumably a different user now // we got cancelled - presumably a different user now
return; return;
@ -572,7 +572,7 @@ module.exports = createReactClass({
}, },
).finally(()=>{ ).finally(()=>{
this.setState({ updating: this.state.updating - 1 }); this.setState({ updating: this.state.updating - 1 });
}).done(); });
}, },
onPowerChange: async function(powerLevel) { onPowerChange: async function(powerLevel) {
@ -629,7 +629,7 @@ module.exports = createReactClass({
this.setState({ updating: this.state.updating + 1 }); this.setState({ updating: this.state.updating + 1 });
createRoom({dmUserId: this.props.member.userId}).finally(() => { createRoom({dmUserId: this.props.member.userId}).finally(() => {
this.setState({ updating: this.state.updating - 1 }); this.setState({ updating: this.state.updating - 1 });
}).done(); });
}, },
onLeaveClick: function() { onLeaveClick: function() {

View file

@ -112,7 +112,7 @@ module.exports = createReactClass({
} }
}); });
httpPromise.done(function() { httpPromise.then(function() {
self.setState({ self.setState({
phase: self.Phases.Display, phase: self.Phases.Display,
avatarUrl: MatrixClientPeg.get().mxcUrlToHttp(newUrl), avatarUrl: MatrixClientPeg.get().mxcUrlToHttp(newUrl),

View file

@ -25,7 +25,6 @@ const Modal = require("../../../Modal");
const sdk = require("../../../index"); const sdk = require("../../../index");
import dis from "../../../dispatcher"; import dis from "../../../dispatcher";
import Promise from 'bluebird';
import AccessibleButton from '../elements/AccessibleButton'; import AccessibleButton from '../elements/AccessibleButton';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
@ -174,7 +173,7 @@ module.exports = createReactClass({
newPassword: "", newPassword: "",
newPasswordConfirm: "", newPasswordConfirm: "",
}); });
}).done(); });
}, },
_optionallySetEmail: function() { _optionallySetEmail: function() {

View file

@ -52,7 +52,7 @@ export default class DevicesPanel extends React.Component {
} }
_loadDevices() { _loadDevices() {
MatrixClientPeg.get().getDevices().done( MatrixClientPeg.get().getDevices().then(
(resp) => { (resp) => {
if (this._unmounted) { return; } if (this._unmounted) { return; }
this.setState({devices: resp.devices || []}); this.setState({devices: resp.devices || []});

View file

@ -16,7 +16,6 @@ limitations under the License.
import React from 'react'; import React from 'react';
import createReactClass from 'create-react-class'; import createReactClass from 'create-react-class';
import Promise from 'bluebird';
import sdk from '../../../index'; import sdk from '../../../index';
import { _t } from '../../../languageHandler'; import { _t } from '../../../languageHandler';
import MatrixClientPeg from '../../../MatrixClientPeg'; import MatrixClientPeg from '../../../MatrixClientPeg';
@ -97,7 +96,7 @@ module.exports = createReactClass({
phase: this.phases.LOADING, phase: this.phases.LOADING,
}); });
MatrixClientPeg.get().setPushRuleEnabled('global', self.state.masterPushRule.kind, self.state.masterPushRule.rule_id, !checked).done(function() { MatrixClientPeg.get().setPushRuleEnabled('global', self.state.masterPushRule.kind, self.state.masterPushRule.rule_id, !checked).then(function() {
self._refreshFromServer(); self._refreshFromServer();
}); });
}, },
@ -170,7 +169,7 @@ module.exports = createReactClass({
emailPusher.kind = null; emailPusher.kind = null;
emailPusherPromise = MatrixClientPeg.get().setPusher(emailPusher); emailPusherPromise = MatrixClientPeg.get().setPusher(emailPusher);
} }
emailPusherPromise.done(() => { emailPusherPromise.then(() => {
this._refreshFromServer(); this._refreshFromServer();
}, (error) => { }, (error) => {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
@ -274,7 +273,7 @@ module.exports = createReactClass({
} }
} }
Promise.all(deferreds).done(function() { Promise.all(deferreds).then(function() {
self._refreshFromServer(); self._refreshFromServer();
}, function(error) { }, function(error) {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
@ -343,7 +342,7 @@ module.exports = createReactClass({
} }
} }
Promise.all(deferreds).done(function(resps) { Promise.all(deferreds).then(function(resps) {
self._refreshFromServer(); self._refreshFromServer();
}, function(error) { }, function(error) {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
@ -398,7 +397,7 @@ module.exports = createReactClass({
}; };
// Then, add the new ones // Then, add the new ones
Promise.all(removeDeferreds).done(function(resps) { Promise.all(removeDeferreds).then(function(resps) {
const deferreds = []; const deferreds = [];
let pushRuleVectorStateKind = self.state.vectorContentRules.vectorState; let pushRuleVectorStateKind = self.state.vectorContentRules.vectorState;
@ -434,7 +433,7 @@ module.exports = createReactClass({
} }
} }
Promise.all(deferreds).done(function(resps) { Promise.all(deferreds).then(function(resps) {
self._refreshFromServer(); self._refreshFromServer();
}, onError); }, onError);
}, onError); }, onError);
@ -650,7 +649,7 @@ module.exports = createReactClass({
externalContentRules: self.state.externalContentRules, externalContentRules: self.state.externalContentRules,
externalPushRules: self.state.externalPushRules, externalPushRules: self.state.externalPushRules,
}); });
}).done(); });
MatrixClientPeg.get().getThreePids().then((r) => this.setState({threepids: r.threepids})); MatrixClientPeg.get().getThreePids().then((r) => this.setState({threepids: r.threepids}));
}, },

View file

@ -75,7 +75,7 @@ export default class HelpUserSettingsTab extends React.Component {
// stopping in the middle of the logs. // stopping in the middle of the logs.
console.log("Clear cache & reload clicked"); console.log("Clear cache & reload clicked");
MatrixClientPeg.get().stopClient(); MatrixClientPeg.get().stopClient();
MatrixClientPeg.get().store.deleteAllData().done(() => { MatrixClientPeg.get().store.deleteAllData().then(() => {
PlatformPeg.get().reload(); PlatformPeg.get().reload();
}); });
}; };

View file

@ -21,7 +21,6 @@ import { _t } from './languageHandler';
import dis from "./dispatcher"; import dis from "./dispatcher";
import * as Rooms from "./Rooms"; import * as Rooms from "./Rooms";
import Promise from 'bluebird';
import {getAddressType} from "./UserAddress"; import {getAddressType} from "./UserAddress";
/** /**

View file

@ -19,7 +19,6 @@ limitations under the License.
import request from 'browser-request'; import request from 'browser-request';
import counterpart from 'counterpart'; import counterpart from 'counterpart';
import Promise from 'bluebird';
import React from 'react'; import React from 'react';
import SettingsStore, {SettingLevel} from "./settings/SettingsStore"; import SettingsStore, {SettingLevel} from "./settings/SettingsStore";

View file

@ -16,8 +16,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
// This module contains all the code needed to log the console, persist it to // This module contains all the code needed to log the console, persist it to
// disk and submit bug reports. Rationale is as follows: // disk and submit bug reports. Rationale is as follows:
// - Monkey-patching the console is preferable to having a log library because // - Monkey-patching the console is preferable to having a log library because

View file

@ -17,7 +17,6 @@ limitations under the License.
*/ */
import pako from 'pako'; import pako from 'pako';
import Promise from 'bluebird';
import MatrixClientPeg from '../MatrixClientPeg'; import MatrixClientPeg from '../MatrixClientPeg';
import PlatformPeg from '../PlatformPeg'; import PlatformPeg from '../PlatformPeg';

View file

@ -15,7 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
import SettingsHandler from "./SettingsHandler"; import SettingsHandler from "./SettingsHandler";
import MatrixClientPeg from "../../MatrixClientPeg"; import MatrixClientPeg from "../../MatrixClientPeg";
import {SettingLevel} from "../SettingsStore"; import {SettingLevel} from "../SettingsStore";

View file

@ -15,7 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from "bluebird";
import SettingsHandler from "./SettingsHandler"; import SettingsHandler from "./SettingsHandler";
/** /**

View file

@ -15,7 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from 'bluebird';
import SettingsHandler from "./SettingsHandler"; import SettingsHandler from "./SettingsHandler";
import {SettingLevel} from "../SettingsStore"; import {SettingLevel} from "../SettingsStore";

View file

@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import Promise from "bluebird";
/** /**
* Represents the base class for all level handlers. This class performs no logic * Represents the base class for all level handlers. This class performs no logic
* and should be overridden. * and should be overridden.

View file

@ -15,7 +15,6 @@ limitations under the License.
*/ */
import EventEmitter from 'events'; import EventEmitter from 'events';
import Promise from 'bluebird';
const BULK_REQUEST_DEBOUNCE_MS = 200; const BULK_REQUEST_DEBOUNCE_MS = 200;

View file

@ -234,7 +234,7 @@ class RoomViewStore extends Store {
}); });
MatrixClientPeg.get().joinRoom( MatrixClientPeg.get().joinRoom(
this._state.roomAlias || this._state.roomId, payload.opts, this._state.roomAlias || this._state.roomId, payload.opts,
).done(() => { ).then(() => {
// We don't actually need to do anything here: we do *not* // We don't actually need to do anything here: we do *not*
// clear the 'joining' flag because the Room object and/or // clear the 'joining' flag because the Room object and/or
// our 'joined' member event may not have come down the sync // our 'joined' member event may not have come down the sync

View file

@ -21,7 +21,6 @@ import encrypt from 'browser-encrypt-attachment';
import 'isomorphic-fetch'; import 'isomorphic-fetch';
// Grab the client so that we can turn mxc:// URLs into https:// URLS. // Grab the client so that we can turn mxc:// URLs into https:// URLS.
import MatrixClientPeg from '../MatrixClientPeg'; import MatrixClientPeg from '../MatrixClientPeg';
import Promise from 'bluebird';
// WARNING: We have to be very careful about what mime-types we allow into blobs, // WARNING: We have to be very careful about what mime-types we allow into blobs,
// as for performance reasons these are now rendered via URL.createObjectURL() // as for performance reasons these are now rendered via URL.createObjectURL()

View file

@ -15,11 +15,9 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import React from "react";
import MatrixClientPeg from '../MatrixClientPeg'; import MatrixClientPeg from '../MatrixClientPeg';
import {getAddressType} from '../UserAddress'; import {getAddressType} from '../UserAddress';
import GroupStore from '../stores/GroupStore'; import GroupStore from '../stores/GroupStore';
import Promise from 'bluebird';
import {_t} from "../languageHandler"; import {_t} from "../languageHandler";
import sdk from "../index"; import sdk from "../index";
import Modal from "../Modal"; import Modal from "../Modal";

View file

@ -14,9 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This is only here to allow access to methods like done for the time being
import Promise from "bluebird";
// @flow // @flow
// Returns a promise which resolves with a given value after the given number of ms // Returns a promise which resolves with a given value after the given number of ms

View file

@ -15,7 +15,6 @@ limitations under the License.
*/ */
import expect from 'expect'; import expect from 'expect';
import Promise from 'bluebird';
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import ReactTestUtils from 'react-dom/test-utils'; import ReactTestUtils from 'react-dom/test-utils';

View file

@ -91,7 +91,7 @@ describe('MemberEventListSummary', function() {
testUtils.beforeEach(this); testUtils.beforeEach(this);
sandbox = testUtils.stubClient(); sandbox = testUtils.stubClient();
languageHandler.setLanguage('en').done(done); languageHandler.setLanguage('en').then(done);
languageHandler.setMissingEntryGenerator(function(key) { languageHandler.setMissingEntryGenerator(function(key) {
return key.split('|', 2)[1]; return key.split('|', 2)[1];
}); });

View file

@ -3,7 +3,6 @@ import ReactTestUtils from 'react-dom/test-utils';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import expect from 'expect'; import expect from 'expect';
import sinon from 'sinon'; import sinon from 'sinon';
import Promise from 'bluebird';
import * as testUtils from '../../../test-utils'; import * as testUtils from '../../../test-utils';
import sdk from 'matrix-react-sdk'; import sdk from 'matrix-react-sdk';
const MessageComposerInput = sdk.getComponent('views.rooms.MessageComposerInput'); const MessageComposerInput = sdk.getComponent('views.rooms.MessageComposerInput');

View file

@ -3,7 +3,6 @@
// import ReactDOM from 'react-dom'; // import ReactDOM from 'react-dom';
// import expect from 'expect'; // import expect from 'expect';
// import jest from 'jest-mock'; // import jest from 'jest-mock';
// import Promise from 'bluebird';
// import * as testUtils from '../../../test-utils'; // import * as testUtils from '../../../test-utils';
// import sdk from 'matrix-react-sdk'; // import sdk from 'matrix-react-sdk';
// const WrappedRoomSettings = testUtils.wrapInMatrixClientContext(sdk.getComponent('views.rooms.RoomSettings')); // const WrappedRoomSettings = testUtils.wrapInMatrixClientContext(sdk.getComponent('views.rooms.RoomSettings'));

View file

@ -11,7 +11,7 @@ describe('languageHandler', function() {
testUtils.beforeEach(this); testUtils.beforeEach(this);
sandbox = testUtils.stubClient(); sandbox = testUtils.stubClient();
languageHandler.setLanguage('en').done(done); languageHandler.setLanguage('en').then(done);
}); });
afterEach(function() { afterEach(function() {

View file

@ -1,13 +1,11 @@
import expect from 'expect'; import expect from 'expect';
import dis from '../../src/dispatcher';
import RoomViewStore from '../../src/stores/RoomViewStore'; import RoomViewStore from '../../src/stores/RoomViewStore';
import peg from '../../src/MatrixClientPeg'; import peg from '../../src/MatrixClientPeg';
import * as testUtils from '../test-utils'; import * as testUtils from '../test-utils';
import Promise from 'bluebird';
const dispatch = testUtils.getDispatchForStore(RoomViewStore); const dispatch = testUtils.getDispatchForStore(RoomViewStore);

View file

@ -1,7 +1,6 @@
"use strict"; "use strict";
import sinon from 'sinon'; import sinon from 'sinon';
import Promise from 'bluebird';
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import peg from '../src/MatrixClientPeg'; import peg from '../src/MatrixClientPeg';

View file

@ -899,7 +899,7 @@ babel-helper-explode-assignable-expression@^6.24.1:
babel-traverse "^6.24.1" babel-traverse "^6.24.1"
babel-types "^6.24.1" babel-types "^6.24.1"
babel-helper-function-name@^6.24.1, babel-helper-function-name@^6.8.0: babel-helper-function-name@^6.24.1:
version "6.24.1" version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=
@ -1042,16 +1042,6 @@ babel-plugin-syntax-trailing-function-commas@^6.22.0:
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=
babel-plugin-transform-async-to-bluebird@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-bluebird/-/babel-plugin-transform-async-to-bluebird-1.1.1.tgz#46ea3e7c5af629782ac9f1ed1b7cd38f8425afd4"
integrity sha1-Ruo+fFr2KXgqyfHtG3zTj4Qlr9Q=
dependencies:
babel-helper-function-name "^6.8.0"
babel-plugin-syntax-async-functions "^6.8.0"
babel-template "^6.9.0"
babel-traverse "^6.10.4"
babel-plugin-transform-async-to-generator@^6.24.1: babel-plugin-transform-async-to-generator@^6.24.1:
version "6.24.1" version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761"
@ -1442,7 +1432,7 @@ babel-runtime@^6.18.0, babel-runtime@^6.2.0, babel-runtime@^6.22.0, babel-runtim
core-js "^2.4.0" core-js "^2.4.0"
regenerator-runtime "^0.11.0" regenerator-runtime "^0.11.0"
babel-template@^6.24.1, babel-template@^6.26.0, babel-template@^6.3.0, babel-template@^6.9.0: babel-template@^6.24.1, babel-template@^6.26.0, babel-template@^6.3.0:
version "6.26.0" version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=
@ -1453,7 +1443,7 @@ babel-template@^6.24.1, babel-template@^6.26.0, babel-template@^6.3.0, babel-tem
babylon "^6.18.0" babylon "^6.18.0"
lodash "^4.17.4" lodash "^4.17.4"
babel-traverse@^6.10.4, babel-traverse@^6.24.1, babel-traverse@^6.26.0: babel-traverse@^6.24.1, babel-traverse@^6.26.0:
version "6.26.0" version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=