@modern-js/plugin-v2 2.67.1-alpha.3 → 2.67.1-alpha.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.
@@ -67,10 +67,10 @@ function initPluginAPI({ context, pluginManager }) {
67
67
  function updateAppContext(updateContext) {
68
68
  context = (0, import_lodash.assign)(context, updateContext);
69
69
  }
70
- async function _internal_resetAppContext(appContext) {
71
- const { config, normalizedConfig, packageName, configFile, command, appDirectory, metaName } = context;
70
+ async function _internal_resetAppContext({ appContext, config, normalizedConfig }) {
71
+ const { packageName, configFile, command, appDirectory, metaName } = context;
72
72
  context = await (0, import_context.createContext)({
73
- appContext: (0, import_lodash.assign)((0, import_context.initAppContext)({
73
+ appContext: (0, import_lodash.assign)({}, (0, import_context.initAppContext)({
74
74
  packageName,
75
75
  configFile,
76
76
  command,
@@ -55,20 +55,21 @@ function initPluginAPI(param) {
55
55
  function updateAppContext(updateContext) {
56
56
  context = assign(context, updateContext);
57
57
  }
58
- function _internal_resetAppContext(appContext) {
58
+ function _internal_resetAppContext(_) {
59
59
  return __internal_resetAppContext.apply(this, arguments);
60
60
  }
61
61
  function __internal_resetAppContext() {
62
- __internal_resetAppContext = _async_to_generator(function(appContext) {
63
- var config, normalizedConfig, packageName, configFile, command, appDirectory, metaName;
62
+ __internal_resetAppContext = _async_to_generator(function(param2) {
63
+ var appContext, config, normalizedConfig, packageName, configFile, command, appDirectory, metaName;
64
64
  return _ts_generator(this, function(_state) {
65
65
  switch (_state.label) {
66
66
  case 0:
67
- config = context.config, normalizedConfig = context.normalizedConfig, packageName = context.packageName, configFile = context.configFile, command = context.command, appDirectory = context.appDirectory, metaName = context.metaName;
67
+ appContext = param2.appContext, config = param2.config, normalizedConfig = param2.normalizedConfig;
68
+ packageName = context.packageName, configFile = context.configFile, command = context.command, appDirectory = context.appDirectory, metaName = context.metaName;
68
69
  return [
69
70
  4,
70
71
  createContext({
71
- appContext: assign(initAppContext({
72
+ appContext: assign({}, initAppContext({
72
73
  packageName,
73
74
  configFile,
74
75
  command,
@@ -44,10 +44,10 @@ function initPluginAPI({ context, pluginManager }) {
44
44
  function updateAppContext(updateContext) {
45
45
  context = assign(context, updateContext);
46
46
  }
47
- async function _internal_resetAppContext(appContext) {
48
- const { config, normalizedConfig, packageName, configFile, command, appDirectory, metaName } = context;
47
+ async function _internal_resetAppContext({ appContext, config, normalizedConfig }) {
48
+ const { packageName, configFile, command, appDirectory, metaName } = context;
49
49
  context = await createContext({
50
- appContext: assign(initAppContext({
50
+ appContext: assign({}, initAppContext({
51
51
  packageName,
52
52
  configFile,
53
53
  command,
@@ -1,6 +1,6 @@
1
1
  import type { AppContext, InternalContext } from '../types/cli/context';
2
2
  import type { CLIPlugin, CLIPluginExtends } from '../types/cli/plugin';
3
- interface ContextParams<Extends extends CLIPluginExtends> {
3
+ export interface ContextParams<Extends extends CLIPluginExtends> {
4
4
  appContext: AppContext<Extends>;
5
5
  config: Extends['config'];
6
6
  normalizedConfig: Extends['normalizedConfig'];
@@ -16,4 +16,3 @@ export declare function initAppContext<Extends extends CLIPluginExtends>(params:
16
16
  distDir?: string;
17
17
  }): AppContext<Extends>;
18
18
  export declare function createContext<Extends extends CLIPluginExtends>({ appContext, config, normalizedConfig, }: ContextParams<Extends>): Promise<InternalContext<Extends>>;
19
- export {};
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.67.1-alpha.3",
18
+ "version": "2.67.1-alpha.4",
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/runtime-utils": "2.67.0",
85
- "@modern-js/utils": "2.67.0"
84
+ "@modern-js/utils": "2.67.0",
85
+ "@modern-js/runtime-utils": "2.67.0"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@rsbuild/core": "1.3.2",
@@ -92,9 +92,9 @@
92
92
  "jest": "^29",
93
93
  "typescript": "^5",
94
94
  "@modern-js/types": "2.67.0",
95
- "@scripts/jest-config": "2.66.0",
96
95
  "@modern-js/uni-builder": "2.67.0",
97
- "@scripts/build": "2.66.0"
96
+ "@scripts/build": "2.66.0",
97
+ "@scripts/jest-config": "2.66.0"
98
98
  },
99
99
  "sideEffects": false,
100
100
  "publishConfig": {