Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Oxygen.env in favor of Hydrogen.env #2150

Open
wants to merge 3 commits into
base: v1.x-2022-07
Choose a base branch
from

Conversation

blittle
Copy link
Contributor

@blittle blittle commented Sep 16, 2022

Description

Oxygen.env is now deprecated in favor of Hydrogen.env. Access environment variables within your server components on Hydrogen.env. We hope this will make more sense when deploying to non-Oxygen environments.

Additional context

Part of Shopify/hydrogen#1879


Before submitting the PR, please make sure you do the following:

  • Read the Contributing Guidelines
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123)
  • Update docs in this repository according to your change
  • Run yarn changeset add if this PR cause a version bump based on Keep a Changelog and adheres to Semantic Versioning

@@ -4,10 +4,7 @@ title: Environment variables
description: Learn how to store sensitive information in your Hydrogen project.
---

Environment variables, also known as secrets, allow you to load different values in your app depending on the running environment. This guide describes how to store environment variables in your Hydrogen project.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rennyG I rewrote some of this documentation in a way I hope will be less confusing. Let me know if you'd like to sync up and go over it together.

@frandiox I'd love your thoughts on this as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still thinking if we should provide Hydrogen.env in the browser with all the public variables... other than that, I think this is clear since now we don't have a distinction between public and private variables anymore.

Copy link
Contributor

@cartogram cartogram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs and code changes make sense 👍

Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good, thanks! I was worried about the behavior around PUBLIC_ but I see it was already changed in Shopify/hydrogen@7f97229 👍

Copy link
Contributor

@rennyG rennyG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content looks good, just a couple suggestions

docs/framework/environment-variables.md Outdated Show resolved Hide resolved
docs/framework/environment-variables.md Outdated Show resolved Hide resolved
docs/framework/environment-variables.md Outdated Show resolved Hide resolved
docs/framework/environment-variables.md Outdated Show resolved Hide resolved
docs/framework/environment-variables.md Outdated Show resolved Hide resolved
@rennyG
Copy link
Contributor

rennyG commented Sep 21, 2022

@blittle make sure you tophat this on .dev before shipping

@rennyG rennyG closed this Sep 21, 2022
@rennyG rennyG reopened this Sep 21, 2022
Co-authored-by: Ren Chaturvedi <63201605+rennyG@users.noreply.github.com>
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.

None yet

4 participants