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 0.0.0-nightly-20240414023511 to 0.0.0-nightly-20240415030456

12

CHANGELOG.md
# @backstage/config-loader
## 0.0.0-nightly-20240414023511
## 0.0.0-nightly-20240415030456
### 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

@@ -8,0 +18,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 @@ }

6

package.json
{
"name": "@backstage/config-loader",
"version": "0.0.0-nightly-20240414023511",
"version": "0.0.0-nightly-20240415030456",
"description": "Config loading functionality used by Backstage backend, and CLI",

@@ -57,4 +57,4 @@ "backstage": {

"devDependencies": {
"@backstage/backend-test-utils": "^0.0.0-nightly-20240414023511",
"@backstage/cli": "^0.0.0-nightly-20240414023511",
"@backstage/backend-test-utils": "^0.0.0-nightly-20240415030456",
"@backstage/cli": "^0.0.0-nightly-20240415030456",
"@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