@modern-js/module-tools 1.5.7 → 1.5.8

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,27 @@
1
1
  # @modern-js/module-tools
2
2
 
3
+ ## 1.5.8
4
+
5
+ ### Patch Changes
6
+
7
+ - eeedc80: feat: add plugin-jarvis to dependencies of solutions
8
+ - f29e9ba: feat: simplify context usage, no longer depend on containers
9
+ - Updated dependencies [f29e9ba]
10
+ - Updated dependencies [d9564f2]
11
+ - Updated dependencies [1a57595]
12
+ - Updated dependencies [42741db]
13
+ - Updated dependencies [341bb42]
14
+ - Updated dependencies [f29e9ba]
15
+ - Updated dependencies [a90bc96]
16
+ - @modern-js/core@1.12.2
17
+ - @modern-js/plugin-analyze@1.4.7
18
+ - @modern-js/plugin-jarvis@1.2.14
19
+ - @modern-js/plugin-changeset@1.3.1
20
+ - @modern-js/new-action@1.3.11
21
+ - @modern-js/plugin@1.4.0
22
+ - @modern-js/utils@1.7.9
23
+ - @modern-js/css-config@1.2.7
24
+
3
25
  ## 1.5.7
4
26
 
5
27
  ### Patch Changes
@@ -1,6 +1,7 @@
1
1
  import { Import } from '@modern-js/utils';
2
2
  import ChangesetPlugin from '@modern-js/plugin-changeset';
3
3
  import AnalyzePlugin from '@modern-js/plugin-analyze';
4
+ import LintPlugin from '@modern-js/plugin-jarvis';
4
5
  import { hooks } from "./hooks";
5
6
  const cli = Import.lazy('./cli', require);
6
7
  const local = Import.lazy('./locale', require);
@@ -11,7 +12,7 @@ export default (() => ({
11
12
  name: '@modern-js/module-tools',
12
13
  post: ['@modern-js/plugin-analyze', '@modern-js/plugin-changeset'],
13
14
  registerHook: hooks,
14
- usePlugins: [ChangesetPlugin(), AnalyzePlugin()],
15
+ usePlugins: [ChangesetPlugin(), AnalyzePlugin(), LintPlugin()],
15
16
  setup: api => {
16
17
  const locale = lang.getLocaleLanguage();
17
18
  local.i18n.changeLanguage({
@@ -195,7 +195,8 @@ const taskMain = async ({
195
195
  const {
196
196
  resolved
197
197
  } = await core.cli.init([], options);
198
- await core.manager.run(async () => {
198
+
199
+ (async () => {
199
200
  try {
200
201
  await taskMain({
201
202
  modernConfig: resolved
@@ -203,5 +204,5 @@ const taskMain = async ({
203
204
  } catch (e) {
204
205
  console.error(e);
205
206
  }
206
- });
207
+ })();
207
208
  })();
@@ -155,7 +155,8 @@ const taskMain = async ({
155
155
  resolved: modernConfig,
156
156
  appContext
157
157
  } = await core.cli.init([], options);
158
- await core.manager.run(async () => {
158
+
159
+ (async () => {
159
160
  try {
160
161
  await taskMain({
161
162
  modernConfig,
@@ -164,5 +165,5 @@ const taskMain = async ({
164
165
  } catch (e) {
165
166
  console.error(e.toString());
166
167
  }
167
- });
168
+ })();
168
169
  })();
@@ -149,7 +149,8 @@ const taskMain = async ({
149
149
  const {
150
150
  resolved
151
151
  } = await core.cli.init([], options);
152
- await core.manager.run(async () => {
152
+
153
+ (async () => {
153
154
  try {
154
155
  await taskMain({
155
156
  modernConfig: resolved
@@ -157,5 +158,5 @@ const taskMain = async ({
157
158
  } catch (e) {
158
159
  console.error(e);
159
160
  }
160
- });
161
+ })();
161
162
  })();
@@ -202,7 +202,8 @@ const taskMain = async ({
202
202
  resolved: modernConfig,
203
203
  appContext
204
204
  } = await core.cli.init([], options);
205
- await core.manager.run(async () => {
205
+
206
+ (async () => {
206
207
  try {
207
208
  await taskMain({
208
209
  modernConfig,
@@ -211,5 +212,5 @@ const taskMain = async ({
211
212
  } catch (e) {
212
213
  console.error(e);
213
214
  }
214
- });
215
+ })();
215
216
  })();
@@ -100,7 +100,8 @@ const taskMain = ({
100
100
  resolved: modernConfig,
101
101
  appContext
102
102
  } = await core.cli.init([], options);
103
- core.manager.run(() => {
103
+
104
+ (() => {
104
105
  try {
105
106
  taskMain({
106
107
  modernConfig,
@@ -109,5 +110,5 @@ const taskMain = ({
109
110
  } catch (e) {
110
111
  console.error(e.message);
111
112
  }
112
- });
113
+ })();
113
114
  })();
@@ -127,7 +127,8 @@ const taskMain = async ({
127
127
  const {
128
128
  resolved
129
129
  } = await core.cli.init([], options);
130
- await core.manager.run(async () => {
130
+
131
+ (async () => {
131
132
  try {
132
133
  await taskMain({
133
134
  modernConfig: resolved
@@ -136,5 +137,5 @@ const taskMain = async ({
136
137
  console.error(e.message);
137
138
  fs.removeSync(removeTsconfigPath);
138
139
  }
139
- });
140
+ })();
140
141
  })();
@@ -17,6 +17,8 @@ var _pluginChangeset = _interopRequireDefault(require("@modern-js/plugin-changes
17
17
 
18
18
  var _pluginAnalyze = _interopRequireDefault(require("@modern-js/plugin-analyze"));
19
19
 
20
+ var _pluginJarvis = _interopRequireDefault(require("@modern-js/plugin-jarvis"));
21
+
20
22
  var _hooks = require("./hooks");
21
23
 
22
24
  var _core = require("@modern-js/core");
@@ -35,7 +37,7 @@ var _default = () => ({
35
37
  name: '@modern-js/module-tools',
36
38
  post: ['@modern-js/plugin-analyze', '@modern-js/plugin-changeset'],
37
39
  registerHook: _hooks.hooks,
38
- usePlugins: [(0, _pluginChangeset.default)(), (0, _pluginAnalyze.default)()],
40
+ usePlugins: [(0, _pluginChangeset.default)(), (0, _pluginAnalyze.default)(), (0, _pluginJarvis.default)()],
39
41
  setup: api => {
40
42
  const locale = lang.getLocaleLanguage();
41
43
  local.i18n.changeLanguage({
@@ -221,7 +221,8 @@ const taskMain = async ({
221
221
  const {
222
222
  resolved
223
223
  } = await core.cli.init([], options);
224
- await core.manager.run(async () => {
224
+
225
+ (async () => {
225
226
  try {
226
227
  await taskMain({
227
228
  modernConfig: resolved
@@ -229,5 +230,5 @@ const taskMain = async ({
229
230
  } catch (e) {
230
231
  console.error(e);
231
232
  }
232
- });
233
+ })();
233
234
  })();
@@ -170,7 +170,8 @@ const taskMain = async ({
170
170
  resolved: modernConfig,
171
171
  appContext
172
172
  } = await core.cli.init([], options);
173
- await core.manager.run(async () => {
173
+
174
+ (async () => {
174
175
  try {
175
176
  await taskMain({
176
177
  modernConfig,
@@ -179,5 +180,5 @@ const taskMain = async ({
179
180
  } catch (e) {
180
181
  console.error(e.toString());
181
182
  }
182
- });
183
+ })();
183
184
  })();
@@ -161,7 +161,8 @@ const taskMain = async ({
161
161
  const {
162
162
  resolved
163
163
  } = await core.cli.init([], options);
164
- await core.manager.run(async () => {
164
+
165
+ (async () => {
165
166
  try {
166
167
  await taskMain({
167
168
  modernConfig: resolved
@@ -169,5 +170,5 @@ const taskMain = async ({
169
170
  } catch (e) {
170
171
  console.error(e);
171
172
  }
172
- });
173
+ })();
173
174
  })();
@@ -219,7 +219,8 @@ const taskMain = async ({
219
219
  resolved: modernConfig,
220
220
  appContext
221
221
  } = await core.cli.init([], options);
222
- await core.manager.run(async () => {
222
+
223
+ (async () => {
223
224
  try {
224
225
  await taskMain({
225
226
  modernConfig,
@@ -228,5 +229,5 @@ const taskMain = async ({
228
229
  } catch (e) {
229
230
  console.error(e);
230
231
  }
231
- });
232
+ })();
232
233
  })();
@@ -116,7 +116,8 @@ const taskMain = ({
116
116
  resolved: modernConfig,
117
117
  appContext
118
118
  } = await core.cli.init([], options);
119
- core.manager.run(() => {
119
+
120
+ (() => {
120
121
  try {
121
122
  taskMain({
122
123
  modernConfig,
@@ -125,5 +126,5 @@ const taskMain = ({
125
126
  } catch (e) {
126
127
  console.error(e.message);
127
128
  }
128
- });
129
+ })();
129
130
  })();
@@ -134,7 +134,8 @@ const taskMain = async ({
134
134
  const {
135
135
  resolved
136
136
  } = await core.cli.init([], options);
137
- await core.manager.run(async () => {
137
+
138
+ (async () => {
138
139
  try {
139
140
  await taskMain({
140
141
  modernConfig: resolved
@@ -144,5 +145,5 @@ const taskMain = async ({
144
145
 
145
146
  _utils.fs.removeSync(removeTsconfigPath);
146
147
  }
147
- });
148
+ })();
148
149
  })();
@@ -1,2 +1,2 @@
1
1
  import { Command } from '@modern-js/utils';
2
- export declare const newCli: (program: Command, locale?: string | undefined) => void;
2
+ export declare const newCli: (program: Command, locale?: string) => void;
@@ -1,4 +1,6 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
2
4
 
3
5
  /**
4
6
  * 1. 注册构建任务
@@ -1,4 +1,6 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
2
4
  import type { ChildProcess } from 'child_process';
3
5
  import EventEmitter from 'events';
4
6
  export declare const clearFlag = "\u001Bc";
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.5.7",
14
+ "version": "1.5.8",
15
15
  "bin": {
16
16
  "modern": "./bin/modern.js"
17
17
  },
@@ -56,16 +56,17 @@
56
56
  "@babel/types": "^7.18.0",
57
57
  "@modern-js/babel-compiler": "^1.2.6",
58
58
  "@modern-js/babel-preset-module": "^1.3.8",
59
- "@modern-js/core": "^1.12.0",
59
+ "@modern-js/core": "^1.12.2",
60
60
  "@modern-js/css-config": "^1.2.7",
61
61
  "@modern-js/i18n-cli-language-detector": "^1.2.4",
62
- "@modern-js/new-action": "^1.3.10",
63
- "@modern-js/plugin": "^1.3.7",
64
- "@modern-js/plugin-analyze": "^1.4.6",
65
- "@modern-js/plugin-changeset": "^1.2.8",
62
+ "@modern-js/new-action": "^1.3.11",
63
+ "@modern-js/plugin": "^1.4.0",
64
+ "@modern-js/plugin-analyze": "^1.4.7",
65
+ "@modern-js/plugin-changeset": "^1.3.1",
66
66
  "@modern-js/plugin-i18n": "^1.2.7",
67
+ "@modern-js/plugin-jarvis": "^1.2.14",
67
68
  "@modern-js/style-compiler": "^1.2.10",
68
- "@modern-js/utils": "^1.7.7",
69
+ "@modern-js/utils": "^1.7.9",
69
70
  "normalize-path": "^3.0.0",
70
71
  "p-map": "^4",
71
72
  "process.argv": "^0.6.0"