Skip to content

Commit 8f855c4

Browse files
authored
Merge pull request #62 from ray-1337/crud-fix
Fix missing "uuid" module
2 parents 0f46516 + 4f67aec commit 8f855c4

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

package-lock.json

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
"@shelf/jest-dynamodb": "^3.4.2",
8585
"@types/jest": "^29.5.2",
8686
"@types/node": "^20.17.10",
87-
"@types/uuid": "^9.0.7",
8887
"@typescript-eslint/eslint-plugin": "^6.15.0",
8988
"@typescript-eslint/parser": "^6.15.0",
9089
"eslint": "^8.56.0",

src/crud.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ScanOptions } from './dynamo-scanner.js';
44
import { UpdateItemOptions } from './dynamo-updater.js';
55
import { TableDefinition } from './table-builder/table-definition.js';
66
import { TableClient } from './table-client.js';
7-
import { v4 as uuid } from 'uuid';
7+
import { randomUUID } from 'node:crypto';
88
import { JsonPath } from './types/index.js';
99

1010
export type ProjectionOrTypeArray<PROJECTION, TableType> =
@@ -42,7 +42,7 @@ export class Crud<TableConfig extends TableDefinition> {
4242
async create(
4343
item: Omit<TableConfig['type'], TableConfig['keyNames']['partitionKey']>,
4444
): Promise<TableConfig['type']> {
45-
const identifier = uuid();
45+
const identifier = randomUUID();
4646
const actualItem = {
4747
[this.tableClient.tableConfig.keyNames.partitionKey]: identifier,
4848
...item,

0 commit comments

Comments
 (0)