@modern-js/plugin-state 1.2.6 → 1.2.9

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,23 @@
1
1
  # @modern-js/plugin-state
2
2
 
3
+ ## 1.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 37250cb8f: feat: supply `AppConfig` types
8
+
9
+ ## 1.2.8
10
+
11
+ ### Patch Changes
12
+
13
+ - f7cbc771: chore(plugin-state): bump @modern-js-reduck/plugin-devtools 1.0.3 to fix the deprecatetion warning
14
+
15
+ ## 1.2.7
16
+
17
+ ### Patch Changes
18
+
19
+ - d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
20
+
3
21
  ## 1.2.6
4
22
 
5
23
  ### Patch Changes
@@ -1,9 +1,4 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
7
2
  import { useContext } from 'react';
8
3
  import { RuntimeReactContext } from '@modern-js/runtime-core';
9
4
  import { createStore } from '@modern-js-reduck/store';
@@ -11,7 +11,7 @@ declare module '@modern-js/runtime-core' {
11
11
  storeState: any;
12
12
  }
13
13
  }
14
- declare type PluginProps = Parameters<typeof createStore>[0];
15
- declare const state: (config: PluginProps) => Plugin;
14
+ export declare type StateConfig = Parameters<typeof createStore>[0];
15
+ declare const state: (config: StateConfig) => Plugin;
16
16
  export default state;
17
17
  export * from '../plugins';
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.6",
14
+ "version": "1.2.9",
15
15
  "jsnext:source": "./src/runtime/index.tsx",
16
16
  "types": "./dist/types/runtime/index.d.ts",
17
17
  "main": "./dist/js/node/runtime/index.js",
@@ -58,7 +58,7 @@
58
58
  "dependencies": {
59
59
  "@babel/runtime": "^7",
60
60
  "@modern-js-reduck/plugin-auto-actions": "^1.0.2",
61
- "@modern-js-reduck/plugin-devtools": "^1.0.2",
61
+ "@modern-js-reduck/plugin-devtools": "^1.0.3",
62
62
  "@modern-js-reduck/plugin-effects": "^1.0.2",
63
63
  "@modern-js-reduck/plugin-immutable": "^1.0.1",
64
64
  "@modern-js-reduck/react": "^1.0.1",
@@ -68,14 +68,14 @@
68
68
  "redux-logger": "^3.0.6"
69
69
  },
70
70
  "devDependencies": {
71
- "@modern-js/core": "1.10.1",
72
- "@modern-js/plugin": "1.3.3",
73
- "@modern-js/runtime-core": "1.4.5",
74
- "@modern-js/utils": "1.7.2",
71
+ "@modern-js/core": "1.11.1",
72
+ "@modern-js/plugin": "1.3.5",
73
+ "@modern-js/runtime-core": "1.4.8",
74
+ "@modern-js/utils": "1.7.6",
75
75
  "@scripts/build": "0.0.0",
76
76
  "@scripts/jest-config": "0.0.0",
77
77
  "@types/hoist-non-react-statics": "^3.3.1",
78
- "@types/jest": "^26",
78
+ "@types/jest": "^27",
79
79
  "@types/node": "^14",
80
80
  "@types/react": "^17",
81
81
  "@types/react-dom": "^17",
@@ -92,10 +92,33 @@
92
92
  "registry": "https://registry.npmjs.org/",
93
93
  "access": "public"
94
94
  },
95
+ "wireit": {
96
+ "build": {
97
+ "command": "modern build",
98
+ "files": [
99
+ "src/**/*",
100
+ "tsconfig.json",
101
+ "package.json"
102
+ ],
103
+ "output": [
104
+ "dist/**/*"
105
+ ]
106
+ },
107
+ "test": {
108
+ "command": "jest --passWithNoTests",
109
+ "files": [
110
+ "src/**/*",
111
+ "tsconfig.json",
112
+ "package.json",
113
+ "tests/**/*"
114
+ ],
115
+ "output": []
116
+ }
117
+ },
95
118
  "scripts": {
96
119
  "new": "modern new",
97
- "build": "modern build",
98
- "test": "jest --passWithNoTests"
120
+ "build": "wireit",
121
+ "test": "wireit"
99
122
  },
100
123
  "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"
101
124
  }
package/.eslintrc.js DELETED
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- parserOptions: {
5
- tsconfigRootDir: __dirname,
6
- project: ['./tsconfig.json'],
7
- },
8
- };
package/jest.config.js DELETED
@@ -1,7 +0,0 @@
1
- const sharedConfig = require('@scripts/jest-config');
2
-
3
- /** @type {import('@jest/types').Config.InitialOptions} */
4
- module.exports = {
5
- ...sharedConfig,
6
- rootDir: __dirname,
7
- };
package/modern.config.js DELETED
@@ -1,2 +0,0 @@
1
- /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {};
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": false,
5
- "jsx": "preserve",
6
- "skipLibCheck": true,
7
- "baseUrl": "./",
8
- "paths": {}
9
- },
10
- "include": ["src"]
11
- }