@modern-js/plugin-koa 1.2.1-rc.0 → 1.2.1

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/CHANGELOG.md CHANGED
@@ -1,17 +1,10 @@
1
1
  # @modern-js/plugin-koa
2
2
 
3
- ## 1.2.1-rc.0
3
+ ## 1.2.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [e51b1db3]
8
- - Updated dependencies [b7fb82ec]
9
- - @modern-js/server-plugin@1.1.4-rc.0
10
- - @modern-js/utils@1.1.6-rc.0
11
- - @modern-js/core@1.2.1-rc.0
12
- - @modern-js/adapter-helpers@1.1.1
13
- - @modern-js/bff-runtime@1.1.2-rc.0
14
- - @modern-js/bff-utils@1.1.2-rc.0
7
+ - ad107726: feat: new action support apppend type define
15
8
 
16
9
  ## 1.2.0
17
10
 
package/package.json CHANGED
@@ -11,26 +11,31 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.1-rc.0",
14
+ "version": "1.2.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
18
18
  "module": "./dist/js/treeshaking/index.js",
19
19
  "jsnext:modern": "./dist/js/modern/index.js",
20
20
  "exports": {
21
+ "./types": "./types.d.ts",
21
22
  ".": {
22
23
  "node": {
24
+ "jsnext:source": "./src/index.ts",
23
25
  "import": "./dist/js/modern/index.js",
24
26
  "require": "./dist/js/node/index.js"
25
27
  },
26
28
  "default": "./dist/js/treeshaking/index.js"
27
29
  },
28
- "./cli": "./dist/js/node/cli/index.js"
30
+ "./cli": {
31
+ "jsnext:source": "./src/cli/index.ts",
32
+ "default": "./dist/js/node/cli/index.js"
33
+ }
29
34
  },
30
35
  "dependencies": {
31
36
  "@babel/runtime": "^7.15.3",
32
37
  "@modern-js/adapter-helpers": "^1.1.1",
33
- "@modern-js/utils": "^1.1.6-rc.0",
38
+ "@modern-js/utils": "^1.1.5",
34
39
  "formidable": "^1.2.2",
35
40
  "koa-body": "^4.2.0",
36
41
  "koa-router": "^10.0.0",
@@ -47,12 +52,12 @@
47
52
  "@types/type-is": "^1.6.3",
48
53
  "supertest": "^6.1.6",
49
54
  "typescript": "^4",
50
- "@modern-js/bff-runtime": "^1.1.2-rc.0",
51
- "@modern-js/bff-utils": "^1.1.2-rc.0",
52
- "@modern-js/core": "^1.2.1-rc.0",
53
- "@modern-js/server-plugin": "^1.1.4-rc.0",
55
+ "@modern-js/bff-runtime": "^1.1.1",
56
+ "@modern-js/bff-utils": "^1.1.1",
57
+ "@modern-js/core": "^1.2.0",
58
+ "@modern-js/server-plugin": "^1.1.3",
54
59
  "@modern-js/plugin-testing": "^1.2.2",
55
- "@modern-js/module-tools": "^1.1.4"
60
+ "@modern-js/module-tools": "^1.1.5"
56
61
  },
57
62
  "modernConfig": {
58
63
  "output": {
@@ -60,10 +65,10 @@
60
65
  }
61
66
  },
62
67
  "peerDependencies": {
63
- "@modern-js/bff-utils": "^1.1.2-rc.0",
64
- "@modern-js/core": "^1.2.1-rc.0",
65
- "@modern-js/server-plugin": "^1.1.4-rc.0",
66
- "@modern-js/bff-runtime": "^1.1.2-rc.0",
68
+ "@modern-js/bff-utils": "^1.1.1",
69
+ "@modern-js/core": "^1.2.0",
70
+ "@modern-js/server-plugin": "^1.1.3",
71
+ "@modern-js/bff-runtime": "^1.1.1",
67
72
  "koa": "^2.13.3"
68
73
  },
69
74
  "publishConfig": {
@@ -1,5 +1,5 @@
1
1
  import { match } from '@modern-js/bff-runtime';
2
- import { useContext } from '@/context';
2
+ import { useContext } from '../../../../../src/context';
3
3
 
4
4
  export const get = ({ query }: { query: Record<string, unknown> }) => ({
5
5
  query,
@@ -1,5 +1,5 @@
1
1
  import { match } from '@modern-js/bff-runtime';
2
- import { useContext } from '@/context';
2
+ import { useContext } from '../../../../../../src/context';
3
3
 
4
4
  export const get = ({ query }: { query: Record<string, unknown> }) => ({
5
5
  query,
@@ -1,6 +1,6 @@
1
1
  import * as path from 'path';
2
2
  import request from 'supertest';
3
- import Koa, { Context, Next } from 'koa';
3
+ import Koa from 'koa';
4
4
  import { serverManager } from '@modern-js/server-plugin';
5
5
  import Router from 'koa-router';
6
6
  import koaBody from 'koa-body';
@@ -111,11 +111,11 @@ describe('add middlewares', () => {
111
111
 
112
112
  test('should works', async () => {
113
113
  const foo = 'foo';
114
- const fakeMiddleware = jest.fn(async (ctx: Context, next: Next) => {
114
+ const fakeMiddleware = jest.fn(async (ctx: any, next: any) => {
115
115
  await next();
116
116
  ctx.body = foo;
117
117
  });
118
- const fakeMiddleware2 = jest.fn(async (ctx: Context, next: Next) => {
118
+ const fakeMiddleware2 = jest.fn(async (ctx: any, next: any) => {
119
119
  await next();
120
120
  });
121
121
 
@@ -7,8 +7,6 @@
7
7
  "isolatedModules": true,
8
8
  "sourceMap": true
9
9
  },
10
- "paths": {
11
- "@/*": ["../src/*"]
12
- },
10
+ "paths": {},
13
11
  "exclude": ["src/__test__/fixtures/**"]
14
12
  }