From fb029b67aaee9a445f96734307053253ac7f562a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 3 Dec 2025 09:11:47 +0100 Subject: [PATCH] clean up types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/fifty-lights-marry.md | 9 +++++++++ microsite/package.json | 1 - microsite/yarn.lock | 8 -------- .../src/entrypoints/scheduler/lib/TaskWorker.ts | 8 ++++++-- packages/integration/package.json | 1 - .../package.json | 3 +-- plugins/kubernetes-backend/package.json | 1 - plugins/scaffolder-react/package.json | 1 - yarn.lock | 4 ---- 9 files changed, 16 insertions(+), 20 deletions(-) create mode 100644 .changeset/fifty-lights-marry.md diff --git a/.changeset/fifty-lights-marry.md b/.changeset/fifty-lights-marry.md new file mode 100644 index 0000000000..423ef89721 --- /dev/null +++ b/.changeset/fifty-lights-marry.md @@ -0,0 +1,9 @@ +--- +'@backstage/plugin-catalog-backend-module-incremental-ingestion': patch +'@backstage/plugin-kubernetes-backend': patch +'@backstage/backend-defaults': patch +'@backstage/plugin-scaffolder-react': patch +'@backstage/integration': patch +--- + +Updated luxon types diff --git a/microsite/package.json b/microsite/package.json index 81985a0e91..e911ab5b3f 100644 --- a/microsite/package.json +++ b/microsite/package.json @@ -44,7 +44,6 @@ "devDependencies": { "@docusaurus/module-type-aliases": "^3.1.1", "@docusaurus/tsconfig": "^3.1.1", - "@types/luxon": "^3.0.0", "@types/webpack-env": "^1.18.0", "js-yaml": "^4.1.1", "prettier": "^2.6.2", diff --git a/microsite/yarn.lock b/microsite/yarn.lock index 65a43f1742..f1ce1d8798 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -3328,13 +3328,6 @@ __metadata: languageName: node linkType: hard -"@types/luxon@npm:^3.0.0": - version: 3.7.1 - resolution: "@types/luxon@npm:3.7.1" - checksum: 10/c7bc164c278393ea0be938f986c74b4cddfab9013b1aff4495b016f771ded1d5b7b7b4825b2c7f0b8799edce19c5f531c28ff434ab3dedf994ac2d99a20fd4c4 - languageName: node - linkType: hard - "@types/mdast@npm:^3.0.0": version: 3.0.15 resolution: "@types/mdast@npm:3.0.15" @@ -4282,7 +4275,6 @@ __metadata: "@docusaurus/types": "npm:^3.1.1" "@mdx-js/react": "npm:^3.0.0" "@swc/core": "npm:^1.3.46" - "@types/luxon": "npm:^3.0.0" "@types/webpack-env": "npm:^1.18.0" clsx: "npm:^2.0.0" docusaurus-plugin-openapi-docs: "npm:^4.3.0" diff --git a/packages/backend-defaults/src/entrypoints/scheduler/lib/TaskWorker.ts b/packages/backend-defaults/src/entrypoints/scheduler/lib/TaskWorker.ts index eb040ef415..e47967de90 100644 --- a/packages/backend-defaults/src/entrypoints/scheduler/lib/TaskWorker.ts +++ b/packages/backend-defaults/src/entrypoints/scheduler/lib/TaskWorker.ts @@ -280,8 +280,10 @@ export class TaskWorker { .sendAt() .minus({ seconds: 1 }) // immediately, if "* * * * * *" .toUTC(); + // We make a conversion here to make typescript happy, because the luxon versions of the cron library and here may not be the same + const timeConverted = DateTime.fromJSDate(time.toJSDate()); - nextStartAt = this.nextRunAtRaw(time); + nextStartAt = this.nextRunAtRaw(timeConverted); startAt ||= nextStartAt; } else if (isManual) { nextStartAt = this.knex.raw('null'); @@ -418,8 +420,10 @@ export class TaskWorker { if (isCron) { const time = new CronTime(settings.cadence).sendAt().toUTC(); this.logger.debug(`task: ${this.taskId} will next occur around ${time}`); + // We make a conversion here to make typescript happy, because the luxon versions of the cron library and here may not be the same + const timeConverted = DateTime.fromJSDate(time.toJSDate()); - nextRun = this.nextRunAtRaw(time); + nextRun = this.nextRunAtRaw(timeConverted); } else if (isManual) { nextRun = this.knex.raw('null'); } else { diff --git a/packages/integration/package.json b/packages/integration/package.json index 3294a70dc5..41eeb67e06 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -51,7 +51,6 @@ "devDependencies": { "@backstage/cli": "workspace:^", "@backstage/config-loader": "workspace:^", - "@types/luxon": "^3.0.0", "msw": "^1.0.0" }, "configSchema": "config.d.ts" diff --git a/plugins/catalog-backend-module-incremental-ingestion/package.json b/plugins/catalog-backend-module-incremental-ingestion/package.json index 0838b89866..07559d6d01 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/package.json +++ b/plugins/catalog-backend-module-incremental-ingestion/package.json @@ -67,7 +67,6 @@ "devDependencies": { "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", - "@types/express": "^4.17.6", - "@types/luxon": "^3.0.0" + "@types/express": "^4.17.6" } } diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index e1f1a39456..a4cb8e924a 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -78,7 +78,6 @@ "@backstage/plugin-permission-backend": "workspace:^", "@backstage/plugin-permission-backend-module-allow-all-policy": "workspace:^", "@types/express": "^4.17.6", - "@types/luxon": "^3.0.0", "msw": "^1.0.0", "supertest": "^7.0.0", "ws": "^8.18.0" diff --git a/plugins/scaffolder-react/package.json b/plugins/scaffolder-react/package.json index 15b53c329c..ddd47b982e 100644 --- a/plugins/scaffolder-react/package.json +++ b/plugins/scaffolder-react/package.json @@ -107,7 +107,6 @@ "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.0.0", "@types/humanize-duration": "^3.18.1", - "@types/luxon": "^3.0.0", "@types/react": "^18.0.0", "react": "^18.0.2", "react-dom": "^18.0.2", diff --git a/yarn.lock b/yarn.lock index f58a11626b..d0f2cd6efd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3923,7 +3923,6 @@ __metadata: "@backstage/errors": "workspace:^" "@octokit/auth-app": "npm:^4.0.0" "@octokit/rest": "npm:^19.0.3" - "@types/luxon": "npm:^3.0.0" cross-fetch: "npm:^4.0.0" git-url-parse: "npm:^15.0.0" lodash: "npm:^4.17.21" @@ -4925,7 +4924,6 @@ __metadata: "@backstage/types": "workspace:^" "@opentelemetry/api": "npm:^1.9.0" "@types/express": "npm:^4.17.6" - "@types/luxon": "npm:^3.0.0" express: "npm:^4.22.0" express-promise-router: "npm:^4.1.0" knex: "npm:^3.0.0" @@ -5818,7 +5816,6 @@ __metadata: "@smithy/signature-v4": "npm:^4.1.0" "@types/express": "npm:^4.17.6" "@types/http-proxy-middleware": "npm:^1.0.0" - "@types/luxon": "npm:^3.0.0" express: "npm:^4.22.0" express-promise-router: "npm:^4.1.0" fs-extra: "npm:^11.2.0" @@ -6878,7 +6875,6 @@ __metadata: "@testing-library/user-event": "npm:^14.0.0" "@types/humanize-duration": "npm:^3.18.1" "@types/json-schema": "npm:^7.0.9" - "@types/luxon": "npm:^3.0.0" "@types/react": "npm:^18.0.0" ajv: "npm:^8.0.1" ajv-errors: "npm:^3.0.0"