@dword-design/base 9.1.0 → 9.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +9 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -85,14 +85,19 @@ class Base {
85
85
  supportedNodeVersions: [14, 16, 18],
86
86
  syncKeywords: true
87
87
  };
88
- let inheritedConfig = config.name ? importCwd.silent(config.name) || jitiInstance(config.name) : undefined;
89
88
  const mergeOptions = {
90
89
  customMerge: key => key === 'supportedNodeVersions' ? (a, b) => b : undefined
91
90
  };
92
- if (typeof inheritedConfig === 'function') {
93
- inheritedConfig = inheritedConfig(deepmerge(defaultConfig, config, mergeOptions));
91
+ const configsToMerge = [defaultConfig];
92
+ if (config.name) {
93
+ let inheritedConfig = config.name ? importCwd.silent(config.name) || jitiInstance(config.name).default : undefined;
94
+ if (typeof inheritedConfig === 'function') {
95
+ inheritedConfig = inheritedConfig(deepmerge(defaultConfig, config, mergeOptions));
96
+ }
97
+ configsToMerge.push(inheritedConfig);
94
98
  }
95
- this.config = deepmerge.all([defaultConfig, ...(inheritedConfig ? [inheritedConfig] : []), config], mergeOptions);
99
+ configsToMerge.push(config);
100
+ this.config = deepmerge.all(configsToMerge, mergeOptions);
96
101
  this.packageConfig = this.getPackageConfig();
97
102
  this.generatedFiles = this.getGeneratedFiles();
98
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "Base package for projects.",
5
5
  "repository": "dword-design/base",
6
6
  "funding": "https://github.com/sponsors/dword-design",