@dword-design/base 12.0.13 → 12.0.14
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.
- package/dist/index.js +8 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import depcheckDetectorTinyexec from 'depcheck-detector-tinyexec';
|
|
|
10
10
|
import packageName from 'depcheck-package-name';
|
|
11
11
|
import depcheckParserBabel from 'depcheck-parser-babel';
|
|
12
12
|
import fs from 'fs-extra';
|
|
13
|
-
import
|
|
13
|
+
import { createJiti } from 'jiti';
|
|
14
14
|
import { transform as pluginNameToPackageName } from 'plugin-name-to-package-name';
|
|
15
15
|
import checkUnknownFiles from "./commands/check-unknown-files/index.js";
|
|
16
16
|
import commit from "./commands/commit/index.js";
|
|
@@ -46,9 +46,8 @@ const mergeConfigs = (...configs) => {
|
|
|
46
46
|
class Base {
|
|
47
47
|
constructor(config = null) {
|
|
48
48
|
var _this$config$commands;
|
|
49
|
-
const jitiInstance =
|
|
50
|
-
|
|
51
|
-
interopDefault: true,
|
|
49
|
+
const jitiInstance = createJiti(process.cwd(), {
|
|
50
|
+
moduleCache: false,
|
|
52
51
|
transform: jitiBabelTransform
|
|
53
52
|
});
|
|
54
53
|
if (config === null) {
|
|
@@ -107,6 +106,11 @@ class Base {
|
|
|
107
106
|
if (config.name) {
|
|
108
107
|
const inheritedConfigPath = config.name === this.packageConfig.name ? P.resolve('src', 'index.js') : config.name;
|
|
109
108
|
let inheritedConfig = inheritedConfigPath ? jitiInstance(inheritedConfigPath) : undefined;
|
|
109
|
+
|
|
110
|
+
// I don't know why Jiti doesn't interopDefault here
|
|
111
|
+
if (inheritedConfig?.default) {
|
|
112
|
+
inheritedConfig = inheritedConfig.default;
|
|
113
|
+
}
|
|
110
114
|
if (typeof inheritedConfig === 'function') {
|
|
111
115
|
inheritedConfig = inheritedConfig(mergeConfigs(defaultConfig, config));
|
|
112
116
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.14",
|
|
4
4
|
"description": "Base package for projects.",
|
|
5
5
|
"repository": "dword-design/base",
|
|
6
6
|
"funding": "https://github.com/sponsors/dword-design",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"husky": "^8.0.3",
|
|
64
64
|
"ignore": "^5.3.2",
|
|
65
65
|
"is-ci": "^3.0.1",
|
|
66
|
-
"jiti": "^
|
|
66
|
+
"jiti": "^2.4.2",
|
|
67
67
|
"make-cli": "^4.0.0",
|
|
68
68
|
"mocha": "^10.8.2",
|
|
69
69
|
"mocha-spec-reporter-with-file-names": "npm:@dword-design/mocha-spec-reporter-with-file-names@^0.0.1",
|