Socket
Socket
Sign inDemoInstall

@ms-cloudpack/config

Package Overview
Dependencies
Maintainers
0
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ms-cloudpack/config - npm Package Compare versions

Comparing version 0.25.1 to 0.26.0

24

lib/readGeneratedConfig.js

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

5

lib/sortGeneratedConfig.js
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

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