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

Core: Fix process.env assignment #17174

Merged
merged 1 commit into from Jan 10, 2022
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Jan 8, 2022

Issue: #17128

What I did

Remove process.env definition.

  • This makes process.env.FOO = 'bar'; succeed.
  • However, it means const { FOO } = process.env; will fail

Given that nobody complained about the latter and lots of people are complaining about the former, I think this is a good tradeoff.

@tmeasday there's probably a smarter way to get both cases. Any ideas?

How to test

See updates to react-ts example

@shilman shilman added bug patch:yes Bugfix & documentation PR that need to be picked to main branch core labels Jan 8, 2022
@nx-cloud
Copy link

nx-cloud bot commented Jan 8, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 68e8f1c. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

Hmmm. Ok. LGTM. Can't see anyway to allow both

@shilman shilman merged commit 9e15955 into next Jan 10, 2022
@shilman shilman deleted the 17128-fix-process-env-assignment branch January 10, 2022 01:28
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jan 10, 2022
shilman added a commit that referenced this pull request Jan 10, 2022
@havenchyk
Copy link

havenchyk commented Apr 19, 2022

@shilman @tmeasday guys I use msw as storybook addon and this PR doesn't allow me to read API URL I pass from as environment variable in the story. Can you suggest any workaround? found the linked issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants