Skip to content

Commit

Permalink
chore(module): remove deprecated forRoot and forRootAsync methods
Browse files Browse the repository at this point in the history
BREAKING CHANGE: forRoot and forRootAsync methods no longer exist.
Please start using register and registerAsync instead.
  • Loading branch information
willsoto committed Jul 10, 2020
1 parent b95c77f commit 6bba6e1
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions lib/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable new-cap */
import { DynamicModule, Logger, Module, Provider } from "@nestjs/common";
import { DynamicModule, Module, Provider } from "@nestjs/common";
import { Model } from "objection";
import { ObjectionCoreModule } from "./core";
import {
Expand All @@ -9,13 +9,6 @@ import {

@Module({})
export class ObjectionModule {
public static forRoot(options: ObjectionModuleOptions): DynamicModule {
Logger.warn(
"ObjectionModule#forRoot has been deprecated and will be removed in the next major version. Please use ObjectionModule#register instead.",
);
return ObjectionModule.register(options);
}

public static register(options: ObjectionModuleOptions): DynamicModule {
return {
module: ObjectionModule,
Expand All @@ -24,16 +17,6 @@ export class ObjectionModule {
};
}

public static forRootAsync(
options: ObjectionModuleAsyncOptions,
): DynamicModule {
Logger.warn(
"ObjectionModule#forRootAsync has been deprecated and will be removed in the next major version. Please use ObjectionModule#registerAsync instead.",
);

return ObjectionModule.registerAsync(options);
}

public static registerAsync(
options: ObjectionModuleAsyncOptions,
): DynamicModule {
Expand Down

0 comments on commit 6bba6e1

Please sign in to comment.