@modern-js/plugin-changeset 1.18.1-alpha.0 → 1.19.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 +11 -3
- package/dist/js/modern/commands/release.js +9 -2
- package/dist/js/modern/utils/index.js +2 -1
- package/dist/js/modern/utils/pnpm.js +7 -0
- package/dist/js/node/commands/release.js +8 -1
- package/dist/js/node/utils/index.js +13 -0
- package/dist/js/node/utils/pnpm.js +17 -0
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/pnpm.d.ts +1 -0
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# @modern-js/plugin-changeset
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d2fbefc5: feat: release command support pnpm v7
|
|
8
|
+
|
|
9
|
+
feat: release 命令支持 pnpm v7
|
|
10
|
+
|
|
11
|
+
## 1.18.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
6
14
|
|
|
7
15
|
- Updated dependencies [9fcfbd4]
|
|
8
16
|
- Updated dependencies [6c2c745]
|
|
9
|
-
- @modern-js/utils@1.18.1
|
|
10
|
-
- @modern-js/plugin-i18n@1.18.1
|
|
17
|
+
- @modern-js/utils@1.18.1
|
|
18
|
+
- @modern-js/plugin-i18n@1.18.1
|
|
11
19
|
|
|
12
20
|
## 1.18.0
|
|
13
21
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { getPackageManager, isMonorepo, fs } from '@modern-js/utils';
|
|
3
3
|
import { tag as gitTag } from '@changesets/git';
|
|
4
|
-
import { CHANGESET_PATH, execaWithStreamLog } from "../utils";
|
|
4
|
+
import { CHANGESET_PATH, execaWithStreamLog, getPnpmVersion } from "../utils";
|
|
5
5
|
export async function release(options) {
|
|
6
6
|
const appDir = process.cwd();
|
|
7
7
|
const packageManager = await getPackageManager(process.cwd());
|
|
@@ -30,7 +30,14 @@ export async function release(options) {
|
|
|
30
30
|
|
|
31
31
|
params.push('-r');
|
|
32
32
|
params.push('--filter');
|
|
33
|
-
|
|
33
|
+
const pnpmVersion = await getPnpmVersion();
|
|
34
|
+
|
|
35
|
+
if (pnpmVersion.startsWith('6')) {
|
|
36
|
+
params.push('./packages/');
|
|
37
|
+
} else {
|
|
38
|
+
params.push('{./packages/**}');
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
params.push('--report-summary');
|
|
35
42
|
|
|
36
43
|
if (ignoreScripts) {
|
|
@@ -43,7 +43,14 @@ async function release(options) {
|
|
|
43
43
|
|
|
44
44
|
params.push('-r');
|
|
45
45
|
params.push('--filter');
|
|
46
|
-
|
|
46
|
+
const pnpmVersion = await (0, _utils2.getPnpmVersion)();
|
|
47
|
+
|
|
48
|
+
if (pnpmVersion.startsWith('6')) {
|
|
49
|
+
params.push('./packages/');
|
|
50
|
+
} else {
|
|
51
|
+
params.push('{./packages/**}');
|
|
52
|
+
}
|
|
53
|
+
|
|
47
54
|
params.push('--report-summary');
|
|
48
55
|
|
|
49
56
|
if (ignoreScripts) {
|
|
@@ -28,4 +28,17 @@ Object.keys(_language).forEach(function (key) {
|
|
|
28
28
|
return _language[key];
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var _pnpm = require("./pnpm");
|
|
34
|
+
|
|
35
|
+
Object.keys(_pnpm).forEach(function (key) {
|
|
36
|
+
if (key === "default" || key === "__esModule") return;
|
|
37
|
+
if (key in exports && exports[key] === _pnpm[key]) return;
|
|
38
|
+
Object.defineProperty(exports, key, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _pnpm[key];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
31
44
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getPnpmVersion = getPnpmVersion;
|
|
7
|
+
|
|
8
|
+
var _execa = _interopRequireDefault(require("execa"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
async function getPnpmVersion() {
|
|
13
|
+
const {
|
|
14
|
+
stdout
|
|
15
|
+
} = await (0, _execa.default)('pnpm', ['--version']);
|
|
16
|
+
return stdout;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPnpmVersion(): Promise<string>;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.19.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"@changesets/cli": "^2.23.0",
|
|
36
36
|
"@changesets/git": "^1.3.2",
|
|
37
37
|
"@changesets/read": "^0.5.5",
|
|
38
|
-
"@modern-js/plugin-i18n": "1.18.1
|
|
39
|
-
"@modern-js/utils": "1.18.1
|
|
38
|
+
"@modern-js/plugin-i18n": "1.18.1",
|
|
39
|
+
"@modern-js/utils": "1.18.1",
|
|
40
40
|
"execa": "^5.1.1",
|
|
41
41
|
"resolve-from": "^5.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@modern-js/core": "1.18.1
|
|
45
|
-
"@scripts/build": "1.18.1
|
|
44
|
+
"@modern-js/core": "1.18.1",
|
|
45
|
+
"@scripts/build": "1.18.1",
|
|
46
46
|
"@types/jest": "^27",
|
|
47
47
|
"@types/node": "^14",
|
|
48
48
|
"typescript": "^4",
|
|
49
49
|
"jest": "^27",
|
|
50
|
-
"@scripts/jest-config": "1.18.1
|
|
50
|
+
"@scripts/jest-config": "1.18.1"
|
|
51
51
|
},
|
|
52
52
|
"sideEffects": false,
|
|
53
53
|
"publishConfig": {
|
|
@@ -82,6 +82,5 @@
|
|
|
82
82
|
"dev": "modern build --watch",
|
|
83
83
|
"build": "wireit",
|
|
84
84
|
"test": "wireit"
|
|
85
|
-
}
|
|
86
|
-
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
|
85
|
+
}
|
|
87
86
|
}
|