npm-update-package 1.4.31 → 1.5.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/README.md
CHANGED
|
@@ -21,6 +21,7 @@ CLI tool for creating pull requests to update npm packages
|
|
|
21
21
|
- [`--assignees-sample-size`](#--assignees-sample-size)
|
|
22
22
|
- [`--commit-message`](#--commit-message)
|
|
23
23
|
- [`--dependency-types`](#--dependency-types)
|
|
24
|
+
- [`--draft-pr`](#--draft-pr)
|
|
24
25
|
- [`--fetch-release-notes`](#--fetch-release-notes)
|
|
25
26
|
- [`--fetch-sleep-time`](#--fetch-sleep-time)
|
|
26
27
|
- [`--git-user-email`](#--git-user-email)
|
|
@@ -181,6 +182,24 @@ npx npm-update-package \
|
|
|
181
182
|
--dependency-types dependencies devDependencies
|
|
182
183
|
```
|
|
183
184
|
|
|
185
|
+
### `--draft-pr`
|
|
186
|
+
|
|
187
|
+
Whether to create pull request as draft.
|
|
188
|
+
|
|
189
|
+
|Name|Value|
|
|
190
|
+
|---|---|
|
|
191
|
+
|type|boolean|
|
|
192
|
+
|required|-|
|
|
193
|
+
|default|`false`|
|
|
194
|
+
|
|
195
|
+
Example:
|
|
196
|
+
|
|
197
|
+
```sh
|
|
198
|
+
npx npm-update-package \
|
|
199
|
+
--github-token <github-token> \
|
|
200
|
+
--draft-pr true
|
|
201
|
+
```
|
|
202
|
+
|
|
184
203
|
### `--fetch-release-notes`
|
|
185
204
|
|
|
186
205
|
Whether to fetch release notes.
|
|
@@ -336,7 +355,7 @@ npx npm-update-package \
|
|
|
336
355
|
### `--package-manager`
|
|
337
356
|
|
|
338
357
|
Package manager of your project.
|
|
339
|
-
Since npm-update-package automatically determines which package manager to use, it is usually not necessary to
|
|
358
|
+
Since npm-update-package automatically determines which package manager to use, it is usually not necessary to use this option.
|
|
340
359
|
|
|
341
360
|
|Name|Value|
|
|
342
361
|
|---|---|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-update-package",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "CLI tool for creating pull requests to update npm packages",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc --project tsconfig.build.json",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"@types/node": "14.18.32",
|
|
38
38
|
"@types/node-fetch": "2.6.2",
|
|
39
39
|
"@types/parse-github-url": "1.0.0",
|
|
40
|
-
"@types/semver": "7.3.
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
40
|
+
"@types/semver": "7.3.13",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "5.42.0",
|
|
42
42
|
"eslint": "8.26.0",
|
|
43
43
|
"eslint-config-standard-with-typescript": "23.0.0",
|
|
44
44
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
45
45
|
"eslint-plugin-import": "2.26.0",
|
|
46
46
|
"eslint-plugin-import-newlines": "1.2.3",
|
|
47
47
|
"eslint-plugin-jest": "27.1.3",
|
|
48
|
-
"eslint-plugin-jsdoc": "39.
|
|
49
|
-
"eslint-plugin-n": "15.
|
|
48
|
+
"eslint-plugin-jsdoc": "39.5.0",
|
|
49
|
+
"eslint-plugin-n": "15.4.0",
|
|
50
50
|
"eslint-plugin-promise": "6.1.1",
|
|
51
51
|
"eslint-plugin-tsdoc": "0.2.17",
|
|
52
52
|
"eslint-plugin-unicorn": "44.0.2",
|
|
@@ -66,5 +66,17 @@
|
|
|
66
66
|
"url": "https://github.com/npm-update-package/npm-update-package/issues"
|
|
67
67
|
},
|
|
68
68
|
"homepage": "https://github.com/npm-update-package/npm-update-package",
|
|
69
|
-
"license": "MIT"
|
|
69
|
+
"license": "MIT",
|
|
70
|
+
"keywords": [
|
|
71
|
+
"dependencies",
|
|
72
|
+
"dependency",
|
|
73
|
+
"github enterprise",
|
|
74
|
+
"github",
|
|
75
|
+
"node",
|
|
76
|
+
"npm",
|
|
77
|
+
"outdated",
|
|
78
|
+
"package",
|
|
79
|
+
"update",
|
|
80
|
+
"yarn"
|
|
81
|
+
]
|
|
70
82
|
}
|
|
@@ -39,14 +39,15 @@ class GitHub {
|
|
|
39
39
|
color
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
async createPullRequest({ owner, repo, baseBranch, headBranch, title, body }) {
|
|
42
|
+
async createPullRequest({ owner, repo, baseBranch, headBranch, title, body, draft }) {
|
|
43
43
|
const { data } = await this.octokit.pulls.create({
|
|
44
44
|
owner,
|
|
45
45
|
repo,
|
|
46
46
|
base: baseBranch,
|
|
47
47
|
head: headBranch,
|
|
48
48
|
title,
|
|
49
|
-
body
|
|
49
|
+
body,
|
|
50
|
+
draft
|
|
50
51
|
});
|
|
51
52
|
return data;
|
|
52
53
|
}
|
|
@@ -25,7 +25,8 @@ class PullRequestCreator {
|
|
|
25
25
|
baseBranch: this.githubRepo.default_branch,
|
|
26
26
|
headBranch: branchName,
|
|
27
27
|
title,
|
|
28
|
-
body
|
|
28
|
+
body,
|
|
29
|
+
draft: this.options.draftPr
|
|
29
30
|
});
|
|
30
31
|
logger_1.logger.debug(`pullRequest=${JSON.stringify(pullRequest)}`);
|
|
31
32
|
await this.labelsAdder.add(pullRequest.number);
|
|
@@ -16,6 +16,7 @@ const Options = (0, io_ts_1.intersection)([
|
|
|
16
16
|
(0, io_ts_1.literal)(package_json_1.DependencyType.BundledDependencies),
|
|
17
17
|
(0, io_ts_1.literal)(package_json_1.DependencyType.OptionalDependencies)
|
|
18
18
|
])),
|
|
19
|
+
draftPr: io_ts_1.boolean,
|
|
19
20
|
fetchReleaseNotes: io_ts_1.boolean,
|
|
20
21
|
fetchSleepTime: io_ts_1.number,
|
|
21
22
|
githubToken: io_ts_1.string,
|
|
@@ -52,6 +52,13 @@ exports.cliOptions = [
|
|
|
52
52
|
package_json_1.DependencyType.OptionalDependencies
|
|
53
53
|
]
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
name: 'draft-pr',
|
|
57
|
+
description: 'Whether to create pull request as draft',
|
|
58
|
+
type: OptionType_1.OptionType.Boolean,
|
|
59
|
+
required: false,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
55
62
|
{
|
|
56
63
|
name: 'fetch-release-notes',
|
|
57
64
|
description: 'Whether to fetch release notes',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-update-package",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "CLI tool for creating pull requests to update npm packages",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc --project tsconfig.build.json",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"@types/node": "14.18.32",
|
|
38
38
|
"@types/node-fetch": "2.6.2",
|
|
39
39
|
"@types/parse-github-url": "1.0.0",
|
|
40
|
-
"@types/semver": "7.3.
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
40
|
+
"@types/semver": "7.3.13",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "5.42.0",
|
|
42
42
|
"eslint": "8.26.0",
|
|
43
43
|
"eslint-config-standard-with-typescript": "23.0.0",
|
|
44
44
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
45
45
|
"eslint-plugin-import": "2.26.0",
|
|
46
46
|
"eslint-plugin-import-newlines": "1.2.3",
|
|
47
47
|
"eslint-plugin-jest": "27.1.3",
|
|
48
|
-
"eslint-plugin-jsdoc": "39.
|
|
49
|
-
"eslint-plugin-n": "15.
|
|
48
|
+
"eslint-plugin-jsdoc": "39.5.0",
|
|
49
|
+
"eslint-plugin-n": "15.4.0",
|
|
50
50
|
"eslint-plugin-promise": "6.1.1",
|
|
51
51
|
"eslint-plugin-tsdoc": "0.2.17",
|
|
52
52
|
"eslint-plugin-unicorn": "44.0.2",
|
|
@@ -66,5 +66,17 @@
|
|
|
66
66
|
"url": "https://github.com/npm-update-package/npm-update-package/issues"
|
|
67
67
|
},
|
|
68
68
|
"homepage": "https://github.com/npm-update-package/npm-update-package",
|
|
69
|
-
"license": "MIT"
|
|
69
|
+
"license": "MIT",
|
|
70
|
+
"keywords": [
|
|
71
|
+
"dependencies",
|
|
72
|
+
"dependency",
|
|
73
|
+
"github enterprise",
|
|
74
|
+
"github",
|
|
75
|
+
"node",
|
|
76
|
+
"npm",
|
|
77
|
+
"outdated",
|
|
78
|
+
"package",
|
|
79
|
+
"update",
|
|
80
|
+
"yarn"
|
|
81
|
+
]
|
|
70
82
|
}
|