@geoql/doctor-core 1.0.0 → 1.0.1
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/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -213,6 +213,7 @@ async function checkBuildQuality(projectInfo) {
|
|
|
213
213
|
}
|
|
214
214
|
//#endregion
|
|
215
215
|
//#region src/dead-code/build-knip-config.ts
|
|
216
|
+
const DEMO_WORKSPACES = ["example", "playground"];
|
|
216
217
|
function buildKnipConfig(projectInfo, doctorConfig) {
|
|
217
218
|
const isNuxt = projectInfo.framework === "nuxt";
|
|
218
219
|
const usesConventionResolution = projectInfo.hasAutoImports || projectInfo.hasComponentsAutoImport || projectInfo.hasVueRouter;
|
|
@@ -249,7 +250,8 @@ function buildKnipConfig(projectInfo, doctorConfig) {
|
|
|
249
250
|
"vite-plus",
|
|
250
251
|
"@geoql/vue-doctor",
|
|
251
252
|
"@geoql/nuxt-doctor"
|
|
252
|
-
]
|
|
253
|
+
],
|
|
254
|
+
ignoreWorkspaces: [...DEMO_WORKSPACES]
|
|
253
255
|
};
|
|
254
256
|
if (isNuxt) config.compilers = { nuxt: true };
|
|
255
257
|
return config;
|
|
@@ -397,7 +399,8 @@ async function writeKnipConfig(rootDir, config) {
|
|
|
397
399
|
entry: config.entry,
|
|
398
400
|
project: config.project,
|
|
399
401
|
ignore: config.ignoreFiles,
|
|
400
|
-
ignoreDependencies: config.ignoreDependencies
|
|
402
|
+
ignoreDependencies: config.ignoreDependencies,
|
|
403
|
+
ignoreWorkspaces: config.ignoreWorkspaces
|
|
401
404
|
};
|
|
402
405
|
if (config.compilers) knipJson.compilers = config.compilers;
|
|
403
406
|
await writeFile(configPath, JSON.stringify(knipJson, null, 2), "utf8");
|
|
@@ -2703,7 +2706,9 @@ async function audit(config = {}) {
|
|
|
2703
2706
|
...sfcDiagnostics,
|
|
2704
2707
|
...scriptDiagnostics
|
|
2705
2708
|
]).filter((d) => config.rules?.[d.ruleId] !== "off");
|
|
2706
|
-
} catch {
|
|
2709
|
+
} catch (err) {
|
|
2710
|
+
if (process.env.DOCTOR_DEBUG) process.stderr.write(`[doctor-core] dead-code pass failed: ${String(err)}\n`);
|
|
2711
|
+
}
|
|
2707
2712
|
deadCodeElapsed = performance.now() - deadCodeStart;
|
|
2708
2713
|
}
|
|
2709
2714
|
let buildQualityDiagnostics = [];
|