@modern-js/monorepo-tools 1.19.0 → 1.20.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/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @modern-js/monorepo-tools
2
2
 
3
+ ## 1.20.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [49515c5]
8
+ - @modern-js/utils@1.20.1
9
+ - @modern-js/core@1.20.1
10
+ - @modern-js/plugin-changeset@1.20.1
11
+ - @modern-js/plugin-i18n@1.20.1
12
+ - @modern-js/plugin-jarvis@1.20.1
13
+ - @modern-js/new-action@1.20.1
14
+ - @modern-js/upgrade@1.20.1
15
+ - @modern-js/plugin@1.20.1
16
+
17
+ ## 1.20.0
18
+
19
+ ### Patch Changes
20
+
21
+ - 8c05089: fix: support monorepo deploy in pnpm 7
22
+ fix: 修复 monorepo deploy 命令在 pnpm 7 下的问题
23
+ - Updated dependencies [d5d570b]
24
+ - Updated dependencies [4ddc185]
25
+ - Updated dependencies [df8ee7e]
26
+ - Updated dependencies [8c05089]
27
+ - Updated dependencies [d5d570b]
28
+ - @modern-js/utils@1.20.0
29
+ - @modern-js/core@1.20.0
30
+ - @modern-js/plugin-changeset@1.20.0
31
+ - @modern-js/plugin-i18n@1.20.0
32
+ - @modern-js/plugin-jarvis@1.20.0
33
+ - @modern-js/new-action@1.20.0
34
+ - @modern-js/upgrade@1.20.0
35
+ - @modern-js/plugin@1.20.0
36
+
3
37
  ## 1.19.0
4
38
 
5
39
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import * as path from 'path';
2
2
  import { FileSystem, JsonFile } from '@rushstack/node-core-library';
3
- import { fs, yaml, execa, logger, chalk, signale } from '@modern-js/utils';
3
+ import { fs, yaml, execa, logger, chalk, getPnpmVersion } from '@modern-js/utils';
4
4
  import { WORKSPACE_FILE } from "../../constants";
5
5
 
6
6
  const createCopyMap = (rootPath, targetProject, copyProjects, deployDir) => {
@@ -85,7 +85,13 @@ const checkAndRunDeployCommand = async (monorepoPath, targetProject, packageMana
85
85
  let runDeployCommands = ['run', 'deploy'];
86
86
 
87
87
  if (packageManager === 'pnpm') {
88
- runDeployCommands = ['run', 'deploy', '--filter', targetProject.name];
88
+ const pnpmVersion = await getPnpmVersion();
89
+
90
+ if (pnpmVersion.startsWith('6')) {
91
+ runDeployCommands = ['run', 'deploy', '--filter', targetProject.name];
92
+ } else {
93
+ runDeployCommands = ['run', '--filter', targetProject.name, 'deploy'];
94
+ }
89
95
  } else if (packageManager === 'yarn') {
90
96
  runDeployCommands = ['workspace', targetProject.name, 'run', 'deploy'];
91
97
  }
@@ -171,5 +177,5 @@ export const deploy = async (deployProjectNames, operator, config) => {
171
177
 
172
178
  generatorAndCopyRequiredFiles(rootPath, realDeployPath); // await installDependency(realDeployPath, packageManager);
173
179
 
174
- signale.success(`Deploy success. The deploy dir is in '${rootPath}/output'`);
180
+ logger.success(`Deploy success. The deploy dir is in '${rootPath}/output'`);
175
181
  };
@@ -101,7 +101,13 @@ const checkAndRunDeployCommand = async (monorepoPath, targetProject, packageMana
101
101
  let runDeployCommands = ['run', 'deploy'];
102
102
 
103
103
  if (packageManager === 'pnpm') {
104
- runDeployCommands = ['run', 'deploy', '--filter', targetProject.name];
104
+ const pnpmVersion = await (0, _utils.getPnpmVersion)();
105
+
106
+ if (pnpmVersion.startsWith('6')) {
107
+ runDeployCommands = ['run', 'deploy', '--filter', targetProject.name];
108
+ } else {
109
+ runDeployCommands = ['run', '--filter', targetProject.name, 'deploy'];
110
+ }
105
111
  } else if (packageManager === 'yarn') {
106
112
  runDeployCommands = ['workspace', targetProject.name, 'run', 'deploy'];
107
113
  }
@@ -196,7 +202,7 @@ const deploy = async (deployProjectNames, operator, config) => {
196
202
 
197
203
  generatorAndCopyRequiredFiles(rootPath, realDeployPath); // await installDependency(realDeployPath, packageManager);
198
204
 
199
- _utils.signale.success(`Deploy success. The deploy dir is in '${rootPath}/output'`);
205
+ _utils.logger.success(`Deploy success. The deploy dir is in '${rootPath}/output'`);
200
206
  };
201
207
 
202
208
  exports.deploy = deploy;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.19.0",
14
+ "version": "1.20.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -35,15 +35,15 @@
35
35
  "modern": "./bin/modern.js"
36
36
  },
37
37
  "dependencies": {
38
- "@modern-js/core": "1.19.0",
38
+ "@modern-js/core": "1.20.1",
39
39
  "@babel/runtime": "^7.18.0",
40
- "@modern-js/new-action": "1.19.0",
41
- "@modern-js/upgrade": "1.19.0",
42
- "@modern-js/plugin": "1.19.0",
43
- "@modern-js/plugin-changeset": "1.19.0",
44
- "@modern-js/plugin-i18n": "1.19.0",
45
- "@modern-js/plugin-jarvis": "1.19.0",
46
- "@modern-js/utils": "1.19.0",
40
+ "@modern-js/new-action": "1.20.1",
41
+ "@modern-js/upgrade": "1.20.1",
42
+ "@modern-js/plugin": "1.20.1",
43
+ "@modern-js/plugin-changeset": "1.20.1",
44
+ "@modern-js/plugin-i18n": "1.20.1",
45
+ "@modern-js/plugin-jarvis": "1.20.1",
46
+ "@modern-js/utils": "1.20.1",
47
47
  "@rushstack/node-core-library": "^3.39.1",
48
48
  "@rushstack/package-deps-hash": "^3.0.54",
49
49
  "anymatch": "^3.1.2",
@@ -51,8 +51,8 @@
51
51
  "p-map": "^4.0.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@scripts/build": "1.19.0",
55
- "@scripts/jest-config": "1.19.0",
54
+ "@scripts/build": "1.20.1",
55
+ "@scripts/jest-config": "1.20.1",
56
56
  "@types/jest": "^27",
57
57
  "@types/md5": "^2.3.1",
58
58
  "@types/node": "^14",