Merge branch 'travis/sourcemaps' into travis/babel7-wp-es6-fixes

This commit is contained in:
Travis Ralston 2020-01-08 14:42:01 -07:00
commit 36b7be920b
13 changed files with 42 additions and 21 deletions

View file

@ -15,6 +15,7 @@
], ],
"plugins": [ "plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }], ["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-numeric-separator", "@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread", "@babel/plugin-proposal-object-rest-spread",

View file

@ -9,27 +9,27 @@
}, },
"license": "Apache-2.0", "license": "Apache-2.0",
"files": [ "files": [
"lib",
"res",
"src",
"scripts",
"git-revision.txt",
"docs",
"header",
"CHANGELOG.md", "CHANGELOG.md",
"CONTRIBUTING.rst", "CONTRIBUTING.rst",
"LICENSE", "LICENSE",
"README.md", "README.md",
"code_style.md", "package.json"
"git-revision.txt",
"header",
"lib",
"package.json",
"scripts",
"docs",
"src",
"res"
], ],
"bin": { "bin": {
"reskindex": "scripts/reskindex.js", "reskindex": "scripts/reskindex.js",
"matrix-gen-i18n": "scripts/gen-i18n.js", "matrix-gen-i18n": "scripts/gen-i18n.js",
"matrix-prune-i18n": "scripts/prune-i18n.js" "matrix-prune-i18n": "scripts/prune-i18n.js"
}, },
"main": "lib/index.js", "main": "./lib/index.js",
"typings": "lib/index.d.ts", "typings": "./lib/index.d.ts",
"matrix_src_main": "./src/index.js",
"scripts": { "scripts": {
"i18n": "matrix-gen-i18n", "i18n": "matrix-gen-i18n",
"prunei18n": "matrix-prune-i18n", "prunei18n": "matrix-prune-i18n",
@ -40,7 +40,7 @@
"rethemendex": "res/css/rethemendex.sh", "rethemendex": "res/css/rethemendex.sh",
"clean": "rimraf lib", "clean": "rimraf lib",
"build": "yarn clean && git rev-parse HEAD > git-revision.txt && yarn build:compile && yarn build:types", "build": "yarn clean && git rev-parse HEAD > git-revision.txt && yarn build:compile && yarn build:types",
"build:compile": "yarn reskindex && babel src -s -d lib --verbose --extensions \".ts,.js\"", "build:compile": "yarn reskindex && babel -d lib --verbose --extensions \".ts,.js\" src",
"build:types": "tsc --emitDeclarationOnly", "build:types": "tsc --emitDeclarationOnly",
"start": "echo THIS IS FOR LEGACY PURPOSES ONLY. && yarn start:all", "start": "echo THIS IS FOR LEGACY PURPOSES ONLY. && yarn start:all",
"start:all": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n build,reskindex \"yarn start:build\" \"yarn reskindex:watch\"", "start:all": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n build,reskindex \"yarn start:build\" \"yarn reskindex:watch\"",
@ -114,6 +114,7 @@
"@babel/core": "^7.7.5", "@babel/core": "^7.7.5",
"@babel/plugin-proposal-class-properties": "^7.7.4", "@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-decorators": "^7.7.4", "@babel/plugin-proposal-decorators": "^7.7.4",
"@babel/plugin-proposal-export-default-from": "^7.7.4",
"@babel/plugin-proposal-numeric-separator": "^7.7.4", "@babel/plugin-proposal-numeric-separator": "^7.7.4",
"@babel/plugin-proposal-object-rest-spread": "^7.7.4", "@babel/plugin-proposal-object-rest-spread": "^7.7.4",
"@babel/plugin-transform-flow-comments": "^7.7.4", "@babel/plugin-transform-flow-comments": "^7.7.4",

View file

@ -61,5 +61,5 @@ input.mx_StatusMessageContextMenu_message {
} }
.mx_StatusMessageContextMenu_actionContainer .mx_Spinner { .mx_StatusMessageContextMenu_actionContainer .mx_Spinner {
justify-content: start; justify-content: flex-start;
} }

View file

@ -30,7 +30,7 @@ limitations under the License.
> div { > div {
display: flex; display: flex;
align-items: start; align-items: flex-start;
margin: 5px 0; margin: 5px 0;
input[type=checkbox] { input[type=checkbox] {

View file

@ -32,7 +32,7 @@ limitations under the License.
.mx_CreateKeyBackupDialog_passPhraseContainer { .mx_CreateKeyBackupDialog_passPhraseContainer {
display: flex; display: flex;
align-items: start; align-items: flex-start;
} }
.mx_CreateKeyBackupDialog_passPhraseHelp { .mx_CreateKeyBackupDialog_passPhraseHelp {

View file

@ -33,7 +33,7 @@ limitations under the License.
.mx_CreateSecretStorageDialog_passPhraseContainer { .mx_CreateSecretStorageDialog_passPhraseContainer {
display: flex; display: flex;
align-items: start; align-items: flex-start;
} }
.mx_CreateSecretStorageDialog_passPhraseHelp { .mx_CreateSecretStorageDialog_passPhraseHelp {

View file

@ -17,7 +17,7 @@ limitations under the License.
.mx_MemberDeviceInfo { .mx_MemberDeviceInfo {
display: flex; display: flex;
padding-bottom: 10px; padding-bottom: 10px;
align-items: start; align-items: flex-start;
} }
.mx_MemberDeviceInfo_icon { .mx_MemberDeviceInfo_icon {

View file

@ -101,7 +101,7 @@ limitations under the License.
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 60px; min-height: 60px;
justify-content: start; justify-content: flex-start;
align-items: flex-start; align-items: flex-start;
font-size: 14px; font-size: 14px;
margin-right: 6px; margin-right: 6px;

View file

@ -32,7 +32,7 @@ export function avatarUrlForMember(member, width, height, resizeMethod) {
// member can be null here currently since on invites, the JS SDK // member can be null here currently since on invites, the JS SDK
// does not have enough info to build a RoomMember object for // does not have enough info to build a RoomMember object for
// the inviter. // the inviter.
url = this.defaultAvatarUrlForString(member ? member.userId : ''); url = defaultAvatarUrlForString(member ? member.userId : '');
} }
return url; return url;
} }

View file

@ -58,7 +58,7 @@ class Skinner {
// components have to be functions. // components have to be functions.
const validType = typeof comp === 'function'; const validType = typeof comp === 'function';
if (!validType) { if (!validType) {
throw new Error(`Not a valid component: ${name}.`); throw new Error(`Not a valid component: ${name} (type = ${typeof(comp)}).`);
} }
return comp; return comp;
} }

View file

@ -77,7 +77,7 @@ export function doesRoomHaveUnreadMessages(room) {
// that counts and we can stop looking because the user's read // that counts and we can stop looking because the user's read
// this and everything before. // this and everything before.
return false; return false;
} else if (!shouldHideEvent(ev) && this.eventTriggersUnreadCount(ev)) { } else if (!shouldHideEvent(ev) && eventTriggersUnreadCount(ev)) {
// We've found a message that counts before we hit // We've found a message that counts before we hit
// the user's read receipt, so this room is definitely unread. // the user's read receipt, so this room is definitely unread.
return true; return true;

View file

@ -336,6 +336,10 @@ export function getLanguagesFromBrowser() {
return [navigator.userLanguage || "en"]; return [navigator.userLanguage || "en"];
} }
export function getLanguageFromBrowser() {
return getLanguagesFromBrowser()[0];
}
/** /**
* Turns a language string, normalises it, * Turns a language string, normalises it,
* (see normalizeLanguageKey) into an array of language strings * (see normalizeLanguageKey) into an array of language strings

View file

@ -320,6 +320,14 @@
"@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-dynamic-import" "^7.7.4" "@babel/plugin-syntax-dynamic-import" "^7.7.4"
"@babel/plugin-proposal-export-default-from@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.7.4.tgz#890de3c0c475374638292df31f6582160b54d639"
integrity sha512-1t6dh7BHYUz4zD1m4pozYYEZy/3m8dgOr9owx3r0mPPI3iGKRUKUbIxfYmcJ4hwljs/dhd0qOTr1ZDUp43ix+w==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-export-default-from" "^7.7.4"
"@babel/plugin-proposal-json-strings@^7.7.4": "@babel/plugin-proposal-json-strings@^7.7.4":
version "7.7.4" version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.7.4.tgz#7700a6bfda771d8dc81973249eac416c6b4c697d" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.7.4.tgz#7700a6bfda771d8dc81973249eac416c6b4c697d"
@ -381,6 +389,13 @@
dependencies: dependencies:
"@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-export-default-from@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.7.4.tgz#897f05808298060b52873fa804ff853540790ea1"
integrity sha512-j888jpjATLEzOWhKawq46UrpXnCRDbdhBd5io4jgwjJ3+CHHGCRb6PNAVEgs+BXIb+dNRAmnkv36zfB992PRVw==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-flow@^7.7.4": "@babel/plugin-syntax-flow@^7.7.4":
version "7.7.4" version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.7.4.tgz#6d91b59e1a0e4c17f36af2e10dd64ef220919d7b" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.7.4.tgz#6d91b59e1a0e4c17f36af2e10dd64ef220919d7b"