Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@backstage/config-loader

Package Overview
Dependencies
Maintainers
3
Versions
869
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstage/config-loader - npm Package Compare versions

Comparing version 1.8.0-next.0 to 1.8.0

24

CHANGELOG.md
# @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 @@

8

dist/index.cjs.js

@@ -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 @@ }

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc