Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

UUID generator's v7 batch comes out in random order instead of time order

Abierto
#316 3 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@omisha123 ya está trabajando en esto.

Desde el 23/10/2026.

  • #328 de @omisha123 — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

bug good first issue hacktoberfest

Pick UUID v7 in the UUID generator, set the quantity to 5 and click Generate. They're usually made in the same millisecond, so they share the timestamp prefix, and everything after it is random. The list comes out in random order. The tool calls v7 "time-ordered", and RFC 9562 (section 6.2) asks that UUIDs generated in a batch keep their creation order too.

generate (app/(tools)/uuid-generator/UuidGeneratorClient.tsx, lines 84 to 105) calls uuidV7(Date.now(), random) for each UUID and shows them as they come.

What to do

  • Keep a v7 batch in ascending order. Sorting the batch before setGenerated is enough. A counter in the bits after the timestamp (method 1 in RFC 9562, section 6.2) is the stricter option, if you'd rather do that.

Where to look

  • app/(tools)/uuid-generator/UuidGeneratorClient.tsx: generate (lines 84 to 105)
  • app/(tools)/uuid-generator/UuidGeneratorClient.test.tsx. Careful: its getRandomValues mock (lines 20 to 24) fills each UUID with a bigger value than the last, so a test that uses it passes even without the fix. Fix Date.now to one value and make the random bytes go down from one UUID to the next.

Acceptance criteria

  • A v7 batch is in ascending order, even when every UUID has the same millisecond
  • v4 batches work as before
  • A test that fails on the current code
  • npm run lint, npm run test and npm run build pass

Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #316 in the description.

Lenguaje dominante
TypeScript
Estrellas
1
Forks
9
Merge medio
7 h 34 min
PR fusionados (30 d)
146

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codercops/toolbelt

Todos los issues de codercops/toolbelt

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.