-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Enable parsing of JSON env vars #2849
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
base: main
Are you sure you want to change the base?
Conversation
Hey @Genyus, thanks! I'll take a look at this tomorrow probably. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @Genyus on sorting this out. I have some small comments.
When you can, please merge main
into your branch to get the CI to pass (we fixed the job types bug recently).
- Restructure and rename test functions - Streamline comments
@infomiho Applied the suggested changes, but still seeing unexpected build errors |
@Genyus which build errors are you seeing? Are you referring to the failing CI? The CI is failing due to e2e tests not being up to date, you can run them locally with |
@infomiho Thanks for the pointer, CI is now passing 👍🏾 |
Description
Modifies how environment variables are parsed to avoid JSON parsing errors.
Currently, variable parsing calls
show value
, but theshow
function in Haskell automatically adds quotes around strings and escapes internal quotes. So when you have:it gets converted to:
The value that gets passed to
JSON.parse()
includes the outer quotes and escaped inner quotes, which is why it fails.Fixes #2846
Select what type of change this PR introduces:
Update Waspc ChangeLog and version if needed
If you did a bug fix, new feature, or breaking change, that affects
waspc
, make sure you satisfy the following:ChangeLog.md
with description of the change this PR introduces.waspc
version inwaspc.cabal
to reflect changes I introduced, with regards to the version of the latest wasp release, if the bump was needed.Add a regression test if needed
If you did a bug fix, make sure you satisfy the following:
If you're unable to add a regression test, please explain why.
This likely indicates that our current testing setup needs improvement.
Update example apps if needed
If you did code changes and added a new feature, make sure you satisfy the following:
waspc/examples/todoApp
and its e2e tests as needed and manually checked it works correctly.If you did code changes and updated an existing feature, make sure you satisfy the following:
waspc/examples/todoApp
and its e2e tests as needed and manually checked it works correctly.Update starter apps if needed
If you did code changes and updated an existing feature, make sure you satisfy the following:
basic
starter as needed and manually checked it works correctly.todo-ts
starter as needed and manually checked it works correctly.embeddings
starter as needed and manually checked it works correctly.saas
starter as needed and manually checked it works correctly.