@ms-cloudpack/bundler-plugin-ori
Advanced tools
Comparing version 0.18.4 to 0.18.5
@@ -1,2 +0,2 @@ | ||
import { findProjectRoot } from '@ms-cloudpack/package-utilities'; | ||
import { findProjectRoot, mergeArrayDefaults } from '@ms-cloudpack/package-utilities'; | ||
import { normalizeRelativePath, slash } from '@ms-cloudpack/path-string-parsing'; | ||
@@ -58,16 +58,2 @@ import { builtinModules } from 'module'; | ||
} | ||
function mergeDefaults(defaults, overrides) { | ||
const values = []; | ||
if (overrides) { | ||
values.push(...overrides); | ||
const defaultsIndex = overrides.indexOf('...'); | ||
if (defaultsIndex !== -1) { | ||
values.splice(defaultsIndex, 1, ...defaults); | ||
} | ||
} | ||
else { | ||
values.push(...defaults); | ||
} | ||
return values; | ||
} | ||
function buildDynamicImportsFilter(dynamicImports) { | ||
@@ -94,3 +80,3 @@ // Using the basename works good enough for now, we might want to include the path in the future, | ||
: defaultResolveExtensions; | ||
const plugins = mergeDefaults(defaultPlugins, overrideOptions.plugins); | ||
const plugins = mergeArrayDefaults(overrideOptions.plugins, defaultPlugins); | ||
if (dynamicImports?.length) { | ||
@@ -157,5 +143,5 @@ plugins.push({ | ||
plugins, | ||
resolveExtensions: mergeDefaults(resolveExtensions, overrideOptions.resolveExtensions), | ||
resolveExtensions: mergeArrayDefaults(overrideOptions.resolveExtensions, resolveExtensions), | ||
}; | ||
} | ||
//# sourceMappingURL=getOriOptions.js.map |
{ | ||
"name": "@ms-cloudpack/bundler-plugin-ori", | ||
"version": "0.18.4", | ||
"version": "0.18.5", | ||
"description": "An abstraction to bundle source code using ori.", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
"@ms-cloudpack/common-types": "^0.9.0", | ||
"@ms-cloudpack/package-utilities": "^7.7.1", | ||
"@ms-cloudpack/package-utilities": "^7.8.0", | ||
"@ms-cloudpack/path-string-parsing": "^1.2.3", | ||
@@ -21,0 +21,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
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
41204
323