@modern-js/plugin-garfish 1.4.4-beta.4 → 1.4.4

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,25 @@
1
1
  # @modern-js/plugin-garfish
2
2
 
3
+ ## 1.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 77116fc6: refactor(plugin-garfish): refactor garfish runtime plugin to new plugin mechanise
8
+ fix(plugin-garfish): fix plugin-garfish runtime config
9
+ - Updated dependencies [05ce88a0]
10
+ - Updated dependencies [a8df060e]
11
+ - Updated dependencies [c2046f37]
12
+ - Updated dependencies [a2261fed]
13
+ - Updated dependencies [cee0efcc]
14
+ - Updated dependencies [e31ce644]
15
+ - Updated dependencies [6a7acb81]
16
+ - Updated dependencies [681a1ff9]
17
+ - Updated dependencies [4e2026e4]
18
+ - @modern-js/core@1.6.0
19
+ - @modern-js/utils@1.3.6
20
+ - @modern-js/runtime-core@1.4.0
21
+ - @modern-js/plugin-router@1.2.6
22
+
3
23
  ## 1.4.3
4
24
 
5
25
  ### Patch Changes
@@ -1,4 +1,3 @@
1
- import _merge from "lodash/merge";
2
1
  const _excluded = ["manifest"];
3
2
 
4
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -58,20 +57,17 @@ async function initOptions(manifest = {}, options) {
58
57
  } // export default GarfishPlugin;
59
58
 
60
59
 
61
- export default (defaultConfig => ({
60
+ export default (config => ({
62
61
  name: '@modern-js/garfish-plugin',
63
- setup: config => {
62
+ setup: () => {
64
63
  setExternal();
65
64
 
66
- const _merge2 = _merge(defaultConfig, config),
67
- {
65
+ const {
68
66
  manifest
69
- } = _merge2,
70
- options = _objectWithoutProperties(_merge2, _excluded);
67
+ } = config,
68
+ options = _objectWithoutProperties(config, _excluded);
71
69
 
72
- logger('createPlugin', {
73
- config
74
- });
70
+ logger('createPlugin', config);
75
71
  const promise = initOptions(manifest, options);
76
72
  return {
77
73
  hoc({
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _merge3 = _interopRequireDefault(require("lodash/merge"));
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
9
 
12
10
  var _hoistNonReactStatics = _interopRequireDefault(require("hoist-non-react-statics"));
@@ -75,20 +73,17 @@ async function initOptions(manifest = {}, options) {
75
73
  } // export default GarfishPlugin;
76
74
 
77
75
 
78
- var _default = defaultConfig => ({
76
+ var _default = config => ({
79
77
  name: '@modern-js/garfish-plugin',
80
- setup: config => {
78
+ setup: () => {
81
79
  (0, _setExternal.default)();
82
80
 
83
- const _merge2 = (0, _merge3.default)(defaultConfig, config),
84
- {
81
+ const {
85
82
  manifest
86
- } = _merge2,
87
- options = _objectWithoutProperties(_merge2, _excluded);
83
+ } = config,
84
+ options = _objectWithoutProperties(config, _excluded);
88
85
 
89
- (0, _util.logger)('createPlugin', {
90
- config
91
- });
86
+ (0, _util.logger)('createPlugin', config);
92
87
  const promise = initOptions(manifest, options);
93
88
  return {
94
89
  hoc({
@@ -1,6 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
 
3
- import _merge from "lodash/merge";
4
3
  var _excluded = ["manifest"];
5
4
 
6
5
  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; }
@@ -120,19 +119,16 @@ function _initOptions() {
120
119
  return _initOptions.apply(this, arguments);
121
120
  }
122
121
 
123
- export default (function (defaultConfig) {
122
+ export default (function (config) {
124
123
  return {
125
124
  name: '@modern-js/garfish-plugin',
126
- setup: function setup(config) {
125
+ setup: function setup() {
127
126
  setExternal();
128
127
 
129
- var _merge2 = _merge(defaultConfig, config),
130
- manifest = _merge2.manifest,
131
- options = _objectWithoutProperties(_merge2, _excluded);
128
+ var manifest = config.manifest,
129
+ options = _objectWithoutProperties(config, _excluded);
132
130
 
133
- logger('createPlugin', {
134
- config: config
135
- });
131
+ logger('createPlugin', config);
136
132
  var promise = initOptions(manifest, options);
137
133
  return {
138
134
  hoc: function hoc(_ref, next) {
@@ -1,6 +1,6 @@
1
1
  import type { Plugin } from '@modern-js/runtime-core';
2
2
  import { Config } from './useModuleApps';
3
3
 
4
- declare const _default: (defaultConfig: Partial<Config>) => Plugin;
4
+ declare const _default: (config: Config) => Plugin;
5
5
 
6
6
  export default _default;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.4.4-beta.4",
14
+ "version": "1.4.4",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/runtime/index.d.ts",
17
17
  "typesVersions": {
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7",
49
- "@modern-js/utils": "^1.3.5",
49
+ "@modern-js/utils": "^1.3.6",
50
50
  "@types/debug": "^4.1.7",
51
51
  "@types/react-loadable": "^5.5.6",
52
52
  "debug": "^4.3.2",
@@ -56,9 +56,9 @@
56
56
  "react-loadable": "^5.5.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@modern-js/core": "^1.5.0",
60
- "@modern-js/plugin-router": "^1.2.5",
61
- "@modern-js/runtime-core": "^1.2.4",
59
+ "@modern-js/core": "^1.6.0",
60
+ "@modern-js/plugin-router": "^1.2.6",
61
+ "@modern-js/runtime-core": "^1.4.0",
62
62
  "@modern-js/types": "^1.3.5",
63
63
  "@scripts/build": "0.0.0",
64
64
  "@scripts/jest-config": "0.0.0",
@@ -81,15 +81,16 @@
81
81
  "webpack-chain": "^6.5.1"
82
82
  },
83
83
  "peerDependencies": {
84
- "@modern-js/plugin-router": "^1.2.5",
85
- "@modern-js/runtime-core": "^1.2.4"
84
+ "@modern-js/plugin-router": "^1.2.6",
85
+ "@modern-js/runtime-core": "^1.4.0",
86
+ "@modern-js/core": "^1.6.0",
87
+ "react": "^17"
86
88
  },
87
89
  "sideEffects": false,
88
90
  "modernConfig": {},
89
91
  "publishConfig": {
90
92
  "registry": "https://registry.npmjs.org/",
91
- "access": "public",
92
- "types": "./dist/types/runtime/index.d.ts"
93
+ "access": "public"
93
94
  },
94
95
  "scripts": {
95
96
  "new": "modern new",