Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Document and align the units of sizes and durations

オープン
#1,542 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, node.js, typescript
領域
api, testing

調査の方向性

Start with the listed files: packages/testcontainers/src/types.ts, test-container.ts, generic-container/generic-container.ts, and wait-strategies/composite-wait-strategy.ts. Document each numeric option's unit in JSDoc and add Date support for logs({ since }); the issue leaves the shared size unit decision open, and any unit change needs a major release. Done means the units are documented and Date is accepted, with the size decision resolved.

索引モデルが issue の本文から書いたものです。

説明

enhancement minor

What happens

Numeric options use different units, and most of them say so only in the docs, or nowhere:

Option Unit Stated in the type or JSDoc
withResourcesQuota({ memory }) gigabytes inline comment
withResourcesQuota({ cpu }) CPUs inline comment
withSharedMemorySize(bytes) bytes parameter name
withStartupTimeout(startupTimeoutMs) milliseconds parameter name
HealthCheck.interval, timeout, startPeriod milliseconds no
stop({ timeout }), restart({ timeout }) milliseconds no
Compose down({ timeout }) milliseconds no
HttpWaitStrategy.withReadTimeout milliseconds parameter name
CompositeWaitStrategy.withDeadline(deadline) milliseconds no
logs({ since }) Unix timestamp in seconds no

Two stand out:

  • Memory is in gigabytes while shared memory is in bytes, so the same container can be configured with withResourcesQuota({ memory: 0.5 }) and withSharedMemorySize(512 * 1024 * 1024).
  • logs({ since }) is the only time value in seconds. It is passed straight to Docker, so a millisecond timestamp such as Date.now() is read as a time far in the future.

Expected

  • Every numeric option documents its unit in JSDoc, so it shows in the editor.
  • logs({ since }) also accepts a Date.
  • Decide whether sizes should share one unit.

Where

  • packages/testcontainers/src/types.ts
  • packages/testcontainers/src/test-container.ts
  • packages/testcontainers/src/generic-container/generic-container.ts
  • packages/testcontainers/src/wait-strategies/composite-wait-strategy.ts

Notes

  • Semver: JSDoc and accepting a Date are additive, hence minor. Changing the unit of an existing option would be major.
  • Related: #734 (memory quota units).

Dependencies

  • Nothing blocks this. It can start now.
主要言語
TypeScript
スター
2.6k
フォーク
274
平均マージ
1日 14時間
マージ済み PR(30日)
44

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

testcontainers/testcontainers-node のほかの issue

testcontainers/testcontainers-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。