Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream/v0.3.14 #24

Open
wants to merge 310 commits into
base: master
Choose a base branch
from
Open

Upstream/v0.3.14 #24

wants to merge 310 commits into from

Conversation

av
Copy link

@av av commented Apr 12, 2023

This PR brings the fork up to the current v0.3.14 from the upstream overwriting all the custom patches we've added

pleerock and others added 30 commits April 2, 2022 21:40
…ypeorm#8817)

* test: test usage of generics with Repository class

* test: cleanup

* fix: update DeepPartial to work with generic Repository

* fix: restore package-lock.json from typeorm/master
* chore: add missing exports to index.ts 

New functions from 0.3.1 are missing in index.ts file

* style: prettier format

* fix: lint errors
`migrations` option is not accepting direcrories, but glob patterns that
resolve to particular files.
bad indentation break syntax highlighting.
)

* docs: change bold line to h4 title to improve search index

* Update supported-platforms.md
Removed unnecessary import statements from code snippets.
…iver (typeorm#8879)

Adds support for new lock mode `for_key_share` - generating FOR KEY SHARE lock. Postgres specific.

Closes: typeorm#8878
* working on Cloud Spanner driver implementation

* working on DDL synchronization

* working on DDL synchronization

* fixed failing test

* working on VIEW implementation

* fixed query parameters

* lint

* added transaction support;
added streaming support;

* fixed column types

* fixes after merge

* prettier

* added support for generated columns

* added escaping for distinct alias

* working on generated columns

* changed failing test

* updated tests for Spanner;
bugfixes;

* updated tests for Spanner;
bugfixes;

* updated tests for Spanner;
bugfixes;

* fixed failing test

* fixed failing test

* fixing failing tests

* fixing failing tests

* fixing failing tests

* added support for typeorm-generated uuid;
fixed caching;

* fixing failing tests

* fixing failing tests

* fixing failing tests

* fixing failing tests

* fixing failing tests

* fixing failing tests

* debugging failing test

* debugging failing test

* fixed bug in @PrimaryColumn decorator

* fixed failing tests

* fixed VIEW functionality;
fixed failing tests;

* updated docs
Update peerDependency for MSSQL lib which was upgraded devDeps previously
…eorm#8888)

This way the npm module page will also link to the documentation site, instead of displaying 2 links to the same github page
…ers (typeorm#8806)

* added integration with typeorm metadata table for mysql generated columns

* added more tests

* fixed failing tests

* added test case and fix for typeorm#8761

* fixed failing tests

* fixed failing tests

* fixing failing tests

* working on postgres implementation

* added test for postgres;
fixes in postgres generated columns;

* working on "gc" implementation in cockroachdb

* added "gc" implementation for sql server

* added "gc" implementation for oracle

* removed unneeded files

* added "gc" implementation for sqlite;
added additional test cases;

* fixed failing test

* fixed failing test

* minor fix in cockroachdb

* added "gc" implementation for spanner

* minor change
Use `AppDataSource` instead of `dataSource`. Looks like a bug introduced into the `InitCommand` from typeorm@3b8a031
…ypeorm#8900)

* feat: add constraintName to JoinColumn

Add a constraintName to JoinColumn decorators to allow specifying foreignKey name.
Use constraintName when building JoinTable entities as well.

Partially solves: typeorm#1355

* test: add tests for constraintNames on JoinColumn

* docs: add constraintName documentation to JoinColumn and JoinTable

* test: update snapshot in 5444 test

Add constraintName property with correct variable undefined to snapshot in tests for issue 5444.

* prettier

* added support for custom FK name in Sqlite;
added test;

* removed .only

* fixed FK constraint renaming on table/column rename

* minor fix

* fixed @unique and @Index constraints renaming on table/column rename

* working on constraint name support for PK

* replaced `constraintName` with `primaryKeyConstraintName` and `foreignKeyConstraintName`

* fixed failing test

* working on constraint name support for PK

* updated docs

Co-authored-by: Matthijs Hatzmann <[email protected]>
docs: edit mistypes in the Repository API document

- Edited mistypes in the example code in findAndCountBy and findOneBy method.
ifree92 and others added 30 commits April 5, 2023 15:46
Proposed a better safe-type workaround for circular dependencies.
…rm#9846)

* Added a section on debugging query builder

It covers using getQuery() and getQueryAndParameters() which are both useful when trying to figure out why your query isn't doing what you might expect it should do.

* forgot await

* fix typo
* refactor: remove date-fns

Since TypeORM only uses one function from the date-fns library
it is unnecessary to install this large package.

* refactor: add DateUtils.parseDateAsISO

* refactor: reintroduced comment
Bumps [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) to 9.0.0 and updates ancestor dependency [mssql](https://github.com/tediousjs/node-mssql). These dependencies need to be updated together.


Updates `jsonwebtoken` from 8.5.1 to 9.0.0
- [Release notes](https://github.com/auth0/node-jsonwebtoken/releases)
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jsonwebtoken@v8.5.1...v9.0.0)

Updates `mssql` from 7.3.0 to 9.0.1
- [Release notes](https://github.com/tediousjs/node-mssql/releases)
- [Changelog](https://github.com/tediousjs/node-mssql/blob/master/CHANGELOG.txt)
- [Commits](tediousjs/node-mssql@v7.3.0...v9.0.1)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: indirect
- dependency-name: mssql
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: resolve issues for mssql migration when simple-enum was changed

- Changes are now detected
- Incorrect update Statement was split into a DROP CONSTRAINT and ADD CONSTRAINT Statement

Closes: typeorm#7785 typeorm#9457

* fix: resolve issues for mssql migration when simple-enum was changed

- Changes are now detected
- Incorrect update Statement was split into a DROP CONSTRAINT and ADD CONSTRAINT Statement

Closes: typeorm#7785 typeorm#9457

* code refactoring;
changed `enumName` usage to generated name;
improvements in test;

---------

Co-authored-by: ke <[email protected]>
Co-authored-by: Alex Messer <[email protected]>
* fix: resolves issue with mssql column recreation when length max is in lower case

Closes: typeorm#9399

* removed redundant question mark

---------

Co-authored-by: ke <[email protected]>
…ypeorm#9895) (typeorm#9896)

When using an Entity column transformer for an object type, the underlying database column may be
sortable, despite the static TypeScript type being an object. The `FindOptionsOrder` typing
should allow sorting on that object property and not require further nesting.

Fixes issue typeorm#9895.
* Initial commit

* Pending changes exported from your codespace

* Revert changes

* Fix format
… int. (typeorm#9784)

In this case, 50 instead of 50.5. Apparently the ANSI standard for SQL
is silent on this issue, so either behavior should be considered
acceptable.
…il (typeorm#9872)

* fix: EntityNotFound error message in QueryBuilder.findOneOrFail

* change test

* change test

* change test
…is a function calling [Postgres] (typeorm#9830)

Co-authored-by: Dmytro Boiko <[email protected]>
* feat: add support for STI on EntitySchema

Closes: typeorm#9833

* fix: run prettier

---------

Co-authored-by: Umed Khudoiberdiev <[email protected]>
…ypeorm#9775)

* fix: prevent foreign keys support during migration batch under sqlite

Schema changes in migrations batch cannot be done on table which has referring
 foreign keys with ON DELETE CASCADE without deleting its content.

Closes: typeorm#9770

* Update MigrationExecutor.ts

* Update command.ts

---------

Co-authored-by: Umed Khudoiberdiev <[email protected]>
* fix: transform values for FindOperators

Closes: typeorm#9381

* refactor: simplify correction

do not transform value, when it is a FindOperator

Closes: typeorm#9381

* fix: transform value of FindOperator when it is not a FindOperator

Closes: typeorm#9381 typeorm#9816

* fix: perform transformation on the array instead of each value in case of JsonContains

* fix: remove anti pattern, correct functionality for operators without multiple parameter

* fix: correct linting

* fix: resolve issue when parameterValue is not an instanceof FindOperator

---------

Co-authored-by: ke <[email protected]>
…ypeorm#9354)

* feat: leftJoinAndMapOne and innerJoinAndMapOne now map correctly with QueryBuilder

When joining to a query builder instead of an entity or table name, typeorm now
correctly supports mapping the result to an entity. This introduces a new argument
to the join functions to supply the join attributes with a source of meta data
for the mapping

For example:

const loadedPost = await connection.manager
      .createQueryBuilder(Post, "post")
      .innerJoinAndMapOne(
           "post.tag",
           qb => qb.from(Tag, "tag"),
           "tag",
           "tag.id = post.tagId",
           undefined,
           // The next argument is new - it helps typeorm know which entity
           // to use to complete the mapping for a query builder.
           Tag
      )
      .where("post.id = :id", { id: post.id })
      .getOne()

* style: Auto Formatting

* trigger CircleCI

---------

Co-authored-by: Umed Khudoiberdiev <[email protected]>
Co-authored-by: Dmitry Zotov <[email protected]>
…ypeorm#9680)

Adds support to loading entities' relationships with "query" strategy for TreeRepositories
Previously the default method was "join". Implementation is done recursively for n-level
relations

Closes: typeorm#9673
* small optimization in driver utils - shortening alias become a bit faster

* added entity metadatas as a map into DataSource for search optimization purposes

* ultra small optimization - looks like symbols work slow. Need to re-think its usage

* small optimizations to improve performance

* replace property names optimization

* tsc error fix

* big optimization - now replacePropertyNames executed only for the final SQL query

* trying to fix the bug in select query builder with orders not being properly replaced with their aliaces

* fixing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment