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