npm-update-package 4.0.0-2 → 4.0.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
@@ -22,8 +22,8 @@ CLI tool for creating pull requests to update npm packages
22
22
  - [`--commit-message`](#--commit-message)
23
23
  - [`--dependency-types`](#--dependency-types)
24
24
  - [`--draft-pr`](#--draft-pr)
25
+ - [`--fetch-interval`](#--fetch-interval)
25
26
  - [`--fetch-release-notes`](#--fetch-release-notes)
26
- - [`--fetch-sleep-time`](#--fetch-sleep-time)
27
27
  - [`--git-user-email`](#--git-user-email)
28
28
  - [`--git-user-name`](#--git-user-name)
29
29
  - [`--github-token`](#--github-token)
@@ -52,7 +52,7 @@ CLI tool for creating pull requests to update npm packages
52
52
  ## Requirements
53
53
 
54
54
  - Git
55
- - Node.js v18 or later
55
+ - Node.js v20 or later
56
56
  - npm or Yarn
57
57
 
58
58
  ## Supported platforms
@@ -206,40 +206,40 @@ npx npm-update-package \
206
206
  --draft-pr true
207
207
  ```
208
208
 
209
- ### `--fetch-release-notes`
209
+ ### `--fetch-interval`
210
210
 
211
- Whether to fetch release notes.
211
+ Sleep time between fetching (ms).
212
212
 
213
213
  |Name|Value|
214
214
  |---|---|
215
- |type|boolean|
215
+ |type|number|
216
216
  |required|-|
217
- |default|`true`|
217
+ |default|`1000`|
218
218
 
219
219
  Example:
220
220
 
221
221
  ```sh
222
222
  npx npm-update-package \
223
223
  --github-token <github-token> \
224
- --fetch-release-notes false
224
+ --fetch-interval 2000
225
225
  ```
226
226
 
227
- ### `--fetch-sleep-time`
227
+ ### `--fetch-release-notes`
228
228
 
229
- Sleep time between fetching (ms).
229
+ Whether to fetch release notes.
230
230
 
231
231
  |Name|Value|
232
232
  |---|---|
233
- |type|number|
233
+ |type|boolean|
234
234
  |required|-|
235
- |default|`1000`|
235
+ |default|`true`|
236
236
 
237
237
  Example:
238
238
 
239
239
  ```sh
240
240
  npx npm-update-package \
241
241
  --github-token <github-token> \
242
- --fetch-sleep-time 2000
242
+ --fetch-release-notes false
243
243
  ```
244
244
 
245
245
  ### `--git-user-email`
package/dist/app.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export const name = 'npm-update-package';
2
- export const version = '4.0.0-2';
2
+ export const version = '4.0.0';
3
3
  export const homepage = 'https://github.com/npm-update-package/npm-update-package';
@@ -35,7 +35,7 @@ export class ReleasesFetcher {
35
35
  const releases = [];
36
36
  for (const [i, tag] of tags.entries()) {
37
37
  if (i > 0) {
38
- await sleep(this.options.fetchSleepTime);
38
+ await sleep(this.options.fetchInterval);
39
39
  }
40
40
  const release = await this.fetchReleaseByTag({
41
41
  gitRepo,
@@ -14,8 +14,8 @@ const Options = intersection([
14
14
  literal(DependencyType.OptionalDependencies)
15
15
  ])),
16
16
  draftPr: boolean,
17
+ fetchInterval: number,
17
18
  fetchReleaseNotes: boolean,
18
- fetchSleepTime: number,
19
19
  githubToken: string,
20
20
  logLevel: union([
21
21
  literal(LogLevel.Off),
@@ -56,6 +56,13 @@ export const cliOptions = [
56
56
  required: false,
57
57
  default: false
58
58
  },
59
+ {
60
+ name: 'fetch-interval',
61
+ description: 'Sleep time between fetching (ms)',
62
+ type: OptionType.Number,
63
+ required: false,
64
+ default: 1000
65
+ },
59
66
  {
60
67
  name: 'fetch-release-notes',
61
68
  description: 'Whether to fetch release notes',
@@ -63,13 +70,6 @@ export const cliOptions = [
63
70
  required: false,
64
71
  default: true
65
72
  },
66
- {
67
- name: 'fetch-sleep-time',
68
- description: 'Sleep time between fetching (ms)',
69
- type: OptionType.Number,
70
- required: false,
71
- default: 1000
72
- },
73
73
  {
74
74
  name: 'git-user-email',
75
75
  description: 'Git user email',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "4.0.0-2",
3
+ "version": "4.0.0",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "bin": "dist/bin/npm-update-package.js",
17
17
  "engines": {
18
- "node": ">=18"
18
+ "node": ">=20"
19
19
  },
20
20
  "dependencies": {
21
- "@octokit/rest": "20.1.0",
21
+ "@octokit/rest": "20.1.1",
22
22
  "array-shuffle": "2.0.0",
23
23
  "commander": "12.0.0",
24
24
  "execa": "5.1.1",
@@ -27,22 +27,21 @@
27
27
  "io-ts": "2.2.21",
28
28
  "log4js": "6.9.1",
29
29
  "mustache": "4.2.0",
30
- "node-fetch": "2.6.13",
30
+ "node-fetch": "3.3.2",
31
31
  "npm-check-updates": "16.3.11",
32
32
  "parse-github-url": "1.0.2",
33
33
  "semver": "7.5.4",
34
34
  "type-guards": "0.15.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@munierujp/eslint-config-typescript": "43.0.0",
38
- "@tsconfig/node18": "18.2.4",
37
+ "@munierujp/eslint-config-typescript": "44.0.0",
38
+ "@tsconfig/node20": "20.1.4",
39
39
  "@types/mustache": "4.2.5",
40
- "@types/node": "18.17.15",
41
- "@types/node-fetch": "2.6.11",
40
+ "@types/node": "20.12.9",
42
41
  "@types/parse-github-url": "1.0.3",
43
42
  "@types/semver": "7.5.8",
44
43
  "eslint": "8.57.0",
45
- "eslint-plugin-jest": "28.3.0",
44
+ "eslint-plugin-jest": "28.5.0",
46
45
  "jest": "29.7.0",
47
46
  "npm-run-all": "4.1.5",
48
47
  "rimraf": "5.0.5",