@modern-js/types 1.5.2 → 1.5.5-alpha.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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @modern-js/types
2
2
 
3
+ ## 1.5.5-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 2dacc8929: support set header & status in render
8
+ - Updated dependencies [f29e9bacf]
9
+ - @modern-js/plugin@1.4.0-alpha.0
10
+
11
+ ## 1.5.4
12
+
13
+ ### Patch Changes
14
+
15
+ - 192dbc78: adjust ssr types
16
+
17
+ ## 1.5.3
18
+
19
+ ### Patch Changes
20
+
21
+ - d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
22
+ - Updated dependencies [d5913bd96]
23
+ - Updated dependencies [d32f35134]
24
+ - @modern-js/plugin@1.3.4
25
+
3
26
  ## 1.5.2
4
27
 
5
28
  ### Patch Changes
package/package.json CHANGED
@@ -11,10 +11,10 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.5.2",
14
+ "version": "1.5.5-alpha.0",
15
15
  "types": "./index.d.ts",
16
16
  "dependencies": {
17
- "@modern-js/plugin": "^1.3.3",
17
+ "@modern-js/plugin": "^1.4.0-alpha.0",
18
18
  "http-proxy-middleware": "^2.0.4",
19
19
  "webpack": "^5.54.0"
20
20
  },
@@ -28,7 +28,7 @@
28
28
  "devDependencies": {
29
29
  "@scripts/build": "0.0.0",
30
30
  "@scripts/jest-config": "0.0.0",
31
- "@types/jest": "^26",
31
+ "@types/jest": "^27",
32
32
  "@types/node": "^14",
33
33
  "@types/react": "^17",
34
34
  "@types/react-dom": "^17",
@@ -39,8 +39,20 @@
39
39
  "registry": "https://registry.npmjs.org/",
40
40
  "access": "public"
41
41
  },
42
+ "wireit": {
43
+ "test": {
44
+ "command": "jest --passWithNoTests",
45
+ "files": [
46
+ "src/**/*",
47
+ "tsconfig.json",
48
+ "package.json",
49
+ "tests/**/*"
50
+ ],
51
+ "output": []
52
+ }
53
+ },
42
54
  "scripts": {
43
- "test": "jest --passWithNoTests"
55
+ "test": "wireit"
44
56
  },
45
57
  "main": "",
46
58
  "readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
@@ -52,9 +52,13 @@ export type BaseSSRServerContext = {
52
52
  query: Record<string, string>;
53
53
  headers: IncomingHttpHeaders;
54
54
  host: string;
55
- cookie?: string;
55
+ cookieMap: Record<string, any>;
56
56
  [propsName: string]: any;
57
57
  };
58
+ response: {
59
+ setHeader: (key: string, value: any) => void;
60
+ status: (code: number) => void;
61
+ };
58
62
  redirection: { url?: string; status?: number };
59
63
  distDir: string;
60
64
  template: string;
@@ -88,4 +92,5 @@ export interface ISAppContext {
88
92
  server?: any;
89
93
  serverPkg?: any;
90
94
  }[];
95
+ [key: string]: unknown;
91
96
  }
package/.eslintrc.js DELETED
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- parserOptions: {
5
- tsconfigRootDir: __dirname,
6
- project: ['./tsconfig.json'],
7
- },
8
- };
package/jest.config.js DELETED
@@ -1,7 +0,0 @@
1
- const sharedConfig = require('@scripts/jest-config');
2
-
3
- /** @type {import('@jest/types').Config.InitialOptions} */
4
- module.exports = {
5
- ...sharedConfig,
6
- rootDir: __dirname,
7
- };
package/modern.config.js DELETED
@@ -1,2 +0,0 @@
1
- /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {};
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": false,
5
- "jsx": "preserve",
6
- "baseUrl": "./",
7
- "paths": {}
8
- },
9
- "include": ["cli", "server"]
10
- }