@kitschpatrol/prettier-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 +4 -3
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) {
@@ -6187,6 +6188,14 @@ function getCosmiconfigCommand(configName) {
6187
6188
  }
6188
6189
  async function getCosmiconfigResult(configName) {
6189
6190
  const explorer = cosmiconfig(configName, {
6191
+ loaders: {
6192
+ // Using the alternate typescript loader fixes ERR_MODULE_NOT_FOUND errors
6193
+ // in configuration files that import modules via a path
6194
+ // https://github.com/cosmiconfig/cosmiconfig/issues/345
6195
+ // https://github.com/Codex-/cosmiconfig-typescript-loader
6196
+ // Same approach taken in mdat's implementation...
6197
+ ".ts": typeScriptLoader()
6198
+ },
6190
6199
  searchStrategy: "project"
6191
6200
  // Alt approach?
6192
6201
  // searchStrategy: 'global',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/prettier-config",
3
- "version": "5.0.8",
3
+ "version": "5.2.0",
4
4
  "description": "Prettier configuration for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
@@ -46,13 +46,14 @@
46
46
  "@prettier/plugin-ruby": "^4.0.4",
47
47
  "@prettier/plugin-xml": "^3.4.1",
48
48
  "cosmiconfig": "^9.0.0",
49
+ "cosmiconfig-typescript-loader": "^6.1.0",
49
50
  "deepmerge-ts": "^7.1.5",
50
51
  "execa": "^9.5.2",
51
52
  "find-workspaces": "^0.3.1",
52
53
  "fs-extra": "^11.3.0",
53
- "prettier": "^3.5.2",
54
+ "prettier": "^3.5.3",
54
55
  "prettier-plugin-astro": "^0.14.1",
55
- "prettier-plugin-packagejson": "^2.5.9",
56
+ "prettier-plugin-packagejson": "^2.5.10",
56
57
  "prettier-plugin-sh": "^0.15.0",
57
58
  "prettier-plugin-sql": "^0.18.1",
58
59
  "prettier-plugin-svelte": "^3.3.3",