npm-update-package 0.22.2 → 0.22.3

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
@@ -57,8 +57,8 @@ Package manager of your project
57
57
  - type: string
58
58
  - required: false
59
59
  - allowed values:
60
- - `npm`
61
- - `yarn`
60
+ - `npm`: npm
61
+ - `yarn`: Yarn
62
62
  - default: `npm`
63
63
 
64
64
  ### `--pull-request-title`
@@ -76,15 +76,22 @@ Pull request title template
76
76
 
77
77
  ## GitHub token
78
78
 
79
- To run npm-update-package, GitHub token is required.
79
+ GitHub token is required to run npm-update-package.
80
80
  For example, the following tokens can be used.
81
81
 
82
- |GitHub token|Pull request author|Trigger other action|
82
+ |GitHub token|Author of pull requests|Trigger other actions|
83
83
  |---|---|---|
84
84
  |[GitHub Actions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication)|`github-actions`||
85
85
  |[GitHub App](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps)|GitHub App which issued the token|✓|
86
86
  |[Personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)|user who issued the token|✓|
87
87
 
88
+ We recommend using GitHub App for the following reasons.
89
+
90
+ - When you use the token of GitHub Actions, the job will not trigger other actions.
91
+ - When you use the Personal access token, the author of pull requests will be the user who issued the token.
92
+
93
+ Creating a GitHub App may be tedious, but you only have to do it once the first time.
94
+
88
95
  ### Token of GitHub App
89
96
 
90
97
  These permissions are required.
@@ -160,12 +167,12 @@ Actual working examples can be seen in these repositories.
160
167
 
161
168
  |Repository|Package manager|GitHub token|
162
169
  |---|---|---|
163
- |[example-npm](https://github.com/npm-update-package/example-npm)|npm|GitHub Actions|
170
+ |[example-github-actions](https://github.com/npm-update-package/example-github-actions)|npm|GitHub Actions|
164
171
  |[example-github-app](https://github.com/npm-update-package/example-github-app)|npm|GitHub App|
165
172
 
166
173
  ## Flow
167
174
 
168
- The following shows the process flow of npm-update-package:
175
+ The following shows the process flow of npm-update-package.
169
176
 
170
177
  <!--
171
178
  ```plantuml
@@ -212,6 +219,6 @@ end
212
219
 
213
220
  npm-update-package can be used in environments where Renovate cannot be used for some reason.
214
221
 
215
- ### Conflicts have occurred in pull request. What should I do?
222
+ ### Conflicts have occurred in the pull request. What should I do?
216
223
 
217
- If conflicts have occurred in pull request, close it and run npm-update-package again.
224
+ If conflicts have occurred in the pull request, close it and run npm-update-package again.
package/dist/app.js CHANGED
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.app = void 0;
4
4
  exports.app = {
5
5
  name: 'npm-update-package',
6
- version: '0.22.2',
6
+ version: '0.22.3',
7
7
  web: 'https://github.com/npm-update-package/npm-update-package'
8
8
  };
package/dist/main.js CHANGED
@@ -90,10 +90,10 @@ const main = async ({ options, logger }) => {
90
90
  logger.debug(`results=${JSON.stringify(results)}`);
91
91
  const succeededResults = results.filter(Either_1.isRight).map(({ right }) => right);
92
92
  logger.debug(`succeededResults=${JSON.stringify(succeededResults)}`);
93
- const updatedPackages = succeededResults
94
- .filter(({ updated }) => updated)
93
+ const createdPackages = succeededResults
94
+ .filter(({ created }) => created)
95
95
  .map(({ outdatedPackage }) => outdatedPackage);
96
- logger.debug(`updatedPackages=${JSON.stringify(updatedPackages)}`);
96
+ logger.debug(`createdPackages=${JSON.stringify(createdPackages)}`);
97
97
  const skippedPackages = succeededResults
98
98
  .filter(({ skipped }) => skipped)
99
99
  .map(({ outdatedPackage }) => outdatedPackage);
@@ -104,8 +104,8 @@ const main = async ({ options, logger }) => {
104
104
  logger.debug(`failedPackages=${JSON.stringify(failedPackages)}`);
105
105
  // TODO: show as table
106
106
  logger.info(`Processed ${succeededResults.length + failedPackages.length} packages:
107
- - ${updatedPackages.length} packages has updated: ${updatedPackages.map(({ name }) => name).join(',')}
108
- - ${skippedPackages.length} packages has skipped: ${skippedPackages.map(({ name }) => name).join(',')}
109
- - ${failedPackages.length} packages has failed: ${failedPackages.map(({ name }) => name).join(',')}`);
107
+ - ${createdPackages.length} packages: created (${createdPackages.map(({ name }) => name).join(',')})
108
+ - ${skippedPackages.length} packages: skipped: (${skippedPackages.map(({ name }) => name).join(',')})
109
+ - ${failedPackages.length} packages: failed: (${failedPackages.map(({ name }) => name).join(',')})`);
110
110
  };
111
111
  exports.main = main;
@@ -65,7 +65,7 @@ class OutdatedPackageProcessor {
65
65
  }));
66
66
  return (0, Either_1.right)({
67
67
  outdatedPackage,
68
- updated: true
68
+ created: true
69
69
  });
70
70
  }
71
71
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.22.2",
3
+ "version": "0.22.3",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",