Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
Checkpoint SKF project format and export updates
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { appendEditorHistorySnapshot, boundedEditorHistory, editorHistoryEntry, hydrateEditorHistoryState, projectShapesFingerprint } from "@/lib/editorHistory";
|
||||
import { appendEditorHistorySnapshot, boundedEditorHistory, editorHistoryEntry, editorHistoryForExport, hydrateEditorHistoryState, projectShapesFingerprint } from "@/lib/editorHistory";
|
||||
import type { WorkplaneShape } from "@/types/sketchforge";
|
||||
|
||||
function box(overrides: Partial<WorkplaneShape> = {}): WorkplaneShape {
|
||||
@@ -107,4 +107,18 @@ describe("editor history snapshots", () => {
|
||||
expect(restored.entries).toHaveLength(1);
|
||||
expect(restored.entries[0].shapes[0].x).toBe(9);
|
||||
});
|
||||
|
||||
it("selects all history or the requested number of recent undo actions for project export", () => {
|
||||
const entries = Array.from({ length: 140 }, (_, x) => editorHistoryEntry([box({ x })], []));
|
||||
|
||||
const unlimited = editorHistoryForExport(entries, 120, "unlimited");
|
||||
expect(unlimited.entries).toBe(entries);
|
||||
expect(unlimited.index).toBe(120);
|
||||
|
||||
const lastThirty = editorHistoryForExport(entries, 120, 30);
|
||||
expect(lastThirty.entries).toHaveLength(31);
|
||||
expect(lastThirty.index).toBe(30);
|
||||
expect(lastThirty.entries[0].shapes[0].x).toBe(90);
|
||||
expect(lastThirty.entries[30].shapes[0].x).toBe(120);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user