refactor(storage-resize-images): use Node built-ins for uuid and mkdir - #2947
Open
IzaakGough wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the external dependencies mkdirp and uuid from the storage-resize-images kit, replacing them with native Node.js APIs (fs.promises.mkdir and crypto.randomUUID()). It also simplifies a TypeScript type assertion in util.ts. There are no review comments, so I have no feedback to provide.
IzaakGough
force-pushed
the
refactor/storage-resize-images-node-builtins
branch
from
August 17, 2026 12:02
f0b0596 to
518525b
Compare
IzaakGough
marked this pull request as ready for review
August 17, 2026 12:09
Drops the mkdirp and uuid dependencies in favour of crypto.randomUUID() and fs.promises.mkdir with recursive. The extension removed the same two packages before the kit was created.
IzaakGough
force-pushed
the
refactor/storage-resize-images-node-builtins
branch
from
August 17, 2026 12:25
518525b to
725bf76
Compare
CorieW
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2946. Retarget to
kitsonce that merges.What was broken: the kit depends on
mkdirpanduuidfor things Node covers natively. The extension removed both, along withuuidv4andrimraf, in9bb0c1faandc6fbf3b7, which landed before the kit was created.What changed: six call sites move to
crypto.randomUUID()andfs.promises.mkdir(dir, { recursive: true }), matching the extension. Both dependencies come out ofpackage.json.mkdirpleaves the tree entirely;uuidremains transitively via genkit and the Google client libraries, so this is dependency hygiene rather than a fix for theuuidadvisory.Verification:
npm ciandnpm run buildare clean. Exercised the changed paths directly:downloadOriginalFilewrites to a uuid-named file under the temp dir with contents intact, two consecutive calls produce distinct paths and neither fails on the already-existing directory,replaceWithDefaultPlaceholderswaps in the bundled placeholder, andconstructMetadataregeneratesfirebaseStorageDownloadTokensas a uuid whenREGENERATE_TOKENis on. The full Storage upload path was not exercised.