Skip to content

refactor: move environment prefix constants from utils to env package#91

Merged
adelrodriguez merged 1 commit intomainfrom
02-18-refactor_move_environment_prefix_constants_from_utils_to_env_package
Feb 19, 2026
Merged

refactor: move environment prefix constants from utils to env package#91
adelrodriguez merged 1 commit intomainfrom
02-18-refactor_move_environment_prefix_constants_from_utils_to_env_package

Conversation

@adelrodriguez
Copy link
Collaborator

@adelrodriguez adelrodriguez commented Feb 19, 2026

Greptile Summary

Moved REACT_PUBLIC_ENV_PREFIX and EXPO_PUBLIC_ENV_PREFIX constants from @init/utils/constants to @init/env package for better logical organization.

  • Created new packages/env/src/constants.ts file with the two environment prefix constants
  • Updated packages/env/src/index.ts to re-export the constants
  • Updated packages/env/src/presets.ts to import from local constants file
  • Updated apps/app/src/shared/env.ts to import from @init/env
  • Removed the constants from packages/utils/src/constants/app.ts

This refactor improves code organization by placing environment-related constants in the env package where they are primarily used, reducing coupling between packages.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • This is a straightforward refactoring that moves constants to a more appropriate location. All imports have been correctly updated, no functionality is changed, and the constants retain their exact values. The change improves code organization without introducing any breaking changes.
  • No files require special attention

Important Files Changed

Filename Overview
packages/env/src/constants.ts New file adding EXPO_PUBLIC_ENV_PREFIX and REACT_PUBLIC_ENV_PREFIX constants
packages/env/src/index.ts Re-exports constants from #constants.ts to make them available to consumers
packages/env/src/presets.ts Updated imports to use local constants instead of @init/utils/constants
apps/app/src/shared/env.ts Updated import to get REACT_PUBLIC_ENV_PREFIX from @init/env instead of @init/utils/constants
packages/utils/src/constants/app.ts Removed REACT_PUBLIC_ENV_PREFIX and EXPO_PUBLIC_ENV_PREFIX constants (moved to env package)

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["@init/utils/constants"] -->|Before| B["REACT_PUBLIC_ENV_PREFIX\nEXPO_PUBLIC_ENV_PREFIX"]
    B -->|Used by| C["@init/env/presets"]
    B -->|Used by| D["apps/app/src/shared/env.ts"]
    
    E["@init/env/constants"] -->|After| F["REACT_PUBLIC_ENV_PREFIX\nEXPO_PUBLIC_ENV_PREFIX"]
    F -->|Re-exported by| G["@init/env/index.ts"]
    G -->|Used by| H["@init/env/presets"]
    G -->|Used by| I["apps/app/src/shared/env.ts"]
    
    style A fill:#ffcccc
    style E fill:#ccffcc
    style B fill:#ffcccc
    style F fill:#ccffcc
Loading

Last reviewed commit: 4c513e7

@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 02-18-refactor_move_environment_prefix_constants_from_utils_to_env_package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@adelrodriguez adelrodriguez marked this pull request as ready for review February 19, 2026 03:03
Copy link
Collaborator Author

adelrodriguez commented Feb 19, 2026

Base automatically changed from 02-18-feat_replace_custom_duration_utils_with_qte_library to main February 19, 2026 03:06
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_environment_prefix_constants_from_utils_to_env_package branch from 88a6cc0 to 4c513e7 Compare February 19, 2026 03:10
@adelrodriguez adelrodriguez merged commit bf14590 into main Feb 19, 2026
8 checks passed
@adelrodriguez adelrodriguez deleted the 02-18-refactor_move_environment_prefix_constants_from_utils_to_env_package branch February 19, 2026 03:24
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.

1 participant

Comments