(value: string)
| 279 | |
| 280 | // Interpolation function |
| 281 | const interpolateString = (value: string): string => { |
| 282 | // Match $npm_package_ followed by field name (stops at _ + uppercase) |
| 283 | // This allows: version, repository_type, but stops at _STATIC |
| 284 | const regex = /\$npm_package_[\dA-Za-z]+(?:_[a-z][\dA-Za-z]*)*/g; |
| 285 | return value.replaceAll(regex, (match: string) => getNpmPackageVariable(packageJson, match) ?? match); |
| 286 | }; |
| 287 | |
| 288 | // Create new config with interpolated values |
| 289 | const result: IRcFileConfig = { ...config }; |
no test coverage detected