@backstage/config-loader
Advanced tools
Comparing version 1.8.0-next.0 to 1.8.0
# @backstage/config-loader | ||
## 1.8.0 | ||
### Minor Changes | ||
- 2ce31b3: The default environment variable substitution function will now trim whitespace characters from the substituted value. This alleviates bugs where whitespace characters are mistakenly included in environment variables. | ||
If you depend on the old behavior, you can override the default substitution function with your own, for example: | ||
```ts | ||
ConfigSources.default({ | ||
substitutionFunc: async name => process.env[name], | ||
}); | ||
``` | ||
- 99bab65: Support parameter substitution for environment variables | ||
### Patch Changes | ||
- Updated dependencies | ||
- @backstage/cli-common@0.1.13 | ||
- @backstage/config@1.2.0 | ||
- @backstage/errors@1.2.4 | ||
- @backstage/types@1.1.1 | ||
## 1.8.0-next.0 | ||
@@ -4,0 +28,0 @@ |
@@ -834,3 +834,9 @@ 'use strict'; | ||
function createConfigTransformer(options) { | ||
const { substitutionFunc = async (name) => process.env[name], readFile } = options; | ||
const { | ||
substitutionFunc = async (name) => { | ||
var _a; | ||
return (_a = process.env[name]) == null ? void 0 : _a.trim(); | ||
}, | ||
readFile | ||
} = options; | ||
const substitutionTransform = createSubstitutionTransform(substitutionFunc); | ||
@@ -837,0 +843,0 @@ const transforms = [substitutionTransform]; |
@@ -329,2 +329,9 @@ import { JSONSchema7 } from 'json-schema'; | ||
remote?: Pick<RemoteConfigSourceOptions, 'reloadInterval'>; | ||
/** | ||
* A custom substitution function that overrides the default one. | ||
* | ||
* @remarks | ||
* The substitution function handles syntax like `${MY_ENV_VAR}` in configuration values. | ||
* The default substitution will read the value from the environment and trim whitespace. | ||
*/ | ||
substitutionFunc?: SubstitutionFunc; | ||
@@ -331,0 +338,0 @@ } |
{ | ||
"name": "@backstage/config-loader", | ||
"version": "1.8.0-next.0", | ||
"version": "1.8.0", | ||
"description": "Config loading functionality used by Backstage backend, and CLI", | ||
@@ -57,4 +57,4 @@ "backstage": { | ||
"devDependencies": { | ||
"@backstage/backend-test-utils": "^0.3.7-next.0", | ||
"@backstage/cli": "^0.26.3-next.0", | ||
"@backstage/backend-test-utils": "^0.3.7", | ||
"@backstage/cli": "^0.26.3", | ||
"@types/json-schema-merge-allof": "^0.6.0", | ||
@@ -61,0 +61,0 @@ "msw": "^1.0.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
263423
139545
2361
0
18
48
5
187