Fix IDE setup crash: yaml module not found in production
_base-ide.js required the 'yaml' package (devDependency only) instead of 'js-yaml' (production dependency), causing all IDE integrations to fail during npx install. Also cleans up legacy _wds-learn/ during migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
69d9b733bf
commit
54241b1a90
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "whiteport-design-studio",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.2",
|
||||
"description": "Whiteport Design Studio - Strategic design methodology for AI-powered workflows",
|
||||
"keywords": [
|
||||
"design",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
const path = require('node:path');
|
||||
const fs = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const yaml = require('yaml');
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
/**
|
||||
* Base class for IDE-specific setup
|
||||
|
|
@ -138,7 +138,7 @@ class BaseIdeSetup {
|
|||
// Try to extract YAML frontmatter
|
||||
const frontmatterMatch = content.match(/^---\s*\n([\s\S]*?)\n---/);
|
||||
if (frontmatterMatch) {
|
||||
const frontmatter = yaml.parse(frontmatterMatch[1]);
|
||||
const frontmatter = yaml.load(frontmatterMatch[1]);
|
||||
|
||||
return {
|
||||
name: frontmatter.name || path.basename(filePath, '.md'),
|
||||
|
|
|
|||
|
|
@ -45,6 +45,13 @@ class Installer {
|
|||
const migrateSpinner = ora(`Migrating _wds/ → ${wdsFolder}/...`).start();
|
||||
await fs.ensureDir(path.dirname(wdsDir));
|
||||
await fs.remove(legacyDir);
|
||||
|
||||
// Also remove legacy _wds-learn/ (will be recreated if learning material is selected)
|
||||
const legacyLearnDir = path.join(projectDir, '_wds-learn');
|
||||
if (await fs.pathExists(legacyLearnDir)) {
|
||||
await fs.remove(legacyLearnDir);
|
||||
}
|
||||
|
||||
migrateSpinner.succeed(`Legacy _wds/ removed — installing fresh at ${wdsFolder}/`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue