github unkn0wn-root/resterm v0.23.6

latest releases: v0.24.2, v0.24.1
one month ago

What's Fixed

Fixed file-scoped variables being swallowed by commented out directives

When a commented out directive appeared between requests (for example, a temporarily disabled # @hostname=...), the parser mistakenly treated it as the start of a new request. Any shorthand variables defined after it were then scoped to that phantom request instead of remaining file-scoped, which made them invisible to other requests in the file.

For example, in a file like this:

###
# @name Login
POST https://example.com/login
Content-Type: application/json

{"loginId":"{{admin_email}}"}

###
@hostname=http://localhost:3000
# @hostname=https://staging.example.com
@admin_email=admin@example.com

The commented out # @hostname=... line caused @admin_email to be captured into an invisible request, so {{admin_email}} in the Login request body would not resolve. After this fix, unknown commented directives outside of requests are ignored and the surrounding variables stay file-scoped as expected.

Don't miss a new resterm release

NewReleases is sending notifications on new releases.