@modern-js/core 1.12.4 → 1.13.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 +20 -0
- package/dist/config/index.js +2 -2
- package/dist/index.d.ts +3 -5
- package/dist/load-configs/index.d.ts +34 -0
- package/dist/load-configs/index.js +124 -0
- package/dist/manager.d.ts +9 -9
- package/dist/types/cli.d.ts +73 -0
- package/dist/types/cli.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +17 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @modern-js/core
|
|
2
2
|
|
|
3
|
+
## 1.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 33cebd2: chore(core): move Hooks types define to `@modern-js/core`
|
|
8
|
+
|
|
9
|
+
chore(core): 移动 Hooks 类型定义到 `@modern-js/core` 包
|
|
10
|
+
|
|
11
|
+
- 33cebd2: chore(plugin-i18n): merge `@modern-js/i18n-cli-language-detector` to `@modern-js/plugin-i18n`
|
|
12
|
+
|
|
13
|
+
chore(plugin-i18n): 合并 `@modern-js/i18n-cli-language-detector` 包到 `@modern-js/plugin-i18n` 包作为子路径
|
|
14
|
+
|
|
15
|
+
- 33cebd2: chore(core): merge `@modern-js/load-config` package to `@modern-js/core` utils
|
|
16
|
+
|
|
17
|
+
chore(core): 合并 `@modern-js/load-config` 包到 `@modern-js/core` 包作为 utils 函数
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- @modern-js/utils@1.7.12
|
|
22
|
+
|
|
3
23
|
## 1.12.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/config/index.js
CHANGED
|
@@ -18,9 +18,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.resolveConfig = exports.loadUserConfig = exports.assignPkgConfig = exports.defineConfig = exports.addServerConfigToDeps = exports.defaultsConfig = void 0;
|
|
21
|
-
const load_config_1 = require("@modern-js/load-config");
|
|
22
21
|
const utils_1 = require("@modern-js/utils");
|
|
23
22
|
const lodash_1 = require("@modern-js/utils/lodash");
|
|
23
|
+
const load_configs_1 = require("../load-configs");
|
|
24
24
|
const ajv_1 = __importDefault(require("../../compiled/ajv"));
|
|
25
25
|
const ajv_keywords_1 = __importDefault(require("../../compiled/ajv-keywords"));
|
|
26
26
|
const better_ajv_errors_1 = __importDefault(require("../../compiled/better-ajv-errors"));
|
|
@@ -56,7 +56,7 @@ const assignPkgConfig = (userConfig = {}, pkgConfig = {}) => (0, lodash_1.mergeW
|
|
|
56
56
|
});
|
|
57
57
|
exports.assignPkgConfig = assignPkgConfig;
|
|
58
58
|
const loadUserConfig = async (appDirectory, filePath, packageJsonConfig) => {
|
|
59
|
-
const loaded = await (0,
|
|
59
|
+
const loaded = await (0, load_configs_1.loadConfig)(appDirectory, filePath, packageJsonConfig);
|
|
60
60
|
const config = !loaded
|
|
61
61
|
? {}
|
|
62
62
|
: await (typeof loaded.config === 'function'
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { INTERNAL_PLUGINS } from '@modern-js/utils';
|
|
2
|
-
import type { Hooks } from '@modern-js/types';
|
|
3
2
|
import type { ErrorObject } from '../compiled/ajv';
|
|
4
3
|
import { TransformPlugin } from './loadPlugins';
|
|
5
4
|
import { IAppContext, initAppContext } from './context';
|
|
6
|
-
import type { NormalizedConfig } from './config/mergeConfig';
|
|
7
|
-
export type { Hooks };
|
|
8
5
|
export * from './config';
|
|
6
|
+
export type { Hooks, ImportSpecifier, ImportStatement, RuntimePlugin, } from './types';
|
|
9
7
|
export * from '@modern-js/plugin';
|
|
10
8
|
export { manager, mountHook, usePlugins, createPlugin, registerHook, } from './manager';
|
|
11
9
|
export type { CliHooks, CliPlugin, CliHookCallbacks } from './manager';
|
|
12
10
|
export { AppContext, ConfigContext, ResolvedConfigContext, useAppContext, useConfigContext, useResolvedConfigContext, } from './pluginAPI';
|
|
13
11
|
export type { PluginAPI } from './pluginAPI';
|
|
14
|
-
export type {
|
|
12
|
+
export type { IAppContext };
|
|
15
13
|
declare const initAppDir: (cwd?: string) => Promise<string>;
|
|
16
14
|
export interface CoreOptions {
|
|
17
15
|
version?: string;
|
|
@@ -52,7 +50,7 @@ export declare const cli: {
|
|
|
52
50
|
init: (argv?: string[], options?: CoreOptions) => Promise<{
|
|
53
51
|
loadedConfig: import("./config").LoadedConfig;
|
|
54
52
|
appContext: IAppContext;
|
|
55
|
-
resolved: NormalizedConfig;
|
|
53
|
+
resolved: import("./config").NormalizedConfig;
|
|
56
54
|
}>;
|
|
57
55
|
run: (argv: string[], options?: CoreOptions) => Promise<void>;
|
|
58
56
|
restart: () => Promise<void>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
export declare const CONFIG_FILE_NAME = "modern.config";
|
|
3
|
+
export declare const PACKAGE_JSON_CONFIG_NAME = "modernConfig";
|
|
4
|
+
/**
|
|
5
|
+
* Get user config from package.json.
|
|
6
|
+
* @param appDirectory - App root directory.
|
|
7
|
+
* @returns modernConfig or undefined
|
|
8
|
+
*/
|
|
9
|
+
export declare const getPackageConfig: <T>(appDirectory: string, packageJsonConfig?: string) => T | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Get the file dependencies by module.children, ignore file path in node_modules and this monorepo packages default.
|
|
12
|
+
* @param filePath - Absolute file path.
|
|
13
|
+
* @returns File dependencies array.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getDependencies: (filePath: string) => string[];
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param targetDir target dir
|
|
19
|
+
* @param overtime Unit of second
|
|
20
|
+
*/
|
|
21
|
+
export declare const clearFilesOverTime: (targetDir: string, overtime: number) => Promise<void>;
|
|
22
|
+
export declare const getConfigFilePath: (appDirectory: string, filePath?: string) => string | false;
|
|
23
|
+
/**
|
|
24
|
+
* Parse and load user config file, support extensions like .ts, mjs, js, ejs.
|
|
25
|
+
* @param appDirectory - App root directory, from which start search user config file.
|
|
26
|
+
* @param filePath - Specific absolute config file path.
|
|
27
|
+
* @returns Object contain config file path, user config object and dependency files used by config file.
|
|
28
|
+
*/
|
|
29
|
+
export declare const loadConfig: <T>(appDirectory: string, filePath?: string, packageJsonConfig?: string) => Promise<{
|
|
30
|
+
path: string | false;
|
|
31
|
+
config?: T | undefined;
|
|
32
|
+
dependencies?: string[] | undefined;
|
|
33
|
+
pkgConfig?: T | undefined;
|
|
34
|
+
}>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.loadConfig = exports.getConfigFilePath = exports.clearFilesOverTime = exports.getDependencies = exports.getPackageConfig = exports.PACKAGE_JSON_CONFIG_NAME = exports.CONFIG_FILE_NAME = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const utils_1 = require("@modern-js/utils");
|
|
9
|
+
const node_bundle_require_1 = require("@modern-js/node-bundle-require");
|
|
10
|
+
const debug = (0, utils_1.createDebugger)('load-config');
|
|
11
|
+
exports.CONFIG_FILE_NAME = 'modern.config';
|
|
12
|
+
exports.PACKAGE_JSON_CONFIG_NAME = 'modernConfig';
|
|
13
|
+
/**
|
|
14
|
+
* Get user config from package.json.
|
|
15
|
+
* @param appDirectory - App root directory.
|
|
16
|
+
* @returns modernConfig or undefined
|
|
17
|
+
*/
|
|
18
|
+
const getPackageConfig = (appDirectory, packageJsonConfig) => {
|
|
19
|
+
const json = JSON.parse(utils_1.fs.readFileSync(path_1.default.resolve(appDirectory, './package.json'), 'utf8'));
|
|
20
|
+
return json[packageJsonConfig !== null && packageJsonConfig !== void 0 ? packageJsonConfig : exports.PACKAGE_JSON_CONFIG_NAME];
|
|
21
|
+
};
|
|
22
|
+
exports.getPackageConfig = getPackageConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Get the file dependencies by module.children, ignore file path in node_modules and this monorepo packages default.
|
|
25
|
+
* @param filePath - Absolute file path.
|
|
26
|
+
* @returns File dependencies array.
|
|
27
|
+
*/
|
|
28
|
+
const getDependencies = (filePath) => {
|
|
29
|
+
const mod = require.cache[filePath];
|
|
30
|
+
if (!mod) {
|
|
31
|
+
debug(`${filePath} has not been required yet`);
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
const deps = [];
|
|
35
|
+
if (!/\/node_modules\/|\/modern-js\/packages\//.test(mod.id)) {
|
|
36
|
+
deps.push(mod.id);
|
|
37
|
+
for (const child of mod.children) {
|
|
38
|
+
deps.push(...(0, exports.getDependencies)(child.id));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return deps;
|
|
42
|
+
};
|
|
43
|
+
exports.getDependencies = getDependencies;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param targetDir target dir
|
|
47
|
+
* @param overtime Unit of second
|
|
48
|
+
*/
|
|
49
|
+
const clearFilesOverTime = async (targetDir, overtime) => {
|
|
50
|
+
// when stats is true, globby return Stats[]
|
|
51
|
+
const files = (await (0, utils_1.globby)(`${targetDir}/**/*`, {
|
|
52
|
+
stats: true,
|
|
53
|
+
absolute: true,
|
|
54
|
+
}));
|
|
55
|
+
const currentTime = Date.now();
|
|
56
|
+
if (files.length > 0) {
|
|
57
|
+
for (const file of files) {
|
|
58
|
+
if (currentTime - file.stats.birthtimeMs >= overtime * 1000) {
|
|
59
|
+
utils_1.fs.unlinkSync(file.path);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
exports.clearFilesOverTime = clearFilesOverTime;
|
|
65
|
+
const bundleRequireWithCatch = async (configFile, { appDirectory }) => {
|
|
66
|
+
try {
|
|
67
|
+
const mod = await (0, node_bundle_require_1.bundleRequire)(configFile, {
|
|
68
|
+
autoClear: false,
|
|
69
|
+
getOutputFile: async (filePath) => {
|
|
70
|
+
const defaultOutputFileName = path_1.default.basename(await (0, node_bundle_require_1.defaultGetOutputFile)(filePath));
|
|
71
|
+
const outputPath = path_1.default.join(appDirectory, utils_1.CONFIG_CACHE_DIR);
|
|
72
|
+
// 10 min
|
|
73
|
+
const timeLimit = 10 * 60;
|
|
74
|
+
await (0, exports.clearFilesOverTime)(outputPath, timeLimit);
|
|
75
|
+
return path_1.default.join(outputPath, defaultOutputFileName);
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
return mod;
|
|
79
|
+
}
|
|
80
|
+
catch (e) {
|
|
81
|
+
if (e instanceof Error) {
|
|
82
|
+
e.message = `Get Error while loading config file: ${configFile}, please check it and retry.\n${e.message || ''}`;
|
|
83
|
+
}
|
|
84
|
+
throw e;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const getConfigFilePath = (appDirectory, filePath) => {
|
|
88
|
+
if (filePath) {
|
|
89
|
+
if (path_1.default.isAbsolute(filePath)) {
|
|
90
|
+
return filePath;
|
|
91
|
+
}
|
|
92
|
+
return path_1.default.resolve(appDirectory, filePath);
|
|
93
|
+
}
|
|
94
|
+
return (0, utils_1.findExists)(utils_1.CONFIG_FILE_EXTENSIONS.map(extension => path_1.default.resolve(appDirectory, `${exports.CONFIG_FILE_NAME}${extension}`)));
|
|
95
|
+
};
|
|
96
|
+
exports.getConfigFilePath = getConfigFilePath;
|
|
97
|
+
/**
|
|
98
|
+
* Parse and load user config file, support extensions like .ts, mjs, js, ejs.
|
|
99
|
+
* @param appDirectory - App root directory, from which start search user config file.
|
|
100
|
+
* @param filePath - Specific absolute config file path.
|
|
101
|
+
* @returns Object contain config file path, user config object and dependency files used by config file.
|
|
102
|
+
*/
|
|
103
|
+
const loadConfig = async (appDirectory, filePath, packageJsonConfig) => {
|
|
104
|
+
const configFile = (0, exports.getConfigFilePath)(appDirectory, filePath);
|
|
105
|
+
const pkgConfig = (0, exports.getPackageConfig)(appDirectory, packageJsonConfig);
|
|
106
|
+
let config;
|
|
107
|
+
const dependencies = pkgConfig
|
|
108
|
+
? [path_1.default.resolve(appDirectory, './package.json')]
|
|
109
|
+
: [];
|
|
110
|
+
if (configFile) {
|
|
111
|
+
delete require.cache[configFile];
|
|
112
|
+
const mod = await bundleRequireWithCatch(configFile, { appDirectory });
|
|
113
|
+
config = mod.default || mod;
|
|
114
|
+
// TODO: get deps.
|
|
115
|
+
// dependencies = dependencies.concat(getDependencies(configFile));
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
path: configFile,
|
|
119
|
+
config,
|
|
120
|
+
pkgConfig,
|
|
121
|
+
dependencies,
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
exports.loadConfig = loadConfig;
|
package/dist/manager.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToThreads, ToRunners, AsyncSetup, PluginOptions, AsyncWorkflow, AsyncWaterfall, ParallelWorkflow } from '@modern-js/plugin';
|
|
2
|
-
import type { Hooks } from '
|
|
2
|
+
import type { Hooks } from './types';
|
|
3
3
|
import type { Command } from './utils/commander';
|
|
4
4
|
import type { NormalizedConfig } from './config/mergeConfig';
|
|
5
5
|
import type { UserConfig } from './config';
|
|
@@ -45,26 +45,26 @@ export declare type CliHooks = typeof baseHooks & Hooks;
|
|
|
45
45
|
/** All hook callbacks of cli plugin. */
|
|
46
46
|
export declare type CliHookCallbacks = ToThreads<CliHooks>;
|
|
47
47
|
export declare const manager: import("@modern-js/plugin").AsyncManager<CliHooks, {
|
|
48
|
-
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
49
|
-
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
48
|
+
setAppContext: (value: import("@modern-js/types/cli").IAppContext) => void;
|
|
49
|
+
useAppContext: () => import("@modern-js/types/cli").IAppContext;
|
|
50
50
|
useConfigContext: () => UserConfig;
|
|
51
51
|
useResolvedConfigContext: () => NormalizedConfig;
|
|
52
52
|
}>;
|
|
53
53
|
/** Plugin options of a cli plugin. */
|
|
54
54
|
export declare type CliPlugin = PluginOptions<CliHooks, AsyncSetup<CliHooks, typeof pluginAPI>>;
|
|
55
55
|
export declare const createPlugin: (setup?: AsyncSetup<CliHooks, {
|
|
56
|
-
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
57
|
-
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
56
|
+
setAppContext: (value: import("@modern-js/types/cli").IAppContext) => void;
|
|
57
|
+
useAppContext: () => import("@modern-js/types/cli").IAppContext;
|
|
58
58
|
useConfigContext: () => UserConfig;
|
|
59
59
|
useResolvedConfigContext: () => NormalizedConfig;
|
|
60
60
|
}> | undefined, options?: PluginOptions<CliHooks, AsyncSetup<CliHooks, {
|
|
61
|
-
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
62
|
-
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
61
|
+
setAppContext: (value: import("@modern-js/types/cli").IAppContext) => void;
|
|
62
|
+
useAppContext: () => import("@modern-js/types/cli").IAppContext;
|
|
63
63
|
useConfigContext: () => UserConfig;
|
|
64
64
|
useResolvedConfigContext: () => NormalizedConfig;
|
|
65
65
|
}>> | undefined) => import("@modern-js/plugin").AsyncPlugin<CliHooks, {
|
|
66
|
-
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
67
|
-
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
66
|
+
setAppContext: (value: import("@modern-js/types/cli").IAppContext) => void;
|
|
67
|
+
useAppContext: () => import("@modern-js/types/cli").IAppContext;
|
|
68
68
|
useConfigContext: () => UserConfig;
|
|
69
69
|
useResolvedConfigContext: () => NormalizedConfig;
|
|
70
70
|
}>, registerHook: (newHooks: Partial<CliHooks>) => void, mountHook: () => ToRunners<CliHooks>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AsyncWaterfall, AsyncWorkflow } from '@modern-js/plugin';
|
|
2
|
+
import { Entrypoint, HtmlPartials, Route, ServerRoute } from '@modern-js/types';
|
|
3
|
+
import { Compiler, Configuration, MultiCompiler } from 'webpack';
|
|
4
|
+
export interface ImportSpecifier {
|
|
5
|
+
local?: string;
|
|
6
|
+
imported?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ImportStatement {
|
|
9
|
+
specifiers: ImportSpecifier[];
|
|
10
|
+
value: string;
|
|
11
|
+
initialize?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface RuntimePlugin {
|
|
14
|
+
name: string;
|
|
15
|
+
options: string;
|
|
16
|
+
args?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Hooks {
|
|
19
|
+
beforeDev: AsyncWorkflow<void, unknown>;
|
|
20
|
+
afterDev: AsyncWorkflow<void, unknown>;
|
|
21
|
+
beforeCreateCompiler: AsyncWorkflow<{
|
|
22
|
+
webpackConfigs: Configuration[];
|
|
23
|
+
}, unknown>;
|
|
24
|
+
afterCreateCompiler: AsyncWorkflow<{
|
|
25
|
+
compiler: Compiler | MultiCompiler | undefined;
|
|
26
|
+
}, unknown>;
|
|
27
|
+
beforePrintInstructions: AsyncWaterfall<{
|
|
28
|
+
instructions: string;
|
|
29
|
+
}>;
|
|
30
|
+
beforeBuild: AsyncWorkflow<{
|
|
31
|
+
webpackConfigs: Configuration[];
|
|
32
|
+
}, unknown>;
|
|
33
|
+
afterBuild: AsyncWorkflow<void, unknown>;
|
|
34
|
+
afterMonorepoDeploy: AsyncWorkflow<{
|
|
35
|
+
operator: any;
|
|
36
|
+
deployProjectNames: string[];
|
|
37
|
+
}, void>;
|
|
38
|
+
beforeDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
39
|
+
afterDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
40
|
+
modifyEntryExport: AsyncWaterfall<{
|
|
41
|
+
entrypoint: Entrypoint;
|
|
42
|
+
exportStatement: string;
|
|
43
|
+
}>;
|
|
44
|
+
modifyEntryImports: AsyncWaterfall<{
|
|
45
|
+
imports: ImportStatement[];
|
|
46
|
+
entrypoint: Entrypoint;
|
|
47
|
+
}>;
|
|
48
|
+
modifyEntryRuntimePlugins: AsyncWaterfall<{
|
|
49
|
+
entrypoint: Entrypoint;
|
|
50
|
+
plugins: RuntimePlugin[];
|
|
51
|
+
}>;
|
|
52
|
+
modifyEntryRenderFunction: AsyncWaterfall<{
|
|
53
|
+
entrypoint: Entrypoint;
|
|
54
|
+
code: string;
|
|
55
|
+
}>;
|
|
56
|
+
modifyFileSystemRoutes: AsyncWaterfall<{
|
|
57
|
+
entrypoint: Entrypoint;
|
|
58
|
+
routes: Route[];
|
|
59
|
+
}>;
|
|
60
|
+
modifyServerRoutes: AsyncWaterfall<{
|
|
61
|
+
routes: ServerRoute[];
|
|
62
|
+
}>;
|
|
63
|
+
htmlPartials: AsyncWaterfall<{
|
|
64
|
+
entrypoint: Entrypoint;
|
|
65
|
+
partials: HtmlPartials;
|
|
66
|
+
}>;
|
|
67
|
+
addRuntimeExports: AsyncWaterfall<void>;
|
|
68
|
+
beforeGenerateRoutes: AsyncWaterfall<{
|
|
69
|
+
entrypoint: Entrypoint;
|
|
70
|
+
code: string;
|
|
71
|
+
}>;
|
|
72
|
+
addDefineTypes: AsyncWaterfall<void>;
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cli';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./cli"), exports);
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.13.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/
|
|
43
|
-
"@modern-js/
|
|
44
|
-
"@modern-js/
|
|
42
|
+
"@modern-js/plugin": "^1.4.2",
|
|
43
|
+
"@modern-js/utils": "^1.7.12",
|
|
44
|
+
"@modern-js/node-bundle-require": "^1.3.7"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@jest/types": "^27.0.6",
|
|
48
|
-
"@modern-js/types": "1.
|
|
48
|
+
"@modern-js/types": "1.6.0",
|
|
49
49
|
"@scripts/build": "0.0.0",
|
|
50
50
|
"@scripts/jest-config": "0.0.0",
|
|
51
51
|
"@types/babel__code-frame": "^7.0.3",
|