Compare commits

...
Author SHA1 Message Date
dependabot[bot] 183d87a874 Bump github/codeql-action from 4 to 4.37.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4 to 4.37.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4...v4.37.4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-04 09:43:29 +00:00
John Barton 97a2850142 Merge pull request #265 from joho/ci/pin-windows-2025-vs2026
Point CI to new windows tag
2026-05-25 10:52:27 +10:00
John Barton e77328b146 Update the windows version per github warning.
"NOTICE: windows-latest requests are being redirected to windows-2025-vs2026 by June 15, 2028"
2026-05-25 10:37:27 +10:00
John Barton efa32f116f Merge pull request #264 from joho/fix/allow-hyphens-in-keys
Definitively commit to allowing hyphens (again)
2026-05-25 10:33:10 +10:00
John Barton 139cdfde14 Update readme to capture ruby/node key compatibililty 2026-05-25 10:30:10 +10:00
John Barton 87021fd05a test: drop stale parser-error case for hyphens in keys
PR #245 (commit 82194f2) widened the variable-name charset to include
'-', restoring v1.4.0 behaviour. The "Invalid char" case in
TestParserErrors predates that change and has been failing ever since;
CI only started surfacing it after the recent go.mod bump.

The deliberate "hyphens allowed" contract is already covered by
TestLoadHyphenEnv (positive) and TestKeyNameCharsetRejectsDisallowed
(negative lock-in on '+', '@', '/'), so removing this case is the
correct fix rather than reverting #245.
2026-05-25 10:11:01 +10:00
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
go: [ '1.26', '1.25', '1.24', '1.23', '1.22' ]
os: [ ubuntu-latest, macOS-latest, windows-latest ]
os: [ ubuntu-latest, macOS-latest, windows-2025-vs2026 ]
name: ${{ matrix.os }} Go ${{ matrix.go }} Tests
steps:
- uses: actions/checkout@v6
+3 -3
View File
@@ -42,7 +42,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
uses: github/codeql-action/init@v4.37.4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v4
uses: github/codeql-action/autobuild@v4.37.4
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,4 +69,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@v4.37.4
+4
View File
@@ -119,6 +119,10 @@ content := getRemoteFileContent()
myEnv, err := godotenv.Unmarshal(content)
```
### Variable name compatibility
Ruby's dotenv only allows `[A-Za-z0-9_.]` in key names, while Node's dotenv also permits `-`. godotenv has matched the Node charset since v1.4.0, so keys like `MY-VAR` parse cleanly here and in Node but will error under Ruby's dotenv.
### Precedence & Conventions
Existing envs take precedence of envs that are loaded later.
-4
View File
@@ -710,10 +710,6 @@ func TestParserErrors(t *testing.T) {
input string
err error
}{
"Invalid char": {
input: "foo-1=bar",
err: ErrUnexpectedChar,
},
"UnterminatedQuote": {
input: "foo=\"bar",
err: ErrUnterminatedQuote,