chore(deps): update nextjs to 15.2.3 (#2701)

* chore(deps): update nextjs to 15.2.3

* fix: dev server crashes with next 15.2.0

* chore(deps): reenable updates for next packages

* chore: address pull request feedback
This commit is contained in:
Meier Lukas
2025-03-28 13:39:20 +01:00
committed by GitHub
parent 0ed4c741c5
commit 08e0dd76ae
20 changed files with 165 additions and 145 deletions

View File

@@ -45,7 +45,7 @@
"@trpc/react-query": "^11.0.0",
"@trpc/server": "^11.0.0",
"lodash.clonedeep": "^4.5.0",
"next": "15.1.7",
"next": "15.2.3",
"pretty-print-error": "^1.1.2",
"react": "19.0.0",
"react-dom": "19.0.0",

View File

@@ -1,9 +1,9 @@
import { observable } from "@trpc/server/observable";
import { jobNameSchema, triggerCronJobAsync } from "@homarr/cron-job-runner";
import { objectEntries } from "@homarr/common";
import { cronJobNames, cronJobs, jobNameSchema, triggerCronJobAsync } from "@homarr/cron-job-runner";
import type { TaskStatus } from "@homarr/cron-job-status";
import { createCronJobStatusChannel } from "@homarr/cron-job-status";
import { jobGroup } from "@homarr/cron-jobs";
import { logger } from "@homarr/log";
import { createTRPCRouter, permissionRequiredProcedure } from "../trpc";
@@ -16,18 +16,17 @@ export const cronJobsRouter = createTRPCRouter({
await triggerCronJobAsync(input);
}),
getJobs: permissionRequiredProcedure.requiresPermission("admin").query(() => {
const registry = jobGroup.getJobRegistry();
return [...registry.values()].map((job) => ({
name: job.name,
expression: job.cronExpression,
return objectEntries(cronJobs).map(([name, options]) => ({
name,
preventManualExecution: options.preventManualExecution,
}));
}),
subscribeToStatusUpdates: permissionRequiredProcedure.requiresPermission("admin").subscription(() => {
return observable<TaskStatus>((emit) => {
const unsubscribes: (() => void)[] = [];
for (const job of jobGroup.getJobRegistry().values()) {
const channel = createCronJobStatusChannel(job.name);
for (const name of cronJobNames) {
const channel = createCronJobStatusChannel(name);
const unsubscribe = channel.subscribe((data) => {
emit.next(data);
});

View File

@@ -35,7 +35,7 @@
"bcrypt": "^5.1.1",
"cookies": "^0.9.1",
"ldapts": "7.3.3",
"next": "15.1.7",
"next": "15.2.3",
"next-auth": "5.0.0-beta.25",
"pretty-print-error": "^1.1.2",
"react": "19.0.0",

View File

@@ -30,7 +30,7 @@
"@homarr/env": "workspace:^0.1.0",
"@homarr/log": "workspace:^0.1.0",
"dayjs": "^1.11.13",
"next": "15.1.7",
"next": "15.2.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"undici": "7.6.0",

View File

@@ -5,7 +5,8 @@
"license": "Apache-2.0",
"type": "module",
"exports": {
".": "./index.ts"
".": "./index.ts",
"./register": "./src/register.ts"
},
"typesVersions": {
"*": {
@@ -22,9 +23,11 @@
},
"prettier": "@homarr/prettier-config",
"dependencies": {
"@homarr/common": "workspace:^0.1.0",
"@homarr/cron-jobs": "workspace:^0.1.0",
"@homarr/log": "workspace:^0.1.0",
"@homarr/redis": "workspace:^0.1.0"
"@homarr/redis": "workspace:^0.1.0",
"@homarr/validation": "workspace:^0.1.0"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",

View File

@@ -1,19 +1,29 @@
import { objectKeys } from "@homarr/common";
import type { JobGroupKeys } from "@homarr/cron-jobs";
import { jobGroup } from "@homarr/cron-jobs";
import { createSubPubChannel } from "@homarr/redis";
import { zodEnumFromArray } from "@homarr/validation";
import { createSubPubChannel } from "../../redis/src/lib/channel";
import { zodEnumFromArray } from "../../validation/src/enums";
export const cronJobRunnerChannel = createSubPubChannel<JobGroupKeys>("cron-job-runner", { persist: false });
const cronJobRunnerChannel = createSubPubChannel<JobGroupKeys>("cron-job-runner", { persist: false });
/**
* Registers the cron job runner to listen to the Redis PubSub channel.
*/
export const registerCronJobRunner = () => {
cronJobRunnerChannel.subscribe((jobName) => {
jobGroup.runManually(jobName);
});
};
export const cronJobs = {
analytics: { preventManualExecution: true },
iconsUpdater: { preventManualExecution: false },
ping: { preventManualExecution: false },
smartHomeEntityState: { preventManualExecution: false },
mediaServer: { preventManualExecution: false },
mediaOrganizer: { preventManualExecution: false },
downloads: { preventManualExecution: false },
dnsHole: { preventManualExecution: false },
mediaRequestStats: { preventManualExecution: false },
mediaRequestList: { preventManualExecution: false },
rssFeeds: { preventManualExecution: false },
indexerManager: { preventManualExecution: false },
healthMonitoring: { preventManualExecution: false },
sessionCleanup: { preventManualExecution: false },
updateChecker: { preventManualExecution: false },
mediaTranscoding: { preventManualExecution: false },
minecraftServerStatus: { preventManualExecution: false },
} satisfies Record<JobGroupKeys, { preventManualExecution?: boolean }>;
/**
* Triggers a cron job to run immediately.
@@ -21,7 +31,12 @@ export const registerCronJobRunner = () => {
* @param jobName name of the job to be triggered
*/
export const triggerCronJobAsync = async (jobName: JobGroupKeys) => {
if (cronJobs[jobName].preventManualExecution) {
throw new Error(`The job "${jobName}" can not be executed manually`);
}
await cronJobRunnerChannel.publishAsync(jobName);
};
export const jobNameSchema = zodEnumFromArray(jobGroup.getKeys());
export const cronJobNames = objectKeys(cronJobs);
export const jobNameSchema = zodEnumFromArray(cronJobNames);

View File

@@ -0,0 +1,12 @@
import { jobGroup } from "@homarr/cron-jobs";
import { cronJobRunnerChannel } from ".";
/**
* Registers the cron job runner to listen to the Redis PubSub channel.
*/
export const registerCronJobRunner = () => {
cronJobRunnerChannel.subscribe((jobName) => {
jobGroup.runManually(jobName);
});
};

View File

@@ -36,7 +36,7 @@
"@mantine/core": "^7.17.3",
"@tabler/icons-react": "^3.31.0",
"dayjs": "^1.11.13",
"next": "15.1.7",
"next": "15.2.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"zod": "^3.24.2"

View File

@@ -41,7 +41,7 @@
"@mantine/core": "^7.17.3",
"@mantine/hooks": "^7.17.3",
"adm-zip": "0.5.16",
"next": "15.1.7",
"next": "15.2.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"superjson": "2.2.2",

View File

@@ -26,7 +26,7 @@
"@homarr/db": "workspace:^0.1.0",
"@homarr/server-settings": "workspace:^0.1.0",
"@mantine/dates": "^7.17.3",
"next": "15.1.7",
"next": "15.2.3",
"react": "19.0.0",
"react-dom": "19.0.0"
},

View File

@@ -38,7 +38,7 @@
"@mantine/spotlight": "^7.17.3",
"@tabler/icons-react": "^3.31.0",
"jotai": "^2.12.2",
"next": "15.1.7",
"next": "15.2.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"use-deep-compare-effect": "^1.8.1"

View File

@@ -32,7 +32,7 @@
"dayjs": "^1.11.13",
"deepmerge": "4.3.1",
"mantine-react-table": "2.0.0-beta.9",
"next": "15.1.7",
"next": "15.2.3",
"next-intl": "4.0.2",
"react": "19.0.0",
"react-dom": "19.0.0"

View File

@@ -34,7 +34,7 @@
"@mantine/hooks": "^7.17.3",
"@tabler/icons-react": "^3.31.0",
"mantine-react-table": "2.0.0-beta.9",
"next": "15.1.7",
"next": "15.2.3",
"react": "19.0.0",
"react-dom": "19.0.0"
},

View File

@@ -66,7 +66,7 @@
"clsx": "^2.1.1",
"dayjs": "^1.11.13",
"mantine-react-table": "2.0.0-beta.9",
"next": "15.1.7",
"next": "15.2.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"recharts": "^2.15.1",