@techninja/clearstack 0.4.22 → 0.4.23

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.
@@ -34,6 +34,14 @@ export function loadConfig(projectDir) {
34
34
  const base = existsSync(envPath) ? parseEnv(readFileSync(envPath, 'utf-8')) : {};
35
35
  const local = existsSync(localPath) ? parseEnv(readFileSync(localPath, 'utf-8')) : {};
36
36
  const env = { ...base, ...local };
37
+ // List keys: merge base + local so .env.local additions don't drop .env defaults.
38
+ const mergeList = (key) => {
39
+ const b = base[key] ? base[key].split(',').map((s) => s.trim()) : [];
40
+ const l = local[key] ? local[key].split(',').map((s) => s.trim()) : [];
41
+ return [...new Set([...b, ...l])];
42
+ };
43
+ const ignoreDirs = env.SPEC_IGNORE_DIRS ? mergeList('SPEC_IGNORE_DIRS') : ['node_modules', 'src/vendor', '.git', '.configs'];
44
+ const watchDirs = env.SPEC_WATCH_DIRS ? mergeList('SPEC_WATCH_DIRS') : null;
37
45
  return {
38
46
  serverCmd: env.SPEC_SERVER_CMD || null,
39
47
  rawEnv: env,
@@ -43,8 +51,8 @@ export function loadConfig(projectDir) {
43
51
  codeExt: (env.SPEC_CODE_EXTENSIONS || '.js,.css').split(','),
44
52
  docsExt: (env.SPEC_DOCS_EXTENSIONS || '.md').split(','),
45
53
  testPattern: env.SPEC_TEST_PATTERN || '.test.js',
46
- ignore: (env.SPEC_IGNORE_DIRS || 'node_modules,src/vendor,.git,.configs').split(','),
47
- watchDirs: env.SPEC_WATCH_DIRS ? env.SPEC_WATCH_DIRS.split(',').map((d) => d.trim()) : null,
54
+ ignore: ignoreDirs,
55
+ watchDirs: watchDirs,
48
56
  };
49
57
  }
50
58
 
@@ -59,7 +59,7 @@ export function extractViolations(row, projectDir) {
59
59
  const errors = row.result.errors;
60
60
  // Prettier: [warn] src/file.js — expand each into its own entry
61
61
  const prettierFiles = errors.map((l) => l.match(/^\[warn\]\s+(.+\.\w+)$/)?.[1]).filter(Boolean);
62
- if (prettierFiles.length) return prettierFiles.map((f) => [f, 'formatting — run npm run format']);
62
+ if (prettierFiles.length) return prettierFiles.map((f) => [f, 'formatting — run `f` to fix']);
63
63
  return [[row.label ?? row.name ?? row.key, errors.slice(0, 5).join('\n')]];
64
64
  }
65
65
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techninja/clearstack",
3
- "version": "0.4.22",
3
+ "version": "0.4.23",
4
4
  "type": "module",
5
5
  "description": "A no-build web component framework specification — scaffold, validate, and evolve spec-compliant projects",
6
6
  "bin": {