ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix lint
Chocobozzzba2684ceddf9
diff --git a/.eslintrc.json b/.eslintrc.jsonindex dd38213980..c2dd2fc446 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -43,7 +43,9 @@2,{"SwitchCase": 1,- "MemberExpression": "off"+ "MemberExpression": "off",+ // https://github.com/eslint/eslint/issues/15299+ "ignoredNodes": ["PropertyDefinition"]}],"@typescript-eslint/consistent-type-assertions": [diff --git a/client/.eslintrc.json b/client/.eslintrc.jsonindex 021de01181..f9326acc86 100644--- a/client/.eslintrc.json+++ b/client/.eslintrc.json@@ -29,7 +29,7 @@"arrow-body-style": "off","import/no-webpack-loader-syntax": "off","no-underscore-dangle": "off",- "node/no-callback-literal": "off",+ "n/no-callback-literal": "off","@angular-eslint/component-selector": ["error",{diff --git a/package.json b/package.jsonindex c9a5edb526..add7b122ab 100644--- a/package.json+++ b/package.json@@ -220,6 +220,7 @@"eslint": "^8.0.0","eslint-config-standard-with-typescript": "^22.0.0","eslint-plugin-import": "^2.20.1",+ "eslint-plugin-n": "^15.2.4","eslint-plugin-node": "^11.0.0","eslint-plugin-promise": "^6.0.0","fast-xml-parser": "^4.0.0-beta.8",diff --git a/scripts/benchmark.ts b/scripts/benchmark.tsindex 4a414a2fa1..f7f9ad1bf6 100644--- a/scripts/benchmark.ts+++ b/scripts/benchmark.ts@@ -208,7 +208,7 @@ function runBenchmark (options: {return new Promise((res, rej) => {autocannon({url: server.url + path,- method: method,+ method,body,connections: 20,headers,diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.tsindex 46e80d56d1..7761ba6020 100644--- a/server/controllers/api/users/index.ts+++ b/server/controllers/api/users/index.ts@@ -226,7 +226,7 @@ async function registerUser (req: express.Request, res: express.Response) {})const { user, account, videoChannel } = await createUserAccountAndChannelAndPlaylist({- userToCreate: userToCreate,+ userToCreate,userDisplayName: body.displayName || undefined,channelNames: body.channel})diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.tsindex 44283e2667..7576e77e73 100644--- a/server/controllers/api/videos/import.ts+++ b/server/controllers/api/videos/import.ts@@ -274,7 +274,7 @@ async function buildVideo (channelId: number, body: VideoImportCreate, importDatsupport: body.support || null,privacy: body.privacy || VideoPrivacy.PRIVATE,duration: 0, // duration will be set by the import job- channelId: channelId,+ channelId,originallyPublishedAt: body.originallyPublishedAt? new Date(body.originallyPublishedAt): importData.originallyPublishedAtdiff --git a/server/controllers/api/videos/view.ts b/server/controllers/api/videos/view.tsindex dee1ec67cb..a747fa334f 100644--- a/server/controllers/api/videos/view.ts+++ b/server/controllers/api/videos/view.ts@@ -39,7 +39,7 @@ async function viewVideo (req: express.Request, res: express.Response) {})if (successView) {- Hooks.runAction('action:api.video.viewed', { video: video, ip, req, res })+ Hooks.runAction('action:api.video.viewed', { video, ip, req, res })}await updateUserHistoryIfNeeded(body, video, res)diff --git a/server/controllers/services.ts b/server/controllers/services.tsindex 70d08ab690..cabcbc00b4 100644--- a/server/controllers/services.ts+++ b/server/controllers/services.ts@@ -141,7 +141,7 @@ function buildOEmbed (options: {html,width: embedWidth,height: embedHeight,- title: title,+ title,author_name: channel.name,author_url: channel.Actor.url,provider_name: 'PeerTube',diff --git a/server/lib/activitypub/actors/shared/url-to-object.ts b/server/lib/activitypub/actors/shared/url-to-object.tsindex 7bc37f1ff8..12a121725b 100644--- a/server/lib/activitypub/actors/shared/url-to-object.ts+++ b/server/lib/activitypub/actors/shared/url-to-object.ts@@ -11,12 +11,12 @@ async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode: numberif (sanitizeAndCheckActorObject(body) === false) {logger.debug('Remote actor JSON is not valid.', { actorJSON: body })- return { actorObject: undefined, statusCode: statusCode }+ return { actorObject: undefined, statusCode }}if (checkUrlsSameHost(body.id, actorUrl) !== true) {logger.warn('Actor url %s has not the same host than its AP id %s', actorUrl, body.id)- return { actorObject: undefined, statusCode: statusCode }+ return { actorObject: undefined, statusCode }}return {diff --git a/server/lib/auth/external-auth.ts b/server/lib/auth/external-auth.tsindex 80f5064b68..0531128016 100644--- a/server/lib/auth/external-auth.ts+++ b/server/lib/auth/external-auth.ts@@ -166,7 +166,7 @@ function getBypassFromExternalAuth (username: string, externalAuthToken: string)return {bypass: true,pluginName: npmName,- authName: authName,+ authName,user}}diff --git a/server/lib/blocklist.ts b/server/lib/blocklist.tsindex 98273a6ea0..a11b717b54 100644--- a/server/lib/blocklist.ts+++ b/server/lib/blocklist.ts@@ -8,7 +8,7 @@ function addAccountInBlocklist (byAccountId: number, targetAccountId: number) {return sequelizeTypescript.transaction(async t => {return AccountBlocklistModel.upsert({accountId: byAccountId,- targetAccountId: targetAccountId+ targetAccountId}, { transaction: t })})}diff --git a/server/lib/moderation.ts b/server/lib/moderation.tsindex c2565f8676..c23f5b6a6c 100644--- a/server/lib/moderation.ts+++ b/server/lib/moderation.ts@@ -115,8 +115,8 @@ async function createVideoAbuse (options: {const videoAbuseInstance: MVideoAbuseVideoFull = await VideoAbuseModel.create({abuseId: abuseInstance.id,videoId: videoInstance.id,- startAt: startAt,- endAt: endAt+ startAt,+ endAt}, { transaction })videoAbuseInstance.Video = videoInstancediff --git a/server/lib/opentelemetry/tracing.ts b/server/lib/opentelemetry/tracing.tsindex 5358d04ded..23764e9e49 100644--- a/server/lib/opentelemetry/tracing.ts+++ b/server/lib/opentelemetry/tracing.ts@@ -47,7 +47,7 @@ function registerOpentelemetryTracing () {})registerInstrumentations({- tracerProvider: tracerProvider,+ tracerProvider,instrumentations: [new PgInstrumentation({enhancedDatabaseReporting: truediff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.tsindex 1305f660ff..c21ebd0c5d 100644--- a/server/lib/plugins/plugin-manager.ts+++ b/server/lib/plugins/plugin-manager.ts@@ -563,7 +563,7 @@ export class PluginManager implements ServerHook {if (!this.hooks[options.target]) this.hooks[options.target] = []this.hooks[options.target].push({- npmName: npmName,+ npmName,pluginName: plugin.name,handler: options.handler,priority: options.priority || 0diff --git a/server/lib/plugins/video-constant-manager-factory.ts b/server/lib/plugins/video-constant-manager-factory.tsindex f04dde29f2..5f7edfbe2f 100644--- a/server/lib/plugins/video-constant-manager-factory.ts+++ b/server/lib/plugins/video-constant-manager-factory.ts@@ -97,7 +97,7 @@ export class VideoConstantManagerFactory {}}- this.updatedVideoConstants[type][npmName].added.push({ key: key, label } as VideoConstant)+ this.updatedVideoConstants[type][npmName].added.push({ key, label } as VideoConstant)obj[key] = labelreturn truediff --git a/server/lib/user.ts b/server/lib/user.tsindex 586fd0f128..f4ffae0e41 100644--- a/server/lib/user.ts+++ b/server/lib/user.ts@@ -64,8 +64,8 @@ function buildUser (options: {emailVerified,adminFlags,- videoQuota: videoQuota,- videoQuotaDaily: videoQuotaDaily,+ videoQuota,+ videoQuotaDaily,pluginAuth})@@ -147,7 +147,7 @@ async function createApplicationActor (applicationId: number) {const accountCreated = await createLocalAccountWithoutKeys({name: SERVER_ACTOR_NAME,userId: null,- applicationId: applicationId,+ applicationId,t: undefined,type: 'Application'})diff --git a/server/lib/video.ts b/server/lib/video.tsindex 86718abbe8..b843b11bc4 100644--- a/server/lib/video.ts+++ b/server/lib/video.ts@@ -26,7 +26,7 @@ function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): Fildescription: videoInfo.description,support: videoInfo.support,privacy: videoInfo.privacy || VideoPrivacy.PRIVATE,- channelId: channelId,+ channelId,originallyPublishedAt: videoInfo.originallyPublishedAt? new Date(videoInfo.originallyPublishedAt): null@@ -122,7 +122,7 @@ async function addOptimizeOrMergeAudioJob (options: {async function addTranscodingJob (payload: VideoTranscodingPayload, options: CreateJobOptions = {}) {await VideoJobInfoModel.increaseOrCreate(payload.videoUUID, 'pendingTranscode')- return JobQueue.Instance.createJobWithPromise({ type: 'video-transcoding', payload: payload }, options)+ return JobQueue.Instance.createJobWithPromise({ type: 'video-transcoding', payload }, options)}async function getTranscodingJobPriority (user: MUserId) {diff --git a/server/models/actor/actor-follow.ts b/server/models/actor/actor-follow.tsindex af1d85e9f8..8870bec05b 100644--- a/server/models/actor/actor-follow.ts+++ b/server/models/actor/actor-follow.ts@@ -218,7 +218,7 @@ export class ActorFollowModel extends Model<Partial<AttributesOnly<ActorFollowMoconst query = {where: {actorId,- targetActorId: targetActorId+ targetActorId},include: [{@@ -372,7 +372,7 @@ export class ActorFollowModel extends Model<Partial<AttributesOnly<ActorFollowMo}) {const { actorId, start, count, sort } = optionsconst where = {- actorId: actorId+ actorId}if (options.search) {diff --git a/server/models/oauth/oauth-client.ts b/server/models/oauth/oauth-client.tsindex 860fa6f532..457e846137 100644--- a/server/models/oauth/oauth-client.ts+++ b/server/models/oauth/oauth-client.ts@@ -53,8 +53,8 @@ export class OAuthClientModel extends Model<Partial<AttributesOnly<OAuthClientMostatic getByIdAndSecret (clientId: string, clientSecret: string) {const query = {where: {- clientId: clientId,- clientSecret: clientSecret+ clientId,+ clientSecret}}diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.tsindex 6f84747da7..b363afb286 100644--- a/server/models/redundancy/video-redundancy.ts+++ b/server/models/redundancy/video-redundancy.ts@@ -530,7 +530,7 @@ export class VideoRedundancyModel extends Model<Partial<AttributesOnly<VideoRedu}if (strategy) {- Object.assign(redundancyWhere, { strategy: strategy })+ Object.assign(redundancyWhere, { strategy })}const videoFilterWhere = {diff --git a/server/models/user/user.ts b/server/models/user/user.tsindex dc260e512e..3fd359359c 100644--- a/server/models/user/user.ts+++ b/server/models/user/user.ts@@ -488,9 +488,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {}if (blocked !== undefined) {- Object.assign(where, {- blocked: blocked- })+ Object.assign(where, { blocked })}const query: FindOptions = {diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.tsindex 00cca05498..81ce3dc9ea 100644--- a/server/models/video/video-playlist.ts+++ b/server/models/video/video-playlist.ts@@ -423,7 +423,7 @@ export class VideoPlaylistModel extends Model<Partial<AttributesOnly<VideoPlayli]).then(([ count, rows ]) => ({ total: count, data: rows }))}- static searchForApi (options: Pick<AvailableForListOptions, 'followerActorId' | 'search'| 'host'| 'uuids'> & {+ static searchForApi (options: Pick<AvailableForListOptions, 'followerActorId' | 'search' | 'host' | 'uuids'> & {start: numbercount: numbersort: stringdiff --git a/server/models/video/video.ts b/server/models/video/video.tsindex cdc1137be3..53328d3117 100644--- a/server/models/video/video.ts+++ b/server/models/video/video.ts@@ -949,7 +949,7 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {const total = totalVideos + totalVideoSharesreturn {data: rows,- total: total+ total}})}diff --git a/server/tests/api/check-params/abuses.ts b/server/tests/api/check-params/abuses.tsindex bc2cc640fc..7d8347412b 100644--- a/server/tests/api/check-params/abuses.ts+++ b/server/tests/api/check-params/abuses.ts@@ -163,7 +163,7 @@ describe('Test abuses API validators', function () {it('Should fail with a wrong video', async function () {const fields = { video: { id: 'blabla' }, reason: 'my super reason' }- await makePostBodyRequest({ url: server.url, path: path, token: userToken, fields })+ await makePostBodyRequest({ url: server.url, path, token: userToken, fields })})it('Should fail with an unknown video', async function () {@@ -179,7 +179,7 @@ describe('Test abuses API validators', function () {it('Should fail with a wrong comment', async function () {const fields = { comment: { id: 'blabla' }, reason: 'my super reason' }- await makePostBodyRequest({ url: server.url, path: path, token: userToken, fields })+ await makePostBodyRequest({ url: server.url, path, token: userToken, fields })})it('Should fail with an unknown comment', async function () {@@ -195,7 +195,7 @@ describe('Test abuses API validators', function () {it('Should fail with a wrong account', async function () {const fields = { account: { id: 'blabla' }, reason: 'my super reason' }- await makePostBodyRequest({ url: server.url, path: path, token: userToken, fields })+ await makePostBodyRequest({ url: server.url, path, token: userToken, fields })})it('Should fail with an unknown account', async function () {diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.tsindex 29f847e51e..b092f16f96 100644--- a/server/tests/api/check-params/live.ts+++ b/server/tests/api/check-params/live.ts@@ -51,7 +51,7 @@ describe('Test video lives API validator', function () {const username = 'user1'const password = 'my super password'- await server.users.create({ username: username, password: password })+ await server.users.create({ username, password })userAccessToken = await server.login.getAccessToken({ username, password }){diff --git a/server/tests/api/check-params/users-admin.ts b/server/tests/api/check-params/users-admin.tsindex d8353f83bd..716c22556a 100644--- a/server/tests/api/check-params/users-admin.ts+++ b/server/tests/api/check-params/users-admin.ts@@ -175,7 +175,7 @@ describe('Test users admin API validators', function () {await makePostBodyRequest({url: server.url,- path: path,+ path,token: server.accessToken,fields,expectedStatus: HttpStatusCode.OK_200diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.tsindex 84254945c3..4c4f549584 100644--- a/server/tests/api/check-params/users.ts+++ b/server/tests/api/check-params/users.ts@@ -163,7 +163,7 @@ describe('Test users API validators', function () {url: server.url,path: registrationPath,token: server.accessToken,- fields: fields,+ fields,expectedStatus: HttpStatusCode.NO_CONTENT_204})})diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.tsindex 1aab608268..0ec3f49d50 100644--- a/server/tests/api/check-params/video-blacklist.ts+++ b/server/tests/api/check-params/video-blacklist.ts@@ -37,14 +37,14 @@ describe('Test video blacklist API validators', function () {{const username = 'user1'const password = 'my super password'- await servers[0].users.create({ username: username, password: password })+ await servers[0].users.create({ username, password })userAccessToken1 = await servers[0].login.getAccessToken({ username, password })}{const username = 'user2'const password = 'my super password'- await servers[0].users.create({ username: username, password: password })+ await servers[0].users.create({ username, password })userAccessToken2 = await servers[0].login.getAccessToken({ username, password })}diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.tsindex da9d0826a1..4439810e82 100644--- a/server/tests/api/check-params/video-imports.ts+++ b/server/tests/api/check-params/video-imports.ts@@ -35,7 +35,7 @@ describe('Test video imports API validator', function () {const username = 'user1'const password = 'my super password'- await server.users.create({ username: username, password: password })+ await server.users.create({ username, password })userAccessToken = await server.login.getAccessToken({ username, password }){diff --git a/server/tests/api/check-params/video-playlists.ts b/server/tests/api/check-params/video-playlists.tsindex 4b17ce7db6..8db91a3f98 100644--- a/server/tests/api/check-params/video-playlists.ts+++ b/server/tests/api/check-params/video-playlists.ts@@ -209,7 +209,7 @@ describe('Test video playlists API validator', function () {}}const getUpdate = (params: any, playlistId: number | string) => {- return { ...params, playlistId: playlistId }+ return { ...params, playlistId }}it('Should fail with an unauthenticated user', async function () {diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.tsindex 5ff51d1ff4..e5c9b90c40 100644--- a/server/tests/api/check-params/videos.ts+++ b/server/tests/api/check-params/videos.ts@@ -205,7 +205,7 @@ describe('Test videos API validator', function () {support: 'my super support text',tags: [ 'tag1', 'tag2' ],privacy: VideoPrivacy.PUBLIC,- channelId: channelId,+ channelId,originallyPublishedAt: new Date().toISOString()}})diff --git a/server/tests/api/check-params/views.ts b/server/tests/api/check-params/views.tsindex 8f1fa796bc..9bf1ef6c3c 100644--- a/server/tests/api/check-params/views.ts+++ b/server/tests/api/check-params/views.ts@@ -64,12 +64,12 @@ describe('Test videos views', function () {})it('Should fail without token', async function () {- await servers[0].videoStats.getOverallStats({ videoId: videoId, token: null, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })+ await servers[0].videoStats.getOverallStats({ videoId, token: null, expectedStatus: HttpStatusCode.UNAUTHORIZED_401 })})it('Should fail with another token', async function () {await servers[0].videoStats.getOverallStats({- videoId: videoId,+ videoId,token: userAccessToken,expectedStatus: HttpStatusCode.FORBIDDEN_403})@@ -114,7 +114,7 @@ describe('Test videos views', function () {it('Should fail without token', async function () {await servers[0].videoStats.getTimeserieStats({- videoId: videoId,+ videoId,token: null,metric: 'viewers',expectedStatus: HttpStatusCode.UNAUTHORIZED_401@@ -123,7 +123,7 @@ describe('Test videos views', function () {it('Should fail with another token', async function () {await servers[0].videoStats.getTimeserieStats({- videoId: videoId,+ videoId,token: userAccessToken,metric: 'viewers',expectedStatus: HttpStatusCode.FORBIDDEN_403@@ -198,7 +198,7 @@ describe('Test videos views', function () {it('Should fail without token', async function () {await servers[0].videoStats.getRetentionStats({- videoId: videoId,+ videoId,token: null,expectedStatus: HttpStatusCode.UNAUTHORIZED_401})@@ -206,7 +206,7 @@ describe('Test videos views', function () {it('Should fail with another token', async function () {await servers[0].videoStats.getRetentionStats({- videoId: videoId,+ videoId,token: userAccessToken,expectedStatus: HttpStatusCode.FORBIDDEN_403})diff --git a/server/tests/api/notifications/admin-notifications.ts b/server/tests/api/notifications/admin-notifications.tsindex f037e7aaec..1501f9227a 100644--- a/server/tests/api/notifications/admin-notifications.ts+++ b/server/tests/api/notifications/admin-notifications.ts@@ -51,7 +51,7 @@ describe('Test admin notifications', function () {adminNotifications = res.adminNotificationsbaseParams = {- server: server,+ server,emails,socketNotifications: adminNotifications,token: server.accessTokendiff --git a/server/tests/api/notifications/notifications-api.ts b/server/tests/api/notifications/notifications-api.tsindex 78864c8a04..e2b4777c0e 100644--- a/server/tests/api/notifications/notifications-api.ts+++ b/server/tests/api/notifications/notifications-api.ts@@ -99,7 +99,7 @@ describe('Test notifications API', function () {before(() => {baseParams = {- server: server,+ server,emails,socketNotifications: userNotifications,token: userTokendiff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.tsindex 0f7ffcb4c7..9887d25354 100644--- a/server/tests/api/redundancy/redundancy.ts+++ b/server/tests/api/redundancy/redundancy.ts@@ -53,7 +53,7 @@ async function createServers (strategy: VideoRedundancyStrategy | null, additionstrategies.push({min_lifetime: '1 hour',- strategy: strategy,+ strategy,size: '400KB',...additionalParamsdiff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.tsindex ff4c3c1618..b1ebc855c6 100644--- a/server/tests/api/search/search-videos.ts+++ b/server/tests/api/search/search-videos.ts@@ -106,7 +106,7 @@ describe('Test videos search', function () {licence: 2,language: 'en'}- await server.videos.upload({ attributes: attributes })+ await server.videos.upload({ attributes })await server.videos.upload({ attributes: { ...attributes, name: attributes.name + ' duplicate' } })}@@ -119,7 +119,7 @@ describe('Test videos search', function () {licence: 3,language: 'pl'}- await server.videos.upload({ attributes: attributes })+ await server.videos.upload({ attributes })}{@@ -210,7 +210,7 @@ describe('Test videos search', function () {const search = {categoryOneOf: [ 3 ]}- const body = await command.advancedVideoSearch({ search: search })+ const body = await command.advancedVideoSearch({ search })expect(body.total).to.equal(1)diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.tsindex 3dcd076f59..c45d3ea60d 100644--- a/server/tests/api/server/handle-down.ts+++ b/server/tests/api/server/handle-down.ts@@ -162,7 +162,7 @@ describe('Test handle downs', function () {for (const state of states) {const body = await servers[0].jobs.list({- state: state,+ state,start: 0,count: 50,sort: '-createdAt'diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.tsindex 99ea67a0fe..34713025df 100644--- a/server/tests/api/videos/video-nsfw.ts+++ b/server/tests/api/videos/video-nsfw.ts@@ -136,7 +136,7 @@ describe('Test video NSFW policy', function () {it('Should create a user having the default nsfw policy', async function () {const username = 'user1'const password = 'my super password'- await server.users.create({ username: username, password: password })+ await server.users.create({ username, password })userAccessToken = await server.login.getAccessToken({ username, password })diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.tsindex e0f25ca264..b1f83d2017 100644--- a/server/tests/plugins/filter-hooks.ts+++ b/server/tests/plugins/filter-hooks.ts@@ -395,7 +395,7 @@ describe('Test plugin filter hooks', function () {const uuids: string[] = []for (const name of [ 'bad torrent', 'bad file', 'bad playlist file' ]) {- const uuid = (await servers[0].videos.quickUpload({ name: name })).uuid+ const uuid = (await servers[0].videos.quickUpload({ name })).uuiduuids.push(uuid)}@@ -446,7 +446,7 @@ describe('Test plugin filter hooks', function () {for (const name of [ 'bad embed', 'good embed' ]) {{- const uuid = (await servers[0].videos.quickUpload({ name: name })).uuid+ const uuid = (await servers[0].videos.quickUpload({ name })).uuidembedVideos.push(await servers[0].videos.get({ id: uuid }))}diff --git a/server/tests/shared/notifications.ts b/server/tests/shared/notifications.tsindex 09bc8da03a..ee15e2b098 100644--- a/server/tests/shared/notifications.ts+++ b/server/tests/shared/notifications.ts@@ -780,7 +780,7 @@ async function checkNotification (options: CheckerBaseParams & {const check = options.check || { web: true, mail: true }if (check.web) {- const notification = await server.notifications.getLatest({ token: token })+ const notification = await server.notifications.getLatest({ token })if (notification || checkType !== 'absence') {notificationChecker(notification, checkType)diff --git a/shared/server-commands/requests/requests.ts b/shared/server-commands/requests/requests.tsindex 95e4fe6b1e..a08a6e0b9b 100644--- a/shared/server-commands/requests/requests.ts+++ b/shared/server-commands/requests/requests.ts@@ -52,7 +52,7 @@ function makeActivityPubGetRequest (url: string, path: string, expectedStatus =return makeGetRequest({url,path,- expectedStatus: expectedStatus,+ expectedStatus,accept: 'application/activity+json,text/html;q=0.9,\\*/\\*;q=0.8'})}diff --git a/shared/server-commands/search/search-command.ts b/shared/server-commands/search/search-command.tsindex 0fbbcd6efe..a5b498b664 100644--- a/shared/server-commands/search/search-command.ts+++ b/shared/server-commands/search/search-command.ts@@ -74,7 +74,7 @@ export class SearchCommand extends AbstractCommand {...options,search: {- search: search,+ search,sort: sort ?? '-publishedAt'}})diff --git a/shared/server-commands/users/login-command.ts b/shared/server-commands/users/login-command.tsindex 143f72a59c..54070e4261 100644--- a/shared/server-commands/users/login-command.ts+++ b/shared/server-commands/users/login-command.ts@@ -60,7 +60,7 @@ export class LoginCommand extends AbstractCommand {const body = {client_id: this.server.store.client.id,client_secret: this.server.store.client.secret,- username: username,+ username,response_type: 'code',grant_type: 'password',scope: 'upload',diff --git a/yarn.lock b/yarn.lockindex e73c78f63b..2a42fc4287 100644--- a/yarn.lock+++ b/yarn.lock@@ -3157,6 +3157,13 @@ bufrw@^1.3.0:hexer "^1.5.0"xtend "^4.0.0"+builtins@^5.0.1:+ version "5.0.1"+ resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"+ integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==+ dependencies:+ semver "^7.0.0"+bull@^4.1.0:version "4.8.4"resolved "https://registry.yarnpkg.com/bull/-/bull-4.8.4.tgz#c538610492050d5160dbd9180704145f135a0aa9"@@ -4350,6 +4357,14 @@ eslint-plugin-es@^3.0.0:eslint-utils "^2.0.0"regexpp "^3.0.0"+eslint-plugin-es@^4.1.0:+ version "4.1.0"+ resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9"+ integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==+ dependencies:+ eslint-utils "^2.0.0"+ regexpp "^3.0.0"+eslint-plugin-import@^2.20.1:version "2.26.0"resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b"@@ -4369,6 +4384,20 @@ eslint-plugin-import@^2.20.1:resolve "^1.22.0"tsconfig-paths "^3.14.1"+eslint-plugin-n@^15.2.4:+ version "15.2.4"+ resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.2.4.tgz#d62021a0821ae650701ed459756aaf478a9b6056"+ integrity sha512-tjnVMv2fiXYMnuiIFI8QMtyUFI42SckEEWvi8h68SWGWshfqO6SSCASy24dGMGAiy7NUk6DZt90DM0iNUsmQ5w==+ dependencies:+ builtins "^5.0.1"+ eslint-plugin-es "^4.1.0"+ eslint-utils "^3.0.0"+ ignore "^5.1.1"+ is-core-module "^2.9.0"+ minimatch "^3.1.2"+ resolve "^1.10.1"+ semver "^7.3.7"+eslint-plugin-node@^11.0.0:version "11.1.0"resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"@@ -8005,7 +8034,7 @@ semver@^6.0.0, semver@^6.1.0:resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==-semver@^7.3.2, semver@^7.3.5, semver@^7.3.7:+semver@^7.0.0, semver@^7.3.2, semver@^7.3.5, semver@^7.3.7:version "7.3.7"resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==