diff --git a/firestore-counter/clients/node/package-lock.json b/firestore-counter/clients/node/package-lock.json index 2c2de2fa3..10efbe1b1 100644 --- a/firestore-counter/clients/node/package-lock.json +++ b/firestore-counter/clients/node/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "uuid": "^8.3.2" + "uuid": "^11.1.0" }, "devDependencies": { "firebase-admin": "^13.0.0" @@ -264,6 +264,18 @@ "node": ">=14" } }, + "node_modules/@google-cloud/storage/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", + "dev": true, + "license": "MIT", + "optional": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@grpc/grpc-js": { "version": "1.14.3", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz", @@ -1004,20 +1016,6 @@ "@google-cloud/storage": "^7.19.0" } }, - "node_modules/firebase-admin/node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/esm/bin/uuid" - } - }, "node_modules/form-data": { "version": "2.5.5", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", @@ -2181,12 +2179,16 @@ "optional": true }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist/esm/bin/uuid" } }, "node_modules/web-streams-polyfill": { diff --git a/firestore-counter/clients/node/package.json b/firestore-counter/clients/node/package.json index 64b97e321..b0f194b4b 100644 --- a/firestore-counter/clients/node/package.json +++ b/firestore-counter/clients/node/package.json @@ -9,6 +9,6 @@ "firebase-admin": "^13.0.0" }, "dependencies": { - "uuid": "^8.3.2" + "uuid": "^11.1.0" } } diff --git a/firestore-counter/clients/web/package-lock.json b/firestore-counter/clients/web/package-lock.json index 6f75d6c56..567b2fff8 100644 --- a/firestore-counter/clients/web/package-lock.json +++ b/firestore-counter/clients/web/package-lock.json @@ -9,8 +9,7 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@types/uuid": "^3.4.4", - "uuid": "^3.3.2" + "uuid": "^11.1.0" }, "devDependencies": { "firebase": "^12.0.0", @@ -888,11 +887,6 @@ "undici-types": "~7.19.0" } }, - "node_modules/@types/uuid": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.10.tgz", - "integrity": "sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A==" - }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", @@ -2481,12 +2475,16 @@ } }, "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", "bin": { - "uuid": "bin/uuid" + "uuid": "dist/esm/bin/uuid" } }, "node_modules/watchpack": { diff --git a/firestore-counter/clients/web/package.json b/firestore-counter/clients/web/package.json index 525720b7a..71ebeba4a 100644 --- a/firestore-counter/clients/web/package.json +++ b/firestore-counter/clients/web/package.json @@ -6,8 +6,7 @@ "license": "Apache-2.0", "description": "Web SDK to access sharded counters.", "dependencies": { - "@types/uuid": "^3.4.4", - "uuid": "^3.3.2" + "uuid": "^11.1.0" }, "devDependencies": { "firebase": "^12.0.0", diff --git a/firestore-counter/functions/package-lock.json b/firestore-counter/functions/package-lock.json index 2a9c6af25..f0f4d5722 100644 --- a/firestore-counter/functions/package-lock.json +++ b/firestore-counter/functions/package-lock.json @@ -13,7 +13,7 @@ "firebase-functions": "^4.9.0", "rimraf": "^2.6.3", "typescript": "^4.9.4", - "uuid": "^3.3.2" + "uuid": "^11.1.0" }, "devDependencies": { "@types/deep-equal": "^1.0.1", @@ -3189,6 +3189,7 @@ "version": "10.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -6453,12 +6454,16 @@ } }, "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", "bin": { - "uuid": "bin/uuid" + "uuid": "dist/esm/bin/uuid" } }, "node_modules/v8-compile-cache-lib": { @@ -11350,9 +11355,9 @@ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==" }, "v8-compile-cache-lib": { "version": "3.0.1", diff --git a/firestore-counter/functions/package.json b/firestore-counter/functions/package.json index 256377ff9..fdcd42201 100644 --- a/firestore-counter/functions/package.json +++ b/firestore-counter/functions/package.json @@ -8,7 +8,7 @@ "deep-equal": "^1.0.1", "firebase-admin": "^12.1.0", "firebase-functions": "^4.9.0", - "uuid": "^3.3.2", + "uuid": "^11.1.0", "rimraf": "^2.6.3", "typescript": "^4.9.4", "@types/express-serve-static-core": "4.19.8" diff --git a/storage-resize-images/functions/package-lock.json b/storage-resize-images/functions/package-lock.json index 4599cfa98..a84fb5c43 100644 --- a/storage-resize-images/functions/package-lock.json +++ b/storage-resize-images/functions/package-lock.json @@ -18,8 +18,7 @@ "sharp": "^0.34.5", "shx": "^0.4.0", "typescript": "^5.7.3", - "uuid": "^11.0.5", - "uuidv4": "^6.1.0" + "uuid": "^11.1.0" }, "devDependencies": { "@types/jest": "^29.5.14", @@ -1316,6 +1315,7 @@ "version": "10.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -4963,11 +4963,6 @@ "license": "MIT", "optional": true }, - "node_modules/@types/uuid": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", - "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" - }, "node_modules/@types/yargs": { "version": "17.0.32", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", @@ -6887,10 +6882,12 @@ "version": "10.0.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -10766,34 +10763,18 @@ } }, "node_modules/uuid": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", - "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/esm/bin/uuid" } }, - "node_modules/uuidv4": { - "version": "6.2.13", - "resolved": "https://registry.npmjs.org/uuidv4/-/uuidv4-6.2.13.tgz", - "integrity": "sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ==", - "dependencies": { - "@types/uuid": "8.3.4", - "uuid": "8.3.2" - } - }, - "node_modules/uuidv4/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", diff --git a/storage-resize-images/functions/package.json b/storage-resize-images/functions/package.json index de561468b..776b62dab 100644 --- a/storage-resize-images/functions/package.json +++ b/storage-resize-images/functions/package.json @@ -26,8 +26,7 @@ "sharp": "^0.34.5", "shx": "^0.4.0", "typescript": "^5.7.3", - "uuid": "^11.0.5", - "uuidv4": "^6.1.0" + "uuid": "^11.1.0" }, "devDependencies": { "@types/jest": "^29.5.14", diff --git a/storage-resize-images/functions/src/resize-image.ts b/storage-resize-images/functions/src/resize-image.ts index 4be3b0834..3e50325c7 100644 --- a/storage-resize-images/functions/src/resize-image.ts +++ b/storage-resize-images/functions/src/resize-image.ts @@ -4,7 +4,7 @@ import * as path from "path"; import * as fs from "fs"; import { Bucket } from "@google-cloud/storage"; -import { uuid } from "uuidv4"; +import { v4 as uuidv4 } from "uuid"; import { config } from "./config"; import * as logs from "./logs"; @@ -103,7 +103,7 @@ export const modifyImage = async ({ let modifiedFile: string; try { - modifiedFile = path.join(os.tmpdir(), uuid()); + modifiedFile = path.join(os.tmpdir(), uuidv4()); // filename\*=utf-8'' selects any string match the filename notation. // [^;\s]+ searches any following string until either a space or semi-colon. @@ -203,7 +203,7 @@ export const constructMetadata = ( config.regenerateToken && metadata.metadata.firebaseStorageDownloadTokens ) { - metadata.metadata.firebaseStorageDownloadTokens = uuid(); + metadata.metadata.firebaseStorageDownloadTokens = uuidv4(); } return metadata; };