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

Support variable expansion in DotEnv features

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript
領域
backend

調査の方向性

この issue ではファイルやテストが指定されていないため、まず Node の DotEnv 実装と既存のテストカバレッジを見つけます。値がどのようにパースされ解決されるかを追跡し、そのうえで ${APPLICATION_PORT} の展開と、上書きおよび順序に対して期待される動作のテストを定義します。提案された展開動作が実装され、テストでカバーされれば完了です。

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

説明

dotenv feature request
What is the problem this feature will solve?

Sometimes it's helpful to derive the value of variables from other variables, using variable expansion.

For example, consider the following .env file:

APPLICATION_PORT: 8080
BASE_URL: http://localhost:8080

The APPLICATION_PORT and BASE_URL should have the same port. For reasons external to this issue, BASE_URL cannot be split into two variables without causing confusion.

If there are external overrides to APPLICATION_PORT, they won't remain in sync with BASE_URL.

What is the feature you are proposing to solve the problem?

Instead we could write .env files like this:

APPLICATION_PORT: 8080
BASE_URL: http://localhost:${APPLICATION_PORT}

This is already supported by at least bash, and the concept of variable expansion in environmental configuration is also common in ecosystems such as Kubernetes.

What alternatives have you considered?
  • Using dotenvx
  • Splitting variables up into their lowest common set
主要言語
JavaScript
スター
122k
フォーク
37.4k
平均マージ
4日 4時間
マージ済み PR(30日)
276

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

nodejs/node のほかの issue

nodejs/node の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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