refactor: upgrade project to Typescript 5.9

This commit is contained in:
Rainer Killinger
2026-10-01 10:53:00 +02:00
parent 982c0cc57c
commit 444557b725
22 changed files with 158 additions and 256 deletions
+1 -1
View File
@@ -69,7 +69,7 @@
"nock": "13.3.1",
"ts-node": "10.9.2",
"tsup": "8.5.0",
"typescript": "5.5.4"
"typescript": "5.9.3"
},
"tsup": {
"entry": [
+4 -4
View File
@@ -19,7 +19,7 @@ import {URL} from 'url';
import waitOn from 'wait-on';
import {HttpClient} from '@openstapps/api';
import {copy} from './copy.js';
import {version} from '../package.json';
import packageInfo from '../package.json' with {type: 'json'};
// eslint-disable-next-line unicorn/prevent-abbreviations
import {e2eRun} from './e2e.js';
@@ -37,7 +37,7 @@ const helpAndExit = (help: string) => {
commander
.command('e2e <to>')
.version(version)
.version(packageInfo.version)
.description(
'Run in end to end test mode. Indexing and afterwards retrieving all test files from @openstapp/core to the backend',
)
@@ -81,14 +81,14 @@ commander
commander
.command('copy <type> <from> <to> <batchSize>')
.version(version)
.version(packageInfo.version)
.description('Copy data from one instance to another')
.option(
'-s, --bulkSource <bulkSource>',
'The source identifier for the bulk to use with the target instance [copy]',
'copy',
)
.option('-a, --appVersion <version>', 'The App version to use [unset by default]', version)
.option('-a, --appVersion <version>', 'The App version to use [unset by default]', packageInfo.version)
.allowUnknownOption(false)
.action(async (type, from, to, batchSize, copyCommand) => {
// validate type
+1 -1
View File
@@ -64,7 +64,7 @@
"ts-node": "10.9.2",
"tsup": "8.5.0",
"typedoc": "0.25.12",
"typescript": "5.5.4"
"typescript": "5.9.3"
},
"peerDependencies": {
"@openstapps/core": "workspace:*"
+1 -1
View File
@@ -57,7 +57,7 @@
"ts-node": "10.9.2",
"tsup": "8.5.0",
"typedoc": "0.25.12",
"typescript": "5.5.4",
"typescript": "5.9.3",
"undici": "6.21.3"
},
"peerDependencies": {
+1 -1
View File
@@ -32,7 +32,7 @@
"ts-node": "10.9.2",
"tsup": "8.5.0",
"typedoc": "0.25.12",
"typescript": "5.5.4"
"typescript": "5.9.3"
},
"tsup": {
"entry": [
+1 -1
View File
@@ -85,7 +85,7 @@
"ts-node": "10.9.2",
"tsup": "8.5.0",
"typedoc": "0.25.12",
"typescript": "5.5.4"
"typescript": "5.9.3"
},
"tsup": {
"entry": [
+1 -1
View File
@@ -73,7 +73,7 @@
"ts-node": "10.9.2",
"tsup": "8.5.0",
"typedoc": "0.25.12",
"typescript": "5.5.4"
"typescript": "5.9.3"
},
"prettier": "@openstapps/prettier-config",
"eslintConfig": {
+1 -1
View File
@@ -368,7 +368,7 @@ class LRUCache<T> {
public put(key: string, content: T) {
if (this.entries.size >= this.maxEntries) {
// LRU behavior
const keyToDelete = this.entries.keys().next().value;
const keyToDelete = this.entries.keys().next().value as string;
this.entries.delete(keyToDelete);
}
this.entries.set(key, content);
+1 -1
View File
@@ -26,7 +26,7 @@
"@openstapps/collection-utils": "workspace:*",
"@openstapps/logger": "workspace:*",
"glob": "10.5.0",
"typescript": "5.5.4"
"typescript": "5.9.3"
},
"devDependencies": {
"@openstapps/eslint-config": "workspace:*",
+1 -1
View File
@@ -41,7 +41,7 @@
"ts-node": "10.9.2",
"tsup": "8.5.0",
"typedoc": "0.25.12",
"typescript": "5.5.4"
"typescript": "5.9.3"
},
"tsup": {
"entry": [
+3 -3
View File
@@ -28,10 +28,10 @@
"test": "c8 mocha"
},
"dependencies": {
"@types/nodemailer": "6.4.7",
"@types/nodemailer": "8.0.2",
"chalk": "5.2.0",
"flatted": "3.2.7",
"nodemailer": "6.9.9"
"nodemailer": "8.0.11"
},
"devDependencies": {
"@openstapps/eslint-config": "workspace:*",
@@ -51,7 +51,7 @@
"ts-node": "10.9.2",
"tsup": "8.5.0",
"typedoc": "0.25.12",
"typescript": "5.5.4"
"typescript": "5.9.3"
},
"tsup": {
"entry": [
+2 -2
View File
@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import * as nodemailer from 'nodemailer';
import {MailOptions} from 'nodemailer/lib/sendmail-transport';
import {SendMailOptions} from 'nodemailer';
import {deleteUndefinedProperties, isProductiveEnvironment, RecursivePartial} from './common.js';
import {VerifiableTransport} from './transport.js';
@@ -310,7 +310,7 @@ export class SMTP extends VerifiableTransport {
* Sends a mail object
* @param mail Mail to send
*/
public async sendMail(mail: MailOptions): Promise<string> {
public async sendMail(mail: SendMailOptions): Promise<string> {
// info is the response of the smtp server
let info = await this.transportAgent.sendMail(mail);