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

@backstage/config

Package Overview
Dependencies
Maintainers
4
Versions
327
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstage/config - npm Package Compare versions

Comparing version 0.1.1-alpha.21 to 0.1.1-alpha.22

13

dist/index.cjs.js

@@ -35,2 +35,5 @@ 'use strict';

return `Missing required config value at '${key}'`;
},
convert(key, context, expected) {
return `Unable to convert config value for key '${key}' in '${context}' to a ${expected}`;
}

@@ -137,3 +140,11 @@ };

getOptionalNumber(key) {
return this.readConfigValue(key, (value) => typeof value === "number" || {expected: "number"});
const value = this.readConfigValue(key, (val) => typeof val === "number" || typeof val === "string" || {expected: "number"});
if (typeof value === "number" || value === void 0) {
return value;
}
const number = Number(value);
if (!Number.isFinite(number)) {
throw new Error(errors.convert(this.fullKey(key), this.context, "number"));
}
return number;
}

@@ -140,0 +151,0 @@ getBoolean(key) {

@@ -29,2 +29,5 @@ import cloneDeep2 from 'lodash/cloneDeep';

return `Missing required config value at '${key}'`;
},
convert(key, context, expected) {
return `Unable to convert config value for key '${key}' in '${context}' to a ${expected}`;
}

@@ -131,3 +134,11 @@ };

getOptionalNumber(key) {
return this.readConfigValue(key, (value) => typeof value === "number" || {expected: "number"});
const value = this.readConfigValue(key, (val) => typeof val === "number" || typeof val === "string" || {expected: "number"});
if (typeof value === "number" || value === void 0) {
return value;
}
const number = Number(value);
if (!Number.isFinite(number)) {
throw new Error(errors.convert(this.fullKey(key), this.context, "number"));
}
return number;
}

@@ -134,0 +145,0 @@ getBoolean(key) {

4

package.json
{
"name": "@backstage/config",
"description": "Config API used by Backstage core, backend, and CLI",
"version": "0.1.1-alpha.21",
"version": "0.1.1-alpha.22",
"private": false,

@@ -42,4 +42,4 @@ "publishConfig": {

],
"gitHead": "c5a4834557b9f8265c24af1b13c12614daf99470",
"gitHead": "777cda358f1c50f59fedc8c3a35d76a5cc4e6271",
"module": "dist/index.esm.js"
}
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