@kitschpatrol/mdat-config 5.0.8 → 5.2.0

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/bin/cli.js +10 -1
  2. package/package.json +3 -2
package/bin/cli.js CHANGED
@@ -627,6 +627,7 @@ var source_default = chalk;
627
627
 
628
628
  // ../../src/command-builder.ts
629
629
  import { cosmiconfig } from "cosmiconfig";
630
+ import { TypeScriptLoader as typeScriptLoader } from "cosmiconfig-typescript-loader";
630
631
  import { execa } from "execa";
631
632
  import fse2 from "fs-extra";
632
633
  import fs3 from "node:fs";
@@ -5551,7 +5552,7 @@ var Yargs = YargsFactory(esm_default);
5551
5552
  var yargs_default = Yargs;
5552
5553
 
5553
5554
  // ../../package.json
5554
- var version = "5.0.8";
5555
+ var version = "5.2.0";
5555
5556
 
5556
5557
  // ../../src/execa-utilities.ts
5557
5558
  function isErrorExecaError(error) {
@@ -6173,6 +6174,14 @@ async function buildCommands(commandDefinition2) {
6173
6174
  }
6174
6175
  async function getCosmiconfigResult(configName) {
6175
6176
  const explorer = cosmiconfig(configName, {
6177
+ loaders: {
6178
+ // Using the alternate typescript loader fixes ERR_MODULE_NOT_FOUND errors
6179
+ // in configuration files that import modules via a path
6180
+ // https://github.com/cosmiconfig/cosmiconfig/issues/345
6181
+ // https://github.com/Codex-/cosmiconfig-typescript-loader
6182
+ // Same approach taken in mdat's implementation...
6183
+ ".ts": typeScriptLoader()
6184
+ },
6176
6185
  searchStrategy: "project"
6177
6186
  // Alt approach?
6178
6187
  // searchStrategy: 'global',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/mdat-config",
3
- "version": "5.0.8",
3
+ "version": "5.2.0",
4
4
  "description": "MDAT configuration for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
@@ -45,11 +45,12 @@
45
45
  "dependencies": {
46
46
  "@pinojs/json-colorizer": "^4.0.0",
47
47
  "cosmiconfig": "^9.0.0",
48
+ "cosmiconfig-typescript-loader": "^6.1.0",
48
49
  "execa": "^9.5.2",
49
50
  "find-workspaces": "^0.3.1",
50
51
  "fs-extra": "^11.3.0",
51
52
  "mdat": "^1.0.0",
52
- "prettier": "^3.5.2"
53
+ "prettier": "^3.5.3"
53
54
  },
54
55
  "engines": {
55
56
  "node": ">=20.9.0"