Carried over from MetaMask/utils#289, which was open when @metamask/utils moved into core.
packages/utils declares uuid@^9.0.1 as a production dependency and @types/uuid@^9.0.8 as a dev dependency, for a single call site:
// packages/utils/src/fs.ts:244
const directoryPath = path.join(os.tmpdir(), projectName, uuidV4());
crypto.randomUUID() has been available since Node 14.17 and the package requires Node 22, so the dependency can go. That also drops @types/uuid and one entry from every consumer's tree.
fs.test.ts currently spies on the module (jest.spyOn(uuid, 'v4')), so the test needs reworking alongside it.
Carried over from MetaMask/utils#289, which was open when
@metamask/utilsmoved into core.packages/utilsdeclaresuuid@^9.0.1as a production dependency and@types/uuid@^9.0.8as a dev dependency, for a single call site:crypto.randomUUID()has been available since Node 14.17 and the package requires Node 22, so the dependency can go. That also drops@types/uuidand one entry from every consumer's tree.fs.test.tscurrently spies on the module (jest.spyOn(uuid, 'v4')), so the test needs reworking alongside it.