@modern-js/plugin-v2 2.63.2 → 2.63.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.
@@ -70,7 +70,8 @@ const createCli = () => {
70
70
  });
71
71
  context.pluginAPI = pluginAPI;
72
72
  for (const plugin of plugins) {
73
- const setupResult = await plugin.setup(pluginAPI);
73
+ var _plugin_setup;
74
+ const setupResult = await ((_plugin_setup = plugin.setup) === null || _plugin_setup === void 0 ? void 0 : _plugin_setup.call(plugin, pluginAPI));
74
75
  if (handleSetupResult) {
75
76
  await handleSetupResult(setupResult, pluginAPI);
76
77
  }
@@ -47,7 +47,8 @@ const createCli = () => {
47
47
  });
48
48
  context.pluginAPI = pluginAPI;
49
49
  for (const plugin of plugins) {
50
- const setupResult = await plugin.setup(pluginAPI);
50
+ var _plugin_setup;
51
+ const setupResult = await ((_plugin_setup = plugin.setup) === null || _plugin_setup === void 0 ? void 0 : _plugin_setup.call(plugin, pluginAPI));
51
52
  if (handleSetupResult) {
52
53
  await handleSetupResult(setupResult, pluginAPI);
53
54
  }
@@ -24,7 +24,7 @@ export type Plugin<PluginAPI = {}, Context = {}> = {
24
24
  * This function is called once when the plugin is initialized.
25
25
  * @param api provides the context info, utility functions and lifecycle hooks.
26
26
  */
27
- setup: (api: PluginAPI) => MaybePromise<void>;
27
+ setup?: (api: PluginAPI) => MaybePromise<void>;
28
28
  /**
29
29
  * Declare the names of pre-plugins, which will be executed before the current plugin.
30
30
  */
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.63.2",
18
+ "version": "2.63.4",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -61,19 +61,19 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@swc/helpers": "0.5.13",
64
- "@modern-js/node-bundle-require": "2.63.2",
65
- "@modern-js/utils": "2.63.2"
64
+ "@modern-js/node-bundle-require": "2.63.4",
65
+ "@modern-js/utils": "2.63.4"
66
66
  },
67
67
  "devDependencies": {
68
- "@rsbuild/core": "1.1.9",
68
+ "@rsbuild/core": "1.1.12",
69
69
  "@types/jest": "^29",
70
70
  "@types/node": "^14",
71
71
  "jest": "^29",
72
72
  "typescript": "^5",
73
- "@modern-js/uni-builder": "2.63.2",
74
- "@modern-js/types": "2.63.2",
75
- "@scripts/build": "2.63.2",
76
- "@scripts/jest-config": "2.63.2"
73
+ "@modern-js/types": "2.63.4",
74
+ "@modern-js/uni-builder": "2.63.4",
75
+ "@scripts/build": "2.63.4",
76
+ "@scripts/jest-config": "2.63.4"
77
77
  },
78
78
  "sideEffects": false,
79
79
  "publishConfig": {