🔧 Fix CI: remove @lilith devDeps, always install
Internal @lilith packages not needed for CI builds. Install always runs to ensure TypeScript is available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
361c714ffc
commit
9c5fe5715a
1 changed files with 10 additions and 12 deletions
|
|
@ -36,32 +36,30 @@ jobs:
|
|||
const fs = require('fs');
|
||||
if (fs.existsSync('package.json')) {
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
||||
const transform = (deps) => {
|
||||
const transform = (deps, removeInternal = false) => {
|
||||
if (!deps) return deps;
|
||||
for (const [name, version] of Object.entries(deps)) {
|
||||
if (version.startsWith('workspace:') || version.startsWith('file:')) {
|
||||
if (removeInternal && name.startsWith('@lilith/')) {
|
||||
delete deps[name];
|
||||
console.log(' Removed internal dep:', name);
|
||||
} else if (version.startsWith('workspace:') || version.startsWith('file:')) {
|
||||
deps[name] = '*';
|
||||
}
|
||||
}
|
||||
return deps;
|
||||
};
|
||||
pkg.dependencies = transform(pkg.dependencies);
|
||||
pkg.devDependencies = transform(pkg.devDependencies);
|
||||
// Remove @lilith devDeps - they're config only, not needed for build
|
||||
pkg.devDependencies = transform(pkg.devDependencies, true);
|
||||
pkg.peerDependencies = transform(pkg.peerDependencies);
|
||||
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
|
||||
}
|
||||
"
|
||||
|
||||
- name: Install dependencies (if needed)
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
# Check if there are actual dependencies (not just peer/dev dependencies)
|
||||
has_deps=$(node -p "Object.keys(require('./package.json').dependencies || {}).length > 0")
|
||||
if [ "$has_deps" = "true" ]; then
|
||||
echo "Installing dependencies..."
|
||||
pnpm install --no-frozen-lockfile
|
||||
else
|
||||
echo "No runtime dependencies, skipping install"
|
||||
fi
|
||||
echo "Installing dependencies..."
|
||||
pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Build and Publish
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue