Skip to content

Commit

Permalink
Remove dependency on uuid package (#284)
Browse files Browse the repository at this point in the history
* remove uuid dependency

* update CHANGELOG.md
  • Loading branch information
davidjgoss authored Feb 7, 2025
1 parent 2936d2f commit 1ccfeea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 37 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed
- [python] Add a LICENSE file for Python ([#278](https://github.com/cucumber/messages/pull/278))
- [.NET] Fix NuGet package generation

### Removed
- [JavaScript] Remove dependency on `uuid` package ([#284](https://github.com/cucumber/messages/pull/284)

## [27.2.0] - 2025-01-31
### Added
- [python] Added Python implementation ([#165](https://github.com/cucumber/messages/pull/165))
Expand Down
31 changes: 1 addition & 30 deletions javascript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@
"prepublishOnly": "npm run build && npm run copy-schemas"
},
"dependencies": {
"@types/uuid": "10.0.0",
"class-transformer": "0.5.1",
"reflect-metadata": "0.2.2",
"uuid": "11.0.5"
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"@types/mocha": "10.0.10",
Expand Down
4 changes: 1 addition & 3 deletions javascript/src/IdGenerator.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { v4 as uuidv4 } from 'uuid'

export type NewId = () => string

export function uuid(): NewId {
return () => uuidv4()
return () => crypto.randomUUID()
}

export function incrementing(): NewId {
Expand Down

0 comments on commit 1ccfeea

Please sign in to comment.