@modern-js/plugin-v2 2.67.1-alpha.1 → 2.67.1-alpha.3

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.
@@ -53,7 +53,7 @@ function initPluginAPI({ context, pluginManager }) {
53
53
  plugins.forEach((plugin) => {
54
54
  const { _registryApi } = plugin;
55
55
  if (_registryApi) {
56
- const apis = _registryApi(getAppContext, updateAppContext);
56
+ const apis = _registryApi(getAppContext, updateAppContext, _internal_resetAppContext);
57
57
  Object.keys(apis).forEach((apiName) => {
58
58
  extendsPluginApi[apiName] = apis[apiName];
59
59
  });
@@ -41,7 +41,7 @@ function initPluginAPI(param) {
41
41
  plugins.forEach(function(plugin) {
42
42
  var _registryApi = plugin._registryApi;
43
43
  if (_registryApi) {
44
- var apis = _registryApi(getAppContext, updateAppContext);
44
+ var apis = _registryApi(getAppContext, updateAppContext, _internal_resetAppContext);
45
45
  Object.keys(apis).forEach(function(apiName) {
46
46
  extendsPluginApi[apiName] = apis[apiName];
47
47
  });
@@ -30,7 +30,7 @@ function initPluginAPI({ context, pluginManager }) {
30
30
  plugins.forEach((plugin) => {
31
31
  const { _registryApi } = plugin;
32
32
  if (_registryApi) {
33
- const apis = _registryApi(getAppContext, updateAppContext);
33
+ const apis = _registryApi(getAppContext, updateAppContext, _internal_resetAppContext);
34
34
  Object.keys(apis).forEach((apiName) => {
35
35
  extendsPluginApi[apiName] = apis[apiName];
36
36
  });
@@ -15,6 +15,7 @@ export type CLIPluginAPI<Extends extends CLIPluginExtends> = Readonly<{
15
15
  getNormalizedConfig: () => Readonly<Extends['normalizedConfig']>;
16
16
  getHooks: () => Readonly<Hooks<Extends['config'], Extends['normalizedConfig'], Extends['extendBuildUtils'], Extends['extendConfigUtils']> & Extends['extendHooks']>;
17
17
  updateAppContext: (appContext: DeepPartial<AppContext<Extends> & Extends['extendContext']>) => void;
18
+ _internal_resetAppContext: (appContext: AppContext<Extends> & Extends['extendContext']) => void;
18
19
  config: PluginHookTap<ConfigFn<DeepPartial<Extends['config']>>>;
19
20
  modifyConfig: PluginHookTap<ModifyConfigFn<Extends['config'], Extends['extendConfigUtils']>>;
20
21
  modifyResolvedConfig: PluginHookTap<ModifyResolvedConfigFn<Extends['normalizedConfig'], Extends['extendConfigUtils']>>;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.67.1-alpha.1",
18
+ "version": "2.67.1-alpha.3",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -81,8 +81,8 @@
81
81
  "dependencies": {
82
82
  "@swc/helpers": "0.5.13",
83
83
  "jiti": "1.21.7",
84
- "@modern-js/utils": "2.67.0",
85
- "@modern-js/runtime-utils": "2.67.0"
84
+ "@modern-js/runtime-utils": "2.67.0",
85
+ "@modern-js/utils": "2.67.0"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@rsbuild/core": "1.3.2",
@@ -91,10 +91,10 @@
91
91
  "@types/react": "^18.3.11",
92
92
  "jest": "^29",
93
93
  "typescript": "^5",
94
- "@modern-js/uni-builder": "2.67.0",
95
- "@scripts/build": "2.66.0",
94
+ "@modern-js/types": "2.67.0",
96
95
  "@scripts/jest-config": "2.66.0",
97
- "@modern-js/types": "2.67.0"
96
+ "@modern-js/uni-builder": "2.67.0",
97
+ "@scripts/build": "2.66.0"
98
98
  },
99
99
  "sideEffects": false,
100
100
  "publishConfig": {