chore: update dev dependencies (#2200)
This commit is contained in:
parent
601c3e40c9
commit
a318746961
|
@ -9,11 +9,11 @@ function unrollThread (user, prefix, privacy, thread) {
|
||||||
}
|
}
|
||||||
for (const key of Object.keys(node)) {
|
for (const key of Object.keys(node)) {
|
||||||
res.push({
|
res.push({
|
||||||
user: user,
|
user,
|
||||||
post: {
|
post: {
|
||||||
internalId: prefix + key,
|
internalId: prefix + key,
|
||||||
text: key,
|
text: key,
|
||||||
privacy: privacy,
|
privacy,
|
||||||
inReplyTo: parentKey && (prefix + parentKey)
|
inReplyTo: parentKey && (prefix + parentKey)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
14
package.json
14
package.json
|
@ -116,14 +116,14 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"eslint-plugin-html": "^6.2.0",
|
"eslint-plugin-html": "^7.1.0",
|
||||||
"fake-indexeddb": "^3.1.7",
|
"fake-indexeddb": "^4.0.0",
|
||||||
"globby": "^11.0.4",
|
"globby": "^13.1.2",
|
||||||
"husky": "^7.0.4",
|
"husky": "^8.0.2",
|
||||||
"lint-staged": "^11.0.0",
|
"lint-staged": "^13.0.3",
|
||||||
"mocha": "^10.1.0",
|
"mocha": "^10.1.0",
|
||||||
"standard": "^16.0.4",
|
"standard": "^17.0.0",
|
||||||
"testcafe": "^1.18.6"
|
"testcafe": "^1.20.1"
|
||||||
},
|
},
|
||||||
"standard": {
|
"standard": {
|
||||||
"ignore": [
|
"ignore": [
|
||||||
|
|
|
@ -105,10 +105,10 @@ async function registerNewInstance (code) {
|
||||||
instanceNameInSearch: '',
|
instanceNameInSearch: '',
|
||||||
currentRegisteredInstanceName: null,
|
currentRegisteredInstanceName: null,
|
||||||
currentRegisteredInstance: null,
|
currentRegisteredInstance: null,
|
||||||
loggedInInstances: loggedInInstances,
|
loggedInInstances,
|
||||||
currentInstance: currentRegisteredInstanceName,
|
currentInstance: currentRegisteredInstanceName,
|
||||||
loggedInInstancesInOrder: loggedInInstancesInOrder,
|
loggedInInstancesInOrder,
|
||||||
instanceThemes: instanceThemes
|
instanceThemes
|
||||||
})
|
})
|
||||||
store.save()
|
store.save()
|
||||||
const { enableGrayscale } = store.get()
|
const { enableGrayscale } = store.get()
|
||||||
|
|
|
@ -118,6 +118,6 @@ export function addStatusesOrNotifications (instanceName, timelineName, newStatu
|
||||||
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates') || []
|
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates') || []
|
||||||
freshUpdates = concat(freshUpdates, newStatusesOrNotifications)
|
freshUpdates = concat(freshUpdates, newStatusesOrNotifications)
|
||||||
freshUpdates = uniqBy(freshUpdates, _ => _.id)
|
freshUpdates = uniqBy(freshUpdates, _ => _.id)
|
||||||
store.setForTimeline(instanceName, timelineName, { freshUpdates: freshUpdates })
|
store.setForTimeline(instanceName, timelineName, { freshUpdates })
|
||||||
lazilyProcessFreshUpdates(instanceName, timelineName)
|
lazilyProcessFreshUpdates(instanceName, timelineName)
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { formatIntl } from '../_utils/formatIntl.js'
|
||||||
export function changeTheme (instanceName, newTheme) {
|
export function changeTheme (instanceName, newTheme) {
|
||||||
const { instanceThemes } = store.get()
|
const { instanceThemes } = store.get()
|
||||||
instanceThemes[instanceName] = newTheme
|
instanceThemes[instanceName] = newTheme
|
||||||
store.set({ instanceThemes: instanceThemes })
|
store.set({ instanceThemes })
|
||||||
store.save()
|
store.save()
|
||||||
const { currentInstance } = store.get()
|
const { currentInstance } = store.get()
|
||||||
if (instanceName === currentInstance) {
|
if (instanceName === currentInstance) {
|
||||||
|
@ -90,7 +90,7 @@ export async function logOutOfInstance (instanceName, message) {
|
||||||
function setStoreVerifyCredentials (instanceName, thisVerifyCredentials) {
|
function setStoreVerifyCredentials (instanceName, thisVerifyCredentials) {
|
||||||
const { verifyCredentials } = store.get()
|
const { verifyCredentials } = store.get()
|
||||||
verifyCredentials[instanceName] = thisVerifyCredentials
|
verifyCredentials[instanceName] = thisVerifyCredentials
|
||||||
store.set({ verifyCredentials: verifyCredentials })
|
store.set({ verifyCredentials })
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updateVerifyCredentialsForInstance (instanceName) {
|
export async function updateVerifyCredentialsForInstance (instanceName) {
|
||||||
|
@ -121,7 +121,7 @@ export async function updateInstanceInfo (instanceName) {
|
||||||
info => {
|
info => {
|
||||||
const { instanceInfos } = store.get()
|
const { instanceInfos } = store.get()
|
||||||
instanceInfos[instanceName] = info
|
instanceInfos[instanceName] = info
|
||||||
store.set({ instanceInfos: instanceInfos })
|
store.set({ instanceInfos })
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ async function syncLists (instanceName, syncMethod) {
|
||||||
lists => {
|
lists => {
|
||||||
const { instanceLists } = store.get()
|
const { instanceLists } = store.get()
|
||||||
instanceLists[instanceName] = lists
|
instanceLists[instanceName] = lists
|
||||||
store.set({ instanceLists: instanceLists })
|
store.set({ instanceLists })
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ export async function updatePinnedStatusesForAccount (accountId) {
|
||||||
const { pinnedStatuses } = store.get()
|
const { pinnedStatuses } = store.get()
|
||||||
pinnedStatuses[currentInstance] = pinnedStatuses[currentInstance] || {}
|
pinnedStatuses[currentInstance] = pinnedStatuses[currentInstance] || {}
|
||||||
pinnedStatuses[currentInstance][accountId] = statuses
|
pinnedStatuses[currentInstance][accountId] = statuses
|
||||||
store.set({ pinnedStatuses: pinnedStatuses })
|
store.set({ pinnedStatuses })
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,6 @@ export function getAccessTokenFromAuthCode (instanceName, clientId, clientSecret
|
||||||
client_secret: clientSecret,
|
client_secret: clientSecret,
|
||||||
redirect_uri: redirectUri,
|
redirect_uri: redirectUri,
|
||||||
grant_type: 'authorization_code',
|
grant_type: 'authorization_code',
|
||||||
code: code
|
code
|
||||||
}, null, { timeout: WRITE_TIMEOUT })
|
}, null, { timeout: WRITE_TIMEOUT })
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@ export async function postStatus (instanceName, accessToken, text, inReplyToId,
|
||||||
status: text,
|
status: text,
|
||||||
in_reply_to_id: inReplyToId,
|
in_reply_to_id: inReplyToId,
|
||||||
media_ids: mediaIds,
|
media_ids: mediaIds,
|
||||||
sensitive: sensitive,
|
sensitive,
|
||||||
spoiler_text: spoilerText,
|
spoiler_text: spoilerText,
|
||||||
visibility: visibility,
|
visibility,
|
||||||
poll: poll
|
poll
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const key of Object.keys(body)) {
|
for (const key of Object.keys(body)) {
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
async refreshAccounts () {
|
async refreshAccounts () {
|
||||||
const { accountsFetcher } = this.get()
|
const { accountsFetcher } = this.get()
|
||||||
const accounts = await accountsFetcher()
|
const accounts = await accountsFetcher()
|
||||||
this.set({ accounts: accounts })
|
this.set({ accounts })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
const { currentInstance, pinnedPages } = this.store.get()
|
const { currentInstance, pinnedPages } = this.store.get()
|
||||||
const { href } = this.get()
|
const { href } = this.get()
|
||||||
pinnedPages[currentInstance] = href
|
pinnedPages[currentInstance] = href
|
||||||
this.store.set({ pinnedPages: pinnedPages })
|
this.store.set({ pinnedPages })
|
||||||
this.store.save()
|
this.store.save()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,7 +334,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollToItem (scrolledItem, smooth) {
|
scrollToItem (scrolledItem, smooth) {
|
||||||
this.set({ scrolledItem: scrolledItem })
|
this.set({ scrolledItem })
|
||||||
const { length } = this.get()
|
const { length } = this.get()
|
||||||
const { scroller } = this.refs
|
const { scroller } = this.refs
|
||||||
const { scrollWidth } = scroller
|
const { scrollWidth } = scroller
|
||||||
|
|
|
@ -5,8 +5,8 @@ export default function showAccountProfileOptionsDialog (account, relationship,
|
||||||
return showDialog(AccountProfileOptionsDialog, {
|
return showDialog(AccountProfileOptionsDialog, {
|
||||||
label: 'intl.profileOptions',
|
label: 'intl.profileOptions',
|
||||||
title: '',
|
title: '',
|
||||||
account: account,
|
account,
|
||||||
relationship: relationship,
|
relationship,
|
||||||
verifyCredentials: verifyCredentials
|
verifyCredentials
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,6 @@ export default function showPostPrivacyDialog (realm) {
|
||||||
return showDialog(PostPrivacyDialog, {
|
return showDialog(PostPrivacyDialog, {
|
||||||
label: 'intl.postPrivacy',
|
label: 'intl.postPrivacy',
|
||||||
title: 'intl.postPrivacy',
|
title: 'intl.postPrivacy',
|
||||||
realm: realm
|
realm
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,6 @@ export default function showStatusOptionsDialog (status) {
|
||||||
return showDialog(StatusOptionsDialog, {
|
return showDialog(StatusOptionsDialog, {
|
||||||
label: 'intl.statusOptions',
|
label: 'intl.statusOptions',
|
||||||
title: '',
|
title: '',
|
||||||
status: status
|
status
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
if (makeProps) {
|
if (makeProps) {
|
||||||
const props = await makeProps(key)
|
const props = await makeProps(key)
|
||||||
mark('ListLazyItem set props')
|
mark('ListLazyItem set props')
|
||||||
this.set({ props: props })
|
this.set({ props })
|
||||||
this.fire('initialized')
|
this.fire('initialized')
|
||||||
stop('ListLazyItem set props')
|
stop('ListLazyItem set props')
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,7 +374,7 @@
|
||||||
onChange () {
|
onChange () {
|
||||||
const { options } = this.get()
|
const { options } = this.get()
|
||||||
const choices = getChoices(this.refs.form, options)
|
const choices = getChoices(this.refs.form, options)
|
||||||
this.set({ choices: choices })
|
this.set({ choices })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
helpers: {
|
helpers: {
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onScrollTopChanged (scrollTop) {
|
onScrollTopChanged (scrollTop) {
|
||||||
this.set({ scrollTop: scrollTop })
|
this.set({ scrollTop })
|
||||||
},
|
},
|
||||||
onScrollToBottom () {
|
onScrollToBottom () {
|
||||||
const { timelineType } = this.get()
|
const { timelineType } = this.get()
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
onNewToast (text) {
|
onNewToast (text) {
|
||||||
this._queue = this._queue.then(() => {
|
this._queue = this._queue.then(() => {
|
||||||
this.set({
|
this.set({
|
||||||
text: text,
|
text,
|
||||||
shown: true
|
shown: true
|
||||||
})
|
})
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
|
|
@ -59,12 +59,12 @@
|
||||||
}, SCROLL_EVENT_THROTTLE)
|
}, SCROLL_EVENT_THROTTLE)
|
||||||
this.observe('showFooter', showFooter => {
|
this.observe('showFooter', showFooter => {
|
||||||
mark('set showFooter')
|
mark('set showFooter')
|
||||||
this.store.setForRealm({ showFooter: showFooter })
|
this.store.setForRealm({ showFooter })
|
||||||
mark('set showFooter')
|
mark('set showFooter')
|
||||||
})
|
})
|
||||||
this.observe('showHeader', showHeader => {
|
this.observe('showHeader', showHeader => {
|
||||||
mark('set showHeader')
|
mark('set showHeader')
|
||||||
this.store.setForRealm({ showHeader: showHeader })
|
this.store.setForRealm({ showHeader })
|
||||||
stop('set showHeader')
|
stop('set showHeader')
|
||||||
})
|
})
|
||||||
this.observe('items', (newItems, oldItems) => {
|
this.observe('items', (newItems, oldItems) => {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
const props = await makeProps(key)
|
const props = await makeProps(key)
|
||||||
const setProps = () => {
|
const setProps = () => {
|
||||||
mark('VirtualListLazyItem set props')
|
mark('VirtualListLazyItem set props')
|
||||||
this.set({ props: props })
|
this.set({ props })
|
||||||
stop('VirtualListLazyItem set props')
|
stop('VirtualListLazyItem set props')
|
||||||
}
|
}
|
||||||
// On desktop, if prefers-reduced-motion is enabled, avoid using scheduleIdleTask
|
// On desktop, if prefers-reduced-motion is enabled, avoid using scheduleIdleTask
|
||||||
|
|
|
@ -71,7 +71,7 @@ virtualListStore.compute('rawVisibleItems',
|
||||||
}
|
}
|
||||||
visibleItems.push({
|
visibleItems.push({
|
||||||
offset: currentOffset,
|
offset: currentOffset,
|
||||||
key: key,
|
key,
|
||||||
index: i
|
index: i
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
await updateVerifyCredentialsForInstance(currentInstance)
|
await updateVerifyCredentialsForInstance(currentInstance)
|
||||||
const { accessToken, currentVerifyCredentials } = this.store.get()
|
const { accessToken, currentVerifyCredentials } = this.store.get()
|
||||||
const statuses = await getPinnedStatuses(currentInstance, accessToken, currentVerifyCredentials.id)
|
const statuses = await getPinnedStatuses(currentInstance, accessToken, currentVerifyCredentials.id)
|
||||||
this.set({ statuses: statuses })
|
this.set({ statuses })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
/* no await */ toast.say(formatIntl('intl.error', { error: (e.name || '') + ' ' + (e.message || '') }))
|
/* no await */ toast.say(formatIntl('intl.error', { error: (e.name || '') + ' ' + (e.message || '') }))
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -89,6 +89,7 @@ export function wordFilterObservers () {
|
||||||
console.log('Word filters changed, forcing an update')
|
console.log('Word filters changed, forcing an update')
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
const { timelineData_timelineItemSummaries, timelineData_timelineItemSummariesToAdd } = store.get()
|
const { timelineData_timelineItemSummaries, timelineData_timelineItemSummariesToAdd } = store.get()
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
store.set({ timelineData_timelineItemSummaries, timelineData_timelineItemSummariesToAdd })
|
store.set({ timelineData_timelineItemSummaries, timelineData_timelineItemSummariesToAdd })
|
||||||
}
|
}
|
||||||
stop('update timeline item summary filter contexts')
|
stop('update timeline item summary filter contexts')
|
||||||
|
|
|
@ -11,7 +11,7 @@ const { Store } = storePackage
|
||||||
export class RealmStore extends Store {
|
export class RealmStore extends Store {
|
||||||
constructor (init, maxSize) {
|
constructor (init, maxSize) {
|
||||||
super(init)
|
super(init)
|
||||||
this.set({ realms: new QuickLRU({ maxSize: maxSize }) })
|
this.set({ realms: new QuickLRU({ maxSize }) })
|
||||||
this._batches = {}
|
this._batches = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ export class RealmStore extends Store {
|
||||||
setForRealm (obj) {
|
setForRealm (obj) {
|
||||||
const { currentRealm, realms } = this.get()
|
const { currentRealm, realms } = this.get()
|
||||||
realms.set(currentRealm, Object.assign(realms.get(currentRealm) || {}, obj))
|
realms.set(currentRealm, Object.assign(realms.get(currentRealm) || {}, obj))
|
||||||
this.set({ realms: realms })
|
this.set({ realms })
|
||||||
}
|
}
|
||||||
|
|
||||||
computeForRealm (key, defaultValue) {
|
computeForRealm (key, defaultValue) {
|
||||||
|
@ -67,7 +67,7 @@ export class RealmStore extends Store {
|
||||||
delete this._batches[currentRealm][key]
|
delete this._batches[currentRealm][key]
|
||||||
const { realms } = this.get()
|
const { realms } = this.get()
|
||||||
realms.set(currentRealm, Object.assign(realms.get(currentRealm) || {}, { [key]: obj }))
|
realms.set(currentRealm, Object.assign(realms.get(currentRealm) || {}, { [key]: obj }))
|
||||||
this.set({ realms: realms })
|
this.set({ realms })
|
||||||
stop('batchUpdate')
|
stop('batchUpdate')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,5 @@ export function base64StringToBlob (base64, type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const parts = [binaryStringToArrayBuffer(atob(base64))]
|
const parts = [binaryStringToArrayBuffer(atob(base64))]
|
||||||
return type ? new Blob(parts, { type: type }) : new Blob(parts)
|
return type ? new Blob(parts, { type }) : new Blob(parts)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import indexedDB from 'fake-indexeddb'
|
import { indexedDB, IDBKeyRange } from 'fake-indexeddb'
|
||||||
import IDBKeyRange from 'fake-indexeddb/build/FDBKeyRange.js'
|
|
||||||
|
|
||||||
global.indexedDB = indexedDB
|
global.indexedDB = indexedDB
|
||||||
global.IDBKeyRange = IDBKeyRange.default
|
global.IDBKeyRange = IDBKeyRange
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* global describe it */
|
/* global describe it */
|
||||||
|
|
||||||
import enIntl from '../../src/intl/en-US.js'
|
import enIntl from '../../src/intl/en-US.js'
|
||||||
import globby from 'globby'
|
import { globby } from 'globby'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { promisify } from 'util'
|
import { promisify } from 'util'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
|
|
Loading…
Reference in a new issue