Skip to content

Commit

Permalink
fix: merge bug
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Mar 5, 2020
1 parent 99c30d7 commit 7f41fc9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"autocannon": "^2.4.1",
"chalk": "^3.0.0",
"debug": "^4.1.1",
"eslint": "6",
"eslint": "^6.1.0",
"gh-pages": "^2.2.0",
"git-hooks": "^1.1.10",
"lerna": "^3.14.1",
Expand Down
5 changes: 2 additions & 3 deletions packages/eslint-midway-contrib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
"eslint-plugin-unicorn": "^16.0.0"
},
"devDependencies": {
"eslint": "6",
"tape": "4",
"typescript": "3"
"eslint": "^6.1.0",
"tape": "4"
},
"peerDependencies": {
"eslint": ">=6.1.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/midway-core/src/context/requestContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class MidwayRequestContainer extends MidwayContainer {
this.registerObject('logger', ctx.logger);
}

get<T = any>(identifier: any, args?: any) :T {
get<T = any>(identifier: any, args?: any): T {
if (typeof identifier !== 'string') {
identifier = this.getIdentifier(identifier);
}
Expand All @@ -34,7 +34,7 @@ export class MidwayRequestContainer extends MidwayContainer {
}
}

async getAsync<T = any>(identifier: any, args?: any) :Promise<T> {
async getAsync<T = any>(identifier: any, args?: any): Promise<T> {
if (typeof identifier !== 'string') {
identifier = this.getIdentifier(identifier);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/midway-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"reflect-metadata": "^0.1.13"
},
"devDependencies": {
"midway-bin": "^1.17.0"
"midway-bin": "^2.0.0-beta.14"
},
"keywords": [
"midway",
Expand Down
2 changes: 1 addition & 1 deletion packages/midway-mock/app/extend/application.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use strict";

module.exports = require('../../dist/app/extend/application')
module.exports = require('../../dist/app/extend/application');

11 changes: 4 additions & 7 deletions packages/midway-mock/src/app/extend/application.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { MockApplication } from 'egg-mock';
import { ApplicationContext } from 'injection';

import { IApplicationContext } from '@midwayjs/core';

interface Application extends MockApplication {
applicationContext: ApplicationContext
applicationContext: IApplicationContext;
_mockFn(
service: string,
methodName: string,
fn: () => any): void
fn: () => any): void;
}

export function mockClassFunction(
Expand All @@ -22,12 +21,10 @@ export function mockClassFunction(
const def = applicationContext.registry.getDefinition(className);
if (! def) {
throw new TypeError(`def undefined with className: "${className}", methodName: "${methodName}"`);
}
else {
} else {
const clazz = def.path;
if (clazz && typeof clazz === 'function') {
this._mockFn(clazz.prototype, methodName, fn);
}
}
}

1 change: 1 addition & 0 deletions packages/tslint-midway-contrib/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "tslint-midway-contrib",
"private": true,
"version": "1.16.3",
"description": "tslint default rule for midway",
"main": "tslint.json",
Expand Down

0 comments on commit 7f41fc9

Please sign in to comment.