pr-checkmate 1.21.12 → 1.21.14

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/LICENSE CHANGED
@@ -1,9 +1,54 @@
1
- Copyright © 2025 Mybono.
2
- All rights reserved.
1
+ PROPRIETARY SOFTWARE LICENSE
2
+ All Rights Reserved
3
3
 
4
- This software and associated documentation files (the “Software”) are the exclusive property of the copyright holder.
4
+ Copyright (c) 2025-2026 Mybono. All Rights Reserved.
5
5
 
6
- Permission is hereby NOT granted to any person or entity to copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, or use the Software in any manner, unless an explicit written permission is provided by the copyright holder.
6
+ ================================================================================
7
+ NOTICE
8
+ ================================================================================
7
9
 
8
- Any unauthorized use, modification, reproduction, or distribution of the Software is strictly prohibited and may result in civil and criminal penalties.
10
+ This software and its source code, documentation, data, models, and all
11
+ associated materials (collectively, the "Software") are the confidential and
12
+ proprietary property of Mybono (the "Owner").
9
13
 
14
+ NO LICENSE IS GRANTED. This is NOT open-source software. The Software is
15
+ made available for viewing solely to persons explicitly and individually
16
+ authorized in writing by the Owner. The mere presence of this source code in
17
+ any repository, archive, or medium does NOT constitute permission to use it.
18
+
19
+ ================================================================================
20
+ RESTRICTIONS
21
+ ================================================================================
22
+
23
+ Without the prior express written permission of the Owner, you MAY NOT:
24
+
25
+ 1. Copy, reproduce, or duplicate the Software, in whole or in part.
26
+ 2. Use or execute the Software for any purpose, commercial or otherwise.
27
+ 3. Modify, adapt, translate, or create derivative works from the Software.
28
+ 4. Distribute, publish, sublicense, sell, rent, lease, or transfer the
29
+ Software or any portion thereof to any third party.
30
+ 5. Fork, mirror, or re-host the Software in any public or private repository.
31
+ 6. Reverse engineer, decompile, or disassemble the Software.
32
+ 7. Remove, obscure, or alter this notice or any copyright, trademark, or
33
+ other proprietary notices contained in the Software.
34
+
35
+ Any use not expressly permitted in writing by the Owner is strictly
36
+ prohibited and constitutes a violation of applicable copyright and
37
+ intellectual property laws.
38
+
39
+ ================================================================================
40
+ NO WARRANTY
41
+ ================================================================================
42
+
43
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
44
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE
46
+ OWNER BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN
47
+ ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
48
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
+
50
+ ================================================================================
51
+ CONTACT
52
+ ================================================================================
53
+
54
+ For licensing inquiries or permission requests, contact the Owner: Mybono.
@@ -16,22 +16,26 @@ exports.dependencyCheck = {
16
16
  return node_fs_1.default.existsSync(node_path_1.default.join(ctx.cwd, 'package.json'));
17
17
  },
18
18
  async run(ctx) {
19
- let stdout;
19
+ // Resolve the bundled depcheck binary and run it via the current node — never
20
+ // shell out to `npx`, which fails (exit 127) when depcheck isn't on the path.
21
+ let depcheckBin;
20
22
  try {
21
- ({ stdout } = await (0, execa_1.execa)('npx', ['depcheck', '--json'], { cwd: ctx.cwd }));
23
+ depcheckBin = (0, utils_1.resolvePackageBin)('depcheck', 'bin/depcheck.js');
22
24
  }
23
- catch (err) {
24
- // depcheck exits non-zero when it finds issues but still emits JSON on stdout.
25
- if (err instanceof execa_1.ExecaError && err.stdout) {
26
- stdout = err.stdout;
27
- }
28
- else {
29
- throw err;
30
- }
25
+ catch {
26
+ return (0, types_1.skip)('depcheck unavailable');
31
27
  }
28
+ // reject:false — depcheck exits non-zero when it finds issues but still emits JSON on stdout.
29
+ const { stdout } = await (0, execa_1.execa)(process.execPath, [depcheckBin, '--json'], {
30
+ cwd: ctx.cwd,
31
+ reject: false,
32
+ });
32
33
  const start = stdout.indexOf('{');
33
34
  const end = stdout.lastIndexOf('}');
34
- const json = start !== -1 && end !== -1 ? stdout.slice(start, end + 1) : stdout;
35
+ // No JSON at all → the tool couldn't produce a result; skip rather than fail the client's PR.
36
+ if (start === -1 || end === -1)
37
+ return (0, types_1.skip)('depcheck produced no output');
38
+ const json = stdout.slice(start, end + 1);
35
39
  let result;
36
40
  try {
37
41
  result = JSON.parse(json);
@@ -24,10 +24,24 @@ exports.licenseCheck = {
24
24
  async run(ctx) {
25
25
  const allowPackages = new Set(ctx.config.licenseCheck?.allowPackages ?? []);
26
26
  const allowLicenses = ctx.config.licenseCheck?.allowLicenses ?? [];
27
- const { stdout } = await (0, execa_1.execa)('npx', ['license-checker', '--json', '--production'], {
28
- cwd: ctx.cwd,
29
- });
30
- const licenses = JSON.parse(stdout);
27
+ // Resolve the bundled license-checker binary and run it via the current node — never
28
+ // shell out to `npx`, which fails (exit 127) when license-checker isn't on the path.
29
+ let licenseCheckerBin;
30
+ try {
31
+ licenseCheckerBin = (0, utils_1.resolvePackageBin)('license-checker', 'bin/license-checker');
32
+ }
33
+ catch {
34
+ return (0, types_1.skip)('license-checker unavailable');
35
+ }
36
+ const { stdout, failed } = await (0, execa_1.execa)(process.execPath, [licenseCheckerBin, '--json', '--production'], { cwd: ctx.cwd, reject: false });
37
+ let licenses;
38
+ try {
39
+ licenses = JSON.parse(stdout);
40
+ }
41
+ catch {
42
+ // Tool couldn't produce parseable output; skip rather than fail the client's PR.
43
+ return (0, types_1.skip)(failed ? 'license-checker failed to run' : 'license-checker produced invalid JSON');
44
+ }
31
45
  const violations = [];
32
46
  for (const [pkg, info] of Object.entries(licenses)) {
33
47
  if (allowPackages.has(bareName(pkg)))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-checkmate",
3
- "version": "1.21.12",
3
+ "version": "1.21.14",
4
4
  "description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
5
5
  "keywords": [
6
6
  "github-actions",
@@ -72,6 +72,7 @@
72
72
  "@typescript-eslint/parser": "^8.47.0",
73
73
  "@wasm-fmt/clang-format": "^22.1.8",
74
74
  "cspell": "^9.3.2",
75
+ "depcheck": "^1.4.7",
75
76
  "eslint": "^9.26.0",
76
77
  "eslint-config-prettier": "^10.1.8",
77
78
  "eslint-plugin-import": "^2.29.0",
@@ -80,6 +81,7 @@
80
81
  "gitleaks-secret-scanner-fixed": "^2.1.3",
81
82
  "inquirer": "^13.0.1",
82
83
  "jscpd": "^3.5.10",
84
+ "license-checker": "^25.0.1",
83
85
  "markdownlint-cli": "^0.49.0",
84
86
  "prettier": ">=3.0.0",
85
87
  "ts-node": "^10.9.1",