diff --git a/packages/backend/package.json b/packages/backend/package.json index 59a9782927..f0a0eaadb5 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -108,10 +108,10 @@ "bullmq": "5.13.2", "cacheable-lookup": "7.0.0", "cbor": "9.0.2", + "cfm-js": "0.24.0-cherrypick.7", "chalk": "5.3.0", "chalk-template": "1.1.0", "cherrypick-js": "workspace:*", - "cherrypick-mfm-js": "0.24.0-cherrypick.4", "chokidar": "3.6.0", "cli-highlight": "2.1.11", "color-convert": "2.0.1", diff --git a/packages/backend/src/core/MfmService.ts b/packages/backend/src/core/MfmService.ts index 9a729e8402..c489a5c4ca 100644 --- a/packages/backend/src/core/MfmService.ts +++ b/packages/backend/src/core/MfmService.ts @@ -14,7 +14,7 @@ import { normalizeForSearch } from '@/misc/normalize-for-search.js'; import type { IMentionedRemoteUsers } from '@/models/Note.js'; import { bindThis } from '@/decorators.js'; import type { DefaultTreeAdapterMap } from 'parse5'; -import type * as mfm from 'cherrypick-mfm-js'; +import type * as mfm from 'cfm-js'; const treeAdapter = parse5.defaultTreeAdapter; type Node = DefaultTreeAdapterMap['node']; diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index d14bf7539d..2212b6f793 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -4,7 +4,7 @@ */ import { setImmediate } from 'node:timers/promises'; -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import { In, DataSource, IsNull, LessThan } from 'typeorm'; import * as Redis from 'ioredis'; import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common'; diff --git a/packages/backend/src/core/NoteUpdateService.ts b/packages/backend/src/core/NoteUpdateService.ts index 42ce3ab196..8c5c76e82b 100644 --- a/packages/backend/src/core/NoteUpdateService.ts +++ b/packages/backend/src/core/NoteUpdateService.ts @@ -7,7 +7,7 @@ import { setImmediate } from 'node:timers/promises'; import util from 'util'; import { In, DataSource } from 'typeorm'; import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common'; -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import type { IMentionedRemoteUsers } from '@/models/Note.js'; import { MiNote } from '@/models/Note.js'; import type { NotesRepository, UsersRepository } from '@/models/_.js'; diff --git a/packages/backend/src/core/activitypub/ApMfmService.ts b/packages/backend/src/core/activitypub/ApMfmService.ts index 51400a0951..c195416eb2 100644 --- a/packages/backend/src/core/activitypub/ApMfmService.ts +++ b/packages/backend/src/core/activitypub/ApMfmService.ts @@ -4,7 +4,7 @@ */ import { Injectable } from '@nestjs/common'; -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import { MfmService } from '@/core/MfmService.js'; import type { MiNote } from '@/models/Note.js'; import { bindThis } from '@/decorators.js'; diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts index 7d8daa25f4..2a9947aea4 100644 --- a/packages/backend/src/core/activitypub/ApRendererService.ts +++ b/packages/backend/src/core/activitypub/ApRendererService.ts @@ -6,7 +6,7 @@ import { createPublicKey, randomUUID } from 'node:crypto'; import { Inject, Injectable } from '@nestjs/common'; import { In } from 'typeorm'; -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import { DI } from '@/di-symbols.js'; import type { Config } from '@/config.js'; import type { MiPartialLocalUser, MiLocalUser, MiPartialRemoteUser, MiRemoteUser, MiUser } from '@/models/User.js'; diff --git a/packages/backend/src/misc/extract-custom-emojis-from-mfm.ts b/packages/backend/src/misc/extract-custom-emojis-from-mfm.ts index 17b9dafd1e..28ecba8b3b 100644 --- a/packages/backend/src/misc/extract-custom-emojis-from-mfm.ts +++ b/packages/backend/src/misc/extract-custom-emojis-from-mfm.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import { unique } from '@/misc/prelude/array.js'; export function extractCustomEmojisFromMfm(nodes: mfm.MfmNode[]): string[] { diff --git a/packages/backend/src/misc/extract-hashtags.ts b/packages/backend/src/misc/extract-hashtags.ts index 288c4a4c9e..a0c7f7ad3b 100644 --- a/packages/backend/src/misc/extract-hashtags.ts +++ b/packages/backend/src/misc/extract-hashtags.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import { unique } from '@/misc/prelude/array.js'; export function extractHashtags(nodes: mfm.MfmNode[]): string[] { diff --git a/packages/backend/src/misc/extract-mentions.ts b/packages/backend/src/misc/extract-mentions.ts index 3c3c60b898..72e0730068 100644 --- a/packages/backend/src/misc/extract-mentions.ts +++ b/packages/backend/src/misc/extract-mentions.ts @@ -5,7 +5,7 @@ // test is located in test/extract-mentions -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; export function extractMentions(nodes: mfm.MfmNode[]): mfm.MfmMention['props'][] { // TODO: 重複を削除 diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index d5a29308e6..ffe44c0507 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -4,7 +4,7 @@ */ import RE2 from 're2'; -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import { Inject, Injectable } from '@nestjs/common'; import ms from 'ms'; import { JSDOM } from 'jsdom'; diff --git a/packages/backend/src/server/web/FeedService.ts b/packages/backend/src/server/web/FeedService.ts index 2b699b2a7e..086dda04d6 100644 --- a/packages/backend/src/server/web/FeedService.ts +++ b/packages/backend/src/server/web/FeedService.ts @@ -6,7 +6,7 @@ import { Inject, Injectable } from '@nestjs/common'; import { In, IsNull } from 'typeorm'; import { Feed } from 'feed'; -import { parse as mfmParse } from 'cherrypick-mfm-js'; +import { parse as mfmParse } from 'cfm-js'; import { DI } from '@/di-symbols.js'; import type { DriveFilesRepository, NotesRepository, UserProfilesRepository } from '@/models/_.js'; import type { Config } from '@/config.js'; diff --git a/packages/backend/test/unit/MfmService.ts b/packages/backend/test/unit/MfmService.ts index 2bbe9a907a..a36a5cfcf1 100644 --- a/packages/backend/test/unit/MfmService.ts +++ b/packages/backend/test/unit/MfmService.ts @@ -4,7 +4,7 @@ */ import * as assert from 'assert'; -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import { Test } from '@nestjs/testing'; import { CoreModule } from '@/core/CoreModule.js'; diff --git a/packages/backend/test/unit/extract-mentions.ts b/packages/backend/test/unit/extract-mentions.ts index bd9d818565..63b91afbc1 100644 --- a/packages/backend/test/unit/extract-mentions.ts +++ b/packages/backend/test/unit/extract-mentions.ts @@ -5,7 +5,7 @@ import * as assert from 'assert'; -import { parse } from 'cherrypick-mfm-js'; +import { parse } from 'cfm-js'; import { extractMentions } from '@/misc/extract-mentions.js'; describe('Extract mentions', () => { diff --git a/packages/frontend-embed/package.json b/packages/frontend-embed/package.json index dfa7d9f2d4..39d843c2f8 100644 --- a/packages/frontend-embed/package.json +++ b/packages/frontend-embed/package.json @@ -21,8 +21,8 @@ "@vue/compiler-sfc": "3.5.10", "astring": "1.9.0", "buraha": "0.0.1", + "cfm-js": "0.24.0-cherrypick.7", "cherrypick-js": "workspace:*", - "cherrypick-mfm-js": "0.24.0-cherrypick.4", "estree-walker": "3.0.3", "frontend-shared": "workspace:*", "punycode": "2.3.1", diff --git a/packages/frontend-embed/src/components/EmMfm.ts b/packages/frontend-embed/src/components/EmMfm.ts index 34b07e2c31..7544f66d19 100644 --- a/packages/frontend-embed/src/components/EmMfm.ts +++ b/packages/frontend-embed/src/components/EmMfm.ts @@ -4,7 +4,7 @@ */ import { VNode, h, SetupContext, provide } from 'vue'; -import * as mfm from 'cherrypick-mfm-js'; +import * as mfm from 'cfm-js'; import * as Misskey from 'cherrypick-js'; import { host } from '@@/js/config.js'; import EmUrl from '@/components/EmUrl.vue'; diff --git a/packages/frontend-embed/src/components/EmNote.vue b/packages/frontend-embed/src/components/EmNote.vue index 9a4611fbc9..e7508b9103 100644 --- a/packages/frontend-embed/src/components/EmNote.vue +++ b/packages/frontend-embed/src/components/EmNote.vue @@ -121,7 +121,7 @@ SPDX-License-Identifier: AGPL-3.0-only