@plures/pluresdb 1.5.1 → 1.5.3
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/package.json +1 -1
- package/scripts/release-check.js +34 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plures/pluresdb",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "P2P Graph Database with SQLite Compatibility - Local-first, offline-first database for modern applications",
|
|
5
5
|
"main": "dist/node-index.js",
|
|
6
6
|
"types": "dist/node-index.d.ts",
|
package/scripts/release-check.js
CHANGED
|
@@ -38,15 +38,49 @@ function checkPackageVersions() {
|
|
|
38
38
|
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
39
39
|
const cargoToml = fs.readFileSync('Cargo.toml', 'utf8');
|
|
40
40
|
|
|
41
|
+
let denoVersion = null;
|
|
42
|
+
if (fs.existsSync('deno.json')) {
|
|
43
|
+
const denoJson = JSON.parse(fs.readFileSync('deno.json', 'utf8'));
|
|
44
|
+
denoVersion = denoJson.version;
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
const packageVersion = packageJson.version;
|
|
42
48
|
const cargoMatch = cargoToml.match(/^version\s*=\s*"([^"]+)"/m);
|
|
43
49
|
const cargoVersion = cargoMatch ? cargoMatch[1] : null;
|
|
44
50
|
|
|
45
51
|
console.log(` package.json: ${packageVersion}`);
|
|
46
52
|
console.log(` Cargo.toml: ${cargoVersion || 'not found'}`);
|
|
53
|
+
if (denoVersion) {
|
|
54
|
+
console.log(` deno.json: ${denoVersion}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let hasError = false;
|
|
47
58
|
|
|
48
59
|
if (cargoVersion && packageVersion !== cargoVersion) {
|
|
49
60
|
console.error('❌ Version mismatch between package.json and Cargo.toml');
|
|
61
|
+
console.error('');
|
|
62
|
+
console.error('To fix this issue:');
|
|
63
|
+
console.error(` 1. Update package.json version from ${packageVersion} to ${cargoVersion}`);
|
|
64
|
+
console.error(` OR update Cargo.toml version from ${cargoVersion} to ${packageVersion}`);
|
|
65
|
+
console.error(' 2. Ensure both files always have the same version number');
|
|
66
|
+
console.error(' 3. Run this check again: npm run release-check');
|
|
67
|
+
console.error('');
|
|
68
|
+
console.error('Note: The version in both files must be identical for releases.');
|
|
69
|
+
hasError = true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (denoVersion && packageVersion !== denoVersion) {
|
|
73
|
+
console.error('❌ Version mismatch between package.json and deno.json');
|
|
74
|
+
console.error('');
|
|
75
|
+
console.error('To fix this issue:');
|
|
76
|
+
console.error(` 1. Update deno.json version from ${denoVersion} to ${packageVersion}`);
|
|
77
|
+
console.error(` OR update package.json version from ${packageVersion} to ${denoVersion}`);
|
|
78
|
+
console.error(' 2. Ensure both files always have the same version number');
|
|
79
|
+
console.error('');
|
|
80
|
+
hasError = true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (hasError) {
|
|
50
84
|
return false;
|
|
51
85
|
}
|
|
52
86
|
|