Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .bumpy/fix-vscode-url-fragment-highlighting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
env-spec-language: patch
"@env-spec/parser": patch
---

Fixed URL fragments in @docs() decorator not being highlighted correctly.
2 changes: 1 addition & 1 deletion packages/env-spec-parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _Here is a short illustrative example:_
```dotenv
# Stripe secret api key
# @required @sensitive @type=string(startsWith="sk_")
# @docsUrl=https://docs.stripe.com/keys
# @docs(https://docs.stripe.com/keys)
STRIPE_SECRET_KEY=encrypted("asdfqwerqwe2374298374lksdjflksdjf981273948okjdfksdl")
```

Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-plugin/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ APP_ENV=remap($WORKERS_CI_BRANCH, "main", production, regex(.*), preview, undefi

# OpenAI API Key
# @required @sensitive @type=string(startsWith=sk-)
# @docsUrl=https://platform.openai.com/docs/api-reference/authentication
# @docs(https://developers.openai.com/api/reference/overview#authentication)
OPENAI_API_KEY=exec('op read "op://api-config-prod/openai/api-key"')


Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-plugin/language/env-spec.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@

"unquoted-string-within-fn-call": {
"comment": "unquoted string value within fn call",
"match": "([^ \n#,)$]+)",
"match": "([^ \n,)$]+)",
"name": "string.unquoted.env-spec",
"captures": {
"1": {
Expand Down
14 changes: 14 additions & 0 deletions packages/vscode-plugin/test/grammar.test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ EXAMPLE_VAR=test
# <- comment.line.env-spec
DEC_FN_VAR=test

# @docs(https://varlock.dev/env-spec/overview/#a-short-example)
# <- comment.line.env-spec
# ^^^^^^^^^^^^^^^^ string.unquoted.env-spec
DOCS_FRAGMENT_VAR=test

# @type(
# string,
# ^^^^^^ string.unquoted.env-spec
# number
# ^^^^^^ string.unquoted.env-spec
# )
# ^ punctuation.section.parens.end.env-spec
MULTI_DEC_VAR=test

# ======================
# Variable expansion
# ======================
Expand Down