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 2017-07-13 00:48:31 +01:00
parent 898725082a
commit 10decf95f6
13 changed files with 13 additions and 13 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. 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 // 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:

View File

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

View File

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

View File

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

View File

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