Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jun 11, 2024
1 parent ba12999 commit 3890c15
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 93 deletions.
70 changes: 0 additions & 70 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

53 changes: 38 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,13 @@
"node": ">= 18.7.0"
},
"description": "A core plugin framework based on koa",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib"
],
"scripts": {
"lint": "eslint .",
"test": "npm run lint -- --fix && npm run test-local -- -p",
"test-local": "egg-bin test",
"ci": "egg-bin cov -p",
"ci": "npm run lint && egg-bin cov -p && npm run prepublishOnly",
"contributor": "git-contributor",
"clean": "tsc -b --clean",
"tsc": "tsc",
"prepublishOnly": "npm run tsc"
"prepublishOnly": "tshy && tshy-after"
},
"repository": {
"type": "git",
Expand All @@ -35,8 +28,8 @@
},
"homepage": "https://github.com/eggjs/egg-core#readme",
"dependencies": {
"@eggjs/koa": "^2.17.0",
"@eggjs/router": "^2.0.1",
"@eggjs/koa": "^2.18.1",
"@eggjs/router": "^3.0.0",
"@types/depd": "^1.1.32",
"co": "^4.6.0",
"depd": "^2.0.0",
Expand All @@ -45,7 +38,7 @@
"extend2": "^1.0.1",
"get-ready": "^3.1.0",
"globby": "^11.0.2",
"is-type-of": "^1.2.1",
"is-type-of": "^2.1.0",
"koa-convert": "^1.2.0",
"node-homedir": "^2.0.0",
"ready-callback": "^4.0.0",
Expand All @@ -70,10 +63,40 @@
"spy": "^1.0.0",
"supertest": "^4.0.2",
"ts-node": "10",
"typescript": "5",
"urllib": "3"
"urllib": "3",
"tshy": "^1.15.1",
"tshy-after": "^1.0.0",
"typescript": "^5.4.5"
},
"publishConfig": {
"access": "public"
}
},
"files": [
"dist",
"src"
],
"type": "module",
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"source": "./src/index.ts",
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"source": "./src/index.ts",
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts"
}
3 changes: 1 addition & 2 deletions src/egg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import assert from 'node:assert';
import fs from 'node:fs';
import { debuglog } from 'node:util';
import is from 'is-type-of';
import KoaApplication from '@eggjs/koa';
import type { MiddlewareFunc } from '@eggjs/koa';
import KoaApplication, { type MiddlewareFunc } from '@eggjs/koa';
import { EggConsoleLogger } from 'egg-logger';
import { EggRouter as Router } from '@eggjs/router';
import type { ReadyFunctionArg } from 'get-ready';
Expand Down
7 changes: 1 addition & 6 deletions test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import path from 'node:path';
import { setTimeout } from 'node:timers/promises';
import { Application as EggApplication } from './fixtures/egg';

export function getFilepath(name: string) {
Expand All @@ -18,11 +17,7 @@ export function createApp(name, options) {
}

return new CustomApplication(options);
};

export async function sleep(ms: number) {
return await setTimeout(ms);
};
}

export const symbol = {
view: Symbol('view'),
Expand Down

0 comments on commit 3890c15

Please sign in to comment.