@kitschpatrol/mdat-config 5.0.7 → 5.1.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 +14 -5
  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.7";
5555
+ var version = "5.1.0";
5555
5556
 
5556
5557
  // ../../src/execa-utilities.ts
5557
5558
  function isErrorExecaError(error) {
@@ -5870,11 +5871,11 @@ async function executeCliCommand(logStream, positionalArguments, optionFlags, co
5870
5871
  env: {
5871
5872
  // Use colorful output unless NO_COLOR is set
5872
5873
  // eslint-disable-next-line ts/naming-convention
5873
- ...process.env.NO_COLOR === void 0 ? { FORCE_COLOR: "true" } : {},
5874
- // Quiet node for when processing *.config.ts files in Node 22
5874
+ ...process.env.NO_COLOR === void 0 ? { FORCE_COLOR: "true" } : {}
5875
+ // Quiet Node when processing *.config.ts files in Node 22
5875
5876
  // Suppress experimental type stripping warning with --no-warnings
5876
- // eslint-disable-next-line ts/naming-convention
5877
- NODE_OPTIONS: "--experimental-strip-types --disable-warning=ExperimentalWarning"
5877
+ // TODO what's the story here on Node 20?
5878
+ // NODE_OPTIONS: '--experimental-strip-types --disable-warning=ExperimentalWarning',
5878
5879
  },
5879
5880
  preferLocal: true,
5880
5881
  reject: false,
@@ -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.7",
3
+ "version": "5.1.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"