npm-update-package 0.11.2 → 0.15.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/README.md CHANGED
@@ -9,10 +9,6 @@ CLI tool for creating pull request to update npm packages
9
9
 
10
10
  This package is currently under development, so the major version is 0 yet.
11
11
 
12
- ## Requirements
13
-
14
- - Git v2.23.0 or higher
15
-
16
12
  ## Usage
17
13
 
18
14
  ```sh
@@ -57,7 +53,7 @@ Template strings such as `--branch-name` can embed variables like `{{packageName
57
53
 
58
54
  Branch name template
59
55
 
60
- - value: template string
56
+ - type: string
61
57
  - variables:
62
58
  - `currentVersion`
63
59
  - `newVersion`
@@ -70,7 +66,7 @@ Branch name template
70
66
 
71
67
  Commit message template
72
68
 
73
- - value: template string
69
+ - type: string
74
70
  - variables:
75
71
  - `currentVersion`
76
72
  - `newVersion`
@@ -83,14 +79,15 @@ Commit message template
83
79
 
84
80
  GitHub token
85
81
 
86
- - value: string
82
+ - type: string
87
83
  - required: true
88
84
 
89
85
  ### `--log-level`
90
86
 
91
87
  Log level to show
92
88
 
93
- - value: string
89
+ - type: string
90
+ - allowed values:
94
91
  - `error`
95
92
  - `info`
96
93
  - `debug`
@@ -101,7 +98,8 @@ Log level to show
101
98
 
102
99
  Package manager of your project
103
100
 
104
- - value: string
101
+ - type: string
102
+ - allowed values:
105
103
  - `npm`
106
104
  - `yarn`
107
105
  - required: false
@@ -111,7 +109,7 @@ Package manager of your project
111
109
 
112
110
  Pull request body template
113
111
 
114
- - value: template string
112
+ - type: string
115
113
  - variables:
116
114
  - `appName`
117
115
  - `appVersion`
@@ -138,7 +136,7 @@ This PR has been generated by [{{{appName}}}]({{{appWeb}}}) v{{appVersion}}
138
136
 
139
137
  Pull request title template
140
138
 
141
- - value: template string
139
+ - type: string
142
140
  - variables:
143
141
  - `currentVersion`
144
142
  - `newVersion`
@@ -146,3 +144,9 @@ Pull request title template
146
144
  - `updateType`
147
145
  - required: false
148
146
  - default: `chore(deps): {{updateType}} update {{{packageName}}} to v{{newVersion}}`
147
+
148
+ ## FAQ
149
+
150
+ ### Conflicts has occurred in PR. What should I do?
151
+
152
+ If conflicts has occurred in PR, 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.11.2',
6
+ version: '0.15.0',
7
7
  web: 'https://github.com/npm-update-package/npm-update-package'
8
8
  };
package/dist/git/Git.js CHANGED
@@ -14,7 +14,7 @@ class Git {
14
14
  await this.terminal.run('git', 'commit', '--message', message);
15
15
  }
16
16
  async createBranch(branchName) {
17
- await this.terminal.run('git', 'switch', '-c', branchName);
17
+ await this.terminal.run('git', 'checkout', '-b', branchName);
18
18
  }
19
19
  async getConfig(key) {
20
20
  const { stdout } = await this.terminal.run('git', 'config', key);
@@ -39,13 +39,13 @@ class Git {
39
39
  await this.terminal.run('git', 'branch', '-D', branchName);
40
40
  }
41
41
  async restore(...files) {
42
- await this.terminal.run('git', 'restore', '--worktree', '--staged', ...files);
42
+ await this.terminal.run('git', 'checkout', ...files);
43
43
  }
44
44
  async setConfig(key, value) {
45
45
  await this.terminal.run('git', 'config', key, value);
46
46
  }
47
47
  async switch(branchName) {
48
- await this.terminal.run('git', 'switch', branchName);
48
+ await this.terminal.run('git', 'checkout', branchName);
49
49
  }
50
50
  }
51
51
  exports.Git = Git;
package/dist/main.js CHANGED
@@ -11,7 +11,10 @@ const processors_1 = require("./processors");
11
11
  const terminal_1 = require("./terminal");
12
12
  // TODO: add test
13
13
  const main = async ({ options, logger }) => {
14
- logger.debug(`options=${JSON.stringify(options)}`);
14
+ logger.debug(`options=${JSON.stringify({
15
+ ...options,
16
+ githubToken: options.githubToken !== '' ? '***' : ''
17
+ })}`);
15
18
  const packageJsonParser = new package_json_1.PackageJsonParser(logger);
16
19
  const packageJsonReader = new package_json_1.PackageJsonReader({
17
20
  packageJsonParser,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.11.2",
3
+ "version": "0.15.0",
4
4
  "description": "CLI tool for creating pull request to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -24,7 +24,7 @@
24
24
  "io-ts": "2.2.16",
25
25
  "log4js": "6.3.0",
26
26
  "mustache": "4.1.0",
27
- "npm-check-updates": "12.0.3",
27
+ "npm-check-updates": "12.0.5",
28
28
  "parse-github-url": "1.0.2",
29
29
  "semver": "7.3.5"
30
30
  },
@@ -36,22 +36,22 @@
36
36
  "@types/node": "12.20.15",
37
37
  "@types/parse-github-url": "1.0.0",
38
38
  "@types/semver": "7.3.9",
39
- "@typescript-eslint/eslint-plugin": "5.5.0",
40
- "eslint": "8.4.1",
39
+ "@typescript-eslint/eslint-plugin": "5.8.0",
40
+ "eslint": "8.5.0",
41
41
  "eslint-config-standard-with-typescript": "21.0.1",
42
42
  "eslint-plugin-import": "2.25.3",
43
43
  "eslint-plugin-jest": "25.3.0",
44
44
  "eslint-plugin-node": "11.1.0",
45
- "eslint-plugin-promise": "5.2.0",
45
+ "eslint-plugin-promise": "6.0.0",
46
46
  "eslint-plugin-tsdoc": "0.2.14",
47
47
  "husky": "7.0.4",
48
48
  "jest": "27.0.6",
49
- "lint-staged": "12.1.2",
49
+ "lint-staged": "12.1.4",
50
50
  "npm-run-all": "4.1.5",
51
51
  "rimraf": "3.0.2",
52
- "ts-jest": "27.1.0",
52
+ "ts-jest": "27.1.2",
53
53
  "ts-node": "10.4.0",
54
- "typescript": "4.4.4",
54
+ "typescript": "4.5.4",
55
55
  "utility-types": "3.10.0"
56
56
  },
57
57
  "repository": {