@modern-js/new-action 2.32.2-alpha.1 → 2.33.1
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/dist/cjs/module.js +4 -2
- package/dist/cjs/monorepo.js +3 -2
- package/dist/cjs/mwa.js +4 -2
- package/dist/esm/module.js +4 -2
- package/dist/esm/monorepo.js +3 -2
- package/dist/esm/mwa.js +4 -2
- package/dist/types/module.d.ts +1 -0
- package/dist/types/monorepo.d.ts +1 -0
- package/dist/types/mwa.d.ts +1 -0
- package/package.json +6 -6
- package/CHANGELOG.md +0 -1469
package/dist/cjs/module.js
CHANGED
|
@@ -15,7 +15,7 @@ const _generatorcommon = require("@modern-js/generator-common");
|
|
|
15
15
|
const _generatorutils = require("@modern-js/generator-utils");
|
|
16
16
|
const _utils = require("./utils");
|
|
17
17
|
const ModuleNewAction = async (options) => {
|
|
18
|
-
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", cwd = process.cwd() } = options;
|
|
18
|
+
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
|
19
19
|
let UserConfig = {};
|
|
20
20
|
try {
|
|
21
21
|
UserConfig = JSON.parse(config);
|
|
@@ -76,7 +76,9 @@ const ModuleNewAction = async (options) => {
|
|
|
76
76
|
distTag,
|
|
77
77
|
cwd
|
|
78
78
|
});
|
|
79
|
-
const finalConfig = (0, _lodash.merge)(UserConfig,
|
|
79
|
+
const finalConfig = (0, _lodash.merge)(UserConfig, {
|
|
80
|
+
noNeedInstall: !needInstall
|
|
81
|
+
}, ans, {
|
|
80
82
|
locale: UserConfig.locale || locale,
|
|
81
83
|
packageManager: UserConfig.packageManager || await (0, _generatorutils.getPackageManager)(cwd),
|
|
82
84
|
distTag
|
package/dist/cjs/monorepo.js
CHANGED
|
@@ -17,7 +17,7 @@ const _generatorutils = require("@modern-js/generator-utils");
|
|
|
17
17
|
const _utils = require("./utils");
|
|
18
18
|
const REPO_GENERATOR = "@modern-js/repo-generator";
|
|
19
19
|
const MonorepoNewAction = async (options) => {
|
|
20
|
-
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", plugin = [], cwd = process.cwd() } = options;
|
|
20
|
+
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", plugin = [], cwd = process.cwd(), needInstall = true } = options;
|
|
21
21
|
let UserConfig = {};
|
|
22
22
|
try {
|
|
23
23
|
UserConfig = JSON.parse(config);
|
|
@@ -50,7 +50,8 @@ const MonorepoNewAction = async (options) => {
|
|
|
50
50
|
packageManager: UserConfig.packageManager || await (0, _generatorutils.getPackageManager)(cwd),
|
|
51
51
|
isMonorepo: true,
|
|
52
52
|
distTag,
|
|
53
|
-
plugins
|
|
53
|
+
plugins,
|
|
54
|
+
noNeedInstall: !needInstall
|
|
54
55
|
});
|
|
55
56
|
let generator = REPO_GENERATOR;
|
|
56
57
|
if (process.env.CODESMITH_ENV === "development") {
|
package/dist/cjs/mwa.js
CHANGED
|
@@ -15,7 +15,7 @@ const _generatorcommon = require("@modern-js/generator-common");
|
|
|
15
15
|
const _generatorutils = require("@modern-js/generator-utils");
|
|
16
16
|
const _utils = require("./utils");
|
|
17
17
|
const MWANewAction = async (options) => {
|
|
18
|
-
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", cwd = process.cwd() } = options;
|
|
18
|
+
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
|
19
19
|
let UserConfig = {};
|
|
20
20
|
try {
|
|
21
21
|
UserConfig = JSON.parse(config);
|
|
@@ -73,7 +73,9 @@ const MWANewAction = async (options) => {
|
|
|
73
73
|
distTag,
|
|
74
74
|
cwd
|
|
75
75
|
});
|
|
76
|
-
const finalConfig = (0, _lodash.merge)(UserConfig,
|
|
76
|
+
const finalConfig = (0, _lodash.merge)(UserConfig, {
|
|
77
|
+
noNeedInstall: !needInstall
|
|
78
|
+
}, ans, {
|
|
77
79
|
locale: UserConfig.locale || locale,
|
|
78
80
|
packageManager: UserConfig.packageManager || await (0, _generatorutils.getPackageManager)(cwd),
|
|
79
81
|
distTag
|
package/dist/esm/module.js
CHANGED
|
@@ -5,7 +5,7 @@ import { i18n, getModuleNewActionSchema, ModuleActionFunctions, ModuleActionFunc
|
|
|
5
5
|
import { getPackageManager, getModernPluginVersion } from "@modern-js/generator-utils";
|
|
6
6
|
import { alreadyRepo, getGeneratorPath, hasEnabledFunction, usePluginNameExport } from "./utils";
|
|
7
7
|
export const ModuleNewAction = async (options) => {
|
|
8
|
-
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", cwd = process.cwd() } = options;
|
|
8
|
+
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
|
9
9
|
let UserConfig = {};
|
|
10
10
|
try {
|
|
11
11
|
UserConfig = JSON.parse(config);
|
|
@@ -66,7 +66,9 @@ export const ModuleNewAction = async (options) => {
|
|
|
66
66
|
distTag,
|
|
67
67
|
cwd
|
|
68
68
|
});
|
|
69
|
-
const finalConfig = merge(UserConfig,
|
|
69
|
+
const finalConfig = merge(UserConfig, {
|
|
70
|
+
noNeedInstall: !needInstall
|
|
71
|
+
}, ans, {
|
|
70
72
|
locale: UserConfig.locale || locale,
|
|
71
73
|
packageManager: UserConfig.packageManager || await getPackageManager(cwd),
|
|
72
74
|
distTag
|
package/dist/esm/monorepo.js
CHANGED
|
@@ -6,7 +6,7 @@ import { getPackageManager } from "@modern-js/generator-utils";
|
|
|
6
6
|
import { alreadyRepo } from "./utils";
|
|
7
7
|
const REPO_GENERATOR = "@modern-js/repo-generator";
|
|
8
8
|
export const MonorepoNewAction = async (options) => {
|
|
9
|
-
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", plugin = [], cwd = process.cwd() } = options;
|
|
9
|
+
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", plugin = [], cwd = process.cwd(), needInstall = true } = options;
|
|
10
10
|
let UserConfig = {};
|
|
11
11
|
try {
|
|
12
12
|
UserConfig = JSON.parse(config);
|
|
@@ -39,7 +39,8 @@ export const MonorepoNewAction = async (options) => {
|
|
|
39
39
|
packageManager: UserConfig.packageManager || await getPackageManager(cwd),
|
|
40
40
|
isMonorepo: true,
|
|
41
41
|
distTag,
|
|
42
|
-
plugins
|
|
42
|
+
plugins,
|
|
43
|
+
noNeedInstall: !needInstall
|
|
43
44
|
});
|
|
44
45
|
let generator = REPO_GENERATOR;
|
|
45
46
|
if (process.env.CODESMITH_ENV === "development") {
|
package/dist/esm/mwa.js
CHANGED
|
@@ -5,7 +5,7 @@ import { getMWANewActionSchema, MWAActionFunctions, MWAActionReactors, MWAAction
|
|
|
5
5
|
import { getModernPluginVersion, getPackageManager } from "@modern-js/generator-utils";
|
|
6
6
|
import { alreadyRepo, getGeneratorPath, hasEnabledFunction, usePluginNameExport } from "./utils";
|
|
7
7
|
export const MWANewAction = async (options) => {
|
|
8
|
-
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", cwd = process.cwd() } = options;
|
|
8
|
+
const { locale = "zh", distTag = "", debug = false, registry = "", config = "{}", cwd = process.cwd(), needInstall = true } = options;
|
|
9
9
|
let UserConfig = {};
|
|
10
10
|
try {
|
|
11
11
|
UserConfig = JSON.parse(config);
|
|
@@ -63,7 +63,9 @@ export const MWANewAction = async (options) => {
|
|
|
63
63
|
distTag,
|
|
64
64
|
cwd
|
|
65
65
|
});
|
|
66
|
-
const finalConfig = merge(UserConfig,
|
|
66
|
+
const finalConfig = merge(UserConfig, {
|
|
67
|
+
noNeedInstall: !needInstall
|
|
68
|
+
}, ans, {
|
|
67
69
|
locale: UserConfig.locale || locale,
|
|
68
70
|
packageManager: UserConfig.packageManager || await getPackageManager(cwd),
|
|
69
71
|
distTag
|
package/dist/types/module.d.ts
CHANGED
package/dist/types/monorepo.d.ts
CHANGED
package/dist/types/mwa.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.33.1",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"@modern-js/codesmith": "2.2.5",
|
|
34
34
|
"@modern-js/codesmith-formily": "2.2.5",
|
|
35
35
|
"@swc/helpers": "0.5.1",
|
|
36
|
-
"@modern-js/generator-common": "3.1.
|
|
37
|
-
"@modern-js/generator-utils": "3.1.
|
|
38
|
-
"@modern-js/utils": "2.
|
|
36
|
+
"@modern-js/generator-common": "3.1.39",
|
|
37
|
+
"@modern-js/generator-utils": "3.1.39",
|
|
38
|
+
"@modern-js/utils": "2.33.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/jest": "^29",
|
|
42
42
|
"@types/node": "^14",
|
|
43
43
|
"jest": "^29",
|
|
44
44
|
"typescript": "^5",
|
|
45
|
-
"@scripts/build": "2.
|
|
46
|
-
"@scripts/jest-config": "2.
|
|
45
|
+
"@scripts/build": "2.33.1",
|
|
46
|
+
"@scripts/jest-config": "2.33.1"
|
|
47
47
|
},
|
|
48
48
|
"sideEffects": false,
|
|
49
49
|
"publishConfig": {
|