@kitschpatrol/shared-config 5.0.4 → 5.0.6

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 (3) hide show
  1. package/bin/cli.js +20 -15
  2. package/package.json +14 -14
  3. package/readme.md +11 -21
package/bin/cli.js CHANGED
@@ -5541,14 +5541,14 @@ var Yargs = YargsFactory(esm_default);
5541
5541
  var yargs_default = Yargs;
5542
5542
 
5543
5543
  // ../../package.json
5544
- var version = "5.0.4";
5544
+ var version = "5.0.6";
5545
5545
 
5546
- // ../../src/execa-utils.ts
5546
+ // ../../src/execa-utilities.ts
5547
5547
  function isErrorExecaError(error) {
5548
5548
  return error instanceof Error && "exitCode" in error && typeof error.exitCode === "number";
5549
5549
  }
5550
5550
 
5551
- // ../../src/json-utils.ts
5551
+ // ../../src/json-utilities.ts
5552
5552
  import jsonColorizer from "@pinojs/json-colorizer";
5553
5553
 
5554
5554
  // ../../node_modules/.pnpm/decircular@1.0.0/node_modules/decircular/index.js
@@ -5573,7 +5573,7 @@ function decircular(object) {
5573
5573
  return internalDecircular(object);
5574
5574
  }
5575
5575
 
5576
- // ../../src/json-utils.ts
5576
+ // ../../src/json-utilities.ts
5577
5577
  var import_deepmerge = __toESM(require_cjs(), 1);
5578
5578
 
5579
5579
  // ../../node_modules/.pnpm/json-stringify-pretty-compact@4.0.0/node_modules/json-stringify-pretty-compact/index.js
@@ -5655,7 +5655,7 @@ ${currentIndent}`
5655
5655
  }(passedObj, "", 0);
5656
5656
  }
5657
5657
 
5658
- // ../../src/json-utils.ts
5658
+ // ../../src/json-utilities.ts
5659
5659
  function stringify2(object) {
5660
5660
  return jsonColorizer(
5661
5661
  stringify(decircular(object), {
@@ -5692,7 +5692,7 @@ function merge(destination, source, options = { arrayMerge: combineMerge }) {
5692
5692
  return (0, import_deepmerge.default)(destination, source, options);
5693
5693
  }
5694
5694
 
5695
- // ../../src/path-utils.ts
5695
+ // ../../src/path-utilities.ts
5696
5696
  import { findWorkspaces, findWorkspacesRoot } from "find-workspaces";
5697
5697
  import fse from "fs-extra";
5698
5698
  import path2 from "node:path";
@@ -5753,7 +5753,7 @@ function getCwdOverride(option) {
5753
5753
  return process.cwd();
5754
5754
  }
5755
5755
 
5756
- // ../../src/prettier-utils.ts
5756
+ // ../../src/prettier-utilities.ts
5757
5757
  import fs2 from "node:fs/promises";
5758
5758
  async function formatTextAndSaveFile(filePath, content) {
5759
5759
  try {
@@ -5776,7 +5776,7 @@ async function formatFileInPlace(filePath) {
5776
5776
  }
5777
5777
  }
5778
5778
 
5779
- // ../../src/stream-utils.ts
5779
+ // ../../src/stream-utilities.ts
5780
5780
  import { Transform } from "node:stream";
5781
5781
  function createStreamFilter(matcher) {
5782
5782
  return new Transform({
@@ -5813,7 +5813,7 @@ async function streamToString(stream) {
5813
5813
  });
5814
5814
  }
5815
5815
 
5816
- // ../../src/string-utils.ts
5816
+ // ../../src/string-utilities.ts
5817
5817
  function kebabCase(text) {
5818
5818
  return text.replaceAll(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g, (match) => "-" + match.toLowerCase());
5819
5819
  }
@@ -5879,10 +5879,15 @@ async function executeCliCommand(logStream, positionalArguments, optionFlags, co
5879
5879
  try {
5880
5880
  const subprocess = execa(command2.name, resolvedArguments, {
5881
5881
  cwd,
5882
- env: process.env.NO_COLOR === void 0 ? {
5882
+ env: {
5883
+ // Use colorful output unless NO_COLOR is set
5883
5884
  // eslint-disable-next-line ts/naming-convention
5884
- FORCE_COLOR: "true"
5885
- } : {},
5885
+ ...process.env.NO_COLOR === void 0 ? { FORCE_COLOR: "true" } : {},
5886
+ // Quiet node for when processing *.config.ts files in Node 22
5887
+ // Suppress experimental type stripping warning with --no-warnings
5888
+ // eslint-disable-next-line ts/naming-convention
5889
+ NODE_OPTIONS: "--experimental-strip-types --disable-warning=ExperimentalWarning"
5890
+ },
5886
5891
  preferLocal: true,
5887
5892
  reject: false,
5888
5893
  // Prevents throwing on non-zero exit code
@@ -6763,7 +6768,7 @@ var commandDefinition6 = {
6763
6768
  // ../repo-config/src/copyright-year-updater.ts
6764
6769
  import fs4 from "node:fs/promises";
6765
6770
 
6766
- // ../../src/node-utils.ts
6771
+ // ../../src/node-utilities.ts
6767
6772
  import process5 from "node:process";
6768
6773
  var originalEmit;
6769
6774
  function suppressNodeWarnings() {
@@ -6871,7 +6876,7 @@ var commandDefinition7 = {
6871
6876
  fix: {
6872
6877
  commands: [
6873
6878
  {
6874
- execute: copyrightYearLinterCommand,
6879
+ execute: copyrightYearFixerCommand,
6875
6880
  name: copyrightYearLinterCommand.name
6876
6881
  }
6877
6882
  ],
@@ -6884,7 +6889,7 @@ var commandDefinition7 = {
6884
6889
  lint: {
6885
6890
  commands: [
6886
6891
  {
6887
- execute: copyrightYearFixerCommand,
6892
+ execute: copyrightYearLinterCommand,
6888
6893
  name: copyrightYearFixerCommand.name
6889
6894
  }
6890
6895
  ],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kitschpatrol/shared-config",
3
- "version": "5.0.4",
4
- "description": "A collection of shared configurations for various linters and formatting tools. All managed as a single dependency, and invoked via a single command.",
3
+ "version": "5.0.6",
4
+ "description": "A collection of shared configurations, linters, and formatting tools for TypeScript projects. All managed as a single dependency, and invoked via a single CLI command.",
5
5
  "keywords": [
6
6
  "shared-config",
7
7
  "eslint-config",
@@ -41,23 +41,23 @@
41
41
  "execa": "^9.5.2",
42
42
  "find-workspaces": "^0.3.1",
43
43
  "fs-extra": "^11.3.0",
44
- "prettier": "^3.4.2",
45
- "@kitschpatrol/eslint-config": "5.0.4",
46
- "@kitschpatrol/knip-config": "5.0.4",
47
- "@kitschpatrol/mdat-config": "5.0.4",
48
- "@kitschpatrol/prettier-config": "5.0.4",
49
- "@kitschpatrol/remark-config": "5.0.4",
50
- "@kitschpatrol/stylelint-config": "5.0.4",
51
- "@kitschpatrol/cspell-config": "5.0.4",
52
- "@kitschpatrol/repo-config": "5.0.4",
53
- "@kitschpatrol/typescript-config": "5.0.4"
44
+ "prettier": "^3.5.2",
45
+ "@kitschpatrol/cspell-config": "5.0.6",
46
+ "@kitschpatrol/eslint-config": "5.0.6",
47
+ "@kitschpatrol/knip-config": "5.0.6",
48
+ "@kitschpatrol/mdat-config": "5.0.6",
49
+ "@kitschpatrol/repo-config": "5.0.6",
50
+ "@kitschpatrol/prettier-config": "5.0.6",
51
+ "@kitschpatrol/typescript-config": "5.0.6",
52
+ "@kitschpatrol/remark-config": "5.0.6",
53
+ "@kitschpatrol/stylelint-config": "5.0.6"
54
54
  },
55
55
  "devDependencies": {
56
56
  "chalk": "^5.4.1",
57
- "globby": "^14.0.2"
57
+ "globby": "^14.1.0"
58
58
  },
59
59
  "engines": {
60
- "node": ">=22.0.0",
60
+ "node": ">=22.13.1",
61
61
  "pnpm": ">=10.0.0"
62
62
  },
63
63
  "publishConfig": {
package/readme.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  <!-- description -->
17
17
 
18
- **A collection of shared configurations for various linters and formatting tools. All managed as a single dependency, and invoked via a single command.**
18
+ **A collection of shared configurations, linters, and formatting tools for TypeScript projects. All managed as a single dependency, and invoked via a single CLI command.**
19
19
 
20
20
  <!-- /description -->
21
21
 
@@ -98,17 +98,19 @@ kpi init
98
98
  Is the same as running:
99
99
 
100
100
  ```sh
101
- kpi-cspell init
101
+ kpi-repo init
102
+ kpi-mdat init
103
+ kpi-typescript init
102
104
  kpi-eslint init
105
+ kpi-stylelint init
106
+ kpi-cspell init
103
107
  kpi-knip init
104
- kpi-mdat init
105
- kpi-prettier init
106
108
  kpi-remark init
107
- kpi-repo init
108
- kpi-stylelint init
109
- kpi-typescript init
109
+ kpi-prettier init
110
110
  ```
111
111
 
112
+ _(Sub-commands are always executed in the above order.)_
113
+
112
114
  The top-level `kpi` command also takes care of some nuances in terms of _which_ sub-packages implement _which_ commands, and which subcommands take arguments.
113
115
 
114
116
  ## Getting started
@@ -127,7 +129,7 @@ Bootstrap a new project and open in VS Code:
127
129
  git init && pnpm init && pnpm pkg set type="module" && pnpm dlx @kitschpatrol/repo-config init && pnpm add -D @kitschpatrol/shared-config && pnpm kpi init --location package && pnpm i && code .
128
130
  ```
129
131
 
130
- The `--location package` flag will put as much configuration in your `package.json` as possible instead of in discrete files in your project root. This saves some clutter but can make it clunkier to extend or customize configurations. At any point, you can call `kpi init` with or without a `--location package` or `--location file` flag to reinitialize your configuration files in one place ot he other to.
132
+ The `--location package` flag will put as much configuration in your `package.json` as possible instead of in discrete files in your project root. This saves some clutter but can make it clunkier to extend or customize configurations. At any point, you can call `kpi init` with or without a `--location package` or `--location file` flag to reinitialize your configuration files in one place or the other.
131
133
 
132
134
  #### Quick add to an existing project:
133
135
 
@@ -341,19 +343,7 @@ To tell git to ignore changes to the placeholders, run `pnpm run bin-ignore`.
341
343
 
342
344
  For local development via `pnpm`, use `file:` dependency protocol instead of `link:`
343
345
 
344
- Something to investigate: An [approach](https://github.com/antfu/eslint-config#vs-code-support-auto-fix) to ignoring style rules in VS Code, and possibly migrate all style handling to eslint instead of prettier.
345
-
346
- Serial run order:
347
-
348
- 1. `kpi-repo`
349
- 2. `kpi-mdat`
350
- 3. `kpi-typescript`
351
- 4. `kpi-eslint`
352
- 5. `kpi-stylelint`
353
- 6. `kpi-cspell`
354
- 7. `kpi-knip`
355
- 8. `kpi-remark`
356
- 9. `kpi-prettier`
346
+ Something to investigate: An [approach](https://github.com/antfu/eslint-config#vs-code-support-auto-fix) to ignoring style rules in VS Code, and possibly migrate all style handling to ESLint instead of Prettier.
357
347
 
358
348
  ## Background
359
349