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

supporting ECMAScript Temporal

Abierto
#3,663 7 comentarios 18 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
javascript, postgresql

Línea de trabajo

Comienza leyendo la discusión y el hito sobre los cambios incompatibles de pg@9.0; después, revisa la documentación de Temporal a la que se hace referencia y el enfoque existente de pg_types. El issue no menciona archivos de implementación ni tests; para avanzar sería necesario decidir un mapeo y acordar un mecanismo para habilitar el comportamiento incompatible con versiones anteriores.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Word is that Temporal has reached Stage 4 and will be included in the next ECMAScript draft. I think it looks very promising and will allow for much better support for some PostgreSQL datatypes by mapping them to proper types instead of strings.
I took Temporal for a spin with the latest NodeJS nightly and ran some really basic happy path tests for the no-brainer datatype mappings:

  1. Temporal.Duration to PostgreSQL interval
  2. Temporal.PlainDate to PostgreSQL date
  3. Temporal.PlainTime to PostgreSQL time

Other mappings might not be so obvious and/or a matter of personal preference (e.g. I have no use for Temporal.ZonedDateTime and strongly prefer to get everything out of the database as Temporal.Instant). And obviously backward compatibility is its own can of worms.

Temporal support was also requested in the pg@9.0 breaking changes ideas discussion, but it has not been added to the pg@9.0 milestone. Is there a specific reason temporal not added to the milestone? Sorting out pg_types first?

Is there a template/guidance on how to propose changes that are not backward-compatible and can be enabled using a simple mechanism so it is possible to just add one option / env variable that switches all datetime parsing to Temporal datatypes instead?

Lenguaje dominante
JavaScript
Estrellas
13.2k
Forks
1.4k
Merge medio
6 d 15 h
PR fusionados (30 d)
6

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

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 brianc/node-postgres

Todos los issues de brianc/node-postgres

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.