react-doctor 0.8.1-dev.90e794f → 0.8.1-dev.a4eaedd
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 +22 -5
- package/dist/index.d.ts +9 -0
- package/dist/index.js +19 -2
- package/dist/lsp.js +19 -2
- package/package.json +4 -4
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]="83a484ab-e975-5390-830a-f2f723c71935")}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";
|
|
@@ -37361,6 +37361,10 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
37361
37361
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
37362
37362
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
37363
37363
|
}
|
|
37364
|
+
if (facts.valtioVersion === null) {
|
|
37365
|
+
const spec = getDependencySpec(packageJson, "valtio");
|
|
37366
|
+
if (spec !== null) facts.valtioVersion = spec;
|
|
37367
|
+
}
|
|
37364
37368
|
facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
|
|
37365
37369
|
facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
|
|
37366
37370
|
facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
|
|
@@ -37383,6 +37387,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
37383
37387
|
version: null,
|
|
37384
37388
|
sourceDirectory: null
|
|
37385
37389
|
},
|
|
37390
|
+
valtioVersion: null,
|
|
37386
37391
|
hasReactNativeAwarePackage: false,
|
|
37387
37392
|
hasReanimatedAwarePackage: false,
|
|
37388
37393
|
hasSsrDependency: false,
|
|
@@ -37623,6 +37628,8 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
37623
37628
|
hasReactCompiler: false,
|
|
37624
37629
|
hasReactCompilerLintPlugin: false,
|
|
37625
37630
|
hasTanStackQuery: false,
|
|
37631
|
+
valtioVersion: null,
|
|
37632
|
+
valtioMajorVersion: null,
|
|
37626
37633
|
hasSsrDependency: false,
|
|
37627
37634
|
preactVersion: null,
|
|
37628
37635
|
preactMajorVersion: null,
|
|
@@ -37729,6 +37736,12 @@ const discoverProject = (directory) => {
|
|
|
37729
37736
|
packageName: "next",
|
|
37730
37737
|
version: workspaceFacts.next.version
|
|
37731
37738
|
}) : null;
|
|
37739
|
+
const valtioVersion = resolveCatalogBackedDependencyVersion({
|
|
37740
|
+
rootDirectory: directory,
|
|
37741
|
+
rootPackageJson: packageJson,
|
|
37742
|
+
packageName: "valtio",
|
|
37743
|
+
version: workspaceFacts.valtioVersion
|
|
37744
|
+
});
|
|
37732
37745
|
const preactVersion = getPreactVersion(packageJson);
|
|
37733
37746
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
37734
37747
|
const projectInfo = {
|
|
@@ -37744,6 +37757,8 @@ const discoverProject = (directory) => {
|
|
|
37744
37757
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
37745
37758
|
hasReactCompilerLintPlugin: detectReactCompilerLintPlugin(directory, packageJson),
|
|
37746
37759
|
hasTanStackQuery: hasTanStackQuery(packageJson),
|
|
37760
|
+
valtioVersion,
|
|
37761
|
+
valtioMajorVersion: valtioVersion === null ? null : getLowestDependencyMajor(valtioVersion),
|
|
37747
37762
|
hasSsrDependency: workspaceFacts.hasSsrDependency,
|
|
37748
37763
|
preactVersion,
|
|
37749
37764
|
preactMajorVersion: parseReactMajor(preactVersion),
|
|
@@ -41084,6 +41099,8 @@ const buildCapabilities = (project) => {
|
|
|
41084
41099
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
41085
41100
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
41086
41101
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
41102
|
+
if (project.valtioVersion !== null) capabilities.add("valtio");
|
|
41103
|
+
addMajorLadder(capabilities, "valtio", project.valtioMajorVersion, 1, 10);
|
|
41087
41104
|
if (project.hasTypeScript) capabilities.add("typescript");
|
|
41088
41105
|
if (project.preactVersion !== null) capabilities.add("preact");
|
|
41089
41106
|
addMajorLadder(capabilities, "preact", project.preactMajorVersion, 10, 20);
|
|
@@ -47367,7 +47384,7 @@ const makeNoopConsole = () => ({
|
|
|
47367
47384
|
});
|
|
47368
47385
|
//#endregion
|
|
47369
47386
|
//#region src/cli/utils/version.ts
|
|
47370
|
-
const VERSION = "0.8.1-dev.
|
|
47387
|
+
const VERSION = "0.8.1-dev.a4eaedd";
|
|
47371
47388
|
//#endregion
|
|
47372
47389
|
//#region src/cli/utils/json-mode.ts
|
|
47373
47390
|
let context = null;
|
|
@@ -47719,13 +47736,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
47719
47736
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
47720
47737
|
* standard `SENTRY_RELEASE` override.
|
|
47721
47738
|
*/
|
|
47722
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.
|
|
47739
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.a4eaedd`;
|
|
47723
47740
|
/**
|
|
47724
47741
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
47725
47742
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
47726
47743
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
47727
47744
|
*/
|
|
47728
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.
|
|
47745
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.a4eaedd") ? "development" : "production");
|
|
47729
47746
|
/**
|
|
47730
47747
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
47731
47748
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -66405,4 +66422,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
66405
66422
|
export {};
|
|
66406
66423
|
|
|
66407
66424
|
//# sourceMappingURL=cli.js.map
|
|
66408
|
-
//# debugId=
|
|
66425
|
+
//# debugId=83a484ab-e975-5390-830a-f2f723c71935
|
package/dist/index.d.ts
CHANGED
|
@@ -9548,6 +9548,15 @@ interface ProjectInfo {
|
|
|
9548
9548
|
hasReactCompiler: boolean;
|
|
9549
9549
|
hasReactCompilerLintPlugin?: boolean;
|
|
9550
9550
|
hasTanStackQuery: boolean;
|
|
9551
|
+
/**
|
|
9552
|
+
* The declared `valtio` version spec, or `null` when no package in the
|
|
9553
|
+
* analyzed project declares Valtio. `useSnapshot` has kept the same
|
|
9554
|
+
* render-read contract across Valtio 1 and 2, so presence alone drives the
|
|
9555
|
+
* `valtio` capability and its parsed major-version ladder.
|
|
9556
|
+
*/
|
|
9557
|
+
valtioVersion: string | null;
|
|
9558
|
+
/** Parsed major from `valtioVersion`, or `null` when absent/unparseable. */
|
|
9559
|
+
valtioMajorVersion: number | null;
|
|
9551
9560
|
/**
|
|
9552
9561
|
* `true` when the project or a workspace declares a Vite-based SSR runtime
|
|
9553
9562
|
* such as React Router's Node adapter, Vike, or vite-plugin-ssr.
|
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]="9a89aa42-c62d-57b9-a5d7-36051dd45bb3")}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 reactDoctorPlugin, { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor";
|
|
@@ -34165,6 +34165,10 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
34165
34165
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
34166
34166
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
34167
34167
|
}
|
|
34168
|
+
if (facts.valtioVersion === null) {
|
|
34169
|
+
const spec = getDependencySpec(packageJson, "valtio");
|
|
34170
|
+
if (spec !== null) facts.valtioVersion = spec;
|
|
34171
|
+
}
|
|
34168
34172
|
facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
|
|
34169
34173
|
facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
|
|
34170
34174
|
facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
|
|
@@ -34187,6 +34191,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
34187
34191
|
version: null,
|
|
34188
34192
|
sourceDirectory: null
|
|
34189
34193
|
},
|
|
34194
|
+
valtioVersion: null,
|
|
34190
34195
|
hasReactNativeAwarePackage: false,
|
|
34191
34196
|
hasReanimatedAwarePackage: false,
|
|
34192
34197
|
hasSsrDependency: false,
|
|
@@ -34430,6 +34435,8 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
34430
34435
|
hasReactCompiler: false,
|
|
34431
34436
|
hasReactCompilerLintPlugin: false,
|
|
34432
34437
|
hasTanStackQuery: false,
|
|
34438
|
+
valtioVersion: null,
|
|
34439
|
+
valtioMajorVersion: null,
|
|
34433
34440
|
hasSsrDependency: false,
|
|
34434
34441
|
preactVersion: null,
|
|
34435
34442
|
preactMajorVersion: null,
|
|
@@ -34536,6 +34543,12 @@ const discoverProject = (directory) => {
|
|
|
34536
34543
|
packageName: "next",
|
|
34537
34544
|
version: workspaceFacts.next.version
|
|
34538
34545
|
}) : null;
|
|
34546
|
+
const valtioVersion = resolveCatalogBackedDependencyVersion({
|
|
34547
|
+
rootDirectory: directory,
|
|
34548
|
+
rootPackageJson: packageJson,
|
|
34549
|
+
packageName: "valtio",
|
|
34550
|
+
version: workspaceFacts.valtioVersion
|
|
34551
|
+
});
|
|
34539
34552
|
const preactVersion = getPreactVersion(packageJson);
|
|
34540
34553
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
34541
34554
|
const projectInfo = {
|
|
@@ -34551,6 +34564,8 @@ const discoverProject = (directory) => {
|
|
|
34551
34564
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
34552
34565
|
hasReactCompilerLintPlugin: detectReactCompilerLintPlugin(directory, packageJson),
|
|
34553
34566
|
hasTanStackQuery: hasTanStackQuery(packageJson),
|
|
34567
|
+
valtioVersion,
|
|
34568
|
+
valtioMajorVersion: valtioVersion === null ? null : getLowestDependencyMajor(valtioVersion),
|
|
34554
34569
|
hasSsrDependency: workspaceFacts.hasSsrDependency,
|
|
34555
34570
|
preactVersion,
|
|
34556
34571
|
preactMajorVersion: parseReactMajor(preactVersion),
|
|
@@ -37856,6 +37871,8 @@ const buildCapabilities = (project) => {
|
|
|
37856
37871
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
37857
37872
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
37858
37873
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
37874
|
+
if (project.valtioVersion !== null) capabilities.add("valtio");
|
|
37875
|
+
addMajorLadder(capabilities, "valtio", project.valtioMajorVersion, 1, 10);
|
|
37859
37876
|
if (project.hasTypeScript) capabilities.add("typescript");
|
|
37860
37877
|
if (project.preactVersion !== null) capabilities.add("preact");
|
|
37861
37878
|
addMajorLadder(capabilities, "preact", project.preactMajorVersion, 10, 20);
|
|
@@ -43839,4 +43856,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
43839
43856
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
43840
43857
|
|
|
43841
43858
|
//# sourceMappingURL=index.js.map
|
|
43842
|
-
//# debugId=
|
|
43859
|
+
//# debugId=9a89aa42-c62d-57b9-a5d7-36051dd45bb3
|
package/dist/lsp.js
CHANGED
|
@@ -34217,6 +34217,10 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
34217
34217
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
34218
34218
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
34219
34219
|
}
|
|
34220
|
+
if (facts.valtioVersion === null) {
|
|
34221
|
+
const spec = getDependencySpec(packageJson, "valtio");
|
|
34222
|
+
if (spec !== null) facts.valtioVersion = spec;
|
|
34223
|
+
}
|
|
34220
34224
|
facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
|
|
34221
34225
|
facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
|
|
34222
34226
|
facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
|
|
@@ -34239,6 +34243,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
34239
34243
|
version: null,
|
|
34240
34244
|
sourceDirectory: null
|
|
34241
34245
|
},
|
|
34246
|
+
valtioVersion: null,
|
|
34242
34247
|
hasReactNativeAwarePackage: false,
|
|
34243
34248
|
hasReanimatedAwarePackage: false,
|
|
34244
34249
|
hasSsrDependency: false,
|
|
@@ -34482,6 +34487,8 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
34482
34487
|
hasReactCompiler: false,
|
|
34483
34488
|
hasReactCompilerLintPlugin: false,
|
|
34484
34489
|
hasTanStackQuery: false,
|
|
34490
|
+
valtioVersion: null,
|
|
34491
|
+
valtioMajorVersion: null,
|
|
34485
34492
|
hasSsrDependency: false,
|
|
34486
34493
|
preactVersion: null,
|
|
34487
34494
|
preactMajorVersion: null,
|
|
@@ -34588,6 +34595,12 @@ const discoverProject = (directory) => {
|
|
|
34588
34595
|
packageName: "next",
|
|
34589
34596
|
version: workspaceFacts.next.version
|
|
34590
34597
|
}) : null;
|
|
34598
|
+
const valtioVersion = resolveCatalogBackedDependencyVersion({
|
|
34599
|
+
rootDirectory: directory,
|
|
34600
|
+
rootPackageJson: packageJson,
|
|
34601
|
+
packageName: "valtio",
|
|
34602
|
+
version: workspaceFacts.valtioVersion
|
|
34603
|
+
});
|
|
34591
34604
|
const preactVersion = getPreactVersion(packageJson);
|
|
34592
34605
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
34593
34606
|
const projectInfo = {
|
|
@@ -34603,6 +34616,8 @@ const discoverProject = (directory) => {
|
|
|
34603
34616
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
34604
34617
|
hasReactCompilerLintPlugin: detectReactCompilerLintPlugin(directory, packageJson),
|
|
34605
34618
|
hasTanStackQuery: hasTanStackQuery(packageJson),
|
|
34619
|
+
valtioVersion,
|
|
34620
|
+
valtioMajorVersion: valtioVersion === null ? null : getLowestDependencyMajor(valtioVersion),
|
|
34606
34621
|
hasSsrDependency: workspaceFacts.hasSsrDependency,
|
|
34607
34622
|
preactVersion,
|
|
34608
34623
|
preactMajorVersion: parseReactMajor(preactVersion),
|
|
@@ -37834,6 +37849,8 @@ const buildCapabilities = (project) => {
|
|
|
37834
37849
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
37835
37850
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
37836
37851
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
37852
|
+
if (project.valtioVersion !== null) capabilities.add("valtio");
|
|
37853
|
+
addMajorLadder(capabilities, "valtio", project.valtioMajorVersion, 1, 10);
|
|
37837
37854
|
if (project.hasTypeScript) capabilities.add("typescript");
|
|
37838
37855
|
if (project.preactVersion !== null) capabilities.add("preact");
|
|
37839
37856
|
addMajorLadder(capabilities, "preact", project.preactMajorVersion, 10, 20);
|
|
@@ -45459,5 +45476,5 @@ const startLanguageServer = () => {
|
|
|
45459
45476
|
};
|
|
45460
45477
|
//#endregion
|
|
45461
45478
|
export { startLanguageServer };
|
|
45462
|
-
!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]="
|
|
45463
|
-
//# debugId=
|
|
45479
|
+
!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]="a257778d-cb0a-54d7-909d-889a64e8698c")}catch(e){}}();
|
|
45480
|
+
//# debugId=a257778d-cb0a-54d7-909d-889a64e8698c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.8.1-dev.
|
|
3
|
+
"version": "0.8.1-dev.a4eaedd",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
66
66
|
"vscode-uri": "^3.1.0",
|
|
67
67
|
"yaml": "^2.9.0",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"deslop-js": "0.8.1",
|
|
69
|
+
"oxlint-plugin-react-doctor": "0.8.1-dev.a4eaedd"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/babel__code-frame": "^7.27.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"@xterm/headless": "^6.0.0",
|
|
75
75
|
"commander": "^14.0.3",
|
|
76
76
|
"ora": "^9.4.0",
|
|
77
|
-
"@react-doctor/core": "0.8.1",
|
|
78
77
|
"@react-doctor/api": "0.8.1",
|
|
78
|
+
"@react-doctor/core": "0.8.1",
|
|
79
79
|
"@react-doctor/language-server": "0.8.1"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|