react-doctor 0.5.4-dev.f229c75 → 0.5.5-dev.5fc0e27

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]="29f40666-370d-53b1-bcac-1777ef9f13a4")}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;
@@ -43958,7 +43969,7 @@ const makeNoopConsole = () => ({
43958
43969
  });
43959
43970
  //#endregion
43960
43971
  //#region src/cli/utils/version.ts
43961
- const VERSION = "0.5.4-dev.f229c75";
43972
+ const VERSION = "0.5.5-dev.5fc0e27";
43962
43973
  //#endregion
43963
43974
  //#region src/cli/utils/json-mode.ts
43964
43975
  let context = null;
@@ -44316,13 +44327,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
44316
44327
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
44317
44328
  * standard `SENTRY_RELEASE` override.
44318
44329
  */
44319
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.5.4-dev.f229c75`;
44330
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.5.5-dev.5fc0e27`;
44320
44331
  /**
44321
44332
  * Deployment environment shown in Sentry's environment filter. Defaults to
44322
44333
  * `production` for tagged releases and `development` for dev/unbuilt versions,
44323
44334
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
44324
44335
  */
44325
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.5.4-dev.f229c75") ? "development" : "production");
44336
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.5.5-dev.5fc0e27") ? "development" : "production");
44326
44337
  /**
44327
44338
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
44328
44339
  * (set to `0` to disable tracing) and falls back to
@@ -53934,4 +53945,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
53934
53945
  export {};
53935
53946
 
53936
53947
  //# sourceMappingURL=cli.js.map
53937
- //# debugId=6dbc8bb2-d9b5-598b-8dd1-cc093b061b68
53948
+ //# debugId=29f40666-370d-53b1-bcac-1777ef9f13a4
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]="29f33fbb-8ad8-5d0b-ab70-b9953d4ffcb3")}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;
@@ -40559,4 +40570,4 @@ const toJsonReport = (result, options) => buildJsonReport({
40559
40570
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
40560
40571
 
40561
40572
  //# sourceMappingURL=index.js.map
40562
- //# debugId=547655b4-95a2-5599-be6e-d30cf62327d7
40573
+ //# debugId=29f33fbb-8ad8-5d0b-ab70-b9953d4ffcb3
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;
@@ -40297,7 +40308,7 @@ const computeConfigFingerprint = (projectDirectory, version) => {
40297
40308
  /** Display name used in client-facing messages and progress titles. */
40298
40309
  const SERVER_DISPLAY_NAME = "React Doctor";
40299
40310
  /** Server version reported in `serverInfo`; injected at build, `dev` from source. */
40300
- const SERVER_VERSION = "0.5.4";
40311
+ const SERVER_VERSION = "0.5.5";
40301
40312
  /** `Diagnostic.source` shown next to every published diagnostic. */
40302
40313
  const DIAGNOSTIC_SOURCE = "react-doctor";
40303
40314
  /**
@@ -42344,5 +42355,5 @@ const startLanguageServer = () => {
42344
42355
  };
42345
42356
  //#endregion
42346
42357
  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]="f541aa86-315a-587e-b095-1ac51432acae")}catch(e){}}();
42348
- //# debugId=f541aa86-315a-587e-b095-1ac51432acae
42358
+ !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]="f8284976-2343-55ba-b2a3-597b8d798e4b")}catch(e){}}();
42359
+ //# debugId=f8284976-2343-55ba-b2a3-597b8d798e4b
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.5.4-dev.f229c75",
3
+ "version": "0.5.5-dev.5fc0e27",
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.4-dev.f229c75"
67
+ "oxlint-plugin-react-doctor": "0.5.5-dev.5fc0e27"
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/core": "0.5.4",
76
- "@react-doctor/api": "0.5.4",
77
- "@react-doctor/language-server": "0.5.4"
75
+ "@react-doctor/core": "0.5.5",
76
+ "@react-doctor/language-server": "0.5.5",
77
+ "@react-doctor/api": "0.5.5"
78
78
  },
79
79
  "engines": {
80
80
  "node": "^20.19.0 || >=22.13.0"