From a2ad37a8ad15d2440d64f24edc66547040c1dd90 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 3 Sep 2021 19:59:32 +0530 Subject: [PATCH] stop supporting IE 1. stop polyfilling promises 2. use named defines for chainpad-listmap and its dependencies while we're at it use 'bower update' for things to work --- bower.json | 2 +- customize.dist/login.js | 2 +- www/common/cryptget.js | 4 ++-- www/common/cryptpad-common.js | 2 +- www/common/outer/async-store.js | 6 +++--- www/common/outer/calendar.js | 2 +- www/common/outer/mailbox.js | 2 +- www/common/outer/profile.js | 2 +- www/common/outer/roster.js | 2 +- www/common/outer/sharedfolder.js | 2 +- www/common/outer/team.js | 4 ++-- www/common/requireconfig.js | 3 +++ www/poll/inner.js | 2 +- www/profile/inner.js | 2 +- www/todo/inner.js | 2 +- 15 files changed, 21 insertions(+), 18 deletions(-) diff --git a/bower.json b/bower.json index efa70c1bb..81acde661 100644 --- a/bower.json +++ b/bower.json @@ -30,7 +30,7 @@ "secure-fabric.js": "secure-v1.7.9", "hyperjson": "~1.4.0", "chainpad-crypto": "^0.2.0", - "chainpad-listmap": "^0.10.0", + "chainpad-listmap": "^1.0.0", "chainpad": "^5.2.0", "file-saver": "1.3.1", "alertifyjs": "1.0.11", diff --git a/customize.dist/login.js b/customize.dist/login.js index 5cab49934..1ba0eb470 100644 --- a/customize.dist/login.js +++ b/customize.dist/login.js @@ -1,6 +1,6 @@ define([ 'jquery', - '/bower_components/chainpad-listmap/chainpad-listmap.js', + 'chainpad-listmap', '/bower_components/chainpad-crypto/crypto.js', '/common/common-util.js', '/common/outer/network-config.js', diff --git a/www/common/cryptget.js b/www/common/cryptget.js index a1d0eef92..c4c17eb70 100644 --- a/www/common/cryptget.js +++ b/www/common/cryptget.js @@ -1,7 +1,7 @@ define([ '/bower_components/chainpad-crypto/crypto.js', - '/bower_components/chainpad-netflux/chainpad-netflux.js', - '/bower_components/netflux-websocket/netflux-client.js', + 'chainpad-netflux', + 'netflux-client', '/common/common-util.js', '/common/common-hash.js', '/common/common-realtime.js', diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 15234c35e..65839290e 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -161,7 +161,7 @@ define([ common.makeNetwork = function (cb) { require([ - '/bower_components/netflux-websocket/netflux-client.js', + 'netflux-client', '/common/outer/network-config.js' ], function (Netflux, NetConfig) { var wsUrl = NetConfig.getWebsocketURL(); diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 130926e6a..cd8887a15 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -26,9 +26,9 @@ define([ '/bower_components/chainpad-crypto/crypto.js', '/bower_components/chainpad/chainpad.dist.js', - '/bower_components/chainpad-netflux/chainpad-netflux.js', - '/bower_components/chainpad-listmap/chainpad-listmap.js', - '/bower_components/netflux-websocket/netflux-client.js', + 'chainpad-netflux', + 'chainpad-listmap', + 'netflux-client', '/bower_components/nthen/index.js', '/bower_components/saferphore/index.js', ], function (ApiConfig, Sortify, UserObject, ProxyManager, Migrate, Hash, Util, Constants, Feedback, diff --git a/www/common/outer/calendar.js b/www/common/outer/calendar.js index bea22db6b..a0b990e89 100644 --- a/www/common/outer/calendar.js +++ b/www/common/outer/calendar.js @@ -6,7 +6,7 @@ define([ '/common/outer/cache-store.js', '/customize/messages.js', '/bower_components/nthen/index.js', - '/bower_components/chainpad-listmap/chainpad-listmap.js', + 'chainpad-listmap', '/bower_components/chainpad-crypto/crypto.js', '/bower_components/chainpad/chainpad.dist.js', ], function (Util, Hash, Constants, Realtime, Cache, Messages, nThen, Listmap, Crypto, ChainPad) { diff --git a/www/common/outer/mailbox.js b/www/common/outer/mailbox.js index a7269c6e5..dbe95e84d 100644 --- a/www/common/outer/mailbox.js +++ b/www/common/outer/mailbox.js @@ -7,7 +7,7 @@ define([ '/common/common-messaging.js', '/common/notify.js', '/common/outer/mailbox-handlers.js', - '/bower_components/chainpad-netflux/chainpad-netflux.js', + 'chainpad-netflux', '/bower_components/chainpad-crypto/crypto.js', ], function (Config, BCast, Util, Hash, Realtime, Messaging, Notify, Handlers, CpNetflux, Crypto) { var Mailbox = {}; diff --git a/www/common/outer/profile.js b/www/common/outer/profile.js index 733b2b4c4..7cba963c7 100644 --- a/www/common/outer/profile.js +++ b/www/common/outer/profile.js @@ -3,7 +3,7 @@ define([ '/common/common-hash.js', '/common/common-constants.js', '/common/common-realtime.js', - '/bower_components/chainpad-listmap/chainpad-listmap.js', + 'chainpad-listmap', '/bower_components/chainpad-crypto/crypto.js', '/bower_components/chainpad/chainpad.dist.js', ], function (Util, Hash, Constants, Realtime, Listmap, Crypto, ChainPad) { diff --git a/www/common/outer/roster.js b/www/common/outer/roster.js index e395891b7..6aa80e5d8 100644 --- a/www/common/outer/roster.js +++ b/www/common/outer/roster.js @@ -918,7 +918,7 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto, Feedback) define([ '/common/common-util.js', '/common/common-hash.js', - '/bower_components/chainpad-netflux/chainpad-netflux.js', + 'chainpad-netflux', 'json.sortify', '/bower_components/nthen/index.js', '/bower_components/chainpad-crypto/crypto.js', diff --git a/www/common/outer/sharedfolder.js b/www/common/outer/sharedfolder.js index 6735330b4..4579492ba 100644 --- a/www/common/outer/sharedfolder.js +++ b/www/common/outer/sharedfolder.js @@ -6,7 +6,7 @@ define([ '/bower_components/nthen/index.js', '/bower_components/chainpad-crypto/crypto.js', - '/bower_components/chainpad-listmap/chainpad-listmap.js', + 'chainpad-listmap', '/bower_components/chainpad/chainpad.dist.js', ], function (Hash, Util, UserObject, Cache, nThen, Crypto, Listmap, ChainPad) { diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 94f91c807..32ce35f3b 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -14,9 +14,9 @@ define([ '/common/cryptget.js', '/common/outer/cache-store.js', - '/bower_components/chainpad-listmap/chainpad-listmap.js', + 'chainpad-listmap', '/bower_components/chainpad-crypto/crypto.js', - '/bower_components/chainpad-netflux/chainpad-netflux.js', + 'chainpad-netflux', '/bower_components/chainpad/chainpad.dist.js', '/bower_components/nthen/index.js', '/bower_components/saferphore/index.js', diff --git a/www/common/requireconfig.js b/www/common/requireconfig.js index 4e3baf857..7ed772575 100644 --- a/www/common/requireconfig.js +++ b/www/common/requireconfig.js @@ -16,6 +16,9 @@ define([ cm: '/bower_components/codemirror', 'tui-code-snippet': '/lib/calendar/tui-code-snippet.min', 'tui-date-picker': '/lib/calendar/date-picker', + 'netflux-client': '/bower_components/netflux-websocket/netflux-client', + 'chainpad-netflux': '/bower_components/chainpad-netflux/chainpad-netflux', + 'chainpad-listmap': '/bower_components/chainpad-listmap/chainpad-listmap', }, map: { '*': { diff --git a/www/poll/inner.js b/www/poll/inner.js index 53faea7e9..a70ddf648 100644 --- a/www/poll/inner.js +++ b/www/poll/inner.js @@ -7,7 +7,7 @@ define([ '/common/sframe-common.js', '/common/common-realtime.js', '/customize/application_config.js', - '/bower_components/chainpad-listmap/chainpad-listmap.js', + 'chainpad-listmap', '/poll/render.js', '/poll/export.js', '/common/diffMarked.js', diff --git a/www/profile/inner.js b/www/profile/inner.js index 284b19114..edf5ce01e 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -1,7 +1,7 @@ define([ 'jquery', '/bower_components/chainpad-crypto/crypto.js', - '/bower_components/chainpad-listmap/chainpad-listmap.js', + 'chainpad-listmap', '/common/toolbar.js', '/bower_components/nthen/index.js', '/common/sframe-common.js', diff --git a/www/todo/inner.js b/www/todo/inner.js index 2b69077f3..39cbbf588 100644 --- a/www/todo/inner.js +++ b/www/todo/inner.js @@ -1,7 +1,7 @@ define([ 'jquery', '/bower_components/chainpad-crypto/crypto.js', - '/bower_components/chainpad-listmap/chainpad-listmap.js', + 'chainpad-listmap', '/common/toolbar.js', '/bower_components/nthen/index.js', '/common/sframe-common.js',