@whoj/eslint-config 2.3.1 → 2.3.2

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/dist/cli.js +41 -2
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -112,7 +112,7 @@ import c2 from "picocolors";
112
112
  var package_default = {
113
113
  name: "@whoj/eslint-config",
114
114
  type: "module",
115
- version: "2.3.1",
115
+ version: "2.3.2",
116
116
  packageManager: "pnpm@10.2.1",
117
117
  description: "ESLint config",
118
118
  license: "MIT",
@@ -455,7 +455,46 @@ import path3 from "node:path";
455
455
  import fsp3 from "node:fs/promises";
456
456
  import process3 from "node:process";
457
457
  import * as p3 from "@clack/prompts";
458
- import { deepMergeWithArray } from "@antfu/utils";
458
+
459
+ // node_modules/.pnpm/@antfu+utils@8.1.0/node_modules/@antfu/utils/dist/index.mjs
460
+ var toString = (v) => Object.prototype.toString.call(v);
461
+ var isObject = (val) => toString(val) === "[object Object]";
462
+ function objectKeys(obj) {
463
+ return Object.keys(obj);
464
+ }
465
+ function deepMergeWithArray(target, ...sources) {
466
+ if (!sources.length)
467
+ return target;
468
+ const source = sources.shift();
469
+ if (source === void 0)
470
+ return target;
471
+ if (Array.isArray(target) && Array.isArray(source))
472
+ target.push(...source);
473
+ if (isMergableObject(target) && isMergableObject(source)) {
474
+ objectKeys(source).forEach((key) => {
475
+ if (key === "__proto__" || key === "constructor" || key === "prototype")
476
+ return;
477
+ if (Array.isArray(source[key])) {
478
+ if (!target[key])
479
+ target[key] = [];
480
+ deepMergeWithArray(target[key], source[key]);
481
+ } else if (isMergableObject(source[key])) {
482
+ if (!target[key])
483
+ target[key] = {};
484
+ deepMergeWithArray(target[key], source[key]);
485
+ } else {
486
+ target[key] = source[key];
487
+ }
488
+ });
489
+ }
490
+ return deepMergeWithArray(target, ...sources);
491
+ }
492
+ function isMergableObject(item) {
493
+ return isObject(item) && !Array.isArray(item);
494
+ }
495
+ var VOID = Symbol("p-void");
496
+
497
+ // src/cli/stages/update-jetbrains-idea.ts
459
498
  import { XMLParser, XMLBuilder } from "fast-xml-parser";
460
499
  async function updateJetbrainsIdea(result, flatConfigPath) {
461
500
  const cwd = process3.cwd();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whoj/eslint-config",
3
3
  "type": "module",
4
- "version": "2.3.1",
4
+ "version": "2.3.2",
5
5
  "description": "ESLint config",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/who-jonson/eslint-config",
@@ -118,7 +118,7 @@
118
118
  "typescript": "^5.7.3",
119
119
  "vitest": "^3.0.4",
120
120
  "vue": "^3.5.13",
121
- "@whoj/eslint-config": "2.3.1"
121
+ "@whoj/eslint-config": "2.3.2"
122
122
  },
123
123
  "resolutions": {
124
124
  "@eslint-community/eslint-utils": "^4.4.1",