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] checks variable interpolation #80

Merged
merged 3 commits into from
May 26, 2021
Merged

Conversation

EdvinasDaugirdas
Copy link
Contributor

@EdvinasDaugirdas EdvinasDaugirdas commented May 26, 2021

Fixes:

  • Variables would not get interpolated properly on checks
  • Validation for variables usage on checks


const BUILD = Symbol('build')
const UNQUOTED = Symbol('unquoted')
const VARIABLE_REGEX = /^\$\{(\w+)\}$/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like there is already an expression for identifying variables, it seems to be used throughout the codebase. Lets use that same expression src/expression.js

Copy link
Contributor

Choose a reason for hiding this comment

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

☝🏻 what he said ;)

@w1kman
Copy link
Contributor

w1kman commented May 26, 2021

Tested it and it seems to work fine.

  • header
  • query params
  • checks
  • body

Copy link
Collaborator

@legander legander left a comment

Choose a reason for hiding this comment

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

Works nicely 👍 Change to the other expression then we're all set 💯

@EdvinasDaugirdas EdvinasDaugirdas merged commit d7b4867 into master May 26, 2021
@EdvinasDaugirdas EdvinasDaugirdas deleted the fix/checks-variable branch May 26, 2021 13:47
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

3 participants