universal-dev-standards 5.0.0-beta.2 → 5.0.0-beta.4

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": "universal-dev-standards",
3
- "version": "5.0.0-beta.2",
3
+ "version": "5.0.0-beta.4",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -1,7 +1,7 @@
1
1
  import chalk from 'chalk';
2
2
  import ora from 'ora';
3
3
  import { execSync } from 'child_process';
4
- import { existsSync, readFileSync, writeFileSync } from 'fs';
4
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
5
5
  import { join } from 'path';
6
6
  import {
7
7
  manifestExists as isInitialized
@@ -158,8 +158,9 @@ async function setupHuskyHook(projectPath) {
158
158
  }
159
159
 
160
160
  // 2. Initialize husky
161
+ const huskyDir = join(projectPath, '.husky');
161
162
  try {
162
- if (!existsSync(join(projectPath, '.husky'))) {
163
+ if (!existsSync(huskyDir)) {
163
164
  console.log(chalk.gray(' Initializing husky...'));
164
165
  execSync('npx husky init', { stdio: 'ignore', cwd: projectPath });
165
166
  }
@@ -167,10 +168,20 @@ async function setupHuskyHook(projectPath) {
167
168
  // Ignore, might already be init
168
169
  }
169
170
 
170
- // 3. Add pre-commit hook
171
- const preCommitPath = join(projectPath, '.husky', 'pre-commit');
171
+ // 3. Ensure .husky directory exists (fallback if husky init failed)
172
+ if (!existsSync(huskyDir)) {
173
+ try {
174
+ mkdirSync(huskyDir, { recursive: true });
175
+ } catch (e) {
176
+ console.log(chalk.red(` ✗ Failed to create .husky directory: ${e.message}`));
177
+ return;
178
+ }
179
+ }
180
+
181
+ // 4. Add pre-commit hook
182
+ const preCommitPath = join(huskyDir, 'pre-commit');
172
183
  const udsCmd = 'npx uds check --standard checkin-standards';
173
-
184
+
174
185
  try {
175
186
  let content = '';
176
187
  if (existsSync(preCommitPath)) {
@@ -179,15 +190,15 @@ async function setupHuskyHook(projectPath) {
179
190
  // Create if not exists (husky init usually creates it, but just in case)
180
191
  content = '#!/usr/bin/env sh\n. "$(dirname -- "$0")/_/husky.sh"\n';
181
192
  }
182
-
193
+
183
194
  if (!content.includes('checkin-standards')) {
184
- console.log(chalk.green(' ✓ Adding uds check to pre-commit hook'));
185
195
  writeFileSync(preCommitPath, content + `\n# UDS Standard Check\n${udsCmd}\n`, 'utf-8');
186
- try {
187
- execSync(`chmod +x ${preCommitPath}`);
196
+ try {
197
+ execSync(`chmod +x ${preCommitPath}`);
188
198
  } catch (e) {
189
199
  // Ignore chmod failures on systems that don't support it
190
200
  }
201
+ console.log(chalk.green(' ✓ Adding uds check to pre-commit hook'));
191
202
  } else {
192
203
  console.log(chalk.gray(' ✓ Pre-commit hook already configured'));
193
204
  }
@@ -66,14 +66,16 @@ export const INTEGRATION_MAPPINGS = {
66
66
  export async function installIntegrations(config, projectPath) {
67
67
  const {
68
68
  integrations = [],
69
- integrationConfigs = {},
70
69
  installedStandards = [],
71
70
  contentMode = 'minimal',
72
71
  level = 2,
73
- commonLanguage = 'en',
74
- commitLanguage = 'english'
75
72
  } = config;
76
73
 
74
+ // Resolve parameters (support both naming conventions from different callers)
75
+ const integrationConfigs = config.integrationConfigs || config.skillsConfig?.integrationConfigs || {};
76
+ const commonLanguage = config.commonLanguage || config.displayLanguage || 'en';
77
+ const commitLanguage = config.commitLanguage || config.standardOptions?.commit_language || 'english';
78
+
77
79
  const msg = t().commands.init;
78
80
 
79
81
  // Track results
@@ -182,10 +184,12 @@ export async function generateClaudeMd(config, projectPath) {
182
184
  installedStandards = [],
183
185
  contentMode = 'minimal',
184
186
  level = 2,
185
- commonLanguage = 'en',
186
- commitLanguage = 'english'
187
187
  } = config;
188
188
 
189
+ // Resolve parameters (support both naming conventions from different callers)
190
+ const commonLanguage = config.commonLanguage || config.displayLanguage || 'en';
191
+ const commitLanguage = config.commitLanguage || config.standardOptions?.commit_language || 'english';
192
+
189
193
  const msg = t().commands.init;
190
194
 
191
195
  // Check if Claude Code is selected and CLAUDE.md doesn't exist
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "5.0.0-beta.2",
3
+ "version": "5.0.0-beta.4",
4
4
  "lastUpdated": "2026-02-04",
5
5
  "description": "Standards registry for universal-dev-standards with integrated skills and AI-optimized formats",
6
6
  "formats": {
@@ -48,14 +48,14 @@
48
48
  "standards": {
49
49
  "name": "universal-dev-standards",
50
50
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
51
- "version": "5.0.0-beta.2"
51
+ "version": "5.0.0-beta.4"
52
52
  },
53
53
  "skills": {
54
54
  "name": "universal-dev-standards",
55
55
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
56
56
  "localPath": "skills",
57
57
  "rawUrl": "https://raw.githubusercontent.com/AsiaOstrich/universal-dev-standards/main/skills",
58
- "version": "5.0.0-beta.2",
58
+ "version": "5.0.0-beta.4",
59
59
  "note": "Skills are now included in the main repository under skills/"
60
60
  }
61
61
  },