Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Shared canonical export-name converter (camelCase to snake_case with override table)

未关闭
#211 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
68/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
typescript
领域
tooling

调研方向

首先定位 raster-shared 的导出接口、现有测试和包发布配置;同时检查 Overseer 的私有 convertObjectKeysToSnakeCase 以及 polygon-parts-worker 的消费者。添加共享转换器和一个有文档说明的覆盖表,涵盖常规、首字母缩略词/数字以及覆盖情形,然后验证可以发布新的 raster-shared 版本供下游使用。

由索引模型根据 Issue 内容生成。

描述

Ready For Development

What to build

Add a shared canonical export-name converter to raster-shared that maps camelCase property keys to the snake_case column names used when writing GeoPackage export tables. It wraps change-case's snakeCase for the general case and consults a small override table for naming exceptions.

The override table's only entry today is resolutionDegree → resolution_deg (the per-part resolution field). Note the aggregate fields maxResolutionDeg/minResolutionDeg already abbreviate, so they need no override. The override table is the single, documented place where export-naming exceptions are declared.

Name the function to reflect that it is the canonical export-column-name mapping (e.g. an export-column-name converter), not a generic snake_case utility, so future consumers understand it carries overrides. This converter is intended to replace Overseer's private convertObjectKeysToSnakeCase and to be consumed by polygon-parts-worker.

No snake_case TypeScript type is produced — snake_case is derived at runtime only; the camelCase Zod schemas in raster-shared remain the source of truth for field names.

Release a new raster-shared version so downstream repos can consume it.

Acceptance criteria

  • A converter exported from raster-shared maps an object's camelCase keys to snake_case keys, using change-case for the general case.
  • Acronym/number tokens convert correctly: horizontalAccuracyCE90 -> horizontal_accuracy_ce90, imagingTimeBeginUTC -> imaging_time_begin_utc.
  • An override table is consulted before the general rule; resolutionDegree maps to resolution_deg.
  • Adding or removing an override is a single-location change.
  • Unit tests cover the general conversion, the acronym/number cases, and every override entry.
  • A new raster-shared version is released and publishable for downstream consumption.

Blocked by

  • None - can start immediately.
主要语言
TypeScript
星标
1
派生
0
平均合并
2 小时 51 分钟
30 天内合并 PR
7

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。