@ms-cloudpack/package-utilities
Advanced tools
Comparing version 7.7.1 to 7.8.0
import path from 'path'; | ||
import { cleanEntry } from './cleanEntry.js'; | ||
import glob from 'fast-glob'; | ||
import { mergeArrayDefaults } from './mergeArrayDefaults.js'; | ||
const defaultConditions = ['browser', 'module', 'import', 'default']; | ||
@@ -21,12 +22,3 @@ /** | ||
const { requiredConditions, packagePath } = options; | ||
let { conditions } = options; | ||
if (conditions) { | ||
const defaultIndex = conditions.indexOf('...'); | ||
if (defaultIndex !== -1) { | ||
conditions = [...conditions.slice(0, defaultIndex), ...defaultConditions, ...conditions.slice(defaultIndex + 1)]; | ||
} | ||
} | ||
else { | ||
conditions = defaultConditions; | ||
} | ||
const conditions = mergeArrayDefaults(options.conditions, defaultConditions); | ||
if (typeof exportsMap === 'string' && conditions.includes('default')) { | ||
@@ -33,0 +25,0 @@ return { |
@@ -26,2 +26,4 @@ export { PackageDefinitions } from './PackageDefinitions.js'; | ||
export { getSourceEntry } from './getSourceEntry.js'; | ||
export { mergeArrayDefaults } from './mergeArrayDefaults.js'; | ||
export { mergeObjects } from './mergeObjects.js'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -27,2 +27,5 @@ // Package definition parsing | ||
export { getSourceEntry } from './getSourceEntry.js'; | ||
// Object utilities which could be moved to a separate package if we add more of them | ||
export { mergeArrayDefaults } from './mergeArrayDefaults.js'; | ||
export { mergeObjects } from './mergeObjects.js'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@ms-cloudpack/package-utilities", | ||
"version": "7.7.1", | ||
"version": "7.8.0", | ||
"description": "Utilities for resolving/parsing packages and their imports.", | ||
@@ -19,3 +19,3 @@ "license": "MIT", | ||
"@ms-cloudpack/json-utilities": "^0.1.4", | ||
"@ms-cloudpack/package-overrides": "^0.9.6", | ||
"@ms-cloudpack/package-overrides": "^0.9.7", | ||
"@ms-cloudpack/path-string-parsing": "^1.2.3", | ||
@@ -22,0 +22,0 @@ "@ms-cloudpack/path-utilities": "^2.7.21", |
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
317073
183
2663