npm-update-package 4.0.4 → 4.0.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/dist/app.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export const name = 'npm-update-package';
2
- export const version = '4.0.4';
2
+ export const version = '4.0.6';
3
3
  export const homepage = 'https://github.com/npm-update-package/npm-update-package';
@@ -1,4 +1,4 @@
1
- import { range } from '../util/range.js';
1
+ import range from 'lodash/range.js';
2
2
  export class GitHub {
3
3
  octokit;
4
4
  constructor(octokit) {
@@ -1,4 +1,4 @@
1
- import { sampleSize } from '../../../util/sampleSize.js';
1
+ import sampleSize from 'lodash/sampleSize.js';
2
2
  export class AssigneesAdder {
3
3
  github;
4
4
  gitRepo;
@@ -1,4 +1,4 @@
1
- import { sampleSize } from '../../../util/sampleSize.js';
1
+ import sampleSize from 'lodash/sampleSize.js';
2
2
  export class ReviewersAdder {
3
3
  github;
4
4
  gitRepo;
@@ -1,5 +1,5 @@
1
+ import { setTimeout } from 'node:timers/promises';
1
2
  import { gte, lte, valid } from 'semver';
2
- import { sleep } from '../../../util/sleep.js';
3
3
  // TODO: Split into multiple classes and functions
4
4
  export class ReleasesFetcher {
5
5
  options;
@@ -34,7 +34,7 @@ export class ReleasesFetcher {
34
34
  const releases = [];
35
35
  for (const [i, tag] of tags.entries()) {
36
36
  if (i > 0) {
37
- await sleep(this.options.fetchInterval);
37
+ await setTimeout(this.options.fetchInterval);
38
38
  }
39
39
  const release = await this.fetchReleaseByTag({
40
40
  gitRepo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -19,15 +19,14 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@octokit/rest": "20.1.1",
22
- "array-shuffle": "2.0.0",
23
22
  "commander": "12.0.0",
24
23
  "execa": "5.1.1",
25
24
  "fp-ts": "2.16.5",
26
25
  "http-status-codes": "2.3.0",
27
26
  "io-ts": "2.2.21",
27
+ "lodash": "4.17.21",
28
28
  "log4js": "6.9.1",
29
29
  "mustache": "4.2.0",
30
- "node-fetch": "2.6.13",
31
30
  "npm-check-updates": "16.3.11",
32
31
  "parse-github-url": "1.0.2",
33
32
  "semver": "7.5.4",
@@ -36,18 +35,19 @@
36
35
  "devDependencies": {
37
36
  "@munierujp/eslint-config-typescript": "44.0.0",
38
37
  "@tsconfig/node20": "20.1.4",
38
+ "@types/lodash": "4.17.1",
39
39
  "@types/mustache": "4.2.5",
40
40
  "@types/node": "20.12.11",
41
- "@types/node-fetch": "2.6.11",
42
41
  "@types/parse-github-url": "1.0.3",
43
42
  "@types/semver": "7.5.8",
44
43
  "eslint": "8.57.0",
44
+ "eslint-config-lodash": "4.0.1",
45
45
  "eslint-plugin-jest": "28.5.0",
46
46
  "jest": "29.7.0",
47
- "npm-run-all": "4.1.5",
47
+ "npm-run-all2": "6.1.2",
48
48
  "rimraf": "5.0.6",
49
49
  "ts-jest": "29.1.2",
50
- "tsx": "4.9.4",
50
+ "tsx": "4.10.0",
51
51
  "typescript": "5.4.5",
52
52
  "utility-types": "3.11.0"
53
53
  },
@@ -1,5 +0,0 @@
1
- export function* range(start, end) {
2
- for (let i = start; i < end; i++) {
3
- yield i;
4
- }
5
- }
@@ -1,4 +0,0 @@
1
- import shuffle from 'array-shuffle';
2
- export const sampleSize = (array, size) => {
3
- return shuffle(array).slice(0, size);
4
- };
@@ -1,3 +0,0 @@
1
- export const sleep = async (ms) => {
2
- await new Promise(resolve => setTimeout(resolve, ms));
3
- };