npm-update-package 4.0.7 → 4.0.9

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
@@ -51,9 +51,9 @@ CLI tool for creating pull requests to update npm packages
51
51
 
52
52
  ## Requirements
53
53
 
54
- - Git
55
54
  - Node.js v20 or later
56
55
  - npm or Yarn
56
+ - Git
57
57
 
58
58
  ## Supported platforms
59
59
 
package/dist/app.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export const name = 'npm-update-package';
2
- export const version = '4.0.7';
2
+ export const version = '4.0.9';
3
3
  export const homepage = 'https://github.com/npm-update-package/npm-update-package';
@@ -1,5 +1,4 @@
1
1
  import fs from 'node:fs';
2
- // TODO: Add test
3
2
  export const canReadWrite = async (path) => {
4
3
  try {
5
4
  await fs.promises.access(path, fs.constants.R_OK | fs.constants.W_OK);
@@ -1,4 +1,4 @@
1
- import { readFile } from '../../../file/readFile.js';
1
+ import { readFile } from 'node:fs/promises';
2
2
  import { extractRepository } from '../../../package-json/extractRepository.js';
3
3
  import { parsePackageJson } from '../../../package-json/parsePackageJson.js';
4
4
  import { createFooter } from './createFooter.js';
@@ -50,7 +50,7 @@ export class PullRequestBodyCreator {
50
50
  return sections.join('\n\n');
51
51
  }
52
52
  async extractRepository(outdatedPackage) {
53
- const packageJson = await readFile(`node_modules/${outdatedPackage.name}/package.json`);
53
+ const packageJson = await readFile(`node_modules/${outdatedPackage.name}/package.json`, 'utf8');
54
54
  const pkg = parsePackageJson(packageJson);
55
55
  return extractRepository(pkg);
56
56
  }
@@ -1,7 +1,7 @@
1
- import { readFile } from '../file/readFile.js';
1
+ import { readFile } from 'node:fs/promises';
2
2
  import { parsePackageJson } from './parsePackageJson.js';
3
3
  // TODO: Add test
4
4
  export const readPackageJson = async (path) => {
5
- const json = await readFile(path);
5
+ const json = await readFile(path, 'utf8');
6
6
  return parsePackageJson(json);
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "4.0.7",
3
+ "version": "4.0.9",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  "prebuild": "npm run clean",
12
12
  "prepublishOnly": "npm-run-all lint test build",
13
13
  "syncVersion": "tsx scripts/syncVersion.ts",
14
- "test": "jest"
14
+ "test": "glob -c 'tsx --test' 'src/**/*.test.ts'"
15
15
  },
16
16
  "bin": "dist/bin/npm-update-package.js",
17
17
  "engines": {
@@ -19,9 +19,9 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@octokit/rest": "20.1.1",
22
- "commander": "12.0.0",
23
- "execa": "9.0.2",
24
- "fp-ts": "2.16.5",
22
+ "commander": "12.1.0",
23
+ "execa": "9.1.0",
24
+ "fp-ts": "2.16.6",
25
25
  "http-status-codes": "2.3.0",
26
26
  "io-ts": "2.2.21",
27
27
  "lodash": "4.17.21",
@@ -33,21 +33,21 @@
33
33
  "type-guards": "0.15.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@munierujp/eslint-config-typescript": "44.0.0",
36
+ "@munierujp/eslint-config-typescript": "46.0.1",
37
37
  "@tsconfig/node20": "20.1.4",
38
- "@types/lodash": "4.17.1",
38
+ "@types/lodash": "4.17.4",
39
39
  "@types/mustache": "4.2.5",
40
- "@types/node": "20.12.11",
40
+ "@types/node": "20.12.12",
41
41
  "@types/parse-github-url": "1.0.3",
42
42
  "@types/semver": "7.5.8",
43
43
  "eslint": "8.57.0",
44
- "eslint-config-lodash": "4.0.1",
45
- "eslint-plugin-jest": "28.5.0",
46
- "jest": "29.7.0",
47
- "npm-run-all2": "6.1.2",
44
+ "eslint-config-lodash": "4.0.3",
45
+ "glob": "10.3.15",
46
+ "nock": "14.0.0-beta.6",
47
+ "npm-run-all2": "6.2.0",
48
48
  "rimraf": "5.0.7",
49
- "ts-jest": "29.1.2",
50
- "tsx": "4.10.0",
49
+ "test-each": "7.0.0",
50
+ "tsx": "4.11.0",
51
51
  "typescript": "5.4.5",
52
52
  "utility-types": "3.11.0"
53
53
  },
@@ -1,4 +0,0 @@
1
- import fs from 'node:fs';
2
- export const readFile = async (path) => {
3
- return await fs.promises.readFile(path, 'utf8');
4
- };