@modern-js/runtime 1.0.0 → 1.1.2-rc.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 +52 -0
- package/README.md +1 -4
- package/dist/js/modern/cli/index.js +3 -2
- package/dist/js/node/cli/index.js +7 -3
- package/dist/js/treeshaking/cli/index.js +3 -2
- package/package.json +13 -12
- package/src/cli/index.ts +5 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @modern-js/runtime
|
|
2
2
|
|
|
3
|
+
## 1.1.2-rc.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d927bc83]
|
|
8
|
+
- Updated dependencies [d73ff455]
|
|
9
|
+
- Updated dependencies [9c1ab865]
|
|
10
|
+
- Updated dependencies [d73ff455]
|
|
11
|
+
- Updated dependencies [d73ff455]
|
|
12
|
+
- Updated dependencies [d73ff455]
|
|
13
|
+
- Updated dependencies [d73ff455]
|
|
14
|
+
- @modern-js/utils@1.1.4-rc.0
|
|
15
|
+
- @modern-js/core@1.1.4-rc.0
|
|
16
|
+
- @modern-js/plugin-router@1.1.2-rc.0
|
|
17
|
+
- @modern-js/plugin-ssr@1.1.2-rc.0
|
|
18
|
+
- @modern-js/plugin-state@1.1.3-rc.0
|
|
19
|
+
- @modern-js/runtime-core@1.1.2-rc.0
|
|
20
|
+
- @modern-js/bff-runtime@1.1.2-rc.0
|
|
21
|
+
|
|
22
|
+
## 1.1.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 0fa83663: support more .env files
|
|
27
|
+
- Updated dependencies [6f7fe574]
|
|
28
|
+
- Updated dependencies [0fa83663]
|
|
29
|
+
- Updated dependencies [f594fbc8]
|
|
30
|
+
- @modern-js/core@1.1.2
|
|
31
|
+
- @modern-js/plugin-state@1.1.2
|
|
32
|
+
- @modern-js/runtime-core@1.1.1
|
|
33
|
+
- @modern-js/bff-runtime@1.1.1
|
|
34
|
+
- @modern-js/utils@1.1.2
|
|
35
|
+
- @modern-js/plugin-router@1.1.1
|
|
36
|
+
- @modern-js/plugin-ssr@1.1.1
|
|
37
|
+
|
|
38
|
+
## 1.1.0
|
|
39
|
+
|
|
40
|
+
### Minor Changes
|
|
41
|
+
|
|
42
|
+
- 96119db2: Relese v1.1.0
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [96119db2]
|
|
47
|
+
- @modern-js/core@1.1.0
|
|
48
|
+
- @modern-js/plugin-router@1.1.0
|
|
49
|
+
- @modern-js/plugin-ssr@1.1.0
|
|
50
|
+
- @modern-js/plugin-state@1.1.0
|
|
51
|
+
- @modern-js/runtime-core@1.1.0
|
|
52
|
+
- @modern-js/bff-runtime@1.1.0
|
|
53
|
+
- @modern-js/utils@1.1.0
|
|
54
|
+
|
|
3
55
|
## 1.0.0
|
|
4
56
|
|
|
5
57
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -17,10 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
> 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.
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
- [迈入现代 Web 开发](https://zhuanlan.zhihu.com/p/386607009)
|
|
22
|
-
- [现代 Web 开发者问卷调查报告](https://zhuanlan.zhihu.com/p/403206195)
|
|
23
|
-
- [字节跳动是如何落地微前端的](https://mp.weixin.qq.com/s/L9wbfNG5fTXF5bx7dcgj4Q)
|
|
20
|
+
- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)
|
|
24
21
|
|
|
25
22
|
## Getting Started
|
|
26
23
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { PLUGIN_SCHEMAS, createRuntimeExportsUtils } from '@modern-js/utils';
|
|
2
3
|
import { createPlugin, usePlugins, useAppContext } from '@modern-js/core';
|
|
3
4
|
|
|
4
5
|
const useInternalDirectory = () => {
|
|
@@ -10,7 +11,7 @@ const useInternalDirectory = () => {
|
|
|
10
11
|
}; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
usePlugins([
|
|
14
|
+
usePlugins([require.resolve('@modern-js/plugin-state/cli'), require.resolve('@modern-js/plugin-router/cli'), require.resolve('@modern-js/plugin-ssr/cli')]);
|
|
14
15
|
export default createPlugin(() => {
|
|
15
16
|
let runtimeExportsUtils = {};
|
|
16
17
|
return {
|
|
@@ -5,20 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _path = _interopRequireDefault(require("path"));
|
|
9
|
+
|
|
8
10
|
var _utils = require("@modern-js/utils");
|
|
9
11
|
|
|
10
12
|
var _core = require("@modern-js/core");
|
|
11
13
|
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
12
16
|
const useInternalDirectory = () => {
|
|
13
17
|
try {
|
|
14
18
|
return (0, _core.useAppContext)().internalDirectory;
|
|
15
19
|
} catch (_unused) {
|
|
16
|
-
return
|
|
20
|
+
return _path.default.join(process.cwd(), 'node_modules/.modern-js');
|
|
17
21
|
}
|
|
18
22
|
}; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
19
23
|
|
|
20
24
|
|
|
21
|
-
(0, _core.usePlugins)([
|
|
25
|
+
(0, _core.usePlugins)([require.resolve('@modern-js/plugin-state/cli'), require.resolve('@modern-js/plugin-router/cli'), require.resolve('@modern-js/plugin-ssr/cli')]);
|
|
22
26
|
|
|
23
27
|
var _default = (0, _core.createPlugin)(() => {
|
|
24
28
|
let runtimeExportsUtils = {};
|
|
@@ -43,7 +47,7 @@ var _default = (0, _core.createPlugin)(() => {
|
|
|
43
47
|
},
|
|
44
48
|
|
|
45
49
|
addRuntimeExports() {
|
|
46
|
-
const runtimePackage =
|
|
50
|
+
const runtimePackage = _path.default.resolve(__dirname, '../../../../');
|
|
47
51
|
|
|
48
52
|
runtimeExportsUtils.addExport(`export * from '${runtimePackage}'`);
|
|
49
53
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { PLUGIN_SCHEMAS, createRuntimeExportsUtils } from '@modern-js/utils';
|
|
2
3
|
import { createPlugin, usePlugins, useAppContext } from '@modern-js/core';
|
|
3
4
|
|
|
4
5
|
var useInternalDirectory = function useInternalDirectory() {
|
|
@@ -10,7 +11,7 @@ var useInternalDirectory = function useInternalDirectory() {
|
|
|
10
11
|
}; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
usePlugins([
|
|
14
|
+
usePlugins([require.resolve('@modern-js/plugin-state/cli'), require.resolve('@modern-js/plugin-router/cli'), require.resolve('@modern-js/plugin-ssr/cli')]);
|
|
14
15
|
export default createPlugin(function () {
|
|
15
16
|
var runtimeExportsUtils = {};
|
|
16
17
|
return {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.1.2-rc.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./type.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -83,12 +83,12 @@
|
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@babel/runtime": "^7",
|
|
85
85
|
"@loadable/component": "^5.15.0",
|
|
86
|
-
"@modern-js/bff-runtime": "^1.
|
|
87
|
-
"@modern-js/plugin-router": "^1.
|
|
88
|
-
"@modern-js/plugin-ssr": "^1.
|
|
89
|
-
"@modern-js/plugin-state": "^1.
|
|
90
|
-
"@modern-js/runtime-core": "^1.
|
|
91
|
-
"@modern-js/utils": "^1.
|
|
86
|
+
"@modern-js/bff-runtime": "^1.1.2-rc.0",
|
|
87
|
+
"@modern-js/plugin-router": "^1.1.2-rc.0",
|
|
88
|
+
"@modern-js/plugin-ssr": "^1.1.2-rc.0",
|
|
89
|
+
"@modern-js/plugin-state": "^1.1.3-rc.0",
|
|
90
|
+
"@modern-js/runtime-core": "^1.1.2-rc.0",
|
|
91
|
+
"@modern-js/utils": "^1.1.4-rc.0",
|
|
92
92
|
"@types/loadable__component": "^5.13.4",
|
|
93
93
|
"@types/react-helmet": "^6.1.2",
|
|
94
94
|
"@types/styled-components": "^5.1.13",
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
"@types/react": "^17",
|
|
102
102
|
"@types/react-dom": "^17",
|
|
103
103
|
"typescript": "^4",
|
|
104
|
-
"@modern-js/core": "^1.
|
|
105
|
-
"@modern-js/plugin-testing": "^1.
|
|
106
|
-
"@modern-js/module-tools": "^1.
|
|
104
|
+
"@modern-js/core": "^1.1.4-rc.0",
|
|
105
|
+
"@modern-js/plugin-testing": "^1.1.1",
|
|
106
|
+
"@modern-js/module-tools": "^1.1.1"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
|
-
"@modern-js/core": "^1.
|
|
109
|
+
"@modern-js/core": "^1.1.4-rc.0"
|
|
110
110
|
},
|
|
111
111
|
"sideEffects": false,
|
|
112
112
|
"modernConfig": {},
|
|
@@ -118,5 +118,6 @@
|
|
|
118
118
|
"new": "modern new",
|
|
119
119
|
"build": "modern build",
|
|
120
120
|
"test": "modern test --passWithNoTests"
|
|
121
|
-
}
|
|
121
|
+
},
|
|
122
|
+
"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"
|
|
122
123
|
}
|
package/src/cli/index.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
PLUGIN_SCHEMAS,
|
|
4
|
-
createRuntimeExportsUtils,
|
|
5
|
-
upath,
|
|
6
|
-
} from '@modern-js/utils';
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { PLUGIN_SCHEMAS, createRuntimeExportsUtils } from '@modern-js/utils';
|
|
7
3
|
import { createPlugin, usePlugins, useAppContext } from '@modern-js/core';
|
|
8
4
|
|
|
9
5
|
const useInternalDirectory = () => {
|
|
@@ -16,9 +12,9 @@ const useInternalDirectory = () => {
|
|
|
16
12
|
|
|
17
13
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
18
14
|
usePlugins([
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
require.resolve('@modern-js/plugin-state/cli'),
|
|
16
|
+
require.resolve('@modern-js/plugin-router/cli'),
|
|
17
|
+
require.resolve('@modern-js/plugin-ssr/cli'),
|
|
22
18
|
]);
|
|
23
19
|
|
|
24
20
|
export default createPlugin(
|