react-doctor 0.5.5-dev.daf0579 → 0.5.5-dev.ea3b827

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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6dbc8bb2-d9b5-598b-8dd1-cc093b061b68")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e03b6154-4b3f-5b73-9f74-118d3b39e6b0")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import * as NodeChildProcess from "node:child_process";
5
5
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
@@ -39740,13 +39740,24 @@ const checkSecurityScan = (rootDirectory, options = {}) => {
39740
39740
  if (!shouldEnableRule(rule.requires, rule.tags, capabilities, ignoredTags, rule.disabledBy)) return [];
39741
39741
  return [{
39742
39742
  entry,
39743
- scan
39743
+ scan,
39744
+ committedFilesOnly: rule.committedFilesOnly === true
39744
39745
  }];
39745
39746
  });
39746
39747
  if (enabledScanRules.length === 0) return [];
39747
39748
  const diagnostics = [];
39748
39749
  const seen = /* @__PURE__ */ new Set();
39749
- for (const file of collectSecurityScanFiles(rootDirectory)) for (const { entry, scan } of enabledScanRules) for (const finding of scan(file)) {
39750
+ const gitIgnoredCache = /* @__PURE__ */ new Map();
39751
+ const isFileGitIgnored = (file) => {
39752
+ let status = gitIgnoredCache.get(file.absolutePath);
39753
+ if (status === void 0) {
39754
+ status = isPathGitIgnored(rootDirectory, file.absolutePath);
39755
+ gitIgnoredCache.set(file.absolutePath, status);
39756
+ }
39757
+ return status === true;
39758
+ };
39759
+ for (const file of collectSecurityScanFiles(rootDirectory)) for (const { entry, scan, committedFilesOnly } of enabledScanRules) for (const finding of scan(file)) {
39760
+ if (committedFilesOnly && isFileGitIgnored(file)) continue;
39750
39761
  const diagnostic = buildSecurityScanDiagnostic(finding, entry, file.relativePath);
39751
39762
  const key = `${diagnostic.rule}:${diagnostic.filePath}:${diagnostic.line}:${diagnostic.column}:${diagnostic.message}`;
39752
39763
  if (seen.has(key)) continue;
@@ -42773,6 +42784,8 @@ const resolveConcreteVersion = (spec) => {
42773
42784
  const trimmed = spec.trim();
42774
42785
  if (trimmed.length === 0) return null;
42775
42786
  if (trimmed.includes(":")) return null;
42787
+ const range = import_semver.validRange(trimmed);
42788
+ if (range === null || range === "*") return null;
42776
42789
  return import_semver.minVersion(trimmed)?.version ?? null;
42777
42790
  };
42778
42791
  const locateDependencyKey = (packageJsonText, section, name) => {
@@ -43958,7 +43971,7 @@ const makeNoopConsole = () => ({
43958
43971
  });
43959
43972
  //#endregion
43960
43973
  //#region src/cli/utils/version.ts
43961
- const VERSION = "0.5.5-dev.daf0579";
43974
+ const VERSION = "0.5.5-dev.ea3b827";
43962
43975
  //#endregion
43963
43976
  //#region src/cli/utils/json-mode.ts
43964
43977
  let context = null;
@@ -44316,13 +44329,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
44316
44329
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
44317
44330
  * standard `SENTRY_RELEASE` override.
44318
44331
  */
44319
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.5.5-dev.daf0579`;
44332
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.5.5-dev.ea3b827`;
44320
44333
  /**
44321
44334
  * Deployment environment shown in Sentry's environment filter. Defaults to
44322
44335
  * `production` for tagged releases and `development` for dev/unbuilt versions,
44323
44336
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
44324
44337
  */
44325
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.5.5-dev.daf0579") ? "development" : "production");
44338
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.5.5-dev.ea3b827") ? "development" : "production");
44326
44339
  /**
44327
44340
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
44328
44341
  * (set to `0` to disable tracing) and falls back to
@@ -53934,4 +53947,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
53934
53947
  export {};
53935
53948
 
53936
53949
  //# sourceMappingURL=cli.js.map
53937
- //# debugId=6dbc8bb2-d9b5-598b-8dd1-cc093b061b68
53950
+ //# debugId=e03b6154-4b3f-5b73-9f74-118d3b39e6b0
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="547655b4-95a2-5599-be6e-d30cf62327d7")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0b246e36-6877-5145-9560-a392af70ee30")}catch(e){}}();
3
3
  import { r as __toESM$1, t as __commonJSMin$1 } from "./chunk-N93fKeF6.js";
4
4
  import { createRequire } from "node:module";
5
5
  import * as NFS from "node:fs";
@@ -36520,13 +36520,24 @@ const checkSecurityScan = (rootDirectory, options = {}) => {
36520
36520
  if (!shouldEnableRule(rule.requires, rule.tags, capabilities, ignoredTags, rule.disabledBy)) return [];
36521
36521
  return [{
36522
36522
  entry,
36523
- scan
36523
+ scan,
36524
+ committedFilesOnly: rule.committedFilesOnly === true
36524
36525
  }];
36525
36526
  });
36526
36527
  if (enabledScanRules.length === 0) return [];
36527
36528
  const diagnostics = [];
36528
36529
  const seen = /* @__PURE__ */ new Set();
36529
- for (const file of collectSecurityScanFiles(rootDirectory)) for (const { entry, scan } of enabledScanRules) for (const finding of scan(file)) {
36530
+ const gitIgnoredCache = /* @__PURE__ */ new Map();
36531
+ const isFileGitIgnored = (file) => {
36532
+ let status = gitIgnoredCache.get(file.absolutePath);
36533
+ if (status === void 0) {
36534
+ status = isPathGitIgnored(rootDirectory, file.absolutePath);
36535
+ gitIgnoredCache.set(file.absolutePath, status);
36536
+ }
36537
+ return status === true;
36538
+ };
36539
+ for (const file of collectSecurityScanFiles(rootDirectory)) for (const { entry, scan, committedFilesOnly } of enabledScanRules) for (const finding of scan(file)) {
36540
+ if (committedFilesOnly && isFileGitIgnored(file)) continue;
36530
36541
  const diagnostic = buildSecurityScanDiagnostic(finding, entry, file.relativePath);
36531
36542
  const key = `${diagnostic.rule}:${diagnostic.filePath}:${diagnostic.line}:${diagnostic.column}:${diagnostic.message}`;
36532
36543
  if (seen.has(key)) continue;
@@ -39537,6 +39548,8 @@ const resolveConcreteVersion = (spec) => {
39537
39548
  const trimmed = spec.trim();
39538
39549
  if (trimmed.length === 0) return null;
39539
39550
  if (trimmed.includes(":")) return null;
39551
+ const range = import_semver.validRange(trimmed);
39552
+ if (range === null || range === "*") return null;
39540
39553
  return import_semver.minVersion(trimmed)?.version ?? null;
39541
39554
  };
39542
39555
  const locateDependencyKey = (packageJsonText, section, name) => {
@@ -40559,4 +40572,4 @@ const toJsonReport = (result, options) => buildJsonReport({
40559
40572
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
40560
40573
 
40561
40574
  //# sourceMappingURL=index.js.map
40562
- //# debugId=547655b4-95a2-5599-be6e-d30cf62327d7
40575
+ //# debugId=0b246e36-6877-5145-9560-a392af70ee30
package/dist/lsp.js CHANGED
@@ -36506,13 +36506,24 @@ const checkSecurityScan = (rootDirectory, options = {}) => {
36506
36506
  if (!shouldEnableRule(rule.requires, rule.tags, capabilities, ignoredTags, rule.disabledBy)) return [];
36507
36507
  return [{
36508
36508
  entry,
36509
- scan
36509
+ scan,
36510
+ committedFilesOnly: rule.committedFilesOnly === true
36510
36511
  }];
36511
36512
  });
36512
36513
  if (enabledScanRules.length === 0) return [];
36513
36514
  const diagnostics = [];
36514
36515
  const seen = /* @__PURE__ */ new Set();
36515
- for (const file of collectSecurityScanFiles(rootDirectory)) for (const { entry, scan } of enabledScanRules) for (const finding of scan(file)) {
36516
+ const gitIgnoredCache = /* @__PURE__ */ new Map();
36517
+ const isFileGitIgnored = (file) => {
36518
+ let status = gitIgnoredCache.get(file.absolutePath);
36519
+ if (status === void 0) {
36520
+ status = isPathGitIgnored(rootDirectory, file.absolutePath);
36521
+ gitIgnoredCache.set(file.absolutePath, status);
36522
+ }
36523
+ return status === true;
36524
+ };
36525
+ for (const file of collectSecurityScanFiles(rootDirectory)) for (const { entry, scan, committedFilesOnly } of enabledScanRules) for (const finding of scan(file)) {
36526
+ if (committedFilesOnly && isFileGitIgnored(file)) continue;
36516
36527
  const diagnostic = buildSecurityScanDiagnostic(finding, entry, file.relativePath);
36517
36528
  const key = `${diagnostic.rule}:${diagnostic.filePath}:${diagnostic.line}:${diagnostic.column}:${diagnostic.message}`;
36518
36529
  if (seen.has(key)) continue;
@@ -39523,6 +39534,8 @@ const resolveConcreteVersion = (spec) => {
39523
39534
  const trimmed = spec.trim();
39524
39535
  if (trimmed.length === 0) return null;
39525
39536
  if (trimmed.includes(":")) return null;
39537
+ const range = import_semver.validRange(trimmed);
39538
+ if (range === null || range === "*") return null;
39526
39539
  return import_semver.minVersion(trimmed)?.version ?? null;
39527
39540
  };
39528
39541
  const locateDependencyKey = (packageJsonText, section, name) => {
@@ -42344,5 +42357,5 @@ const startLanguageServer = () => {
42344
42357
  };
42345
42358
  //#endregion
42346
42359
  export { startLanguageServer };
42347
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="98cc6fbf-9034-527e-835c-0b5664ef94b5")}catch(e){}}();
42348
- //# debugId=98cc6fbf-9034-527e-835c-0b5664ef94b5
42360
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6648983d-3832-5f00-93a7-24daacde01bb")}catch(e){}}();
42361
+ //# debugId=6648983d-3832-5f00-93a7-24daacde01bb
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.5.5-dev.daf0579",
3
+ "version": "0.5.5-dev.ea3b827",
4
4
  "description": "Your agent writes bad React. This catches it",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -64,7 +64,7 @@
64
64
  "vscode-languageserver": "^9.0.1",
65
65
  "vscode-languageserver-textdocument": "^1.0.12",
66
66
  "vscode-uri": "^3.1.0",
67
- "oxlint-plugin-react-doctor": "0.5.5-dev.daf0579"
67
+ "oxlint-plugin-react-doctor": "0.5.5-dev.ea3b827"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@types/babel__code-frame": "^7.27.0",
@@ -72,9 +72,9 @@
72
72
  "@xterm/headless": "^6.0.0",
73
73
  "commander": "^14.0.3",
74
74
  "ora": "^9.4.0",
75
+ "@react-doctor/language-server": "0.5.5",
75
76
  "@react-doctor/api": "0.5.5",
76
- "@react-doctor/core": "0.5.5",
77
- "@react-doctor/language-server": "0.5.5"
77
+ "@react-doctor/core": "0.5.5"
78
78
  },
79
79
  "engines": {
80
80
  "node": "^20.19.0 || >=22.13.0"