@modern-js/runtime 1.2.9 → 1.3.2
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 +52 -0
- package/dist/js/treeshaking/cli/index.js +4 -8
- package/dist/types/index.d.ts +9 -1
- package/package.json +37 -14
- package/types/model.d.ts +3 -0
- package/.eslintrc.js +0 -8
- package/jest.config.js +0 -7
- package/modern.config.js +0 -2
- package/tsconfig.json +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @modern-js/runtime
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a1198d509: feat: bump babel 7.18.0
|
|
8
|
+
- Updated dependencies [a1198d509]
|
|
9
|
+
- @modern-js/plugin-router@1.2.15
|
|
10
|
+
- @modern-js/plugin-ssr@1.4.5
|
|
11
|
+
- @modern-js/plugin-state@1.2.10
|
|
12
|
+
- @modern-js/runtime-core@1.4.9
|
|
13
|
+
- @modern-js/bff-runtime@1.2.4
|
|
14
|
+
- @modern-js/create-request@1.2.11
|
|
15
|
+
|
|
16
|
+
## 1.3.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 37250cb8f: feat: supply `AppConfig` types
|
|
21
|
+
- Updated dependencies [6c8ab42dd]
|
|
22
|
+
- Updated dependencies [808baede3]
|
|
23
|
+
- Updated dependencies [37250cb8f]
|
|
24
|
+
- Updated dependencies [fc43fef39]
|
|
25
|
+
- Updated dependencies [a204922e8]
|
|
26
|
+
- @modern-js/plugin-ssr@1.4.4
|
|
27
|
+
- @modern-js/runtime-core@1.4.8
|
|
28
|
+
- @modern-js/plugin-state@1.2.9
|
|
29
|
+
- @modern-js/plugin-router@1.2.14
|
|
30
|
+
|
|
31
|
+
## 1.3.0
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- a9f5d170c: fix: @modern-js/runtime/model effects type error
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
|
|
40
|
+
- Updated dependencies [d32f35134]
|
|
41
|
+
- Updated dependencies [6ae4a34ae]
|
|
42
|
+
- Updated dependencies [97086dde8]
|
|
43
|
+
- Updated dependencies [97086dde8]
|
|
44
|
+
- Updated dependencies [b80229c79]
|
|
45
|
+
- Updated dependencies [5bfb57321]
|
|
46
|
+
- Updated dependencies [948cc4436]
|
|
47
|
+
- @modern-js/plugin-router@1.2.14
|
|
48
|
+
- @modern-js/plugin-state@1.2.7
|
|
49
|
+
- @modern-js/runtime-core@1.4.6
|
|
50
|
+
- @modern-js/bff-runtime@1.2.3
|
|
51
|
+
- @modern-js/create-request@1.2.8
|
|
52
|
+
- @modern-js/utils@1.7.3
|
|
53
|
+
- @modern-js/plugin-ssr@1.3.2
|
|
54
|
+
|
|
3
55
|
## 1.2.9
|
|
4
56
|
|
|
5
57
|
### Patch Changes
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/
|
|
2
|
-
|
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
-
|
|
5
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
6
|
-
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
7
3
|
import path from 'path';
|
|
8
4
|
import { PLUGIN_SCHEMAS, createRuntimeExportsUtils, cleanRequireCache } from '@modern-js/utils';
|
|
9
5
|
import PluginState from '@modern-js/plugin-state/cli';
|
|
@@ -38,8 +34,8 @@ export default (function () {
|
|
|
38
34
|
runtimeExportsUtils.addExport("export * from '".concat(runtimePackage, "'"));
|
|
39
35
|
},
|
|
40
36
|
beforeRestart: function beforeRestart() {
|
|
41
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
42
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
38
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
43
39
|
while (1) {
|
|
44
40
|
switch (_context.prev = _context.next) {
|
|
45
41
|
case 0:
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
+
import type { RouterConfig } from '@modern-js/plugin-router';
|
|
2
|
+
import type { StateConfig } from '@modern-js/plugin-state';
|
|
1
3
|
export type { RuntimeContext, TRuntimeContext } from '@modern-js/runtime-core';
|
|
2
|
-
export { createApp, createPlugin, useLoader, bootstrap, RuntimeReactContext, registerPrefetch, defineConfig, registerInit, useRuntimeContext } from '@modern-js/runtime-core';
|
|
4
|
+
export { createApp, createPlugin, useLoader, bootstrap, RuntimeReactContext, registerPrefetch, defineConfig, registerInit, useRuntimeContext } from '@modern-js/runtime-core';
|
|
5
|
+
declare module '@modern-js/runtime-core' {
|
|
6
|
+
interface AppConfig {
|
|
7
|
+
router?: RouterConfig | boolean;
|
|
8
|
+
state?: StateConfig | boolean;
|
|
9
|
+
}
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.2
|
|
14
|
+
"version": "1.3.2",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./type.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -97,19 +97,19 @@
|
|
|
97
97
|
"./dist/types/exports/request.d.ts"
|
|
98
98
|
],
|
|
99
99
|
"model": [
|
|
100
|
-
"./
|
|
100
|
+
"./types/model.d.ts"
|
|
101
101
|
]
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@babel/runtime": "^7",
|
|
106
|
-
"@modern-js/plugin-router": "^1.2.
|
|
107
|
-
"@modern-js/plugin-ssr": "^1.
|
|
108
|
-
"@modern-js/plugin-state": "^1.2.
|
|
109
|
-
"@modern-js/runtime-core": "^1.4.
|
|
110
|
-
"@modern-js/utils": "^1.7.
|
|
111
|
-
"@modern-js/bff-runtime": "^1.2.
|
|
112
|
-
"@modern-js/create-request": "^1.2.
|
|
105
|
+
"@babel/runtime": "^7.18.0",
|
|
106
|
+
"@modern-js/plugin-router": "^1.2.15",
|
|
107
|
+
"@modern-js/plugin-ssr": "^1.4.5",
|
|
108
|
+
"@modern-js/plugin-state": "^1.2.10",
|
|
109
|
+
"@modern-js/runtime-core": "^1.4.9",
|
|
110
|
+
"@modern-js/utils": "^1.7.6",
|
|
111
|
+
"@modern-js/bff-runtime": "^1.2.4",
|
|
112
|
+
"@modern-js/create-request": "^1.2.11",
|
|
113
113
|
"@loadable/component": "^5.15.0",
|
|
114
114
|
"@types/loadable__component": "^5.13.4",
|
|
115
115
|
"@types/react-helmet": "^6.1.2",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"react-is": "^17"
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
|
-
"@modern-js/core": "1.
|
|
121
|
+
"@modern-js/core": "1.11.2",
|
|
122
122
|
"@scripts/build": "0.0.0",
|
|
123
|
-
"@types/jest": "^
|
|
123
|
+
"@types/jest": "^27",
|
|
124
124
|
"@types/node": "^14",
|
|
125
125
|
"@types/react": "^17",
|
|
126
126
|
"@types/react-dom": "^17",
|
|
@@ -135,10 +135,33 @@
|
|
|
135
135
|
"registry": "https://registry.npmjs.org/",
|
|
136
136
|
"access": "public"
|
|
137
137
|
},
|
|
138
|
+
"wireit": {
|
|
139
|
+
"build": {
|
|
140
|
+
"command": "modern build",
|
|
141
|
+
"files": [
|
|
142
|
+
"src/**/*",
|
|
143
|
+
"tsconfig.json",
|
|
144
|
+
"package.json"
|
|
145
|
+
],
|
|
146
|
+
"output": [
|
|
147
|
+
"dist/**/*"
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
"test": {
|
|
151
|
+
"command": "jest --passWithNoTests",
|
|
152
|
+
"files": [
|
|
153
|
+
"src/**/*",
|
|
154
|
+
"tsconfig.json",
|
|
155
|
+
"package.json",
|
|
156
|
+
"tests/**/*"
|
|
157
|
+
],
|
|
158
|
+
"output": []
|
|
159
|
+
}
|
|
160
|
+
},
|
|
138
161
|
"scripts": {
|
|
139
162
|
"new": "modern new",
|
|
140
|
-
"build": "
|
|
141
|
-
"test": "
|
|
163
|
+
"build": "wireit",
|
|
164
|
+
"test": "wireit"
|
|
142
165
|
},
|
|
143
166
|
"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"
|
|
144
167
|
}
|
package/types/model.d.ts
ADDED
package/.eslintrc.js
DELETED
package/jest.config.js
DELETED
package/modern.config.js
DELETED