pr-checkmate 1.19.4 → 1.19.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/README.md +1 -15
- package/dist/cli.js +1 -0
- package/dist/init.js +1 -0
- package/dist/scripts/publish-github.js +4 -3
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
# 🔍 PR CheckMate
|
|
1
|
+
# 🔍 PR CheckMate ♟️
|
|
2
2
|
> **PR CheckMate** is an npm package for automating Pull Request checks.
|
|
3
3
|
> It helps teams maintain code quality by automatically validating linting, formatting, dependencies, and spelling before merging to `main`.
|
|
4
4
|
|
|
5
|
-
<table>
|
|
6
|
-
<tr>
|
|
7
|
-
<td>
|
|
8
|
-
|
|
9
5
|
## ⚡ Why PR CheckMate?
|
|
10
6
|
* ✅ Automatic checks on every PR without extra setup.
|
|
11
7
|
* ✅ No need to install ESLint, Prettier, or cspell in your project — all included.
|
|
@@ -15,16 +11,6 @@
|
|
|
15
11
|
* ✅ Package Vulnerabilities Check
|
|
16
12
|
* ✅ Scans for secrets using
|
|
17
13
|
|
|
18
|
-
</td>
|
|
19
|
-
<td>
|
|
20
|
-
|
|
21
|
-
<img src="./assets/logo1.png" width="200"/>
|
|
22
|
-
|
|
23
|
-
</td>
|
|
24
|
-
</tr>
|
|
25
|
-
</table>
|
|
26
|
-
|
|
27
|
-
|
|
28
14
|
<br>
|
|
29
15
|
> ⚠️ **Note:** Currently, PR CheckMate only supports **Node.js projects**.
|
|
30
16
|
|
package/dist/cli.js
CHANGED
package/dist/init.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = __importDefault(require("fs"));
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
9
10
|
function publishToGithub() {
|
|
10
11
|
const root = process.cwd();
|
|
@@ -22,11 +23,11 @@ function publishToGithub() {
|
|
|
22
23
|
try {
|
|
23
24
|
(0, child_process_1.execSync)(`mv ${pkgPath} ${backupPath}`);
|
|
24
25
|
(0, child_process_1.execSync)(`mv ${tempPath} ${pkgPath}`);
|
|
25
|
-
(0, child_process_1.execSync)(
|
|
26
|
-
|
|
26
|
+
(0, child_process_1.execSync)('npm publish --registry=https://npm.pkg.github.com');
|
|
27
|
+
utils_1.logger.log('[publishToGithub]: ✅ Published to GitHub Packages');
|
|
27
28
|
}
|
|
28
29
|
catch (err) {
|
|
29
|
-
|
|
30
|
+
utils_1.logger.error(`[publishToGithub]: ${err}`);
|
|
30
31
|
}
|
|
31
32
|
finally {
|
|
32
33
|
(0, child_process_1.execSync)(`mv ${backupPath} ${pkgPath} || true`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pr-checkmate",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.5",
|
|
4
4
|
"description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github-actions",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
30
|
"copy-configs": "ts-node src/scripts/copy-configs.ts",
|
|
31
|
-
"build": "npm run clean && npm run copy-configs && tsc &&
|
|
31
|
+
"build": "npm run clean && npm run copy-configs && tsc && npm run fix-shebang",
|
|
32
|
+
"fix-shebang": "node -e \"const fs=require('fs'); const path='dist/cli.js'; let content=fs.readFileSync(path,'utf8'); if(!content.startsWith('#!')){content='#!/usr/bin/env node\\n'+content; fs.writeFileSync(path,content);} fs.chmodSync(path,'755');\"",
|
|
32
33
|
"check": "npm run build && npm run lint && npm run prettier && npm run spellcheck",
|
|
33
34
|
"prepublishOnly": "npm run build",
|
|
34
35
|
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix",
|
|
@@ -77,4 +78,4 @@
|
|
|
77
78
|
"eslint": ">=8.0.0",
|
|
78
79
|
"prettier": ">=3.0.0"
|
|
79
80
|
}
|
|
80
|
-
}
|
|
81
|
+
}
|