react-doctor 0.2.18-dev.3cc9971 → 0.2.18-dev.8691177
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 +17 -8
- package/dist/index.js +6 -3
- 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]="fb03f49f-82c7-5c7c-b235-60ffe86d019a")}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.
|
|
11937
|
+
const VERSION = "0.2.18-dev.8691177";
|
|
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.
|
|
12283
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.2.18-dev.8691177`;
|
|
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.
|
|
12289
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.2.18-dev.8691177") ? "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
|
|
@@ -16044,7 +16047,7 @@ const buildRuleDetailBlock = (ruleKey, ruleDiagnostics, resolveSourceRoot, rende
|
|
|
16044
16047
|
const fixRecipeLine = formatFixRecipeLine(representative);
|
|
16045
16048
|
if (fixRecipeLine) lines.push(highlighter.gray(`${TOP_ERROR_DETAIL_INDENT}${fixRecipeLine}`));
|
|
16046
16049
|
}
|
|
16047
|
-
const renderCodeFrame = severity === "error"
|
|
16050
|
+
const renderCodeFrame = severity === "error";
|
|
16048
16051
|
const sites = renderEverySite ? ruleDiagnostics : [representative];
|
|
16049
16052
|
for (const cluster of clusterNearbyDiagnostics(sites)) lines.push(...buildDiagnosticClusterLines(cluster, resolveSourceRoot, renderCodeFrame));
|
|
16050
16053
|
return lines;
|
|
@@ -18611,7 +18614,13 @@ const isSafeRelativePath = (filePath) => {
|
|
|
18611
18614
|
return normalized === filePath;
|
|
18612
18615
|
};
|
|
18613
18616
|
const readChangedFilesFrom = (filePath) => {
|
|
18614
|
-
|
|
18617
|
+
let raw;
|
|
18618
|
+
try {
|
|
18619
|
+
raw = fs.readFileSync(filePath, "utf8");
|
|
18620
|
+
} catch (error) {
|
|
18621
|
+
const errorCode = error?.code;
|
|
18622
|
+
throw new CliInputError(`Could not read the --changed-files-from file "${filePath}"${errorCode ? ` (${errorCode})` : ""}. Pass a path to a readable text file that lists changed files, one per line.`);
|
|
18623
|
+
}
|
|
18615
18624
|
const uniqueFiles = /* @__PURE__ */ new Set();
|
|
18616
18625
|
for (const line of raw.split(/\r?\n/)) {
|
|
18617
18626
|
const candidate = toForwardSlashes(line.trim());
|
|
@@ -20235,4 +20244,4 @@ program.parseAsync(argv).then(() => flushSentry()).catch(async (error) => {
|
|
|
20235
20244
|
export {};
|
|
20236
20245
|
|
|
20237
20246
|
//# sourceMappingURL=cli.js.map
|
|
20238
|
-
//# debugId=
|
|
20247
|
+
//# debugId=fb03f49f-82c7-5c7c-b235-60ffe86d019a
|
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]="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=
|
|
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.
|
|
3
|
+
"version": "0.2.18-dev.8691177",
|
|
4
4
|
"description": "Diagnose and fix React codebases for security, performance, correctness, accessibility, bundle-size, and architecture issues",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"agent-install": "0.0.5",
|
|
56
56
|
"conf": "^15.1.0",
|
|
57
57
|
"confbox": "^0.2.4",
|
|
58
|
-
"deslop-js": "^0.0.
|
|
58
|
+
"deslop-js": "^0.0.15",
|
|
59
59
|
"effect": "4.0.0-beta.70",
|
|
60
60
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
61
61
|
"jiti": "^2.7.0",
|
|
@@ -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.
|
|
66
|
+
"oxlint-plugin-react-doctor": "0.2.18-dev.8691177"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/babel__code-frame": "^7.27.0",
|