npm-update-package 0.58.1 → 0.58.4

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
@@ -294,7 +294,7 @@ Allowed values:
294
294
  |Value|Description|
295
295
  |---|---|
296
296
  |`create`|Create new pull request.|
297
- |`recreate`|Close old pull requests and create new pull request.|
297
+ |`recreate`|Close outdated pull requests and create new pull request.|
298
298
  |`skip`|Skip creating pull request.|
299
299
 
300
300
  Example:
@@ -567,6 +567,8 @@ The following shows the process flow of npm-update-package.
567
567
  ```plantuml
568
568
  @startuml
569
569
  start
570
+ group bin
571
+ :Initialize options;
570
572
  group main
571
573
  :Get outdated packages;
572
574
 
@@ -583,29 +585,48 @@ if (Label does not exist) then (yes)
583
585
  else (no)
584
586
  endif
585
587
 
588
+ :Initialize Git config;
586
589
  group OutdatedPackagesProcessor
590
+
587
591
  while (Package exists) is (yes)
588
592
  group OutdatedPackageProcessor
589
593
  if (Remote branch does not exist) then (yes)
590
- :Create branch;
591
- :Update package;
592
- :Create pull request;
593
- :Close old pull requests;
594
- :Remove branch;
594
+ switch (outdatedPrStrategy)
595
+ case (create)
596
+ :Create branch;
597
+ :Update package;
598
+ :Create pull request;
599
+ :Remove branch;
600
+ case (recreate)
601
+ :Create branch;
602
+ :Update package;
603
+ :Create pull request;
604
+ :Close outdated pull requests;
605
+ :Remove branch;
606
+ case (skip)
607
+ if (Outdated pull requests don't exist) then (yes)
608
+ :Create branch;
609
+ :Update package;
610
+ :Create pull request;
611
+ :Remove branch;
612
+ else (no)
613
+ endif
614
+ endswitch
595
615
  else (no)
596
616
  endif
597
617
  end group
598
618
  endwhile (no)
599
619
 
600
- end group
601
-
602
- end group
620
+ end group /' OutdatedPackagesProcessor '/
621
+ :Show results;
622
+ end group /' main '/
623
+ end group /' bin '/
603
624
  end
604
625
  @enduml
605
626
  ```
606
627
  -->
607
628
 
608
- [![](http://www.plantuml.com/plantuml/svg/VL1BJiCm4DtFAT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alrwwWJbllQr-3AxDBJetwl1cN2I9aIxyvvxpbHILmTWlyVBBsuSV51pNwyEWSTXysAvUjorWMjIre_Br2IcVTpFlDgldXJep92ttFMDDCQoummfG7SRjQpZCsjsJttV4QaD7arjlvIVtq5rTL3APgxosCQ_2y0)](http://www.plantuml.com/plantuml/uml/hLD1Rjim4Bpp5NEpV0Xojoyf0ZGeK211Wpw0bjOM4OghagkwwUlhZIYsHAtsaej4xevsECFHNH8RPHgyULkOK-HfnC45i_iKd3ZhtKy2Z-8uf7rk3rRx3oJWIJehr66qxOizqGLYt17D1-zB2JOIfl56-4QnMqXF0SqhfQq1A7I6V28qWRVcidD7OtOVITeUaGOMmY7QqFOwEzV7oNj4-ZPHaeNnipsGHyUK45X0FroIcWgx-qXM25wX-xzOAyKFJj1oEBhJ8lenIttAifuYjvGIHsFElVE49dTcxhI5IuNwweZV4m2LyELFkV-M0gIpKoiQNcR6PubMwFGwzrkhwjetnNEb690PzalrwwWJbllQr-3AxDBJetwl1cN2I9aIxyvvxpbHILmTWlyVBBsuSV51pNwyEWSTXysAvUjorWMjIre_Br2IcVTpFlDgldXJep92ttFMDDCQoummfG7SRjQpZCsjsJttV4QaD7arjlvIVtq5rTL3APgxosCQ_2y0)
609
630
 
610
631
  ## FAQ
611
632
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.58.1",
3
+ "version": "0.58.4",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -24,9 +24,9 @@
24
24
  "log4js": "6.4.4",
25
25
  "mustache": "4.1.0",
26
26
  "node-fetch": "2.6.7",
27
- "npm-check-updates": "12.5.8",
27
+ "npm-check-updates": "12.5.9",
28
28
  "parse-github-url": "1.0.2",
29
- "semver": "7.3.6",
29
+ "semver": "7.3.7",
30
30
  "sleep-promise": "9.1.0",
31
31
  "type-guards": "0.15.0"
32
32
  },
@@ -40,7 +40,7 @@
40
40
  "@types/node-fetch": "2.6.1",
41
41
  "@types/parse-github-url": "1.0.0",
42
42
  "@types/semver": "7.3.9",
43
- "@typescript-eslint/eslint-plugin": "5.18.0",
43
+ "@typescript-eslint/eslint-plugin": "5.19.0",
44
44
  "eslint": "8.13.0",
45
45
  "eslint-config-standard-with-typescript": "21.0.1",
46
46
  "eslint-plugin-import": "2.26.0",
@@ -16,9 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./FailedResult"), exports);
18
18
  __exportStar(require("./OutdatedPackage"), exports);
19
- __exportStar(require("./OutdatedPackageProcessor"), exports);
20
- __exportStar(require("./OutdatedPackageProcessorCreator"), exports);
21
19
  __exportStar(require("./OutdatedPackagesProcessor"), exports);
22
- __exportStar(require("./OutdatedPullRequestStrategy"), exports);
23
20
  __exportStar(require("./PackageUpdater"), exports);
24
21
  __exportStar(require("./SucceededResult"), exports);
package/dist/src/main.js CHANGED
@@ -7,6 +7,7 @@ const git_1 = require("./git");
7
7
  const github_1 = require("./github");
8
8
  const logger_1 = require("./logger");
9
9
  const ncu_1 = require("./ncu");
10
+ const outdated_package_processor_1 = require("./outdated-package-processor");
10
11
  const package_manager_1 = require("./package-manager");
11
12
  const terminal_1 = require("./terminal");
12
13
  // TODO: Add test
@@ -102,7 +103,7 @@ const main = async (options) => {
102
103
  packageManager,
103
104
  ncu
104
105
  });
105
- const outdatedPackageProcessorCreator = new core_1.OutdatedPackageProcessorCreator(options);
106
+ const outdatedPackageProcessorCreator = new outdated_package_processor_1.OutdatedPackageProcessorCreator(options);
106
107
  const outdatedPackageProcessor = outdatedPackageProcessorCreator.create({
107
108
  git,
108
109
  packageManager,
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isOptions = void 0;
4
4
  const io_ts_1 = require("io-ts");
5
- const core_1 = require("../core");
6
5
  const logger_1 = require("../logger");
6
+ const outdated_package_processor_1 = require("../outdated-package-processor");
7
7
  const package_manager_1 = require("../package-manager");
8
8
  const Options = (0, io_ts_1.intersection)([
9
9
  (0, io_ts_1.type)({
@@ -21,9 +21,9 @@ const Options = (0, io_ts_1.intersection)([
21
21
  (0, io_ts_1.literal)(logger_1.LogLevel.Trace)
22
22
  ]),
23
23
  outdatedPrStrategy: (0, io_ts_1.union)([
24
- (0, io_ts_1.literal)(core_1.OutdatedPullRequestStrategy.Create),
25
- (0, io_ts_1.literal)(core_1.OutdatedPullRequestStrategy.Recreate),
26
- (0, io_ts_1.literal)(core_1.OutdatedPullRequestStrategy.Skip)
24
+ (0, io_ts_1.literal)(outdated_package_processor_1.OutdatedPullRequestStrategy.Create),
25
+ (0, io_ts_1.literal)(outdated_package_processor_1.OutdatedPullRequestStrategy.Recreate),
26
+ (0, io_ts_1.literal)(outdated_package_processor_1.OutdatedPullRequestStrategy.Skip)
27
27
  ]),
28
28
  prBodyGithubHost: io_ts_1.string,
29
29
  prTitle: io_ts_1.string
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cliOptions = void 0;
4
- const core_1 = require("../core");
5
4
  const logger_1 = require("../logger");
5
+ const outdated_package_processor_1 = require("../outdated-package-processor");
6
6
  const package_manager_1 = require("../package-manager");
7
7
  const OptionType_1 = require("./OptionType");
8
8
  exports.cliOptions = [
@@ -85,11 +85,11 @@ exports.cliOptions = [
85
85
  type: OptionType_1.OptionType.String,
86
86
  required: false,
87
87
  choices: [
88
- core_1.OutdatedPullRequestStrategy.Create,
89
- core_1.OutdatedPullRequestStrategy.Recreate,
90
- core_1.OutdatedPullRequestStrategy.Skip
88
+ outdated_package_processor_1.OutdatedPullRequestStrategy.Create,
89
+ outdated_package_processor_1.OutdatedPullRequestStrategy.Recreate,
90
+ outdated_package_processor_1.OutdatedPullRequestStrategy.Skip
91
91
  ],
92
- default: core_1.OutdatedPullRequestStrategy.Recreate
92
+ default: outdated_package_processor_1.OutdatedPullRequestStrategy.Recreate
93
93
  },
94
94
  {
95
95
  name: 'package-manager',
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OutdatedPackageProcessorCreator = void 0;
4
- const Create_1 = require("./Create");
4
+ const create_1 = require("./create");
5
5
  const OutdatedPullRequestStrategy_1 = require("./OutdatedPullRequestStrategy");
6
- const Recreate_1 = require("./Recreate");
7
- const Skip_1 = require("./Skip");
6
+ const recreate_1 = require("./recreate");
7
+ const skip_1 = require("./skip");
8
8
  class OutdatedPackageProcessorCreator {
9
9
  constructor(options) {
10
10
  this.options = options;
@@ -12,7 +12,7 @@ class OutdatedPackageProcessorCreator {
12
12
  create({ git, packageManager, pullRequestCreator, branchFinder, commitMessageCreator, pullRequestFinder, pullRequestsCloser, packageUpdater }) {
13
13
  switch (this.options.outdatedPrStrategy) {
14
14
  case OutdatedPullRequestStrategy_1.OutdatedPullRequestStrategy.Create:
15
- return new Create_1.Create({
15
+ return new create_1.Create({
16
16
  git,
17
17
  packageManager,
18
18
  pullRequestCreator,
@@ -21,7 +21,7 @@ class OutdatedPackageProcessorCreator {
21
21
  packageUpdater
22
22
  });
23
23
  case OutdatedPullRequestStrategy_1.OutdatedPullRequestStrategy.Recreate:
24
- return new Recreate_1.Recreate({
24
+ return new recreate_1.Recreate({
25
25
  git,
26
26
  packageManager,
27
27
  pullRequestCreator,
@@ -32,7 +32,7 @@ class OutdatedPackageProcessorCreator {
32
32
  packageUpdater
33
33
  });
34
34
  case OutdatedPullRequestStrategy_1.OutdatedPullRequestStrategy.Skip:
35
- return new Skip_1.Skip({
35
+ return new skip_1.Skip({
36
36
  git,
37
37
  packageManager,
38
38
  pullRequestCreator,
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Create = void 0;
4
4
  const Either_1 = require("fp-ts/lib/Either");
5
- const git_1 = require("../git");
6
- const logger_1 = require("../logger");
5
+ const git_1 = require("../../git");
6
+ const logger_1 = require("../../logger");
7
7
  // TODO: Add test
8
8
  class Create {
9
9
  constructor({ git, packageManager, pullRequestCreator, branchFinder, commitMessageCreator, packageUpdater }) {
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Create"), exports);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./OutdatedPackageProcessor"), exports);
18
+ __exportStar(require("./OutdatedPackageProcessorCreator"), exports);
19
+ __exportStar(require("./OutdatedPullRequestStrategy"), exports);
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Recreate = void 0;
4
4
  const Either_1 = require("fp-ts/lib/Either");
5
- const git_1 = require("../git");
6
- const logger_1 = require("../logger");
5
+ const git_1 = require("../../git");
6
+ const logger_1 = require("../../logger");
7
7
  // TODO: Add test
8
8
  class Recreate {
9
9
  constructor({ git, packageManager, pullRequestCreator, branchFinder, commitMessageCreator, packageUpdater, pullRequestFinder, pullRequestsCloser }) {
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Recreate"), exports);
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Skip = void 0;
4
4
  const Either_1 = require("fp-ts/lib/Either");
5
- const git_1 = require("../git");
6
- const logger_1 = require("../logger");
5
+ const git_1 = require("../../git");
6
+ const logger_1 = require("../../logger");
7
7
  // TODO: Add test
8
8
  class Skip {
9
9
  constructor({ git, packageManager, pullRequestCreator, branchFinder, commitMessageCreator, packageUpdater, pullRequestFinder }) {
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Skip"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.58.1",
3
+ "version": "0.58.4",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -24,9 +24,9 @@
24
24
  "log4js": "6.4.4",
25
25
  "mustache": "4.1.0",
26
26
  "node-fetch": "2.6.7",
27
- "npm-check-updates": "12.5.8",
27
+ "npm-check-updates": "12.5.9",
28
28
  "parse-github-url": "1.0.2",
29
- "semver": "7.3.6",
29
+ "semver": "7.3.7",
30
30
  "sleep-promise": "9.1.0",
31
31
  "type-guards": "0.15.0"
32
32
  },
@@ -40,7 +40,7 @@
40
40
  "@types/node-fetch": "2.6.1",
41
41
  "@types/parse-github-url": "1.0.0",
42
42
  "@types/semver": "7.3.9",
43
- "@typescript-eslint/eslint-plugin": "5.18.0",
43
+ "@typescript-eslint/eslint-plugin": "5.19.0",
44
44
  "eslint": "8.13.0",
45
45
  "eslint-config-standard-with-typescript": "21.0.1",
46
46
  "eslint-plugin-import": "2.26.0",