@modern-js/plugin-garfish 2.0.2 → 2.1.1-canary.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/CHANGELOG.md +12 -0
- package/dist/js/modern/cli/index.js +10 -3
- package/dist/js/modern/deps/index.js +4 -0
- package/dist/js/modern/runtime/index.js +0 -2
- package/dist/js/node/cli/index.js +10 -3
- package/dist/js/node/deps/index.js +33 -0
- package/dist/js/node/runtime/index.js +0 -3
- package/dist/js/treeshaking/cli/index.js +10 -3
- package/dist/js/treeshaking/deps/index.js +2 -0
- package/dist/js/treeshaking/runtime/index.js +1 -2
- package/dist/types/deps/index.d.ts +1 -0
- package/dist/types/runtime/index.d.ts +1 -2
- package/package.json +20 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @modern-js/plugin-garfish
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [f3237db]
|
|
8
|
+
- Updated dependencies [837620c]
|
|
9
|
+
- Updated dependencies [776cc27]
|
|
10
|
+
- Updated dependencies [35d3e84]
|
|
11
|
+
- Updated dependencies [8a9482c]
|
|
12
|
+
- @modern-js/runtime@2.1.0
|
|
13
|
+
- @modern-js/utils@2.1.0
|
|
14
|
+
|
|
3
15
|
## 2.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -174,9 +174,16 @@ var cli_default = ({
|
|
|
174
174
|
};
|
|
175
175
|
},
|
|
176
176
|
addRuntimeExports() {
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
const config = useResolvedConfigContext();
|
|
178
|
+
const { masterApp } = getRuntimeConfig(config);
|
|
179
|
+
if (masterApp) {
|
|
180
|
+
const addExportStatement = `export { default as garfish, default as masterApp } from '${pluginName}/runtime'`;
|
|
181
|
+
logger("exportStatement", addExportStatement);
|
|
182
|
+
pluginsExportsUtils.addExport(addExportStatement);
|
|
183
|
+
}
|
|
184
|
+
const otherExportStatement = `export { hoistNonReactStatics } from '${pluginName}/deps'`;
|
|
185
|
+
logger("otherExportStatement", otherExportStatement);
|
|
186
|
+
pluginsExportsUtils.addExport(otherExportStatement);
|
|
180
187
|
},
|
|
181
188
|
modifyEntryImports({ entrypoint, imports }) {
|
|
182
189
|
const config = useResolvedConfigContext();
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { default as default2 } from "./plugin";
|
|
2
2
|
import { useModuleApps, useModuleApp } from "./useModuleApps";
|
|
3
3
|
import { default as default3, default as default4 } from "garfish";
|
|
4
|
-
import { default as default5 } from "hoist-non-react-statics";
|
|
5
4
|
export {
|
|
6
5
|
default3 as Garfish,
|
|
7
6
|
default2 as default,
|
|
8
7
|
default4 as garfish,
|
|
9
|
-
default5 as hoistNonReactStatics,
|
|
10
8
|
useModuleApp,
|
|
11
9
|
useModuleApps
|
|
12
10
|
};
|
|
@@ -190,9 +190,16 @@ var cli_default = ({
|
|
|
190
190
|
};
|
|
191
191
|
},
|
|
192
192
|
addRuntimeExports() {
|
|
193
|
-
const
|
|
194
|
-
(0,
|
|
195
|
-
|
|
193
|
+
const config = useResolvedConfigContext();
|
|
194
|
+
const { masterApp } = (0, import_utils2.getRuntimeConfig)(config);
|
|
195
|
+
if (masterApp) {
|
|
196
|
+
const addExportStatement = `export { default as garfish, default as masterApp } from '${pluginName}/runtime'`;
|
|
197
|
+
(0, import_util.logger)("exportStatement", addExportStatement);
|
|
198
|
+
pluginsExportsUtils.addExport(addExportStatement);
|
|
199
|
+
}
|
|
200
|
+
const otherExportStatement = `export { hoistNonReactStatics } from '${pluginName}/deps'`;
|
|
201
|
+
(0, import_util.logger)("otherExportStatement", otherExportStatement);
|
|
202
|
+
pluginsExportsUtils.addExport(otherExportStatement);
|
|
196
203
|
},
|
|
197
204
|
modifyEntryImports({ entrypoint, imports }) {
|
|
198
205
|
const config = useResolvedConfigContext();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var deps_exports = {};
|
|
25
|
+
__export(deps_exports, {
|
|
26
|
+
hoistNonReactStatics: () => import_hoist_non_react_statics.default
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(deps_exports);
|
|
29
|
+
var import_hoist_non_react_statics = __toESM(require("hoist-non-react-statics"));
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
hoistNonReactStatics
|
|
33
|
+
});
|
|
@@ -26,7 +26,6 @@ __export(runtime_exports, {
|
|
|
26
26
|
Garfish: () => import_garfish.default,
|
|
27
27
|
default: () => import_plugin.default,
|
|
28
28
|
garfish: () => import_garfish.default,
|
|
29
|
-
hoistNonReactStatics: () => import_hoist_non_react_statics.default,
|
|
30
29
|
useModuleApp: () => import_useModuleApps.useModuleApp,
|
|
31
30
|
useModuleApps: () => import_useModuleApps.useModuleApps
|
|
32
31
|
});
|
|
@@ -34,12 +33,10 @@ module.exports = __toCommonJS(runtime_exports);
|
|
|
34
33
|
var import_plugin = __toESM(require("./plugin"));
|
|
35
34
|
var import_useModuleApps = require("./useModuleApps");
|
|
36
35
|
var import_garfish = __toESM(require("garfish"));
|
|
37
|
-
var import_hoist_non_react_statics = __toESM(require("hoist-non-react-statics"));
|
|
38
36
|
// Annotate the CommonJS export names for ESM import in node:
|
|
39
37
|
0 && (module.exports = {
|
|
40
38
|
Garfish,
|
|
41
39
|
garfish,
|
|
42
|
-
hoistNonReactStatics,
|
|
43
40
|
useModuleApp,
|
|
44
41
|
useModuleApps
|
|
45
42
|
});
|
|
@@ -285,9 +285,16 @@ var cli_default = function() {
|
|
|
285
285
|
};
|
|
286
286
|
},
|
|
287
287
|
addRuntimeExports: function addRuntimeExports() {
|
|
288
|
-
var
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
var config = useResolvedConfigContext();
|
|
289
|
+
var masterApp = getRuntimeConfig(config).masterApp;
|
|
290
|
+
if (masterApp) {
|
|
291
|
+
var addExportStatement = "export { default as garfish, default as masterApp } from '".concat(pluginName, "/runtime'");
|
|
292
|
+
logger("exportStatement", addExportStatement);
|
|
293
|
+
pluginsExportsUtils.addExport(addExportStatement);
|
|
294
|
+
}
|
|
295
|
+
var otherExportStatement = "export { hoistNonReactStatics } from '".concat(pluginName, "/deps'");
|
|
296
|
+
logger("otherExportStatement", otherExportStatement);
|
|
297
|
+
pluginsExportsUtils.addExport(otherExportStatement);
|
|
291
298
|
},
|
|
292
299
|
modifyEntryImports: function modifyEntryImports(param) {
|
|
293
300
|
var entrypoint = param.entrypoint, imports = param.imports;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as default2 } from "./plugin";
|
|
2
2
|
import { useModuleApps, useModuleApp } from "./useModuleApps";
|
|
3
3
|
import { default as default3, default as default4 } from "garfish";
|
|
4
|
-
|
|
5
|
-
export { default3 as Garfish, default2 as default, default4 as garfish, default5 as hoistNonReactStatics, useModuleApp, useModuleApps };
|
|
4
|
+
export { default3 as Garfish, default2 as default, default4 as garfish, useModuleApp, useModuleApps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as hoistNonReactStatics } from 'hoist-non-react-statics';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default } from './plugin';
|
|
2
2
|
export { useModuleApps, useModuleApp } from './useModuleApps';
|
|
3
3
|
export type { Manifest, ModuleInfo, Config } from './useModuleApps';
|
|
4
|
-
export { default as Garfish, default as garfish } from 'garfish';
|
|
5
|
-
export { default as hoistNonReactStatics } from 'hoist-non-react-statics';
|
|
4
|
+
export { default as Garfish, default as garfish } from 'garfish';
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.0
|
|
14
|
+
"version": "2.1.1-canary.0",
|
|
15
15
|
"jsnext:source": "./src/cli/index.ts",
|
|
16
16
|
"types": "./dist/types/cli/index.d.ts",
|
|
17
17
|
"typesVersions": {
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"runtime": [
|
|
26
26
|
"./dist/types/runtime/index.d.ts"
|
|
27
27
|
],
|
|
28
|
+
"deps": [
|
|
29
|
+
"./dist/types/deps/index.d.ts"
|
|
30
|
+
],
|
|
28
31
|
"types": [
|
|
29
32
|
"./type.d.ts"
|
|
30
33
|
]
|
|
@@ -43,6 +46,11 @@
|
|
|
43
46
|
"jsnext:source": "./src/cli/index.ts",
|
|
44
47
|
"default": "./dist/js/node/cli/index.js"
|
|
45
48
|
},
|
|
49
|
+
"./deps": {
|
|
50
|
+
"jsnext:source": "./src/deps/index.ts",
|
|
51
|
+
"node": "./dist/js/node/deps/index.js",
|
|
52
|
+
"default": "./dist/js/treeshaking/deps/index.js"
|
|
53
|
+
},
|
|
46
54
|
"./runtime": {
|
|
47
55
|
"node": {
|
|
48
56
|
"jsnext:source": "./src/index.ts",
|
|
@@ -54,16 +62,16 @@
|
|
|
54
62
|
},
|
|
55
63
|
"dependencies": {
|
|
56
64
|
"@babel/runtime": "^7.18.0",
|
|
65
|
+
"@modern-js/utils": "2.1.0",
|
|
57
66
|
"@types/debug": "^4.1.7",
|
|
58
67
|
"@types/react-loadable": "^5.5.6",
|
|
59
68
|
"debug": "^4.3.2",
|
|
60
69
|
"garfish": "^1.8.1",
|
|
61
70
|
"hoist-non-react-statics": "^3.3.2",
|
|
62
|
-
"react-loadable": "^5.5.0"
|
|
63
|
-
"@modern-js/utils": "2.0.2"
|
|
71
|
+
"react-loadable": "^5.5.0"
|
|
64
72
|
},
|
|
65
73
|
"peerDependencies": {
|
|
66
|
-
"@modern-js/runtime": "^2.0
|
|
74
|
+
"@modern-js/runtime": "^2.1.0"
|
|
67
75
|
},
|
|
68
76
|
"peerDependenciesMeta": {
|
|
69
77
|
"@modern-js/runtime": {
|
|
@@ -71,6 +79,13 @@
|
|
|
71
79
|
}
|
|
72
80
|
},
|
|
73
81
|
"devDependencies": {
|
|
82
|
+
"@modern-js/app-tools": "2.1.0",
|
|
83
|
+
"@modern-js/core": "2.1.0",
|
|
84
|
+
"@modern-js/runtime": "2.1.0",
|
|
85
|
+
"@modern-js/plugin-router-v5": "2.1.0",
|
|
86
|
+
"@modern-js/types": "2.1.0",
|
|
87
|
+
"@scripts/build": "2.1.0",
|
|
88
|
+
"@scripts/jest-config": "2.1.0",
|
|
74
89
|
"@testing-library/jest-dom": "^5.16.1",
|
|
75
90
|
"@testing-library/react": "^13.4.0",
|
|
76
91
|
"@testing-library/react-hooks": "^8.0.1",
|
|
@@ -84,14 +99,7 @@
|
|
|
84
99
|
"react-dom": "^18",
|
|
85
100
|
"react-router-dom": "^6.6.0",
|
|
86
101
|
"typescript": "^4",
|
|
87
|
-
"webpack-chain": "^6.5.1"
|
|
88
|
-
"@modern-js/app-tools": "2.0.2",
|
|
89
|
-
"@modern-js/core": "2.0.2",
|
|
90
|
-
"@modern-js/runtime": "2.0.2",
|
|
91
|
-
"@modern-js/plugin-router-v5": "2.0.2",
|
|
92
|
-
"@modern-js/types": "2.0.2",
|
|
93
|
-
"@scripts/build": "2.0.2",
|
|
94
|
-
"@scripts/jest-config": "2.0.2"
|
|
102
|
+
"webpack-chain": "^6.5.1"
|
|
95
103
|
},
|
|
96
104
|
"sideEffects": false,
|
|
97
105
|
"modernConfig": {},
|