react-doctor 0.4.0-dev.ee9ab33 → 0.4.0-dev.fe5f3de

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="234f49e5-7510-5a79-ba10-9366aecc015b")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="646273cf-f6f6-5523-a0f4-a333f73e0d4f")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
5
5
  import * as path$1 from "node:path";
@@ -6004,6 +6004,11 @@ const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson,
6004
6004
  if (!isFile(monorepoPackageJsonPath)) return version;
6005
6005
  return resolveCatalogVersion(readPackageJson$1(monorepoPackageJsonPath), packageName, monorepoRoot, catalogName) ?? version;
6006
6006
  };
6007
+ const getNextjsDependencySpec = (packageJson) => {
6008
+ const spec = packageJson.dependencies?.next ?? packageJson.devDependencies?.next ?? packageJson.peerDependencies?.next ?? packageJson.optionalDependencies?.next;
6009
+ return typeof spec === "string" ? spec : null;
6010
+ };
6011
+ const findNextjsVersion = (rootDirectory, rootPackageJson) => findInWorkspacePackageJsons(rootDirectory, rootPackageJson, getNextjsDependencySpec);
6007
6012
  const getPreactVersion = (packageJson) => {
6008
6013
  return {
6009
6014
  ...packageJson.peerDependencies,
@@ -6253,6 +6258,12 @@ const discoverProject = (directory) => {
6253
6258
  version: findShopifyFlashListVersion(directory, packageJson)
6254
6259
  }) : null;
6255
6260
  const hasReanimated = hasReactNativeWorkspace && someWorkspacePackageJson(directory, packageJson, isPackageJsonReanimatedAware);
6261
+ const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
6262
+ rootDirectory: directory,
6263
+ rootPackageJson: packageJson,
6264
+ packageName: "next",
6265
+ version: findNextjsVersion(directory, packageJson)
6266
+ }) : null;
6256
6267
  const preactVersion = getPreactVersion(packageJson);
6257
6268
  const projectInfo = {
6258
6269
  rootDirectory: directory,
@@ -6269,6 +6280,8 @@ const discoverProject = (directory) => {
6269
6280
  preactVersion,
6270
6281
  preactMajorVersion: parseReactMajor(preactVersion),
6271
6282
  hasReactNativeWorkspace,
6283
+ nextjsVersion,
6284
+ nextjsMajorVersion: nextjsVersion === null ? null : getLowestDependencyMajor(nextjsVersion),
6272
6285
  expoVersion,
6273
6286
  shopifyFlashListVersion,
6274
6287
  shopifyFlashListMajorVersion: shopifyFlashListVersion === null ? null : getLowestDependencyMajor(shopifyFlashListVersion),
@@ -9765,6 +9778,7 @@ const buildCapabilities = (project) => {
9765
9778
  capabilities.add(project.framework);
9766
9779
  if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
9767
9780
  if (project.expoVersion !== null) capabilities.add("expo");
9781
+ if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
9768
9782
  const reactMajor = project.reactMajorVersion;
9769
9783
  if (reactMajor !== null) {
9770
9784
  const cappedReactMajor = Math.min(reactMajor, 30);
@@ -12197,7 +12211,7 @@ const makeNoopConsole = () => ({
12197
12211
  });
12198
12212
  //#endregion
12199
12213
  //#region src/cli/utils/version.ts
12200
- const VERSION = "0.4.0-dev.ee9ab33";
12214
+ const VERSION = "0.4.0-dev.fe5f3de";
12201
12215
  //#endregion
12202
12216
  //#region src/cli/utils/json-mode.ts
12203
12217
  let context = null;
@@ -12555,13 +12569,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
12555
12569
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
12556
12570
  * standard `SENTRY_RELEASE` override.
12557
12571
  */
12558
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.4.0-dev.ee9ab33`;
12572
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.4.0-dev.fe5f3de`;
12559
12573
  /**
12560
12574
  * Deployment environment shown in Sentry's environment filter. Defaults to
12561
12575
  * `production` for tagged releases and `development` for dev/unbuilt versions,
12562
12576
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
12563
12577
  */
12564
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.4.0-dev.ee9ab33") ? "development" : "production");
12578
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.4.0-dev.fe5f3de") ? "development" : "production");
12565
12579
  /**
12566
12580
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
12567
12581
  * (set to `0` to disable tracing) and falls back to
@@ -21454,4 +21468,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
21454
21468
  export {};
21455
21469
 
21456
21470
  //# sourceMappingURL=cli.js.map
21457
- //# debugId=234f49e5-7510-5a79-ba10-9366aecc015b
21471
+ //# debugId=646273cf-f6f6-5523-a0f4-a333f73e0d4f
package/dist/index.d.ts CHANGED
@@ -453,6 +453,8 @@ interface ProjectInfo {
453
453
  * — no `rn-*` rules load for the project at all.
454
454
  */
455
455
  hasReactNativeWorkspace: boolean;
456
+ nextjsVersion: string | null;
457
+ nextjsMajorVersion: number | null;
456
458
  /**
457
459
  * The declared `expo` package version spec (e.g. `"~51.0.0"`), looked up
458
460
  * in the project or any of its workspace packages, or `null` when `expo`
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]="89213cff-26e1-5f16-a3b2-135fc4f96aab")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3118af5e-d2d7-5885-a74e-4011b2abc203")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import * as Schema from "effect/Schema";
5
5
  import * as fs$1 from "node:fs";
@@ -2981,6 +2981,11 @@ const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson,
2981
2981
  if (!isFile(monorepoPackageJsonPath)) return version;
2982
2982
  return resolveCatalogVersion(readPackageJson(monorepoPackageJsonPath), packageName, monorepoRoot, catalogName) ?? version;
2983
2983
  };
2984
+ const getNextjsDependencySpec = (packageJson) => {
2985
+ const spec = packageJson.dependencies?.next ?? packageJson.devDependencies?.next ?? packageJson.peerDependencies?.next ?? packageJson.optionalDependencies?.next;
2986
+ return typeof spec === "string" ? spec : null;
2987
+ };
2988
+ const findNextjsVersion = (rootDirectory, rootPackageJson) => findInWorkspacePackageJsons(rootDirectory, rootPackageJson, getNextjsDependencySpec);
2984
2989
  const getPreactVersion = (packageJson) => {
2985
2990
  return {
2986
2991
  ...packageJson.peerDependencies,
@@ -3233,6 +3238,12 @@ const discoverProject = (directory) => {
3233
3238
  version: findShopifyFlashListVersion(directory, packageJson)
3234
3239
  }) : null;
3235
3240
  const hasReanimated = hasReactNativeWorkspace && someWorkspacePackageJson(directory, packageJson, isPackageJsonReanimatedAware);
3241
+ const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
3242
+ rootDirectory: directory,
3243
+ rootPackageJson: packageJson,
3244
+ packageName: "next",
3245
+ version: findNextjsVersion(directory, packageJson)
3246
+ }) : null;
3236
3247
  const preactVersion = getPreactVersion(packageJson);
3237
3248
  const projectInfo = {
3238
3249
  rootDirectory: directory,
@@ -3249,6 +3260,8 @@ const discoverProject = (directory) => {
3249
3260
  preactVersion,
3250
3261
  preactMajorVersion: parseReactMajor(preactVersion),
3251
3262
  hasReactNativeWorkspace,
3263
+ nextjsVersion,
3264
+ nextjsMajorVersion: nextjsVersion === null ? null : getLowestDependencyMajor(nextjsVersion),
3252
3265
  expoVersion,
3253
3266
  shopifyFlashListVersion,
3254
3267
  shopifyFlashListMajorVersion: shopifyFlashListVersion === null ? null : getLowestDependencyMajor(shopifyFlashListVersion),
@@ -6698,6 +6711,7 @@ const buildCapabilities = (project) => {
6698
6711
  capabilities.add(project.framework);
6699
6712
  if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
6700
6713
  if (project.expoVersion !== null) capabilities.add("expo");
6714
+ if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
6701
6715
  const reactMajor = project.reactMajorVersion;
6702
6716
  if (reactMajor !== null) {
6703
6717
  const cappedReactMajor = Math.min(reactMajor, 30);
@@ -8935,4 +8949,4 @@ const toJsonReport = (result, options) => buildJsonReport({
8935
8949
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
8936
8950
 
8937
8951
  //# sourceMappingURL=index.js.map
8938
- //# debugId=89213cff-26e1-5f16-a3b2-135fc4f96aab
8952
+ //# debugId=3118af5e-d2d7-5885-a74e-4011b2abc203
package/dist/lsp.js CHANGED
@@ -2992,6 +2992,11 @@ const resolveCatalogBackedDependencyVersion = ({ rootDirectory, rootPackageJson,
2992
2992
  if (!isFile(monorepoPackageJsonPath)) return version;
2993
2993
  return resolveCatalogVersion(readPackageJson(monorepoPackageJsonPath), packageName, monorepoRoot, catalogName) ?? version;
2994
2994
  };
2995
+ const getNextjsDependencySpec = (packageJson) => {
2996
+ const spec = packageJson.dependencies?.next ?? packageJson.devDependencies?.next ?? packageJson.peerDependencies?.next ?? packageJson.optionalDependencies?.next;
2997
+ return typeof spec === "string" ? spec : null;
2998
+ };
2999
+ const findNextjsVersion = (rootDirectory, rootPackageJson) => findInWorkspacePackageJsons(rootDirectory, rootPackageJson, getNextjsDependencySpec);
2995
3000
  const getPreactVersion = (packageJson) => {
2996
3001
  return {
2997
3002
  ...packageJson.peerDependencies,
@@ -3244,6 +3249,12 @@ const discoverProject = (directory) => {
3244
3249
  version: findShopifyFlashListVersion(directory, packageJson)
3245
3250
  }) : null;
3246
3251
  const hasReanimated = hasReactNativeWorkspace && someWorkspacePackageJson(directory, packageJson, isPackageJsonReanimatedAware);
3252
+ const nextjsVersion = framework === "nextjs" ? resolveCatalogBackedDependencyVersion({
3253
+ rootDirectory: directory,
3254
+ rootPackageJson: packageJson,
3255
+ packageName: "next",
3256
+ version: findNextjsVersion(directory, packageJson)
3257
+ }) : null;
3247
3258
  const preactVersion = getPreactVersion(packageJson);
3248
3259
  const projectInfo = {
3249
3260
  rootDirectory: directory,
@@ -3260,6 +3271,8 @@ const discoverProject = (directory) => {
3260
3271
  preactVersion,
3261
3272
  preactMajorVersion: parseReactMajor(preactVersion),
3262
3273
  hasReactNativeWorkspace,
3274
+ nextjsVersion,
3275
+ nextjsMajorVersion: nextjsVersion === null ? null : getLowestDependencyMajor(nextjsVersion),
3263
3276
  expoVersion,
3264
3277
  shopifyFlashListVersion,
3265
3278
  shopifyFlashListMajorVersion: shopifyFlashListVersion === null ? null : getLowestDependencyMajor(shopifyFlashListVersion),
@@ -6635,6 +6648,7 @@ const buildCapabilities = (project) => {
6635
6648
  capabilities.add(project.framework);
6636
6649
  if (project.framework === "expo" || project.framework === "react-native" || project.hasReactNativeWorkspace) capabilities.add("react-native");
6637
6650
  if (project.expoVersion !== null) capabilities.add("expo");
6651
+ if (project.nextjsMajorVersion !== null && project.nextjsMajorVersion >= 15) capabilities.add("nextjs:15");
6638
6652
  const reactMajor = project.reactMajorVersion;
6639
6653
  if (reactMajor !== null) {
6640
6654
  const cappedReactMajor = Math.min(reactMajor, 30);
@@ -10806,5 +10820,5 @@ const startLanguageServer = () => {
10806
10820
  };
10807
10821
  //#endregion
10808
10822
  export { startLanguageServer };
10809
- !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]="3810554d-573f-57e0-8b16-216e38ece1e2")}catch(e){}}();
10810
- //# debugId=3810554d-573f-57e0-8b16-216e38ece1e2
10823
+ !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]="87d08504-e094-5770-8f0d-a1195e0df93c")}catch(e){}}();
10824
+ //# debugId=87d08504-e094-5770-8f0d-a1195e0df93c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.4.0-dev.ee9ab33",
3
+ "version": "0.4.0-dev.fe5f3de",
4
4
  "description": "Diagnose and fix React codebases for security, performance, correctness, accessibility, bundle-size, and architecture issues",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -66,7 +66,7 @@
66
66
  "vscode-languageserver": "^9.0.1",
67
67
  "vscode-languageserver-textdocument": "^1.0.12",
68
68
  "vscode-uri": "^3.1.0",
69
- "oxlint-plugin-react-doctor": "0.4.0-dev.ee9ab33"
69
+ "oxlint-plugin-react-doctor": "0.4.0-dev.fe5f3de"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/babel__code-frame": "^7.27.0",