react-doctor 0.2.18-dev.caf46a7 → 0.2.18-dev.eab6dc2

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/README.md CHANGED
@@ -70,7 +70,7 @@ jobs:
70
70
  `@v1` always resolves to the latest `v1.x` release of the Action. For hardened CI — recommended whenever the workflow is granted `pull-requests: write` — pin to a full commit SHA instead and let Dependabot or Renovate keep it current:
71
71
 
72
72
  ```yaml
73
- - uses: millionco/react-doctor@b612664043a9be414166e3c6a69b355e39a8dcf4 # v1.1.1
73
+ - uses: millionco/react-doctor@b612664043a9be414166e3c6a69b355e39a8dcf4 # v1.1.1
74
74
  ```
75
75
 
76
76
  [Add GitHub Action →](https://github.com/marketplace/actions/react-doctor)
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]="07713237-df07-5858-b7a4-7b12c0e7b293")}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]="ee44f730-8e95-5d8c-90e2-58a5f99890ae")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import { execFileSync, spawn, spawnSync } from "node:child_process";
5
5
  import * as Path from "node:path";
@@ -5157,7 +5157,10 @@ const IGNORABLE_READDIR_ERROR_CODES = new Set([
5157
5157
  "EACCES",
5158
5158
  "EPERM",
5159
5159
  "ENOENT",
5160
- "ENOTDIR"
5160
+ "ENOTDIR",
5161
+ "EINVAL",
5162
+ "ELOOP",
5163
+ "ENAMETOOLONG"
5161
5164
  ]);
5162
5165
  const isIgnorableReaddirError = (error) => {
5163
5166
  if (typeof error !== "object" || error === null) return false;
@@ -11931,7 +11934,7 @@ const makeNoopConsole = () => ({
11931
11934
  });
11932
11935
  //#endregion
11933
11936
  //#region src/cli/utils/version.ts
11934
- const VERSION = "0.2.18-dev.caf46a7";
11937
+ const VERSION = "0.2.18-dev.eab6dc2";
11935
11938
  //#endregion
11936
11939
  //#region src/cli/utils/json-mode.ts
11937
11940
  let context = null;
@@ -12277,13 +12280,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
12277
12280
  * uploads source-map artifacts under, so stack frames symbolicate. Honors the
12278
12281
  * standard `SENTRY_RELEASE` override.
12279
12282
  */
12280
- const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.2.18-dev.caf46a7`;
12283
+ const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.2.18-dev.eab6dc2`;
12281
12284
  /**
12282
12285
  * Deployment environment shown in Sentry's environment filter. Defaults to
12283
12286
  * `production` for tagged releases and `development` for dev/unbuilt versions,
12284
12287
  * overridable via the standard `SENTRY_ENVIRONMENT` env var.
12285
12288
  */
12286
- const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.2.18-dev.caf46a7") ? "development" : "production");
12289
+ const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.2.18-dev.eab6dc2") ? "development" : "production");
12287
12290
  /**
12288
12291
  * Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
12289
12292
  * (set to `0` to disable tracing) and falls back to
@@ -19936,6 +19939,30 @@ const exitGracefully = () => {
19936
19939
  process.exit(130);
19937
19940
  };
19938
19941
  //#endregion
19942
+ //#region src/cli/utils/guard-stdin.ts
19943
+ const TERMINAL_HANGUP_CODES = new Set(["EIO", "ENXIO"]);
19944
+ /**
19945
+ * Handles a `process.stdin` `'error'` event. A terminal hangup mid-read
19946
+ * (`read EIO`) is environmental, not a bug, so exit like an interrupted run
19947
+ * instead of crashing. Re-throws anything else so genuine stdin failures keep
19948
+ * funneling to the crash reporter exactly as they did before this guard.
19949
+ */
19950
+ const handleStdinError = (error) => {
19951
+ if (error.code !== void 0 && TERMINAL_HANGUP_CODES.has(error.code)) process.exit(129);
19952
+ throw error;
19953
+ };
19954
+ /**
19955
+ * Arms a `process.stdin` error guard at startup. The only thing that reads
19956
+ * stdin is the interactive `prompts` UI, which opens the TTY in raw mode and
19957
+ * never attaches an `'error'` listener of its own. Without a listener Node
19958
+ * turns a `read EIO` from a vanished terminal into a fatal uncaught exception
19959
+ * (reported to Sentry as a crash); with one, {@link handleStdinError} exits
19960
+ * cleanly on a hangup. Mirrors the stdout EPIPE guard in `cli/index.ts`.
19961
+ */
19962
+ const guardStdin = () => {
19963
+ process.stdin.on("error", handleStdinError);
19964
+ };
19965
+ //#endregion
19939
19966
  //#region src/cli/utils/normalize-help-command.ts
19940
19967
  /**
19941
19968
  * 12-factor CLI Apps (#1, "Great help is essential"): `mycli help` and
@@ -20130,6 +20157,7 @@ initializeSentry();
20130
20157
  process.on("SIGINT", exitGracefully);
20131
20158
  process.on("SIGTERM", exitGracefully);
20132
20159
  unrefStdin();
20160
+ guardStdin();
20133
20161
  const formatExampleLines = (examples) => {
20134
20162
  const width = Math.max(...examples.map(([command]) => command.length));
20135
20163
  return examples.map(([command, description]) => ` $ ${command.padEnd(width)} ${highlighter.dim(`# ${description}`)}`).join("\n");
@@ -20210,4 +20238,4 @@ program.parseAsync(argv).then(() => flushSentry()).catch(async (error) => {
20210
20238
  export {};
20211
20239
 
20212
20240
  //# sourceMappingURL=cli.js.map
20213
- //# debugId=07713237-df07-5858-b7a4-7b12c0e7b293
20241
+ //# debugId=ee44f730-8e95-5d8c-90e2-58a5f99890ae
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]="9b91fa51-6642-5351-a848-af91945dec6f")}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]="40acbd32-84e3-59a8-874d-7a23e9b8383e")}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";
@@ -2130,7 +2130,10 @@ const IGNORABLE_READDIR_ERROR_CODES = new Set([
2130
2130
  "EACCES",
2131
2131
  "EPERM",
2132
2132
  "ENOENT",
2133
- "ENOTDIR"
2133
+ "ENOTDIR",
2134
+ "EINVAL",
2135
+ "ELOOP",
2136
+ "ENAMETOOLONG"
2134
2137
  ]);
2135
2138
  const isIgnorableReaddirError = (error) => {
2136
2139
  if (typeof error !== "object" || error === null) return false;
@@ -8724,4 +8727,4 @@ const toJsonReport = (result, options) => buildJsonReport({
8724
8727
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
8725
8728
 
8726
8729
  //# sourceMappingURL=index.js.map
8727
- //# debugId=9b91fa51-6642-5351-a848-af91945dec6f
8730
+ //# debugId=40acbd32-84e3-59a8-874d-7a23e9b8383e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-doctor",
3
- "version": "0.2.18-dev.caf46a7",
3
+ "version": "0.2.18-dev.eab6dc2",
4
4
  "description": "Diagnose and fix React codebases for security, performance, correctness, accessibility, bundle-size, and architecture issues",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -63,7 +63,7 @@
63
63
  "oxlint": "^1.66.0",
64
64
  "prompts": "^2.4.2",
65
65
  "typescript": ">=5.0.4 <7",
66
- "oxlint-plugin-react-doctor": "0.2.18-dev.caf46a7"
66
+ "oxlint-plugin-react-doctor": "0.2.18-dev.eab6dc2"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/babel__code-frame": "^7.27.0",