heartraite 1.0.12 → 1.0.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.
|
@@ -2,7 +2,7 @@ import { Gender, NotificationSetting } from "../enum";
|
|
|
2
2
|
export type User = {
|
|
3
3
|
id: string;
|
|
4
4
|
email: string;
|
|
5
|
-
created:
|
|
5
|
+
created: string;
|
|
6
6
|
permissions: UserPermissions;
|
|
7
7
|
profile: UserProfile;
|
|
8
8
|
preferences: DatingPreferences;
|
|
@@ -15,7 +15,7 @@ export type UserProfile = {
|
|
|
15
15
|
intro: string;
|
|
16
16
|
firstName: string;
|
|
17
17
|
state: string;
|
|
18
|
-
birth:
|
|
18
|
+
birth: string;
|
|
19
19
|
age: number;
|
|
20
20
|
gender: Gender;
|
|
21
21
|
zodiacSign: string;
|
package/package.json
CHANGED
package/src/types/user.types.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Gender, NotificationSetting } from "../enum";
|
|
|
3
3
|
export type User = {
|
|
4
4
|
id: string;
|
|
5
5
|
email: string;
|
|
6
|
-
created:
|
|
6
|
+
created: string;
|
|
7
7
|
permissions: UserPermissions;
|
|
8
8
|
profile: UserProfile;
|
|
9
9
|
preferences: DatingPreferences;
|
|
@@ -18,7 +18,7 @@ export type UserProfile = {
|
|
|
18
18
|
intro: string;
|
|
19
19
|
firstName: string;
|
|
20
20
|
state: string;
|
|
21
|
-
birth:
|
|
21
|
+
birth: string;
|
|
22
22
|
age: number;
|
|
23
23
|
gender: Gender;
|
|
24
24
|
zodiacSign: string;
|
package/version-bump.js
CHANGED
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
const packageJson = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
|
7
7
|
const currentVersion = packageJson.version;
|
|
8
8
|
|
|
9
|
-
// Fetch the latest version from the registry
|
|
9
|
+
// Fetch the latest version from the npm registry
|
|
10
10
|
let latestVersion;
|
|
11
11
|
try {
|
|
12
12
|
latestVersion = execSync("npm show heartraite version", {
|
|
@@ -22,31 +22,25 @@ try {
|
|
|
22
22
|
console.log(`Current version: ${currentVersion}`);
|
|
23
23
|
console.log(`Latest published version: ${latestVersion}`);
|
|
24
24
|
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
// Ensure we only bump the version if currentVersion <= latestVersion
|
|
26
|
+
if (compareVersions(currentVersion, latestVersion) <= 0) {
|
|
27
|
+
// Increment the patch version
|
|
28
|
+
const versionParts = latestVersion.split(".");
|
|
29
|
+
versionParts[2] = (parseInt(versionParts[2], 10) + 1).toString();
|
|
30
|
+
const newVersion = versionParts.join(".");
|
|
31
|
+
|
|
32
|
+
// Update package.json with the new version
|
|
33
|
+
packageJson.version = newVersion;
|
|
34
|
+
fs.writeFileSync(
|
|
35
|
+
"package.json",
|
|
36
|
+
JSON.stringify(packageJson, null, 2) + "\n",
|
|
37
|
+
"utf8"
|
|
38
|
+
);
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
console.log(`Version bumped from ${currentVersion} to ${newVersion}`);
|
|
41
|
+
} else {
|
|
42
|
+
console.log("Version is already ahead of the registry. No changes made.");
|
|
39
43
|
}
|
|
40
|
-
|
|
41
|
-
// Update package.json with the new version
|
|
42
|
-
packageJson.version = newVersion;
|
|
43
|
-
fs.writeFileSync(
|
|
44
|
-
"package.json",
|
|
45
|
-
JSON.stringify(packageJson, null, 2) + "\n",
|
|
46
|
-
"utf8"
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
console.log(`Version bumped from ${currentVersion} to ${newVersion}`);
|
|
50
44
|
} catch (error) {
|
|
51
45
|
console.error("Error bumping version:", error.message);
|
|
52
46
|
process.exit(1);
|