npm-update-package 0.58.3 → 0.58.6

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
@@ -12,9 +12,9 @@ CLI tool for creating pull requests to update npm packages
12
12
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
13
13
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
14
14
 
15
- - [Usage](#usage)
16
15
  - [Requirements](#requirements)
17
16
  - [Supported platforms](#supported-platforms)
17
+ - [Usage](#usage)
18
18
  - [Options](#options)
19
19
  - [assignees](#assignees)
20
20
  - [assigneesSampleSize](#assigneessamplesize)
@@ -46,12 +46,6 @@ CLI tool for creating pull requests to update npm packages
46
46
 
47
47
  <!-- END doctoc generated TOC please keep comment here to allow auto update -->
48
48
 
49
- ## Usage
50
-
51
- ```sh
52
- npx npm-update-package --github-token $GITHUB_TOKEN
53
- ```
54
-
55
49
  ## Requirements
56
50
 
57
51
  - Git
@@ -63,6 +57,12 @@ npx npm-update-package --github-token $GITHUB_TOKEN
63
57
  - GitHub
64
58
  - GitHub Enterprise
65
59
 
60
+ ## Usage
61
+
62
+ ```sh
63
+ npx npm-update-package --github-token $GITHUB_TOKEN
64
+ ```
65
+
66
66
  ## Options
67
67
 
68
68
  You can customize behavior via CLI options.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.58.3",
3
+ "version": "0.58.6",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -15,18 +15,18 @@
15
15
  "bin": "dist/src/bin.js",
16
16
  "dependencies": {
17
17
  "@octokit/rest": "18.12.0",
18
- "commander": "9.1.0",
18
+ "commander": "9.2.0",
19
19
  "execa": "5.1.1",
20
- "fp-ts": "2.11.9",
20
+ "fp-ts": "2.11.10",
21
21
  "http-status-codes": "2.2.0",
22
22
  "io-ts": "2.2.16",
23
23
  "lodash": "4.14.2",
24
- "log4js": "6.4.4",
24
+ "log4js": "6.4.5",
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
  },
@@ -36,7 +36,7 @@
36
36
  "@types/jest": "27.4.1",
37
37
  "@types/lodash": "4.14.181",
38
38
  "@types/mustache": "4.1.2",
39
- "@types/node": "12.20.47",
39
+ "@types/node": "12.20.48",
40
40
  "@types/node-fetch": "2.6.1",
41
41
  "@types/parse-github-url": "1.0.0",
42
42
  "@types/semver": "7.3.9",
@@ -45,12 +45,14 @@
45
45
  "eslint-config-standard-with-typescript": "21.0.1",
46
46
  "eslint-plugin-import": "2.26.0",
47
47
  "eslint-plugin-jest": "26.1.4",
48
+ "eslint-plugin-lodash": "7.4.0",
48
49
  "eslint-plugin-node": "11.1.0",
49
50
  "eslint-plugin-promise": "6.0.0",
50
51
  "eslint-plugin-tsdoc": "0.2.16",
52
+ "eslint-plugin-you-dont-need-lodash-underscore": "6.12.0",
51
53
  "husky": "7.0.4",
52
54
  "jest": "27.4.7",
53
- "lint-staged": "12.3.7",
55
+ "lint-staged": "12.3.8",
54
56
  "npm-run-all": "4.1.5",
55
57
  "rimraf": "3.0.2",
56
58
  "ts-jest": "27.1.4",
@@ -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);
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AssigneesAdder = void 0;
7
7
  const shuffle_1 = __importDefault(require("lodash/shuffle"));
8
- // TODO: Add test
9
8
  class AssigneesAdder {
10
9
  constructor({ github, gitRepo }) {
11
10
  this.github = github;
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.3",
3
+ "version": "0.58.6",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -15,18 +15,18 @@
15
15
  "bin": "dist/src/bin.js",
16
16
  "dependencies": {
17
17
  "@octokit/rest": "18.12.0",
18
- "commander": "9.1.0",
18
+ "commander": "9.2.0",
19
19
  "execa": "5.1.1",
20
- "fp-ts": "2.11.9",
20
+ "fp-ts": "2.11.10",
21
21
  "http-status-codes": "2.2.0",
22
22
  "io-ts": "2.2.16",
23
23
  "lodash": "4.14.2",
24
- "log4js": "6.4.4",
24
+ "log4js": "6.4.5",
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
  },
@@ -36,7 +36,7 @@
36
36
  "@types/jest": "27.4.1",
37
37
  "@types/lodash": "4.14.181",
38
38
  "@types/mustache": "4.1.2",
39
- "@types/node": "12.20.47",
39
+ "@types/node": "12.20.48",
40
40
  "@types/node-fetch": "2.6.1",
41
41
  "@types/parse-github-url": "1.0.0",
42
42
  "@types/semver": "7.3.9",
@@ -45,12 +45,14 @@
45
45
  "eslint-config-standard-with-typescript": "21.0.1",
46
46
  "eslint-plugin-import": "2.26.0",
47
47
  "eslint-plugin-jest": "26.1.4",
48
+ "eslint-plugin-lodash": "7.4.0",
48
49
  "eslint-plugin-node": "11.1.0",
49
50
  "eslint-plugin-promise": "6.0.0",
50
51
  "eslint-plugin-tsdoc": "0.2.16",
52
+ "eslint-plugin-you-dont-need-lodash-underscore": "6.12.0",
51
53
  "husky": "7.0.4",
52
54
  "jest": "27.4.7",
53
- "lint-staged": "12.3.7",
55
+ "lint-staged": "12.3.8",
54
56
  "npm-run-all": "4.1.5",
55
57
  "rimraf": "3.0.2",
56
58
  "ts-jest": "27.1.4",