Merge pull request #3911 from h3poteto/dependabot/npm_and_yarn/megalodon-5.0.1

Bump megalodon from 4.1.1 to 5.0.1
This commit is contained in:
AkiraFukushima 2022-12-20 00:51:23 +09:00 committed by GitHub
commit 9461dbac5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 86 additions and 56 deletions

View File

@ -17,6 +17,12 @@ let rendererConfig = {
},
module: {
rules: [
{
test: /\.m?js$/,
resolve: {
fullySpecified: false
}
},
{
test: /\.vue$/,
use: {

View File

@ -49,7 +49,8 @@
"moduleNameMapper": {
"@/router": "<rootDir>/spec/mock/router.ts",
"^@/(.+)": "<rootDir>/src/renderer/$1",
"^~/(.+)": "<rootDir>/$1"
"^~/(.+)": "<rootDir>/$1",
"axios": "axios/dist/node/axios.cjs"
},
"testMatch": [
"**/spec/**/*.spec.ts"
@ -59,6 +60,7 @@
"^.+\\.(js|jsx)$": "babel-jest",
"^.+\\.(ts|tsx)$": "ts-jest"
},
"transformIgnorePatterns": ["/node_modules/(?!axios)"],
"setupFiles": [
"core-js",
"<rootDir>/spec/setupJest.ts"
@ -79,7 +81,7 @@
"about-window": "^1.15.2",
"animate.css": "^4.1.0",
"auto-launch": "^5.0.5",
"axios": "^0.27.2",
"axios": "1.1.3",
"blueimp-load-image": "^5.16.0",
"deep-extend": "^0.6.0",
"electron-context-menu": "^3.6.1",
@ -91,7 +93,7 @@
"i18next": "^21.9.1",
"lodash": "^4.17.21",
"lokijs": "^1.5.12",
"megalodon": "4.1.1",
"megalodon": "5.0.1",
"minimist": "^1.2.7",
"mitt": "^3.0.0",
"moment": "^2.29.4",

View File

@ -598,12 +598,15 @@ ipcMain.on('reset-badge', () => {
}
})
ipcMain.handle('confirm-timelines', async (_event: IpcMainInvokeEvent, account: LocalAccount): Promise<EnabledTimelines> => {
const proxy = await proxyConfiguration.forMastodon()
const timelines = await confirm(account, proxy)
ipcMain.handle(
'confirm-timelines',
async (_event: IpcMainInvokeEvent, account: LocalAccount): Promise<EnabledTimelines> => {
const proxy = await proxyConfiguration.forMastodon()
const timelines = await confirm(account, proxy)
return timelines
})
return timelines
}
)
// user streaming
const userStreamings: { [key: string]: UserStreaming | null } = {}
@ -1167,16 +1170,19 @@ ipcMain.handle('get-mentions-marker', async (_: IpcMainInvokeEvent, ownerID: str
return marker
})
ipcMain.on('save-marker', async (_: IpcMainEvent, marker: LocalMarker): Promise<LocalMarker | null> => {
if (marker.owner_id === null || marker.owner_id === undefined || marker.owner_id === '') {
return null
ipcMain.on(
'save-marker',
async (_: IpcMainEvent, marker: LocalMarker): Promise<LocalMarker | null> => {
if (marker.owner_id === null || marker.owner_id === undefined || marker.owner_id === '') {
return null
}
if (markerRepo === null) {
return null
}
const res = await markerRepo.save(marker)
return res
}
if (markerRepo === null) {
return null
}
const res = await markerRepo.save(marker)
return res
})
)
// hashtag
ipcMain.handle('save-hashtag', async (_: IpcMainInvokeEvent, tag: string) => {
@ -1202,17 +1208,23 @@ ipcMain.handle('list-fonts', async (_: IpcMainInvokeEvent) => {
})
// Settings
ipcMain.handle('get-account-setting', async (_: IpcMainInvokeEvent, accountID: string): Promise<Setting> => {
const settings = new Settings(settingsDBPath)
const setting = await settings.get(accountID)
return setting
})
ipcMain.handle(
'get-account-setting',
async (_: IpcMainInvokeEvent, accountID: string): Promise<Setting> => {
const settings = new Settings(settingsDBPath)
const setting = await settings.get(accountID)
return setting
}
)
ipcMain.handle('update-account-setting', async (_: IpcMainInvokeEvent, setting: Setting): Promise<BaseSettings> => {
const settings = new Settings(settingsDBPath)
const res = await settings.update(setting)
return res
})
ipcMain.handle(
'update-account-setting',
async (_: IpcMainInvokeEvent, setting: Setting): Promise<BaseSettings> => {
const settings = new Settings(settingsDBPath)
const res = await settings.update(setting)
return res
}
)
// Cache
ipcMain.handle('get-cache-hashtags', async (_: IpcMainInvokeEvent) => {
@ -1670,10 +1682,11 @@ const getMarker = async (client: MegalodonInterface, accountID: string): Promise
} catch (err) {
console.warn(err)
}
if ((serverMarker as Entity.Marker).notifications !== undefined) {
const s = serverMarker as Entity.Marker
if (s.notifications !== undefined) {
return {
timeline: 'notifications',
last_read_id: (serverMarker as Entity.Marker).notifications.last_read_id
last_read_id: s.notifications.last_read_id
} as LocalMarker
}
if (markerRepo === null) {

View File

@ -263,10 +263,11 @@ const actions: ActionTree<HomeState, RootState> = {
} catch (err) {
console.warn(err)
}
if ((serverMarker as Entity.Marker).home !== undefined) {
const s = serverMarker as Entity.Marker
if (s.home !== undefined) {
return {
timeline: 'home',
last_read_id: (serverMarker as Entity.Marker).home.last_read_id
last_read_id: s.home.last_read_id
} as LocalMarker
}
const localMarker: LocalMarker | null = await win.ipcRenderer.invoke('get-home-marker', rootState.TimelineSpace.account._id)

View File

@ -241,10 +241,11 @@ const actions: ActionTree<NotificationsState, RootState> = {
} catch (err) {
console.warn(err)
}
if ((serverMarker as Entity.Marker).notifications !== undefined) {
const s = serverMarker as Entity.Marker
if (s.notifications !== undefined) {
return {
timeline: 'notifications',
last_read_id: (serverMarker as Entity.Marker).notifications.last_read_id
last_read_id: s.notifications.last_read_id
} as LocalMarker
}
const localMarker: LocalMarker | null = await win.ipcRenderer.invoke('get-notifications-marker', rootState.TimelineSpace.account._id)

View File

@ -2976,13 +2976,14 @@ available-typed-arrays@^1.0.5:
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
axios@^0.27.2:
version "0.27.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
axios@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.1.3.tgz#8274250dada2edf53814ed7db644b9c2866c1e35"
integrity sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==
dependencies:
follow-redirects "^1.14.9"
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"
babel-code-frame@^6.26.0:
version "6.26.0"
@ -4513,10 +4514,10 @@ date-fns@^1.27.2:
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==
dayjs@^1.11.3, dayjs@^1.11.6:
version "1.11.6"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.6.tgz#2e79a226314ec3ec904e3ee1dd5a4f5e5b1c7afb"
integrity sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==
dayjs@^1.11.3, dayjs@^1.11.7:
version "1.11.7"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2"
integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
version "2.6.9"
@ -6000,11 +6001,16 @@ flora-colossus@^1.0.0:
debug "^4.1.1"
fs-extra "^7.0.0"
follow-redirects@^1.0.0, follow-redirects@^1.14.9:
follow-redirects@^1.0.0:
version "1.14.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==
follow-redirects@^1.15.0:
version "1.15.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"
integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==
for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
@ -8648,21 +8654,22 @@ media-typer@0.3.0:
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
megalodon@4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/megalodon/-/megalodon-4.1.1.tgz#f0fd93fbff8d0eec3504fc3e7f5f9d0c13bb4d1f"
integrity sha512-xMGB1HPJZuNyLF6nTISDa2Oi4RXpK30qXrCTwXDBCPXMTNJEjGkdBMp+XKtYJLB0Pq5Tx/GTqWXaI9WEtEALiA==
megalodon@5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/megalodon/-/megalodon-5.0.1.tgz#57c2dc4723cc3c167f8babd265cc62cd8172126f"
integrity sha512-gCzK/JGYoLj/3vflVMSnyi7VwA8sIcqfs/HjypKXQPNS8F5o3jeVprwalNBqxEoGkgzDw7Ic/1UwcjuA02nJSw==
dependencies:
"@types/oauth" "^0.9.0"
"@types/ws" "^8.2.3"
axios "^0.27.2"
dayjs "^1.11.6"
axios "1.1.3"
dayjs "^1.11.7"
form-data "^4.0.0"
https-proxy-agent "^5.0.1"
oauth "^0.10.0"
object-assign-deep "^0.4.0"
parse-link-header "^2.0.0"
socks-proxy-agent "^7.0.0"
typescript "4.8.4"
typescript "4.9.4"
uuid "^9.0.0"
ws "8.5.0"
@ -10009,6 +10016,11 @@ proxy-addr@~2.0.7:
forwarded "0.2.0"
ipaddr.js "1.9.1"
proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
psl@^1.1.33:
version "1.8.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
@ -11899,12 +11911,7 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript@4.8.4:
version "4.8.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
typescript@^4.9.4:
typescript@4.9.4, typescript@^4.9.4:
version "4.9.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==