react-doctor 0.8.1-dev.e6a1557 → 0.8.1-dev.f4aa821
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 +5 -99
- package/dist/index.d.ts +0 -12
- package/dist/index.js +2 -96
- package/dist/lsp.js +2 -96
- 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]="1b59ca76-9135-54e6-9391-ce7fec27b699")}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";
|
|
@@ -37317,10 +37317,6 @@ const listWorkspacePackages = (rootDirectory) => {
|
|
|
37317
37317
|
return packages;
|
|
37318
37318
|
};
|
|
37319
37319
|
const REANIMATED_DEPENDENCY_NAME = "react-native-reanimated";
|
|
37320
|
-
const MOBX_REACT_PACKAGE_NAME = "mobx-react";
|
|
37321
|
-
const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
|
|
37322
|
-
const MOBX_STATE_TREE_PACKAGE_NAME = "mobx-state-tree";
|
|
37323
|
-
const MOBX_REACT_OBSERVER_PACKAGE_NAME = "mobx-react-observer";
|
|
37324
37320
|
const SHOPIFY_FLASH_LIST_PACKAGE_NAME = "@shopify/flash-list";
|
|
37325
37321
|
const resolveWorkspaceDependencyVersion = ({ concreteVersion, packageName, rootDirectory, rootPackageJson, sections, workspaceDirectory, workspacePackageJson }) => {
|
|
37326
37322
|
const dependencyDeclaration = getDependencyDeclaration({
|
|
@@ -37339,17 +37335,6 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
|
|
|
37339
37335
|
if (nextMajor === null) return false;
|
|
37340
37336
|
return nextMajor < currentMajor;
|
|
37341
37337
|
};
|
|
37342
|
-
const shouldReplaceSupportedDependencyFact = (currentFact, nextFact, latestSupportedMajor) => {
|
|
37343
|
-
if (currentFact.version === null) return true;
|
|
37344
|
-
if (nextFact.version === null) return false;
|
|
37345
|
-
const currentMajor = getLowestDependencyMajor(currentFact.version);
|
|
37346
|
-
const nextMajor = getLowestDependencyMajor(nextFact.version);
|
|
37347
|
-
if (currentMajor === null) return false;
|
|
37348
|
-
if (nextMajor === null) return true;
|
|
37349
|
-
if (currentMajor > latestSupportedMajor) return false;
|
|
37350
|
-
if (nextMajor > latestSupportedMajor) return true;
|
|
37351
|
-
return nextMajor < currentMajor;
|
|
37352
|
-
};
|
|
37353
37338
|
const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
|
|
37354
37339
|
if (facts.expo.version === null) {
|
|
37355
37340
|
const spec = getDependencySpec(packageJson, "expo");
|
|
@@ -37372,36 +37357,6 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
|
|
|
37372
37357
|
sourceDirectory: directory
|
|
37373
37358
|
};
|
|
37374
37359
|
}
|
|
37375
|
-
const mobxSpec = getDependencySpec(packageJson, "mobx");
|
|
37376
|
-
if (mobxSpec !== null) {
|
|
37377
|
-
const nextMobxFact = {
|
|
37378
|
-
version: resolveCatalogBackedDependencyVersion({
|
|
37379
|
-
rootDirectory: directory,
|
|
37380
|
-
rootPackageJson: packageJson,
|
|
37381
|
-
packageName: "mobx",
|
|
37382
|
-
version: mobxSpec
|
|
37383
|
-
}),
|
|
37384
|
-
sourceDirectory: directory
|
|
37385
|
-
};
|
|
37386
|
-
if (shouldReplaceSupportedDependencyFact(facts.mobx, nextMobxFact, 6)) facts.mobx = nextMobxFact;
|
|
37387
|
-
}
|
|
37388
|
-
facts.hasMobxReact = facts.hasMobxReact || getDependencySpec(packageJson, MOBX_REACT_PACKAGE_NAME) !== null;
|
|
37389
|
-
facts.hasMobxReactLite = facts.hasMobxReactLite || getDependencySpec(packageJson, MOBX_REACT_LITE_PACKAGE_NAME) !== null;
|
|
37390
|
-
facts.hasMobxStateTree = facts.hasMobxStateTree || getDependencySpec(packageJson, MOBX_STATE_TREE_PACKAGE_NAME) !== null;
|
|
37391
|
-
facts.hasMobxReactObserver = facts.hasMobxReactObserver || getDependencySpec(packageJson, MOBX_REACT_OBSERVER_PACKAGE_NAME) !== null;
|
|
37392
|
-
const zustandSpec = getDependencySpec(packageJson, "zustand");
|
|
37393
|
-
if (zustandSpec !== null) {
|
|
37394
|
-
const nextZustandFact = {
|
|
37395
|
-
version: resolveCatalogBackedDependencyVersion({
|
|
37396
|
-
rootDirectory: directory,
|
|
37397
|
-
rootPackageJson: packageJson,
|
|
37398
|
-
packageName: "zustand",
|
|
37399
|
-
version: zustandSpec
|
|
37400
|
-
}),
|
|
37401
|
-
sourceDirectory: directory
|
|
37402
|
-
};
|
|
37403
|
-
if (shouldReplaceSupportedDependencyFact(facts.zustand, nextZustandFact, 5)) facts.zustand = nextZustandFact;
|
|
37404
|
-
}
|
|
37405
37360
|
if (facts.reanimatedVersion === null) {
|
|
37406
37361
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
37407
37362
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
@@ -37451,18 +37406,6 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
37451
37406
|
sourceDirectory: null
|
|
37452
37407
|
},
|
|
37453
37408
|
valtioVersion: null,
|
|
37454
|
-
mobx: {
|
|
37455
|
-
version: null,
|
|
37456
|
-
sourceDirectory: null
|
|
37457
|
-
},
|
|
37458
|
-
hasMobxReact: false,
|
|
37459
|
-
hasMobxReactLite: false,
|
|
37460
|
-
hasMobxStateTree: false,
|
|
37461
|
-
hasMobxReactObserver: false,
|
|
37462
|
-
zustand: {
|
|
37463
|
-
version: null,
|
|
37464
|
-
sourceDirectory: null
|
|
37465
|
-
},
|
|
37466
37409
|
hasReactNativeAwarePackage: false,
|
|
37467
37410
|
hasReanimatedAwarePackage: false,
|
|
37468
37411
|
hasSsrDependency: false,
|
|
@@ -37701,14 +37644,6 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
37701
37644
|
tailwindVersion: null,
|
|
37702
37645
|
zodVersion: null,
|
|
37703
37646
|
zodMajorVersion: null,
|
|
37704
|
-
mobxVersion: null,
|
|
37705
|
-
mobxMajorVersion: null,
|
|
37706
|
-
hasMobxReact: false,
|
|
37707
|
-
hasMobxReactLite: false,
|
|
37708
|
-
hasMobxStateTree: false,
|
|
37709
|
-
hasMobxReactObserver: false,
|
|
37710
|
-
zustandVersion: null,
|
|
37711
|
-
zustandMajorVersion: null,
|
|
37712
37647
|
framework: "unknown",
|
|
37713
37648
|
hasTypeScript: hasOwnTsConfig,
|
|
37714
37649
|
hasReactCompiler: false,
|
|
@@ -37817,12 +37752,6 @@ const discoverProject = (directory) => {
|
|
|
37817
37752
|
packageName: SHOPIFY_FLASH_LIST_PACKAGE_NAME,
|
|
37818
37753
|
version: workspaceFacts.shopifyFlashList.version
|
|
37819
37754
|
}) : null;
|
|
37820
|
-
const zustandVersion = resolveCatalogBackedDependencyVersion({
|
|
37821
|
-
rootDirectory: directory,
|
|
37822
|
-
rootPackageJson: packageJson,
|
|
37823
|
-
packageName: "zustand",
|
|
37824
|
-
version: workspaceFacts.zustand.version
|
|
37825
|
-
});
|
|
37826
37755
|
const hasReanimated = hasReactNativeWorkspace && workspaceFacts.hasReanimatedAwarePackage;
|
|
37827
37756
|
const reanimatedVersion = hasReanimated ? workspaceFacts.reanimatedVersion : null;
|
|
37828
37757
|
const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
|
|
@@ -37837,12 +37766,6 @@ const discoverProject = (directory) => {
|
|
|
37837
37766
|
packageName: "valtio",
|
|
37838
37767
|
version: workspaceFacts.valtioVersion
|
|
37839
37768
|
});
|
|
37840
|
-
const mobxVersion = resolveCatalogBackedDependencyVersion({
|
|
37841
|
-
rootDirectory: directory,
|
|
37842
|
-
rootPackageJson: packageJson,
|
|
37843
|
-
packageName: "mobx",
|
|
37844
|
-
version: workspaceFacts.mobx.version
|
|
37845
|
-
});
|
|
37846
37769
|
const preactVersion = getPreactVersion(packageJson);
|
|
37847
37770
|
const remotionVersion = workspaceFacts.remotionVersion;
|
|
37848
37771
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
@@ -37854,14 +37777,6 @@ const discoverProject = (directory) => {
|
|
|
37854
37777
|
tailwindVersion,
|
|
37855
37778
|
zodVersion,
|
|
37856
37779
|
zodMajorVersion: zodVersion === null ? null : getLowestDependencyMajor(zodVersion),
|
|
37857
|
-
mobxVersion,
|
|
37858
|
-
mobxMajorVersion: mobxVersion === null ? null : getLowestDependencyMajor(mobxVersion),
|
|
37859
|
-
hasMobxReact: workspaceFacts.hasMobxReact,
|
|
37860
|
-
hasMobxReactLite: workspaceFacts.hasMobxReactLite,
|
|
37861
|
-
hasMobxStateTree: workspaceFacts.hasMobxStateTree,
|
|
37862
|
-
hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
|
|
37863
|
-
zustandVersion,
|
|
37864
|
-
zustandMajorVersion: zustandVersion === null ? null : getLowestDependencyMajor(zustandVersion),
|
|
37865
37780
|
framework,
|
|
37866
37781
|
hasTypeScript,
|
|
37867
37782
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
@@ -41209,15 +41124,6 @@ const buildCapabilities = (project) => {
|
|
|
41209
41124
|
})) capabilities.add("tailwind:3.4");
|
|
41210
41125
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
41211
41126
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
41212
|
-
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
41213
|
-
if (project.hasMobxReact === true) capabilities.add("mobx-react");
|
|
41214
|
-
if (project.hasMobxReactLite === true) capabilities.add("mobx-react-lite");
|
|
41215
|
-
if (project.hasMobxReact === true || project.hasMobxReactLite === true) capabilities.add("mobx-react-binding");
|
|
41216
|
-
if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
|
|
41217
|
-
if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
|
|
41218
|
-
if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
|
|
41219
|
-
if (project.zustandVersion !== void 0 && project.zustandVersion !== null) capabilities.add("zustand");
|
|
41220
|
-
if (project.zustandMajorVersion !== void 0 && project.zustandMajorVersion !== null && project.zustandMajorVersion >= 1 && project.zustandMajorVersion <= 5) addMajorLadder(capabilities, "zustand", project.zustandMajorVersion, 1, 5);
|
|
41221
41127
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
41222
41128
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
41223
41129
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
@@ -47510,7 +47416,7 @@ const makeNoopConsole = () => ({
|
|
|
47510
47416
|
});
|
|
47511
47417
|
//#endregion
|
|
47512
47418
|
//#region src/cli/utils/version.ts
|
|
47513
|
-
const VERSION = "0.8.1-dev.
|
|
47419
|
+
const VERSION = "0.8.1-dev.f4aa821";
|
|
47514
47420
|
//#endregion
|
|
47515
47421
|
//#region src/cli/utils/json-mode.ts
|
|
47516
47422
|
let context = null;
|
|
@@ -47862,13 +47768,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
47862
47768
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
47863
47769
|
* standard `SENTRY_RELEASE` override.
|
|
47864
47770
|
*/
|
|
47865
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.
|
|
47771
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.f4aa821`;
|
|
47866
47772
|
/**
|
|
47867
47773
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
47868
47774
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
47869
47775
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
47870
47776
|
*/
|
|
47871
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.
|
|
47777
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.f4aa821") ? "development" : "production");
|
|
47872
47778
|
/**
|
|
47873
47779
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
47874
47780
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -66548,4 +66454,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
66548
66454
|
export {};
|
|
66549
66455
|
|
|
66550
66456
|
//# sourceMappingURL=cli.js.map
|
|
66551
|
-
//# debugId=
|
|
66457
|
+
//# debugId=1b59ca76-9135-54e6-9391-ce7fec27b699
|
package/dist/index.d.ts
CHANGED
|
@@ -9543,18 +9543,6 @@ interface ProjectInfo {
|
|
|
9543
9543
|
zodVersion: string | null;
|
|
9544
9544
|
/** Parsed major from `zodVersion`, or `null` when absent/unparseable. Mirrors `reactMajorVersion`. */
|
|
9545
9545
|
zodMajorVersion: number | null;
|
|
9546
|
-
/** Declared MobX core version spec. Optional so existing `ProjectInfo` consumers remain source-compatible. */
|
|
9547
|
-
mobxVersion?: string | null;
|
|
9548
|
-
/** Parsed major from `mobxVersion`, or `null` when absent/unparseable. */
|
|
9549
|
-
mobxMajorVersion?: number | null;
|
|
9550
|
-
hasMobxReact?: boolean;
|
|
9551
|
-
hasMobxReactLite?: boolean;
|
|
9552
|
-
hasMobxStateTree?: boolean;
|
|
9553
|
-
hasMobxReactObserver?: boolean;
|
|
9554
|
-
/** Declared Zustand version spec. Optional so existing `ProjectInfo` consumers remain source-compatible. */
|
|
9555
|
-
zustandVersion?: string | null;
|
|
9556
|
-
/** Parsed major from `zustandVersion`, or `null` when absent/unparseable. */
|
|
9557
|
-
zustandMajorVersion?: number | null;
|
|
9558
9546
|
framework: Framework;
|
|
9559
9547
|
hasTypeScript: boolean;
|
|
9560
9548
|
hasReactCompiler: boolean;
|
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]="92325f1f-c593-5b4c-af5a-c8b7177212e1")}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";
|
|
@@ -34121,10 +34121,6 @@ const listWorkspacePackages = (rootDirectory) => {
|
|
|
34121
34121
|
return packages;
|
|
34122
34122
|
};
|
|
34123
34123
|
const REANIMATED_DEPENDENCY_NAME = "react-native-reanimated";
|
|
34124
|
-
const MOBX_REACT_PACKAGE_NAME = "mobx-react";
|
|
34125
|
-
const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
|
|
34126
|
-
const MOBX_STATE_TREE_PACKAGE_NAME = "mobx-state-tree";
|
|
34127
|
-
const MOBX_REACT_OBSERVER_PACKAGE_NAME = "mobx-react-observer";
|
|
34128
34124
|
const SHOPIFY_FLASH_LIST_PACKAGE_NAME = "@shopify/flash-list";
|
|
34129
34125
|
const resolveWorkspaceDependencyVersion = ({ concreteVersion, packageName, rootDirectory, rootPackageJson, sections, workspaceDirectory, workspacePackageJson }) => {
|
|
34130
34126
|
const dependencyDeclaration = getDependencyDeclaration({
|
|
@@ -34143,17 +34139,6 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
|
|
|
34143
34139
|
if (nextMajor === null) return false;
|
|
34144
34140
|
return nextMajor < currentMajor;
|
|
34145
34141
|
};
|
|
34146
|
-
const shouldReplaceSupportedDependencyFact = (currentFact, nextFact, latestSupportedMajor) => {
|
|
34147
|
-
if (currentFact.version === null) return true;
|
|
34148
|
-
if (nextFact.version === null) return false;
|
|
34149
|
-
const currentMajor = getLowestDependencyMajor(currentFact.version);
|
|
34150
|
-
const nextMajor = getLowestDependencyMajor(nextFact.version);
|
|
34151
|
-
if (currentMajor === null) return false;
|
|
34152
|
-
if (nextMajor === null) return true;
|
|
34153
|
-
if (currentMajor > latestSupportedMajor) return false;
|
|
34154
|
-
if (nextMajor > latestSupportedMajor) return true;
|
|
34155
|
-
return nextMajor < currentMajor;
|
|
34156
|
-
};
|
|
34157
34142
|
const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
|
|
34158
34143
|
if (facts.expo.version === null) {
|
|
34159
34144
|
const spec = getDependencySpec(packageJson, "expo");
|
|
@@ -34176,36 +34161,6 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
|
|
|
34176
34161
|
sourceDirectory: directory
|
|
34177
34162
|
};
|
|
34178
34163
|
}
|
|
34179
|
-
const mobxSpec = getDependencySpec(packageJson, "mobx");
|
|
34180
|
-
if (mobxSpec !== null) {
|
|
34181
|
-
const nextMobxFact = {
|
|
34182
|
-
version: resolveCatalogBackedDependencyVersion({
|
|
34183
|
-
rootDirectory: directory,
|
|
34184
|
-
rootPackageJson: packageJson,
|
|
34185
|
-
packageName: "mobx",
|
|
34186
|
-
version: mobxSpec
|
|
34187
|
-
}),
|
|
34188
|
-
sourceDirectory: directory
|
|
34189
|
-
};
|
|
34190
|
-
if (shouldReplaceSupportedDependencyFact(facts.mobx, nextMobxFact, 6)) facts.mobx = nextMobxFact;
|
|
34191
|
-
}
|
|
34192
|
-
facts.hasMobxReact = facts.hasMobxReact || getDependencySpec(packageJson, MOBX_REACT_PACKAGE_NAME) !== null;
|
|
34193
|
-
facts.hasMobxReactLite = facts.hasMobxReactLite || getDependencySpec(packageJson, MOBX_REACT_LITE_PACKAGE_NAME) !== null;
|
|
34194
|
-
facts.hasMobxStateTree = facts.hasMobxStateTree || getDependencySpec(packageJson, MOBX_STATE_TREE_PACKAGE_NAME) !== null;
|
|
34195
|
-
facts.hasMobxReactObserver = facts.hasMobxReactObserver || getDependencySpec(packageJson, MOBX_REACT_OBSERVER_PACKAGE_NAME) !== null;
|
|
34196
|
-
const zustandSpec = getDependencySpec(packageJson, "zustand");
|
|
34197
|
-
if (zustandSpec !== null) {
|
|
34198
|
-
const nextZustandFact = {
|
|
34199
|
-
version: resolveCatalogBackedDependencyVersion({
|
|
34200
|
-
rootDirectory: directory,
|
|
34201
|
-
rootPackageJson: packageJson,
|
|
34202
|
-
packageName: "zustand",
|
|
34203
|
-
version: zustandSpec
|
|
34204
|
-
}),
|
|
34205
|
-
sourceDirectory: directory
|
|
34206
|
-
};
|
|
34207
|
-
if (shouldReplaceSupportedDependencyFact(facts.zustand, nextZustandFact, 5)) facts.zustand = nextZustandFact;
|
|
34208
|
-
}
|
|
34209
34164
|
if (facts.reanimatedVersion === null) {
|
|
34210
34165
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
34211
34166
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
@@ -34255,18 +34210,6 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
34255
34210
|
sourceDirectory: null
|
|
34256
34211
|
},
|
|
34257
34212
|
valtioVersion: null,
|
|
34258
|
-
mobx: {
|
|
34259
|
-
version: null,
|
|
34260
|
-
sourceDirectory: null
|
|
34261
|
-
},
|
|
34262
|
-
hasMobxReact: false,
|
|
34263
|
-
hasMobxReactLite: false,
|
|
34264
|
-
hasMobxStateTree: false,
|
|
34265
|
-
hasMobxReactObserver: false,
|
|
34266
|
-
zustand: {
|
|
34267
|
-
version: null,
|
|
34268
|
-
sourceDirectory: null
|
|
34269
|
-
},
|
|
34270
34213
|
hasReactNativeAwarePackage: false,
|
|
34271
34214
|
hasReanimatedAwarePackage: false,
|
|
34272
34215
|
hasSsrDependency: false,
|
|
@@ -34508,14 +34451,6 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
34508
34451
|
tailwindVersion: null,
|
|
34509
34452
|
zodVersion: null,
|
|
34510
34453
|
zodMajorVersion: null,
|
|
34511
|
-
mobxVersion: null,
|
|
34512
|
-
mobxMajorVersion: null,
|
|
34513
|
-
hasMobxReact: false,
|
|
34514
|
-
hasMobxReactLite: false,
|
|
34515
|
-
hasMobxStateTree: false,
|
|
34516
|
-
hasMobxReactObserver: false,
|
|
34517
|
-
zustandVersion: null,
|
|
34518
|
-
zustandMajorVersion: null,
|
|
34519
34454
|
framework: "unknown",
|
|
34520
34455
|
hasTypeScript: hasOwnTsConfig,
|
|
34521
34456
|
hasReactCompiler: false,
|
|
@@ -34624,12 +34559,6 @@ const discoverProject = (directory) => {
|
|
|
34624
34559
|
packageName: SHOPIFY_FLASH_LIST_PACKAGE_NAME,
|
|
34625
34560
|
version: workspaceFacts.shopifyFlashList.version
|
|
34626
34561
|
}) : null;
|
|
34627
|
-
const zustandVersion = resolveCatalogBackedDependencyVersion({
|
|
34628
|
-
rootDirectory: directory,
|
|
34629
|
-
rootPackageJson: packageJson,
|
|
34630
|
-
packageName: "zustand",
|
|
34631
|
-
version: workspaceFacts.zustand.version
|
|
34632
|
-
});
|
|
34633
34562
|
const hasReanimated = hasReactNativeWorkspace && workspaceFacts.hasReanimatedAwarePackage;
|
|
34634
34563
|
const reanimatedVersion = hasReanimated ? workspaceFacts.reanimatedVersion : null;
|
|
34635
34564
|
const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
|
|
@@ -34644,12 +34573,6 @@ const discoverProject = (directory) => {
|
|
|
34644
34573
|
packageName: "valtio",
|
|
34645
34574
|
version: workspaceFacts.valtioVersion
|
|
34646
34575
|
});
|
|
34647
|
-
const mobxVersion = resolveCatalogBackedDependencyVersion({
|
|
34648
|
-
rootDirectory: directory,
|
|
34649
|
-
rootPackageJson: packageJson,
|
|
34650
|
-
packageName: "mobx",
|
|
34651
|
-
version: workspaceFacts.mobx.version
|
|
34652
|
-
});
|
|
34653
34576
|
const preactVersion = getPreactVersion(packageJson);
|
|
34654
34577
|
const remotionVersion = workspaceFacts.remotionVersion;
|
|
34655
34578
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
@@ -34661,14 +34584,6 @@ const discoverProject = (directory) => {
|
|
|
34661
34584
|
tailwindVersion,
|
|
34662
34585
|
zodVersion,
|
|
34663
34586
|
zodMajorVersion: zodVersion === null ? null : getLowestDependencyMajor(zodVersion),
|
|
34664
|
-
mobxVersion,
|
|
34665
|
-
mobxMajorVersion: mobxVersion === null ? null : getLowestDependencyMajor(mobxVersion),
|
|
34666
|
-
hasMobxReact: workspaceFacts.hasMobxReact,
|
|
34667
|
-
hasMobxReactLite: workspaceFacts.hasMobxReactLite,
|
|
34668
|
-
hasMobxStateTree: workspaceFacts.hasMobxStateTree,
|
|
34669
|
-
hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
|
|
34670
|
-
zustandVersion,
|
|
34671
|
-
zustandMajorVersion: zustandVersion === null ? null : getLowestDependencyMajor(zustandVersion),
|
|
34672
34587
|
framework,
|
|
34673
34588
|
hasTypeScript,
|
|
34674
34589
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
@@ -37981,15 +37896,6 @@ const buildCapabilities = (project) => {
|
|
|
37981
37896
|
})) capabilities.add("tailwind:3.4");
|
|
37982
37897
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
37983
37898
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
37984
|
-
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
37985
|
-
if (project.hasMobxReact === true) capabilities.add("mobx-react");
|
|
37986
|
-
if (project.hasMobxReactLite === true) capabilities.add("mobx-react-lite");
|
|
37987
|
-
if (project.hasMobxReact === true || project.hasMobxReactLite === true) capabilities.add("mobx-react-binding");
|
|
37988
|
-
if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
|
|
37989
|
-
if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
|
|
37990
|
-
if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
|
|
37991
|
-
if (project.zustandVersion !== void 0 && project.zustandVersion !== null) capabilities.add("zustand");
|
|
37992
|
-
if (project.zustandMajorVersion !== void 0 && project.zustandMajorVersion !== null && project.zustandMajorVersion >= 1 && project.zustandMajorVersion <= 5) addMajorLadder(capabilities, "zustand", project.zustandMajorVersion, 1, 5);
|
|
37993
37899
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
37994
37900
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
37995
37901
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
@@ -43982,4 +43888,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
43982
43888
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
43983
43889
|
|
|
43984
43890
|
//# sourceMappingURL=index.js.map
|
|
43985
|
-
//# debugId=
|
|
43891
|
+
//# debugId=92325f1f-c593-5b4c-af5a-c8b7177212e1
|
package/dist/lsp.js
CHANGED
|
@@ -34173,10 +34173,6 @@ const listWorkspacePackages = (rootDirectory) => {
|
|
|
34173
34173
|
return packages;
|
|
34174
34174
|
};
|
|
34175
34175
|
const REANIMATED_DEPENDENCY_NAME = "react-native-reanimated";
|
|
34176
|
-
const MOBX_REACT_PACKAGE_NAME = "mobx-react";
|
|
34177
|
-
const MOBX_REACT_LITE_PACKAGE_NAME = "mobx-react-lite";
|
|
34178
|
-
const MOBX_STATE_TREE_PACKAGE_NAME = "mobx-state-tree";
|
|
34179
|
-
const MOBX_REACT_OBSERVER_PACKAGE_NAME = "mobx-react-observer";
|
|
34180
34176
|
const SHOPIFY_FLASH_LIST_PACKAGE_NAME = "@shopify/flash-list";
|
|
34181
34177
|
const resolveWorkspaceDependencyVersion = ({ concreteVersion, packageName, rootDirectory, rootPackageJson, sections, workspaceDirectory, workspacePackageJson }) => {
|
|
34182
34178
|
const dependencyDeclaration = getDependencyDeclaration({
|
|
@@ -34195,17 +34191,6 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
|
|
|
34195
34191
|
if (nextMajor === null) return false;
|
|
34196
34192
|
return nextMajor < currentMajor;
|
|
34197
34193
|
};
|
|
34198
|
-
const shouldReplaceSupportedDependencyFact = (currentFact, nextFact, latestSupportedMajor) => {
|
|
34199
|
-
if (currentFact.version === null) return true;
|
|
34200
|
-
if (nextFact.version === null) return false;
|
|
34201
|
-
const currentMajor = getLowestDependencyMajor(currentFact.version);
|
|
34202
|
-
const nextMajor = getLowestDependencyMajor(nextFact.version);
|
|
34203
|
-
if (currentMajor === null) return false;
|
|
34204
|
-
if (nextMajor === null) return true;
|
|
34205
|
-
if (currentMajor > latestSupportedMajor) return false;
|
|
34206
|
-
if (nextMajor > latestSupportedMajor) return true;
|
|
34207
|
-
return nextMajor < currentMajor;
|
|
34208
|
-
};
|
|
34209
34194
|
const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
|
|
34210
34195
|
if (facts.expo.version === null) {
|
|
34211
34196
|
const spec = getDependencySpec(packageJson, "expo");
|
|
@@ -34228,36 +34213,6 @@ const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, roo
|
|
|
34228
34213
|
sourceDirectory: directory
|
|
34229
34214
|
};
|
|
34230
34215
|
}
|
|
34231
|
-
const mobxSpec = getDependencySpec(packageJson, "mobx");
|
|
34232
|
-
if (mobxSpec !== null) {
|
|
34233
|
-
const nextMobxFact = {
|
|
34234
|
-
version: resolveCatalogBackedDependencyVersion({
|
|
34235
|
-
rootDirectory: directory,
|
|
34236
|
-
rootPackageJson: packageJson,
|
|
34237
|
-
packageName: "mobx",
|
|
34238
|
-
version: mobxSpec
|
|
34239
|
-
}),
|
|
34240
|
-
sourceDirectory: directory
|
|
34241
|
-
};
|
|
34242
|
-
if (shouldReplaceSupportedDependencyFact(facts.mobx, nextMobxFact, 6)) facts.mobx = nextMobxFact;
|
|
34243
|
-
}
|
|
34244
|
-
facts.hasMobxReact = facts.hasMobxReact || getDependencySpec(packageJson, MOBX_REACT_PACKAGE_NAME) !== null;
|
|
34245
|
-
facts.hasMobxReactLite = facts.hasMobxReactLite || getDependencySpec(packageJson, MOBX_REACT_LITE_PACKAGE_NAME) !== null;
|
|
34246
|
-
facts.hasMobxStateTree = facts.hasMobxStateTree || getDependencySpec(packageJson, MOBX_STATE_TREE_PACKAGE_NAME) !== null;
|
|
34247
|
-
facts.hasMobxReactObserver = facts.hasMobxReactObserver || getDependencySpec(packageJson, MOBX_REACT_OBSERVER_PACKAGE_NAME) !== null;
|
|
34248
|
-
const zustandSpec = getDependencySpec(packageJson, "zustand");
|
|
34249
|
-
if (zustandSpec !== null) {
|
|
34250
|
-
const nextZustandFact = {
|
|
34251
|
-
version: resolveCatalogBackedDependencyVersion({
|
|
34252
|
-
rootDirectory: directory,
|
|
34253
|
-
rootPackageJson: packageJson,
|
|
34254
|
-
packageName: "zustand",
|
|
34255
|
-
version: zustandSpec
|
|
34256
|
-
}),
|
|
34257
|
-
sourceDirectory: directory
|
|
34258
|
-
};
|
|
34259
|
-
if (shouldReplaceSupportedDependencyFact(facts.zustand, nextZustandFact, 5)) facts.zustand = nextZustandFact;
|
|
34260
|
-
}
|
|
34261
34216
|
if (facts.reanimatedVersion === null) {
|
|
34262
34217
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
34263
34218
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
@@ -34307,18 +34262,6 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
34307
34262
|
sourceDirectory: null
|
|
34308
34263
|
},
|
|
34309
34264
|
valtioVersion: null,
|
|
34310
|
-
mobx: {
|
|
34311
|
-
version: null,
|
|
34312
|
-
sourceDirectory: null
|
|
34313
|
-
},
|
|
34314
|
-
hasMobxReact: false,
|
|
34315
|
-
hasMobxReactLite: false,
|
|
34316
|
-
hasMobxStateTree: false,
|
|
34317
|
-
hasMobxReactObserver: false,
|
|
34318
|
-
zustand: {
|
|
34319
|
-
version: null,
|
|
34320
|
-
sourceDirectory: null
|
|
34321
|
-
},
|
|
34322
34265
|
hasReactNativeAwarePackage: false,
|
|
34323
34266
|
hasReanimatedAwarePackage: false,
|
|
34324
34267
|
hasSsrDependency: false,
|
|
@@ -34560,14 +34503,6 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
34560
34503
|
tailwindVersion: null,
|
|
34561
34504
|
zodVersion: null,
|
|
34562
34505
|
zodMajorVersion: null,
|
|
34563
|
-
mobxVersion: null,
|
|
34564
|
-
mobxMajorVersion: null,
|
|
34565
|
-
hasMobxReact: false,
|
|
34566
|
-
hasMobxReactLite: false,
|
|
34567
|
-
hasMobxStateTree: false,
|
|
34568
|
-
hasMobxReactObserver: false,
|
|
34569
|
-
zustandVersion: null,
|
|
34570
|
-
zustandMajorVersion: null,
|
|
34571
34506
|
framework: "unknown",
|
|
34572
34507
|
hasTypeScript: hasOwnTsConfig,
|
|
34573
34508
|
hasReactCompiler: false,
|
|
@@ -34676,12 +34611,6 @@ const discoverProject = (directory) => {
|
|
|
34676
34611
|
packageName: SHOPIFY_FLASH_LIST_PACKAGE_NAME,
|
|
34677
34612
|
version: workspaceFacts.shopifyFlashList.version
|
|
34678
34613
|
}) : null;
|
|
34679
|
-
const zustandVersion = resolveCatalogBackedDependencyVersion({
|
|
34680
|
-
rootDirectory: directory,
|
|
34681
|
-
rootPackageJson: packageJson,
|
|
34682
|
-
packageName: "zustand",
|
|
34683
|
-
version: workspaceFacts.zustand.version
|
|
34684
|
-
});
|
|
34685
34614
|
const hasReanimated = hasReactNativeWorkspace && workspaceFacts.hasReanimatedAwarePackage;
|
|
34686
34615
|
const reanimatedVersion = hasReanimated ? workspaceFacts.reanimatedVersion : null;
|
|
34687
34616
|
const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
|
|
@@ -34696,12 +34625,6 @@ const discoverProject = (directory) => {
|
|
|
34696
34625
|
packageName: "valtio",
|
|
34697
34626
|
version: workspaceFacts.valtioVersion
|
|
34698
34627
|
});
|
|
34699
|
-
const mobxVersion = resolveCatalogBackedDependencyVersion({
|
|
34700
|
-
rootDirectory: directory,
|
|
34701
|
-
rootPackageJson: packageJson,
|
|
34702
|
-
packageName: "mobx",
|
|
34703
|
-
version: workspaceFacts.mobx.version
|
|
34704
|
-
});
|
|
34705
34628
|
const preactVersion = getPreactVersion(packageJson);
|
|
34706
34629
|
const remotionVersion = workspaceFacts.remotionVersion;
|
|
34707
34630
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
@@ -34713,14 +34636,6 @@ const discoverProject = (directory) => {
|
|
|
34713
34636
|
tailwindVersion,
|
|
34714
34637
|
zodVersion,
|
|
34715
34638
|
zodMajorVersion: zodVersion === null ? null : getLowestDependencyMajor(zodVersion),
|
|
34716
|
-
mobxVersion,
|
|
34717
|
-
mobxMajorVersion: mobxVersion === null ? null : getLowestDependencyMajor(mobxVersion),
|
|
34718
|
-
hasMobxReact: workspaceFacts.hasMobxReact,
|
|
34719
|
-
hasMobxReactLite: workspaceFacts.hasMobxReactLite,
|
|
34720
|
-
hasMobxStateTree: workspaceFacts.hasMobxStateTree,
|
|
34721
|
-
hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
|
|
34722
|
-
zustandVersion,
|
|
34723
|
-
zustandMajorVersion: zustandVersion === null ? null : getLowestDependencyMajor(zustandVersion),
|
|
34724
34639
|
framework,
|
|
34725
34640
|
hasTypeScript,
|
|
34726
34641
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
@@ -37959,15 +37874,6 @@ const buildCapabilities = (project) => {
|
|
|
37959
37874
|
})) capabilities.add("tailwind:3.4");
|
|
37960
37875
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
37961
37876
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
37962
|
-
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
37963
|
-
if (project.hasMobxReact === true) capabilities.add("mobx-react");
|
|
37964
|
-
if (project.hasMobxReactLite === true) capabilities.add("mobx-react-lite");
|
|
37965
|
-
if (project.hasMobxReact === true || project.hasMobxReactLite === true) capabilities.add("mobx-react-binding");
|
|
37966
|
-
if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
|
|
37967
|
-
if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
|
|
37968
|
-
if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
|
|
37969
|
-
if (project.zustandVersion !== void 0 && project.zustandVersion !== null) capabilities.add("zustand");
|
|
37970
|
-
if (project.zustandMajorVersion !== void 0 && project.zustandMajorVersion !== null && project.zustandMajorVersion >= 1 && project.zustandMajorVersion <= 5) addMajorLadder(capabilities, "zustand", project.zustandMajorVersion, 1, 5);
|
|
37971
37877
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
37972
37878
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
37973
37879
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
@@ -45602,5 +45508,5 @@ const startLanguageServer = () => {
|
|
|
45602
45508
|
};
|
|
45603
45509
|
//#endregion
|
|
45604
45510
|
export { startLanguageServer };
|
|
45605
|
-
!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]="
|
|
45606
|
-
//# debugId=
|
|
45511
|
+
!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]="91af1a13-aefd-5ec0-bbb6-9e2cb5c458ee")}catch(e){}}();
|
|
45512
|
+
//# debugId=91af1a13-aefd-5ec0-bbb6-9e2cb5c458ee
|
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.f4aa821",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
66
66
|
"vscode-uri": "^3.1.0",
|
|
67
67
|
"yaml": "^2.9.0",
|
|
68
|
-
"oxlint-plugin-react-doctor": "0.8.1-dev.
|
|
68
|
+
"oxlint-plugin-react-doctor": "0.8.1-dev.f4aa821",
|
|
69
69
|
"deslop-js": "0.8.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
@@ -74,9 +74,9 @@
|
|
|
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",
|
|
79
|
-
"@react-doctor/language-server": "0.8.1"
|
|
78
|
+
"@react-doctor/language-server": "0.8.1",
|
|
79
|
+
"@react-doctor/core": "0.8.1"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": "^20.19.0 || >=22.13.0"
|