npm-update-package 0.45.4 → 0.45.5

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.45.4",
3
+ "version": "0.45.5",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -20,6 +20,7 @@
20
20
  "fp-ts": "2.11.8",
21
21
  "http-status-codes": "2.2.0",
22
22
  "io-ts": "2.2.16",
23
+ "lodash": "4.14.2",
23
24
  "log4js": "6.4.2",
24
25
  "mustache": "4.1.0",
25
26
  "npm-check-updates": "12.5.2",
@@ -31,6 +32,7 @@
31
32
  "@jest/types": "27.4.2",
32
33
  "@tsconfig/node12": "1.0.9",
33
34
  "@types/jest": "27.4.0",
35
+ "@types/lodash": "4.14.179",
34
36
  "@types/mustache": "4.1.2",
35
37
  "@types/node": "12.20.40",
36
38
  "@types/parse-github-url": "1.0.0",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GitHub = void 0;
4
+ const lodash_1 = require("lodash");
4
5
  class GitHub {
5
6
  constructor(octokit) {
6
7
  this.octokit = octokit;
@@ -50,7 +51,7 @@ class GitHub {
50
51
  }
51
52
  async fetchBranches({ owner, repo }) {
52
53
  const branches = [];
53
- for (let page = 1;; page++) {
54
+ for (const page of (0, lodash_1.range)(1, 11)) {
54
55
  const { data } = await this.octokit.repos.listBranches({
55
56
  owner,
56
57
  repo,
@@ -74,7 +75,7 @@ class GitHub {
74
75
  }
75
76
  async fetchPullRequests({ owner, repo }) {
76
77
  const pullRequests = [];
77
- for (let page = 1;; page++) {
78
+ for (const page of (0, lodash_1.range)(1, 11)) {
78
79
  const { data } = await this.octokit.pulls.list({
79
80
  owner,
80
81
  repo,
@@ -90,7 +91,7 @@ class GitHub {
90
91
  }
91
92
  async fetchReleases({ owner, repo }) {
92
93
  const releases = [];
93
- for (let page = 1;; page++) {
94
+ for (const page of (0, lodash_1.range)(1, 11)) {
94
95
  const { data } = await this.octokit.repos.listReleases({
95
96
  owner,
96
97
  repo,
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PullRequestFinder = void 0;
4
4
  const metadata_1 = require("../metadata");
5
5
  const isPullRequestByNpmUpdatePackage_1 = require("./isPullRequestByNpmUpdatePackage");
6
- // TODO: Add test
7
6
  class PullRequestFinder {
8
7
  constructor(pullRequests) {
9
8
  this.pullRequests = pullRequests;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toCommanderOption = void 0;
4
4
  const commander_1 = require("commander");
5
5
  const OptionType_1 = require("./OptionType");
6
- // TODO: add test
7
6
  const toCommanderOption = (cliOption) => {
8
7
  const argument = createArgumentString(cliOption);
9
8
  const option = new commander_1.Option(`--${cliOption.name} ${argument}`, cliOption.description);
@@ -17,10 +16,8 @@ const toCommanderOption = (cliOption) => {
17
16
  };
18
17
  exports.toCommanderOption = toCommanderOption;
19
18
  const createArgumentString = (cliOption) => {
20
- const prefix = cliOption.required ? '<' : '[';
21
- const suffix = cliOption.required ? '>' : ']';
22
19
  const name = createArgumentNameString(cliOption.type);
23
- return `${prefix}${name}${suffix}`;
20
+ return cliOption.required ? `<${name}>` : `[${name}]`;
24
21
  };
25
22
  const createArgumentNameString = (optionType) => {
26
23
  switch (optionType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.45.4",
3
+ "version": "0.45.5",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -20,6 +20,7 @@
20
20
  "fp-ts": "2.11.8",
21
21
  "http-status-codes": "2.2.0",
22
22
  "io-ts": "2.2.16",
23
+ "lodash": "4.14.2",
23
24
  "log4js": "6.4.2",
24
25
  "mustache": "4.1.0",
25
26
  "npm-check-updates": "12.5.2",
@@ -31,6 +32,7 @@
31
32
  "@jest/types": "27.4.2",
32
33
  "@tsconfig/node12": "1.0.9",
33
34
  "@types/jest": "27.4.0",
35
+ "@types/lodash": "4.14.179",
34
36
  "@types/mustache": "4.1.2",
35
37
  "@types/node": "12.20.40",
36
38
  "@types/parse-github-url": "1.0.0",