@modern-js/runtime 1.2.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,5 +1,22 @@
1
1
  # @modern-js/runtime
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 83166714: change .npmignore
8
+ - Updated dependencies [83166714]
9
+ - Updated dependencies [c3de9882]
10
+ - Updated dependencies [33ff48af]
11
+ - Updated dependencies [c74597bd]
12
+ - @modern-js/core@1.3.2
13
+ - @modern-js/plugin-router@1.2.1
14
+ - @modern-js/plugin-state@1.2.1
15
+ - @modern-js/runtime-core@1.2.1
16
+ - @modern-js/bff-runtime@1.2.1
17
+ - @modern-js/create-request@1.2.1
18
+ - @modern-js/utils@1.2.2
19
+
3
20
  ## 1.2.0
4
21
 
5
22
  ### Minor Changes
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.0",
14
+ "version": "1.2.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./type.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -103,19 +103,19 @@
103
103
  },
104
104
  "dependencies": {
105
105
  "@babel/runtime": "^7",
106
- "@modern-js/plugin-router": "^1.2.0",
106
+ "@modern-js/plugin-router": "^1.2.1",
107
107
  "@modern-js/plugin-ssr": "^1.2.0",
108
- "@modern-js/plugin-state": "^1.2.0",
109
- "@modern-js/runtime-core": "^1.2.0",
110
- "@modern-js/utils": "^1.2.0",
111
- "@modern-js/bff-runtime": "^1.2.0",
112
- "@modern-js/create-request": "^1.2.0",
108
+ "@modern-js/plugin-state": "^1.2.1",
109
+ "@modern-js/runtime-core": "^1.2.1",
110
+ "@modern-js/utils": "^1.2.2",
111
+ "@modern-js/bff-runtime": "^1.2.1",
112
+ "@modern-js/create-request": "^1.2.1",
113
113
  "@loadable/component": "^5.15.0",
114
114
  "react-helmet": "^6.1.0",
115
115
  "styled-components": "^5.3.1"
116
116
  },
117
117
  "devDependencies": {
118
- "@modern-js/core": "^1.3.0",
118
+ "@modern-js/core": "^1.3.2",
119
119
  "@scripts/build": "0.0.0",
120
120
  "@types/loadable__component": "^5.13.4",
121
121
  "@types/react-helmet": "^6.1.2",
@@ -129,7 +129,7 @@
129
129
  "@scripts/jest-config": "0.0.0"
130
130
  },
131
131
  "peerDependencies": {
132
- "@modern-js/core": "^1.3.0"
132
+ "@modern-js/core": "^1.3.2"
133
133
  },
134
134
  "sideEffects": false,
135
135
  "modernConfig": {},
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["@modern-js-app"]
3
- }
package/src/cli/index.ts DELETED
@@ -1,60 +0,0 @@
1
- import path from 'path';
2
- import { PLUGIN_SCHEMAS, createRuntimeExportsUtils } from '@modern-js/utils';
3
- import { createPlugin, usePlugins, useAppContext } from '@modern-js/core';
4
-
5
- const useInternalDirectory = () => {
6
- try {
7
- return useAppContext().internalDirectory;
8
- } catch {
9
- return path.join(process.cwd(), 'node_modules/.modern-js');
10
- }
11
- };
12
-
13
- // eslint-disable-next-line react-hooks/rules-of-hooks
14
- usePlugins([
15
- require.resolve('@modern-js/plugin-state/cli'),
16
- require.resolve('@modern-js/plugin-router/cli'),
17
- require.resolve('@modern-js/plugin-ssr/cli'),
18
- ]);
19
-
20
- export default createPlugin(
21
- () => {
22
- let runtimeExportsUtils: ReturnType<typeof createRuntimeExportsUtils> =
23
- {} as any;
24
-
25
- return {
26
- config() {
27
- // eslint-disable-next-line react-hooks/rules-of-hooks
28
- const dir = useInternalDirectory();
29
-
30
- runtimeExportsUtils = createRuntimeExportsUtils(dir, 'index');
31
-
32
- return {
33
- runtime: {},
34
- runtimeByEntries: {},
35
- source: {
36
- alias: {
37
- '@modern-js/runtime$': runtimeExportsUtils.getPath(),
38
- },
39
- },
40
- };
41
- },
42
- validateSchema() {
43
- return PLUGIN_SCHEMAS['@modern-js/runtime'];
44
- },
45
- addRuntimeExports() {
46
- const runtimePackage = path.resolve(__dirname, '../../../../');
47
-
48
- runtimeExportsUtils.addExport(`export * from '${runtimePackage}'`);
49
- },
50
- };
51
- },
52
- {
53
- name: '@modern-js/runtime',
54
- post: [
55
- '@modern-js/plugin-router',
56
- '@modern-js/plugin-ssr',
57
- '@modern-js/plugin-state',
58
- ],
59
- },
60
- ) as any;
@@ -1 +0,0 @@
1
- declare module '@loadable/webpack-plugin';
@@ -1,5 +0,0 @@
1
- import head from 'react-helmet';
2
-
3
- export default head;
4
-
5
- export * from 'react-helmet';
@@ -1,5 +0,0 @@
1
- import loadable from '@loadable/component';
2
-
3
- export default loadable;
4
-
5
- export * from '@loadable/component';
@@ -1 +0,0 @@
1
- export * from '@modern-js/plugin-state';
@@ -1 +0,0 @@
1
- export { configure } from '@modern-js/create-request';
@@ -1 +0,0 @@
1
- export * from '@modern-js/plugin-router';
@@ -1,2 +0,0 @@
1
- export * from '@modern-js/bff-runtime';
2
- export const hook = (attacher: any) => attacher;
@@ -1 +0,0 @@
1
- export * from '@modern-js/plugin-ssr';
@@ -1,5 +0,0 @@
1
- import styled from '@modern-js/runtime-core/styled';
2
-
3
- export default styled;
4
-
5
- export * from '@modern-js/runtime-core/styled';
package/src/index.ts DELETED
@@ -1,12 +0,0 @@
1
- export type { RuntimeContext, TRuntimeContext } from '@modern-js/runtime-core';
2
- export {
3
- createApp,
4
- createPlugin,
5
- useLoader,
6
- bootstrap,
7
- RuntimeReactContext,
8
- registerPrefetch,
9
- defineConfig,
10
- registerInit,
11
- useRuntimeContext,
12
- } from '@modern-js/runtime-core';