@ms-cloudpack/config
Advanced tools
Comparing version 0.25.1 to 0.26.0
@@ -11,26 +11,4 @@ import { readJson } from '@ms-cloudpack/json-utilities'; | ||
const { generatedConfigPath } = getConfigPath(appPath); | ||
return processDeprecatedValues((await readJson(generatedConfigPath, { throwOnError: true, mode: 'permissive' })) || {}); | ||
return (await readJson(generatedConfigPath, { throwOnError: true, mode: 'permissive' })) || {}; | ||
} | ||
/** | ||
* Delete deprecated values and convert them to the new format. Note that this function | ||
* mutates the passed-in config object to avoid reallocation. | ||
*/ | ||
function processDeprecatedValues(config) { | ||
// eslint-disable-next-line etc/no-deprecated | ||
const { packageOverrides } = config; | ||
// Convert package overrides into settings to preserve the deprecated support. | ||
if (packageOverrides) { | ||
config.packageSettings = config.packageSettings || []; | ||
for (const override of packageOverrides) { | ||
const settings = { | ||
match: { name: override.name, version: override.versionRequirement }, | ||
exports: override.overrides.exports, | ||
}; | ||
config.packageSettings.push(settings); | ||
} | ||
// eslint-disable-next-line etc/no-deprecated | ||
delete config.packageOverrides; | ||
} | ||
return config; | ||
} | ||
//# sourceMappingURL=readGeneratedConfig.js.map |
import { sortObjectKeys } from './sortObjectKeys.js'; | ||
import { compareSettings } from './compareSettings.js'; | ||
import { compareOverrides } from './compareOverrides.js'; | ||
/** | ||
@@ -9,6 +8,4 @@ * Sorts the generated config so that we don't have unneeded changes due to differences in | ||
export function sortGeneratedConfig(generated) { | ||
// eslint-disable-next-line etc/no-deprecated | ||
const { packageSettings = [], packageOverrides } = generated; | ||
const { packageSettings = [] } = generated; | ||
// Ensure package overrides are sorted based on package name and version requirement. | ||
packageOverrides?.sort(compareOverrides); | ||
packageSettings.sort(compareSettings); | ||
@@ -15,0 +12,0 @@ for (let i = 0; i < packageSettings.length; i++) { |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.47.0" | ||
"packageVersion": "7.47.6" | ||
} | ||
] | ||
} |
{ | ||
"name": "@ms-cloudpack/config", | ||
"version": "0.25.1", | ||
"version": "0.26.0", | ||
"description": "Configuration handling for cloudpack.", | ||
@@ -17,6 +17,6 @@ "license": "MIT", | ||
"dependencies": { | ||
"@ms-cloudpack/common-types": "^0.15.0", | ||
"@ms-cloudpack/common-types": "^0.16.0", | ||
"@ms-cloudpack/json-utilities": "^0.1.7", | ||
"@ms-cloudpack/package-utilities": "^9.0.1", | ||
"@ms-cloudpack/path-utilities": "^2.7.32", | ||
"@ms-cloudpack/package-utilities": "^9.0.2", | ||
"@ms-cloudpack/path-utilities": "^2.7.33", | ||
"import-meta-resolve": "^4.0.0", | ||
@@ -23,0 +23,0 @@ "semver": "^7.6.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
100673
91
833
+ Added@ms-cloudpack/common-types@0.16.10.19.7(transitive)
+ Added@ms-cloudpack/package-overrides@0.9.30(transitive)
+ Added@ms-cloudpack/path-utilities@2.7.44(transitive)
+ Added@types/node@22.5.5(transitive)
+ Added@types/qs@6.9.16(transitive)
- Removed@ms-cloudpack/common-types@0.15.00.19.4(transitive)
- Removed@ms-cloudpack/package-overrides@0.9.27(transitive)
- Removed@ms-cloudpack/path-utilities@2.7.41(transitive)
- Removed@types/node@22.5.4(transitive)
- Removed@types/qs@6.9.15(transitive)