Remove uuid dependency in favor of crypto.randomUUID()
The uuid package dropped its CommonJS entry point in v14, making it incompatible with Backstage's CJS build output and Jest test runner. Rather than working around the ESM-only issue, replace all usage with the built-in crypto.randomUUID() which has been available in Node.js since v16.7 and in all major browsers since March 2022. Signed-off-by: Fredrik Adelöw <freben@spotify.com> Made-with: Cursor
This commit is contained in:
@@ -61,7 +61,6 @@
|
||||
"cookie-parser": "^1.4.6",
|
||||
"express-promise-router": "^4.1.1",
|
||||
"msw": "^1.0.0",
|
||||
"supertest": "^7.0.0",
|
||||
"uuid": "^11.0.0"
|
||||
"supertest": "^7.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { randomUUID as uuid } from 'node:crypto';
|
||||
|
||||
import { DefaultIdentityClient } from './DefaultIdentityClient';
|
||||
import { IdentityApiGetIdentityRequest } from './IdentityApi';
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { rest } from 'msw';
|
||||
import { setupServer } from 'msw/node';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { randomUUID as uuid } from 'node:crypto';
|
||||
|
||||
import { IdentityClient } from './IdentityClient';
|
||||
import { DiscoveryService } from '@backstage/backend-plugin-api';
|
||||
|
||||
Reference in New Issue
Block a user