5602 Commits

Author SHA1 Message Date
Naor Peled
1f19abb62c
initial commit (#11711) 2025-10-03 13:33:43 +03:00
Piotr Kuczynski
74522ffc82
chore(lint/jsdoc): enable jsdoc/valid-types rule and fix offenses (#11706) 2025-10-03 13:51:30 +07:00
Piotr Kuczynski
b9309098bc
feat(cli/init): pick dependencies versions from our own package.json (#11705) 2025-10-03 13:51:06 +07:00
Piotr Kuczynski
dbfaad9e7c
ci: bump actions/setup-node to v5 and benefit from automatic caching (#11709) 2025-10-03 13:50:13 +07:00
Piotr Kuczynski
77fb94d419
docs: updated jsdoc link to PostgreSQL documentation for data types (#11680)
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>
2025-10-03 13:49:45 +07:00
Piotr Kuczynski
336fef8f14
docs: remove unused docs example file (#11675)
Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>
2025-10-03 08:48:55 +02:00
Giorgio Boa
2446bd0d87
ci: remove close stale issues GH action (#11696) 2025-10-01 12:52:25 +02:00
chen
925dee002b
feat: entity schema support trees (#11606) 2025-09-29 10:36:35 +02:00
Piotr Kuczynski
4f05718237
feat: add support for jsonpath column type in PostgreSQL (#11684) 2025-09-26 18:56:53 +02:00
Piotr Kuczynski
e0e7de14ca
ci: introduce jsdoc eslint plugin (warnings only) (#11681)
* ci: introduce jsdoc eslint plugin (warnings only)

* fixed

* fixed
2025-09-26 18:11:29 +02:00
Isara Rungvitayakul
83e3a8a3db
fix: add multiSubnetFailover option for mssql (#10804) 2025-09-25 11:18:15 +12:00
Lucian Mocanu
d4f7b44fdf
chore: fix package preview (#11542) 2025-09-20 09:34:22 +02:00
Lucian Mocanu
c16ef63db7
chore: update dependencies (#11666) 2025-09-19 18:34:39 +02:00
dependabot[bot]
797a8f5e81
build(deps): bump brace-expansion in /sample/playground (#11522)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 2.0.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-19 15:13:54 +02:00
Michael Bromley
9ea8577f42
chore: Release v0.3.27 (#11661) 0.3.27 2025-09-19 11:45:01 +02:00
Michael Bromley
34d87149ec
Revert "fix: do not create junction table metadata when it already exists (#11114)" (#11660)
This reverts commit 3c26cf18a77b5b0cd7c15c811fc3d0a43af32e47.
2025-09-19 11:03:18 +02:00
David Höck
974ead202d
fix: JSON parsing for mysql2 client library (#8319) (#11659) 2025-09-19 10:34:17 +02:00
Naor Peled
a49f612289
feat(postgres): support vector/halfvec data types (#11437) 2025-09-18 22:12:07 +03:00
Naor Peled
96ea431eb7
feat: add new undefined and null behavior flags (#11332)
- added configurable handling for null/undefined in where clauses (ignore, SQL NULL, or throw) across queries, query builders, and repository/entity-manager methods
2025-09-18 08:41:16 +03:00
Giorgio Boa
93aa5c4b74
ci: add close stale issues GH action (#11651) 2025-09-17 15:25:18 +02:00
Lucian Mocanu
8b76e1af74
feat(mysql): add support for MySQL 9 / MariaDB 12 (#11575) 2025-09-17 09:08:31 +02:00
Simon Garner
3fac86b60e
fix: update tests to reflect migration template changes (#11653) 2025-09-17 08:37:12 +02:00
Victor Shymko
fa3cd436a2
feat(migration): improve JSDoc types in generated migration templates (#11490)
* Feat: add JSDoc typing for queryRunner parameter

* Feat: add JSDoc typing for queryRunner parameter
2025-09-17 09:27:03 +12:00
dependabot[bot]
6e92aad5d0
build(deps): bump axios from 1.11.0 to 1.12.1 in /docs (#11649)
Bumps [axios](https://github.com/axios/axios) from 1.11.0 to 1.12.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.11.0...v1.12.1)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-13 21:09:08 +02:00
Madhu Balakrishna
f3c8d2fd60
docs: fix docs for UpdateDateColumn (#11572) 2025-09-12 08:36:14 +02:00
Prateek Hegde
9cdfb20b12
chore: bump sha.js from 2.4.11 to 2.4.12 (fix security issue: CVE-2025-9288) (#11639)
* chore: bump sha.js from 2.4.11 to 2.4.12 (fix security issue: CVE-2025-9288)

* test: add unit tests for hash() to ensure sha.js upgrade compatibility

- Verify SHA1 output for known inputs
- Test truncation with options.length
- Handle empty string input
- Confirm deterministic behavior for identical inputs

* removed .only from test/unit/util/string-utils.ts to run all the unit tests

* fix(hash): ensure negative or zero options.length returns full hash

- Updated hash() to only truncate when options.length > 0
- Prevents accidental truncation when options.length is negative
- Maintains expected behavior for full-length hash

* added strict +ve number input validation for hash()

* simplified the logic to check number len before applying slice() in StringUtils.ts->hash()

---------

Co-authored-by: Prateek Hegde <prateek.hegde@deliverysolutions.co>
Co-authored-by: Prateek Hegde <prateek@Prateeks-MacBook-Pro.local>
2025-09-10 09:19:54 +12:00
jeremyteyssedre
1f904675f4
fix(query-builder): handle empty result set when offset exceeds total (#11634)
* fix(query-builder): handle empty result set when offset exceeds total

* fix: lazy count can still be trusted when the result set is empty
2025-09-06 10:36:38 +12:00
Mackenzie Salisbury
6965fa2082
fix: Add package.json exports for react-native (#11623) 2025-08-30 16:04:25 +12:00
Copilot
6930dab301
docs: add llms.txt to documentation site (#11622)
* Initial plan

* Add docusaurus-plugin-generate-llms-txt to TypeORM docs

Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>

* Replace docusaurus-plugin-generate-llms-txt with SignalWire package

Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
2025-08-29 14:32:56 +03:00
dependabot[bot]
39ab7cce97
build(deps): bump sha.js from 2.4.11 to 2.4.12 in /sample/playground (#11617)
Bumps [sha.js](https://github.com/crypto-browserify/sha.js) from 2.4.11 to 2.4.12.
- [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/sha.js/compare/v2.4.11...v2.4.12)

---
updated-dependencies:
- dependency-name: sha.js
  dependency-version: 2.4.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-29 14:31:36 +03:00
Lucian Mocanu
22b26d1153
feat: allow VirtualColumns to be initially non-selectable (#11586) 2025-08-18 21:28:55 +03:00
Bartłomiej Rutkowski
b6ffd462dd
perf: Cache package.json location between getNearestPackageJson invocations (#11580)
* perf: Cache package.json location between invocation

Cache package.json location to improve performance of migrations with a lot of files

Closes: #4136

* refactor: Use map. Move tests to appropriate files

Move tests and use Map instead of object as per review comments

* test: Check number of invocations in test

Change test to assert number of stat and readFile calls

* test: Change assert for CI

Added assertion to make both local and CI work

* Create package.json in test

* Create file only if not existed before

* test: Fix test assertion based on platform

* test: Change package.json type

* ci: Trigger tests

---------

Co-authored-by: Bartlomiej Rutkowski <brutkowski@tilt.app>
2025-08-18 21:16:55 +03:00
Michael Bromley
4d204adf56
chore: Release v0.3.26 (#11602) 0.3.26 2025-08-18 17:32:25 +01:00
chen
d1e3950907
feat: support virtual columns in entity schema (#11597)
* feat: add entity mode virtual-property

* test: virtual columns
2025-08-16 18:06:00 +03:00
Stevan
16983132d3
docs: fix reload option typo (#11601) 2025-08-16 15:39:56 +02:00
chen
0b767e833d
docs: added @piying/orm extension to readme (#11596)
* docs: added "piying-orm" extension to readme

* docs: added "piying-orm" extension to readme
2025-08-16 12:18:29 +03:00
白墨
ec26eae824
fix(platform[web worker]): improve globalThis variable retrieval for browser environment (#11495) 2025-08-14 23:12:20 +03:00
Arseny Yankovsky
6e9f20d4d9
fix: regtype is not supported in aurora serverless v2 (#11568) 2025-08-05 09:31:39 +02:00
Park Jin Woong
17cf837ba9
feat(11528): add Redis 5.x support with backward compatibility wite peer dependency to allow (#11585)
* feat: add Redis 5 support to cache implementation

- Add version detection for Redis client to handle API differences
- Support Redis 5 Promise-based API while maintaining backward compatibility
- Update methods to use appropriate API based on Redis version
- Add tests for Redis 5 compatibility

Redis 5 introduced Promise-based API as default, replacing the callback-based
API. This change detects the Redis version and uses the appropriate API calls
to ensure compatibility with Redis 3, 4, and 5.

Closes #11528

* feat: add Redis 5 support to cache implementation

Implement automatic version detection for Redis client libraries to support
Redis 3, 4, and 5 seamlessly. The implementation uses runtime API testing
to determine the appropriate Redis client behavior without breaking existing
functionality.

Changes include:
  - Dynamic Redis version detection based on client API characteristics
  - Promise-based API support for Redis 5.x
  - Backward compatibility with Redis 3.x and 4.x callback-based APIs
  - Safe fallback mechanism defaulting to Redis 3 behavior
  - Updated peer dependency to include Redis 5.x versions

The cache implementation now automatically adapts to the installed Redis version, ensuring optimal performance and compatibility across all supported Redis client versions while maintaining full backward compatibility.

* fix: delete wrong migration guide

* feat: add package-lock.json

* refactor: optimize Redis client creation to reduce memory usage
Eliminate unnecessary Redis client recreation by using explicit tempClient
variable management, reducing potential client instances while maintaining
full Redis 3/4/5 compatibility and accurate version detection.

* refactor: improve Redis version detection to avoid cache pollution
Replace test key creation method with client method signature analysis
to prevent potential cache pollution and improve performance.

* style: apply Prettier formatting to RedisQueryResultCache.ts
2025-08-01 17:30:41 +02:00
Lucian Mocanu
8097d1ab84
docs: fix redirect to mongodb page (#11584) 2025-07-29 17:09:43 +02:00
Lucian Mocanu
23fcde24ee
docs: separate driver-specific documentation (#11581) 2025-07-28 10:28:51 +02:00
Lucian Mocanu
d57fe3bd85
fix(mysql): set stringifyObjects implicitly (#11574) 2025-07-20 23:28:03 +02:00
Vampire
f351757a15
fix: resolve array modification bug in QueryRunner drop methods (#11564)
* fix: resolve array modification bug in QueryRunner drop methods

Fix iteration bug in QueryRunner implementations where dropping multiple
database objects (columns, indices, foreign keys, unique constraints) would
skip elements due to in-place array modification during iteration.

The issue occurred when methods like dropColumns(), dropIndices(),
dropForeignKeys(), and dropUniqueConstraints() iterated over arrays while
simultaneously modifying them by removing elements. This caused a classic
"off-by-one" iteration bug where alternate elements would be skipped.

Changes:
- Update all affected QueryRunner drop methods to iterate over a shallow
  copy of the input array using [...array] spread syntax
- Add comprehensive regression tests in test/github-issues/11563/
- Test coverage includes all affected drivers: Postgres, MySQL, SQL Server,
  Oracle, CockroachDB, Spanner, SAP, and Aurora MySQL

Affected drivers:
- SpannerQueryRunner
- PostgresQueryRunner
- MysqlQueryRunner
- SqlServerQueryRunner
- OracleQueryRunner
- CockroachQueryRunner
- SapQueryRunner
- AuroraMysqlQueryRunner

Closes #11563

* fix: create multiple indices same column

* chore: functional tests instead of github issues
2025-07-09 08:23:47 +02:00
Rhydian
1737e97d1a
fix(mysql): support Alibaba AnalyticDB returning version() column name in getVersion() (#11555) 2025-07-08 21:45:21 +02:00
Ragy Hosny
3c26cf18a7
fix: do not create junction table metadata when it already exists (#11114)
* fix: do not include already user defined junction tables in entityMetaData
2025-07-08 22:15:35 +12:00
Abdul Aziz Al Basyir
a4c9dd8943
chore: change test badge from test.yml to commit-validation.yml (#11560) 2025-07-06 12:54:54 +02:00
Antti
66ee307784
fix: preserve useIndex when cloning a QueryExpressionMap (or a QueryBuilder) (#10679)
* fix: preserve useIndex when cloning a QueryExpressionMap

Closes #10678

* test: add test related to issue #10678
2025-07-04 23:16:50 +02:00
Mohamed Akram
1ea3a5eb06
fix: support for better-sqlite3 v12 (#11557) 2025-07-03 20:35:13 +02:00
Lucian Mocanu
aebc7ebc67
feat(sap): use the native driver for connection pooling (#11520)
* feat(sap): use the native driver for connection pooling

* Add pool error handler
2025-07-01 23:43:12 +02:00
Emmanuel Quincerot
5904ac3db2
perf: avoid unnecessary count on getManyAndCount (#11524)
* perf: avoid unnecessary count on getManyAndCount

Skip count query when it can be deduced from the
number of returned rows. This will avoid one round
trip and could be very helpful on pagination when the
limit is not reached.
2025-06-24 09:08:51 +12:00