@hexonet/semantic-release-whmcs 5.0.57 → 5.0.58
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/HISTORY.md +7 -0
- package/lib/get-github-releases.js +18 -14
- package/package.json +2 -3
package/HISTORY.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [5.0.58](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v5.0.57...v5.0.58) (2025-03-10)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **get-github-releases.js:** replace github-api with @octokit/rest for GitHub releases ([b68559b](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/commit/b68559b927fce7c8d35c89d7987218efac698fb8))
|
7
|
+
|
1
8
|
## [5.0.57](https://github.com/centralnicgroup-opensource/rtldev-middleware-semantic-release-whmcs/compare/v5.0.56...v5.0.57) (2025-03-10)
|
2
9
|
|
3
10
|
|
@@ -1,11 +1,8 @@
|
|
1
1
|
import resolveConfig from "./resolve-config.js";
|
2
|
-
import
|
2
|
+
import { Octokit } from "@octokit/rest";
|
3
3
|
import debugConfig from "debug";
|
4
4
|
const debug = debugConfig("semantic-release:whmcs");
|
5
5
|
|
6
|
-
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting
|
7
|
-
// Rate limits to 60 requests/hour per IP for anonymous requests, 5000/hour with authentication
|
8
|
-
|
9
6
|
/**
|
10
7
|
* A method to get releases from github repository
|
11
8
|
*/
|
@@ -14,19 +11,26 @@ export default async (pluginConfig, context) => {
|
|
14
11
|
|
15
12
|
const { ghrepo, ghtoken } = resolveConfig(context);
|
16
13
|
|
17
|
-
const
|
18
|
-
|
14
|
+
const octokit = new Octokit({
|
15
|
+
auth: ghtoken,
|
19
16
|
});
|
17
|
+
|
20
18
|
if (ghrepo) {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
19
|
+
const [owner, repo] = ghrepo.split("/");
|
20
|
+
try {
|
21
|
+
const githubReleases = await octokit.repos.listReleases({
|
22
|
+
owner,
|
23
|
+
repo,
|
24
|
+
});
|
25
|
+
|
26
|
+
if (githubReleases.status === 200) {
|
27
|
+
githubReleases.data.forEach((r) => debug(`Detected GitHub release ${r.name.substring(1)}`));
|
28
|
+
githubReleases.data.reverse();
|
29
|
+
return githubReleases.data;
|
30
|
+
}
|
31
|
+
} catch (error) {
|
32
|
+
debug("Failed to get releases from GitHub", error);
|
28
33
|
}
|
29
|
-
debug("Failed to get releases from GitHub");
|
30
34
|
}
|
31
35
|
return false;
|
32
36
|
};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hexonet/semantic-release-whmcs",
|
3
3
|
"description": "`semantic-release` plugin for auto-publishing on WHMCS marketplace",
|
4
|
-
"version": "5.0.
|
4
|
+
"version": "5.0.58",
|
5
5
|
"private": false,
|
6
6
|
"type": "module",
|
7
7
|
"publishConfig": {
|
@@ -68,7 +68,6 @@
|
|
68
68
|
"overrides": {
|
69
69
|
"http-cache-semantics": "^4.1.1",
|
70
70
|
"word-wrap": "npm:@aashutoshrathi/word-wrap@1.2.6",
|
71
|
-
"axios": "^1.8.2",
|
72
71
|
"glob-parent": "^5.1.2"
|
73
72
|
},
|
74
73
|
"devDependencies": {
|
@@ -83,10 +82,10 @@
|
|
83
82
|
"stream-buffers": "^3.0.2"
|
84
83
|
},
|
85
84
|
"dependencies": {
|
85
|
+
"@octokit/rest": "^21.1.1",
|
86
86
|
"@semantic-release/error": "^4.0.0",
|
87
87
|
"aggregate-error": "^5.0.0",
|
88
88
|
"debug": "^4.3.4",
|
89
|
-
"github-api": "^3.4.0",
|
90
89
|
"puppeteer": ">=23.4.0",
|
91
90
|
"yargs": "^17.7.1"
|
92
91
|
}
|