@modern-js/runtime 1.3.0 → 1.3.3
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 +34 -0
- package/dist/js/modern/cli/index.js +10 -1
- package/dist/js/node/cli/index.js +10 -1
- package/dist/js/treeshaking/cli/index.js +13 -4
- package/dist/types/index.d.ts +9 -1
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @modern-js/runtime
|
|
2
2
|
|
|
3
|
+
## 1.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8d0eb81f5: add styled-components alias
|
|
8
|
+
|
|
9
|
+
## 1.3.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- a1198d509: feat: bump babel 7.18.0
|
|
14
|
+
- Updated dependencies [a1198d509]
|
|
15
|
+
- @modern-js/plugin-router@1.2.15
|
|
16
|
+
- @modern-js/plugin-ssr@1.4.5
|
|
17
|
+
- @modern-js/plugin-state@1.2.10
|
|
18
|
+
- @modern-js/runtime-core@1.4.9
|
|
19
|
+
- @modern-js/bff-runtime@1.2.4
|
|
20
|
+
- @modern-js/create-request@1.2.11
|
|
21
|
+
|
|
22
|
+
## 1.3.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 37250cb8f: feat: supply `AppConfig` types
|
|
27
|
+
- Updated dependencies [6c8ab42dd]
|
|
28
|
+
- Updated dependencies [808baede3]
|
|
29
|
+
- Updated dependencies [37250cb8f]
|
|
30
|
+
- Updated dependencies [fc43fef39]
|
|
31
|
+
- Updated dependencies [a204922e8]
|
|
32
|
+
- @modern-js/plugin-ssr@1.4.4
|
|
33
|
+
- @modern-js/runtime-core@1.4.8
|
|
34
|
+
- @modern-js/plugin-state@1.2.9
|
|
35
|
+
- @modern-js/plugin-router@1.2.14
|
|
36
|
+
|
|
3
37
|
## 1.3.0
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
|
@@ -18,7 +18,16 @@ export default (() => ({
|
|
|
18
18
|
runtimeByEntries: {},
|
|
19
19
|
source: {
|
|
20
20
|
alias: {
|
|
21
|
-
'@modern-js/runtime$': runtimeExportsUtils.getPath()
|
|
21
|
+
'@modern-js/runtime$': runtimeExportsUtils.getPath(),
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* twin.macro inserts styled-components into the code during the compilation process
|
|
25
|
+
* But it will not be installed under the user project.
|
|
26
|
+
* So need to add alias
|
|
27
|
+
*/
|
|
28
|
+
'styled-components': require.resolve('styled-components', {
|
|
29
|
+
paths: [require.resolve('@modern-js/runtime-core')]
|
|
30
|
+
})
|
|
22
31
|
}
|
|
23
32
|
}
|
|
24
33
|
};
|
|
@@ -32,7 +32,16 @@ var _default = () => ({
|
|
|
32
32
|
runtimeByEntries: {},
|
|
33
33
|
source: {
|
|
34
34
|
alias: {
|
|
35
|
-
'@modern-js/runtime$': runtimeExportsUtils.getPath()
|
|
35
|
+
'@modern-js/runtime$': runtimeExportsUtils.getPath(),
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* twin.macro inserts styled-components into the code during the compilation process
|
|
39
|
+
* But it will not be installed under the user project.
|
|
40
|
+
* So need to add alias
|
|
41
|
+
*/
|
|
42
|
+
'styled-components': require.resolve('styled-components', {
|
|
43
|
+
paths: [require.resolve('@modern-js/runtime-core')]
|
|
44
|
+
})
|
|
36
45
|
}
|
|
37
46
|
}
|
|
38
47
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
1
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { PLUGIN_SCHEMAS, createRuntimeExportsUtils, cleanRequireCache } from '@modern-js/utils';
|
|
5
5
|
import PluginState from '@modern-js/plugin-state/cli';
|
|
@@ -21,7 +21,16 @@ export default (function () {
|
|
|
21
21
|
runtimeByEntries: {},
|
|
22
22
|
source: {
|
|
23
23
|
alias: {
|
|
24
|
-
'@modern-js/runtime$': runtimeExportsUtils.getPath()
|
|
24
|
+
'@modern-js/runtime$': runtimeExportsUtils.getPath(),
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* twin.macro inserts styled-components into the code during the compilation process
|
|
28
|
+
* But it will not be installed under the user project.
|
|
29
|
+
* So need to add alias
|
|
30
|
+
*/
|
|
31
|
+
'styled-components': require.resolve('styled-components', {
|
|
32
|
+
paths: [require.resolve('@modern-js/runtime-core')]
|
|
33
|
+
})
|
|
25
34
|
}
|
|
26
35
|
}
|
|
27
36
|
};
|
|
@@ -34,8 +43,8 @@ export default (function () {
|
|
|
34
43
|
runtimeExportsUtils.addExport("export * from '".concat(runtimePackage, "'"));
|
|
35
44
|
},
|
|
36
45
|
beforeRestart: function beforeRestart() {
|
|
37
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
38
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
46
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
47
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
39
48
|
while (1) {
|
|
40
49
|
switch (_context.prev = _context.next) {
|
|
41
50
|
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.3.
|
|
14
|
+
"version": "1.3.3",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./type.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -102,14 +102,14 @@
|
|
|
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.
|
|
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.5.1",
|
|
110
|
+
"@modern-js/utils": "^1.7.8",
|
|
111
|
+
"@modern-js/bff-runtime": "^1.2.5",
|
|
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,7 +118,7 @@
|
|
|
118
118
|
"react-is": "^17"
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
|
-
"@modern-js/core": "1.
|
|
121
|
+
"@modern-js/core": "1.12.1",
|
|
122
122
|
"@scripts/build": "0.0.0",
|
|
123
123
|
"@types/jest": "^27",
|
|
124
124
|
"@types/node": "^14",
|
|
@@ -152,7 +152,8 @@
|
|
|
152
152
|
"files": [
|
|
153
153
|
"src/**/*",
|
|
154
154
|
"tsconfig.json",
|
|
155
|
-
"package.json"
|
|
155
|
+
"package.json",
|
|
156
|
+
"tests/**/*"
|
|
156
157
|
],
|
|
157
158
|
"output": []
|
|
158
159
|
}
|