@modern-js/app-tools 1.6.9 → 1.6.10-alpha.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 +32 -0
- package/dist/js/modern/commands/build.js +4 -6
- package/dist/js/modern/commands/dev.js +4 -6
- package/dist/js/modern/index.js +2 -1
- package/dist/js/node/commands/build.js +4 -6
- package/dist/js/node/commands/dev.js +4 -7
- package/dist/js/node/index.js +3 -1
- package/dist/types/commands/build.d.ts +1 -1
- package/dist/types/commands/inspect.d.ts +1 -1
- package/package.json +14 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @modern-js/app-tools
|
|
2
2
|
|
|
3
|
+
## 1.6.10-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- eeedc8005: feat: add plugin-jarvis to dependencies of solutions
|
|
8
|
+
- f29e9bacf: feat: simplify context usage, no longer depend on containers
|
|
9
|
+
- Updated dependencies [77a8e9e1b]
|
|
10
|
+
- Updated dependencies [9cd364e06]
|
|
11
|
+
- Updated dependencies [550e2bd18]
|
|
12
|
+
- Updated dependencies [9cd364e06]
|
|
13
|
+
- Updated dependencies [3050accbe]
|
|
14
|
+
- Updated dependencies [2b06fe3f3]
|
|
15
|
+
- Updated dependencies [3050accbe]
|
|
16
|
+
- Updated dependencies [f29e9bacf]
|
|
17
|
+
- Updated dependencies [1a5759578]
|
|
18
|
+
- Updated dependencies [2dacc8929]
|
|
19
|
+
- Updated dependencies [338496c6b]
|
|
20
|
+
- Updated dependencies [f29e9bacf]
|
|
21
|
+
- Updated dependencies [a90bc96bd]
|
|
22
|
+
- @modern-js/server@1.5.0-alpha.0
|
|
23
|
+
- @modern-js/utils@1.7.9-alpha.0
|
|
24
|
+
- @modern-js/webpack@1.11.3-alpha.0
|
|
25
|
+
- @modern-js/core@1.12.2-alpha.0
|
|
26
|
+
- @modern-js/node-bundle-require@1.3.7-alpha.0
|
|
27
|
+
- @modern-js/plugin-analyze@1.4.7-alpha.0
|
|
28
|
+
- @modern-js/prod-server@1.1.9-alpha.0
|
|
29
|
+
- @modern-js/plugin-jarvis@1.2.14-alpha.0
|
|
30
|
+
- @modern-js/types@1.5.5-alpha.0
|
|
31
|
+
- @modern-js/plugin@1.4.0-alpha.0
|
|
32
|
+
- @modern-js/plugin-i18n@1.2.8-alpha.0
|
|
33
|
+
- @modern-js/new-action@1.3.11-alpha.0
|
|
34
|
+
|
|
3
35
|
## 1.6.9
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -5,7 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
7
|
import { webpack, getWebpackConfig, WebpackConfigTarget } from '@modern-js/webpack';
|
|
8
|
-
import {
|
|
8
|
+
import { ResolvedConfigContext } from '@modern-js/core';
|
|
9
9
|
import { formatWebpackMessages, measureFileSizesBeforeBuild, printFileSizesAfterBuild, printBuildError, logger, isUseSSRBundle, emptyDir } from '@modern-js/utils';
|
|
10
10
|
import { generateRoutes } from "../utils/routes";
|
|
11
11
|
import { buildServerConfig, emitResolvedConfig } from "../utils/config";
|
|
@@ -91,12 +91,10 @@ export const build = async (api, options) => {
|
|
|
91
91
|
});
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
cliOptions: options
|
|
97
|
-
});
|
|
98
|
-
ResolvedConfigContext.set(resolvedConfig);
|
|
94
|
+
resolvedConfig = _objectSpread(_objectSpread({}, resolvedConfig), {}, {
|
|
95
|
+
cliOptions: options
|
|
99
96
|
});
|
|
97
|
+
ResolvedConfigContext.set(resolvedConfig);
|
|
100
98
|
const {
|
|
101
99
|
distDirectory,
|
|
102
100
|
appDirectory,
|
|
@@ -5,7 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
7
|
import { fs, logger, chalk, isSSR } from '@modern-js/utils';
|
|
8
|
-
import {
|
|
8
|
+
import { ResolvedConfigContext } from '@modern-js/core';
|
|
9
9
|
import { createCompiler } from "../utils/createCompiler";
|
|
10
10
|
import { createServer } from "../utils/createServer";
|
|
11
11
|
import { generateRoutes } from "../utils/routes";
|
|
@@ -16,12 +16,10 @@ export const dev = async (api, options) => {
|
|
|
16
16
|
let userConfig = api.useResolvedConfigContext();
|
|
17
17
|
const appContext = api.useAppContext();
|
|
18
18
|
const hookRunners = api.useHookRunners();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cliOptions: options
|
|
22
|
-
});
|
|
23
|
-
ResolvedConfigContext.set(userConfig);
|
|
19
|
+
userConfig = _objectSpread(_objectSpread({}, userConfig), {}, {
|
|
20
|
+
cliOptions: options
|
|
24
21
|
});
|
|
22
|
+
ResolvedConfigContext.set(userConfig);
|
|
25
23
|
const {
|
|
26
24
|
appDirectory,
|
|
27
25
|
distDirectory,
|
package/dist/js/modern/index.js
CHANGED
|
@@ -7,6 +7,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { defineConfig, cli } from '@modern-js/core';
|
|
9
9
|
import AnalyzePlugin from '@modern-js/plugin-analyze';
|
|
10
|
+
import LintPlugin from '@modern-js/plugin-jarvis';
|
|
10
11
|
import { cleanRequireCache } from '@modern-js/utils';
|
|
11
12
|
import { hooks } from "./hooks";
|
|
12
13
|
import { i18n, localeKeys } from "./locale";
|
|
@@ -16,7 +17,7 @@ export default (() => ({
|
|
|
16
17
|
name: '@modern-js/app-tools',
|
|
17
18
|
post: ['@modern-js/plugin-analyze', '@modern-js/plugin-ssr', '@modern-js/plugin-state', '@modern-js/plugin-router', '@modern-js/plugin-polyfill'],
|
|
18
19
|
registerHook: hooks,
|
|
19
|
-
usePlugins: [AnalyzePlugin()],
|
|
20
|
+
usePlugins: [AnalyzePlugin(), LintPlugin()],
|
|
20
21
|
setup: api => {
|
|
21
22
|
const locale = getLocaleLanguage();
|
|
22
23
|
i18n.changeLanguage({
|
|
@@ -107,14 +107,12 @@ const build = async (api, options) => {
|
|
|
107
107
|
});
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
cliOptions: options
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
_core.ResolvedConfigContext.set(resolvedConfig);
|
|
110
|
+
resolvedConfig = _objectSpread(_objectSpread({}, resolvedConfig), {}, {
|
|
111
|
+
cliOptions: options
|
|
116
112
|
});
|
|
117
113
|
|
|
114
|
+
_core.ResolvedConfigContext.set(resolvedConfig);
|
|
115
|
+
|
|
118
116
|
const {
|
|
119
117
|
distDirectory,
|
|
120
118
|
appDirectory,
|
|
@@ -35,15 +35,12 @@ const dev = async (api, options) => {
|
|
|
35
35
|
let userConfig = api.useResolvedConfigContext();
|
|
36
36
|
const appContext = api.useAppContext();
|
|
37
37
|
const hookRunners = api.useHookRunners();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
userConfig = _objectSpread(_objectSpread({}, userConfig), {}, {
|
|
41
|
-
cliOptions: options
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
_core.ResolvedConfigContext.set(userConfig);
|
|
38
|
+
userConfig = _objectSpread(_objectSpread({}, userConfig), {}, {
|
|
39
|
+
cliOptions: options
|
|
45
40
|
});
|
|
46
41
|
|
|
42
|
+
_core.ResolvedConfigContext.set(userConfig);
|
|
43
|
+
|
|
47
44
|
const {
|
|
48
45
|
appDirectory,
|
|
49
46
|
distDirectory,
|
package/dist/js/node/index.js
CHANGED
|
@@ -17,6 +17,8 @@ var _core = require("@modern-js/core");
|
|
|
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 _utils = require("@modern-js/utils");
|
|
21
23
|
|
|
22
24
|
var _hooks = require("./hooks");
|
|
@@ -41,7 +43,7 @@ var _default = () => ({
|
|
|
41
43
|
name: '@modern-js/app-tools',
|
|
42
44
|
post: ['@modern-js/plugin-analyze', '@modern-js/plugin-ssr', '@modern-js/plugin-state', '@modern-js/plugin-router', '@modern-js/plugin-polyfill'],
|
|
43
45
|
registerHook: _hooks.hooks,
|
|
44
|
-
usePlugins: [(0, _pluginAnalyze.default)()],
|
|
46
|
+
usePlugins: [(0, _pluginAnalyze.default)(), (0, _pluginJarvis.default)()],
|
|
45
47
|
setup: api => {
|
|
46
48
|
const locale = (0, _language.getLocaleLanguage)();
|
|
47
49
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PluginAPI } from '@modern-js/core';
|
|
2
2
|
import type { BuildOptions } from '../utils/types';
|
|
3
|
-
export declare const build: (api: PluginAPI, options?: BuildOptions
|
|
3
|
+
export declare const build: (api: PluginAPI, options?: BuildOptions) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Configuration, WebpackConfigTarget } from '@modern-js/webpack';
|
|
2
2
|
import type { PluginAPI, NormalizedConfig, IAppContext } from '@modern-js/core';
|
|
3
3
|
import type { InspectOptions } from '../utils/types';
|
|
4
|
-
export declare const formatWebpackConfig: (config: Configuration, verbose?: boolean
|
|
4
|
+
export declare const formatWebpackConfig: (config: Configuration, verbose?: boolean) => string;
|
|
5
5
|
export declare const inspect: (api: PluginAPI, options: InspectOptions) => void;
|
|
6
6
|
export declare const getTagByWebpackTarget: (webpackTarget: WebpackConfigTarget) => "modern" | "client" | "ssr";
|
|
7
7
|
export declare const printInspectResult: (webpackTarget: WebpackConfigTarget, appContext: IAppContext, resolvedConfig: NormalizedConfig, options: InspectOptions) => string;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.6.
|
|
14
|
+
"version": "1.6.10-alpha.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -57,21 +57,22 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@babel/runtime": "^7.18.0",
|
|
60
|
-
"@modern-js/core": "^1.12.
|
|
60
|
+
"@modern-js/core": "^1.12.2-alpha.0",
|
|
61
61
|
"@modern-js/i18n-cli-language-detector": "^1.2.4",
|
|
62
|
-
"@modern-js/new-action": "^1.3.
|
|
63
|
-
"@modern-js/node-bundle-require": "^1.3.
|
|
64
|
-
"@modern-js/plugin": "^1.
|
|
65
|
-
"@modern-js/plugin-analyze": "^1.4.
|
|
66
|
-
"@modern-js/plugin-i18n": "^1.2.
|
|
67
|
-
"@modern-js/
|
|
68
|
-
"@modern-js/server": "^1.
|
|
69
|
-
"@modern-js/
|
|
70
|
-
"@modern-js/
|
|
71
|
-
"@modern-js/
|
|
62
|
+
"@modern-js/new-action": "^1.3.11-alpha.0",
|
|
63
|
+
"@modern-js/node-bundle-require": "^1.3.7-alpha.0",
|
|
64
|
+
"@modern-js/plugin": "^1.4.0-alpha.0",
|
|
65
|
+
"@modern-js/plugin-analyze": "^1.4.7-alpha.0",
|
|
66
|
+
"@modern-js/plugin-i18n": "^1.2.8-alpha.0",
|
|
67
|
+
"@modern-js/plugin-jarvis": "^1.2.14-alpha.0",
|
|
68
|
+
"@modern-js/prod-server": "^1.1.9-alpha.0",
|
|
69
|
+
"@modern-js/server": "^1.5.0-alpha.0",
|
|
70
|
+
"@modern-js/types": "^1.5.5-alpha.0",
|
|
71
|
+
"@modern-js/utils": "^1.7.9-alpha.0",
|
|
72
|
+
"@modern-js/webpack": "^1.11.3-alpha.0"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
|
-
"@modern-js/server-core": "1.
|
|
75
|
+
"@modern-js/server-core": "1.4.0-alpha.0",
|
|
75
76
|
"@scripts/build": "0.0.0",
|
|
76
77
|
"@scripts/jest-config": "0.0.0",
|
|
77
78
|
"@types/jest": "^27",
|