Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 conversion: first 90% plus CI/test fixes to match #1229

Closed
wants to merge 37 commits into from

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Feb 25, 2020

Reviewer: Do not review the cherry picked commits - they've been approved by me already. They're pulled from #1181 to save you the review effort.

As for the rest of it, sorry.

Conversion log (self-made tooling)
Reading commit index...
base-apis
        d0041d041c9ba6809f80f6e4b1fcbc80b95a79dd
        5023793cf6443fc36230623911a6c3d555aea314
client
        97373f34d7956545c9a0cb87507d5ccfb7fea12c
crypto/algorithms/megolm
        8c2df3ab4b8c4cf8d583d7402db066a3074637b8
crypto/algorithms/olm
        113255bbee964dabab67afc3d783a172395c1010
crypto/deviceinfo
        1b092a6ea11ad61691daf3cf00754b80d842953c
crypto/index
        7b376cb03479c6c9a131b21f7b9ac4f89ba0bbc7
crypto/olmdevice
        eeb444516b5d32fe4a77dfaa6961ffe6522ac1de
webrtc/call
        f688f98590cf1182be0b93e70d3eae49aae2656a
filter-component
        428130dc31da179871a85295c229cb3e78457289
filter
        d939f94a615216aaa882634cec617c426e67b86e
http-api
        dfb9cc9a6d360d89685178160b3285cedf482127
models/room
        f18ada251a33584af2094ff570f9b1de0e0905ce
timeline-window
        8053836a5bf804b3963ac90d287b3616ce300e72
sync
        0a381fe7e0cc63a66a51f8053ad11db2ad39b4ea
interactive-auth
        7ae067e6289c54c2fb2fdd8339952083872e9de2
store/memory
        75f26ddb9e8eb0ef40dddc06988e599e69b190fa
models/event-context
        3d52bcbb3702009108fbcb2b4739e5ea20260bf2
models/event-timeline-set
        b3afe3e35598ef131e989a792c92a124a3eddc42
models/event-timeline
        3bb14764bec092775df93b0a65e157ec55c368aa
models/group
        3b12353a3ce587ad812fe300eb3099dbe5ec6c63
models/room-state
        7f8d504643862f746543dbc4b524f043de67d40c
store/indexeddb
        f410c2f59efb9344f7e0aa07fb1f65e5fc924e0a
models/room-member
        ccd86ecc722ae9a47b56ffa19ceb0e39115d23fe
models/user
        23f43269e745a927ab23ee941a989563062246ce
scheduler
        50e4146251d0f6cb3fc66ce2a59dff3d328e6c79
models/event
        f6d07bad0d717c9c16bc4fa4c90a3ac24560f456
utils
        77ccdb213d4334762d6d3e7f128aa94494f81b28
        25af767a76855d53db14550b03ac8468e6da80ed
store/stub
        8c662cc5f242d54af7dac5a194c96bf3e82b7648
store/session/webstorage
        ee4e18c349257a3d993ff045ef7c754c279d1829
store/indexeddb-remote-backend
        11dedeaae962c8a2fa0237d5e06d79d14af206c3
store/indexeddb-local-backend
        eb1abf46481e71905cd2c44721c35b0b1cd3ad8b
errors
        00d1d5602db88aa5b48bbd670e64a918fe85aa95
Reading approved files...
crypto/algorithms/olm
crypto/deviceinfo
errors
filter-component
filter
interactive-auth
models/event-context
models/event-timeline-set
models/event-timeline
models/group
models/room-member
models/room-state
models/user
scheduler
store/indexeddb-local-backend
store/indexeddb-remote-backend
store/indexeddb
store/memory
store/session/webstorage
store/stub
timeline-window
webrtc/call
Applying commits...
Cherry picking: 113255bbee964dabab67afc3d783a172395c1010
[travis/es6-convert 2059de287] refactor: refactor olm to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 20:52:00 2020 +0800
 1 file changed, 340 insertions(+), 343 deletions(-)
 rewrite src/crypto/algorithms/olm.js (77%)
Cherry picked 113255bbee964dabab67afc3d783a172395c1010 exit code: 0
Cherry picking: 1b092a6ea11ad61691daf3cf00754b80d842953c
[travis/es6-convert 48b68aa3b] refactor: refactor deviceinfo to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 20:56:10 2020 +0800
 1 file changed, 170 insertions(+), 168 deletions(-)
 rewrite src/crypto/deviceinfo.js (64%)
Cherry picked 1b092a6ea11ad61691daf3cf00754b80d842953c exit code: 0
Cherry picking: 00d1d5602db88aa5b48bbd670e64a918fe85aa95
[travis/es6-convert dc3a44a7a] refactor: refactor errors to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 23:19:08 2020 +0800
 1 file changed, 27 insertions(+), 46 deletions(-)
 rewrite src/errors.js (99%)
Cherry picked 00d1d5602db88aa5b48bbd670e64a918fe85aa95 exit code: 0
Cherry picking: 428130dc31da179871a85295c229cb3e78457289
[travis/es6-convert 6ec7fe81e] refactor: refactor filter-component to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 21:46:13 2020 +0800
 1 file changed, 146 insertions(+), 144 deletions(-)
 rewrite src/filter-component.js (62%)
Cherry picked 428130dc31da179871a85295c229cb3e78457289 exit code: 0
Cherry picking: d939f94a615216aaa882634cec617c426e67b86e
[travis/es6-convert bcf1be068] refactor: refactor filter to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 21:48:39 2020 +0800
 1 file changed, 202 insertions(+), 201 deletions(-)
 rewrite src/filter.js (76%)
Cherry picked d939f94a615216aaa882634cec617c426e67b86e exit code: 0
Cherry picking: 7ae067e6289c54c2fb2fdd8339952083872e9de2
[travis/es6-convert 220ae5e2b] refactor: refactor interactive-auth to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:28:16 2020 +0800
 1 file changed, 55 insertions(+), 55 deletions(-)
Cherry picked 7ae067e6289c54c2fb2fdd8339952083872e9de2 exit code: 0
Cherry picking: 3d52bcbb3702009108fbcb2b4739e5ea20260bf2
[travis/es6-convert 3a161c6f0] refactor: refactor event-context to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:32:50 2020 +0800
 1 file changed, 116 insertions(+), 115 deletions(-)
 rewrite src/models/event-context.js (66%)
Cherry picked 3d52bcbb3702009108fbcb2b4739e5ea20260bf2 exit code: 0
Cherry picking: b3afe3e35598ef131e989a792c92a124a3eddc42
[travis/es6-convert 70de4ef06] refactor: refactor event-timeline-sest to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:35:42 2020 +0800
 1 file changed, 862 insertions(+), 860 deletions(-)
 rewrite src/models/event-timeline-set.js (82%)
Cherry picked b3afe3e35598ef131e989a792c92a124a3eddc42 exit code: 0
Cherry picking: 3bb14764bec092775df93b0a65e157ec55c368aa
[travis/es6-convert 1496e1e37] refactor: refactor event-timeline to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:37:12 2020 +0800
 1 file changed, 400 insertions(+), 398 deletions(-)
 rewrite src/models/event-timeline.js (88%)
Cherry picked 3bb14764bec092775df93b0a65e157ec55c368aa exit code: 0
Cherry picking: 3b12353a3ce587ad812fe300eb3099dbe5ec6c63
[travis/es6-convert f8be57710] refactor: refactor group to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:38:23 2020 +0800
 1 file changed, 33 insertions(+), 32 deletions(-)
Cherry picked 3b12353a3ce587ad812fe300eb3099dbe5ec6c63 exit code: 0
Cherry picking: ccd86ecc722ae9a47b56ffa19ceb0e39115d23fe
[travis/es6-convert e8026f191] refactor: refactor room-member to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 23:00:13 2020 +0800
 1 file changed, 385 insertions(+), 384 deletions(-)
 rewrite src/models/room-member.js (60%)
Cherry picked ccd86ecc722ae9a47b56ffa19ceb0e39115d23fe exit code: 0
Cherry picking: 7f8d504643862f746543dbc4b524f043de67d40c
[travis/es6-convert c33cb7152] refactor: refactor room-state to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:40:02 2020 +0800
 1 file changed, 805 insertions(+), 804 deletions(-)
 rewrite src/models/room-state.js (79%)
Cherry picked 7f8d504643862f746543dbc4b524f043de67d40c exit code: 0
Cherry picking: 23f43269e745a927ab23ee941a989563062246ce
[travis/es6-convert 852d56147] refactor: refactor user to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 23:01:27 2020 +0800
 1 file changed, 137 insertions(+), 135 deletions(-)
Cherry picked 23f43269e745a927ab23ee941a989563062246ce exit code: 0
Cherry picking: 50e4146251d0f6cb3fc66ce2a59dff3d328e6c79
[travis/es6-convert 1d0b76e37] refactor: refactor scheduler to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 23:02:46 2020 +0800
 1 file changed, 157 insertions(+), 155 deletions(-)
Cherry picked 50e4146251d0f6cb3fc66ce2a59dff3d328e6c79 exit code: 0
Cherry picking: eb1abf46481e71905cd2c44721c35b0b1cd3ad8b
[travis/es6-convert c859fd673] refactor: refactor indexeddb-local-backend to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 23:16:54 2020 +0800
 1 file changed, 69 insertions(+), 69 deletions(-)
Cherry picked eb1abf46481e71905cd2c44721c35b0b1cd3ad8b exit code: 0
Cherry picking: 11dedeaae962c8a2fa0237d5e06d79d14af206c3
[travis/es6-convert 8ff991b16] refactor: refactor indexeddb-remote-backend to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 23:14:32 2020 +0800
 1 file changed, 53 insertions(+), 53 deletions(-)
Cherry picked 11dedeaae962c8a2fa0237d5e06d79d14af206c3 exit code: 0
Cherry picking: f410c2f59efb9344f7e0aa07fb1f65e5fc924e0a
[travis/es6-convert cab7c3ee0] refactor: refactor indexeddb to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:58:21 2020 +0800
 1 file changed, 182 insertions(+), 181 deletions(-)
Cherry picked f410c2f59efb9344f7e0aa07fb1f65e5fc924e0a exit code: 0
Cherry picking: 75f26ddb9e8eb0ef40dddc06988e599e69b190fa
[travis/es6-convert 54650d238] refactor: refactor memory to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:31:19 2020 +0800
 1 file changed, 102 insertions(+), 103 deletions(-)
Cherry picked 75f26ddb9e8eb0ef40dddc06988e599e69b190fa exit code: 0
Cherry picking: ee4e18c349257a3d993ff045ef7c754c279d1829
[travis/es6-convert c49067f0a] refactor: refactor webstorage to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 23:13:18 2020 +0800
 1 file changed, 47 insertions(+), 46 deletions(-)
Cherry picked ee4e18c349257a3d993ff045ef7c754c279d1829 exit code: 0
Cherry picking: 8c662cc5f242d54af7dac5a194c96bf3e82b7648
[travis/es6-convert 1b4efd990] refactor: refactor stub to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 23:12:10 2020 +0800
 1 file changed, 71 insertions(+), 73 deletions(-)
Cherry picked 8c662cc5f242d54af7dac5a194c96bf3e82b7648 exit code: 0
Cherry picking: 8053836a5bf804b3963ac90d287b3616ce300e72
[travis/es6-convert a26301274] refactor: refactor timeline-window to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 22:15:23 2020 +0800
 1 file changed, 533 insertions(+), 523 deletions(-)
 rewrite src/timeline-window.js (83%)
Cherry picked 8053836a5bf804b3963ac90d287b3616ce300e72 exit code: 0
Cherry picking: f688f98590cf1182be0b93e70d3eae49aae2656a
[travis/es6-convert 4e633444d] refactor: refactor webrtc/call to es6 class
 Author: Jack Works <[email protected]>
 Date: Tue Jan 28 21:42:52 2020 +0800
 1 file changed, 1416 insertions(+), 1420 deletions(-)
 rewrite src/webrtc/call.js (63%)
Cherry picked f688f98590cf1182be0b93e70d3eae49aae2656a exit code: 0
Done!

Some files have been excluded. The other ~10% of changes were merge conflicted with the js-sdk, and therefore show traffic in the area. Due to the critical point cross-signing and e2e-by-default are at, they're knowingly excluded until code in the area slows down so they can be converted.

Known missing files:

  • base-apis.js
  • client.js
  • crypto/olmdevice.js
  • crypto/algorithms/megolm.js
  • crypto/index.js
  • models/event.js
  • models/room.js
  • sync.js
  • utils.js

Known bugs/TODO:

  • Tests don't work (something about mocks on prototypes that are empty - import problem?)
  • Probably the linter
  • Probably other tests
  • Build output might have changed dramatically enough to warrant a major bump?

Jack-Works and others added 28 commits February 28, 2020 17:02
@Jack-Works
Copy link
Contributor

👀

@t3chguy
Copy link
Member

t3chguy commented Apr 21, 2020

Whats the status on this

@turt2live
Copy link
Member Author

It's fifth on my list. The top 3 spots keep changing.

@turt2live
Copy link
Member Author

I don't think I'm going to be able to take a look at this anytime soon, so closing for now. I think we seriously need to consider the maintenance burden of this SDK and make a decision about it.

@turt2live turt2live closed this Mar 22, 2021
@turt2live turt2live deleted the travis/es6-convert branch March 22, 2021 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants