Skip to content

Conversation

@MikeGarde
Copy link
Owner

PR Description

This pull request introduces enhancements and optimizations to the codebase based on the recent commits and the provided diff files. The changes focus on improving the handling of environment variables in the application.

EnvObject Class Improvements:

  • Updated EnvObject class to include a new method resolveNestedVariables() for resolving nested variables in the environment values efficiently.
  • Added the ability to resolve variables that reference other variables within the same EnvObject.

EnvParser Enhancements:

  • Implemented integration of resolving nested variables in the EnvParser module to further enhance the parsing process.
  • Updated the parseEnvFile() function in envParser.ts to utilize the resolveNestedVariables() method.

Test Cases:

  • Added test suite in resolveNestedVariables.tests.ts to ensure correct resolution of nested variables in environment values.
  • Created test scenarios to validate the functionality of resolving single, multiple, and merged variables within EnvObject instances.

TypeScript Configuration:

  • Adjusted the tsconfig.json file to align with TypeScript standards for module resolution and target environment specifications.
  • Enabled JavaScript (.js) file support in the TypeScript compilation process for better compatibility.

These changes collectively enhance the environment variable management within the application and ensure consistent behavior across different environments.

- Added method to resolve nested variables in the values
- Implemented tests for resolving single and multiple nested variables
- Updated tsconfig.json:
  - Changed "module" setting to "ESNext"
  - Updated "moduleResolution" to "Node"
  - Set "target" to "ES2022"
  - Added "allowJs" and "resolveJsonModule" options
- Refined include paths to "src/**/*.ts" for TypeScript files
- Updated and improved configuration settings for better compatibility and flexibility
@MikeGarde MikeGarde merged commit 8668f5e into main Jun 11, 2025
4 checks passed
@MikeGarde MikeGarde deleted the nested branch June 11, 2025 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants