@eggjs/koa 2.14.2 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,39 +1,27 @@
1
1
  {
2
2
  "name": "@eggjs/koa",
3
- "version": "2.14.2",
3
+ "version": "2.15.0",
4
4
  "description": "Koa web app framework",
5
5
  "main": "lib/application.js",
6
+ "types": "lib/application.d.ts",
6
7
  "files": [
7
- "dist",
8
- "lib"
8
+ "lib/*.d.ts",
9
+ "lib/*.js"
9
10
  ],
10
- "exports": {
11
- ".": {
12
- "require": "./lib/application.js",
13
- "import": "./dist/koa.mjs"
14
- },
15
- "./lib/request": "./lib/request.js",
16
- "./lib/request.js": "./lib/request.js",
17
- "./lib/response": "./lib/response.js",
18
- "./lib/response.js": "./lib/response.js",
19
- "./lib/application": "./lib/application.js",
20
- "./lib/application.js": "./lib/application.js",
21
- "./lib/context": "./lib/context.js",
22
- "./lib/context.js": "./lib/context.js",
23
- "./*": "./*.js",
24
- "./*.js": "./*.js",
25
- "./package": "./package.json",
26
- "./package.json": "./package.json"
27
- },
28
11
  "scripts": {
29
- "test": "jest --forceExit",
30
- "ci": "npm test -- --coverage --maxWorkers 2",
31
- "lint": "eslint --ignore-path .gitignore .",
12
+ "test": "egg-bin test",
13
+ "ci": "egg-bin cov && npm run tsd",
14
+ "lint": "eslint src test",
15
+ "tsd": "npm run tsc && tsd",
32
16
  "authors": "git log --format='%aN <%aE>' | sort -u > AUTHORS",
33
- "build": "gen-esm-wrapper . ./dist/koa.mjs",
34
- "prepare": "npm run build"
17
+ "clean": "tsc -b --clean",
18
+ "tsc": "tsc",
19
+ "prepublishOnly": "npm run tsc"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git@github.com:eggjs/koa.git"
35
24
  },
36
- "repository": "eggjs/koa",
37
25
  "keywords": [
38
26
  "web",
39
27
  "app",
@@ -50,9 +38,7 @@
50
38
  "content-disposition": "~0.5.2",
51
39
  "content-type": "^1.0.4",
52
40
  "cookies": "~0.8.0",
53
- "debug": "^4.3.2",
54
41
  "delegates": "^1.0.0",
55
- "depd": "^2.0.0",
56
42
  "destroy": "^1.0.4",
57
43
  "encodeurl": "^1.0.2",
58
44
  "escape-html": "^1.0.3",
@@ -61,7 +47,6 @@
61
47
  "http-errors": "^1.6.3",
62
48
  "is-generator-function": "^1.0.7",
63
49
  "koa-compose": "^4.1.0",
64
- "koa-convert": "^2.0.0",
65
50
  "on-finished": "^2.3.0",
66
51
  "only": "~0.0.2",
67
52
  "parseurl": "^1.3.2",
@@ -70,23 +55,21 @@
70
55
  "vary": "^1.1.2"
71
56
  },
72
57
  "devDependencies": {
73
- "eslint": "^7.32.0",
74
- "eslint-config-koa": "^2.0.0",
75
- "eslint-config-standard": "^16.0.3",
76
- "eslint-plugin-import": "^2.18.2",
77
- "eslint-plugin-node": "^11.1.0",
78
- "eslint-plugin-promise": "^5.1.0",
79
- "eslint-plugin-standard": "^5.0.0",
80
- "gen-esm-wrapper": "^1.0.6",
81
- "jest": "^27.0.6",
82
- "supertest": "^3.1.0"
58
+ "@eggjs/tsconfig": "^1.3.3",
59
+ "@types/mocha": "^10.0.1",
60
+ "@types/node": "^20.2.5",
61
+ "egg-bin": "^6.4.0",
62
+ "eslint": "^8.41.0",
63
+ "eslint-config-egg": "^12.2.1",
64
+ "mm": "^3.3.0",
65
+ "supertest": "^3.1.0",
66
+ "ts-node": "^10.9.1",
67
+ "tsd": "^0.28.1",
68
+ "typescript": "^5.0.4"
83
69
  },
84
70
  "engines": {
85
71
  "node": ">= 16.13.0"
86
72
  },
87
- "jest": {
88
- "testEnvironment": "node"
89
- },
90
73
  "publishConfig": {
91
74
  "access": "public"
92
75
  }
package/dist/koa.mjs DELETED
@@ -1,4 +0,0 @@
1
- import mod from "../lib/application.js";
2
-
3
- export default mod;
4
- export const HttpError = mod.HttpError;