refactor: update to node 22

This commit is contained in:
Rainer Killinger
2025-06-30 15:17:51 +02:00
parent ef4e1f8ded
commit c8e290200f
56 changed files with 14214 additions and 13224 deletions

View File

@@ -9,8 +9,8 @@ integration:
- name: registry.gitlab.com/openstapps/openstapps/database:latest
alias: elasticsearch
script:
- pnpm --filter=@openstapps/backend install
- pnpm test:integration:backend
- pnpm install
- pnpm test:integration:backend --force --no-cache
artifacts:
when: on_failure
paths:

View File

@@ -51,7 +51,7 @@
"@types/cors": "2.8.13",
"@types/express": "4.17.17",
"@types/geojson": "1.0.6",
"@types/node": "18.15.3",
"@types/node": "22.15.31",
"@types/node-cron": "3.0.7",
"@types/nodemailer": "6.4.7",
"@types/promise-queue": "2.2.0",
@@ -80,26 +80,26 @@
"@openstapps/prettier-config": "workspace:*",
"@openstapps/tsconfig": "workspace:*",
"@testdeck/mocha": "0.3.3",
"@types/chai": "4.3.5",
"@types/chai-as-promised": "7.1.5",
"@types/mocha": "10.0.1",
"@types/chai": "4.3.20",
"@types/chai-as-promised": "7.1.8",
"@types/mocha": "10.0.10",
"@types/morgan": "1.9.4",
"@types/sinon": "10.0.14",
"@types/sinon-express-mock": "1.3.9",
"@types/supertest": "2.0.12",
"c8": "7.14.0",
"chai": "4.3.7",
"chai-as-promised": "7.1.1",
"c8": "10.1.3",
"chai": "4.5.0",
"chai-as-promised": "7.1.2",
"cross-env": "7.0.3",
"get-port": "5.1.1",
"mocha": "10.2.0",
"mocha": "10.8.2",
"mocha-junit-reporter": "2.2.0",
"mocked-env": "1.3.5",
"sinon": "15.0.4",
"sinon-express-mock": "2.2.1",
"supertest": "6.3.3",
"ts-node": "10.9.2",
"tsup": "6.7.0",
"tsup": "8.5.0",
"typescript": "5.4.2"
},
"tsup": {

View File

@@ -25,7 +25,7 @@ import {expect} from 'chai';
import {bulk, DEFAULT_TEST_TIMEOUT} from '../common.js';
import {testApp} from '../tests-setup.js';
import {v4} from 'uuid';
import bookFile from '@openstapps/core/test/resources/indexable/Book.2.json' assert {type: 'json'};
import bookFile from '@openstapps/core/test/resources/indexable/Book.2.json' with {type: 'json'};
const book = bookFile.instance as SCBook;

View File

@@ -30,7 +30,7 @@ import chaiAsPromised from 'chai-as-promised';
import {DEFAULT_TEST_TIMEOUT} from '../common.js';
import {testApp} from '../tests-setup.js';
import {backendConfig} from '../../src/config.js';
import registerRequest from '@openstapps/core/test/resources/PluginRegisterRequest.1.json' assert {type: 'json'};
import registerRequest from '@openstapps/core/test/resources/PluginRegisterRequest.1.json' with {type: 'json'};
// for using promises in expectations (to.eventually.be...)
use(chaiAsPromised);

View File

@@ -18,7 +18,7 @@ import chaiAsPromised from 'chai-as-promised';
import {bulkStorageMock, DEFAULT_TEST_TIMEOUT} from '../common.js';
import {expect, use} from 'chai';
import {testApp} from '../tests-setup.js';
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' assert {type: 'json'};
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' with {type: 'json'};
use(chaiAsPromised);

View File

@@ -49,8 +49,8 @@ import {
} from '../../../src/storage/elasticsearch/util/index.js';
import cron from 'node-cron';
import {query} from './query.js';
import messageFile from '@openstapps/core/test/resources/indexable/Message.1.json' assert {type: 'json'};
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' assert {type: 'json'};
import messageFile from '@openstapps/core/test/resources/indexable/Message.1.json' with {type: 'json'};
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' with {type: 'json'};
const message = messageFile.instance as SCMessage;
const book = bookFile.instance as SCBook;

View File

@@ -44,7 +44,7 @@
"@openstapps/logger": "workspace:*",
"@types/config": "3.3.0",
"@types/dockerode": "3.3.17",
"@types/node": "18.15.3",
"@types/node": "22.15.31",
"@types/sha1": "1.1.3",
"config": "3.3.9",
"dockerode": "3.3.5",
@@ -58,25 +58,25 @@
"@openstapps/eslint-config": "workspace:*",
"@openstapps/prettier-config": "workspace:*",
"@openstapps/tsconfig": "workspace:*",
"@types/chai": "4.3.5",
"@types/chai": "4.3.20",
"@types/config": "3.3.0",
"@types/dockerode": "3.3.17",
"@types/mocha": "10.0.1",
"@types/mocha": "10.0.10",
"@types/mustache": "4.2.2",
"@types/node": "18.15.3",
"@types/node": "22.15.31",
"@types/proxyquire": "1.3.28",
"@types/semver": "7.5.8",
"@types/sha1": "1.1.3",
"@types/sinon": "10.0.14",
"@types/sinon-chai": "3.2.9",
"c8": "7.14.0",
"chai": "4.3.7",
"mocha": "10.2.0",
"c8": "10.1.3",
"chai": "4.5.0",
"mocha": "10.8.2",
"mocha-junit-reporter": "2.2.0",
"sinon": "15.0.4",
"sinon-chai": "3.7.0",
"ts-node": "10.9.2",
"tsup": "6.7.0"
"tsup": "8.5.0"
},
"tsup": {
"entry": [