1943 Commits

Author SHA1 Message Date
Oleg "OSA413" Sokolov
5d6d893662
test: fix and run tests on Windows (#11257)
* Skip tests that don't work on Windows

* Bring back tests on Windows

* Skip the test on all platforms exept Windows

* Make the test run only on Windows

* Add simple winodws test

* fix cli test on Windows

* let's see if this test passes on linux

* limit test to Windows and run format

* Add withPlatform test helper

* Mock platform in file path tests using withPlatform()

* Fix test: relative paths should not change on non-win32 platforms

* Lowercase relative path on non-win32 platform

* test: add better-sqlite3 and sqlite for Windows tests

---------

Co-authored-by: Simon Garner <simon@equalogic.com>
2025-03-14 16:01:46 +05:00
Lucian Mocanu
ae96f87923
fix: empty objects being hydrated when eager loading relations that have a @VirtualColumn (#10927) 2025-03-14 10:05:19 +01:00
Doug Ayers
ba47b62379
chore(test): set timezone to UTC (#11247)
Fixes #11246

To mitigate timezone discrepancies with timestamps in tests with hard coded assertions, standardize on UTC

Co-authored-by: Mike Guida <mike@mguida.com>
2025-03-12 21:56:33 +05:00
Oleg "OSA413" Sokolov
deb0e81398
test: rename tests to better describe the case (#11280)
Fixes #10863
2025-03-12 21:40:55 +05:00
Dmitrii Tkachenko
72145b859d
fix: remove unnecessary import from JS migration (#11327)
* fix: omit ts import for js migration

* test: javascript template create

* test: remove TS from JS templates

* chore: update docs
2025-03-10 19:46:42 +02:00
Lucian Mocanu
27b4207c48
fix(sap): incorrect handling of simple array/json data type (#11322) 2025-03-06 14:00:33 +01:00
Lucian Mocanu
759cf7cf54 test: issue #11269 2025-03-03 15:35:06 +01:00
Lucian Mocanu
a08ebbdea0 test: improve nested transactions tests 2025-03-03 15:35:05 +01:00
Lucian Mocanu
7aa4f3c3e0 Revert "fix: nested transactions issues (#10210)"
This reverts commit 25e6ecdfd23569b4b6ba15b845b4444927386f42.
2025-03-03 15:35:05 +01:00
Lucian Mocanu
3044e7a233 test: fix cockroach tests 2025-03-03 15:35:05 +01:00
Lucian Mocanu
71addb2ef4
refactor: use node:fs/promises (#11206)
* refactor: use fs promises

* refactor: remove del, update rimraf
2024-12-30 09:33:51 +01:00
Lucian Mocanu
af7ac1c6d8
chore: migrate to ESLint flat config (#11205) 2024-12-29 16:33:46 +01:00
Joel Stimson
19a6954d8b
chore: Lint on GitHub actions (#11177) 2024-12-18 11:44:18 +01:00
Oleg "OSA413" Sokolov
53f253d527
test: redo cockroachdb to service-container GHA and update its version to latest (24) (#11190) 2024-12-16 08:33:00 +01:00
Oleg "OSA413" Sokolov
af603ae5cf
test: Expand node version matrix to node16, node18, and node20 (#11183) 2024-12-14 08:51:17 +01:00
Oleg "OSA413" Sokolov
b535cbd1bf
style: Apply formatting (#11175) 2024-12-11 09:51:02 +01:00
jeisberg
83567f5334
fix: composite key save issue (#10672)
* chore(TypeORM): Create test case to uncover TypeORM composite key save issue

* chore(TypeORM): Revert package.json test script alteration

* fix the issue

* fixed regression in 1551

* fixed test to prevent issues with auto increment when inserting rows in a different order

* fixed test to prevent issues with auto increment when inserting rows in a different order

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2024-02-02 13:41:37 +05:00
Niels Stinissen
d0b76703cc
feat: add postgres multirange column types (#10627)
* feat: add postgres multirange column types

Adds int4-, int8-, num-, ts-, tstz-, date-multirange column types for postgres
Update docs to include multirange column types
Update functional column-types-postgres test to test multirange column types

Closes: #10556

* style: run npm run format

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2024-01-26 11:33:16 +05:00
Shu Nonaka
54d8d9efe9
fix: hangup when load relations with relationLoadStrategy: query (#10630)
* fix: createQueryBuilder to accept queryRunner
* fix: modify to use queryRunner when retrieving relations (#10481)
* test: add testcases
2024-01-26 11:28:19 +05:00
Alexey Pelykh
dd49a254dc
fix: don't escape indexPredicate (#10618)
* fix: don't escape indexPredicate

* style: npm run format
2024-01-26 11:26:12 +05:00
Andrei Nikolaev
99d8249e45
fix: type inferencing of EntityManager#create (#10569)
* fix: type inferencing of EntityManager#create

* test: type inferencing of EntityManager#create (#10569)
2024-01-26 11:17:01 +05:00
Markus Fürer
e22481904a
style: Enable some linter rules (#10592)
* style: 🚨 enable some linter rules

* Revert "style: 🚨 enable some linter rules"

This reverts commit 239fa2deb7aaf22cfac4bbb1369d6d973327efd4.

* revert:  revert role "prefer-const"

* revert:  enable linter warnings

* style: 🚨 enable rule "no-extra-boolean-cast"

* revert:  disable rule "no-empty"

* style: 🚨 add linter rule "no-useless-escape"

* style: 🚨 add linter rule "no-unsafe-optional-chaining"
2024-01-26 11:06:15 +05:00
Maarten Sijmkens
f232ba7808
fix: include asExpression columns in returning clause (#10632)
* fix: include asExpression columns in returning clause

Closes: #8450

* test: add test for issue #8450
2024-01-26 10:41:58 +05:00
Alessio Napolitano
8aa8690f94
fix: resolve issue CREATE/DROP Index concurrently (#10634)
Closes: #10626
2024-01-26 10:38:30 +05:00
ertl
7e85460f10
feat: add json type support for Oracle (#10611)
* refactor: remove oracle docker tests and update DEVELOPER.md

Since oracle runs at thin mode now. Now extra docker tests are needed

* chore: increase oracle version to 21c

* feat: add json column types to oracle

* fix: try to resolve pipeline issue to increase oracle waiting time

* fix: try remove networks from oracle to fix pipeline

* fix: add container name

* fix: add missing oracledb driver in package-lock.json

* fix: corrected tests

* fix: remove tests, since only work with old oracle db

* fix: correct tests

* fix: remove deprecated types

* fix: add missing grant for materialized views

* fix: oracle-isolation.ts test

* fix: issue-3363.ts test

* fix: schema in tests
2024-01-26 10:27:28 +05:00
Kazuki Matsuo
4493db4d1b
feat: add table comment for postgres (#10613) 2024-01-26 10:23:11 +05:00
Kobe Kwanten
15de46fd5d
revert "feat: nullable embedded entities (#10289)" (#10614)
This reverts commit e67d7041387df78c69599c1d3c880389a935ffbf.
2024-01-08 22:20:36 +05:00
Lucian Mocanu
c22e30f1d2
build: set TS compile target to ES2021 (#10595)
* build: set TS compile target to ES2021

* docs: update minimum supported node version

* build: use @tsconfig/node16
2024-01-04 09:57:12 +05:00
sinkhaha
338df16439
feat: add support for table comment in MySQL (#10017)
* feat: add table comment

* feat: resolve conflict

* feat: del auroraMysql comment

* feat: add changeTableComment method for MySQL

* feat: QueryRunner subclass add  changeTableComment Implementation

* oracle implement changeTableComment

* add test

* feat: loadTables support comment

* feat: rename

* feat: update mysql changeTableComment

* fix: fix conflict

* feat: add table comment

* feat: resolve conflict

* feat: del auroraMysql comment

* feat: add changeTableComment method for MySQL

* feat: QueryRunner subclass add  changeTableComment Implementation

* oracle implement changeTableComment

* add test

* feat: loadTables support comment

* feat: rename

* feat: update mysql changeTableComment

---------

Co-authored-by: sinkhaha <1468709606@qq.com>
2024-01-03 13:49:33 +05:00
Dmitry Zotov
15bc8876f8
build: update CircleCI config & repair failing tests (#10590)
* updated CircleCI config

* fixed failing test

* fixed failing test

* fixed failing test

* fixed failing test

* fixed CockroachDB enum sync;
removed redundant await;
fixed failing tests;

* fixing failing tests

* fixing failing tests

* added check for empty commands

* fixed failing tests

* fixed failing tests

* fixed failing test
2024-01-03 13:32:17 +05:00
Deep khurana
a00b1df68f
feat: implement OR operator (#10086)
* feat: implement or operator

This new feature enables typeorm to allow use multiple operators joining with or

Closes: #10054

* feat: implement or operator

Completed code formating using command.

Closes: #10054

* feat: implement or operator

Completed the documentation update.

Closes: #10054

* feat: implement or operator

Renamed Or operator file name.

Closes: #10054

* feat: implement or operator

Renamed Or operator file name.

Closes: #10054

* feat: implement or operator

Renamed Or operator file name.

Closes: #10054

* feat: implement or operator

Renamed Or operator.

Closes: #10054
2024-01-02 15:01:01 +05:00
Andrea Mouraud
173910ed79
fix: should automatically cache if alwaysEnable (#10137)
Closes: #9910
2024-01-02 13:03:22 +05:00
Nicolas ROGER
73ee70b331
fix: correctly keep query.data from ormOption for commit / rollback subscribers (#10151) 2024-01-02 13:01:50 +05:00
Andrea Mouraud
e67d704138
feat: nullable embedded entities (#10289)
* feat: nullable embedded entities

* fix: ignore embedded columns if not selected

* test: update tests with changed behaviour

* test: replace integer with varchar for cockroachdb

* docs: add documentation

* fix: nested embedded entities

* test: update nested embedded entities behaviour
2024-01-02 12:29:41 +05:00
Minh Nguyên
5c28154cbe
feat: BeforeQuery and AfterQuery events (#10234)
* feat: add query events

Co-authored-by: mnguyen081002 <3langn@gmail.com>
Co-authored-by: andrewda <andrew@dassonville.dev>

* fix: functional cache

* test: added test for issue-3302

* refactor: use broadcasterResult.wait()

* test: use sandbox to restoring

* test: fix test from #3302 with cockroachdb

* docs: add beforeQuery and afterQuery documents

---------

Co-authored-by: andrewda <andrew@dassonville.dev>
Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2024-01-02 12:23:25 +05:00
Markus Fürer
b188c1e634
chore: initial setup of ESLint (#10203)
* build: 👷 Initial setup of ESLint

* build: 👷 show erros as warnings

* refactor: ♻️ example of rule "no-var"

* build: 🚨 add rule "no-unsafe-optional-chaining"
2024-01-02 12:04:37 +05:00
Gazy Mahomar
25e6ecdfd2
fix: nested transactions issues (#10210)
* fix: nested transactions issues

* Forgot test description

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2024-01-02 12:03:28 +05:00
Tait Clarridge
3cda7ec39d
feat: add isolated where statements (#10213)
- Add `isolateWhereStatements` to the `BaseDataSourceOptions` object
  and automatically isolate where statements in the query builder
  if it is true
2024-01-02 11:54:43 +05:00
Alessio Napolitano
dc1bfed6d5
fix: resolve issues on upsert (#10588)
* fix: resolve issues on upsert

Closes: #10587

* fix: test 10563 multiple foreach

* run format

* removed only
2024-01-02 11:49:24 +05:00
Clinton Blackburn
bafcd1709b
feat: exposed entity and criteria properties on EntityNotFoundError (#10202)
These properties can be used by consumers to aid in rendering human-readable error messages.
2023-12-29 21:30:06 +05:00
Tolga Paksoy
b53e410e5a
fix: empty objects being hydrated when eager loading relations that have a @VirtualColumn (#10432)
* test: add scenario for #10431

* fix: empty objects being hydrated by unselected virtual properties
2023-12-29 21:18:11 +05:00
kyoungmin kim
d41930f0d6
fix: logMigration has incorrect logging condition (#10323)
* fix: logMigration has correct logging condition

Closes: #10322

* fix: add test description

Closes: #10322
2023-12-29 20:16:40 +05:00
Dinko Osrecki
f6bb6711e2
feat: support mssql@10 (#10356)
* feat: add support for mssql@10

Add mssql@10 to peerDependency, alongside mssql@9.
Update tests to use latest version of mssql and Node v16.

Closes: #10340

* fixed failing test

---------

Co-authored-by: Alex Messer <dmzt08@gmail.com>
2023-12-29 19:46:52 +05:00
Lukas Spiss
fdb9866ad2
fix: update UpdateDateColumn on upsert (#10458)
Closes: #9015
2023-12-29 19:21:57 +05:00
Szymon Bretner
696e688d00
fix: SQLite simple-enum column parsing (#10550) 2023-12-29 19:16:33 +05:00
Joren Vandeweyer
a4900ae15f
fix: extend GiST index with range types for Postgres driver (#10572)
* fix: extend spatial column types for postgres driver

Extend spatial column type with range types for postgres. This fixes a bug when using spatial indices.

Closes: #10567

* format

* remove only from test, ready for pr

* changed a way how we determine index type

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2023-12-29 19:09:30 +05:00
Harry Brundage
72b1d1b865
feat: ability to change default replication mode (#10419)
* Add a replication test suite

* Allow overriding the default destination for read queries when using replication

For many applications that want to use read slaves, data consistency isn't super important, and so all reads can be sent by default to a read slave. For some applications though, it's only select queries that can be sent to read slaves as end-users of the application expect data consistency almost everywhere. This new setting lets apps like those change the default such that query builders need to opt *in* to sending to a read slave, instead of opt out.
2023-12-29 19:06:58 +05:00
Nemanja Stanic
b6b46fb133
feat: add exists and exists by (#10291)
This PR deprecates `exist` in favor of `exists` and `existsBy`.
2023-12-29 16:29:02 +05:00
Fawzi Abdulfattah
6c918ea392
fix: resolve issue queryBuilder makes different parameter identifiers for same parameter (#10327)
Closes: #7308
2023-12-29 16:19:55 +05:00
Marco Ellwanger
af77a5d0ac
fix: default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns (#10563) (#10564) 2023-12-29 15:37:13 +05:00