Repository navigation
feat(env): allow to load secrets from files - #5
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class support for loading environment variable values from “secret files” (e.g., Docker Compose secrets) within the ENV service, and exposes the relevant helpers/types from the package entrypoint.
Changes:
- Extend
ENVservice withENV_SECRETS_FILESoptions and areadSecretFile()helper to populate env vars from file contents. - Add/extend Jest coverage for secret-file behavior and new
E_SECRET_FILE_NOT_FOUNDerror typing. - Update public exports and generated docs/architecture notes; bump tooling/dependency versions.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/errors.ts | Adds E_SECRET_FILE_NOT_FOUND to the typed YError registry. |
| src/services/timeMock.ts | Moves architecture note and default export to improve file structure. |
| src/services/process.ts | Exports DEFAULT_SIGNALS and relocates architecture note. |
| src/services/ENV.ts | Implements secret-file loading, exports helpers/constants, adjusts isolation semantics docs. |
| src/services/ENV.test.ts | Adds test coverage for secret-file loading and failure modes; updates snapshots. |
| src/index.ts | Switches to explicit runtime exports + export type * to expose the new helpers/types. |
| README.md | Documents secret-file feature and adds readSecretFile() section. |
| package.json | Updates changelog preset and bumps dependencies/devDependencies. |
| commitlint.config.mjs | Fixes @ts-check directive spelling. |
| ARCHITECTURE.md | Regenerates architecture notes and fixes a typo. |
| API.md | Updates generated API docs to include readSecretFile() and new config param docs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
nfroidure
force-pushed
the
feat/secret_files
branch
from
August 21, 2026 15:45
2db01b8 to
ed3e177
Compare
nfroidure
force-pushed
the
feat/secret_files
branch
from
August 21, 2026 16:03
ed3e177 to
5f705de
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.
Suppressed comments (1)
src/services/process.ts:31
DEFAULT_SIGNALSis now exported as a mutable array. Consumers could accidentally mutate it (e.g., push/pop), changing the library's default behavior at runtime. Prefer an immutable/readonly default and typeSIGNALSas readonly to prevent accidental mutation.
export const DEFAULT_SIGNALS: NodeJS.Signals[] = ['SIGTERM', 'SIGINT'];
export interface ProcessService {
service: NodeJS.Process;
dispose: () => Promise<void>;
}
export interface ProcessServiceConfig {
PROCESS_NAME?: string;
SIGNALS?: NodeJS.Signals[];
}
nfroidure
force-pushed
the
feat/secret_files
branch
from
August 21, 2026 16:19
5f705de to
ec59300
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.