Skip to content

Commit

Permalink
feat: use @loopback/booter as the peer dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Raymond Feng <[email protected]>
  • Loading branch information
raymondfeng committed Oct 13, 2020
1 parent 3d4c77a commit fc5beeb
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 29 deletions.
3 changes: 2 additions & 1 deletion extensions/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
"type-graphql": "^1.1.0"
},
"peerDependencies": {
"@loopback/boot": "^3.0.2",
"@loopback/booter": "^1.0.0",
"@loopback/core": "^2.11.0"
},
"devDependencies": {
"@loopback/booter": "^1.0.0",
"@loopback/boot": "^3.0.2",
"@loopback/build": "^6.2.5",
"@loopback/core": "^2.11.0",
Expand Down
6 changes: 3 additions & 3 deletions extensions/graphql/src/booters/resolver.booter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import {
ArtifactOptions,
BaseArtifactBooter,
BootBindings,
booter,
} from '@loopback/boot';
BooterBindings,
} from '@loopback/booter';
import {
Application,
config,
Expand Down Expand Up @@ -41,7 +41,7 @@ export class GraphQLResolverBooter extends BaseArtifactBooter {
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: Application,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@inject(BooterBindings.PROJECT_ROOT) projectRoot: string,
@config()
public interceptorConfig: ArtifactOptions = {},
) {
Expand Down
3 changes: 3 additions & 0 deletions extensions/graphql/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{
"path": "../../packages/boot/tsconfig.json"
},
{
"path": "../../packages/booter/tsconfig.json"
},
{
"path": "../../packages/core/tsconfig.json"
},
Expand Down
3 changes: 2 additions & 1 deletion extensions/typeorm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"access": "public"
},
"peerDependencies": {
"@loopback/boot": "^3.0.2",
"@loopback/booter": "^1.0.0",
"@loopback/core": "^2.11.0",
"@loopback/rest": "^8.0.0"
},
Expand All @@ -31,6 +31,7 @@
"typeorm": "^0.2.28"
},
"devDependencies": {
"@loopback/booter": "^1.0.0",
"@loopback/boot": "^3.0.2",
"@loopback/build": "^6.2.5",
"@loopback/core": "^2.11.0",
Expand Down
6 changes: 3 additions & 3 deletions extensions/typeorm/src/typeorm-connection.booter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import {
ArtifactOptions,
BaseArtifactBooter,
BootBindings,
booter,
} from '@loopback/boot';
BooterBindings,
} from '@loopback/booter';
import {config, CoreBindings, inject} from '@loopback/core';
import debugFactory from 'debug';
import {ApplicationUsingTypeOrm, ConnectionOptions} from './';
Expand All @@ -28,7 +28,7 @@ export class TypeOrmConnectionBooter extends BaseArtifactBooter {
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: ApplicationUsingTypeOrm,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@inject(BooterBindings.PROJECT_ROOT) projectRoot: string,
@config()
public entityConfig: ArtifactOptions = {},
) {
Expand Down
3 changes: 3 additions & 0 deletions extensions/typeorm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{
"path": "../../packages/boot/tsconfig.json"
},
{
"path": "../../packages/booter/tsconfig.json"
},
{
"path": "../../packages/core/tsconfig.json"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/booter-lb3app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"access": "public"
},
"peerDependencies": {
"@loopback/boot": "^3.0.2",
"@loopback/booter": "^1.0.0",
"@loopback/core": "^2.11.0",
"@loopback/rest": "^8.0.0"
},
Expand All @@ -34,6 +34,7 @@
"tslib": "^2.0.3"
},
"devDependencies": {
"@loopback/booter": "^1.0.0",
"@loopback/boot": "^3.0.2",
"@loopback/build": "^6.2.5",
"@loopback/core": "^2.11.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/booter-lb3app/src/lb3app.booter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {BootBindings, Booter} from '@loopback/boot';
import {Booter, BooterBindings} from '@loopback/booter';
import {CoreBindings, inject} from '@loopback/core';
import {
ExpressRequestHandler,
Expand Down Expand Up @@ -35,9 +35,9 @@ export class Lb3AppBooter implements Booter {
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: RestApplication,
@inject(BootBindings.PROJECT_ROOT)
@inject(BooterBindings.PROJECT_ROOT)
public projectRoot: string,
@inject(`${BootBindings.BOOT_OPTIONS}#lb3app`)
@inject(`${BooterBindings.BOOT_OPTIONS}#lb3app`)
options: Partial<Lb3AppBooterOptions> = {},
) {
this.options = Object.assign({}, DefaultOptions, options);
Expand Down
3 changes: 3 additions & 0 deletions packages/booter-lb3app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{
"path": "../boot/tsconfig.json"
},
{
"path": "../booter/tsconfig.json"
},
{
"path": "../core/tsconfig.json"
},
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"source-map-support": "^0.5.19",
"typescript": "~4.0.3",
"@loopback/authentication": "^7.0.2",
"@loopback/booter": "^1.0.0",
"@loopback/boot": "^3.0.2",
"@loopback/build": "^6.2.5",
"@loopback/cli": "^2.16.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/model-api-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"access": "public"
},
"peerDependencies": {
"@loopback/boot": "^3.0.2",
"@loopback/booter": "^1.0.0",
"@loopback/core": "^2.11.0",
"@loopback/repository": "^3.1.0"
},
Expand All @@ -30,6 +30,7 @@
},
"devDependencies": {
"@loopback/build": "^6.2.5",
"@loopback/booter": "^1.0.0",
"@loopback/boot": "^3.0.2",
"@loopback/core": "^2.11.0",
"@loopback/repository": "^3.1.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/model-api-builder/src/booters/model-api.booter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import {
ArtifactOptions,
BaseArtifactBooter,
BootBindings,
booter,
} from '@loopback/boot';
BooterBindings,
} from '@loopback/booter';
import {
config,
CoreBindings,
Expand All @@ -31,7 +31,7 @@ export class ModelApiBooter extends BaseArtifactBooter {
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: ApplicationWithRepositories,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@inject(BooterBindings.PROJECT_ROOT) projectRoot: string,
@extensions()
public getModelApiBuilders: Getter<ModelApiBuilder[]>,
@config()
Expand Down
3 changes: 3 additions & 0 deletions packages/model-api-builder/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{
"path": "../boot/tsconfig.json"
},
{
"path": "../booter/tsconfig.json"
},
{
"path": "../core/tsconfig.json"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/repository/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
"access": "public"
},
"peerDependencies": {
"@loopback/boot": "^3.0.2",
"@loopback/booter": "^1.0.0",
"@loopback/core": "^2.11.0"
},
"devDependencies": {
"@loopback/build": "^6.2.5",
"@loopback/booter": "^1.0.0",
"@loopback/boot": "^3.0.2",
"@loopback/core": "^2.11.0",
"@loopback/eslint-config": "^10.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/repository/src/booters/datasource.booter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import {
ArtifactOptions,
BaseArtifactBooter,
BootBindings,
booter,
} from '@loopback/boot';
BooterBindings,
} from '@loopback/booter';
import {config, CoreBindings, inject} from '@loopback/core';
import {Class} from '../common-types';
import {ApplicationWithRepositories} from '../mixins';
Expand All @@ -29,7 +29,7 @@ export class DataSourceBooter extends BaseArtifactBooter {
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: ApplicationWithRepositories,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@inject(BooterBindings.PROJECT_ROOT) projectRoot: string,
@config()
public datasourceConfig: ArtifactOptions = {},
) {
Expand Down
6 changes: 3 additions & 3 deletions packages/repository/src/booters/model.booter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import {
ArtifactOptions,
BaseArtifactBooter,
BootBindings,
booter,
} from '@loopback/boot';
BooterBindings,
} from '@loopback/booter';
import {config, Constructor, CoreBindings, inject} from '@loopback/core';
import debugFactory from 'debug';
import {ModelMetadataHelper} from '../decorators';
Expand All @@ -30,7 +30,7 @@ export class ModelBooter extends BaseArtifactBooter {
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: ApplicationWithRepositories,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@inject(BooterBindings.PROJECT_ROOT) projectRoot: string,
@config()
public modelConfig: ArtifactOptions = {},
) {
Expand Down
6 changes: 3 additions & 3 deletions packages/repository/src/booters/repository.booter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import {
ArtifactOptions,
BaseArtifactBooter,
BootBindings,
booter,
} from '@loopback/boot';
BooterBindings,
} from '@loopback/booter';
import {config, CoreBindings, inject} from '@loopback/core';
import {ApplicationWithRepositories} from '../mixins';

Expand All @@ -28,7 +28,7 @@ export class RepositoryBooter extends BaseArtifactBooter {
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: ApplicationWithRepositories,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@inject(BooterBindings.PROJECT_ROOT) projectRoot: string,
@config()
public repositoryOptions: ArtifactOptions = {},
) {
Expand Down
2 changes: 1 addition & 1 deletion packages/repository/src/mixins/repository.mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {bindBooter} from '@loopback/boot';
import {bindBooter} from '@loopback/booter';
import {
Binding,
BindingFromClassOptions,
Expand Down
3 changes: 3 additions & 0 deletions packages/repository/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{
"path": "../boot/tsconfig.json"
},
{
"path": "../booter/tsconfig.json"
},
{
"path": "../core/tsconfig.json"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/rest-crud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"access": "public"
},
"peerDependencies": {
"@loopback/boot": "^3.0.2",
"@loopback/booter": "^1.0.0",
"@loopback/core": "^2.11.0",
"@loopback/repository": "^3.1.0",
"@loopback/rest": "^8.0.0"
Expand All @@ -33,6 +33,7 @@
},
"devDependencies": {
"@loopback/build": "^6.2.5",
"@loopback/booter": "^1.0.0",
"@loopback/boot": "^3.0.2",
"@loopback/core": "^2.11.0",
"@loopback/repository": "^3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/rest-crud/src/crud-rest.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {Booter} from '@loopback/boot';
import {Booter} from '@loopback/booter';
import {
Binding,
Component,
Expand Down
3 changes: 3 additions & 0 deletions packages/rest-crud/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{
"path": "../boot/tsconfig.json"
},
{
"path": "../booter/tsconfig.json"
},
{
"path": "../core/tsconfig.json"
},
Expand Down

0 comments on commit fc5beeb

Please sign in to comment.