@backstage/config-loader
Advanced tools
Comparing version 0.0.0-nightly-202182821947 to 0.0.0-nightly-202182921621
# @backstage/config-loader | ||
## 0.0.0-nightly-202182821947 | ||
## 0.0.0-nightly-202182921621 | ||
@@ -8,2 +8,3 @@ ### Patch Changes | ||
- ee7a1a4b64: Add option to collect configuration schemas from explicit package paths in addition to by package name. | ||
- e68bd978e2: Allow collection of configuration schemas from multiple versions of the same package. | ||
@@ -10,0 +11,0 @@ ## 0.6.8 |
@@ -313,5 +313,5 @@ 'use strict'; | ||
async function collectConfigSchemas(packageNames, packagePaths) { | ||
const visitedPackages = new Set(); | ||
const schemas = Array(); | ||
const tsSchemaPaths = Array(); | ||
const schemas = new Array(); | ||
const tsSchemaPaths = new Array(); | ||
const visitedPackageVersions = new Map(); | ||
const currentDir = await fs__default['default'].realpath(process.cwd()); | ||
@@ -328,6 +328,2 @@ async function processItem(item) { | ||
const {name, parentPath} = item; | ||
if (visitedPackages.has(name)) { | ||
return; | ||
} | ||
visitedPackages.add(name); | ||
try { | ||
@@ -344,2 +340,11 @@ pkgPath = req.resolve(`${name}/package.json`, parentPath && { | ||
const pkg = await fs__default['default'].readJson(pkgPath); | ||
let versions = visitedPackageVersions.get(pkg.name); | ||
if (versions == null ? void 0 : versions.has(pkg.version)) { | ||
return; | ||
} | ||
if (!versions) { | ||
versions = new Set(); | ||
visitedPackageVersions.set(pkg.name, versions); | ||
} | ||
versions.add(pkg.version); | ||
const depNames = [ | ||
@@ -346,0 +351,0 @@ ...Object.keys((_a = pkg.dependencies) != null ? _a : {}), |
@@ -301,5 +301,5 @@ import yaml from 'yaml'; | ||
async function collectConfigSchemas(packageNames, packagePaths) { | ||
const visitedPackages = new Set(); | ||
const schemas = Array(); | ||
const tsSchemaPaths = Array(); | ||
const schemas = new Array(); | ||
const tsSchemaPaths = new Array(); | ||
const visitedPackageVersions = new Map(); | ||
const currentDir = await fs.realpath(process.cwd()); | ||
@@ -316,6 +316,2 @@ async function processItem(item) { | ||
const {name, parentPath} = item; | ||
if (visitedPackages.has(name)) { | ||
return; | ||
} | ||
visitedPackages.add(name); | ||
try { | ||
@@ -332,2 +328,11 @@ pkgPath = req.resolve(`${name}/package.json`, parentPath && { | ||
const pkg = await fs.readJson(pkgPath); | ||
let versions = visitedPackageVersions.get(pkg.name); | ||
if (versions == null ? void 0 : versions.has(pkg.version)) { | ||
return; | ||
} | ||
if (!versions) { | ||
versions = new Set(); | ||
visitedPackageVersions.set(pkg.name, versions); | ||
} | ||
versions.add(pkg.version); | ||
const depNames = [ | ||
@@ -334,0 +339,0 @@ ...Object.keys((_a = pkg.dependencies) != null ? _a : {}), |
{ | ||
"name": "@backstage/config-loader", | ||
"description": "Config loading functionality used by Backstage backend, and CLI", | ||
"version": "0.0.0-nightly-202182821947", | ||
"version": "0.0.0-nightly-202182921621", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
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
151657
1273