@modern-js/plugin-changeset 1.0.0-rc.12 → 1.0.0-rc.16
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 +56 -0
- package/dist/js/modern/commands/release.js +6 -3
- package/dist/js/modern/utils/changeset.js +2 -1
- package/dist/js/node/commands/release.js +7 -7
- package/dist/js/node/utils/changeset.js +3 -1
- package/package.json +10 -7
- package/src/commands/release.ts +11 -3
- package/src/utils/changeset.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# @modern-js/plugin-changeset
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 224f7fe: fix server route match
|
|
8
|
+
- 30ac27c: feat: add generator package description
|
|
9
|
+
- 204c626: feat: initial
|
|
10
|
+
- Updated dependencies [224f7fe]
|
|
11
|
+
- Updated dependencies [30ac27c]
|
|
12
|
+
- Updated dependencies [204c626]
|
|
13
|
+
- @modern-js/core@1.0.0-rc.16
|
|
14
|
+
- @modern-js/i18n-cli-language-detector@1.0.0-rc.16
|
|
15
|
+
- @modern-js/plugin-i18n@1.0.0-rc.16
|
|
16
|
+
- @modern-js/utils@1.0.0-rc.16
|
|
17
|
+
|
|
18
|
+
## 1.0.0-rc.15
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 224f7fe: fix server route match
|
|
23
|
+
- 30ac27c: feat: add generator package description
|
|
24
|
+
- 204c626: feat: initial
|
|
25
|
+
- Updated dependencies [224f7fe]
|
|
26
|
+
- Updated dependencies [30ac27c]
|
|
27
|
+
- Updated dependencies [204c626]
|
|
28
|
+
- @modern-js/core@1.0.0-rc.15
|
|
29
|
+
- @modern-js/i18n-cli-language-detector@1.0.0-rc.15
|
|
30
|
+
- @modern-js/plugin-i18n@1.0.0-rc.15
|
|
31
|
+
- @modern-js/utils@1.0.0-rc.15
|
|
32
|
+
|
|
33
|
+
## 1.0.0-rc.14
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- 224f7fe: fix server route match
|
|
38
|
+
- 204c626: feat: initial
|
|
39
|
+
- Updated dependencies [224f7fe]
|
|
40
|
+
- Updated dependencies [204c626]
|
|
41
|
+
- @modern-js/core@1.0.0-rc.14
|
|
42
|
+
- @modern-js/i18n-cli-language-detector@1.0.0-rc.14
|
|
43
|
+
- @modern-js/plugin-i18n@1.0.0-rc.14
|
|
44
|
+
- @modern-js/utils@1.0.0-rc.14
|
|
45
|
+
|
|
46
|
+
## 1.0.0-rc.13
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- 224f7fe: fix server route match
|
|
51
|
+
- 204c626: feat: initial
|
|
52
|
+
- Updated dependencies [224f7fe]
|
|
53
|
+
- Updated dependencies [204c626]
|
|
54
|
+
- @modern-js/core@1.0.0-rc.13
|
|
55
|
+
- @modern-js/i18n-cli-language-detector@1.0.0-rc.13
|
|
56
|
+
- @modern-js/plugin-i18n@1.0.0-rc.13
|
|
57
|
+
- @modern-js/utils@1.0.0-rc.13
|
|
58
|
+
|
|
3
59
|
## 1.0.0-rc.12
|
|
4
60
|
|
|
5
61
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import path from '
|
|
1
|
+
import { path, getPackageManager, isModernjsMonorepo, fs } from '@modern-js/utils';
|
|
2
2
|
import { tag as gitTag } from '@changesets/git';
|
|
3
|
-
import { getPackageManager, isModernjsMonorepo, fs } from '@modern-js/utils';
|
|
4
3
|
import { CHANGESET_PATH, execaWithStreamLog } from "../utils";
|
|
4
|
+
// eslint-disable-next-line max-statements
|
|
5
5
|
export async function release(options) {
|
|
6
6
|
const appDir = process.cwd();
|
|
7
7
|
const isMonorepo = isModernjsMonorepo(appDir);
|
|
@@ -18,10 +18,13 @@ export async function release(options) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
if (!isMonorepo || packageManager === 'yarn') {
|
|
21
|
-
await execaWithStreamLog(CHANGESET_PATH, params);
|
|
21
|
+
await execaWithStreamLog('node', [CHANGESET_PATH, ...params]);
|
|
22
|
+
return;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
params.push('-r');
|
|
26
|
+
params.push('--filter');
|
|
27
|
+
params.push('{./packages}');
|
|
25
28
|
params.push('--report-summary');
|
|
26
29
|
|
|
27
30
|
if (ignoreScripts) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import execa from 'execa';
|
|
2
|
-
|
|
2
|
+
import { upath } from '@modern-js/utils';
|
|
3
|
+
export const CHANGESET_PATH = upath.normalizeSafe(require.resolve('@changesets/cli'));
|
|
3
4
|
export function execaWithStreamLog(command, args) {
|
|
4
5
|
const promise = execa(command, args, {
|
|
5
6
|
stdin: 'inherit',
|
|
@@ -5,16 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.release = release;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _utils = require("@modern-js/utils");
|
|
9
9
|
|
|
10
10
|
var _git = require("@changesets/git");
|
|
11
11
|
|
|
12
|
-
var _utils = require("@modern-js/utils");
|
|
13
|
-
|
|
14
12
|
var _utils2 = require("../utils");
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
// eslint-disable-next-line max-statements
|
|
18
15
|
async function release(options) {
|
|
19
16
|
const appDir = process.cwd();
|
|
20
17
|
const isMonorepo = (0, _utils.isModernjsMonorepo)(appDir);
|
|
@@ -31,10 +28,13 @@ async function release(options) {
|
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
if (!isMonorepo || packageManager === 'yarn') {
|
|
34
|
-
await (0, _utils2.execaWithStreamLog)(_utils2.CHANGESET_PATH, params);
|
|
31
|
+
await (0, _utils2.execaWithStreamLog)('node', [_utils2.CHANGESET_PATH, ...params]);
|
|
32
|
+
return;
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
params.push('-r');
|
|
36
|
+
params.push('--filter');
|
|
37
|
+
params.push('{./packages}');
|
|
38
38
|
params.push('--report-summary');
|
|
39
39
|
|
|
40
40
|
if (ignoreScripts) {
|
|
@@ -43,7 +43,7 @@ async function release(options) {
|
|
|
43
43
|
|
|
44
44
|
await (0, _utils2.execaWithStreamLog)(packageManager, params);
|
|
45
45
|
|
|
46
|
-
const pnpmPublishSummaryFile =
|
|
46
|
+
const pnpmPublishSummaryFile = _utils.path.join(appDir, 'pnpm-publish-summary.json');
|
|
47
47
|
|
|
48
48
|
const publishInfo = await _utils.fs.readJSON(pnpmPublishSummaryFile, 'utf-8');
|
|
49
49
|
await Promise.all((publishInfo.publishedPackages || []).map(pkg => (0, _git.tag)(`${pkg.name}@${pkg.version}`, appDir)));
|
|
@@ -8,9 +8,11 @@ exports.execaWithStreamLog = execaWithStreamLog;
|
|
|
8
8
|
|
|
9
9
|
var _execa = _interopRequireDefault(require("execa"));
|
|
10
10
|
|
|
11
|
+
var _utils = require("@modern-js/utils");
|
|
12
|
+
|
|
11
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
14
|
|
|
13
|
-
const CHANGESET_PATH = require.resolve('@changesets/cli');
|
|
15
|
+
const CHANGESET_PATH = _utils.upath.normalizeSafe(require.resolve('@changesets/cli'));
|
|
14
16
|
|
|
15
17
|
exports.CHANGESET_PATH = CHANGESET_PATH;
|
|
16
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/plugin-changeset",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.16",
|
|
4
4
|
"jsnext:source": "./src/index.ts",
|
|
5
5
|
"types": "./dist/types/index.d.ts",
|
|
6
6
|
"main": "./dist/js/node/index.js",
|
|
@@ -20,19 +20,22 @@
|
|
|
20
20
|
"@babel/runtime": "^7",
|
|
21
21
|
"@changesets/cli": "2.16.0",
|
|
22
22
|
"@changesets/git": "^1.1.2",
|
|
23
|
-
"@modern-js/
|
|
24
|
-
"@modern-js/i18n
|
|
25
|
-
"@modern-js/
|
|
26
|
-
"@modern-js/utils": "^1.0.0-rc.12",
|
|
23
|
+
"@modern-js/i18n-cli-language-detector": "^1.0.0-rc.16",
|
|
24
|
+
"@modern-js/plugin-i18n": "^1.0.0-rc.16",
|
|
25
|
+
"@modern-js/utils": "^1.0.0-rc.16",
|
|
27
26
|
"execa": "^5.1.1"
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
30
|
-
"@modern-js/
|
|
31
|
-
"@modern-js/
|
|
29
|
+
"@modern-js/core": "^1.0.0-rc.16",
|
|
30
|
+
"@modern-js/module-tools": "^1.0.0-rc.16",
|
|
31
|
+
"@modern-js/plugin-testing": "^1.0.0-rc.16",
|
|
32
32
|
"@types/jest": "^26",
|
|
33
33
|
"@types/node": "^14",
|
|
34
34
|
"typescript": "^4"
|
|
35
35
|
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@modern-js/core": "^1.0.0-rc.16"
|
|
38
|
+
},
|
|
36
39
|
"sideEffects": false,
|
|
37
40
|
"modernConfig": {
|
|
38
41
|
"output": {
|
package/src/commands/release.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
path,
|
|
3
|
+
getPackageManager,
|
|
4
|
+
isModernjsMonorepo,
|
|
5
|
+
fs,
|
|
6
|
+
} from '@modern-js/utils';
|
|
2
7
|
import { tag as gitTag } from '@changesets/git';
|
|
3
|
-
import { getPackageManager, isModernjsMonorepo, fs } from '@modern-js/utils';
|
|
4
8
|
import { CHANGESET_PATH, execaWithStreamLog } from '../utils';
|
|
5
9
|
|
|
6
10
|
interface PublishOptions {
|
|
7
11
|
tag: string;
|
|
8
12
|
ignoreScripts: boolean;
|
|
9
13
|
}
|
|
14
|
+
// eslint-disable-next-line max-statements
|
|
10
15
|
export async function release(options: PublishOptions) {
|
|
11
16
|
const appDir = process.cwd();
|
|
12
17
|
const isMonorepo = isModernjsMonorepo(appDir);
|
|
@@ -22,10 +27,13 @@ export async function release(options: PublishOptions) {
|
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
if (!isMonorepo || packageManager === 'yarn') {
|
|
25
|
-
await execaWithStreamLog(CHANGESET_PATH, params);
|
|
30
|
+
await execaWithStreamLog('node', [CHANGESET_PATH, ...params]);
|
|
31
|
+
return;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
params.push('-r');
|
|
35
|
+
params.push('--filter');
|
|
36
|
+
params.push('{./packages}');
|
|
29
37
|
params.push('--report-summary');
|
|
30
38
|
|
|
31
39
|
if (ignoreScripts) {
|
package/src/utils/changeset.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import execa from 'execa';
|
|
2
|
+
import { upath } from '@modern-js/utils';
|
|
2
3
|
|
|
3
|
-
export const CHANGESET_PATH = require.resolve('@changesets/cli');
|
|
4
|
+
export const CHANGESET_PATH = upath.normalizeSafe(require.resolve('@changesets/cli'));
|
|
4
5
|
|
|
5
6
|
export function execaWithStreamLog(command: string, args: string[]) {
|
|
6
7
|
const promise = execa(command, args, {
|