@dword-design/base 12.0.14 → 12.0.15

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 +4 -8
  2. 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 { createJiti } from 'jiti';
13
+ import jiti 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,8 +46,9 @@ const mergeConfigs = (...configs) => {
46
46
  class Base {
47
47
  constructor(config = null) {
48
48
  var _this$config$commands;
49
- const jitiInstance = createJiti(process.cwd(), {
50
- moduleCache: false,
49
+ const jitiInstance = jiti(process.cwd(), {
50
+ esmResolve: true,
51
+ interopDefault: true,
51
52
  transform: jitiBabelTransform
52
53
  });
53
54
  if (config === null) {
@@ -106,11 +107,6 @@ class Base {
106
107
  if (config.name) {
107
108
  const inheritedConfigPath = config.name === this.packageConfig.name ? P.resolve('src', 'index.js') : config.name;
108
109
  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
- }
114
110
  if (typeof inheritedConfig === 'function') {
115
111
  inheritedConfig = inheritedConfig(mergeConfigs(defaultConfig, config));
116
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base",
3
- "version": "12.0.14",
3
+ "version": "12.0.15",
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": "^2.4.2",
66
+ "jiti": "^1.21.7",
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",