@modern-js/plugin-state 2.65.5-alpha.3 → 2.67.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/dist/cjs/cli/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(cli_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(cli_exports);
|
|
25
25
|
var import_utils = require("@modern-js/utils");
|
|
26
|
+
var import_types = require("./types");
|
|
26
27
|
const PLUGIN_IDENTIFIER = "state";
|
|
27
28
|
const statePlugin = () => ({
|
|
28
29
|
name: "@modern-js/plugin-state",
|
package/dist/esm/cli/index.js
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.67.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"@modern-js-reduck/react": "^1.1.10",
|
|
59
59
|
"@modern-js-reduck/store": "^1.1.10",
|
|
60
60
|
"@swc/helpers": "0.5.13",
|
|
61
|
-
"@modern-js/
|
|
62
|
-
"@modern-js/runtime-utils": "2.
|
|
63
|
-
"@modern-js/
|
|
61
|
+
"@modern-js/types": "2.67.0",
|
|
62
|
+
"@modern-js/runtime-utils": "2.67.0",
|
|
63
|
+
"@modern-js/utils": "2.67.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": ">=17",
|
|
67
67
|
"react-dom": ">=17",
|
|
68
|
-
"@modern-js/runtime": "^2.
|
|
68
|
+
"@modern-js/runtime": "^2.67.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@testing-library/react": "^13.4.0",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"react-dom": "^18.3.1",
|
|
79
79
|
"ts-jest": "^29.1.0",
|
|
80
80
|
"typescript": "^5",
|
|
81
|
-
"@modern-js/app-tools": "2.
|
|
82
|
-
"@
|
|
83
|
-
"@
|
|
84
|
-
"@scripts/jest-config": "2.
|
|
81
|
+
"@modern-js/app-tools": "2.67.0",
|
|
82
|
+
"@modern-js/runtime": "2.67.0",
|
|
83
|
+
"@scripts/build": "2.66.0",
|
|
84
|
+
"@scripts/jest-config": "2.66.0"
|
|
85
85
|
},
|
|
86
86
|
"sideEffects": false,
|
|
87
87
|
"publishConfig": {
|
package/types/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import type { Store } from '@modern-js-reduck/store';
|
|
1
2
|
import type { StateConfig } from '../dist/types';
|
|
2
3
|
import '@modern-js-reduck/plugin-auto-actions';
|
|
3
4
|
import '@modern-js-reduck/plugin-devtools';
|
|
4
5
|
import '@modern-js-reduck/plugin-effects';
|
|
5
6
|
import '@modern-js-reduck/plugin-immutable';
|
|
6
7
|
|
|
8
|
+
/**
|
|
9
|
+
* This type file defines the runtime types for the runtime plugin, which will be referenced in the user's project at `src/modern-app-env.d.ts`.
|
|
10
|
+
* The CLI type definitions for the runtime plugin are located in cli/types, which are used for type hints in modern.config.ts.
|
|
11
|
+
* cli/types cannot be defined in this types file because the types from `src/modern-app-env.d.ts` cannot be used in `modern.config.ts`.
|
|
12
|
+
*/
|
|
7
13
|
export { default } from '../dist/types/runtime';
|
|
8
14
|
export * from '../dist/types/runtime';
|
|
9
15
|
|
|
@@ -19,9 +25,8 @@ declare module '@modern-js/runtime' {
|
|
|
19
25
|
interface RuntimeConfig {
|
|
20
26
|
state?: StateConfig;
|
|
21
27
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
state?: StateConfig | boolean;
|
|
28
|
+
|
|
29
|
+
interface TRuntimeContext {
|
|
30
|
+
store?: Store;
|
|
26
31
|
}
|
|
27
32
|
}
|