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

fix: env vars with hyphens are not processed properly #140

Merged
merged 1 commit into from
May 3, 2023
Merged

Conversation

shazron
Copy link
Member

@shazron shazron commented Apr 27, 2023

old regex: https://regex101.com/r/sBfXak/1
new regex: https://regex101.com/r/dOa3sT/1

Closes #139

  • Replaced \w+ with [a-zA-Z0-9_-]+ (\w is equivalent to [a-zA-Z0-9_])
  • This can be [\w-]+ as well, but I wanted to be explicit.

How Has This Been Tested?

  • npm test

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Merging #140 (69cf07c) into master (592171f) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #140   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines         1320      1320           
  Branches       351       351           
=========================================
  Hits          1320      1320           
Impacted Files Coverage Δ
src/utils.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@sandeep-paliwal sandeep-paliwal left a comment

Choose a reason for hiding this comment

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

LGTM

@shazron shazron merged commit 4e27e32 into master May 3, 2023
@shazron shazron deleted the regex-fix branch May 3, 2023 02:39
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.

env vars with dashes in the name are not processed properly
4 participants