Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/cli/src/project/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,15 @@ async function ensureSvelteManagedHooks(projectRoot: string): Promise<void> {
if (legacyUserContents && (!hooksContents || isManagedPrepareArtifact(hooksContents))) {
await writeFileIfChanged(hooksPath, legacyUserContents)
await unlinkIfPresent(legacyHooksUserPath)
} else if (legacyUserContents && hooksContents === legacyUserContents) {
await unlinkIfPresent(legacyHooksUserPath)
}

if (legacyServerUserContents && (!hooksServerContents || isManagedPrepareArtifact(hooksServerContents))) {
await writeFileIfChanged(hooksServerPath, legacyServerUserContents)
await unlinkIfPresent(legacyHooksServerUserPath)
} else if (legacyServerUserContents && hooksServerContents === legacyServerUserContents) {
await unlinkIfPresent(legacyHooksServerUserPath)
}

// If the current src/hooks.ts is a legacy Holo-managed artifact or doesn't exist,
Expand Down
Loading