@kitschpatrol/knip-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.
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) {
@@ -5856,11 +5857,11 @@ async function executeCliCommand(logStream, positionalArguments, optionFlags, co
5856
5857
  env: {
5857
5858
  // Use colorful output unless NO_COLOR is set
5858
5859
  // eslint-disable-next-line ts/naming-convention
5859
- ...process.env.NO_COLOR === void 0 ? { FORCE_COLOR: "true" } : {},
5860
- // Quiet node for when processing *.config.ts files in Node 22
5860
+ ...process.env.NO_COLOR === void 0 ? { FORCE_COLOR: "true" } : {}
5861
+ // Quiet Node when processing *.config.ts files in Node 22
5861
5862
  // Suppress experimental type stripping warning with --no-warnings
5862
- // eslint-disable-next-line ts/naming-convention
5863
- NODE_OPTIONS: "--experimental-strip-types --disable-warning=ExperimentalWarning"
5863
+ // TODO what's the story here on Node 20?
5864
+ // NODE_OPTIONS: '--experimental-strip-types --disable-warning=ExperimentalWarning',
5864
5865
  },
5865
5866
  preferLocal: true,
5866
5867
  reject: false,
@@ -6183,6 +6184,14 @@ function getCosmiconfigCommand(configName) {
6183
6184
  }
6184
6185
  async function getCosmiconfigResult(configName) {
6185
6186
  const explorer = cosmiconfig(configName, {
6187
+ loaders: {
6188
+ // Using the alternate typescript loader fixes ERR_MODULE_NOT_FOUND errors
6189
+ // in configuration files that import modules via a path
6190
+ // https://github.com/cosmiconfig/cosmiconfig/issues/345
6191
+ // https://github.com/Codex-/cosmiconfig-typescript-loader
6192
+ // Same approach taken in mdat's implementation...
6193
+ ".ts": typeScriptLoader()
6194
+ },
6186
6195
  searchStrategy: "project"
6187
6196
  // Alt approach?
6188
6197
  // searchStrategy: 'global',
@@ -6222,13 +6231,13 @@ var sharedKnipConfig = {
6222
6231
  "src/{index,cli,main}.{js,mjs,cjs,jsx,ts,tsx,mts,cts}!",
6223
6232
  // Customized entries
6224
6233
  "src/{bin,lib,cli}/{index,cli,main}.{js,mjs,cjs,jsx,ts,tsx,mts,cts}!",
6225
- "scripts/**/*.ts",
6226
- ".remarkrc.js",
6227
- "cspell.config.js",
6228
- "eslint.config.ts",
6229
- "mdat.config.ts",
6230
- "prettier.config.js",
6231
- "stylelint.config.js"
6234
+ "scripts/**/*.{js,mjs,cjs,ts,mts,cts}",
6235
+ ".remarkrc.{js,mjs,cjs,ts,mts,cts}",
6236
+ "cspell.config.{js,mjs,cjs,ts,mts,cts}",
6237
+ "eslint.config.{js,mjs,cjs,ts,mts,cts}",
6238
+ "mdat.config.{js,mjs,cjs,ts,mts,cts}",
6239
+ "prettier.config.{js,mjs,cjs,ts,mts,cts}",
6240
+ "stylelint.config.{js,mjs,cjs,ts,mts,cts}"
6232
6241
  ],
6233
6242
  // Allow calling of individual kpi binaries...
6234
6243
  ignoreBinaries: [
package/dist/index.js CHANGED
@@ -10,13 +10,13 @@ const sharedKnipConfig = {
10
10
  'src/{index,cli,main}.{js,mjs,cjs,jsx,ts,tsx,mts,cts}!',
11
11
  // Customized entries
12
12
  'src/{bin,lib,cli}/{index,cli,main}.{js,mjs,cjs,jsx,ts,tsx,mts,cts}!',
13
- 'scripts/**/*.ts',
14
- '.remarkrc.js',
15
- 'cspell.config.js',
16
- 'eslint.config.ts',
17
- 'mdat.config.ts',
18
- 'prettier.config.js',
19
- 'stylelint.config.js',
13
+ 'scripts/**/*.{js,mjs,cjs,ts,mts,cts}',
14
+ '.remarkrc.{js,mjs,cjs,ts,mts,cts}',
15
+ 'cspell.config.{js,mjs,cjs,ts,mts,cts}',
16
+ 'eslint.config.{js,mjs,cjs,ts,mts,cts}',
17
+ 'mdat.config.{js,mjs,cjs,ts,mts,cts}',
18
+ 'prettier.config.{js,mjs,cjs,ts,mts,cts}',
19
+ 'stylelint.config.{js,mjs,cjs,ts,mts,cts}',
20
20
  ],
21
21
  // Allow calling of individual kpi binaries...
22
22
  ignoreBinaries: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/knip-config",
3
- "version": "5.0.7",
3
+ "version": "5.1.0",
4
4
  "description": "Knip configuration for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
@@ -43,12 +43,13 @@
43
43
  "dependencies": {
44
44
  "@pinojs/json-colorizer": "^4.0.0",
45
45
  "cosmiconfig": "^9.0.0",
46
+ "cosmiconfig-typescript-loader": "^6.1.0",
46
47
  "deepmerge-ts": "^7.1.5",
47
48
  "execa": "^9.5.2",
48
49
  "find-workspaces": "^0.3.1",
49
50
  "fs-extra": "^11.3.0",
50
51
  "knip": "^5.45.0",
51
- "prettier": "^3.5.2"
52
+ "prettier": "^3.5.3"
52
53
  },
53
54
  "engines": {
54
55
  "node": ">=20.9.0"