chore: update dependencies (#11666)

This commit is contained in:
Lucian Mocanu 2025-09-19 18:34:39 +02:00 committed by GitHub
parent 797a8f5e81
commit c16ef63db7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 4103 additions and 6555 deletions

2
.gitignore vendored
View File

@ -27,5 +27,3 @@ node_modules/
ormlogs.log
/test/github-issues/799/tmp/*
# test projects generated by test/github-issues/issue-8975.ts
/*TestProject

1043
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@
"@docusaurus/core": "3.8.1",
"@docusaurus/plugin-client-redirects": "^3.8.1",
"@docusaurus/preset-classic": "3.8.1",
"@mdx-js/react": "^3.1.0",
"@mdx-js/react": "^3.1.1",
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.2",
"clsx": "^2.1.1",
"docusaurus-theme-search-typesense": "^0.25.0",
@ -42,7 +42,7 @@
"@docusaurus/module-type-aliases": "3.8.1",
"@docusaurus/tsconfig": "3.8.1",
"@docusaurus/types": "3.8.1",
"typescript": "~5.8.3"
"typescript": "~5.9.2"
},
"engines": {
"node": ">=18.0"

7793
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -96,24 +96,25 @@
},
"dependencies": {
"@sqltools/formatter": "^1.2.5",
"ansis": "^3.17.0",
"ansis": "^4.1.0",
"app-root-path": "^3.1.0",
"buffer": "^6.0.3",
"dayjs": "^1.11.13",
"debug": "^4.4.0",
"dedent": "^1.6.0",
"dotenv": "^16.4.7",
"dayjs": "^1.11.18",
"debug": "^4.4.3",
"dedent": "^1.7.0",
"dotenv": "^16.6.1",
"glob": "^10.4.5",
"reflect-metadata": "^0.2.2",
"sha.js": "^2.4.12",
"sql-highlight": "^6.0.0",
"sql-highlight": "^6.1.0",
"tslib": "^2.8.1",
"uuid": "^11.1.0",
"yargs": "^17.7.2"
},
"devDependencies": {
"@eslint/js": "^9.29.0",
"@sap/hana-client": "^2.25.22",
"@tsconfig/node16": "^16.1.4",
"@eslint/js": "^9.36.0",
"@sap/hana-client": "^2.26.18",
"@tsconfig/node16": "^16.1.5",
"@types/chai": "^4.3.20",
"@types/chai-as-promised": "^7.1.8",
"@types/debug": "^4.1.12",
@ -123,17 +124,17 @@
"@types/node": "^16.18.126",
"@types/sha.js": "^2.4.4",
"@types/sinon": "^10.0.20",
"@types/sinon-chai": "^4.0.0",
"@types/sinon-chai": "^3.2.12",
"@types/source-map-support": "^0.5.10",
"@types/yargs": "^17.0.33",
"better-sqlite3": "^8.7.0",
"chai": "^4.5.0",
"chai-as-promised": "^7.1.2",
"class-transformer": "^0.5.1",
"eslint": "^9.29.0",
"globals": "^16.2.0",
"eslint": "^9.36.0",
"globals": "^16.4.0",
"gulp": "^4.0.2",
"gulp-rename": "^2.0.0",
"gulp-rename": "^2.1.0",
"gulp-replace": "^1.1.4",
"gulp-shell": "^0.8.0",
"gulp-sourcemaps": "^3.0.0",
@ -141,31 +142,30 @@
"gulpclass": "^0.2.0",
"husky": "^9.1.7",
"lint-staged": "^15.5.2",
"mocha": "^10.8.2",
"mongodb": "^6.15.0",
"mocha": "^11.7.2",
"mongodb": "^6.20.0",
"mssql": "^11.0.1",
"mysql": "^2.18.1",
"mysql2": "^3.14.2",
"mysql2": "^3.15.0",
"nyc": "^17.1.0",
"oracledb": "^6.8.0",
"pg": "^8.14.1",
"pg-query-stream": "^4.8.1",
"pkg-pr-new": "^0.0.43",
"oracledb": "^6.9.0",
"pg": "^8.16.3",
"pg-query-stream": "^4.10.3",
"pkg-pr-new": "^0.0.60",
"prettier": "^2.8.8",
"redis": "^5.7.0",
"reflect-metadata": "^0.2.2",
"redis": "^5.8.2",
"remap-istanbul": "^0.13.0",
"rimraf": "^5.0.10",
"sinon": "^15.2.0",
"sinon": "^16.1.3",
"sinon-chai": "^3.7.0",
"sort-package-json": "^2.15.1",
"source-map-support": "^0.5.21",
"sql.js": "^1.13.0",
"sqlite3": "^5.1.7",
"standard-changelog": "^6.0.0",
"standard-changelog": "^7.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.8.3",
"typescript-eslint": "^8.34.1"
"typescript": "^5.9.2",
"typescript-eslint": "^8.44.0"
},
"peerDependencies": {
"@google-cloud/spanner": "^5.18.0 || ^6.0.0 || ^7.0.0",
@ -180,7 +180,6 @@
"pg-native": "^3.0.0",
"pg-query-stream": "^4.0.0",
"redis": "^3.1.1 || ^4.0.0 || ^5.0.14",
"reflect-metadata": "^0.1.14 || ^0.2.0",
"sql.js": "^1.4.0",
"sqlite3": "^5.0.3",
"ts-node": "^10.7.0",

File diff suppressed because it is too large Load Diff

View File

@ -9,14 +9,13 @@
"typeorm": "typeorm-ts-node-esm -d ./src/ormconfig.ts"
},
"dependencies": {
"reflect-metadata": "^0.2.2",
"sql.js": "^1.13.0",
"ts-node": "^10.9.2",
"typeorm": "*"
},
"devDependencies": {
"@types/node": "^20.19.0",
"@types/node": "^22.18.6",
"@types/sql.js": "^1.4.9",
"typescript": "^5.8.3"
"typescript": "^5.9.2"
}
}

View File

@ -2717,7 +2717,7 @@ export class SqlServerQueryRunner
)
await Promise.all(
allTablesResults.map((tablesResult) => {
allTablesResults.map(async (tablesResult) => {
if (tablesResult["TABLE_NAME"].startsWith("#")) {
// don't try to drop temporary tables
return

View File

@ -68,85 +68,79 @@ describe("column > virtual columns", () => {
after(() => closeTestingConnections(connections))
it("should generate expected sub-select & select statement", () =>
Promise.all(
connections.map((connection) => {
const options1: FindManyOptions<Company> = {
select: {
name: true,
totalEmployeesCount: true,
},
}
connections.map((connection) => {
const options1: FindManyOptions<Company> = {
select: {
name: true,
totalEmployeesCount: true,
},
}
const query1 = connection
.createQueryBuilder(Company, "Company")
.setFindOptions(options1)
.getSql()
const query1 = connection
.createQueryBuilder(Company, "Company")
.setFindOptions(options1)
.getSql()
let expectedQuery = `SELECT "Company"."name" AS "Company_name", (SELECT COUNT("name") FROM "employees" WHERE "companyName" = "Company"."name") AS "Company_totalEmployeesCount" FROM "companies" "Company"`
if (DriverUtils.isMySQLFamily(connection.driver)) {
expectedQuery = expectedQuery.replaceAll('"', "`")
}
expect(query1).to.equal(expectedQuery)
}),
))
let expectedQuery = `SELECT "Company"."name" AS "Company_name", (SELECT COUNT("name") FROM "employees" WHERE "companyName" = "Company"."name") AS "Company_totalEmployeesCount" FROM "companies" "Company"`
if (DriverUtils.isMySQLFamily(connection.driver)) {
expectedQuery = expectedQuery.replaceAll('"', "`")
}
expect(query1).to.equal(expectedQuery)
}))
it("should generate expected sub-select & nested-subselect statement", () =>
Promise.all(
connections.map((connection) => {
const findOptions: FindManyOptions<Company> = {
select: {
name: true,
totalEmployeesCount: true,
employees: {
timesheets: {
totalActivityHours: true,
},
connections.map((connection) => {
const findOptions: FindManyOptions<Company> = {
select: {
name: true,
totalEmployeesCount: true,
employees: {
timesheets: {
totalActivityHours: true,
},
},
relations: {
employees: {
timesheets: true,
},
},
relations: {
employees: {
timesheets: true,
},
}
},
}
const query = connection
.createQueryBuilder(Company, "Company")
.setFindOptions(findOptions)
.getSql()
const query = connection
.createQueryBuilder(Company, "Company")
.setFindOptions(findOptions)
.getSql()
let expectedQuery1 = `SELECT "Company"."name" AS "Company_name"`
let expectedQuery2 = `(SELECT COUNT("name") FROM "employees" WHERE "companyName" = "Company"."name") AS "Company_totalEmployeesCount", (SELECT SUM("hours") FROM "activities" WHERE "timesheetId" =`
if (DriverUtils.isMySQLFamily(connection.driver)) {
expectedQuery1 = expectedQuery1.replaceAll('"', "`")
expectedQuery2 = expectedQuery2.replaceAll('"', "`")
}
expect(query).to.include(expectedQuery1)
expect(query).to.include(expectedQuery2)
}),
))
let expectedQuery1 = `SELECT "Company"."name" AS "Company_name"`
let expectedQuery2 = `(SELECT COUNT("name") FROM "employees" WHERE "companyName" = "Company"."name") AS "Company_totalEmployeesCount", (SELECT SUM("hours") FROM "activities" WHERE "timesheetId" =`
if (DriverUtils.isMySQLFamily(connection.driver)) {
expectedQuery1 = expectedQuery1.replaceAll('"', "`")
expectedQuery2 = expectedQuery2.replaceAll('"', "`")
}
expect(query).to.include(expectedQuery1)
expect(query).to.include(expectedQuery2)
}))
it("should not generate sub-select if column is not selected", () =>
Promise.all(
connections.map((connection) => {
const options: FindManyOptions<Company> = {
select: {
name: true,
totalEmployeesCount: false,
},
}
const query = connection
.createQueryBuilder(Company, "Company")
.setFindOptions(options)
.getSql()
connections.map((connection) => {
const options: FindManyOptions<Company> = {
select: {
name: true,
totalEmployeesCount: false,
},
}
const query = connection
.createQueryBuilder(Company, "Company")
.setFindOptions(options)
.getSql()
let expectedQuery = `SELECT "Company"."name" AS "Company_name" FROM "companies" "Company"`
if (DriverUtils.isMySQLFamily(connection.driver)) {
expectedQuery = expectedQuery.replaceAll('"', "`")
}
expect(query).to.equal(expectedQuery)
}),
))
let expectedQuery = `SELECT "Company"."name" AS "Company_name" FROM "companies" "Company"`
if (DriverUtils.isMySQLFamily(connection.driver)) {
expectedQuery = expectedQuery.replaceAll('"', "`")
}
expect(query).to.equal(expectedQuery)
}))
it("should be able to save and find sub-select data in the database", () =>
Promise.all(

View File

@ -1,3 +1,4 @@
import { expect } from "chai"
import { DataSource } from "../../../../src"
import {
createTestingConnections,
@ -18,58 +19,46 @@ describe("escape sqlite query parameters", () => {
after(() => closeTestingConnections(connections))
it("should transform boolean parameters with value `true` into `1`", () =>
Promise.all(
connections.map((connection) => {
const [_, parameters] =
connection.driver.escapeQueryWithParameters(
"SELECT nothing FROM irrelevant WHERE a = :param1",
{ param1: true },
{},
)
connections.map((connection) => {
const [_, parameters] = connection.driver.escapeQueryWithParameters(
"SELECT nothing FROM irrelevant WHERE a = :param1",
{ param1: true },
{},
)
parameters.should.eql([1])
}),
))
expect(parameters).to.deep.equal([1])
}))
it("should transform boolean parameters with value `false` into `0`", () =>
Promise.all(
connections.map((connection) => {
const [_, parameters] =
connection.driver.escapeQueryWithParameters(
"SELECT nothing FROM irrelevant WHERE a = :param1",
{ param1: false },
{},
)
connections.map((connection) => {
const [_, parameters] = connection.driver.escapeQueryWithParameters(
"SELECT nothing FROM irrelevant WHERE a = :param1",
{ param1: false },
{},
)
parameters.should.eql([0])
}),
))
expect(parameters).to.deep.equal([0])
}))
it("should transform boolean nativeParameters with value `true` into `1`", () =>
Promise.all(
connections.map((connection) => {
const [_, parameters] =
connection.driver.escapeQueryWithParameters(
"SELECT nothing FROM irrelevant",
{},
{ nativeParam1: true },
)
connections.map((connection) => {
const [_, parameters] = connection.driver.escapeQueryWithParameters(
"SELECT nothing FROM irrelevant",
{},
{ nativeParam1: true },
)
parameters.should.eql([1])
}),
))
expect(parameters).to.deep.equal([1])
}))
it("should transform boolean nativeParameters with value `false` into 0", () =>
Promise.all(
connections.map((connection) => {
const [_, parameters] =
connection.driver.escapeQueryWithParameters(
"SELECT nothing FROM irrelevant",
{},
{ nativeParam1: false },
)
connections.map((connection) => {
const [_, parameters] = connection.driver.escapeQueryWithParameters(
"SELECT nothing FROM irrelevant",
{},
{ nativeParam1: false },
)
parameters.should.eql([0])
}),
))
expect(parameters).to.deep.equal([0])
}))
})

View File

@ -14,14 +14,12 @@ describe("github issues > #9189 check invalid constraint options", () => {
it("should throw an exception, when invalid option is configured", async () => {
let err
try {
await Promise.all(
(dataSources = await createTestingConnections({
entities: [__dirname + "/entity/*{.js,.ts}"],
schemaCreate: false,
dropSchema: true,
enabledDrivers: ["oracle"],
})),
)
dataSources = await createTestingConnections({
entities: [__dirname + "/entity/*{.js,.ts}"],
schemaCreate: false,
dropSchema: true,
enabledDrivers: ["oracle"],
})
} catch (e) {
err = e
}

View File

@ -484,23 +484,26 @@ export async function createTestingConnections(
/**
* Closes testing connections if they are connected.
*/
export function closeTestingConnections(connections: DataSource[]) {
if (!connections || connections.length === 0) return Promise.resolve()
return Promise.all(
connections.map((connection) =>
connection && connection.isInitialized
? connection.destroy()
: undefined,
),
export async function closeTestingConnections(connections: DataSource[]) {
if (!connections || connections.length === 0) {
return
}
await Promise.all(
connections.map(async (connection) => {
if (connection?.isInitialized) {
await connection.destroy()
}
}),
)
}
/**
* Reloads all databases for all given connections.
*/
export function reloadTestingDatabases(connections: DataSource[]) {
export async function reloadTestingDatabases(connections: DataSource[]) {
GeneratedColumnReplacerSubscriber.globalIncrementValues = {}
return Promise.all(
await Promise.all(
connections.map((connection) => connection.synchronize(true)),
)
}