react-doctor 0.7.0-dev.6b21b70 → 0.7.0
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 +6 -32
- package/dist/index.d.ts +1 -40
- package/dist/index.js +5 -28
- package/dist/lsp.js +3 -23
- package/package.json +2 -2
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]="
|
|
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]="96cac03b-44a6-5d88-a5c9-697a5e8cf45e")}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";
|
|
@@ -22475,16 +22475,6 @@ var JsonReportV1 = class extends Class("JsonReportV1")({
|
|
|
22475
22475
|
* successful `baseline` run (`schemaVersion: 2`) and on non-compare scopes.
|
|
22476
22476
|
*/
|
|
22477
22477
|
baselineDegraded: optional(Boolean$1),
|
|
22478
|
-
/**
|
|
22479
|
-
* Whether any scanned project resolved a React-compatible runtime (React
|
|
22480
|
-
* or Preact). `false` means every React-runtime rule family was gated off,
|
|
22481
|
-
* so an empty `diagnostics` array is vacuous — NOT the same as a clean
|
|
22482
|
-
* React scan. Consumers gating on the report (CI, verifiers, hooks) should
|
|
22483
|
-
* treat `reactDetected === false` as "wrong scan target", not "all clear".
|
|
22484
|
-
* Absent when nothing was scanned (`projects` is empty), on error reports,
|
|
22485
|
-
* and on reports from older CLI versions.
|
|
22486
|
-
*/
|
|
22487
|
-
reactDetected: optional(Boolean$1),
|
|
22488
22478
|
diff: NullOr(JsonReportDiffInfo),
|
|
22489
22479
|
projects: ArraySchema(JsonReportProjectEntry),
|
|
22490
22480
|
diagnostics: ArraySchema(Diagnostic),
|
|
@@ -22510,8 +22500,6 @@ var JsonReportV2 = class extends Class("JsonReportV2")({
|
|
|
22510
22500
|
ok: Boolean$1,
|
|
22511
22501
|
directory: String$1,
|
|
22512
22502
|
mode: JsonReportMode,
|
|
22513
|
-
/** See `JsonReportV1.reactDetected`. */
|
|
22514
|
-
reactDetected: optional(Boolean$1),
|
|
22515
22503
|
diff: NullOr(JsonReportDiffInfo),
|
|
22516
22504
|
baseline: JsonReportBaseline,
|
|
22517
22505
|
projects: ArraySchema(JsonReportProjectEntry),
|
|
@@ -40249,17 +40237,10 @@ function* collectSecurityScanFiles(rootDirectory) {
|
|
|
40249
40237
|
}
|
|
40250
40238
|
}
|
|
40251
40239
|
}
|
|
40252
|
-
/**
|
|
40253
|
-
* Whether project discovery resolved a React-compatible runtime (React or
|
|
40254
|
-
* Preact, which ships the same hooks + JSX model). This is the same
|
|
40255
|
-
* predicate that grants the `react` capability, so `false` means every
|
|
40256
|
-
* React-runtime rule family was gated off for the project.
|
|
40257
|
-
*/
|
|
40258
|
-
const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null;
|
|
40259
40240
|
const buildCapabilities = (project) => {
|
|
40260
40241
|
const capabilities = /* @__PURE__ */ new Set();
|
|
40261
40242
|
capabilities.add(project.framework);
|
|
40262
|
-
if (
|
|
40243
|
+
if (project.reactVersion !== null || project.preactVersion !== null) capabilities.add("react");
|
|
40263
40244
|
if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
|
|
40264
40245
|
if (project.expoVersion !== null) capabilities.add("expo");
|
|
40265
40246
|
if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
|
|
@@ -45374,7 +45355,6 @@ const buildJsonReport = (input) => {
|
|
|
45374
45355
|
const worstScoredProject = findWorstScoredProject(projects);
|
|
45375
45356
|
const summary = summarizeDiagnostics(flattenedDiagnostics, worstScoredProject?.score?.score ?? null, worstScoredProject?.score?.label ?? null);
|
|
45376
45357
|
const shared = {
|
|
45377
|
-
...input.scans.length > 0 ? { reactDetected: input.scans.some((scan) => hasReactRuntime(scan.result.project)) } : {},
|
|
45378
45358
|
version: input.version,
|
|
45379
45359
|
ok: true,
|
|
45380
45360
|
directory: input.directory,
|
|
@@ -45838,7 +45818,6 @@ const METRIC = {
|
|
|
45838
45818
|
scanScore: "scan.score",
|
|
45839
45819
|
scanClean: "scan.clean",
|
|
45840
45820
|
scanCheckSkipped: "scan.check_skipped",
|
|
45841
|
-
scanNoReactDetected: "scan.no_react_detected",
|
|
45842
45821
|
baselineDegraded: "baseline.degraded",
|
|
45843
45822
|
ruleFired: "rule.fired",
|
|
45844
45823
|
ruleDisabled: "rule.disabled",
|
|
@@ -45908,7 +45887,7 @@ const makeNoopConsole = () => ({
|
|
|
45908
45887
|
});
|
|
45909
45888
|
//#endregion
|
|
45910
45889
|
//#region src/cli/utils/version.ts
|
|
45911
|
-
const VERSION = "0.7.0
|
|
45890
|
+
const VERSION = "0.7.0";
|
|
45912
45891
|
//#endregion
|
|
45913
45892
|
//#region src/cli/utils/json-mode.ts
|
|
45914
45893
|
let context = null;
|
|
@@ -46277,13 +46256,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
46277
46256
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
46278
46257
|
* standard `SENTRY_RELEASE` override.
|
|
46279
46258
|
*/
|
|
46280
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.0
|
|
46259
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.0`;
|
|
46281
46260
|
/**
|
|
46282
46261
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
46283
46262
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
46284
46263
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
46285
46264
|
*/
|
|
46286
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.0
|
|
46265
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.0") ? "development" : "production");
|
|
46287
46266
|
/**
|
|
46288
46267
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
46289
46268
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -62996,11 +62975,6 @@ const finalizeScans = (input) => {
|
|
|
62996
62975
|
const baselineComputed = input.completedScans.length > 0 && input.completedScans.every((scan) => scan.result.baselineDelta !== void 0);
|
|
62997
62976
|
const baselineDegraded = input.baselineIntended && !baselineComputed;
|
|
62998
62977
|
const mode = baselineDegraded ? "diff" : input.mode;
|
|
62999
|
-
const isReactDetected = input.completedScans.some((scan) => hasReactRuntime(scan.result.project));
|
|
63000
|
-
if (input.completedScans.length > 0 && !isReactDetected) {
|
|
63001
|
-
recordCount(METRIC.scanNoReactDetected, 1);
|
|
63002
|
-
cliLogger.warn(`No React project detected at ${input.resolvedDirectory} — React rules were gated off; this is not the same as a clean scan.`);
|
|
63003
|
-
}
|
|
63004
62978
|
const jsonCompletedScans = filterCompletedScansByCategories(input.completedScans, input.categoryFilters);
|
|
63005
62979
|
if (input.isJsonMode) {
|
|
63006
62980
|
const baseline = baselineComputed && baselineDeltas.length > 0 ? {
|
|
@@ -64438,4 +64412,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
64438
64412
|
export {};
|
|
64439
64413
|
|
|
64440
64414
|
//# sourceMappingURL=cli.js.map
|
|
64441
|
-
//# debugId=
|
|
64415
|
+
//# debugId=96cac03b-44a6-5d88-a5c9-697a5e8cf45e
|
package/dist/index.d.ts
CHANGED
|
@@ -9644,17 +9644,6 @@ interface DiagnoseResult {
|
|
|
9644
9644
|
/** See `InspectResult.skippedCheckReasons`. */
|
|
9645
9645
|
skippedCheckReasons?: Record<string, string>;
|
|
9646
9646
|
project: ProjectInfo;
|
|
9647
|
-
/**
|
|
9648
|
-
* Whether the scanned project resolved a React-compatible runtime (React
|
|
9649
|
-
* or Preact). `false` means every React-runtime rule family was gated
|
|
9650
|
-
* off, so an empty `diagnostics` array is vacuous — NOT the same as a
|
|
9651
|
-
* clean React scan. Consumers gating on the result should treat
|
|
9652
|
-
* `reactDetected === false` as "wrong scan target", not "all clear".
|
|
9653
|
-
* Mirrors `JsonReport.reactDetected`; same predicate as
|
|
9654
|
-
* `hasReactRuntime(result.project)`. Always set by `diagnose()`;
|
|
9655
|
-
* optional so hand-constructed results keep compiling.
|
|
9656
|
-
*/
|
|
9657
|
-
reactDetected?: boolean;
|
|
9658
9647
|
elapsedMilliseconds: number;
|
|
9659
9648
|
}
|
|
9660
9649
|
/**
|
|
@@ -9704,13 +9693,6 @@ interface DiagnoseProjectsResult {
|
|
|
9704
9693
|
projects: ProjectResult[];
|
|
9705
9694
|
diagnostics: Diagnostic[];
|
|
9706
9695
|
score: ScoreResult | null;
|
|
9707
|
-
/**
|
|
9708
|
-
* Whether any successfully scanned project resolved a React-compatible
|
|
9709
|
-
* runtime (React or Preact). Absent when no project scanned successfully.
|
|
9710
|
-
* See `DiagnoseResult.reactDetected` for gating guidance; per-project
|
|
9711
|
-
* detail is on each `ProjectResultOk.reactDetected`.
|
|
9712
|
-
*/
|
|
9713
|
-
reactDetected?: boolean;
|
|
9714
9696
|
elapsedMilliseconds: number;
|
|
9715
9697
|
} //#endregion
|
|
9716
9698
|
//#region src/types/handle-error.d.ts
|
|
@@ -9906,17 +9888,6 @@ interface JsonReportV1$1 {
|
|
|
9906
9888
|
ok: boolean;
|
|
9907
9889
|
directory: string;
|
|
9908
9890
|
mode: JsonReportMode;
|
|
9909
|
-
/**
|
|
9910
|
-
* Whether any scanned project resolved a React-compatible runtime (React
|
|
9911
|
-
* or Preact). `false` means every React-runtime rule family was gated off,
|
|
9912
|
-
* so an empty `diagnostics` array is vacuous — NOT the same as a clean
|
|
9913
|
-
* React scan. Consumers gating on the report (CI, verifiers, hooks) should
|
|
9914
|
-
* treat `reactDetected === false` as "wrong scan target", not "all clear"
|
|
9915
|
-
* (per project, `projects[].project.reactVersion` / `preactVersion` say
|
|
9916
|
-
* which roots were non-React). Absent when nothing was scanned (`projects`
|
|
9917
|
-
* is empty), on error reports, and on reports from older CLI versions.
|
|
9918
|
-
*/
|
|
9919
|
-
reactDetected?: boolean;
|
|
9920
9891
|
diff: JsonReportDiffInfo | null;
|
|
9921
9892
|
projects: JsonReportProjectEntry[];
|
|
9922
9893
|
/**
|
|
@@ -10201,16 +10172,6 @@ declare const summarizeDiagnostics: (diagnostics: Diagnostic[], worstScore?: num
|
|
|
10201
10172
|
declare const defineConfig: (config: ReactDoctorConfig) => ReactDoctorConfig; //#endregion
|
|
10202
10173
|
//#region src/utils/detect-ai-training-environment.d.ts
|
|
10203
10174
|
//#endregion
|
|
10204
|
-
//#region src/utils/has-react-runtime.d.ts
|
|
10205
|
-
/**
|
|
10206
|
-
* Whether project discovery resolved a React-compatible runtime (React or
|
|
10207
|
-
* Preact, which ships the same hooks + JSX model). This is the same
|
|
10208
|
-
* predicate that grants the `react` capability, so `false` means every
|
|
10209
|
-
* React-runtime rule family was gated off for the project.
|
|
10210
|
-
*/
|
|
10211
|
-
declare const hasReactRuntime: (project: ProjectInfo) => boolean; //#endregion
|
|
10212
|
-
//#region src/utils/is-errno-exception.d.ts
|
|
10213
|
-
//#endregion
|
|
10214
10175
|
//#region ../api/dist/index.d.ts
|
|
10215
10176
|
//#region src/diagnose.d.ts
|
|
10216
10177
|
interface Diagnose {
|
|
@@ -10237,5 +10198,5 @@ interface ToJsonReportOptions {
|
|
|
10237
10198
|
}
|
|
10238
10199
|
declare const toJsonReport: (result: DiagnoseResult, options: ToJsonReportOptions) => JsonReport;
|
|
10239
10200
|
//#endregion
|
|
10240
|
-
export { AmbiguousProjectError, type DiagnoseOptions, type DiagnoseProjectsInput, type DiagnoseProjectsResult, type DiagnoseResult, type Diagnostic, type DiffInfo, type JsonReport, type JsonReportDiffInfo, type JsonReportError, type JsonReportMode, type JsonReportProjectEntry, type JsonReportSummary, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, type ProjectDefinition, type ProjectInfo, ProjectNotFoundError, type ProjectResult, type ProjectResultError, type ProjectResultOk, type ReactDoctorConfig, ReactDoctorError, type ScoreResult, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo,
|
|
10201
|
+
export { AmbiguousProjectError, type DiagnoseOptions, type DiagnoseProjectsInput, type DiagnoseProjectsResult, type DiagnoseResult, type Diagnostic, type DiffInfo, type JsonReport, type JsonReportDiffInfo, type JsonReportError, type JsonReportMode, type JsonReportProjectEntry, type JsonReportSummary, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, type ProjectDefinition, type ProjectInfo, ProjectNotFoundError, type ProjectResult, type ProjectResultError, type ProjectResultOk, type ReactDoctorConfig, ReactDoctorError, type ScoreResult, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
10241
10202
|
//# sourceMappingURL=index.d.ts.map
|
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]="
|
|
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]="5c52dece-7b5e-5102-9381-7d05fa45734f")}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";
|
|
@@ -19374,16 +19374,6 @@ var JsonReportV1 = class extends Class("JsonReportV1")({
|
|
|
19374
19374
|
* successful `baseline` run (`schemaVersion: 2`) and on non-compare scopes.
|
|
19375
19375
|
*/
|
|
19376
19376
|
baselineDegraded: optional(Boolean$1),
|
|
19377
|
-
/**
|
|
19378
|
-
* Whether any scanned project resolved a React-compatible runtime (React
|
|
19379
|
-
* or Preact). `false` means every React-runtime rule family was gated off,
|
|
19380
|
-
* so an empty `diagnostics` array is vacuous — NOT the same as a clean
|
|
19381
|
-
* React scan. Consumers gating on the report (CI, verifiers, hooks) should
|
|
19382
|
-
* treat `reactDetected === false` as "wrong scan target", not "all clear".
|
|
19383
|
-
* Absent when nothing was scanned (`projects` is empty), on error reports,
|
|
19384
|
-
* and on reports from older CLI versions.
|
|
19385
|
-
*/
|
|
19386
|
-
reactDetected: optional(Boolean$1),
|
|
19387
19377
|
diff: NullOr(JsonReportDiffInfo),
|
|
19388
19378
|
projects: ArraySchema(JsonReportProjectEntry),
|
|
19389
19379
|
diagnostics: ArraySchema(Diagnostic),
|
|
@@ -19409,8 +19399,6 @@ var JsonReportV2 = class extends Class("JsonReportV2")({
|
|
|
19409
19399
|
ok: Boolean$1,
|
|
19410
19400
|
directory: String$1,
|
|
19411
19401
|
mode: JsonReportMode,
|
|
19412
|
-
/** See `JsonReportV1.reactDetected`. */
|
|
19413
|
-
reactDetected: optional(Boolean$1),
|
|
19414
19402
|
diff: NullOr(JsonReportDiffInfo),
|
|
19415
19403
|
baseline: JsonReportBaseline,
|
|
19416
19404
|
projects: ArraySchema(JsonReportProjectEntry),
|
|
@@ -37022,17 +37010,10 @@ function* collectSecurityScanFiles(rootDirectory) {
|
|
|
37022
37010
|
}
|
|
37023
37011
|
}
|
|
37024
37012
|
}
|
|
37025
|
-
/**
|
|
37026
|
-
* Whether project discovery resolved a React-compatible runtime (React or
|
|
37027
|
-
* Preact, which ships the same hooks + JSX model). This is the same
|
|
37028
|
-
* predicate that grants the `react` capability, so `false` means every
|
|
37029
|
-
* React-runtime rule family was gated off for the project.
|
|
37030
|
-
*/
|
|
37031
|
-
const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null;
|
|
37032
37013
|
const buildCapabilities = (project) => {
|
|
37033
37014
|
const capabilities = /* @__PURE__ */ new Set();
|
|
37034
37015
|
capabilities.add(project.framework);
|
|
37035
|
-
if (
|
|
37016
|
+
if (project.reactVersion !== null || project.preactVersion !== null) capabilities.add("react");
|
|
37036
37017
|
if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
|
|
37037
37018
|
if (project.expoVersion !== null) capabilities.add("expo");
|
|
37038
37019
|
if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
|
|
@@ -42107,7 +42088,6 @@ const buildJsonReport = (input) => {
|
|
|
42107
42088
|
const worstScoredProject = findWorstScoredProject(projects);
|
|
42108
42089
|
const summary = summarizeDiagnostics(flattenedDiagnostics, worstScoredProject?.score?.score ?? null, worstScoredProject?.score?.label ?? null);
|
|
42109
42090
|
const shared = {
|
|
42110
|
-
...input.scans.length > 0 ? { reactDetected: input.scans.some((scan) => hasReactRuntime(scan.result.project)) } : {},
|
|
42111
42091
|
version: input.version,
|
|
42112
42092
|
ok: true,
|
|
42113
42093
|
directory: input.directory,
|
|
@@ -42337,7 +42317,6 @@ const outputToDiagnoseResult = (output, elapsedMilliseconds) => {
|
|
|
42337
42317
|
skippedChecks,
|
|
42338
42318
|
...Object.keys(skippedCheckReasons).length > 0 ? { skippedCheckReasons } : {},
|
|
42339
42319
|
project: output.project,
|
|
42340
|
-
reactDetected: hasReactRuntime(output.project),
|
|
42341
42320
|
elapsedMilliseconds
|
|
42342
42321
|
};
|
|
42343
42322
|
};
|
|
@@ -42393,12 +42372,10 @@ const diagnoseProjectBatch = async (input) => {
|
|
|
42393
42372
|
const startTime = globalThis.performance.now();
|
|
42394
42373
|
const { projects, concurrency, config: batchConfig, ...baseOptions } = input;
|
|
42395
42374
|
const projectResults = await mapWithConcurrency(projects, concurrency ?? 4, (projectDefinition) => diagnoseProject(projectDefinition, baseOptions, batchConfig));
|
|
42396
|
-
const succeededProjects = projectResults.filter((projectResult) => projectResult.ok);
|
|
42397
42375
|
return {
|
|
42398
42376
|
projects: projectResults,
|
|
42399
|
-
diagnostics:
|
|
42377
|
+
diagnostics: projectResults.flatMap((projectResult) => projectResult.ok ? projectResult.diagnostics : []),
|
|
42400
42378
|
score: findWorstScore(projectResults),
|
|
42401
|
-
...succeededProjects.length > 0 ? { reactDetected: succeededProjects.some((projectResult) => projectResult.reactDetected) } : {},
|
|
42402
42379
|
elapsedMilliseconds: globalThis.performance.now() - startTime
|
|
42403
42380
|
};
|
|
42404
42381
|
};
|
|
@@ -42433,7 +42410,7 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
42433
42410
|
totalElapsedMilliseconds: result.elapsedMilliseconds
|
|
42434
42411
|
});
|
|
42435
42412
|
//#endregion
|
|
42436
|
-
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo,
|
|
42413
|
+
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
42437
42414
|
|
|
42438
42415
|
//# sourceMappingURL=index.js.map
|
|
42439
|
-
//# debugId=
|
|
42416
|
+
//# debugId=5c52dece-7b5e-5102-9381-7d05fa45734f
|
package/dist/lsp.js
CHANGED
|
@@ -19410,16 +19410,6 @@ var JsonReportV1 = class extends Class("JsonReportV1")({
|
|
|
19410
19410
|
* successful `baseline` run (`schemaVersion: 2`) and on non-compare scopes.
|
|
19411
19411
|
*/
|
|
19412
19412
|
baselineDegraded: optional(Boolean$1),
|
|
19413
|
-
/**
|
|
19414
|
-
* Whether any scanned project resolved a React-compatible runtime (React
|
|
19415
|
-
* or Preact). `false` means every React-runtime rule family was gated off,
|
|
19416
|
-
* so an empty `diagnostics` array is vacuous — NOT the same as a clean
|
|
19417
|
-
* React scan. Consumers gating on the report (CI, verifiers, hooks) should
|
|
19418
|
-
* treat `reactDetected === false` as "wrong scan target", not "all clear".
|
|
19419
|
-
* Absent when nothing was scanned (`projects` is empty), on error reports,
|
|
19420
|
-
* and on reports from older CLI versions.
|
|
19421
|
-
*/
|
|
19422
|
-
reactDetected: optional(Boolean$1),
|
|
19423
19413
|
diff: NullOr(JsonReportDiffInfo),
|
|
19424
19414
|
projects: ArraySchema(JsonReportProjectEntry),
|
|
19425
19415
|
diagnostics: ArraySchema(Diagnostic),
|
|
@@ -19445,8 +19435,6 @@ var JsonReportV2 = class extends Class("JsonReportV2")({
|
|
|
19445
19435
|
ok: Boolean$1,
|
|
19446
19436
|
directory: String$1,
|
|
19447
19437
|
mode: JsonReportMode,
|
|
19448
|
-
/** See `JsonReportV1.reactDetected`. */
|
|
19449
|
-
reactDetected: optional(Boolean$1),
|
|
19450
19438
|
diff: NullOr(JsonReportDiffInfo),
|
|
19451
19439
|
baseline: JsonReportBaseline,
|
|
19452
19440
|
projects: ArraySchema(JsonReportProjectEntry),
|
|
@@ -37007,17 +36995,10 @@ function* collectSecurityScanFiles(rootDirectory) {
|
|
|
37007
36995
|
}
|
|
37008
36996
|
}
|
|
37009
36997
|
}
|
|
37010
|
-
/**
|
|
37011
|
-
* Whether project discovery resolved a React-compatible runtime (React or
|
|
37012
|
-
* Preact, which ships the same hooks + JSX model). This is the same
|
|
37013
|
-
* predicate that grants the `react` capability, so `false` means every
|
|
37014
|
-
* React-runtime rule family was gated off for the project.
|
|
37015
|
-
*/
|
|
37016
|
-
const hasReactRuntime = (project) => project.reactVersion !== null || project.preactVersion !== null;
|
|
37017
36998
|
const buildCapabilities = (project) => {
|
|
37018
36999
|
const capabilities = /* @__PURE__ */ new Set();
|
|
37019
37000
|
capabilities.add(project.framework);
|
|
37020
|
-
if (
|
|
37001
|
+
if (project.reactVersion !== null || project.preactVersion !== null) capabilities.add("react");
|
|
37021
37002
|
if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
|
|
37022
37003
|
if (project.expoVersion !== null) capabilities.add("expo");
|
|
37023
37004
|
if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
|
|
@@ -43811,7 +43792,6 @@ const METRIC = {
|
|
|
43811
43792
|
scanScore: "scan.score",
|
|
43812
43793
|
scanClean: "scan.clean",
|
|
43813
43794
|
scanCheckSkipped: "scan.check_skipped",
|
|
43814
|
-
scanNoReactDetected: "scan.no_react_detected",
|
|
43815
43795
|
baselineDegraded: "baseline.degraded",
|
|
43816
43796
|
ruleFired: "rule.fired",
|
|
43817
43797
|
ruleDisabled: "rule.disabled",
|
|
@@ -44155,5 +44135,5 @@ const startLanguageServer = () => {
|
|
|
44155
44135
|
};
|
|
44156
44136
|
//#endregion
|
|
44157
44137
|
export { startLanguageServer };
|
|
44158
|
-
!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]="
|
|
44159
|
-
//# debugId=
|
|
44138
|
+
!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]="1b40bd68-7ad4-55e0-a6bd-91b6cdcd0ba8")}catch(e){}}();
|
|
44139
|
+
//# debugId=1b40bd68-7ad4-55e0-a6bd-91b6cdcd0ba8
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.7.0
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vscode-uri": "^3.1.0",
|
|
67
67
|
"yaml": "^2.9.0",
|
|
68
68
|
"deslop-js": "0.7.0",
|
|
69
|
-
"oxlint-plugin-react-doctor": "0.7.0
|
|
69
|
+
"oxlint-plugin-react-doctor": "0.7.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/babel__code-frame": "^7.27.0",
|