react-doctor 0.8.1-dev.5774353 → 0.8.1-dev.61bf03e
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 +105 -8
- package/dist/index.d.ts +11 -0
- package/dist/index.js +102 -5
- package/dist/lsp.js +102 -5
- package/package.json +3 -3
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]="c5ad9312-01de-535b-a900-0d45e296a4fa")}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,6 +37317,10 @@ 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";
|
|
37320
37324
|
const SHOPIFY_FLASH_LIST_PACKAGE_NAME = "@shopify/flash-list";
|
|
37321
37325
|
const resolveWorkspaceDependencyVersion = ({ concreteVersion, packageName, rootDirectory, rootPackageJson, sections, workspaceDirectory, workspacePackageJson }) => {
|
|
37322
37326
|
const dependencyDeclaration = getDependencyDeclaration({
|
|
@@ -37335,7 +37339,18 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
|
|
|
37335
37339
|
if (nextMajor === null) return false;
|
|
37336
37340
|
return nextMajor < currentMajor;
|
|
37337
37341
|
};
|
|
37338
|
-
const
|
|
37342
|
+
const shouldReplaceMobxFact = (currentFact, nextFact) => {
|
|
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 > 6) return false;
|
|
37350
|
+
if (nextMajor > 6) return true;
|
|
37351
|
+
return nextMajor < currentMajor;
|
|
37352
|
+
};
|
|
37353
|
+
const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
|
|
37339
37354
|
if (facts.expo.version === null) {
|
|
37340
37355
|
const spec = getDependencySpec(packageJson, "expo");
|
|
37341
37356
|
if (spec !== null) facts.expo = {
|
|
@@ -37357,6 +37372,23 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
37357
37372
|
sourceDirectory: directory
|
|
37358
37373
|
};
|
|
37359
37374
|
}
|
|
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 (shouldReplaceMobxFact(facts.mobx, nextMobxFact)) 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;
|
|
37360
37392
|
if (facts.reanimatedVersion === null) {
|
|
37361
37393
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
37362
37394
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
@@ -37368,6 +37400,24 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
37368
37400
|
facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
|
|
37369
37401
|
facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
|
|
37370
37402
|
facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
|
|
37403
|
+
const remotionSpec = getDependencySpec(packageJson, "remotion");
|
|
37404
|
+
if (remotionSpec !== null) {
|
|
37405
|
+
facts.hasRemotionDependency = true;
|
|
37406
|
+
const resolvedRemotionVersion = resolveCatalogBackedDependencyVersion({
|
|
37407
|
+
rootDirectory,
|
|
37408
|
+
rootPackageJson,
|
|
37409
|
+
packageName: "remotion",
|
|
37410
|
+
version: remotionSpec
|
|
37411
|
+
});
|
|
37412
|
+
const remotionMajorVersion = resolvedRemotionVersion === null ? null : getLowestDependencyMajor(resolvedRemotionVersion);
|
|
37413
|
+
if (remotionMajorVersion === null) {
|
|
37414
|
+
facts.hasUnknownRemotionVersion = true;
|
|
37415
|
+
facts.remotionVersion = null;
|
|
37416
|
+
} else if (!facts.hasUnknownRemotionVersion) {
|
|
37417
|
+
const currentRemotionMajorVersion = facts.remotionVersion === null ? null : getLowestDependencyMajor(facts.remotionVersion);
|
|
37418
|
+
if (currentRemotionMajorVersion === null || remotionMajorVersion < currentRemotionMajorVersion) facts.remotionVersion = resolvedRemotionVersion;
|
|
37419
|
+
}
|
|
37420
|
+
}
|
|
37371
37421
|
};
|
|
37372
37422
|
const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGroup }) => {
|
|
37373
37423
|
const facts = {
|
|
@@ -37388,12 +37438,23 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
37388
37438
|
sourceDirectory: null
|
|
37389
37439
|
},
|
|
37390
37440
|
valtioVersion: null,
|
|
37441
|
+
mobx: {
|
|
37442
|
+
version: null,
|
|
37443
|
+
sourceDirectory: null
|
|
37444
|
+
},
|
|
37445
|
+
hasMobxReact: false,
|
|
37446
|
+
hasMobxReactLite: false,
|
|
37447
|
+
hasMobxStateTree: false,
|
|
37448
|
+
hasMobxReactObserver: false,
|
|
37391
37449
|
hasReactNativeAwarePackage: false,
|
|
37392
37450
|
hasReanimatedAwarePackage: false,
|
|
37393
37451
|
hasSsrDependency: false,
|
|
37452
|
+
hasRemotionDependency: false,
|
|
37453
|
+
hasUnknownRemotionVersion: false,
|
|
37454
|
+
remotionVersion: null,
|
|
37394
37455
|
reanimatedVersion: null
|
|
37395
37456
|
};
|
|
37396
|
-
evaluateManifestFacts(facts, rootPackageJson, rootDirectory);
|
|
37457
|
+
evaluateManifestFacts(facts, rootPackageJson, rootDirectory, rootDirectory, rootPackageJson);
|
|
37397
37458
|
let isReactGroupSettled = !collectReactGroup;
|
|
37398
37459
|
const visitedDirectories = /* @__PURE__ */ new Set();
|
|
37399
37460
|
for (const pattern of getWorkspacePatterns(rootDirectory, rootPackageJson)) {
|
|
@@ -37402,7 +37463,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
37402
37463
|
if (visitedDirectories.has(workspaceDirectory)) continue;
|
|
37403
37464
|
visitedDirectories.add(workspaceDirectory);
|
|
37404
37465
|
const workspacePackageJson = readPackageJson$1(Path.join(workspaceDirectory, "package.json"));
|
|
37405
|
-
evaluateManifestFacts(facts, workspacePackageJson, workspaceDirectory);
|
|
37466
|
+
evaluateManifestFacts(facts, workspacePackageJson, workspaceDirectory, rootDirectory, rootPackageJson);
|
|
37406
37467
|
const info = extractDependencyInfo(workspacePackageJson);
|
|
37407
37468
|
if (info.framework !== "unknown" && frameworkMergeRank(info.framework) < frameworkMergeRank(facts.framework)) facts.framework = info.framework;
|
|
37408
37469
|
if (isReactGroupSettled) continue;
|
|
@@ -37623,6 +37684,12 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
37623
37684
|
tailwindVersion: null,
|
|
37624
37685
|
zodVersion: null,
|
|
37625
37686
|
zodMajorVersion: null,
|
|
37687
|
+
mobxVersion: null,
|
|
37688
|
+
mobxMajorVersion: null,
|
|
37689
|
+
hasMobxReact: false,
|
|
37690
|
+
hasMobxReactLite: false,
|
|
37691
|
+
hasMobxStateTree: false,
|
|
37692
|
+
hasMobxReactObserver: false,
|
|
37626
37693
|
framework: "unknown",
|
|
37627
37694
|
hasTypeScript: hasOwnTsConfig,
|
|
37628
37695
|
hasReactCompiler: false,
|
|
@@ -37630,6 +37697,9 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
37630
37697
|
hasTanStackQuery: false,
|
|
37631
37698
|
valtioVersion: null,
|
|
37632
37699
|
valtioMajorVersion: null,
|
|
37700
|
+
hasRemotion: false,
|
|
37701
|
+
remotionVersion: null,
|
|
37702
|
+
remotionMajorVersion: null,
|
|
37633
37703
|
hasSsrDependency: false,
|
|
37634
37704
|
preactVersion: null,
|
|
37635
37705
|
preactMajorVersion: null,
|
|
@@ -37742,7 +37812,14 @@ const discoverProject = (directory) => {
|
|
|
37742
37812
|
packageName: "valtio",
|
|
37743
37813
|
version: workspaceFacts.valtioVersion
|
|
37744
37814
|
});
|
|
37815
|
+
const mobxVersion = resolveCatalogBackedDependencyVersion({
|
|
37816
|
+
rootDirectory: directory,
|
|
37817
|
+
rootPackageJson: packageJson,
|
|
37818
|
+
packageName: "mobx",
|
|
37819
|
+
version: workspaceFacts.mobx.version
|
|
37820
|
+
});
|
|
37745
37821
|
const preactVersion = getPreactVersion(packageJson);
|
|
37822
|
+
const remotionVersion = workspaceFacts.remotionVersion;
|
|
37746
37823
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
37747
37824
|
const projectInfo = {
|
|
37748
37825
|
rootDirectory: directory,
|
|
@@ -37752,6 +37829,12 @@ const discoverProject = (directory) => {
|
|
|
37752
37829
|
tailwindVersion,
|
|
37753
37830
|
zodVersion,
|
|
37754
37831
|
zodMajorVersion: zodVersion === null ? null : getLowestDependencyMajor(zodVersion),
|
|
37832
|
+
mobxVersion,
|
|
37833
|
+
mobxMajorVersion: mobxVersion === null ? null : getLowestDependencyMajor(mobxVersion),
|
|
37834
|
+
hasMobxReact: workspaceFacts.hasMobxReact,
|
|
37835
|
+
hasMobxReactLite: workspaceFacts.hasMobxReactLite,
|
|
37836
|
+
hasMobxStateTree: workspaceFacts.hasMobxStateTree,
|
|
37837
|
+
hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
|
|
37755
37838
|
framework,
|
|
37756
37839
|
hasTypeScript,
|
|
37757
37840
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
@@ -37759,6 +37842,9 @@ const discoverProject = (directory) => {
|
|
|
37759
37842
|
hasTanStackQuery: hasTanStackQuery(packageJson),
|
|
37760
37843
|
valtioVersion,
|
|
37761
37844
|
valtioMajorVersion: valtioVersion === null ? null : getLowestDependencyMajor(valtioVersion),
|
|
37845
|
+
hasRemotion: workspaceFacts.hasRemotionDependency,
|
|
37846
|
+
remotionVersion,
|
|
37847
|
+
remotionMajorVersion: remotionVersion === null ? null : getLowestDependencyMajor(remotionVersion),
|
|
37762
37848
|
hasSsrDependency: workspaceFacts.hasSsrDependency,
|
|
37763
37849
|
preactVersion,
|
|
37764
37850
|
preactMajorVersion: parseReactMajor(preactVersion),
|
|
@@ -41096,11 +41182,22 @@ const buildCapabilities = (project) => {
|
|
|
41096
41182
|
})) capabilities.add("tailwind:3.4");
|
|
41097
41183
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
41098
41184
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
41185
|
+
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
41186
|
+
if (project.hasMobxReact === true) capabilities.add("mobx-react");
|
|
41187
|
+
if (project.hasMobxReactLite === true) capabilities.add("mobx-react-lite");
|
|
41188
|
+
if (project.hasMobxReact === true || project.hasMobxReactLite === true) capabilities.add("mobx-react-binding");
|
|
41189
|
+
if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
|
|
41190
|
+
if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
|
|
41191
|
+
if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
|
|
41099
41192
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
41100
41193
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
41101
41194
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
41102
41195
|
if (project.valtioVersion !== null) capabilities.add("valtio");
|
|
41103
41196
|
addMajorLadder(capabilities, "valtio", project.valtioMajorVersion, 1, 10);
|
|
41197
|
+
if (project.hasRemotion) {
|
|
41198
|
+
capabilities.add("remotion");
|
|
41199
|
+
addMajorLadder(capabilities, "remotion", project.remotionMajorVersion ?? null, 4, 30);
|
|
41200
|
+
}
|
|
41104
41201
|
if (project.hasTypeScript) capabilities.add("typescript");
|
|
41105
41202
|
if (project.preactVersion !== null) capabilities.add("preact");
|
|
41106
41203
|
addMajorLadder(capabilities, "preact", project.preactMajorVersion, 10, 20);
|
|
@@ -47384,7 +47481,7 @@ const makeNoopConsole = () => ({
|
|
|
47384
47481
|
});
|
|
47385
47482
|
//#endregion
|
|
47386
47483
|
//#region src/cli/utils/version.ts
|
|
47387
|
-
const VERSION = "0.8.1-dev.
|
|
47484
|
+
const VERSION = "0.8.1-dev.61bf03e";
|
|
47388
47485
|
//#endregion
|
|
47389
47486
|
//#region src/cli/utils/json-mode.ts
|
|
47390
47487
|
let context = null;
|
|
@@ -47736,13 +47833,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
47736
47833
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
47737
47834
|
* standard `SENTRY_RELEASE` override.
|
|
47738
47835
|
*/
|
|
47739
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.
|
|
47836
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.8.1-dev.61bf03e`;
|
|
47740
47837
|
/**
|
|
47741
47838
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
47742
47839
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
47743
47840
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
47744
47841
|
*/
|
|
47745
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.
|
|
47842
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.8.1-dev.61bf03e") ? "development" : "production");
|
|
47746
47843
|
/**
|
|
47747
47844
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
47748
47845
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -66422,4 +66519,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
66422
66519
|
export {};
|
|
66423
66520
|
|
|
66424
66521
|
//# sourceMappingURL=cli.js.map
|
|
66425
|
-
//# debugId=
|
|
66522
|
+
//# debugId=c5ad9312-01de-535b-a900-0d45e296a4fa
|
package/dist/index.d.ts
CHANGED
|
@@ -9543,11 +9543,22 @@ 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;
|
|
9546
9554
|
framework: Framework;
|
|
9547
9555
|
hasTypeScript: boolean;
|
|
9548
9556
|
hasReactCompiler: boolean;
|
|
9549
9557
|
hasReactCompilerLintPlugin?: boolean;
|
|
9550
9558
|
hasTanStackQuery: boolean;
|
|
9559
|
+
hasRemotion?: boolean;
|
|
9560
|
+
remotionVersion?: string | null;
|
|
9561
|
+
remotionMajorVersion?: number | null;
|
|
9551
9562
|
/**
|
|
9552
9563
|
* The declared `valtio` version spec, or `null` when no package in the
|
|
9553
9564
|
* analyzed project declares Valtio. `useSnapshot` has kept the same
|
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]="1d61ce96-d819-561a-9f41-f616d6355f62")}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,6 +34121,10 @@ 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";
|
|
34124
34128
|
const SHOPIFY_FLASH_LIST_PACKAGE_NAME = "@shopify/flash-list";
|
|
34125
34129
|
const resolveWorkspaceDependencyVersion = ({ concreteVersion, packageName, rootDirectory, rootPackageJson, sections, workspaceDirectory, workspacePackageJson }) => {
|
|
34126
34130
|
const dependencyDeclaration = getDependencyDeclaration({
|
|
@@ -34139,7 +34143,18 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
|
|
|
34139
34143
|
if (nextMajor === null) return false;
|
|
34140
34144
|
return nextMajor < currentMajor;
|
|
34141
34145
|
};
|
|
34142
|
-
const
|
|
34146
|
+
const shouldReplaceMobxFact = (currentFact, nextFact) => {
|
|
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 > 6) return false;
|
|
34154
|
+
if (nextMajor > 6) return true;
|
|
34155
|
+
return nextMajor < currentMajor;
|
|
34156
|
+
};
|
|
34157
|
+
const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
|
|
34143
34158
|
if (facts.expo.version === null) {
|
|
34144
34159
|
const spec = getDependencySpec(packageJson, "expo");
|
|
34145
34160
|
if (spec !== null) facts.expo = {
|
|
@@ -34161,6 +34176,23 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
34161
34176
|
sourceDirectory: directory
|
|
34162
34177
|
};
|
|
34163
34178
|
}
|
|
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 (shouldReplaceMobxFact(facts.mobx, nextMobxFact)) 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;
|
|
34164
34196
|
if (facts.reanimatedVersion === null) {
|
|
34165
34197
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
34166
34198
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
@@ -34172,6 +34204,24 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
34172
34204
|
facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
|
|
34173
34205
|
facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
|
|
34174
34206
|
facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
|
|
34207
|
+
const remotionSpec = getDependencySpec(packageJson, "remotion");
|
|
34208
|
+
if (remotionSpec !== null) {
|
|
34209
|
+
facts.hasRemotionDependency = true;
|
|
34210
|
+
const resolvedRemotionVersion = resolveCatalogBackedDependencyVersion({
|
|
34211
|
+
rootDirectory,
|
|
34212
|
+
rootPackageJson,
|
|
34213
|
+
packageName: "remotion",
|
|
34214
|
+
version: remotionSpec
|
|
34215
|
+
});
|
|
34216
|
+
const remotionMajorVersion = resolvedRemotionVersion === null ? null : getLowestDependencyMajor(resolvedRemotionVersion);
|
|
34217
|
+
if (remotionMajorVersion === null) {
|
|
34218
|
+
facts.hasUnknownRemotionVersion = true;
|
|
34219
|
+
facts.remotionVersion = null;
|
|
34220
|
+
} else if (!facts.hasUnknownRemotionVersion) {
|
|
34221
|
+
const currentRemotionMajorVersion = facts.remotionVersion === null ? null : getLowestDependencyMajor(facts.remotionVersion);
|
|
34222
|
+
if (currentRemotionMajorVersion === null || remotionMajorVersion < currentRemotionMajorVersion) facts.remotionVersion = resolvedRemotionVersion;
|
|
34223
|
+
}
|
|
34224
|
+
}
|
|
34175
34225
|
};
|
|
34176
34226
|
const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGroup }) => {
|
|
34177
34227
|
const facts = {
|
|
@@ -34192,12 +34242,23 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
34192
34242
|
sourceDirectory: null
|
|
34193
34243
|
},
|
|
34194
34244
|
valtioVersion: null,
|
|
34245
|
+
mobx: {
|
|
34246
|
+
version: null,
|
|
34247
|
+
sourceDirectory: null
|
|
34248
|
+
},
|
|
34249
|
+
hasMobxReact: false,
|
|
34250
|
+
hasMobxReactLite: false,
|
|
34251
|
+
hasMobxStateTree: false,
|
|
34252
|
+
hasMobxReactObserver: false,
|
|
34195
34253
|
hasReactNativeAwarePackage: false,
|
|
34196
34254
|
hasReanimatedAwarePackage: false,
|
|
34197
34255
|
hasSsrDependency: false,
|
|
34256
|
+
hasRemotionDependency: false,
|
|
34257
|
+
hasUnknownRemotionVersion: false,
|
|
34258
|
+
remotionVersion: null,
|
|
34198
34259
|
reanimatedVersion: null
|
|
34199
34260
|
};
|
|
34200
|
-
evaluateManifestFacts(facts, rootPackageJson, rootDirectory);
|
|
34261
|
+
evaluateManifestFacts(facts, rootPackageJson, rootDirectory, rootDirectory, rootPackageJson);
|
|
34201
34262
|
let isReactGroupSettled = !collectReactGroup;
|
|
34202
34263
|
const visitedDirectories = /* @__PURE__ */ new Set();
|
|
34203
34264
|
for (const pattern of getWorkspacePatterns(rootDirectory, rootPackageJson)) {
|
|
@@ -34206,7 +34267,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
34206
34267
|
if (visitedDirectories.has(workspaceDirectory)) continue;
|
|
34207
34268
|
visitedDirectories.add(workspaceDirectory);
|
|
34208
34269
|
const workspacePackageJson = readPackageJson(Path.join(workspaceDirectory, "package.json"));
|
|
34209
|
-
evaluateManifestFacts(facts, workspacePackageJson, workspaceDirectory);
|
|
34270
|
+
evaluateManifestFacts(facts, workspacePackageJson, workspaceDirectory, rootDirectory, rootPackageJson);
|
|
34210
34271
|
const info = extractDependencyInfo(workspacePackageJson);
|
|
34211
34272
|
if (info.framework !== "unknown" && frameworkMergeRank(info.framework) < frameworkMergeRank(facts.framework)) facts.framework = info.framework;
|
|
34212
34273
|
if (isReactGroupSettled) continue;
|
|
@@ -34430,6 +34491,12 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
34430
34491
|
tailwindVersion: null,
|
|
34431
34492
|
zodVersion: null,
|
|
34432
34493
|
zodMajorVersion: null,
|
|
34494
|
+
mobxVersion: null,
|
|
34495
|
+
mobxMajorVersion: null,
|
|
34496
|
+
hasMobxReact: false,
|
|
34497
|
+
hasMobxReactLite: false,
|
|
34498
|
+
hasMobxStateTree: false,
|
|
34499
|
+
hasMobxReactObserver: false,
|
|
34433
34500
|
framework: "unknown",
|
|
34434
34501
|
hasTypeScript: hasOwnTsConfig,
|
|
34435
34502
|
hasReactCompiler: false,
|
|
@@ -34437,6 +34504,9 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
34437
34504
|
hasTanStackQuery: false,
|
|
34438
34505
|
valtioVersion: null,
|
|
34439
34506
|
valtioMajorVersion: null,
|
|
34507
|
+
hasRemotion: false,
|
|
34508
|
+
remotionVersion: null,
|
|
34509
|
+
remotionMajorVersion: null,
|
|
34440
34510
|
hasSsrDependency: false,
|
|
34441
34511
|
preactVersion: null,
|
|
34442
34512
|
preactMajorVersion: null,
|
|
@@ -34549,7 +34619,14 @@ const discoverProject = (directory) => {
|
|
|
34549
34619
|
packageName: "valtio",
|
|
34550
34620
|
version: workspaceFacts.valtioVersion
|
|
34551
34621
|
});
|
|
34622
|
+
const mobxVersion = resolveCatalogBackedDependencyVersion({
|
|
34623
|
+
rootDirectory: directory,
|
|
34624
|
+
rootPackageJson: packageJson,
|
|
34625
|
+
packageName: "mobx",
|
|
34626
|
+
version: workspaceFacts.mobx.version
|
|
34627
|
+
});
|
|
34552
34628
|
const preactVersion = getPreactVersion(packageJson);
|
|
34629
|
+
const remotionVersion = workspaceFacts.remotionVersion;
|
|
34553
34630
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
34554
34631
|
const projectInfo = {
|
|
34555
34632
|
rootDirectory: directory,
|
|
@@ -34559,6 +34636,12 @@ const discoverProject = (directory) => {
|
|
|
34559
34636
|
tailwindVersion,
|
|
34560
34637
|
zodVersion,
|
|
34561
34638
|
zodMajorVersion: zodVersion === null ? null : getLowestDependencyMajor(zodVersion),
|
|
34639
|
+
mobxVersion,
|
|
34640
|
+
mobxMajorVersion: mobxVersion === null ? null : getLowestDependencyMajor(mobxVersion),
|
|
34641
|
+
hasMobxReact: workspaceFacts.hasMobxReact,
|
|
34642
|
+
hasMobxReactLite: workspaceFacts.hasMobxReactLite,
|
|
34643
|
+
hasMobxStateTree: workspaceFacts.hasMobxStateTree,
|
|
34644
|
+
hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
|
|
34562
34645
|
framework,
|
|
34563
34646
|
hasTypeScript,
|
|
34564
34647
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
@@ -34566,6 +34649,9 @@ const discoverProject = (directory) => {
|
|
|
34566
34649
|
hasTanStackQuery: hasTanStackQuery(packageJson),
|
|
34567
34650
|
valtioVersion,
|
|
34568
34651
|
valtioMajorVersion: valtioVersion === null ? null : getLowestDependencyMajor(valtioVersion),
|
|
34652
|
+
hasRemotion: workspaceFacts.hasRemotionDependency,
|
|
34653
|
+
remotionVersion,
|
|
34654
|
+
remotionMajorVersion: remotionVersion === null ? null : getLowestDependencyMajor(remotionVersion),
|
|
34569
34655
|
hasSsrDependency: workspaceFacts.hasSsrDependency,
|
|
34570
34656
|
preactVersion,
|
|
34571
34657
|
preactMajorVersion: parseReactMajor(preactVersion),
|
|
@@ -37868,11 +37954,22 @@ const buildCapabilities = (project) => {
|
|
|
37868
37954
|
})) capabilities.add("tailwind:3.4");
|
|
37869
37955
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
37870
37956
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
37957
|
+
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
37958
|
+
if (project.hasMobxReact === true) capabilities.add("mobx-react");
|
|
37959
|
+
if (project.hasMobxReactLite === true) capabilities.add("mobx-react-lite");
|
|
37960
|
+
if (project.hasMobxReact === true || project.hasMobxReactLite === true) capabilities.add("mobx-react-binding");
|
|
37961
|
+
if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
|
|
37962
|
+
if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
|
|
37963
|
+
if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
|
|
37871
37964
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
37872
37965
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
37873
37966
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
37874
37967
|
if (project.valtioVersion !== null) capabilities.add("valtio");
|
|
37875
37968
|
addMajorLadder(capabilities, "valtio", project.valtioMajorVersion, 1, 10);
|
|
37969
|
+
if (project.hasRemotion) {
|
|
37970
|
+
capabilities.add("remotion");
|
|
37971
|
+
addMajorLadder(capabilities, "remotion", project.remotionMajorVersion ?? null, 4, 30);
|
|
37972
|
+
}
|
|
37876
37973
|
if (project.hasTypeScript) capabilities.add("typescript");
|
|
37877
37974
|
if (project.preactVersion !== null) capabilities.add("preact");
|
|
37878
37975
|
addMajorLadder(capabilities, "preact", project.preactMajorVersion, 10, 20);
|
|
@@ -43856,4 +43953,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
43856
43953
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
43857
43954
|
|
|
43858
43955
|
//# sourceMappingURL=index.js.map
|
|
43859
|
-
//# debugId=
|
|
43956
|
+
//# debugId=1d61ce96-d819-561a-9f41-f616d6355f62
|
package/dist/lsp.js
CHANGED
|
@@ -34173,6 +34173,10 @@ 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";
|
|
34176
34180
|
const SHOPIFY_FLASH_LIST_PACKAGE_NAME = "@shopify/flash-list";
|
|
34177
34181
|
const resolveWorkspaceDependencyVersion = ({ concreteVersion, packageName, rootDirectory, rootPackageJson, sections, workspaceDirectory, workspacePackageJson }) => {
|
|
34178
34182
|
const dependencyDeclaration = getDependencyDeclaration({
|
|
@@ -34191,7 +34195,18 @@ const shouldReplaceReactVersion = (currentVersion, nextVersion) => {
|
|
|
34191
34195
|
if (nextMajor === null) return false;
|
|
34192
34196
|
return nextMajor < currentMajor;
|
|
34193
34197
|
};
|
|
34194
|
-
const
|
|
34198
|
+
const shouldReplaceMobxFact = (currentFact, nextFact) => {
|
|
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 > 6) return false;
|
|
34206
|
+
if (nextMajor > 6) return true;
|
|
34207
|
+
return nextMajor < currentMajor;
|
|
34208
|
+
};
|
|
34209
|
+
const evaluateManifestFacts = (facts, packageJson, directory, rootDirectory, rootPackageJson) => {
|
|
34195
34210
|
if (facts.expo.version === null) {
|
|
34196
34211
|
const spec = getDependencySpec(packageJson, "expo");
|
|
34197
34212
|
if (spec !== null) facts.expo = {
|
|
@@ -34213,6 +34228,23 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
34213
34228
|
sourceDirectory: directory
|
|
34214
34229
|
};
|
|
34215
34230
|
}
|
|
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 (shouldReplaceMobxFact(facts.mobx, nextMobxFact)) 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;
|
|
34216
34248
|
if (facts.reanimatedVersion === null) {
|
|
34217
34249
|
const spec = getDependencySpec(packageJson, REANIMATED_DEPENDENCY_NAME);
|
|
34218
34250
|
if (spec !== null) facts.reanimatedVersion = spec;
|
|
@@ -34224,6 +34256,24 @@ const evaluateManifestFacts = (facts, packageJson, directory) => {
|
|
|
34224
34256
|
facts.hasReactNativeAwarePackage = facts.hasReactNativeAwarePackage || isPackageJsonReactNativeAware(packageJson);
|
|
34225
34257
|
facts.hasReanimatedAwarePackage = facts.hasReanimatedAwarePackage || isPackageJsonReanimatedAware(packageJson);
|
|
34226
34258
|
facts.hasSsrDependency = facts.hasSsrDependency || isPackageJsonSsrAware(packageJson);
|
|
34259
|
+
const remotionSpec = getDependencySpec(packageJson, "remotion");
|
|
34260
|
+
if (remotionSpec !== null) {
|
|
34261
|
+
facts.hasRemotionDependency = true;
|
|
34262
|
+
const resolvedRemotionVersion = resolveCatalogBackedDependencyVersion({
|
|
34263
|
+
rootDirectory,
|
|
34264
|
+
rootPackageJson,
|
|
34265
|
+
packageName: "remotion",
|
|
34266
|
+
version: remotionSpec
|
|
34267
|
+
});
|
|
34268
|
+
const remotionMajorVersion = resolvedRemotionVersion === null ? null : getLowestDependencyMajor(resolvedRemotionVersion);
|
|
34269
|
+
if (remotionMajorVersion === null) {
|
|
34270
|
+
facts.hasUnknownRemotionVersion = true;
|
|
34271
|
+
facts.remotionVersion = null;
|
|
34272
|
+
} else if (!facts.hasUnknownRemotionVersion) {
|
|
34273
|
+
const currentRemotionMajorVersion = facts.remotionVersion === null ? null : getLowestDependencyMajor(facts.remotionVersion);
|
|
34274
|
+
if (currentRemotionMajorVersion === null || remotionMajorVersion < currentRemotionMajorVersion) facts.remotionVersion = resolvedRemotionVersion;
|
|
34275
|
+
}
|
|
34276
|
+
}
|
|
34227
34277
|
};
|
|
34228
34278
|
const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGroup }) => {
|
|
34229
34279
|
const facts = {
|
|
@@ -34244,12 +34294,23 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
34244
34294
|
sourceDirectory: null
|
|
34245
34295
|
},
|
|
34246
34296
|
valtioVersion: null,
|
|
34297
|
+
mobx: {
|
|
34298
|
+
version: null,
|
|
34299
|
+
sourceDirectory: null
|
|
34300
|
+
},
|
|
34301
|
+
hasMobxReact: false,
|
|
34302
|
+
hasMobxReactLite: false,
|
|
34303
|
+
hasMobxStateTree: false,
|
|
34304
|
+
hasMobxReactObserver: false,
|
|
34247
34305
|
hasReactNativeAwarePackage: false,
|
|
34248
34306
|
hasReanimatedAwarePackage: false,
|
|
34249
34307
|
hasSsrDependency: false,
|
|
34308
|
+
hasRemotionDependency: false,
|
|
34309
|
+
hasUnknownRemotionVersion: false,
|
|
34310
|
+
remotionVersion: null,
|
|
34250
34311
|
reanimatedVersion: null
|
|
34251
34312
|
};
|
|
34252
|
-
evaluateManifestFacts(facts, rootPackageJson, rootDirectory);
|
|
34313
|
+
evaluateManifestFacts(facts, rootPackageJson, rootDirectory, rootDirectory, rootPackageJson);
|
|
34253
34314
|
let isReactGroupSettled = !collectReactGroup;
|
|
34254
34315
|
const visitedDirectories = /* @__PURE__ */ new Set();
|
|
34255
34316
|
for (const pattern of getWorkspacePatterns(rootDirectory, rootPackageJson)) {
|
|
@@ -34258,7 +34319,7 @@ const collectWorkspaceFacts = (rootDirectory, rootPackageJson, { collectReactGro
|
|
|
34258
34319
|
if (visitedDirectories.has(workspaceDirectory)) continue;
|
|
34259
34320
|
visitedDirectories.add(workspaceDirectory);
|
|
34260
34321
|
const workspacePackageJson = readPackageJson(Path.join(workspaceDirectory, "package.json"));
|
|
34261
|
-
evaluateManifestFacts(facts, workspacePackageJson, workspaceDirectory);
|
|
34322
|
+
evaluateManifestFacts(facts, workspacePackageJson, workspaceDirectory, rootDirectory, rootPackageJson);
|
|
34262
34323
|
const info = extractDependencyInfo(workspacePackageJson);
|
|
34263
34324
|
if (info.framework !== "unknown" && frameworkMergeRank(info.framework) < frameworkMergeRank(facts.framework)) facts.framework = info.framework;
|
|
34264
34325
|
if (isReactGroupSettled) continue;
|
|
@@ -34482,6 +34543,12 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
34482
34543
|
tailwindVersion: null,
|
|
34483
34544
|
zodVersion: null,
|
|
34484
34545
|
zodMajorVersion: null,
|
|
34546
|
+
mobxVersion: null,
|
|
34547
|
+
mobxMajorVersion: null,
|
|
34548
|
+
hasMobxReact: false,
|
|
34549
|
+
hasMobxReactLite: false,
|
|
34550
|
+
hasMobxStateTree: false,
|
|
34551
|
+
hasMobxReactObserver: false,
|
|
34485
34552
|
framework: "unknown",
|
|
34486
34553
|
hasTypeScript: hasOwnTsConfig,
|
|
34487
34554
|
hasReactCompiler: false,
|
|
@@ -34489,6 +34556,9 @@ const discoverProjectWithoutPackageJson = (directory) => {
|
|
|
34489
34556
|
hasTanStackQuery: false,
|
|
34490
34557
|
valtioVersion: null,
|
|
34491
34558
|
valtioMajorVersion: null,
|
|
34559
|
+
hasRemotion: false,
|
|
34560
|
+
remotionVersion: null,
|
|
34561
|
+
remotionMajorVersion: null,
|
|
34492
34562
|
hasSsrDependency: false,
|
|
34493
34563
|
preactVersion: null,
|
|
34494
34564
|
preactMajorVersion: null,
|
|
@@ -34601,7 +34671,14 @@ const discoverProject = (directory) => {
|
|
|
34601
34671
|
packageName: "valtio",
|
|
34602
34672
|
version: workspaceFacts.valtioVersion
|
|
34603
34673
|
});
|
|
34674
|
+
const mobxVersion = resolveCatalogBackedDependencyVersion({
|
|
34675
|
+
rootDirectory: directory,
|
|
34676
|
+
rootPackageJson: packageJson,
|
|
34677
|
+
packageName: "mobx",
|
|
34678
|
+
version: workspaceFacts.mobx.version
|
|
34679
|
+
});
|
|
34604
34680
|
const preactVersion = getPreactVersion(packageJson);
|
|
34681
|
+
const remotionVersion = workspaceFacts.remotionVersion;
|
|
34605
34682
|
const isPreES2023Target = hasTypeScript && detectPreES2023Target(directory);
|
|
34606
34683
|
const projectInfo = {
|
|
34607
34684
|
rootDirectory: directory,
|
|
@@ -34611,6 +34688,12 @@ const discoverProject = (directory) => {
|
|
|
34611
34688
|
tailwindVersion,
|
|
34612
34689
|
zodVersion,
|
|
34613
34690
|
zodMajorVersion: zodVersion === null ? null : getLowestDependencyMajor(zodVersion),
|
|
34691
|
+
mobxVersion,
|
|
34692
|
+
mobxMajorVersion: mobxVersion === null ? null : getLowestDependencyMajor(mobxVersion),
|
|
34693
|
+
hasMobxReact: workspaceFacts.hasMobxReact,
|
|
34694
|
+
hasMobxReactLite: workspaceFacts.hasMobxReactLite,
|
|
34695
|
+
hasMobxStateTree: workspaceFacts.hasMobxStateTree,
|
|
34696
|
+
hasMobxReactObserver: workspaceFacts.hasMobxReactObserver,
|
|
34614
34697
|
framework,
|
|
34615
34698
|
hasTypeScript,
|
|
34616
34699
|
hasReactCompiler: detectReactCompiler(directory, packageJson),
|
|
@@ -34618,6 +34701,9 @@ const discoverProject = (directory) => {
|
|
|
34618
34701
|
hasTanStackQuery: hasTanStackQuery(packageJson),
|
|
34619
34702
|
valtioVersion,
|
|
34620
34703
|
valtioMajorVersion: valtioVersion === null ? null : getLowestDependencyMajor(valtioVersion),
|
|
34704
|
+
hasRemotion: workspaceFacts.hasRemotionDependency,
|
|
34705
|
+
remotionVersion,
|
|
34706
|
+
remotionMajorVersion: remotionVersion === null ? null : getLowestDependencyMajor(remotionVersion),
|
|
34621
34707
|
hasSsrDependency: workspaceFacts.hasSsrDependency,
|
|
34622
34708
|
preactVersion,
|
|
34623
34709
|
preactMajorVersion: parseReactMajor(preactVersion),
|
|
@@ -37846,11 +37932,22 @@ const buildCapabilities = (project) => {
|
|
|
37846
37932
|
})) capabilities.add("tailwind:3.4");
|
|
37847
37933
|
if (project.zodVersion !== null) capabilities.add("zod");
|
|
37848
37934
|
if (project.zodMajorVersion !== null && project.zodMajorVersion >= 4) capabilities.add("zod:4");
|
|
37935
|
+
if (project.mobxVersion !== void 0 && project.mobxVersion !== null || project.hasMobxReact === true || project.hasMobxReactLite === true || project.hasMobxStateTree === true || project.hasMobxReactObserver === true) capabilities.add("mobx");
|
|
37936
|
+
if (project.hasMobxReact === true) capabilities.add("mobx-react");
|
|
37937
|
+
if (project.hasMobxReactLite === true) capabilities.add("mobx-react-lite");
|
|
37938
|
+
if (project.hasMobxReact === true || project.hasMobxReactLite === true) capabilities.add("mobx-react-binding");
|
|
37939
|
+
if (project.hasMobxStateTree === true) capabilities.add("mobx-state-tree");
|
|
37940
|
+
if (project.hasMobxReactObserver === true) capabilities.add("mobx-react-observer");
|
|
37941
|
+
if (project.mobxMajorVersion !== void 0 && project.mobxMajorVersion !== null && project.mobxMajorVersion >= 4 && project.mobxMajorVersion <= 6) addMajorLadder(capabilities, "mobx", project.mobxMajorVersion, 4, 6);
|
|
37849
37942
|
if (project.isPreES2023Target) capabilities.add("pre-es2023");
|
|
37850
37943
|
if (project.hasReactCompiler) capabilities.add("react-compiler");
|
|
37851
37944
|
if (project.hasTanStackQuery) capabilities.add("tanstack-query");
|
|
37852
37945
|
if (project.valtioVersion !== null) capabilities.add("valtio");
|
|
37853
37946
|
addMajorLadder(capabilities, "valtio", project.valtioMajorVersion, 1, 10);
|
|
37947
|
+
if (project.hasRemotion) {
|
|
37948
|
+
capabilities.add("remotion");
|
|
37949
|
+
addMajorLadder(capabilities, "remotion", project.remotionMajorVersion ?? null, 4, 30);
|
|
37950
|
+
}
|
|
37854
37951
|
if (project.hasTypeScript) capabilities.add("typescript");
|
|
37855
37952
|
if (project.preactVersion !== null) capabilities.add("preact");
|
|
37856
37953
|
addMajorLadder(capabilities, "preact", project.preactMajorVersion, 10, 20);
|
|
@@ -45476,5 +45573,5 @@ const startLanguageServer = () => {
|
|
|
45476
45573
|
};
|
|
45477
45574
|
//#endregion
|
|
45478
45575
|
export { startLanguageServer };
|
|
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]="
|
|
45480
|
-
//# debugId=
|
|
45576
|
+
!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]="23f6c159-20b7-5636-888d-5add4f4c7fc3")}catch(e){}}();
|
|
45577
|
+
//# debugId=23f6c159-20b7-5636-888d-5add4f4c7fc3
|
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.61bf03e",
|
|
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.8.1",
|
|
69
|
-
"oxlint-plugin-react-doctor": "0.8.1-dev.
|
|
69
|
+
"oxlint-plugin-react-doctor": "0.8.1-dev.61bf03e"
|
|
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/api": "0.8.1",
|
|
78
77
|
"@react-doctor/core": "0.8.1",
|
|
78
|
+
"@react-doctor/api": "0.8.1",
|
|
79
79
|
"@react-doctor/language-server": "0.8.1"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|