Separate module-author internals from the user-facing entry point
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
Start with packages/testcontainers/src/index.ts, packages/testcontainers/package.json, and biome.json; review the imports used by the five named modules and the blockers #1558 and #1561, plus coordination issues #1528 and #1550. Define the test-author exports, the module subpath, and the deep-import boundary, then check that module imports and public Dockerode type exposure match the agreed split.
索引モデルが issue の本文から書いたものです。
説明
What happens
testcontainers has a single entry point (main: build/index.js, no exports map) that serves both test authors and module authors. Utilities that exist for the modules and for core itself are exported next to the user-facing API, and every one of them is covered by semver:
log,IntervalRetry,RetryUuid,RandomUuid,randomUuidPortGenerator,RandomPortGeneratorBoundPorts,getContainerPort,hasHostBindinggetReaper,LABEL_TESTCONTAINERS_SESSION_IDContainerRuntimeClient,getContainerRuntimeClient,waitForContainer
Dockerode types are part of the public contract as well:
WaitStrategy.waitUntilReady(container: Dockerode.Container, ...)StartupCheckStrategy.checkStartupState(dockerClient: Dockerode, ...)- the protected
createOpts: ContainerCreateOptionsandhostConfig: HostConfigonGenericContainer, which subclasses read and write directly
That is why @types/dockerode is a runtime dependency, and why a Dockerode major is a breaking change here.
Because there is no exports map, consumers can also import anything under testcontainers/build/....
Usage inside this repo is narrow. Most modules import only GenericContainer, AbstractStartedContainer, Wait and StartedTestContainer. Five of them (kafka, redpanda, localstack, ollama, couchbase) reach for the runtime client, BoundPorts, waitForContainer or getReaper.
Expected
- The main entry exports what a test author needs.
- Module-author utilities move to a separate subpath (for example
testcontainers/module) with its own, looser stability promise. - An
exportsmap closes off deep imports. - Dockerode types stay out of the user-facing signatures where possible.
Where
packages/testcontainers/src/index.tspackages/testcontainers/package.jsonbiome.json(the import boundary rule that pins modules to thetestcontainersentry point)
Notes
- Removing exports and adding an
exportsmap are both breaking, hencemajor. - Related: #1528 (types that should be exported but are not).
- Go keeps this split with
internal/packages.
Dependencies
- Blocked by #1558: that removes
Dockerode.ContainerandBoundPortsfrom the wait strategy interface, which decides what is left to move. - Blocked by #1561: that removes the
Uuidexports outright. - Coordinate with #1528: both edit
index.ts. - Coordinate with #1550: an escape hatch is the alternative to subclasses reaching into the protected fields.
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 274
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 44
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testcontainers/testcontainers-node のほかの issue
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
testcontainers/testcontainers-node#1539 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testcontainers/testcontainers-node#1533 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
testcontainers/testcontainers-node#1531 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
testcontainers/testcontainers-node#1529 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
testcontainers/testcontainers-node#1528 ·
メンテナーはふだん 1 日以内に返信
testcontainers/testcontainers-node の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
bug category:ai category:devices effort:s
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
LanternOps/breeze#8943 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
area:reliability difficulty:easy help wanted points:100 Stellar Wave
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
Divinity-Labs/Lens#341 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信