replace imports of `q` with bluebird

update `package.json`

```
find src test -name '*.js' |
    xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
    xargs perl -i -pe 'if (/import [qQ] /) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
pull/4565/head
Richard van der Hoff 5 years ago
parent 898725082a
commit 10decf95f6
  1. 2
      package.json
  2. 2
      src/VectorConferenceHandler.js
  3. 2
      src/components/structures/RoomDirectory.js
  4. 2
      src/components/views/context_menus/RoomTileContextMenu.js
  5. 2
      src/components/views/settings/Notifications.js
  6. 2
      src/vector/index.js
  7. 2
      src/vector/platform/ElectronPlatform.js
  8. 2
      src/vector/platform/WebPlatform.js
  9. 2
      src/vector/rageshake.js
  10. 2
      src/vector/submit-rageshake.js
  11. 2
      test/app-tests/joining.js
  12. 2
      test/app-tests/loading.js
  13. 2
      test/test-utils.js

@ -54,6 +54,7 @@
"dependencies": {
"babel-polyfill": "^6.5.0",
"babel-runtime": "^6.11.6",
"bluebird": "^3.5.0",
"browser-request": "^0.3.3",
"classnames": "^2.1.2",
"draft-js": "^0.8.1",
@ -69,7 +70,6 @@
"matrix-react-sdk": "0.9.7",
"modernizr": "^3.1.0",
"pako": "^1.0.5",
"q": "^1.4.1",
"react": "^15.4.0",
"react-dnd": "^2.1.4",
"react-dnd-html5-backend": "^2.1.2",

@ -16,7 +16,7 @@ limitations under the License.
"use strict";
var q = require("q");
import Promise from 'bluebird';
var Matrix = require("matrix-js-sdk");
var Room = Matrix.Room;
var CallHandler = require('matrix-react-sdk/lib/CallHandler');

@ -28,7 +28,7 @@ var linkify = require('linkifyjs');
var linkifyString = require('linkifyjs/string');
var linkifyMatrix = require('matrix-react-sdk/lib/linkify-matrix');
var sanitizeHtml = require('sanitize-html');
var q = require('q');
import Promise from 'bluebird';
import { _t } from 'matrix-react-sdk/lib/languageHandler';

@ -17,7 +17,7 @@ limitations under the License.
'use strict';
import q from 'q';
import Promise from 'bluebird';
import React from 'react';
import classNames from 'classnames';
import sdk from 'matrix-react-sdk';

@ -17,7 +17,7 @@ limitations under the License.
'use strict';
var React = require('react');
import { _t, _tJsx } from 'matrix-react-sdk/lib/languageHandler';
var q = require("q");
import Promise from 'bluebird';
var sdk = require('matrix-react-sdk');
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
var UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore');

@ -65,7 +65,7 @@ var sdk = require("matrix-react-sdk");
const PlatformPeg = require("matrix-react-sdk/lib/PlatformPeg");
sdk.loadSkin(require('../component-index'));
var VectorConferenceHandler = require('../VectorConferenceHandler');
var q = require('q');
import Promise from 'bluebird';
var request = require('browser-request');
import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
import * as languageHandler from 'matrix-react-sdk/lib/languageHandler';

@ -20,7 +20,7 @@ limitations under the License.
import VectorBasePlatform, {updateCheckStatusEnum} from './VectorBasePlatform';
import dis from 'matrix-react-sdk/lib/dispatcher';
import { _t } from 'matrix-react-sdk/lib/languageHandler';
import q from 'q';
import Promise from 'bluebird';
import {remote, ipcRenderer} from 'electron';
import rageshake from '../rageshake';

@ -21,7 +21,7 @@ import VectorBasePlatform, {updateCheckStatusEnum} from './VectorBasePlatform';
import request from 'browser-request';
import dis from 'matrix-react-sdk/lib/dispatcher.js';
import { _t } from 'matrix-react-sdk/lib/languageHandler';
import q from 'q';
import Promise from 'bluebird';
import url from 'url';
import UAParser from 'ua-parser-js';

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import q from "q";
import Promise from 'bluebird';
// This module contains all the code needed to log the console, persist it to
// disk and submit bug reports. Rationale is as follows:

@ -15,7 +15,7 @@ limitations under the License.
*/
import pako from 'pako';
import q from "q";
import Promise from 'bluebird';
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';

@ -33,7 +33,7 @@ var React = require('react');
var ReactDOM = require('react-dom');
var ReactTestUtils = require('react-addons-test-utils');
var expect = require('expect');
var q = require('q');
import Promise from 'bluebird';
var test_utils = require('../test-utils');
var MockHttpBackend = require('matrix-mock-request');

@ -22,7 +22,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import ReactTestUtils from 'react-addons-test-utils';
import expect from 'expect';
import q from 'q';
import Promise from 'bluebird';
import jssdk from 'matrix-js-sdk';

@ -1,6 +1,6 @@
"use strict";
var q = require('q');
import Promise from 'bluebird';
/**
* Perform common actions before each test case, e.g. printing the test case

Loading…
Cancel
Save