react-doctor 0.7.6-dev.eb09902 → 0.7.6-dev.f215ace
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 +10 -10
- package/dist/index.js +7 -7
- package/dist/lsp.js +7 -7
- package/package.json +5 -5
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]="c3f08fa5-b97a-564f-9c58-cdb72d8eab8f")}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";
|
|
@@ -36341,12 +36341,10 @@ const listSourceFilesViaFilesystem = (rootDirectory) => {
|
|
|
36341
36341
|
const listSourceFilesWithSize = (rootDirectory) => collectSizedSourceFiles(rootDirectory, (listSourceFilesViaGit(rootDirectory) ?? listSourceFilesViaFilesystem(rootDirectory)).sort());
|
|
36342
36342
|
const listSourceFiles = (rootDirectory) => listSourceFilesWithSize(rootDirectory).map((entry) => entry.path);
|
|
36343
36343
|
const countSourceFiles = (rootDirectory) => listSourceFilesWithSize(rootDirectory).length;
|
|
36344
|
-
const UTF8_BOM_CHARACTER = "";
|
|
36345
|
-
const stripUtf8Bom = (content) => content.startsWith(UTF8_BOM_CHARACTER) ? content.slice(1) : content;
|
|
36346
36344
|
const cachedPackageJsons = /* @__PURE__ */ new Map();
|
|
36347
36345
|
const readPackageJsonUncached = (packageJsonPath) => {
|
|
36348
36346
|
try {
|
|
36349
|
-
return JSON.parse(
|
|
36347
|
+
return JSON.parse(NFS.readFileSync(packageJsonPath, "utf-8"));
|
|
36350
36348
|
} catch (error) {
|
|
36351
36349
|
if (error instanceof SyntaxError) return {};
|
|
36352
36350
|
if (isErrnoException(error)) {
|
|
@@ -40019,6 +40017,7 @@ const PNPM_WORKSPACE_FILE = "pnpm-workspace.yaml";
|
|
|
40019
40017
|
const PNPM_LOCKFILE = "pnpm-lock.yaml";
|
|
40020
40018
|
const PACKAGE_JSON_FILE = "package.json";
|
|
40021
40019
|
const PNPM_HARDENING_RULE_KEY = "require-pnpm-hardening";
|
|
40020
|
+
const UTF8_BOM_CHAR = "";
|
|
40022
40021
|
const HARDENING_SETTING_KEYS = new Set([
|
|
40023
40022
|
"minimumReleaseAge",
|
|
40024
40023
|
"blockExoticSubdeps",
|
|
@@ -40043,11 +40042,12 @@ const stripInlineComment = (rawValue) => {
|
|
|
40043
40042
|
return rawValue;
|
|
40044
40043
|
};
|
|
40045
40044
|
const unquote = (rawValue) => rawValue.replace(/^["']|["']$/g, "");
|
|
40045
|
+
const stripBom = (rawContent) => rawContent.startsWith(UTF8_BOM_CHAR) ? rawContent.slice(1) : rawContent;
|
|
40046
40046
|
const parseHardeningSettings = (content) => {
|
|
40047
40047
|
let minimumReleaseAge = null;
|
|
40048
40048
|
let blockExoticSubdeps = null;
|
|
40049
40049
|
let trustPolicy = null;
|
|
40050
|
-
const lines =
|
|
40050
|
+
const lines = stripBom(content).split(/\r?\n/);
|
|
40051
40051
|
for (let lineIndex = 0; lineIndex < lines.length; lineIndex += 1) {
|
|
40052
40052
|
const lineText = lines[lineIndex];
|
|
40053
40053
|
if (lineText === void 0) continue;
|
|
@@ -40081,7 +40081,7 @@ const isPnpmManagedProject = (rootDirectory) => {
|
|
|
40081
40081
|
const packageJsonPath = Path.join(rootDirectory, PACKAGE_JSON_FILE);
|
|
40082
40082
|
if (!isFile(packageJsonPath)) return false;
|
|
40083
40083
|
try {
|
|
40084
|
-
const packageJsonRaw =
|
|
40084
|
+
const packageJsonRaw = NFS.readFileSync(packageJsonPath, "utf-8");
|
|
40085
40085
|
const packageJson = JSON.parse(packageJsonRaw);
|
|
40086
40086
|
if (packageJson !== null && typeof packageJson === "object" && "packageManager" in packageJson && typeof packageJson.packageManager === "string" && packageJson.packageManager.startsWith("pnpm@")) return true;
|
|
40087
40087
|
} catch {
|
|
@@ -46699,7 +46699,7 @@ const makeNoopConsole = () => ({
|
|
|
46699
46699
|
});
|
|
46700
46700
|
//#endregion
|
|
46701
46701
|
//#region src/cli/utils/version.ts
|
|
46702
|
-
const VERSION = "0.7.6-dev.
|
|
46702
|
+
const VERSION = "0.7.6-dev.f215ace";
|
|
46703
46703
|
//#endregion
|
|
46704
46704
|
//#region src/cli/utils/json-mode.ts
|
|
46705
46705
|
let context = null;
|
|
@@ -47068,13 +47068,13 @@ const isDevVersion = (version) => version === "0.0.0" || version.includes("-");
|
|
|
47068
47068
|
* uploads source-map artifacts under, so stack frames symbolicate. Honors the
|
|
47069
47069
|
* standard `SENTRY_RELEASE` override.
|
|
47070
47070
|
*/
|
|
47071
|
-
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.6-dev.
|
|
47071
|
+
const resolveSentryRelease = () => process.env.SENTRY_RELEASE || `react-doctor@0.7.6-dev.f215ace`;
|
|
47072
47072
|
/**
|
|
47073
47073
|
* Deployment environment shown in Sentry's environment filter. Defaults to
|
|
47074
47074
|
* `production` for tagged releases and `development` for dev/unbuilt versions,
|
|
47075
47075
|
* overridable via the standard `SENTRY_ENVIRONMENT` env var.
|
|
47076
47076
|
*/
|
|
47077
|
-
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.6-dev.
|
|
47077
|
+
const resolveSentryEnvironment = () => process.env.SENTRY_ENVIRONMENT || (isDevVersion("0.7.6-dev.f215ace") ? "development" : "production");
|
|
47078
47078
|
/**
|
|
47079
47079
|
* Performance-tracing sample rate in `[0, 1]`. Reads `SENTRY_TRACES_SAMPLE_RATE`
|
|
47080
47080
|
* (set to `0` to disable tracing) and falls back to
|
|
@@ -65271,4 +65271,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
65271
65271
|
export {};
|
|
65272
65272
|
|
|
65273
65273
|
//# sourceMappingURL=cli.js.map
|
|
65274
|
-
//# debugId=
|
|
65274
|
+
//# debugId=c3f08fa5-b97a-564f-9c58-cdb72d8eab8f
|
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]="fc1129a0-9ad2-5802-a82e-4982d9572eed")}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";
|
|
@@ -33142,15 +33142,13 @@ const listSourceFilesViaFilesystem = (rootDirectory) => {
|
|
|
33142
33142
|
const listSourceFilesWithSize = (rootDirectory) => collectSizedSourceFiles(rootDirectory, (listSourceFilesViaGit(rootDirectory) ?? listSourceFilesViaFilesystem(rootDirectory)).sort());
|
|
33143
33143
|
const listSourceFiles = (rootDirectory) => listSourceFilesWithSize(rootDirectory).map((entry) => entry.path);
|
|
33144
33144
|
const countSourceFiles = (rootDirectory) => listSourceFilesWithSize(rootDirectory).length;
|
|
33145
|
-
const UTF8_BOM_CHARACTER = "";
|
|
33146
|
-
const stripUtf8Bom = (content) => content.startsWith(UTF8_BOM_CHARACTER) ? content.slice(1) : content;
|
|
33147
33145
|
const cachedPackageJsons = /* @__PURE__ */ new Map();
|
|
33148
33146
|
const clearPackageJsonCache = () => {
|
|
33149
33147
|
cachedPackageJsons.clear();
|
|
33150
33148
|
};
|
|
33151
33149
|
const readPackageJsonUncached = (packageJsonPath) => {
|
|
33152
33150
|
try {
|
|
33153
|
-
return JSON.parse(
|
|
33151
|
+
return JSON.parse(NFS.readFileSync(packageJsonPath, "utf-8"));
|
|
33154
33152
|
} catch (error) {
|
|
33155
33153
|
if (error instanceof SyntaxError) return {};
|
|
33156
33154
|
if (isErrnoException(error)) {
|
|
@@ -36791,6 +36789,7 @@ const PNPM_WORKSPACE_FILE = "pnpm-workspace.yaml";
|
|
|
36791
36789
|
const PNPM_LOCKFILE = "pnpm-lock.yaml";
|
|
36792
36790
|
const PACKAGE_JSON_FILE = "package.json";
|
|
36793
36791
|
const PNPM_HARDENING_RULE_KEY = "require-pnpm-hardening";
|
|
36792
|
+
const UTF8_BOM_CHAR = "";
|
|
36794
36793
|
const HARDENING_SETTING_KEYS = new Set([
|
|
36795
36794
|
"minimumReleaseAge",
|
|
36796
36795
|
"blockExoticSubdeps",
|
|
@@ -36815,11 +36814,12 @@ const stripInlineComment = (rawValue) => {
|
|
|
36815
36814
|
return rawValue;
|
|
36816
36815
|
};
|
|
36817
36816
|
const unquote = (rawValue) => rawValue.replace(/^["']|["']$/g, "");
|
|
36817
|
+
const stripBom = (rawContent) => rawContent.startsWith(UTF8_BOM_CHAR) ? rawContent.slice(1) : rawContent;
|
|
36818
36818
|
const parseHardeningSettings = (content) => {
|
|
36819
36819
|
let minimumReleaseAge = null;
|
|
36820
36820
|
let blockExoticSubdeps = null;
|
|
36821
36821
|
let trustPolicy = null;
|
|
36822
|
-
const lines =
|
|
36822
|
+
const lines = stripBom(content).split(/\r?\n/);
|
|
36823
36823
|
for (let lineIndex = 0; lineIndex < lines.length; lineIndex += 1) {
|
|
36824
36824
|
const lineText = lines[lineIndex];
|
|
36825
36825
|
if (lineText === void 0) continue;
|
|
@@ -36853,7 +36853,7 @@ const isPnpmManagedProject = (rootDirectory) => {
|
|
|
36853
36853
|
const packageJsonPath = Path.join(rootDirectory, PACKAGE_JSON_FILE);
|
|
36854
36854
|
if (!isFile(packageJsonPath)) return false;
|
|
36855
36855
|
try {
|
|
36856
|
-
const packageJsonRaw =
|
|
36856
|
+
const packageJsonRaw = NFS.readFileSync(packageJsonPath, "utf-8");
|
|
36857
36857
|
const packageJson = JSON.parse(packageJsonRaw);
|
|
36858
36858
|
if (packageJson !== null && typeof packageJson === "object" && "packageManager" in packageJson && typeof packageJson.packageManager === "string" && packageJson.packageManager.startsWith("pnpm@")) return true;
|
|
36859
36859
|
} catch {
|
|
@@ -43241,4 +43241,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
43241
43241
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
43242
43242
|
|
|
43243
43243
|
//# sourceMappingURL=index.js.map
|
|
43244
|
-
//# debugId=
|
|
43244
|
+
//# debugId=fc1129a0-9ad2-5802-a82e-4982d9572eed
|
package/dist/lsp.js
CHANGED
|
@@ -33194,15 +33194,13 @@ const listSourceFilesViaFilesystem = (rootDirectory) => {
|
|
|
33194
33194
|
const listSourceFilesWithSize = (rootDirectory) => collectSizedSourceFiles(rootDirectory, (listSourceFilesViaGit(rootDirectory) ?? listSourceFilesViaFilesystem(rootDirectory)).sort());
|
|
33195
33195
|
const listSourceFiles = (rootDirectory) => listSourceFilesWithSize(rootDirectory).map((entry) => entry.path);
|
|
33196
33196
|
const countSourceFiles = (rootDirectory) => listSourceFilesWithSize(rootDirectory).length;
|
|
33197
|
-
const UTF8_BOM_CHARACTER = "";
|
|
33198
|
-
const stripUtf8Bom = (content) => content.startsWith(UTF8_BOM_CHARACTER) ? content.slice(1) : content;
|
|
33199
33197
|
const cachedPackageJsons = /* @__PURE__ */ new Map();
|
|
33200
33198
|
const clearPackageJsonCache = () => {
|
|
33201
33199
|
cachedPackageJsons.clear();
|
|
33202
33200
|
};
|
|
33203
33201
|
const readPackageJsonUncached = (packageJsonPath) => {
|
|
33204
33202
|
try {
|
|
33205
|
-
return JSON.parse(
|
|
33203
|
+
return JSON.parse(NFS.readFileSync(packageJsonPath, "utf-8"));
|
|
33206
33204
|
} catch (error) {
|
|
33207
33205
|
if (error instanceof SyntaxError) return {};
|
|
33208
33206
|
if (isErrnoException(error)) {
|
|
@@ -36769,6 +36767,7 @@ const PNPM_WORKSPACE_FILE = "pnpm-workspace.yaml";
|
|
|
36769
36767
|
const PNPM_LOCKFILE = "pnpm-lock.yaml";
|
|
36770
36768
|
const PACKAGE_JSON_FILE = "package.json";
|
|
36771
36769
|
const PNPM_HARDENING_RULE_KEY = "require-pnpm-hardening";
|
|
36770
|
+
const UTF8_BOM_CHAR = "";
|
|
36772
36771
|
const HARDENING_SETTING_KEYS = new Set([
|
|
36773
36772
|
"minimumReleaseAge",
|
|
36774
36773
|
"blockExoticSubdeps",
|
|
@@ -36793,11 +36792,12 @@ const stripInlineComment = (rawValue) => {
|
|
|
36793
36792
|
return rawValue;
|
|
36794
36793
|
};
|
|
36795
36794
|
const unquote = (rawValue) => rawValue.replace(/^["']|["']$/g, "");
|
|
36795
|
+
const stripBom = (rawContent) => rawContent.startsWith(UTF8_BOM_CHAR) ? rawContent.slice(1) : rawContent;
|
|
36796
36796
|
const parseHardeningSettings = (content) => {
|
|
36797
36797
|
let minimumReleaseAge = null;
|
|
36798
36798
|
let blockExoticSubdeps = null;
|
|
36799
36799
|
let trustPolicy = null;
|
|
36800
|
-
const lines =
|
|
36800
|
+
const lines = stripBom(content).split(/\r?\n/);
|
|
36801
36801
|
for (let lineIndex = 0; lineIndex < lines.length; lineIndex += 1) {
|
|
36802
36802
|
const lineText = lines[lineIndex];
|
|
36803
36803
|
if (lineText === void 0) continue;
|
|
@@ -36831,7 +36831,7 @@ const isPnpmManagedProject = (rootDirectory) => {
|
|
|
36831
36831
|
const packageJsonPath = Path.join(rootDirectory, PACKAGE_JSON_FILE);
|
|
36832
36832
|
if (!isFile(packageJsonPath)) return false;
|
|
36833
36833
|
try {
|
|
36834
|
-
const packageJsonRaw =
|
|
36834
|
+
const packageJsonRaw = NFS.readFileSync(packageJsonPath, "utf-8");
|
|
36835
36835
|
const packageJson = JSON.parse(packageJsonRaw);
|
|
36836
36836
|
if (packageJson !== null && typeof packageJson === "object" && "packageManager" in packageJson && typeof packageJson.packageManager === "string" && packageJson.packageManager.startsWith("pnpm@")) return true;
|
|
36837
36837
|
} catch {
|
|
@@ -44878,5 +44878,5 @@ const startLanguageServer = () => {
|
|
|
44878
44878
|
};
|
|
44879
44879
|
//#endregion
|
|
44880
44880
|
export { startLanguageServer };
|
|
44881
|
-
!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]="
|
|
44882
|
-
//# debugId=
|
|
44881
|
+
!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]="e43f1571-2fdb-5f22-88b7-df9f86c3af31")}catch(e){}}();
|
|
44882
|
+
//# debugId=e43f1571-2fdb-5f22-88b7-df9f86c3af31
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-doctor",
|
|
3
|
-
"version": "0.7.6-dev.
|
|
3
|
+
"version": "0.7.6-dev.f215ace",
|
|
4
4
|
"description": "Your agent writes bad React. This catches it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"vscode-languageserver-textdocument": "^1.0.12",
|
|
66
66
|
"vscode-uri": "^3.1.0",
|
|
67
67
|
"yaml": "^2.9.0",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
68
|
+
"deslop-js": "0.7.6",
|
|
69
|
+
"oxlint-plugin-react-doctor": "0.7.6-dev.f215ace"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/babel__code-frame": "^7.27.0",
|
|
@@ -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/
|
|
77
|
+
"@react-doctor/api": "0.7.6",
|
|
78
78
|
"@react-doctor/core": "0.7.6",
|
|
79
|
-
"@react-doctor/
|
|
79
|
+
"@react-doctor/language-server": "0.7.6"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": "^20.19.0 || >=22.13.0"
|