@modern-js/core 1.12.2-alpha.0 → 1.12.2-beta.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 +0 -15
- package/dist/config/index.d.ts +2 -3
- package/dist/config/index.js +2 -3
- package/dist/config/schema/index.d.ts +3 -0
- package/dist/config/schema/server.d.ts +3 -0
- package/dist/config/schema/server.js +1 -0
- package/dist/config/types/index.d.ts +2 -1
- package/dist/pluginAPI.d.ts +1 -1
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
# @modern-js/core
|
|
2
2
|
|
|
3
|
-
## 1.12.2-alpha.0
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 9cd364e06: The buildPreset will be split out of a buildConfig, preset only supports built-in strings, config this piece to remove speedyOptions, watch, add platform, splitting, minify, external, and add tools.speedy
|
|
8
|
-
- f29e9bacf: feat: simplify context usage, no longer depend on containers
|
|
9
|
-
- a90bc96bd: perf(babel): skip babel-plugin-import if package not installed
|
|
10
|
-
- Updated dependencies [9cd364e06]
|
|
11
|
-
- Updated dependencies [3050accbe]
|
|
12
|
-
- Updated dependencies [f29e9bacf]
|
|
13
|
-
- Updated dependencies [a90bc96bd]
|
|
14
|
-
- @modern-js/utils@1.7.9-alpha.0
|
|
15
|
-
- @modern-js/load-config@1.3.6-alpha.0
|
|
16
|
-
- @modern-js/plugin@1.4.0-alpha.0
|
|
17
|
-
|
|
18
3
|
## 1.12.1
|
|
19
4
|
|
|
20
5
|
### Patch Changes
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ErrorObject } from '../../compiled/ajv';
|
|
2
2
|
import { defaults } from './defaults';
|
|
3
|
-
import { NormalizedConfig } from './mergeConfig';
|
|
3
|
+
import { mergeConfig, NormalizedConfig } from './mergeConfig';
|
|
4
4
|
import { PluginValidateSchema } from './schema';
|
|
5
5
|
import type { UserConfig, ConfigParam, LoadedConfig } from './types';
|
|
6
6
|
export { defaults as defaultsConfig };
|
|
7
|
-
export
|
|
7
|
+
export { mergeConfig };
|
|
8
8
|
export * from './types';
|
|
9
|
-
export * from './schema';
|
|
10
9
|
export declare const addServerConfigToDeps: (dependencies: string[], appDirectory: string, serverConfigFile: string) => Promise<void>;
|
|
11
10
|
export declare const defineConfig: (config: ConfigParam) => ConfigParam;
|
|
12
11
|
/**
|
package/dist/config/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.resolveConfig = exports.loadUserConfig = exports.assignPkgConfig = exports.defineConfig = exports.addServerConfigToDeps = exports.defaultsConfig = void 0;
|
|
20
|
+
exports.resolveConfig = exports.loadUserConfig = exports.assignPkgConfig = exports.defineConfig = exports.addServerConfigToDeps = exports.mergeConfig = exports.defaultsConfig = void 0;
|
|
21
21
|
const load_config_1 = require("@modern-js/load-config");
|
|
22
22
|
const utils_1 = require("@modern-js/utils");
|
|
23
23
|
const lodash_1 = require("@modern-js/utils/lodash");
|
|
@@ -28,11 +28,10 @@ const repeatKeyWarning_1 = require("../utils/repeatKeyWarning");
|
|
|
28
28
|
const defaults_1 = require("./defaults");
|
|
29
29
|
Object.defineProperty(exports, "defaultsConfig", { enumerable: true, get: function () { return defaults_1.defaults; } });
|
|
30
30
|
const mergeConfig_1 = require("./mergeConfig");
|
|
31
|
+
Object.defineProperty(exports, "mergeConfig", { enumerable: true, get: function () { return mergeConfig_1.mergeConfig; } });
|
|
31
32
|
const schema_1 = require("./schema");
|
|
32
33
|
const debug = (0, utils_1.createDebugger)('resolve-config');
|
|
33
|
-
__exportStar(require("./mergeConfig"), exports);
|
|
34
34
|
__exportStar(require("./types"), exports);
|
|
35
|
-
__exportStar(require("./schema"), exports);
|
|
36
35
|
const addServerConfigToDeps = async (dependencies, appDirectory, serverConfigFile) => {
|
|
37
36
|
const serverConfig = await (0, utils_1.getServerConfig)(appDirectory, serverConfigFile);
|
|
38
37
|
if (serverConfig) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { IncomingMessage, ServerResponse } from 'http';
|
|
3
3
|
import type { NextFunction, BffProxyOptions } from '@modern-js/types';
|
|
4
|
-
import type { MetaOptions, ChainIdentifier } from '@modern-js/utils';
|
|
4
|
+
import type { MetaOptions, ChainIdentifier, WatchOptions } from '@modern-js/utils';
|
|
5
5
|
import type { TransformOptions, PluginItem as BabelPlugin } from '@babel/core';
|
|
6
6
|
import type webpack from 'webpack';
|
|
7
7
|
import type { RuleSetRule, Configuration as WebpackConfiguration, WebpackPluginInstance } from 'webpack';
|
|
@@ -115,6 +115,7 @@ export interface ServerConfig {
|
|
|
115
115
|
logger?: boolean | Record<string, any>;
|
|
116
116
|
metrics?: boolean | Record<string, any>;
|
|
117
117
|
enableMicroFrontendDebug?: boolean;
|
|
118
|
+
watchOptions?: WatchOptions;
|
|
118
119
|
}
|
|
119
120
|
export declare type DevProxyOptions = string | Record<string, string>;
|
|
120
121
|
export interface DevConfig {
|
package/dist/pluginAPI.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const pluginAPI: {
|
|
|
5
5
|
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
6
6
|
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
7
7
|
useConfigContext: () => import("./config").UserConfig;
|
|
8
|
-
useResolvedConfigContext: () => import("
|
|
8
|
+
useResolvedConfigContext: () => import(".").NormalizedConfig;
|
|
9
9
|
};
|
|
10
10
|
export type { IAppContext } from '@modern-js/types';
|
|
11
11
|
/** all apis for cli plugin */
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.12.2-
|
|
14
|
+
"version": "1.12.2-beta.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"main": "./dist/index.js",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@modern-js/load-config": "^1.3.
|
|
43
|
-
"@modern-js/plugin": "^1.
|
|
44
|
-
"@modern-js/utils": "^1.7.
|
|
42
|
+
"@modern-js/load-config": "^1.3.4",
|
|
43
|
+
"@modern-js/plugin": "^1.3.8",
|
|
44
|
+
"@modern-js/utils": "^1.7.8"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@jest/types": "^27.0.6",
|
|
48
|
-
"@modern-js/types": "1.5.
|
|
48
|
+
"@modern-js/types": "1.5.4",
|
|
49
49
|
"@scripts/build": "0.0.0",
|
|
50
50
|
"@scripts/jest-config": "0.0.0",
|
|
51
51
|
"@types/babel__code-frame": "^7.0.3",
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
"sideEffects": false,
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"registry": "https://registry.npmjs.org/",
|
|
71
|
-
"access": "public"
|
|
71
|
+
"access": "public",
|
|
72
|
+
"types": "./dist/index.d.ts"
|
|
72
73
|
},
|
|
73
74
|
"wireit": {
|
|
74
75
|
"build": {
|