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

feat: upgrade to typeorm v0.3.0 #139

Merged
merged 10 commits into from
Aug 23, 2022
Merged

feat: upgrade to typeorm v0.3.0 #139

merged 10 commits into from
Aug 23, 2022

Conversation

stelescuraul
Copy link
Owner

@stelescuraul stelescuraul commented Aug 20, 2022

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Update to be able to use typeorm >v0.3.0 and @nestjs/typeorm >v8.1.0.

  • Update package dependencies
  • Use typeorm datasource
  • Don't allow destroy on RLSConnection
  • Mark close as deprecated as it is in the base class
  • Remove custom repositories from RLSModule to comply with nestjs/typeorm upstream
  • Update tests to use new relation structure
  • Add test for relationLoadStrategy: 'query'
  • Add tests for all find operators (findOne, findOneBy, find, findBy)
  • Update test utils to use DataSource

Type of change

Please select the options that are relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change which does not add functionality)

Checklist:

  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

BREAKING CHANGE: must use at least node v14, typeorm v0.3.0 and @nestjs/typeorm v8.1.0

Update to be able to use typeorm >v0.3.0 and @nestjs/typeorm >v8.1.0.

BREAKING CHANGE: must use at least node v14, typeorm v0.3.0 and
@nestjs/typeorm v8.1.0
@stelescuraul stelescuraul marked this pull request as draft August 20, 2022 21:55
jifeon
jifeon previously approved these changes Aug 21, 2022
Copy link

@jifeon jifeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!

If public API of the lib was changed in any way?

test/nestjs/src/post.repository.ts Show resolved Hide resolved
lib/common/RLSConnection.ts Show resolved Hide resolved
@stelescuraul
Copy link
Owner Author

@jifeon The public api of the library will remain the same. I am trying to avoid large refactoring for organizations using this library. Instead I will be making backwards compatible changes (when needed). For now. nothing changes when using it.

@stelescuraul stelescuraul marked this pull request as ready for review August 22, 2022 09:21
@stelescuraul stelescuraul merged commit 23a8bf4 into master Aug 23, 2022
@stelescuraul stelescuraul deleted the feat/typeorm-v0.3 branch August 23, 2022 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants