Files
Zoltan KochanandClaude Opus 5.5 6a532e336c fix(config.env-replace): read only string env values (#16225)
`getEnvValue` read `env[name]` directly, so a placeholder named after an
`Object.prototype` property, such as `${toString}`, resolved to a
function and was substituted as its source text. `envReplaceLossy` also
reported no unresolved placeholder for it. Only string values now count
as set. That also keeps treating `{ KEY: undefined }` as unset, and it
keeps the case-insensitive lookup `process.env` has on Windows, which an
own-property check would lose.

The `NAME-fallback` split used the unanchored regex
`/([^:-]+)(:?)-(.+)/`, which retries from each start position and
backtracks quadratically on a long name without a dash. The split now
uses indexOf. Names with a colon before the dash, which the regex
matched at an arbitrary later position, are treated as bare names.

pnpm v12 reads env values from a string map and parses the fallback
without a regex, so it needs no counterpart.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 00:28:10 +02:00
..