pr-checkmate 1.9.13 → 1.17.0

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.
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const fs_1 = __importDefault(require("fs"));
7
+ const child_process_1 = require("child_process");
8
+ const path_1 = __importDefault(require("path"));
9
+ function publishToGithub() {
10
+ const root = process.cwd();
11
+ const pkgPath = path_1.default.join(root, 'package.json');
12
+ const tempPath = path_1.default.join(root, 'package.json.github');
13
+ const backupPath = path_1.default.join(root, 'package.json.bak');
14
+ const pkg = JSON.parse(fs_1.default.readFileSync(pkgPath, 'utf8'));
15
+ pkg.name = '@mybono/pr-checkmate';
16
+ pkg.publishConfig = {
17
+ registry: 'https://npm.pkg.github.com',
18
+ access: 'public',
19
+ };
20
+ delete pkg.scripts?.prepublishOnly;
21
+ fs_1.default.writeFileSync(tempPath, JSON.stringify(pkg, null, 2));
22
+ try {
23
+ (0, child_process_1.execSync)(`mv ${pkgPath} ${backupPath}`);
24
+ (0, child_process_1.execSync)(`mv ${tempPath} ${pkgPath}`);
25
+ (0, child_process_1.execSync)(`npm publish --registry=https://npm.pkg.github.com`);
26
+ console.log('✅ Published to GitHub Packages');
27
+ }
28
+ catch (err) {
29
+ console.error(err);
30
+ }
31
+ finally {
32
+ (0, child_process_1.execSync)(`mv ${backupPath} ${pkgPath} || true`);
33
+ }
34
+ }
35
+ publishToGithub();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-checkmate",
3
- "version": "1.9.13",
3
+ "version": "1.17.0",
4
4
  "description": "Automated PR quality checks: linting, formatting, dependency analysis, and spellcheck",
5
5
  "keywords": [
6
6
  "github-actions",