@diegovelasquezweb/a11y-engine 0.11.17 → 0.11.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diegovelasquezweb/a11y-engine",
3
- "version": "0.11.17",
3
+ "version": "0.11.18",
4
4
  "description": "WCAG 2.2 accessibility audit engine — scanner, analyzer, and report builders",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/cli/audit.mjs CHANGED
@@ -221,21 +221,20 @@ async function main() {
221
221
  try {
222
222
  log.info("Starting accessibility audit pipeline...");
223
223
 
224
- const nodeModulesPath = path.join(SKILL_ROOT, "node_modules");
225
- if (!fs.existsSync(nodeModulesPath)) {
226
- log.info(
227
- "First run detected — installing skill dependencies (one-time setup)...",
228
- );
229
- try {
230
- execSync("pnpm install", { cwd: SKILL_ROOT, stdio: "ignore" });
231
- } catch {
232
- execSync("npm install", { cwd: SKILL_ROOT, stdio: "ignore" });
224
+ if (!SKILL_ROOT.includes(`${path.sep}node_modules${path.sep}`)) {
225
+ const nodeModulesPath = path.join(SKILL_ROOT, "node_modules");
226
+ if (!fs.existsSync(nodeModulesPath)) {
227
+ log.info("First run detected — installing skill dependencies (one-time setup)...");
228
+ try {
229
+ execSync("pnpm install", { cwd: SKILL_ROOT, stdio: "ignore" });
230
+ } catch {
231
+ execSync("npm install", { cwd: SKILL_ROOT, stdio: "ignore" });
232
+ }
233
+ log.success("Dependencies ready.");
233
234
  }
234
- log.success("Dependencies ready.");
235
+ await runScript("../core/toolchain.mjs");
235
236
  }
236
237
 
237
- await runScript("../core/toolchain.mjs");
238
-
239
238
  const screenshotsDir = getInternalPath("screenshots");
240
239
  fs.rmSync(screenshotsDir, { recursive: true, force: true });
241
240
 
@@ -37,9 +37,7 @@ function parseArgs(argv) {
37
37
  */
38
38
  function checkNodeModules() {
39
39
  const nodeModulesPath = path.join(SKILL_ROOT, "node_modules");
40
- if (fs.existsSync(nodeModulesPath)) return true;
41
- // When installed as an npm package, deps are hoisted — check passes.
42
- return SKILL_ROOT.includes(`${path.sep}node_modules${path.sep}`);
40
+ return fs.existsSync(nodeModulesPath);
43
41
  }
44
42
 
45
43
  /**