Skip to content
11 changes: 5 additions & 6 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"socket.io": "^4.8.3",
"swagger-jsdoc": "6.2.8",
"swagger-ui-express": "5.0.1",
"uuid": "^10.0.0",
"uuid": "^14.0.2",
"zod": "^3.25.76"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/eventSourcing/commandBus.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../db/pool");
const { ProjectAggregate, DonorAggregate, MatchAggregate, JobAggregate, round7 } = require("./aggregates");
const { eventStore } = require("./eventStore");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/eventSourcing/commands.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const { xlmToStroops, stroopsToXlm } = require("../utils/xlm");
const { isValidStellarAddress } = require("../../../shared/validators/stellarValidator");

Expand Down
2 changes: 1 addition & 1 deletion backend/src/eventSourcing/events.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const { getCorrelationId } = require("../utils/logger");
const { xlmToStroops, stroopsToXlm } = require("../utils/xlm");

Expand Down
2 changes: 1 addition & 1 deletion backend/src/eventSourcing/migrate.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const pool = require("../db/pool");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const {
LEGACY_DONATION_MIGRATED,
MigratedDonationEvent,
Expand Down
2 changes: 1 addition & 1 deletion backend/src/middleware/correlationId.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*/
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const { runWithCorrelationId } = require("../utils/logger");

/** Maximum character length accepted from the X-Correlation-ID header. */
Expand Down
2 changes: 1 addition & 1 deletion backend/src/middleware/correlationId.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const {
correlationIdMiddleware,
sanitiseCorrelationId,
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/donations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"use strict";
const express = require("express");
const router = express.Router();
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../db/pool");
const { createLayeredRateLimiter } = require("../middleware/rateLimiter");
const { createApiError } = require("../middleware/apiEnvelope");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/impact.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"use strict";

const express = require("express");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const router = express.Router();
const pool = require("../db/pool");
const cache = require("../services/cache");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/integrity.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const crypto = require("crypto");
const express = require("express");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../db/pool");
const cache = require("../services/cache");
const { adminRequired } = require("../middleware/auth");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/leaderboard.integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const path = require("path");
const express = require("express");
const request = require("supertest");
const { execFileSync } = require("child_process");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const { createHash } = require("crypto");

const pool = require("../db/pool");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"use strict";
const express = require("express");
const router = express.Router();
const { v4: uuidv4 } = require("uuid");
const { randomUUID: uuidv4 } = require("crypto");
const pool = require("../db/pool");
const { createLayeredRateLimiter } = require("../middleware/rateLimiter");
const { createApiError } = require("../middleware/apiEnvelope");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/pagination.integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const path = require("path");
const express = require("express");
const request = require("supertest");
const { execFileSync } = require("child_process");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");

const pool = require("../db/pool");
const { apiEnvelope, errorHandler } = require("../middleware/apiEnvelope");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const express = require("express");
const crypto = require("crypto");
const router = express.Router();
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../db/pool");
const { adminRequired } = require("../middleware/auth");
const { createLayeredRateLimiter } = require("../middleware/rateLimiter");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/ratings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"use strict";
const express = require("express");
const router = express.Router();
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../db/pool");
const { mapProjectRatingRow } = require("../services/store");
const { createApiError } = require("../middleware/apiEnvelope");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/subscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"use strict";
const express = require("express");
const router = express.Router();
const { v4: uuidv4 } = require("uuid");
const { randomUUID: uuidv4 } = require("crypto");
const pool = require("../db/pool");
const { createRateLimiter } = require("../middleware/rateLimiter");
const { createApiError } = require("../middleware/apiEnvelope");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"use strict";

const express = require("express");
const { v4: uuidv4 } = require("uuid");
const { randomUUID: uuidv4 } = require("crypto");
const pool = require("../db/pool");
const { adminRequired } = require("../middleware/auth");
const { createApiError } = require("../middleware/apiEnvelope");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/audit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../db/pool");

async function logAdminAction({ actor, action, targetType, targetId, metadata, ipAddress }) {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/donationIntegrity.integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const path = require("path");
const { createHash } = require("crypto");
const { execFileSync } = require("child_process");
const { Keypair } = require("@stellar/stellar-sdk");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const express = require("express");
const request = require("supertest");
const pool = require("../db/pool");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/donationIntegrity.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../db/pool");
const { Keypair } = require("@stellar/stellar-sdk");
const { stroopsToXlm } = require("../utils/xlm");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/indexerService.integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const fs = require("fs");
const path = require("path");
const { createHash } = require("crypto");
const { execFileSync } = require("child_process");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");

const pool = require("../db/pool");
const indexerService = require("./indexerService");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/indexerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

const { server: stellarServer, rpcServer, CONTRACT_ID } = require("./stellar");
const pool = require("../db/pool");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const { execute } = require("../eventSourcing/commandBus");
const { DonationRecordedEvent, MatchAppliedEvent } = require("../eventSourcing/events");
const { stroopsToXlm, xlmToStroops } = require("../utils/xlm");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/notificationFailures.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../db/pool");
const { logger: rootLogger } = require("../utils/logger");

Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/onboarding/accountUpgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
const crypto = require("crypto");
const { Keypair, Networks, StrKey, Transaction } = require("@stellar/stellar-sdk");
const { env } = require("../../config/env");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../../db/pool");
const { logger: rootLogger } = require("../../utils/logger");

Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/onboarding/funnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
"use strict";

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../../db/pool");
const { logger: rootLogger } = require("../../utils/logger");

Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/onboarding/sponsoredAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const {
BASE_FEE,
} = require("@stellar/stellar-sdk");

const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const pool = require("../../db/pool");
const { env } = require("../../config/env");
const { logger: rootLogger } = require("../../utils/logger");
Expand Down
15 changes: 13 additions & 2 deletions backend/src/services/projectSearch.integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,23 @@ const path = require("path");
const express = require("express");
const request = require("supertest");
const { execFileSync } = require("child_process");
const { v4: uuid, v5: uuidv5 } = require("uuid");
const crypto = require("crypto");
const { randomUUID: uuid } = crypto;

const FIXTURE_NAMESPACE = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";

// RFC 4122 UUID v5 (namespace + name, SHA-1 based) — deterministic fixture ids.
// Reimplemented here because the removal of the `uuid` package dependency
// left no CommonJS-compatible v5 generator; crypto.randomUUID() only covers v4.
function fixtureId(key) {
return uuidv5(key, FIXTURE_NAMESPACE);
const namespaceBytes = Buffer.from(FIXTURE_NAMESPACE.replace(/-/g, ""), "hex");
const nameBytes = Buffer.from(key, "utf8");
const hash = crypto.createHash("sha1").update(Buffer.concat([namespaceBytes, nameBytes])).digest();
const bytes = Buffer.from(hash.subarray(0, 16));
bytes[6] = (bytes[6] & 0x0f) | 0x50;
bytes[8] = (bytes[8] & 0x3f) | 0x80;
const hex = bytes.toString("hex");
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
}

const pool = require("../db/pool");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/summaryQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"use strict";

const crypto = require("crypto");
const { v4: uuid } = require("uuid");
const { randomUUID: uuid } = require("crypto");
const PgBoss = require("pg-boss");
const pool = require("../db/pool");
const { env } = require("../config/env");
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/turrets.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/

const { Server, TransactionBuilder, Networks, Memo, Operation, Asset } = require("@stellar/stellar-sdk");
const { v4: uuidv4 } = require("uuid");
const { randomUUID: uuidv4 } = require("crypto");
const pool = require("../db/pool");
const { env } = require("../config/env");

Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading