merge: Replace JSDOM with cheerio (!973)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/973

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
Marie 2025-05-08 16:09:36 +00:00
commit c5f5c6fef0
8 changed files with 98 additions and 188 deletions

View file

@ -6,7 +6,6 @@
import * as mfm from '@transfem-org/sfm-js';
import { Inject, Injectable } from '@nestjs/common';
import ms from 'ms';
import { JSDOM } from 'jsdom';
import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js';
import { extractHashtags } from '@/misc/extract-hashtags.js';
import * as Acct from '@/misc/acct.js';
@ -622,6 +621,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
// this function is superseded by '@/misc/verify-field-link.ts'
/*
private async verifyLink(url: string, user: MiLocalUser) {
if (!safeForSql(url)) return;
@ -653,6 +653,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
// なにもしない
}
}
*/
// these two methods need to be kept in sync with
// `ApRendererService.renderPerson`

View file

@ -112,7 +112,7 @@ export class ApiSearchMastodon {
{
method: 'POST',
headers: {
...request.headers as HeadersInit,
...request.headers,
'Accept': 'application/json',
'Content-Type': 'application/json',
},
@ -135,7 +135,7 @@ export class ApiSearchMastodon {
{
method: 'POST',
headers: {
...request.headers as HeadersInit,
...request.headers,
'Accept': 'application/json',
'Content-Type': 'application/json',
},