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(): add support for manual init #1766

Merged

Conversation

Junikorn
Copy link
Contributor

@Junikorn Junikorn commented Sep 1, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

Motivation for no tests:
I searched repository for proper place to add tests for this feature but none seem to be correct (there are only e2e tests with specific convention).
I run e2e suite though and it passes.
I also tested the feature manually on my usecase (on and off).
Please suggest test convention if you want me to write tests for this feature and I will do my best to apply it.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

There is no option to disable DataSource initialization during module initialization

Issue Number: 1762

What is the new behavior?

Option manualInitialization was added to TypeOrmModuleOptions interface.
Module does not initialize database if option is set to true.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I have done one minor refactor to limit logic repetition

@cjam
Copy link

cjam commented Oct 24, 2023

Anything holding this back from getting merged in? I could definitely make use of it.

@kamilmysliwiec kamilmysliwiec merged commit a697437 into nestjs:master Oct 26, 2023
@kamilmysliwiec
Copy link
Member

LGTM

@callumjg
Copy link

Any indication when this change might be published to npm?

@Woodz
Copy link

Woodz commented Apr 17, 2024

Any indication when this change might be published to npm?

Looks like it was release in v10.0.1

@callumjg
Copy link

Any indication when this change might be published to npm?

Looks like it was release in v10.0.1

The same day as my comment! Was maybe a day early 😮‍💨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants