8 Commits

Author SHA1 Message Date
6e63867ca6 chore(release): v1.12.4 2024-03-05 00:14:01 +02:00
539168195e fix: incorrect commander dependency type 2024-03-05 00:13:52 +02:00
673b02052a chore(release): v1.12.3 2024-03-05 00:11:22 +02:00
5e6900e70d build: downgrade commander to v10
for support of NodeJS v14
2024-03-05 00:11:10 +02:00
68a0c0e35b chore(release): v1.12.2 2024-03-04 22:56:50 +02:00
8cc93d55da fix: use http module instead of fetch (#17)
allows usage of RCZ with NodeJS v14 and v16
2024-03-04 22:53:48 +02:00
dd4ca1f1cc chore(release): v1.12.1 2024-02-25 22:29:21 +02:00
7264816e01 docs: change installation instructions 2024-02-25 13:52:45 +02:00
5 changed files with 49 additions and 14 deletions

View File

@@ -1,7 +1,24 @@
# Changelog # Changelog
Generation of this changelog is based on commits Generation of this changelog is based on commits
## v1.12.4
### Fixes
- [539168195] - incorrect commander dependency type
## v1.12.3
### Miscellaneous
- [673b02052] - **release**: v1.12.3
- [5e6900e70] - downgrade commander to v10
## v1.12.2
### Fixes
- [8cc93d55d] - use http module instead of fetch (#17)
### Miscellaneous
- [68a0c0e35] - **release**: v1.12.2
## v1.12.1
### Miscellaneous
- [dd4ca1f1c] - **release**: v1.12.1
- [7264816e0] - change installation instructions
## v1.12.0 ## v1.12.0
### Miscellaneous ### Miscellaneous
- [2a5dba1aa] - **release**: v1.12.0
- [72ab0c848] - add license - [72ab0c848] - add license
- [afc4f76c4] - foramt the code with prettier - [afc4f76c4] - foramt the code with prettier
## v1.11.0 ## v1.11.0

View File

@@ -1,12 +1,12 @@
# rcz # rcz
Resultium commit standardization library Resultium commit standardization library. Supported by NodeJS v14 and above
## Installation ## Installation
1. Set up @resultium registry in an .npmrc file in your home directory with following content: 1. Set up @resultium registry in an .npmrc file in your home directory with following content:
``` ```
@resultium:registry=https://git.resultium.net/api/packages/technology/npm/ @resultium:registry=https://git.resultium.net/api/packages/public/npm/
``` ```
2. Install the package using npm 2. Install the package using npm
``` ```

View File

@@ -1,6 +1,6 @@
{ {
"name": "@resultium/rcz", "name": "@resultium/rcz",
"version": "1.12.0", "version": "1.12.4",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"description": "Resultium commit standardization library, inspired by conventional commits", "description": "Resultium commit standardization library, inspired by conventional commits",
"main": "./dist/index.js", "main": "./dist/index.js",
@@ -13,9 +13,12 @@
"scripts": { "scripts": {
"build": "tsc" "build": "tsc"
}, },
"engines": {
"node": ">=14"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://git.resultium.net/technology/rcz.git" "url": "https://git.resultium.net/public/rcz.git"
}, },
"keywords": [ "keywords": [
"conventional", "conventional",
@@ -23,12 +26,12 @@
], ],
"author": { "author": {
"name": "Resultium", "name": "Resultium",
"email": "contact@resultium.io", "email": "technology@resultium.io",
"url": "https://www.resultium.io" "url": "https://www.resultium.io"
}, },
"dependencies": { "dependencies": {
"@clack/prompts": "^0.7.0", "@clack/prompts": "^0.7.0",
"commander": "^11.1.0", "commander": "10.0.1",
"semver": "^7.5.4", "semver": "^7.5.4",
"simple-git": "^3.21.0" "simple-git": "^3.21.0"
}, },

10
pnpm-lock.yaml generated
View File

@@ -9,8 +9,8 @@ dependencies:
specifier: ^0.7.0 specifier: ^0.7.0
version: 0.7.0 version: 0.7.0
commander: commander:
specifier: ^11.1.0 specifier: 10.0.1
version: 11.1.0 version: 10.0.1
semver: semver:
specifier: ^7.5.4 specifier: ^7.5.4
version: 7.5.4 version: 7.5.4
@@ -70,9 +70,9 @@ packages:
resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==}
dev: true dev: true
/commander@11.1.0: /commander@10.0.1:
resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
engines: {node: '>=16'} engines: {node: '>=14'}
dev: false dev: false
/debug@4.3.4: /debug@4.3.4:

View File

@@ -37,6 +37,7 @@ import { Command } from "commander";
import semver from "semver"; import semver from "semver";
import { execSync } from "child_process"; import { execSync } from "child_process";
import { tmpdir } from "os"; import { tmpdir } from "os";
import { request } from "http";
const GetConfig = async () => { const GetConfig = async () => {
if (fs.existsSync(path.join(process.cwd(), ".rczrc"))) { if (fs.existsSync(path.join(process.cwd(), ".rczrc"))) {
@@ -105,6 +106,21 @@ const GetPostReleaseScript = async () => {
return null; return null;
} }
}; };
const isOnline = () => {
return new Promise<boolean>((resolve) => {
request({ method: "GET", hostname: "icanhazip.com" }, (res) => {
res.on("data", () => {});
res.on("end", () => {
resolve(res.statusCode === 200);
});
})
.on("error", () => {
resolve(false);
})
.end();
});
};
const CheckForUpdates = async () => { const CheckForUpdates = async () => {
const updateText = const updateText =
@@ -119,8 +135,7 @@ const CheckForUpdates = async () => {
// even if cached once in a while it should get newest data // even if cached once in a while it should get newest data
if ((cachedVersion && Math.random() < 0.1) || cachedVersion === null) { if ((cachedVersion && Math.random() < 0.1) || cachedVersion === null) {
const isOnline = (await fetch("https://icanhazip.com")).status === 200; if (!(await isOnline())) return;
if (!isOnline) return;
const serverVersion = execSync("npm show @resultium/rcz version") const serverVersion = execSync("npm show @resultium/rcz version")
.toString() .toString()
@@ -142,7 +157,7 @@ const program = new Command();
program program
.name("rcz") .name("rcz")
.description("Resultium commit standardization command-line interface") .description("Resultium commit standardization command-line interface")
.version("1.12.0"); .version("1.12.4");
program program
.command("commit") .command("commit")