@pobammer-ts/eslint-cease-nonsense-rules 1.9.0 → 1.9.1

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/dist/index.js CHANGED
@@ -25,7 +25,6 @@ var __export = (target, all) => {
25
25
  set: (newValue) => all[name] = () => newValue
26
26
  });
27
27
  };
28
- var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
29
28
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
30
29
 
31
30
  // node_modules/fast-diff/diff.js
@@ -7030,11 +7029,11 @@ var require_Visitor = __commonJS((exports) => {
7030
7029
  var PatternVisitor_1 = require_PatternVisitor();
7031
7030
  var VisitorBase_1 = require_VisitorBase();
7032
7031
 
7033
- class Visitor2 extends VisitorBase_1.VisitorBase {
7032
+ class Visitor extends VisitorBase_1.VisitorBase {
7034
7033
  #options;
7035
7034
  constructor(optionsOrVisitor) {
7036
- super(optionsOrVisitor instanceof Visitor2 ? optionsOrVisitor.#options : optionsOrVisitor);
7037
- this.#options = optionsOrVisitor instanceof Visitor2 ? optionsOrVisitor.#options : optionsOrVisitor;
7035
+ super(optionsOrVisitor instanceof Visitor ? optionsOrVisitor.#options : optionsOrVisitor);
7036
+ this.#options = optionsOrVisitor instanceof Visitor ? optionsOrVisitor.#options : optionsOrVisitor;
7038
7037
  }
7039
7038
  visitPattern(node, callback, options3 = { processRightHandNodes: false }) {
7040
7039
  const visitor = new PatternVisitor_1.PatternVisitor(this.#options, node, callback);
@@ -7044,7 +7043,7 @@ var require_Visitor = __commonJS((exports) => {
7044
7043
  }
7045
7044
  }
7046
7045
  }
7047
- exports.Visitor = Visitor2;
7046
+ exports.Visitor = Visitor;
7048
7047
  var VisitorBase_2 = require_VisitorBase();
7049
7048
  Object.defineProperty(exports, "VisitorBase", { enumerable: true, get: function() {
7050
7049
  return VisitorBase_2.VisitorBase;
@@ -8202,801 +8201,6 @@ var require_dist2 = __commonJS((exports) => {
8202
8201
  __exportStar(require_variable(), exports);
8203
8202
  });
8204
8203
 
8205
- // node_modules/@oxc-resolver/binding-linux-x64-musl/resolver.linux-x64-musl.node
8206
- var require_resolver_linux_x64_musl = __commonJS((exports, module3) => {
8207
- module3.exports = __require("./resolver.linux-x64-musl-gnkc267h.node");
8208
- });
8209
-
8210
- // node_modules/@oxc-resolver/binding-linux-x64-musl/package.json
8211
- var require_package = __commonJS((exports, module3) => {
8212
- module3.exports = {
8213
- name: "@oxc-resolver/binding-linux-x64-musl",
8214
- version: "11.16.0",
8215
- cpu: [
8216
- "x64"
8217
- ],
8218
- main: "resolver.linux-x64-musl.node",
8219
- files: [
8220
- "resolver.linux-x64-musl.node"
8221
- ],
8222
- description: "Oxc Resolver Node API",
8223
- homepage: "https://oxc.rs",
8224
- license: "MIT",
8225
- repository: {
8226
- type: "git",
8227
- url: "git+https://github.com/oxc-project/oxc-resolver.git"
8228
- },
8229
- publishConfig: {
8230
- registry: "https://registry.npmjs.org/",
8231
- access: "public"
8232
- },
8233
- os: [
8234
- "linux"
8235
- ],
8236
- libc: [
8237
- "musl"
8238
- ]
8239
- };
8240
- });
8241
-
8242
- // node_modules/@oxc-resolver/binding-linux-x64-gnu/resolver.linux-x64-gnu.node
8243
- var require_resolver_linux_x64_gnu = __commonJS((exports, module3) => {
8244
- module3.exports = __require("./resolver.linux-x64-gnu-hcjn12y1.node");
8245
- });
8246
-
8247
- // node_modules/@oxc-resolver/binding-linux-x64-gnu/package.json
8248
- var require_package2 = __commonJS((exports, module3) => {
8249
- module3.exports = {
8250
- name: "@oxc-resolver/binding-linux-x64-gnu",
8251
- version: "11.16.0",
8252
- cpu: [
8253
- "x64"
8254
- ],
8255
- main: "resolver.linux-x64-gnu.node",
8256
- files: [
8257
- "resolver.linux-x64-gnu.node"
8258
- ],
8259
- description: "Oxc Resolver Node API",
8260
- homepage: "https://oxc.rs",
8261
- license: "MIT",
8262
- repository: {
8263
- type: "git",
8264
- url: "git+https://github.com/oxc-project/oxc-resolver.git"
8265
- },
8266
- publishConfig: {
8267
- registry: "https://registry.npmjs.org/",
8268
- access: "public"
8269
- },
8270
- os: [
8271
- "linux"
8272
- ],
8273
- libc: [
8274
- "glibc"
8275
- ]
8276
- };
8277
- });
8278
-
8279
- // node_modules/oxc-resolver/package.json
8280
- var exports_package = {};
8281
- __export(exports_package, {
8282
- version: () => version,
8283
- scripts: () => scripts,
8284
- repository: () => repository,
8285
- publishConfig: () => publishConfig,
8286
- packageManager: () => packageManager,
8287
- optionalDependencies: () => optionalDependencies,
8288
- napi: () => napi,
8289
- name: () => name,
8290
- main: () => main,
8291
- license: () => license,
8292
- homepage: () => homepage,
8293
- funding: () => funding,
8294
- files: () => files,
8295
- devDependencies: () => devDependencies,
8296
- description: () => description,
8297
- default: () => package_default,
8298
- browser: () => browser
8299
- });
8300
- var name = "oxc-resolver", version = "11.16.0", description = "Oxc Resolver Node API", homepage = "https://oxc.rs", repository, funding, license = "MIT", main = "index.js", browser = "browser.js", files, scripts, devDependencies, napi, packageManager = "pnpm@10.25.0", publishConfig, optionalDependencies, package_default;
8301
- var init_package = __esm(() => {
8302
- repository = {
8303
- type: "git",
8304
- url: "git+https://github.com/oxc-project/oxc-resolver.git"
8305
- };
8306
- funding = {
8307
- url: "https://github.com/sponsors/Boshen"
8308
- };
8309
- files = [
8310
- "browser.js",
8311
- "index.d.ts",
8312
- "index.js",
8313
- "webcontainer-fallback.js"
8314
- ];
8315
- scripts = {
8316
- test: "vitest run -r ./napi",
8317
- "build:debug": "napi build --platform --manifest-path napi/Cargo.toml",
8318
- build: "pnpm run build:debug --features allocator --release",
8319
- "postbuild:debug": "node napi/patch.mjs",
8320
- fmt: "oxfmt"
8321
- };
8322
- devDependencies = {
8323
- "@napi-rs/cli": "^3.3.1",
8324
- "@napi-rs/wasm-runtime": "^1.0.7",
8325
- "@types/node": "^25.0.0",
8326
- emnapi: "^1.6.0",
8327
- oxfmt: "^0.18.0",
8328
- typescript: "^5.9.3",
8329
- vitest: "^4.0.0"
8330
- };
8331
- napi = {
8332
- binaryName: "resolver",
8333
- packageName: "@oxc-resolver/binding",
8334
- targets: [
8335
- "aarch64-apple-darwin",
8336
- "aarch64-linux-android",
8337
- "aarch64-pc-windows-msvc",
8338
- "aarch64-unknown-linux-gnu",
8339
- "aarch64-unknown-linux-musl",
8340
- "aarch64-unknown-linux-ohos",
8341
- "armv7-linux-androideabi",
8342
- "armv7-unknown-linux-gnueabihf",
8343
- "armv7-unknown-linux-musleabihf",
8344
- "i686-pc-windows-msvc",
8345
- "powerpc64le-unknown-linux-gnu",
8346
- "riscv64gc-unknown-linux-gnu",
8347
- "riscv64gc-unknown-linux-musl",
8348
- "s390x-unknown-linux-gnu",
8349
- "wasm32-wasip1-threads",
8350
- "x86_64-apple-darwin",
8351
- "x86_64-pc-windows-msvc",
8352
- "x86_64-unknown-freebsd",
8353
- "x86_64-unknown-linux-gnu",
8354
- "x86_64-unknown-linux-musl"
8355
- ],
8356
- wasm: {
8357
- browser: {
8358
- fs: true
8359
- }
8360
- }
8361
- };
8362
- publishConfig = {
8363
- access: "public",
8364
- registry: "https://registry.npmjs.org/"
8365
- };
8366
- optionalDependencies = {
8367
- "@oxc-resolver/binding-darwin-arm64": "11.16.0",
8368
- "@oxc-resolver/binding-android-arm64": "11.16.0",
8369
- "@oxc-resolver/binding-win32-arm64-msvc": "11.16.0",
8370
- "@oxc-resolver/binding-linux-arm64-gnu": "11.16.0",
8371
- "@oxc-resolver/binding-linux-arm64-musl": "11.16.0",
8372
- "@oxc-resolver/binding-openharmony-arm64": "11.16.0",
8373
- "@oxc-resolver/binding-android-arm-eabi": "11.16.0",
8374
- "@oxc-resolver/binding-linux-arm-gnueabihf": "11.16.0",
8375
- "@oxc-resolver/binding-linux-arm-musleabihf": "11.16.0",
8376
- "@oxc-resolver/binding-win32-ia32-msvc": "11.16.0",
8377
- "@oxc-resolver/binding-linux-ppc64-gnu": "11.16.0",
8378
- "@oxc-resolver/binding-linux-riscv64-gnu": "11.16.0",
8379
- "@oxc-resolver/binding-linux-riscv64-musl": "11.16.0",
8380
- "@oxc-resolver/binding-linux-s390x-gnu": "11.16.0",
8381
- "@oxc-resolver/binding-wasm32-wasi": "11.16.0",
8382
- "@oxc-resolver/binding-darwin-x64": "11.16.0",
8383
- "@oxc-resolver/binding-win32-x64-msvc": "11.16.0",
8384
- "@oxc-resolver/binding-freebsd-x64": "11.16.0",
8385
- "@oxc-resolver/binding-linux-x64-gnu": "11.16.0",
8386
- "@oxc-resolver/binding-linux-x64-musl": "11.16.0"
8387
- };
8388
- package_default = {
8389
- name,
8390
- version,
8391
- description,
8392
- homepage,
8393
- repository,
8394
- funding,
8395
- license,
8396
- main,
8397
- browser,
8398
- files,
8399
- scripts,
8400
- devDependencies,
8401
- napi,
8402
- packageManager,
8403
- publishConfig,
8404
- optionalDependencies
8405
- };
8406
- });
8407
-
8408
- // node_modules/oxc-resolver/webcontainer-fallback.js
8409
- var require_webcontainer_fallback = __commonJS((exports, module3) => {
8410
- var fs = __require("node:fs");
8411
- var childProcess = __require("node:child_process");
8412
- var pkg = JSON.parse(fs.readFileSync(__require.resolve("/home/runner/work/eslint-cease-nonsense-rules/eslint-cease-nonsense-rules/node_modules/oxc-resolver/package.json"), "utf-8"));
8413
- var version2 = pkg.version;
8414
- var baseDir = `/tmp/oxc-resolver-${version2}`;
8415
- var bindingEntry = `${baseDir}/node_modules/@oxc-resolver/binding-wasm32-wasi/resolver.wasi.cjs`;
8416
- if (!fs.existsSync(bindingEntry)) {
8417
- fs.rmSync(baseDir, { recursive: true, force: true });
8418
- fs.mkdirSync(baseDir, { recursive: true });
8419
- const bindingPkg = `@oxc-resolver/binding-wasm32-wasi@${version2}`;
8420
- console.log(`[oxc-resolver] Downloading ${bindingPkg} on WebContainer...`);
8421
- childProcess.execFileSync("pnpm", ["i", bindingPkg], {
8422
- cwd: baseDir,
8423
- stdio: "inherit"
8424
- });
8425
- }
8426
- module3.exports = __require(bindingEntry);
8427
- });
8428
-
8429
- // node_modules/oxc-resolver/index.js
8430
- var require_oxc_resolver = __commonJS((exports, module3) => {
8431
- var { readFileSync: readFileSync3 } = __require("node:fs");
8432
- var nativeBinding2 = null;
8433
- var loadErrors2 = [];
8434
- var isMusl2 = () => {
8435
- let musl = false;
8436
- if (process.platform === "linux") {
8437
- musl = isMuslFromFilesystem2();
8438
- if (musl === null) {
8439
- musl = isMuslFromReport2();
8440
- }
8441
- if (musl === null) {
8442
- musl = isMuslFromChildProcess2();
8443
- }
8444
- }
8445
- return musl;
8446
- };
8447
- var isFileMusl2 = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
8448
- var isMuslFromFilesystem2 = () => {
8449
- try {
8450
- return readFileSync3("/usr/bin/ldd", "utf-8").includes("musl");
8451
- } catch {
8452
- return null;
8453
- }
8454
- };
8455
- var isMuslFromReport2 = () => {
8456
- let report = null;
8457
- if (typeof process.report?.getReport === "function") {
8458
- process.report.excludeNetwork = true;
8459
- report = process.report.getReport();
8460
- }
8461
- if (!report) {
8462
- return null;
8463
- }
8464
- if (report.header && report.header.glibcVersionRuntime) {
8465
- return false;
8466
- }
8467
- if (Array.isArray(report.sharedObjects)) {
8468
- if (report.sharedObjects.some(isFileMusl2)) {
8469
- return true;
8470
- }
8471
- }
8472
- return false;
8473
- };
8474
- var isMuslFromChildProcess2 = () => {
8475
- try {
8476
- return __require("child_process").execSync("ldd --version", { encoding: "utf8" }).includes("musl");
8477
- } catch (e) {
8478
- return false;
8479
- }
8480
- };
8481
- function requireNative2() {
8482
- if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
8483
- try {
8484
- return __require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
8485
- } catch (err) {
8486
- loadErrors2.push(err);
8487
- }
8488
- } else if (process.platform === "android") {
8489
- if (process.arch === "arm64") {
8490
- try {
8491
- return (()=>{throw new Error("Cannot require module "+"./resolver.android-arm64.node");})();
8492
- } catch (e) {
8493
- loadErrors2.push(e);
8494
- }
8495
- try {
8496
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-android-arm64");})();
8497
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-android-arm64/package.json");})().version;
8498
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8499
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8500
- }
8501
- return binding;
8502
- } catch (e) {
8503
- loadErrors2.push(e);
8504
- }
8505
- } else if (process.arch === "arm") {
8506
- try {
8507
- return (()=>{throw new Error("Cannot require module "+"./resolver.android-arm-eabi.node");})();
8508
- } catch (e) {
8509
- loadErrors2.push(e);
8510
- }
8511
- try {
8512
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-android-arm-eabi");})();
8513
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-android-arm-eabi/package.json");})().version;
8514
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8515
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8516
- }
8517
- return binding;
8518
- } catch (e) {
8519
- loadErrors2.push(e);
8520
- }
8521
- } else {
8522
- loadErrors2.push(new Error(`Unsupported architecture on Android ${process.arch}`));
8523
- }
8524
- } else if (process.platform === "win32") {
8525
- if (process.arch === "x64") {
8526
- if (process.config?.variables?.shlib_suffix === "dll.a" || process.config?.variables?.node_target_type === "shared_library") {
8527
- try {
8528
- return (()=>{throw new Error("Cannot require module "+"./resolver.win32-x64-gnu.node");})();
8529
- } catch (e) {
8530
- loadErrors2.push(e);
8531
- }
8532
- try {
8533
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-win32-x64-gnu");})();
8534
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-win32-x64-gnu/package.json");})().version;
8535
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8536
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8537
- }
8538
- return binding;
8539
- } catch (e) {
8540
- loadErrors2.push(e);
8541
- }
8542
- } else {
8543
- try {
8544
- return (()=>{throw new Error("Cannot require module "+"./resolver.win32-x64-msvc.node");})();
8545
- } catch (e) {
8546
- loadErrors2.push(e);
8547
- }
8548
- try {
8549
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-win32-x64-msvc");})();
8550
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-win32-x64-msvc/package.json");})().version;
8551
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8552
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8553
- }
8554
- return binding;
8555
- } catch (e) {
8556
- loadErrors2.push(e);
8557
- }
8558
- }
8559
- } else if (process.arch === "ia32") {
8560
- try {
8561
- return (()=>{throw new Error("Cannot require module "+"./resolver.win32-ia32-msvc.node");})();
8562
- } catch (e) {
8563
- loadErrors2.push(e);
8564
- }
8565
- try {
8566
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-win32-ia32-msvc");})();
8567
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-win32-ia32-msvc/package.json");})().version;
8568
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8569
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8570
- }
8571
- return binding;
8572
- } catch (e) {
8573
- loadErrors2.push(e);
8574
- }
8575
- } else if (process.arch === "arm64") {
8576
- try {
8577
- return (()=>{throw new Error("Cannot require module "+"./resolver.win32-arm64-msvc.node");})();
8578
- } catch (e) {
8579
- loadErrors2.push(e);
8580
- }
8581
- try {
8582
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-win32-arm64-msvc");})();
8583
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-win32-arm64-msvc/package.json");})().version;
8584
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8585
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8586
- }
8587
- return binding;
8588
- } catch (e) {
8589
- loadErrors2.push(e);
8590
- }
8591
- } else {
8592
- loadErrors2.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
8593
- }
8594
- } else if (process.platform === "darwin") {
8595
- try {
8596
- return (()=>{throw new Error("Cannot require module "+"./resolver.darwin-universal.node");})();
8597
- } catch (e) {
8598
- loadErrors2.push(e);
8599
- }
8600
- try {
8601
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-darwin-universal");})();
8602
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-darwin-universal/package.json");})().version;
8603
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8604
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8605
- }
8606
- return binding;
8607
- } catch (e) {
8608
- loadErrors2.push(e);
8609
- }
8610
- if (process.arch === "x64") {
8611
- try {
8612
- return (()=>{throw new Error("Cannot require module "+"./resolver.darwin-x64.node");})();
8613
- } catch (e) {
8614
- loadErrors2.push(e);
8615
- }
8616
- try {
8617
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-darwin-x64");})();
8618
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-darwin-x64/package.json");})().version;
8619
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8620
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8621
- }
8622
- return binding;
8623
- } catch (e) {
8624
- loadErrors2.push(e);
8625
- }
8626
- } else if (process.arch === "arm64") {
8627
- try {
8628
- return (()=>{throw new Error("Cannot require module "+"./resolver.darwin-arm64.node");})();
8629
- } catch (e) {
8630
- loadErrors2.push(e);
8631
- }
8632
- try {
8633
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-darwin-arm64");})();
8634
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-darwin-arm64/package.json");})().version;
8635
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8636
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8637
- }
8638
- return binding;
8639
- } catch (e) {
8640
- loadErrors2.push(e);
8641
- }
8642
- } else {
8643
- loadErrors2.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
8644
- }
8645
- } else if (process.platform === "freebsd") {
8646
- if (process.arch === "x64") {
8647
- try {
8648
- return (()=>{throw new Error("Cannot require module "+"./resolver.freebsd-x64.node");})();
8649
- } catch (e) {
8650
- loadErrors2.push(e);
8651
- }
8652
- try {
8653
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-freebsd-x64");})();
8654
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-freebsd-x64/package.json");})().version;
8655
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8656
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8657
- }
8658
- return binding;
8659
- } catch (e) {
8660
- loadErrors2.push(e);
8661
- }
8662
- } else if (process.arch === "arm64") {
8663
- try {
8664
- return (()=>{throw new Error("Cannot require module "+"./resolver.freebsd-arm64.node");})();
8665
- } catch (e) {
8666
- loadErrors2.push(e);
8667
- }
8668
- try {
8669
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-freebsd-arm64");})();
8670
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-freebsd-arm64/package.json");})().version;
8671
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8672
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8673
- }
8674
- return binding;
8675
- } catch (e) {
8676
- loadErrors2.push(e);
8677
- }
8678
- } else {
8679
- loadErrors2.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
8680
- }
8681
- } else if (process.platform === "linux") {
8682
- if (process.arch === "x64") {
8683
- if (isMusl2()) {
8684
- try {
8685
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-x64-musl.node");})();
8686
- } catch (e) {
8687
- loadErrors2.push(e);
8688
- }
8689
- try {
8690
- const binding = require_resolver_linux_x64_musl();
8691
- const bindingPackageVersion = require_package().version;
8692
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8693
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8694
- }
8695
- return binding;
8696
- } catch (e) {
8697
- loadErrors2.push(e);
8698
- }
8699
- } else {
8700
- try {
8701
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-x64-gnu.node");})();
8702
- } catch (e) {
8703
- loadErrors2.push(e);
8704
- }
8705
- try {
8706
- const binding = require_resolver_linux_x64_gnu();
8707
- const bindingPackageVersion = require_package2().version;
8708
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8709
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8710
- }
8711
- return binding;
8712
- } catch (e) {
8713
- loadErrors2.push(e);
8714
- }
8715
- }
8716
- } else if (process.arch === "arm64") {
8717
- if (isMusl2()) {
8718
- try {
8719
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-arm64-musl.node");})();
8720
- } catch (e) {
8721
- loadErrors2.push(e);
8722
- }
8723
- try {
8724
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-arm64-musl");})();
8725
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-arm64-musl/package.json");})().version;
8726
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8727
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8728
- }
8729
- return binding;
8730
- } catch (e) {
8731
- loadErrors2.push(e);
8732
- }
8733
- } else {
8734
- try {
8735
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-arm64-gnu.node");})();
8736
- } catch (e) {
8737
- loadErrors2.push(e);
8738
- }
8739
- try {
8740
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-arm64-gnu");})();
8741
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-arm64-gnu/package.json");})().version;
8742
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8743
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8744
- }
8745
- return binding;
8746
- } catch (e) {
8747
- loadErrors2.push(e);
8748
- }
8749
- }
8750
- } else if (process.arch === "arm") {
8751
- if (isMusl2()) {
8752
- try {
8753
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-arm-musleabihf.node");})();
8754
- } catch (e) {
8755
- loadErrors2.push(e);
8756
- }
8757
- try {
8758
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-arm-musleabihf");})();
8759
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-arm-musleabihf/package.json");})().version;
8760
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8761
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8762
- }
8763
- return binding;
8764
- } catch (e) {
8765
- loadErrors2.push(e);
8766
- }
8767
- } else {
8768
- try {
8769
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-arm-gnueabihf.node");})();
8770
- } catch (e) {
8771
- loadErrors2.push(e);
8772
- }
8773
- try {
8774
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-arm-gnueabihf");})();
8775
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-arm-gnueabihf/package.json");})().version;
8776
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8777
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8778
- }
8779
- return binding;
8780
- } catch (e) {
8781
- loadErrors2.push(e);
8782
- }
8783
- }
8784
- } else if (process.arch === "loong64") {
8785
- if (isMusl2()) {
8786
- try {
8787
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-loong64-musl.node");})();
8788
- } catch (e) {
8789
- loadErrors2.push(e);
8790
- }
8791
- try {
8792
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-loong64-musl");})();
8793
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-loong64-musl/package.json");})().version;
8794
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8795
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8796
- }
8797
- return binding;
8798
- } catch (e) {
8799
- loadErrors2.push(e);
8800
- }
8801
- } else {
8802
- try {
8803
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-loong64-gnu.node");})();
8804
- } catch (e) {
8805
- loadErrors2.push(e);
8806
- }
8807
- try {
8808
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-loong64-gnu");})();
8809
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-loong64-gnu/package.json");})().version;
8810
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8811
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8812
- }
8813
- return binding;
8814
- } catch (e) {
8815
- loadErrors2.push(e);
8816
- }
8817
- }
8818
- } else if (process.arch === "riscv64") {
8819
- if (isMusl2()) {
8820
- try {
8821
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-riscv64-musl.node");})();
8822
- } catch (e) {
8823
- loadErrors2.push(e);
8824
- }
8825
- try {
8826
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-riscv64-musl");})();
8827
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-riscv64-musl/package.json");})().version;
8828
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8829
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8830
- }
8831
- return binding;
8832
- } catch (e) {
8833
- loadErrors2.push(e);
8834
- }
8835
- } else {
8836
- try {
8837
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-riscv64-gnu.node");})();
8838
- } catch (e) {
8839
- loadErrors2.push(e);
8840
- }
8841
- try {
8842
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-riscv64-gnu");})();
8843
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-riscv64-gnu/package.json");})().version;
8844
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8845
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8846
- }
8847
- return binding;
8848
- } catch (e) {
8849
- loadErrors2.push(e);
8850
- }
8851
- }
8852
- } else if (process.arch === "ppc64") {
8853
- try {
8854
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-ppc64-gnu.node");})();
8855
- } catch (e) {
8856
- loadErrors2.push(e);
8857
- }
8858
- try {
8859
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-ppc64-gnu");})();
8860
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-ppc64-gnu/package.json");})().version;
8861
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8862
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8863
- }
8864
- return binding;
8865
- } catch (e) {
8866
- loadErrors2.push(e);
8867
- }
8868
- } else if (process.arch === "s390x") {
8869
- try {
8870
- return (()=>{throw new Error("Cannot require module "+"./resolver.linux-s390x-gnu.node");})();
8871
- } catch (e) {
8872
- loadErrors2.push(e);
8873
- }
8874
- try {
8875
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-s390x-gnu");})();
8876
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-linux-s390x-gnu/package.json");})().version;
8877
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8878
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8879
- }
8880
- return binding;
8881
- } catch (e) {
8882
- loadErrors2.push(e);
8883
- }
8884
- } else {
8885
- loadErrors2.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
8886
- }
8887
- } else if (process.platform === "openharmony") {
8888
- if (process.arch === "arm64") {
8889
- try {
8890
- return (()=>{throw new Error("Cannot require module "+"./resolver.openharmony-arm64.node");})();
8891
- } catch (e) {
8892
- loadErrors2.push(e);
8893
- }
8894
- try {
8895
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-openharmony-arm64");})();
8896
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-openharmony-arm64/package.json");})().version;
8897
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8898
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8899
- }
8900
- return binding;
8901
- } catch (e) {
8902
- loadErrors2.push(e);
8903
- }
8904
- } else if (process.arch === "x64") {
8905
- try {
8906
- return (()=>{throw new Error("Cannot require module "+"./resolver.openharmony-x64.node");})();
8907
- } catch (e) {
8908
- loadErrors2.push(e);
8909
- }
8910
- try {
8911
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-openharmony-x64");})();
8912
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-openharmony-x64/package.json");})().version;
8913
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8914
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8915
- }
8916
- return binding;
8917
- } catch (e) {
8918
- loadErrors2.push(e);
8919
- }
8920
- } else if (process.arch === "arm") {
8921
- try {
8922
- return (()=>{throw new Error("Cannot require module "+"./resolver.openharmony-arm.node");})();
8923
- } catch (e) {
8924
- loadErrors2.push(e);
8925
- }
8926
- try {
8927
- const binding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-openharmony-arm");})();
8928
- const bindingPackageVersion = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-openharmony-arm/package.json");})().version;
8929
- if (bindingPackageVersion !== "11.16.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
8930
- throw new Error(`Native binding package version mismatch, expected 11.16.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
8931
- }
8932
- return binding;
8933
- } catch (e) {
8934
- loadErrors2.push(e);
8935
- }
8936
- } else {
8937
- loadErrors2.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
8938
- }
8939
- } else {
8940
- loadErrors2.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
8941
- }
8942
- }
8943
- nativeBinding2 = requireNative2();
8944
- if (!nativeBinding2 || process.env.NAPI_RS_FORCE_WASI) {
8945
- let wasiBinding = null;
8946
- let wasiBindingError = null;
8947
- try {
8948
- wasiBinding = (()=>{throw new Error("Cannot require module "+"./resolver.wasi.cjs");})();
8949
- nativeBinding2 = wasiBinding;
8950
- } catch (err) {
8951
- if (process.env.NAPI_RS_FORCE_WASI) {
8952
- wasiBindingError = err;
8953
- }
8954
- }
8955
- if (!nativeBinding2) {
8956
- try {
8957
- wasiBinding = (()=>{throw new Error("Cannot require module "+"@oxc-resolver/binding-wasm32-wasi");})();
8958
- nativeBinding2 = wasiBinding;
8959
- } catch (err) {
8960
- if (process.env.NAPI_RS_FORCE_WASI) {
8961
- wasiBindingError.cause = err;
8962
- loadErrors2.push(err);
8963
- }
8964
- }
8965
- }
8966
- if (process.env.NAPI_RS_FORCE_WASI === "error" && !wasiBinding) {
8967
- const error2 = new Error("WASI binding not found and NAPI_RS_FORCE_WASI is set to error");
8968
- error2.cause = wasiBindingError;
8969
- throw error2;
8970
- }
8971
- }
8972
- if (!nativeBinding2 && globalThis.process?.versions?.["webcontainer"]) {
8973
- try {
8974
- nativeBinding2 = require_webcontainer_fallback();
8975
- } catch (err) {
8976
- loadErrors2.push(err);
8977
- }
8978
- }
8979
- if (!nativeBinding2) {
8980
- if (loadErrors2.length > 0) {
8981
- throw new Error(`Cannot find native binding. ` + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + "Please try `npm i` again after removing both package-lock.json and node_modules directory.", {
8982
- cause: loadErrors2.reduce((err, cur) => {
8983
- cur.cause = err;
8984
- return cur;
8985
- })
8986
- });
8987
- }
8988
- throw new Error(`Failed to load native binding`);
8989
- }
8990
- module3.exports = nativeBinding2;
8991
- module3.exports.ResolverFactory = nativeBinding2.ResolverFactory;
8992
- module3.exports.EnforceExtension = nativeBinding2.EnforceExtension;
8993
- module3.exports.ModuleType = nativeBinding2.ModuleType;
8994
- module3.exports.sync = nativeBinding2.sync;
8995
- if (process.versions.pnp) {
8996
- process.env.OXC_RESOLVER_YARN_PNP = "1";
8997
- }
8998
- });
8999
-
9000
8204
  // src/rules/ban-instances.ts
9001
8205
  import { TSESTree } from "@typescript-eslint/types";
9002
8206
 
@@ -18472,894 +17676,7 @@ var no_color3_constructor_default = noColor3Constructor;
18472
17676
 
18473
17677
  // src/rules/no-commented-code.ts
18474
17678
  import path from "node:path";
18475
-
18476
- // node_modules/oxc-parser/src-js/index.js
18477
- import { createRequire as createRequire4 } from "node:module";
18478
-
18479
- // node_modules/oxc-parser/src-js/bindings.js
18480
- import { createRequire as createRequire2 } from "node:module";
18481
- var require2 = createRequire2(import.meta.url);
18482
- var __dirname2 = new URL(".", import.meta.url).pathname;
18483
- var { readFileSync: readFileSync2 } = require2("node:fs");
18484
- var nativeBinding = null;
18485
- var loadErrors = [];
18486
- var isMusl = () => {
18487
- let musl = false;
18488
- if (process.platform === "linux") {
18489
- musl = isMuslFromFilesystem();
18490
- if (musl === null) {
18491
- musl = isMuslFromReport();
18492
- }
18493
- if (musl === null) {
18494
- musl = isMuslFromChildProcess();
18495
- }
18496
- }
18497
- return musl;
18498
- };
18499
- var isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
18500
- var isMuslFromFilesystem = () => {
18501
- try {
18502
- return readFileSync2("/usr/bin/ldd", "utf-8").includes("musl");
18503
- } catch {
18504
- return null;
18505
- }
18506
- };
18507
- var isMuslFromReport = () => {
18508
- let report = null;
18509
- if (typeof process.report?.getReport === "function") {
18510
- process.report.excludeNetwork = true;
18511
- report = process.report.getReport();
18512
- }
18513
- if (!report) {
18514
- return null;
18515
- }
18516
- if (report.header && report.header.glibcVersionRuntime) {
18517
- return false;
18518
- }
18519
- if (Array.isArray(report.sharedObjects)) {
18520
- if (report.sharedObjects.some(isFileMusl)) {
18521
- return true;
18522
- }
18523
- }
18524
- return false;
18525
- };
18526
- var isMuslFromChildProcess = () => {
18527
- try {
18528
- return require2("child_process").execSync("ldd --version", { encoding: "utf8" }).includes("musl");
18529
- } catch (e) {
18530
- return false;
18531
- }
18532
- };
18533
- function requireNative() {
18534
- if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
18535
- try {
18536
- return require2(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
18537
- } catch (err) {
18538
- loadErrors.push(err);
18539
- }
18540
- } else if (process.platform === "android") {
18541
- if (process.arch === "arm64") {
18542
- try {
18543
- return require2("./parser.android-arm64.node");
18544
- } catch (e) {
18545
- loadErrors.push(e);
18546
- }
18547
- try {
18548
- const binding = require2("@oxc-parser/binding-android-arm64");
18549
- const bindingPackageVersion = require2("@oxc-parser/binding-android-arm64/package.json").version;
18550
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18551
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18552
- }
18553
- return binding;
18554
- } catch (e) {
18555
- loadErrors.push(e);
18556
- }
18557
- } else if (process.arch === "arm") {
18558
- try {
18559
- return require2("./parser.android-arm-eabi.node");
18560
- } catch (e) {
18561
- loadErrors.push(e);
18562
- }
18563
- try {
18564
- const binding = require2("@oxc-parser/binding-android-arm-eabi");
18565
- const bindingPackageVersion = require2("@oxc-parser/binding-android-arm-eabi/package.json").version;
18566
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18567
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18568
- }
18569
- return binding;
18570
- } catch (e) {
18571
- loadErrors.push(e);
18572
- }
18573
- } else {
18574
- loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
18575
- }
18576
- } else if (process.platform === "win32") {
18577
- if (process.arch === "x64") {
18578
- if (process.config?.variables?.shlib_suffix === "dll.a" || process.config?.variables?.node_target_type === "shared_library") {
18579
- try {
18580
- return require2("./parser.win32-x64-gnu.node");
18581
- } catch (e) {
18582
- loadErrors.push(e);
18583
- }
18584
- try {
18585
- const binding = require2("@oxc-parser/binding-win32-x64-gnu");
18586
- const bindingPackageVersion = require2("@oxc-parser/binding-win32-x64-gnu/package.json").version;
18587
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18588
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18589
- }
18590
- return binding;
18591
- } catch (e) {
18592
- loadErrors.push(e);
18593
- }
18594
- } else {
18595
- try {
18596
- return require2("./parser.win32-x64-msvc.node");
18597
- } catch (e) {
18598
- loadErrors.push(e);
18599
- }
18600
- try {
18601
- const binding = require2("@oxc-parser/binding-win32-x64-msvc");
18602
- const bindingPackageVersion = require2("@oxc-parser/binding-win32-x64-msvc/package.json").version;
18603
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18604
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18605
- }
18606
- return binding;
18607
- } catch (e) {
18608
- loadErrors.push(e);
18609
- }
18610
- }
18611
- } else if (process.arch === "ia32") {
18612
- try {
18613
- return require2("./parser.win32-ia32-msvc.node");
18614
- } catch (e) {
18615
- loadErrors.push(e);
18616
- }
18617
- try {
18618
- const binding = require2("@oxc-parser/binding-win32-ia32-msvc");
18619
- const bindingPackageVersion = require2("@oxc-parser/binding-win32-ia32-msvc/package.json").version;
18620
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18621
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18622
- }
18623
- return binding;
18624
- } catch (e) {
18625
- loadErrors.push(e);
18626
- }
18627
- } else if (process.arch === "arm64") {
18628
- try {
18629
- return require2("./parser.win32-arm64-msvc.node");
18630
- } catch (e) {
18631
- loadErrors.push(e);
18632
- }
18633
- try {
18634
- const binding = require2("@oxc-parser/binding-win32-arm64-msvc");
18635
- const bindingPackageVersion = require2("@oxc-parser/binding-win32-arm64-msvc/package.json").version;
18636
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18637
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18638
- }
18639
- return binding;
18640
- } catch (e) {
18641
- loadErrors.push(e);
18642
- }
18643
- } else {
18644
- loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
18645
- }
18646
- } else if (process.platform === "darwin") {
18647
- try {
18648
- return require2("./parser.darwin-universal.node");
18649
- } catch (e) {
18650
- loadErrors.push(e);
18651
- }
18652
- try {
18653
- const binding = require2("@oxc-parser/binding-darwin-universal");
18654
- const bindingPackageVersion = require2("@oxc-parser/binding-darwin-universal/package.json").version;
18655
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18656
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18657
- }
18658
- return binding;
18659
- } catch (e) {
18660
- loadErrors.push(e);
18661
- }
18662
- if (process.arch === "x64") {
18663
- try {
18664
- return require2("./parser.darwin-x64.node");
18665
- } catch (e) {
18666
- loadErrors.push(e);
18667
- }
18668
- try {
18669
- const binding = require2("@oxc-parser/binding-darwin-x64");
18670
- const bindingPackageVersion = require2("@oxc-parser/binding-darwin-x64/package.json").version;
18671
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18672
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18673
- }
18674
- return binding;
18675
- } catch (e) {
18676
- loadErrors.push(e);
18677
- }
18678
- } else if (process.arch === "arm64") {
18679
- try {
18680
- return require2("./parser.darwin-arm64.node");
18681
- } catch (e) {
18682
- loadErrors.push(e);
18683
- }
18684
- try {
18685
- const binding = require2("@oxc-parser/binding-darwin-arm64");
18686
- const bindingPackageVersion = require2("@oxc-parser/binding-darwin-arm64/package.json").version;
18687
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18688
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18689
- }
18690
- return binding;
18691
- } catch (e) {
18692
- loadErrors.push(e);
18693
- }
18694
- } else {
18695
- loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
18696
- }
18697
- } else if (process.platform === "freebsd") {
18698
- if (process.arch === "x64") {
18699
- try {
18700
- return require2("./parser.freebsd-x64.node");
18701
- } catch (e) {
18702
- loadErrors.push(e);
18703
- }
18704
- try {
18705
- const binding = require2("@oxc-parser/binding-freebsd-x64");
18706
- const bindingPackageVersion = require2("@oxc-parser/binding-freebsd-x64/package.json").version;
18707
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18708
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18709
- }
18710
- return binding;
18711
- } catch (e) {
18712
- loadErrors.push(e);
18713
- }
18714
- } else if (process.arch === "arm64") {
18715
- try {
18716
- return require2("./parser.freebsd-arm64.node");
18717
- } catch (e) {
18718
- loadErrors.push(e);
18719
- }
18720
- try {
18721
- const binding = require2("@oxc-parser/binding-freebsd-arm64");
18722
- const bindingPackageVersion = require2("@oxc-parser/binding-freebsd-arm64/package.json").version;
18723
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18724
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18725
- }
18726
- return binding;
18727
- } catch (e) {
18728
- loadErrors.push(e);
18729
- }
18730
- } else {
18731
- loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
18732
- }
18733
- } else if (process.platform === "linux") {
18734
- if (process.arch === "x64") {
18735
- if (isMusl()) {
18736
- try {
18737
- return require2("./parser.linux-x64-musl.node");
18738
- } catch (e) {
18739
- loadErrors.push(e);
18740
- }
18741
- try {
18742
- const binding = require2("@oxc-parser/binding-linux-x64-musl");
18743
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-x64-musl/package.json").version;
18744
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18745
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18746
- }
18747
- return binding;
18748
- } catch (e) {
18749
- loadErrors.push(e);
18750
- }
18751
- } else {
18752
- try {
18753
- return require2("./parser.linux-x64-gnu.node");
18754
- } catch (e) {
18755
- loadErrors.push(e);
18756
- }
18757
- try {
18758
- const binding = require2("@oxc-parser/binding-linux-x64-gnu");
18759
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-x64-gnu/package.json").version;
18760
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18761
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18762
- }
18763
- return binding;
18764
- } catch (e) {
18765
- loadErrors.push(e);
18766
- }
18767
- }
18768
- } else if (process.arch === "arm64") {
18769
- if (isMusl()) {
18770
- try {
18771
- return require2("./parser.linux-arm64-musl.node");
18772
- } catch (e) {
18773
- loadErrors.push(e);
18774
- }
18775
- try {
18776
- const binding = require2("@oxc-parser/binding-linux-arm64-musl");
18777
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-arm64-musl/package.json").version;
18778
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18779
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18780
- }
18781
- return binding;
18782
- } catch (e) {
18783
- loadErrors.push(e);
18784
- }
18785
- } else {
18786
- try {
18787
- return require2("./parser.linux-arm64-gnu.node");
18788
- } catch (e) {
18789
- loadErrors.push(e);
18790
- }
18791
- try {
18792
- const binding = require2("@oxc-parser/binding-linux-arm64-gnu");
18793
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-arm64-gnu/package.json").version;
18794
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18795
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18796
- }
18797
- return binding;
18798
- } catch (e) {
18799
- loadErrors.push(e);
18800
- }
18801
- }
18802
- } else if (process.arch === "arm") {
18803
- if (isMusl()) {
18804
- try {
18805
- return require2("./parser.linux-arm-musleabihf.node");
18806
- } catch (e) {
18807
- loadErrors.push(e);
18808
- }
18809
- try {
18810
- const binding = require2("@oxc-parser/binding-linux-arm-musleabihf");
18811
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-arm-musleabihf/package.json").version;
18812
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18813
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18814
- }
18815
- return binding;
18816
- } catch (e) {
18817
- loadErrors.push(e);
18818
- }
18819
- } else {
18820
- try {
18821
- return require2("./parser.linux-arm-gnueabihf.node");
18822
- } catch (e) {
18823
- loadErrors.push(e);
18824
- }
18825
- try {
18826
- const binding = require2("@oxc-parser/binding-linux-arm-gnueabihf");
18827
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-arm-gnueabihf/package.json").version;
18828
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18829
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18830
- }
18831
- return binding;
18832
- } catch (e) {
18833
- loadErrors.push(e);
18834
- }
18835
- }
18836
- } else if (process.arch === "loong64") {
18837
- if (isMusl()) {
18838
- try {
18839
- return require2("./parser.linux-loong64-musl.node");
18840
- } catch (e) {
18841
- loadErrors.push(e);
18842
- }
18843
- try {
18844
- const binding = require2("@oxc-parser/binding-linux-loong64-musl");
18845
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-loong64-musl/package.json").version;
18846
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18847
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18848
- }
18849
- return binding;
18850
- } catch (e) {
18851
- loadErrors.push(e);
18852
- }
18853
- } else {
18854
- try {
18855
- return require2("./parser.linux-loong64-gnu.node");
18856
- } catch (e) {
18857
- loadErrors.push(e);
18858
- }
18859
- try {
18860
- const binding = require2("@oxc-parser/binding-linux-loong64-gnu");
18861
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-loong64-gnu/package.json").version;
18862
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18863
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18864
- }
18865
- return binding;
18866
- } catch (e) {
18867
- loadErrors.push(e);
18868
- }
18869
- }
18870
- } else if (process.arch === "riscv64") {
18871
- if (isMusl()) {
18872
- try {
18873
- return require2("./parser.linux-riscv64-musl.node");
18874
- } catch (e) {
18875
- loadErrors.push(e);
18876
- }
18877
- try {
18878
- const binding = require2("@oxc-parser/binding-linux-riscv64-musl");
18879
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-riscv64-musl/package.json").version;
18880
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18881
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18882
- }
18883
- return binding;
18884
- } catch (e) {
18885
- loadErrors.push(e);
18886
- }
18887
- } else {
18888
- try {
18889
- return require2("./parser.linux-riscv64-gnu.node");
18890
- } catch (e) {
18891
- loadErrors.push(e);
18892
- }
18893
- try {
18894
- const binding = require2("@oxc-parser/binding-linux-riscv64-gnu");
18895
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-riscv64-gnu/package.json").version;
18896
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18897
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18898
- }
18899
- return binding;
18900
- } catch (e) {
18901
- loadErrors.push(e);
18902
- }
18903
- }
18904
- } else if (process.arch === "ppc64") {
18905
- try {
18906
- return require2("./parser.linux-ppc64-gnu.node");
18907
- } catch (e) {
18908
- loadErrors.push(e);
18909
- }
18910
- try {
18911
- const binding = require2("@oxc-parser/binding-linux-ppc64-gnu");
18912
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-ppc64-gnu/package.json").version;
18913
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18914
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18915
- }
18916
- return binding;
18917
- } catch (e) {
18918
- loadErrors.push(e);
18919
- }
18920
- } else if (process.arch === "s390x") {
18921
- try {
18922
- return require2("./parser.linux-s390x-gnu.node");
18923
- } catch (e) {
18924
- loadErrors.push(e);
18925
- }
18926
- try {
18927
- const binding = require2("@oxc-parser/binding-linux-s390x-gnu");
18928
- const bindingPackageVersion = require2("@oxc-parser/binding-linux-s390x-gnu/package.json").version;
18929
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18930
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18931
- }
18932
- return binding;
18933
- } catch (e) {
18934
- loadErrors.push(e);
18935
- }
18936
- } else {
18937
- loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
18938
- }
18939
- } else if (process.platform === "openharmony") {
18940
- if (process.arch === "arm64") {
18941
- try {
18942
- return require2("./parser.openharmony-arm64.node");
18943
- } catch (e) {
18944
- loadErrors.push(e);
18945
- }
18946
- try {
18947
- const binding = require2("@oxc-parser/binding-openharmony-arm64");
18948
- const bindingPackageVersion = require2("@oxc-parser/binding-openharmony-arm64/package.json").version;
18949
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18950
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18951
- }
18952
- return binding;
18953
- } catch (e) {
18954
- loadErrors.push(e);
18955
- }
18956
- } else if (process.arch === "x64") {
18957
- try {
18958
- return require2("./parser.openharmony-x64.node");
18959
- } catch (e) {
18960
- loadErrors.push(e);
18961
- }
18962
- try {
18963
- const binding = require2("@oxc-parser/binding-openharmony-x64");
18964
- const bindingPackageVersion = require2("@oxc-parser/binding-openharmony-x64/package.json").version;
18965
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18966
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18967
- }
18968
- return binding;
18969
- } catch (e) {
18970
- loadErrors.push(e);
18971
- }
18972
- } else if (process.arch === "arm") {
18973
- try {
18974
- return require2("./parser.openharmony-arm.node");
18975
- } catch (e) {
18976
- loadErrors.push(e);
18977
- }
18978
- try {
18979
- const binding = require2("@oxc-parser/binding-openharmony-arm");
18980
- const bindingPackageVersion = require2("@oxc-parser/binding-openharmony-arm/package.json").version;
18981
- if (bindingPackageVersion !== "0.104.0" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
18982
- throw new Error(`Native binding package version mismatch, expected 0.104.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
18983
- }
18984
- return binding;
18985
- } catch (e) {
18986
- loadErrors.push(e);
18987
- }
18988
- } else {
18989
- loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
18990
- }
18991
- } else {
18992
- loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
18993
- }
18994
- }
18995
- nativeBinding = requireNative();
18996
- if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
18997
- let wasiBinding = null;
18998
- let wasiBindingError = null;
18999
- try {
19000
- wasiBinding = require2("./parser.wasi.cjs");
19001
- nativeBinding = wasiBinding;
19002
- } catch (err) {
19003
- if (process.env.NAPI_RS_FORCE_WASI) {
19004
- wasiBindingError = err;
19005
- }
19006
- }
19007
- if (!nativeBinding) {
19008
- try {
19009
- wasiBinding = require2("@oxc-parser/binding-wasm32-wasi");
19010
- nativeBinding = wasiBinding;
19011
- } catch (err) {
19012
- if (process.env.NAPI_RS_FORCE_WASI) {
19013
- wasiBindingError.cause = err;
19014
- loadErrors.push(err);
19015
- }
19016
- }
19017
- }
19018
- if (process.env.NAPI_RS_FORCE_WASI === "error" && !wasiBinding) {
19019
- const error2 = new Error("WASI binding not found and NAPI_RS_FORCE_WASI is set to error");
19020
- error2.cause = wasiBindingError;
19021
- throw error2;
19022
- }
19023
- }
19024
- if (!nativeBinding && globalThis.process?.versions?.["webcontainer"]) {
19025
- try {
19026
- nativeBinding = require2("./webcontainer-fallback.cjs");
19027
- } catch (err) {
19028
- loadErrors.push(err);
19029
- }
19030
- }
19031
- if (!nativeBinding) {
19032
- if (loadErrors.length > 0) {
19033
- throw new Error(`Cannot find native binding. ` + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + "Please try `npm i` again after removing both package-lock.json and node_modules directory.", {
19034
- cause: loadErrors.reduce((err, cur) => {
19035
- cur.cause = err;
19036
- return cur;
19037
- })
19038
- });
19039
- }
19040
- throw new Error(`Failed to load native binding`);
19041
- }
19042
- var { Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parse: parse3, parseSync, rawTransferSupported } = nativeBinding;
19043
-
19044
- // node_modules/oxc-parser/src-js/wrap.js
19045
- function wrap(result) {
19046
- let program, module3, comments, errors4;
19047
- return {
19048
- get program() {
19049
- if (!program)
19050
- program = jsonParseAst(result.program);
19051
- return program;
19052
- },
19053
- get module() {
19054
- if (!module3)
19055
- module3 = result.module;
19056
- return module3;
19057
- },
19058
- get comments() {
19059
- if (!comments)
19060
- comments = result.comments;
19061
- return comments;
19062
- },
19063
- get errors() {
19064
- if (!errors4)
19065
- errors4 = result.errors;
19066
- return errors4;
19067
- }
19068
- };
19069
- }
19070
- function jsonParseAst(programJson) {
19071
- const { node: program, fixes } = JSON.parse(programJson);
19072
- for (const fixPath of fixes) {
19073
- applyFix(program, fixPath);
19074
- }
19075
- return program;
19076
- }
19077
- function applyFix(program, fixPath) {
19078
- let node = program;
19079
- for (const key of fixPath) {
19080
- node = node[key];
19081
- }
19082
- if (node.bigint) {
19083
- node.value = BigInt(node.bigint);
19084
- } else {
19085
- try {
19086
- node.value = RegExp(node.regex.pattern, node.regex.flags);
19087
- } catch {}
19088
- }
19089
- }
19090
-
19091
- // node_modules/oxc-parser/src-js/generated/visit/keys.js
19092
- var { freeze } = Object;
19093
- var $EMPTY = freeze([]);
19094
- var DECORATORS__KEY__TYPE_ANNOTATION__VALUE = freeze([
19095
- "decorators",
19096
- "key",
19097
- "typeAnnotation",
19098
- "value"
19099
- ]);
19100
- var LEFT__RIGHT = freeze(["left", "right"]);
19101
- var ARGUMENT = freeze(["argument"]);
19102
- var BODY = freeze(["body"]);
19103
- var LABEL = freeze(["label"]);
19104
- var CALLEE__TYPE_ARGUMENTS__ARGUMENTS = freeze(["callee", "typeArguments", "arguments"]);
19105
- var EXPRESSION = freeze(["expression"]);
19106
- var DECORATORS__ID__TYPE_PARAMETERS__SUPER_CLASS__SUPER_TYPE_ARGUMENTS__IMPLEMENTS__BODY = freeze([
19107
- "decorators",
19108
- "id",
19109
- "typeParameters",
19110
- "superClass",
19111
- "superTypeArguments",
19112
- "implements",
19113
- "body"
19114
- ]);
19115
- var TEST__CONSEQUENT__ALTERNATE = freeze(["test", "consequent", "alternate"]);
19116
- var LEFT__RIGHT__BODY = freeze(["left", "right", "body"]);
19117
- var ID__TYPE_PARAMETERS__PARAMS__RETURN_TYPE__BODY = freeze([
19118
- "id",
19119
- "typeParameters",
19120
- "params",
19121
- "returnType",
19122
- "body"
19123
- ]);
19124
- var KEY__VALUE = freeze(["key", "value"]);
19125
- var LOCAL = freeze(["local"]);
19126
- var OBJECT__PROPERTY = freeze(["object", "property"]);
19127
- var DECORATORS__KEY__TYPE_ANNOTATION = freeze(["decorators", "key", "typeAnnotation"]);
19128
- var EXPRESSION__TYPE_ANNOTATION = freeze(["expression", "typeAnnotation"]);
19129
- var TYPE_PARAMETERS__PARAMS__RETURN_TYPE = freeze(["typeParameters", "params", "returnType"]);
19130
- var EXPRESSION__TYPE_ARGUMENTS = freeze(["expression", "typeArguments"]);
19131
- var MEMBERS = freeze(["members"]);
19132
- var ID__BODY = freeze(["id", "body"]);
19133
- var TYPES = freeze(["types"]);
19134
- var TYPE_ANNOTATION = freeze(["typeAnnotation"]);
19135
- var PARAMS = freeze(["params"]);
19136
- var keys_default = freeze({
19137
- DebuggerStatement: $EMPTY,
19138
- EmptyStatement: $EMPTY,
19139
- Literal: $EMPTY,
19140
- PrivateIdentifier: $EMPTY,
19141
- Super: $EMPTY,
19142
- TemplateElement: $EMPTY,
19143
- ThisExpression: $EMPTY,
19144
- JSXClosingFragment: $EMPTY,
19145
- JSXEmptyExpression: $EMPTY,
19146
- JSXIdentifier: $EMPTY,
19147
- JSXOpeningFragment: $EMPTY,
19148
- JSXText: $EMPTY,
19149
- TSAnyKeyword: $EMPTY,
19150
- TSBigIntKeyword: $EMPTY,
19151
- TSBooleanKeyword: $EMPTY,
19152
- TSIntrinsicKeyword: $EMPTY,
19153
- TSJSDocUnknownType: $EMPTY,
19154
- TSNeverKeyword: $EMPTY,
19155
- TSNullKeyword: $EMPTY,
19156
- TSNumberKeyword: $EMPTY,
19157
- TSObjectKeyword: $EMPTY,
19158
- TSStringKeyword: $EMPTY,
19159
- TSSymbolKeyword: $EMPTY,
19160
- TSThisType: $EMPTY,
19161
- TSUndefinedKeyword: $EMPTY,
19162
- TSUnknownKeyword: $EMPTY,
19163
- TSVoidKeyword: $EMPTY,
19164
- AccessorProperty: DECORATORS__KEY__TYPE_ANNOTATION__VALUE,
19165
- ArrayExpression: freeze(["elements"]),
19166
- ArrayPattern: freeze(["decorators", "elements", "typeAnnotation"]),
19167
- ArrowFunctionExpression: freeze(["typeParameters", "params", "returnType", "body"]),
19168
- AssignmentExpression: LEFT__RIGHT,
19169
- AssignmentPattern: freeze(["decorators", "left", "right", "typeAnnotation"]),
19170
- AwaitExpression: ARGUMENT,
19171
- BinaryExpression: LEFT__RIGHT,
19172
- BlockStatement: BODY,
19173
- BreakStatement: LABEL,
19174
- CallExpression: CALLEE__TYPE_ARGUMENTS__ARGUMENTS,
19175
- CatchClause: freeze(["param", "body"]),
19176
- ChainExpression: EXPRESSION,
19177
- ClassBody: BODY,
19178
- ClassDeclaration: DECORATORS__ID__TYPE_PARAMETERS__SUPER_CLASS__SUPER_TYPE_ARGUMENTS__IMPLEMENTS__BODY,
19179
- ClassExpression: DECORATORS__ID__TYPE_PARAMETERS__SUPER_CLASS__SUPER_TYPE_ARGUMENTS__IMPLEMENTS__BODY,
19180
- ConditionalExpression: TEST__CONSEQUENT__ALTERNATE,
19181
- ContinueStatement: LABEL,
19182
- Decorator: EXPRESSION,
19183
- DoWhileStatement: freeze(["body", "test"]),
19184
- ExportAllDeclaration: freeze(["exported", "source", "attributes"]),
19185
- ExportDefaultDeclaration: freeze(["declaration"]),
19186
- ExportNamedDeclaration: freeze(["declaration", "specifiers", "source", "attributes"]),
19187
- ExportSpecifier: freeze(["local", "exported"]),
19188
- ExpressionStatement: EXPRESSION,
19189
- ForInStatement: LEFT__RIGHT__BODY,
19190
- ForOfStatement: LEFT__RIGHT__BODY,
19191
- ForStatement: freeze(["init", "test", "update", "body"]),
19192
- FunctionDeclaration: ID__TYPE_PARAMETERS__PARAMS__RETURN_TYPE__BODY,
19193
- FunctionExpression: ID__TYPE_PARAMETERS__PARAMS__RETURN_TYPE__BODY,
19194
- Identifier: freeze(["decorators", "typeAnnotation"]),
19195
- IfStatement: TEST__CONSEQUENT__ALTERNATE,
19196
- ImportAttribute: KEY__VALUE,
19197
- ImportDeclaration: freeze(["specifiers", "source", "attributes"]),
19198
- ImportDefaultSpecifier: LOCAL,
19199
- ImportExpression: freeze(["source", "options"]),
19200
- ImportNamespaceSpecifier: LOCAL,
19201
- ImportSpecifier: freeze(["imported", "local"]),
19202
- LabeledStatement: freeze(["label", "body"]),
19203
- LogicalExpression: LEFT__RIGHT,
19204
- MemberExpression: OBJECT__PROPERTY,
19205
- MetaProperty: freeze(["meta", "property"]),
19206
- MethodDefinition: freeze(["decorators", "key", "value"]),
19207
- NewExpression: CALLEE__TYPE_ARGUMENTS__ARGUMENTS,
19208
- ObjectExpression: freeze(["properties"]),
19209
- ObjectPattern: freeze(["decorators", "properties", "typeAnnotation"]),
19210
- ParenthesizedExpression: EXPRESSION,
19211
- Program: BODY,
19212
- Property: KEY__VALUE,
19213
- PropertyDefinition: DECORATORS__KEY__TYPE_ANNOTATION__VALUE,
19214
- RestElement: freeze(["decorators", "argument", "typeAnnotation"]),
19215
- ReturnStatement: ARGUMENT,
19216
- SequenceExpression: freeze(["expressions"]),
19217
- SpreadElement: ARGUMENT,
19218
- StaticBlock: BODY,
19219
- SwitchCase: freeze(["test", "consequent"]),
19220
- SwitchStatement: freeze(["discriminant", "cases"]),
19221
- TaggedTemplateExpression: freeze(["tag", "typeArguments", "quasi"]),
19222
- TemplateLiteral: freeze(["quasis", "expressions"]),
19223
- ThrowStatement: ARGUMENT,
19224
- TryStatement: freeze(["block", "handler", "finalizer"]),
19225
- UnaryExpression: ARGUMENT,
19226
- UpdateExpression: ARGUMENT,
19227
- V8IntrinsicExpression: freeze(["name", "arguments"]),
19228
- VariableDeclaration: freeze(["declarations"]),
19229
- VariableDeclarator: freeze(["id", "init"]),
19230
- WhileStatement: freeze(["test", "body"]),
19231
- WithStatement: freeze(["object", "body"]),
19232
- YieldExpression: ARGUMENT,
19233
- JSXAttribute: freeze(["name", "value"]),
19234
- JSXClosingElement: freeze(["name"]),
19235
- JSXElement: freeze(["openingElement", "children", "closingElement"]),
19236
- JSXExpressionContainer: EXPRESSION,
19237
- JSXFragment: freeze(["openingFragment", "children", "closingFragment"]),
19238
- JSXMemberExpression: OBJECT__PROPERTY,
19239
- JSXNamespacedName: freeze(["namespace", "name"]),
19240
- JSXOpeningElement: freeze(["name", "typeArguments", "attributes"]),
19241
- JSXSpreadAttribute: ARGUMENT,
19242
- JSXSpreadChild: EXPRESSION,
19243
- TSAbstractAccessorProperty: DECORATORS__KEY__TYPE_ANNOTATION,
19244
- TSAbstractMethodDefinition: KEY__VALUE,
19245
- TSAbstractPropertyDefinition: DECORATORS__KEY__TYPE_ANNOTATION,
19246
- TSArrayType: freeze(["elementType"]),
19247
- TSAsExpression: EXPRESSION__TYPE_ANNOTATION,
19248
- TSCallSignatureDeclaration: TYPE_PARAMETERS__PARAMS__RETURN_TYPE,
19249
- TSClassImplements: EXPRESSION__TYPE_ARGUMENTS,
19250
- TSConditionalType: freeze(["checkType", "extendsType", "trueType", "falseType"]),
19251
- TSConstructSignatureDeclaration: TYPE_PARAMETERS__PARAMS__RETURN_TYPE,
19252
- TSConstructorType: TYPE_PARAMETERS__PARAMS__RETURN_TYPE,
19253
- TSDeclareFunction: ID__TYPE_PARAMETERS__PARAMS__RETURN_TYPE__BODY,
19254
- TSEmptyBodyFunctionExpression: freeze(["id", "typeParameters", "params", "returnType"]),
19255
- TSEnumBody: MEMBERS,
19256
- TSEnumDeclaration: ID__BODY,
19257
- TSEnumMember: freeze(["id", "initializer"]),
19258
- TSExportAssignment: EXPRESSION,
19259
- TSExternalModuleReference: EXPRESSION,
19260
- TSFunctionType: TYPE_PARAMETERS__PARAMS__RETURN_TYPE,
19261
- TSImportEqualsDeclaration: freeze(["id", "moduleReference"]),
19262
- TSImportType: freeze(["source", "options", "qualifier", "typeArguments"]),
19263
- TSIndexSignature: freeze(["parameters", "typeAnnotation"]),
19264
- TSIndexedAccessType: freeze(["objectType", "indexType"]),
19265
- TSInferType: freeze(["typeParameter"]),
19266
- TSInstantiationExpression: EXPRESSION__TYPE_ARGUMENTS,
19267
- TSInterfaceBody: BODY,
19268
- TSInterfaceDeclaration: freeze(["id", "typeParameters", "extends", "body"]),
19269
- TSInterfaceHeritage: EXPRESSION__TYPE_ARGUMENTS,
19270
- TSIntersectionType: TYPES,
19271
- TSJSDocNonNullableType: TYPE_ANNOTATION,
19272
- TSJSDocNullableType: TYPE_ANNOTATION,
19273
- TSLiteralType: freeze(["literal"]),
19274
- TSMappedType: freeze(["key", "constraint", "nameType", "typeAnnotation"]),
19275
- TSMethodSignature: freeze(["key", "typeParameters", "params", "returnType"]),
19276
- TSModuleBlock: BODY,
19277
- TSModuleDeclaration: ID__BODY,
19278
- TSNamedTupleMember: freeze(["label", "elementType"]),
19279
- TSNamespaceExportDeclaration: freeze(["id"]),
19280
- TSNonNullExpression: EXPRESSION,
19281
- TSOptionalType: TYPE_ANNOTATION,
19282
- TSParameterProperty: freeze(["decorators", "parameter"]),
19283
- TSParenthesizedType: TYPE_ANNOTATION,
19284
- TSPropertySignature: freeze(["key", "typeAnnotation"]),
19285
- TSQualifiedName: LEFT__RIGHT,
19286
- TSRestType: TYPE_ANNOTATION,
19287
- TSSatisfiesExpression: EXPRESSION__TYPE_ANNOTATION,
19288
- TSTemplateLiteralType: freeze(["quasis", "types"]),
19289
- TSTupleType: freeze(["elementTypes"]),
19290
- TSTypeAliasDeclaration: freeze(["id", "typeParameters", "typeAnnotation"]),
19291
- TSTypeAnnotation: TYPE_ANNOTATION,
19292
- TSTypeAssertion: freeze(["typeAnnotation", "expression"]),
19293
- TSTypeLiteral: MEMBERS,
19294
- TSTypeOperator: TYPE_ANNOTATION,
19295
- TSTypeParameter: freeze(["name", "constraint", "default"]),
19296
- TSTypeParameterDeclaration: PARAMS,
19297
- TSTypeParameterInstantiation: PARAMS,
19298
- TSTypePredicate: freeze(["parameterName", "typeAnnotation"]),
19299
- TSTypeQuery: freeze(["exprName", "typeArguments"]),
19300
- TSTypeReference: freeze(["typeName", "typeArguments"]),
19301
- TSUnionType: TYPES
19302
- });
19303
- // node_modules/oxc-parser/src-js/visit/index.js
19304
- import { createRequire as createRequire3 } from "node:module";
19305
- var walkProgram = null;
19306
- var addVisitorToCompiled;
19307
- var createCompiledVisitor;
19308
- var finalizeCompiledVisitor;
19309
-
19310
- class Visitor {
19311
- #compiledVisitor = null;
19312
- constructor(visitor) {
19313
- if (walkProgram === null) {
19314
- const require3 = createRequire3(import.meta.url);
19315
- ({ walkProgram } = require3("../generated/visit/walk.js"));
19316
- ({
19317
- addVisitorToCompiled,
19318
- createCompiledVisitor,
19319
- finalizeCompiledVisitor
19320
- } = require3("./visitor.js"));
19321
- }
19322
- const compiledVisitor = createCompiledVisitor();
19323
- addVisitorToCompiled(visitor);
19324
- const needsVisit = finalizeCompiledVisitor();
19325
- if (needsVisit)
19326
- this.#compiledVisitor = compiledVisitor;
19327
- }
19328
- visit(program) {
19329
- const compiledVisitor = this.#compiledVisitor;
19330
- if (compiledVisitor !== null)
19331
- walkProgram(program, compiledVisitor);
19332
- }
19333
- }
19334
-
19335
- // node_modules/oxc-parser/src-js/index.js
19336
- var require3 = createRequire4(import.meta.url);
19337
- var parseSyncRaw = null;
19338
- var parseRaw;
19339
- var parseSyncLazy = null;
19340
- var parseLazy;
19341
- var LazyVisitor;
19342
- function loadRawTransfer() {
19343
- if (parseSyncRaw === null) {
19344
- ({ parseSyncRaw, parse: parseRaw } = require3("./raw-transfer/eager.js"));
19345
- }
19346
- }
19347
- function loadRawTransferLazy() {
19348
- if (parseSyncLazy === null) {
19349
- ({ parseSyncLazy, parse: parseLazy, Visitor: LazyVisitor } = require3("./raw-transfer/lazy.js"));
19350
- }
19351
- }
19352
- function parseSync2(filename, sourceText, options3) {
19353
- if (options3?.experimentalRawTransfer) {
19354
- loadRawTransfer();
19355
- return parseSyncRaw(filename, sourceText, options3);
19356
- }
19357
- if (options3?.experimentalLazy) {
19358
- loadRawTransferLazy();
19359
- return parseSyncLazy(filename, sourceText, options3);
19360
- }
19361
- return wrap(parseSync(filename, sourceText, options3));
19362
- }
17679
+ import { parseSync } from "oxc-parser";
19363
17680
 
19364
17681
  // src/recognizers/detector.ts
19365
17682
  function recognize(detector, line) {
@@ -19679,11 +17996,11 @@ function isValidParseResult(result) {
19679
17996
  function tryParse(value, filename) {
19680
17997
  const ext = path.extname(filename);
19681
17998
  const parseFilename = `file${ext || ".js"}`;
19682
- const result = parseSync2(parseFilename, value);
17999
+ const result = parseSync(parseFilename, value);
19683
18000
  if (isValidParseResult(result))
19684
18001
  return result;
19685
18002
  if (ext !== ".tsx" && ext !== ".jsx") {
19686
- const jsxResult = parseSync2("file.tsx", value);
18003
+ const jsxResult = parseSync("file.tsx", value);
19687
18004
  if (isValidParseResult(jsxResult))
19688
18005
  return jsxResult;
19689
18006
  }
@@ -23387,9 +21704,9 @@ var require_react_component_keys_default = requireReactComponentKeys;
23387
21704
  import { basename, extname, relative } from "node:path";
23388
21705
 
23389
21706
  // src/utilities/resolve-import.ts
23390
- var import_oxc_resolver = __toESM(require_oxc_resolver(), 1);
23391
21707
  import { dirname } from "node:path";
23392
- var resolver = new import_oxc_resolver.ResolverFactory({
21708
+ import { ResolverFactory } from "oxc-resolver";
21709
+ var resolver = new ResolverFactory({
23393
21710
  extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".json", ".node"]
23394
21711
  });
23395
21712
  function resolveRelativeImport(importSource, sourceFile) {
@@ -23818,13 +22135,13 @@ function collectCaptures(node, sourceCode) {
23818
22135
  const captureSet = new Set;
23819
22136
  function visit(current) {
23820
22137
  if (current.type === TSESTree10.AST_NODE_TYPES.Identifier) {
23821
- const { name: name2 } = current;
23822
- if (captureSet.has(name2) || GLOBAL_BUILTINS.has(name2) || isInTypePosition(current))
22138
+ const { name } = current;
22139
+ if (captureSet.has(name) || GLOBAL_BUILTINS.has(name) || isInTypePosition(current))
23823
22140
  return;
23824
22141
  let variable;
23825
22142
  let currentScope = sourceCode.getScope(current);
23826
22143
  while (currentScope) {
23827
- variable = currentScope.set.get(name2);
22144
+ variable = currentScope.set.get(name);
23828
22145
  if (variable)
23829
22146
  break;
23830
22147
  currentScope = currentScope.upper;
@@ -23844,14 +22161,14 @@ function collectCaptures(node, sourceCode) {
23844
22161
  testingMetrics.outerScopeSkip += 1;
23845
22162
  return;
23846
22163
  }
23847
- captureSet.add(name2);
22164
+ captureSet.add(name);
23848
22165
  const depthNode = findTopmostMemberExpression(current);
23849
22166
  const usagePath = nodeToSafeDependencyPath(depthNode, sourceCode);
23850
22167
  const depth = getMemberExpressionDepth(depthNode);
23851
22168
  captures.push({
23852
22169
  depth,
23853
22170
  forceDependency: isComputedPropertyIdentifier(current),
23854
- name: name2,
22171
+ name,
23855
22172
  node: depthNode,
23856
22173
  usagePath,
23857
22174
  variable
@@ -23899,18 +22216,18 @@ function parseDependencies(node, sourceCode) {
23899
22216
  if (!element)
23900
22217
  continue;
23901
22218
  const actualNode = element.type === TSESTree10.AST_NODE_TYPES.SpreadElement ? element.argument : element;
23902
- const name2 = nodeToDependencyString(actualNode, sourceCode);
22219
+ const name = nodeToDependencyString(actualNode, sourceCode);
23903
22220
  const depth = getMemberExpressionDepth(actualNode);
23904
22221
  dependencies4.push({
23905
22222
  depth,
23906
- name: name2,
22223
+ name,
23907
22224
  node: actualNode
23908
22225
  });
23909
22226
  }
23910
22227
  return dependencies4;
23911
22228
  }
23912
- function returnName({ name: name2 }) {
23913
- return name2;
22229
+ function returnName({ name }) {
22230
+ return name;
23914
22231
  }
23915
22232
  function isUnstableValue(node) {
23916
22233
  return node ? UNSTABLE_VALUES.has(node.type) : false;
@@ -24044,7 +22361,7 @@ var useExhaustiveDependencies = {
24044
22361
  }
24045
22362
  const maxCaptureDepth = Math.max(...matchingCaptures.map(({ depth }) => depth));
24046
22363
  if (dependency.depth > maxCaptureDepth && options3.reportUnnecessaryDependencies) {
24047
- const newDependencies = dependencies4.filter(({ name: name2 }) => name2 !== dependency.name).map(returnName);
22364
+ const newDependencies = dependencies4.filter(({ name }) => name !== dependency.name).map(returnName);
24048
22365
  const dependencyString = `[${newDependencies.join(", ")}]`;
24049
22366
  context.report({
24050
22367
  data: { name: dependency.name },
@@ -24082,7 +22399,7 @@ var useExhaustiveDependencies = {
24082
22399
  missingCaptures.push(capture);
24083
22400
  }
24084
22401
  if (missingCaptures.length > 0) {
24085
- const dependencyNames = dependencies4.map(({ name: name2 }) => name2);
22402
+ const dependencyNames = dependencies4.map(({ name }) => name);
24086
22403
  const missingPaths = missingCaptures.map(({ usagePath }) => usagePath);
24087
22404
  const newDependencies = [...dependencyNames, ...missingPaths].toSorted();
24088
22405
  const newDependenciesString = `[${newDependencies.join(", ")}]`;
@@ -24224,32 +22541,32 @@ var use_exhaustive_dependencies_default = useExhaustiveDependencies;
24224
22541
  import { TSESTree as TSESTree11 } from "@typescript-eslint/types";
24225
22542
  var HOOK_NAME_PATTERN = /^use[A-Z]/;
24226
22543
  var COMPONENT_NAME_PATTERN2 = /^[A-Z]/;
24227
- function isReactHook(name2) {
24228
- return HOOK_NAME_PATTERN.test(name2);
22544
+ function isReactHook(name) {
22545
+ return HOOK_NAME_PATTERN.test(name);
24229
22546
  }
24230
- function isComponent(name2) {
24231
- return COMPONENT_NAME_PATTERN2.test(name2);
22547
+ function isComponent(name) {
22548
+ return COMPONENT_NAME_PATTERN2.test(name);
24232
22549
  }
24233
22550
  function isComponentOrHook(node) {
24234
22551
  if (node.type === TSESTree11.AST_NODE_TYPES.FunctionDeclaration && node.id) {
24235
- const { name: name2 } = node.id;
24236
- return isComponent(name2) || isReactHook(name2);
22552
+ const { name } = node.id;
22553
+ return isComponent(name) || isReactHook(name);
24237
22554
  }
24238
22555
  if (node.type === TSESTree11.AST_NODE_TYPES.FunctionExpression || node.type === TSESTree11.AST_NODE_TYPES.ArrowFunctionExpression) {
24239
22556
  const { parent } = node;
24240
22557
  if (parent === undefined)
24241
22558
  return false;
24242
22559
  if (parent.type === TSESTree11.AST_NODE_TYPES.VariableDeclarator && parent.id.type === TSESTree11.AST_NODE_TYPES.Identifier) {
24243
- const { name: name2 } = parent.id;
24244
- return isComponent(name2) || isReactHook(name2);
22560
+ const { name } = parent.id;
22561
+ return isComponent(name) || isReactHook(name);
24245
22562
  }
24246
22563
  if (parent.type === TSESTree11.AST_NODE_TYPES.Property && parent.key.type === TSESTree11.AST_NODE_TYPES.Identifier) {
24247
- const { name: name2 } = parent.key;
24248
- return isComponent(name2) || isReactHook(name2);
22564
+ const { name } = parent.key;
22565
+ return isComponent(name) || isReactHook(name);
24249
22566
  }
24250
22567
  if (parent.type === TSESTree11.AST_NODE_TYPES.MethodDefinition && parent.key.type === TSESTree11.AST_NODE_TYPES.Identifier) {
24251
- const { name: name2 } = parent.key;
24252
- return isComponent(name2) || isReactHook(name2);
22568
+ const { name } = parent.key;
22569
+ return isComponent(name) || isReactHook(name);
24253
22570
  }
24254
22571
  }
24255
22572
  return false;
@@ -24601,8 +22918,8 @@ function createNoShorthandOptions(options3 = {}) {
24601
22918
  function createEffectFunctionOptions(options3 = {}) {
24602
22919
  return { environment: "standard", hooks: [], ...options3 };
24603
22920
  }
24604
- function createHookConfiguration(name2, options3 = {}) {
24605
- return { allowAsync: false, name: name2, ...options3 };
22921
+ function createHookConfiguration(name, options3 = {}) {
22922
+ return { allowAsync: false, name, ...options3 };
24606
22923
  }
24607
22924
  function createRequirePairedCallsOptions(options3 = {}) {
24608
22925
  return {
@@ -24738,4 +23055,4 @@ export {
24738
23055
  createBanInstancesOptions
24739
23056
  };
24740
23057
 
24741
- //# debugId=746CFBCF1D469D6C64756E2164756E21
23058
+ //# debugId=C1BEC810E1B754DD64756E2164756E21