From 309831bff9e9366054314f8da0bba30bddbf9cf7 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 2 Nov 2023 11:12:58 +0100 Subject: [PATCH] Update to latest Skeletor Fix Skeletor import paths so that we have type definitions --- package-lock.json | 6 +++--- src/headless/package.json | 2 +- src/headless/plugins/bookmarks/collection.js | 2 +- src/headless/plugins/bookmarks/model.js | 2 +- src/headless/plugins/bosh.js | 2 +- src/headless/plugins/chat/model.js | 2 +- src/headless/plugins/chat/utils.js | 2 +- src/headless/plugins/disco/entity.js | 2 +- src/headless/plugins/emoji/index.js | 2 +- src/headless/plugins/mam/placeholder.js | 2 +- src/headless/plugins/muc/muc.js | 2 +- src/headless/plugins/muc/occupant.js | 2 +- src/headless/plugins/muc/occupants.js | 4 ++-- src/headless/plugins/roster/contact.js | 2 +- src/headless/plugins/roster/filter.js | 2 +- src/headless/plugins/roster/presence.js | 2 +- src/headless/plugins/roster/resource.js | 2 +- src/headless/plugins/roster/utils.js | 2 +- src/headless/plugins/status/status.js | 2 +- src/headless/plugins/vcard/vcard.js | 2 +- src/headless/shared/api/public.js | 2 +- src/headless/shared/connection/feedback.js | 2 +- src/headless/shared/settings/utils.js | 2 +- src/headless/utils/index.js | 2 +- src/headless/utils/init.js | 2 +- src/plugins/bookmark-views/components/bookmarks-list.js | 2 +- src/plugins/controlbox/model.js | 2 +- src/plugins/minimize/toggle.js | 2 +- src/plugins/modal/api.js | 2 +- src/plugins/muc-views/heading.js | 2 +- src/plugins/muc-views/modals/occupant.js | 2 +- src/plugins/omemo/device.js | 2 +- src/plugins/omemo/devicelist.js | 2 +- src/plugins/omemo/store.js | 2 +- src/plugins/roomslist/model.js | 2 +- src/plugins/rosterview/rosterview.js | 2 +- 36 files changed, 39 insertions(+), 39 deletions(-) diff --git a/package-lock.json b/package-lock.json index a12c8fd8d3..156a2f95bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1834,8 +1834,8 @@ }, "node_modules/@converse/skeletor": { "version": "0.0.8", - "resolved": "git+ssh://git@github.com/conversejs/skeletor.git#dc5acf92369fffef548252d5ba2e9ba754fa262c", - "integrity": "sha512-z6ghozaR2H9BqPyHe5NK5By4G6zUaN1vWhHbtjP7FAM5Y0+PReB8Xhw3VJpp9S8PLw6VI9xMP68VaUfixt7Uiw==", + "resolved": "git+ssh://git@github.com/conversejs/skeletor.git#88b16086d988fab5541f69dbed5be4456169e2f7", + "integrity": "sha512-0ZzUrRa3YT7HmUXMXAca3zVa1lPH8583lGUdoYwTtdv1+IHmigmpHJkcZ3vOpJi5is+VaV+M217k8UxoeAZUQQ==", "license": "MIT", "dependencies": { "@converse/localforage-getitems": "1.4.3", @@ -11419,7 +11419,7 @@ "license": "MPL-2.0", "dependencies": { "@converse/openpromise": "^0.0.1", - "@converse/skeletor": "conversejs/skeletor#dc5acf92369fffef548252d5ba2e9ba754fa262c", + "@converse/skeletor": "conversejs/skeletor#88b16086d988fab5541f69dbed5be4456169e2f7 ", "dayjs": "^1.11.8", "dompurify": "^2.3.1", "filesize": "^10.0.7", diff --git a/src/headless/package.json b/src/headless/package.json index b75187b5df..65fd2448ff 100644 --- a/src/headless/package.json +++ b/src/headless/package.json @@ -32,7 +32,7 @@ }, "dependencies": { "@converse/openpromise": "^0.0.1", - "@converse/skeletor": "conversejs/skeletor#dc5acf92369fffef548252d5ba2e9ba754fa262c", + "@converse/skeletor": "conversejs/skeletor#88b16086d988fab5541f69dbed5be4456169e2f7 ", "dayjs": "^1.11.8", "dompurify": "^2.3.1", "filesize": "^10.0.7", diff --git a/src/headless/plugins/bookmarks/collection.js b/src/headless/plugins/bookmarks/collection.js index e28ab009d8..4cc378cb92 100644 --- a/src/headless/plugins/bookmarks/collection.js +++ b/src/headless/plugins/bookmarks/collection.js @@ -3,7 +3,7 @@ import Bookmark from './model.js'; import _converse from '../../shared/_converse.js'; import api, { converse } from '../../shared/api/index.js'; import log from "../../log.js"; -import { Collection } from "@converse/skeletor/src/collection.js"; +import { Collection } from "@converse/skeletor"; import { getOpenPromise } from '@converse/openpromise'; import { initStorage } from '../../utils/storage.js'; diff --git a/src/headless/plugins/bookmarks/model.js b/src/headless/plugins/bookmarks/model.js index 60e54fcde8..d87c351671 100644 --- a/src/headless/plugins/bookmarks/model.js +++ b/src/headless/plugins/bookmarks/model.js @@ -1,5 +1,5 @@ import { converse } from '../../shared/api/index.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; const { Strophe } = converse.env; diff --git a/src/headless/plugins/bosh.js b/src/headless/plugins/bosh.js index 85e892d4af..bcfab55f17 100644 --- a/src/headless/plugins/bosh.js +++ b/src/headless/plugins/bosh.js @@ -8,7 +8,7 @@ import _converse from '../shared/_converse.js'; import api, { converse } from '../shared/api/index.js'; import log from "../log.js"; import { BOSH_WAIT } from '../shared/constants.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { setUserJID, } from '../utils/init.js'; import { isTestEnv } from '../utils/session.js'; import { createStore } from '../utils/storage.js'; diff --git a/src/headless/plugins/chat/model.js b/src/headless/plugins/chat/model.js index aafa7b474d..c4df183726 100644 --- a/src/headless/plugins/chat/model.js +++ b/src/headless/plugins/chat/model.js @@ -12,7 +12,7 @@ import api, { converse } from '../../shared/api/index.js'; import isMatch from "lodash-es/isMatch"; import log from '../../log.js'; import pick from "lodash-es/pick"; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { PRIVATE_CHAT_TYPE, COMPOSING, INACTIVE, PAUSED, GONE } from '@converse/headless/shared/constants.js'; import { TimeoutError } from '../../shared/errors.js'; import { debouncedPruneHistory, handleCorrection } from '../../shared/chat/utils.js'; diff --git a/src/headless/plugins/chat/utils.js b/src/headless/plugins/chat/utils.js index e1806b4a44..6dca04d188 100644 --- a/src/headless/plugins/chat/utils.js +++ b/src/headless/plugins/chat/utils.js @@ -1,5 +1,5 @@ import sizzle from "sizzle"; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import _converse from '../../shared/_converse.js'; import api, { converse } from '../../shared/api/index.js'; import log from '../../log.js'; diff --git a/src/headless/plugins/disco/entity.js b/src/headless/plugins/disco/entity.js index 4cecf887b5..0ea0775a2e 100644 --- a/src/headless/plugins/disco/entity.js +++ b/src/headless/plugins/disco/entity.js @@ -3,7 +3,7 @@ import api, { converse } from '../../shared/api/index.js'; import log from '../../log.js'; import sizzle from 'sizzle'; import { Collection } from '@converse/skeletor/src/collection'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { getOpenPromise } from '@converse/openpromise'; import { createStore } from '../../utils/storage.js'; diff --git a/src/headless/plugins/emoji/index.js b/src/headless/plugins/emoji/index.js index 4d881fefd5..26a0148827 100644 --- a/src/headless/plugins/emoji/index.js +++ b/src/headless/plugins/emoji/index.js @@ -6,7 +6,7 @@ import './utils.js'; import _converse from '../../shared/_converse.js'; import api, { converse } from '../../shared/api/index.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { getOpenPromise } from '@converse/openpromise'; diff --git a/src/headless/plugins/mam/placeholder.js b/src/headless/plugins/mam/placeholder.js index 699cdb9e58..1d1cf0886f 100644 --- a/src/headless/plugins/mam/placeholder.js +++ b/src/headless/plugins/mam/placeholder.js @@ -1,4 +1,4 @@ -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { getUniqueId } from '../../utils/index.js'; export default class MAMPlaceholderMessage extends Model { diff --git a/src/headless/plugins/muc/muc.js b/src/headless/plugins/muc/muc.js index aa9435c263..2964302b34 100644 --- a/src/headless/plugins/muc/muc.js +++ b/src/headless/plugins/muc/muc.js @@ -11,7 +11,7 @@ import log from '../../log'; import p from '../../utils/parse-helpers'; import pick from 'lodash-es/pick'; import sizzle from 'sizzle'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { ROOMSTATUS } from './constants.js'; import { CHATROOMS_TYPE } from '../../shared/constants.js'; import { Strophe, $build, $iq, $msg, $pres } from 'strophe.js'; diff --git a/src/headless/plugins/muc/occupant.js b/src/headless/plugins/muc/occupant.js index 65feb417dd..7e02646f6e 100644 --- a/src/headless/plugins/muc/occupant.js +++ b/src/headless/plugins/muc/occupant.js @@ -1,4 +1,4 @@ -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; /** * Represents a participant in a MUC diff --git a/src/headless/plugins/muc/occupants.js b/src/headless/plugins/muc/occupants.js index c47c6e5b04..79b320969b 100644 --- a/src/headless/plugins/muc/occupants.js +++ b/src/headless/plugins/muc/occupants.js @@ -1,9 +1,9 @@ import ChatRoomOccupant from './occupant.js'; import _converse from '../../shared/_converse.js'; import api, { converse } from '../../shared/api/index.js'; -import { Collection } from '@converse/skeletor/src/collection.js'; +import { Collection } from '@converse/skeletor'; import { MUC_ROLE_WEIGHTS } from './constants.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { Strophe } from 'strophe.js'; import { getAffiliationList } from './affiliations/utils.js'; import { getAutoFetchedAffiliationLists } from './utils.js'; diff --git a/src/headless/plugins/roster/contact.js b/src/headless/plugins/roster/contact.js index 438b36e127..62d9f4921f 100644 --- a/src/headless/plugins/roster/contact.js +++ b/src/headless/plugins/roster/contact.js @@ -1,7 +1,7 @@ import '../../plugins/status/api.js'; import _converse from '../../shared/_converse.js'; import api, { converse } from '../../shared/api/index.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { getOpenPromise } from '@converse/openpromise'; import { rejectPresenceSubscription } from './utils.js'; diff --git a/src/headless/plugins/roster/filter.js b/src/headless/plugins/roster/filter.js index 18a85df1bc..08c93ac011 100644 --- a/src/headless/plugins/roster/filter.js +++ b/src/headless/plugins/roster/filter.js @@ -1,4 +1,4 @@ -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; class RosterFilter extends Model { initialize () { diff --git a/src/headless/plugins/roster/presence.js b/src/headless/plugins/roster/presence.js index 1f5d58afe1..24929dfe63 100644 --- a/src/headless/plugins/roster/presence.js +++ b/src/headless/plugins/roster/presence.js @@ -1,5 +1,5 @@ import Resources from "./resources.js"; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { converse } from '../../shared/api/index.js'; import { initStorage } from '../../utils/storage.js'; diff --git a/src/headless/plugins/roster/resource.js b/src/headless/plugins/roster/resource.js index 4924389092..bc578e1781 100644 --- a/src/headless/plugins/roster/resource.js +++ b/src/headless/plugins/roster/resource.js @@ -1,4 +1,4 @@ -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; class Resource extends Model { get idAttribute () { // eslint-disable-line class-methods-use-this diff --git a/src/headless/plugins/roster/utils.js b/src/headless/plugins/roster/utils.js index feb73e2c05..92e3c547c1 100644 --- a/src/headless/plugins/roster/utils.js +++ b/src/headless/plugins/roster/utils.js @@ -2,7 +2,7 @@ import _converse from '../../shared/_converse.js'; import api, { converse } from '../../shared/api/index.js'; import log from "../../log.js"; import { Strophe } from 'strophe.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { RosterFilter } from '../../plugins/roster/filter.js'; import { STATUS_WEIGHTS, PRIVATE_CHAT_TYPE } from "../../shared/constants"; import { initStorage } from '../../utils/storage.js'; diff --git a/src/headless/plugins/status/status.js b/src/headless/plugins/status/status.js index 1e95e26d8f..b9e80ff190 100644 --- a/src/headless/plugins/status/status.js +++ b/src/headless/plugins/status/status.js @@ -1,6 +1,6 @@ import _converse from '../../shared/_converse.js'; import api, { converse } from '../../shared/api/index.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; const { Strophe, $pres } = converse.env; diff --git a/src/headless/plugins/vcard/vcard.js b/src/headless/plugins/vcard/vcard.js index 2e122654a0..7fd13c6140 100644 --- a/src/headless/plugins/vcard/vcard.js +++ b/src/headless/plugins/vcard/vcard.js @@ -1,5 +1,5 @@ import _converse from '../../shared/_converse.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; /** * Represents a VCard diff --git a/src/headless/shared/api/public.js b/src/headless/shared/api/public.js index 08ffc4b97e..f1654e2b95 100644 --- a/src/headless/shared/api/public.js +++ b/src/headless/shared/api/public.js @@ -9,7 +9,7 @@ import u, { setLogLevelFromRoute } from '../../utils/index.js'; import { ANONYMOUS, CHAT_STATES, KEYCODES, VERSION_NAME } from '../constants.js'; import { setUnloadEvent, isTestEnv } from '../../utils/session.js'; import { Collection } from "@converse/skeletor/src/collection"; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { Strophe, $build, $iq, $msg, $pres, stx } from 'strophe.js'; import { TimeoutError } from '../errors.js'; import { filesize } from 'filesize'; diff --git a/src/headless/shared/connection/feedback.js b/src/headless/shared/connection/feedback.js index 95400063b2..e60543c870 100644 --- a/src/headless/shared/connection/feedback.js +++ b/src/headless/shared/connection/feedback.js @@ -1,5 +1,5 @@ import _converse from '../_converse'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { Strophe } from 'strophe.js'; diff --git a/src/headless/shared/settings/utils.js b/src/headless/shared/settings/utils.js index 4b487d93c0..52d6026050 100644 --- a/src/headless/shared/settings/utils.js +++ b/src/headless/shared/settings/utils.js @@ -4,7 +4,7 @@ import isEqual from "lodash-es/isEqual.js"; import log from '../../log.js'; import pick from 'lodash-es/pick'; import { DEFAULT_SETTINGS } from './constants.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { initStorage } from '../../utils/storage.js'; import { merge } from '../../utils/object.js'; diff --git a/src/headless/utils/index.js b/src/headless/utils/index.js index 2850a7f7dd..670b3821ac 100644 --- a/src/headless/utils/index.js +++ b/src/headless/utils/index.js @@ -4,7 +4,7 @@ * @description This is the core utilities module. */ import log, { LEVELS } from '../log.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { toStanza } from 'strophe.js'; import { getOpenPromise } from '@converse/openpromise'; import { saveWindowState, shouldClearCache } from './session.js'; diff --git a/src/headless/utils/init.js b/src/headless/utils/init.js index e2c334e420..7618ef5b2a 100644 --- a/src/headless/utils/init.js +++ b/src/headless/utils/init.js @@ -7,7 +7,7 @@ import log from '../log.js'; import syncDriver from 'localforage-webextensionstorage-driver/sync'; import { ANONYMOUS, CORE_PLUGINS, EXTERNAL, LOGIN } from '../shared/constants.js'; import { Connection } from '../shared/connection/index.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { Strophe } from 'strophe.js'; import { createStore, initStorage } from './storage.js'; import { getConnectionServiceURL } from '../shared/connection/utils'; diff --git a/src/plugins/bookmark-views/components/bookmarks-list.js b/src/plugins/bookmark-views/components/bookmarks-list.js index 804312140f..bf5aa64a1e 100644 --- a/src/plugins/bookmark-views/components/bookmarks-list.js +++ b/src/plugins/bookmark-views/components/bookmarks-list.js @@ -2,7 +2,7 @@ import debounce from "lodash-es/debounce"; import tplBookmarksList from './templates/list.js'; import tplSpinner from "templates/spinner.js"; import { CustomElement } from 'shared/components/element.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { _converse, api } from '@converse/headless'; import { initStorage } from '@converse/headless/utils/storage.js'; diff --git a/src/plugins/controlbox/model.js b/src/plugins/controlbox/model.js index b40ad77f53..e2d86f3390 100644 --- a/src/plugins/controlbox/model.js +++ b/src/plugins/controlbox/model.js @@ -1,5 +1,5 @@ import { _converse, api, converse } from '@converse/headless'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { CONTROLBOX_TYPE } from '@converse/headless/shared/constants'; const { dayjs } = converse.env; diff --git a/src/plugins/minimize/toggle.js b/src/plugins/minimize/toggle.js index f1e5feffeb..673ca71ed6 100644 --- a/src/plugins/minimize/toggle.js +++ b/src/plugins/minimize/toggle.js @@ -1,4 +1,4 @@ -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; class MinimizedChatsToggle extends Model { defaults () { // eslint-disable-line class-methods-use-this diff --git a/src/plugins/modal/api.js b/src/plugins/modal/api.js index 9b6512cdc6..7fca16ac2e 100644 --- a/src/plugins/modal/api.js +++ b/src/plugins/modal/api.js @@ -1,6 +1,6 @@ import './alert.js'; import Confirm from './confirm.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; let modals = []; let modals_map = {}; diff --git a/src/plugins/muc-views/heading.js b/src/plugins/muc-views/heading.js index 3443070caf..5782d07c72 100644 --- a/src/plugins/muc-views/heading.js +++ b/src/plugins/muc-views/heading.js @@ -3,7 +3,7 @@ import './modals/muc-invite.js'; import './modals/nickname.js'; import tplMUCHead from './templates/muc-head.js'; import { CustomElement } from 'shared/components/element.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { __ } from 'i18n'; import { _converse, api, converse } from "@converse/headless"; import { destroyMUC, showModeratorToolsModal } from './utils.js'; diff --git a/src/plugins/muc-views/modals/occupant.js b/src/plugins/muc-views/modals/occupant.js index 362ed0bf32..44350163e2 100644 --- a/src/plugins/muc-views/modals/occupant.js +++ b/src/plugins/muc-views/modals/occupant.js @@ -1,6 +1,6 @@ import BaseModal from "plugins/modal/modal.js"; import tplOccupantModal from "./templates/occupant.js"; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { __ } from 'i18n'; import { _converse, api, converse } from "@converse/headless"; diff --git a/src/plugins/omemo/device.js b/src/plugins/omemo/device.js index 7c032a2959..fa6ed285b7 100644 --- a/src/plugins/omemo/device.js +++ b/src/plugins/omemo/device.js @@ -1,5 +1,5 @@ import { IQError } from './errors.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { UNDECIDED } from './consts.js'; import { _converse, api, converse, log } from '@converse/headless'; import { getRandomInt } from '@converse/headless/utils/index.js'; diff --git a/src/plugins/omemo/devicelist.js b/src/plugins/omemo/devicelist.js index 9949e1ef35..a3f52455e8 100644 --- a/src/plugins/omemo/devicelist.js +++ b/src/plugins/omemo/devicelist.js @@ -1,4 +1,4 @@ -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { _converse, api, converse, log } from '@converse/headless'; import { getOpenPromise } from '@converse/openpromise'; import { initStorage } from '@converse/headless/utils/storage.js'; diff --git a/src/plugins/omemo/store.js b/src/plugins/omemo/store.js index 455e5b6191..9fa80452f1 100644 --- a/src/plugins/omemo/store.js +++ b/src/plugins/omemo/store.js @@ -1,6 +1,6 @@ /* global libsignal */ import range from 'lodash-es/range'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { generateDeviceID } from './utils.js'; import { _converse, api, converse, log } from '@converse/headless'; diff --git a/src/plugins/roomslist/model.js b/src/plugins/roomslist/model.js index b0d3d29d57..1c5daa5863 100644 --- a/src/plugins/roomslist/model.js +++ b/src/plugins/roomslist/model.js @@ -1,4 +1,4 @@ -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { _converse, api, converse } from "@converse/headless"; const { Strophe } = converse.env; diff --git a/src/plugins/rosterview/rosterview.js b/src/plugins/rosterview/rosterview.js index ad72929e1c..fa6d592dc9 100644 --- a/src/plugins/rosterview/rosterview.js +++ b/src/plugins/rosterview/rosterview.js @@ -1,6 +1,6 @@ import tplRoster from "./templates/roster.js"; import { CustomElement } from 'shared/components/element.js'; -import { Model } from '@converse/skeletor/src/model.js'; +import { Model } from '@converse/skeletor'; import { _converse, api } from "@converse/headless"; import { initStorage } from '@converse/headless/utils/storage.js'; import { slideIn, slideOut } from 'utils/html.js';