pcleanup dependencies:
* Consolidate multiple different HTML/XML/RSS libraries to use the Cheerio stack * Remove unused deps * Move dev dependencies to correct section * Pin versions where missing
This commit is contained in:
parent
20370e5e75
commit
1a964cb6c0
17 changed files with 755 additions and 1004 deletions
|
|
@ -19,7 +19,7 @@ import {
|
|||
ResourceOwnerPassword,
|
||||
} from 'simple-oauth2';
|
||||
import pkceChallenge from 'pkce-challenge';
|
||||
import { load as cheerio } from 'cheerio';
|
||||
import { load as cheerio } from 'cheerio/slim';
|
||||
import Fastify, { type FastifyInstance, type FastifyReply } from 'fastify';
|
||||
import { api, port, sendEnvUpdateRequest, signup } from '../utils.js';
|
||||
import type * as misskey from 'misskey-js';
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ describe('MfmService', () => {
|
|||
|
||||
test('ruby', async () => {
|
||||
const input = '$[ruby $[group *some* text] ignore me]';
|
||||
const output = '<p><ruby><span><span>*some*</span><span> text</span></span><rp>(</rp><rt>ignore me</rt><rp>)</rp></ruby></p>';
|
||||
const output = '<p><ruby><span><span>*some*</span> text</span><rp>(</rp><rt>ignore me</rt><rp>)</rp></ruby></p>';
|
||||
assert.equal(await mfmService.toMastoApiHtml(mfm.parse(input)), output);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ import { inspect } from 'node:util';
|
|||
import WebSocket, { ClientOptions } from 'ws';
|
||||
import fetch, { File, RequestInit, type Headers } from 'node-fetch';
|
||||
import { DataSource } from 'typeorm';
|
||||
import { load as cheerio } from 'cheerio';
|
||||
import { load as cheerio } from 'cheerio/slim';
|
||||
import { type Response } from 'node-fetch';
|
||||
import Fastify from 'fastify';
|
||||
import { entities } from '../src/postgres.js';
|
||||
import { loadConfig } from '../src/config.js';
|
||||
import type { CheerioAPI } from 'cheerio';
|
||||
import type { CheerioAPI } from 'cheerio/slim';
|
||||
import type * as misskey from 'misskey-js';
|
||||
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
||||
import { validateContentTypeSetAsActivityPub } from '@/core/activitypub/misc/validator.js';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue