1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-22 16:24:17 +02:00

Remove js-yaml from runtime dependencies, use pre-compiled JSON instead

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-01 02:11:02 +00:00
parent 5e6fe5bef6
commit 69c8d8e102
8 changed files with 83 additions and 40 deletions

View File

@@ -3,8 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { path as configYamlPath } from '../../built/config.js';
import * as yaml from 'js-yaml';
import { path as configJsonPath } from '../../built/config.js';
import fs from "node:fs";
export function isConcurrentIndexMigrationEnabled() {
@@ -14,7 +13,7 @@ export function isConcurrentIndexMigrationEnabled() {
let loadedConfigCache = undefined;
function loadConfigInternal() {
const config = yaml.load(fs.readFileSync(configYamlPath, 'utf-8'));
const config = JSON.parse(fs.readFileSync(configJsonPath, 'utf-8'));
return {
disallowExternalApRedirect: Boolean(config.disallowExternalApRedirect ?? false),