Commit graph

323 commits

Author SHA1 Message Date
Richard van der Hoff
4d83150855 Transform async functions to bluebird promises
It turns out that the assertion made in
https://github.com/matrix-org/matrix-react-sdk/pull/1213 about `async`
functions returning bluebird promises was only correct when babel used an
inline version of the `asyncToGenerator` helper; in react-sdk we are using
`babel-transform-runtime` which means that we use a separate
`babel-runtime/helpers/asyncToGenerator`, which returns a native (or core-js)
Promise.

This meant that we were still in the situation where some methods returned
native Promises, and some bluebird ones, which is exactly the situation I
wanted to resolve by switching to bluebird in the first place: in short,
unless/until we get rid of all code which assumes Promises have a `done` method
etc, we need to make sure that everything returns a bluebird promise.

(Aside: there was debate over whether in the long term we should be trying to
wean ourselves off bluebird promises by assuming all promises are native. The
conclusion was that the complexity hit involved in doing so outweighed any
benefit of a potential future migration away from bluebird).
2017-07-13 17:10:08 +01:00
Richard van der Hoff
a06bd84213 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"; }'
```
2017-07-12 18:05:08 +01:00
David Baker
3093f2d6fb Merge pull request #1211 from matrix-org/rav/use_react_test_utils
Use matrix-react-test-utils rather than our own impl
2017-07-12 16:44:25 +01:00
Richard van der Hoff
928287b8fc Bump to matrix-react-test-utils 0.1.1
... because 0.1.0 was broken
2017-07-12 00:02:52 +01:00
Richard van der Hoff
ab61b6b1b6 Use matrix-react-test-utils rather than our own impl
waitForRenderedDOMComponentWithTag is now in matrix-react-test-utils.
2017-07-11 23:14:56 +01:00
Michael Telatynski
7473c654d5
use npm scripts arg passing instead of $KARMAFLAGS to make cross-compat 2017-07-11 22:54:18 +01:00
David Baker
e242e5e714 Merge pull request #1205 from matrix-org/luke/feature-new-emojis
Bump the dep on emojione to 2.2.7 to add 🦈 and others
2017-07-11 14:13:13 +01:00
Luke Barnard
4766447e15 Bump the dep on emojione to 2.2.7 to add 🦈 and others
Also, re-run node scripts/emoji-data-strip.js to update emoji meta data in src/stripped-emoji.json
2017-07-11 13:48:15 +01:00
Luke Barnard
f9ee89b2f4 Merge branch 'develop' into matthew/whitelist-uri-schemes 2017-07-10 15:42:03 +01:00
Kegsay
e0e321783b Append the scalar_token to the widget URL if the widget URL is a scalar URL (#1182) 2017-07-06 09:28:48 +01:00
Richard van der Hoff
f69033c907 Use headless chrome instead of phantomjs for tests 2017-07-05 14:39:02 +01:00
Luke Barnard
30f80b57f2 Instead of making this part of the build process, let the devs generate stripped-emoji.json
With the expectation that when the file needs to be regenerated to include other keys, the developer will run this script.
2017-06-28 13:28:48 +01:00
Luke Barnard
22ddbc63c3 Make lib dir prior to building
-p option will not error if lib already exists
2017-06-28 11:54:05 +01:00
Luke Barnard
2b8da85726 Strip the emoji meta-data for the data we need
This is done at build time by parsing emojione/emoji.json, stripping it and then writing to ./lib/stripped-emoji.json.
2017-06-28 11:36:19 +01:00
Luke Barnard
8ca3b382ed Use emojione/emoji.json because we don't want two sets of emoji meta 2017-06-28 11:19:16 +01:00
Luke Barnard
9d339b96bd Order emojis by standard ordering, add alternate shortnames
Also, increase the maximum number of emoji shown to 20.
2017-06-27 20:13:48 +01:00
David Baker
c0e48c72fc Remove dep on liblevenstein
While we don't actually use it
2017-06-23 18:03:32 +01:00
Luke Barnard
87609582c6 Merge branch 'develop' into rte-fixes2
Conflicts:
	package.json
	src/autocomplete/CommandProvider.js
	src/autocomplete/UserProvider.js
	src/components/structures/RoomView.js
	src/components/structures/UserSettings.js
	src/components/views/rooms/MessageComposerInput.js
2017-06-23 15:30:06 +01:00
David Baker
f7aad3c422 v0.9.7 2017-06-22 11:57:27 +01:00
David Baker
6881fdf102 js-sdk 0.7.13 2017-06-22 11:52:13 +01:00
David Baker
529e014739 v0.9.6 2017-06-20 13:08:06 +01:00
David Baker
66c3a6d9ca v0.9.5 2017-06-19 13:09:41 +01:00
David Baker
faeb40bc0f Released js-sdk v0.7.12 2017-06-19 12:00:53 +01:00
David Baker
12ad9a2c58 v0.9.5-rc.2 2017-06-16 13:28:49 +01:00
David Baker
82436758b2 v0.9.5-rc.1 2017-06-15 17:17:17 +01:00
David Baker
198d85a673 js-sdk 0.7.12-rc.1 2017-06-15 17:15:26 +01:00
David Baker
a5aa497287 v0.9.4 2017-06-14 11:17:00 +01:00
David Baker
aef0a8025c v0.9.3 2017-06-12 15:50:37 +01:00
David Baker
29355a610f js-sdk 0.7.11 2017-06-12 15:19:52 +01:00
David Baker
336b10daf1 v0.9.3-rc.2 2017-06-09 22:13:54 +01:00
David Baker
c61942ed5d We now require flux 2.1 because we use utils 2017-06-09 21:42:34 +01:00
David Baker
27592728f5 v0.9.3-rc.1 2017-06-09 20:28:09 +01:00
David Baker
0879d796eb released js-sdk 2017-06-09 20:26:41 +01:00
Luke Barnard
53ea41e8a5 Merge branch 'develop' into new-guest-access 2017-06-07 12:08:37 +01:00
David Baker
31f1e421f2 v0.9.2 2017-06-06 17:40:30 +01:00
Luke Barnard
619830617a Merge branch 'develop' into luke/ilag-i18n
In order to get ILAG internationalised

Conflicts:
	src/components/structures/LoggedInView.js
	src/components/structures/MatrixChat.js
	src/components/views/dialogs/ChatCreateOrReuseDialog.js
	src/components/views/dialogs/SetDisplayNameDialog.js
	src/createRoom.js
	src/i18n/strings/en_EN.json
2017-06-05 16:08:03 +01:00
Matthew Hodgson
0d5ad06ac1 v0.9.1 2017-06-02 22:39:32 +01:00
David Baker
9e0aca534c v0.9.0 2017-06-02 14:23:30 +01:00
Matthew Hodgson
8add074dbf v0.9.0-rc.2 2017-06-02 01:14:13 +01:00
Matthew Hodgson
7e097d8d74 Merge branch 'release-v0.9.0-rc.1' into develop 2017-06-02 01:07:08 +01:00
Matthew Hodgson
73f97b4661 bump js-sdk for webrtc 2017-06-02 01:05:09 +01:00
Matthew Hodgson
bceef2db91 v0.9.0-rc.1 2017-06-01 02:15:49 +01:00
Matthew Hodgson
b1475cb309 bump js-sdk 2017-06-01 02:04:46 +01:00
Matthew Hodgson
5c885922d9 Merge branch 'develop' into new-guest-access 2017-05-28 22:58:18 +01:00
Matthew Hodgson
32207bd058 use develop js-sdk 2017-05-26 19:51:47 +01:00
David Baker
99efbbee5e Depend on prop-types module
So we can start writing code compatible with new React
2017-05-25 12:04:53 +01:00
David Baker
ec146c7f45 Switch to stock counterpart
We no longer need the custom counterpart. The things that were
changed in it and reasosn we no lomger need them are:

 1. set separator - this can be done with standard counterpart
 2. ES6 port: this was done to allow importing as _t, but is
    unnecessary with the _t wrapper function in react-sdk
    (although also seems to work fine with
    `import _t from 'counterpart';`)
 3. Fallback to key name: unnecessary with
    `setMissingEntryGenerator` in 0.18, but we've changed to just
    using a fallback locale anyway since No code missing en
    translations should ever make it to the devbelop branch.
 4. Logging on missing translations. Unnecessary with
    `onTranslationNotFound`, but now not used anyway because we
    let missing translations show up in the UI as
    'missing translation'

Bulk changes to imports coming in separate commit for easy reading.
2017-05-25 11:24:17 +01:00
David Baker
d419c42a4f Squash merge https://github.com/matrix-org/matrix-react-sdk/pull/801 2017-05-23 15:16:31 +01:00
David Baker
eadd6192e8 v0.8.9 2017-05-22 11:36:56 +01:00
David Baker
3a0ee385b8 Released js-sdk 2017-05-22 11:35:02 +01:00