Skip to content

Commit

Permalink
Update to latest Skeletor
Browse files Browse the repository at this point in the history
Fix Skeletor import paths so that we have type definitions
  • Loading branch information
jcbrand committed Nov 3, 2023
1 parent 54093d6 commit 395e66e
Show file tree
Hide file tree
Showing 36 changed files with 39 additions and 39 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/headless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/bookmarks/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/bookmarks/model.js
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/bosh.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/chat/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/chat/utils.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/disco/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/emoji/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';


Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/mam/placeholder.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/muc/muc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/muc/occupant.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Model } from '@converse/skeletor/src/model.js';
import { Model } from '@converse/skeletor';

/**
* Represents a participant in a MUC
Expand Down
4 changes: 2 additions & 2 deletions src/headless/plugins/muc/occupants.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/roster/contact.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/roster/filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Model } from '@converse/skeletor/src/model.js';
import { Model } from '@converse/skeletor';

class RosterFilter extends Model {
initialize () {
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/roster/presence.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/roster/resource.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/roster/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/status/status.js
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/headless/plugins/vcard/vcard.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/headless/shared/api/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/headless/shared/connection/feedback.js
Original file line number Diff line number Diff line change
@@ -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';


Expand Down
2 changes: 1 addition & 1 deletion src/headless/shared/settings/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/headless/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/headless/utils/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/bookmark-views/components/bookmarks-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/controlbox/model.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/minimize/toggle.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/modal/api.js
Original file line number Diff line number Diff line change
@@ -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 = {};
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/muc-views/heading.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/muc-views/modals/occupant.js
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/omemo/device.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/omemo/devicelist.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/omemo/store.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/roomslist/model.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/rosterview/rosterview.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 395e66e

Please sign in to comment.