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.
@@ -97,7 +97,7 @@ export type CreateCheckoutSessionRequest = {
97
97
  export type RegisterOnboardingRequest = {
98
98
  firstName: string;
99
99
  state: string;
100
- birth: Date;
100
+ birth: string;
101
101
  images: string[];
102
102
  interestedIn: Gender[];
103
103
  gender: Gender;
@@ -2,7 +2,7 @@ import { Gender, NotificationSetting } from "../enum";
2
2
  export type User = {
3
3
  id: string;
4
4
  email: string;
5
- created: Date;
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: Date;
18
+ birth: string;
19
19
  age: number;
20
20
  gender: Gender;
21
21
  zodiacSign: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartraite",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Heartraite npm package for common functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -99,7 +99,7 @@ export type CreateCheckoutSessionRequest = {
99
99
  export type RegisterOnboardingRequest = {
100
100
  firstName: string;
101
101
  state: string;
102
- birth: Date;
102
+ birth: string;
103
103
  images: string[];
104
104
  interestedIn: Gender[];
105
105
  gender: Gender;
@@ -3,7 +3,7 @@ import { Gender, NotificationSetting } from "../enum";
3
3
  export type User = {
4
4
  id: string;
5
5
  email: string;
6
- created: Date;
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: Date;
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
- // Determine the base version to increment
26
- const baseVersion =
27
- compareVersions(currentVersion, latestVersion) >= 0
28
- ? currentVersion
29
- : latestVersion;
30
-
31
- // Increment the patch version
32
- const versionParts = baseVersion.split(".");
33
- versionParts[2] = (parseInt(versionParts[2], 10) + 1).toString();
34
- const newVersion = versionParts.join(".");
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
- if (newVersion === currentVersion) {
37
- console.log("Version is already up-to-date. No changes made.");
38
- process.exit(0);
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);