Convert CommonJS exports to ES6-compatible exports
We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
This commit is contained in:
parent
0b0fe92b17
commit
344dac4fb9
147 changed files with 649 additions and 620 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright 2018 New Vector Ltd
|
||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -31,7 +32,7 @@ function execAsync(command, options) {
|
|||
});
|
||||
}
|
||||
|
||||
module.exports = class RestSessionCreator {
|
||||
export default class RestSessionCreator {
|
||||
constructor(synapseSubdir, hsUrl, cwd) {
|
||||
this.synapseSubdir = synapseSubdir;
|
||||
this.hsUrl = hsUrl;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright 2018 New Vector Ltd
|
||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -16,7 +17,7 @@ limitations under the License.
|
|||
|
||||
const Logger = require('../logger');
|
||||
|
||||
module.exports = class RestMultiSession {
|
||||
export default class RestMultiSession {
|
||||
constructor(sessions, groupName) {
|
||||
this.log = new Logger(groupName);
|
||||
this.sessions = sessions;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright 2018 New Vector Ltd
|
||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -17,7 +18,7 @@ limitations under the License.
|
|||
const uuidv4 = require('uuid/v4');
|
||||
|
||||
/* no pun intented */
|
||||
module.exports = class RestRoom {
|
||||
export default class RestRoom {
|
||||
constructor(session, roomId, log) {
|
||||
this.session = session;
|
||||
this._roomId = roomId;
|
||||
|
|
|
@ -19,7 +19,7 @@ const Logger = require('../logger');
|
|||
const RestRoom = require('./room');
|
||||
const {approveConsent} = require('./consent');
|
||||
|
||||
module.exports = class RestSession {
|
||||
export default class RestSession {
|
||||
constructor(credentials) {
|
||||
this.log = new Logger(credentials.userId);
|
||||
this._credentials = credentials;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue